]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2007-10-31 Robert Millan <rmh@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
ca25d8f0 12007-10-31 Robert Millan <rmh@aybabtu.com>
2
3 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
4
5 * conf/i386-linuxbios.rmk: New file.
6
7 * kern/i386/pc/hardware.c: Likewise.
8 * term/i386/pc/at_keyboard.c: Likewise.
9 * term/i386/pc/vga_text.c: Likewise.
10
11 * include/grub/i386/linuxbios/boot.h: Likewise.
12 * include/grub/i386/linuxbios/console.h: Likewise.
13 * include/grub/i386/linuxbios/init.h: Likewise.
14 * include/grub/i386/linuxbios/kernel.h: Likewise.
15 * include/grub/i386/linuxbios/loader.h: Likewise.
16 * include/grub/i386/linuxbios/memory.h: Likewise.
17 * include/grub/i386/linuxbios/serial.h: Likewise.
18 * include/grub/i386/linuxbios/time.h: Likewise.
19
20 * kern/i386/linuxbios/init.c: Likewise.
21 * kern/i386/linuxbios/startup.S: Likewise.
22 * kern/i386/linuxbios/table.c: Likewise.
23
e911ecc1 242007-10-31 Marco Gerards <marco@gnu.org>
25
26 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
27 (ata_mod_SOURCES): New variable.
28 (ata_mod_CFLAGS): Likewise.
29 (ata_mod_LDFLAGS): Likewise.
30
31 * disk/ata.c: New file.
32
33 * include/grub/disk.h (grub_disk_dev_id): Add
34 `GRUB_DISK_DEV_ATA_ID'.
35
7f66d0e0 362007-10-31 Robert Millan <rmh@aybabtu.com>
37
38 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
39 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
40
41 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
42 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
43
44 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
45 `<grub/types.h>'.
46
47 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
48
5cd7dd46 492007-10-27 Robert Millan <rmh@aybabtu.com>
50
3236ca65 51 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 52
2ebfc90f 532007-10-22 Robert Millan <rmh@aybabtu.com>
54
55 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
56 `"../realmode.S"'.
57 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
58
73fcb0f3 592007-10-22 Robert Millan <rmh@aybabtu.com>
60
61 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
62 (pkgdata_MODULES): Add `biosdisk.mod'.
63 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
64 variables.
65
66 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
67 (grub_biosdisk_init): Replace with ...
68 (GRUB_MOD_INIT(biosdisk)): ... this.
69 (grub_biosdisk_fini): Replace with ...
70 (GRUB_MOD_FINI(biosdisk)): ... this.
71
72 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
73 (grub_machine_init): Remove call to grub_biosdisk_init().
74 (grub_machine_fini): Remove call to grub_machine_fini().
75
76 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
77
3381d274 782007-10-22 Robert Millan <rmh@aybabtu.com>
79
80 * include/grub/time.h: New file.
81 * include/grub/i386/time.h: Likewise.
82 * include/grub/powerpc/time.h: Likewise.
83 * include/grub/sparc64/time.h: Likewise.
84
85 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
86 instances to ...
87 (KERNEL_MACHINE_TIME_HEADER): ... this.
88 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
89 instances to ...
90 (KERNEL_MACHINE_TIME_HEADER): ... this.
91 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
92 instances to ...
93 (KERNEL_MACHINE_TIME_HEADER): ... this.
94
95 * kern/i386/efi/init.c: Include `<grub/time.h>'.
96 (grub_millisleep): New function.
97 * kern/i386/pc/init.c: Include `<grub/time.h>'.
98 (grub_millisleep): New function.
99 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
100 Remove `grub/machine/time.h' include.
101 (grub_millisleep): New function.
102 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
103 Remove `grub/machine/time.h' include.
104 (grub_millisleep): New function.
105
106 * include/grub/misc.h (grub_div_roundup): New function.
107
108 * kern/misc.c: Include `<grub/time.h>'.
109 (grub_millisleep_generic): New function.
110
111 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
112 Add `time.h'.
113 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
114 Add `time.h'.
115 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
116 `machine/time.h'. Add `time.h'.
117 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
118
a39a0312 1192007-10-21 Robert Millan <rmh@aybabtu.com>
120
121 * include/grub/misc.h (grub_max): New function.
122
2aad70e2 1232007-10-21 Robert Millan <rmh@aybabtu.com>
124
125 * util/misc.c (grub_util_info): Call fflush() before returning.
126
54b71c4b 1272007-10-20 Robert Millan <rmh@aybabtu.com>
128
129 * genmk.rb (Image): Copy `extra_flags' from here ...
130 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
131
132 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
133 to `argc' and `args' arguments.
134
a979f513 1352007-10-17 Robert Millan <rmh@aybabtu.com>
136
137 * kern/i386/loader.S: New file.
138
139 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
140 * kern/i386/loader.S (grub_linux_prot_size)... to here.
141 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
142 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
143 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
144 * kern/i386/loader.S (grub_linux_real_addr)... to here.
145 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
146 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
147 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
148 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
149 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
150 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
151 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
152 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
153
154 * kern/i386/realmode.S: New file.
155
156 * kern/i386/pc/startup.S (protstack): Moved from here ...
157 * kern/i386/realmode.S (protstack)... to here.
158 * kern/i386/pc/startup.S (gdt): Moved from here ...
159 * kern/i386/realmode.S (gdt)... to here.
160 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
161 * kern/i386/realmode.S (prot_to_real)... to here.
162
163 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
164 `kern/i386/realmode.S'.
165
825fc8fd 1662007-10-17 Robert Millan <rmh@aybabtu.com>
167
168 * include/grub/i386/loader.h: New file.
169
170 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
171 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
172 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
173 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
174 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
175 * include/grub/i386/loader.h (grub_linux_prot_size)
176 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
177 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
178 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
179 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
180
181 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
182
e179b2f4 1832007-10-15 Robert Millan <rmh@aybabtu.com>
184
185 * normal/misc.c (grub_normal_print_device_info): Do not probe for
186 filesystem when dev->disk is unset.
187 Do probe for filesystem even when dev->disk->has_partitions is set.
188 In case a filesystem is found, always report it.
189 In case it isn't, if dev->disk->has_partitions is set, report that
190 a partition table was found instead of reporting that no filesystem
191 could be identified.
192
5db82af6 1932007-10-12 Robert Millan <rmh@aybabtu.com>
194
195 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
196 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
197
198 * include/grub/types.h (#ifdef GRUB_CPU_WORDS_BIGENDIAN): Define
199 grub_host_to_target16, grub_host_to_target32, grub_host_to_target64,
200 grub_target_to_host16, grub_target_to_host32 and grub_target_to_host64.
201 (#else): Likewise.
202
203 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
204 Renamed from to ...
205 (GRUB_MOD_ALIGN): ...this. Update all users.
206
207 * util/elf/grub-mkimage.c: Replace grub_cpu_to_be16, grub_cpu_to_be32,
208 grub_be_to_cpu16 and grub_be_to_cpu32 macros with grub_host_to_target16,
209 grub_host_to_target32, grub_target_to_host16 and grub_target_to_host32,
210 respectively.
211
3cf497cc 2122007-10-12 Robert Millan <rmh@aybabtu.com>
213
214 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
215 * util/elf/grub-mkimage.c: ... here.
216
217 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
218 `util/powerpc/ieee1275/grub-mkimage.c'.
219
c8cc3692 2202007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 221
c8cc3692 222 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
223 and make it easier to figure out.
224 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
225 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
226 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
227 leave us with less than HEAP_MIN_SIZE total heap.
228 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 229
5c58b791 2302007-10-03 Robert Millan <rmh@aybabtu.com>
231
232 * include/grub/i386/io.h: New file.
233 * commands/i386/pc/play.c (inb): Removed.
234 (outb): Removed.
235 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
236 with grub_outb().
afcd2ef8 237 * term/i386/pc/serial.c (inb): Removed.
238 (outb): Removed.
239 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
240 with grub_outb().
241 * term/i386/pc/vga.c (inb): Removed.
242 (outb): Removed.
243 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
244 with grub_outb().
5c58b791 245
1a477ed6 2462007-10-02 Robert Millan <rmh@aybabtu.com>
247
248 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
249 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
250 Reported by Marcin Kurek.
251
6b5d80fa 2522007-09-07 Robert Millan <rmh@aybabtu.com>
253
254 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
255 SmartFirmware version updates (as released by Sven Luther), and avoid
256 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
257 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
258 known broken.
259
5618afbf 2602007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
261
262 From Hitoshi Ozeki:
263 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
264 when merging two regions.
265
6139dcd9 2662007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
267
508e39ee 268 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
269 * normal/completion.c (grub_normal_do_completion): Likewise.
270 Reported by Hitoshi Ozeki.
271
2722007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
273
6139dcd9 274 Do not use devices at boot in chainloading.
275
276 * loader/i386/pc/chainloader.c (boot_drive): New variable.
277 (boot_part_addr): Likewise.
278 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
279 with BOOT_DRIVE and BOOT_PART_ADDR.
280 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
281 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
282
38da6516 2832007-08-29 Robert Millan <rmh@aybabtu.com>
284
285 Patch from Simon Peter <dn.tlp@gmx.net>:
286 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
287 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
288 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
289 util/i386/pc/grub-setup.c_DEPENDENCIES.
290 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
291 util/grub-probe.c_DEPENDENCIES.
292 * conf/powerpc-ieee1275.rmk: Likewise.
293
29d0928c 2942007-08-28 Robert Millan <rmh@aybabtu.com>
295
296 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
297 to tell grub-mkdevicemap how to name devices.
298 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
299 feature).
300
301 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
302 util/i386/get_disk_name.c.
303 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
304 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
305 util/ieee1275/get_disk_name.c.
306
307 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
308
309 * DISTLIST: Add util/i386/get_disk_name.c and
310 util/ieee1275/get_disk_name.c.
311
312 * util/grub-mkdevicemap.c: Replace device naming logic with
313 grub_util_get_disk_name() calls.
314
5a0d3cca 3152007-08-20 Robert Millan <rmh@aybabtu.com>
316
317 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
318 (so that it works for both plural and singular quantities).
319
8b72db2f 3202007-08-05 Robert Millan <rmh@aybabtu.com>
321
322 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
323 so that [xz] isn't taken into account when determining order.
324
352466bf 3252007-08-02 Marco Gerards <marco@gnu.org>
326
327 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
328 `include/multiboot2.h', `include/grub/elfload.h',
329 `include/multiboot.h', `include/grub/multiboot.h',
330 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
331 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
332 `kern/elf.c', `loader/multiboot_loader.c',
333 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
334 `loader/i386/pc/multiboot2.c',
335 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
336 `util/i386/pc/grub-mkrescue.in'. Remove
337 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
338 `include/grub/i386/pc/util/biosdisk.h' and
339 `include/grub/powerpc/ieee1275/multiboot.h'.
340
8f096014 3412007-08-02 Bean <bean123ch@gmail.com>
342
343 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
344 (ntfs_mod_SOURCES): New variable.
345 (ntfs_mod_CFLAGS): Likewise.
346 (ntfs_mod_LDFLAGS): Likewise.
347
348 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
349 (grub_probe_SOURCES): Likewise.
350 (grub_emu_SOURCES): Likewise.
351
352 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
353 (grub_emu_SOURCES): Likewise.
354
355 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
356 (grub_emu_SOURCES): Likewise.
357
358 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
359
360 * fs/ntfs.c: New file.
361
9959f7db 3622007-08-02 Bean <bean123ch@gmail.com>
363
364 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
365
366 * file.h (grub_file): Likewise.
367
368 * fshelp.h (grub_fshelp_read_file): Likewise.
369
370 * util/i386/pc/grub-setup.c (setup): Likewise.
371 (save_first_sector): Likewise.
372 (save_blocklists): Likewise.
373
374 * fs/affs.c (grub_affs_read_file): Likewise.
375
376 * fs/ext2.c (grub_ext2_read_file): Likewise.
377
378 * fs/fat.c (grub_fat_read_data): Likewise.
379
380 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
381
382 * fs/hfs.c (grub_hfs_read_file): Likewise.
383
384 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
385
386 * fs/jfs.c (grub_jfs_read_file): Likewise.
387
388 * fs/minix.c (grub_minix_read_file): Likewise.
389
390 * fs/sfs.c (grub_sfs_read_file): Likewise.
391
392 * fs/ufs.c (grub_ufs_read_file): Likewise.
393
394 * fs/xfs.c (grub_xfs_read_file): Likewise.
395
396 * command/blocklist.c (read_blocklist): Likewise.
397 (print_blocklist): Likewise.
398
0a203f83 3992007-08-02 Marco Gerards <marco@gnu.org>
400
401 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
402 `util/hostfs.c'.
403
404 * disk/host.c: New file.
405
406 * util/hostfs.c: Likewise.
407
408 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
409 return `GRUB_ERR_BAD_FS'.
410 * fs/sfs.c (grub_sfs_mount): Likewise.
411 * fs/xfs.c (grub_xfs_mount): Likewise.
412
413 * include/grub/disk.h (enum grub_disk_dev_id): Add
414 `GRUB_DISK_DEVICE_HOST_ID'.
415
416 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
417
e5dfe777 4182007-07-24 Jerone Young <jerone@gmail.com>
419
420 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
421 modules for compilation.
422 * conf/powerpc-ieee1275.rmk: Likewise.
423
424 * include/multiboot.h: Move multiboot definitions to one file. Rename
425 many definitions to not get grub specific.
426 * include/multiboot2.h: Create header with multiboot 2 definitions.
427 * include/grub/multiboot.h: Header for grub specific function
428 prototypes and definitions.
429 * include/grub/multiboot2.h: Likewise.
430 * include/grub/multiboot_loader.h: Likewise.
431 * include/grub/i386/pc/multiboot.h: Removed.
432 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
433
434 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
435 and 2 to allow for one multiboot and module commands.
436 * loader/multiboot2.c: Add multiboot2 functionality.
437 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
438 and definition names.
439 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
440 2 functions.
441 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
442 ieee1275 specific multiboot2 code.
443
444 * kern/i386/pc/startup.S: Change headers and definition names for
445 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
446
daf0f0ba 4472007-07-22 Robert Millan <rmh@aybabtu.com>
448
449 * geninitheader.sh: Process file specified in first parameter rather
450 than hardcoding grub_modules_init.lst.
451 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
452 than hardcoding grub_modules_init.h.
453
454 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
455 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
456 grub_probe_init.[ch] and grub_setup_init.[ch].
457
458 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
459 grub_modules_init.h with grub_emu_init.h.
460 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
461 grub_probe_init.[ch] files.
462 * conf/i386-efi.rmk: Likewise.
463 * conf/i386-pc.rmk: Likewise.
464 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
465 grub_setup_init.[ch] files.
466
467 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
468 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
469 to initialize modules rather than a list of hardcoded functions.
470 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
471 grub_init_all() to initialize modules rather than a list of hardcoded
472 functions.
473
54cdc1cc 4742007-07-22 Robert Millan <rmh@aybabtu.com>
475
476 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
477 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
478
ad0686cc 4792007-07-22 Robert Millan <rmh@aybabtu.com>
480
481 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
482 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
483 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
484 flag when running on SmartFirmware.
485 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
486 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
487 was set.
488
489 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
490 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
491 rather than decreasing it.
492
493 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
494 there's not enough space to do it, fail in the same way as when it
495 can't be done because there are no partitions.
496
497 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
498 when nvsetenv failed.
499
969c02ec 5002007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
501
502 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
503 because this rule is automatically generated.
504 (grub-mkrescue): Removed for the same reason as above.
505
5a79f472 5062007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
507
508 Migrate to GNU General Public License Version 3.
509
510 * COPYING: Replaced with the plain text version of GPLv3.
511
512 * config.guess: Updated from gnulib.
513 * config.sub: Likewise.
514
515 * geninit.sh: Output a GPLv3 copyright notice.
516 * geninitheader.sh: Likewise.
517 * genmodsrc.sh: Likewise.
518 * gensymlist.sh.in: Likewise.
519
520 * boot/i386/pc/boot.S: Upgraded to GPLv3.
521 * boot/i386/pc/diskboot.S: Likewise.
522 * boot/i386/pc/pxeboot.S: Likewise.
523 * commands/blocklist.c: Likewise.
524 * commands/boot.c: Likewise.
525 * commands/cat.c: Likewise.
526 * commands/cmp.c: Likewise.
527 * commands/configfile.c: Likewise.
528 * commands/echo.c: Likewise.
529 * commands/help.c: Likewise.
530 * commands/ls.c: Likewise.
531 * commands/search.c: Likewise.
532 * commands/terminal.c: Likewise.
533 * commands/test.c: Likewise.
534 * commands/videotest.c: Likewise.
535 * commands/i386/cpuid.c: Likewise.
536 * commands/i386/pc/halt.c: Likewise.
537 * commands/i386/pc/play.c: Likewise.
538 * commands/i386/pc/reboot.c: Likewise.
539 * commands/i386/pc/vbeinfo.c: Likewise.
540 * commands/i386/pc/vbetest.c: Likewise.
541 * commands/ieee1275/halt.c: Likewise.
542 * commands/ieee1275/reboot.c: Likewise.
543 * commands/ieee1275/suspend.c: Likewise.
544 * disk/loopback.c: Likewise.
545 * disk/lvm.c: Likewise.
546 * disk/raid.c: Likewise.
547 * disk/efi/efidisk.c: Likewise.
548 * disk/i386/pc/biosdisk.c: Likewise.
549 * disk/ieee1275/ofdisk.c: Likewise.
550 * font/manager.c: Likewise.
551 * fs/affs.c: Likewise.
552 * fs/ext2.c: Likewise.
553 * fs/fat.c: Likewise.
554 * fs/fshelp.c: Likewise.
555 * fs/hfs.c: Likewise.
556 * fs/hfsplus.c: Likewise.
557 * fs/iso9660.c: Likewise.
558 * fs/jfs.c: Likewise.
559 * fs/minix.c: Likewise.
560 * fs/sfs.c: Likewise.
561 * fs/ufs.c: Likewise.
562 * fs/xfs.c: Likewise.
563 * hello/hello.c: Likewise.
564 * include/grub/acorn_filecore.h: Likewise.
565 * include/grub/arg.h: Likewise.
566 * include/grub/bitmap.h: Likewise.
567 * include/grub/boot.h: Likewise.
568 * include/grub/cache.h: Likewise.
569 * include/grub/device.h: Likewise.
570 * include/grub/disk.h: Likewise.
571 * include/grub/dl.h: Likewise.
572 * include/grub/elfload.h: Likewise.
573 * include/grub/env.h: Likewise.
574 * include/grub/err.h: Likewise.
575 * include/grub/file.h: Likewise.
576 * include/grub/font.h: Likewise.
577 * include/grub/fs.h: Likewise.
578 * include/grub/fshelp.h: Likewise.
579 * include/grub/gzio.h: Likewise.
580 * include/grub/hfs.h: Likewise.
581 * include/grub/kernel.h: Likewise.
582 * include/grub/loader.h: Likewise.
583 * include/grub/lvm.h: Likewise.
584 * include/grub/misc.h: Likewise.
585 * include/grub/mm.h: Likewise.
586 * include/grub/net.h: Likewise.
587 * include/grub/normal.h: Likewise.
588 * include/grub/parser.h: Likewise.
589 * include/grub/partition.h: Likewise.
590 * include/grub/pc_partition.h: Likewise.
591 * include/grub/raid.h: Likewise.
592 * include/grub/rescue.h: Likewise.
593 * include/grub/script.h: Likewise.
594 * include/grub/setjmp.h: Likewise.
595 * include/grub/symbol.h: Likewise.
596 * include/grub/term.h: Likewise.
597 * include/grub/terminfo.h: Likewise.
598 * include/grub/tparm.h: Likewise.
599 * include/grub/types.h: Likewise.
600 * include/grub/video.h: Likewise.
601 * include/grub/efi/api.h: Likewise.
602 * include/grub/efi/chainloader.h: Likewise.
603 * include/grub/efi/console.h: Likewise.
604 * include/grub/efi/console_control.h: Likewise.
605 * include/grub/efi/disk.h: Likewise.
606 * include/grub/efi/efi.h: Likewise.
607 * include/grub/efi/pe32.h: Likewise.
608 * include/grub/efi/time.h: Likewise.
609 * include/grub/i386/linux.h: Likewise.
610 * include/grub/i386/setjmp.h: Likewise.
611 * include/grub/i386/types.h: Likewise.
612 * include/grub/i386/efi/kernel.h: Likewise.
613 * include/grub/i386/efi/loader.h: Likewise.
614 * include/grub/i386/efi/time.h: Likewise.
615 * include/grub/i386/pc/biosdisk.h: Likewise.
616 * include/grub/i386/pc/boot.h: Likewise.
617 * include/grub/i386/pc/chainloader.h: Likewise.
618 * include/grub/i386/pc/console.h: Likewise.
619 * include/grub/i386/pc/init.h: Likewise.
620 * include/grub/i386/pc/kernel.h: Likewise.
621 * include/grub/i386/pc/loader.h: Likewise.
622 * include/grub/i386/pc/memory.h: Likewise.
623 * include/grub/i386/pc/multiboot.h: Likewise.
624 * include/grub/i386/pc/serial.h: Likewise.
625 * include/grub/i386/pc/time.h: Likewise.
626 * include/grub/i386/pc/vbe.h: Likewise.
627 * include/grub/i386/pc/vbeblit.h: Likewise.
628 * include/grub/i386/pc/vbefill.h: Likewise.
629 * include/grub/i386/pc/vbeutil.h: Likewise.
630 * include/grub/i386/pc/vga.h: Likewise.
631 * include/grub/ieee1275/ieee1275.h: Likewise.
632 * include/grub/ieee1275/ofdisk.h: Likewise.
633 * include/grub/powerpc/libgcc.h: Likewise.
634 * include/grub/powerpc/setjmp.h: Likewise.
635 * include/grub/powerpc/types.h: Likewise.
636 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
637 * include/grub/powerpc/ieee1275/console.h: Likewise.
638 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
639 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
640 * include/grub/powerpc/ieee1275/loader.h: Likewise.
641 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
642 * include/grub/powerpc/ieee1275/time.h: Likewise.
643 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
644 * include/grub/sparc64/libgcc.h: Likewise.
645 * include/grub/sparc64/setjmp.h: Likewise.
646 * include/grub/sparc64/types.h: Likewise.
647 * include/grub/sparc64/ieee1275/console.h: Likewise.
648 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
649 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
650 * include/grub/sparc64/ieee1275/time.h: Likewise.
651 * include/grub/util/biosdisk.h: Likewise.
652 * include/grub/util/getroot.h: Likewise.
653 * include/grub/util/lvm.h: Likewise.
654 * include/grub/util/misc.h: Likewise.
655 * include/grub/util/raid.h: Likewise.
656 * include/grub/util/resolve.h: Likewise.
657 * io/gzio.c: Likewise.
658 * kern/device.c: Likewise.
659 * kern/disk.c: Likewise.
660 * kern/dl.c: Likewise.
661 * kern/elf.c: Likewise.
662 * kern/env.c: Likewise.
663 * kern/err.c: Likewise.
664 * kern/file.c: Likewise.
665 * kern/fs.c: Likewise.
666 * kern/loader.c: Likewise.
667 * kern/main.c: Likewise.
668 * kern/misc.c: Likewise.
669 * kern/mm.c: Likewise.
670 * kern/parser.c: Likewise.
671 * kern/partition.c: Likewise.
672 * kern/rescue.c: Likewise.
673 * kern/term.c: Likewise.
674 * kern/efi/efi.c: Likewise.
675 * kern/efi/init.c: Likewise.
676 * kern/efi/mm.c: Likewise.
677 * kern/i386/dl.c: Likewise.
678 * kern/i386/efi/init.c: Likewise.
679 * kern/i386/efi/startup.S: Likewise.
680 * kern/i386/pc/init.c: Likewise.
681 * kern/i386/pc/lzo1x.S: Likewise.
682 * kern/i386/pc/startup.S: Likewise.
683 * kern/ieee1275/ieee1275.c: Likewise.
684 * kern/powerpc/cache.S: Likewise.
685 * kern/powerpc/dl.c: Likewise.
686 * kern/powerpc/ieee1275/cmain.c: Likewise.
687 * kern/powerpc/ieee1275/crt0.S: Likewise.
688 * kern/powerpc/ieee1275/init.c: Likewise.
689 * kern/powerpc/ieee1275/openfw.c: Likewise.
690 * kern/sparc64/cache.S: Likewise.
691 * kern/sparc64/dl.c: Likewise.
692 * kern/sparc64/ieee1275/init.c: Likewise.
693 * kern/sparc64/ieee1275/openfw.c: Likewise.
694 * loader/efi/chainloader.c: Likewise.
695 * loader/efi/chainloader_normal.c: Likewise.
696 * loader/i386/efi/linux.c: Likewise.
697 * loader/i386/efi/linux_normal.c: Likewise.
698 * loader/i386/pc/chainloader.c: Likewise.
699 * loader/i386/pc/chainloader_normal.c: Likewise.
700 * loader/i386/pc/linux.c: Likewise.
701 * loader/i386/pc/linux_normal.c: Likewise.
702 * loader/i386/pc/multiboot.c: Likewise.
703 * loader/i386/pc/multiboot_normal.c: Likewise.
704 * loader/powerpc/ieee1275/linux.c: Likewise.
705 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
706 * normal/arg.c: Likewise.
707 * normal/cmdline.c: Likewise.
708 * normal/command.c: Likewise.
709 * normal/completion.c: Likewise.
710 * normal/execute.c: Likewise.
711 * normal/function.c: Likewise.
712 * normal/lexer.c: Likewise.
713 * normal/main.c: Likewise.
714 * normal/menu.c: Likewise.
715 * normal/menu_entry.c: Likewise.
716 * normal/misc.c: Likewise.
717 * normal/parser.y: Likewise.
718 * normal/script.c: Likewise.
719 * normal/i386/setjmp.S: Likewise.
720 * normal/powerpc/setjmp.S: Likewise.
721 * normal/sparc64/setjmp.S: Likewise.
722 * partmap/acorn.c: Likewise.
723 * partmap/amiga.c: Likewise.
724 * partmap/apple.c: Likewise.
725 * partmap/gpt.c: Likewise.
726 * partmap/pc.c: Likewise.
727 * partmap/sun.c: Likewise.
728 * term/gfxterm.c: Likewise.
729 * term/terminfo.c: Likewise.
730 * term/efi/console.c: Likewise.
731 * term/i386/pc/console.c: Likewise.
732 * term/i386/pc/serial.c: Likewise.
733 * term/i386/pc/vesafb.c: Likewise.
734 * term/i386/pc/vga.c: Likewise.
735 * term/ieee1275/ofconsole.c: Likewise.
736 * util/biosdisk.c: Likewise.
737 * util/console.c: Likewise.
738 * util/genmoddep.c: Likewise.
739 * util/getroot.c: Likewise.
740 * util/grub-emu.c: Likewise.
741 * util/grub-mkdevicemap.c: Likewise.
742 * util/grub-probe.c: Likewise.
743 * util/lvm.c: Likewise.
744 * util/misc.c: Likewise.
745 * util/raid.c: Likewise.
746 * util/resolve.c: Likewise.
747 * util/update-grub.in: Likewise.
748 * util/update-grub_lib.in: Likewise.
749 * util/grub.d/00_header.in: Likewise.
750 * util/grub.d/10_hurd.in: Likewise.
751 * util/grub.d/10_linux.in: Likewise.
752 * util/i386/efi/grub-install.in: Likewise.
753 * util/i386/efi/grub-mkimage.c: Likewise.
754 * util/i386/pc/grub-install.in: Likewise.
755 * util/i386/pc/grub-mkimage.c: Likewise.
756 * util/i386/pc/grub-mkrescue.in: Likewise.
757 * util/i386/pc/grub-setup.c: Likewise.
758 * util/i386/pc/misc.c: Likewise.
759 * util/powerpc/ieee1275/grub-install.in: Likewise.
760 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
761 * util/powerpc/ieee1275/misc.c: Likewise.
762 * video/bitmap.c: Likewise.
763 * video/video.c: Likewise.
764 * video/i386/pc/vbe.c: Likewise.
765 * video/i386/pc/vbeblit.c: Likewise.
766 * video/i386/pc/vbefill.c: Likewise.
767 * video/i386/pc/vbeutil.c: Likewise.
768 * video/readers/tga.c: Likewise.
769
3572d015 7702007-07-02 Robert Millan <rmh@aybabtu.com>
771
772 * conf/i386-efi.rmk: Replace obsolete reference to
773 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
774 with util/getroot.c.
775 * conf/powerpc-ieee1275.rmk: Likewise.
776 * conf/sparc64-ieee1275.rmk: Likewise.
777
778 * util/grub-emu.c (main): Fix unchecked pointer handling.
779
2c2a681b 7802007-07-02 Robert Millan <rmh@aybabtu.com>
781
782 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
783 invocation to fail, in order to support partition-less media.
784
785 * util/i386/pc/grub-install.in: Likewise.
786
787 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
788 which fs or partmap modules are needed (akin to its sister scripts).
789
790 Also use grub-probe to get rid of unportable /proc/mounts check.
791
792 Print the same informational message that the other scripts do, before
793 exitting.
794
6193defe 7952007-06-23 Robert Millan <rmh@aybabtu.com>
796
797 * util/update-grub_lib.in (font_path): New function. Determine wether
798 a font file can be found and, if so, echo the GRUB path to it.
799
800 * util/update-grub.in: Handle multiple terminals depending on user
801 input, platform availability and font file presence. Propagate
802 variables of our findings to /etc/grub.d/ children.
803
804 * util/grub.d/00_header.in: Handle multiple terminals, based on
805 environment setup by update-grub.
806
eface1dc 8072007-06-23 Robert Millan <rmh@aybabtu.com>
808
ba50d28f 809 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 810
bf697e28 8112007-06-21 Robert Millan <rmh@aybabtu.com>
812
813 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
814 indicate end of data section in kernel image.
815 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
816 GRUB_KERNEL_MACHINE_DATA_END.
817
818 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
819 space for it.
820 * kern/i386/efi/startup.S: Likewise.
821
822 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
823 during image generation. Implement --prefix option to override this
824 patch.
825 * util/i386/efi/grub-mkimage.c: Likewise.
826
827 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
828 code to make path relative to its root into a separate function.
829
830 * util/i386/pc/grub-install.in: Use newly provided
831 make_system_path_relative_to_its_root() to convert ${grubdir}, then
832 pass the result to grub-install --prefix.
833
baa574b4 8342007-06-13 Robert Millan <rmh@aybabtu.com>
835
836 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
837 DEFAULT_DEVICE_MAP.
838 * util/grub-emu.c: Use above definitions from misc.h instead of
839 defining them.
840 * util/grub-mkdevicemap.c: Likewise.
841 * util/i386/pc/grub-setup.c: Likewise.
842 * util/grub-probe.c: Likewise.
843 (probe): Abort with grub_util_error() when either
844 grub_guess_root_device or grub_util_get_grub_dev fails.
845
0215dcbf 8462007-06-12 Robert Millan <rmh@aybabtu.com>
847
848 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
849 "pager" assignment.
850 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
851 "pcdata".
852 * util/grub-probe.c (probe): Likewise for "drive_name".
853
8af2ab7b 8542007-06-11 Robert Millan <rmh@aybabtu.com>
855
856 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
857 not just the cdrom one.
858
59d31694 8592007-06-11 Robert Millan <rmh@aybabtu.com>
860
861 * util/i386/pc/grub-mkrescue.in: Add "set -e".
862 Add --pkglibdir=DIR option to override pkglibdir.
863 Mention --image-type=TYPE in help output.
864 Fix --grub-mkimage (it was a no-op).
865 Abort gracefuly when no parameter is given.
866
7ee367e4 8672007-06-11 Robert Millan <rmh@aybabtu.com>
868
869 * util/i386/pc/grub-mkrescue.in: New file.
870 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
871 * Makefile.in: Handle bin_SCRIPTS.
872
29b0ed46 8732007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
874
875 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
876 list of video modes.
877
c0f90770 8782007-06-06 Robert Millan <rmh@aybabtu.com>
879
880 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
881 file doesn't exist, or if it is in a filesystem grub can't read.
882
883 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
884 not abort if GRUB_DRIVE could not be defined. Rearrange generated
885 header comment to fit in 80 columns when the variables are resolved.
886
887 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
888 could be identified by update-grub. Remove redundant check for
889 unifont.pff existance (since convert_system_path_to_grub_path now
890 handles that).
891
fb36dc26 8922007-06-04 Robert Millan <rmh@aybabtu.com>
893
894 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
895
896 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
897
898 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
899
0c68c93e 9002007-06-04 Robert Millan <rmh@aybabtu.com>
901
902 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
903
904 * include/grub/partition.h: Declare grub_apple_partition_map_init and
905 grub_apple_partition_map_fini.
906
907 * util/biosdisk.c
908 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
909 to access >2 TiB disks).
910
911 Print disk->total_sectors with %llu instead of %lu, since this
912 variable is always 64-bit (prevents wrong disk size from being displayed
913 on either >2 TiB disk or big-endian CPU).
914
915 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
916 into a generic case that supports all (sane) partition maps.
917
918 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
919 breaks big-endian.
920
921 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
922 and grub_apple_partition_map_fini() after that.
923
0f23eb74 9242007-06-01 Robert Millan <rmh@aybabtu.com>
925
926 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
927
928 * util/grub.d/00_header.in: Only enable gfxterm when
929 convert_system_path_to_grub_path() succeeds.
930
42c71976 9312007-05-20 Robert Millan <rmh@aybabtu.com>
932
933 * util/update-grub_lib.in: New file.
934 * DISTLIST: Add update-grub_lib.in.
935 * conf/common.rmk: Generate update-grub_lib and install it in
936 $(lib_DATA).
937 * Makefile.in: Add install routine for $(lib_DATA).
938
939 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
940 function provided by update-grub_lib to support arbitrary paths of
941 unifont.pff.
942 * util/update-grub.in: Use convert_system_path_to_grub_path() to
943 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
944
5beb2291 9452007-05-19 Robert Millan <rmh@aybabtu.com>
946
947 * commands/i386/cpuid.c: New module.
948 * DISTLIST: Add it.
949 * conf/i386-efi.rmk: Enable cpuid.mod.
950 * conf/i386-pc.rmk: Likewise.
951
7262eca1 9522007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
953
954 * kern/disk.c (grub_disk_read): Check return value of
955 grub_realloc().
956
260ba823 9572007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
958
959 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
960 arrays.
961 * disk/raid.c (grub_raid_open): Likewise.
962
1ecb6cf2 9632007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
964
965 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
966 stack instead of on the heap.
967
968 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
969 before doing a read on it.
970
971 * configure.ac: Only use -fno-stack-protector for the target
972 environment.
973
21c8cbb1 9742007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
975
976 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
977 __attribute_ ((unused)) to mode_type argument.
978
979 * util/getroot.c (grub_guess_root_device): Fix #endif.
980
981 * kern/misc.c (memcmp): Fix prototype.
982
983 * include/grub/partition.h [GRUB_UTIL]
984 (grub_gpt_partition_map_init): Add prototype.
985 (grub_gpt_partition_map_fini): Likewise.
986
987 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
988 at the right place.
989
990 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
991 (grub_fat_read_data): Likewise.
992 (grub_fat_find_dir): Likewise.
993
994 * font/manager.c (find_glyph): Make table a const.
995 (grub_font_get_glyph): Remove bitmap from if statement.
996
849d55d3 9972007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
998
999 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
1000 code, first search for device in /dev/mapper, then in /dev.
1001 (grub_util_get_grub_dev): New function.
1002 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
1003 prototype.
1004 * util/grub-probe.c (probe): Remove check for RAID, call
1005 grub_util_get_grub_dev() instead of
1006 grub_util_biosdisk_get_grub_dev().
1007 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
1008 grub_util_biosdisk_get_grub_dev().
1009 * util/i386/pc/grub-setup.c (main): Likewise.
1010
8fff7c2f 10112007-05-16 Robert Millan <rmh@aybabtu.com>
1012
1013 * DISTLIST: Update for the latest changes.
1014 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
1015 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
1016 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
1017 grub/util/biosdisk.h.
1018 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
1019 grub/util/biosdisk.h.
1020
48e12b52 10212007-05-16 Robert Millan <rmh@aybabtu.com>
1022
1023 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
1024
46b9d128 10252007-05-16 Robert Millan <rmh@aybabtu.com>
1026
1027 * util/i386/efi/grub-install.in: New.
1028 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
1029 newly added grub-install.
1030 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
1031 include.
1032 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
1033 grub/util/biosdisk.h.
1034 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
1035 grub/util/biosdisk.h.
1036
2d1a40a9 10372007-05-16 Robert Millan <rmh@aybabtu.com>
1038
1039 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
1040 * include/grub/util/biosdisk.h: ... here.
1041 * util/i386/pc/biosdisk.c: Moved to ...
1042 * util/biosdisk.c: ... here.
1043 * util/i386/pc/getroot.c: Moved to ...
1044 * util/getroot.c: ... here.
1045 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
1046 * util/grub-mkdevicemap.c: ... here.
1047 * util/i386/pc/grub-probe.c: Moved to ...
1048 * util/grub-probe.c: ... here.
1049
9e26e3bc 10502007-05-15 Robert Millan <rmh@aybabtu.com>
1051
1052 * util/update-grub.in: Remove duplicated line in grub.cfg header
1053 message.
1054
57f96397 10552007-05-13 Robert Millan <rmh@aybabtu.com>
1056
1057 * util/update-grub.in: Fix a few assumptions about the devices holding
1058 /, /boot and /boot/grub being the same.
1059 * util/grub.d/00_header.in: Likewise.
1060 * util/grub.d/10_hurd.in: Likewise.
1061 * util/grub.d/10_linux.in: Likewise.
1062
1063 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
1064 patterns. Use that to define the `.old' suffix as older than `'.
1065
1066 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
1067
1068 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
1069 the grub.cfg header message.
1070
2e610d62 10712007-05-11 Robert Millan <rmh@aybabtu.com>
1072
1073 * util/update-grub.in: Create device.map if it doesn't already exist,
1074 before attempting to run grub-probe.
1075 Check for grub-probe and grub-mkdevicemap with the same code
1076 grub-install is using.
1077 Remove test mode.
1078
3f6a10ef 10792007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
1080
1081 * Makefile.in: Add the datarootdir autoconf variable.
1082
02e7b75e 10832007-05-09 Robert Millan <rmh@aybabtu.com>
1084
1085 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
1086 fail gracefuly if dev->disk->partition == NULL.
1087
75f396cc 10882007-05-07 Robert Millan <rmh@aybabtu.com>
1089
1090 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
1091 determine partition map module.
1092 * util/i386/pc/grub-install.in: Use this feature to decide which
1093 partition module to load, instead of hardcoding pc and gpt.
1094
da65cb36 10952007-05-07 Robert Millan <rmh@aybabtu.com>
1096
1097 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
1098 source directory differs from build directory.
1099
b57d6a91 11002007-05-05 Robert Millan <rmh@aybabtu.com>
1101
1102 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
1103 initialisation.
1104
509d00f1 11052007-05-05 Robert Millan <rmh@aybabtu.com>
1106
1107 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
1108
c48f23ef 11092007-05-05 Robert Millan <rmh@aybabtu.com>
1110
1111 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
1112 command-line arguments via ${GRUB_CMDLINE_LINUX}.
1113
20b97658 11142007-05-05 Robert Millan <rmh@aybabtu.com>
1115
1116 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
1117 (grub_probe_SOURCES): Likewise.
1118 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
1119 GPT and initialize dos_part and bsd_part accordingly.
1120 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
1121 install_bsd_part.
1122 (main): Activate gpt module for use during partition identification,
1123 and deactivate it afterwards.
1124 * util/i386/pc/grub-install.in: Add gpt module to core.img.
1125 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
1126 partition identification, and deactivate it afterwards.
1127
99123174 11282007-05-05 Robert Millan <rmh@aybabtu.com>
1129
1130 * term/i386/pc/console.c (grub_console_fini): Call
1131 grub_term_set_current() before grub_term_unregister().
1132
ebd97f6e 11332007-05-04 Robert Millan <rmh@aybabtu.com>
1134
1135 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
1136 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
1137 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
1138 and update-grub_DATA.
1139 * conf/common.rmk: Build and install update-grub components.
1140 * conf/common.mk: Regenerate.
1141 * util/update-grub.in: New. Core of update-grub.
1142 * util/grub.d/00_header.in: New. Generates grub.cfg header.
1143 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
1144 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
1145 * util/grub.d/README: New. Document grub.d directory layout.
1146
b06a264d 11472007-05-01 Robert Millan <rmh@aybabtu.com>
1148
1149 * util/grub-emu.c: Move initialization functions
1150 grub_util_biosdisk_init() and grub_init_all() before
1151 grub_util_biosdisk_get_grub_dev(), which relies on them.
1152
41f0050e 11532007-04-19 Robert Millan <rmh@aybabtu.com>
1154
1155 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
1156 it is used later.
1157
04582bb3 11582007-04-18 Jerone Young <jerone@gmail.com>
1159
1160 * kernel/elf.c: Add missing parenthesis for conditional statement
1161 stanza.
1162
08db4632 11632007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 1164
08db4632 1165 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
1166 continue on and look for device node with real device name.
1167
801b76be 11682007-04-10 Jerone Young <jerone@gmail.com>
1d543c3e 1169
1170 * configure.ac: Add argument for autoconf to use tranformation
1171 ability.
1172 * Makefile.in: Add autoconf package transformation code.
1173 * util/i386/pc/grub-install.in: Likewise.
1174 * util/powerpc/ieee1275/grub-install.in: Likewise.
1175
6795c4e1 11762007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
1177
1178 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
1179 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
1180 (EXT2_REVISION): Likewise.
1181 (EXT2_INODE_SIZE): Likewise.
1182 (struct grub_ext2_block_group): Added a missing member
1183 "used_dirs".
1184 (grub_ext2_read_inode): Divide by the inode size in a superblock
1185 instead of 128 to obtain INODES_PER_BLOCK.
1186 Use the macro EXT2_INODE_SIZE instead of directly using
1187 SBLOCK->INODE_SIZE.
1188
d70af616 11892007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
1190
1191 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
1192 superblock instead of the structure size to compute an
1193 offset. This fixes the problem that GRUB could not read a
1194 filesystem when inode size is different from 128-byte.
1195
3b801603 11962007-03-05 Marco Gerards <marco@gnu.org>
1197
1198 * normal/main.c (read_config_file): When "menu" is not set, create
1199 an initial context.
1200
4785bfe4 12012007-02-21 Hollis Blanchard <hollis@penguinppc.org>
1202
1203 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
1204 (HEAP_LIMIT): New macro.
1205 (grub_claim_heap): Claim memory up to `heaplimit'.
1206
a0cbb023 12072007-02-21 Hollis Blanchard <hollis@penguinppc.org>
1208
1209 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
1210 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
1211 (_start): Likewise.
1212 (grub_arch_modules_addr): Return address after `_end'.
1213 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
1214 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
1215 (add_segments): Calculate `_end' from phdr size and location.
1216 (ALIGN_UP): Moved to ...
1217 * include/grub/misc.h: here.
1218 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
1219 New macro.
1220 (GRUB_IEEE1275_MODULE_BASE): Removed.
1221
fd7d8eba 12222007-02-20 Hollis Blanchard <hollis@penguinppc.org>
1223
1224 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
1225 loop boundary.
1226
9b09e6fc 12272007-02-20 Hollis Blanchard <hollis@penguinppc.org>
1228
1229 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
1230 All users updated.
1231 (grub_elf64_load_hook_t): Likewise.
1232 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
1233 debug output.
1234
3ce27299 12352007-02-20 Hollis Blanchard <hollis@penguinppc.org>
1236
1237 * kern/mm.c: Update copyright.
1238 (grub_mm_debug): Correct syntax error.
1239 (grub_mm_dump_free): New function.
1240 (grub_debug_free): Call `grub_free'.
1241 * include/grub/mm.h: Update copyright.
1242 (grub_mm_dump_free): Add declaration.
1243
077d5fee 12442007-02-12 Hollis Blanchard <hollis@penguinppc.org>
1245
1246 * include/grub/ieee1275/ieee1275.h: Update copyright.
1247 * kern/powerpc/ieee1275/init.c: Likewise.
1248 * kern/powerpc/ieee1275/openfw.c: Likewise.
1249
1250 * loader/powerpc/ieee1275/linux.c: Likewise.
1251 * include/grub/elfload.h: Likewise.
1252 * kern/elf.c: Likewise.
1253 (grub_elf32_load): Pass `base' and `size' parameters. Update all
1254 callers.
1255 (grub_elf64_load): Likewise.
1256 (grub_elf32_load_segment): Move to a nested function.
1257 (grub_elf64_load_segment): Likewise.
1258
dc946850 12592007-02-12 Hollis Blanchard <hollis@penguinppc.org>
1260
1261 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
1262 prototype.
1263 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
1264 (grub_heap_len): Likewise.
1265 (HEAP_SIZE): New macro.
1266 (grub_claim_heap): New function.
1267 (grub_machine_init): Don't claim heap directly. Call
1268 `grub_claim_heap'.
1269 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
1270 (grub_available_iterate): New function.
1271
baa2a121 12722007-02-03 Thomas Schwinge <tschwinge@gnu.org>
1273
1274 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
1275 * configure.ac: Use it for testing the HOST and TARGET compilers.
1276
4fe9862e 12772006-12-13 Thomas Schwinge <tschwinge@gnu.org>
1278
1279 * Makefile.in (enable_grub_emu): New variable.
1280 * configure.ac (--enable-grub-emu): New option.
1281 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
1282 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
1283 * conf/i386-pc.rmk: Likewise.
1284 * conf/powerpc-ieee1275.rmk: Likewise.
1285 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
1286
a8aa5762 12872006-12-12 Marco Gerards <marco@gnu.org>
1288
1289 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
1290
1291 * kern/env.c (grub_env_unset): Don't free the member `value' when
1292 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
1293 pointer.
1294
1295 * normal/main.c (current_menu): Removed.
1296 (free_menu): Unset the `menu' environment variable.
1297 (grub_normal_menu_addentry): Make use of the environment variable
1298 `menu', instead of using the global `current_menu'. Allocate
1299 memory for the sourcecode of this entry.
1300 (read_config_file): New argument `nested', changed all callers.
1301 Only in the case of a new context, initialize a new menu. Set the
1302 `menu' environment variable.
1303 (grub_normal_execute): Don't set and unset the environment
1304 variable `menu' here anymore. Only free the menu when leaving the
1305 context.
1306
1307 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
1308 leak.
1309
957b3a3e 13102006-12-11 Marco Gerards <marco@gnu.org>
1311
1312 * normal/menu_entry.c (run): Fix off by one bug so the last line
1313 is executed. Move the loader check to outside the loop.
1314
ef875714 13152006-12-08 Hollis Blanchard <hollis@penguinppc.org>
1316
1317 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
1318
4e739985 13192006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
1320
1321 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
1322 the number of sectors. Reported by Andrey Shuvikov
1323 <mr_hyro@yahoo.com>.
1324
790707f2 13252006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
1326
1327 * kern/disk.c (grub_disk_read): When there is a read error, always
1328 try to read only the necessary data.
1329
1330 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
1331 disk/raid.c.
1332 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
1333 prototype.
1334 [GRUB_UTIL] (grub_raid_fini): Likewise.
1335 [GRUB_UTIL] (grub_lvm_init): Likewise.
1336 [GRUB_UTIL] (grub_lvm_fini): Likewise.
1337 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
1338 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
1339 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
1340 and grub_raid_fini().
1341
03e58196 13422006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
1343
1344 * include/grub/types.h (__unused): Rename to UNUSED.
1345 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
1346 (grub_elf64_size): Likewise.
1347
ae4f23bf 13482006-11-03 Hollis Blanchard <hollis@penguinppc.org>
1349
1350 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
1351 grub_error_push and grub_error_pop in the error-handling path.
1352 (grub_elf32_load_segment): Only call grub_file_read with non-zero
1353 length.
1354
2166cc83 13552006-11-03 Hollis Blanchard <hollis@penguinppc.org>
1356
1357 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
1358 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1359 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1360 (kernel_elf_SOURCES): Likewise.
1361 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
1362 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
1363 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
1364 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
1365 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
1366 (elf_mod_SOURCES): New variable.
1367 (elf_mod_CFLAGS): Likewise.
1368 (elf_mod_LDFLAGS): Likewise.
1369 * include/grub/types.h (__unused): New macro.
1370 * include/grub/elfload.h: New file.
1371 * kern/elf.c: Likewise.
1372 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
1373 (ELF32_LOADMASK): New macro.
1374 (ELF64_LOADMASK): Likewise.
1375 (vmlinux): Removed.
1376 (grub_linux_load32): New function.
1377 (grub_linux_load64): Likewise.
1378 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
1379 Use grub_elf_t instead of grub_file_t.
1380
a09d5aa5 13812006-11-02 Hollis Blanchard <hollis@penguinppc.org>
1382
1383 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
1384 `catch_result' to struct set_color_args.
1385
d976fc51 13862006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
1387
1388 * normal/menu.c: Include grub/script.h.
1389 * normal/menu_entry.c: Likewise.
1390 * include/grub/normal.h: Do not include grub/script.h.
1391
67507549 13922006-10-27 Hollis Blanchard <hollis@penguinppc.org>
1393
1394 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
1395
69203a99 13962006-10-27 Hollis Blanchard <hollis@penguinppc.org>
1397
1398 * kern/disk.c (grub_disk_open): Print debug messages when opening a
1399 disk.
1400 (grub_disk_close): Print debug messages when closing a disk.
1401 (grub_disk_read): Print debug messages when disk read fails.
1402 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
1403 filesystem type.
1404 * kern/partition.c: Include misc.h.
1405 (grub_partition_iterate): Print debug messages when detecting
1406 partition type.
1407
e2b8278c 14082006-10-27 Hollis Blanchard <hollis@penguinppc.org>
1409
1410 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
1411 is negative.
1412 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
1413
97b2f2ff 14142006-10-26 Hollis Blanchard <hollis@penguinppc.org>
1415
1416 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
1417 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
1418
6555d655 14192006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
1420
1421 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
1422 instead of sizeof(lv). Patch by Michael Guntsche.
1423
4d42b77f 14242006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
1425
1426 * disk/lvm.c: Rename VGS to VG_LIST.
1427 (grub_lvm_iterate): Change VGS->LV to VG-LV.
1428 (grub_lvm_open): Likewise.
1429 Thanks to Michael Guntsche for finding this bug.
1430
5d74d927 14312006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
1432
1433 * configure.ac (AC_INIT): Bumped to 1.95.
1434
a1bb27e4 14352006-10-14 Robert Millan <rmh@aybabtu.com>
1436
1437 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
1438 with "/dev/.static/dev/md".
1439
e0994b8b 14402006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
1441
1442 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
1443 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
1444 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
1445 DRIVE_NAME are always freed.
1446
1447 * util/i386/pc/biosdisk.c (make_device_name): Add one into
1448 DOS_PART, as a DOS partition is counted from one instead of zero
1449 now. Reported by Robert Millan.
1450
ddd5cee9 14512006-10-14 Robert Millan <rmh@aybabtu.com>
1452
1453 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
1454 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
1455 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
1456 string returned by grub_guess_root_device.
1457 * util/i386/pc/grub-setup.c: Likewise.
1458 * util/i386/pc/grub-probefs.c: Likewise.
1459
1460 * util/i386/pc/grub-probefs.c: Rename to ...
1461 * util/i386/pc/grub-probe.c: ... this.
1462 * DISTLIST: Remove grub-probefs, add grub-probe.
1463 * conf/i386-efi.rmk: Likewise.
1464 * conf/i386-pc.rmk: Likewise.
1465 * util/i386/pc/grub-install.in: Likewise.
1466
1467 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
1468 choose which information we want to print.
1469
2b002173 14702006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
1471
1472 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
1473 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
1474 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
1475 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
1476 video/readers/tga.c and video/i386/pc/vbeutil.c.
1477
14782006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
1479
1480 Added support for RAID and LVM.
1481
1482 * disk/lvm.c: New file.
1483 * disk/raid.c: Likewise.
1484 * include/grub/lvm.h: Likewise.
1485 * include/grub/raid.h: Likewise.
1486 * include/grub/util/lvm.h: Likewise.
1487 * include/grub/util/raid.h: Likewise.
1488 * util/lvm.c: Likewise.
1489 * util/raid.c: Likewise.
1490
1491 * include/grub/disk.h (grub_disk_dev_id): Add
1492 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
1493 (grub_disk_get_size): New prototype.
1494 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
1495 returns a partition.
1496 (grub_disk_get_size): New function.
1497
1498 * kern/i386/pc/init.c (make_install_device): Copy the prefix
1499 verbatim if grub_install_dos_part is -2.
1500
1501 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
1502 and LVM devices.
1503
1504 * util/i386/pc/grub-setup.c (setup): New argument
1505 MUST_EMBED. Force embedding of GRUB when the argument is
1506 true. Close FILE before returning.
1507 (main): Add support for RAID and LVM.
1508
1509 * conf/common.rmk: Add RAID and LVM modules.
1510 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
1511 util/lvm.c.
1512 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
1513
1514 * kern/misc.c (grub_strstr): New function.
1515 * include/grub/misc.h (grub_strstr): New prototype.
1516
050548d0 15172006-10-10 Tristan Gingold <tristan.gingold@bull.net>
1518
1519 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
1520
da849d2d 15212006-10-05 Tristan Gingold <tristan.gingold@bull.net>
1522
1523 * kern/misc.c (grub_strtoull): Guess the base only if not
1524 specified.
1525
97b2f2ff 15262006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 1527
1528 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
1529 PowerMac support.
1530
97b2f2ff 15312006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 1532
1533 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
1534
1535 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
1536 Remove `flags' argument. All callers changed.
1537 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
1538 (IEEE1275_IHANDLE_INVALID): New variable.
1539 (IEEE1275_CELL_INVALID): New variable.
1540 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1541 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
1542 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
1543 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
1544 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
1545 codes from Open Firmware. All callers updated.
1546 (grub_ieee1275_next_property): Directly return Open Firmware return
1547 code.
1548 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
1549 Standardize error checking from `grub_ieee1275_get_property'.
1550 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
1551 `devalias' to `aliases'. Correct comments. Consolidate error paths.
1552
97b2f2ff 15532006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 1554
1555 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
1556 `instance_to_package_args' to `instance_to_path_args'.
1557
1558 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
1559 `grub_ieee1275_chosen'.
1560
1561 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
1562 `grub_ieee1275_interpret'.
1563
97b2f2ff 15642006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 1565
1566 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
1567
97b2f2ff 15682006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 1569
1570 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
1571 (__cmpdi): Likewise.
1572
1573 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
1574 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
1575 `grub_ssize_t'.
1576
02bb8acc 1577 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 1578
1579 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
1580 to type `grub_ssize_t'.
1581 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
1582
7f9a8531 15832006-09-22 Marco Gerards <marco@gnu.org>
1584
1585 * normal/script.c (grub_script_create_cmdmenu): Skip leading
1586 newlines.
1587
b5ef1102 15882006-09-22 Marco Gerards <marco@gnu.org>
1589
1590 * commands/echo.c: New file.
1591
1592 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
1593
1594 * conf/common.rmk (echo_mod_SOURCES): New variable.
1595 (echo_mod_CFLAGS): Likewise.
1596 (echo_mod_LDFLAGS): Likewise.
1597
2cff3677 15982006-09-22 Marco Gerards <marco@gnu.org>
1599
1600 * normal/main.c (get_line): Malloc memory instead of using
1601 preallocated memory. Removed the arguments `cmdline' and
1602 `max_len'. Updated all callers.
1603
6ba4688b 16042006-09-22 Marco Gerards <marco@gnu.org>
1605
1606 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
1607 (normal_mod_DEPENDENCIES): Likewise.
1608
1609 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
1610 (normal_mod_DEPENDENCIES): Likewise.
1611
1612 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
1613
e02ac02c 16142006-09-22 Johan Rydberg <jrydberg@gnu.org>
1615
1616 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
1617 programs.
1618 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
1619 (normal_mod_DEPENDENCIES): Likewise.
1620 * conf/i386-pc.mk: Regenerate.
1621 * conf/i386-efi.mk: Likewise
1622 * conf/common.mk: Likewise.
1623 * conf/powerpc-ieee1275.mk: Likewise.
1624 * conf/sparc64-ieee1275.mk: Likewise.
1625
8d252e44 16262006-09-22 Robert Millan <rmh@aybabtu.com>
1627
1628 Sync with i386 version.
1629 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
1630 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
1631
209bf7ac 16322006-09-21 Robert Millan <rmh@aybabtu.com>
1633
1634 Import from GRUB Legacy (lib/device.c):
1635 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
1636 (init_device_map) [__linux__]: Add support for I2O devices.
1637
6b146090 16382006-09-14 Marco Gerards <marco@gnu.org>
1639
1640 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
1641 `-melf_i386'.
1642
e38600a8 16432006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 1644
1645 * util/i386/pc/grub-install.in: Skip menu.lst when removing
1646 /boot/grub/*.lst.
78fa1790 1647
2952da5d 1648 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 1649
2952da5d 1650 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
1651 before adding it to device.map.
1652
01b82a64 16532006-08-15 Johan Rydberg <jrydberg@gnu.org>
1654
1655 * genmk.rb: Let GCC generate dependenceies the first time it
1656 compiles a file; using the -MD option.
1657 * conf/common.mk: Regenerate.
1658 * conf/i386-pc.mk: Likewise.
1659 * conf/i386-efi.mk: Likewise.
1660 * conf/powerpc-ieee1275.mk: Likewise.
1661 * conf/sparc64-ieee1275.mk: Likewise.
1662
1064790d 16632006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
1664
1665 Move the prototypes of grub_setjmp and grub_longjmp to
1666 cpu/setjmp.h, so that each architecture may specify different
1667 attributes.
1668
1669 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
1670 (grub_longjmp): Likewise.
1671 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
1672 (grub_longjmp): Likewise.
1673 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
1674 (grub_longjmp): Likewise.
1675
1676 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
1677 [!GRUB_UTIL] (grub_longjmp): Removed.
1678
29dda3ed 16792006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
1680
1681 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
1682 "color!" method does not return any value.
1683
ad2a06ed 16842006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
1685
1686 * include/grub/bitmap.h: New file.
1687
1688 * include/grub/i386/pc/vbeutil.h: Likewise.
1689
1690 * video/bitmap.c: Likewise.
1691
1692 * video/readers/tga.c: Likewise.
1693
1694 * video/i386/pc/vbeutil.c: Likewise.
1695
1696 * commands/videotest.c: Code cleanup and updated to reflect to new
1697 video API.
1698
1699 * term/gfxterm.c: Likewise.
1700
1701 * video/video.c: Likewise.
1702
1703 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
1704 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
1705 (bitmap_mod_SOURCES): New entry.
1706 (bitmap_mod_CFLAGS): Likewise.
1707 (bitmap_mod_LDFLAGS): Likewise.
1708 (tga_mod_SOURCES): Likewise.
1709 (tga_mod_CFLAGS): Likewise.
1710 (tga_mod_LDFLAGS): Likewise.
1711
1712 * include/grub/video.h (grub_video_blit_operators): New enum type.
1713 (grub_video_render_target): Changed as forward declaration and moved
1714 actual definition to be video driver specific.
1715 (grub_video_adapter.blit_bitmap): Added blitting operator.
1716 (grub_video_adapter.blit_render_target): Likewise.
1717 (grub_video_blit_bitmap): Likewise.
1718 (grub_video_blit_render_target): Likewise.
1719
1720 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
1721 driver specific render target definition.
1722 (grub_video_vbe_map_rgba): Added driver internal helper.
1723 (grub_video_vbe_unmap_color): Updated to use
1724 grub_video_i386_vbeblit_info.
1725 (grub_video_vbe_get_video_ptr): Likewise.
1726
1727 * include/grub/i386/pc/vbeblit.h
1728 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
1729 grub_video_i386_vbeblit_info.
1730 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1731 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1732 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1733 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1734 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1735 (grub_video_i386_vbeblit_index_index): Likewise.
1736 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
1737 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1738 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1739 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
1740 operator.
1741 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
1742 operator.
1743
1744 * video/i386/pc/vbeblit.c: Updated to reflect changes on
1745 include/grub/i386/pc/vbeblit.h.
1746
1747 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
1748 Updated to use grub_video_i386_vbeblit_info.
1749 (grub_video_i386_vbefill_R8G8B8): Likewise.
1750 (grub_video_i386_vbefill_index): Likewise.
1751 (grub_video_i386_vbefill): Added generic filler.
1752
1753 * video/i386/pc/vbefill.c: Updated to reflect changes on
1754 include/grub/i386/pc/vbefill.h.
1755
1756 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
1757 grub_video_i386_vbeblit_info.
1758 (grub_video_vbe_unmap_color): Likewise.
1759 (grub_video_vbe_blit_glyph): Likewise.
1760 (grub_video_vbe_scroll): Likewise.
1761 (grub_video_vbe_draw_pixel): Removed function.
1762 (grub_video_vbe_get_pixel): Likewise.
1763 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
1764 updated code to use it.
1765 (common_blitter): Added common blitter for render target and bitmap.
1766 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
1767 (grub_video_vbe_blit_render_target): Likewise.
1768
bc8c036d 17692006-07-30 Johan Rydberg <jrydberg@gnu.org>
1770
1771 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
1772 is in text mode if there is no console control protocol instance
1773 available.
1774
684a8eff 17752006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
1776
1777 * include/grub/video.h: Code cleanup.
1778
1779 * include/grub/i386/pc/vbe.h: Likewise.
1780
1781 * video/i386/pc/vbe.c: Likewise.
1782
1783 * video/i386/pc/vbeblit.c: Likewise.
1784
1785 * video/i386/pc/vbefill.c: Likewise.
1786
1787 * video/video.c: Likewise. Also added more comments.
1788
5915059b 17892006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
1790
1791 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
1792 (struct grub_biosdisk_dap): Likewise.
1793
1794 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
1795 linkage settings for all functions.
1796
90ce5d56 17972006-07-12 Marco Gerards <marco@gnu.org>
1798
1799 * configure.ac (--enable-mm-debug): Fix typo.
1800
1801 * genkernsyms.sh.in: Use proper quoting for `CC'.
1802
43e7f879 18032006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
1804
1805 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
1806 (normal_mod_ASFLAGS): Remove "-m32".
1807
4889bdec 18082006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
1809
1810 * util/misc.c: Include config.h.
1811 [!HAVE_MEMALIGN]: Do not include malloc.h.
1812 (grub_memalign): Use posix_memalign, if present. Then, use
1813 memalign, if present. Otherwise, emit an error.
1814
1815 * util/grub-emu.c: Do not include malloc.h.
1816
1817 * include/grub/util/misc.h: Include unistd.h. This is required for
1818 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
1819 D. Eades III <hde@foobar-qux.org>.
1820
1821 * configure.ac (AC_GNU_SOURCE): Added.
1822 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
1823 type.
1824
fd39d4da 18252006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
1826
1827 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
1828 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
1829
b786f3b5 18302006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
1831
1832 * include/grub/types.h (grub_host_addr_t): Rename to
1833 grub_target_addr_t.
1834 (grub_host_off_t): Rename to grub_target_off_t.
1835 (grub_host_size_t): Rename to grub_target_size_t.
1836 (grub_host_ssize_t): Rename to grub_target_ssize_t.
1837 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
1838
1839 * include/grub/kernel.h (struct grub_module_header): Change type
1840 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
1841 (grub_module_info): Likewise.
1842
051988bb 18432006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
1844
1845 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
1846 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
1847 Velazquez <jesus.velazquez@gmail.com>.
1848
deae281b 18492006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
1850
1851 Count partitions from 1 instead of 0 in the string representation
1852 of partitions. Still use 0-based internally.
1853
1854 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
1855 (sun_partition_map_iterate): Use grub_partition_t instead of
1856 struct grub_partition *. Cast DESC->START_CYLINDER to
1857 grub_uint64_t after converting the endian.
1858 (sun_partition_map_probe): Subtract 1 for PARTNUM.
1859 (sun_partition_map_get_name): Add 1 to P->INDEX.
1860
1861 * partmap/pc.c (grub_partition_parse): Subtract 1 for
1862 PCDATA->DOS_PART.
1863 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
1864
1865 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
1866 zero instead of one.
1867 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
1868 (gpt_partition_map_get_name): Add 1 into P->INDEX.
1869
1870 * partmap/apple.c (apple_partition_map_iterate): Change the type
1871 of POS to unsigned.
1872 (apple_partition_map_probe): Subtract 1 for PARTNUM.
1873 (apple_partition_map_get_name): Add 1 into P->INDEX.
1874
1875 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
1876 of POS to unsigned.
1877 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
1878 calculate the offset of a partition.
1879 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
1880 (amiga_partition_map_get_name): Add 1 into P->INDEX.
1881
1882 * partmap/acorn.c (acorn_partition_map_find): Change the type of
1883 SECTOR to grub_disk_addr_t.
1884 (acorn_partition_map_iterate): Likewise.
1885 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
1886 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
1887 top.
1888 (acorn_partition_map_get_name): Add 1 into P->INDEX.
1889
1890 * kern/i386/pc/init.c (make_install_device): Add 1 into
1891 GRUB_INSTALL_DOS_PART.
1892
1893 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
1894 conditional.
1895
524a1e6a 18962006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
1897
1898 Clean up the code to support 64-bit addressing in disks and
1899 files. This change is not enough for filesystems yet.
1900
1901 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
1902 type of "start" to grub_uint64_t.
1903 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
1904 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
1905 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
1906 convert addresses.
1907
1908 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
1909 to grub_disk_addr_t.
1910
1911 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
1912 string.
1913
1914 * partmap/pc.c (pc_partition_map_iterate): Likewise.
1915
1916 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
1917 to char *.
1918
1919 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
1920
1921 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
1922
1923 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
1924
1925 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
1926 to grub_off_t, to detect an error from grub_file_seek.
1927 (grub_multiboot_load_elf32): Likewise.
1928
1929 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
1930 maximum unsigned long value when an overflow is detected.
1931 (grub_strtoull): New function.
1932 (grub_divmod64): Likewise.
1933 (grub_lltoa): use grub_divmod64.
1934
1935 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
1936 grub_disk_addr_t.
1937 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
1938 the pointer to next character. Use grub_strtoull instead of
1939 grub_strtoul.
1940 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
1941 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
1942 respectively.
1943
1944 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
1945 return value is signed.
1946 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
1947 test if OFFSET is less than zero, as OFFSET is unsigned now.
1948
1949 * kern/disk.c (struct grub_disk_cache): Change the type of
1950 "sector" to grub_disk_addr_t.
1951 (grub_disk_cache_get_index): Change the type of SECTOR to
1952 grub_disk_addr_t. Calculate the hash with SECTOR casted to
1953 unsigned after shifting.
1954 (grub_disk_cache_invalidate): Change the type of SECTOR to
1955 grub_disk_addr_t.
1956 (grub_disk_cache_unlock): Likewise.
1957 (grub_disk_cache_store): Likewise.
1958 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
1959 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
1960 grub_disk_addr_t and grub_uint64_t, respectively.
1961 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
1962 body, as the value of OFFSET is tweaked by
1963 grub_disk_check_range. Change the types of START_SECTOR, LEN and
1964 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
1965 respectively.
1966 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
1967 body, as the value of OFFSET is tweaked by
1968 grub_disk_check_range. Change the types of LEN and N to
1969 grub_size_t.
1970
1971 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
1972 and "saved_offset" to grub_off_t.
1973 (test_header): Cast BUF to char *.
1974 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
1975 to char *.
1976 (grub_gzio_read): Change the types of OFFSET and SIZE to
1977 grub_off_t and grub_size_t, respectively.
1978
1979 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
1980 Removed.
1981 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
1982 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
1983 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
1984 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
1985 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
1986
1987 * include/grub/types.h (grub_off_t): Unconditionally set to
1988 grub_uint64_t.
1989 (grub_disk_addr_t): Changed to grub_uint64_t.
1990
1991 * include/grub/partition.h (struct grub_partition): Change the
1992 types of "start", "len" and "offset" to grub_disk_addr_t,
1993 grub_uint64_t and grub_disk_addr_t, respectively.
1994 (grub_partition_get_start): Return grub_disk_addr_t.
1995 (grub_partition_get_len): Return grub_uint64_t.
1996
1997 * include/grub/misc.h (grub_strtoull): New prototype.
1998 (grub_divmod64): Likewise.
1999
2000 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
2001 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
2002 grub_off_t, respectively.
2003 All callers and references changed.
2004
2005 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
2006 grub_size_t in "read".
2007 All callers and references changed.
2008
2009 * include/grub/file.h (struct grub_file): Change the types of
2010 "offset" and "size" to grub_off_t and grub_off_t,
2011 respectively. Change the type of SECTOR to grub_disk_addr_t in
2012 "read_hook".
2013 (grub_file_read): Change the type of LEN to grub_size_t.
2014 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
2015 grub_off_t.
2016 (grub_file_size): Return grub_off_t.
2017 (grub_file_tell): Likewise.
2018 All callers and references changed.
2019
2020 * include/grub/disk.h (struct grub_disk_dev): Change the types of
2021 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
2022 "write".
2023 (struct grub_disk): Change the type of "total_sectors" to
2024 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
2025 "read_hook".
2026 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
2027 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
2028 (grub_disk_write): Likewise.
2029 All callers and references changed.
2030
2031 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
2032 char * for grub_strncmp to silence gcc.
2033 (grub_iso9660_mount): Likewise.
2034 (grub_iso9660_mount): Likewise.
2035 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
2036 return statement.
2037 (grub_iso9660_iterate_dir): Likewise.
2038 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
2039
2040 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
2041 LEN to grub_disk_addr_t and grub_size_t, respectively.
2042
2043 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
2044
2045 * fs/jfs.c (grub_jfs_read_file): Likewise.
2046
2047 * fs/minix.c (grub_jfs_read_file): Likewise.
2048
2049 * fs/sfs.c (grub_jfs_read_file): Likewise.
2050
2051 * fs/ufs.c (grub_jfs_read_file): Likewise.
2052
2053 * fs/xfs.c (grub_jfs_read_file): Likewise.
2054
2055 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
2056 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
2057 respectively.
2058
2059 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
2060 BLKNR to -1 instead of returning GRUB_ERRNO.
2061 (grub_ext2_read_file): Change the types of SECTOR and
2062 LEN to grub_disk_addr_t and grub_size_t, respectively.
2063
2064 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
2065 LEN to grub_disk_addr_t and grub_size_t, respectively.
2066
2067 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
2068 grub_file_read.
2069
2070 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
2071 string. Do not cast SECTOR explicitly.
2072
2073 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
2074 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
2075 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
2076 grub_disk_addr_t and grub_size_t, respectively. If the sector is
2077 over 2TB and LBA mode is not supported, raise an error.
2078 (get_safe_sectors): New function.
2079 (grub_biosdisk_read): Use get_safe_sectors.
2080 (grub_biosdisk_write): Likewise.
2081
2082 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
2083 (grub_efidisk_write): Likewise.
2084
2085 * disk/loopback.c (delete_loopback): Cosmetic changes.
2086 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
2087 correctly.
2088 (grub_loopback_open): Likewise.
2089 (grub_loopback_read): Likewise. Also, change the type of POS to
2090 grub_off_t, and fix the usage of grub_memset.
2091
2092 * commands/i386/pc/play.c: Include grub/machine/time.h.
2093
2094 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
2095 print FILE->SIZE.
2096
2097 * commands/configfile.c: Include grub/env.h.
2098
2099 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
2100 GRUB_ERRNO directly instead. Change the type of POS to
2101 grub_off_t. Follow the coding standard.
2102
2103 * commands/blocklist.c: Include grub/partition.h.
2104 (grub_cmd_blocklist): Return an error if the underlying device is
2105 not a disk. Take the starting sector of a partition into account,
2106 if a partition is used.
2107
2108 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
2109 a length field.
2110 (lba_mode): Support 64-bit addresses.
2111 (chs_mode): Likewise.
2112 (copy_buffer): Adapted to the new offsets of a length field and a
2113 segment field.
2114 (blocklist_default_start): Allocate 64-bit space.
2115
2116 * boot/i386/pc/boot.S (force_lba): Removed.
2117 (boot_drive): Moved to under KERNEL_SECTOR.
2118 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
2119 space.
2120 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
2121 is useless.
2122 (lba_mode): Refactored to support a 64-bit address. More size
2123 optimization.
2124 (setup_sectors): Likewise.
2125
53af98ad 21262006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
2127
2128 * DISTLIST: Added include/grub/i386/linux.h. Removed
2129 include/grub/i386/pc/linux.h
2130
2131 * configure.ac (AC_INIT): Bumped to 1.94.
2132
2133 * config.guess: Updated from gnulib.
2134 * config.sub: Likewise.
2135 * install-sh: Likewise.
2136 * mkinstalldirs: Likewise.
2137
b4c1940a 21382006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
2139
2140 * conf/common.rmk (grub_modules_init.lst): Depended on
2141 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
2142 MODSRCFILES.
2143
2144 * genmk.rb (PModule::rule): Reverted the previous change.
2145
cfca1cfd 21462006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
2147
2148 * conf/common.rmk (grub_modules_init.lst): Depends on
2149 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
2150 that the target does not exist before producing.
2151 (grub_modules_init.h): Remove the target before generating.
2152 (grub_emu_init.c): Likewise.
2153
2154 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
2155
aa6d7826 21562006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
2157
2158 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
2159 for the target-specific tests. Make sure that we also have the
2160 up-to-date target variables for those tests.
2161
26c607b9 21622006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
2163
2164 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
2165 (PModule::rule): Likewise.
2166
0162321a 21672006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
2168
2169 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
2170 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
2171 target-specific flags should be prefixed.
2172 (PModule::rule): Likewise.
2173
6c826348 21742006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
2175
2176 * configure.ac (CMP): Check if cmp is available explicitly.
2177
b977bf01 21782006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
2179
2180 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
2181 (target_cpu): New variable.
2182 (pkglibdir): Use target_cpu instead of host_cpu.
2183
2184 * util/i386/pc/grub-install.in (host_cpu): Removed.
2185 (target_cpu): New variable.
2186 (pkglibdir): Use target_cpu instead of host_cpu.
2187
2188 * util/genmoddep.c: Removed.
2189
2190 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
2191 instead of GRUB_HOST_SIZEOF_VOID_P.
2192 * kern/dl.c: Likewise.
2193
2194 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
2195 ...
2196 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
2197 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
2198 (GRUB_TARGET_SIZEOF_LONG): ... this.
2199 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
2200 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
2201 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
2202 to ...
2203 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
2204 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
2205 (GRUB_TARGET_SIZEOF_LONG): ... this.
2206 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
2207 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
2208 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
2209 to ...
2210 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
2211 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
2212 (GRUB_TARGET_SIZEOF_LONG): ... this.
2213 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
2214 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
2215
2216 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
2217 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
2218 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
2219 instead of GRUB_HOST_SIZEOF_LONG.
2220 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
2221 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
2222 GRUB_CPU_WORDS_BIGENDIAN.
2223 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
2224 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
2225 grub_host_ssize_t.
2226
2227 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
2228 (genmoddep_SOURCES): Likewise.
2229 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
2230 (genmoddep_SOURCES): Likewise.
2231 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
2232 (genmoddep_SOURCES): Likewise.
2233 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
2234 Likewise.
2235 (genmoddep_SOURCES): Likewise.
2236
2237 * genmoddep.awk: New file.
2238
2239 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
2240 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
2241 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
2242 (PModule::rule): Likewise.
2243 (Program::rule): Likewise.
2244 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
2245 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
2246 respectively.
2247
2248 * configure.ac: Rewritten intensively to use host and target
2249 instead of build and host, respectively.
2250
2251 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
2252 (host_cpu): Removed.
2253 (target_cpu): New variable.
2254 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
2255 (BUILD_CC): Removed.
2256 (BUILD_CFLAGS): Likewise.
2257 (BUILD_CPPFLAGS): Likewise.
2258 (TARGET_CC): New variable.
2259 (TARGET_CFLAGS): Likewise.
2260 (TARGET_CPPFLAGS): Likewise.
2261 (TARGET_LDFLAGS): Likewise.
2262 (AWK): Likewise.
2263 (include): Use target_cpu instead of host_cpu.
2264 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
2265
2266 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2267
f09771a1 22682006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
2269
2270 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
2271 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
2272 field 'false' to 'exec_on_false'.
2273 (grub_script_create_cmdif): Renamed argument names to reflect above
2274 changes.
2275
2276 * normal/execute.c (grub_script_execute_cmdif): Likewise.
2277
2278 * normal/script.c (grub_script_create_cmdif): Likewise.
2279
118f4fb3 22802006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
2281
2282 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
2283 top.
2284 (grub_hfsplus_btree_recptr): Likewise.
2285 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
2286 FILEBLOCK both to pass a block number and store next block
2287 number.
2288 (grub_hfsplus_read_block): Rewritten heavily to support an extent
2289 overflow file correctly. Specify errors appropriately, because
2290 fshelp expects that GRUB_ERRNO is set when fails. Reuse
2291 grub_hfsplus_btree_recptr to get the pointer to a found key.
2292 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
2293 is found.
2294
2295 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
2296 linux.mod.
2297 (_linux_mod_SOURCES): New variable.
2298 (_linux_mod_CFLAGS): Likewise.
2299 (_linux_mod_LDFLAGS): Likewise.
2300 (linux_mod_SOURCES): Likewise.
2301 (linux_mod_CFLAGS): Likewise.
2302 (linux_mod_LDFLAGS): Likewise.
2303
2304 * DISTLIST: Added loader/i386/efi/linux.c,
2305 loader/i386/efi/linux_normal.c and
2306 include/grub/i386/efi/loader.h.
2307
2308 * loader/i386/efi/linux.c: New file.
2309 * loader/i386/efi/linux_normal.c: Likewise.
2310 * include/grub/i386/efi/loader.h: Likewise.
2311
89a7d726 23122006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
2313
2314 * commands/blocklist.c: New file.
2315
2316 * DISTLIST: Added commands/blocklist.c.
2317
2318 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 2319 color for the background, and a darker color for the foreground.
89a7d726 2320 (grub_console_checkkey): Return READ_KEY.
2321 (grub_console_cls): Set the background to
2322 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
2323
2324 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
2325
2326 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
2327 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
2328
2329 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
2330 prototype.
2331
2332 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
2333 BG. The spec is wrong again.
2334
2335 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
2336 prototype.
2337 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
2338
2339 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
2340 commands/blocklist.c.
2341 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2342
2343 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
2344 (blocklist_mod_SOURCES): New variable.
2345 (blocklist_mod_CFLAGS): Likewise.
2346 (blocklist_mod_LDFLAGS): Likewise.
2347
75c8f258 23482006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
2349
2350 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
2351 duplication.
2352 (lba_mode): Use %eax more intensively to reduce the code size.
2353
da2eb181 23542006-05-20 Marco Gerards <marco@gnu.org>
2355
2356 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
2357
2358 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
2359 for `menuentry'.
2360 (script): Accept leading newlines.
2361 (newlines): New rule to describe 0 or more newlines.
2362 (commands): Accept `command' with trailing newline. Fixed the
2363 order in which arguments were passed to `grub_script_add_cmd'.
2364 Accept commands separated by newlines.
2365 (function): Changed to accept newlines.
2366 (menuentry) Rewritten.
2367
2368 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
2369 front of the list, instead of to the end.
2370
577b4050 23712006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
2372
2373 * util/i386/pc/grub-install.in (bindir): New variable.
2374 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
2375 Shaver <lbgwjl@gmail.com>.
2376
0d6e1189 23772006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
2378
2379 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
2380 grub/machine/linux.h
2381 * loader/i386/pc/linux.c: Likewise.
2382
2383 * include/grub/i386/pc/linux.h: Moved to ...
2384 * include/grub/i386/linux.h: ... here.
2385
2386 * include/grub/i386/linux.h (struct linux_kernel_params): New
2387 struct.
2388
31b86e9f 23892006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
2390
2391 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
2392 checking.
2393 (grub_video_vbe_blit_glyph): Likewise.
2394 (grub_video_vbe_blit_bitmap): Likewise.
2395 (grub_video_vbe_blit_render_target): Likewise.
2396
83b984de 23972006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
2398
2399 * configure.ac (--with-platform): Properly quote the square
2400 brackets.
2401
5f0413bd 24022006-05-08 Marco Gerards <marco@gnu.org>
2403
2404 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
2405 this...
2406 (kernel_elf_HEADERS): ...to this. Updated all users.
2407 (grubof_symlist.c): Renamed from this...
2408 (kernel_elf_symlist.c): ...to this. Updated all users.
2409 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
2410 (grubof_SOURCES): Renamed from this...
2411 (kernel_elf_SOURCES): ...to this.
2412 (grubof_HEADERS): Renamed from this...
2413 (kernel_elf_HEADERS): ...to this.
2414 (grubof_CFLAGS): Renamed from this...
2415 (kernel_elf_CFLAGS): ...to this.
2416 (grubof_ASFLAGS): Renamed from this...
2417 (kernel_elf_ASFLAGS): ...to this.
2418 (grubof_LDFLAGS): Renamed from this...
2419 (kernel_elf_LDFLAGS): ...to this.
2420
2421 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
2422 this...
2423 (kernel_elf_HEADERS): ...to this. Updated all users.
2424 (grubof_symlist.c): Renamed from this...
2425 (kernel_elf_symlist.c): ...to this. Updated all users.
2426 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
2427 (grubof_SOURCES): Renamed from this...
2428 (kernel_elf_SOURCES): ...to this.
2429 (grubof_HEADERS): Renamed from this...
2430 (kernel_elf_HEADERS): ...to this.
2431 (grubof_CFLAGS): Renamed from this...
2432 (kernel_elf_CFLAGS): ...to this.
2433 (grubof_ASFLAGS): Renamed from this...
2434 (kernel_elf_ASFLAGS): ...to this.
2435 (grubof_LDFLAGS): Renamed from this...
2436 (kernel_elf_LDFLAGS): ...to this.
2437
2438 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
2439 `kernel.elf' instead of `grubof'.
2440
05568c2e 24412006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
2442
2443 Add --with-platform to configure. Use pkglibdir instead of
2444 pkgdatadir. This is reported by Roger Leigh.
2445
2446 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
2447 (host_vendor): Likewise.
2448 (host_os): Likewise.
2449 (pkgdatadir): Likewise.
2450 (platform): New variable.
2451 (pkglibdir): Likewise.
2452 Use PKGLIBDIR instead of PKGDATADIR.
2453
2454 * util/i386/pc/grub-install.in (datadir): Removed.
2455 (host_vendor): Likewise.
2456 (host_os): Likewise.
2457 (pkgdatadir): Likewise.
2458 (platform): New variable.
2459 (pkglibdir): Likewise.
2460 Use PKGLIBDIR instead of PKGDATADIR.
2461
2462 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
2463 instead of GRUB_DATADIR.
2464 (main): Likewise.
2465 * util/i386/pc/grub-mkimage.c (usage): Likewise.
2466 (main): Likewise.
2467 * util/i386/efi/grub-mkimage.c (usage): Likewise.
2468 (main): Likewise.
2469
2470 * configure.ac (--with-platform): New option.
2471 Use PLATFORM instead of HOST_VENDOR to specify a platform.
2472
2473 * Makefile.in: Include a makefile based on PLATFORM instead of
2474 HOST_VENDOR.
2475 (pkgdatadir): Not appended by the machine type.
2476 (pkglibdir): Appended by the machine type.
2477 (host_vendor): Removed.
2478 (platform): New variable.
2479 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
2480 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
2481 (uninstall): Likewise.
2482
4e93851c 24832006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
2484
2485 Use the environment context in the menu. Remove the commands
2486 "default" and "timeout", and use variables instead.
2487
2488 * normal/menu.c: Include grub/env.h.
2489 (print_entry): Cast TITLE to silence gcc.
2490 (get_timeout): New function.
2491 (set_timeout): Likewise.
2492 (get_entry_number): Likewise.
2493 (run_menu): Use a default entry, a fallback entry and a timeout
2494 in the environment variables "default", "fallback" and
2495 "timeout". Also, tweak the default entry if it is not within the
2496 current menu entries.
2497 (grub_menu_run): Use a fallback entry in the environment variable
2498 "fallback".
2499
2500 * normal/main.c (read_config_file): Do not initialize
2501 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
2502 NEWMENU->TIMEOUT.
2503 (grub_normal_execute): Use a data slot to store the menu.
2504
2505 * include/grub/normal.h (struct grub_menu): Removed default_entry,
2506 fallback_entry and timeout.
2507 (struct grub_menu_list): Removed.
2508 (grub_menu_list_t): Likewise.
2509 (struct grub_context): Likewise.
2510 (grub_context_t): Likewise.
2511 (grub_context_get): Likewise.
2512 (grub_context_get_current_menu): Likewise.
2513 (grub_context_push_menu): Likewise.
2514 (grub_context_pop_menu): Likewise.
2515 (grub_default_init): Likewise.
2516 (grub_default_fini): Likewise.
2517 (grub_timeout_init): Likewise.
2518 (grub_timeout_fini): Likewise.
2519
2520 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
2521 and timeout.mod.
2522 (normal_mod_SOURCES): Removed normal/context.c.
2523
2524 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
2525 commands/default.c, commands/timeout.c and normal/context.c.
2526 (normal_mod_SOURCES): Removed normal/context.c.
2527
2528 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
2529 commands/timeout.c and normal/context.c.
2530 (normal_mod_SOURCES): Removed normal/context.c.
2531
2532 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
2533 commands/default.c, commands/timeout.c and normal/context.c.
2534 (normal_mod_SOURCES): Removed normal/context.c.
2535
2536 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
2537 timeout.mod.
2538 (default_mod_SOURCES): Removed.
2539 (default_mod_CFLAGS): Likewise.
2540 (default_mod_LDFLAGS): Likewise.
2541 (timeout_mod_SOURCES): Removed.
2542 (timeout_mod_CFLAGS): Likewise.
2543 (timeout_mod_LDFLAGS): Likewise.
2544
2545 * DISTLIST: Removed commands/default.c, commands/timeout.c and
2546 normal/context.c.
2547
2548 * commands/default.c: Removed.
2549 * commands/timeout.c: Likewise.
2550 * normal/context.c: Likewise.
2551
1eb9cc1d 25522006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
2553
2554 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
2555
385bd9c1 25562006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
2557
2558 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
2559 "next" to "prev" for readability.
2560 (struct grub_env_sorted_var): New struct.
2561 (grub_env_context): Renamed to ...
2562 (initial_context): ... this.
2563 (grub_env_var_context): Renamed to ...
2564 (current_context): ... this.
2565 (grub_env_find): Look only at CURRENT_CONTEXT.
2566 (grub_env_context_open): Rewritten to copy exported variables from
2567 previous context.
2568 (grub_env_context_close): Rewritten according to the new
2569 scheme. Also, add an assertion to prevent the initial context from
2570 removed.
2571 (grub_env_insert): Removed the code for the sorted list.
2572 (grub_env_remove): Likewise.
2573 (grub_env_export): Simply mark the variable with
2574 GRUB_ENV_VAR_GLOBAL.
2575 (grub_env_set): A cosmetic change for naming consistency.
2576 (grub_env_get): Likewise.
2577 (grub_env_unset): Likewise.
2578 (grub_env_iterate): Rewritten to sort variables within this
2579 function.
2580 (grub_register_variable_hook): Fixed for naming consistency. Call
2581 grub_env_find again, only if NAME is not found at the first time.
2582 (mangle_data_slot_name): New function.
2583 (grub_env_set_data_slot): Likewise.
2584 (grub_env_get_data_slot): Likewise.
2585 (grub_env_unset_data_slot): Likewise.
2586
2587 * include/grub/env.h (grub_env_var_type): New enum.
2588 (GRUB_ENV_VAR_LOCAL): New constant.
2589 (GRUB_ENV_VAR_GLOBAL): Likewise.
2590 (GRUB_ENV_VAR_DATA): Likewise.
2591 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
2592 "type".
2593 (grub_env_set): Replace VAR with NAME for consistency.
2594 (grub_register_variable_hook): Likewise.
2595 (grub_env_export): Specify the name of the argument.
2596 (grub_env_set_data_slot): New prototype.
2597 (grub_env_get_data_slot): Likewise.
2598 (grub_env_unset_data_slot): Likewise.
2599
7f362539 26002006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
2601
2602 Extend the loader so that GRUB can accept a loader which comes
2603 back to GRUB when a loaded image exits. Also, this change adds
2604 support for a chainloader on EFI.
2605
2606 * term/efi/console.c: Include grub/misc.h.
2607 (grub_console_checkkey): Display a scan code on the top for
2608 debugging. This will be removed once the EFI port gets stable.
2609 Correct the scan code mapping.
2610
2611 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
2612 allocate memory from larger regions, in order to reduce the number
2613 of allocated regions. Otherwise, the MacOSX loader panics.
2614 (filter_memory_map): Avoid less than 1MB for compatibility with
2615 other loaders.
2616 (add_memory_regions): Allocate from the tail of a region, if
2617 possible, to avoid allocating a region near to 1MB, for the MacOSX
2618 loader.
2619
2620 * kern/efi/init.c (grub_efi_set_prefix): Specify
2621 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
2622
2623 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
2624 argument IMAGE_HANDLE and specify it to get a loaded image.
2625 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
2626 grub_efi_get_loaded_image.
2627 (grub_efi_get_filename): Divide the legnth by the size of
2628 grub_efi_char16_t.
2629 (grub_efi_get_device_path): New function.
2630 (grub_efi_print_device_path): Print End Device Path nodes. Divide
2631 the length by the size of grub_efi_char16_t for a file path device
2632 path node.
2633
2634 * kern/loader.c (grub_loader_noreturn): New variable.
2635 (grub_loader_set): Accept a new argument NORETURN. Set
2636 GRUB_LOADER_NORETURN to NORETURN.
2637 All callers changed.
2638 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
2639 grub_machine_fini.
2640
2641 * include/grub/efi/efi.h (grub_efi_get_device_path): New
2642 prototype.
2643 (grub_efi_get_loaded_image): Take an argument to specify an image
2644 handle.
2645
2646 * include/grub/loader.h (grub_loader_set): Added one more argument
2647 NORETURN.
2648
2649 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
2650 instead of grub_efi_open_protocol.
2651 (grub_efidisk_get_device_name): Likewise.
2652 (grub_efidisk_close): Print a newline.
2653 (grub_efidisk_get_device_handle): Fixed to use
2654 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
2655 GRUB_EFI_DEVICE_PATH_TYPE.
2656
2657 * disk/efi/efidisk.c (device_path_guid): Moved to ...
2658 * kern/efi/efi.c (device_path_guid): ... here.
2659
2660 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
2661 chain.mod.
2662 (kernel_mod_HEADERS): Added efi/disk.h.
2663 (_chain_mod_SOURCES): New variable.
2664 (_chain_mod_CFLAGS): Likewise.
2665 (_chain_mod_LDFLAGS): Likewise.
2666 (chain_mod_SOURCES): Likewise.
2667 (chain_mod_CFLAGS): Likewise.
2668 (chain_mod_LDFLAGS): Likewise.
2669
2670 * DISTLIST: Added include/grub/efi/chainloader.h,
2671 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
2672
2673 * include/grub/efi/chainloader.h: New file.
2674 * loader/efi/chainloader.c: Likewise.
2675 * loader/efi/chainloader_normal.c: Likewise.
2676
c0111d6e 26772006-04-30 Marco Gerards <marco@gnu.org>
2678
2679 * commands/configfile.c (grub_cmd_source): New function.
2680 (GRUB_MOD_INIT): Register the commands `source' and `.'.
2681 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
2682
df5341da 26832006-04-30 Marco Gerards <marco@gnu.org>
2684
2685 * normal/execute.c (grub_script_execute_cmd): Change the return
2686 type to `grub_err_t'. Correctly return the error.
2687 (grub_script_execute_cmdline): In case a command line is not a
2688 command or a function, try to interpret it as an assignment.
2689
f85934bd 26902006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
2691
2692 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
2693 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
2694 skip a node whose name is obviously invalid as UTF-16,
2695 i.e. contains a NUL character. Stop the iteration when the last
2696 directory entry is found. Instead of using the return value of
2697 grub_hfsplus_btree_iterate_node, store the value in RET and use
2698 it, because the iterator can be stopped by the last directory
2699 entry.
2700
8f8a2cf8 27012006-04-30 Marco Gerards <marco@gnu.org>
2702
2703 * include/grub/env.h (grub_env_export): New prototype. Reported
2704 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
2705
a27e84ce 27062006-04-30 Marco Gerards <marco@gnu.org>
2707
2708 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
2709 size of the extents in a catalog file record.
2710
eaef0553 27112006-04-29 Marco Gerards <marco@gnu.org>
2712
2713 * commands/configfile.c (grub_cmd_configfile): Execute the
2714 configfile within its own context.
2715
2716 * include/grub/env.h (grub_env_context_open): New prototype.
2717 (grub_env_context_close): Likewise.
2718
2719 * kern/env.c (grub_env): Removed.
2720 (grub_env_sorted): Likewise.
2721 (grub_env_context): New variable.
2722 (grub_env_var_context): Likewise.
2723 (grub_env_find): Search both the active context and the global
2724 context.
2725 (grub_env_context_open): New function.
2726 (grub_env_context_close): Likewise.
2727 (grub_env_insert): Likewise.
2728 (grub_env_remove): Likewise.
2729 (grub_env_export): Likewise.
2730 (grub_env_set): Changed to use helper functions to avoid code
2731 duplication.
2732 (grub_env_iterate): Rewritten so both the current context and the
2733 global context are being used.
2734
2735 * normal/command.c (export_command): New function.
2736 (grub_command_init): Register the `export' function.
2737
7b455f4d 27382006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
2739
2740 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
2741 explicitly to suppress gcc's warnings.
2742 * fs/fat.c (grub_fat_find_dir): Likewise.
2743 (grub_fat_label): Likewise.
2744 * fs/xfs.c (grub_xfs_read_inode): Likewise.
2745 (grub_xfs_mount): Likewise.
2746 (grub_xfs_label): Likewise.
2747 * fs/affs.c (grub_affs_mount): Likewise.
2748 (grub_affs_label): Likewise.
2749 (grub_affs_iterate_dir): Likewise.
2750 * fs/sfs.c (grub_sfs_mount): Likewise.
2751 (grub_sfs_iterate_dir): Likewise.
2752 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
2753 * fs/hfs.c (grub_hfs_mount): Likewise.
2754 (grub_hfs_cmp_catkeys): Likewise.
2755 (grub_hfs_find_dir): Likewise.
2756 (grub_hfs_dir): Likewise.
2757 (grub_hfs_label): Likewise.
2758 * fs/jfs.c (grub_jfs_mount): Likewise.
2759 (grub_jfs_opendir): Likewise.
2760 (grub_jfs_getent): Likewise.
2761 (grub_jfs_lookup_symlink): Likewise.
2762 (grub_jfs_label): Likewise.
2763 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
2764 (grub_hfsplus_iterate_dir): Likewise.
2765 (grub_hfsplus_btree_iterate_node): Made static.
2766
2767 * util/grub-emu.c (prefix): New variable.
2768 (grub_machine_set_prefix): New function.
2769 (main): Do not set the environment variable "prefix" here. Only
2770 set PREFIX, which is used later by grub_machine_set_prefix.
2771
2772 * include/grub/video.h: Do not include grub/symbol.h.
2773 (grub_video_register): Not exported. This symbol is not defined in
2774 the kernel.
2775 (grub_video_unregister): Likewise.
2776 (grub_video_iterate): Likewise.
2777 (grub_video_setup): Likewise.
2778 (grub_video_restore): Likewise.
2779 (grub_video_get_info): Likewise.
2780 (grub_video_get_blit_format): Likewise.
2781 (grub_video_set_palette): Likewise.
2782 (grub_video_get_palette): Likewise.
2783 (grub_video_set_viewport): Likewise.
2784 (grub_video_get_viewport): Likewise.
2785 (grub_video_map_color): Likewise.
2786 (grub_video_map_rgb): Likewise.
2787 (grub_video_map_rgba): Likewise.
2788 (grub_video_fill_rect): Likewise.
2789 (grub_video_blit_glyph): Likewise.
2790 (grub_video_blit_bitmap): Likewise.
2791 (grub_video_blit_render_target): Likewise.
2792 (grub_video_scroll): Likewise.
2793 (grub_video_swap_buffers): Likewise.
2794 (grub_video_create_render_target): Likewise.
2795 (grub_video_delete_render_target): Likewise.
2796 (grub_video_set_active_render_target): Likewise.
2797
2798 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
2799 Undefined.
2800 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
2801
2802 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
2803 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
2804 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
2805 instead of $(srcdir)/genkernsyms.sh.
2806
2807 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
2808 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
2809 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
2810 instead of $(srcdir)/genkernsyms.sh.
2811
2812 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
2813 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
2814 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
2815 instead of $(srcdir)/genkernsyms.sh.
2816
2817 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
2818 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
2819 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
2820 instead of $(srcdir)/genkernsyms.sh.
2821
2822 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
2823 genkernsyms.sh.
2824
2825 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
2826 genkernsyms.sh.
2827 (gensymlist.sh): New target.
2828 (genkernsyms.sh): Likewise.
2829
2830 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
2831 genkernsyms.sh.in and gensymlist.sh.in.
2832
2833 * genkernsyms.sh: Removed.
2834 * gensymlist.sh: Likewise.
2835
2836 * genkernsyms.sh.in: New file.
2837 * gensymlist.sh.in: Likewise.
2838
1885bb27 28392006-04-25 Hollis Blanchard <hollis@penguinppc.org>
2840
2841 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
2842 clobber "prefix", since we may have already set it manually.
2843
71538dff 28442006-04-25 Hollis Blanchard <hollis@penguinppc.org>
2845
2846 * kern/misc.c (abort): New alias for grub_abort.
2847
2965c7cc 28482006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
2849
2850 A new machine-specific function "grub_machine_set_prefix" is
2851 defined. This is called after loading modules, so that a prefix
2852 initialization can use modules. Also, this change adds an
2853 intensive debugging feature for the memory manager via the
2854 configure option "--enable-mm-debug".
2855
2856 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
2857 PART.LEN.
2858
2859 * kern/sparc64/ieee1275/init.c (abort): Removed.
2860 (grub_stop): Likewise.
2861 (grub_exit): New function.
2862 (grub_set_prefix): Renamed to ...
2863 (grub_machine_set_prefix): ... this.
2864 (grub_machine_init): Do not call grub_set_prefix.
2865
2866 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
2867 (grub_machine_set_prefix): ... this.
2868 (grub_machine_init): Do not call grub_set_prefix.
2869
2870 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
2871 (grub_machine_init): Do not set the prefix here.
2872
2873 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
2874
2875 * kern/efi/init.c: Include grub/mm.h.
2876 (grub_efi_set_prefix): New function.
2877
2878 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
2879 (grub_efi_get_filename): New function.
2880 (grub_print_device_path): Renamed to ...
2881 (grub_efi_print_device_path): ... this.
2882
2883 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
2884 [MM_DEBUG] (grub_realloc): Likewise.
2885 [MM_DEBUG] (grub_free): Likewise.
2886 [MM_DEBUG] (grub_memalign): Likewise.
2887 [MM_DEBUG] (grub_mm_debug): New variable.
2888 [MM_DEBUG] (grub_debug_malloc): New function.
2889 [MM_DEBUG] (grub_debug_free): New function.
2890 [MM_DEBUG] (grub_debug_realloc): New function.
2891 [MM_DEBUG] (grub_debug_memalign): New function.
2892
2893 * kern/misc.c (grub_abort): Print a newline to distinguish
2894 the message.
2895
2896 * kern/main.c (grub_main): Call grub_machine_set_prefix and
2897 grub_set_root_dev after loading modules. This is necessary when
2898 setting a prefix depends on modules.
2899
2900 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
2901 (grub_efi_print_device_path): ... this.
2902 (grub_efi_get_filename): New prototype.
2903 (grub_efi_set_prefix): Likewise.
2904
2905 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
2906 and grub/disk.h.
2907 (grub_efidisk_get_device_handle): New prototype.
2908 (grub_efidisk_get_device_name): Likewise.
2909
2910 * include/grub/mm.h: Include config.h.
2911 (MM_DEBUG): Removed.
2912 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
2913 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
2914 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
2915 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
2916 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
2917 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
2918 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
2919 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
2920 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
2921
2922 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
2923
2924 * disk/efi/efidisk.c: Include grub/partition.h.
2925 (iterate_child_devices): New function.
2926 (add_device): First, compare only last device path nodes, so that
2927 devices are sorted by the types.
2928 (grub_efidisk_get_device_handle): New function.
2929 (grub_efidisk_get_device_name): Likewise.
2930
2931 * configure.ac (--enable-mm-debug): New option to enable the
2932 memory manager debugging feature. This makes the binary much
2933 bigger, so is disabled by default.
2934
9cacaa17 29352006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
2936
2937 Use grub_abort instead of grub_stop, and grub_exit must be
2938 define in each architecture now. Also, this change adds support
2939 for EFI disks.
2940
2941 * util/i386/pc/grub-probefs.c: Include grub/term.h.
2942 (grub_getkey): New function.
2943 (grub_term_get_current): Likewise.
2944
2945 * util/i386/pc/grub-setup.c: Include grub/term.h.
2946 (grub_getkey): New function.
2947 (grub_term_get_current): Likewise.
2948
2949 * util/misc.c (grub_stop): Renamed to ...
2950 (grub_exit): ... this.
2951
2952 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
2953 (grub_exit): ... this.
2954 (grub_machine_init): Use grub_abort instead of abort.
2955 (grub_stop): Removed.
2956
2957 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
2958 abort.
2959
2960 * kern/i386/pc/startup.S (grub_exit): New function.
2961 (cold_reboot): New label.
2962
2963 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
2964 (grub_efi_init): Call grub_efidisk_init.
2965 (grub_efi_fini): Call grub_efidisk_fini.
2966
2967 * kern/efi/efi.c: Include grub/mm.h.
2968 (grub_efi_console_control_guid): Renamed to ...
2969 (console_control_guid): ... this.
2970 (grub_efi_loaded_image_guid): Renamed to ...
2971 (loaded_image_guid): ... this.
2972 (grub_efi_locate_handle): New function.
2973 (grub_efi_open_protocol): Likewise.
2974 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
2975 GRUB_EFI_CONSOLE_CONTROL_GUID.
2976 (grub_efi_exit): Removed.
2977 (grub_stop): Likewise.
2978 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
2979 (grub_exit): New function.
2980 (grub_print_device_path): Likewise.
2981
2982 * kern/rescue.c (grub_rescue_cmd_exit): New function.
2983 (grub_enter_rescue_mode): Register "exit".
2984
2985 * kern/misc.c (grub_real_dprintf): A cosmetic change.
2986 (grub_abort): New function.
2987
2988 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
2989
2990 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
2991
2992 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
2993
2994 * include/grub/efi/efi.h (grub_efi_exit): Removed.
2995 (grub_print_device_path): New prototype.
2996 (grub_efi_locate_handle): Likewise.
2997 (grub_efi_open_protocol): Likewise.
2998
2999 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
3000 * disk/efi/efidisk.c: Likewise.
3001
3002 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
3003
3004 * include/grub/efi/console_control.h
3005 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
3006
3007 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
3008 last 8 bytes as an array.
3009 (GRUB_EFI_DISK_IO_GUID): New macro.
3010 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
3011 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
3012 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
3013 grub_uint8_t.
3014 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
3015 (struct grub_efi_device_path): Rename the member "sub_type" to
3016 "subtype".
3017 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
3018 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
3019 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
3020 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
3021 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
3022 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
3023 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
3024 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
3025 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
3026 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
3027 (struct grub_efi_pci_device_path): New structure.
3028 (grub_efi_pci_device_path_t): New type.
3029 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
3030 (struct grub_efi_pccard_device_path): New structure.
3031 (grub_efi_pccard_device_path_t): New type.
3032 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
3033 (struct grub_efi_memory_mapped_device_path): New structure.
3034 (grub_efi_memory_mapped_device_path_t): New type.
3035 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
3036 (struct grub_efi_vendor_device_path): New structure.
3037 (grub_efi_vendor_device_path_t): New type.
3038 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
3039 (struct grub_efi_controller_device_path): New structure.
3040 (grub_efi_controller_device_path_t): New type.
3041 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
3042 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
3043 (struct grub_efi_acpi_device_path): New structure.
3044 (grub_efi_acpi_device_path_t): New type.
3045 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
3046 (struct grub_efi_expanded_acpi_device_path): New structure.
3047 (grub_efi_expanded_acpi_device_path_t): New type.
3048 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
3049 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
3050 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
3051 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
3052 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
3053 (struct grub_efi_atapi_device_path): New structure.
3054 (grub_efi_atapi_device_path_t): New type.
3055 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
3056 (struct grub_efi_fibre_channel_device_path): New structure.
3057 (grub_efi_fibre_channel_device_path_t): New type.
3058 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
3059 (struct grub_efi_1394_device_path): New structure.
3060 (grub_efi_1394_device_path_t): New type.
3061 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
3062 (struct grub_efi_usb_device_path): New structure.
3063 (grub_efi_usb_device_path_t): New type.
3064 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
3065 (struct grub_efi_usb_class_device_path): New structure.
3066 (grub_efi_usb_class_device_path_t): New type.
3067 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
3068 (struct grub_efi_i2o_device_path): New structure.
3069 (grub_efi_i2o_device_path_t): New type.
3070 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
3071 (struct grub_efi_mac_address_device_path): New structure.
3072 (grub_efi_mac_address_device_path_t): New type.
3073 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
3074 (struct grub_efi_ipv4_device_path): New structure.
3075 (grub_efi_ipv4_device_path_t): New type.
3076 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
3077 (struct grub_efi_ipv6_device_path): New structure.
3078 (grub_efi_ipv6_device_path_t): New type.
3079 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
3080 (struct grub_efi_infiniband_device_path): New structure.
3081 (grub_efi_infiniband_device_path_t): New type.
3082 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
3083 (struct grub_efi_uart_device_path): New structure.
3084 (grub_efi_uart_device_path_t): New type.
3085 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
3086 (struct grub_efi_vendor_messaging_device_path): New structure.
3087 (grub_efi_vendor_messaging_device_path_t): New type.
3088 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
3089 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
3090 (struct grub_efi_hard_drive_device_path): New structure.
3091 (grub_efi_hard_drive_device_path_t): New type.
3092 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
3093 (struct grub_efi_cdrom_device_path): New structure.
3094 (grub_efi_cdrom_device_path_t): New type.
3095 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
3096 (struct grub_efi_vendor_media_device_path): New structure.
3097 (grub_efi_vendor_media_device_path_t): New type.
3098 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
3099 (struct grub_efi_file_path_device_path): New structure.
3100 (grub_efi_file_path_device_path_t): New type.
3101 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
3102 (struct grub_efi_protocol_device_path): New structure.
3103 (grub_efi_protocol_device_path_t): New type.
3104 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
3105 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
3106 (struct grub_efi_bios_device_path): New structure.
3107 (grub_efi_bios_device_path_t): New type.
3108 (struct grub_efi_disk_io): New structure.
3109 (grub_efi_disk_io_t): New type.
3110 (struct grub_efi_block_io_media): New structure.
3111 (grub_efi_block_io_media_t): New type.
3112 (struct grub_efi_block_io): New structure.
3113 (grub_efi_block_io_t): New type.
3114
3115 * include/grub/misc.h (grub_stop): Removed.
3116 (grub_exit): New prototype.
3117 (grub_abort): Likewise.
3118
3119 * include/grub/disk.h (enum grub_disk_dev_id): Added
3120 GRUB_DISK_DEVICE_EFIDISK_ID.
3121
3122 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
3123 disk/efi/efidisk.c.
3124 (kernel_syms.lst): Remove the target if an error occurs.
3125
49986a9f 31262006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
3127
3128 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
3129 as it was simply too buggy.
3130
970d3b8a 31312006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
3132
3133 * kern/misc.c (grub_lltoa): New function.
3134 (grub_vsprintf): Added support for the long long suffix,
3135 i.e. "ll".
3136
ff04ec24 31372006-04-20 Hollis Blanchard <hollis@penguinppc.org>
3138
3139 * Makefile.in (LDFLAGS): Add variable.
3140 (LD): Remove variable.
3141 * configure.ac: Add -m32 to LDFLAGS.
3142 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
3143 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
3144 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
3145 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
3146 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
3147 variables.
3148 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
3149 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
3150 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
3151
37e5e1a4 31522006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
3153
3154 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
3155 length for unknown glyph.
3156
c352d8dd 31572006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
3158
2eab1c0d 3159 Add support for pre-loaded modules into the EFI port.
3160
3161 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
3162 completely. Accept one more argument DIR. The caller has changed.
3163
3164 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
3165
3166 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
3167 (grub_efi_loaded_image_guid): New variable.
3168 (grub_efi_get_loaded_image): New function.
3169 (grub_arch_modules_addr): Likewise.
3170
3171 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
3172 prototype.
3173
3174 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
3175 (struct grub_efi_loaded_image): New structure.
3176 (grub_efi_loaded_image_t): New type.
3177
31782006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
3179
c352d8dd 3180 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
3181 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
3182 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
3183
6d01d6b4 31842006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
3185
3186 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
3187
976a4ea0 31882006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
3189
3190 * DISTLIST: Added include/grub/efi/console.h,
3191 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
3192 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
3193
3194 * include/grub/efi/console.h: New file.
3195 * include/grub/efi/time.h: Likewise.
3196 * include/grub/i386/efi/kernel.h: Likewise.
3197 * kern/efi/init.c: Likewise.
3198 * kern/efi/mm.c: Likewise.
3199 * term/efi/console.c: Likewise.
3200
3201 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
3202 (grub_stop): Removed.
3203 (grub_get_rtc): Likewise.
3204 (grub_machine_init): Simply call grub_efi_init.
3205 (grub_machine_fini): Call grub_efi_fini.
3206
3207 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
3208 (grub_efi_output_string): Removed.
3209 (grub_efi_stall): New function.
3210 (grub_stop): Likewise.
3211 (grub_get_rtc): Likewise.
3212
3213 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
3214 (grub_efi_stall): New prototype.
3215 (grub_efi_allocate_pages): Likewise.
3216 (grub_efi_free_pages): Likewise.
3217 (grub_efi_get_memory_map): Likewise.
3218 (grub_efi_mm_init): Likewise.
3219 (grub_efi_mm_fini): Likewise.
3220 (grub_efi_init): Likewise.
3221 (grub_efi_fini): Likewise.
3222
3223 * include/grub/i386/efi/time.h: Do not include
3224 grub/symbol.h. Include grub/efi/time.h.
3225 (GRUB_TICKS_PER_SECOND): Removed.
3226 (grub_get_rtc): Likewise.
3227
3228 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
3229 Added padding. The EFI spec is buggy.
3230 (GRUB_EFI_BLACK): New macro.
3231 (GRUB_EFI_BLUE): Likewise.
3232 (GRUB_EFI_GREEN): Likewise.
3233 (GRUB_EFI_CYAN): Likewise.
3234 (GRUB_EFI_RED): Likewise.
3235 (GRUB_EFI_MAGENTA): Likewise.
3236 (GRUB_EFI_BROWN): Likewise.
3237 (GRUB_EFI_LIGHTGRAY): Likewise.
3238 (GRUB_EFI_BRIGHT): Likewise.
3239 (GRUB_EFI_DARKGRAY): Likewise.
3240 (GRUB_EFI_LIGHTBLUE): Likewise.
3241 (GRUB_EFI_LIGHTGREEN): Likewise.
3242 (GRUB_EFI_LIGHTCYAN): Likewise.
3243 (GRUB_EFI_LIGHTRED): Likewise.
3244 (GRUB_EFI_LIGHTMAGENTA): Likewise.
3245 (GRUB_EFI_YELLOW): Likewise.
3246 (GRUB_EFI_WHITE): Likewise.
3247 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
3248 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
3249 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
3250 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
3251 (GRUB_EFI_BACKGROUND_RED): Likewise.
3252 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
3253 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
3254 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
3255 (GRUB_EFI_TEXT_ATTR): Likewise.
3256
3257 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
3258 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
3259 (kernel_mod_HEADERS): Added efi/time.h.
3260
83709125 32612006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
3262
3263 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
3264 include/grub/efi/api.h, include/grub/efi/console_control.h,
3265 include/grub/efi/efi.h, include/grub/efi/pe32.h,
3266 include/grub/i386/efi/time.h, kern/efi/efi.c,
3267 kern/i386/efi/init.c, kern/i386/efi/startup.S,
3268 and util/i386/efi/grub-mkimage.c.
3269
3270 * Makefile.in (RMKFILES): Added i386-efi.rmk.
3271
3272 * genmk.rb (PModule#rule): Do not export symbols if
3273 #{prefix}_EXPORTS is set to "no".
3274
3275 * conf/i386-efi.mk: New file.
3276 * conf/i386-efi.rmk: Likewise.
3277 * include/grub/efi/api.h: Likewise.
3278 * include/grub/efi/console_control.h: Likewise.
3279 * include/grub/efi/efi.h: Likewise.
3280 * include/grub/efi/pe32.h: Likewise.
3281 * include/grub/i386/efi/time.h: Likewise.
3282 * kern/efi/efi.c: Likewise.
3283 * kern/i386/efi/init.c: Likewise.
3284 * kern/i386/efi/startup.S: Likewise.
3285 * util/i386/efi/grub-mkimage.c: Likewise.
3286
32872006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 3288
3289 * include/grub/script.h: Include <grub/parser.h> and
3290 "grub_script.tab.h".
3291 (struct grub_lexer_param): New struct.
3292 (struct grub_parser_param): Likewise.
3293 (grub_script_create_arglist): Pass the state in an argument.
3294 (grub_script_add_arglist): Likewise.
3295 (grub_script_create_cmdline): Likewise.
3296 (grub_script_create_cmdblock): Likewise.
3297 (grub_script_create_cmdif): Likewise.
3298 (grub_script_create_cmdmenu): Likewise.
3299 (grub_script_add_cmd): Likewise.
3300 (grub_script_arg_add): Likewise.
3301 (grub_script_lexer_ref): Likewise.
3302 (grub_script_lexer_deref): Likewise.
3303 (grub_script_lexer_record_start): Likewise.
3304 (grub_script_lexer_record_stop): Likewise.
3305 (grub_script_mem_record): Likewise.
3306 (grub_script_mem_record_stop): Likewise.
3307 (grub_script_malloc): Likewise.
3308 (grub_script_yylex): Likewise.
3309 (grub_script_yyparse): Likewise.
3310 (grub_script_yyerror): Likewise.
3311 (grub_script_yylex): Likewise.
3312 (grub_script_lexer_init): Return the state.
3313
3314 * normal/lexer.c (grub_script_lexer_state): Removed variable.
3315 (grub_script_lexer_done): Likewise.
3316 (grub_script_lexer_getline): Likewise.
3317 (grub_script_lexer_refs): Likewise.
3318 (script): Likewise.
3319 (newscript): Likewise.
3320 (record): Likewise.
3321 (recording): Likewise.
3322 (recordpos): Likewise.
3323 (recordlen): Likewise.
3324 (grub_script_lexer_init): Return the state instead of setting
3325 global variables.
3326 (grub_script_lexer_ref): Use the newly added argument for state
3327 instead of globals.
3328 (grub_script_lexer_deref): Likewise.
3329 (grub_script_lexer_record_start): Likewise.
3330 (grub_script_lexer_record_stop): Likewise.
3331 (recordchar): Likewise.
3332 (nextchar): Likewise.
3333 (grub_script_yylex2): Likewise.
3334 (grub_script_yylex): Likewise.
3335 (grub_script_yyerror): Likewise.
3336
3337 * normal/parser.y (func_mem): Removed variable.
3338 (menu_entry): Likewise.
3339 (err): Likewise.
3340 (%lex-param): New parser option.
3341 (%parse-param): Likewise.
3342 (script): Always return the AST.
3343 (argument): Pass the state around.
3344 (arguments): Likewise.
3345 (grubcmd): Likewise.
3346 (commands): Likewise.
3347 (function): Likewise.
3348 (menuentry): Likewise.
3349 (if_statement): Likewise.
3350 (if): Likewise.
3351
3352 * normal/script.c (grub_script_memused): Removed variable.
3353 (grub_script_parsed): Likewise.
3354 (grub_script_malloc): Added a state argument. Use that instead of
3355 global variables.
3356 (grub_script_mem_record): Likewise.
3357 (grub_script_mem_record_stop): Likewise.
3358 (grub_script_arg_add): Likewise.
3359 (grub_script_add_arglist): Likewise.
3360 (grub_script_create_cmdline): Likewise.
3361 (grub_script_create_cmdif): Likewise.
3362 (grub_script_create_cmdmenu): Likewise.
3363 (grub_script_add_cmd): Likewise.
3364 (grub_script_parse): Setup the state before calling the parser.
3365
e2a8c904 33662006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 3367
3368 * normal/command.c (grub_command_init): Remove the title command.
3369
3370 * normal/lexer.c (grub_script_yylex): Renamed from this...
3371 (grub_script_yylex2): ... to this.
3372 (grub_script_yylex): New function. Temporary
3373 introduced to filter some tokens.
3374 (grub_script_yyerror): Print a newline.
3375
3376 * normal/main.c (read_config_file): Output information about the
3377 lines that contain errors. Wait for a key after all lines have
3378 been processed. Don't return an empty menu.
3379
3380 * normal/parser.y (func_mem): Don't initialize.
3381 (menu_entry): Likewise.
3382 (err): New variable.
3383 (script): Don't return anything when an error was encountered.
3384 (ws, returns): Removed rules.
3385 (argument): Disabled concatenated variable support.
3386 (arguments): Remove explicit separators.
3387 (grubcmd): Likewise.
3388 (function): Likewise.
3389 (menuentry): Likewise.
3390 (if): Likewise.
3391 (commands): Likewise. Add error handling.
3392
3393 * normal/script.c (grub_script_create_cmdline): If
3394 `grub_script_parsed' is 0, assume the parser encountered an error.
3395
c9a86192 33962006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
3397
3398 * configure.ac: Add support for EFI. Fix the typo
3399 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
3400
70f3b243 34012006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
3402
3403 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
3404 foreign multibyte characters should be shown correctly.
3405
65f201ad 34062006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
3407
3408 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
3409 calculation.
3410 (read_config_file): Made it to close file before returning.
3411
b4b93674 34122006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
3413
3414 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
3415 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
3416 video/i386/pc/vbefill.c.
3417
3418 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
3419 video/i386/pc/vbefill.c.
3420
3421 * include/grub/video.h (grub_video_blit_format): New enum.
3422 (grub_video_mode_info): Added new member blit_format.
3423 (grub_video_get_blit_format): New function prototype.
3424
3425 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
3426 function prototype.
3427 (grub_video_vbe_map_rgb): Likewise.
3428 (grub_video_vbe_unmap_color): Likewise.
3429
3430 * include/grub/i386/pc/vbeblit.h: New file.
3431
3432 * include/grub/i386/pc/vbefill.h: New file.
3433
3434 * video/video.c (grub_video_get_blit_format): New function.
3435 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
3436 (grub_video_vbe_map_rgb): Likewise.
3437 (grub_video_vbe_unmap_color): Likewise.
3438
3439 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
3440 optimized fills.
3441 (grub_video_vbe_blit_render_target): Changed to use more optimized
3442 blits.
3443 (grub_video_vbe_setup): Added detection for optimized settings.
3444 (grub_video_vbe_create_render_target): Likewise.
3445
3446 * video/i386/pc/vbeblit.c: New file.
3447
3448 * video/i386/pc/vbefill.c: New file.
3449
c2379b9c 34502006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
3451
3452 * font/manager.c (grub_font_get_glyph): Removed font fixup from
3453 here...
3454
3455 * util/unifont2pff.rb: ... and moved it to here. Improved argument
3456 parsing to support both hex and dec ranges. If filename was missing
3457 show usage information.
3458
bd0d7896 34592006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
3460
3461 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
3462 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
3463
3464 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
3465 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
3466 (video_mod_SOURCES): Added.
3467 (video_mod_CFLAGS): Likewise.
3468 (video_mod_LDFLAGS): Likewise.
3469 (gfxterm_mod_SOURCES): Likewise.
3470 (gfxterm_mod_CFLAGS): Likewise.
3471 (gfxterm_mod_LDFLAGS): Likewise.
3472 (videotest_mod_SOURCES): Likewise.
3473 (videotest_mod_CFLAGS): Likewise.
3474 (videotest_mod_LDFLAGS): Likewise.
3475 (vesafb_mod_SOURCES): Removed.
3476 (vesafb_mod_CFLAGS): Likewise.
3477 (vesafb_mod_LDFLAGS): Likewise.
3478 (vga_mod_SOURCES): Likewise.
3479 (vga_mod_CFLAGS): Likewise.
3480 (vga_mod_LDFLAGS): Likewise.
3481
3482 * commands/videotest.c: New file.
3483
3484 * font/manager.c (fill_with_default_glyph): Modified to use
3485 grub_font_glyph.
3486 (grub_font_get_glyph): Likewise.
3487 (fontmanager): Renamed from this...
3488 (font_manager): ... to this.
3489
3490 * include/grub/font.h (grub_font_glyph): Added new structure.
3491 (grub_font_get_glyph): Modified to use grub_font_glyph.
3492
3493 * include/grub/misc.h (grub_abs): Added as inline function.
3494
3495 * include/grub/video.h: New file.
3496
3497 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
3498 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
3499 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
3500 (grub_vbe_get_controller_info): Renamed from this...
3501 (grub_vbe_bios_get_controller_info): ... to this.
3502 (grub_vbe_get_mode_info): Renamed from this...
3503 (grub_vbe_bios_get_mode_info): ... to this.
3504 (grub_vbe_set_mode): Renamed from this...
3505 (grub_vbe_bios_set_mode): ... to this.
3506 (grub_vbe_get_mode): Renamed from this...
3507 (grub_vbe_bios_get_mode): ... to this.
3508 (grub_vbe_set_memory_window): Renamed from this...
3509 (grub_vbe_bios_set_memory_window): ... to this.
3510 (grub_vbe_get_memory_window): Renamed from this...
3511 (grub_vbe_bios_get_memory_window): ... to this.
3512 (grub_vbe_set_scanline_length): Renamed from this...
3513 (grub_vbe_set_scanline_length): ... to this.
3514 (grub_vbe_get_scanline_length): Renamed from this...
3515 (grub_vbe_bios_get_scanline_length): ... to this.
3516 (grub_vbe_set_display_start): Renamed from this...
3517 (grub_vbe_bios_set_display_start): ... to this.
3518 (grub_vbe_get_display_start): Renamed from this...
3519 (grub_vbe_bios_get_display_start): ... to this.
3520 (grub_vbe_set_palette_data): Renamed from this...
3521 (grub_vbe_bios_set_palette_data): ... to this.
3522 (grub_vbe_set_pixel_rgb): Removed.
3523 (grub_vbe_set_pixel_index): Likewise.
3524
3525 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
3526 from this...
3527 (grub_vbe_bios_get_controller_info): ... to this.
3528 (grub_vbe_get_mode_info): Renamed from this...
3529 (grub_vbe_bios_get_mode_info): ... to this.
3530 (grub_vbe_set_mode): Renamed from this...
3531 (grub_vbe_bios_set_mode): ... to this.
3532 (grub_vbe_get_mode): Renamed from this...
3533 (grub_vbe_bios_get_mode): ... to this.
3534 (grub_vbe_set_memory_window): Renamed from this...
3535 (grub_vbe_bios_set_memory_window): ... to this.
3536 (grub_vbe_get_memory_window): Renamed from this...
3537 (grub_vbe_bios_get_memory_window): ... to this.
3538 (grub_vbe_set_scanline_length): Renamed from this...
3539 (grub_vbe_set_scanline_length): ... to this.
3540 (grub_vbe_get_scanline_length): Renamed from this...
3541 (grub_vbe_bios_get_scanline_length): ... to this.
3542 (grub_vbe_set_display_start): Renamed from this...
3543 (grub_vbe_bios_set_display_start): ... to this.
3544 (grub_vbe_get_display_start): Renamed from this...
3545 (grub_vbe_bios_get_display_start): ... to this.
3546 (grub_vbe_set_palette_data): Renamed from this...
3547 (grub_vbe_bios_set_palette_data): ... to this.
3548 (grub_vbe_bios_get_controller_info): Fixed problem with registers
3549 getting corrupted after calling it. Added more pushes and pops.
3550 (grub_vbe_bios_set_mode): Likewise.
3551 (grub_vbe_bios_get_mode): Likewise.
3552 (grub_vbe_bios_get_memory_window): Likewise.
3553 (grub_vbe_bios_set_scanline_length): Likewise.
3554 (grub_vbe_bios_get_scanline_length): Likewise.
3555 (grub_vbe_bios_get_display_start): Likewise.
3556 (grub_vbe_bios_set_palette_data): Likewise.
3557
3558 * normal/cmdline.c (cl_set_pos): Refresh the screen.
3559 (cl_insert): Likewise.
3560 (cl_delete): Likewise.
3561
3562 * term/gfxterm.c: New file.
3563
3564 * term/i386/pc/vesafb.c: Removed file.
3565
3566 * video/video.c: New file.
3567
3568 * video/i386/pc/vbe.c (real2pm): Added new function.
3569 (grub_video_vbe_draw_pixel): Likewise.
3570 (grub_video_vbe_get_video_ptr): Likewise.
3571 (grub_video_vbe_get_pixel): Likewise
3572 (grub_video_vbe_init): Likewise.
3573 (grub_video_vbe_fini): Likewise.
3574 (grub_video_vbe_setup): Likewise.
3575 (grub_video_vbe_get_info): Likewise.
3576 (grub_video_vbe_set_palette): Likewise.
3577 (grub_video_vbe_get_palette): Likewise.
3578 (grub_video_vbe_set_viewport): Likewise.
3579 (grub_video_vbe_get_viewport): Likewise.
3580 (grub_video_vbe_map_color): Likewise.
3581 (grub_video_vbe_map_rgb): Likewise.
3582 (grub_video_vbe_map_rgba): Likewise.
3583 (grub_video_vbe_unmap_color): Likewise.
3584 (grub_video_vbe_fill_rect): Likewise.
3585 (grub_video_vbe_blit_glyph): Likewise.
3586 (grub_video_vbe_blit_bitmap): Likewise.
3587 (grub_video_vbe_blit_render_target): Likewise.
3588 (grub_video_vbe_scroll): Likewise.
3589 (grub_video_vbe_swap_buffers): Likewise.
3590 (grub_video_vbe_create_render_target): Likewise.
3591 (grub_video_vbe_delete_render_target): Likewise.
3592 (grub_video_vbe_set_active_render_target): Likewise.
3593 (grub_vbe_set_pixel_rgb): Remove function.
3594 (grub_vbe_set_pixel_index): Likewise.
3595 (index_color_mode): Remove static variable.
3596 (active_mode): Likewise.
3597 (framebuffer): Likewise.
3598 (bytes_per_scan_line): Likewise.
3599 (grub_video_vbe_adapter): Added new static variable.
3600 (framebuffer): Likewise.
3601 (render_target): Likewise.
3602 (initial_mode): Likewise.
3603 (mode_in_use): Likewise.
3604 (mode_list): Likewise.
3605
5f97350b 36062006-03-10 Marco Gerards <marco@gnu.org>
3607
3608 * configure.ac (AC_INIT): Bumped to 1.93.
3609
3610 * DISTLIST: Added `include/grub/hfs.h'.
3611
a3c5c6f8 36122006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
3613
3614 * boot/i386/pc/boot.S (general_error): Before looping, try INT
3615 18H, which might help the BIOS falling back to next boot media.
3616
6de53d26 36172006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
3618
3619 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
3620 Poe Chen <poe.poechen@gmail.com>.
3621
77c4a393 36222006-01-17 Marco Gerards <marco@gnu.org>
3623
3624 * include/grub/normal.h: Include <grub/script.h>.
3625 (grub_command_list): Removed struct.
3626 (grub_command_list_t): Removed type.
3627 (grub_menu_entry): Remove members `num' and `command_list'. Add
3628 members `commands' and `sourcecode'.
3629 * include/grub/script.h: Add inclusion guards.
3630 (grub_script_cmd_menuentry): New struct.
3631 (grub_script_execute_menuentry): New prototype.
3632 (grub_script_lexer_record_start): Likewise.
3633 (grub_script_lexer_record_stop): Likewise.
3634 * normal/execute.c (grub_script_execute_menuentry): New function.
3635 * normal/lexer.c (record, recording, recordpos, recordlen): New
3636 variables.
3637 (grub_script_lexer_record_start): New function.
3638 (grub_script_lexer_record_stop): Likewise.
3639 (recordchar): Likewise.
3640 (nextchar): Likewise.
3641 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
3642 2048 as the buffer size. Add the tokens `menuentry' and `@'.
3643 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
3644 (current_menu): New variable.
3645 (free_menu): Mainly rewritten.
3646 (grub_normal_menu_addentry): New function.
3647 (read_config_file): Rewritten.
3648 * normal/menu.c (run_menu_entry): Mainly rewritten.
3649 * normal/menu_entry.c (make_screen): Rewritten te code to insert
3650 the menu entry.
3651 (run): Mainly rewritten.
3652 * normal/parser.y (menu_entry): New variable.
3653 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
3654 (menuentry): New rule.
3655 (command): Add `menuentry'.
3656 (if_statement): Allow additional returns before `fi'.
3657 * normal/script.c (grub_script_create_cmdmenu): New function.
3658
144f1f98 36592006-01-03 Marco Gerards <marco@gnu.org>
3660
3661 * INSTALL: GNU Bison is required.
3662 * configure.ac: Rewritten the test to detect Bison.
3663 * Makefile.in (YACC): New variable. Reported by Xun Sun
3664 <xun.sun.cn@gmail.com>.
3665
af4b2d89 36662006-01-03 Marco Gerards <marco@gnu.org>
3667
3668 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
3669 the HFS+ filesystem to filesystem blocks.
3670 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
3671 GCC warning is silenced.
3672
15643b71 36732006-01-03 Marco Gerards <marco@gnu.org>
3674
3675 * partmap/apple.c (apple_partition_map_iterate): Convert the data
3676 read from disk from big endian to host byte order.
3677
00905879 36782006-01-03 Hollis Blanchard <hollis@penguinppc.org>
3679
3680 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
3681 documentation.
3682 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
3683 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
3684 embedded HFS+ filesystem.
3685 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
3686 (grub_hfs_sblock): Move from here...
3687 * include/grub/hfs.h: To here... New file.
3688 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
3689 documentation.
3690 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
3691 New macros.
3692 (grub_hfsplus_volheader): Change type of member `magic' to
3693 `grub_uint16_t'.
3694 (grub_hfsplus_data): Add new member `embedded_offset'.
3695 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
3696 returned block.
3697 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
3698 Calculate the offset.
3699
8899bc3e 37002005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
3701
3702 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
3703 Removed.
3704 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
3705
ae8c0277 37062005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
3707
3708 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
3709 ENV->NAME is NULL after allocating ENV->VALUE.
3710
07084456 37112005-12-25 Marco Gerards <marco@gnu.org>
3712
3713 * kern/env.c (grub_env_set): Rewritten the error handling code.
3714
4750f5f1 37152005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
3716
3717 * geninit.sh: Made more robust, and more portable.
3718
50214199 37192005-12-25 Marco Gerards <marco@gnu.org>
3720
3721 Add support for Apple HFS+ filesystems.
3722
3723 * fs/hfsplus.c: New file.
3724
3725 * DISTLIST: Added `fs/hfsplus.c'.
3726
3727 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
3728 (hfsplus_mod_SOURCES): New variable.
3729 (hfsplus_mod_CFLAGS): Likewise.
3730 (hfsplus_mod_LDFLAGS): Likewise.
3731 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
3732 (grub_setup_SOURCES): Likewise.
3733 (grub_mkdevicemap_SOURCES): Likewise.
3734 (grub_emu_SOURCES): Likewise.
3735 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3736
3737 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
3738
3739 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
3740
befaed6c 37412005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
3742
3743 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
3744 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
3745 include/grub/parser.h, include/grub/script.h, kern/parser.c,
3746 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
3747 normal/lexer.c, normal/parser.y, normal/script.c, and
3748 partmap/gpt.c.
3749 Removed kern/sparc64/cache.c.
3750
3751 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
3752 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
3753 grub_emu_init.c.
3754
3755 * configure.ac (AC_INIT): Bumped to 1.92.
3756
6a124103 37572005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
3758
3759 * kern/err.c (grub_error_push): Added new function to support error
3760 stacks.
3761 (grub_error_pop): Likewise.
3762 (grub_error_stack_items): New local variable to support error stacks.
3763 (grub_error_stack_pos): Likewise.
3764 (grub_error_stack_assert): Likewise.
3765 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
3766 stack depth.
3767 (grub_print_error): Added support to print errors from error stack.
3768
3769 * include/grub/err.h (grub_error_push): Added function prototype.
3770 (grub_error_pop): Likewise.
3771
be973c1b 37722005-12-09 Hollis Blanchard <hollis@penguinppc.org>
3773
3774 * configure.ac: Accept `powerpc64' as host_cpu.
3775 (amd64): Rename to `biarch32'.
3776
3777 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
3778 non-cacheline-aligned addresses.
3779
3780 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
3781 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
3782 if `size' is non-zero.
3783
b04216ab 37842005-12-03 Marco Gerards <mgerards@xs4all.nl>
3785
3786 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
3787 and `cd' to make sure the filename is not prefixed with a
3788 directory name.
3789 (pkgdata_MODULES): Add `gpt.mod'.
3790 (gpt_mod_SOURCES): New variable.
3791 (gpt_mod_CFLAGS): Likewise.
3792 (gpt_mod_LDFLAGS): Likewise.
3793
3794 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
3795
3796 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
3797 New macro.
3798
3799 * partmap/gpt.c: New file.
3800
3801 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
3802 GPT partition map is detected.
3803
41730ed9 38042005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
3805
3806 * commands/i386/pc/play.c: New file.
3807 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
3808 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
3809 macros.
3810
95dc3643 38112005-11-27 Marco Gerards <mgerards@xs4all.nl>
3812
3813 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
3814 ((unused))' to silence gcc warning.
3815
1569ec51 38162005-11-26 Hollis Blanchard <hollis@penguinppc.org>
3817
3818 * configure.ac: Correct `AC_PROG_YACC' test.
3819
9abde152 38202005-11-22 Hollis Blanchard <hollis@penguinppc.org>
3821
3822 * util/powerpc/ieee1275/grub-install.in: Run the mount point
3823 check before installing files.
3824
44b83271 38252005-11-22 Mike Small <smallm@panix.com>
3826
3827 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
3828 number regex so multidigit numbers are recognized correctly.
3829
38302005-11-22 Mike Small <smallm@panix.com>
3831
3832 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
3833 debugging message before attempting to claim memory.
3834 (grub_rescue_cmd_initrd): Add a claim debugging message and try
3835 multiple addresses in case of failure.
3836
9c12956b 38372005-11-22 Hollis Blanchard <hollis@penguinppc.org>
3838
3839 * term/tparm.c (get_space): Remove empty `if' statement.
3840
3841 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
3842
3843 * kern/parser.c (check_varstate): Rename `state' to 's'.
3844
aeaf81d9 38452005-11-22 Hollis Blanchard <hollis@penguinppc.org>
3846
3847 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
3848 variable definitions to the beginning of each function. Sort stack
3849 variables by size.
3850 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
3851 `buf' argument to `char *'.
3852
79bbb63f 38532005-11-22 Hollis Blanchard <hollis@penguinppc.org>
3854
3855 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
3856 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
3857 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
3858 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
3859 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
3860 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
3861 configfile.mod, search.mod, gzio.mod and test.mod.
3862 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
3863 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
3864 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
3865 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
3866 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
3867 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
3868 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
3869 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
3870 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
3871 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
3872 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
3873 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
3874 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
3875 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
3876 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
3877 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
3878 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
3879 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
3880 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
3881 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
3882 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
3883 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
3884 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
3885
3886 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
3887 `grep --include'.
3888 (pkgdata_MODULES): Add test.mod.
3889
233b1628 38902005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
3891
3892 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
3893 appending to variables with "+=".
3894 (PModule): Use full pathname to generate *.lst filenames.
3895
3896 * Makefile.in: Fixed list rules moved from genmk.rb.
3897 (.DELETE_ON_ERROR): New special target.
3898 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
3899
3900 * conf/i386-pc.rmk: Include conf/common.mk.
3901 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
3902 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
3903 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
3904 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
3905 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
3906 configfile.mod, search.mod, gzio.mod and test.mod.
3907 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
3908 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
3909 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
3910 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
3911 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
3912 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
3913 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
3914 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
3915 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
3916 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
3917 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
3918 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
3919 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
3920 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
3921 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
3922 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
3923 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
3924 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
3925 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
3926 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
3927 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
3928 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
3929 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
3930 here...
3931 * conf/common.rmk: ... to here. New file.
3932
3933 * conf/common.mk: New file.
3934
16f820c8 39352005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
3936
3937 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
3938 (grub_script.tab.c): ... here.
3939
3940 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
3941 (grub_script.tab.c): ... here.
3942
3943 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
3944 (grub_script.tab.c): ... here.
3945
3946 * normal/command.c (grub_command_find): Fixed a memory leak of
3947 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
3948
63ba1554 39492005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
3950
3951 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
3952 "@" which marks the start of a comment on ARM.
3953 (VARIABLE): Likewise.
3954
7f67dc13 39552005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
3956
79bbb63f 3957 Add support for Linux/ADFS partition tables.
7f67dc13 3958
3959 * partmap/acorn.c: New file.
3960
3961 * include/grub/acorn_filecore.h: Likewise.
3962
3963 * DISTLIST: Added `partmap/acorn.c' and
3964 `include/grub/acorn_filecore.h'.
3965
3966 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3967 `partmap/acorn.c'.
3968 (pkgdata_MODULES): Add `acorn.mod'.
3969 (acorn_mod_SOURCES): New variable.
3970 (acorn_mod_CFLAGS): Likewise.
3971
3972 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
3973 `partmap/acorn.c'.
3974 (pkgdata_MODULES): Add `acorn.mod'.
3975 (acorn_mod_SOURCES): New variable.
3976 (acorn_mod_CFLAGS): Likewise.
3977
3978 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
3979 (pkgdata_MODULES): Add `acorn.mod'.
3980 (acorn_mod_SOURCES): New variable.
3981 (acorn_mod_CFLAGS): Likewise.
3982 (acorn_mod_LDFLAGS): Likewise.
3983
3984 * include/types.h (grub_disk_addr_t): New typedef.
3985
6d099807 39862005-11-13 Marco Gerards <mgerards@xs4all.nl>
3987
3988 * geninit.sh: New file.
3989
3990 * geninitheader.sh: Likewise.
3991
3992 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
3993 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
3994 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
3995 * commands/configfile.c (grub_configfile_init)
3996 (grub_configfile_fini): Likewise.
3997 * commands/default.c (grub_default_init, grub_default_fini):
3998 Likewise.
3999 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
4000 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
4001 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
4002 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
4003 Likewise.
4004 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
4005 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
4006 Likewise.
4007 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
4008 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
4009 Likewise.
4010 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
4011 Likewise.
4012 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
4013 Likewise.
4014 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
4015 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
4016 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
4017 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
4018 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
4019 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
4020 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
4021 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
4022 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
4023 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
4024 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
4025 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
4026 * partmap/amiga.c (grub_amiga_partition_map_init)
4027 (grub_amiga_partition_map_fini): Likewise.
4028 * partmap/apple.c (grub_apple_partition_map_init)
4029 (grub_apple_partition_map_fini): Likewise.
4030 * partmap/pc.c (grub_pc_partition_map_init)
4031 (grub_pc_partition_map_fini): Likewise.
4032 * partmap/sun.c (grub_sun_partition_map_init,
4033 grub_sun_partition_map_fini): Likewise.
4034 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
4035 Likewise.
4036
4037 * util/grub-emu.c: Include <grub_modules_init.h>.
4038 (main): Don't initialize and de-initialize any modules directly,
4039 use `grub_init_all' and `grub_fini_all' instead.
4040
4041 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
4042 `grub_vesafb_mod_init'.
4043 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
4044 all users.
4045 * term/i386/pc/vga.c (grub_vga_init): Renamed to
4046 `grub_vga_mod_init'. Updated all users.
4047 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
4048
4049 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
4050 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
4051 rules.
4052
4053 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
4054 Generate a function to initialize the module in utilities.
4055 Updated all callers.
4056 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
4057 initialize the module in utilities. Updated all callers.
4058
9046bcf0 40592005-11-09 Hollis Blanchard <hollis@penguinppc.org>
4060
4061 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
4062 escape sequence and a literal ^L to clear the screen.
4063
4064 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
4065 when returning from Open Firmware.
4066
d13ea639 40672005-11-09 Hollis Blanchard <hollis@penguinppc.org>
4068
4069 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
4070 (grub_ofconsole_height): Likewise.
4071 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
4072 manually insert a '\n'.
4073 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
4074 `grub_ofconsole_height'. Return early if these are already set.
4075
a8fcf206 40762005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
4077
4078 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
4079 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
4080 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
4081 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
4082 and `normal/script.c'.
4083 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4084 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4085 (test_mod_SOURCES): New variable.
4086 (test_mod_CFLAGS): Likewise.
4087 (test_mod_LDFLAGS): Likewise.
4088 (pkgdata_MODULES): Add `test.mod'.
4089 (grub_script.tab.c): New rule.
4090 (grub_script.tab.h): Likewise.
4091
b6b32745 40922005-11-07 Marco Gerards <mgerards@xs4all.nl>
4093
4094 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
4095 `commands/test.c', `normal/execute.c', `normal/lexer.c',
4096 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4097 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4098 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4099 (test_mod_SOURCES): New variable.
4100 (test_mod_CFLAGS): Likewise.
4101 (pkgdata_MODULES): Add `test.mod'.
4102 (grub_script.tab.c): New rule.
4103 (grub_script.tab.h): Likewise.
4104
daac212a 41052005-11-06 Marco Gerards <mgerards@xs4all.nl>
4106
4107 Add initial scripting support.
4108
4109 * commands/test.c: New file.
4110 * include/grub/script.h: Likewise.
4111 * normal/execute.c: Likewise.
4112 * normal/function.c: Likewise.
4113 * normal/lexer.c: Likewise.
4114 * normal/parser.y: Likewise.
4115 * normal/script.c: Likewise.
4116
4117 * configure.ac: Add `AC_PROG_YACC' test.
4118
4119 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
4120 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
4121 `normal/function.c' and `normal/script.c'.
4122 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4123 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 4124 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
4125 variables.
daac212a 4126 (pkgdata_MODULES): Add `test.mod'.
4127 (grub_script.tab.c): New rule.
4128 (grub_script.tab.h): Likewise.
4129
4130 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
4131
4132 * include/grub/normal.h (grub_test_init): New prototype.
4133 (grub_test_fini): Likewise.
4134
4135 * normal/command.c: Include <grub/script.h>.
4136 (grub_command_execute): Rewritten.
4137
4138 * util/grub-emu.c (main): Call `grub_test_init' and
4139 `grub_test_fini'.
4140
77500b2b 41412005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4142
4143 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
4144 to 0.
4145 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
4146 there are no pending characters.
4147
e45deb9e 41482005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4149
4150 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
4151 `grub_strndup' to drop device arguments. Replace unnecessary
4152 `grub_strndup' with `grub_strdup'.
4153
4ce32619 41542005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4155
4156 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
4157 `debug' environment variable has been set.
4158
41592005-11-02 Hollis Blanchard <hollis@penguinppc.org>
4160
4161 * Makefile.in (install-local): Use $(DATA).
4162 (uninstall): Likewise.
4163 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
4164 (sbin_UTILITIES): ... to here.
4165 (sbin_SCRIPTS): New variable.
4166 (grub_install_SOURCES): New variable.
4167 * util/powerpc/ieee1275/grub-install.in: New file.
4168 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
4169 variable.
4170 (add_segments): Call `grub_util_get_path'.
4171
25fe6f03 41722005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
4173
4174 From Timothy Baldwin:
4175 * commands/ls.c (grub_ls_list_files): Close FILE with
4176 grub_file_close.
4177 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
4178
04ccf3ec 41792005-10-24 Marco Gerards <mgerards@xs4all.nl>
4180
4181 * include/grub/parser.h: New file.
4182
4183 * kern/parser.c: Likewise.
4184
4185 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
4186 (grub_setup_SOURCES): Likewise.
4187 (grub_probefs_SOURCES): Likewise.
4188 (grub_emu_SOURCES): Likewise.
4189 (kernel_img_HEADERS): Add `parser.h'.
4190
4191 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
4192 (grub_emu_SOURCES): Add `kern/parser.c'.
4193 (grubof_SOURCES): Likewise.
4194
4195 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
4196 (grubof_SOURCES): Add `kern/parser.c'.
4197
4198 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
4199
4200 * kern/misc.c (grub_split_cmdline): Removed function.
4201
4202 * kern/rescue.c: Include <grub/parser.h>.
4203 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
4204 of `grub_split_cmdline'.
4205
4206 * normal/command.c: Include <grub/parser.h>.
4207 (grub_command_execute): Use `grub_parser_split_cmdline' instead
4208 of `grub_split_cmdline'.
4209
4210 * normal/completion.c: Include <grub/parser.h>.
4211 (cmdline_state): New variable.
4212 (iterate_dir): End the filename with a quote depending on the
4213 command line state.
4214 (get_state): new function.
4215 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
4216 split the arguments and determine the current argument. When the
4217 argument string is not quoted, escape all spaces.
4218
6d8f4b0e 42192005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
4220
4221 * normal/sparc64/setjmp.S: New file.
4222
15cf03ed 42232005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
4224
4225 * include/grub/sparc64/libgcc.h: New file.
4226 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
4227 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
4228 normal/sparc64/setjmp.c.
4229
03e8661a 42302005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
4231
4232 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
4233 * kern/sparc64/cache.S: New file.
4234 * kern/sparc64/cache.c: Removed.
4235 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
4236 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
4237 -mtune=ultrasparc.
4238 (COMMON_LDFLAGS): Add -melf64_sparc.
4239 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
4240 (grubof_SOURCES): Use cache.S instead of cache.c.
4241 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
4242 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
4243 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
4244 commented though.
4245 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
4246 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
4247 (linux_mod_CFLAGS): Commented out.
4248 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
4249 out because module isn't built.
4250 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
4251 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
4252 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
4253 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
4254 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
4255 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
4256 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
4257 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
4258 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
4259 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
4260 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
4261 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
4262 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
4263 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
4264
34eeec8a 42652005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
4266
4267 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
4268 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
4269 longer, because HFS should not be used on PC.
4270
708367a3 42712005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4272
4273 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
4274 consistently within the loop.
4275
6fa1251a 42762005-10-15 Marco Gerards <mgerards@xs4all.nl>
4277
4278 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
4279 directory can not be read.
4280
4801580b 42812005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4282
4283 * configure.ac (AC_INIT): Increase the version number to 1.91.
4284
4285 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
4286 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
4287 term/i386/pc/serial.c.
4288
219ad426 42892005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4290
4291 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
4292 file size must be permitted.
4293
4294 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
4295 between %ah and %al.
4296
688e5699 42972005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4298
4299 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
4300 grub_uint64_t.
4301 Call the hook with a NUL-terminated filename.
4302 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
4303 grub_cpu_to_be32.
4304
4305 * kern/term.c (cursor_state): New variable.
4306 (grub_term_set_current): Reset the cursor state on a new
4307 terminal.
4308 (grub_setcursor): Rewritten to use CURSOR_STATE.
4309 (grub_getcursor): New function.
4310
4311 * include/grub/term.h (grub_getcursor): New prototype.
4312
4313 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
4314 integers on ARM. Reported by Timothy Baldwin
4315 <T.E.Baldwin99@members.leeds.ac.uk>.
4316
bb34586c 43172005-10-11 Marco Gerards <mgerards@xs4all.nl>
4318
4319 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
4320 allocated.
4321 (grub_sfs_dir): Likewise.
4322
9a909877 43232005-10-09 Marco Gerards <mgerards@xs4all.nl>
4324
4325 Add support for the SFS filesystem.
4326
4327 * fs/sfs.c: New file.
4328
4329 * DISTLIST: Added `fs/sfs.c'.
4330
4331 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
4332 (grub_probefs_SOURCES): Likewise.
4333 (grub_emu_SOURCES): Likewise.
4334 (pkgdata_MODULES): Add `sfs.mod'.
4335 (sfs_mod_SOURCES): New variable.
4336 (sfs_mod_CFLAGS): Likewise.
4337 (sfs_mod_LDFLAGS): Likewise.
4338
4339 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
4340 (pkgdata_MODULES): Add `sfs.mod'.
4341 (sfs_mod_SOURCES): New variable.
4342 (sfs_mod_CFLAGS): Likewise.
4343
4344 * util/grub-emu.c (main): Call `grub_sfs_init' and
4345 `grub_sfs_fini'.
4346
4347 * include/grub/fs.h (grub_sfs_init): New prototype.
4348 (grub_sfs_fini): Likewise.
4349
57bdbde3 43502005-10-07 Marco Gerards <mgerards@xs4all.nl>
4351
4352 Add support for the AFFS filesystem.
4353
4354 * fs/affs.c: New file.
4355
4356 * DISTLIST: Added `fs/affs.c'.
4357
4358 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
4359 (grub_probefs_SOURCES): Likewise.
4360 (grub_emu_SOURCES): Likewise.
4361 (pkgdata_MODULES): Add `affs.mod'.
4362 (affs_mod_SOURCES): New variable.
4363 (affs_mod_CFLAGS): Likewise.
4364 (affs_mod_LDFLAGS): Likewise.
4365
4366 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
4367 (pkgdata_MODULES): Add `affs.mod'.
4368 (affs_mod_SOURCES): New variable.
4369 (affs_mod_CFLAGS): Likewise.
4370
4371 * util/grub-emu.c (main): Call `grub_affs_init' and
4372 `grub_affs_fini'.
4373
4374 * include/grub/fs.h (grub_affs_init): New prototype.
4375 (grub_affs_fini): Likewise.
4376
047b67e0 43772005-10-01 Marco Gerards <mgerards@xs4all.nl>
4378
4379 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
4380
59b8208a 43812005-10-01 Marco Gerards <mgerards@xs4all.nl>
4382
4383 * configure.ac: Accept `x86_64' as host_cpu. In that case add
4384 `-m32' to CFLAGS.
4385
4386 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
4387 linking.
4388
4389 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
4390 (COMMON_LDFLAGS): New variable.
4391 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
4392 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
4393 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
4394 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
4395 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
4396 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
4397 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
4398 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
4399 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
4400 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
4401 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
4402 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
4403 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
4404 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
4405 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
4406 variables.
4407 (normal_mod_ASFLAGS): Add `-m32'.
4408
4409 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
4410 (grub_host_size_t, grub_host_ssize_t): New types.
4411 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
4412 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
4413 `GRUB_HOST_SIZEOF_VOID_P'.
4414
4415 * include/grub/kernel.h (struct grub_module_header): Type of
4416 member offset changed to `grub_host_off_t'. Type of member size
4417 changed to `grub_host_size_t'.
4418 (struct grub_module_info): Type of member offset changed to
4419 `grub_host_off_t'. Type of member size changed to
4420 `grub_host_size_t'.
4421
b4093103 44222005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
4423
4424 Make GRUB's kernel compliant to Multiboot Specification.
4425
4426 * kern/i386/pc/startup.S (multiboot_header): New label.
4427 (multiboot_entry): Likewise.
4428 (multiboot_trampoline): Likewise.
4429
4430 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4431 Increased to 0x4A0.
4432
4433 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
4434 put parentheses after a question mark.
4435 [!GRUB_UTIL] (my_mod): New variable.
4436
4437 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
4438
b2499b29 44392005-09-28 Marco Gerards <mgerards@xs4all.nl>
4440
4441 Adds support for the XFS filesystem. Btrees are not supported
4442 yet.
4443
4444 * fs/xfs.c: New file.
4445
4446 * DISTLIST: Added `fs/xfs.c'.
4447
4448 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
4449 (grub_probefs_SOURCES): Likewise.
4450 (grub_emu_SOURCES): Likewise.
4451 (pkgdata_MODULES): Add `xfs.mod'.
4452 (xfs_mod_SOURCES): New variable.
4453 (xfs_mod_CFLAGS): Likewise.
4454
4455 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
4456 (pkgdata_MODULES): Add `xfs.mod'.
4457 (xfs_mod_SOURCES): New variable.
4458 (xfs_mod_CFLAGS): Likewise.
4459
4460 * util/grub-emu.c (main): Call `grub_xfs_init' and
4461 `grub_xfs_fini'.
4462
4463 * include/grub/fs.h (grub_xfs_init): New prototype.
4464 (grub_xfs_fini): Likewise.
4465
4466
83d37a62 44672005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
4468
4469 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
4470 color modes, allow greater than 16 colors to be configured as
4471 a default palette.
4472
47d2d65e 44732005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4474
4475 * normal/completion.c (complete_arguments): Add the qualifier
4476 const into OPTIONS.
4477
4478 From Omniflux <omniflux+lists@omniflux.com>:
4479 * include/grub/terminfo.h: New file.
4480 * include/grub/tparm.h: Likewise.
4481 * include/grub/i386/pc/serial.h: Likewise.
4482 * term/terminfo.c: Likewise.
4483 * term/tparm.c: Likewise.
4484 * term/i386/pc/serial.c: Likewise.
4485 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
4486 serial.mod.
4487 (terminfo_mod_SOURCES): New variable.
4488 (terminfo_mod_CFLAGS): Likewise.
4489 (serial_mod_SOURCES): Likewise.
4490 (serial_mod_CFLAGS): Likewise.
4491
48b671ff 44922005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
4493
4494 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
4495 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
4496 and kern/powerpc/ieee1275/cmain.c, respectively.
4497
4498 * boot/powerpc/ieee1275/crt0.S: Moved to ...
4499 * kern/powerpc/ieee1275/crt0.S: ... here.
4500
4501 * boot/powerpc/ieee1275/cmain.c: Moved to ...
4502 * kern/powerpc/ieee1275/cmain.c: ... here.
4503
4504 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
4505 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
4506 instead of boot/powerpc/ieee1275/crt0.S and
4507 boot/powerpc/ieee1275/cmain.c, respectively.
4508
4509 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
4510 sectors. It was not used anyway.
4511
09fc77a7 45122005-08-30 Hollis Blanchard <hollis@penguinppc.org>
4513
4514 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
4515 `unused parameter' warning.
4516
003789c7 45172005-08-30 Hollis Blanchard <hollis@penguinppc.org>
4518
4519 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
4520 function.
4521 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
4522 getcharwidth.
4523
67f44c86 45242005-08-28 Marco Gerards <metgerards@student.han.nl>
4525
4526 * include/grub/normal.h (enum grub_completion_type): Added
4527 `GRUB_COMPLETION_TYPE_ARGUMENT'.
4528
4529 * normal/cmdline.c (print_completion): Handle
4530 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
4531 * normal/menu_entry.c (store_completion): Likewise.
4532
4533 * normal/completion.c (complete_arguments): New function.
4534 (grub_normal_do_completion): Call `complete_arguments' when the
4535 current words start with a dash.
4536
0b5abe02 45372005-08-27 Marco Gerards <metgerards@student.han.nl>
4538
4539 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
4540 `gzio.mod' instead of `io.mod').
4541
d9864ee1 45422005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
4543
4544 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
4545 (DISTDIRS): Added io and video.
4546 Rewrite the search routine to make an output consistently.
4547
4548 * DISTLIST: Added conf/sparc64-ieee1275.mk,
4549 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
4550 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
4551 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
4552 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
4553 util/powerpc/ieee1275/misc.c.
4554
4555 * include/grub/gzio.h: New file.
4556 * io/gzio.c: Likewise.
4557
4558 * kern/file.c (grub_file_close): Call grub_device_close only if
4559 FILE->DEVICE is not NULL.
4560
4561 * include/grub/mm.h [!NULL] (NULL): New macro.
4562
4563 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
4564
4565 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
4566 (pkgdata_MODULES): Added gzio.mod.
4567 (gzio_mod_SOURCES): New variable.
4568 (gzio_mod_CFLAGS): Likewise.
4569
4570 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
4571 (pkgdata_MODULES): Added gzio.mod.
4572 (gzio_mod_SOURCES): New variable.
4573 (gzio_mod_CFLAGS): Likewise.
4574
4575 * commands/cat.c: Include grub/gzio.h.
4576 (grub_cmd_cat): Use grub_gzfile_open instead of
4577 grub_file_open.
4578
4579 * commands/cmp.c: Include grub/gzio.h.
4580 (grub_cmd_cmp): Use grub_gzfile_open instead of
4581 grub_file_open.
4582
4583 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
4584 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
4585 grub_file_open.
4586 (grub_rescue_cmd_module): Likewise.
4587
fa46f4b5 45882005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
4589
4590 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
4591 kern/sparc64/ieee1275/init.c because it contains _start.
4592 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
4593
e9211b5d 45942005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
4595
4596 * configure.ac: Add support for sparc64 host with ieee1275
4597 firmware.
4598 * configure: Generated from configure.ac.
4599 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
4600 instead of int.
4601 (grub_ofdisk_read): Likewise.
4602 (grub_ofdisk_open): Use %p to print pointer values, and cast the
4603 pointers as (void *) to remove a warning.
4604 (grub_ofdisk_close): Likewise.
4605 (grub_ofdisk_read): Likewise.
4606 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
4607 returns, so make it return void to remove a warning.
4608 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
4609 Corresponding prototype change.
4610 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
4611 values, and cast the pointers as (void *) to remove a warning.
4612 (grub_mm_dump): Likewise.
4613 * conf/sparc64-ieee1275.mk: New file.
4614 * conf/sparc64-ieee1275.rmk: Likewise.
4615 * include/grub/sparc64/setjmp.h: Likewise.
4616 * include/grub/sparc64/types.h: Likewise.
4617 * include/grub/sparc64/ieee1275/console.h: Likewise.
4618 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
4619 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
4620 * include/grub/sparc64/ieee1275/time.h: Likewise.
4621 * kern/sparc64/cache.c: Likewise.
4622 * kern/sparc64/dl.c: Likewise.
4623 * kern/sparc64/ieee1275/init.c: Likewise.
4624 * kern/sparc64/ieee1275/openfw.c: Likewise.
4625
385c6a92 46262005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
4627
4628 * util/console.c (grub_ncurses_putchar): If C is greater than
4629 0x7f, set C to a question mark.
4630 (grub_ncurses_getcharwidth): New function.
4631 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
4632 getcharwidth.
4633
4634 * normal/menu.c (print_entry): Made aware of Unicode. First,
4635 convert TITLE to UCS-4, and predict the cursor position by
4636 grub_getcharwidth.
4637
4638 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
4639 const to SRC.
4640 * kern/misc.c (grub_utf16_to_utf8): Likewise.
4641
16ccb8b1 46422005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
4643
4644 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
4645 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
4646 grub_strcat.
4647
4648 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
4649 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
4650 grub_strcpy and grub_strlen. Take it into account that a space
4651 character is inserted as a delimiter.
4652
6a85ce79 46532005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
4654
4655 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
4656 invalid magic in thre error.
4657
4658 * commands/search.c: New file.
4659
4660 * util/grub-emu.c (main): Call grub_search_init and
4661 grub_search_fini.
4662
4663 * kern/rescue.c (grub_rescue_print_disks): Removed.
4664 (grub_rescue_print_devices): New function.
4665 (grub_rescue_cmd_ls): Use grub_device_iterate with
4666 grub_rescue_print_devices instead of grub_disk_dev_iterate with
4667 grub_rescue_print_disks.
4668
4669 * kern/partition.c (grub_partition_iterate): Return the result of
4670 PARTMAP->ITERATE instead of GRUB_ERRNO.
4671
4672 * kern/device.c: Include grub/partition.h.
4673 (grub_device_iterate): New function.
4674
4675 * include/grub/partition.h (grub_partition_iterate): Return int
4676 instead of grub_err_t.
4677
4678 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
4679 prototype.
4680 [GRUB_UTIL] (grub_search_fini): Likewise.
4681
4682 * include/grub/device.h (grub_device_iterate): New prototype.
4683
4684 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
4685 commands/search.c.
4686 (pkgdata_MODULES): Added search.mod.
4687 (search_mod_SOURCES): New variable.
4688 (search_mod_CFLAGS): Likewise.
4689
4690 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
4691 (pkgdata_MODULES): Added search.mod.
4692 (search_mod_SOURCES): New variable.
4693 (search_mod_CFLAGS): Likewise.
4694
4695 * commands/ls.c (grub_ls_list_disks): Renamed to ...
4696 (grub_ls_list_devices): ... this, and use grub_device_iterate.
4697 All callers changed.
4698
4699 * DISTLIST: Added commands/search.c.
4700
ef095434 47012005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
4702
4703 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
4704 conversion.
4705 (grub_getcharwidth): New function.
4706
4707 * kern/misc.c (grub_utf8_to_ucs4): New function.
4708
4709 * include/grub/term.h (struct grub_term): Added a new member
4710 "getcharwidth".
4711 (grub_getcharwidth): New prototype.
4712
4713 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
4714
4715 * term/i386/pc/console.c (map_char): New function. Segregated from
4716 grub_console_putchar.
4717 (grub_console_putchar): Use map_char.
4718 (grub_console_getcharwidth): New function.
4719 (grub_console_term): Specified grub_console_getcharwidth as
4720 getcharwidth.
4721
4722 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
4723 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
4724
4725 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
4726 GRUB_ERRNO.
4727 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
4728 on grub_strtoul completely.
4729 (write_char): Declare local variables in the beginning of the
4730 function.
4731 (grub_vesafb_getcharwidth): New function.
4732 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
4733 getcharwidth.
4734
1f0a95e4 47352005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
4736
4737 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
4738 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
4739 commands/i386/pc/vbetest.c.
4740
4741 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
4742 call grub_vbe_get_controller_info again, because the returned
4743 information is volatile.
4744 (grub_vbe_set_video_mode): Mostly rewritten.
4745 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
4746 grub_vbe_status_t correctly.
4747 (grub_vbe_get_video_mode_info): Likewise.
4748 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
4749 several if statements.
4750
4751 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
4752 * commands/i386/pc/vbeinfo.c: ... this.
4753
4754 * commands/i386/pc/vbe_test.c: Renamed to ...
4755 * commands/i386/pc/vbetest.c: ... this.
4756
4757 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
4758 ...
4759 (grub_cmd_vbeinfo): ... this. Save video modes before
4760 iterating. Skip a video mode, if it is not available, not enough
4761 information is given or it is monochrome. Show the memory
4762 model. Leave the interpretation of MODEVAR to grub_strtoul
4763 completely.
4764 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
4765 (GRUB_MOD_FINI): Likewise.
4766
4767 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
4768 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
4769 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
4770 duplicated grub_env_get. Leave the interpretation of MODEVAR to
4771 grub_strtoul completely.
4772 (real2pm): Removed.
4773 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
4774 (GRUB_MOD_FINI): Likewise.
4775
4776 * normal/misc.c: Include grub/mm.h.
4777
4778 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
4779 vbe_list_modes with vbetest.mod and vbeinfo.mod.
4780 (vbe_list_modes_mod_SOURCES): Removed.
4781 (vbe_list_modes_mod_CFLAGS): Likewise.
4782 (vbe_test_mod_SOURCES): Likewise.
4783 (vbe_test_mod_CFLAGS): Likewise.
4784 (vbeinfo_mod_SOURCES): New variable.
4785 (vbeinfo_mod_CFLAGS): Likewise.
4786 (vbetest_mod_SOURCES): Likewise.
4787 (vbetest_mod_CFLAGS): Likewise.
4788
992ffbbe 47892005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
4790
4791 * normal/misc.c: New file.
4792
4793 * DISTLIST: Added normal/misc.c.
4794
4795 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
4796 DISK to HOOK. Call HOOK with DISK.
4797 * partmap/apple.c (apple_partition_map_iterate): Likewise.
4798 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4799 * partmap/sun.c (sun_partition_map_iterate): Likewise.
4800
4801 * normal/menu_entry.c (struct screen): Added a new member
4802 "completion_shown".
4803 (completion_buffer): New global variable.
4804 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
4805 (store_completion): New function.
4806 (complete): Likewise.
4807 (clear_completions): Likewise.
4808 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
4809 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
4810 a tab, call complete.
4811
4812 * normal/completion.c (disk_dev): Removed.
4813 (print_simple_completion): Likewise.
4814 (print_partition_completion): Likewise.
4815 (print_func): New global variable.
4816 (add_completion): Do not take the arguments WHAT or PRINT any
4817 longer. Added a new argument TYPE. Instead of printing directly,
4818 call PRINT_FUNC if not NULL.
4819 All callers changed.
4820 (complete_device): Use a local variable DEV instead of
4821 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
4822 (grub_normal_do_completion): Take a new argument HOOK. Do not
4823 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
4824 empty string, return NULL instead.
4825 All callers changed.
4826
4827 * normal/cmdline.c (print_completion): New function.
4828
4829 * kern/partition.c (grub_partition_iterate): Add an argument DISK
4830 to HOOK.
4831 All callers changed.
4832
4833 * kern/disk.c (grub_print_partinfo): Removed.
4834
4835 * include/grub/partition.h (struct grub_partition_map): Add a new
4836 argument DISK into HOOK of ITERATE.
4837 (grub_partition_iterate): Add a new argument DISK to HOOK.
4838
4839 * include/grub/normal.h (enum grub_completion_type): New enum.
4840 (grub_completion_type_t): New type.
4841 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
4842 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
4843 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
4844 (GRUB_COMPLETION_TYPE_FILE): Likewise.
4845 (grub_normal_do_completion): Added a new argument HOOK.
4846 (grub_normal_print_device_info): New prototype.
4847
4848 * include/grub/disk.h (grub_print_partinfo): Removed.
4849
4850 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
4851 (normal_mod_SOURCES): Likewise.
4852 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4853 (normal_mod_SOURCES): Likewise.
4854
4855 * commands/ls.c (grub_ls_list_disks): Use
4856 grub_normal_print_device_info instead of grub_print_partinfo. Free
4857 PNAME.
4858 (grub_ls_list_files): Use grub_normal_print_device_info instead of
4859 duplicating the code.
4860
0bd41162 48612005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
4862
4863 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
4864 follow GCS more precisely.
4865 * commands/i386/pc/vbe_test.c: Likewise.
4866 * include/grub/i386/pc/vbe.h: Likewise.
4867 * term/i386/pc/vesafb.c: Likewise.
4868 * video/i386/pc/vbe.c: Likewise.
4869
6323696a 48702005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
4871
4872 * DISTLIST: Added term/i386/pc/vesafb.c
4873 DISTLIST: Added video/i386/pc/vbe.c
4874 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
4875 DISTLIST: Added commands/i386/pc/vbe_test.c.
4876 * commands/i386/pc/vbe_list_modes.c: New file.
4877 * commands/i386/pc/vbe_test.c: Likewise.
4878 * term/i386/pc/vesafb.c: Likewise.
4879 * video/i386/pc/vbe.c: Likewise.
4880 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
4881 (grub_vbe_probe) Added prototype.
4882 (grub_vbe_set_video_mode) Likewise.
4883 (grub_vbe_get_video_mode) Likewise.
4884 (grub_vbe_get_video_mode_info) Likewise.
4885 (grub_vbe_set_pixel_rgb) Likewise.
4886 (grub_vbe_set_pixel_index) Likewise.
4887 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
4888 (pkgdata_MODULES): Added vesafb.mod.
4889 (pkgdata_MODULES): Added vbe_list_modes.mod.
4890 (pkgdata_MODULES): Added vbe_test.mod.
4891 (vbe_mod_SOURCES): Added.
4892 (vbe_mod_CFLAGS): Likewise.
4893 (vesafb_mod_SOURCES): Likewise.
4894 (vesafb_mod_CFLAGS): Likewise.
4895 (vbe_list_modes_mod_SOURCES): Likewise.
4896 (vbe_list_modes_mod_CFLAGS): Likewise.
4897 (vbe_test_mod_SOURCES): Likewise.
4898 (vbe_test_mod_CFLAGS): Likewise.
4899
0a74e62f 49002005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
4901
0a74e62f 4902 * normal/command.c (grub_command_execute): If INTERACTIVE is
4903 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
4904 CMDLINE. Disable the pager if INTERACTIVE is true.
4905 All callers are changed.
4906
4907 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
4908 before reading a config file.
4909 * normal/main.c (read_config_file): Even if a command is not
4910 found, register it if it is within an entry.
4911
4912 * util/grub-emu.c: Include sys/types.h and unistd.h.
4913 (options): Added --hold.
4914 (struct arguments): Added a new member "hold".
4915 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
4916 missing.
4917 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
4918 cleared by a debugger, if it is not zero.
4919
4920 * include/grub/normal.h (grub_command_execute): Add an argument
4921 INTERACTIVE.
4922
e51f85ae 49232005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
4924
4925 * DISTLIST: Added include/grub/i386/pc/vbe.h.
4926
e9c6f39b 49272005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
4928
4929 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
4930 program with another one, because the old one didn't detect a bug
4931 in gcc-3.4. Always use regparm 2, because the new test is still
4932 not enough for gcc-4.0. Someone must investigate a simple test
4933 case which detects a bug in gcc-4.0.
4934
8de3495c 49352005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
4936
4937 * DISTLIST: Added normal/completion.c.
4938
4939 * normal/completion.c: New file.
4940
4941 * term/i386/pc/console.c (grub_console_getwh): New function.
4942 (grub_console_term): Assign grub_console_getwh to getwh.
4943
4944 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
4945 function is defined in normal/completion.c as
4946 grub_normal_do_completion.
4947 (grub_cmdline_get): Use grub_normal_do_completion instead of
4948 grub_tab_complete.
4949
4950 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
4951 returns non-zero, otherwise return 0.
4952 (grub_partition_iterate): First, probe the partition map. Then,
4953 call ITERATE only for this partition map.
4954
4955 * kern/misc.c (grub_strncmp): Rewritten.
4956
4957 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
4958 returns non-zero. Otherwise return 0.
4959
4960 * include/grub/partition.h (grub_partition_map_iterate): Return
4961 int instead of void.
4962
4963 * include/grub/normal.h (grub_normal_do_completion): New prototype.
4964
4965 * include/grub/misc.h (grub_strncmp): Change the type of N to
4966 grub_size_t.
4967
4968 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
4969 of void.
4970
4971 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
4972 unsigned explictly before comparing it with I.
4973
4974 * kern/main.c (grub_env_write_root): Add the attribute unused into
4975 VAR.
4976
4977 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
4978 normal/completion.c.
4979 (normal_mod_SOURCES): Likewise.
4980 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4981 (normal_mod_SOURCES): Likewise.
4982
4983 * normal/command.c (grub_iterate_commands): If ITERATE returns
4984 non-zero, return one immediately.
4985
e85e144b 49862005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
4987
4988 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
4989 * kern/i386/pc/startup.S: Updated Global Descriptor table's
4990 descriptions.
4991 (grub_vbe_get_controller_info): New function.
4992 (grub_vbe_get_mode_info): Likewise.
4993 (grub_vbe_set_mode): Likewise.
4994 (grub_vbe_get_mode): Likewise.
4995 (grub_vbe_set_memory_window): Likewise.
4996 (grub_vbe_get_memory_window): Likewise.
4997 (grub_vbe_set_scanline_length): Likewise.
4998 (grub_vbe_get_scanline_length): Likewise.
4999 (grub_vbe_set_display_start): Likewise.
5000 (grub_vbe_get_display_start): Likewise.
5001 (grub_vbe_set_palette_data): Likewise.
5002 * include/grub/i386/pc/vbe.h: New file.
5003
c46153d2 50042005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5005
5006 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
5007 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
5008 * DISTLIST: Likewise.
5009 * kern/ieee1275/of.c: Moved to ...
5010 * kern/ieee1275/ieee1275.c: ... here.
5011
0cb90c45 50122005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5013
5014 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
5015 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
5016 Pass 0 as `end' parameter to grub_strtoul().
5017
a19fb360 50182005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5019
5020 * include/grub/powerpc/ieee1275/console.h: Do not include
5021 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
5022 ifdef.
5023 (grub_console_cur_color): Remove i386-specific prototype.
5024 (grub_console_real_putchar): Likewise.
5025 (grub_console_checkkey): Likewise.
5026 (grub_console_getkey): Likewise.
5027 (grub_console_getxy): Likewise.
5028 (grub_console_gotoxy): Likewise.
5029 (grub_console_cls): Likewise.
5030 (grub_console_setcursor): Likewise.
5031 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
5032 Include <grub/machine/console.h>.
5033 * term/ieee1275/ofconsole.c: Likewise.
5034
4ac9bd04 50352005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
5036
5037 * Makefile.in (LIBLZO): New variable.
5038
5039 * configure.ac: Check for LZO version 2.
5040
5041 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
5042 lzo/lzo1x.h instead of lzo1x.h.
5043
5044 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
5045 of -llzo.
5046
5047 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
5048 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
5049
5050 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
5051 copying the data from PARTITION to P.
5052
f4917dfd 50532005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5054
5055 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
5056 negative, unload the module.
5057
5058 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
5059 map is "pc_partition_map" but not "pc".
5060 (usage): Fix the description. The options are --boot-image and
5061 --core-image but not --boot-file or --core-file.
5062 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
5063 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
5064 DEFAULT_DIRECTORY.
5065
5066 * util/i386/pc/grub-install.in: Do not specify --boot-file or
5067 --core-file. Specify INSTALL_DEVICE as an argument.
5068
5069 * util/console.c: Include config.h.
5070 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
5071 [HAVE_NCURSES_H]: Include ncurses.h.
5072 [HAVE_CURSES_H]: Include curses.h.
5073 [!A_NORMAL] (A_NORMAL): Defined as zero.
5074 [!A_STANDOUT] (A_STANDOUT): Likewise.
5075
5076 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
5077 -lncurses.
5078 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
5079
5080 * configure.ac: Check for curses libraries and headers.
5081
5082 * Makefile.in (LIBCURSES): New variable.
5083
5084 * genmk.rb (Script::rule): Set the executable bits.
5085
5086 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
5087 name of the PC partition map is "pc_partition_map" but not "pc".
5088
0e143073 50892005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5090
5091 * util/i386/pc/grub-install.in (grub_probefs): New variable.
5092 (modules): Likewise.
5093 (usage): Added descriptions for --modules and --grub-probefs.
5094 Handle --modules and --grub-probefs. Save the arguments in MODULES
5095 and GRUB_PROBEFS, respectively.
5096 Auto-detect a filesystem module against GRUBDIR. If the result is
5097 empty and modules are not specified explicitly, abort the
5098 installation. Add the result to MODULES.
5099
5100 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
5101 disk/powerpc/ieee1275/ofdisk.c,
5102 include/grub/powerpc/ieee1275/init.h and
5103 term/powerpc/ieee1275/ofconsole.c.
5104 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
5105 term/ieee1275/ofconsole.c.
5106
5107 * include/grub/powerpc/ieee1275/console.h: Resurrected.
5108
5109 * COPYING: Upgraded to the latest version. Only the address of the
5110 FSF office has changed.
5111
efd6e6d5 51122005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5113
5114 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
5115 kern/ieee1275.c with kern/ieee1275/of.c.
5116
5117 * kern/ieee1275.c: Moved to ...
5118 * kern/ieee1275/of.c: ... here.
5119
8ceafda2 51202005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
5121
5122 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
5123 readablity.
5124
5125 * config.guess: Updated to the latest version from gnulib.
5126 * config.sub: Likewise.
5127 * install.sh: Likewise.
5128 * mkinstalldirs: Likewise.
5129
5130 * include/grub/console.h: Removed. This file is arch-specific. Do
5131 not put this in include/grub.
5132
5133 * include/grub/i386/pc/console.h: Resurrected.
5134
5135 * util/console.c: Include grub/machine/console.h instead of
5136 grub/console.h.
5137 * util/grub-emu.c: Likewise.
5138
267f6cd9 51392005-08-04 Marco Gerards <metgerards@student.han.nl>
5140
5141 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
5142 hardcoded value.
5143
5144 From Vincent Pelletier <subdino2004@yahoo.fr>
5145 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
5146 Redefined to use grub_getwh.
5147 (grub_term): New member named getwh.
5148 (grub_getwh): New prototype.
5149 * kern/term.c (grub_getwh): New function.
5150 * term/i386/pc/console.c (grub_console_getwh): New function.
5151 (grub_console_term): New member `getwh'.
5152 * term/i386/pc/vga.c (grub_vga_getwh): New function.
5153 (grub_vga_term): New member `getwh'.
0b5abe02 5154 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 5155 grub_ssize_t.
5156 (grub_ofconsole_getw): New function.
5157 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
5158 (grub_ofconsole_term): New field named getwh and new initial
5159 value.
5160
3be7266d 51612005-08-03 Hollis Blanchard <hollis@penguinppc.org>
5162
5163 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
5164 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
5165 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
5166 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
5167 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
5168 of <grub/machine/ieee1275.h>.
5169 * commands/ieee1275/reboot.c: Likewise.
5170 * boot/powerpc/ieee1275/ieee1275.c: Move ...
5171 * kern/ieee1275.c: ... to here. All users updated. Change all
5172 parameter structs to use new type `grub_ieee1275_cell_t'.
5173 * term/powerpc/ieee1275/ofconsole.c: Move ...
5174 * term/ieee1275/ofconsole.c: ... to here. All users updated.
5175 * disk/powerpc/ieee1275/ofdisk.c: Move ...
5176 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
5177 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
5178 to return int.
5179 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
5180 Remove unused prototypes. All users updated.
5181 * include/grub/powerpc/ieee1275/console.h: Removed.
5182 * include/grub/powerpc/ieee1275/ieee1275.h: Define
5183 `grub_ieee1275_cell_t'.
5184 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
5185 Cast comparisons with -1 to the correct type.
5186 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
5187 type to match `grub_ieee1275_entry_fn'.
5188
8b5f3938 51892005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
5190
5191 * DISTLIST: Added util/i386/pc/grub-probefs.c.
5192
5193 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
5194 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
5195 partmap/sun.c.
5196 (grub_probefs_SOURCES): New variable.
5197
5198 * util/i386/pc/grub-probefs.c: New file.
5199
5200 * util/i386/pc/grub-setup.c (main): Call
5201 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
5202 grub_hfs_init and grub_jfs_init to initialize the system. Call
5203 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
5204 grub_pc_partition_map_fini to finish the system.
5205
ea409713 52062005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
5207
5208 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
5209 function.
5210 (grub_multiboot_load_elf32): Likewise.
5211 (grub_multiboot_is_elf64): Likewise.
5212 (grub_multiboot_load_elf64): Likewise.
5213 (grub_multiboot_load_elf): Likewise.
5214 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
5215 an ELF32 or ELF64 file.
5216 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
5217
5218 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
5219 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
5220 NULL before calling FS->LABEL.
5221 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
5222 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
5223 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
5224 before calling FS->LABEL.
5225
141a288b 52262005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
5227
5228 * util/i386/pc/grub-install.in (datadir): New variable.
5229 (libdir): Removed.
5230 (pkgdatadir): New variable.
5231 (pkglibdir): Removed.
5232
0d5f8a54 52332005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
5234
5235 * DISTLIST: Added util/i386/pc/grub-install.in.
5236
5237 * util/i386/pc/grub-install.in: New file.
5238
5239 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
5240 (grub_install_SOURCES): Likewise.
5241
5242 * genmk.rb: Added support for scripts.
5243 (Script): New class.
5244 (scripts): New variable.
5245
5246 * Makefile.in (install-local): Install sbin_SCRIPTS by
5247 INSTALL_SCRIPT.
5248 (uninstall): Remove sbin_SCRIPTS.
5249
5250 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
5251 device, try to get a GRUB device by
5252 grub_util_biosdisk_get_grub_dev.
5253 Free DEST_DEV.
5254
5255 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
5256 description for --device-map.
5257
5f968e1e 52582005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
5259
5260 Change the semantics of variable hooks. They now return strings
5261 instead of error values.
5262
5263 * util/i386/pc/grub-setup.c: Include grub/env.h.
5264 (setup): Use grub_device_set_root instead of grub_env_set.
5265
5266 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
5267 grub_env_get instead of grub_device_set_root and
5268 grub_device_get_root, respectively.
5269
5270 * kern/main.c (grub_env_write_root): New function.
5271 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
5272 grub_env_set instead of grub_device_set_root.
5273
5274 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
5275 many variables.
5276 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
5277 rather than calling ENV->WRITE_HOOK afterwards.
5278 (grub_env_get): Return the result of ENV->READ_HOOK rather than
5279 passing a pointer of a pointer.
5280 (grub_register_variable_hook): Change the types of "read_hook" and
5281 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
5282 respectively.
5283 Allocate the default empty string on the heap, because this string
5284 may be freed later.
5285
5286 * kern/device.c: Include grub/env.h.
5287 (grub_device_set_root): Removed.
5288 (grub_device_get_root): Likewise.
5289 (grub_device_open): Use grub_env_get instead of
5290 grub_device_get_root.
5291
5292 * include/grub/env.h (grub_env_read_hook_t): New type.
5293 (grub_env_write_hook_t): Likewise.
5294 (grub_env_var): Change the types of "read_hook" and "write_hook"
5295 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
5296 (grub_register_variable_hook): Likewise.
5297
5298 * include/grub/device.h (grub_device_set_root): Removed.
5299 (grub_device_set_root): Likewise.
5300
5301 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
5302 make sure that DIRNAME terminates with '/', so that
5303 grub_fat_find_dir will fail if PATH is not a directory.
5304
5305 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
5306 from DIRNAME.
5307 Use the qualifier auto for print_files and print_files_long.
5308 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
5309 as a regular file.
5310 Put a newline only if there is no error.
5311 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
5312 used.
5313
896f0afd 53142005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
5315
5316 * kern/partition.c (grub_partition_probe): Initialize PART to
5317 NULL. Otherwise, when no partition map is registered, this returns
5318 a garbage.
5319
b28b81b2 53202005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
5321
5322 * partmap/apple.c (apple_partition_map_iterate): Check if POS
5323 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
5324 valid.
5325
5f3607e0 53262005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
5327
5328 * commands/ls.c (grub_ls_list_disks): Print the filesystem
5329 information on each device, if it does not have partitions. Print
5330 "Device" instead of "Disk", because this function is not specific
5331 to disk devices.
5332
5333 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
5334 static to ensure that it is put on the memory rather than a
5335 register.
5336
502c87e8 53372005-07-17 Yoshinori Okuji <okuji@enbug.org>
5338
5339 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
5340 (grub_cat_init): Likewise.
5341 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
5342 (options): Likewise.
5343 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
5344 (grub_configfile_init): Likewise.
5345 * font/manager.c (GRUB_MOD_INIT): Likewise.
5346 * commands/help.c (GRUB_MOD_INIT): Likewise.
5347 (grub_help_init): Likewise.
5348 * normal/command.c (grub_command_init): Likewise.
5349 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
5350 * disk/loopback.c (grub_loop_init): Likewise.
5351 (GRUB_MOD_INIT): Likewise.
5352 * commands/ls.c (grub_ls_init): Likewise.
5353 (GRUB_MOD_INIT): Likewise.
5354 (options): Likewise.
5355 * commands/boot.c (grub_boot_init): Likewise.
5356 (GRUB_MOD_INIT): Likewise.
5357 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
5358 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
5359 (GRUB_MOD_INIT): Likewise.
5360 * commands/cmp.c (grub_cmp_init): Likewise.
5361 (GRUB_MOD_INIT): Likewise.
5362
5363 * normal/arg.c: Use <> instead of "" to include header files.
5364 (SHORT_ARG_HELP): New macro.
5365 (SHORT_ARG_USAGE): Likewise.
5366 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
5367 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
5368 descriptions.
5369 (find_short): Check if C is 'h' or 'u' explicitly.
5370 (grub_arg_show_help): Use space characters instead of tabs. Treat
5371 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
5372 are shown with --help and --usage only if they are not used for
5373 the command itself.
5374 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
5375 'h' and 'u'.
5376
5377 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
5378 const into "longarg". Change the type of "shortarg" to int.
5379
f806d18e 53802005-07-17 Yoshinori Okuji <okuji@enbug.org>
5381
5382 * boot/i386/pc/boot.S (boot_drive_check): New label.
5383
5384 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
5385 macro.
5386
5387 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
5388 which do not pass a boot drive correctly. Copied from GRUB Legacy.
5389
e293232b 53902005-07-17 Yoshinori Okuji <okuji@enbug.org>
5391
5392 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
5393 When turning off Gate A20, skip the check and return immediately,
5394 because this is not fatal usually.
5395
ebedfd00 53962005-07-17 Yoshinori Okuji <okuji@enbug.org>
5397
5398 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
5399 be 0x7C00 instead of 0x8000.
5400
5401 * boot/i386/pc/pxeboot.S: Rewritten.
5402
5403 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
5404 EXT_C.
5405 (gate_a20_check_state): Read a byte from 0x108000. Invert the
5406 result.
5407
654fc59f 54082005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
5409
5410 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
5411 robustness. This routine now supports a BIOS call and System
5412 Control Port A to modify the gate A20.
5413
5414 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5415 Increased to 0x440.
5416
09f9923f 54172005-07-12 Hollis Blanchard <hollis@penguinppc.org>
5418
5419 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
5420 device path and resulting ihandle.
5421 (grub_ofdisk_close): dprintf the ihandle being closed.
5422 (grub_ofdisk_read): dprintf function parameters.
5423 * kern/mm.c (grub_mm_init_region): Likewise.
5424 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
5425 (grub_linux_boot): dprintf the Linux entry point, initrd address and
5426 size, and boot arguments.
5427 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
5428 before loading into memory.
5429 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
5430 before loading into memory.
5431
7ef504d8 54322005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
5433
5434 * kern/mm.c: Added much documentation.
5435 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
5436 8, set to 5 instead of 8.
5437
e0f050c2 54382005-07-10 Yoshinori Okuji <okuji@enbug.org>
5439
5440 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
5441
5442 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
5443 (grub_mkdevicemap_SOURCES): New variable.
5444
5445 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
5446 lib/device.c of GRUB Legacy.
5447
7224189a 54482005-07-10 Yoshinori Okuji <okuji@enbug.org>
5449
5450 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
5451 instead of PATH is NULL.
5452
68c864eb 54532005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
5454
5455 * commands/cmp.c (BUFFER_SIZE): New macro.
5456 (grub_cmd_cmp): Close the right file at the right time. Compare
5457 only data just read. Don't report files of different size as
5458 identical. Dynamically allocate buffers. Move variable
5459 declarations at the beginning of function.
5460
e6f3e614 54612005-07-09 Yoshinori Okuji <okuji@enbug.org>
5462
5463 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
5464 reverse.
5465
f8f1559a 54662004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
5467
5468 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
5469 when backspace is pressed at beginning of line.
5470
39c9d41d 54712005-07-03 Yoshinori Okuji <okuji@enbug.org>
5472
5473 * DISTLIST: Added genfslist.sh.
5474
5475 * normal/main.c (fs_module_list): New variable.
5476 (autoload_fs_module): New function.
5477 (read_fs_list): Likewise.
5478 (grub_normal_execute): Call read_fs_list.
5479
5480 * kern/fs.c (grub_fs_autoload_hook): New variable.
5481 (grub_fs_probe): Added support for auto-loading.
5482
5483 * include/grub/normal.h (struct grub_fs_module_list): New struct.
5484 (grub_fs_module_list_t): New type.
5485
5486 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
5487 (grub_fs_autoload_hook): New prototype.
5488
5489 * genfslist.sh: New file.
5490
5491 * genmk.rb: Added a rule to generate a filesystem list.
5492
121c1d83 54932005-06-30 Marco Gerards <metgerards@student.han.nl>
5494
5495 * configure.ac: Fix the test for cross-compiling.
5496
5497 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
5498 define GRUB_UTIL anymore.
5499
5500 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
5501 so this function works on other systems than just big endian.
5502 (load_modules): Likewise.
5503 (add_segments): Likewise.
5504
e75d76e1 55052005-06-23 Hollis Blanchard <hollis@penguinppc.org>
5506
5507 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
5508 contains `l' modifier, get a long from va_arg().
5509
50b5a0a7 55102005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
5511
5512 * kern/mm.c (grub_free): If the next free block which is being
5513 merged is the first free block, set the first block to the block
5514 being freed.
5515 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
5516
89371b20 55172005-05-08 Hollis Blanchard <hollis@penguinppc.org>
5518
5519 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
5520 `grub_ieee1275_chosen'.
5521
168d6e58 55222005-05-08 Hollis Blanchard <hollis@penguinppc.org>
5523
5524 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
5525 (grub_ieee1275_chosen): New variable.
5526 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
5527 `chosen'.
5528 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
5529 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
5530 Rename first argument to `phandle' for consistency.
5531 (grub_ieee1275_get_property_length): Likewise.
5532 (grub_ieee1275_next_property): Likewise. Change type of first argument
5533 to grub_ieee1275_phandle_t.
5534 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
5535 Move export next to declaration.
5536 (grub_ieee1275_chosen): New variable.
5537 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
5538 Correct cosmetic typo.
5539 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
5540 `grub_ieee1275_chosen'.
5541 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
5542 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
5543 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
5544 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
5545 `grub_ieee1275_chosen'.
5546
ca5baa3f 55472005-05-10 Hollis Blanchard <hollis@penguinppc.org>
5548
5549 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
5550 /chosen/bootargs.
5551 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
5552 /chosen/bootargs as "variable=value" pairs.
5553
708b345f 55542005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
5555
5556 * include/grub/misc.h (grub_dprintf): New macro.
5557 (grub_real_dprintf): New prototype.
5558 (grub_strword): Likewise.
5559 (grub_iswordseparator): Likewise.
5560 * kern/misc.c (grub_real_dprintf): New function.
5561 (grub_strword): Likewise.
5562 (grub_iswordseparator): Likewise.
5563
f4c5e67c 55642005-04-30 Hollis Blanchard <hollis@penguinppc.org>
5565
5566 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
5567 (roundup): Remove macro.
5568 (grub_ieee1275_flags): Make static.
5569 (grub_ieee1275_realmode): Remove.
5570 (grub_ieee1275_test_flag): New function.
5571 (grub_ieee1275_set_flag): Likewise.
5572 (find_options): Rename to `grub_ieee1275_find_options'; update
5573 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
5574 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
5575 (cmain): New prototype.
5576 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
5577 `grub_ieee1275_flags' directly.
5578 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
5579 machine/biosdisk.h.
5580 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
5581 Don't include grub/machine/init.h.
5582 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
5583 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
5584 Remove prototype.
5585 (grub_ieee1275_realmode): Likewise.
5586 (grub_ieee1275_flag): New enum.
5587 (grub_ieee1275_test_flag): New prototype.
5588 (grub_ieee1275_set_flag): New prototype.
5589 * include/grub/powerpc/ieee1275/init.h: Remove file.
5590 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
5591 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
5592 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
5593 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
5594 comment.
5595 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
5596 `grub_ieee1275_test_flag'.
5597 (grub_ieee1275_encode_devname): Likewise.
5598
ed16607e 55992005-04-21 Hollis Blanchard <hollis@penguinppc.org>
5600
5601 * include/grub/powerpc/ieee1275/ieee1275.h
5602 (grub_ieee1275_encode_devname): New prototype.
5603 (grub_ieee1275_get_filename): Likewise.
5604 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
5605 function.
5606 (grub_set_prefix): Likewise.
5607 (grub_machine_init): Call grub_set_prefix.
5608 * kern/powerpc/ieee1275/openfw.c: Fix typos.
5609 (grub_parse_type): New enum.
5610 (grub_ieee1275_get_devargs): New function.
5611 (grub_ieee1275_get_devname): Likewise.
5612 (grub_ieee1275_parse_args): Likewise.
5613 (grub_ieee1275_get_filename): Likewise.
5614 (grub_ieee1275_encode_devname): Likewise.
5615
be369920 56162005-03-30 Marco Gerards <metgerards@student.han.nl>
5617
5618 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
5619 `grub_loader_unset'.
5620
a5ce3a4a 56212005-03-26 Hollis Blanchard <hollis@penguinppc.org>
5622
5623 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
5624 instead of grub_ieee1275_interpret.
5625 (grub_halt_init): New function.
5626 (grub_halt_fini): Likewise.
5627 (GRUB_MOD_INIT): Correct message grammar.
5628 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
5629 instead of grub_ieee1275_interpret.
5630 (grub_reboot_init): New function.
5631 (grub_reboot_fini): Likewise.
5632 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
5633 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
5634 util/i386/pc/misc.c with commands/ieee1275/halt.c,
5635 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
5636 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
5637 function.
5638 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
5639 Add prototype.
5640 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
5641 prototype.
5642 (grub_halt): Likewise.
5643 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
5644 (cmain): Remove __attribute__((unused)).
5645 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
5646 (grub_heap_len): Likewise.
5647 (grub_machine_fini): New function.
5648 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
5649 (grub_halt): Likewise.
5650 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
5651 function.
5652 * util/powerpc/ieee1275/misc.c: New file.
5653
0058f771 56542005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
5655
5656 * DISTLIST: New file.
5657 * gendistlist.sh: Likewise.
5658
5659 * Makefile.in (COMMON_DISTFILES): Removed.
5660 (BOOT_DISTFILES): Likewise.
5661 (CONF_DISTFILES): Likewise.
5662 (DISK_DISTFILES): Likewise.
5663 (FS_DISTFILES): Likewise.
5664 (INCLUDE_DISTFILES): Likewise.
5665 (KERN_DISTFILES): Likewise.
5666 (LOADER_DISTFILES): Likewise.
5667 (TERM_DISTFILES): Likewise.
5668 (UTIL_DISTFILES): Likewise.
5669 (DISTFILES): Likewise.
5670 (uninstall): Uninstall files in $(pkgdata_DATA).
5671 (DISTLIST): New target.
5672 (distdir): Use the contents of the file DISTLIST to get a list of
5673 distributed files.
5674
46b3b8a5 56752005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
5676
5677 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
5678 descriptor. This is ported from GRUB Legacy.
5679
5680 * gencmdlist.sh: Added an extra semicolon to make it work with
5681 old sed versions. Reported by Robert Bihlmeyer
5682 <robbe@orcus.priv.at>.
5683
5822ff87 56842005-03-08 Yoshinori Okuji <okuji@enbug.org>
5685
5686 Automatic loading of commands is supported.
5687
5688 * normal/main.c (read_command_list): New function.
5689 (grub_normal_execute): Call read_command_list.
5690
5691 * normal/command.c (grub_register_command): Return zero or CMD.
5692 Allocate CMD->NAME from the heap.
5693 Initialize CMD->MODULE_NAME to zero.
5694 Find the same name as well. If the same command is found and it is
5695 a dummy command, overwrite members. If it is not a dummy command,
5696 return zero.
5697 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
5698 (grub_command_find): If a dummy command is found, load a module
5699 and retry to find a command only once.
5700
5701 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
5702 make sure that each command is loaded.
5703
5704 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
5705 macro.
5706 (struct grub_command): Remove const from the member `name'.
5707 Add a new member `module_name'.
5708 (grub_register_command): Return grub_command_t.
5709
5710 * commands/help.c (grub_cmd_help): Call grub_command_find to make
5711 sure that each command is loaded.
5712
5713 * genmk.rb (PModule::rule): Specify a module name without the
5714 suffix ".mod" to gencmdlist.sh.
5715
7b1f4b57 57162005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
5717
5718 * gencmdlist.sh: New file.
5719
5720 * genmk.rb (PModule::rule): Generate a rule for a command list.
5721 Clean command.lst.
5722 Generate command.lst from $(COMMANDFILES).
5723
5724 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
5725 (DATA): Added $(pkgdata_DATA).
5726 (install-local): Install files in $(pkgdata_DATA).
5727
062aaf39 57282005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
5729
5730 * term/i386/pc/vga.c (debug_command): Removed.
5731 (GRUB_MOD_INIT): Do not register the command "debug".
5732
5733 From Hollis Blanchard:
5734 * commands/configfile.c: New file.
5735 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
5736 commands/configfile.c.
5737 (pkgdata_MODULES): Added configfile.mod.
5738 (configfile_mod_SOURCES): New variable.
5739 (configfile_mod_CFLAGS): Likewise.
5740 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
5741 commands/configfile.c.
5742 (pkgdata_MODULES): Added configfile.mod.
5743 (configfile_mod_SOURCES): New variable.
5744 (configfile_mod_CFLAGS): Likewise.
5745 * util/grub-emu.c (main): Call grub_configfile_init and
5746 grub_configfile_fini.
5747 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
5748 prototype.
5749 [GRUB_UTIL] (grub_configfile_fini): Likewise.
5750
cee01aa6 57512005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
5752
5753 * normal/arg.c (grub_arg_show_help): Do not show the bug report
5754 address.
5755
5756 * commands/help.c (grub_cmd_help): Do not print newlines after
5757 the last command in print_command_help.
5758
93f3a1d8 57592005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
5760
5761 * commands/default.h: New file.
5762 * commands/timeout.h: Likewise.
5763 * normal/context.c: Likewise.
5764
5765 * util/misc.c: Do not include sys/times.h.
5766 Include sys/time.h and grub/machine/time.h.
5767 (grub_get_rtc): Rewritten with gettimeofday.
5768
5769 * util/grub-emu.c (main): Call grub_default_init and
5770 grub_timeout_init before grub_normal_init, and call
5771 grub_timeout_fini and grub_default_fini after grub_main.
5772
5773 * util/console.c (grub_ncurses_checkkey): Return the read
5774 character or -1.
5775
5776 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
5777 timeouts.
5778
5779 * normal/main.c (read_config_file): Push MENU. If this fails,
5780 print an error and wait for a user input.
5781 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
5782 If a menu is empty or an error occurs, pop MENU.
5783 (grub_normal_execute): Pop and free MENU after grub_menu_run
5784 returns.
5785
5786 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
5787
5788 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
5789 include time.h.
5790 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
5791 without GRUB_UTIL.
5792 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
5793 time.h.
5794 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
5795 without GRUB_UTIL.
5796
5797 * include/grub/normal.h (struct grub_menu_list): New struct.
5798 (grub_menu_list_t): New type.
5799 (struct grub_context): New struct.
5800 (grub_context_t): New type.
5801 (grub_register_command): Got rid of EXPORT_FUNC.
5802 (grub_unregister_command): Likewise.
5803 (grub_context_get): New prototype.
5804 (grub_context_get_current_menu): Likewise.
5805 (grub_context_push_menu): Likewise.
5806 (grub_context_pop_menu): Likewise.
5807 [GRUB_UTIL] (grub_default_init): Likewise.
5808 [GRUB_UTIL] (grub_default_fini): Likewise.
5809 [GRUB_UTIL] (grub_timeout_init): Likewise.
5810 [GRUB_UTIL] (grub_timeout_fini): Likewise.
5811
5812 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
5813 commands/timeout.c and normal/context.c.
5814 (pkgdata_MODULES): Added default.mod and timeout.mod.
5815 (normal_mod_SOURCES): Added normal/context.c.
5816 (default_mod_SOURCES): New variable.
5817 (default_mod_CFLAGS): Likewise.
5818 (timeout_mod_SOURCES): Likewise.
5819 (timeout_mod_CFLAGS): Likewise.
5820 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
5821 conf/i386-pc.rmk.
5822 (pkgdata_MODULES): Added default.mod and timeout.mod.
5823 (normal_mod_SOURCES): Added normal/context.c.
5824 (default_mod_SOURCES): New variable.
5825 (default_mod_CFLAGS): Likewise.
5826 (timeout_mod_SOURCES): Likewise.
5827 (timeout_mod_CFLAGS): Likewise.
5828
5829 * Makefile.in (all-local): Added $(MKFILES).
5830
4ed2e1dd 58312005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
5832
5833 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
5834 (grub_emu_SOURCES): Likewise.
5835 (pkgdata_MODULES): Add `sun.mod'.
5836 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
5837 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
5838 `partmap/sun.c'.
5839 (pkgdata_MODULES): Add `sun.mod'.
5840 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
5841 * include/grub/partition.h (grub_sun_partition_map_init): New
5842 prototype.
5843 (grub_sun_partition_map_fini): Likewise.
5844 * partmap/sun.c: New file.
5845 * util/grub-emu.c (main): Initialize and de-initialize the sun
5846 partitionmap support.
5847
4d4e372e 58482005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
5849
5850 This implements an Emacs-like menu entry editor.
5851
5852 * normal/menu_entry.c: New file.
5853
5854 * util/console.c (grub_ncurses_putchar): Translate some Unicode
5855 characters to ASCII.
5856 (saved_char): New variable.
5857 (grub_ncurses_checkkey): Rewritten completely.
5858 (grub_ncurses_getkey): Likewise.
5859 (grub_ncurses_init): Call raw instead of cbreak.
5860
5861 * normal/menu.c (print_entry): Do not put a space.
5862 (init_page): Renamed to ...
5863 (grub_menu_init_page): ... this. All callers changed.
5864 (edit_menu_entry): Removed.
5865 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
5866
5867 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
5868
5869 * kern/misc.c (grub_vprintf): Call grub_refresh.
5870
5871 * normal/menu.c (DISP_LEFT): Renamed to ...
5872 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
5873 * normal/menu.c (DISP_UP): Renamed to ...
5874 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
5875 * normal/menu.c (DISP_RIGHT): Renamed to ...
5876 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
5877 * normal/menu.c (DISP_DOWN): Renamed to ...
5878 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
5879 * normal/menu.c (DISP_HLINE): Renamed to ...
5880 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
5881 * normal/menu.c (DISP_VLINE): Renamed to ...
5882 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
5883 * normal/menu.c (DISP_UL): Renamed to ...
5884 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
5885 * normal/menu.c (DISP_UR): Renamed to ...
5886 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
5887 * normal/menu.c (DISP_LL): Renamed to ...
5888 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
5889 * normal/menu.c (DISP_LR): Renamed to ...
5890 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
5891 * normal/menu.c (TERM_WIDTH): Renamed to ...
5892 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
5893 * normal/menu.c (TERM_HEIGHT): Renamed to ...
5894 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
5895 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
5896 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
5897 * normal/menu.c (TERM_MARGIN): Renamed to ...
5898 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
5899 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
5900 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
5901 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
5902 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
5903 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
5904 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
5905 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
5906 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
5907 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
5908 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
5909 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
5910 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
5911 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
5912 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
5913 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
5914 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
5915 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
5916 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
5917 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
5918 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
5919 All callers changed.
5920
5921 * include/grub/normal.h: New prototype.
5922
5923 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
5924 normal/menu_entry.c.
5925 (normal_mod_SOURCES): Likewise.
5926 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5927 (normal_mod_SOURCES): Likewise.
5928
e6b92c8a 59292005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
5930
5931 * include/grub/normal.h (grub_halt_init): New prototype.
5932 (grub_halt_fini): Likewise.
5933 (grub_reboot_init): Likewise.
5934 (grub_reboot_fini): Likewise.
5935
5936 * util/grub-emu.c: Include signal.h.
5937 (main_env): New global variable.
5938 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
5939 catch C-c.
5940 (grub_machine_fini): New function.
5941 (main): Call grub_halt_init and grub_reboot_init before
5942 grub_main, and grub_reboot_fini and grub_halt_fini after it.
5943 Call setjmp with MAIN_ENV to go back afterwards.
5944 Call grub_machine_fini right before return.
5945
5946 * include/grub/util/misc.h: Include setjmp.h.
5947 (main_env): New prototype.
5948
5949 * include/grub/kernel.h (grub_machine_fini): New prototype.
5950 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
5951 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
5952
5953 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
5954 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
5955 * term/i386/pc/console.c (grub_console_fini): Likewise.
5956
5957 * util/i386/pc/misc.c: New file.
5958
5959 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
5960 util/i386/pc/misc.c, commands/i386/pc/halt.c and
5961 commands/i386/pc/reboot.c.
5962
c642636f 59632005-02-14 Guillem Jover <guillem@hadrons.org>
5964
5965 * include/grub/dl.h (grub_dl_check_header): New prototype.
5966 (grub_arch_dl_check_header): Change return type to grub_err_t,
5967 remove size parameter and export function. Update all callers.
5968 * kern/dl.c (grub_dl_check_header): New function.
5969 (grub_dl_load_core): Use `grub_dl_check_header' instead of
5970 `grub_arch_dl_check_header'. Check ELF type. Check if sections
5971 are inside the core.
5972 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
5973 independent ELF header checks.
5974 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
5975 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
5976 `grub_dl_check_header' instead of explicit checks. Check for the
5977 ELF type.
5978 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
5979 `grub_dl_check_header' instead of explicit checks. Remove arch
5980 specific ELF header checks.
5981
e6b92c8a 5982 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
5983 argument SIZE.
5984
5eabe94b 59852005-02-13 Hollis Blanchard <hollis@penguinppc.org>
5986
5987 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
5988 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
5989
1b14a681 59902005-02-12 Hollis Blanchard <hollis@penguinppc.org>
5991
5992 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
5993 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
5994 (part_map_iterate): Clear `grub_errno' and return 0 if
5995 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
5996 * partmap/amiga.c (amiga_partition_map_iterate): Return
5997 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
5998 * partmap/apple.c (apple_partition_map_iterate): Likewise.
5999
aca108aa 60002005-02-01 Guillem Jover <guillem@hadrons.org>
6001
6002 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
6003 help info.
6004
c9f9c556 60052005-01-31 Marco Gerards <metgerards@student.han.nl>
6006
6007 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
6008 Removed prototype.
6009 (grub_rescue_cmd_linux): New prototype.
6010 (grub_rescue_cmd_initrd): Likewise.
6011 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
6012 `bi_rec'.
6013 (grub_linux_release_mem): Release the memory for the initrd.
6014 (grub_load_linux): Renamed from this...
6015 (grub_rescue_cmd_linux): ...To this. Changed all callers.
6016 Changed `entry' not to be static. Loop over memory regions to
6017 find another one when the default fails.
6018 (grub_rescue_cmd_initrd): New function.
6019 (grub_linux_init): Remove function.
6020 (grub_linux_fini): Likewise.
6021 (GRUB_MOD_INIT): Register `initrd'.
6022 (GRUB_MOD_FINI): Unregister `initrd'.
6023 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
6024 Function removed.
6025 (grub_linux_normal_fini): Likewise.
6026 (GRUB_MOD_INIT): Register `initrd'.
6027 (GRUB_MOD_FINI): Unregister `initrd'.
6028
990cf3aa 60292005-01-31 Marco Gerards <metgerards@student.han.nl>
6030
6031 * commands/help.c: New file.
6032 * normal/arg.c (show_help): Renamed to...
6033 (grub_arg_show_help): ... this.
6034 * commands/i386/pc/halt.c: New file.
6035 * commands/i386/pc/reboot.c: Likewise.
6036 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
6037 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
6038 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
6039 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
6040 variables.
6041 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6042 `commands/help.c'.
6043 (pkgdata_MODULES): Add `help.mod'.
6044 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
6045 * grub/i386/pc/init.h (grub_reboot): New prototype.
6046 (grub_halt): Likewise.
6047 * include/grub/normal.h (grub_arg_show_help): New prototype.
6048 (grub_help_init): Likewise.
6049 (grub_help_fini): Likewise.
6050 * util/grub-emu.c (main): Initialize and deinitialize the help
6051 command.
6052
6053 * normal/cmdline.c (grub_cmdline_get): Doc fix.
6054
6055 * normal/command.c (grub_command_init): Fixed the description of
6056 the `set' and `unset' commands.
6057
60582005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 6059
6060 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
6061 function.
6062 * commands/ieee1275/halt.c: New file.
6063 * commands/ieee1275/reboot.c: Likewise.
6064 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
6065 `__attribute__ ((unused))'. Some GCS related fixed.
6066 (grub_suspend_init) [GRUB_UTIL]: Function removed.
6067 (grub_suspend_fini): Likewise.
6068 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
6069 and `halt.mod'.
6070 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
6071 (halt_mod_CFLAGS): New variables.
6072 * include/grub/powerpc/ieee1275/ieee1275.h
6073 (grub_ieee1275_interpret): New prototype.
6074
1ab09cc7 60752005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
6076
6077 * include/grub/misc.h (memmove): New prototype.
6078 (memcpy): Likewise.
6079
8b8cbdb2 60802005-01-22 Hollis Blanchard <hollis@penguinppc.org>
6081
6082 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
6083 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
6084
e3741a27 60852005-01-22 Marco Gerards <metgerards@student.han.nl>
6086
6087 * kern/misc.c (grub_strndup): Function rewritten.
6088
776bd780 60892005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
6090
6091 * normal/menu.c (TERM_WIDTH): Macro redefined.
6092 (TERM_TOP_BORDER_Y): Likewise.
6093 (draw_border): Replaced while-loop by a for-loop. Make the number
6094 of lines consistent with the number of lines displayed in
6095 print_entries. Added a margin below the rectangle.
6096 (print_entry): Make the entry fit in the rectangle.
6097 (print_entries): Display the scroll arrows next to the right
6098 border.
6099
78026bce 61002005-01-21 Marco Gerards <metgerards@student.han.nl>
6101
6102 * fs/minix.c (grub_minix_find_file): Reserve more space for
6103 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
6104 `grub_strncpy' to copy `path' into it.
6105
67bbaf0f 61062005-01-21 Marco Gerards <metgerards@student.han.nl>
6107
6108 Add the loopback device, a device via which files can be accessed
6109 as devices.
6110
6111 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
6112 (pkgdata_MODULES): Add loopback.mod.
6113 (loopback_mod_SOURCES): New variable.
6114 (loopback_mod_CFLAGS): Likewise.
6115 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6116 `disk/loopback.c'.
6117 (pkgdata_MODULES): Add loopback.mod.
6118 (loopback_mod_SOURCES): New variable.
6119 (loopback_mod_CFLAGS): Likewise.
6120 * disk/loopback.c: new file.
6121 * include/grub/normal.h (grub_loop_init): New prototype.
6122 (grub_loop_fini): New prototype.
6123 * util/grub-emu.c (main): Initialize and de-initialize loopback
6124 support.
6125 * include/grub/disk.h (grub_disk_dev_id): Add
6126 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
6127
6f1c18bd 61282005-01-20 Hollis Blanchard <hollis@penguinppc.org>
6129
6130 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
6131 function.
6132 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
6133 (suspend_mod_SOURCES): New variable.
6134 (suspend_mod_CFLAGS): Likewise.
6135 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
6136 New prototype.
6137 * commands/ieee1275/suspend.c: New file.
6138
b38551da 61392005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6140
6141 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
6142 ((unused))' to `__attribute__ ((used))'.
6143 (GRUB_MOD_FINI): Likewise.
6144 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
6145 * genmk.rb (PModule): Assign space to common symbols when linking
6146 modules.
6147
777aff39 61482005-01-20 Marco Gerards <metgerards@student.han.nl>
6149
6150 * include/grub/mm.h (grub_mm_init_region): Change the type of the
6151 `unsigned' arguments to `grub_size_t'.
6152 (grub_malloc): Likewise.
6153 (grub_realloc): Likewise.
6154 (grub_memalign): Likewise.
6155 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
6156 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
6157 * util/misc.c (grub_malloc): Likewise.
6158 (grub_realloc): Likewise.
6159 * kern/mm.c (get_header_from_pointer): Change the casts to
6160 `unsigned' into a cast to `grub_size_t'.
6161
6162 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
6163 point to `currnode' when `currnode' is changed.
6164
6165 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
6166 Schottelius <nico-linux@schottelius.org>.
6167
d0ff18e1 61682005-01-09 Hollis Blanchard <hollis@penguinppc.org>
6169
6170 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
6171 (note_path): Remove variable.
6172 (GRUB_IEEE1275_NOTE_NAME): New macro.
6173 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
6174 (grub_ieee1275_note_hdr): New structure.
6175 (grub_ieee1275_note_desc): Likewise.
6176 (grub_ieee1275_note): Likewise.
6177 (load_note): Remove `dir' argument. All callers updated. Remove
6178 `note_img' and `path'. Do not load a file from `note_path'.
6179 Initialize a struct grub_ieee1275_note and write that to `out'.
6180 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
6181
4ca7004c 61822005-01-05 Marco Gerards <metgerards@student.han.nl>
6183
6184 * util/misc.c (grub_util_read_image): Revert last change. It
6185 called `grub_util_read_at', which seeks from the beginning of the
6186 file.
6187
0b412211 61882005-01-04 Hollis Blanchard <hollis@penguinppc.org>
6189
6190 * TODO: Add note about endianness in grub-mkimage.
6191 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
6192 section.
6193 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
6194 (grub_mkimage_SOURCES): New target.
6195 * include/grub/kernel.h (grub_start_addr): Remove variable.
6196 (grub_end_addr): Likewise.
6197 (grub_total_module_size): Likewise.
6198 (grub_kernel_image_size): Likewise.
6199 (GRUB_MODULE_MAGIC): New constant.
6200 (grub_module_info): New structure.
6201 (grub_arch_modules_addr): New prototype.
6202 (grub_get_end_addr): Remove prototype.
6203 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
6204 * include/grub/powerpc/ieee1275/kernel.h: New file.
6205 * include/grub/util/misc.h (grub_util_get_fp_size): New
6206 prototype.
6207 (grub_util_read_at): Likewise.
6208 (grub_util_write_image_at): Likewise.
6209 * kern/main.c (grub_get_end_addr): Remove function.
6210 (grub_load_modules): Call grub_arch_modules_addr instead of using
6211 grub_end_addr. Look for a grub_module_info struct in memory. Use
6212 the grub_module_info fields instead of calling grub_get_end_addr
6213 as loop conditions. Move grub_add_unused_region code here.
6214 (grub_add_unused_region): Remove function.
6215 * kern/i386/pc/init.c: Include grub/cache.h.
6216 (grub_machine_init): Remove call to grub_get_end_addr. Remove
6217 one call to add_mem_region.
6218 (grub_arch_modules_addr): New function.
6219 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
6220 (grub_total_module_size): Likewise.
6221 Include grub/machine/kernel.h.
6222 (grub_arch_modules_addr): New function.
6223 * util/grub-emu.c (grub_end_addr): Remove variable.
6224 (grub_total_module_size): Likewise.
6225 (grub_arch_modules_addr): New function.
6226 * util/misc.c: Include unistd.h.
6227 (grub_util_get_fp_size): New function.
6228 (grub_util_read_at): Likewise.
6229 (grub_util_write_image_at): Likewise.
6230 (grub_util_read_image): Call grub_util_read_at.
6231 (grub_util_write_image): Call grub_util_write_image_at.
6232 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
6233 additional memory in kernel_img for a struct grub_module_info.
6234 Fill in that grub_module_info.
6235 * util/powerpc/ieee1275/grub-mkimage.c: New file.
6236
458786f8 62372005-01-03 Hollis Blanchard <hollis@penguinppc.org>
6238
6239 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
6240 New function.
6241 * include/grub/powerpc/ieee1275/ieee1275.h
6242 (grub_ieee1275_milliseconds): New prototype.
6243 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
6244 Change to 1000.
6245 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
6246 grub_ieee1275_milliseconds.
6247
ac507d1b 62482005-01-03 Hollis Blanchard <hollis@penguinppc.org>
6249
6250 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
6251 variable.
6252 (find_options): New function.
6253 (cmain): Call find_options.
6254 * include/grub/powerpc/ieee1275/ieee1275.h
6255 (grub_ieee1275_realmode): New extern variable.
6256 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
6257 grub_map if grub_ieee1275_realmode is false.
6258
6b8fd1c4 62592004-12-29 Marco Gerards <metgerards@student.han.nl>
6260
6261 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
6262 lines are inserted and make it work like readline. Reported by
6263 Vincent Pelletier <subdino2004@yahoo.fr>.
6264
8514a1e0 62652004-12-28 Marco Gerards <metgerards@student.han.nl>
6266
6267 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
6268
6269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
6270 `kern/powerpc/cache.S'.
6271
924b6140 62722004-12-27 Marco Gerards <metgerards@student.han.nl>
6273
6274 * genmk.rb: Handle the `Program' class in the main loop. Written
6275 by Johan Rydberg <jrydberg@gnu.org>.
6276 (Program): New class.
6277 (programs): New variable.
6278 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
6279 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
6280 instead of "grub/kernel.h". Include <grub/machine/init.h>.
6281 (help_arch): Function removed.
6282 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
6283 `powerpc/libgcc.h' and `loader.h'.
6284 (pkgdata_PROGRAMS): New variable.
6285 (sbin_UTILITIES): Variable removed.
6286 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
6287 (grubof_SOURCES): Variable re-defined so it only includes the
6288 core functionality.
6289 (grubof_CFLAGS): Remove `-DGRUBOF'.
6290 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
6291 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
6292 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
6293 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
6294 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
6295 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
6296 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
6297 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
6298 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
6299 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
6300 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6301 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
6302 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
6303 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
6304 (pc_mod_CFLAGS): New variables.
6305 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
6306 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
6307 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
6308 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
6309 Moved from here...
6310 * include/grub/i386/pc/init.h (grub_os_area_addr)
6311 (rub_os_area_size): ... to here.
6312 * include/grub/powerpc/ieee1275/ieee1275.h
6313 (grub_ieee1275_entry_fn): Export symbol.
6314 * include/grub/powerpc/ieee1275/init.h: New file.
6315 * include/grub/powerpc/libgcc.h: Likewise.
6316 * include/grub/cache.h: Likewise.
6317 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
6318 <hollis@penguinppc.org>.
6319 * kern/dl.c: Include <grub/cache.h>.
6320 (grub_dl_flush_cache): New function.
6321 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
6322 for this module.
6323 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
6324 (grub_console_init): Removed prototypes.
6325 (grub_machine_init): Don't initialize the modules anymore.
6326 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
6327 static.
6328 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
6329 Macro undef removed.
6330 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
6331 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
6332 relocation `R_PPC_REL32'. Return an error when the relocation is
6333 unknown.
6334 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
6335 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
6336 * util/misc.c (grub_arch_sync_caches): Likewise.
6337
e4b47e0c 63382004-12-19 Marco Gerards <metgerards@student.han.nl>
6339
6340 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
6341 `symlist.c', add `grubof_symlist.c'.
6342 (symlist.c): Variable removed.
6343 (grubof_HEADERS): Variable added.
6344 (grubof_symlist.c): New target.
6345 (kernel_syms.lst): Use `grubof_HEADERS' instead of
6346 `kernel_img_HEADERS'.
6347 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
6348 * kern/powerpc/dl.c: New file.
6349 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
6350 Function removed.
6351 (grub_arch_dl_relocate_symbols): Likewise.
6352 (grub_register_exported_symbols): Likewise.
6353
4ceb3636 63542004-12-13 Marco Gerards <metgerards@student.han.nl>
6355
6356 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
6357 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
6358 to fail instead. Reported by Vincent Pelletier
6359 <subdino2004@yahoo.fr>.
6360
6361 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
6362 it is not allocated. Reported by Vincent Pelletier
6363 <subdino2004@yahoo.fr>.
6364
6365 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
6366 output so the output looks better.
6367
3f1578fe 63682004-12-04 Marco Gerards <metgerards@student.han.nl>
6369
6370 Modulize the partition map support and add support for the amiga
6371 partition map.
6372
6373 * commands/ls.c: Include <grub/partition.h> instead of
6374 <grub/machine/partition.h>.
6375 * kern/disk.c: Likewise.
6376 * kern/rescue.c: Likewise.
6377 * loader/i386/pc/chainloader.c: Likewise.
6378 * normal/cmdline.c: Likewise.
6379 * kern/powerpc/ieee1275/init.c: Likewise.
6380 (grub_machine_init): Call `grub_pc_partition_map_init',
6381 `grub_amiga_partition_map_init' and
6382 `grub_apple_partition_map_init'.
6383 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
6384 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
6385 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
6386 `partition.h' and `pc_partition.h'.
6387 (grub_setup_SOURCES): Remove
6388 `disk/i386/pc/partition.c'. Add `kern/partition.c',
6389 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
6390 (grub_emu_SOURCES): Likewise.
6391 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
6392 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
6393 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
6394 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
6395 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
6396 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
6397 (grubof_SOURCES): Likewise.
6398 * disk/i386/pc/partition.c: File removed.
6399 * disk/powerpc/ieee1275/partition.c: Likewise.
6400 * include/grub/powerpc/ieee1275/partition.h: Likewise.
6401 * include/grub/i386/pc/partition.h: Likewise.
6402 * kern/partition.c: New file.
6403 * partmap/amiga.c: Likewise.
6404 * partmap/apple.c: Likewise.
6405 * partmap/pc.c: Likewise.
6406 * include/grub/partition.h: Likewise..
6407 * include/grub/pc_partition.h: Likewise.
6408 * util/grub-emu.c: Include <grub/partition.h> instead of
6409 <grub/machine/partition.h>.
6410 (main): Call `grub_pc_partition_map_init',
6411 `grub_amiga_partition_map_init' and
6412 `grub_apple_partition_map_init' and deinitialize afterwards.
6413 * util/i386/pc/biosdisk.c: Include `#include
6414 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
6415 `<grub/machine/partition.h>'.
6416 * util/i386/pc/grub-setup.c: Likewise.
6417 * util/i386/pc/biosdisk.c: Likewise.
6418 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
6419 partition information in case of a PC partition.
6420 * util/i386/pc/grub-setup.c: Include `#include
6421 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
6422 `<grub/machine/partition.h>'.
6423 (setup): Only access the PC specific partition information in case
6424 of a PC partition.
6425
0ef4ced9 64262004-11-17 Hollis Blanchard <hollis@penguinppc.org>
6427
6428 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
6429 (grub_longjmp): Likewise.
6430 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
6431 20.
6432 * normal/powerpc/setjmp.S: New file.
6433 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
6434 `normal/powerpc/setjmp.S'.
6435 (grubof_CFLAGS): Add `-DGRUBOF'.
6436 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
6437 [GRUB_UTIL && !GRUBOF].
6438
19950e29 64392004-11-16 Marco Gerards <metgerards@student.han.nl>
6440
6441 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
6442 property named `name'. Correctly handle the error returned by
6443 `grub_ieee1275_finddevice' if a device can not be opened.
6444
a2fea427 64452004-11-02 Hollis Blanchard <hollis@penguinppc.org>
6446
6447 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
6448 `actual' for negativity.
6449 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
6450 kern/fshelp.c.
6451
41ea0ea3 64522004-11-01 Marco Gerards <metgerards@student.han.nl>
6453
6454 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
6455 (PAGE_OFFSET): New macro.
6456 (CRTC_ADDR_PORT): Likewise.
6457 (CRTC_DATA_PORT): Likewise.
6458 (START_ADDR_HIGH_REGISTER): Likewise.
6459 (START_ADDR_LOW_REGISTER): Likewise.
6460 (GRAPHICS_ADDR_PORT): Likewise.
6461 (GRAPHICS_DATA_PORT): Likewise.
6462 (READ_MAP_REGISTER): Likewise.
6463 (INPUT_STATUS1_REGISTER): Likewise.
6464 (INPUT_STATUS1_VERTR_BIT): Likewise.
6465 (page): New variable.
6466 (wait_vretrace): New function.
6467 (set_read_map): Likewise.
6468 (set_start_address): Likewise.
6469 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
6470 the right page.
6471 (check_vga_mem): Take the page into account.
6472 (write_char): Likewise.
6473 (write_cursor): Likewise.
6474 (scroll_up): Likewise. Copy the page to the page that is not
6475 shown and switch between both pages.
6476 (grub_vga_putchar): Fix off by one error.
6477 (grub_vga_cls): Wait for the vertical retrace. Take the page into
6478 account.
6479
ad0bd20b 64802004-11-01 Marco Gerards <metgerards@student.han.nl>
6481
6482 Add support for iso9660 (including rockridge).
6483
6484 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
6485 (iso9660_mod_SOURCES): New variable.
6486 (iso9660_mod_CFLAGS): Likewise.
6487 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
6488 * include/grub/fs.h (grub_iso9660_init): New prototype.
6489 * util/grub-emu.c (main): Call `grub_iso9660_init'.
6490 * fs/iso9660.c: New file.
6491
6492 * include/grub/misc.h (grub_strncat): New prototype.
6493 * kern/misc.c (grub_strncat): New function.
6494
6495 * fs/hfs.c (grub_hfs_mount): Translate the error
6496 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
6497 * fs/jfs.c (grub_jfs_mount): Likewise.
6498 * fs/ufs.c (grub_ufs_mount): Likewise.
6499
a5477a59 65002004-10-28 Hollis Blanchard <hollis@penguinppc.org>
6501
6502 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
6503 which initialized BAT registers.
6504 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
6505 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
6506 Move from here...
6507 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
6508 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
6509 ... to here.
6510 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
6511 (grub_mapclaim): Likewise.
6512 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
6513 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
6514 hand.
6515
9304c1f8 65162004-10-19 Hollis Blanchard <hollis@penguinppc.org>
6517
6518 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
6519 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
6520 -ffreestanding and -msoft-float.
6521
86f4ae25 65222004-10-15 Hollis Blanchard <hollis@penguinppc.org>
6523
6524 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
6525 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
6526 set in grub_ieee1275_flags.
6527
38912228 65282004-10-14 Hollis Blanchard <hollis@penguinppc.org>
6529
6530 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
6531 prototype.
6532 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
6533 grub_console_init first.
6534 Change the memory range used for grub_ieee1275_claim and
6535 grub_mm_init_region.
6536 Print an error message if the claim fails.
6537 Include <grub/misc.h>.
6538
d1923dc8 65392004-10-13 Hollis Blanchard <hollis@penguinppc.org>
6540
6541 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
6542 Call grub_children_iterate for device nodes of type `scsi',
6543 `ide', or `ata'.
6544 (grub_ofdisk_open): Remove manual device alias resolution.
6545 Fix memory leak when device cannot be opened.
6546 * include/grub/powerpc/ieee1275/ieee1275.h
6547 (grub_children_iterate): New prototype.
6548 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
6549 New function.
6550 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
6551 Return -1 if args.size was -1.
6552
4512e4f3 65532004-10-11 Hollis Blanchard <hollis@penguinppc.org>
6554
6555 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
6556 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
6557 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
6558 Open Firmware's memory for it; claim memory from _start to _end.
6559 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
6560 (_end): New extern.
6561 (_start): Zero BSS from __bss_start to _end.
6562 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
6563 New extern.
6564 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
6565
4d61feb0 65662004-10-11 Hollis Blanchard <hollis@penguinppc.org>
6567
ad0bd20b 6568 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
6569 -1 if args.base was -1.
4d61feb0 6570
026fa2f9 65712004-10-08 Hollis Blanchard <hollis@penguinppc.org>
6572
6573 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
6574 escape sequence instead of a literal ^L. Also call
6575 grub_ofconsole_gotoxy.
6576
9f2220ef 65772004-10-03 Hollis Blanchard <hollis@penguinppc.org>
6578
6579 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
6580 void * arguments to grub_addr_t. All callers updated. Also make
6581 the `result' argument optional.
6582 (grub_ieee1275_release): change void * arguments to grub_addr_t.
6583 All callers updated.
6584
8a572cd7 65852004-09-22 Hollis Blanchard <hollis@penguinppc.org>
6586
6587 * commands/ls.c (grub_ls_list_files): Use the string following the
6588 initial ')', if present, as the filesystem path.
6589 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
6590
6591 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
6592
18aa81f2 65932004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
6594
6595 Make the source code of the menu interface more readable.
6596
6597 * normal/menu.c: Include grub/mm.h.
6598 (TERM_WIDTH): New macro.
6599 (TERM_HEIGHT): Likewise.
6600 (TERM_INFO_HEIGHT): Likewise.
6601 (TERM_MARGIN): Likewise.
6602 (TERM_SCROLL_WIDTH): Likewise.
6603 (TERM_TOP_BORDER_Y): Likewise.
6604 (TERM_LEFT_BORDER_X): Likewise.
6605 (TERM_BORDER_WIDTH): Likewise.
6606 (TERM_MESSAGE_HEIGHT): Likewise.
6607 (TERM_BORDER_HEIGHT): Likewise.
6608 (TERM_NUM_ENTRIES): Likewise.
6609 (TERM_FIRST_ENTRY_Y): Likewise.
6610 (TERM_ENTRY_WIDTH): Likewise.
6611 (TERM_CURSOR_X): Likewise.
6612 (draw_border): Use macros instead of magic numbers.
6613 (print_entry): Likewise.
6614 (print_entries): Likewise.
6615 (run_menu): Likewise. Also, handle the key 'e'.
6616 (run_menu_entry): Ignore empty command lines.
6617 (print_message): Added a new argument EDIT. If EDIT is true,
6618 print a different message.
6619 (init_page): Likewise.
6620 (edit_menu_entry): New function. Not implemented yet.
6621
b47efe30 66222004-09-17 Marco Gerards <metgerards@student.han.nl>
6623
6624 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
6625 can be loaded from normal mode.
6626
6627 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
6628 `multiboot.mod'.
6629 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
6630 (multiboot_mod_CFLAGS): New variables.
6631 * loader/i386/pc/linux_normal.c: New file.
6632 * loader/i386/pc/multiboot_normal.c: Likewise.
6633
6634 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
6635 attribute `unused'.
6636
6637 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
6638 `fdiro' to read the mode information from instead of `diro'.
6639
6640 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
6641 looking up a symlink.
6642
6643 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
6644 macro.
6645 * normal/command.c (grub_command_execute): Don't parse the
6646 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
6647 flags of the command.
6648
6649 * normal/menu.c (grub_menu_run): Fix typo.
6650
da75ac71 66512004-09-14 Hollis Blanchard <hollis@penguinppc.org>
6652
6653 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
6654
6655 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
6656 `y + 1' instead of `y - 1'.
6657
6658 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
6659
062b24c2 66602004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
6661
6662 From Hollis Blanchard <hollis@penguinppc.org>:
6663 * kern/misc.c (memmove): New alias for grub_memmove.
6664 (memcmp): New alias for grub_memcmp.
6665 (memset): New alias for grub_memset.
6666 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
6667 Change "int handle" to "grub_ieee1275_phandle_t handle".
6668 * include/grub/powerpc/ieee1275/ieee1275.h
6669 (grub_ieee1275_get_property): Likewise.
6670
8ddad845 66712004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
6672
6673 Added normal mode command `chainloader' as module chain.mod, which
6674 depends on normal.mod and _chain.mod.
6675
6676 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
6677 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
6678 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
6679 Deleted prototype.
6680 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
6681 but arguments parsing moved to ...
6682 (grub_chainloader_cmd): ... here. New function.
6683 * include/grub/i386/pc/chainloader.h: New file.
6684 * loader/i386/pc/chainloader_normal.c: Likewise.
6685
2c1f4ce3 66862004-09-11 Marco Gerards <metgerards@student.han.nl>
6687
6688 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
6689 (grub_mkimage_LDFLAGS): Likewise.
6690 (grub_emu_SOURCES): Likewise.
6691 (kernel_img_HEADERS): Added fshelp.h.
6692 * fs/ext2.c: Include <grub/fshelp.h>.
6693 (FILETYPE_REG): New macro.
6694 (FILETYPE_INO_REG): Likewise.
6695 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
6696 Changed all users.
6697 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
6698 all users.
6699 (grub_fshelp_node): New struct.
6700 (grub_ext2_data): Added member `diropen'. Changed member `inode'
6701 to a pointer.
6702 (grub_ext2_get_file_block): Removed function.
6703 (grub_ext2_read_block): New function.
6704 (grub_ext2_read_file): Replaced parameter `data' by `node'.
6705 This function was written.
6706 (grub_ext2_mount): Read the root inode. Create a diropen struct.
6707 (grub_ext2_find_file): Removed function.
6708 (grub_ext2_read_symlink): New function.
6709 (grub_ext2_iterate_dir): Likewise.
6710 (grub_ext2_open): Rewritten.
6711 (grub_ext2_dir): Rewritten.
6712 * include/grub/fshelp.h: New file.
6713 * fs/fshelp.c: Likewise.
6714
3c52136a 67152004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
6716
6717 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
6718 (print_message): Add a missing newline.
6719 (run_menu): Added timeout support.
6720 (run_menu_entry): New local function.
6721 (grub_menu_run): Added support for booting.
6722
6723 * kern/loader.c (grub_loader_is_loaded): New function.
6724
6725 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
6726 (grub_get_rtc): Exported.
6727
6728 * include/grub/i386/pc/time.h: Include grub/symbol.h.
6729 (grub_get_rtc): Exported.
6730
6731 * include/grub/normal.h (struct grub_command_list): Remove
6732 constant from the member `command'.
6733
6734 * include/grub/loader.h (grub_loader_is_loaded): Declared.
6735
6736 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
6737
6738 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
6739
aa033560 67402004-08-28 Marco Gerards <metgerards@student.han.nl>
6741
6742 Add support for the JFS filesystem.
6743
6744 * fs/jfs.c: New file.
6745 * include/grub/fs.h (grub_jfs_init): New prototype.
6746 (grub_jfs_fini): New prototype.
6747 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
6748 (grub_emu_SOURCES): Likewise.
6749 (pkgdata_MODULES): Add jfs.mod.
6750 (jfs_mod_SOURCES): New variable.
6751 (jfs_mod_CFLAGS): Likewise.
6752 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
6753 (grubof_SOURCES): Likewise.
6754 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
6755
6756 * fs/fat.c (grub_fat_find_dir): Convert the filename little
6757 endian to the host endian.
6758 (grub_fat_utf16_to_utf8): Move function from there...
6759 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
6760 the endianess of the source string anymore.
6761 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
6762
94bc45af 67632004-08-24 Marco Gerards <metgerards@student.han.nl>
6764
6765 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
6766 (grub_boot_fini) [GRUB_UTIL]: Likewise.
6767 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
6768 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
6769
6770 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
6771 (grub_hfs_iterate_dir): Make the function static. Add prototypes
6772 for `node_found' and `it_dir'.
6773 (grub_hfs_dir): Add prototype for `dir_hook'.
6774
6775 * fs/minix.c (grub_minix_get_file_block): Add prototype for
6776 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
6777 and `indir32' to silence a gcc warning.
6778
6779 * include/grub/fs.h (grub_hfs_init): New prototype.
6780 (grub_hfs_fini): Likewise.
6781
6782
97543f08 67832004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
6784
6785 Each disk device has its own id now. This is useful to make use
6786 of multiple disk devices.
6787
6788 * include/grub/disk.h (grub_disk_dev_id): New enum.
6789 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
6790 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
6791
6792 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
6793 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
6794
6795 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
6796 GRUB_DISK_DEVICE_OFDISK_ID as an id.
6797
6798 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
6799 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
6800
6801 * include/grub/disk.h (struct grub_disk_dev): Added a new member
6802 "id" which is used by the cache manager.
6803
6804 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
6805 of just "GRUB".
6806
64372eb4 68072004-08-18 Marco Gerards <metgerards@student.han.nl>
6808
6809 * fs/hfs.c: New file.
6810 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
6811 (grub_emu_SOURCES): Likewise.
6812 (pkgdata_MODULES): Add hfs.mod.
6813 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
6814 (grubof_SOURCES): Likewise.
6815 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
6816
6817 * include/grub/misc.h (grub_strncasecmp): Add prototype.
6818 * kern/misc.c (grub_strncasecmp): Add function.
6819
cc61b58f 68202004-08-14 Marco Gerards <metgerards@student.han.nl>
6821
6822 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
6823 with parentheses.
6824
6825 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
6826 (grub_ext2_dir): In case the directory entry type is unknown, read
6827 it from the inode.
6828
0ef123f6 68292004-08-02 Peter Bruin <pjbruin@dds.nl>
6830
6831 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
6832 grub_load_linux instead of grub_rescue_cmd_linux as second
6833 argument of grub_rescue_register_command.
6834
6835 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
6836
a447c5df 68372004-07-27 Marco Gerards <metgerards@student.han.nl>
6838
6839 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
6840 function.
6841 * commands/boot.c: Remove the check for `GRUB_UTIL'.
6842 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
6843 `loader/powerpc/ieee1275/linux.c',
6844 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
6845 * include/grub/powerpc/ieee1275/ieee1275.h
6846 (grub_ieee1275_release): New prototype.
6847 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
6848 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
6849 normal, boot, linux and linux_normal.
6850 * loader/powerpc/ieee1275/linux.c: New file.
6851 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6852
5a9e3546 68532004-07-12 Marco Gerards <metgerards@student.han.nl>
6854
6855 * normal/arg.c (grub_arg_parse): Correct error handling after
6856 reallocating the argumentlist (check if `argl' is not null instead
6857 of checking if `args' is not null).
6858 * kern/mm.c (grub_realloc): Return the same pointer when using the
6859 same region, instead of returning the header address.
6860
e15199cb 68612004-07-11 Marco Gerards <metgerards@student.han.nl>
6862
6863 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
6864 one block instead of two when looking for the initial partition.
6865 (grub_partition_probe): Initialize the local variable `p' with 0.
6866 Use base 10 for the grub_strtoul call.
6867 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
6868 need for one local variable.
6869 (grub_strtoul): Don't add the new value to `num', instead of that
6870 just assign it.
6871
020616c2 68722004-07-11 Marco Gerards <metgerards@student.han.nl>
6873
6874 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
6875 (pxeboot_img_SOURCES): New variable.
6876 (pxeboot_img_ASFLAGS): Likewise.
6877 (pxeboot_img_LDFLAGS): Likewise.
6878 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
6879 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
6880 <lode_leroy@hotmail.com>.
6881
6c51eb64 68822004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
6883
6884 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
6885 there was no input.
6886
cfb12aff 68872004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
6888
6889 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
6890 the history buffer logic.
6891
6eabba74 68922004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
6893
6894 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
6895 (FILETYPE_INO_SYMLINK): New macros.
6896 (grub_ext2_find_file): Check if the node is a directory using the
6897 inode stat information instead of using the filetype in the
6898 dirent. Exclude the first character of an absolute symlink.
6899 (grub_ext2_dir): Mask out the filetype part of the mode member of
6900 the inode.
6901
66e19ef8 69022004-05-24 Marco Gerards <metgerards@student.han.nl>
6903
6904 Add support for UFS version 1 and 2. Add support for the minix
6905 filesystem version 1 and 2, both the variants with 14 and 30 long
6906 filenames.
6907
6908 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
6909 fs/minix.c.
6910 (grub_emu_SOURCES): Likewise.
6911 (pkgdata_MODULES): Add ufs.mod and minix.mod.
6912 (ufs_mod_SOURCES): New variable.
6913 (ufs_mod_CFLAGS): Likewise.
6914 (minix_mod_SOURCES): Likewise.
6915 (minix_mod_CFLAGS): Likewise.
6916 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
6917 fs/minix.c.
6918 (grubof_SOURCES): Likewise.
6919 * fs/ufs.c: New file.
6920 * fs/minix.c: New file.
6921 * include/grub/fs.h (grub_ufs_init): New prototype.
6922 (grub_ufs_fini): Likewise.
6923 (grub_minix_init): Likewise.
6924 (grub_minix_fini): Likewise.
6925 * util/grub-emu.c (main): Initialize and deinitialize UFS and
6926 minix fs.
6927
cc2e748a 69282004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
6929
6930 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
6931 commands/ls.c, commands/terminal.c, commands/boot.c,
6932 commands/cmp.c and commands/cat.c.
6933 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
6934
6935 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
6936 "env.h"
6937
4b13b216 69382004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
6939
6940 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
6941 and grub_, respectively. Because the conversion is trivial and
6942 mechanical, I omit the details here. Please refer to the CVS
6943 if you need more information.
6944
6a142551 69452004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
6946
6947 * include/pupa: Renamed to ...
6948 * include/grub: ... this.
6949 * util/i386/pc/pupa-mkimage.c: Renamed to ...
6950 * util/i386/pc/grub-mkimage.c: ... this.
6951 * util/i386/pc/pupa-setup.c: Renamed to ...
6952 * util/i386/pc/grub-setup.c: ... this.
6953 * util/pupa-emu.c: Renamed to ...
6954 * util/grub-emu.c: ... this.
6955
e56cdf21 69562004-03-29 Marco Gerards <metgerards@student.han.nl>
6957
6958 Add support for the newworld apple macintosh (PPC). This has been
6959 tested on the powerbook 2000 only. It only adds support for
6960 generic ieee1275 functions, console and disk support. This should
6961 be easy to port to other architectures with support for Open
6962 Firmware.
6963
6964 * configure.ac: Accept the powerpc as host_cpu. In the case of
6965 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
6966 specific tests are only executed while building for the i386.
6967 Inverse test for crosscompile.
6968 * genmk.rb (Utility): Allow assembler files.
6969 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
6970 * conf/powerpc-ieee1275.rmk: New file.
6971 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
6972 * disk/powerpc/ieee1275/partition.c: Likewise.
6973 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
6974 * include/pupa/powerpc/ieee1275/console.h: Likewise.
6975 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
6976 * include/pupa/powerpc/ieee1275/time.h: Likewise.
6977 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
6978 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
6979 * include/pupa/powerpc/ieee1275/loader.h
6980 * include/pupa/powerpc/setjmp.h: Likewise.
6981 * include/pupa/powerpc/types.h: Likewise.
6982 * kern/powerpc/ieee1275/init.c: Likewise.
6983 * kern/powerpc/ieee1275/openfw.c: Likewise.
6984 * term/powerpc/ieee1275/ofconsole.c: Likewise.
6985
6986 These files were written by Johan Rydberg
6987 (jrydberg@night.trouble.net) and I only modified them slightly.
6988
6989 * boot/powerpc/ieee1275/cmain.c: New file.
6990 * boot/powerpc/ieee1275/crt0.S: Likewise.
6991 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
6992 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
6993
8c8cc205 69942004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
6995
6996 * Makefile.in: Update copyright.
6997 * genmodsrc.sh: Likewise.
6998 * gensymlist.sh: Likewise.
6999 * term/i386/pc/vga.c: Indent correctly.
7000
7001 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
7002 bugreporting address.
7003 * util/i386/pc/pupa-setup.c (usage): Likewise,
7004 (main): Call pupa_ext2_init and pupa_ext2_fini.
7005
7006 * fs/fat.c (log2): Renamed to ...
7007 (fat_log2): ... this.
7008 All callers changed.
7009 * kern/misc.c (memcpy): Alias to pupa_memmove.
7010 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
7011 lvalue cast.
7012 * util/console.c (pupa_ncurses_fini): Return 0.
7013
7014 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
7015 Move fail label here.
7016 [__GNU__]: Don't warn when using stat.
7017 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
7018 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
7019 long int. Use strtol instead of strtoul.
7020
db1771cf 70212004-03-14 Marco Gerards <metgerards@student.han.nl>
7022
7023 * commands/boot.c: New file.
7024 * commands/cat.c: Likewise.
7025 * commands/cmp.c: Likewise.
7026 * commands/ls.c: Likewise.
7027 * commands/terminal.c: Likewise.
7028 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
7029 (pupa_register_command): Changed interface to match the new
7030 argument parser.
7031 (pupa_command_execute): Changed (almost rewritten) so it uses
7032 pupa_split_command. Added support for setting variables using the
7033 syntax `foo=bar'.
7034 (rescue_command): Changed to work with the new argument parser.
7035 (terminal_command): Moved from here to commands/terminal.c.
7036 (set_command): New function.
7037 (unset_command): New function.
7038 (insmod_command): New function.
7039 (rmmod_command): New function.
7040 (lsmod_command): New function.
7041 (pupa_command_init): Don't initialize the command terminal
7042 anymore. Initialize the commands set, unset, insmod, rmmod and
7043 lsmod.
7044 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
7045 (kernel_img_HEADERS): Add arg.h and env.h.
7046 (pupa_mkimage_LDFLAGS): Add kern/env.c.
7047 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
7048 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
7049 normal/arg.c.
7050 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
7051 terminal.mod.
7052 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
7053 (boot_mod_SOURCES): New variable.
7054 (terminal_mod_SOURCES): Likewise.
7055 (ls_mod_SOURCES): Likewise.
7056 (cmp_mod_SOURCES): Likewise.
7057 (cat_mod_SOURCES): Likewise.
7058
7059 * normal/arg.c: New file.
7060 * kern/env.c: Likewise.
7061 * include/pupa/arg.h: Likewise.
7062 * include/pupa/env.h: Likewise.
7063 * font/manager.c (font_command): Changed to match argument parsing
7064 interface changes.
7065 (PUPA_MOD_INIT): Likewise.
7066 * hello/hello.c (pupa_cmd_hello): Likewise.
7067 (PUPA_MOD_INIT): Likewise.
7068 * include/pupa/disk.h: Include <pupa/device.h>.
7069 (pupa_print_partinfo): New prototype.
7070 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
7071 (pupa_dl_get_prefix): Likewise.
7072 * include/pupa/misc.h: Include <pupa/err.h>.
7073 (pupa_isgraph): New prototype.
7074 (pupa_isdigit): Likewise.
7075 (pupa_split_cmdline): Likewise.
7076 * include/pupa/normal.h: Include <pupa/arg.h>.
7077 (pupa_command): Changed the prototype of the member `func' to
7078 match the argument parsing interface. Added member `options'.
7079 (pupa_register_command): Updated to match function.
7080 (pupa_arg_parse): New prototype.
7081 (pupa_hello_init) [PUPA_UTIL]: New prototype.
7082 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
7083 (pupa_ls_init) [PUPA_UTIL]: Likewise.
7084 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
7085 (pupa_cat_init) [PUPA_UTIL]: Likewise.
7086 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
7087 (pupa_boot_init) [PUPA_UTIL]: Likewise.
7088 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
7089 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
7090 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
7091 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
7092 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
7093 * kern/disk.c: Include <pupa/file.h>.
7094 (pupa_print_partinfo): New function.
7095 * kern/dl.c: Include <pupa/env.h>.
7096 (pupa_dl_dir): Variable removed.
7097 (pupa_dl_load): Use the environment variable `prefix' instead of
7098 the variable pupa_dl_dir.
7099 (pupa_dl_set_prefix): Function removed.
7100 (pupa_dl_get_prefix): Likewise.
7101 * kern/i386/pc/init.c: Include <pupa/env.h>.
7102 (pupa_machine_init): Use the environment variable `prefix' instead of
7103 using pupa_dl_set_prefix to set the prefix.
7104 * kern/main.c: Include <pupa/env.h>.
7105 (pupa_set_root_dev): Use the environment variable `prefix' instead of
7106 using pupa_dl_get_prefix to get the prefix.
7107 * kern/misc.c: Include <pupa/env.h>.
7108 (pupa_isdigit): New function.
7109 (pupa_isgraph): Likewise.
7110 (pupa_ftoa): Likewise.
7111 (pupa_vsprintf): Added support for printing values of the type
7112 `double'. Make it possible to format variable output when using
7113 formatting like `%1.2%f'.
7114 (pupa_split_cmdline): New function.
7115 * kern/rescue.c: Include <pupa/env.h>.
7116 (next_word): Removed function.
7117 (pupa_rescue_cmd_prefix): Likewise.
7118 (pupa_rescue_cmd_set): New function.
7119 (pupa_rescue_cmd_unset): New function.
7120 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
7121 split the command line instead of splitting it here. Added
7122 support for setting variables using the syntax `foo=bar'. Don't
7123 initialize the prefix command anymore. Initialized the set and
7124 unset commands.
7125 * normal/cmdline.c: Include <pupa/env.h>.
7126 (pupa_tab_complete): Added prototypes for print_simple_completion,
7127 print_partition_completion, add_completion, iterate_commands,
7128 iterate_dev, iterate_part and iterate_dir. Moved code to print
7129 partition information from here to kern/disk.c.
7130 (pupa_cmdline_run): Don't check if the funtion exists anymore.
7131 * normal/main.c: Include <pupa/env.h>.
7132 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
7133 instead of using pupa_dl_get_prefix to get the prefix.
7134 * term/i386/pc/vga.c: Include <pupa/arg.h>.
7135 (check_vga_mem): Cast pointers to `void *' to silence a gcc
7136 warning.
7137 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
7138 (pupa_vga_setcolor): Declare unused variables with `__attribute__
7139 ((unused))' to silence a gcc warning.
7140 (pupa_vga_setcolor): Likewise.
7141 (debug_command): Changed to match argument parsing
7142 interface changes.
7143 * util/pupa-emu.c: Include <pupa/env.h>.
7144 (options): Added 0's for unused fields to silence a gcc warning.
7145 (argp): Likewise.
7146 (main): Use the environment variable `prefix' instead of using
7147 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
7148 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
7149 and terminal.
7150
7151 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
7152 * util/misc.c: Include <malloc.h>.
7153 (pupa_malloc): Rewritten so errors are correctly reported.
7154 (pupa_realloc): Likewise.
7155 (pupa_memalign): Likewise.
7156 (pupa_mm_init_region): Declare unused variables with
7157 `__attribute__ ((unused))' to silence a gcc warning.
7158 * normal/i386/setjmp.S: Remove tab at the end of the file to
7159 silence a gcc warning.
7160 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
7161 variables with `__attribute__ ((unused))' to silence a gcc
7162 warning.
7163 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
7164 local variable i unsigned to silence a gcc warning.
7165
7166 * kern/term.c: Include <pupa/misc.h>.
7167 (pupa_more_lines): New variable.
7168 (pupa_more): Likewise.
7169 (pupa_putcode): When the pager is active pause at the end of every
7170 screen.
7171 (pupa_set_more): New function.
7172 * include/pupa/term.h (pupa_set_more): New prototype.
7173
7174
3b1139cb 71752004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
7176
7177 Now this project is GRUB 2 rather than PUPA. The location of
7178 the CVS repository was moved to GRUB's.
7179
7180 * configure.ac: Use bug-grub as the reporting address.
7181 Use GRUB instead of PUPA.
7182 Change the version number to 1.90.
7183
8367695c 71842004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
7185
7186 * genkernsyms.sh: Updated copyright information.
7187 * genmk.rb: Likewise.
7188 * genmodsrc.sh: Likewise.
7189 * gensymlist.sh: Likewise.
7190 * boot/i386/pc/boot.S: Likewise.
7191 * boot/i386/pc/diskboot.S: Likewise.
7192 * disk/i386/pc/biosdisk.c: Likewise.
7193 * disk/i386/pc/partition.c: Likewise.
7194 * font/manager.c: Likewise.
7195 * fs/ext2.c: Likewise.
7196 * fs/fat.c: Likewise.
7197 * include/pupa/boot.h: Likewise.
7198 * include/pupa/device.h: Likewise.
7199 * include/pupa/disk.h: Likewise.
7200 * include/pupa/dl.h: Likewise.
7201 * include/pupa/elf.h: Likewise.
7202 * include/pupa/err.h: Likewise.
7203 * include/pupa/file.h: Likewise.
7204 * include/pupa/font.h: Likewise.
7205 * include/pupa/fs.h: Likewise.
7206 * include/pupa/kernel.h: Likewise.
7207 * include/pupa/loader.h: Likewise.
7208 * include/pupa/misc.h: Likewise.
7209 * include/pupa/mm.h: Likewise.
7210 * include/pupa/net.h: Likewise.
7211 * include/pupa/normal.h: Likewise.
7212 * include/pupa/rescue.h: Likewise.
7213 * include/pupa/setjmp.h: Likewise.
7214 * include/pupa/symbol.h: Likewise.
7215 * include/pupa/term.h: Likewise.
7216 * include/pupa/types.h: Likewise.
7217 * include/pupa/i386/setjmp.h: Likewise.
7218 * include/pupa/i386/types.h: Likewise.
7219 * include/pupa/i386/pc/biosdisk.h: Likewise.
7220 * include/pupa/i386/pc/boot.h: Likewise.
7221 * include/pupa/i386/pc/console.h: Likewise.
7222 * include/pupa/i386/pc/init.h: Likewise.
7223 * include/pupa/i386/pc/kernel.h: Likewise.
7224 * include/pupa/i386/pc/linux.h: Likewise.
7225 * include/pupa/i386/pc/loader.h: Likewise.
7226 * include/pupa/i386/pc/memory.h: Likewise.
7227 * include/pupa/i386/pc/multiboot.h: Likewise.
7228 * include/pupa/i386/pc/partition.h: Likewise.
7229 * include/pupa/i386/pc/time.h: Likewise.
7230 * include/pupa/i386/pc/vga.h: Likewise.
7231 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
7232 * include/pupa/util/getroot.h: Likewise.
7233 * include/pupa/util/misc.h: Likewise.
7234 * include/pupa/util/resolve.h: Likewise.
7235 * kern/device.c: Likewise.
7236 * kern/disk.c: Likewise.
7237 * kern/dl.c: Likewise.
7238 * kern/err.c: Likewise.
7239 * kern/file.c: Likewise.
7240 * kern/fs.c: Likewise.
7241 * kern/loader.c: Likewise.
7242 * kern/main.c: Likewise.
7243 * kern/misc.c: Likewise.
7244 * kern/mm.c: Likewise.
7245 * kern/rescue.c: Likewise.
7246 * kern/term.c: Likewise.
7247 * kern/i386/dl.c: Likewise.
7248 * kern/i386/pc/init.c: Likewise.
7249 * kern/i386/pc/lzo1x.S: Likewise.
7250 * kern/i386/pc/startup.S: Likewise.
7251 * loader/i386/pc/chainloader.c: Likewise.
7252 * loader/i386/pc/linux.c: Likewise.
7253 * loader/i386/pc/multiboot.c: Likewise.
7254 * normal/cmdline.c: Likewise.
7255 * normal/command.c: Likewise.
7256 * normal/main.c: Likewise.
7257 * normal/menu.c: Likewise.
7258 * normal/i386/setjmp.S: Likewise.
7259 * term/i386/pc/console.c: Likewise.
7260 * term/i386/pc/vga.c: Likewise.
7261 * util/console.c: Likewise.
7262 * util/genmoddep.c: Likewise.
7263 * util/misc.c: Likewise.
7264 * util/pupa-emu.c: Likewise.
7265 * util/resolve.c: Likewise.
7266 * util/unifont2pff.rb: Likewise.
7267 * util/i386/pc/biosdisk.c: Likewise.
7268 * util/i386/pc/getroot.c: Likewise.
7269 * util/i386/pc/pupa-mkimage.c: Likewise.
7270 * util/i386/pc/pupa-setup.c: Likewise.
7271
e6eced71 72722004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
7273
7274 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
7275 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
7276 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
7277 reading and reset it after reading.
7278 (pupa_ext2_close): Return PUPA_ERR_NONE.
7279
7280 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
7281 Correct value.
7282 (struct linux_kernel_header): Add kernel_version and
7283 initrd_addr_max.
7284 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
7285 pupa_file_read succeeds.
7286 (pupa_rescue_cmd_initrd): Implement.
7287
5aded270 72882003-12-03 Marco Gerards <metgerards@student.han.nl>
7289
7290 * fs/ext2.c (pupa_ext2_label): New function.
7291 (pupa_ext2_fs): Added label.
7292 * fs/fat.c (pupa_fat_label): New function.
7293 (pupa_fat_fs): Added label.
7294 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
7295
7296 * kern/misc.c (pupa_strndup): New function.
7297 * include/pupa/misc.h (pupa_strndup): New prototype.
7298
7299 * include/pupa/normal.h: Include <pupa/err.h>.
7300 (pupa_set_history): New prototype.
7301 (pupa_iterate_commands): New prototype.
7302 * normal/cmdline.c: Include <pupa/machine/partition.h>,
7303 <pupa/disk.h>, <pupa/file.h>.
7304 (hist_size): New variable.
7305 (hist_lines): Likewise.
7306 (hist_end): Likewise.
7307 (hist_used): Likewise.
7308 (pupa_set_history): New function.
7309 (pupa_history_get): Likewise.
7310 (pupa_history_add): Likewise.
7311 (pupa_history_replace): Likewise.
7312 (pupa_tab_complete): Likewise.
7313 (pupa_cmdline_run): Added tab completion and history buffer. Tab
7314 completion shows partitionnames while completing partitions, this
7315 feature was suggested by Jeff Bailey.
7316 * normal/command.c (pupa_iterate_commands): New function.
7317 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
7318 (pupa_normal_init): Initialize history buffer.
7319 (PUPA_MOD_INIT): Likewise.
7320 (pupa_normal_fini): Free the history buffer.
7321 (PUPA_MOD_FINI): Likewise.
7322
7323 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
7324 key.
7325
7326 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
7327 * configure.ac [i386]: Check for regparam bug.
7328 (NESTED_FUNC_ATTR) [! i386]: Defined.
7329
1f7315a3 73302003-11-17 Marco Gerards <metgerards@student.han.nl>
7331
7332 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
7333 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
7334 (pupa_emu_SOURCES): New variable.
7335 (pupa_emu_LDFLAGS): Likewise.
7336 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
7337 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
7338 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
7339 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
7340 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
7341 (pupa_jmp_buf): New typedef.
7342 (pupa_setjmp) [PUPA_UTIL]: New macro.
7343 (pupa_longjmp) [PUPA_UTIL]: Likewise.
7344 * include/pupa/term.h (struct pupa_term): New member `refresh'.
7345 (pupa_refresh): New prototype.
7346 * include/pupa/util/getroot.h: New file.
7347 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
7348 it.
7349 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
7350 (pupa_rescue_cmd_cat): Likewise.
7351 (pupa_rescue_cmd_ls): Likewise.
7352 (pupa_rescue_cmd_testload): Likewise.
7353 (pupa_rescue_cmd_lsmod): Likewise.
7354 * normal/cmdline.c (pupa_cmdline_get): Likewise.
7355 * normal/menu.c (run_menu): Likewise.
7356 * kern/term.c (pupa_cls): Likewise.
7357 (pupa_refresh): New function.
7358 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
7359 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
7360 * util/console.c: New file.
7361
7362 * util/i386/pc/getroot.c: New file.
7363 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
7364 (pupa_putchar): New function.
7365 (pupa_refresh): Likewise.
7366 (xgetcwd): Function moved to ...
7367 (strip_extra_slashes): Likewise.
7368 (get_prefix): Likewise.
7369 * util/i386/pc/getroot.c: ... here.
7370 (find_root_device): Function moved and renamed to...
7371 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
7372 Changed all callers.
7373 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
7374 and renamed to...
7375 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
7376 Changed all callers.
7377 * util/misc.c (pupa_memalign): New function.
7378 (pupa_mm_init_region): Likewise.
7379 (pupa_register_exported_symbols): Likewise.
7380 (pupa_putchar): Function removed.
7381 * util/pupa-emu.c: New file.
7382
9a5c1ade 73832003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
7384
7385 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
7386 (_multiboot_mod_SOURCES): New variable.
7387 (_multiboot_mod_CFLAGS): Likewise.
7388 * loader/i386/pc/multiboot.c: New file.
7389 * include/pupa/i386/pc/multiboot.h: Likewise.
7390 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
7391 (pupa_multiboot_real_boot): New function.
7392 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
7393 (pupa_multiboot_real_boot): New prototype.
7394 (pupa_rescue_cmd_multiboot): Likewise
7395 (pupa_rescue_cmd_module): Likewise.
7396
7397 * kern/loader.c (pupa_loader_set): Continue when
7398 pupa_loader_unload_func() fails.
7399 (pupa_loader_unset): New function.
7400 * include/pupa/loader.h (pupa_loader_unset): New prototype.
7401
7402 * kern/misc.c (pupa_stpcpy): New function.
7403 * include/pupa/misc.h (pupa_stpcpy): New prototype.
7404
8e72a9c0 74052003-11-12 Marco Gerards <metgerards@student.han.nl>
7406
7407 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
7408 for available extensions.
7409
7410 * include/pupa/i386/pc/time.h: New file.
7411 * kern/disk.c: Include <pupa/machine/time.h>.
7412 (PUPA_CACHE_TIMEOUT): New macro.
7413 (pupa_last_time): New variable.
7414 (pupa_disk_open): Flush the cache when there was a timeout.
7415 (pupa_disk_close): Reset the timer.
7416 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
7417 pupa_currticks.
7418 * util/misc.c: Include <sys/times.h>
7419 (pupa_get_rtc): New function.
7420
c4adbd32 74212003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
7422
7423 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
7424 as blocks.
7425 (pupa_ext2_get_file_block): Use blocks member.
7426
7427 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
7428 first block. Return -1 instead of pupa_errno on error.
7429
bfd30f06 74302003-10-27 Marco Gerards <metgerards@student.han.nl>
7431
7432 * README: In the pupa-mkimage example use _chain instead of chain
7433 and ext2 instead of fat.
7434 * TODO: Replace ext2fs with jfs as an example. Add an item for
7435 adding journal playback for ext2fs.
7436 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
7437 (pkgdata_MODULES): Added ext2.mod.
7438 (ext2_mod_SOURCES): New variable.
7439 (ext2_mod_CFLAGS): Likewise.
7440 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
7441 * include/pupa/misc.h (pupa_strncpy): New prototype.
7442 (pupa_strcat): Likewise.
7443 (pupa_strncmp): Likewise.
7444 * kern/misc.c (pupa_strcat): Enable function.
7445 (pupa_strncpy): New function.
7446 (pupa_strncmp): Likewise.
7447 * fs/ext2.c: New file.
7448
7449 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
7450 when the read failed before retrying.
7451 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
7452 (_FILE_OFFSET_BITS): Likewise.
7453 * configure.ac: Added AC_SYS_LARGEFILE.
7454
98d15063 74552003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
7456
7457 * genmk.rb (PModule#rule): Make sure to get only symbol names
7458 from the output of nm.
7459 Reported by Robert Millan <zeratul2@wanadoo.es>.
7460
18d9c7cd 74612003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
7462
7463 I forgot to check in these changes for a long time. This adds
7464 incomplete support for VGA console, and this is still very
7465 buggy. Also, a lot of consideration is required for I18N,
7466 UNICODE, and VGA font issues. Therefore, assume that this is
7467 such that "better than nothing".
7468
7469 * font/manager.c: New file.
7470 * include/pupa/font.h: Likewise.
7471 * include/pupa/i386/pc/vga.h: Likewise.
7472 * term/i386/pc/vga.c: Likewise.
7473 * util/unifont2pff.rb: Likewise.
7474
7475 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
7476 (pkgdata_MODULES): Added vga.mod and font.mod.
7477 (vga_mod_SOURCES): New variables.
7478 (vga_mod_CFLAGS): Likewise.
7479 (font_mod_SOURCES): Likewise.
7480 (font_mod_CFLAGS): Likewise.
7481
7482 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
7483
7484 * include/pupa/term.h: Include pupa/err.h.
7485 (struct pupa_term): Added init and fini.
7486 Changed the argument of putchar to pupa_uint32_t.
7487
7488 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
7489 (pupa_console_real_putchar): New prototype.
7490 (pupa_console_putchar): Removed.
7491 (pupa_console_checkkey): Exported.
7492 (pupa_console_getkey): Likewise.
7493
7494 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
7495 characters.
7496
7497 * kern/term.c (pupa_term_set_current): Rewritten.
7498 (pupa_putchar): Likewise.
7499 (pupa_putcode): New function.
7500
7501 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
7502 (pupa_console_real_putchar): ... this.
7503 (pupa_vga_set_mode): New function.
7504 (pupa_vga_get_font): Likewise.
7505
7506 * normal/command.c: Include pupa/term.h.
7507 (terminal_command): New function.
7508 (pupa_command_init): Register the command "terminal".
7509
7510 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
7511 (DISP_UP): Likewise.
7512 (DISP_RIGHT): Likewise.
7513 (DISP_DOWN): Likewise.
7514 (DISP_HLINE): Likewise.
7515 (DISP_VLINE): Likewise.
7516 (DISP_UL): Likewise.
7517 (DISP_UR): Likewise.
7518 (DISP_LL): Likewise.
7519 (DISP_LR): Likewise.
7520
7521 * term/i386/pc/console.c (pupa_console_putchar): New function.
7522
977329f5 75232003-02-08 NIIBE Yutaka <gniibe@m17n.org>
7524
7525 * util/resolve.c (pupa_util_resolve_dependencies): BUG
7526 FIX. Reverse the path_list.
7527
7528 * include/pupa/normal.h: Export pupa_register_command and
7529 pupa_unregister_command.
7530
7531 * hello/hello.c (pupa_cmd_hello): New module.
7532 * conf/i386-pc.rmk: Added hello.mod.
7533
1f5ab428 75342003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
7535
7536 * kern/i386/pc/lzo1x.S: New file.
7537
7538 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
7539 (compress_kernel): New variable.
7540 (generate_image): Heavily modified to support compressing a
7541 large part of the core image.
7542
7543 * util/misc.c (pupa_util_read_image): Fix a file descriptor
7544 leak.
7545 (pupa_util_load_image): New function.
7546
7547 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
7548 (pupa_compressed_size): New variable.
7549 (codestart): Enable Gate A20 here.
7550 Decompress the compressed part of the core image.
7551 Rearrange the code to put functions and variables which are
7552 required for initialization in the non-compressed part.
7553 Include lzo1x.S.
7554
7555 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
7556 here.
7557
7558 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
7559
7560 * include/pupa/i386/pc/kernel.h
7561 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
7562 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
7563 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
7564 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
7565 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
7566
7567 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
7568
7569 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
7570 (Utility#rule): Likewise.
7571
7572 * configure.ac: Check if LZO is available.
7573
ce5bf700 75742003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
7575
7576 * include/pupa/normal.h: New file.
7577 * include/pupa/setjmp.h: Likewise.
7578 * include/pupa/i386/setjmp.h: Likewise.
7579 * normal/cmdline.c: Likewise.
7580 * normal/command.c: Likewise.
7581 * normal/main.c: Likewise.
7582 * normal/menu.c: Likewise.
7583 * normal/i386/setjmp.S: Likewise.
7584
7585 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
7586 (pupa_rescue_cmd_initrd): Likewise.
7587
7588 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
7589 Likewise.
7590
7591 * kern/i386/pc/startup.S (translation_table): New variable.
7592 (translate_keycode): New function.
7593 (pupa_console_getkey): Call translate_keycode.
7594
7595 * kern/rescue.c (attempt_normal_mode): New function.
7596 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
7597 it failed, print a message.
7598
7599 * kern/mm.c (pupa_real_malloc): Print more information when a
7600 free magic is broken.
7601 (pupa_free): If the first free header is not free actually, set
7602 it to P.
7603
7604 * kern/main.c (pupa_load_normal_mode): Just load the module
7605 "normal".
7606 (pupa_main): Don't print the message
7607 "Entering into rescue mode..." here.
7608
7609 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
7610 Declared.
7611 (pupa_rescue_cmd_initrd): Likewise.
7612 (pupa_rescue_cmd_initrd): Likewise.
7613
7614 * include/pupa/symbol.h (FUNCTION): Specify the type.
7615 (VARIABLE): Likewise.
7616
7617 * include/pupa/err.h (pupa_err_t): Added
7618 PUPA_ERR_UNKNOWN_COMMAND.
7619
7620 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
7621 (pupa_dl_get_prefix): Likewise.
7622
7623 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
7624 Added _chain.mod and _linux.mod instead of chain.mod and
7625 linux.mod.
7626 (chain_mod_SOURCES): Renamed to ...
7627 (_chain_mod_SOURCES): ... this.
7628 (chain_mod_CFLAGS): Renamed to ...
7629 (_chain_mod_CFLAGS): ... this.
7630 (linux_mod_SOURCES): Renamed to ...
7631 (_linux_mod_SOURCES): ... this.
7632 (linux_mod_CFLAGS): Renamed to ...
7633 (_linux_mod_CFLAGS): ... this.
7634 (normal_mod_SOURCES): New variable.
7635 (normal_mod_CFLAGS): Likewise.
7636 (normal_mod_ASFLAGS): Likewise.
7637
76382003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
7639
7640 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
7641 possible.
7642
7643 * kern/dl.c (pupa_dl_ref): Refer dependending modules
7644 recursively.
7645 (pupa_dl_unref): Unrefer depending modules recursively.
7646 Don't call pupa_dl_unload implicitly, because PUPA can crash if
7647 a module is unloaded before one depending on that module is
7648 unloaded.
7649 (pupa_dl_unload): Unload depending modules explicitly,
7650 if possible.
7651
c04da074 76522003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
7653
7654 * include/pupa/i386/pc/linux.h: New file.
7655 * loader/i386/pc/linux.c: Likewise.
7656
7657 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
7658 Removed.
7659 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
7660 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
7661 of PUPA_CHAINLOADER_BOOT_SECTOR.
7662
7663 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
7664 (pupa_linux_prot_size): New variable.
7665 (pupa_linux_tmp_addr): Likewise.
7666 (pupa_linux_real_addr): Likewise.
7667 (pupa_linux_boot_zimage): New function.
7668 (pupa_linux_boot_bzimage): Likewise.
7669
7670 * kern/i386/pc/init.c (struct mem_region): New structure.
7671 (MAX_REGIONS): New macro.
7672 (mem_regions): New variable.
7673 (num_regions): Likewise.
7674 (pupa_os_area_addr): Likewise.
7675 (pupa_os_area_size): Likewise.
7676 (pupa_lower_mem): Likewise.
7677 (pupa_upper_mem): Likewise.
7678 (add_mem_region): New function.
7679 (compact_mem_regions): Likewise.
7680 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
7681 the size of the conventional memory and that of so-called upper
7682 memory (before the first memory hole).
7683 Instead of adding each found region to free memory, use
7684 add_mem_region and add them after removing overlaps.
7685 Also, add only 1/4 of the upper memory to free memory. The rest
7686 is used for loading OS images. Maybe this is ad hoc, but this
7687 makes it much easier to relocate OS images when booting.
7688
7689 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
7690 (pupa_enter_rescue_mode): Don't register initrd and module.
7691
7692 * kern/mm.c: Include pupa/dl.h.
7693
7694 * kern/main.c: Include pupa/file.h and pupa/device.h.
7695
7696 * kern/loader.c (pupa_loader_load_module_func): Removed.
7697 (pupa_loader_load_module): Likewise.
7698
7699 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
7700 ``.o''.
7701
7702 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
7703 (pupa_linux_tmp_addr): Likewise.
7704 (pupa_linux_real_addr): Likewise.
7705 (pupa_linux_boot_zimage): Likewise.
7706 (pupa_linux_boot_bzimage): Likewise.
7707
7708 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
7709 (pupa_upper_mem): Likewise.
7710 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
7711 module is too dangerous.
7712
7713 * include/pupa/loader.h (pupa_os_area_addr): Declared.
7714 (pupa_os_area_size): Likewise.
7715 (pupa_loader_set): Remove the first argument. Loader doesn't
7716 manage modules or initrd any longer.
7717 (pupa_loader_load_module): Removed.
7718
7719 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
7720 (linux_mod_SOURCES): New variable.
7721 (linux_mod_CFLAGS): Likewise.
7722
a13f9237 77232003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
7724
7725 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
7726 the length of a blocklist correctly.
7727
7728 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
7729 Use ioctl only if the OS file is a block device.
7730 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
7731 not very useful for normal files.
7732
7733 * kern/main.c (pupa_set_root_dev): New function.
7734 (pupa_load_normal_mode): Likewise.
7735 (pupa_main): Call those above.
7736
7737 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
7738 pupa_uint16_t.
7739
7740 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
7741
a5ffe966 77422003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7743
7744 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
7745 (setup): Configure the installed partition information and the
7746 dl prefix.
7747
7748 * loader/i386/pc/chainloader.c (my_mod): New variable.
7749 (pupa_chainloader_unload): New function.
7750 (pupa_rescue_cmd_chainloader): Refer itself.
7751 (PUPA_MOD_INIT): Save its own module in MY_MOD.
7752
7753 * kern/i386/pc/startup.S (install_partition): Removed.
7754 (version_string): Likewise.
7755 (config_file): Likewise.
7756 (pupa_install_dos_part): New variable.
7757 (pupa_install_bsd_part): Likewise.
7758 (pupa_prefix): Likewise.
7759 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
7760
7761 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
7762 and pupa/misc.h.
7763 (make_install_device): New function.
7764 (pupa_machine_init): Set the dl prefix.
7765
7766 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
7767 (buf): Renamed to ...
7768 (linebuf): ... this.
7769 (pupa_rescue_cmd_prefix): New function.
7770 (pupa_rescue_cmd_insmod): Likewise.
7771 (pupa_rescue_cmd_rmmod): Likewise.
7772 (pupa_rescue_cmd_lsmod): Likewise.
7773 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
7774 rmmod and lsmod.
7775
7776 * kern/mm.c (pupa_memalign): If failed even after invalidating
7777 disk caches, unload unneeded modules and retry.
7778
7779 * kern/misc.c (pupa_memmove): New function.
7780 (pupa_memcpy): Removed.
7781 (pupa_strcpy): New function.
7782 (pupa_itoa): Made static.
7783
7784 * kern/dl.c (pupa_dl_iterate): New function.
7785 (pupa_dl_ref): Likewise.
7786 (pupa_dl_unref): Likewise.
7787 (pupa_dl_unload): Return if succeeded or not.
7788 (pupa_dl_unload_unneeded): New function.
7789 (pupa_dl_unload_all): Likewise.
7790 (pupa_dl_init): Renamed to ...
7791 (pupa_dl_set_prefix): ... this.
7792 (pupa_dl_get_prefix): New function.
7793
7794 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
7795 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
7796 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
7797 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
7798 (pupa_install_dos_part): Declared.
7799 (pupa_install_bsd_part): Likewise.
7800 (pupa_prefix): Likewise.
7801 (pupa_boot_drive): Likewise.
7802
7803 * include/pupa/types.h: Fix a typo.
7804
7805 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
7806 pupa_memmove.
7807 (pupa_memmove): Declared.
7808 (pupa_strcpy): Likewise.
7809
7810 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
7811 pupa_mod_init takes one argument, its own module.
7812 (pupa_dl_unload_unneeded): Declared.
7813 (pupa_dl_unload_all): Likewise.
7814 (pupa_dl_ref): Likewise.
7815 (pupa_dl_unref): Likewise.
7816 (pupa_dl_iterate): Likewise.
7817 (pupa_dl_init): Renamed to ...
7818 (pupa_dl_set_prefix): ... this.
7819 (pupa_dl_get_prefix): Declared.
7820
7821 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
7822 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
7823 unloaded.
7824 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
7825 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
7826
7827 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
7828 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
7829
012d7999 78302003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
7831
7832 * util/i386/pc/pupa-setup.c (setup): Define the internal
7833 function find_first_partition_start at the top level, because GCC
7834 3.0.x cannot compile internal functions in deeper scopes
7835 correctly.
7836 (find_root_device): Use lstat instead of stat.
7837 Don't follow symbolic links.
7838 Fix the path-constructing code.
7839
7840 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
7841 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
7842 by a BLKGETSIZE ioctl first, because block devices don't fill
7843 the member st_mode of the structure stat on Linux.
7844 [__linux__] (linux_find_partition): Use a temporary buffer
7845 REAL_DEV for the working space. Copy it to DEV before returning.
7846 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
7847 buffer cache consistent.
7848 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
7849 strncmp. The previous value was merely wrong.
7850 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
7851
7852 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
7853 FAT size is 12. The previous value was merely wrong.
7854
7855 * kern/main.c (pupa_main): Don't split the starting message from
7856 newlines.
7857
7858 * kern/term.c (pupa_putchar): Put CR after LF instead of before
7859 LF, because BIOS goes crazy about character attributes in this
7860 case.
7861
1cc73a62 78622003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
7863
7864 * include/i386/pc/util/biosdisk.h: New file.
7865 * util/i386/pc/biosdisk.c: Likewise.
7866 * util/i386/pc/pupa-setup.c: Likewise.
7867
7868 * Makefile.in (INCLUDE_DISTFILES): Added
7869 include/pupa/i386/pc/util/biosdisk.h.
7870 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
7871 directory util/i386/pc.
7872 (install-local): Added a rule for sbin_UTILITIES.
7873 (uninstall): Likewise.
7874
7875 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
7876
7877 * util/misc.c (xrealloc): New function.
7878 (pupa_malloc): Likewise.
7879 (pupa_free): Likewise.
7880 (pupa_realloc): Likewise.
7881 (pupa_stop): Likewise.
7882 (pupa_putchar): Likewise.
7883
7884 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
7885
7886 * include/pupa/util/misc.h (xrealloc): Declared.
7887
7888 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
7889 macro.
7890 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
7891 (PUPA_BOOT_MACHINE_BPB_END): ... this.
7892
7893 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
7894 [PUPA_UTIL] (pupa_fat_fini): Likewise.
7895
7896 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
7897 way should be implemented.
7898 [PUPA_UTIL] (pupa_fat_fini): Likewise.
7899
7900 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
7901 the size of NAME for safety.
7902 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
7903 0x88.
7904
7905 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
7906 (pupa_setup_SOURCES): Likewise.
7907
7908 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
7909
08b70fe8 79102002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
7911
7912 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
7913 bunch of pushl's from pusha, because this destroys the return
7914 value.
7915
62ddcc8f 79162002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
7917
7918 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
7919 This means that any missing prototypes could be fatal. Also, you
7920 must take care when writing assembly code. See the comments at
7921 the beginning of startup.S, for more details.
7922
7923 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
7924 compilation mechanism.
7925 (pupa_chainloader_real_boot): Likewise.
7926 (pupa_biosdisk_rw_int13_extensions): Likewise.
7927 (pupa_biosdisk_rw_standard): Likewise.
7928 (pupa_biosdisk_check_int13_extensions): Likewise.
7929 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
7930 (pupa_biosdisk_get_diskinfo_standard): Likewise.
7931 (pupa_get_memsize): Likewise.
7932 (pupa_get_mmap_entry): Likewise.
7933 (pupa_console_putchar): Likewise.
7934 (pupa_console_setcursor): Likewise.
7935 (pupa_getrtsecs): Use pushl instead of push.
7936
7937 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
7938 memory instead of the stack for a mmap entry, because some
7939 BIOSes may ignore the maximum size and overflow.
7940
7941 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
7942
7943 * genmk.rb (PModule#rule): Compile automatically generated
7944 sources with module-specific CFLAGS as well as other sources.
7945
9962ed99 79462002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
7947
7948 * configure.ac: Check ld.
7949 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
7950 respectively, before checking endianness and sizes.
7951
7952 * Makefile.in (LD): New variable.
7953
abdfc3c5 79542002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
7955
7956 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
7957
6a161fa9 79582002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
7959
7960 * Changelog: New file.
7961