]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2005-06-30 Marco Gerards <metgerards@student.han.nl>
[grub2.git] / ChangeLog
CommitLineData
121c1d83 12005-06-30 Marco Gerards <metgerards@student.han.nl>
2
3 * configure.ac: Fix the test for cross-compiling.
4
5 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
6 define GRUB_UTIL anymore.
7
8 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
9 so this function works on other systems than just big endian.
10 (load_modules): Likewise.
11 (add_segments): Likewise.
12
e75d76e1 132005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14
15 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
16 contains `l' modifier, get a long from va_arg().
17
50b5a0a7 182005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
19
20 * kern/mm.c (grub_free): If the next free block which is being
21 merged is the first free block, set the first block to the block
22 being freed.
23 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
24
89371b20 252005-05-08 Hollis Blanchard <hollis@penguinppc.org>
26
27 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
28 `grub_ieee1275_chosen'.
29
168d6e58 302005-05-08 Hollis Blanchard <hollis@penguinppc.org>
31
32 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
33 (grub_ieee1275_chosen): New variable.
34 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
35 `chosen'.
36 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
37 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
38 Rename first argument to `phandle' for consistency.
39 (grub_ieee1275_get_property_length): Likewise.
40 (grub_ieee1275_next_property): Likewise. Change type of first argument
41 to grub_ieee1275_phandle_t.
42 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
43 Move export next to declaration.
44 (grub_ieee1275_chosen): New variable.
45 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
46 Correct cosmetic typo.
47 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
48 `grub_ieee1275_chosen'.
49 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
50 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
51 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
52 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
53 `grub_ieee1275_chosen'.
54
ca5baa3f 552005-05-10 Hollis Blanchard <hollis@penguinppc.org>
56
57 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
58 /chosen/bootargs.
59 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
60 /chosen/bootargs as "variable=value" pairs.
61
708b345f 622005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
63
64 * include/grub/misc.h (grub_dprintf): New macro.
65 (grub_real_dprintf): New prototype.
66 (grub_strword): Likewise.
67 (grub_iswordseparator): Likewise.
68 * kern/misc.c (grub_real_dprintf): New function.
69 (grub_strword): Likewise.
70 (grub_iswordseparator): Likewise.
71
f4c5e67c 722005-04-30 Hollis Blanchard <hollis@penguinppc.org>
73
74 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
75 (roundup): Remove macro.
76 (grub_ieee1275_flags): Make static.
77 (grub_ieee1275_realmode): Remove.
78 (grub_ieee1275_test_flag): New function.
79 (grub_ieee1275_set_flag): Likewise.
80 (find_options): Rename to `grub_ieee1275_find_options'; update
81 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
82 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
83 (cmain): New prototype.
84 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
85 `grub_ieee1275_flags' directly.
86 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
87 machine/biosdisk.h.
88 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
89 Don't include grub/machine/init.h.
90 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
91 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
92 Remove prototype.
93 (grub_ieee1275_realmode): Likewise.
94 (grub_ieee1275_flag): New enum.
95 (grub_ieee1275_test_flag): New prototype.
96 (grub_ieee1275_set_flag): New prototype.
97 * include/grub/powerpc/ieee1275/init.h: Remove file.
98 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
99 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
100 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
101 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
102 comment.
103 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
104 `grub_ieee1275_test_flag'.
105 (grub_ieee1275_encode_devname): Likewise.
106
ed16607e 1072005-04-21 Hollis Blanchard <hollis@penguinppc.org>
108
109 * include/grub/powerpc/ieee1275/ieee1275.h
110 (grub_ieee1275_encode_devname): New prototype.
111 (grub_ieee1275_get_filename): Likewise.
112 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
113 function.
114 (grub_set_prefix): Likewise.
115 (grub_machine_init): Call grub_set_prefix.
116 * kern/powerpc/ieee1275/openfw.c: Fix typos.
117 (grub_parse_type): New enum.
118 (grub_ieee1275_get_devargs): New function.
119 (grub_ieee1275_get_devname): Likewise.
120 (grub_ieee1275_parse_args): Likewise.
121 (grub_ieee1275_get_filename): Likewise.
122 (grub_ieee1275_encode_devname): Likewise.
123
be369920 1242005-03-30 Marco Gerards <metgerards@student.han.nl>
125
126 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
127 `grub_loader_unset'.
128
a5ce3a4a 1292005-03-26 Hollis Blanchard <hollis@penguinppc.org>
130
131 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
132 instead of grub_ieee1275_interpret.
133 (grub_halt_init): New function.
134 (grub_halt_fini): Likewise.
135 (GRUB_MOD_INIT): Correct message grammar.
136 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
137 instead of grub_ieee1275_interpret.
138 (grub_reboot_init): New function.
139 (grub_reboot_fini): Likewise.
140 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
141 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
142 util/i386/pc/misc.c with commands/ieee1275/halt.c,
143 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
144 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
145 function.
146 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
147 Add prototype.
148 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
149 prototype.
150 (grub_halt): Likewise.
151 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
152 (cmain): Remove __attribute__((unused)).
153 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
154 (grub_heap_len): Likewise.
155 (grub_machine_fini): New function.
156 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
157 (grub_halt): Likewise.
158 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
159 function.
160 * util/powerpc/ieee1275/misc.c: New file.
161
0058f771 1622005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
163
164 * DISTLIST: New file.
165 * gendistlist.sh: Likewise.
166
167 * Makefile.in (COMMON_DISTFILES): Removed.
168 (BOOT_DISTFILES): Likewise.
169 (CONF_DISTFILES): Likewise.
170 (DISK_DISTFILES): Likewise.
171 (FS_DISTFILES): Likewise.
172 (INCLUDE_DISTFILES): Likewise.
173 (KERN_DISTFILES): Likewise.
174 (LOADER_DISTFILES): Likewise.
175 (TERM_DISTFILES): Likewise.
176 (UTIL_DISTFILES): Likewise.
177 (DISTFILES): Likewise.
178 (uninstall): Uninstall files in $(pkgdata_DATA).
179 (DISTLIST): New target.
180 (distdir): Use the contents of the file DISTLIST to get a list of
181 distributed files.
182
46b3b8a5 1832005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
184
185 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
186 descriptor. This is ported from GRUB Legacy.
187
188 * gencmdlist.sh: Added an extra semicolon to make it work with
189 old sed versions. Reported by Robert Bihlmeyer
190 <robbe@orcus.priv.at>.
191
5822ff87 1922005-03-08 Yoshinori Okuji <okuji@enbug.org>
193
194 Automatic loading of commands is supported.
195
196 * normal/main.c (read_command_list): New function.
197 (grub_normal_execute): Call read_command_list.
198
199 * normal/command.c (grub_register_command): Return zero or CMD.
200 Allocate CMD->NAME from the heap.
201 Initialize CMD->MODULE_NAME to zero.
202 Find the same name as well. If the same command is found and it is
203 a dummy command, overwrite members. If it is not a dummy command,
204 return zero.
205 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
206 (grub_command_find): If a dummy command is found, load a module
207 and retry to find a command only once.
208
209 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
210 make sure that each command is loaded.
211
212 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
213 macro.
214 (struct grub_command): Remove const from the member `name'.
215 Add a new member `module_name'.
216 (grub_register_command): Return grub_command_t.
217
218 * commands/help.c (grub_cmd_help): Call grub_command_find to make
219 sure that each command is loaded.
220
221 * genmk.rb (PModule::rule): Specify a module name without the
222 suffix ".mod" to gencmdlist.sh.
223
7b1f4b57 2242005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
225
226 * gencmdlist.sh: New file.
227
228 * genmk.rb (PModule::rule): Generate a rule for a command list.
229 Clean command.lst.
230 Generate command.lst from $(COMMANDFILES).
231
232 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
233 (DATA): Added $(pkgdata_DATA).
234 (install-local): Install files in $(pkgdata_DATA).
235
062aaf39 2362005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
237
238 * term/i386/pc/vga.c (debug_command): Removed.
239 (GRUB_MOD_INIT): Do not register the command "debug".
240
241 From Hollis Blanchard:
242 * commands/configfile.c: New file.
243 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
244 commands/configfile.c.
245 (pkgdata_MODULES): Added configfile.mod.
246 (configfile_mod_SOURCES): New variable.
247 (configfile_mod_CFLAGS): Likewise.
248 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
249 commands/configfile.c.
250 (pkgdata_MODULES): Added configfile.mod.
251 (configfile_mod_SOURCES): New variable.
252 (configfile_mod_CFLAGS): Likewise.
253 * util/grub-emu.c (main): Call grub_configfile_init and
254 grub_configfile_fini.
255 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
256 prototype.
257 [GRUB_UTIL] (grub_configfile_fini): Likewise.
258
cee01aa6 2592005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
260
261 * normal/arg.c (grub_arg_show_help): Do not show the bug report
262 address.
263
264 * commands/help.c (grub_cmd_help): Do not print newlines after
265 the last command in print_command_help.
266
93f3a1d8 2672005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
268
269 * commands/default.h: New file.
270 * commands/timeout.h: Likewise.
271 * normal/context.c: Likewise.
272
273 * util/misc.c: Do not include sys/times.h.
274 Include sys/time.h and grub/machine/time.h.
275 (grub_get_rtc): Rewritten with gettimeofday.
276
277 * util/grub-emu.c (main): Call grub_default_init and
278 grub_timeout_init before grub_normal_init, and call
279 grub_timeout_fini and grub_default_fini after grub_main.
280
281 * util/console.c (grub_ncurses_checkkey): Return the read
282 character or -1.
283
284 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
285 timeouts.
286
287 * normal/main.c (read_config_file): Push MENU. If this fails,
288 print an error and wait for a user input.
289 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
290 If a menu is empty or an error occurs, pop MENU.
291 (grub_normal_execute): Pop and free MENU after grub_menu_run
292 returns.
293
294 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
295
296 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
297 include time.h.
298 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
299 without GRUB_UTIL.
300 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
301 time.h.
302 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
303 without GRUB_UTIL.
304
305 * include/grub/normal.h (struct grub_menu_list): New struct.
306 (grub_menu_list_t): New type.
307 (struct grub_context): New struct.
308 (grub_context_t): New type.
309 (grub_register_command): Got rid of EXPORT_FUNC.
310 (grub_unregister_command): Likewise.
311 (grub_context_get): New prototype.
312 (grub_context_get_current_menu): Likewise.
313 (grub_context_push_menu): Likewise.
314 (grub_context_pop_menu): Likewise.
315 [GRUB_UTIL] (grub_default_init): Likewise.
316 [GRUB_UTIL] (grub_default_fini): Likewise.
317 [GRUB_UTIL] (grub_timeout_init): Likewise.
318 [GRUB_UTIL] (grub_timeout_fini): Likewise.
319
320 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
321 commands/timeout.c and normal/context.c.
322 (pkgdata_MODULES): Added default.mod and timeout.mod.
323 (normal_mod_SOURCES): Added normal/context.c.
324 (default_mod_SOURCES): New variable.
325 (default_mod_CFLAGS): Likewise.
326 (timeout_mod_SOURCES): Likewise.
327 (timeout_mod_CFLAGS): Likewise.
328 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
329 conf/i386-pc.rmk.
330 (pkgdata_MODULES): Added default.mod and timeout.mod.
331 (normal_mod_SOURCES): Added normal/context.c.
332 (default_mod_SOURCES): New variable.
333 (default_mod_CFLAGS): Likewise.
334 (timeout_mod_SOURCES): Likewise.
335 (timeout_mod_CFLAGS): Likewise.
336
337 * Makefile.in (all-local): Added $(MKFILES).
338
4ed2e1dd 3392005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
340
341 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
342 (grub_emu_SOURCES): Likewise.
343 (pkgdata_MODULES): Add `sun.mod'.
344 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
345 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
346 `partmap/sun.c'.
347 (pkgdata_MODULES): Add `sun.mod'.
348 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
349 * include/grub/partition.h (grub_sun_partition_map_init): New
350 prototype.
351 (grub_sun_partition_map_fini): Likewise.
352 * partmap/sun.c: New file.
353 * util/grub-emu.c (main): Initialize and de-initialize the sun
354 partitionmap support.
355
4d4e372e 3562005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
357
358 This implements an Emacs-like menu entry editor.
359
360 * normal/menu_entry.c: New file.
361
362 * util/console.c (grub_ncurses_putchar): Translate some Unicode
363 characters to ASCII.
364 (saved_char): New variable.
365 (grub_ncurses_checkkey): Rewritten completely.
366 (grub_ncurses_getkey): Likewise.
367 (grub_ncurses_init): Call raw instead of cbreak.
368
369 * normal/menu.c (print_entry): Do not put a space.
370 (init_page): Renamed to ...
371 (grub_menu_init_page): ... this. All callers changed.
372 (edit_menu_entry): Removed.
373 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
374
375 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
376
377 * kern/misc.c (grub_vprintf): Call grub_refresh.
378
379 * normal/menu.c (DISP_LEFT): Renamed to ...
380 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
381 * normal/menu.c (DISP_UP): Renamed to ...
382 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
383 * normal/menu.c (DISP_RIGHT): Renamed to ...
384 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
385 * normal/menu.c (DISP_DOWN): Renamed to ...
386 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
387 * normal/menu.c (DISP_HLINE): Renamed to ...
388 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
389 * normal/menu.c (DISP_VLINE): Renamed to ...
390 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
391 * normal/menu.c (DISP_UL): Renamed to ...
392 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
393 * normal/menu.c (DISP_UR): Renamed to ...
394 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
395 * normal/menu.c (DISP_LL): Renamed to ...
396 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
397 * normal/menu.c (DISP_LR): Renamed to ...
398 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
399 * normal/menu.c (TERM_WIDTH): Renamed to ...
400 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
401 * normal/menu.c (TERM_HEIGHT): Renamed to ...
402 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
403 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
404 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
405 * normal/menu.c (TERM_MARGIN): Renamed to ...
406 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
407 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
408 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
409 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
410 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
411 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
412 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
413 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
414 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
415 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
416 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
417 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
418 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
419 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
420 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
421 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
422 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
423 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
424 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
425 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
426 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
427 All callers changed.
428
429 * include/grub/normal.h: New prototype.
430
431 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
432 normal/menu_entry.c.
433 (normal_mod_SOURCES): Likewise.
434 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
435 (normal_mod_SOURCES): Likewise.
436
e6b92c8a 4372005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
438
439 * include/grub/normal.h (grub_halt_init): New prototype.
440 (grub_halt_fini): Likewise.
441 (grub_reboot_init): Likewise.
442 (grub_reboot_fini): Likewise.
443
444 * util/grub-emu.c: Include signal.h.
445 (main_env): New global variable.
446 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
447 catch C-c.
448 (grub_machine_fini): New function.
449 (main): Call grub_halt_init and grub_reboot_init before
450 grub_main, and grub_reboot_fini and grub_halt_fini after it.
451 Call setjmp with MAIN_ENV to go back afterwards.
452 Call grub_machine_fini right before return.
453
454 * include/grub/util/misc.h: Include setjmp.h.
455 (main_env): New prototype.
456
457 * include/grub/kernel.h (grub_machine_fini): New prototype.
458 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
459 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
460
461 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
462 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
463 * term/i386/pc/console.c (grub_console_fini): Likewise.
464
465 * util/i386/pc/misc.c: New file.
466
467 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
468 util/i386/pc/misc.c, commands/i386/pc/halt.c and
469 commands/i386/pc/reboot.c.
470
c642636f 4712005-02-14 Guillem Jover <guillem@hadrons.org>
472
473 * include/grub/dl.h (grub_dl_check_header): New prototype.
474 (grub_arch_dl_check_header): Change return type to grub_err_t,
475 remove size parameter and export function. Update all callers.
476 * kern/dl.c (grub_dl_check_header): New function.
477 (grub_dl_load_core): Use `grub_dl_check_header' instead of
478 `grub_arch_dl_check_header'. Check ELF type. Check if sections
479 are inside the core.
480 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
481 independent ELF header checks.
482 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
483 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
484 `grub_dl_check_header' instead of explicit checks. Check for the
485 ELF type.
486 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
487 `grub_dl_check_header' instead of explicit checks. Remove arch
488 specific ELF header checks.
489
e6b92c8a 490 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
491 argument SIZE.
492
5eabe94b 4932005-02-13 Hollis Blanchard <hollis@penguinppc.org>
494
495 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
496 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
497
1b14a681 4982005-02-12 Hollis Blanchard <hollis@penguinppc.org>
499
500 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
501 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
502 (part_map_iterate): Clear `grub_errno' and return 0 if
503 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
504 * partmap/amiga.c (amiga_partition_map_iterate): Return
505 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
506 * partmap/apple.c (apple_partition_map_iterate): Likewise.
507
aca108aa 5082005-02-01 Guillem Jover <guillem@hadrons.org>
509
510 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
511 help info.
512
c9f9c556 5132005-01-31 Marco Gerards <metgerards@student.han.nl>
514
515 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
516 Removed prototype.
517 (grub_rescue_cmd_linux): New prototype.
518 (grub_rescue_cmd_initrd): Likewise.
519 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
520 `bi_rec'.
521 (grub_linux_release_mem): Release the memory for the initrd.
522 (grub_load_linux): Renamed from this...
523 (grub_rescue_cmd_linux): ...To this. Changed all callers.
524 Changed `entry' not to be static. Loop over memory regions to
525 find another one when the default fails.
526 (grub_rescue_cmd_initrd): New function.
527 (grub_linux_init): Remove function.
528 (grub_linux_fini): Likewise.
529 (GRUB_MOD_INIT): Register `initrd'.
530 (GRUB_MOD_FINI): Unregister `initrd'.
531 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
532 Function removed.
533 (grub_linux_normal_fini): Likewise.
534 (GRUB_MOD_INIT): Register `initrd'.
535 (GRUB_MOD_FINI): Unregister `initrd'.
536
990cf3aa 5372005-01-31 Marco Gerards <metgerards@student.han.nl>
538
539 * commands/help.c: New file.
540 * normal/arg.c (show_help): Renamed to...
541 (grub_arg_show_help): ... this.
542 * commands/i386/pc/halt.c: New file.
543 * commands/i386/pc/reboot.c: Likewise.
544 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
545 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
546 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
547 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
548 variables.
549 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
550 `commands/help.c'.
551 (pkgdata_MODULES): Add `help.mod'.
552 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
553 * grub/i386/pc/init.h (grub_reboot): New prototype.
554 (grub_halt): Likewise.
555 * include/grub/normal.h (grub_arg_show_help): New prototype.
556 (grub_help_init): Likewise.
557 (grub_help_fini): Likewise.
558 * util/grub-emu.c (main): Initialize and deinitialize the help
559 command.
560
561 * normal/cmdline.c (grub_cmdline_get): Doc fix.
562
563 * normal/command.c (grub_command_init): Fixed the description of
564 the `set' and `unset' commands.
565
5662005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 567
568 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
569 function.
570 * commands/ieee1275/halt.c: New file.
571 * commands/ieee1275/reboot.c: Likewise.
572 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
573 `__attribute__ ((unused))'. Some GCS related fixed.
574 (grub_suspend_init) [GRUB_UTIL]: Function removed.
575 (grub_suspend_fini): Likewise.
576 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
577 and `halt.mod'.
578 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
579 (halt_mod_CFLAGS): New variables.
580 * include/grub/powerpc/ieee1275/ieee1275.h
581 (grub_ieee1275_interpret): New prototype.
582
1ab09cc7 5832005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
584
585 * include/grub/misc.h (memmove): New prototype.
586 (memcpy): Likewise.
587
8b8cbdb2 5882005-01-22 Hollis Blanchard <hollis@penguinppc.org>
589
590 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
591 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
592
e3741a27 5932005-01-22 Marco Gerards <metgerards@student.han.nl>
594
595 * kern/misc.c (grub_strndup): Function rewritten.
596
776bd780 5972005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
598
599 * normal/menu.c (TERM_WIDTH): Macro redefined.
600 (TERM_TOP_BORDER_Y): Likewise.
601 (draw_border): Replaced while-loop by a for-loop. Make the number
602 of lines consistent with the number of lines displayed in
603 print_entries. Added a margin below the rectangle.
604 (print_entry): Make the entry fit in the rectangle.
605 (print_entries): Display the scroll arrows next to the right
606 border.
607
78026bce 6082005-01-21 Marco Gerards <metgerards@student.han.nl>
609
610 * fs/minix.c (grub_minix_find_file): Reserve more space for
611 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
612 `grub_strncpy' to copy `path' into it.
613
67bbaf0f 6142005-01-21 Marco Gerards <metgerards@student.han.nl>
615
616 Add the loopback device, a device via which files can be accessed
617 as devices.
618
619 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
620 (pkgdata_MODULES): Add loopback.mod.
621 (loopback_mod_SOURCES): New variable.
622 (loopback_mod_CFLAGS): Likewise.
623 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
624 `disk/loopback.c'.
625 (pkgdata_MODULES): Add loopback.mod.
626 (loopback_mod_SOURCES): New variable.
627 (loopback_mod_CFLAGS): Likewise.
628 * disk/loopback.c: new file.
629 * include/grub/normal.h (grub_loop_init): New prototype.
630 (grub_loop_fini): New prototype.
631 * util/grub-emu.c (main): Initialize and de-initialize loopback
632 support.
633 * include/grub/disk.h (grub_disk_dev_id): Add
634 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
635
6f1c18bd 6362005-01-20 Hollis Blanchard <hollis@penguinppc.org>
637
638 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
639 function.
640 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
641 (suspend_mod_SOURCES): New variable.
642 (suspend_mod_CFLAGS): Likewise.
643 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
644 New prototype.
645 * commands/ieee1275/suspend.c: New file.
646
b38551da 6472005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
648
649 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
650 ((unused))' to `__attribute__ ((used))'.
651 (GRUB_MOD_FINI): Likewise.
652 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
653 * genmk.rb (PModule): Assign space to common symbols when linking
654 modules.
655
777aff39 6562005-01-20 Marco Gerards <metgerards@student.han.nl>
657
658 * include/grub/mm.h (grub_mm_init_region): Change the type of the
659 `unsigned' arguments to `grub_size_t'.
660 (grub_malloc): Likewise.
661 (grub_realloc): Likewise.
662 (grub_memalign): Likewise.
663 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
664 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
665 * util/misc.c (grub_malloc): Likewise.
666 (grub_realloc): Likewise.
667 * kern/mm.c (get_header_from_pointer): Change the casts to
668 `unsigned' into a cast to `grub_size_t'.
669
670 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
671 point to `currnode' when `currnode' is changed.
672
673 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
674 Schottelius <nico-linux@schottelius.org>.
675
d0ff18e1 6762005-01-09 Hollis Blanchard <hollis@penguinppc.org>
677
678 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
679 (note_path): Remove variable.
680 (GRUB_IEEE1275_NOTE_NAME): New macro.
681 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
682 (grub_ieee1275_note_hdr): New structure.
683 (grub_ieee1275_note_desc): Likewise.
684 (grub_ieee1275_note): Likewise.
685 (load_note): Remove `dir' argument. All callers updated. Remove
686 `note_img' and `path'. Do not load a file from `note_path'.
687 Initialize a struct grub_ieee1275_note and write that to `out'.
688 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
689
4ca7004c 6902005-01-05 Marco Gerards <metgerards@student.han.nl>
691
692 * util/misc.c (grub_util_read_image): Revert last change. It
693 called `grub_util_read_at', which seeks from the beginning of the
694 file.
695
0b412211 6962005-01-04 Hollis Blanchard <hollis@penguinppc.org>
697
698 * TODO: Add note about endianness in grub-mkimage.
699 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
700 section.
701 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
702 (grub_mkimage_SOURCES): New target.
703 * include/grub/kernel.h (grub_start_addr): Remove variable.
704 (grub_end_addr): Likewise.
705 (grub_total_module_size): Likewise.
706 (grub_kernel_image_size): Likewise.
707 (GRUB_MODULE_MAGIC): New constant.
708 (grub_module_info): New structure.
709 (grub_arch_modules_addr): New prototype.
710 (grub_get_end_addr): Remove prototype.
711 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
712 * include/grub/powerpc/ieee1275/kernel.h: New file.
713 * include/grub/util/misc.h (grub_util_get_fp_size): New
714 prototype.
715 (grub_util_read_at): Likewise.
716 (grub_util_write_image_at): Likewise.
717 * kern/main.c (grub_get_end_addr): Remove function.
718 (grub_load_modules): Call grub_arch_modules_addr instead of using
719 grub_end_addr. Look for a grub_module_info struct in memory. Use
720 the grub_module_info fields instead of calling grub_get_end_addr
721 as loop conditions. Move grub_add_unused_region code here.
722 (grub_add_unused_region): Remove function.
723 * kern/i386/pc/init.c: Include grub/cache.h.
724 (grub_machine_init): Remove call to grub_get_end_addr. Remove
725 one call to add_mem_region.
726 (grub_arch_modules_addr): New function.
727 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
728 (grub_total_module_size): Likewise.
729 Include grub/machine/kernel.h.
730 (grub_arch_modules_addr): New function.
731 * util/grub-emu.c (grub_end_addr): Remove variable.
732 (grub_total_module_size): Likewise.
733 (grub_arch_modules_addr): New function.
734 * util/misc.c: Include unistd.h.
735 (grub_util_get_fp_size): New function.
736 (grub_util_read_at): Likewise.
737 (grub_util_write_image_at): Likewise.
738 (grub_util_read_image): Call grub_util_read_at.
739 (grub_util_write_image): Call grub_util_write_image_at.
740 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
741 additional memory in kernel_img for a struct grub_module_info.
742 Fill in that grub_module_info.
743 * util/powerpc/ieee1275/grub-mkimage.c: New file.
744
458786f8 7452005-01-03 Hollis Blanchard <hollis@penguinppc.org>
746
747 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
748 New function.
749 * include/grub/powerpc/ieee1275/ieee1275.h
750 (grub_ieee1275_milliseconds): New prototype.
751 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
752 Change to 1000.
753 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
754 grub_ieee1275_milliseconds.
755
ac507d1b 7562005-01-03 Hollis Blanchard <hollis@penguinppc.org>
757
758 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
759 variable.
760 (find_options): New function.
761 (cmain): Call find_options.
762 * include/grub/powerpc/ieee1275/ieee1275.h
763 (grub_ieee1275_realmode): New extern variable.
764 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
765 grub_map if grub_ieee1275_realmode is false.
766
6b8fd1c4 7672004-12-29 Marco Gerards <metgerards@student.han.nl>
768
769 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
770 lines are inserted and make it work like readline. Reported by
771 Vincent Pelletier <subdino2004@yahoo.fr>.
772
8514a1e0 7732004-12-28 Marco Gerards <metgerards@student.han.nl>
774
775 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
776
777 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
778 `kern/powerpc/cache.S'.
779
924b6140 7802004-12-27 Marco Gerards <metgerards@student.han.nl>
781
782 * genmk.rb: Handle the `Program' class in the main loop. Written
783 by Johan Rydberg <jrydberg@gnu.org>.
784 (Program): New class.
785 (programs): New variable.
786 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
787 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
788 instead of "grub/kernel.h". Include <grub/machine/init.h>.
789 (help_arch): Function removed.
790 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
791 `powerpc/libgcc.h' and `loader.h'.
792 (pkgdata_PROGRAMS): New variable.
793 (sbin_UTILITIES): Variable removed.
794 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
795 (grubof_SOURCES): Variable re-defined so it only includes the
796 core functionality.
797 (grubof_CFLAGS): Remove `-DGRUBOF'.
798 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
799 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
800 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
801 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
802 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
803 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
804 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
805 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
806 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
807 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
808 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
809 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
810 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
811 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
812 (pc_mod_CFLAGS): New variables.
813 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
814 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
815 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
816 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
817 Moved from here...
818 * include/grub/i386/pc/init.h (grub_os_area_addr)
819 (rub_os_area_size): ... to here.
820 * include/grub/powerpc/ieee1275/ieee1275.h
821 (grub_ieee1275_entry_fn): Export symbol.
822 * include/grub/powerpc/ieee1275/init.h: New file.
823 * include/grub/powerpc/libgcc.h: Likewise.
824 * include/grub/cache.h: Likewise.
825 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
826 <hollis@penguinppc.org>.
827 * kern/dl.c: Include <grub/cache.h>.
828 (grub_dl_flush_cache): New function.
829 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
830 for this module.
831 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
832 (grub_console_init): Removed prototypes.
833 (grub_machine_init): Don't initialize the modules anymore.
834 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
835 static.
836 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
837 Macro undef removed.
838 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
839 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
840 relocation `R_PPC_REL32'. Return an error when the relocation is
841 unknown.
842 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
843 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
844 * util/misc.c (grub_arch_sync_caches): Likewise.
845
e4b47e0c 8462004-12-19 Marco Gerards <metgerards@student.han.nl>
847
848 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
849 `symlist.c', add `grubof_symlist.c'.
850 (symlist.c): Variable removed.
851 (grubof_HEADERS): Variable added.
852 (grubof_symlist.c): New target.
853 (kernel_syms.lst): Use `grubof_HEADERS' instead of
854 `kernel_img_HEADERS'.
855 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
856 * kern/powerpc/dl.c: New file.
857 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
858 Function removed.
859 (grub_arch_dl_relocate_symbols): Likewise.
860 (grub_register_exported_symbols): Likewise.
861
4ceb3636 8622004-12-13 Marco Gerards <metgerards@student.han.nl>
863
864 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
865 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
866 to fail instead. Reported by Vincent Pelletier
867 <subdino2004@yahoo.fr>.
868
869 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
870 it is not allocated. Reported by Vincent Pelletier
871 <subdino2004@yahoo.fr>.
872
873 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
874 output so the output looks better.
875
3f1578fe 8762004-12-04 Marco Gerards <metgerards@student.han.nl>
877
878 Modulize the partition map support and add support for the amiga
879 partition map.
880
881 * commands/ls.c: Include <grub/partition.h> instead of
882 <grub/machine/partition.h>.
883 * kern/disk.c: Likewise.
884 * kern/rescue.c: Likewise.
885 * loader/i386/pc/chainloader.c: Likewise.
886 * normal/cmdline.c: Likewise.
887 * kern/powerpc/ieee1275/init.c: Likewise.
888 (grub_machine_init): Call `grub_pc_partition_map_init',
889 `grub_amiga_partition_map_init' and
890 `grub_apple_partition_map_init'.
891 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
892 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
893 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
894 `partition.h' and `pc_partition.h'.
895 (grub_setup_SOURCES): Remove
896 `disk/i386/pc/partition.c'. Add `kern/partition.c',
897 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
898 (grub_emu_SOURCES): Likewise.
899 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
900 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
901 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
902 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
903 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
904 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
905 (grubof_SOURCES): Likewise.
906 * disk/i386/pc/partition.c: File removed.
907 * disk/powerpc/ieee1275/partition.c: Likewise.
908 * include/grub/powerpc/ieee1275/partition.h: Likewise.
909 * include/grub/i386/pc/partition.h: Likewise.
910 * kern/partition.c: New file.
911 * partmap/amiga.c: Likewise.
912 * partmap/apple.c: Likewise.
913 * partmap/pc.c: Likewise.
914 * include/grub/partition.h: Likewise..
915 * include/grub/pc_partition.h: Likewise.
916 * util/grub-emu.c: Include <grub/partition.h> instead of
917 <grub/machine/partition.h>.
918 (main): Call `grub_pc_partition_map_init',
919 `grub_amiga_partition_map_init' and
920 `grub_apple_partition_map_init' and deinitialize afterwards.
921 * util/i386/pc/biosdisk.c: Include `#include
922 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
923 `<grub/machine/partition.h>'.
924 * util/i386/pc/grub-setup.c: Likewise.
925 * util/i386/pc/biosdisk.c: Likewise.
926 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
927 partition information in case of a PC partition.
928 * util/i386/pc/grub-setup.c: Include `#include
929 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
930 `<grub/machine/partition.h>'.
931 (setup): Only access the PC specific partition information in case
932 of a PC partition.
933
0ef4ced9 9342004-11-17 Hollis Blanchard <hollis@penguinppc.org>
935
936 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
937 (grub_longjmp): Likewise.
938 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
939 20.
940 * normal/powerpc/setjmp.S: New file.
941 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
942 `normal/powerpc/setjmp.S'.
943 (grubof_CFLAGS): Add `-DGRUBOF'.
944 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
945 [GRUB_UTIL && !GRUBOF].
946
19950e29 9472004-11-16 Marco Gerards <metgerards@student.han.nl>
948
949 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
950 property named `name'. Correctly handle the error returned by
951 `grub_ieee1275_finddevice' if a device can not be opened.
952
a2fea427 9532004-11-02 Hollis Blanchard <hollis@penguinppc.org>
954
955 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
956 `actual' for negativity.
957 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
958 kern/fshelp.c.
959
41ea0ea3 9602004-11-01 Marco Gerards <metgerards@student.han.nl>
961
962 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
963 (PAGE_OFFSET): New macro.
964 (CRTC_ADDR_PORT): Likewise.
965 (CRTC_DATA_PORT): Likewise.
966 (START_ADDR_HIGH_REGISTER): Likewise.
967 (START_ADDR_LOW_REGISTER): Likewise.
968 (GRAPHICS_ADDR_PORT): Likewise.
969 (GRAPHICS_DATA_PORT): Likewise.
970 (READ_MAP_REGISTER): Likewise.
971 (INPUT_STATUS1_REGISTER): Likewise.
972 (INPUT_STATUS1_VERTR_BIT): Likewise.
973 (page): New variable.
974 (wait_vretrace): New function.
975 (set_read_map): Likewise.
976 (set_start_address): Likewise.
977 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
978 the right page.
979 (check_vga_mem): Take the page into account.
980 (write_char): Likewise.
981 (write_cursor): Likewise.
982 (scroll_up): Likewise. Copy the page to the page that is not
983 shown and switch between both pages.
984 (grub_vga_putchar): Fix off by one error.
985 (grub_vga_cls): Wait for the vertical retrace. Take the page into
986 account.
987
ad0bd20b 9882004-11-01 Marco Gerards <metgerards@student.han.nl>
989
990 Add support for iso9660 (including rockridge).
991
992 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
993 (iso9660_mod_SOURCES): New variable.
994 (iso9660_mod_CFLAGS): Likewise.
995 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
996 * include/grub/fs.h (grub_iso9660_init): New prototype.
997 * util/grub-emu.c (main): Call `grub_iso9660_init'.
998 * fs/iso9660.c: New file.
999
1000 * include/grub/misc.h (grub_strncat): New prototype.
1001 * kern/misc.c (grub_strncat): New function.
1002
1003 * fs/hfs.c (grub_hfs_mount): Translate the error
1004 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
1005 * fs/jfs.c (grub_jfs_mount): Likewise.
1006 * fs/ufs.c (grub_ufs_mount): Likewise.
1007
a5477a59 10082004-10-28 Hollis Blanchard <hollis@penguinppc.org>
1009
1010 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
1011 which initialized BAT registers.
1012 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
1013 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
1014 Move from here...
1015 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
1016 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
1017 ... to here.
1018 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
1019 (grub_mapclaim): Likewise.
1020 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
1021 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
1022 hand.
1023
9304c1f8 10242004-10-19 Hollis Blanchard <hollis@penguinppc.org>
1025
1026 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
1027 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
1028 -ffreestanding and -msoft-float.
1029
86f4ae25 10302004-10-15 Hollis Blanchard <hollis@penguinppc.org>
1031
1032 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
1033 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
1034 set in grub_ieee1275_flags.
1035
38912228 10362004-10-14 Hollis Blanchard <hollis@penguinppc.org>
1037
1038 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
1039 prototype.
1040 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
1041 grub_console_init first.
1042 Change the memory range used for grub_ieee1275_claim and
1043 grub_mm_init_region.
1044 Print an error message if the claim fails.
1045 Include <grub/misc.h>.
1046
d1923dc8 10472004-10-13 Hollis Blanchard <hollis@penguinppc.org>
1048
1049 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
1050 Call grub_children_iterate for device nodes of type `scsi',
1051 `ide', or `ata'.
1052 (grub_ofdisk_open): Remove manual device alias resolution.
1053 Fix memory leak when device cannot be opened.
1054 * include/grub/powerpc/ieee1275/ieee1275.h
1055 (grub_children_iterate): New prototype.
1056 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
1057 New function.
1058 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
1059 Return -1 if args.size was -1.
1060
4512e4f3 10612004-10-11 Hollis Blanchard <hollis@penguinppc.org>
1062
1063 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
1064 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
1065 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
1066 Open Firmware's memory for it; claim memory from _start to _end.
1067 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
1068 (_end): New extern.
1069 (_start): Zero BSS from __bss_start to _end.
1070 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
1071 New extern.
1072 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
1073
4d61feb0 10742004-10-11 Hollis Blanchard <hollis@penguinppc.org>
1075
ad0bd20b 1076 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
1077 -1 if args.base was -1.
4d61feb0 1078
026fa2f9 10792004-10-08 Hollis Blanchard <hollis@penguinppc.org>
1080
1081 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
1082 escape sequence instead of a literal ^L. Also call
1083 grub_ofconsole_gotoxy.
1084
9f2220ef 10852004-10-03 Hollis Blanchard <hollis@penguinppc.org>
1086
1087 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
1088 void * arguments to grub_addr_t. All callers updated. Also make
1089 the `result' argument optional.
1090 (grub_ieee1275_release): change void * arguments to grub_addr_t.
1091 All callers updated.
1092
8a572cd7 10932004-09-22 Hollis Blanchard <hollis@penguinppc.org>
1094
1095 * commands/ls.c (grub_ls_list_files): Use the string following the
1096 initial ')', if present, as the filesystem path.
1097 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
1098
1099 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
1100
18aa81f2 11012004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
1102
1103 Make the source code of the menu interface more readable.
1104
1105 * normal/menu.c: Include grub/mm.h.
1106 (TERM_WIDTH): New macro.
1107 (TERM_HEIGHT): Likewise.
1108 (TERM_INFO_HEIGHT): Likewise.
1109 (TERM_MARGIN): Likewise.
1110 (TERM_SCROLL_WIDTH): Likewise.
1111 (TERM_TOP_BORDER_Y): Likewise.
1112 (TERM_LEFT_BORDER_X): Likewise.
1113 (TERM_BORDER_WIDTH): Likewise.
1114 (TERM_MESSAGE_HEIGHT): Likewise.
1115 (TERM_BORDER_HEIGHT): Likewise.
1116 (TERM_NUM_ENTRIES): Likewise.
1117 (TERM_FIRST_ENTRY_Y): Likewise.
1118 (TERM_ENTRY_WIDTH): Likewise.
1119 (TERM_CURSOR_X): Likewise.
1120 (draw_border): Use macros instead of magic numbers.
1121 (print_entry): Likewise.
1122 (print_entries): Likewise.
1123 (run_menu): Likewise. Also, handle the key 'e'.
1124 (run_menu_entry): Ignore empty command lines.
1125 (print_message): Added a new argument EDIT. If EDIT is true,
1126 print a different message.
1127 (init_page): Likewise.
1128 (edit_menu_entry): New function. Not implemented yet.
1129
b47efe30 11302004-09-17 Marco Gerards <metgerards@student.han.nl>
1131
1132 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
1133 can be loaded from normal mode.
1134
1135 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
1136 `multiboot.mod'.
1137 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
1138 (multiboot_mod_CFLAGS): New variables.
1139 * loader/i386/pc/linux_normal.c: New file.
1140 * loader/i386/pc/multiboot_normal.c: Likewise.
1141
1142 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
1143 attribute `unused'.
1144
1145 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
1146 `fdiro' to read the mode information from instead of `diro'.
1147
1148 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
1149 looking up a symlink.
1150
1151 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
1152 macro.
1153 * normal/command.c (grub_command_execute): Don't parse the
1154 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
1155 flags of the command.
1156
1157 * normal/menu.c (grub_menu_run): Fix typo.
1158
da75ac71 11592004-09-14 Hollis Blanchard <hollis@penguinppc.org>
1160
1161 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
1162
1163 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
1164 `y + 1' instead of `y - 1'.
1165
1166 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
1167
062b24c2 11682004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
1169
1170 From Hollis Blanchard <hollis@penguinppc.org>:
1171 * kern/misc.c (memmove): New alias for grub_memmove.
1172 (memcmp): New alias for grub_memcmp.
1173 (memset): New alias for grub_memset.
1174 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
1175 Change "int handle" to "grub_ieee1275_phandle_t handle".
1176 * include/grub/powerpc/ieee1275/ieee1275.h
1177 (grub_ieee1275_get_property): Likewise.
1178
8ddad845 11792004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
1180
1181 Added normal mode command `chainloader' as module chain.mod, which
1182 depends on normal.mod and _chain.mod.
1183
1184 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
1185 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
1186 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
1187 Deleted prototype.
1188 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
1189 but arguments parsing moved to ...
1190 (grub_chainloader_cmd): ... here. New function.
1191 * include/grub/i386/pc/chainloader.h: New file.
1192 * loader/i386/pc/chainloader_normal.c: Likewise.
1193
2c1f4ce3 11942004-09-11 Marco Gerards <metgerards@student.han.nl>
1195
1196 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
1197 (grub_mkimage_LDFLAGS): Likewise.
1198 (grub_emu_SOURCES): Likewise.
1199 (kernel_img_HEADERS): Added fshelp.h.
1200 * fs/ext2.c: Include <grub/fshelp.h>.
1201 (FILETYPE_REG): New macro.
1202 (FILETYPE_INO_REG): Likewise.
1203 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
1204 Changed all users.
1205 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
1206 all users.
1207 (grub_fshelp_node): New struct.
1208 (grub_ext2_data): Added member `diropen'. Changed member `inode'
1209 to a pointer.
1210 (grub_ext2_get_file_block): Removed function.
1211 (grub_ext2_read_block): New function.
1212 (grub_ext2_read_file): Replaced parameter `data' by `node'.
1213 This function was written.
1214 (grub_ext2_mount): Read the root inode. Create a diropen struct.
1215 (grub_ext2_find_file): Removed function.
1216 (grub_ext2_read_symlink): New function.
1217 (grub_ext2_iterate_dir): Likewise.
1218 (grub_ext2_open): Rewritten.
1219 (grub_ext2_dir): Rewritten.
1220 * include/grub/fshelp.h: New file.
1221 * fs/fshelp.c: Likewise.
1222
3c52136a 12232004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
1224
1225 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
1226 (print_message): Add a missing newline.
1227 (run_menu): Added timeout support.
1228 (run_menu_entry): New local function.
1229 (grub_menu_run): Added support for booting.
1230
1231 * kern/loader.c (grub_loader_is_loaded): New function.
1232
1233 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
1234 (grub_get_rtc): Exported.
1235
1236 * include/grub/i386/pc/time.h: Include grub/symbol.h.
1237 (grub_get_rtc): Exported.
1238
1239 * include/grub/normal.h (struct grub_command_list): Remove
1240 constant from the member `command'.
1241
1242 * include/grub/loader.h (grub_loader_is_loaded): Declared.
1243
1244 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
1245
1246 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
1247
aa033560 12482004-08-28 Marco Gerards <metgerards@student.han.nl>
1249
1250 Add support for the JFS filesystem.
1251
1252 * fs/jfs.c: New file.
1253 * include/grub/fs.h (grub_jfs_init): New prototype.
1254 (grub_jfs_fini): New prototype.
1255 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
1256 (grub_emu_SOURCES): Likewise.
1257 (pkgdata_MODULES): Add jfs.mod.
1258 (jfs_mod_SOURCES): New variable.
1259 (jfs_mod_CFLAGS): Likewise.
1260 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
1261 (grubof_SOURCES): Likewise.
1262 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
1263
1264 * fs/fat.c (grub_fat_find_dir): Convert the filename little
1265 endian to the host endian.
1266 (grub_fat_utf16_to_utf8): Move function from there...
1267 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
1268 the endianess of the source string anymore.
1269 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
1270
94bc45af 12712004-08-24 Marco Gerards <metgerards@student.han.nl>
1272
1273 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
1274 (grub_boot_fini) [GRUB_UTIL]: Likewise.
1275 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
1276 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
1277
1278 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
1279 (grub_hfs_iterate_dir): Make the function static. Add prototypes
1280 for `node_found' and `it_dir'.
1281 (grub_hfs_dir): Add prototype for `dir_hook'.
1282
1283 * fs/minix.c (grub_minix_get_file_block): Add prototype for
1284 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
1285 and `indir32' to silence a gcc warning.
1286
1287 * include/grub/fs.h (grub_hfs_init): New prototype.
1288 (grub_hfs_fini): Likewise.
1289
1290
97543f08 12912004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
1292
1293 Each disk device has its own id now. This is useful to make use
1294 of multiple disk devices.
1295
1296 * include/grub/disk.h (grub_disk_dev_id): New enum.
1297 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
1298 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
1299
1300 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
1301 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
1302
1303 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
1304 GRUB_DISK_DEVICE_OFDISK_ID as an id.
1305
1306 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
1307 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
1308
1309 * include/grub/disk.h (struct grub_disk_dev): Added a new member
1310 "id" which is used by the cache manager.
1311
1312 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
1313 of just "GRUB".
1314
64372eb4 13152004-08-18 Marco Gerards <metgerards@student.han.nl>
1316
1317 * fs/hfs.c: New file.
1318 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
1319 (grub_emu_SOURCES): Likewise.
1320 (pkgdata_MODULES): Add hfs.mod.
1321 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
1322 (grubof_SOURCES): Likewise.
1323 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
1324
1325 * include/grub/misc.h (grub_strncasecmp): Add prototype.
1326 * kern/misc.c (grub_strncasecmp): Add function.
1327
cc61b58f 13282004-08-14 Marco Gerards <metgerards@student.han.nl>
1329
1330 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
1331 with parentheses.
1332
1333 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
1334 (grub_ext2_dir): In case the directory entry type is unknown, read
1335 it from the inode.
1336
0ef123f6 13372004-08-02 Peter Bruin <pjbruin@dds.nl>
1338
1339 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
1340 grub_load_linux instead of grub_rescue_cmd_linux as second
1341 argument of grub_rescue_register_command.
1342
1343 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
1344
a447c5df 13452004-07-27 Marco Gerards <metgerards@student.han.nl>
1346
1347 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
1348 function.
1349 * commands/boot.c: Remove the check for `GRUB_UTIL'.
1350 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
1351 `loader/powerpc/ieee1275/linux.c',
1352 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
1353 * include/grub/powerpc/ieee1275/ieee1275.h
1354 (grub_ieee1275_release): New prototype.
1355 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
1356 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
1357 normal, boot, linux and linux_normal.
1358 * loader/powerpc/ieee1275/linux.c: New file.
1359 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1360
5a9e3546 13612004-07-12 Marco Gerards <metgerards@student.han.nl>
1362
1363 * normal/arg.c (grub_arg_parse): Correct error handling after
1364 reallocating the argumentlist (check if `argl' is not null instead
1365 of checking if `args' is not null).
1366 * kern/mm.c (grub_realloc): Return the same pointer when using the
1367 same region, instead of returning the header address.
1368
e15199cb 13692004-07-11 Marco Gerards <metgerards@student.han.nl>
1370
1371 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
1372 one block instead of two when looking for the initial partition.
1373 (grub_partition_probe): Initialize the local variable `p' with 0.
1374 Use base 10 for the grub_strtoul call.
1375 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
1376 need for one local variable.
1377 (grub_strtoul): Don't add the new value to `num', instead of that
1378 just assign it.
1379
020616c2 13802004-07-11 Marco Gerards <metgerards@student.han.nl>
1381
1382 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
1383 (pxeboot_img_SOURCES): New variable.
1384 (pxeboot_img_ASFLAGS): Likewise.
1385 (pxeboot_img_LDFLAGS): Likewise.
1386 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
1387 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
1388 <lode_leroy@hotmail.com>.
1389
6c51eb64 13902004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
1391
1392 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
1393 there was no input.
1394
cfb12aff 13952004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
1396
1397 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
1398 the history buffer logic.
1399
6eabba74 14002004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
1401
1402 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
1403 (FILETYPE_INO_SYMLINK): New macros.
1404 (grub_ext2_find_file): Check if the node is a directory using the
1405 inode stat information instead of using the filetype in the
1406 dirent. Exclude the first character of an absolute symlink.
1407 (grub_ext2_dir): Mask out the filetype part of the mode member of
1408 the inode.
1409
66e19ef8 14102004-05-24 Marco Gerards <metgerards@student.han.nl>
1411
1412 Add support for UFS version 1 and 2. Add support for the minix
1413 filesystem version 1 and 2, both the variants with 14 and 30 long
1414 filenames.
1415
1416 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
1417 fs/minix.c.
1418 (grub_emu_SOURCES): Likewise.
1419 (pkgdata_MODULES): Add ufs.mod and minix.mod.
1420 (ufs_mod_SOURCES): New variable.
1421 (ufs_mod_CFLAGS): Likewise.
1422 (minix_mod_SOURCES): Likewise.
1423 (minix_mod_CFLAGS): Likewise.
1424 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
1425 fs/minix.c.
1426 (grubof_SOURCES): Likewise.
1427 * fs/ufs.c: New file.
1428 * fs/minix.c: New file.
1429 * include/grub/fs.h (grub_ufs_init): New prototype.
1430 (grub_ufs_fini): Likewise.
1431 (grub_minix_init): Likewise.
1432 (grub_minix_fini): Likewise.
1433 * util/grub-emu.c (main): Initialize and deinitialize UFS and
1434 minix fs.
1435
cc2e748a 14362004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
1437
1438 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
1439 commands/ls.c, commands/terminal.c, commands/boot.c,
1440 commands/cmp.c and commands/cat.c.
1441 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
1442
1443 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
1444 "env.h"
1445
4b13b216 14462004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1447
1448 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
1449 and grub_, respectively. Because the conversion is trivial and
1450 mechanical, I omit the details here. Please refer to the CVS
1451 if you need more information.
1452
6a142551 14532004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1454
1455 * include/pupa: Renamed to ...
1456 * include/grub: ... this.
1457 * util/i386/pc/pupa-mkimage.c: Renamed to ...
1458 * util/i386/pc/grub-mkimage.c: ... this.
1459 * util/i386/pc/pupa-setup.c: Renamed to ...
1460 * util/i386/pc/grub-setup.c: ... this.
1461 * util/pupa-emu.c: Renamed to ...
1462 * util/grub-emu.c: ... this.
1463
e56cdf21 14642004-03-29 Marco Gerards <metgerards@student.han.nl>
1465
1466 Add support for the newworld apple macintosh (PPC). This has been
1467 tested on the powerbook 2000 only. It only adds support for
1468 generic ieee1275 functions, console and disk support. This should
1469 be easy to port to other architectures with support for Open
1470 Firmware.
1471
1472 * configure.ac: Accept the powerpc as host_cpu. In the case of
1473 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
1474 specific tests are only executed while building for the i386.
1475 Inverse test for crosscompile.
1476 * genmk.rb (Utility): Allow assembler files.
1477 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
1478 * conf/powerpc-ieee1275.rmk: New file.
1479 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
1480 * disk/powerpc/ieee1275/partition.c: Likewise.
1481 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
1482 * include/pupa/powerpc/ieee1275/console.h: Likewise.
1483 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
1484 * include/pupa/powerpc/ieee1275/time.h: Likewise.
1485 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
1486 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
1487 * include/pupa/powerpc/ieee1275/loader.h
1488 * include/pupa/powerpc/setjmp.h: Likewise.
1489 * include/pupa/powerpc/types.h: Likewise.
1490 * kern/powerpc/ieee1275/init.c: Likewise.
1491 * kern/powerpc/ieee1275/openfw.c: Likewise.
1492 * term/powerpc/ieee1275/ofconsole.c: Likewise.
1493
1494 These files were written by Johan Rydberg
1495 (jrydberg@night.trouble.net) and I only modified them slightly.
1496
1497 * boot/powerpc/ieee1275/cmain.c: New file.
1498 * boot/powerpc/ieee1275/crt0.S: Likewise.
1499 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
1500 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
1501
8c8cc205 15022004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
1503
1504 * Makefile.in: Update copyright.
1505 * genmodsrc.sh: Likewise.
1506 * gensymlist.sh: Likewise.
1507 * term/i386/pc/vga.c: Indent correctly.
1508
1509 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
1510 bugreporting address.
1511 * util/i386/pc/pupa-setup.c (usage): Likewise,
1512 (main): Call pupa_ext2_init and pupa_ext2_fini.
1513
1514 * fs/fat.c (log2): Renamed to ...
1515 (fat_log2): ... this.
1516 All callers changed.
1517 * kern/misc.c (memcpy): Alias to pupa_memmove.
1518 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
1519 lvalue cast.
1520 * util/console.c (pupa_ncurses_fini): Return 0.
1521
1522 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
1523 Move fail label here.
1524 [__GNU__]: Don't warn when using stat.
1525 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
1526 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
1527 long int. Use strtol instead of strtoul.
1528
db1771cf 15292004-03-14 Marco Gerards <metgerards@student.han.nl>
1530
1531 * commands/boot.c: New file.
1532 * commands/cat.c: Likewise.
1533 * commands/cmp.c: Likewise.
1534 * commands/ls.c: Likewise.
1535 * commands/terminal.c: Likewise.
1536 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
1537 (pupa_register_command): Changed interface to match the new
1538 argument parser.
1539 (pupa_command_execute): Changed (almost rewritten) so it uses
1540 pupa_split_command. Added support for setting variables using the
1541 syntax `foo=bar'.
1542 (rescue_command): Changed to work with the new argument parser.
1543 (terminal_command): Moved from here to commands/terminal.c.
1544 (set_command): New function.
1545 (unset_command): New function.
1546 (insmod_command): New function.
1547 (rmmod_command): New function.
1548 (lsmod_command): New function.
1549 (pupa_command_init): Don't initialize the command terminal
1550 anymore. Initialize the commands set, unset, insmod, rmmod and
1551 lsmod.
1552 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
1553 (kernel_img_HEADERS): Add arg.h and env.h.
1554 (pupa_mkimage_LDFLAGS): Add kern/env.c.
1555 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
1556 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
1557 normal/arg.c.
1558 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
1559 terminal.mod.
1560 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
1561 (boot_mod_SOURCES): New variable.
1562 (terminal_mod_SOURCES): Likewise.
1563 (ls_mod_SOURCES): Likewise.
1564 (cmp_mod_SOURCES): Likewise.
1565 (cat_mod_SOURCES): Likewise.
1566
1567 * normal/arg.c: New file.
1568 * kern/env.c: Likewise.
1569 * include/pupa/arg.h: Likewise.
1570 * include/pupa/env.h: Likewise.
1571 * font/manager.c (font_command): Changed to match argument parsing
1572 interface changes.
1573 (PUPA_MOD_INIT): Likewise.
1574 * hello/hello.c (pupa_cmd_hello): Likewise.
1575 (PUPA_MOD_INIT): Likewise.
1576 * include/pupa/disk.h: Include <pupa/device.h>.
1577 (pupa_print_partinfo): New prototype.
1578 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
1579 (pupa_dl_get_prefix): Likewise.
1580 * include/pupa/misc.h: Include <pupa/err.h>.
1581 (pupa_isgraph): New prototype.
1582 (pupa_isdigit): Likewise.
1583 (pupa_split_cmdline): Likewise.
1584 * include/pupa/normal.h: Include <pupa/arg.h>.
1585 (pupa_command): Changed the prototype of the member `func' to
1586 match the argument parsing interface. Added member `options'.
1587 (pupa_register_command): Updated to match function.
1588 (pupa_arg_parse): New prototype.
1589 (pupa_hello_init) [PUPA_UTIL]: New prototype.
1590 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
1591 (pupa_ls_init) [PUPA_UTIL]: Likewise.
1592 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
1593 (pupa_cat_init) [PUPA_UTIL]: Likewise.
1594 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
1595 (pupa_boot_init) [PUPA_UTIL]: Likewise.
1596 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
1597 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
1598 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
1599 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
1600 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
1601 * kern/disk.c: Include <pupa/file.h>.
1602 (pupa_print_partinfo): New function.
1603 * kern/dl.c: Include <pupa/env.h>.
1604 (pupa_dl_dir): Variable removed.
1605 (pupa_dl_load): Use the environment variable `prefix' instead of
1606 the variable pupa_dl_dir.
1607 (pupa_dl_set_prefix): Function removed.
1608 (pupa_dl_get_prefix): Likewise.
1609 * kern/i386/pc/init.c: Include <pupa/env.h>.
1610 (pupa_machine_init): Use the environment variable `prefix' instead of
1611 using pupa_dl_set_prefix to set the prefix.
1612 * kern/main.c: Include <pupa/env.h>.
1613 (pupa_set_root_dev): Use the environment variable `prefix' instead of
1614 using pupa_dl_get_prefix to get the prefix.
1615 * kern/misc.c: Include <pupa/env.h>.
1616 (pupa_isdigit): New function.
1617 (pupa_isgraph): Likewise.
1618 (pupa_ftoa): Likewise.
1619 (pupa_vsprintf): Added support for printing values of the type
1620 `double'. Make it possible to format variable output when using
1621 formatting like `%1.2%f'.
1622 (pupa_split_cmdline): New function.
1623 * kern/rescue.c: Include <pupa/env.h>.
1624 (next_word): Removed function.
1625 (pupa_rescue_cmd_prefix): Likewise.
1626 (pupa_rescue_cmd_set): New function.
1627 (pupa_rescue_cmd_unset): New function.
1628 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
1629 split the command line instead of splitting it here. Added
1630 support for setting variables using the syntax `foo=bar'. Don't
1631 initialize the prefix command anymore. Initialized the set and
1632 unset commands.
1633 * normal/cmdline.c: Include <pupa/env.h>.
1634 (pupa_tab_complete): Added prototypes for print_simple_completion,
1635 print_partition_completion, add_completion, iterate_commands,
1636 iterate_dev, iterate_part and iterate_dir. Moved code to print
1637 partition information from here to kern/disk.c.
1638 (pupa_cmdline_run): Don't check if the funtion exists anymore.
1639 * normal/main.c: Include <pupa/env.h>.
1640 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
1641 instead of using pupa_dl_get_prefix to get the prefix.
1642 * term/i386/pc/vga.c: Include <pupa/arg.h>.
1643 (check_vga_mem): Cast pointers to `void *' to silence a gcc
1644 warning.
1645 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
1646 (pupa_vga_setcolor): Declare unused variables with `__attribute__
1647 ((unused))' to silence a gcc warning.
1648 (pupa_vga_setcolor): Likewise.
1649 (debug_command): Changed to match argument parsing
1650 interface changes.
1651 * util/pupa-emu.c: Include <pupa/env.h>.
1652 (options): Added 0's for unused fields to silence a gcc warning.
1653 (argp): Likewise.
1654 (main): Use the environment variable `prefix' instead of using
1655 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
1656 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
1657 and terminal.
1658
1659 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
1660 * util/misc.c: Include <malloc.h>.
1661 (pupa_malloc): Rewritten so errors are correctly reported.
1662 (pupa_realloc): Likewise.
1663 (pupa_memalign): Likewise.
1664 (pupa_mm_init_region): Declare unused variables with
1665 `__attribute__ ((unused))' to silence a gcc warning.
1666 * normal/i386/setjmp.S: Remove tab at the end of the file to
1667 silence a gcc warning.
1668 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
1669 variables with `__attribute__ ((unused))' to silence a gcc
1670 warning.
1671 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
1672 local variable i unsigned to silence a gcc warning.
1673
1674 * kern/term.c: Include <pupa/misc.h>.
1675 (pupa_more_lines): New variable.
1676 (pupa_more): Likewise.
1677 (pupa_putcode): When the pager is active pause at the end of every
1678 screen.
1679 (pupa_set_more): New function.
1680 * include/pupa/term.h (pupa_set_more): New prototype.
1681
1682
3b1139cb 16832004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
1684
1685 Now this project is GRUB 2 rather than PUPA. The location of
1686 the CVS repository was moved to GRUB's.
1687
1688 * configure.ac: Use bug-grub as the reporting address.
1689 Use GRUB instead of PUPA.
1690 Change the version number to 1.90.
1691
8367695c 16922004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
1693
1694 * genkernsyms.sh: Updated copyright information.
1695 * genmk.rb: Likewise.
1696 * genmodsrc.sh: Likewise.
1697 * gensymlist.sh: Likewise.
1698 * boot/i386/pc/boot.S: Likewise.
1699 * boot/i386/pc/diskboot.S: Likewise.
1700 * disk/i386/pc/biosdisk.c: Likewise.
1701 * disk/i386/pc/partition.c: Likewise.
1702 * font/manager.c: Likewise.
1703 * fs/ext2.c: Likewise.
1704 * fs/fat.c: Likewise.
1705 * include/pupa/boot.h: Likewise.
1706 * include/pupa/device.h: Likewise.
1707 * include/pupa/disk.h: Likewise.
1708 * include/pupa/dl.h: Likewise.
1709 * include/pupa/elf.h: Likewise.
1710 * include/pupa/err.h: Likewise.
1711 * include/pupa/file.h: Likewise.
1712 * include/pupa/font.h: Likewise.
1713 * include/pupa/fs.h: Likewise.
1714 * include/pupa/kernel.h: Likewise.
1715 * include/pupa/loader.h: Likewise.
1716 * include/pupa/misc.h: Likewise.
1717 * include/pupa/mm.h: Likewise.
1718 * include/pupa/net.h: Likewise.
1719 * include/pupa/normal.h: Likewise.
1720 * include/pupa/rescue.h: Likewise.
1721 * include/pupa/setjmp.h: Likewise.
1722 * include/pupa/symbol.h: Likewise.
1723 * include/pupa/term.h: Likewise.
1724 * include/pupa/types.h: Likewise.
1725 * include/pupa/i386/setjmp.h: Likewise.
1726 * include/pupa/i386/types.h: Likewise.
1727 * include/pupa/i386/pc/biosdisk.h: Likewise.
1728 * include/pupa/i386/pc/boot.h: Likewise.
1729 * include/pupa/i386/pc/console.h: Likewise.
1730 * include/pupa/i386/pc/init.h: Likewise.
1731 * include/pupa/i386/pc/kernel.h: Likewise.
1732 * include/pupa/i386/pc/linux.h: Likewise.
1733 * include/pupa/i386/pc/loader.h: Likewise.
1734 * include/pupa/i386/pc/memory.h: Likewise.
1735 * include/pupa/i386/pc/multiboot.h: Likewise.
1736 * include/pupa/i386/pc/partition.h: Likewise.
1737 * include/pupa/i386/pc/time.h: Likewise.
1738 * include/pupa/i386/pc/vga.h: Likewise.
1739 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
1740 * include/pupa/util/getroot.h: Likewise.
1741 * include/pupa/util/misc.h: Likewise.
1742 * include/pupa/util/resolve.h: Likewise.
1743 * kern/device.c: Likewise.
1744 * kern/disk.c: Likewise.
1745 * kern/dl.c: Likewise.
1746 * kern/err.c: Likewise.
1747 * kern/file.c: Likewise.
1748 * kern/fs.c: Likewise.
1749 * kern/loader.c: Likewise.
1750 * kern/main.c: Likewise.
1751 * kern/misc.c: Likewise.
1752 * kern/mm.c: Likewise.
1753 * kern/rescue.c: Likewise.
1754 * kern/term.c: Likewise.
1755 * kern/i386/dl.c: Likewise.
1756 * kern/i386/pc/init.c: Likewise.
1757 * kern/i386/pc/lzo1x.S: Likewise.
1758 * kern/i386/pc/startup.S: Likewise.
1759 * loader/i386/pc/chainloader.c: Likewise.
1760 * loader/i386/pc/linux.c: Likewise.
1761 * loader/i386/pc/multiboot.c: Likewise.
1762 * normal/cmdline.c: Likewise.
1763 * normal/command.c: Likewise.
1764 * normal/main.c: Likewise.
1765 * normal/menu.c: Likewise.
1766 * normal/i386/setjmp.S: Likewise.
1767 * term/i386/pc/console.c: Likewise.
1768 * term/i386/pc/vga.c: Likewise.
1769 * util/console.c: Likewise.
1770 * util/genmoddep.c: Likewise.
1771 * util/misc.c: Likewise.
1772 * util/pupa-emu.c: Likewise.
1773 * util/resolve.c: Likewise.
1774 * util/unifont2pff.rb: Likewise.
1775 * util/i386/pc/biosdisk.c: Likewise.
1776 * util/i386/pc/getroot.c: Likewise.
1777 * util/i386/pc/pupa-mkimage.c: Likewise.
1778 * util/i386/pc/pupa-setup.c: Likewise.
1779
e6eced71 17802004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
1781
1782 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
1783 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
1784 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
1785 reading and reset it after reading.
1786 (pupa_ext2_close): Return PUPA_ERR_NONE.
1787
1788 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
1789 Correct value.
1790 (struct linux_kernel_header): Add kernel_version and
1791 initrd_addr_max.
1792 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
1793 pupa_file_read succeeds.
1794 (pupa_rescue_cmd_initrd): Implement.
1795
5aded270 17962003-12-03 Marco Gerards <metgerards@student.han.nl>
1797
1798 * fs/ext2.c (pupa_ext2_label): New function.
1799 (pupa_ext2_fs): Added label.
1800 * fs/fat.c (pupa_fat_label): New function.
1801 (pupa_fat_fs): Added label.
1802 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
1803
1804 * kern/misc.c (pupa_strndup): New function.
1805 * include/pupa/misc.h (pupa_strndup): New prototype.
1806
1807 * include/pupa/normal.h: Include <pupa/err.h>.
1808 (pupa_set_history): New prototype.
1809 (pupa_iterate_commands): New prototype.
1810 * normal/cmdline.c: Include <pupa/machine/partition.h>,
1811 <pupa/disk.h>, <pupa/file.h>.
1812 (hist_size): New variable.
1813 (hist_lines): Likewise.
1814 (hist_end): Likewise.
1815 (hist_used): Likewise.
1816 (pupa_set_history): New function.
1817 (pupa_history_get): Likewise.
1818 (pupa_history_add): Likewise.
1819 (pupa_history_replace): Likewise.
1820 (pupa_tab_complete): Likewise.
1821 (pupa_cmdline_run): Added tab completion and history buffer. Tab
1822 completion shows partitionnames while completing partitions, this
1823 feature was suggested by Jeff Bailey.
1824 * normal/command.c (pupa_iterate_commands): New function.
1825 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
1826 (pupa_normal_init): Initialize history buffer.
1827 (PUPA_MOD_INIT): Likewise.
1828 (pupa_normal_fini): Free the history buffer.
1829 (PUPA_MOD_FINI): Likewise.
1830
1831 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
1832 key.
1833
1834 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
1835 * configure.ac [i386]: Check for regparam bug.
1836 (NESTED_FUNC_ATTR) [! i386]: Defined.
1837
1f7315a3 18382003-11-17 Marco Gerards <metgerards@student.han.nl>
1839
1840 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
1841 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
1842 (pupa_emu_SOURCES): New variable.
1843 (pupa_emu_LDFLAGS): Likewise.
1844 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
1845 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
1846 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
1847 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
1848 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
1849 (pupa_jmp_buf): New typedef.
1850 (pupa_setjmp) [PUPA_UTIL]: New macro.
1851 (pupa_longjmp) [PUPA_UTIL]: Likewise.
1852 * include/pupa/term.h (struct pupa_term): New member `refresh'.
1853 (pupa_refresh): New prototype.
1854 * include/pupa/util/getroot.h: New file.
1855 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
1856 it.
1857 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
1858 (pupa_rescue_cmd_cat): Likewise.
1859 (pupa_rescue_cmd_ls): Likewise.
1860 (pupa_rescue_cmd_testload): Likewise.
1861 (pupa_rescue_cmd_lsmod): Likewise.
1862 * normal/cmdline.c (pupa_cmdline_get): Likewise.
1863 * normal/menu.c (run_menu): Likewise.
1864 * kern/term.c (pupa_cls): Likewise.
1865 (pupa_refresh): New function.
1866 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
1867 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
1868 * util/console.c: New file.
1869
1870 * util/i386/pc/getroot.c: New file.
1871 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
1872 (pupa_putchar): New function.
1873 (pupa_refresh): Likewise.
1874 (xgetcwd): Function moved to ...
1875 (strip_extra_slashes): Likewise.
1876 (get_prefix): Likewise.
1877 * util/i386/pc/getroot.c: ... here.
1878 (find_root_device): Function moved and renamed to...
1879 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
1880 Changed all callers.
1881 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
1882 and renamed to...
1883 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
1884 Changed all callers.
1885 * util/misc.c (pupa_memalign): New function.
1886 (pupa_mm_init_region): Likewise.
1887 (pupa_register_exported_symbols): Likewise.
1888 (pupa_putchar): Function removed.
1889 * util/pupa-emu.c: New file.
1890
9a5c1ade 18912003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
1892
1893 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
1894 (_multiboot_mod_SOURCES): New variable.
1895 (_multiboot_mod_CFLAGS): Likewise.
1896 * loader/i386/pc/multiboot.c: New file.
1897 * include/pupa/i386/pc/multiboot.h: Likewise.
1898 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
1899 (pupa_multiboot_real_boot): New function.
1900 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
1901 (pupa_multiboot_real_boot): New prototype.
1902 (pupa_rescue_cmd_multiboot): Likewise
1903 (pupa_rescue_cmd_module): Likewise.
1904
1905 * kern/loader.c (pupa_loader_set): Continue when
1906 pupa_loader_unload_func() fails.
1907 (pupa_loader_unset): New function.
1908 * include/pupa/loader.h (pupa_loader_unset): New prototype.
1909
1910 * kern/misc.c (pupa_stpcpy): New function.
1911 * include/pupa/misc.h (pupa_stpcpy): New prototype.
1912
8e72a9c0 19132003-11-12 Marco Gerards <metgerards@student.han.nl>
1914
1915 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
1916 for available extensions.
1917
1918 * include/pupa/i386/pc/time.h: New file.
1919 * kern/disk.c: Include <pupa/machine/time.h>.
1920 (PUPA_CACHE_TIMEOUT): New macro.
1921 (pupa_last_time): New variable.
1922 (pupa_disk_open): Flush the cache when there was a timeout.
1923 (pupa_disk_close): Reset the timer.
1924 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
1925 pupa_currticks.
1926 * util/misc.c: Include <sys/times.h>
1927 (pupa_get_rtc): New function.
1928
c4adbd32 19292003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
1930
1931 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
1932 as blocks.
1933 (pupa_ext2_get_file_block): Use blocks member.
1934
1935 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
1936 first block. Return -1 instead of pupa_errno on error.
1937
bfd30f06 19382003-10-27 Marco Gerards <metgerards@student.han.nl>
1939
1940 * README: In the pupa-mkimage example use _chain instead of chain
1941 and ext2 instead of fat.
1942 * TODO: Replace ext2fs with jfs as an example. Add an item for
1943 adding journal playback for ext2fs.
1944 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
1945 (pkgdata_MODULES): Added ext2.mod.
1946 (ext2_mod_SOURCES): New variable.
1947 (ext2_mod_CFLAGS): Likewise.
1948 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
1949 * include/pupa/misc.h (pupa_strncpy): New prototype.
1950 (pupa_strcat): Likewise.
1951 (pupa_strncmp): Likewise.
1952 * kern/misc.c (pupa_strcat): Enable function.
1953 (pupa_strncpy): New function.
1954 (pupa_strncmp): Likewise.
1955 * fs/ext2.c: New file.
1956
1957 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
1958 when the read failed before retrying.
1959 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
1960 (_FILE_OFFSET_BITS): Likewise.
1961 * configure.ac: Added AC_SYS_LARGEFILE.
1962
98d15063 19632003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
1964
1965 * genmk.rb (PModule#rule): Make sure to get only symbol names
1966 from the output of nm.
1967 Reported by Robert Millan <zeratul2@wanadoo.es>.
1968
18d9c7cd 19692003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
1970
1971 I forgot to check in these changes for a long time. This adds
1972 incomplete support for VGA console, and this is still very
1973 buggy. Also, a lot of consideration is required for I18N,
1974 UNICODE, and VGA font issues. Therefore, assume that this is
1975 such that "better than nothing".
1976
1977 * font/manager.c: New file.
1978 * include/pupa/font.h: Likewise.
1979 * include/pupa/i386/pc/vga.h: Likewise.
1980 * term/i386/pc/vga.c: Likewise.
1981 * util/unifont2pff.rb: Likewise.
1982
1983 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
1984 (pkgdata_MODULES): Added vga.mod and font.mod.
1985 (vga_mod_SOURCES): New variables.
1986 (vga_mod_CFLAGS): Likewise.
1987 (font_mod_SOURCES): Likewise.
1988 (font_mod_CFLAGS): Likewise.
1989
1990 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
1991
1992 * include/pupa/term.h: Include pupa/err.h.
1993 (struct pupa_term): Added init and fini.
1994 Changed the argument of putchar to pupa_uint32_t.
1995
1996 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
1997 (pupa_console_real_putchar): New prototype.
1998 (pupa_console_putchar): Removed.
1999 (pupa_console_checkkey): Exported.
2000 (pupa_console_getkey): Likewise.
2001
2002 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
2003 characters.
2004
2005 * kern/term.c (pupa_term_set_current): Rewritten.
2006 (pupa_putchar): Likewise.
2007 (pupa_putcode): New function.
2008
2009 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
2010 (pupa_console_real_putchar): ... this.
2011 (pupa_vga_set_mode): New function.
2012 (pupa_vga_get_font): Likewise.
2013
2014 * normal/command.c: Include pupa/term.h.
2015 (terminal_command): New function.
2016 (pupa_command_init): Register the command "terminal".
2017
2018 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
2019 (DISP_UP): Likewise.
2020 (DISP_RIGHT): Likewise.
2021 (DISP_DOWN): Likewise.
2022 (DISP_HLINE): Likewise.
2023 (DISP_VLINE): Likewise.
2024 (DISP_UL): Likewise.
2025 (DISP_UR): Likewise.
2026 (DISP_LL): Likewise.
2027 (DISP_LR): Likewise.
2028
2029 * term/i386/pc/console.c (pupa_console_putchar): New function.
2030
977329f5 20312003-02-08 NIIBE Yutaka <gniibe@m17n.org>
2032
2033 * util/resolve.c (pupa_util_resolve_dependencies): BUG
2034 FIX. Reverse the path_list.
2035
2036 * include/pupa/normal.h: Export pupa_register_command and
2037 pupa_unregister_command.
2038
2039 * hello/hello.c (pupa_cmd_hello): New module.
2040 * conf/i386-pc.rmk: Added hello.mod.
2041
1f5ab428 20422003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
2043
2044 * kern/i386/pc/lzo1x.S: New file.
2045
2046 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
2047 (compress_kernel): New variable.
2048 (generate_image): Heavily modified to support compressing a
2049 large part of the core image.
2050
2051 * util/misc.c (pupa_util_read_image): Fix a file descriptor
2052 leak.
2053 (pupa_util_load_image): New function.
2054
2055 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
2056 (pupa_compressed_size): New variable.
2057 (codestart): Enable Gate A20 here.
2058 Decompress the compressed part of the core image.
2059 Rearrange the code to put functions and variables which are
2060 required for initialization in the non-compressed part.
2061 Include lzo1x.S.
2062
2063 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
2064 here.
2065
2066 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
2067
2068 * include/pupa/i386/pc/kernel.h
2069 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
2070 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
2071 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
2072 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
2073 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
2074
2075 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
2076
2077 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
2078 (Utility#rule): Likewise.
2079
2080 * configure.ac: Check if LZO is available.
2081
ce5bf700 20822003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
2083
2084 * include/pupa/normal.h: New file.
2085 * include/pupa/setjmp.h: Likewise.
2086 * include/pupa/i386/setjmp.h: Likewise.
2087 * normal/cmdline.c: Likewise.
2088 * normal/command.c: Likewise.
2089 * normal/main.c: Likewise.
2090 * normal/menu.c: Likewise.
2091 * normal/i386/setjmp.S: Likewise.
2092
2093 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
2094 (pupa_rescue_cmd_initrd): Likewise.
2095
2096 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
2097 Likewise.
2098
2099 * kern/i386/pc/startup.S (translation_table): New variable.
2100 (translate_keycode): New function.
2101 (pupa_console_getkey): Call translate_keycode.
2102
2103 * kern/rescue.c (attempt_normal_mode): New function.
2104 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
2105 it failed, print a message.
2106
2107 * kern/mm.c (pupa_real_malloc): Print more information when a
2108 free magic is broken.
2109 (pupa_free): If the first free header is not free actually, set
2110 it to P.
2111
2112 * kern/main.c (pupa_load_normal_mode): Just load the module
2113 "normal".
2114 (pupa_main): Don't print the message
2115 "Entering into rescue mode..." here.
2116
2117 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
2118 Declared.
2119 (pupa_rescue_cmd_initrd): Likewise.
2120 (pupa_rescue_cmd_initrd): Likewise.
2121
2122 * include/pupa/symbol.h (FUNCTION): Specify the type.
2123 (VARIABLE): Likewise.
2124
2125 * include/pupa/err.h (pupa_err_t): Added
2126 PUPA_ERR_UNKNOWN_COMMAND.
2127
2128 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
2129 (pupa_dl_get_prefix): Likewise.
2130
2131 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
2132 Added _chain.mod and _linux.mod instead of chain.mod and
2133 linux.mod.
2134 (chain_mod_SOURCES): Renamed to ...
2135 (_chain_mod_SOURCES): ... this.
2136 (chain_mod_CFLAGS): Renamed to ...
2137 (_chain_mod_CFLAGS): ... this.
2138 (linux_mod_SOURCES): Renamed to ...
2139 (_linux_mod_SOURCES): ... this.
2140 (linux_mod_CFLAGS): Renamed to ...
2141 (_linux_mod_CFLAGS): ... this.
2142 (normal_mod_SOURCES): New variable.
2143 (normal_mod_CFLAGS): Likewise.
2144 (normal_mod_ASFLAGS): Likewise.
2145
21462003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
2147
2148 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
2149 possible.
2150
2151 * kern/dl.c (pupa_dl_ref): Refer dependending modules
2152 recursively.
2153 (pupa_dl_unref): Unrefer depending modules recursively.
2154 Don't call pupa_dl_unload implicitly, because PUPA can crash if
2155 a module is unloaded before one depending on that module is
2156 unloaded.
2157 (pupa_dl_unload): Unload depending modules explicitly,
2158 if possible.
2159
c04da074 21602003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
2161
2162 * include/pupa/i386/pc/linux.h: New file.
2163 * loader/i386/pc/linux.c: Likewise.
2164
2165 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
2166 Removed.
2167 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
2168 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
2169 of PUPA_CHAINLOADER_BOOT_SECTOR.
2170
2171 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
2172 (pupa_linux_prot_size): New variable.
2173 (pupa_linux_tmp_addr): Likewise.
2174 (pupa_linux_real_addr): Likewise.
2175 (pupa_linux_boot_zimage): New function.
2176 (pupa_linux_boot_bzimage): Likewise.
2177
2178 * kern/i386/pc/init.c (struct mem_region): New structure.
2179 (MAX_REGIONS): New macro.
2180 (mem_regions): New variable.
2181 (num_regions): Likewise.
2182 (pupa_os_area_addr): Likewise.
2183 (pupa_os_area_size): Likewise.
2184 (pupa_lower_mem): Likewise.
2185 (pupa_upper_mem): Likewise.
2186 (add_mem_region): New function.
2187 (compact_mem_regions): Likewise.
2188 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
2189 the size of the conventional memory and that of so-called upper
2190 memory (before the first memory hole).
2191 Instead of adding each found region to free memory, use
2192 add_mem_region and add them after removing overlaps.
2193 Also, add only 1/4 of the upper memory to free memory. The rest
2194 is used for loading OS images. Maybe this is ad hoc, but this
2195 makes it much easier to relocate OS images when booting.
2196
2197 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
2198 (pupa_enter_rescue_mode): Don't register initrd and module.
2199
2200 * kern/mm.c: Include pupa/dl.h.
2201
2202 * kern/main.c: Include pupa/file.h and pupa/device.h.
2203
2204 * kern/loader.c (pupa_loader_load_module_func): Removed.
2205 (pupa_loader_load_module): Likewise.
2206
2207 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
2208 ``.o''.
2209
2210 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
2211 (pupa_linux_tmp_addr): Likewise.
2212 (pupa_linux_real_addr): Likewise.
2213 (pupa_linux_boot_zimage): Likewise.
2214 (pupa_linux_boot_bzimage): Likewise.
2215
2216 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
2217 (pupa_upper_mem): Likewise.
2218 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
2219 module is too dangerous.
2220
2221 * include/pupa/loader.h (pupa_os_area_addr): Declared.
2222 (pupa_os_area_size): Likewise.
2223 (pupa_loader_set): Remove the first argument. Loader doesn't
2224 manage modules or initrd any longer.
2225 (pupa_loader_load_module): Removed.
2226
2227 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
2228 (linux_mod_SOURCES): New variable.
2229 (linux_mod_CFLAGS): Likewise.
2230
a13f9237 22312003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
2232
2233 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
2234 the length of a blocklist correctly.
2235
2236 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
2237 Use ioctl only if the OS file is a block device.
2238 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
2239 not very useful for normal files.
2240
2241 * kern/main.c (pupa_set_root_dev): New function.
2242 (pupa_load_normal_mode): Likewise.
2243 (pupa_main): Call those above.
2244
2245 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
2246 pupa_uint16_t.
2247
2248 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
2249
a5ffe966 22502003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2251
2252 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
2253 (setup): Configure the installed partition information and the
2254 dl prefix.
2255
2256 * loader/i386/pc/chainloader.c (my_mod): New variable.
2257 (pupa_chainloader_unload): New function.
2258 (pupa_rescue_cmd_chainloader): Refer itself.
2259 (PUPA_MOD_INIT): Save its own module in MY_MOD.
2260
2261 * kern/i386/pc/startup.S (install_partition): Removed.
2262 (version_string): Likewise.
2263 (config_file): Likewise.
2264 (pupa_install_dos_part): New variable.
2265 (pupa_install_bsd_part): Likewise.
2266 (pupa_prefix): Likewise.
2267 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
2268
2269 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
2270 and pupa/misc.h.
2271 (make_install_device): New function.
2272 (pupa_machine_init): Set the dl prefix.
2273
2274 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
2275 (buf): Renamed to ...
2276 (linebuf): ... this.
2277 (pupa_rescue_cmd_prefix): New function.
2278 (pupa_rescue_cmd_insmod): Likewise.
2279 (pupa_rescue_cmd_rmmod): Likewise.
2280 (pupa_rescue_cmd_lsmod): Likewise.
2281 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
2282 rmmod and lsmod.
2283
2284 * kern/mm.c (pupa_memalign): If failed even after invalidating
2285 disk caches, unload unneeded modules and retry.
2286
2287 * kern/misc.c (pupa_memmove): New function.
2288 (pupa_memcpy): Removed.
2289 (pupa_strcpy): New function.
2290 (pupa_itoa): Made static.
2291
2292 * kern/dl.c (pupa_dl_iterate): New function.
2293 (pupa_dl_ref): Likewise.
2294 (pupa_dl_unref): Likewise.
2295 (pupa_dl_unload): Return if succeeded or not.
2296 (pupa_dl_unload_unneeded): New function.
2297 (pupa_dl_unload_all): Likewise.
2298 (pupa_dl_init): Renamed to ...
2299 (pupa_dl_set_prefix): ... this.
2300 (pupa_dl_get_prefix): New function.
2301
2302 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
2303 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
2304 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
2305 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
2306 (pupa_install_dos_part): Declared.
2307 (pupa_install_bsd_part): Likewise.
2308 (pupa_prefix): Likewise.
2309 (pupa_boot_drive): Likewise.
2310
2311 * include/pupa/types.h: Fix a typo.
2312
2313 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
2314 pupa_memmove.
2315 (pupa_memmove): Declared.
2316 (pupa_strcpy): Likewise.
2317
2318 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
2319 pupa_mod_init takes one argument, its own module.
2320 (pupa_dl_unload_unneeded): Declared.
2321 (pupa_dl_unload_all): Likewise.
2322 (pupa_dl_ref): Likewise.
2323 (pupa_dl_unref): Likewise.
2324 (pupa_dl_iterate): Likewise.
2325 (pupa_dl_init): Renamed to ...
2326 (pupa_dl_set_prefix): ... this.
2327 (pupa_dl_get_prefix): Declared.
2328
2329 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
2330 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
2331 unloaded.
2332 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
2333 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
2334
2335 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
2336 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
2337
012d7999 23382003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
2339
2340 * util/i386/pc/pupa-setup.c (setup): Define the internal
2341 function find_first_partition_start at the top level, because GCC
2342 3.0.x cannot compile internal functions in deeper scopes
2343 correctly.
2344 (find_root_device): Use lstat instead of stat.
2345 Don't follow symbolic links.
2346 Fix the path-constructing code.
2347
2348 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
2349 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
2350 by a BLKGETSIZE ioctl first, because block devices don't fill
2351 the member st_mode of the structure stat on Linux.
2352 [__linux__] (linux_find_partition): Use a temporary buffer
2353 REAL_DEV for the working space. Copy it to DEV before returning.
2354 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
2355 buffer cache consistent.
2356 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
2357 strncmp. The previous value was merely wrong.
2358 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
2359
2360 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
2361 FAT size is 12. The previous value was merely wrong.
2362
2363 * kern/main.c (pupa_main): Don't split the starting message from
2364 newlines.
2365
2366 * kern/term.c (pupa_putchar): Put CR after LF instead of before
2367 LF, because BIOS goes crazy about character attributes in this
2368 case.
2369
1cc73a62 23702003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
2371
2372 * include/i386/pc/util/biosdisk.h: New file.
2373 * util/i386/pc/biosdisk.c: Likewise.
2374 * util/i386/pc/pupa-setup.c: Likewise.
2375
2376 * Makefile.in (INCLUDE_DISTFILES): Added
2377 include/pupa/i386/pc/util/biosdisk.h.
2378 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
2379 directory util/i386/pc.
2380 (install-local): Added a rule for sbin_UTILITIES.
2381 (uninstall): Likewise.
2382
2383 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
2384
2385 * util/misc.c (xrealloc): New function.
2386 (pupa_malloc): Likewise.
2387 (pupa_free): Likewise.
2388 (pupa_realloc): Likewise.
2389 (pupa_stop): Likewise.
2390 (pupa_putchar): Likewise.
2391
2392 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
2393
2394 * include/pupa/util/misc.h (xrealloc): Declared.
2395
2396 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
2397 macro.
2398 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
2399 (PUPA_BOOT_MACHINE_BPB_END): ... this.
2400
2401 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
2402 [PUPA_UTIL] (pupa_fat_fini): Likewise.
2403
2404 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
2405 way should be implemented.
2406 [PUPA_UTIL] (pupa_fat_fini): Likewise.
2407
2408 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
2409 the size of NAME for safety.
2410 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
2411 0x88.
2412
2413 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
2414 (pupa_setup_SOURCES): Likewise.
2415
2416 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
2417
08b70fe8 24182002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
2419
2420 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
2421 bunch of pushl's from pusha, because this destroys the return
2422 value.
2423
62ddcc8f 24242002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
2425
2426 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
2427 This means that any missing prototypes could be fatal. Also, you
2428 must take care when writing assembly code. See the comments at
2429 the beginning of startup.S, for more details.
2430
2431 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
2432 compilation mechanism.
2433 (pupa_chainloader_real_boot): Likewise.
2434 (pupa_biosdisk_rw_int13_extensions): Likewise.
2435 (pupa_biosdisk_rw_standard): Likewise.
2436 (pupa_biosdisk_check_int13_extensions): Likewise.
2437 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
2438 (pupa_biosdisk_get_diskinfo_standard): Likewise.
2439 (pupa_get_memsize): Likewise.
2440 (pupa_get_mmap_entry): Likewise.
2441 (pupa_console_putchar): Likewise.
2442 (pupa_console_setcursor): Likewise.
2443 (pupa_getrtsecs): Use pushl instead of push.
2444
2445 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
2446 memory instead of the stack for a mmap entry, because some
2447 BIOSes may ignore the maximum size and overflow.
2448
2449 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
2450
2451 * genmk.rb (PModule#rule): Compile automatically generated
2452 sources with module-specific CFLAGS as well as other sources.
2453
9962ed99 24542002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
2455
2456 * configure.ac: Check ld.
2457 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
2458 respectively, before checking endianness and sizes.
2459
2460 * Makefile.in (LD): New variable.
2461
abdfc3c5 24622002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
2463
2464 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
2465
6a161fa9 24662002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
2467
2468 * Changelog: New file.
2469