]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-05-08 Pavel Roskin <proski@gnu.org>
[grub2.git] / ChangeLog
CommitLineData
041b8094 12009-05-08 Pavel Roskin <proski@gnu.org>
2
3 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
4 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
5 Initialize them with -1. Add sanity check for bad1. Eliminate
6 nerr variable.
7
172800ce 82009-05-08 David S. Miller <davem@davemloft.net>
9
10 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
11
29aa5e81 122009-05-06 Robert Millan <rmh.grub@aybabtu.com>
13
14 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
15 existance.
16
96613b62 172009-05-05 Felix Zielcke <fzielcke@z-51.de>
18
19 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 20 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 21
eef73c8a 222009-05-05 David S. Miller <davem@davemloft.net>
23
24 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
25
119494b5 262009-05-05 Pavel Roskin <proski@gnu.org>
27
28 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
29 of grub_dl_ref() and grub_dl_unref().
30 * commands/parttool.c: Remove preprocessor conditionals around
31 grub_dl_ref() and grub_dl_unref().
32 * fs/affs.c: Likewise.
33 * fs/afs.c: Likewise.
34 * fs/cpio.c: Likewise.
35 * fs/ext2.c: Likewise.
36 * fs/fat.c: Likewise.
37 * fs/hfs.c: Likewise.
38 * fs/hfsplus.c: Likewise.
39 * fs/iso9660.c: Likewise.
40 * fs/jfs.c: Likewise.
41 * fs/minix.c: Likewise.
42 * fs/ntfs.c: Likewise.
43 * fs/reiserfs.c: Likewise.
44 * fs/sfs.c: Likewise.
45 * fs/udf.c: Likewise.
46 * fs/ufs.c: Likewise.
47 * fs/xfs.c: Likewise.
48 * include/grub/dl.h: Likewise.
49 * loader/xnu.c: Likewise.
50
de5fd76e 512009-05-04 Pavel Roskin <proski@gnu.org>
52
53 * commands/acpi.c: Remove unused variable my_mod.
54 * partmap/amiga.c: Likewise.
55 * partmap/apple.c: Likewise.
56 * partmap/gpt.c: Likewise.
57 * partmap/pc.c: Likewise.
58 * partmap/sun.c: Likewise.
59 * term/gfxterm.c: Likewise.
60 * term/i386/pc/vesafb.c: Likewise.
61 * term/i386/pc/vga.c: Likewise.
62
983598ad 632009-05-04 David S. Miller <davem@davemloft.net>
64
65 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
66 pointer args to grub_ieee1275_get_property().
67
8aadec43 68 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
69
9554b15e 70 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
71 devices, and do not traverse down under controller nodes.
72
67e23c90 73 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
74 (grub_ofdisk_open): Use it to un-escape "," characters.
75 * kern/disk.c (find_part_sep): New.
76 (grub_disk_open): Use it to find the first non-escaped ','
77 character in the disk name.
78 * util/ieee1275/devicemap.c (escape_of_path): New.
79 (grub_util_emit_devicemap_entry): Use it.
80 * util/sparc64/ieee1275/grub-install.in: Update script to
81 strip partition specifiers properly by not triggering on
82 '\' escaped ',' characters.
83
74bfdd2f 842009-05-04 Robert Millan <rmh.grub@aybabtu.com>
85
86 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
87 to 0x300.
88 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
89 resolutions.
90 (linux_vesafb_modes): Add a lot of additional modes to the list (based
91 on documentation from Wikipedia).
92
4241d2b1 932009-05-04 Pavel Roskin <proski@gnu.org>
94
95 * disk/ata.c: Spelling fixes.
96 * disk/raid.c: Likewise.
97 * disk/usbms.c: Likewise.
98 * disk/dmraid_nvidia.c: Likewise.
99 * kern/ieee1275/openfw.c: Likewise.
100 * kern/ieee1275/init.c: Likewise.
101 * kern/ieee1275/cmain.c: Likewise.
102 * boot/i386/pc/cdboot.S: Likewise.
103 * video/readers/png.c: Likewise.
104 * video/i386/pc/vbe.c: Likewise.
105 * fs/udf.c: Likewise.
106 * fs/hfs.c: Likewise.
107 * fs/reiserfs.c: Likewise.
108 * efiemu/runtime/efiemu.c: Likewise.
109 * efiemu/main.c: Likewise.
110 * efiemu/mm.c: Likewise.
111 * include/grub/elf.h: Likewise.
112 * include/grub/xnu.h: Likewise.
113 * include/grub/usbdesc.h: Likewise.
114 * include/grub/usb.h: Likewise.
115 * include/grub/script_sh.h: Likewise.
116 * include/grub/lib/LzmaEnc.h: Likewise.
117 * include/grub/efiemu/efiemu.h: Likewise.
118 * include/grub/command.h: Likewise.
119 * normal/menu.c: Likewise.
120 * normal/main.c: Likewise.
121 * normal/datetime.c: Likewise.
122 * bus/usb/uhci.c: Likewise.
123 * mmap/i386/uppermem.c: Likewise.
124 * mmap/mmap.c: Likewise.
125 * commands/acpi.c: Likewise.
126 * commands/test.c: Likewise.
127 * partmap/apple.c: Likewise.
128 * font/font.c: Likewise.
129 * loader/sparc64/ieee1275/linux.c: Likewise.
130 * loader/macho.c: Likewise.
131 * loader/i386/bsd_trampoline.S: Likewise.
132 * loader/i386/bsd.c: Likewise.
133 * loader/xnu.c: Likewise.
134 * term/i386/pc/vesafb.c: Likewise.
135 * term/usb_keyboard.c: Likewise.
136 * util/resolve.c: Likewise.
137 * util/getroot.c: Likewise.
138
0cfc0083 1392009-05-04 Felix Zielcke <fzielcke@z-51.de>
140
141 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
142
7c1d00cd 1432009-05-04 Robert Millan <rmh.grub@aybabtu.com>
144
145 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
146 build error.
147
b01f0548 1482009-05-04 Robert Millan <rmh.grub@aybabtu.com>
149
150 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
151 parameter only available on BIOS.
152
ecc3eb22 1532009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
154
155 Removed wrong semicolon in declaration
156
157 * grub/misc.h (grub_dprintf): remove semicolon
158
112972a9 1592009-05-04 Robert Millan <rmh.grub@aybabtu.com>
160
161 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
162 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
163 is done by grub_cmd_linux() now).
164 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
165 restore video to text mode.
166 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
167 indicates lack of "vga=" parameter. "vga=0" is mapped to
168 `GRUB_LINUX_VID_MODE_NORMAL'.
169
afd5c115 1702009-05-04 Felix Zielcke <fzielcke@z-51.de>
171
172 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
173 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
174 and `normal/script.c'. Add `kern/rescue_reader.c',
175 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
176 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
177 `grub_script.tab.c'.
178
179 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
180 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
181 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
182 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
183 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
184
faa517ce 185 * Makefile.in: Remove duplicated 2008 in Copyright line.
186
ae0c0bdc 1872009-05-04 Robert Millan <rmh.grub@aybabtu.com>
188
189 * util/misc.c (grub_util_warn): New function. Emmits a warning
190 unconditionally.
191 * include/grub/util/misc.h (grub_util_warn): New declaration.
192
193 * util/i386/pc/grub-install.in: Understand --force and pass it down
194 to grub-setup.
195
196 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
197 down to setup().
198 (setup): Improve error messages and add warnings when requested to
199 install in odd layouts. Refuse to install using blocklists unless
200 --force was set.
201
c149b500 2022009-05-04 martin f. krafft <madduck@madduck.net>
203
204 * disk/raid.c (grub_raid_scan_device): Improve debug message.
205
6d260daa 2062009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
207
208 Updated copyright year
209
210 * fs/hfsplus.c: updated copyright year
211
69f853f8 2122009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
213
214 HFS+ UUID
215
216 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
217 in the space previously used by unused3
218 (grub_hfsplus_uuid): new function
219 (grub_hfsplus_fs): added uuid field
220
4c402e73 2212009-05-03 Pavel Roskin <proski@gnu.org>
222
223 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
224 suppress warnings. It's no longer needed.
225 * disk/host.c: Likewise.
226 * disk/ata_pthru.c: Likewise.
227 * disk/loopback.c: Likewise.
228 * hook/datehook.c: Likewise.
229 * parttool/pcpart.c: Likewise.
230 * fs/i386/pc/pxe.c: Likewise.
231 * fs/ntfscomp.c: Likewise.
232 * efiemu/main.c: Likewise.
233 * mmap/mmap.c: Likewise.
234 * commands/crc.c: Likewise.
235 * commands/hexdump.c: Likewise.
236 * commands/hdparm.c: Likewise.
237 * commands/acpi.c: Likewise.
238 * commands/echo.c: Likewise.
239 * commands/minicmd.c: Likewise.
240 * commands/blocklist.c: Likewise.
241 * commands/memrw.c: Likewise.
242 * commands/loadenv.c: Likewise.
243 * commands/usbtest.c: Likewise.
244 * commands/lsmmap.c: Likewise.
245 * commands/boot.c: Likewise.
246 * commands/parttool.c: Likewise.
247 * commands/configfile.c: Likewise.
248 * commands/search.c: Likewise.
249 * commands/ieee1275/suspend.c: Likewise.
250 * commands/cat.c: Likewise.
251 * commands/i386/pc/pxecmd.c: Likewise.
252 * commands/i386/pc/play.c: Likewise.
253 * commands/i386/pc/halt.c: Likewise.
254 * commands/i386/pc/vbeinfo.c: Likewise.
255 * commands/i386/pc/vbetest.c: Likewise.
256 * commands/lspci.c: Likewise.
257 * commands/date.c: Likewise.
258 * commands/handler.c: Likewise.
259 * commands/ls.c: Likewise.
260 * commands/test.c: Likewise.
261 * commands/cmp.c: Likewise.
262 * commands/efi/loadbios.c: Likewise.
263 * commands/efi/fixvideo.c: Likewise.
264 * commands/halt.c: Likewise.
265 * commands/help.c: Likewise.
266 * commands/reboot.c: Likewise.
267 * hello/hello.c: Likewise.
268 * script/sh/main.c: Likewise.
269 * loader/xnu.c: Likewise.
270 * term/terminfo.c: Likewise.
271 * term/i386/pc/serial.c: Likewise.
272 * term/usb_keyboard.c: Likewise.
273
515b5079 2742009-05-03 David S. Miller <davem@davemloft.net>
275
276 * normal/menu.c: Include grub/parser.h
277
dfc31a22 2782009-05-03 Pavel Roskin <proski@gnu.org>
279
2fee74f1 280 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
281 not char*.
282 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
283 Suggested by Javier Martín <lordhabbit@gmail.com>
284
dfc31a22 285 * util/i386/pc/grub-mkrescue.in: Allow for the case when
286 efiemu??.o doesn't exist.
287 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
288 copying.
289
cef17233 2902009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
291
292 FreeBSD 64-bit support
293
294 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
295 and loader/i386/bsd_trampoline.S
296 (bsd_mod_ASFLAGS): new variable
297 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
298 (FREEBSD_MODTYPE_KERNEL64): likewise
299 (grub_bsd64_trampoline_start): likewise
300 (grub_bsd64_trampoline_end): likewise
301 (grub_bsd64_trampoline_selfjump): likewise
302 (grub_bsd64_trampoline_gdt): likewise
303 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
304 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
305 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
306 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
307 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
308 of "attrib" member
309 * loader/i386/bsd_pagetable.c: new file
310 * loader/i386/bsd_trampoline.S: likewise
311 * loader/i386/bsd.c (ALIGN_QWORD): new macro
312 (ALIGN_VAR): likewise
313 (entry_hi): new variable
314 (kern_end_mdofs): likewise
315 (is_64bit): likewise
316 (grub_freebsd_add_meta): use ALIGN_VAR
317 (grub_e820_mmap): new declaration
318 (grub_freebsd_add_mmap): new function
319 (grub_freebsd_add_meta_module): support 64 bit kernels
320 (grub_freebsd_list_modules): use ALIGN_VAR
321 (gdt_descriptor): new declaration
322 (grub_freebsd_boot): support 64 bit kernels
323 (grub_bsd_elf64_hook): new function
324 (grub_bsd_load_elf): support elf64
325
038c5720 3262009-05-03 Bean <bean123ch@gmail.com>
327
328 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
329 after we get the result of if statement.
330
fc45fb58 3312009-05-03 Bean <bean123ch@gmail.com>
332
333 * Makefile.in (enable_efiemu): New variable.
334
335 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
336 set.
337 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
338 path.
339 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
340 path, add -mno-red-zone option.
341 (efiemu64_s.o): Likewise.
342 (efiemu64.o): Use macro $^ for source file.
343
344 * configure.ac (--enable-efiemu): New option.
345
bbee0f2b 3462009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
347
348 xnu support
349
350 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
351 (pkglib_MODULES): add xnu.mod
352 (xnu_mod_SOURCES): new variable
353 (xnu_mod_CFLAGS): likewise
354 (xnu_mod_LDFLAGS): likewise
355 (xnu_mod_ASFLAGS): likewise
356 * conf/i386-pc.rmk: likewise
357 * conf/x86_64-efi.rmk: likewise
7dd4a573 358 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 359 new declaration
360 * include/grub/i386/macho.h: new file
361 * include/grub/i386/xnu.h: likewise
362 * include/grub/macho.h: likewise
363 * include/grub/machoload.h: likewise
364 * include/grub/x86_64/macho.h: likewise
365 * include/grub/x86_64/xnu.h: likewise
366 * include/grub/xnu.h: likewise
367 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
368 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
369 * loader/i386/efi/xnu.c: new file
370 * loader/i386/pc/xnu.c: likewise
371 * loader/i386/xnu.c: likewise
372 * loader/i386/xnu_helper.S: likewise
373 * loader/macho.c: likewise
374 * loader/xnu.c: likewise
375 * loader/xnu_resume.c: likewise
376 * util/grub-dumpdevtree: likewise
377 * include/grub/i386/pit.h: include grub/err.h
378 (grub_pit_wait): export
379 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 380
5caf964d 3812009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
382
383 Efiemu
7dd4a573 384
5caf964d 385 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 386 _linux_efi, linux_efi.
387 new files in grub-emu
5caf964d 388 new targets efiemu32.o and efiemu64.o
389 * loader/linux_normal_efiemu.c: likewise
390 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 391 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 392 files to copy
393 * include/grub/autoefi.h: new file
7dd4a573 394 * include/grub/i386/efiemu.h: likewise
5caf964d 395 * include/grub/i386/pc/efiemu.h: likewise
396 * include/grub/efi/api.h: add LL suffix when necessary
397 new definitions relating to tables
398 * include/grub/efiemu/efiemu.h: new file
399 * include/grub/efiemu/runtime.h: likewise
400 * efiemu/prepare.c: likewise
401 * efiemu/loadcore_common.c: likewise
402 * efiemu/loadcore64.c: likewise
403 * efiemu/runtime/efiemu.sh: likewise
404 * efiemu/runtime/efiemu.S: likewise
405 * efiemu/runtime/efiemu.c: likewise
406 * efiemu/runtime/config.h: likewise
407 * efiemu/prepare32.c: likewise
408 * efiemu/main.c: likewise
409 * efiemu/modules/pnvram.c: likewise
410 * efiemu/modules/i386: likewise
411 * efiemu/modules/i386/pc: likewise
412 * efiemu/modules/acpi.c: likewise
413 * efiemu/i386/pc/cfgtables.c: likewise
414 * efiemu/i386/loadcore64.c: likewise
415 * efiemu/i386/loadcore32.c: likewise
416 * efiemu/prepare64.c: likewise
417 * efiemu/loadcore.c: likewise
418 * efiemu/symbols.c: likewise
419 * efiemu/mm.c: likewise
420 * efiemu/loadcore32.c: likewise
7dd4a573 421
4222009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 423
424 ACPI spoofing
425
426 * commands/acpi.c: new file
427 * commands/i386/pc/acpi.c: likewise
428 * commands/efi/acpi.c: likewise
429 * include/grub/acpi.h: likewise
430 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
431 (acpi_mod_SOURCES): new variable
432 (acpi_mod_CFLAGS): likewise
433 (acpi_mod_LDFLAGS): likewise
434 * conf/i386-efi.rmk: likewise
435 * conf/x86_64-efi.rmk: likewise
436
7dd4a573 4372009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 438
439 Missing part from mmap patch
440
441 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
442 (grub_mmap_unregister)
443 (grub_mmap_free_and_unregister): use grub_mmap_register
444
7dd4a573 4452009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 446
447 Mmap services
448
449 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
450 * loader/i386/linux.c (find_mmap_size): likewise
451 (allocate_pages): likewise
452 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
453 (grub_fill_multiboot_mmap): likewise
454 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
455 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
456 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
457 (OPENBSD_MMAP_RESERVED): likewise
458 * include/grub/i386/pc/memory.h: include grub/memory.h
459 (grub_lower_mem): removed
460 (grub_upper_mem): likewise
461 (GRUB_MACHINE_MEMORY_ACPI): new definition
462 (GRUB_MACHINE_MEMORY_NVS): likewise
463 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
464 (GRUB_MACHINE_MEMORY_HOLE): likewise
465 (grub_machine_mmap_register): likewise
466 (grub_machine_mmap_unregister): likewise
467 (grub_machine_get_upper): likewise
468 (grub_machine_get_lower): likewise
469 (grub_machine_get_post64): likewise
470 * include/grub/i386/efi/memory.h: new file
471 * include/grub/x86_64/efi/memory.h: likewise
472 * include/grub/efi/memory.h: likewise
473 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
474 (mmap_mod_SOURCES): new variable
475 (mmap_mod_LDFLAGS): likewise
476 (mmap_mod_ASFLAGS): likewise
477 * conf/i386-coreboot.rmk: likewise
478 * conf/i386-ieee1275.rmk: likewise
479 * conf/i386-efi.rmk: likewise
480 * conf/x86_64-efi.rmk: likewise
481 * include/grub/types.h (UINT_TO_PTR): new macro
482 (PTR_TO_UINT32): likewise
483 (PTR_TO_UINT64): likewise
484 * include/grub/memory.h: new file
485 * mmap/i386/pc/mmap.c: likewise
486 * mmap/i386/pc/mmap_helper.S: likewise
487 * mmap/i386/uppermem.c: likewise
488 * mmap/mmap.c: likewise
489 * mmap/efi/mmap.c: likewise
7dd4a573 490 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 491 grub_upper_mem
492 * kern/i386/pc/init.c (grub_lower_mem): removed variable
493 (grub_upper_mem): likewise
494 (grub_machine_init): don't use grub_upper_mem,
495 make grub_lower_mem local
496 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
497 grub_mmap_iterate and grub_mmap_get_upper
498 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
499
d558e6b5 5002009-05-02 Bean <bean123ch@gmail.com>
501
502 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
503 script/sh/parser.y.
504 (pkglib_MODULES): Add normal.mod and sh.mod.
505 (normal_SOURCES): New variable.
506 (normal_mod_CFLAGS): Likewise.
507 (normal_mod_LDFLAGS): Likewise.
508 (sh_mod_SOURCES): Likewise.
509 (sh_mod_CFLAGS): Likewise.
510 (sh_mod_LDFLAGS): Likewise.
511
512 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
513 script/sh/lexer.c_DEPENDENCIES.
514 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
515 kern/rescue_reader.c and kern/rescue_parser.c.
516 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
517 (grub_emu_SOURCES): Change source files.
518 (pkglib_MODULES): Remove normal.mod.
519 (normal_SOURCES): Removed.
520 (normal_mod_CFLAGS): Likewise.
521 (normal_mod_LDFLAGS): Likewise.
522 * conf/i386-coreboot.rmk: Likewise.
523 * conf/i386-efi.rmk: Likewise.
524 * conf/i386-ieee1276.rmk: Likewise.
525 * conf/powerpc-ieee1275.rmk: Likewise.
526 * conf/sparc64-ieee1275.rmk: Likewise.
527 * conf/x86_64-efi.rmk: Likewise.
528
529 * include/grub/command.h (grub_command_execute): New inline function.
530
531 * include/grub/menu.h (grub_menu_entry): Removed commands field.
532
533 * include/grub/normal.h: Remove <grub/setjmp.h>.
534 (grub_fs_module_list): Moved to normal/autofs.c.
535 (grub_exit_env): Removed.
536 (grub_command_execute): Likewise.
537 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
538 parameter script.
539 (read_command_list): New function declaration.
540 (read_fs_list): Likewise.
541
542 * include/parser.h: Include <grub/reader.h>.
543 (grub_parser_split_cmdline): Change type of getline parameter.
544 (grub_parser): New structure.
545 (grub_parser_class): New variable.
546 (grub_parser_execute): New function declaration.
547 (grub_register_rescue_parser): Likewise.
548 (grub_parser_register): New inline function.
549 (grub_parser_unregister): Likewise.
550 (grub_parser_get_current): Likewise.
551 (grub_parser_set_current): Likewise.
552
553 * include/grub/reader.h: New file.
554 * kern/reader.c: Likewise.
555 * kern/rescue_parser.c: Likewise.
556 * kern/rescue_reader.c: Likewise.
557 * normal/autofs.c: Likewise.
558 * normal/dyncmd.c: Likewise.
559
560 * include/grub/rescue.h: Removed.
561 * normal/command.h: Likewise.
562
563 * include/grub/script.h: Moved to ...
564 * include/grub/script_sh.h: ... Moved here.
565 * normal/execute.c: Moved to ...
566 * script/sh/execute.c: ... Moved here.
567 * normal/function.c: Moved to ...
568 * script/sh/function.c: ... Moved here.
569 * normal/lexer.c: Moved to ...
570 * script/sh/lexer.c: ... Moved here.
571 * normal/parser.y: Moved to ...
572 * script/sh/parser.y: ... Moved here.
573 * normal/script.c: Moved to ...
574 * script/sh/script.c: ... Moved here.
575
576 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
577 <grub/reader.h>.
578 (grub_exit_env): Removed.
579 (fs_module_list): Moved to normal/autofs.c.
580 (grub_file_getline): Don't handle comment here.
581 (free_menu): Skip removed field entry->commands.
582 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
583 script parameter.
584 (read_config_file): Removed nested parameter, change getline function.
585 (grub_enter_normal_mode): Removed.
586 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
587 (read_command_list): Likewise.
588 (autoload_fs_module): Moved to normal/autofs.c.
589 (read_fs_list): Likewise.
590 (reader_nested): New variable.
591 (grub_normal_execute): Run parser.sh to switch to sh parser.
592 (grub_cmd_rescue): Removed.
593 (cmd_normal): Removed.
594 (grub_cmd_normal): Unregister itself at the beginning. Don't register
595 rescue command.
596 (grub_cmdline_run): New function.
597 (grub_normal_reader_init): Likewise.
598 (grub_normal_read_line): Likewise.
599 (grub_env_write_pager): Likewise.
600 (cmdline): New variable.
601 (grub_normal_reader): Likewise.
602 (GRUB_MOD_INIT): Register normal reader and set as current, register
603 pager hook, register normal command with grub_register_command_prio,
604 so that it won't show up in command.lst.
605 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
606 grub_fs_autoload_hook.
607
608 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
609 (grub_menu_execute_entry): Replace grub_script_execute with
610 grub_parser_execute, change parameter to grub_command_execute.
611
612 * normal/menu_text.c: Remove <grub/script.h>.
613
614 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
615 and <grub/parser.h>.
616 (run): Change editor_getline to use new parser interface. Change
617 parameter to grub_command_execute.
618
619 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
620 <grub/reader.h> and <grub/parser.h>.
621 (grub_load_normal_mode): Execute normal command.
622 (grub_main): Call grub_register_core_commands,
623 grub_register_rescue_parser and grub_register_rescue_reader, use
624 grub_reader_loop to enter input loop.
625
7dd4a573 626 * kern/parser.c (grub_parser_split_cmdline): Change type of
627 getline parameter.
d558e6b5 628 (grub_parser_class): New variable.
629 (grub_parser_execute): New function.
630
631 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
632 * loader/multiboot2.c: Likewise.
633 * loader/sparc64/ieee1275/linux.c: Likewise.
634
635 * util/grub-emu.c (read_command_list): New dummy function.
636
18db813d 6372009-05-02 Robert Millan <rmh.grub@aybabtu.com>
638
639 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
640 count to 16 for CCISS and IDA.
641
6c67de15 6422009-05-02 Robert Millan <rmh.grub@aybabtu.com>
643
644 * normal/menu_text.c (grub_wait_after_message): Print a newline
645 after waiting for user input.
646
647 * loader/i386/linux.c: Include `<grub/normal.h>'.
648 (grub_cmd_linux): Improve the error message about `ask' mode, by
649 waiting for user input so it's not missed (we can do this, since
650 user requested interaction).
651
d9dc87b0 6522009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
653
654 Added missing lst to grub-mkrescue
655
656 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
657 and ${input_dir}/parttool.lst
658
ac8a2baa 6592009-04-30 David S. Miller <davem@davemloft.net>
660
ad22a610 661 * util/hostdisk.c (device_is_wholedisk): New function.
662 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
663 zero only if device_is_wholedisk() returns true.
664
6966215d 665 * util/hostdisk.c (convert_system_partition_to_system_disk):
666 Handle virtual disk devices named /dev/vdiskX as found on sparc
667 and powerpc.
668
ac8a2baa 669 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
670 lettered partition specifier is found, convert to numbered.
671
979b4fb4 6722009-04-29 David S. Miller <davem@davemloft.net>
673
e2bf39b2 674 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
675 * include/grub/sparc64/ieee1275/memory.h: Likewise.
676
3c64e104 677 * normal/command.c: Add missing newline at end of file.
678
979b4fb4 679 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
680 warnings.
681 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
682 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
683 grub_ofdisk_read): Likewise, and deal similarly with the fact that
684 ihandles have a 32-bit type but need to be stored in a "void *".
685
136d9f82 6862009-04-28 Pavel Roskin <proski@gnu.org>
687
9459c306 688 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
689 not disk. Adjust all dependencies.
2e08a26a 690 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 691 grub_disk_close().
692
136d9f82 693 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
694 parent's partition, don't copy it by reference, as it gets freed
695 on close.
696
7dd4a573 6972009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 698
699 Preboot hooks support
700
701 * commands/boot.c (struct grub_preboot_t): new declaration
702 (preboots_head): new variable
703 (preboots_tail): likewise
704 (grub_loader_register_preboot_hook): new function
705 (grub_loader_unregister_preboot_hook): likewise
706 (grub_loader_set): launch preboot hooks
707 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
708 (grub_loader_register_preboot_hook): new declaration
709 (grub_loader_unregister_preboot_hook): likewise
710
5af922b5 7112009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
712
713 Warning fix
714
7dd4a573 715 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 716 calling grub_dprintf
717
a5562c30 7182009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
719
720 Bug and warning fixes
721
7dd4a573 722 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 723 declaration
724 * commands/test.c (test_parse): fixed bug with file tests and corrected
725 declaration of find_file
726
4006f85c 7272009-04-26 Pavel Roskin <proski@gnu.org>
728
729 * Makefile.in: Don't install empty manual pages if help2man is
730 missing. Use help2man option for output, not shell redirection.
731
5c77c3de 7322009-04-26 David S. Miller <davem@davemloft.net>
733
734 * util/grub-mkdevicemap.c (make_device_map): Add missing
735 NESTED_FUNC_ATTR to process_device().
736
033b10a8 7372009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
738
739 Test command
740
741 * commands/test.c: rewritten to use bash-like test
742
e4343593 7432009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
744
745 Parttool autoloading and improvements
746
7dd4a573 747 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 748 (parttool.lst): new target
749 * genmk.rb: generate parttool-*
750 (CLEANFILES): add #{parttool}
751 (PARTTOOLFILES): new variable
752 * genparttoollist.sh: new file
7dd4a573 753 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 754 (grub_pcpart_type): likewise
755 * commands/parttool.c (helpmsg): new variable
756 (grub_cmd_parttool): output help if not enough arguments are supplied
757 autoload modules
758 (GRUB_MOD_INIT(parttool)): use helpmsg
759
0d312500 7602009-04-24 David S. Miller <davem@davemloft.net>
761
7dd4a573 762 Avoiding opening same device multiple times in device iterator.
0d312500 763
764 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 765 and use it to build a list of partitions in iterate_disk() and
0d312500 766 iterate_partition().
767
ac20caff 768 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
769 on disk->data.
770
0dcf7495 771 * disk/ieee1275/nand.c (grub_nand_iterate): Return
772 grub_devalias_iterate() result instead of unconditional 0.
773 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
774 Also, capture hook return value, either directly or via
775 grub_children_iterate(), and propagate to caller.
776 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
777 grub_children_iterate): Return value is now 'int' instead of
778 'grub_err_t'.
779 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
780 like a proper iterator, stopping when hooks return non-zero.
781 (grub_devalias_iterate): Likewise.
782
c8c08833 7832009-04-23 David S. Miller <davem@davemloft.net>
784
785 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
786
f01005a8 7872009-04-22 David S. Miller <davem@davemloft.net>
788
789 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
790 is larger than address_cells, use that value for address_cells too.
791
4e8269da 792 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
793 IEEE1275_MAX_PATH_LEN): Define.
794 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
795 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
796 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
797 'devtype'. Explicitly NULL terminate devalias expansion.
798
a1447506 799 * util/sparc64/ieee1275/misc.c: New file.
800 * util/sparc64/ieee1275/grub-setup.c: New file.
801 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
802 * util/sparc64/ieee1275/grub-mkimage.c: New file.
803 * util/sparc64/ieee1275/grub-install.in: New file.
804 * util/ieee1275/ofpath.c: New file.
805 * util/ieee1275/devicemap.c: New file.
806 * util/devicemap.c: New file.
807 * util/deviceiter.c: New file.
808 * kern/sparc64/ieee1275/init.c: New file.
809 * include/grub/util/ofpath.h: New file.
810 * include/grub/util/deviceiter.h: New file.
811 * util/grub-mkdevicemap.c: Include deviceiter.h.
812 Implement using grub_util_emit_devicemap_entry and
813 grub_util_iterate_devices.
814 * conf/i386-corebook.rmk: Build util/deviceiter.c and
815 util/devicemap.c into grub-mkdevicemap
816 * conf/i386-efi.rmk: Likewise.
817 * conf/i386-ieee1275.rmk: Likewise.
818 * conf/i386-pc.rmk: Likewise.
819 * conf/powerpc-ieee1275.rmk: Likewise.
820 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
821 images and installation utilities. Build kernel as image
822 instead of as elf binary. Use common rules as much as possible.
823
7dd4a573 8242009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 825
826 Correct GPT definition
827
7dd4a573 828 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 829 of "attrib" member
830
c6c5219f 8312009-04-19 Felix Zielcke <fzielcke@z-51.de>
832
833 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
834
0552ff9f 8352009-04-19 David S. Miller <davem@davemloft.net>
836
837 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
838 (grub_rescue_cmd_linux): Rename to...
839 (grub_cmd_linux): and fix prototype.
840 (grub_rescue_cmd_initrd): Rename to...
841 (grub_cmd_initrd): and fix prototype.
842 (cmd_linux, cmd_initrd): New.
843 (GRUB_MOD_INIT(linux)): Use grub_register_command().
844 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
845
d1a282fc 8462009-04-17 Pavel Roskin <proski@gnu.org>
847
07c5039f 848 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
849 format.
850 (grub_ohci_transfer): Likewise.
851
b012002d 852 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
853
1bc09c35 854 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
855 return without a value. Fix inconsistent indentation.
856
e0ff9126 857 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
858 match struct grub_fs.
859
d1a282fc 860 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
861 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
862 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
863 * commands/lspci.c (grub_lspci_iter): Likewise.
864
a96df3f2 8652009-04-16 Bean <bean123ch@gmail.com>
866
867 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
868 value.
869
41bb0fe9 8702009-04-15 Pavel Roskin <proski@gnu.org>
871
872 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
873 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
874 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
875 definitions.
876
596c6970 8772009-04-15 Felix Zielcke <fzielcke@z-51.de>
878
879 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 880 that no multiple data or metadata areas are supported and `Unknown
596c6970 881 metadata header'.
882
7dd4a573 8832009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 884
885 Move loader out of the kernel
886
887 * kern/loader.c: moved to ...
888 * commands/boot.c: ... moved here
889 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
890 * commands/boot.c (grub_cmd_boot): moved here. All users updated
891 * include/grub/kernel.h (grub_machine_fini): export
892 * include/grub/loader.h (grub_loader_is_loaded): update declaration
893 (grub_loader_set): likewise
894 (grub_loader_unset): likewise
895 (grub_loader_boot): likewise
896 * conf/common.rmk: new module boot.mod
897 (pkglib_MODULES): add boot.mod
898 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
899 (grub_emu_SOURCES): likewise
900 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
901 (grub_emu_SOURCES): likewise
902 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
903 (grub_emu_SOURCES): likewise
904 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
905 (grub_emu_SOURCES): likewise
906 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
907 (grub_emu_SOURCES): likewise
7dd4a573 908 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
909 (grub_emu_SOURCES): likewise
0d5d5653 910 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 911 (grub_emu_SOURCES): likewise
0d5d5653 912
7dd4a573 9132009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 914
915 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 916
5999d619 917 * kern/misc.c (grub_itoa): Removed function
918 (grub_ltoa): likewise
919 (grub_vsprintf): use grub_lltoa
920
7dd4a573 9212009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 922
923 Restore grub-emu
924
925 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
926 * conf/i386-coreboot.rmk: likewise
927 * conf/i386-ieee1275.rmk: likewise
928 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 929
20318222 9302009-04-15 Felix Zielcke <fzielcke@z-51.de>
931
932 * INSTALL: Add that `./autogen.sh' needs to be run before
933 `./configure.'.
934
d05f0df3 9352009-04-14 Bean <bean123ch@gmail.com>
936
937 * Makefile.in (pkglib_DATA): Add handler.lst.
938 (handler.lst): New rule.
939
940 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
941 * conf/i386-coreboot.rmk: Likewise.
942 * conf/i386-ieee1275.rmk: Likewise.
943 * conf/i386-efi.rmk: Likewise.
944 * conf/x86_64-efi.rmk: Likewise.
945 * conf/powerpc-ieee1275.rmk: Likewise.
946 * conf/sparc64-ieee1275.rmk: Likewise.
947
948 * genhandlerlist.sh: New file.
949
950 * genmk.rb: Add rules to generate handler.lst.
951
952 * include/grub/normal.h (grub_file_getline): New function definition.
953 (read_handler_list): Likewise.
954 (free_handler_list): Likewise.
955
956 * include/grub/term.h (grub_term_register_input): Add name parameter
957 for auto generation of handler.lst.
958 (grub_term_register_output): Likewise.
959
960 * normal/handler.c: New file.
961
962 * normal/main.c (get_line): Renamed to grub_file_getline.
963 (read_config_file): Use the newly renamed grub_file_getline.
964 (read_command_list): Likewise.
965 (read_fs_list): Likewise.
966 (grub_normal_execute): Call read_handler_list to parse handler.lst.
967 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
968
969 * term/efi/console.c (grub_console_init): Add name parameter for auto
970 generation of handler.lst.
971 * term/gfxterm.c: Likewise.
972 * term/i386/pc/at_keyboard.c: Likewise.
973 * term/i386/pc/console.c: Likewise.
974 * term/i386/pc/serial.c: Likewise.
975 * term/i386/pc/vesafb.c: Likewise.
976 * term/i386/pc/vga.c: Likewise.
977 * term/i386/pc/vga_text.c: Likewise.
978 * term/ieee1275/ofconsole.c: Likewise.
979 * term/usb_keyboard.c: Likewise.
980
33c846be 9812009-04-14 Bean <bean123ch@gmail.com>
982
983 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
984 properly with null character.
985
4484e01e 9862009-04-14 Felix Zielcke <fzielcke@z-51.de>
987
988 * configure: Remove.
989 * config.h.in: Likewise.
f93d668e 990 * stamp-h.in: Likewise.
4484e01e 991 * DISTLIST: Likewise.
992 * conf/common.mk: Likewise.
993 * conf/i386-coreboot.mk: Likewise.
994 * conf/i386-efi.mk: Likewise.
995 * conf/i386-ieee1275.mk: Likewise.
996 * conf/i386.mk: Likewise.
997 * conf/i386-pc.mk: Likewise.
998 * conf/powerpc-ieee1275.mk: Likewise.
999 * conf/sparc64-ieee1275.mk: Likewise.
1000 * conf/x86_64-efi.mk: Likewise.
1001
1002 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1003 develop on GRUB.
1004
7dd4a573 10052009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 1006 David S. Miller <davem@davemloft.net>
1007
1008 * util/hostdisk.c (make_device_name): Fix buffer length
1009 calculations.
1010
e25b5a8c 10112009-04-14 Felix Zielcke <fzielcke@z-51.de>
1012
1013 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1014 <sys/param.h> and <sys/sysctl.h>.
1015 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1016 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1017 opening the device and reset them afterwards.
1018
1f1f580c 10192009-04-13 Pavel Roskin <proski@gnu.org>
1020
1021 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1022 Reported by John Stanley <jpsinthemix@verizon.net>
1023
7ebc2d6b 10242009-04-13 Robert Millan <rmh@aybabtu.com>
1025
1026 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 1027 that name for menuentries when appropriate.
7ebc2d6b 1028
d8ba3667 10292009-04-13 Felix Zielcke <fzielcke@z-51.de>
1030
1031 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1032
cba416eb 10332009-04-13 Robert Millan <rmh@aybabtu.com>
1034
1035 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1036 to Linux, simply abort telling the user it's no longer supported.
1037
a547a745 10382009-04-13 Felix Zielcke <fzielcke@z-51.de>
1039
1040 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 1041 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 1042 `freebsd_loadenv' only when devices.hints exist.
1043
232a769c 10442009-04-13 Pavel Roskin <proski@gnu.org>
1045
1046 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1047
c3012039 10482009-04-13 Felix Zielcke <fzielcke@z-51.de>
1049
1050 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1051 partition number.
1052 (grub_drive): Likewise.
1053
234022fe 10542009-04-13 David S. Miller <davem@davemloft.net>
1055
1056 * kern/sparc64/ieee1275/ieee1275.c: New file.
1057 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1058 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1059 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1060 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1061 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1062 grub_ieee1275_alloc_physmem): Declare new exported functions.
1063
d8e1836c 1064 * include/grub/sparc64/ieee1275/loader.h: New file.
1065 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1066 * include/grub/sparc64/kernel.h: Likewise.
1067 * loader/sparc64/ieee1275/linux.c: Likewise.
1068
96bd81ec 1069 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1070 (grub_fstest_SOURCES): Likewise.
1071
6a4737e5 1072 * util/hostdisk.c (make_device_name): Do not make any assumptions
1073 about the length of drive names.
1074
1d7a72fd 1075 * kern/dl.c (grub_dl_load_file): Close file immediately when
1076 we are done using it.
1077
56bc2471 10782009-04-12 David S. Miller <davem@davemloft.net>
1079
1080 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1081 values. Noticed by Pavel Roskin.
1082
df38d0bb 1083 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1084 target compiler.
7dd4a573 1085
e382e93a 1086 * genmk.rb: Add more flexible image type specification, also
1087 pass --strip-unneeded to objcopy.
1088 * conf/i386-pc.rmk: Use *_FORMAT.
1089 * conf/i386-pc.mk: Rebuilt.
1090
f5dbbca9 1091 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1092 (OFDISK_HASH_SZ): Define.
1093 (ofdisk_hash): New hash table.
1094 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1095 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1096 instead of device phandle which is not unique.
1097
91c88b12 1098 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1099 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1100 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1101 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1102 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1103 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1104 GRUB_KERNEL_MACHINE_DATA_END): Define.
1105 (grub_kernel_image_size, grub_total_module_size): Declare.
1106
5b5d4aa5 11072009-04-12 Pavel Roskin <proski@gnu.org>
1108
7dd4a573 1109 * configure.ac: Change the logic when we check for target tools.
1110 Do it when the target is specified and it's different from the
1111 specified value of the host.
5b5d4aa5 1112
c91e1793 11132009-04-11 Felix Zielcke <fzielcke@z-51.de>
1114
1115 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1116 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1117 GNU/kFreeBSD. Check if a device is a character device. Use
1118 DIOCGMEDIASIZE to get the size.
1119 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1120 support for GNU/kFreeBSD.
1121 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1122 is a character device instead of a block device. Add support for
1123 FreeBSD device names.
1124
1125 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1126 is a character device instead of a block device.
1127
1128 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1129 is a character device instead of a block device.
1130
b1ac8644 11312009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1132
1133 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1134 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1135 FreeBSD. Check if a device is a character device. Use
1136 DIOCGMEDIASIZE to get the size.
1137 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1138 support for FreeBSD.
1139 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1140 is a character device instead of a block device. Add support for
1141 FreeBSD device names.
1142
1143 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1144 a character device instead of a block device.
1145 (grub_util_check_char_device): New function.
1146
1147 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1148 a character device instead of a block device.
1149
1150 * include/grub/util/getroot.h (grub_util_check_char_device): New
1151 prototype.
1152
a3f7515a 11532009-04-11 David S. Miller <davem@davemloft.net>
1154
1155 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1156 static libgcc.
1157 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1158 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1159 function, if present.
1160 (__bswapdi2): Likewise.
1161
0d44993d 1162 * include/grub/sparc64/ieee1275/boot.h: New file.
1163 * boot/sparc64/ieee1275/boot.S: Likewise.
1164 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1165
ed3d2bc2 1166 * kern/misc.c (grub_ltoa): New function.
1167 (grub_vsprintf): Use it to format 'long' integers.
1168
d3bfb59c 11692009-04-10 David S. Miller <davem@davemloft.net>
1170
1171 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1172 slots are of type grub_ieee1275_cell_t.
1173 (grub_nand_read): Likewise.
1174 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1175 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1176 macros are used to compare values in arg/ret block of the call.
1177 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1178 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1179 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1180 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1181 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1182 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1183 grub_ieee1275_close, grub_ieee1275_set_property,
1184 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1185 grub_ieee1275_cell_t.
1186 * kern/ieee1275/openfw.c (grub_map): Likewise.
1187 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1188 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1189
450e2238 1190 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1191 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1192 (grub_devalias_iterate): Likewise.
1193
7dd4a573 11942009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 1195
1196 UFS improvements
1197
1198 * fs/ufs.c (INODE_NBLOCKS): new definition
1199 (struct grub_ufs_dirent): added fields for non-BSD dirents
1200 (grub_ufs_get_file_block): fixed double indirect handling
1201 (grub_ufs_lookup_symlink): use more robust way to determine whether
1202 symlink is inline
1203 (grub_ufs_find_file): support for non-BSD dirents
1204 (grub_ufs_dir): support for non-BSD dirents
1205
e7e6862a 12062009-04-10 Bean <bean123ch@gnail.com>
1207
1208 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1209 attribute, otherwise the size would be wrong for i386 platform.
1210
1211 * include/grub/pci.h (grub_pci_read_word): New inline function.
1212 (grub_pci_read_byte): Likewise.
1213 (grub_pci_write): Likewise.
1214 (grub_pci_write_word): Likewise.
1215 (grub_pci_write_byte): Likewise.
1216
1217 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1218
1219 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1220 (find_framebuf): Scan pci to locate the frame buffer address.
1221
1222 * commands/efi/fixvideo.c: New file.
1223
1224 * commands/efi/loadbios.c: Likewise.
1225
1226 * commands/memrw.c: Likewise.
1227
1228 * util/grub-dumpbios.in: Likewise.
1229
1230 * conf/common.rmk (grub-dumpbios): New utility.
1231 (pkglib_MODULES): New module memrw.mod.
1232 (memrw_mod_SOURCE): New macro.
1233 (memrw_mod_CFLAGS): Likewise.
1234 (memrw_mod_LDFLAGS): Likewise.
1235
7dd4a573 1236 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 1237 fixvideo.mod.
1238 (loadbios_mod_SOURCE): New macro.
1239 (loadbios_mod_CFLAGS): Likewise.
1240 (loadbios_mod_LDFLAGS): Likewise.
1241 (fixvideo_mod_SOURCE): Likewise.
1242 (fixvideo_mod_CFLAGS): Likewise.
1243 (fixvideo_mod_LDFLAGS): Likewise.
1244
7dd4a573 1245 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 1246 fixvideo.mod.
1247 (loadbios_mod_SOURCE): New macro.
1248 (loadbios_mod_CFLAGS): Likewise.
1249 (loadbios_mod_LDFLAGS): Likewise.
1250 (fixvideo_mod_SOURCE): Likewise.
1251 (fixvideo_mod_CFLAGS): Likewise.
1252 (fixvideo_mod_LDFLAGS): Likewise.
1253
af63ada2 12542009-04-08 Felix Zielcke <fzielcke@z-51.de>
1255
1256 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1257
c2cdde70 12582009-04-07 David S. Miller <davem@davemloft.net>
1259
1260 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1261 support for R_SPARC_OLO10 relocations. Fix compile warning for
1262 R_SPARC_WDISP30 case.
ea3f72cf 1263 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 1264
761319cf 12652009-04-06 Pavel Roskin <proski@gnu.org>
1266
1007d1f5 1267 * include/grub/misc.h (ARRAY_SIZE): New macro.
1268 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1269 New macro.
1270 * loader/i386/linux.c (allocate_pages): Use free_pages().
1271 (grub_linux_unload): Don't use free_pages().
1272 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1273 wrong index. Treat all other modes as text modes.
1274 (grub_cmd_linux): Initialize vid_mode unconditionally to
1275 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
1276
761319cf 1277 * commands/help.c (print_command_help): Use cmd->prio, not
1278 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1279
ea761d40 12802009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 1281
ea761d40 1282 Parttool
1283
1284 * parttool/pcpart.c: new file
1285 * commands/parttool.c: likewise
1286 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1287 (parttool_mod_SOURCES): new variable
1288 (parttool_mod_CFLAGS): likewise
1289 (parttool_mod_LDFLAGS): likewise
1290 (pcpart_mod_SOURCES): likewise
1291 (pcpart_mod_CFLAGS): likewise
1292 (pcpart_mod_LDFLAGS): likewise
7dd4a573 1293 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 1294 and parttool/pcpart.c
1295 * conf/i386-efi.rmk: likewise
1296 * conf/i386-ieee1275.rmk: likewise
1297 * conf/i386-pc.rmk: likewise
1298 * conf/powerpc-ieee1275.rmk: likewise
1299 * conf/sparc64-ieee1275.rmk: likewise
1300 * conf/x86_64-ieee1275.rmk: likewise
1301
05aaebfb 13022009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1303
1304 Support for mtime and further expandability of dir command
1305
1306 * include/grub/lib/datetime.h: moved to ...
7dd4a573 1307 * include/grub/datetime.h: ... moved here and added
05aaebfb 1308 declaration of grub_unixtime2datetime. All users updated
7dd4a573 1309 * include/grub/fs.h: new syntax for dir and mtime functions in
1310 struct grub_fs
05aaebfb 1311 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1312 and GRUB_FSHELP_FLAGS_MASK
1313 * commands/ls.c (grub_ls_list_files): Write mtime in long format
1314 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1315 (grub_ext2_mtime): new function
1316 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1317 (grub_hfsplus_mtime): new function
1318 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1319 (GRUB_UFS_ATTR_FILE): likewise
1320 (GRUB_UFS_ATTR_LNK): likewise
1321 (struct grub_ufs_sblock): new fields mtime
1322 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1323 all users updated
1324 (grub_ufs_dir): mtime support
1325 (grub_ufs_mtime): new function
1326 * fs/affs.c (grub_affs_dir): use new dir syntax
1327 * fs/afs.c (grub_afs_dir): likewise
1328 * fs/cpio.c (grub_cpio_dir): likewise
1329 * fs/fat.c (grub_fat_find_dir): likewise
1330 * fs/hfs.c (grub_hfs_dir): likewise
1331 * fs/iso9660.c (grub_iso9660_dir): likewise
1332 * fs/jfs.c (grub_jfs_dir): likewise
1333 * fs/minix.c (grub_minix_dir): likewise
1334 * fs/ntfs.c (grub_ntfs_dir): likewise
1335 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1336 * fs/sfs.c (grub_sfs_dir): likewise
1337 * fs/xfs.c (grub_xfs_dir): likewise
1338 * util/hostfs.c (grub_hostfs_dir): likewise
1339 * lib/datetime.c: moved to ...
1340 * normal/datetime.c: ... moved here
1341 (grub_unixtime2datetime): new function
1342 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 1343 * normal/completion.c (iterate_dir): use new dir syntax
1344 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 1345 last modification time of a volume
7dd4a573 1346 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 1347 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 1348 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 1349 (normal_mod_SOURCES): likewise
1350 (datetime_mod_SOURCES): Removed lib/datetime.c
1351 * conf/i386-efi.rmk: likewise
7dd4a573 1352 * conf/i386-ieee1275.rmk: likewise
05aaebfb 1353 * conf/i386-pc.rmk: likewise
1354 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1355 * conf/sparc64-ieee1275.rmk: likewise
1356 * conf/x86_64-efi.rmk: likewise
05aaebfb 1357
8a7e1a14 13582009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1359
1360 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 1361
1362 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 1363 on grub_fat_find_dir
1364 (grub_fat_find_dir): use grub_fat_iterate_dir
1365 (grub_fat_label): likewise
1366
04186a9c 13672009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
1368
7dd4a573 1369 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 1370 and command.h
1371 remove extraneous kernel_elf_HEADERS
1372
da4c0bb6 13732009-04-04 Bean <bean123ch@gnail.com>
1374
1375 * include/grub/util/misc.h: Add dummy function fsync for mingw.
1376
1377 * util/misc.c: Likewise.
1378
54ad9555 13792009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1380
1381 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1382 instead of grub_printf.
1383
7a6bf9f2 13842009-04-03 Robert Millan <rmh@aybabtu.com>
1385
1386 * loader/i386/linux.c (grub_linux_setup_video): Fill
1387 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1388 values from `mode info' structure instead of hardcoded
1389 values.
1390
3fcc2083 13912009-04-01 Pavel Roskin <proski@gnu.org>
1392
1393 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1394 unused now.
1395 * genmk.rb: Likewise.
1396 * configure.ac: Likewise.
1397
5ec9740b 13982009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
1399
1400 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1401 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
1402
5270cec8 14032009-04-01 David S. Miller <davem@davemloft.net>
1404
1405 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 1406 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 1407 (grub_setjmp): Mark with 'returns_twice' attribute.
1408 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1409 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1410 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1411
9c3dd854 14122009-04-01 Robert Millan <rmh@aybabtu.com>
1413
1414 Reapply fix from 2008-07-28 which was accidentally reverted; also
1415 perform the same fix to a similar check in same function.
1416
1417 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1418 with the same number are found, just use issue a warning with
1419 grub_dprintf(), as this error has been reported to be non-fatal.
1420
0d818b7e 14212009-03-31 Pavel Roskin <proski@gnu.org>
1422
1423 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1424 for cross-compilation.
1425
95646d92 14262009-03-30 Robert Millan <rmh@aybabtu.com>
1427
1428 Fix i386-ieee1275 build.
1429
1430 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1431 Remove declaration.
1432
6a003ed1 14332009-03-30 Pavel Roskin <proski@gnu.org>
1434
1435 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1436 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
1437 zero-terminated, rely only on the strlen value. Fix comparison
1438 of strings differing in length.
1439
92f33540 14402009-03-30 Robert Millan <rmh@aybabtu.com>
1441
1442 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1443 checking for abi version. Improve error messages on BIOS to notify
1444 user about `linux16' command.
1445
a8c48fd5 14462009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
1447
f968172e 1448 Leak fixes
a8c48fd5 1449
f968172e 1450 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1451 in case of collision
1452 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 1453
9c323f09 14542009-03-29 Robert Millan <rmh@aybabtu.com>
1455
1456 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1457 set `vid_mode' accordingly.
1458 (grub_linux_boot): Process `vid_mode' and set video mode.
1459
ae68f423 14602009-03-29 Robert Millan <rmh@aybabtu.com>
1461
1462 * util/grub.d/10_linux.in (linux_entry): New function.
1463 Factorize generation of Linux boot entries.
1464
5709cfc4 14652009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
1466
1467 Make the format of Environment Block plain text. The boot loader
1468 part is not tested well yet.
7dd4a573 1469
5709cfc4 1470 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1471 (buffer): Removed.
1472 (envblk): Likewise.
1473 (usage): Remove "info" and "clear". Add "unset". Update the
1474 description of "set", as this does not delete variables any
1475 longer.
1476 (create_envblk_file): Complete rewrite.
1477 (open_envblk_file): Likewise.
1478 (cmd_info): Removed.
1479 (cmd_list): Likewise.
1480 (cmd_set): Likewise.
1481 (cmd_clear): Likewise.
1482 (list_variables): New function.
1483 (write_envblk): Likewise.
1484 (set_variables): Likewise.
1485 (unset_variables): Likewise.
1486 (main): Complete rewrite.
1487
1488 * commands/loadenv.c (buffer): Removed.
1489 (envblk): Likewise.
1490 (open_envblk_file): New function.
1491 (read_envblk_file): Complete rewrite.
1492 (grub_cmd_load_env): Likewise.
1493 (grub_cmd_list_env): Likewise.
1494 (struct blocklist): New struct.
1495 (free_blocklists): New function.
1496 (check_blocklists): Likewise.
1497 (write_blocklists): Likewise.
1498 (grub_cmd_save_env): Complete rewrite.
1499
1500 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1501 a plain text signature.
1502 (GRUB_ENVBLK_MAXLEN): Removed.
1503 (struct grub_envblk): Complete rewrite.
1504 (grub_envblk_find): Removed.
1505 (grub_envblk_insert): Likewise.
1506 (grub_envblk_open): New prototype.
1507 (grub_envblk_set): Likewise.
1508 (grub_envblk_delete): Put const to VALUE.
1509 (grub_envblk_iterate): Put const to NAME and VALUE.
1510 (grub_envblk_close): New prototype.
1511 (grub_envblk_buffer): New inline function.
1512 (grub_envblk_size): Likewise.
1513
1514 * lib/envblk.c: Include grub/mm.h.
1515 (grub_env_find): Removed.
1516 (grub_envblk_open): New function.
1517 (grub_envblk_close): Likewise.
1518 (escaped_value_len): Likewise.
1519 (find_next_line): Likewise.
1520 (grub_envblk_insert): Removed.
1521 (grub_envblk_set): New function.
1522 (grub_envblk_delete): Complete rewrite.
1523 (grub_envblk_iterate): Likewise.
1524
a9368fd3 15252009-03-28 Robert Millan <rmh@aybabtu.com>
1526
1527 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1528 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1529 variables. Use 16-bit loader.
1530 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1531 loader.
1532 * kern/i386/loader.S (grub_linux_boot): Rename to ...
1533 (grub_linux16_boot): ... this. Update all users.
1534 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1535 (grub_linux_boot): ... this. Update all users.
1536
1537 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1538 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
1539 commands to `linux16' and `initrd16'.
1540 (GRUB_MOD_FINI(linux)): Rename to ...
1541 (GRUB_MOD_FINI(linux16)): ... this.
1542
e4dd5a7e 15432009-03-24 Pavel Roskin <proski@gnu.org>
1544
1545 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1546 not just for compilation.
1547
c04d6e05 15482009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
1549
1550 Move multiboot helper out of kernel
1551
1552 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1553 `loader/i386/multiboot_helper.S'.
1554 * conf/i386-coreboot.rmk: Likewise
1555 * conf/i386-ieee1275.rmk: Likewise
1556
1557 * kern/i386/loader.S: Move multiboot helpers from here...
1558 * loader/i386/multiboot_helper.S: ...moved here
1559 * include/grub/i386/loader.h: Move declarations of multiboot
1560 helpers from here...
1561 * include/grub/i386/multiboot.h: ...moved here
1562 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1563
42a5b3fc 15642009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1565
1566 * kern/env.c (grub_env_context_open): Added an argument to specify
1567 whether a new context inherits exported variables from current
1568 one. This is useful when making a sandbox to interpret a config
1569 file.
1570 All callers updated.
1571
1572 * include/grub/env.h (grub_env_context_open): Updated the prototype.
1573
b28bbc4e 15742009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1575
1576 * kern/env.c (grub_env_context_close): Fix memory leaks.
1577
f04f02e4 15782009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1579
1580 * normal/main.c (grub_normal_execute): Added an argument
1581 BATCH to specify if an interactive interface should be provided
1582 after reading a config file.
1583 All callers updated.
1584 (read_command_list): Prevent being executed twice.
1585 (read_fs_list): Likewise.
1586
42a5b3fc 1587 * include/grub/normal.h (grub_normal_execute): Updated the
1588 prototype.
f04f02e4 1589
41473ac2 15902009-03-22 Pavel Roskin <proski@gno.org>
1591
fbc00b0c 1592 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1593 _start.
1594 * kern/i386/pc/startup.S: Likewise.
1595 * kern/i386/efi/startup.S: Likewise.
1596 * kern/i386/ieee1275/startup.S: Likewise.
1597 * kern/i386/coreboot/startup.S: Likewise.
1598 * kern/x86_64/efi/startup.S: Likewise.
1599
41473ac2 1600 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1601 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1602 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1603
2274cc8f 16042009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
1605
1606 Bugfixes in multiboot for bugs uncovered by solaris kernel.
1607
1608 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1609 limit detection.
1610 Use vaddr of correct segment for entry_point.
1611
b1b797cb 16122009-03-21 Bean <bean123ch@gmail.com>
1613
1614 * commands/blocklist.c: Add include file <grub/command.h>, remove
1615 <grub/normal.h> and <grub/arg.h>.
1616 (grub_cmd_blocklist): Use the new command interface.
1617 (GRUB_MOD_INIT): Likewise.
1618 (GRUB_MOD_FINI): Likewise.
1619 * commands/boot.c: Likewise.
1620 * commands/cat.c: Likewise.
1621 * commands/cmp.c: Likewise.
1622 * commands/configfile.c: Likewise.
1623 * commands/crc.c: Likewise.
1624 * commands/echo.c: Likewise.
1625 * commands/halt.c: Likewise.
1626 * commands/handler.c: Likewise.
1627 * commands/hdparm.c: Likewise.
1628 * commands/help.c: Likewise.
1629 * commands/hexdump.c: Likewise.
1630 * commands/loadenv.c: Likewise.
1631 * commands/ls.c: Likewise.
1632 * commands/lsmmap.c: Likewise.
1633 * commands/lspci.c: Likewise.
1634 * commands/loadenv.c: Likewise.
1635 * commands/read.c: Likewise.
1636 * commands/reboot.c: Likewise.
1637 * commands/search.c: Likewise.
1638 * commands/sleep.c: Likewise.
1639 * commands/test.c: Likewise.
1640 * commands/usbtest.c: Likewise.
1641 * commands/videotest.c: Likewise.
1642 * commands/i386/cpuid.c: Likewise.
1643 * commands/i386/pc/halt.c: Likewise.
1644 * commands/i386/pc/play.c: Likewise.
1645 * commands/i386/pc/pxecmd.c: Likewise.
1646 * commands/i386/pc/vbeinfo.c: Likewise.
1647 * commands/i386/pc/vbetest.c: Likewise.
1648 * commands/ieee1275/suspend.c: Likewise.
1649 * disk/loopback.c: Likewise.
1650 * font/font_cmd.c: Likewise.
1651 * hello/hello.c: Likewise.
1652 * loader/efi/appleloader.c: Likewise.
1653 * loader/efi/chainloader.c: Likewise.
1654 * loader/i386/bsd.c: Likewise.
1655 * loader/i386/efi/linux.c: Likewise.
1656 * loader/i386/ieee1275/linux.c: Likewise.
1657 * loader/i386/linux.c: Likewise.
1658 * loader/i386/pc/chainloader.c: Likewise.
1659 * loader/i386/pc/linux.c: Likewise.
1660 * loader/powerpc/ieee1275/linux.c: Likewise.
1661 * loader/multiboot_loader.c: Likewise.
1662 * term/gfxterm.c: Likewise.
1663 * term/i386/pc/serial.c: Likewise.
1664 * term/terminfo.c: Likewise.
1665
1666 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1667 * term/i386/pc/vga.c: Likewise.
1668 * video/readers/jpeg.c: Likewise.
1669 * video/readers/png.c: Likewise.
1670 * video/readers/tga.c: Likewise.
1671
1672 * util/grub-fstest (cmd_loopback): Removed.
1673 (cmd_blocklist): Likewise.
1674 (cmd_ls): Likewise.
1675 (grub_register_command): Likewise.
1676 (grub_unregister_command): Likewise.
1677 (execute_command): Use grub_command_find to locate command and execute
1678 it.
1679
1680 * include/grub/efi/chainloader.h: Removed.
1681 * loader/efi/chainloader_normal.c: Likewise.
1682 * loader/i386/bsd_normal.c: Likewise.
1683 * loader/i386/pc/chainloader_normal.c: Likewise.
1684 * loader/i386/pc/multiboot_normal.c: Likewise.
1685 * loader/linux_normal.c: Likewise.
1686 * loader/multiboot_loader_normal.c: Likewise.
1687 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1688
1689 * gencmdlist.sh: Scan new registration command grub_register_extcmd
1690 and grub_register_command_p1.
1691
1692 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1693 kern/command.c, lib/arg.c and commands/extcmd.c.
1694 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1695 (minicmd_mod_SOURCES): New variable.
1696 (minicmd_mod_CFLAGS): Likewise.
1697 (minicmd_mod_LDFLAGS): Likewise.
1698 (extcmd_mod_SOURCES): Likewise.
1699 (extcmd_mod_CFLAGS): Likewise.
1700 (extcmd_mod_LDFLAGS): Likewise.
1701 (boot_mod_SOURCES): Removed.
1702 (boot_mod_CFLAGS): Likewise.
1703 (boot_mod_LDFLAGS): Likewise.
1704
1705 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1706 kern/corecmd.c.
1707 (kernel_img_HEADERS): Add command.h.
1708 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1709 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1710 and lib/arg.c.
1711 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1712 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1713 remove the corresponding normal mode command.
1714 (normal_mod_SOURCES): Remove normal/arg.c.
1715 * conf/i386-coreboot.rmk: Likewise.
1716 * conf/i386-efi.rmk: Likewise.
1717 * conf/i386-ieee1275.rmk: Likewise.
1718 * conf/powerpc-ieee1275.rmk: Likewise.
1719 * conf/x86_64-efi.rmk: Likewise.
1720
1721 * include/grub/arg.h: Move from here ...
1722 * include/grub/lib/arg.h: ... to here.
1723
1724 * normal/arg.c: Move from here ...
1725 * lib/arg.c: ... to here.
1726
1727 * commands/extcmd.c: New file.
1728 * commands/minicmd.c: Likewise.
1729 * include/grub/command.h: Likewise.
1730 * include/grub/extcmd.h: Likewise.
1731 * kern/command.c: Likewise.
1732 * kern/corecmd.c: Likewise.
1733
1734 * kern/list.c (grub_list_iterate): Return int instead of void.
1735 (grub_list_insert): New function.
1736 (grub_prio_list_insert): Likewise.
1737
1738 * kern/rescue.c (grub_rescue_command): Removed.
1739 (grub_rescue_command_list): Likewise.
1740 (grub_rescue_register_command): Likewise.
1741 (grub_rescue_unregister_command): Likewise.
1742 (grub_rescue_cmd_boot): Move to minicmd.c
1743 (grub_rescue_cmd_help): Likewise.
1744 (grub_rescue_cmd_info): Likewise.
1745 (grub_rescue_cmd_boot): Likewise.
1746 (grub_rescue_cmd_testload): Likewise.
1747 (grub_rescue_cmd_dump): Likewise.
1748 (grub_rescue_cmd_rmmod): Likewise.
1749 (grub_rescue_cmd_lsmod): Likewise.
1750 (grub_rescue_cmd_exit): Likewise.
1751 (grub_rescue_print_devices): Moved to corecmd.c.
1752 (grub_rescue_print_files): Likewise.
1753 (grub_rescue_cmd_ls): Likewise.
1754 (grub_rescue_cmd_insmod): Likewise.
1755 (grub_rescue_cmd_set): Likewise.
1756 (grub_rescue_cmd_unset): Likewise.
7d074e3c 1757 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 1758 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 1759 commands, remove grub_rescue_register_command calls.
b1b797cb 1760
7d074e3c 1761 * normal/command.c (grub_register_command): Removed.
b1b797cb 1762 (grub_unregister_command): Likewise.
1763 (grub_command_find): Likewise.
1764 (grub_iterate_commands): Likewise.
1765 (rescue_command): Likewise.
1766 (export_command): Moved to corecmd.c.
1767 (set_command): Removed.
1768 (unset_command): Likewise.
1769 (insmod_command): Likewise.
1770 (rmmod_command): Likewise.
1771 (lsmod_command): Likewise.
1772 (grub_command_init): Likewise.
1773
1774 * normal/completion.c (iterate_command): Use cmd->prio to check for
1775 active command.
1776 (complete_arguments): Use grub_extcmd_t structure to find options.
1777 (grub_normal_do_completion): Change function grub_iterate_commands to
1778 grub_command_iterate.
1779
1780 * normal/execute.c (grub_script_execute_cmd): No need to parse
1781 argument here.
1782
1783 * normal/main.c (grub_dyncmd_dispatcher): New function.
1784 (read_command_list): Register unload commands as dyncmd.
1785 (grub_cmd_normal): Use new command interface, register rescue,
1786 unregister normal at entry, register normal, unregister rescue at exit.
1787
1788 * include/grub/list.h (grub_list_test_t): New type.
1789 (grub_list_iterate): Return int instead of void.
1790 (grub_list_insert): New function.
1791 (GRUB_AS_NAMED_LIST_P): New macro.
1792 (GRUB_AS_PRIO_LIST): Likewise.
1793 (GRUB_AS_PRIO_LIST_P): Likewise.
1794 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
1795 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
1796 (grub_prio_list): New structure.
1797 (grub_prio_list_insert): New function.
1798 (grub_prio_list_remove): New inline function.
1799
1800 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
1801 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
1802 (GRUB_COMMAND_FLAG_MENU): Likewise.
1803 (GRUB_COMMAND_FLAG_BOTH): Likewise.
1804 (GRUB_COMMAND_FLAG_TITLE): Likewise.
1805 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
1806 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
1807 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
1808 (grub_command): Likewise.
1809 (grub_register_command): Likewise.
1810 (grub_command_find): Likewise.
1811 (grub_iterate_commands): Likewise.
1812 (grub_command_init): Likewise.
1813 (grub_arg_parse): Likewise.
1814 (grub_arg_show_help): Likewise.
1815
1816 * include/grub/rescue.h (grub_rescue_register_command): Removed.
1817 (grub_rescue_unregister_command): Likewise.
1818
1819 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
1820 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
1821 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
1822
1823 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
1824 grub_rescue_cmd_initrd.
1825 * include/grub/i386/loader.h: Likewise.
1826 * include/grub/x86_64/loader.h: Likewise.
1827
1828 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
1829
1f4147aa 18302009-03-21 Bean <bean123ch@gmail.com>
1831
1832 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
1833 instead of stat in mingw environment.
1834
1835 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
1836
1837 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
1838
1839 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
1840 AC_CONFIG_LINKS.
1841
2156d5ba 18422009-03-21 Bean <bean123ch@gmail.com>
1843
1844 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
1845 out of range error.
1846
177b82ca 18472009-03-18 Michel Dänzer <michel@daenzer.net>
1848
1849 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
1850 checking inode flags for EXT4_EXTENTS_FLAG.
1851
14aad807 18522009-03-18 Robert Millan <rmh@aybabtu.com>
1853
1854 * loader/i386/linux.c: Include `<grub/video.h>' and
1855 `<grub/i386/pc/vbe.h>'..
1856 (grub_linux_setup_video): New function. Loosely based on the EFI one.
1857 (grub_linux32_boot): Attempt to configure video settings with
1858 grub_linux_setup_video().
1859 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
1860 to avoid grub_console_fini() which would step out of graphical mode
1861 unconditionally.
1862
8cf83a27 18632009-03-14 Robert Millan <rmh@aybabtu.com>
1864
1865 Fix build on powerpc.
1866 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
1867
40164e75 18682009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
1869
1870 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
1871 background image command.
1872
c58bc32a 18732009-03-12 Colin D Bennett <colin@gibibit.com>
1874
1875 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
1876 (grub_gfxterm_putchar): Extract pairs of identical calls to
1877 draw_cursor out of conditional blocks.
1878
5415144a 18792009-03-11 Pavel Roskin <proski@gnu.org>
1880
1881 * fs/hfs.c (grub_hfs_strncasecmp): New function.
1882 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
1883
6394042e 18842009-03-11 Robert Millan <rmh@aybabtu.com>
1885
1886 * loader/i386/multiboot_elfxx.c
1887 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
1888
b7b50e5f 18892009-03-11 Felix Zielcke <fzielcke@z-51.de>
1890
1891 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
1892 `kern/handler.c'.
1893
1ca7fc96 18942009-03-11 Robert Millan <rmh@aybabtu.com>
1895
1896 * loader/i386/multiboot.c (code_size): New variable.
1897 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 1898 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 1899 4-byte alignment to MBI and others by increasing
7d074e3c 1900 `boot_loader_name_length' appropriately.
1ca7fc96 1901
1902 * loader/i386/multiboot_elfxx.c
1903 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
1904
a83ea1d2 19052009-03-09 Felix Zielcke <fzielcke@z-51.de>
1906
1907 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
1908 `fs/ext2.c'.
1909
aa9f3bff 19102009-03-08 Robert Millan <rmh@aybabtu.com>
1911
1912 Make loader/i386/linux.c usable on i386-pc again.
1913
1914 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
1915 memory to heap.
1916 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
1917 `#error' stanza.
1918
d8b3b60e 19192009-03-07 Bean <bean123ch@gmail.com>
1920
1921 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
1922 allocation.
1923
b362c9e9 19242009-03-06 Robert Millan <rmh@aybabtu.com>
1925
1926 Fix display issue on terminals with screen size other than 80x25
1927 (e.g. gfxterm with resolution higher than 640x480).
1928
1929 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 1930 position relative to the center of the terminal instead of relying
b362c9e9 1931 on a hardcoded offset.
1932
9304eef1 19332009-03-04 Robert Millan <rmh@aybabtu.com>
1934
1935 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
1936 installed.
1937
1938 * Makefile.in (host_kernel): New variable.
1939 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
1940 scripts instead of just the windows one.
1941 * configure.ac: Initialize and AC_SUBST `host_kernel'.
1942
eabc95fb 19432009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 1944
1945 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
1946 `kern/handler.c'.
1947 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1948 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1949 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1950 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1951 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1952 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1953
ceb1223c 19542009-03-04 Felix Zielcke <fzielcke@z-51.de>
1955
1956 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
1957 or if there's no space for the disk label and print the partition number on a
1958 invalid magic.
1959
4910684a 19602009-03-04 Felix Zielcke <fzielcke@z-51.de>
1961
1962 * util/misc.c: Include <time.h>.
1963 (grub_millisleep): New function.
1964
7e9ca17a 19652009-03-04 Bean <bean123ch@gmail.com>
1966
1967 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
1968 another option -mno-red-zone.
1969
1970 * commands/handler.c: Change module description.
1971
1972 * kern/handler.c: Add missing space at the end of description line.
1973
1974 * kern/list.c: Likewise.
1975
f501677c 19762009-03-03 Robert Millan <rmh@aybabtu.com>
1977
1978 Move more components to the relocation area, and fix mbi pointer
1979 handling to use the destination rather than the origin (thanks to
1980 Vladimir Serbinenko for spotting).
1981
1982 * loader/i386/multiboot.c (mbi_dest): New variable.
1983 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
1984 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
1985 relocation area.
1986
9902d047 19872009-03-01 Bean <bean123ch@gmail.com>
1988
50fb7002 1989 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 1990 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
1991 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
1992 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
1993
1994 * loader/i386/efi/linux.c (acpi_guid): New variable.
1995 (acpi_guid): Likewise.
1996 (EBDA_SEG_ADDR): New constant.
1997 (LOW_MEM_ADDR): Likewise.
1998 (FAKE_EBDA_SEG): Likewise.
1999 (fake_bios_data): New function.
2000 (grub_linux_boot): Call fake_bios_data.
2001
71b9f361 20022009-03-01 Bean <bean123ch@gmail.com>
2003
2004 * commands/terminal.c: Removed.
2005
2006 * commands/handler.c: New file.
2007
2008 * include/grub/list.h: Likewise.
2009
2010 * include/grub/handler.h: Likewise.
2011
2012 * kern/list.c: Likewise.
2013
2014 * kern/handler.c: Likewise.
2015
2016 * kern/term.h: Include header file <grub/handler.h>.
2017 (grub_term_input): Move next field to the beginning.
2018 (grub_term_output): Likewise.
2019 (grub_term_input_class): New variable.
2020 (grub_term_output_class): Likewise.
2021 (grub_term_register_input): Changed to inline function.
2022 (grub_term_register_output): Likewise.
2023 (grub_term_unregister_input): Likewise.
2024 (grub_term_unregister_output): Likewise.
2025 (grub_term_set_current_input): Likewise.
2026 (grub_term_set_current_output): Likewise.
2027 (grub_term_get_current_input): Likewise.
2028 (grub_term_get_current_output): Likewise.
2029 (grub_term_iterate_input): Removed.
2030 (grub_term_iterate_output): Likewise.
2031
2032 * kern/term.c (grub_term_list_input): Removed.
2033 (grub_term_list_output): Likewise.
2034 (grub_term_input_class): New variable.
2035 (grub_term_output_class): Likewise.
50fb7002 2036 (grub_cur_term_input): Change variable as macro.
71b9f361 2037 (grub_cur_term_output): Likewise.
2038 (grub_term_register_input): Removed.
2039 (grub_term_register_output): Likewise.
2040 (grub_term_unregister_input): Likewise.
2041 (grub_term_unregister_output): Likewise.
2042 (grub_term_set_current_input): Likewise.
2043 (grub_term_set_current_output): Likewise.
2044 (grub_term_iterate_input): Likewise.
2045 (grub_term_iterate_output): Likewise.
2046 (grub_term_get_current_input): Likewise.
2047 (grub_term_get_current_output): Likewise.
2048
2049 * util/grub-editenv.c: Include header file <grub/handler.h>.
2050 (grub_term_get_current_input): Removed.
2051 (grub_term_get_current_output): Likewise.
2052 (grub_term_input_class): New variable.
50fb7002 2053 (grub_term_output_class): Likewise.
71b9f361 2054
2055 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2056 (grub_term_get_current_output): Likewise.
2057 (grub_term_input_class): New variable.
50fb7002 2058 (grub_term_output_class): Likewise.
71b9f361 2059
2060 * util/grub-probe.c (grub_term_get_current_input): Removed.
2061 (grub_term_get_current_output): Likewise.
2062 (grub_term_input_class): New variable.
50fb7002 2063 (grub_term_output_class): Likewise.
71b9f361 2064
2065 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2066 (grub_term_get_current_output): Likewise.
2067 (grub_term_input_class): New variable.
50fb7002 2068 (grub_term_output_class): Likewise.
71b9f361 2069
2070 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2071 (terminal_mod_SOURCES): Likewise.
2072 (terminal_mod_CFLAGS): Likewise.
2073 (terminal_mod_LDFLAGS): Likewise.
2074
2075 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2076 handler.c.
2077 (kernel_img_SOURCES): Add list.c and handler.c.
2078 (kernel_img_HEADERS): Add list.h and handler.h.
2079
2080 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2081 handler.c.
2082 (kernel_mod_SOURCES): Add list.c and handler.c.
2083 (kernel_mod_HEADERS): Add list.h and handler.h.
2084
2085 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2086 handler.c.
2087 (kernel_elf_SOURCES): Add list.c and handler.c.
2088 (kernel_elf_HEADERS): Add list.h and handler.h.
2089
2090 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2091 handler.c.
2092 (kernel_elf_SOURCES): Add list.c and handler.c.
2093 (kernel_elf_HEADERS): Add list.h and handler.h.
2094
2095 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2096 handler.c.
2097 (kernel_mod_SOURCES): Add list.c and handler.c.
2098 (kernel_mod_HEADERS): Add list.h and handler.h.
2099
2100 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2101 handler.c.
2102 (kernel_elf_SOURCES): Add list.c and handler.c.
2103 (kernel_elf_HEADERS): Add list.h and handler.h.
2104
8a31787f 21052009-02-27 Robert Millan <rmh@aybabtu.com>
2106
2107 Factorize elf32 / elf64 code in Multiboot loader. This will
2108 prevent it from getting out of sync again.
2109
2110 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2111 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2112 grub_multiboot_load_elf64): Move from here ...
2113 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2114 grub_multiboot_load_elf): ... to here (new file).
2115
51cd3dfc 21162009-02-27 Robert Millan <rmh@aybabtu.com>
2117
2118 * util/grub.d/10_linux.in: Rename "single-user mode" to
2119 "recovery mode".
2120
6e8c9c3a 21212009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2122
2123 Don't leak in SCSI code.
2124 * disk/scsi.c (grub_scsi_close): free `scsi'.
2125
4b6bf4f9 21262009-02-27 Robert Millan <rmh@aybabtu.com>
2127
2128 * loader/i386/pc/multiboot.c: Move from here ...
2129 * loader/i386/multiboot.c: ... to here. Update all users.
2130
b9413424 21312009-02-27 Robert Millan <rmh@aybabtu.com>
2132
2133 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2134 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2135
50fb7002 21362009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 2137
2138 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2139 b-tree.
2140
8cc50345 21412009-02-27 Robert Millan <rmh@aybabtu.com>
2142
2143 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2144 `0x' qualifier as 0 when base is specified as parameter).
2145
6e09b8b7 21462009-02-24 Bean <bean123ch@gmail.com>
2147
2148 * configure.ac: Check for -mcmodel=large in x86_64 target.
2149
2150 * include/grub/efi/api.h (efi_call_10): New macro.
2151 (efi_wrap_10): New function.
2152
2153 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2154 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2155 (GRUB_PE32_REL_BASED_LOW): Likewise.
2156 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2157 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2158 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2159 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2160 (GRUB_PE32_REL_BASED_REL): Likewise.
2161 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2162 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2163 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2164
2165 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2166 issue.
2167
2168 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2169 (efi_wrap_10): New function.
2170
2171 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2172
2173 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2174 MB/MBP model (NV chipset).
2175 (devdata_devs): Add devpath_5 to the list.
2176
2177 * load/i386/efi/linux.c (video_base): Remove variable.
2178 (RGB_MASK): New macro.
2179 (RGB_MAGIC): Likewise.
2180 (LINE_MIN): Likewise.
2181 (LINE_MAX): Likewise.
2182 (FBTEST_STEP): Likewise.
2183 (FBTEST_COUNT): Likewise.
2184 (fb_list): New variable.
2185 (grub_find_video_card): Remove function.
2186 (find_framebuf): New function.
2187 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2188 line length.
2189
2190 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2191 problem for x86_64.
2192
74b21bee 21932009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2194
2195 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2196
2197 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2198 coding tool name.
2199
a455f472 22002009-02-22 Robert Millan <rmh@aybabtu.com>
2201
2202 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2203 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2204 in our relocation, instead of using it directly from heap. Also
2205 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2206
6374daf3 22072009-02-21 Robert Millan <rmh@aybabtu.com>
2208
2209 Implement USB keyboard support (based on patch by Marco Gerards)
2210
2211 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2212 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2213 (usb_keyboard_mod_LDFLAGS): New variables.
2214
2215 * term/usb_keyboard.c: New file.
2216
8fa4ea70 22172009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2218
2219 Corrected wrong declaration
2220
2221 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2222
353976ac 22232009-02-14 Christian Franke <franke@computer.org>
2224
2225 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2226 (grub_lspci_iter): Print class code and programming interface byte.
2227
6aa1169b 22282009-02-14 Christian Franke <franke@computer.org>
2229
2230 * gendistlist.sh: Ignore `.svn' directories.
2231
265372ca 22322009-02-14 Felix Zielcke <fzielcke@z-51.de>
2233
2234 * fs/fat.c: Add 2009 to Copyright line.
2235
9ff516f3 22362009-02-14 Christian Franke <franke@computer.org>
2237
2238 * commands/hdparm.c: New file. Provides `hdparm' command
2239 which sends ATA commands via grub_disk_ata_pass_through ().
2240
2241 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2242
2243 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2244 and <grub/cpu/io.h> to include/grub/ata.h.
2245 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2246 (GRUB_CDROM_SECTOR_SIZE): Remove.
2247 (GRUB_ATA_*): Move to include/grub/ata.h.
2248 (GRUB_ATAPI_*): Likewise.
2249 (enum grub_ata_commands): Likewise.
2250 (enum grub_ata_timeout_milliseconds): Likewise.
2251 (struct grub_ata_device): Likewise.
2252 (grub_ata_regset): Likewise.
2253 (grub_ata_regget): Likewise.
2254 (grub_ata_regset2): Likewise.
2255 (grub_ata_regget2): Likewise.
2256 (grub_ata_check_ready): Likewise.
2257 (grub_ata_wait_not_busy): Remove static, exported in
2258 include/grub/ata.h.
2259 (grub_ata_wait_drq): Likewise.
2260 (grub_ata_pio_read): Likewise.
2261
2262 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
2263 function for hdparm.mod.
2264
2265 * include/grub/ata.h: New file, contains declarations from
2266 disk/ata.c.
2267 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2268
2269 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2270 (grub_disk_ata_pass_through): New exported variable.
2271
2272 * kern/disk.c (grub_disk_ata_pass_through): New variable.
2273
772e23da 22742009-02-13 Colin D Bennett <colin@gibibit.com>
2275
2276 Support multiple fallback entries, and provide an API to support
2277 executing default+fallback menu entries. Renamed the `terminal' menu
2278 viewer to `text'.
2279
2280 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2281 variable declaration.
2282 (grub_menu_execute_callback): New structure declaration.
2283 (grub_menu_execute_callback_t): New typedef.
2284 (grub_menu_execute_with_fallback): New function declaration.
2285 (grub_menu_get_entry): Likewise.
2286 (grub_menu_get_timeout): Likewise.
2287 (grub_menu_set_timeout): Likewise.
2288
2289 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2290
2291 * normal/menu.c (grub_wait_after_message): Moved to
2292 `normal/menu_text.c'.
2293 (draw_border): Likewise.
2294 (print_message): Likewise.
2295 (print_entry): Likewise.
2296 (print_entries): Likewise.
2297 (grub_menu_init_page): Likewise.
2298 (get_entry_number): Likewise.
2299 (print_timeout): Likewise.
2300 (run_menu): Likewise.
2301 (grub_menu_execute_entry): Likewise.
2302 (show_text_menu): Likewise.
2303 (get_and_remove_first_entry_number): New function.
2304 (grub_menu_execute_with_fallback): Likewise.
2305 (get_entry): Renamed to ...
2306 (grub_menu_get_entry): .. this and made it global.
2307 (get_timeout): Renamed to ...
2308 (grub_menu_get_timeout): ... this and made it global.
2309 (set_timeout): Renamed to ...
2310 (grub_menu_set_timeout): ... this and made it global.
2311 (grub_normal_terminal_menu_viewer): Renamed to ...
2312 (grub_normal_text_menu_viewer): ... this.
2313
2314 * normal/menu_text.c: New file. Extracted text-menu-specific code
2315 from normal/menu.c.
2316
2317 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2318 (normal_mod_SOURCES): Likewise.
2319
2320 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2321 (normal_mod_SOURCES): Likewise.
2322
2323 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2324 (normal_mod_SOURCES): Likewise.
2325
2326 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2327 (normal_mod_SOURCES): Likewise.
2328
2329 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2330 (normal_mod_SOURCES): Likewise.
2331
2332 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2333 (normal_mod_SOURCES): Likewise.
2334
2335 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2336 (normal_mod_SOURCES): Likewise.
2337
16ac430e 23382009-02-11 Robert Millan <rmh@aybabtu.com>
2339
2340 * util/grub.d/00_header.in: Update old reference to `font' command.
2341
06ff20fc 23422009-02-10 Felix Zielcke <fzielcke@z-51.de>
2343
2344 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2345
2346 Based on patch from Javier Martín.
2347
96da9407 23482009-02-09 Felix Zielcke <fzielcke@z-51.de>
2349
2350 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 2351 to avoid false positives with FAT.
96da9407 2352 (grub_fstest_SOURCES): Likewise.
2353 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2354 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2355 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2356 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2357 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2358 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2359
6dca6fe4 23602009-02-09 Felix Zielcke <fzielcke@z-51.de>
2361
06ff20fc 2362 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 2363 bpb.version_specific.fat12_or_fat16.fstype and
2364 bpb.version_specific.fat32.fstype.
2365
2550c62f 23662009-02-08 Robert Millan <rmh@aybabtu.com>
2367
be110b30 2368 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 2369
56978920 23702009-02-08 Robert Millan <rmh@aybabtu.com>
2371
2372 * Makefile.in (host_os, host_cpu): New variables.
2373 (target_os): Remove. Update all users.
2374
d64399b5 23752009-02-08 Marco Gerards <marco@gnu.org>
2376
2377 * Makefile.in (enable_grub_emu_usb): New variable.
2378 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2379 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2380 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2381 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2382 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2383 `usbtest.mod' and `usbms.mod'.
2384 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2385 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2386 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2387 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2388 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2389 variables.
2390
2391 * disk/usbms.c: New file.
2392
2393 * include/grub/usb.h: Likewise.
2394
2395 * include/grub/usbtrans.h: Likewise.
2396
2397 * include/grub/usbdesc.h: Likewise.
2398
2399 * bus/usb/usbtrans.c: Likewise.
2400
2401 * bus/usb/ohci.c: Likewise.
2402
2403 * bus/usb/uhci.c: Likewise.
2404
2405 * bus/usb/usbhub.c: Likewise.
2406
2407 * bus/usb/usb.c: Likewise.
2408
2409 * commands/usbtest.c: Likewise.
2410
2411 * util/usb.c: Likewise.
50fb7002 2412
d64399b5 2413 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2414
2415 * configure.ac: Test for libusb presence.
50fb7002 2416
d64399b5 2417 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2418
2b40d6bb 24192009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
2420
2421 * kern/mm.c: Add more comments.
2422
73a4ce81 24232009-02-08 Robert Millan <rmh@aybabtu.com>
2424
2425 Patch from Javier Martín.
2426 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2427 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2428
f821ce59 24292009-02-08 Robert Millan <rmh@aybabtu.com>
2430
2431 * fs/cpio.c: Split tar functionality to ...
2432 * fs/tar.c: ... here (new file). Update all users.
2433
aebfc4b0 24342009-02-07 Robert Millan <rmh@aybabtu.com>
2435
2436 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2437 backward-incompatible features.
2438
2439 Based on patch from Javier Martín, with some adjustments.
2440
50fb7002 24412009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 2442
2443 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2444
0bb5115e 24452009-02-07 Robert Millan <rmh@aybabtu.com>
2446
2447 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2448 position of `disk/lvm.c' to ensure grub_init_all() always picks it
2449 after the RAID stuff.
2450
38a0f8e7 24512009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
2452
50fb7002 2453 Fixes problem when running vbetest command as reported by
38a0f8e7 2454 Vladimir Serbinenko <phcoder@gmail.com>.
2455
2456 * (grub_vbe_set_video_mode): Fixed problem with text modes.
2457
3143cc1c 24582009-02-04 Felix Zielcke <fzielcke@z-51.de>
2459
2460 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2461 /dev/md/NpN style mdraid devices.
2462
9cba6fce 24632009-02-03 Felix Zielcke <fzielcke@z-51.de>
2464
2465 * util/unifont2pff.rb: Remove.
2466
e507a2c1 24672009-02-03 Felix Zielcke <fzielcke@z-51.de>
2468
2469 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2470 `#'.
2471
d2c2b4cd 24722009-02-03 Felix Zielcke <fzielcke@z-51.de>
2473
2474 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2475 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2476 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2477 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2478 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2479 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2480 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2481
b4315fb0 24822009-02-02 Christian Franke <franke@computer.org>
2483
2484 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2485
de3aa260 24862009-02-01 Felix Zielcke <fzielcke@z-51.de>
2487
7c3ff286 2488 * INSTALL: Note that we now require at least autoconf 2.59 and
2489 that LZO is optional.
de3aa260 2490
825a182b 24912009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2492
2493 Base on patch on bug #24154 created by Tomas Tintera
2494 <trosos@seznam.cz>.
2495
2496 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2497
a69ef770 24982009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2499
7c3ff286 2500 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 2501 <bero@arklinux.org>.
2502
2503 * normal/parser.y (script_init): Add missing semicolon.
2504
6fa42fa6 25052009-01-31 Colin D Bennett <colin@gibibit.com>
2506
7c3ff286 2507 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 2508 (free_menu_entry_classes): Added.
2509 (grub_normal_menu_addentry): Added class property handling.
2510 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2511 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2512
2513 * normal/menu_viewer.c: New file.
2514
2515 * normal/menu.c (run_menu_entry): Renamed to ...
2516 (grub_menu_execute_entry): ... this and made it as global.
2517 (grub_menu_run): Renamed to ...
2518 (show_text_menu): ... this and made it local.
2519 (show_text_menu): Adapt to new function names.
2520 (grub_normal_terminal_menu_viewer): New global variable.
2521
2522 * include/grub/menu.h: New file.
2523
2524 * include/grub/menu_viewer.h: New file.
2525
2526 * include/grub/normal.h: Added include to grub/menu.h.
2527 (grub_menu_entry): Moved to include/grub/menu.h.
2528 (grub_menu_entry_t): Likewise.
2529 (grub_menu): Likewise.
2530 (grub_menu_t): Likewise.
2531 (grub_normal_terminal_menu_viewer): Added.
2532 (grub_menu_execute_entry): Likewise.
2533 (grub_menu_run): Removed.
2534
2535 * DISTLIST: Added include/grub/menu.h.
2536 Added include/grub/menu_viewer.h.
2537 Added normal/menu_viewer.c.
2538
25392009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
2540
2541 * normal/execute.c (grub_script_execute_menuentry): Changed to use
2542 arglist for menutitle arguments.
2543
2544 * normal/main.c (grub_normal_menu_addentry): Likewise.
2545
2546 * normal/parser.y (menuentry): Likewise.
2547
2548 * normal/script.c (grub_script_create_cmdmenu): Likewise.
2549
2550 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2551 (grub_script_create_cmdmenu): Likewise.
2552
2553 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2554
2555 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2556 changes.
2557
2558 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2559
2560 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2561
2562 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2563
2564 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2565
2566 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2567
2568 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2569
56192c23 25702009-01-30 Christian Franke <franke@computer.org>
2571
2572 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2573 in option help text.
2574
d72521b3 25752009-01-27 Pavel Roskin <proski@gnu.org>
2576
2577 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2578
994b5e84 25792009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2580
2581 * commands/lsmmap.c: Add include to grub/machine/memory.h.
2582
2583 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2584
2585 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2586 unregister function.
2587
6a7eab2c 25882009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2589
2590 * disk/scsi.c (grub_scsi_read): Fix sign problem.
2591
2592 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2593
2594 * util/grub-mkfont.c (usage): Fix typo.
2595
2596 * util/elf/grub-mkimage.c (load_modules): Fix warning.
2597
1806b56e 25982009-01-26 Daniel Mierswa <impulze@impulze.org>
2599
3fb18f09 2600 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2601
336e1fb9 2602 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2603
1806b56e 2604 * kern/misc.c (grub_strcasecmp): New function.
2605 (grub_strcasecmp): Use grub_size_t instead of int for length.
2606 Fix return value.
2607 * include/grub/misc.h: Update function prototypes.
2608
580b2a0f 26092009-01-26 Robert Millan <rmh@aybabtu.com>
2610
2611 * configure.ac: Fix cross-compilation check.
ef257b36 2612
d31c24f1 26132009-01-22 Christian Franke <franke@computer.org>
2614
2615 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2616 (precision) digit string. Allow `.format2' without `format1' (width).
2617 Limit input chars for `%s' output to `format2' if specified. This is
2618 compatible with standard printf ().
2619
3138b44c 26202009-01-22 Christian Franke <franke@computer.org>
2621
2622 * disk/ata.c (grub_ata_wait_status): Replace by ...
2623 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
2624 other status bits may be invalid while BSY is asserted.
2625 (grub_ata_check_ready): New function.
2626 (grub_ata_cmd): Removed.
2627 (grub_ata_wait_drq): New function.
2628 (grub_ata_strncpy): Remove inline.
2629 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
2630 and error check now done by grub_ata_wait_drq ().
2631 (grub_ata_pio_write): Likewise.
2632 (grub_atapi_identify): Set DEV before check for !BSY. Use
2633 grub_ata_wait_drq () to wait for data.
2634 (grub_ata_device_initialize): Add status register check to
2635 detect missing SATA slave devices. Add debug messages.
2636 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2637 (grub_atapi_packet): Set DEV before check for !BSY. Replace
2638 transfer loop by grub_ata_pio_write ().
2639 (grub_ata_identify): Set DEV before check for !BSY. Use
2640 grub_ata_wait_drq () to wait for data.
ef257b36 2641 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 2642 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2643 read/write in one loop. Fix invalid command on write. Fix incomplete
2644 command on (size % batch) == 0. Add missing error check after write of
2645 last block. Add debug messages.
2646 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
2647
59a64ef6 26482009-01-19 Christian Franke <franke@computer.org>
2649
2650 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2651 (GRUB_ATAPI_IREASON_*): Likewise.
2652 (grub_ata_pio_write): Fix timeout error return.
2653 (grub_atapi_identify): Add grub_ata_wait () after cmd.
2654 (grub_atapi_wait_drq): New function.
2655 (grub_atapi_packet): New parameter `size'.
2656 Use grub_atapi_wait_drq () and direct write instead of
2657 grub_ata_pio_write ().
2658 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2659 reads the number of bytes requested by the device for each DRQ
2660 assertion.
2661 (grub_atapi_write): Remove old implementation, return not
2662 implemented instead.
2663
1cfe20b3 26642009-01-19 Christian Franke <franke@computer.org>
2665
2666 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2667 of 512 to calculate data size.
2668 (grub_scsi_read12): Likewise.
2669 (grub_scsi_write10): Likewise.
2670 (grub_scsi_write12): Likewise.
2671 (grub_scsi_read): Adjust size according to blocksize.
2672 Add checks for invalid blocksize and unaligned transfer.
2673
bee5fe5d 26742009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
2675
2676 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2677
ef257b36 2678 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 2679 width glyphs.
2680
3e643f8c 26812009-01-19 Robert Millan <rmh@aybabtu.com>
2682
2683 * config.guess: Update to latest version from config git.
2684 * config.sub: Likewise.
2685
4fa80998 26862009-01-17 Felix Zielcke <fzielcke@z-51.de>
2687
2688 * Makefile.in: Change font compilation to use new grub-mkfont instead
2689 of java version.
2690
2691 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2692 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2693 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2694 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2695 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2696 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2697 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2698 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2699 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2700
7086085b 27012009-01-16 Christian Franke <franke@computer.org>
2702
2703 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2704 (enum grub_ata_timeout_milliseconds): New enum.
2705 (grub_ata_wait_status): Add parameter milliseconds.
2706 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
2707 recovery from timed-out commands.
2708 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
2709 return grub_errno instead of REG_ERROR.
2710 (grub_ata_pio_write): Add parameter milliseconds.
2711 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2712 Pass milliseconds to grub_ata_wait_status () and
2713 grub_ata_pio_read ().
2714 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2715 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
2716 grub_ata_wait_status (). Fix IDENTIFY timeout check.
2717 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2718 It is not suitable for device detection, because DEV bit is ignored,
2719 the command may run too long, and not all devices set the signature
2720 properly.
2721 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2722 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2723 Fix device selection, DEV bit must be set first to address the registers
2724 of the correct device.
2725 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2726 grub_ata_pio_read/write ().
2727 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2728 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2729
4a412913 27302009-01-13 Carles Pina i Estany <carles@pina.cat>
2731
2732 * util/grub-editenv.c (main): Use fseeko(), not fseek().
2733
7795c55e 27342009-01-13 Bean <bean123ch@gmail.com>
d913988c 2735
2736 * util/grub-mkfont.c (write_font): forget to remove some debug code.
2737
7795c55e 27382009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 2739
2740 * Makefile.in: (enable_grub_mkfont): New variable.
2741 (freetype_cflags): Likewise.
2742 (freetype_libs): Likewise.
2743
2744 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
2745 (grub_mkfont_SOURCES): New variable.
2746 (grub_mkfont_CFLAGS): Likewise.
2747 (grub_mkfont_LDFLAGS): Likewise.
2748
2749 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
2750 library if `--enable-grub-mkfont' is requested.
2751 (enable_grub_mkfont): New variable.
2752 (freetype_cflags): Likewise.
2753 (freetype_libs): Likewise.
2754
2755 * util/grub-mkfont.c: New file.
2756
093af1fe 27572009-01-12 Christian Franke <franke@computer.org>
2758
2759 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
2760 mode check. Fix setting of compat_use[].
2761
f36cc108 27622009-01-10 Robert Millan <rmh@aybabtu.com>
2763
2764 Update a few copyright years which we forgot to do in 2008 (only for
2765 files whose changes made in 2008 were copyright-significant)
2766
2767 * Makefile.in: Add 2008 to Copyright line.
2768 * disk/ieee1275/ofdisk.c: Likewise.
2769 * disk/efi/efidisk.c: Likewise.
2770 * kern/dl.c: Likewise.
2771 * kern/sparc64/ieee1275/init.c: Likewise.
2772 * kern/mm.c: Likewise.
2773 * kern/efi/mm.c: Likewise.
2774 * boot/i386/pc/boot.S: Likewise.
2775 * genfslist.sh: Likewise.
2776 * fs/iso9660.c: Likewise.
2777 * fs/hfs.c: Likewise.
2778 * fs/jfs.c: Likewise.
2779 * fs/minix.c: Likewise.
2780 * fs/ufs.c: Likewise.
2781 * gensymlist.sh.in: Likewise.
2782 * genkernsyms.sh.in: Likewise.
2783 * include/grub/misc.h: Likewise.
2784 * include/grub/types.h: Likewise.
2785 * include/grub/symbol.h: Likewise.
2786 * include/grub/elf.h: Likewise.
2787 * include/grub/kernel.h: Likewise.
2788 * include/grub/disk.h: Likewise.
2789 * include/grub/dl.h: Likewise.
2790 * include/grub/i386/linux.h: Likewise.
2791 * include/grub/i386/pc/biosdisk.h: Likewise.
2792 * include/grub/efi/api.h: Likewise.
2793 * include/grub/efi/pe32.h: Likewise.
2794 * include/grub/util/misc.h: Likewise.
2795 * normal/execute.c: Likewise.
2796 * normal/arg.c: Likewise.
2797 * normal/completion.c: Likewise.
2798 * normal/lexer.c: Likewise.
2799 * normal/parser.y: Likewise.
2800 * normal/misc.c: Likewise.
2801 * commands/i386/pc/vbeinfo.c: Likewise.
2802 * commands/hexdump.c: Likewise.
2803 * commands/terminal.c: Likewise.
2804 * commands/ls.c: Likewise.
2805 * commands/help.c: Likewise.
2806 * partmap/pc.c: Likewise.
2807 * loader/efi/chainloader.c: Likewise.
2808 * loader/multiboot_loader.c: Likewise.
2809 * loader/i386/pc/multiboot2.c: Likewise.
2810 * term/efi/console.c: Likewise.
2811 * term/i386/pc/serial.c: Likewise.
2812 * util/lvm.c: Likewise.
2813 * util/console.c: Likewise.
2814 * util/i386/efi/grub-mkimage.c: Likewise.
2815 * util/raid.c: Likewise.
2816
7f02114b 28172009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
2818
2819 * commands/videotest.c: Removed include to grub/machine/memory.h.
2820
2821 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
2822 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
2823 (video_mod_SOURCES): Removed.
2824 (video_mod_CFLAGS): Likewise.
2825 (video_mod_LDFLAGS): Likewise.
2826 (gfxterm_mod_SOURCES): Likewise.
2827 (gfxterm_mod_CFLAGS): Likewise.
2828 (gfxterm_mod_LDFLAGS): Likewise.
2829 (videotest_mod_SOURCES): Likewise.
2830 (videotest_mod_CFLAGS): Likewise.
2831 (videotest_mod_LDFLAGS): Likewise.
2832 (bitmap_mod_SOURCES): Likewise.
2833 (bitmap_mod_CFLAGS): Likewise.
2834 (bitmap_mod_LDFLAGS): Likewise.
2835 (tga_mod_SOURCES): Likewise.
2836 (tga_mod_CFLAGS): Likewise.
2837 (tga_mod_LDFLAGS): Likewise.
2838 (jpeg_mod_SOURCES): Likewise.
2839 (jpeg_mod_CFLAGS): Likewise.
2840 (jpeg_mod_LDFLAGS): Likewise.
2841 (png_mod_SOURCES): Likewise.
2842 (png_mod_CFLAGS): Likewise.
2843 (png_mod_LDFLAGS): Likewise.
2844
2845 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
2846 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
2847 (video_mod_SOURCES): Added.
2848 (video_mod_CFLAGS): Likewise.
2849 (video_mod_LDFLAGS): Likewise.
2850 (videotest_mod_SOURCES): Likewise.
2851 (videotest_mod_CFLAGS): Likewise.
2852 (videotest_mod_LDFLAGS): Likewise.
2853 (bitmap_mod_SOURCES): Likewise.
2854 (bitmap_mod_CFLAGS): Likewise.
2855 (bitmap_mod_LDFLAGS): Likewise.
2856 (tga_mod_SOURCES): Likewise.
2857 (tga_mod_CFLAGS): Likewise.
2858 (tga_mod_LDFLAGS): Likewise.
2859 (jpeg_mod_SOURCES): Likewise.
2860 (jpeg_mod_CFLAGS): Likewise.
2861 (jpeg_mod_LDFLAGS): Likewise.
2862 (png_mod_SOURCES): Likewise.
2863 (png_mod_CFLAGS): Likewise.
2864 (png_mod_LDFLAGS): Likewise.
2865 (gfxterm_mod_SOURCES): Likewise.
2866 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 2867 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 2868
2869 * term/gfxterm.c: Removed include to grub/machine/memory.h,
2870 grub/machine/console.h.
2871
644fff97 28722009-01-04 Jerone Young <jerone@gmail.com>
2873
2874 Make on screen instructions clearer
2875
2876 Based on patch created by Jidanni <jidanni@jidanni.org>
2877
2878 * normal/menu.c: print clearer instructions on the screen
2879
1e901a75 28802009-01-02 Colin D Bennett <colin@gibibit.com>
2881
2882 New font engine.
34c44600 2883
1e901a75 2884 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
2885 build system and fixed gfxterm.c to work with different sized fonts.
2886
2887 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 2888
1e901a75 2889 * configure: Re-generated.
34c44600 2890
1e901a75 2891 * DISTLIST: Removed font/manager.c.
2892 Added font/font.c.
2893 Added font/font_cmd.c.
34c44600 2894
1e901a75 2895 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
2896 compilation.
34c44600 2897
1e901a75 2898 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 2899
2900 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 2901
2902 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 2903
1e901a75 2904 * normal/menu.c: Likewise.
34c44600 2905
1e901a75 2906 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
2907 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 2908
1e901a75 2909 * include/grub/font.h: Replaced with new file.
34c44600 2910
1e901a75 2911 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
2912 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
2913 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
2914 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
2915 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 2916 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 2917 fg_red, fg_green, fg_blue, fg_alpha.
2918 (grub_video_adapter): Removed blit_glyph.
34c44600 2919 (grub_video_blit_glyph): Removed.
2920
1e901a75 2921 * font/manager.c: Removed file.
34c44600 2922
2923 * font/font.c: New file.
2924
1e901a75 2925 * font/font_cmd.c: Likewise.
34c44600 2926
1e901a75 2927 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 2928
1e901a75 2929 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
2930 (grub_video_vbe_map_rgba): Likewise.
2931 (grub_video_vbe_unmap_color_int): Likewise.
2932 (grub_video_vbe_blit_glyph): Removed.
2933 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 2934
1e901a75 2935 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
2936 (get_pixel): Likewise.
34c44600 2937 (set_pixel): Likewise.
2938
1e901a75 2939 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 2940
1e901a75 2941 * term/gfxterm.c: Adapted to new font engine.
34c44600 2942
1e901a75 2943 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 2944
1e901a75 2945 * term/i386/pc/vga.c: Likewise.
34c44600 2946
1e901a75 2947 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 2948
1e901a75 2949 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 2950
1e901a75 2951 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 2952
1e901a75 2953 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 2954
1e901a75 2955 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 2956
1e901a75 2957 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 2958
1e901a75 2959 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 2960
1e901a75 2961 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 2962
1e901a75 2963 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2964
2965 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 2966
1e901a75 2967 * util/grub-mkconfig_lib.in: Changed font extension.
2968
278922e8 29692008-12-28 Felix Zielcke <fzielcke@z-51.de>
2970
2971 * util/getroot.c (grub_util_get_grub_dev): Add support for
2972 /dev/md/dNNpNN style partitionable mdraid devices.
2973
3ced05cf 29742008-12-12 Alex Smith <alex@alex-smith.me.uk>
2975
2976 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
2977 at a time limit of the PXE TFTP API correctly.
2978 (grub_pxefs_close): Likewise.
2979
7fd0ee30 29802008-11-29 Robert Millan <rmh@aybabtu.com>
2981
34c44600 2982 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 2983 grub_ata_device_initialize() calls.
2984
34c44600 29852008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 2986
2987 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
2988 iteration failed.
2989 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
2990
89313780 29912008-11-28 Robert Millan <rmh@aybabtu.com>
2992
2993 Fix build on powerpc-ieee1275. Based on patch created by
2994 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
2995 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2996 `kern/ieee1275/mmap.c'.
2997 * include/grub/powerpc/ieee1275/memory.h: New file.
2998
15257703 2999 Provide grub-install on coreboot.
3000 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3001 (grub_install_SOURCES): New variable.
3002 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3003 usable on coreboot.
3004
9fc5388a 30052008-11-25 Felix Zielcke <fzielcke@z-51.de>
3006
3007 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3008 to `grub_term_input_t'.
3009 (grub_term_get_current_output): Change return type to
3010 `grub_term_output_t'.
3011
bc3a2f31 30122008-11-22 Robert Millan <rmh@aybabtu.com>
3013
34c44600 3014 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 3015 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3016 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3017 grub_vga_text_cls().
3018
80fc88f2 3019 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 3020 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 3021
cbf36fd3 3022 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3023 to 0x200000 (avoids trouble with some OFW implementations, and matches
3024 with the one in Yaboot).
3025 Reported by Manoel Abranches
3026
73e8e268 30272008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 3028
3029 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3030 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3031
73e8e268 3032 * util/grub-mkconfig_lib.in (grub_warn): New function.
3033 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3034 warnings, to obtain consistent formatting.
3035 * util/grub.d/00_header.in: Likewise.
3036 * util/update-grub_lib.in: Likewise.
3037
e94045a1 3038 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 3039 Move comment text to `#error' stanza.
e94045a1 3040
79d29fd7 3041 Harmonize ieee1275's grub_available_iterate() with the generic
3042 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3043 build problem on i386-ieee1275):
3044 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3045 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3046 parameter `type'. Update all users of this function.
3047 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3048 `kern/ieee1275/mmap.c'.
3049 * kern/ieee1275/init.c
3050 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3051 with ...
3052 (grub_machine_mmap_iterate): ... this.
3053 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3054 return type to `grub_err_t'. Update all implementations of this
3055 function prototype.
3056 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3057 Likewise.
3058
60d6b16e 3059 Add `lsmmap' command (lists firmware-provided memory map):
3060 * commands/lsmmap.c: New file.
3061 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3062 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3063 variables.
3064 * conf/powerpc-ieee1275.rmk: Likewise.
3065 * conf/i386-coreboot.rmk: Likewise.
3066 * conf/i386-ieee1275.rmk: Likewise.
3067
ebaaf49b 30682008-11-19 Robert Millan <rmh@aybabtu.com>
3069
3070 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 3071 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3072 constraints to initrd allocation (based on code from
3073 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3074 for Linux to find it.
ebaaf49b 3075
dfab719f 30762008-11-14 Robert Millan <rmh@aybabtu.com>
3077
3078 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3079 order to cope with duplicate slashes.
3080
10fc3eb9 30812008-11-14 Robert Millan <rmh@aybabtu.com>
3082
3083 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3084 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3085 don't want to mess with lower memory, because it is used in the Linux
3086 loader.
3087
3088 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 3089 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 3090 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3091 is in our heap (probably as a result of it being corrupted during
2f2a3442 3092 decompression). Add #error instance with comment to explain why this
3093 loader isn't currently usable on PC/BIOS.
10fc3eb9 3094
e2e07847 30952008-11-14 Robert Millan <rmh@aybabtu.com>
3096
3097 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 3098 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 3099
fe8e8d69 31002008-11-12 Robert Millan <rmh@aybabtu.com>
3101
3102 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3103
3104 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3105 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3106 from here ...
3107 * include/grub/i386/pc/memory.h: ... to here.
3108
976b07d0 31092008-11-12 Robert Millan <rmh@aybabtu.com>
3110
3111 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3112 split).
3113
3114 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3115 (grub_console_cur_color, grub_console_real_putchar)
3116 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3117 (grub_console_setcolorstate, grub_console_setcolor)
3118 (grub_console_getcolor): Move from here ...
3119 * include/grub/i386/vga_common.h: ... to here (new file).
3120
3121 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3122 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3123 `<grub/i386/io.h>'.
3124 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3125 `<grub/i386/vga_common.h>'.
3126
76679cd3 31272008-11-12 Robert Millan <rmh@aybabtu.com>
3128
3129 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3130 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3131 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3132 variables.
3133 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3134 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3135
3136 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3137 grub_console_init() with call to grub_vga_text_init().
3138 (grub_machine_fini): Replace call to
3139 grub_console_fini() with call to grub_vga_text_fini() and
3140 grub_at_keyboard_fini().
3141
3142 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3143 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3144 (grub_console_setcolorstate, grub_console_setcolor)
3145 (grub_console_getcolor): New function prototypes.
3146
3147 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3148 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3149 (grub_vga_text_setcursor): Static-ize.
3150 (grub_vga_text_term): New structure.
3151 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3152
3153 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3154 (grub_console_cur_color, grub_console_standard_color)
3155 (grub_console_normal_color, grub_console_highlight_color)
3156 (map_char, grub_console_putchar, grub_console_getcharwidth)
3157 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3158 (grub_console_getcolor): Move from here ...
3159 * term/i386/vga_common.c: ... to here (same function names).
3160
95b841d3 31612008-11-12 Robert Millan <rmh@aybabtu.com>
3162
3163 Use newly-added Multiboot support in coreboot.
3164
3165 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3166 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3167
3168 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3169 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3170 (codestart): Store the MBI in `startup_multiboot_info' when we're
3171 being loaded using Multiboot.
3172
3173 * kern/i386/coreboot/init.c (grub_machine_init): Move
3174 grub_at_keyboard_init() call to beginning of function (useful for
3175 debugging). Call grub_machine_mmap_init() before attempting to use
3176 grub_machine_mmap_iterate().
3177 (grub_lower_mem, grub_upper_mem): Move from here ...
3178 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3179 here (new file).
3180
3181 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3182 function prototype.
3183
761ca975 31842008-11-12 Robert Millan <rmh@aybabtu.com>
3185
3186 Fix a regression introduced by the at_keyboard.mod split. Because
3187 some terminals are default on some platforms and non-default on
3188 others, the first terminal being registered determines which is
3189 going to be default.
3190
3191 * kern/term.c (grub_term_register_input): If this is the first
3192 terminal being registered, set it as the current one.
3193 (grub_term_register_output): Likewise.
3194
3195 * term/efi/console.c (grub_console_init): Do not call
3196 grub_term_set_current_output() or grub_term_set_current_input().
3197 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3198 * term/i386/pc/console.c (grub_console_init): Likewise.
3199 (grub_console_fini): Do not call grub_term_set_current_input()
3200 (but leave grub_term_set_current_output() to restore text mode).
3201
6c529df7 32022008-11-10 Robert Millan <rmh@aybabtu.com>
3203
3204 * util/grub.d/00_header.in: Add backward compatibility check for
3205 versions of terminal.mod that don't understand `terminal_input' or
3206 `terminal_output'.
3207
132e4113 32082008-11-09 Robert Millan <rmh@aybabtu.com>
3209
3210 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3211 `terminal_input' / `terminal_output', not `terminal'.
3212
ac293d50 32132008-11-08 Robert Millan <rmh@aybabtu.com>
3214
3215 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 3216 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 3217
0025933a 32182008-11-08 Robert Millan <rmh@aybabtu.com>
3219
3220 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 3221 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 3222 members. Update all users.
3223 * util/console.c (grub_ncurses_term): Split in ...
3224 (grub_ncurses_term_input): ... this, and ...
3225 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 3226 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 3227
37c86336 32282008-11-08 Robert Millan <rmh@aybabtu.com>
3229
3230 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3231 (PKGDATA): Add $(pkgdata_SRCDIR).
3232 (pkglib_BUILDDIR): New variable.
3233 (pkgdata_SRCDIR): New variable.
3234 (build_env.mk): New target.
3235 (include_DATA): New variable.
3236 (install-local): Install $(include_DATA) files in $(includedir).
3237
b6c15a2d 32382008-11-07 Pavel Roskin <proski@gnu.org>
3239
d99d46f1 3240 * gendistlist.sh: Use C locale for sorting to ensure consistent
3241 output on all systems.
3242
b6c15a2d 3243 * util/grub.d/00_header.in: Remove incorrect space before
3244 "serial".
3245
c32ee8c9 32462008-11-07 Robert Millan <rmh@aybabtu.com>
3247
3248 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3249 per specification.
3250 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3251 * loader/multiboot_loader.c (find_multi_boot2_header): New function
3252 (based on find_multi_boot1_header).
3253 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3254 using find_multi_boot2_header(), and abort if neither Multiboot or
3255 Multiboot headers were found.
3256
651c29b7 32572008-11-07 Robert Millan <rmh@aybabtu.com>
3258
3259 Modularize at_keyboard.mod:
3260
3261 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3262 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3263 (at_keyboard_mod_LDFLAGS): New variables.
3264
3265 Actual terminal split:
3266
3267 * include/grub/term.h (struct grub_term): Split in ...
3268 (struct grub_term_input): ... this, and ...
3269 (struct grub_term_output): ... this. Update all users.
3270 (grub_term_set_current): Split in ...
3271 (grub_term_set_current_input): ... this, and ...
3272 (grub_term_set_current_output): ... this.
3273 (grub_term_get_current): Split in ...
3274 (grub_term_get_current_input): ... this, and ...
3275 (grub_term_get_current_output): ... this.
3276 (grub_term_register): Split in ...
3277 (grub_term_register_input): ... this, and ...
3278 (grub_term_register_output): ... this.
3279 (grub_term_unregister): Split in ...
3280 (grub_term_unregister_input): ... this, and ...
3281 (grub_term_unregister_output): ... this.
3282 (grub_term_iterate): Split in ...
3283 (grub_term_iterate_input): ... this, and ...
3284 (grub_term_iterate_output): ... this.
3285
3286 * kern/term.c (grub_term_list): Split in ...
3287 (grub_term_list_input): ... this, and ...
3288 (grub_term_list_output): ... this. Update all users.
3289 (grub_cur_term): Split in ...
3290 (grub_cur_term_input): ... this, and ...
3291 (grub_cur_term_output): ... this. Update all users.
3292 (grub_term_set_current): Split in ...
3293 (grub_term_set_current_input): ... this, and ...
3294 (grub_term_set_current_output): ... this.
3295 (grub_term_get_current): Split in ...
3296 (grub_term_get_current_input): ... this, and ...
3297 (grub_term_get_current_output): ... this.
3298 (grub_term_register): Split in ...
3299 (grub_term_register_input): ... this, and ...
3300 (grub_term_register_output): ... this.
3301 (grub_term_unregister): Split in ...
3302 (grub_term_unregister_input): ... this, and ...
3303 (grub_term_unregister_output): ... this.
3304 (grub_term_iterate): Split in ...
3305 (grub_term_iterate_input): ... this, and ...
3306 (grub_term_iterate_output): ... this.
3307
3308 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3309 a check for input and one for output (and only attempt to get keys
3310 from user when input works).
3311
3312 * util/grub-probe.c (grub_term_get_current): Split in ...
3313 (grub_term_get_current_input): ... this, and ...
3314 (grub_term_get_current_output): ... this.
3315 * util/grub-fstest.c: Likewise.
3316 * util/i386/pc/grub-setup.c: Likewise.
3317 * util/grub-editenv.c: Likewise.
3318
3319 Portability adjustments:
3320
3321 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3322 `term/i386/pc/at_keyboard.c'.
3323 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3324 grub_keyboard_controller_init() (now handled by terminal .init).
3325 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3326 grub_at_keyboard_init().
3327 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3328 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3329 at_keyboard.mod via input terminal interface).
3330 * include/grub/i386/coreboot/console.h: Convert into a stub for
3331 `<grub/i386/pc/console.h>'.
3332
3333 Migrate full terminals to new API:
3334
3335 * term/efi/console.c (grub_console_term): Split into ...
3336 (grub_console_term_input): ... this, and ...
3337 (grub_console_term_output): ... this. Update all users.
3338 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3339 (grub_ofconsole_init): Split into ...
3340 (grub_ofconsole_init_input): ... this, and ...
3341 (grub_ofconsole_init_output): ... this.
3342 (grub_ofconsole_term): Split into ...
3343 (grub_ofconsole_term_input): ... this, and ...
3344 (grub_ofconsole_term_output): ... this. Update all users.
3345 * term/i386/pc/serial.c (grub_serial_term): Split into ...
3346 (grub_serial_term_input): ... this, and ...
3347 (grub_serial_term_output): ... this. Update all users.
3348 * term/i386/pc/console.c (grub_console_term): Split into ...
3349 (grub_console_term_input): ... this, and ...
3350 (grub_console_term_output): ... this. Update all users.
3351 (grub_console_term_input): Only enable it on PC/BIOS platform.
3352 (grub_console_init): Remove grub_keyboard_controller_init() call.
3353
3354 Migrate input terminals to new API:
3355
3356 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3357 `i386' and `i386/pc' to enable build on x86_64 (this driver is
3358 i386-specific anyway).
3359 (grub_console_checkkey): Rename to ...
3360 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
3361 users.
3362 (grub_keyboard_controller_orig): New variable.
3363 (grub_console_getkey): Rename to ...
3364 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
3365 users.
3366 (grub_keyboard_controller_init): Static-ize. Save original
3367 controller value so that it can be restored ...
3368 (grub_keyboard_controller_fini): ... here (new function).
3369 (grub_at_keyboard_term): New structure.
3370 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3371 functions.
3372
3373 Migrate output terminals to new API:
3374
3375 * term/i386/pc/vga.c (grub_vga_term): Change type to
3376 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3377 members. Update all users.
3378 * term/gfxterm.c (grub_video_term): Change type to
3379 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3380 members. Update all users.
3381 * include/grub/i386/pc/console.h (grub_console_checkkey)
3382 (grub_console_getkey): Do not export (no longer needed by gfxterm,
3383 etc).
3384
3385 Migrate `terminal' command and userland tools to new API:
3386
3387 * commands/terminal.c (grub_cmd_terminal): Split into ...
3388 (grub_cmd_terminal_input): ... this, and ...
3389 (grub_cmd_terminal_output): ... this.
3390 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3391 `terminal_input' and `terminal_output'.
3392 * util/grub.d/00_header.in: Adjust `terminal' calls to new
3393 `terminal_input' / `terminal_output' API.
3394 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3395 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3396 provided ${GRUB_TERMINAL}, convert it).
3397
96e5d876 33982008-11-04 Robert Millan <rmh@aybabtu.com>
3399
3400 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
3401 for FreeBSD.
3402 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3403
556f3775 34042008-11-03 Bean <bean123ch@gmail.com>
3405
3406 * kern/elf.c (grub_elf32_load): Revert to previous code.
3407 (grub_elf64_load): Likewise.
3408
3409 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3410
926b9823 34112008-11-01 Robert Millan <rmh@aybabtu.com>
3412
3413 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3414 (TARGET_CPPFLAGS): Likewise.
3415 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3416
1432e958 34172008-11-01 Carles Pina i Estany <carles@pina.cat>
3418
3419 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3420
dba3f844 34212008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 3422
3423 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3424 addition of objects until the code is not going to be able to fail.
3425
dba3f844 34262008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 3427
3428 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3429 (add a missing NULL check, and correct them by moving the pointer
3430 operations after the actual check).
3431
7ab28c21 34322008-10-29 Robert Millan <rmh@aybabtu.com>
3433
3434 * util/i386/pc/grub-install.in: Handle empty string as output from
3435 make_system_path_relative_to_its_root().
3436
1b7748eb 34372008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
3438
3439 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3440 circular metadata worst case scenario. If the metadata is circular
3441 then copy the wrap in place.
3442 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3443 project lib/format_text/layout.h
3444 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3445
c9618ab2 34462008-10-03 Felix Zielcke <fzielcke@z-51.de>
3447
7a36edca 3448 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 3449
bf981c62 34502008-10-03 Felix Zielcke <fzielcke@z-51.de>
3451
3452 * util/update-grub_lib.in: Mention filename in warning message.
3453
6d994591 34542008-09-29 Felix Zielcke <fzielcke@z-51.de>
3455
3456 * NEWS: Update for rename of update-grub to grub-mkconfig.
3457
18ade780 34582008-09-29 Felix Zielcke <fzielcke@z-51.de>
3459
3460 * util/update-grub_lib.in: Copy to ...
3461 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 3462 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 3463 * util/update-grub.in: Rename to ...
3464 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
3465 option. Add `--output' option to allow users to specify the generated
3466 configuration file. Default to stdout.
3467 (update_grub_dir): Rename to ...
3468 (grub_mkconfig_dir): ... this.
3469 (grub_cfg): Default to an empty string.
3470 * conf/common.rmk (update-grub): Rename to ...
3471 (grub-mkconfig): ... this.
3472 (update-grub_lib): Copy to ...
3473 (grub-mkconfig_lib): ... this.
3474 (update-grub_SCRIPTS): Copy to ...
3475 (grub-mkconfig_SCRIPTS): ... this. Update all users.
3476 (update-grub_DATA): Rename to ...
3477 (grub-mkconfig_DATA): ... this.
3478
556ce6ac 34792008-09-28 Robert Millan <rmh@aybabtu.com>
3480
3481 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3482 to `modified'. Add the real `created' field.
3483 (grub_iso9660_uuid): Use `modified' rather than `created' for
3484 constructing the UUID.
3485
34862008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 3487
3488 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3489 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3490
92274e85 34912008-09-28 Bean <bean123ch@gmail.com>
3492
3493 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3494 Thanks to Christian Franke for finding this bug.
3495
add6f17a 34962008-09-25 Robert Millan <rmh@aybabtu.com>
3497
3498 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3499 instances of grub_util_get_disk_name() (see previous commit).
3500
d2a367b8 35012008-09-25 Robert Millan <rmh@aybabtu.com>
3502
3503 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3504 `util/i386/get_disk_name.c'.
3505 * conf/i386-efi.rmk: Likewise.
3506 * conf/x86_64-efi.rmk: Likewise.
3507 * conf/i386-coreboot.rmk: Likewise.
3508 * conf/i386-ieee1275.rmk: Likewise.
3509 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3510 `util/ieee1275/get_disk_name.c'.
3511 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3512 * util/ieee1275/get_disk_name.c: Remove file.
3513 * util/i386/get_disk_name.c: Remove file.
3514 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3515 "hd%d" for device.map entries, rather than using
3516 grub_util_get_disk_name().
3517
81a06771 35182008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 3519
3520 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3521 warning.
3522 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3523
5a004279 35242008-09-24 Carles Pina i Estany <carles@pina.cat>
3525
3526 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3527 Changed to 0x5100.
3528 (GRUB_TERM_PPAGE): Changed to 0x4900.
3529
397093d3 35302008-09-24 Robert Millan <rmh@aybabtu.com>
3531
3532 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3533 macros (they were i386-pc specific).
3534 * include/grub/sparc64/ieee1275/console.h: Likewise.
3535 * include/grub/efi/console.h: Likewise.
3536
a91b6c7c 35372008-09-22 Bean <bean123ch@gmail.com>
3538
3539 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3540 resident and in attribute list.
3541
3542 * include/grub/ntfs.h (BMP_LEN): Removed.
3543
c40fd116 35442008-09-22 Bean <bean123ch@gmail.com>
3545
81a06771 3546 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 3547 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3548
3549 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3550 error occurs, as grub_disk_open will call grub_disk_close, which will
3551 call p->close (scsi).
3552
81a06771 35532008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 3554
3555 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3556 (AC_PREREQ): Bumped to 2.59.
3557 (AC_TRY_COMPILE): Replace obsolete macro with ...
3558 (AC_COMPILE_IFELSE): ... this.
3559 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3560 (AC_LINK_IFELSE): ... this.
3561
5dc43410 35622008-09-21 Felix Zielcke <fzielcke@z-51.de>
3563
3564 * autogen.sh: Add a call to `gendistlist.sh'.
3565
9035dce4 35662008-09-19 Christian Franke <franke@computer.org>
3567
3568 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3569 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3570 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3571 Export __enable_execute_stack() to modules.
3572 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3573 New function.
3574
7fd75377 35752008-09-09 Felix Zielcke <fzielcke@z-51.de>
3576
040030b3 3577 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3578 Sort the list.
3579
35802008-09-09 Felix Zielcke <fzielcke@z-51.de>
3581
3582 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 3583 #include <grub/util/hostdisk.h>.
3584
89d5ffcf 35852008-09-08 Robert Millan <rmh@aybabtu.com>
3586
3587 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3588 segments when their filesz is zero (grub_file_read() interprets
81a06771 3589 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 3590 Use `lowest_segment' rather than 0 for calculating the current
3591 segment load address.
3592
40da438f 35932008-09-08 Robert Millan <rmh@aybabtu.com>
3594
3595 * util/hostdisk.c (open_device): Replace a grub_util_info() call
3596 with grub_dprintf("hostdisk", ...), as it was so verbose that it
3597 clobbered useful information.
3598
ddbf5556 35992008-09-08 Robert Millan <rmh@aybabtu.com>
3600
3601 * include/grub/util/biosdisk.h: Move to ...
3602 * include/grub/util/hostdisk.h: ... here. Update all users.
3603 * util/biosdisk.c: Move to ...
3604 * util/hostdisk.c: ... here. Update all users.
3605
783d0f48 36062008-09-07 Robert Millan <rmh@aybabtu.com>
3607
3608 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3609 variables.
3610 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3611 and length can be stored directly in the `mbi->mmap_addr' and
3612 `mbi->mmap_length' struct fields.
3613
548e2ea5 36142008-09-07 Robert Millan <rmh@aybabtu.com>
3615
3616 * conf/i386.rmk: New file. Provides declaration for building
3617 `cpuid.mod'.
3618 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3619 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3620 variables.
3621 Include `conf/i386.mk'.
3622 * conf/i386-efi.rmk: Likewise.
3623 * conf/x86_64-efi.rmk: Likewise.
3624 * conf/i386-coreboot.rmk: Likewise.
3625 * conf/i386-ieee1275.rmk: Likewise.
3626
0ea85a37 36272008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
3628
3629 Based on patch created by Colin D Bennett <colin@gibibit.com>.
3630 Adds optimization support for BGR based modes.
3631
3632 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3633 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3634 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3635 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3636 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3637 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3638 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3639 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3640 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3641 (grub_video_i386_vbeblit_index_index): Likewise.
3642 (grub_video_i386_vbeblit_replace_directN): Added.
3643 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3644 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3645 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3646 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3647 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3648 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 3649 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 3650 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3651 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3652 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3653 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3654 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3655 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3656
3657 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3658 (grub_video_i386_vbefill_R8G8B8): Likewise.
3659 (grub_video_i386_vbefill_index): Likewise.
3660 (grub_video_i386_vbefill_direct32): Added.
3661 (grub_video_i386_vbefill_direct24): Likewise.
3662 (grub_video_i386_vbefill_direct16): Likewise.
3663 (grub_video_i386_vbefill_direct8): Likewise.
3664
81a06771 3665 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 3666 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3667 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3668 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3669 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3670 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 3671
0ea85a37 3672 * video/video.c (grub_video_get_blit_format): Updated to use new
3673 blit formats. Added handling for 16 bit color modes.
81a06771 3674
3675 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 3676 fillers.
3677 (common_blitter): Updated to use new blitters.
3678
3679 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3680 Removed.
3681 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3682 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3683 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3684 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3685 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3686 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3687 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3688 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3689 (grub_video_i386_vbeblit_index_index): Likewise.
3690 (grub_video_i386_vbeblit_replace_directN): Added.
3691 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3692 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3693 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3694 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3695 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3696 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3697 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3698 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3699 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3700 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3701 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3702 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3703 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 3704
0ea85a37 3705 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3706 (grub_video_i386_vbefill_R8G8B8): Likewise.
3707 (grub_video_i386_vbefill_index): Likewise.
3708 (grub_video_i386_vbefill_direct32): Added.
3709 (grub_video_i386_vbefill_direct24): Likewise.
3710 (grub_video_i386_vbefill_direct16): Likewise.
3711 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 3712
0ea85a37 3713 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3714 types.
81a06771 3715
0ea85a37 3716 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3717 types.
81a06771 3718
0ea85a37 3719 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3720 blitter types.
81a06771 3721
0ea85a37 3722 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3723 types.
3724
e8a83df6 37252008-09-06 Felix Zielcke <fzielcke@z-51.de>
3726
3727 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3728 RAID level 1.
3729
6bcd8ee5 37302008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 3731
6bcd8ee5 3732 * fs/iso9660.c (grub_iso9660_date): New structure.
3733 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3734 (grub_iso9660_uuid): New function.
c375ae58 3735
59261157 37362008-09-05 Bean <bean123ch@gmail.com>
3737
3738 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
3739
3740 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
3741 insensitive bit for names in Win32 and Win32 & DOS namespace.
3742
3743 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
3744
3745 * include/grub/types.h (LONG_MAX): Likewise.
3746
58b6645a 37472008-09-04 Felix Zielcke <fzielcke@z-51.de>
3748
4ee55921 3749 * util/getroot.c: Include <config.h>.
3750 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
3751 add support for /dev/md/N devices and handle LVM double dash escaping.
3752
37532008-09-04 Felix Zielcke <fzielcke@z-51.de>
3754
3755 * config.guess: Update to latest version from config git.
3756 * config.sub: Likewise.
58b6645a 3757
9124f65d 37582008-09-03 Robert Millan <rmh@aybabtu.com>
3759
3760 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
3761 `disk->total_sectors'.
3762
81a06771 37632008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 3764
3765 * include/grub/normal.h: Fixed incorrect comment for
3766 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
3767
81a06771 37682008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 3769
3770 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
3771 values with defines.
3772
3773 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
3774 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
3775 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
3776 (GRUB_VBE_MODEATTR_COLOR): Likewise.
3777 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
3778 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
3779 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
3780 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
3781 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
3782 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
3783 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
3784 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
3785 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
3786 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
3787 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
3788 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
3789 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
3790 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
3791 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
3792
93d5cbf8 37932008-08-31 Robert Millan <rmh@aybabtu.com>
3794
3795 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
3796 declaration.
3797 (grub_multiboot): Fix a few warnings.
3798
21751d50 37992008-08-31 Robert Millan <rmh@aybabtu.com>
3800
3801 * loader/i386/pc/multiboot.c: Update comment not to say that
3802 boot_device support is unimplemented.
3803
e27a75c5 38042008-08-31 Robert Millan <rmh@aybabtu.com>
3805
3806 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
3807 or memory map support are unimplemented.
3808
81a06771 38092008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 3810
3811 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
3812
81a06771 38132008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 3814
3815 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
3816 total video memory in 'vbeinfo' output; show color format details for
3817 each video mode.
3818
7c5d8d95 38192008-08-30 Pavel Roskin <proski@gnu.org>
3820
3821 * util/genmoddep.c: Remove for real this time.
3822 * DISTLIST: Remove util/genmoddep.c.
3823
4cebd25a 38242008-08-30 Robert Millan <rmh@aybabtu.com>
3825
3826 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
3827 as required by Multiboot spec (it was already 4-byte aligned, but
3828 only by chance).
3829
b497a269 38302008-08-29 Pavel Roskin <proski@gnu.org>
3831
e3925185 3832 * kern/powerpc/ieee1275/crt0.S: Rename to ...
3833 * kern/powerpc/ieee1275/startup.S: ... this.
3834 * conf/powerpc-ieee1275.rmk: Adjust for the above.
3835 * DISTLIST: Likewise.
3836
b497a269 3837 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
3838 grub/cpu/kernel.h. Add start label for consistency with other
3839 platforms. Add grub_prefix immediately after start. Add jump
3840 to the code after grub_prefix.
3841 * include/grub/powerpc/kernel.h: Provide valid values for
3842 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
3843
6e5a42fe 38442008-08-29 Bean <bean123ch@gmail.com>
3845
3846 * configure.ac: Change host_os to cygwin for mingw.
3847 (asprintf): New check for function.
3848
3849 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
3850 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
3851
3852 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 3853 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 3854 sync, sleep and grub_util_get_disk_size for mingw.
3855
3856 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
3857 to get size in mingw.
3858 (open_device): Use flag O_BINARY if it's defined.
3859 (find_root_device): Add dummy code for mingw.
3860
3861 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
3862 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
3863 (get_scsi_disk_name): Return 0 for mingw.
3864
3865 * util/hostfs.c: #include <grub/util/misc.h>.
3866 (grub_hostfs_open): Use "rb" flag to open file, use
3867 grub_util_get_disk_size to get disk size for mingw.
3868
3869 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
3870 (asprintf): New function if HAVE_ASPRINTF is not set.
3871 (sync): New function for mingw.
3872 (sleep): Likewise.
3873 (grub_util_get_disk_size): Likewise.
3874
ab3f2673 38752008-08-28 Pavel Roskin <proski@gnu.org>
3876
3877 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3878 kern/time.c.
3879
1c282483 38802008-08-28 Robert Millan <rmh@aybabtu.com>
3881
3882 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
3883
678e849c 38842008-08-28 Robert Millan <rmh@aybabtu.com>
3885
3886 Change find_grub_drive() syntax so it doesn't prevent it from
3887 detecting NULL names as errors.
3888
3889 * util/biosdisk.c (find_grub_drive): Move free slot search code
3890 from here ...
3891 (find_free_slot): ... to here.
3892 (read_device_map): Use find_free_slot() to search for free slots.
3893
965c75ca 38942008-08-27 Marco Gerards <marco@gnu.org>
3895
3896 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
3897 (scsi_mod_SOURCES): New variable.
3898 (scsi_mod_CFLAGS): Likewise
3899 (scsi_mod_LDFLAGS): Likewise.
3900
3901 * disk/scsi.c: New file.
3902
3903 * include/grub/scsi.h: Likewise.
3904
3905 * include/grub/scsicmd.h: Likewise.
3906
3907 * disk/ata.c: Include <grub/scsi.h>.
3908 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
3909 instead.
3910 (grub_ata_iterate): Skip ATAPI devices.
3911 (grub_ata_open): Only handle ATAPI devices.
3912 (struct grub_atapi_read): Removed.
3913 (grub_atapi_readsector): Likewise.
3914 (grub_ata_read): No longer handle ATAPI devices.
3915 (grub_ata_write): Likewise.
3916 (grub_atapi_iterate): New function.
3917 (grub_atapi_read): Likewise.
3918 (grub_atapi_write): Likewise.
3919 (grub_atapi_open): Likewise.
3920 (grub_atapi_close): Likewise.
3921 (grub_atapi_dev): New variable.
3922 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
3923 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
3924
3925 * include/grub/disk.h (enum grub_disk_dev_id): Add
3926 `GRUB_DISK_DEVICE_SCSI_ID'.
3927
c07ae501 39282008-08-26 Robert Millan <rmh@aybabtu.com>
3929
3930 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
3931 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
3932 descriptive.
3933
5ed20adc 39342008-08-23 Bean <bean123ch@gmail.com>
3935
3936 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
3937 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3938 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
3939 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
3940 dm_nv.mod.
3941 (raid5rec_mod_SOURCES): New macro.
3942 (raid5rec_mod_CFLAGS): Likewise.
3943 (raid5rec_mod_LDFLAGS): Likewise.
3944 (raid6rec_mod_SOURCES): Likewise.
3945 (raid6rec_mod_CFLAGS): Likewise.
3946 (raid6rec_mod_LDFLAGS): Likewise.
3947 (mdraid_mod_SOURCES): Likewise.
3948 (mdraid_mod_CFLAGS): Likewise.
3949 (mdraid_mod_LDFLAGS): Likewise.
3950 (dm_nv_mod_SOURCES): Likewise.
3951 (dm_nv_mod_CFLAGS): Likewise.
3952 (dm_nv_mod_LDFLAGS): Likewise.
3953
3954 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
3955 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3956 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3957
3958 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
3959 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3960
3961 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3962
3963 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3964
3965 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3966
3967 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3968
3969 * disk/raid5_recover.c: New file.
3970
3971 * disk/raid6_recover.c: Likewise.
3972
3973 * disk/mdraid_linux.c: Likewise.
3974
3975 * disk/dmraid_nvidia.c: Likewise.
3976
3977 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
3978 ULONG_MAX.
3979
3980 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
3981 calculate the size of raid device.
3982 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
3983 different layout of raid5.
3984 (grub_raid_scan_device): Remove code specific to mdraid.
3985 (grub_raid_list): New variable.
3986 (free_array): New function.
3987 (grub_raid_register): Likewise.
3988 (grub_raid_unregister): Likewise.
3989 (grub_raid_rescan): Likewise.
3990 (GRUB_MOD_INIT): Don't iterate device here.
3991 (GRUB_MOD_FINI): Use free_array to release resource.
3992
3993 * include/grub/raid.h: Remove macro and structure specific to mdraid.
3994 (grub_raid5_recover_func_t): New function variable type.
3995 (grub_raid6_recover_func_t): Likewise.
3996 (grub_raid5_recover_func): New variable.
3997 (grub_raid6_recover_func): Likewise.
3998 (grub_raid_register): New function.
3999 (grub_raid_unregister): Likewise.
4000 (grub_raid_rescan): Likewise.
4001 (grub_raid_block_xor): Likewise.
4002
4003 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4004 (CMD_CRC): New macro.
4005 (part): Removed.
4006 (read_file): Handle device as well as file.
4007 (cmd_crc): New function.
4008 (fstest): Handle multiple disks.
4009 (options): Remove part, raw and long, add root and diskcount.
4010 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 4011 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 4012 add handling for the new options, support multiple disks.
4013
4014 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4015
29c18915 40162008-08-23 Bean <bean123ch@gmail.com>
4017
4018 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4019
4020 * genfslist.sh: Ignore kernel.mod.
4021
4022 * genpartmaplist.sh: Likewise.
4023
8415f261 40242008-08-23 Robert Millan <rmh@aybabtu.com>
4025
4026 * util/getroot.c (find_root_device): Skip anything that starts with
4027 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4028
d5a7dc5b 40292008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 4030
d5a7dc5b 4031 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4032 * util/grub.d/00_header.in: Allow the administrator to change default
4033 gfxmode via ${GRUB_GFXMODE}.
4034
380cfbb4 40352008-08-21 Felix Zielcke <fzielcke@z-51.de>
4036
4037 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4038
c9baafe7 40392008-08-21 Robert Millan <rmh@aybabtu.com>
4040
4041 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4042 loader.
4043 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4044 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4045
e290bef2 40462008-08-20 Carles Pina i Estany <carles@pina.cat>
4047
4048 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4049 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4050
f9dbfc96 40512008-08-19 Robert Millan <rmh@aybabtu.com>
4052
4053 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4054 (struct grub_virtual_screen): Remove `cursor_color'.
4055 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4056 initialization.
4057 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4058
dd6bd6ab 40592008-08-18 Robert Millan <rmh@aybabtu.com>
4060
4061 Unify (identical) linux_normal.c files.
4062 * loader/i386/efi/linux_normal.c: Move from here ...
4063 * loader/linux_normal.c: ... to here. Update all users.
4064 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4065 * loader/i386/ieee1275/linux_normal.c: Likewise.
4066
7f42f83e 40672008-08-18 Robert Millan <rmh@aybabtu.com>
4068
4069 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4070 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4071 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4072 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4073 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4074 New macros.
4075 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4076 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4077 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4078 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4079 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4080 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4081 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4082 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4083 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4084 portably using grub_getxy().
4085 Replace `-EFI' with `-bzImage' in boot message.
4086
38487ddb 40872008-08-17 Robert Millan <rmh@aybabtu.com>
4088
4089 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4090
deceb3ec 40912008-08-17 Robert Millan <rmh@aybabtu.com>
4092
4093 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4094
4095 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4096 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4097 (grub_machine_mmap_iterate): New function declaration.
4098 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4099 structure.
4100 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4101 macros.
4102
4103 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4104 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4105 Move e820 parsing from here ...
4106 * kern/i386/pc/mmap.c: New file.
4107 (grub_machine_mmap_iterate): ... to here.
4108
4109 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4110 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4111 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4112 (grub_available_iterate): Redeclare to return `void', and redeclare
4113 its hook to use grub_uint64_t as addr and size parameters, and rename
4114 to ...
4115 (grub_machine_mmap_iterate): ... this. Update all users.
4116
4117 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4118 to make it more readable. Rename to ...
4119 (grub_machine_mmap_iterate): ... this.
4120
4121 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4122 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4123 (grub_multiboot): Allocate an extra region after the payload, and fill
4124 it with a Multiboot memory map. Adjust a.out loader to calculate size
4125 with the extra space.
4126 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4127 with the extra space.
4128
f8aa0f43 41292008-08-17 Carles Pina i Estany <carles@pina.cat>
4130
9807deb9 4131 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 4132
605f5bb6 41332008-08-17 Felix Zielcke <fzielcke@z-51.de>
4134
4135 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4136 mdate-sh to the list `find' searches for.
4137 * DISTLIST: Regenerated.
4138
210db6c6 41392008-08-16 Felix Zielcke <fzielcke@z-51.de>
4140
4141 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4142 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 4143 genmoddep.awk, gensymlist.sh.in.
4144 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 4145 * DISTLIST: Regenerated.
48cdbfd4 4146 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 4147
1082b929 41482008-08-16 Robert Millan <rmh@aybabtu.com>
4149
4150 * disk/raid.c (grub_raid_init): Handle/report errors set by
4151 grub_device_iterate().
4152 * disk/lvm.c (grub_lvm_init): Likewise.
4153
42ce5170 41542008-08-15 Bean <bean123ch@gmail.com>
4155
4156 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4157 and datehook.mod.
4158 (datetime_mod_SOURCES): New macro.
4159 (datetime_mod_CFLAGS): Likewise.
4160 (datetime_mod_LDFLAGS): Likewise.
4161 (date_mod_SOURCES): Likewise.
4162 (date_mod_CFLAGS): Likewise.
4163 (date_mod_LDFLAGS): Likewise.
4164 (datehook_mod_SOURCES): Likewise.
4165 (datehook_mod_CFLAGS): Likewise.
4166 (datehook_mod_LDFLAGS): Likewise.
4167
4168 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4169 and datehook.mod.
4170 (datetime_mod_SOURCES): New macro.
4171 (datetime_mod_CFLAGS): Likewise.
4172 (datetime_mod_LDFLAGS): Likewise.
4173 (date_mod_SOURCES): Likewise.
4174 (date_mod_CFLAGS): Likewise.
4175 (date_mod_LDFLAGS): Likewise.
4176 (datehook_mod_SOURCES): Likewise.
4177 (datehook_mod_CFLAGS): Likewise.
4178 (datehook_mod_LDFLAGS): Likewise.
4179
4180 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4181 and datehook.mod.
4182 (datetime_mod_SOURCES): New macro.
4183 (datetime_mod_CFLAGS): Likewise.
4184 (datetime_mod_LDFLAGS): Likewise.
4185 (date_mod_SOURCES): Likewise.
4186 (date_mod_CFLAGS): Likewise.
4187 (date_mod_LDFLAGS): Likewise.
4188 (datehook_mod_SOURCES): Likewise.
4189 (datehook_mod_CFLAGS): Likewise.
4190 (datehook_mod_LDFLAGS): Likewise.
4191
4192 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4193 and datehook.mod.
4194 (datetime_mod_SOURCES): New macro.
4195 (datetime_mod_CFLAGS): Likewise.
4196 (datetime_mod_LDFLAGS): Likewise.
4197 (date_mod_SOURCES): Likewise.
4198 (date_mod_CFLAGS): Likewise.
4199 (date_mod_LDFLAGS): Likewise.
4200 (datehook_mod_SOURCES): Likewise.
4201 (datehook_mod_CFLAGS): Likewise.
4202 (datehook_mod_LDFLAGS): Likewise.
4203
4204 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4205 and datehook.mod.
4206 (datetime_mod_SOURCES): New macro.
4207 (datetime_mod_CFLAGS): Likewise.
4208 (datetime_mod_LDFLAGS): Likewise.
4209 (date_mod_SOURCES): Likewise.
4210 (date_mod_CFLAGS): Likewise.
4211 (date_mod_LDFLAGS): Likewise.
4212 (datehook_mod_SOURCES): Likewise.
4213 (datehook_mod_CFLAGS): Likewise.
4214 (datehook_mod_LDFLAGS): Likewise.
4215
4216 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4217
4218 * commands/date.c: New file.
4219
4220 * hook/datehook.c: Likewise.
4221
4222 * include/grub/lib/datetime.h: Likewise.
4223
4224 * include/grub/i386/cmos.h: Likewise.
4225
4226 * lib/datetime.c: Likewise.
4227
4228 * lib/i386/datetime.c: Likewise.
4229
4230 * lib/efi/datetime.c: Likewise.
4231
0e9242da 42322008-08-14 Robert Millan <rmh@aybabtu.com>
4233
4234 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4235 (grub_mkelfimage_SOURCES): New variable.
4236 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4237
4238 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4239 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4240 * conf/powerpc-ieee1275.rmk: Likewise.
4241 * conf/i386-ieee1275.rmk: Likewise.
4242
4243 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4244 * kern/i386/coreboot/init.c: Likewise.
4245
4246 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4247 with `<grub/cpu/kernel.h>'.
4248 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4249 to ...
4250 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4251 * kern/i386/coreboot/startup.S: Likewise.
4252
4253 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4254 (GRUB_MOD_GAP): Remove.
4255 * include/grub/powerpc/kernel.h: New file.
4256 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4257 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4258 * include/grub/i386/kernel.h: New file.
4259 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4260 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4261 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4262
4263 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4264 `grub-mkelfimage'.
4265 Use --directory when invoking grub_mkimage.
4266
4267 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4268 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4269 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4270 and GRUB_KERNEL_CPU_PREFIX.
4271
b86408f8 42722008-08-14 Felix Zielcke <fzielcke@z-51.de>
4273
d5e619ca 4274 * include/grub/err.h (grub_err_printf): New function prototype.
4275 * util/misc.c (grub_err_printf): New function.
4276 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4277 grub_printf.
4278 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 4279
7161f0e0 42802008-08-13 Robert Millan <rmh@aybabtu.com>
4281
4282 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4283
a1967522 42842008-08-13 Robert Millan <rmh@aybabtu.com>
4285
4286 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4287 boot entry.
4288
371458b5 42892008-08-12 Robert Millan <rmh@aybabtu.com>
4290
4291 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4292 of the relocation code from here ...
4293 (grub_multiboot): ... to here.
4294 (forward_relocator, backward_relocator): Move from here ...
4295 * kern/i386/loader.S (grub_multiboot_forward_relocator)
4296 (grub_multiboot_backward_relocator): ... to here.
4297 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
4298 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
4299 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4300 (grub_multiboot_forward_relocator_end)
4301 (grub_multiboot_backward_relocator)
4302 (grub_multiboot_backward_relocator_end): New variables.
4303
05f9452b 43042008-08-12 Bean <bean123ch@gmail.com>
4305
4306 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4307
20024ab0 43082008-08-11 Robert Millan <rmh@aybabtu.com>
4309
4310 * kern/i386/linuxbios/startup.S: Move from here ...
4311 * kern/i386/coreboot/startup.S: ... to here.
4312
4313 * kern/i386/linuxbios/init.c: Move from here ...
4314 * kern/i386/coreboot/init.c: ... to here.
4315
4316 * kern/i386/linuxbios/table.c: Move from here ...
4317 * kern/i386/coreboot/mmap.c: ... to here.
4318
4319 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4320
e352e9cd 43212008-08-11 Robert Millan <rmh@aybabtu.com>
4322
4323 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4324 errors. Leave it to the upper layer to handle them.
4325
2d05bc6a 43262008-08-09 Christian Franke <franke@computer.org>
4327
4328 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4329 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4330 Install `grub.d/10_windows' only on Cygwin.
4331 * configure.ac: Add subst of `target_os'.
4332 Check `target_os' also before setting TARGET_OBJ2ELF.
4333 Add `--enable-grub-pe2elf'.
4334
042bd419 43352008-08-08 Robert Millan <rmh@aybabtu.com>
4336
4337 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4338 (grub_last_time): Change type to grub_uint64_t.
4339 (grub_disk_open): Migrate code from to using grub_get_time_ms().
4340 (grub_disk_close): Likewise.
4341
4342 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4343 (run_menu): Migrate code from to using grub_get_time_ms().
4344
4345 * util/misc.c (grub_get_time_ms): New function.
4346
7f280db5 43472008-08-08 Marco Gerards <marco@gnu.org>
4348
4349 * disk/ata.c (grub_ata_regget): Change return type to
4350 `grub_uint8_t'.
4351 (grub_ata_regget2): Likewise.
4352 (grub_ata_wait_status): New function.
4353 (grub_ata_wait_busy): Removed function, updated all users to use
4354 `grub_ata_wait_status'.
4355 (grub_ata_wait_drq): Likewise.
4356 (grub_ata_cmd): New function.
4357 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
4358 error handling.
4359 (grub_ata_pio_write): Add error handling.
4360 (grub_atapi_identify): Likewise.
4361 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4362 handling.
4363 (grub_ata_identify): Use `grub_ata_cmd' and improve error
4364 handling. Actually use the detected registers. Reorder the
4365 detection logic such that it is easier to read.
4366 (grub_ata_pciinit): Do not assign the same ID to each controller.
4367 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4368 handling.
4369 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4370
4371 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4372
1fbc5e66 43732008-08-08 Marco Gerards <marco@gnu.org>
4374
4375 * NEWS: Update.
4376
819ce6c0 43772008-08-07 Bean <bean123ch@gmail.com>
4378
4379 * include/grub/x86_64/pci.h: New file.
4380
5c41d44d 43812008-08-07 Christian Franke <franke@computer.org>
4382
4383 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4384 (TIMER2_GATE): Likewise.
4385 (grub_pit_wait): Add enable/disable of the timer2 gate
4386 bit of port 0x61. This fixes a possible infinite loop.
4387
5ebc275d 43882008-08-07 Bean <bean123ch@gmail.com>
4389
4390 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4391 kern/i386/tsc.c and kern/i386/pit.c.
4392
4393 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4394 x86_64 platform.
4395
4396 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4397 <grub/i386/tsc.h>.
4398
4399 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4400
e383b3d0 44012008-08-07 Bean <bean123ch@gmail.com>
4402
4403 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4404
4405 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4406
4407 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4408 multiple inclusion. Add #include <grub/types.h>.
4409
1cbb58ac 44102008-08-06 Christian Franke <franke@computer.org>
4411
4412 * conf/common.rmk: Build and install `10_windows'.
4413 * util/grub.d/10_windows.in: New script.
4414
337f5a1e 44152008-08-06 Pavel Roskin <proski@gnu.org>
4416
4417 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4418
057bc4ac 44192008-08-06 Robert Millan <rmh@aybabtu.com>
4420
4421 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4422 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4423
2b99f123 44242008-08-06 Bean <bean123ch@gmail.com>
4425
4426 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4427 (grub_pxefs_fs_int): Remove dummy definition.
4428 (grub_pxefs_open): Use data->block_size to store the current block
4429 size setting.
4430 (grub_pxefs_read): Use block size stored in data->block_size. As the
4431 value of grub_pxe_blksize can be changed after the file is opened.
4432
9f0234cb 44332008-08-06 Bean <bean123ch@gmail.com>
4434
4435 * fs/i386/pc/pxe.c (curr_file): new variable.
4436 (grub_pxefs_open): Simply the handling of pxe file system. Don't
4437 require the dummy internal file system anymore.
4438 (grub_pxefs_read): Removed.
4439 (grub_pxefs_close): Likewise.
4440 (grub_pxefs_fs_int): Likewise.
4441 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4442 connection when we switch file.
4443 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4444
a55d42e0 44452008-08-06 Robert Millan <rmh@aybabtu.com>
4446
4447 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4448 `halt.mod'.
4449 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4450 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4451
4452 * kern/i386/halt.c: New file.
4453 * kern/i386/reboot.c: Likewise.
4454 * include/grub/i386/reboot.h: Likewise.
4455 * include/grub/i386/halt.h: Likewise.
4456
4457 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4458 Include `<grub/cpu/halt.h>'.
4459 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4460 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4461
4462 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4463 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4464 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4465 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4466 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4467 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4468 from here ...
4469 * include/grub/i386/at_keyboard.h: ... to here.
4470
24371d26 44712008-08-05 Robert Millan <rmh@aybabtu.com>
4472
4473 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4474 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4475 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4476 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4477 `kern/generic/millisleep.c'.
4478
4479 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4480 instead of grub_get_rtc().
4481 (grub_tsc_init): Initialize `tsc_boot_time'.
4482
4483 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4484 (grub_machine_init): Use grub_tsc_init() rather than
4485 installing an RTC-based handler via grub_install_get_time_ms().
4486
4487 * kern/i386/pit.c: New file.
4488 * include/grub/i386/pit.h: Likewise.
4489
9e7007b3 44902008-08-05 Bean <bean123ch@gmail.com>
4491
4492 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4493
4494 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4495 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4496 (pxe_mod_SOURCES): New macro.
4497 (pxe_mod_CFLAGS): Likewise.
4498 (pxe_mod_LDFLAGS): Likewise.
4499 (pxecmd_mod_SOURCES): Likewise.
4500 (pxecmd_mod_CFLAGS): Likewise.
4501 (pxecmd_mod_LDFLAGS): Likewise.
4502
4503 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4504 (grub_pxe_call): Likewise.
4505
4506 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4507
4508 * commands/i386/pc/pxecmd.c: New file.
4509
9f0234cb 4510 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 4511
4512 * include/grub/i386/pc/pxe.h: Likewise.
4513
6977d49f 45142008-08-05 Bean <bean123ch@gmail.com>
4515
4516 * util/console.c (grub_console_cur_color): New variable.
4517 (grub_console_standard_color): Likewise.
4518 (grub_console_normal_color): Likewise.
4519 (grub_console_highlight_color): Likewise.
4520 (color_map): Likewise.
4521 (use_color): Likewise.
4522 (NUM_COLORS): New macro.
4523 (grub_ncurses_setcolorstate): Handle color properly.
4524 (grub_ncurses_setcolor): Don't change color here, just remember the
4525 settings, color will be set in grub_ncurses_setcolorstate.
4526 (grub_ncurses_getcolor): New function.
4527 (grub_ncurses_init): Initialize color pairs.
4528 (grub_ncurses_term): New member grub_ncurses_getcolor.
4529
9c2ff3ee 45302008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 4531
9c2ff3ee 4532 High resolution timer support. Implemented for x86 CPUs using TSC.
4533 Extracted generic grub_millisleep() so it's linked in only as needed.
4534 This requires a Pentium compatible CPU; if the RDTSC instruction is
4535 not supported, then it falls back on the generic grub_get_time_ms()
4536 implementation that uses the machine's RTC.
4537
4538 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4539 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4540 `kern/generic/millisleep.c'.
4541
4542 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4543 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4544
4545 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4546 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4547
4548 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4549
4550 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4551 `kern/generic/millisleep.c'.
4552
4553 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4554
4555 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4556
4557 * kern/generic/rtc_get_time_ms.c: New file.
4558
4559 * kern/generic/millisleep.c: New file.
337f5a1e 4560
9c2ff3ee 4561 * kern/misc.c: Don't include
4562 <kern/time.h> anymore.
4563 (grub_millisleep_generic): Removed.
4564
4565 * commands/sleep.c (grub_interruptible_millisleep): Uses
4566 grub_get_time_ms() instead of grub_get_rtc().
4567
4568 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
4569 function.
4570 (grub_cpu_is_cpuid_supported): New inline function.
4571 (grub_cpu_is_tsc_supported): New inline function.
4572 (grub_tsc_init): New function prototype.
4573 (grub_tsc_get_time_ms): New function prototype.
4574
4575 * kern/i386/tsc.c (grub_get_time_ms): New file.
4576
4577 * include/grub/time.h: Include <grub/types.h.
4578 (grub_millisleep_generic): Removed.
4579 (grub_get_time_ms): New prototype.
4580 (grub_install_get_time_ms): New prototype.
4581 (grub_rtc_get_time_ms): New prototype.
4582
4583 * kern/time.c (grub_get_time_ms): New function.
4584 (grub_install_get_time_ms): New function.
4585
4586 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
4587 <grub/time.h> anymore.
4588 (grub_millisleep): Removed.
4589 (grub_machine_init): Call grub_tsc_init.
4590
4591 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4592 get_time_ms() implementation.
4593
4594 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4595 (ieee1275_get_time_ms): New function.
4596 (grub_machine_init): Install get_time_ms() implementation.
4597
4598 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4599 (grub_machine_init): Call grub_tsc_init().
4600 (grub_millisleep): Removed.
bf06a93f 4601
9c2ff3ee 4602 * kern/ieee1275/init.c (grub_millisleep): Removed.
4603 (grub_machine_init): Install ieee1275_get_time_ms()
4604 implementation.
4605 (ieee1275_get_time_ms): New function.
4606 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4607 real work.
4608
9ec92aaf 46092008-08-05 Marco Gerards <marco@gnu.org>
4610
4611 * disk/ata.c: Include <grub/pci.h>.
4612 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4613 (grub_ata_initialize): Rewritten.
4614 (grub_ata_device_initialize): New function.
4615
8d23f507 46162008-08-04 Pavel Roskin <proski@gnu.org>
4617
4618 * kern/main.c: Include grub/mm.h.
4619
5e15ee3d 46202008-08-04 Robert Millan <rmh@aybabtu.com>
4621
4622 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4623 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4624 corruption problem).
4625
a9053f8f 46262008-08-04 Robert Millan <rmh@aybabtu.com>
4627
4628 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4629 warnings introduced in my last commit.
4630
dd19c7d7 46312008-08-03 Robert Millan <rmh@aybabtu.com>
4632
4633 Make PCI available on all i386 architectures.
4634
4635 * include/grub/i386/pc/pci.h: Move from here ...
4636 * include/grub/i386/pci.h: ... to here.
4637
4638 * include/grub/i386/pc/pci.h: Remove.
4639 * include/grub/i386/efi/pci.h: Remove.
4640 * include/grub/x86_64/efi/pci.h: Remove.
4641
4642 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4643 `<grub/cpu/pci.h>'.
4644
4645 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4646 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4647 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4648
4649 * conf/i386-ieee1275.rmk: Likewise.
4650
e14a6184 46512008-08-03 Robert Millan <rmh@aybabtu.com>
4652
4653 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4654 (grub_console_setcursor): Make it possible to set cursor off.
4655
52768e37 46562008-08-03 Robert Millan <rmh@aybabtu.com>
4657
4658 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
4659 of modules instead of assuming which platform provides what.
4660 * util/update-grub.in: Likewise.
4661
2d52f57f 46622008-08-03 Robert Millan <rmh@aybabtu.com>
4663
4664 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4665 instead of `grub_install_dos_part' to determine whether a drive needs
4666 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 4667 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 4668
2a5cd121 46692008-08-02 Robert Millan <rmh@aybabtu.com>
4670
4671 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4672
93808428 46732008-08-02 Robert Millan <rmh@aybabtu.com>
4674
4675 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4676 of informational grub_dprintf() calls.
4677
3bd0a12a 46782008-08-02 Robert Millan <rmh@aybabtu.com>
4679
4680 * disk/memdisk.c (memdisk_size): Don't initialize.
4681 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4682
4683 * include/grub/i386/pc/kernel.h
4684 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4685 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4686 (grub_memdisk_image_size, grub_arch_memdisk_addr)
4687 (grub_arch_memdisk_size): Remove.
4688
4689 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4690 field (was only used to transfer a constant). Add `type' field to
4691 support multiple module types.
4692 (grub_module_iterate): New function.
4693
4694 * kern/device.c (grub_device_open): Do not hide error messages
4695 when grub_disk_open() fails. Use grub_print_error() instead.
4696
4697 * kern/i386/pc/init.c (grub_arch_modules_addr)
4698 (grub_arch_memdisk_size): Remove functions.
4699 (grub_arch_modules_addr): Return the module address in high memory
4700 (now that it isn't copied anymore).
4701
4702 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4703 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4704 decompression routine (grub_total_module_size already includes that
4705 now). Don't copy modules back to low memory.
4706
4707 * kern/main.c: Include `<grub/mm.h>'.
4708 (grub_load_modules): Split out (and use) ...
4709 (grub_module_iterate): ... this function, which iterates through
4710 module objects and runs a hook.
4711 Comment out grub_mm_init_region() call, as it would cause non-ELF
4712 modules to be overwritten.
4713
4714 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4715 the memdisk image in its own region, make it part of the module list.
4716 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4717 (main): Parse --memdisk|-m option, and pass user-provided path as
4718 parameter to generate_image().
4719 (add_segments): Pass `memdisk_path' down to load_modules().
4720 (load_modules): Embed memdisk image in module section when requested.
4721 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4722 `header.type' instead of `header.offset'.
4723
4724 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4725 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4726 (memdisk_mod_LDFLAGS): New variables.
4727 * conf/i386-coreboot.rmk: Likewise.
4728 * conf/i386-ieee1275.rmk: Likewise.
4729
a927cc73 47302008-08-02 Robert Millan <rmh@aybabtu.com>
4731
4732 * loader/i386/pc/multiboot.c (playground, forward_relocator)
4733 (backward_relocator): New variables. Used to allocate and relocate
4734 the payload, respectively.
4735 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 4736 address, install the appropriate relocator code in each bound of
a927cc73 4737 the payload, and set the entry point such that
4738 grub_multiboot_real_boot() will jump to one of them.
4739
4740 * kern/i386/loader.S (grub_multiboot_payload_size)
4741 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4742 (grub_multiboot_payload_entry_offset): New variables.
4743 (grub_multiboot_real_boot): Set cpu context to what the relocator
4744 expects, and jump to the relocator instead of the payload.
4745
4746 * include/grub/i386/loader.h (grub_multiboot_payload_size)
4747 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4748 (grub_multiboot_payload_entry_offset): Export.
4749
b15d8a0c 47502008-08-01 Bean <bean123ch@gmail.com>
4751
4752 * normal/menu_entry.c (editor_getline): Don't return the original
4753 string as result, as it will be released by lexer once it has done
4754 using it.
4755
cdfb3d22 47562008-08-01 Robert Millan <rmh@aybabtu.com>
4757
4758 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
4759 within menuentries, not before them.
4760 util/grub.d/10_hurd.in: Likewise.
4761
9175e93d 47622008-08-01 Bean <bean123ch@gmail.com>
4763
4764 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
4765 (bufio_mod_SOURCES): New macro.
4766 (bufio_mod_CFLAGS): Likewise.
4767 (bufio_mod_LDFLAGS): Likewise.
4768
4769 * include/grub/bufio.h: New file.
4770
4771 * io/bufio.c: Likewise.
4772
4773 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
4774 (grub_video_reader_png): Use grub_buffile_open to open file.
4775
4776 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
4777 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
4778
4779 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
4780 (grub_video_reader_tga): Use grub_buffile_open to open file.
4781
4782 * font/manager.c: Include <grub/bufio.h>.
4783 (add_font): Use grub_buffile_open to open file.
4784
3d8383e7 47852008-07-31 Robert Millan <rmh@aybabtu.com>
4786
4787 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
4788 ELF segments, use a macro for arbitrarily accessing any of them instead
4789 of preparing a pointer that allows access to one at a time.
4790 (grub_multiboot_load_elf64): Likewise.
4791
16e641b6 47922008-07-31 Bean <bean123ch@gmail.com>
4793
4794 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
4795 GRUB_KERNEL_MACHINE_DATA_END.
4796
59198b72 47972008-07-30 Robert Millan <rmh@aybabtu.com>
4798
4799 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
4800 Increase from 0x50 to 0x60.
4801 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
4802 use UUIDs to identify the root drive for them. If that's not
4803 possible, abort.
4804 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
4805 check, for cross-disk installs.
4806
ae88bca3 48072008-07-30 Robert Millan <rmh@aybabtu.com>
4808
4809 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
4810 is non-empty, use it to set the `prefix' environment variable instead
4811 of the usual approach.
4812 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
4813 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
4814 environment variable instead of dummy make_install_device().
4815
4816 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
4817 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 4818 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 4819
4820 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
4821 New variable reference.
4822 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
4823 New macro. Defines offset of `grub_prefix' within startup.S (relative
4824 to `start').
4825 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
4826 section within startup.S (relative to `start').
4827 * include/grub/i386/coreboot/kernel.h: Likewise.
4828
4829 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
4830 Overwrite grub_prefix with its contents, at the beginning of the
4831 first segment.
4832 (main): Understand -p|--prefix.
4833
14f41dd1 48342008-07-30 Robert Millan <rmh@aybabtu.com>
4835
4836 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
4837
4ca049a3 48382008-07-30 Robert Millan <rmh@aybabtu.com>
4839
4840 * term/i386/pc/vga_text.c (grub_console_cls): Use
4841 grub_console_gotoxy() to go back to beginning of the screen.
4842 Found by Patrick Georgi <patrick.georgi@coresystems.de>
4843
2921d337 48442008-07-29 Christian Franke <franke@computer.org>
4845
4846 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4847 Add conversion of emulated mount points on Cygwin.
4848
b609876d 48492008-07-29 Christian Franke <franke@computer.org>
4850
4851 * util/update-grub.in: Add a check for admin
4852 group on Cygwin.
4853 Remove old `grub.cfg.new' before creation.
4854 Add `-f' to `mv' to handle the different filesystem
4855 semantics of Windows.
4856
e93e4679 48572008-07-29 Bean <bean123ch@gmail.com>
4858
4859 * normal/main.c (get_line): Fix buffer overflow bug.
4860
41694fd0 48612008-07-28 Robert Millan <rmh@aybabtu.com>
4862
4863 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
4864 (struct grub_apple_header): New struct. Describes the layout of
4865 the partmap header.
4866 (apple_partition_map_iterate): Check the header magic as well as the
4867 partition magic (which was already being checked).
4868
cfd0b4e6 48692008-07-28 Pavel Roskin <proski@gnu.org>
4870
4871 * genmk.rb: Add a warning to the beginning of the output that
4872 it's a generated file and should not be edited.
4873
93cce016 48742008-07-28 Robert Millan <rmh@aybabtu.com>
4875
4876 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4877 with the same number are found, just use issue a warning with
4878 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 4879
cd1df915 48802008-07-27 Robert Millan <rmh@aybabtu.com>
4881
4882 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
4883 information.
4884
b70a8427 48852008-07-27 Bean <bean123ch@gmail.com>
4886
4887 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
4888 (grub_fat_find_dir): Ignore case when comparing filename.
4889
8f5e379f 48902008-07-27 Bean <bean123ch@gmail.com>
4891
4892 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
4893 smallino, as it's more descriptive, and i8count can be confused with
4894 the other field count.
4895 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
4896 inode type.
4897
a85cd5a0 48982008-07-27 Bean <bean123ch@gmail.com>
4899
4900 * commands/crc.c: New file.
4901
4902 * lib/crc.c: Likewise.
4903
4904 * include/grub/lib/crc.h: Likewise.
4905
4906 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
4907
4908 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
4909 (hexdump): Move this function to ...
4910
4911 * lib/hexdump.c: ... here.
4912
4913 * include/grub/hexdump.h: Renamed to ...
4914
4915 * include/grub/lib/hexdump.h: ... this.
4916
4917 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
4918
4919 * util/grub-editenv.c: Likewise.
4920
4921 * include/envblk.h: Renamed to ...
4922
4923 * include/lib/envblk.h: ... this.
4924
4925 * util/envblk.c: Renamed to ...
4926
4927 * lib/envblk.c: ... this.
4928
4929 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
4930 lib/hexdump.c.
4931 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
4932 (pkglib_MODULES): Add crc.mod.
4933 (hexdump_mod_SOURCES): Add lib/hexdump.c.
4934 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
4935 (crc_mod_SOURCES): New macro.
4936 (crc_mod_CFLAGS): Likewise.
4937 (crc_mod_LDFLAGS): Likewise.
4938
4939 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
4940
4941 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4942
4943 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4944
4945 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4946
4947 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4948
c298def0 49492008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 4950
4951 * commands/help.c: Include <grub/term.h>.
4952 (TERM_WIDTH): Removed. Updated all users.
4953
cc349fb3 49542008-07-27 Pavel Roskin <proski@gnu.org>
4955
4956 * util/getroot.c (find_root_device): Rephrase a comment to avoid
4957 spurious warnings about a comment within a comment.
4958
9051607e 49592008-07-25 Robert Millan <rmh@aybabtu.com>
4960
4961 * util/getroot.c (find_root_device): Skip devices that match
4962 /dev/dm-[0-9]. This lets the real device be found for any type of
4963 abstraction (LVM, EVMS, RAID..).
4964 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
4965 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
4966 device is found first, find_root_device() will now skip it.
4967
01453bfc 49682008-07-24 Pavel Roskin <proski@gnu.org>
4969
4970 * include/grub/types.h: Use __builtin_bswap32() and
4971 __builtin_bswap64() with gcc 4.3 and newer.
4972
6af9849f 49732008-07-24 Christian Franke <franke@computer.org>
4974
3a0fa256 4975 * util/i386/pc/grub-install.in: If `--debug' is specified,
4976 pass `--verbose' to grub-setup.
4977 Abort script if make_system_path_relative_to_its_root() fails.
4978
7810e747 49792008-07-24 Bean <bean123ch@gmail.com>
4980
4981 * configure.ac: Fixed a bug caused by the previous cygwin patch,
4982 variable `target_platform' should be `platform'.
4983
42290e17 49842008-07-24 Bean <bean123ch@gmail.com>
4985
51cc5193 4986 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 4987 (grub_png_init_fixed_block): New function.
4988 (grub_png_decode_image_data): Handle fixed huffman code compression.
4989
2a8a80e4 49902008-07-24 Bean <bean123ch@gmail.com>
4991
4992 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
4993 (grub_pe2elf_SOURCES): New macro.
4994 (CLEANFILES): Add grub-pe2elf.
4995
4996 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
4997 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
4998 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
4999 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5000 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5001 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5002 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5003 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5004 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5005 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5006 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5007 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5008 (GRUB_PE32_DT_FUNCTION): Likewise.
5009 (GRUB_PE32_REL_I386_DIR32): Likewise.
5010 (GRUB_PE32_REL_I386_REL32): Likewise.
5011 (grub_pe32_symbol): New structure.
5012 (grub_pe32_reloc): Likewise.
5013
5014 * util/grub-pe2elf.c: New file.
5015
5016 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5017 start symbol in non pc platform.
5018
5019 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5020
5021 The following patches are from Christian Franke.
5022
5023 * include/grub/dl.h: Remove .previous, gas supports this only
5024 for ELF format.
5025
5026 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5027 Remove .type, gas supports this only for ELF format.
5028
5029 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5030 nullbytes in symbol table. This fixes an infinite loop if table is
5031 zero filled.
5032
5033 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5034 TARGET_IMG_LDFLAGS and EXEEXT.
5035
5036 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5037 TARGET_IMG_LDFLAGS_AC.
5038 (grub_CHECK_STACK_ARG_PROBE): New function.
5039
5040 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5041
5042 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5043
5044 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5045 to set TARGET_IMG_LD* accordingly.
5046 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5047 Add call to grub_CHECK_STACK_ARG_PROBE.
5048 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5049
5050 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5051
5052 * genmk.rb: Add EXEEXT to CLEANFILES.
5053
12ccdb75 50542008-07-23 Robert Millan <rmh@aybabtu.com>
5055
5056 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5057 define the codes for arrows and lines used for the menu).
5058 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5059 as well.
5060
5061 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5062 fonts, because the latter are too slow.
5063
18eeaf04 50642008-07-21 Bean <bean123ch@gmail.com>
5065
5066 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5067 a20. Run keyboard test last, as it will cause macbook to halt.
5068
b095e2ad 50692008-07-18 Pavel Roskin <proski@gnu.org>
5070
5071 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5072 load foreign architecture modules correctly anyway. Keep
5073 support for loading host architecture modules, whether we
5074 compile them or not.
5075
737feb35 50762008-07-17 Pavel Roskin <proski@gnu.org>
5077
3f4ce737 5078 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5079 change target_cpu. The compiler default can mismatch target_cpu
5080 in any case.
5081
4ad2d049 5082 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5083 * kern/efi/efi.c: Likewise.
5084
f6130a12 5085 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5086 target compiler is functional.
5087 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5088 are set up.
5089
58393a2d 5090 * configure.ac: Default to efi platform for x86_64-apple. Allow
5091 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5092 adjustments from the rest, only do them if target is not
5093 explicitly given. Merge other adjustments with the final sanity
5094 check. Remove an extraneous check for supported CPU. Be
5095 specific which CPU and which platform is not supported.
5096
737feb35 5097 * configure.ac: Default to pc platform for x86_64.
5098
546f966a 50992008-07-17 Robert Millan <rmh@aybabtu.com>
5100
5101 Partial LinuxBIOS -> Coreboot rename.
5102
5103 * conf/i386-linuxbios.rmk: Renamed to ...
5104 * conf/i386-coreboot.rmk: ... this.
5105 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5106 * configure.ac: Accept "coreboot" as input platform (but maintain
5107 compatibility with "linuxbios").
5108 * include/grub/i386/linuxbios: Renamed to ...
5109 * include/grub/i386/coreboot: ... this.
5110
20011694 51112008-07-17 Bean <bean123ch@gmail.com>
5112
5113 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 5114 (appleldr_mod_SOURCE): New variable.
20011694 5115 (appleldr_mod_CFLAGS): Likewise.
5116 (appleldr_mod_LDFLAGS): Likewise.
5117 (pci_mod_SOURCES): Likewise.
5118 (pci_mod_CFLAGS): Likewise.
5119 (pci_mod_LDFLAGS): Likewise.
5120 (lspci_mod_SOURCES): Likewise.
5121 (lspci_mod_CFLAGS): Likewise.
5122 (lspci_mod_LDFLAGS): Likewise.
5123
5124 * conf/x86_64-efi.rmk: New file.
5125
5126 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5127 macro.
5128 (grub_efidisk_write): Likewise.
5129
5130 * include/efi/api.h (efi_call_0): New macro.
5131 (efi_call_1): Likewise.
5132 (efi_call_2): Likewise.
5133 (efi_call_3): Likewise.
5134 (efi_call_4): Likewise.
5135 (efi_call_5): Likewise.
5136 (efi_call_6): Likewise.
5137
5138 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5139 grub_rescue_cmd_chainloader.
5140
5141 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5142 (grub_pe32_optional_header): Change some fields based on i386 or
5143 x86_64 platform.
5144 (GRUB_PE32_PE32_MAGIC): Likewise.
5145
5146 * include/grub/efi/uga_draw.h: New file.
5147
5148 * include/grub/elf.h (STN_ABS): New constant.
5149 (R_X86_64_NONE): Relocation constant for x86_64.
5150 (R_X86_64_64): Likewise.
5151 (R_X86_64_PC32): Likewise.
5152 (R_X86_64_GOT32): Likewise.
5153 (R_X86_64_PLT32): Likewise.
5154 (R_X86_64_COPY): Likewise.
5155 (R_X86_64_GLOB_DAT): Likewise.
5156 (R_X86_64_JUMP_SLOT): Likewise.
5157 (R_X86_64_RELATIVE): Likewise.
5158 (R_X86_64_GOTPCREL): Likewise.
5159 (R_X86_64_32): Likewise.
5160 (R_X86_64_32S): Likewise.
5161 (R_X86_64_16): Likewise.
5162 (R_X86_64_PC16): Likewise.
5163 (R_X86_64_8): Likewise.
5164 (R_X86_64_PC8): Likewise.
5165
5166 * include/grub/i386/efi/pci.h: New file.
5167
5168 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5169 Change it value based on platform.
5170 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5171 (GRUB_E820_RAM): Likewise.
5172 (GRUB_E820_RESERVED): Likewise.
5173 (GRUB_E820_ACPI): Likewise.
5174 (GRUB_E820_NVS): Likewise.
5175 (GRUB_E820_EXEC_CODE): Likewise.
5176 (GRUB_E820_MAX_ENTRY): Likewise.
5177 (grub_e820_mmap): New structure.
5178 (linux_kernel_header): Change the efi field according to different
5179 kernel version, also field from linux_kernel_header.
5180
5181 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5182
5183 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5184 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5185 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5186 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5187 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5188 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5189 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5190 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5191 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5192 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5193
5194 * include/grub/x86_64/efi/kernel.h: New file.
5195
5196 * include/grub/x86_64/efi/loader.h: Likewise.
5197
5198 * include/grub/x86_64/efi/machine.h: Likewise.
5199
5200 * include/grub/x86_64/efi/pci.h: Likewise.
5201
5202 * include/grub/x86_64/efi/time.h: Likewise.
5203
5204 * include/grub/x86_64/linux.h: Likewise.
5205
5206 * include/grub/x86_64/setjmp.h: Likewise.
5207
5208 * include/grub/x86_64/time.h: Likewise.
5209
5210 * include/grub/x86_64/types.h: Likewise.
5211
5212 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5213 GRUB_TARGET_SIZEOF_VOID_P.
5214
5215 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5216 (grub_efi_locate_handle): Likewise.
5217 (grub_efi_open_protocol): Likewise.
5218 (grub_efi_set_text_mode): Likewise.
5219 (grub_efi_stall): Likewise.
5220 (grub_exit): Likewise.
5221 (grub_reboot): Likewise.
5222 (grub_halt): Likewise.
5223 (grub_efi_exit_boot_services): Likewise.
5224 (grub_get_rtc): Likewise.
5225
5226 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5227 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5228 (grub_efi_allocate_pages): Wrap efi calls.
5229 (grub_efi_free_pages): Wrap efi calls.
5230 (grub_efi_get_memory_map): Wrap efi calls.
5231
5232 * kern/x86_64/dl.c: New file.
5233
5234 * kern/x86_64/efi/callwrap.S: Likewise.
5235
5236 * kern/x86_64/efi/startup.S: Likewise.
5237
5238 * loader/efi/appleloader.c: Likewise.
5239
5240 * loader/efi/chainloader.c (cmdline): New variable.
5241 (grub_chainloader_unload): Wrap efi calls.
5242 (grub_chainloader_boot): Likewise.
5243 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5244 command line.
5245
5246 * loader/efi/chainloader_normal.c (chainloader_command):
5247 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5248 command line.
5249
5250 * loader/i386/efi/linux.c (allocate_pages): Change allocation
5251 method.
5252 (grub_e820_add_region): New function.
5253 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5254 booting.
5255 (grub_find_video_card): New function.
5256 (grub_linux_setup_video): New function.
5257 (grub_rescue_cmd_linux): Probe for video information.
5258
5259 * normal/x86_64/setjmp.S: New file.
5260
5261 * term/efi/console.c (map_char): New function.
5262 (grub_console_putchar): Map unicode char.
5263 (grub_console_checkkey): Wrap efi calls.
5264 (grub_console_getkey): Likewise.
5265 (grub_console_getwh): Likewise.
5266 (grub_console_gotoxy): Likewise.
5267 (grub_console_cls): Likewise.
5268 (grub_console_setcolorstate): Likewise.
5269 (grub_console_setcursor): Likewise.
5270
5271 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5272
59652a20 52732008-07-16 Pavel Roskin <proski@gnu.org>
5274
ef294055 5275 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5276 format strings.
5277
59652a20 5278 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5279 pointer, not an integer. This fixes a warning and prevents
5280 precision loss on 64-bit systems.
5281 (relocate_addresses): Remove unneeded cast.
5282
afc3b5d7 52832008-07-15 Pavel Roskin <proski@gnu.org>
5284
506b2b3e 5285 * kern/i386/ieee1275/init.c: Include grub/cache.h.
5286
62ead89c 5287 * term/ieee1275/ofconsole.c: Disable code unused on i386.
5288
c4cd51d7 5289 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5290 Fix comparison between signed and unsigned.
5291
0d3d8f28 5292 * include/grub/i386/ieee1275/console.h: Declare
5293 grub_console_init() and grub_console_fini().
5294
8804b286 5295 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5296 It's empty and unused.
5297
ee01cf35 5298 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5299 beginning to avoid warnings with some compilers.
5300
afc3b5d7 5301 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5302 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5303
e4e8eaa5 53042008-07-14 Pavel Roskin <proski@gnu.org>
5305
407aceb4 5306 * kern/env.c (grub_register_variable_hook): Don't copy empty
5307 string, it leaks memory. Pass "" to grub_env_set(), it should
5308 handle constant strings.
5309
e4e8eaa5 5310 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5311 * commands/cmp.c (grub_cmd_cmp): Likewise.
5312 * kern/dl.c (grub_dl_flush_cache): Likewise.
5313 (grub_dl_load_core): Likewise.
5314 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5315 (grub_elf64_load_phdrs): Likewise.
5316
d4e2dad3 53172008-07-13 Pavel Roskin <proski@gnu.org>
5318
5319 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5320 between signed and unsigned.
5321 (LzmaEnc_Finish): Fix warning about an unused parameter.
5322
aa24b516 53232008-07-13 Bean <bean123ch@gmail.com>
5324
5325 * Makefile.in (enable_lzo): New rule.
5326
5327 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5328
5329 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5330
5331 * boot/i386/pc/lnxboot.S: #include <config.h>.
5332
5333 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 5334 its value according to the compression algorithm used, lzo or lzma.
aa24b516 5335
5336 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5337 compression algorithm according to configure macro.
5338
5339 * kern/i386/pc/startup.S (codestart): Likewise.
5340
5341 * kern/i386/pc/lzma_decode.S: New file.
5342
5343 * include/grub/lib/LzFind.h: Likewise.
5344
5345 * include/grub/lib/LzHash.h: Likewise.
5346
5347 * include/grub/lib/LzmaDec.h: Likewise.
5348
5349 * include/grub/lib/LzmaEnc.h: Likewise.
5350
5351 * include/grub/lib/LzmaTypes.h: Likewise.
5352
5353 * lib/LzFind.c: Likewise.
5354
5355 * lib/LzmaDec.c: Likewise.
5356
5357 * lib/LzmaEnc.c: Likewise.
5358
4ae821ac 53592008-07-13 Bean <bean123ch@gmail.com>
5360
5361 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5362 (grub_ext4_extent_header): New structure.
5363 (grub_ext4_extent): Likewise.
5364 (grub_ext4_extent_idx): Likewise.
5365 (grub_ext4_find_leaf): New function.
5366 (grub_ext2_read_block): Handle extents.
5367
9a745147 53682008-07-12 Robert Millan <rmh@aybabtu.com>
5369
5370 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5371
d49a4cf6 53722008-07-11 Robert Millan <rmh@aybabtu.com>
5373
5374 * util/grub.d/40_custom.in: New file. Example on how to add custom
5375 entries to /etc/grub.d.
5376 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5377 40_custom (implicitly, by merging all the grub.d rules).
5378
947414b4 53792008-07-11 Pavel Roskin <proski@gnu.org>
5380
0059cf6f 5381 * commands/read.c (grub_getline): Fix invalid memory access.
5382 Don't add newline to the variable value.
5383
947414b4 5384 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5385 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5386 (serial_hw_get_port): Check validity of the port number.
5387 (grub_cmd_serial): Check return value of serial_hw_get_port().
5388
62a02d00 53892008-07-07 Pavel Roskin <proski@gnu.org>
5390
5391 * boot/i386/pc/diskboot.S (notification_string): Replace
5392 "Loading kernel" with just "loading". This is shorter, less
5393 confusing and saves a few bytes for possible future changes.
5394
3e5581b0 53952008-07-05 Pavel Roskin <proski@gnu.org>
5396
ea387a48 5397 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5398 size for ATAPI devices, they are undefined. Output sector
5399 number in decimal form.
5400
3e5581b0 5401 * disk/ata.c: Use named constants for status bits.
5402
fdecb8fd 54032008-07-04 Pavel Roskin <proski@gnu.org>
5404
bcd35b90 5405 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5406 grub_addr_t before casting it to the void pointer to fix a
5407 warning. Non-addressable regions are discarded earlier.
5408 (grub_arch_modules_addr): Cast _end to grub_addr_t.
5409 * kern/i386/linuxbios/table.c: Include grub/misc.h.
5410 (check_signature): Don't shadow table_header.
5411 (grub_linuxbios_table_iterate): Cast numeric constants to
5412 grub_linuxbios_table_header_t.
5413 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5414 grub_stop().
5415
af58ab3d 5416 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5417 prevent warnings.
5418
1759aa57 5419 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5420 pointer, which can cause warnings. Support 64-bit addresses.
5421
fdecb8fd 5422 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5423 of sizeof(long). This fixes PowerPC image generation on x86_64.
5424
8516d2a8 54252008-07-04 Robert Millan <rmh@aybabtu.com>
5426
5427 This fixes a performance issue when pc & gpt partmap iterators
5428 didn't abort iteration even after our hook found what it was
fe987087 5429 looking for (often causing expensive probes of non-existent drives).
8516d2a8 5430
5431 Some callers relied on previous buggy behaviour, since they would
34c44600 5432 raise an error when their own hooks caused early abortion of its
8516d2a8 5433 iteration.
5434
5435 * kern/device.c (grub_device_open): Improve error message.
5436 * disk/lvm.c (grub_lvm_open): Likewise.
5437 * disk/raid.c (grub_raid_open): Likewise.
5438
5439 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5440 when hook requests it, independently of grub_errno.
5441 (pc_partition_map_probe): Do not fail when find_func() caused
5442 early abortion of pc_partition_map_iterate().
5443
5444 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5445 when hook requests it, independently of grub_errno.
5446 (gpt_partition_map_probe): Do not fail when find_func() caused
5447 early abortion of gpt_partition_map_iterate().
5448
5449 * kern/partition.c (grub_partition_iterate): Abort parent iteration
5450 when hook requests it, independently of grub_errno. Do not fail when
5451 part_map_iterate_hook() caused early abortion of p->iterate().
5452
5453 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5454 when grub_partition_iterate() returned with non-zero.
5455
277d0de9 54562008-07-03 Pavel Roskin <proski@gnu.org>
5457
5458 * disk/ata.c (grub_ata_pio_write): Check status before writing,
5459 like we do in grub_ata_pio_read().
5460 (grub_ata_readwrite): Always write individual sectors. Fix the
5461 sector count for the remainder.
5462 (grub_ata_write): Enable writing to ATA devices. Correctly
5463 report error for ATAPI devices.
5464
d4c9b428 54652008-07-02 Pavel Roskin <proski@gnu.org>
5466
e43fc690 5467 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5468 warning.
5469
f707af42 5470 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5471 for every read sector, we already increment it for the whole
5472 batch. This fixes reading more than 256 sectors at once.
5473
11e16b15 5474 * util/grub-editenv.c (cmd_info): Cast argument to long
5475 explicitly. ptrdiff_t reduces to int on i386.
5476
cbabfdd4 5477 * util/grub-editenv.c (main): Be specific which parameter is
5478 missing.
5479
b8fbce0a 5480 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5481 (memdisk): Make memdisk_orig_addr a pointer.
5482
c9c8e606 5483 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5484 for file offsets, use grub_off_t instead. Fix printf format
5485 warnings.
5486
ca62e598 5487 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5488 there. Real unexpected warnings should not drown in the noise
5489 about known problems.
5490
ce8d1766 5491 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5492 grub_disk_addr_t for memory addresses.
5493
00c7a56a 5494 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5495 explicitly to fix a warning.
5496
08d3ef09 5497 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5498
cb71ba20 5499 * Makefile.in (MODULE_LDFLAGS): New variable.
5500 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
5501 the linker accepts --build-id=none.
5502 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
5503 MODULE_LDFLAGS.
5504 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5505
d4c9b428 5506 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5507 those in Linux XFS code. Provide a way to access 64-bit parent
5508 inode.
5509 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
5510 the end of struct grub_xfs_dir_header.
5511
d4156eee 55122008-07-02 Bean <bean123ch@gmail.com>
5513
5514 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5515 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5516 and GRUB_IEEE1275_FLAG_NO_ANSI.
5517
5518 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5519 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5520 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5521
5522 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5523 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5524
5525 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5526 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5527
5528 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5529 esc sequence on non ANSI terminal.
5530 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5531
5532 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5533 beginning of file.
5534
2270f77b 55352008-07-02 Bean <bean123ch@gmail.com>
5536
5537 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5538 (grub_editenv_SOURCES): New variable.
5539 (pkglib_MODULES): Add loadenv.mod.
5540 (loadenv_mod_SOURCES): New variable.
5541 (loadenv_mod_CFLAGS): Likewise.
5542 (loadenv_mod_LDFLAGS): Likewise.
5543
5544 * include/grub/envblk.h: New file.
5545
5546 * util/envblk.c: New file.
5547
5548 * util/grub-editenv.c: New file.
5549
5550 * commands/loadenv.c: New file.
5551
0e9e51ec 55522008-07-01 Pavel Roskin <proski@gnu.org>
5553
d89b7634 5554 * include/multiboot2.h (struct multiboot_tag_module): Use char,
5555 not unsigned char. This fixes warnings and is consistent with
5556 other tags.
5557
bf1835b1 5558 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5559
8222a04b 5560 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5561
6a42d99d 5562 * term/tparm.c (analyze): Always set *popcount.
5563
10b159d1 5564 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5565 cast to fix a warning.
5566
b8789f6c 5567 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5568 cast to suppress a warning.
5569
29d7e38a 5570 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5571 grub_fshelp_read_file() expects.
5572
f341f669 5573 * fs/fat.c: Fix UUID calculation on big-endian systems. We
5574 write uuid as a 32-bit value in CPU byte order, so declare and
5575 use it as such.
5576
0e9e51ec 5577 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5578 long if the format specifier expects it.
5579 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5580 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5581 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5582 long to fix a warning.
5583 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5584 grub_dprintf() arguments to fix warnings.
5585
3aefa857 55862008-06-30 Pavel Roskin <proski@gnu.org>
5587
56c7668b 5588 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5589 install_bsd_part immediately before core.img is embedded or
5590 modified on disk. This fixes core.img verification if core.img
5591 cannot be embedded.
5592
3aefa857 5593 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5594 core_path to calculate the blocklist.
5595 Patch from Javier Martín <lordhabbit@gmail.com>
5596
5444088d 55972008-06-29 Robert Millan <rmh@aybabtu.com>
5598
5599 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
5600 block to disk block.
5601 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5602 Patch from Niels Böhm <bitbucket@arcor.de>
5603
674835c8 56042008-06-29 Robert Millan <rmh@aybabtu.com>
5605
5606 * util/update-grub_lib.in (font_path): Search for fonts in
5607 /boot/grub first, which is more likely to be readable (we aren't
5608 deciding where fonts live, just looking for them).
5609
f527dbc8 56102008-06-26 Pavel Roskin <proski@gnu.org>
5611
6c2d8df6 5612 * util/biosdisk.c (read_device_map): Don't leave dead map
5613 entries for devices failing stat() check.
5614
f527dbc8 5615 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5616 core_path_dev for the core.img path on the target device.
5617
aebe3d13 56182008-06-26 Robert Millan <rmh@aybabtu.com>
5619
5620 * disk/fs_uuid.c: New file.
5621 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5622 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5623 (fs_uuid_mod_LDFLAGS): New variables.
5624 * include/grub/disk.h (grub_disk_dev_id): Add
5625 `GRUB_DISK_DEVICE_UUID_ID'.
5626 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5627 implement iterate().
5628
37aaf354 56292008-06-26 Robert Millan <rmh@aybabtu.com>
5630
5631 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5632 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5633 Linux image includes no initrd.
5634
25ff262a 56352008-06-21 Javier Martín <lordhabbit@gmail.com>
5636
5637 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5638 call to resolve the core image location that effectively appended the
5639 name twice.
5640
76a2bd44 56412008-06-21 Robert Millan <rmh@aybabtu.com>
5642
5643 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5644 call from here ...
5645
5646 * util/grub.d/10_hurd.in: ... to here ...
5647 * util/grub.d/10_linux.in: ... and here.
5648
650e1c79 56492008-06-19 Robert Millan <rmh@aybabtu.com>
5650
fe987087 5651 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 5652 after it has been set by grub_machine_set_prefix().
5653
6ce63911 56542008-06-19 Robert Millan <rmh@aybabtu.com>
5655
5656 * commands/search.c (search_label, search_fs_uuid, search_file): Print
5657 search result when not saving to variable, not the other way around.
5658 When saving to variable, abort iteration as soon as a match is found.
5659
73940cec 56602008-06-19 Robert Millan <rmh@aybabtu.com>
5661
5662 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5663 check for partition that provides /boot/grub. Its logic is flawed,
5664 as it prevents prepare_grub_to_access_device() from being called
5665 multiple times.
5666
3c62a39d 56672008-06-19 Robert Millan <rmh@aybabtu.com>
5668
5669 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5670 "insmod" command directly when abstraction modules are needed,
fe987087 5671 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 5672 since it had already been processed).
5673
47395a42 56742008-06-19 Pavel Roskin <proski@gnu.org>
5675
5676 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5677 changed. This is needed in case GRUB_LIBDIR changes.
5678 * conf/i386-ieee1275.rmk: Likewise.
5679 * conf/i386-linuxbios.rmk: Likewise.
5680 * conf/i386-pc.rmk: Likewise.
5681 * conf/powerpc-ieee1275.rmk: Likewise.
5682
a145ac2d 56832008-06-18 Pavel Roskin <proski@gnu.org>
5684
5685 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5686 kernel_elf_symlist.c to symlist.c for consistency with other
5687 architectures. Update all users.
5688 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5689
7847c51e 56902008-06-18 Robert Millan <rmh@aybabtu.com>
5691
5692 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5693 it in prefix.
5694
5695 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
5696 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
5697 a RAID device, run setup() for all members independently on whether
5698 LVM abstraction is being used.
5699 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5700 If grub-mkimage has set `*install_dos_part == -2', don't override this
5701 value.
5702 Perform *install_dos_part adjustments independently on whether
5703 we're embedding or not.
5704 Clarify error message when image is too big for embedding.
5705 Remove duplicate *install_dos_part stanza.
5706
b23e5644 57072008-06-17 Robert Millan <rmh@aybabtu.com>
5708
5709 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5710 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5711 variables.
5712 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5713 values in grub_ofconsole_normal_color and
5714 grub_ofconsole_highlight_color (they're not directly related to
5715 background and foreground).
5716 (grub_ofconsole_setcolorstate): Extract background and foreground
5717 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5718
0aac2f79 57192008-06-17 Robert Millan <rmh@aybabtu.com>
5720
5721 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5722 /boot/grub for the check in last commit, not /boot (they could be
5723 different partitions).
5724
3cca7ef3 57252008-06-16 Robert Millan <rmh@aybabtu.com>
5726
5727 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5728 asked to setup access for the same partition that provides /boot,
5729 don't bother using UUIDs since our root already has the value we
5730 want.
5731
347396d8 57322008-06-16 Robert Millan <rmh@aybabtu.com>
5733
5734 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5735 I2O devices.
5736 Patch from Sven Mueller <sven@debian.org>.
5737
991477f8 57382008-06-16 Robert Millan <rmh@aybabtu.com>
5739
5740 * util/update-grub.in: Check for $EUID instead of $UID.
5741 Reported by Vincent Zweije.
5742
d31a32a1 57432008-06-16 Bean <bean123ch@gmail.com>
5744
fe987087 5745 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 5746 (grub_ext2_read_block): Likewise.
5747 (grub_ext2_read_inode): Likewise.
5748 (grub_ext2_mount): Likewise.
5749 (grub_ext2_close): Likewise.
5750 (grub_ext3_get_journal): Removed.
5751
fe987087 5752 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 5753 (grub_reiserfs_read_symlink): Likewise.
5754 (grub_reiserfs_mount): Likewise.
5755 (grub_reiserfs_open): Likewise.
5756 (grub_reiserfs_read): Likewise.
5757 (grub_reiserfs_close): Likewise.
5758 (grub_reiserfs_get_journal): Removed.
5759
5760 * fs/fshelp.c (grub_fshelp_read): Removed.
5761 (grub_fshelp_map_block): Likewise.
5762
5763 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
5764 (grub_fshelp_journal): Likewise.
5765 (grub_fshelp_read): Likewise.
5766 (grub_fshelp_map_block): Likewise.
5767
3540a760 57682008-06-16 Pavel Roskin <proski@gnu.org>
5769
5770 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
5771 floating point anymore.
5772 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
5773
95614c84 57742008-06-15 Pavel Roskin <proski@gnu.org>
5775
5776 * commands/ls.c (grub_ls_list_files): Use integer calculations
5777 for human readable format, avoid floating point use.
5778 * kern/misc.c (grub_ftoa): Remove.
5779 (grub_vsprintf): Remove floating point support.
5780
50465dd6 57812008-06-15 Robert Millan <rmh@aybabtu.com>
5782
fe6b695a 5783 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 5784 devices.
5785 Reported by Max Vozeler.
5786
a9207284 57872008-06-15 Robert Millan <rmh@aybabtu.com>
5788
5789 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
5790 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
5791 skipped later.
5792 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
5793 the beginning of the prefix.
5794
5795 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
5796 It is assumed that if we have a memdisk, grub-mkimage has set
5797 grub_prefix to include the "(memdisk)" drive in it.
5798
a7cbd45a 57992008-06-15 Robert Millan <rmh@aybabtu.com>
5800
5801 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
5802 Initialize keyboard controller after registering the terminal, so that
5803 grub_printf() can be called from grub_keyboard_controller_init().
5804
21cf716a 58052008-06-15 Robert Millan <rmh@aybabtu.com>
5806
5807 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
5808 extent-btree which is written as big endian on disk.
5809 Reported by Alain Greppin <al@chilibi.org>.
5810
23a64d8e 58112008-06-14 Robert Millan <rmh@aybabtu.com>
5812
5813 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
5814 * util/i386/pc/grub-install.in (modules): Likewise.
5815
d687651c 58162008-06-13 Pavel Roskin <proski@gnu.org>
5817
5818 * commands/ls.c (grub_ls_list_files): Fix format warnings.
5819
dfe9ddd4 58202008-06-13 Bean <bean123ch@gmail.com>
5821
5822 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
5823
5824 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
5825
5826 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
5827 to indicate sparse block.
5828
16ae7781 58292008-06-12 Pavel Roskin <proski@gnu.org>
5830
e6d1a308 5831 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
5832 number, grub_fshelp_read() does it for us.
5833
16ae7781 5834 * fs/fshelp.c (grub_fshelp_read): New function. Implement
5835 linear disk read with journal translation.
5836 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
5837 * include/grub/fshelp.h: Declare grub_fshelp_read().
5838
40fd3a2b 58392008-06-09 Pavel Roskin <proski@gnu.org>
5840
5841 * fs/minix.c (grub_minix_mount): Handle error reading
5842 superblock.
5843
f5679726 58442008-06-08 Robert Millan <rmh@aybabtu.com>
5845
5846 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
5847 don't append the RAID prefix afterwards.
5848 Reported by Clint Adams.
5849
ce525529 58502008-06-08 Robert Millan <rmh@aybabtu.com>
5851
5852 Based on description from Pavel:
5853 * kern/disk.c (grub_disk_check_range): Rename to ...
5854 (grub_disk_adjust_range): ... this. Add a comment explaining the
5855 tasks performed by this function.
5856
ad4936a0 58572008-06-08 Robert Millan <rmh@aybabtu.com>
5858
5859 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
5860 `num_serial' (for consistency with other variables).
5861 (struct grub_ntfs_data): Add `uuid' member.
5862 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
5863 (grub_ntfs_uuid): New function.
5864 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
5865
dc20b0f9 58662008-06-07 Pavel Roskin <proski@gnu.org>
5867
5868 * util/biosdisk.c (open_device): Revert last change to the
5869 function, it broke installation. The sector needs to be
5870 different dependent on which device is opened.
5871
c5e3cfba 58722008-06-06 Robert Millan <rmh@aybabtu.com>
5873
5874 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
5875 rest of GRUB, and breakage doesn't happen if its value were modified.
5876
5877 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5878 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
5879 a constant (same value).
5880 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
5881 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
5882
26a1f8c4 58832008-06-06 Robert Millan <rmh@aybabtu.com>
5884
5885 * util/biosdisk.c (open_device): Do not modify sector offset when
5886 accessing a partition. kern/disk.c already handles this for us.
5887
25d6b327 58882008-06-06 Robert Millan <rmh@aybabtu.com>
5889
5890 * util/grub-emu.c (grub_machine_init): Move code in this function from
5891 here ...
5892 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
5893 segfault in case grub_printf() is called).
5894
5895 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
5896 grub_probe. Update all users not to explicitly add it again.
5897 (grub_device): New variable; contains corresponding device for grubdir.
5898 (fs_module, partmap_module, devabstraction_module): Pass
5899 `--device ${grub_device}' to grub_probe to avoid traversing /dev
5900 every time.
5901
9ece62fb 59022008-06-05 Robert Millan <rmh@aybabtu.com>
5903
5904 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
5905 is found, print it (same layout as with labels).
5906
1ad36d37 59072008-06-04 Robert Millan <rmh@aybabtu.com>
5908
5909 * util/biosdisk.c (get_drive): Rename to ...
5910 (find_grub_drive): ... this. Update all users.
5911
5912 (get_os_disk): Rename to ...
5913 (convert_system_partition_to_system_disk): ... this. Update all users.
5914
5915 (find_drive): Rename to ...
5916 (find_system_device): ... this. Update all users.
5917
e6a30859 59182008-06-04 Robert Millan <rmh@aybabtu.com>
5919
5920 * util/biosdisk.c (get_os_disk): Handle IDA devices.
5921 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5922 (make_device_map): Likewise.
5923
00c108a4 59242008-06-01 Robert Millan <rmh@aybabtu.com>
5925
5926 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
5927 before dereferencing it.
5928
5929 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
5930 union with fat12/fat16-specific ones. Add some new fields, including
5931 `num_serial' for both versions.
5932 (struct grub_fat_data): Add `uuid' member.
5933 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
5934 names. Initialize `data->uuid' using `num_serial'.
5935 (grub_fat_uuid): New function.
5936 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
5937
5938 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
5939 (grub_reiserfs_uuid): New function.
5940 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
5941 member.
5942
5943 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
5944 (grub_xfs_uuid): New function.
5945 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
5946
1385c5bb 59472008-06-01 Robert Millan <rmh@aybabtu.com>
5948
5949 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
5950 code that is backward compatible with pre-uuid search command.
5951
c682dfd7 59522008-05-31 Robert Millan <rmh@aybabtu.com>
5953
5954 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
5955 floppies after everything else, to ensure floppy drive isn't accessed
5956 unnecessarily (patch from Bean).
5957
b7db5d47 59582008-05-31 Robert Millan <rmh@aybabtu.com>
5959
5960 * commands/search.c (search_label, search_fs_uuid, search_file): Do
5961 not print device names when we were asked to set a variable.
5962
6e037aa9 59632008-05-31 Robert Millan <rmh@aybabtu.com>
5964
5965 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
5966 using "cursor-on" and "cursor-off" commands (understood at least by
5967 the Open Firmware flavour on OLPC).
5968
41305bc8 59692008-05-31 Michael Gorven <michael@gorven.za.net>
5970
5971 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
5972 on and off sequences.
5973
69ba137e 59742008-05-31 Robert Millan <rmh@aybabtu.com>
5975
5976 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
5977 * util/update-grub.in: Likewise.
5978
520ae21b 59792008-05-30 Pavel Roskin <proski@gnu.org>
5980
5981 * util/biosdisk.c (linux_find_partition): Simplify logic and
5982 make the code more universal. Keep special processing for
5983 devfs, but use a simple rule for all other devices. If the
5984 device ends with a number, append 'p' and the partition number.
5985 Otherwise, append only the partition number.
5986
5786569b 59872008-05-30 Robert Millan <rmh@aybabtu.com>
5988
5989 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
5990 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
5991 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
5992 the `root' parameter to Linux.
5993
51500452 59942008-05-30 Robert Millan <rmh@aybabtu.com>
5995
5996 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
5997 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
5998 --fs_uuid with --fs-uuid.
5999 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6000 all filesystems support them).
6001
811d3878 60022008-05-30 Robert Millan <rmh@aybabtu.com>
6003
6004 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 6005 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 6006
cab63c95 60072008-05-30 Robert Millan <rmh@aybabtu.com>
6008
6009 * util/grub.d/00_header.in: Remove obsolete comment referencing
6010 convert_system_path_to_grub_path().
6011 * util/update-grub.in: Likewise.
6012 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6013 (convert_system_path_to_grub_path): Add a warning message explaining
6014 that this function is deprecated. Rely on is_path_readable_by_grub()
6015 for the readability checks.
6016 (font_path): Use is_path_readable_by_grub() for the readability
6017 check rather than convert_system_path_to_grub_path().
6018
972e2f7a 60192008-05-30 Robert Millan <rmh@aybabtu.com>
6020
6021 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6022 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6023 converting it first.
6024 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6025 grub.cfg for access to font file, and afterwards call it again to set
6026 the root device.
6027
62191274 60282008-05-30 Robert Millan <rmh@aybabtu.com>
6029
6030 * commands/search.c (options): Add --fs_uuid option.
6031 (search_fs_uuid): New function.
6032 (grub_cmd_search): Fix --set argument passing.
6033 Use search_fs_uuid() when requested via --fs_uuid.
6034 (grub_search_init): Update help message.
6035 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6036 and redeclare it as an array of 16-bit words.
6037 (grub_ext2_uuid): New function.
6038 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6039 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6040 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6041 (GRUB_DEVICE_BOOT_UUID): New variables.
6042 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6043 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6044 whenever possible.
6045 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6046 just assume `root' variable has the right value.
6047 * util/grub.d/10_linux.in: Likewise.
6048 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6049 via PRINT_FS_UUID.
6050 (main): Recognise `-t fs_uuid' argument.
6051
01b73ec8 60522008-05-30 Robert Millan <rmh@aybabtu.com>
6053
6054 * util/biosdisk.c (map): Redefine structure to hold information
6055 about GRUB drive name.
fe6b695a 6056 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 6057 drive names.
6058 (call_hook): Remove.
6059 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6060 member. Assume drive has partitions.
6061 (grub_util_biosdisk_open): Access device names via `.device' struct
6062 member.
6063 (open_device): Likewise.
6064 (find_drive): Likewise.
6065 (read_device_map): Adjust map[] usage to match the new struct
6066 definition. Don't check for duplicates (still possible, but not cheap
6067 anymore).
6068 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6069 (make_device_name): Remove assumption of BIOS-like drive names.
6070
22f16596 60712008-05-30 Pavel Roskin <proski@gnu.org>
6072
6073 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6074 compiling execute.c doesn't need grub_script.tab.h anymore.
6075 (normal/command.c_DEPENDENCIES): Likewise.
6076 (normal/function.c_DEPENDENCIES): Likewise.
6077 * conf/i386-ieee1275.rmk: Likewise.
6078 * conf/i386-linuxbios.rmk: Likewise.
6079 * conf/i386-pc.rmk: Likewise.
6080 * conf/powerpc-ieee1275.rmk: Likewise.
6081 * conf/sparc64-ieee1275.rmk: Likewise.
6082
528ad8f2 60832008-05-29 Pavel Roskin <proski@gnu.org>
6084
d1dff95d 6085 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6086 when scanning metadata for volume group name.
6087
528ad8f2 6088 * include/grub/script.h: Don't include grub_script.tab.h. It's
6089 a generated file, which may only be included from the files with
6090 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6091 use union YYSTYPE, as the later allows forward declaration.
6092 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6093
47248e08 60942008-05-29 Robert Millan <rmh@aybabtu.com>
6095
6096 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6097 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6098 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6099 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6100 scan codes.
6101
ee632529 61022008-05-29 Robert Millan <rmh@aybabtu.com>
6103
6104 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6105 control key combinations.
6106
eee96e08 61072008-05-29 Robert Millan <rmh@aybabtu.com>
6108
6109 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6110 * util/ieee1275/grub-install.in: ... to here.
6111 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6112 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6113 (grub_install_SOURCES): Likewise.
6114
da9a6a94 61152008-05-29 Robert Millan <rmh@aybabtu.com>
6116
6117 * fs/affs.c: Update copyright year.
6118 * fs/ext2.c: Likewise.
6119 * fs/fshelp.c: Likewise.
6120 * fs/hfsplus.c: Likewise.
6121 * fs/ntfs.c: Likewise.
6122 * fs/xfs.c: Likewise.
6123 * include/grub/fshelp.h: Likewise.
6124 * util/grub-mkdevicemap.c: Likewise.
6125
12e65f3a 61262008-05-28 Robert Millan <rmh@aybabtu.com>
6127
6128 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6129 might need to be fatfs to support some firmware implementations
6130 (e.g. OFW or EFI).
6131
23023641 61322008-05-28 Robert Millan <rmh@aybabtu.com>
6133
6134 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6135 devices.
6136 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6137 (make_device_map): Likewise.
6138
887d2619 61392008-05-20 Bean <bean123ch@gmail.com>
6140
6141 * fs/fshelp.c (grub_fshelp_map_block): New function.
6142 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6143 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6144
6145 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6146 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6147 (grub_fshelp_journal): New structure.
6148 (grub_fshelp_map_block): New function prototype.
6149 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6150 (grub_fshelp_map_block): Likewise.
6151
6152 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6153 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6154 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6155 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6156 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6157 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6158 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6159 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6160 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6161 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6162 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6163 (grub_ext2_sblock): New members for journal support.
6164 (grub_ext3_journal_header): New structure.
6165 (grub_ext3_journal_revoke_header): Likewise.
6166 (grub_ext3_journal_block_tag): Likewise.
6167 (grub_ext3_journal_sblock): Likewise.
6168 (grub_fshelp_node): New members logfile and journal.
6169 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6170 grub_fshelp_map_block to get real block number.
6171 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6172 number.
6173 (grub_ext2_read_inode): Likewise.
6174 (grub_ext3_get_journal): New function.
6175 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6176 (grub_ext2_close): Release memory used by journal.
6177
6178 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6179 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6180 (grub_reiserfs_transaction_header): Renamed to
6181 grub_reiserfs_description_block, replace field data with real_blocks.
6182 (grub_reiserfs_commit_block): New structure.
6183 (grub_reiserfs_data): New member journal.
6184 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6185 number.
6186 (grub_reiserfs_read_symlink): Likewise.
6187 (grub_reiserfs_iterate_dir): Likewise.
6188 (grub_reiserfs_open): Likewise.
6189 (grub_reiserfs_read): Likewise.
6190 (grub_reiserfs_get_journal): New function.
6191 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6192 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6193 using grub_reiserfs_get_journal.
6194 (grub_reiserfs_close): Release memory used by journal.
6195
6196 * fs/affs.c (grub_affs_read_block): Change block type to
6197 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6198
6199 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6200
6201 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6202
6203 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6204
6205 * fs/udf.c (grub_udf_read_block): Change block type to
6206 grub_disk_addr_t. Use type cast to avoid warning.
6207
6208 * fs/xfs.c (grub_xfs_read_block): Likewise.
6209
b7c6bed5 62102008-05-16 Christian Franke <franke@computer.org>
6211
6212 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6213 to ensure that break with ESC will always work.
6214 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6215 Remove ESC from keyboard queue.
6216
eedf167f 62172008-05-16 Christian Franke <franke@computer.org>
6218
6219 * util/biosdisk.c: [__CYGWIN__] Add includes.
6220 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6221 (get_os_disk): Move variable declarations to OS specific
6222 parts to avoid warning.
6223 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6224 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6225 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6226 Cygwin.
6227 * util/getroot.c: [__CYGWIN__] Add includes.
6228 (strip_extra_slashes): Fix "/" case.
6229 [__CYGWIN__] (get_win32_path): New function.
6230 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6231 [__CYGWIN__] (find_root_device): Disable.
6232 [__CYGWIN__] (get_bootsec_serial): New function.
6233 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6234 [__linux__] (grub_guess_root_device): Add early returns to simplify
6235 structure.
6236 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6237 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6238 check for Linux only.
6239
a079699e 62402008-05-15 Bean <bean123ch@gmail.com>
6241
6242 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6243 keyboard hang problem in apple's intel mac.
6244
1cf4059a 62452008-05-09 Robert Millan <rmh@aybabtu.com>
6246
6247 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6248 devices.
6249 * util/grub-mkdevicemap.c (get_virtio_disk_name)
6250 (make_device_map): Likewise.
6251 Reported by Aurelien Jarno <aurel32@debian.org>
6252
ed759390 62532008-05-07 Ian Campbell <ijc@hellion.org.uk>
6254
6255 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6256 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6257 (make_device_map): Output entries for xvd type disks.
6258
b56c4eaa 62592008-05-07 Robert Millan <rmh@aybabtu.com>
6260
6261 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6262 devices.
6263 * util/grub-mkdevicemap.c (get_cciss_disk_name)
6264 (make_device_map): Likewise.
6265 Reported by Roland Dreier <rdreier@cisco.com>
6266
7f8866ed 62672008-05-07 Robert Millan <rmh@aybabtu.com>
6268
6269 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6270 grub_strstr() call. Correct a few mistakes in failure path handling.
6271
b0346e0f 62722008-05-06 Robert Millan <rmh@aybabtu.com>
6273
6274 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6275 Do not print a trailing slash (therefore, the root directory is an
6276 empty string).
6277 (convert_system_path_to_grub_path): Do not remove trailing slash
6278 from make_system_path_relative_to_its_root() output.
6279
6280 * util/i386/pc/grub-install.in: Add trailing slash to output from
6281 make_system_path_relative_to_its_root().
6282
6cf12cbd 62832008-05-06 Robert Millan <rmh@aybabtu.com>
6284
6285 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
6286 ensures that output lines aren't intermangled with those sent to
6287 stderr (via grub_util_info()).
6288 * util/grub-probe.c (grub_refresh): Likewise.
6289 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6290
0fbb3117 62912008-05-05 Christian Franke <franke@computer.org>
6292
6293 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6294 Add Cygwin device names.
6295 (get_ide_disk_name) [__CYGWIN__]: Likewise.
6296 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6297 (check_device): Return error instead of success on empty name.
6298 (make_device_map): Move label inside linux specific code to
6299 prevent compiler warning.
6300
8124cdb7 63012008-04-30 Robert Millan <rmh@aybabtu.com>
6302
6303 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6304 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6305 first boot option.
6306 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6307
094c01d0 63082008-04-29 Robert Millan <rmh@aybabtu.com>
6309
6310 * docs/grub.cfg: New file (example GRUB configuration).
6311
f4b1fc02 63122008-04-26 Robert Millan <rmh@aybabtu.com>
6313
329ce2a5 6314 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
6315 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6316 and `disk/ieee1275/nand.c'.
f4b1fc02 6317
25f16ec1 63182008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 6319
25f16ec1 6320 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6321 i386-linuxbios.
6322
6323 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6324 change the buffer size to 4096 for cdrom device.
6325
6326 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6327 and nand.mod.
6328 (_linux_mod_SOURCES): New variable.
6329 (_linux_mod_CFLAGS): Likewise.
6330 (_linux_mod_LDFLAGS): Likewise.
6331 (linux_mod_SOURCES): Likewise.
6332 (linux_mod_CFLAGS): Likewise.
6333 (linux_mod_LDFLAGS): Likewise.
6334 (nand_mod_SOURCES): Likewise.
6335 (nand_mod_CFLAGS): Likewise.
6336 (nand_mod_LDFLAGS): Likewise.
6337
6338 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6339 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6340 type property. (nand device in olpc don't have this property)
6341
6342 * include/grub/disk.h (grub_disk_dev_id): New macro
6343 GRUB_DISK_DEVICE_NAND_ID.
6344
6345 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6346 function prototype.
6347 (grub_rescue_cmd_initrd): Likewise.
6348
6349 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6350 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6351 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 6352
25f16ec1 6353 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6354 GRUB_MACHINE_IEEE1275 is defined.
6355
6356 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6357 Use NESTED_FUNC_ATTR attribute on the hook parameter.
6358
6359 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6360 on nested function heap_init.
6361 (grub_upper_mem): New variable for i386-ieee1275.
6362 (grub_get_extended_memory): New function for i386-ieee1275.
6363 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6364
6365 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6366 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6367 property.
f19dbdb7 6368
25f16ec1 6369 * loader/i386/ieee1275/linux.c: New file.
6370
6371 * loader/i386/ieee1275/linux_normal.c: New file.
6372
6373 * disk/ieee1275/nand.c: New file.
6374
e89d61e9 63752008-04-18 Thomas Schwinge <tschwinge@gnu.org>
6376
6377 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6378 value.
6379 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6380
602566f6 63812008-04-18 Robert Millan <rmh@aybabtu.com>
6382
6383 Restructures early code path on ieee1275 to unify grub_main() as
6384 the first C function that is executed in every platform.
6385
6386 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6387 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6388 cmain().
6389 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6390 * kern/ieee1275/cmain.c (cmain): Rename to ...
6391 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6392 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6393 at the beginning.
6394
57490c2b 63952008-04-18 Robert Millan <rmh@aybabtu.com>
6396
6397 * util/update-grub.in: Fix syntax error when setting
6398 `GRUB_PRELOAD_MODULES'.
6399 Reported by Stephane Chazelas <stephane@artesyncp.com>
6400
1977517d 64012008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
6402
6403 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6404 section into account, newer toolchains generate unique build ids
6405 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 6406 we want build ids to be preserved
1977517d 6407 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6408 far from other sections don't cause the raw binary images grow
6409 size
6410
bfb1f1a2 64112008-04-15 Robert Millan <rmh@aybabtu.com>
6412
6413 * disk/lvm.c: Update copyright year.
6414 * kern/misc.c: Likewise.
6415
01979850 64162008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6417
6418 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 6419 there is no memory left for physical volume name.
01979850 6420
0a1150e2 64212008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6422
6423 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6424 volume name mapping to support bigger than 9 character names properly.
6425
82ead3fe 64262008-04-13 Robert Millan <rmh@aybabtu.com>
6427
6428 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6429 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6430
e54a72f5 64312008-04-13 Christian Franke <franke@computer.org>
6432
6433 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6434 to create a floppy emulation boot CD when non emulation mode
6435 does not work.
6436 Enable Joliet CD filesystem extension.
6437
9fe86034 64382008-04-13 Robert Millan <rmh@aybabtu.com>
6439
6440 * kern/misc.c (grub_strncat): Fix off-by-one error.
6441 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6442
6443 * kern/env.c (grub_env_context_close): Clear current context, not
6444 previous one.
6445 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6446
6447 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6448
7ceeee39 64492008-04-13 Robert Millan <rmh@aybabtu.com>
6450
6451 Improve robustness when handling LVM.
6452
6453 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 6454 (and leave `*p' unmodified).
7ceeee39 6455 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6456 through it.
6457 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6458 iterating through it.
6459 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6460 through it.
fe6b695a 6461 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 6462 when due) on each grub_lvm_getvalue() or grub_strstr() call.
6463 Don't assume `vg->pvs != NULL' when iterating through it.
6464
58cd3d85 64652008-04-13 Robert Millan <rmh@aybabtu.com>
6466
6467 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6468 * genmk.rb (partmap): New variable.
6469 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6470 (#{partmap}): New target rule.
6471 * genpartmaplist.sh: New file.
6472 * Makefile.in (pkglib_DATA): Add partmap.lst.
6473 (partmap.lst): New target rule.
6474 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6475 modules (including all partition maps), instead of preloading them.
6476
78b51059 64772007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
6478
6479 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6480 `linux-boot-prober' (if installed) to detect other operating
6481 systems which are installed on the computer and add them to
6482 the boot menu.
6483 * conf/common.rmk: Build and install 30_os-prober.
6484
a91627b4 64852008-04-12 Robert Millan <rmh@aybabtu.com>
6486
6487 * kern/powerpc/ieee1275/init.c: Move from here ...
6488 * kern/ieee1275/init.c: ... to here. Update all users.
6489
6490 * kern/powerpc/ieee1275/cmain.c: Move from here ...
6491 * kern/ieee1275/cmain.c: ... to here. Update all users.
6492
6493 * kern/powerpc/ieee1275/openfw.c: Move from here ...
6494 * kern/ieee1275/openfw.c: ... to here. Update all users.
6495
6496 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6497 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
6498
322562ea 64992008-04-10 Pavel Roskin <proski@gnu.org>
6500
6501 * configure.ac: Always use "_cv_" in cache variables for
6502 compatibility with Autoconf 2.62.
6503
a02a73c5 65042008-04-07 Robert Millan <rmh@aybabtu.com>
6505
6506 Revert grub/machine/init.h addition by Pavel (since it breaks on
6507 i386-ieee1275 and others):
6508 * util/i386/pc/misc.c: Remove grub/machine/init.h.
6509 * util/powerpc/ieee1275/misc.c: Likewise.
6510
25c024b1 65112008-04-07 Robert Millan <rmh@aybabtu.com>
6512
6513 * util/grub-probe.c (probe): Improve error message.
6514
3cbd2f98 65152008-04-07 Robert Millan <rmh@aybabtu.com>
6516
6517 * util/biosdisk.c (read_device_map): Skip devices that don't exist
6518 (this prevents the presence of a bogus entry from ruining the whole
6519 thing).
6520
87a297bf 65212008-04-06 Pavel Roskin <proski@gnu.org>
6522
36747a62 6523 * util/biosdisk.c: Include grub/util/biosdisk.h.
6524 * util/grub-fstest.c (execute_command): Make static.
6525 * util/grub-mkdevicemap.c (check_device): Likewise.
6526 * util/i386/pc/misc.c: Include grub/machine/init.h.
6527 * util/powerpc/ieee1275/misc.c: Likewise.
6528 * util/lvm.c: Include grub/util/lvm.h.
6529 * util/misc.c: Include grub/kernel.h, grub/misc.h and
6530 grub/cache.h.
6531 * util/raid.c: Include grub/util/raid.h.
6532 (grub_util_getdiskname): Make static.
6533
87a297bf 6534 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6535 grub_hostfs_fini(), as they are called from grub_init_all() and
6536 grub_fini_all() respectively. This fixes an infinite loop in
6537 grub-fstest due to double registration of hostfs.
6538 Reported by Christian Franke <Christian.Franke@t-online.de>
6539
f6ce7629 65402008-04-05 Pavel Roskin <proski@gnu.org>
6541
6542 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6543 all 8 functions. Otherwise, probe function 0 only.
6544
070e49e4 65452008-04-04 Pavel Roskin <proski@gnu.org>
6546
8b088a4c 6547 * commands/lspci.c (grub_lspci_iter): Print the bus number
6548 correctly.
6549
4f657021 6550 * commands/lspci.c (grub_pci_classes): Fix typos.
6551 (grub_lspci_iter): Don't print func twice. Print vendor ID
6552 before device ID, as it's normally done.
6553
070e49e4 6554 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6555 Fix signedness warnings.
6556 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6557 Likewise.
6558 * util/ieee1275/get_disk_name.c: Include config.h so that
6559 _GNU_SOURCE is defined and getline() is declared. Mark an
6560 unused argument as such. Fix a signedness warning.
6561
ba7328dc 65622008-04-02 Pavel Roskin <proski@gnu.org>
6563
26887f22 6564 * genkernsyms.sh.in: Use more robust assignments for CC and
6565 srcdir. Quote srcdir.
6566 * gensymlist.sh.in: Likewise. Assert at the compile time that
6567 the symbol table is not empty.
6568
ba7328dc 6569 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6570 * fs/cpio.c (grub_cpio_read): Likewise.
6571
0f582c6b 65722008-04-01 Pavel Roskin <proski@gnu.org>
6573
4b6e1995 6574 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6575 * disk/host.c (grub_host_open): Likewise.
6576 * disk/loopback.c (grub_loopback_open): Likewise.
6577 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6578 disk->id as in disk/host.c, not a multi-character constant.
6579
828a2768 6580 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
6581 later is obsolete, potentially dangerous and sets a bad example.
6582 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6583 * util/misc.c (grub_util_get_image_size): Likewise.
6584
2bb4fb47 6585 * disk/loopback.c (options): Improve help for "--partitions".
6586
0f582c6b 6587 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6588 options to align them with the short options, e.g. "echo -e".
6589
a33224e0 65902008-03-31 Bean <bean123ch@gmail.com>
6591
6592 * video/reader/png.c (grub_png_data): New member is_16bit and
6593 image_data.
6594 (grub_png_decode_image_header): Detect 16 bit png image.
6595 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6596 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6597 (grub_video_reader_png): Release memory occupied by image_data.
6598
6599 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6600 4096 bytes.
6601 (grub_nfs_mount): Skip the test for sector per cluster.
6602
6603 * include/grub/ntfs.h (MAX_SPC): Removed.
6604
86cb4f54 66052008-03-31 Bean <bean123ch@gmail.com>
6606
6607 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6608 (grub_probe_SOURCES): Add fs/afs.c.
6609 (grub_fstest_SOURCES): Likewise.
6610 (afs_mod_SOURCES): New variable.
6611 (afs_mod_CFLAGS): Likewise.
6612 (afs_mod_LDFLAGS): Likewise.
6613
6614 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6615 (grub_emu_SOURCES): Likewise.
6616
6617 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6618
6619 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6620
6621 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6622
6623 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6624
6625 * fs/afs.c: New file.
6626
17c74c21 66272008-03-30 Pavel Roskin <proski@gnu.org>
6628
4cb68e89 6629 * disk/host.c: Include grub/misc.h to fix a warning.
6630 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6631 warnings about implicit declarations.
6632
8790bb04 6633 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6634 variable.
6635 * include/grub/i386/loader.h: Change declaration of
6636 grub_linux_boot() to match what grub_loader_set() expects.
6637 * util/getroot.c (grub_guess_root_device): Return const char* to
6638 fix a warning.
6639 * util/grub-probe.c (probe): Fix a warning about uninitialized
6640 abstraction_name variable.
6641 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6642 second argument as unused to fix a warning.
6643
9a3f3296 6644 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6645 missing grub_error() call.
6646
0ecef90d 6647 * util/update-grub_lib.in: Define datarootdir, since Autoconf
6648 2.60 and newer uses it to define datadir.
6649
0bf6d401 6650 * commands/sleep.c: Fix warning about implicit declaration.
6651 * disk/memdisk.c: Likewise.
6652 * loader/aout.c: Likewise.
6653 * loader/i386/bsd_normal.c: Likewise.
6654 * util/grub-probe.c: Likewise.
6655
7cdacf97 6656 * commands/i386/cpuid.c (has_longmode): Make static.
6657 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6658 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6659
17c74c21 6660 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6661 GDT. This is more robust, as %ds can change.
6662 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6663 calling real_to_prot().
6664 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6665
80a3e68b 66662008-03-28 Pavel Roskin <proski@gnu.org>
6667
6668 * kern/i386/pc/startup.S: Assert that uncompressed functions
6669 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6670 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6671 code, as they push parts of the code (error handlers) beyond
6672 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
6673 code as correctness and size.
6674
77bcd272 66752008-03-28 Pavel Roskin <proski@gnu.org>
6676
6677 * kern/i386/pc/startup.S
6678 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6679 data block address to the real mode, keep offset minimal. This
6680 works around a bug in AWARD BIOS on old Athlon systems, which
6681 makes CD detection hang.
6682
c5dfd43b 66832008-03-26 Pavel Roskin <proski@gnu.org>
6684
6685 * normal/color.c (grub_parse_color_name_pair): Make `name' a
6686 const.
6687 * include/grub/normal.h: Add grub_parse_color_name_pair()
6688 declaration.
6689
bf962df2 66902008-03-24 Bean <bean123ch@gmail.com>
6691
6692 * disk/i386/pc/biosdisk.c (cd_start): Removed.
6693 (cd_count): Removed.
6694 (cd_drive): New variable.
6695 (grub_biosdisk_get_drive): Don't check for (cdN) device.
6696 (grub_biosdisk_call_hook): Likewise.
6697 (grub_biosdisk_iterate): Change cdrom detection method.
6698 (grub_biosdisk_open): Replace cd_start with cd_drive.
6699 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6700 detect cdrom device.
6701
6702 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6703 Removed.
6704 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6705 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6706 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6707 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6708 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6709 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6710 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6711 (grub_biosdisk_cdrp): New structure.
6712 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6713
6714 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6715
6716 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6717 device.
6718
6719 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6720 New function.
6721
68e7fc7a 67222008-03-20 Robert Millan <rmh@aybabtu.com>
6723
6724 Remove 2 TiB limit in ata.mod.
6725 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6726 (grub_ata_dumpinfo): Print sector count with 0x%llx.
6727 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6728 grub_uint64_t instead of grub_uint32_t.
6729
38ad2cf5 67302008-03-05 Bean <bean123ch@gmail.com>
6731
6732 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6733 (grub_multiboot): Set boot device.
6734
6735 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6736
2b89344e 67372008-03-02 Bean <bean123ch@gmail.com>
6738
6739 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6740 symlink_buffer.
6741
87a95d1f 67422008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
6743
6744 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
6745 texinfo.tex.
6746
6747 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
6748 modified.
6749
6750 * docs/fdl.texi: New file.
f19dbdb7 6751
87a95d1f 6752 * docs/mdate-sh: New file. Copied from gnulib.
6753 * docs/texinfo.tex: Likewise.
6754
6755 * config.guess: Updated from gnulib.
6756 * install-sh: Likewise.
6757
7dc15d8e 67582008-02-28 Robert Millan <rmh@aybabtu.com>
6759
6760 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
6761 (aout_mod_SOURCES): New variable.
6762 (aout_mod_CFLAGS): Likewise.
6763 (aout_mod_LDFLAGS): Likewise.
6764
6765 * conf/i386-ieee1275.rmk: Likewise.
6766
b00ab696 67672008-02-28 Robert Millan <rmh@aybabtu.com>
6768
6769 * util/update-grub.in: Reorganise terminal validity check. Accept
6770 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
6771 Based on suggestion by Franklin PIAT.
6772
79ca2d78 67732008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
6774
6775 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
6776 function.
6777 * util/getroot.c (grub_util_check_block_device): New function that
6778 returns the given argument if it is a block device and returns NULL else.
6779 * util/grub-probe.c (argument_is_device): New variable.
6780 (probe): Promote device_name from a variable to an argument. Receive
6781 device_name from grub_util_check_block_device() if path is NULL and from
6782 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 6783 (options): Introduce new parameter '-d, --device'.
79ca2d78 6784 (main): Add description of the new parameter to the help screen.
6785 Rename path variable to argument. Set argument_is_device if the '-d'
6786 option is given. Pass argument to probe() depending on
6787 argument_is_device.
6788
0d16e571 67892008-02-24 Bean <bean123ch@gmail.com>
6790
6791 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
6792 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
6793 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
6794 (GRUB_ISO9660_VOLDESC_PART): Likewise.
6795 (GRUB_ISO9660_VOLDESC_END): Likewise.
6796 (grub_iso9660_primary_voldesc): New member escape.
6797 (grub_iso9660_data): New member joliet.
6798 (grub_iso9660_convert_string): New function.
6799 (grub_iso9660_mount): Detect joliet extension.
6800 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
6801 (grub_iso9660_iso9660_label): Likewise.
6802
6803 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
6804 (grub_setup_SOURCES): Add fs/udf.c.
6805 (grub_fstest_SOURCES): Likewise.
6806 (udf_mod_SOURCES): New variable.
6807 (udf_mod_CFLAGS): Likewise.
6808 (udf_mod_LDFLAGS): Likewise.
6809
6810 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
6811 (grub_emu_SOURCES): Likewise.
6812
6813 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6814
6815 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6816
6817 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6818
6819 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6820
6821 * fs/udf.c: New file.
6822
8a594a17 68232008-02-24 Robert Millan <rmh@aybabtu.com>
6824
6825 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
6826 (normal/lexer.c_DEPENDENCIES): New variables.
6827 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6828 (normal/lexer.c_DEPENDENCIES): Likewise.
6829 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
6830 (normal/lexer.c_DEPENDENCIES): Likewise.
6831 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
6832 (normal/lexer.c_DEPENDENCIES): Likewise.
6833 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6834 (normal/lexer.c_DEPENDENCIES): Likewise.
6835 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6836 (normal/lexer.c_DEPENDENCIES): Likewise.
6837
2dc33c03 68382008-02-23 Robert Millan <rmh@aybabtu.com>
6839
6840 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
6841 since they were intended to be in hex. This didn't break previously
6842 because of a bug in gpt_partition_map_iterate() (see below).
6843
6844 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
6845 when checking the validity of GPT header.
6846 Remove `partno', since it always provides the same information as `i'.
6847
f6f4cfb0 68482008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
6849
6850 * include/grub/efi/time.h: Fix a wrong comment.
6851
79ff665f 68522008-02-19 Pavel Roskin <proski@gnu.org>
6853
6854 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
6855 message.
6856
d38e24c2 68572008-02-19 Bean <bean123ch@gmail.com>
6858
6859 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
6860 (aout_mod_SOURCES): New variable.
6861 (aout_mod_CFLAGS): Likewise.
6862 (aout_mod_LDFLAGS): Likewise.
6863 (_bsd_mod_SOURCES): New variable.
6864 (_bsd_mod_CFLAGS): Likewise.
6865 (_bsd_mod_LDFLAGS): Likewise.
6866 (bsd_mod_SOURCES): New variable.
6867 (bsd_mod_CFLAGS): Likewise.
6868 (bsd_mod_LDFLAGS): Likewise.
6869
6870 * include/grub/aout.h: New file.
6871
6872 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
6873
6874 * include/grub/i386/bsd.h: New file.
6875
6876 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
6877 to make it public.
6878
6879 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
6880 function is called, so that it's possible to change it inside the hook.
6881 (grub_elf64_load): Likewise.
6882 (grub_elf_file): Don't close the file if elf header is not found.
6883 (grub_elf_close): Close the file if grub_elf_file fails (The new
6884 grub_elf_file won't close it).
6885 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
6886 (grub_elf64_size): Likewise.
6887
6888 * kern/i386/loader.S (grub_unix_real_boot): New function.
6889
6890 * loader/aout.c: New file.
6891
6892 * loader/i386/bsd.c: New file.
6893
6894 * loader/i386/bsd_normal.c: New file.
6895
6896 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
6897
6898 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 6899 can test other formats.
d38e24c2 6900
b93bdb0f 69012008-02-19 Robert Millan <rmh@aybabtu.com>
6902
6903 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
6904 (grub_gpt_partition_type_empty): Redefine with macro from
6905 `<grub/gpt_partition.h>'.
6906 (gpt_partition_map_iterate): Adjust partition type comparison.
6907
6908 Export `entry' as partmap-specific `part.data' struct.
6909 (grub_gpt_header, grub_gpt_partentry): Move from here ...
6910
6911 * include/grub/gpt_partition.h (grub_gpt_header)
6912 (grub_gpt_partentry): ... to here (new file).
6913
6914 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
6915
6916 (grub_gpt_partition_type_bios_boot): New const variable, defined
6917 with macro from `<grub/gpt_partition.h>'.
6918
6919 (setup): Replace `first_start' with `embed_region', which keeps
6920 track of the embed region (and is partmap-agnostic).
6921
6922 Replace find_first_partition_start() with find_usable_region(),
6923 which finds a usable region for embedding using partmap-specific
6924 knowledge (supports PC/MSDOS and GPT).
6925
6926 Fix all assumptions that the embed region start at sector 1, using
6927 `embed_region.start' from now on. Similarly, use `embed_region.end'
6928 rather than `first_start' to calculate available size.
6929
6930 In grub_util_info() message, replace "into after the MBR" with an
6931 indication of the specific sector our embed region starts at.
6932
66cb40f6 69332008-02-19 Robert Millan <rmh@aybabtu.com>
6934
6935 * DISTLIST: Replace `commands/ieee1275/halt.c' and
6936 `commands/ieee1275/reboot.c' with `commands/halt.c' and
6937 `commands/reboot.c'.
6938 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6939 (halt_mod_SOURCES): Likewise.
6940 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6941 (halt_mod_SOURCES): Likewise.
6942
b7202015 69432008-02-17 Christian Franke <franke@computer.org>
6944
6945 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
6946
32b0fc49 69472008-02-17 Robert Millan <rmh@aybabtu.com>
6948
6949 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6950 set `first_start' to 0 for non-PC/MSDOS partition maps.
6951
aca63502 69522008-02-16 Robert Millan <rmh@aybabtu.com>
6953
6954 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6955 do not assume partition map is PC/MSDOS before performing checks that
6956 are specific to that layout.
6957
0de8be86 69582008-02-13 Robert Millan <rmh@aybabtu.com>
6959
6960 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
6961 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
6962 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
6963
c3db8364 69642008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
6965
6966 * configure.ac: Only a cosmetic change on the handling of
6967 -fno-stack-protector.
6968
f714229e 69692008-02-12 Alexandre Boeglin <alex@boeglin.org>
6970
c3db8364 6971 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
6972 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
6973 reboot.c.
f714229e 6974 (grub_install_SOURCES): Add halt.mod and reboot.mod.
6975 (halt_mod_SOURCES): New variable.
6976 (halt_mod_CFLAGS): Likewise.
6977 (halt_mod_LDFLAGS): Likewise.
6978 (reboot_mod_SOURCES): Likewise.
6979 (reboot_mod_CFLAGS): Likewise.
6980 (reboot_mod_LDFLAGS): Likewise.
6981
c3db8364 6982 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
6983 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
6984 reboot.c.
f714229e 6985 (halt_mod_SOURCES): Likewise.
6986 (reboot_mod_SOURCES): Likewise.
6987
c3db8364 6988 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
6989 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 6990 (reboot_mod_SOURCES): Likewise.
6991
6992 * commands/i386/pc/reboot.c: merge this file ...
6993
6994 * commands/ieee1275/reboot.c: ... and this file ...
6995
6996 * commands/reboot.c: ... to this file.
c3db8364 6997 Add some precompiler directive to include the correct header for
6998 each machine.
f714229e 6999
7000 * commands/ieee1275/halt.c: move this file ...
7001
7002 * commands/halt.c: ... to here.
c3db8364 7003 Add some precompiler directive to include the correct header for
7004 each machine.
f714229e 7005
7006 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7007 (grub_halt): Likewise.
7008
7009 * kern/efi/efi.c (grub_reboot): New function.
7010 (grub_halt): Likewise.
7011
c74493e0 70122008-02-12 Robert Millan <rmh@aybabtu.com>
7013
7014 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7015 /dev (like it is done for /dev/mapper). This doesn't provide support
7016 for EVMS, but at least it is now easy to identify the problem when it
7017 arises.
7018
d0db4b04 70192008-02-11 Robert Millan <rmh@aybabtu.com>
7020
7021 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7022 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7023 comparing it with -1, not 0.
7024
bf748642 70252008-02-10 Robert Millan <rmh@aybabtu.com>
7026
7027 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7028 `disk/lvm.c'.
7029 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7030 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7031
7032 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7033 `disk/lvm.c' to the end of the list.
7034 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7035 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7036
b5db202a 70372008-02-10 Robert Millan <rmh@aybabtu.com>
7038
7039 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7040 grub_print_error() instead. This will let user know why we're entering
7041 rescue mode.
7042 Based on suggestions from Sam Morris.
7043
83abee31 70442008-02-10 Alexandre Boeglin <alex@boeglin.org>
7045
7046 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7047 on remaining N args, instead of "--" arg N times.
7048
78d5a08b 70492008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7050
7051 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7052 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7053 pattern for unknown glyphs.
7054
68807e5f 70552008-02-09 Robert Millan <rmh@aybabtu.com>
7056
7057 * configure.ac: Probe for `help2man'.
7058 * Makefile.in (builddir): New variable.
7059 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7060 or otherwise add a few flags/options to it.
7061 (install-local): For every executable utility or script that is
7062 installed, invoke $(HELP2MAN) to install a manpage based on --help
7063 output.
7064
7065 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7066 that it doesn't prevent --help from working in build tree.
7067
7068 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7069 with `bug-grub@gnu.org'.
7070 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7071 * util/update-grub.in (usage): New function.
7072 Implement proper argument check, with support for --help and --version
7073 (as well as existing -y).
7074
70752008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 7076
7077 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7078 avoid overwriting previous output.
7079 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7080
c1962162 70812008-02-09 Robert Millan <rmh@aybabtu.com>
7082
7083 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7084 drawing the menu.
7085
3dac2e3f 70862008-02-09 Robert Millan <rmh@aybabtu.com>
7087
7088 * commands/sleep.c: New file.
7089 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7090 (sleep_mod_SOURCES): New variable.
7091 (sleep_mod_CFLAGS): Likewise.
7092 (sleep_mod_LDFLAGS): Likewise.
7093
7a634e08 70942008-02-09 Robert Millan <rmh@aybabtu.com>
7095
7096 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7097 situations in which we can deduce the RAID size and the superblock
7098 doesn't match it.
7099
b92f0c18 71002008-02-09 Robert Millan <rmh@aybabtu.com>
7101
7102 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7103 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7104 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7105
7106 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7107 and return a grub_diskmemberlist_t composed of physical array members.
7108 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7109
7110 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7111 prototype.
7112 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7113 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7114 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7115
7116 * util/grub-probe.c (probe): Move partmap probing code from here ...
7117 (probe_partmap): ... to here.
7118 (probe): Use probe_partmap() once for the disk we're probing, and
7119 additionally, when such disk contains a memberlist() struct member,
7120 once for each disk that is contained in the structure returned by
7121 memberlist().
7122
91a4bf68 71232008-02-09 Robert Millan <rmh@aybabtu.com>
7124
7125 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7126 environment variable to 'all' in order to obtain debug output from
7127 non-util/ code.
7128 * util/i386/pc/grub-setup.c (main): Likewise.
7129
a96f9caa 71302008-02-08 Robert Millan <rmh@aybabtu.com>
7131
7132 * disk/raid.c (grub_raid_scan_device): Check for
7133 `array->device[sb.this_disk.number]' rather than for
7134 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 7135 guaranteed to be accessible.
a96f9caa 7136
b37a9222 71372008-02-08 Robert Millan <rmh@aybabtu.com>
7138
7139 * disk/raid.c: Update copyright.
7140 * fs/cpio.c: Likewise.
7141 * include/grub/raid.h: Likewise.
7142 * loader/i386/pc/multiboot.c: Likewise.
7143 * util/hostfs.c: Likewise.
7144
5626aee1 71452008-02-08 Robert Millan <rmh@aybabtu.com>
7146
7147 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7148 to a grub_disk_t array.
7149 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7150 `device[x]'.
7151 (grub_raid_scan_device): Replace `device[x].name' accesses with
7152 `device[x]->name'. Simplify initialization of `array->device[x]'.
7153
554f0187 71542008-02-08 Robert Millan <rmh@aybabtu.com>
7155
7156 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7157 grub_dprintf() calls.
7158 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7159 error message.
7160
1ec8425d 71612008-02-07 Christian Franke <franke@computer.org>
7162
7163 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7164 instead of fseek and ftell to support large files.
7165 (grub_hostfs_read): Likewise.
7166
f2156fda 71672008-02-07 Robert Millan <rmh@aybabtu.com>
7168
7169 Patch from Jeroen Dekkers.
7170 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 7171 failure, since successfully reading all array members might not be
f2156fda 7172 required.
7173
9216e0e7 71742008-02-06 Robert Millan <rmh@aybabtu.com>
7175
7176 * util/grub-probe.c (probe): Simplify partmap probing (with the
7177 assumption that the first word up to the underscore equals to
7178 the module name).
7179
b0dfd29a 71802008-02-06 Christian Franke <franke@computer.org>
7181
7182 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7183 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7184 last block of a cpio or tar stream.
7185 Check for "TRAILER!!!" instead of any empty data
7186 block to detect last block of a cpio stream.
7187 (grub_cpio_dir): Fix constness of variable np.
7188 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7189 cpio or tar trailer is detected. This fixes a crash
7190 on open of a non existing file.
7191
c32865bf 71922008-02-05 Bean <bean123ch@gmail.com>
7193
7194 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7195 address of entry.
7196 (grub_multiboot_load_elf64): Likewise.
7197 (grub_multiboot): Initialize mbi structure.
7198
7199 * util/grub-fstest.c: Don't include unused header file script.h.
7200
fe6b695a 7201 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 7202 of file.
7203 (grub_fstest_SOURCES): Likewise.
7204
409480b7 72052008-02-05 Robert Millan <rmh@aybabtu.com>
7206
7207 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7208 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7209 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7210 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7211
7212 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7213 (translation_table): Replace hardcoded values with macros
7214 provided by `<grub/term.h>'.
7215
7216 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7217 (keyboard_map): Correct/add a few values, with macros provided
7218 by `<grub/term.h>'.
7219 (keyboard_map_shift): Zero values that don't differ from their
7220 `keyboard_map' equivalents.
7221 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7222 Discard the second scan code that is always sent by Caps lock.
7223 Only use `keyboard_map_shift' when it provides a non-zero value,
7224 otherwise fallback to `keyboard_map'.
7225
99fadbaa 72262008-02-04 Bean <bean123ch@gmail.com>
7227
7228 * Makefile.in (enable_grub_fstest): New variable.
7229
7230 * conf/common.rmk (grub_fstest_init.lst): New rule.
7231 (grub_fstest_init.h): Likewise.
7232 (grub_fstest_init.c): Likewise.
7233 (util/grub-fstest.c_DEPENDENCIES): New variable.
7234 (grub_fstest_SOURCES): Likewise.
7235
7236 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7237
7238 * util/grub-fstest.c: New file.
7239
bf567c50 72402008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7241
7242 Make grub-setup handle a separate root device.
f19dbdb7 7243
bf567c50 7244 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7245 so that the root device can be compared with the destination
7246 device.
7247 When embedding the core image, if the root and destination devices
7248 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7249 0xFF.
7250 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 7251
9be6b98b 72522008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7253
7254 Add support for having a grub directory in a different drive. This
7255 is still only the data handling part.
f19dbdb7 7256
9be6b98b 7257 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7258 (codestart): Save %dh in GRUB_ROOT_DRIVE.
7259 (grub_root_drive): New variable.
7260
7261 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7262 instead of GRUB_BOOT_DRIVE to construct a device name. Set
7263 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7264 as it was.
7265
7266 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7267
7268 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7269 macro.
7270 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7271
7272 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7273 is bogus, because PXE booting does not specify any drive
7274 correctly.
7275
7276 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7277 am not sure if this is really correct.
7278
7279 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7280 is always identical to the boot drive when booting from a CD.
7281
7282 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7283 longer.
7284 (root_drive): New variable.
7285 (real_start): Unconditionally set %dh to ROOT_DRIVE.
7286 (setup_sectors): Push %dx right after popping it, because %dh will
7287 be modified later.
7288 (copy_buffer): Restore %dx.
7289
e0ca0677 72902008-02-03 Robert Millan <rmh@aybabtu.com>
7291
7292 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7293 use `cdboot.img' for cdrom images.
7294
3b3f6629 72952008-02-03 Robert Millan <rmh@aybabtu.com>
7296
7297 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7298 only setup gfxterm when `font' command has succeeded.
7299
d42b3672 73002008-02-03 Robert Millan <rmh@aybabtu.com>
7301
7302 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7303 (grub_rescue_cmd_multiboot_loader)
7304 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7305
fa370ea6 73062008-02-03 Pavel Roskin <proski@gnu.org>
7307
e0c5dacb 7308 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 7309 %edx and %esi from stack only after grub_gate_a20() is called.
7310 grub_gate_a20() clobbers %edx.
7311
f2a76e1d 73122008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7313
7314 * configure.ac (AC_INIT): Bumped to 1.96.
7315
7316 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7317 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7318 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7319 video/readers/png.c.
7320
90fd32d1 73212008-02-03 Bean <bean123ch@gmail.com>
9be665dd 7322
7323 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7324 (cdboot_img_SOURCES): New variable.
7325 (cdboot_img_ASFLAGS): New variable.
7326 (cdboot_img_LDFLAGS): New variable.
7327
7328 * boot/i386/pc/cdboot.S: New file.
7329
7330 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7331 (cd_count): Likewise.
7332 (grub_biosdisk_get_drive): Add support for cd device.
7333 (grub_biosdisk_call_hook): Likewise.
7334 (grub_biosdisk_iterate): Likewise.
7335 (grub_biosdisk_open): Likewise.
7336 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7337 (grub_biosdisk_rw): Support reading from cd device.
7338 (GRUB_MOD_INIT): Iterate cd devices.
7339
7340 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7341 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7342 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7343
7344 * kern/i386/pc/init.c (make_install_device): Check for cd device.
7345
4020aa53 73462008-02-02 Robert Millan <rmh@aybabtu.com>
7347
7348 * commands/read.c: New file.
7349 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7350 (read_mod_SOURCES): New variable.
7351 (read_mod_CFLAGS): Likewise.
7352 (read_mod_LDFLAGS): Likewise.
7353
e03a1132 73542008-02-02 Robert Millan <rmh@aybabtu.com>
7355
7356 * normal/main.c (grub_normal_execute): Check for `menu->size' when
7357 determining whether menu has to be displayed.
7358
58c69220 73592008-02-02 Marco Gerards <marco@gnu.org>
7360
7361 * bus/pci.c: New file.
7362
7363 * include/grub/pci.h: Likewise.
7364
7365 * include/grub/i386/pc/pci.h: Likewise.
7366
7367 * commands/lspci.c: Likewise.
7368
7369 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7370 `lspci.mod'.
7371 (pci_mod_SOURCES): New variable.
7372 (pci_mod_CFLAGS): Likewise.
7373 (pci_mod_LDFLAGS): Likewise.
7374 (lspci_mod_SOURCES): Likewise.
7375 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 7376 (lspci_mod_LDFLAGS): Likewise.
58c69220 7377
c004e1b4 73782008-02-02 Bean <bean123ch@gmail.com>
7379
7380 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7381 (grub_ufs_get_file_block): Fix indirect block calculation problem.
7382
7383 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7384 (grub_xfs_btree_node): New structure.
7385 (grub_xfs_btree_root): New structure.
7386 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7387 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7388 (GRUB_XFS_EXTENT_BLOCK): Likewise.
7389 (GRUB_XFS_EXTENT_SIZE): Likewise.
7390 (grub_xfs_read_block): Support btree format type.
7391 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7392 Use directory block as basic unit.
7393
7394 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7395
7396 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7397 __attribute__ ((__regparm__ (1))).
7398
f95562bf 73992008-02-01 Robert Millan <rmh@aybabtu.com>
7400
7401 Correct a mistake in previous commit.
7402
7403 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7404 top.
7405 (normal/command.c_DEPENDENCIES): New variable.
7406
7d31f41f 74072008-02-01 Robert Millan <rmh@aybabtu.com>
7408
7409 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7410 top.
7411 (normal/command.c_DEPENDENCIES): New variable.
7412 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7413 * conf/i386-ieee1275.rmk: Likewise.
7414 * conf/i386-linuxbios.rmk: Likewise.
7415 * conf/i386-pc.rmk: Likewise.
7416 * conf/sparc64-ieee1275.rmk: Likewise.
7417 * conf/powerpc-ieee1275.rmk: Likewise.
7418 (grub_emu_SOURCES): Add `fs/fshelp.c'.
7419
7420 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7421
60b6be74 74222008-02-01 Robert Millan <rmh@aybabtu.com>
7423
7424 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7425 call at beginning of function.
7426
078522ab 74272008-01-31 Pavel Roskin <proski@gnu.org>
7428
7429 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 7430 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7431 (grub_mkrescue_SOURCES): Likewise.
078522ab 7432 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7433
ccaa8a5f 74342008-01-30 Robert Millan <rmh@aybabtu.com>
7435
7436 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7437 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7438 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7439 (grub_probe_SOURCES): ... to here.
7440
7441 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7442 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7443 * conf/i386-ieee1275.rmk: Likewise.
7444 * conf/i386-linuxbios.rmk: Likewise.
7445 * conf/powerpc-ieee1275.rmk: Likewise.
7446
ae5a9cd7 74472008-01-30 Tristan Gingold <gingold@free.fr>
7448
7449 * kern/rescue.c: Silently accept empty lines.
7450
70bc2ef2 74512008-01-29 Bean <bean123ch@gmail.com>
7452
7453 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7454 (real_code_2): Code cleanup and change comment style.
7455 (move_memory): Avoid using 32-bit address mode.
7456
6a4d50ea 74572008-01-29 Bean <bean123ch@gmail.com>
7458
7459 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7460 (png_mod_SOURCES): New variable.
7461 (png_mod_CFLAGS): Likewise.
7462 (png_mod_LDFLAGS): Likewise.
7463
7464 * video/readers/png.c: New file.
7465
11cc30ac 74662008-01-28 Robert Millan <rmh@aybabtu.com>
7467
7468 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7469 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7470 `ifndef GRUB_MOD_GAP' hack.
7471 * util/elf/grub-mkimage.c (add_segments): Likewise.
7472
3abc589f 74732008-01-27 Robert Millan <rmh@aybabtu.com>
7474
7475 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7476 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 7477 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 7478
e1907778 74792008-01-27 Robert Millan <rmh@aybabtu.com>
7480
7481 Get grub-emu to build again (including parallel builds).
7482
7483 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7484 Split into ...
7485 (util/grub-emu.c_DEPENDENCIES): ... this, ...
7486 (normal/execute.c_DEPENDENCIES): ... this, ...
7487 (grub-emu_DEPENDENCIES): ... and this.
7488
7489 * conf/i386-efi.rmk: Likewise.
7490 * conf/i386-linuxbios.rmk: Likewise.
7491 * conf/i386-ieee1275.rmk: Likewise.
7492 * conf/powerpc-ieee1275.rmk: Likewise.
7493 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7494
2216b101 74952008-01-27 Robert Millan <rmh@aybabtu.com>
7496
7497 * NEWS: Add a few items.
7498
f75172d9 74992008-01-27 Robert Millan <rmh@aybabtu.com>
7500
7501 Fix parallel builds with grub-emu. Based on earlier commit for
7502 grub-probe and grub-setup.
7503
7504 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7505 (util/grub-emu.c_DEPENDENCIES): ... this.
7506 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7507 (util/grub-emu.c_DEPENDENCIES): ... this.
7508 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7509 (util/grub-emu.c_DEPENDENCIES): ... this.
7510 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7511 (util/grub-emu.c_DEPENDENCIES): ... this.
7512 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7513 (util/grub-emu.c_DEPENDENCIES): ... this.
7514
3f51de77 75152008-01-27 Pavel Roskin <proski@gnu.org>
7516
7517 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7518 to create a gap between _end and the modules added to the image
7519 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
7520 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7521 * util/elf/grub-mkimage.c (add_segments): Likewise.
7522
2033f53e 75232008-01-26 Pavel Roskin <proski@gnu.org>
7524
7525 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7526 just return an error.
7527
22da1f6f 75282008-01-26 Bean <bean123ch@gmail.com>
7529
7530 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7531 (grub_reiserfs_get_item): Save offset of the next item.
7532 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7533
2a9525e6 75342008-01-25 Robert Millan <rmh@aybabtu.com>
7535
7536 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7537 make all filesystem sources appear together (possibly fixing omissions
7538 while at it).
7539 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7540 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7541 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7542 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7543
7544 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
7545 add `kern/file.c'.
7546 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7547 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7548 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7549 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7550
7551 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7552 (probe): Add a sanity check to make sure of our ability to read
7553 requested files when probing for filesystem type.
7554
7555 * genmk.rb: Update copyright year (2007).
7556
7557 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7558 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7559 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7560 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7561 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7562 : Remove function prototypes.
7563
b95f71b5 75642008-01-25 Robert Millan <rmh@aybabtu.com>
7565
7566 Revert my previous commits (based on wrong assumption of how grub_errno
7567 works).
7568
fe6b695a 7569 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 7570 * kern/file.c (grub_file_open): Likewise.
7571
d08bbb49 75722008-01-24 Pavel Roskin <proski@gnu.org>
7573
7574 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7575 that hang if GRUB tries to setup colors.
7576 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7577 colors for firmwares that don't support it.
7578 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7579 Recognize Open Hack'Ware, set flags to work around its
7580 limitations.
7581
605e36ed 75822008-01-24 Robert Millan <rmh@aybabtu.com>
7583
7584 * kern/file.c (grub_file_open): Do not account previous failures of
7585 unrelated functions when grub_errno is checked for.
7586 Reported by Oleg Strikov.
7587
bac332a1 75882008-01-24 Bean <bean123ch@gmail.com>
7589
7590 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7591 (grub_ufs_sblock): New member volume name.
7592 (grub_ufs_find_file): Fix string copy bug.
7593 (grub_ufs_label): Implement this function properly.
7594
7595 * fs/hfs.c (grub_hfs_cnid_type): New enum.
7596 (grub_hfs_iterate_records): Use the correct file number for extents
7597 and catalog file. Fix problem in next index calculation.
7598 (grub_hfs_find_node): Replace recursive function call with loop.
7599 (grub_hfs_iterate_dir): Replace recursive function call with loop.
7600
15c80c09 76012008-01-23 Robert Millan <rmh@aybabtu.com>
7602
7603 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7604 `<grub/symbol.h>' and `<grub/multiboot.h>'.
7605 (grub_multiboot2_real_boot): New function prototype.
7606
7607 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7608 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7609
7610 * kern/i386/ieee1275/init.c (grub_os_area_addr)
7611 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7612
305338fd 76132008-01-23 Robert Millan <rmh@aybabtu.com>
7614
7615 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7616 #ifdef'ed out grub_printf().
7617
3ea52685 76182008-01-23 Robert Millan <rmh@aybabtu.com>
7619
7620 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7621 grub_dprintf calls, since they make "debug=all" mode unusable.
7622 (grub_console_checkkey): Likewise.
7623
5882ae4b 76242008-01-23 Robert Millan <rmh@aybabtu.com>
7625
7626 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7627 `term/i386/pc/at_keyboard.c'.
7628 (pkglib_MODULES): Add `serial.mod'.
7629 (serial_mod_SOURCES): New variable.
7630 (serial_mod_CFLAGS): Likewise.
7631 (serial_mod_LDFLAGS): Likewise.
7632
7633 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
7634 `<grub/powerpc/ieee1275/console.h>'.
7635 (grub_keyboard_controller_init): New function prototype.
7636 (grub_console_checkkey): Likewise.
7637 (grub_console_getkey): Likewise.
7638
7639 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7640 keyboard on i386.
7641
7642 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7643 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7644
06ab5303 76452008-01-23 Robert Millan <rmh@aybabtu.com>
7646
7647 * kern/i386/pc/init.c (make_install_device): When memdisk image is
7648 present, "(memdisk)/boot/grub" becomes the default prefix.
7649
7650 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7651 a memdisk tarball with all the modules. Add --overlay=DIR option that
7652 allows users to overlay additional files into the image.
7653
dbb475a4 76542008-01-23 Robert Millan <rmh@aybabtu.com>
7655
7656 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7657 and `machine/memory.h'.
7658 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7659 (_multiboot_mod_SOURCES): New variable.
7660 (_multiboot_mod_CFLAGS): Likewise.
7661 (_multiboot_mod_LDFLAGS): Likewise.
7662 (multiboot_mod_SOURCES): Likewise.
7663 (multiboot_mod_CFLAGS): Likewise.
7664 (multiboot_mod_LDFLAGS): Likewise.
7665
7666 * include/grub/i386/ieee1275/loader.h: New file.
7667
7668 * include/grub/i386/ieee1275/machine.h: Likewise.
7669
7670 * include/grub/i386/ieee1275/memory.h: Likewise.
7671
7672 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7673 variable declaration.
7674 (grub_os_area_size): Likewise.
7675
7676 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7677 (grub_lower_mem, grub_upper_mem): New variables.
7678 (grub_stop_floppy): New function (just to make
7679 grub_multiboot2_real_boot() happy).
7680
7681 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7682 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7683 (grub_stop): New function.
7684 Include `"../realmode.S"' and `"../loader.S"'.
7685
7686 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7687 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7688
7689 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7690 rely on grub_multiboot2_real_boot() for final boot.
7691
25638629 76922008-01-22 Robert Millan <rmh@aybabtu.com>
7693
7694 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7695 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7696 device that doesn't look like an SD card.
7697 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7698 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7699 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7700 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7701 found.
7702
9dad816d 77032008-01-22 Robert Millan <rmh@aybabtu.com>
7704
7705 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7706 avoid claiming over our own code.
7707
34842f2d 77082008-01-22 Bean <bean123ch@gmail.com>
7709
7710 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7711 (jpeg_mod_SOURCES): New variable.
7712 (jpeg_mod_CFLAGS): Likewise.
7713 (jpeg_mod_LDFLAGS): Likewise.
7714
7715 * video/readers/jpeg.c : New file.
7716
44023a28 77172008-01-22 Bean <bean123ch@gmail.com>
7718
7719 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7720 there are no more items.
7721
bc2d8ac6 77222008-01-21 Robert Millan <rmh@aybabtu.com>
7723
7724 * kern/mm.c (grub_mm_init_region): Improve debug message.
7725
261bd4bc 77262008-01-21 Robert Millan <rmh@aybabtu.com>
7727
7728 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7729 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7730 address.
7731 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7732 a C macro.
7733 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7734 Indicates start of upper memory.
7735 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7736 (generate_image): Abort when image size is big enough to corrupt
7737 upper memory.
7738
7739 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
7740 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
7741 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7742 instead of hardcoding 0xA0000.
7743 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
7744 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7745 instead of hardcoding 0xA0000.
7746
f970b55e 77472008-01-21 Robert Millan <rmh@aybabtu.com>
7748
7749 * disk/memdisk.c (memdisk_size): New variable.
7750 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
7751 `memdisk_size'.
7752 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
7753 image to dynamic memory.
7754 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
7755 `memdisk_size'. Free memdisk block.
7756
1a8b0526 77572008-01-21 Robert Millan <rmh@aybabtu.com>
7758
7759 Fix detection of very small filesystems (like tar).
7760
7761 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
7762 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
7763 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
7764 a problem with this disk).
7765
6e9b4aab 77662008-01-21 Robert Millan <rmh@aybabtu.com>
7767
7768 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
7769 on grub_biosdisk_rw_standard() error.
7770
0d8837b2 77712008-01-21 Robert Millan <rmh@aybabtu.com>
7772
7773 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
7774 recent changes.
7775 * kern/elf.c: Likewise.
7776 * kern/ieee1275/ieee1275.c: Likewise.
7777 * kern/powerpc/ieee1275/openfw.c: Likewise.
7778 * term/ieee1275/ofconsole.c: Likewise.
7779
ffd36e34 77802008-01-21 Robert Millan <rmh@aybabtu.com>
7781
7782 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
7783
3f0093d0 7784 * include/grub/kernel.h (grub_arch_memdisk_addr)
7785 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 7786
3f0093d0 7787 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
7788 (grub_arch_memdisk_size): ... to here.
ffd36e34 7789
6c391b21 77902008-01-21 Robert Millan <rmh@aybabtu.com>
7791
7792 Mostly based on bugfix from Bean.
7793
7794 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
7795 attribute with hook() parameter.
7796 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
7797 declaration.
7798 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
7799 attribute with hook() parameter.
7800 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
7801 declaration.
7802
55a581dc 78032008-01-21 Robert Millan <rmh@aybabtu.com>
7804
7805 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
7806 (pkglib_MODULES): Add `memdisk.mod'.
7807 (memdisk_mod_SOURCES): New variable.
7808 (memdisk_mod_CFLAGS): Likewise.
7809 (memdisk_mod_LDFLAGS): Likewise.
7810
7811 * disk/memdisk.c: New file.
7812
7813 * include/grub/disk.h (grub_disk_dev_id): Add
7814 `GRUB_DISK_DEVICE_MEMDISK_ID'.
7815
7816 * include/grub/i386/pc/kernel.h
7817 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
7818 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
7819 (grub_kernel_image_size): New variable declaration.
7820 (grub_total_module_size): Likewise.
7821 (grub_memdisk_image_size): Likewise.
7822
7823 * include/grub/i386/pc/memory.h
7824 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
7825
7826 * include/grub/kernel.h: Include `<grub/symbol.h>'.
7827 (grub_arch_memdisk_addr): New variable declaration.
7828 (grub_arch_memdisk_size): Likewise.
7829
7830 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
7831 (grub_arch_memdisk_size): Likewise.
7832
7833 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
7834 (codestart): Replace hardcoded `0x100000' with
7835 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
7836
7837 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
7838 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
7839 not NULL, append the contents of the file it refers to, at the end of
7840 the compressed kernel image. Initialize `grub_memdisk_image_size'
7841 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
7842 (options): Add "memdisk"|'m' option.
7843 (main): Parse --memdisk|-m option, and pass user-provided path as
7844 parameter to generate_image().
7845
3d7f54c9 78462008-01-20 Robert Millan <rmh@aybabtu.com>
7847
7848 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
7849 grub_dprintf() calls from here ...
7850 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
7851
0bf74728 78522008-01-20 Robert Millan <rmh@aybabtu.com>
7853
7854 Fix detection of "real mode" when /options/real-mode? doesn't exist.
7855
7856 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
7857 declaration.
7858 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
7859 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
7860 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 7861 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 7862 property).
7863 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
7864 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
7865
33bf70a7 78662008-01-19 Robert Millan <rmh@aybabtu.com>
7867
fe6b695a 7868 Get rid of confusing function (superseded by
33bf70a7 7869 `grub_ieee1275_get_integer_property')
7870 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
7871 prototype.
7872 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
7873 function.
7874 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
7875 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 7876 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 7877
e2da7d26 78782008-01-19 Robert Millan <rmh@aybabtu.com>
7879
7880 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
7881 command after "shut-down", since implementations differ on which
7882 the command for halt is.
7883
59f1fd8d 78842008-01-19 Robert Millan <rmh@aybabtu.com>
7885
7886 * include/grub/i386/linuxbios/console.h: Add header protection.
7887 (grub_keyboard_controller_init): New function prototype.
7888 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
7889 (KEYBOARD_COMMAND_READ): Likewise.
7890 (KEYBOARD_COMMAND_WRITE): Likewise.
7891 (KEYBOARD_SCANCODE_SET1): Likewise.
7892 (grub_keyboard_controller_write): New function.
7893 (grub_keyboard_controller_read): Likewise.
7894 (grub_keyboard_controller_init): Likewise.
7895
7896 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
7897 (grub_console_init): On coreboot/LinuxBIOS, call
7898 grub_keyboard_controller_init().
7899
5f5a7c15 79002008-01-19 Robert Millan <rmh@aybabtu.com>
7901
7902 PowerPC changes provided by Pavel Roskin.
7903
7904 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
7905 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
7906 don't rely on cmain() doing it.
7907 * kern/i386/ieee1275/startup.S (_start): Store %eax in
7908 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
7909
1210e168 79102008-01-16 Robert Millan <rmh@aybabtu.com>
7911
7912 * include/grub/i386/linuxbios/memory.h
7913 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
7914 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
7915 receive `table_header' as argument. Instead, probe for it in the
7916 known memory ranges where it can be present.
7917 (grub_available_iterate): Do not pass a fixed `table_header' address
7918 to grub_linuxbios_table_iterate().
7919
3d04eab8 79202008-01-15 Robert Millan <rmh@aybabtu.com>
7921
7922 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
7923 * conf/i386-ieee1275.rmk: New file.
7924 * include/grub/i386/ieee1275/console.h: Likewise.
7925 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
7926 * include/grub/i386/ieee1275/kernel.h: Likewise.
7927 * include/grub/i386/ieee1275/time.h: Likewise.
7928 * kern/i386/ieee1275/init.c: Likewise.
7929 * kern/i386/ieee1275/startup.S: Likewise.
7930
d1bc1b73 79312008-01-15 Robert Millan <rmh@aybabtu.com>
7932
7933 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
7934 when pointers are 32-bit (but still do set it to one when they are
7935 64-bit).
7936
66a65807 79372008-01-15 Robert Millan <rmh@aybabtu.com>
7938
7939 * include/grub/ieee1275/ieee1275.h
7940 (grub_ieee1275_get_integer_property): New function prototype.
7941
7942 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
7943 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 7944 grub_ieee1275_get_property() to handle endianness.
66a65807 7945
7946 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
7947 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 7948 where appropriate.
66a65807 7949 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
7950 (grub_map): Likewise.
7951 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
7952
a83ccafd 79532008-01-15 Bean <bean123ch@gmail.com>
7954
7955 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
7956 (grub_script_execute_cmdline): Reset grub_errno.
7957
7958 * normal/main.c (read_config_file): Reset grub_errno.
7959
7960 * normal/parse.y (script_init): New.
7961 (script): Move function and menuentry here.
7962 (delimiter): New.
7963 (command): Add delimiter at the end of command.
7964 (commands): Adjust to match the new command.
7965 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 7966 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 7967 (if): Use the new commands.
7968
7969 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
7970
df6ecfc6 79712008-01-15 Robert Millan <rmh@aybabtu.com>
7972
7973 * normal/menu.c (run_menu): Move timeout message from here ...
7974 (print_timeout): ... to here.
7975 (run_menu): Use print_timeout() once during initial draw to print
7976 the whole message, and again in every clock tick to update only
7977 the number of seconds.
7978
87ae25eb 79792008-01-15 Robert Millan <rmh@aybabtu.com>
7980
7981 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
7982 actual size of `available' from grub_ieee1275_get_property(), and
7983 restrict parsing to that bound.
7984
47bf09a4 79852008-01-15 Christian Franke <franke@computer.org>
7986
7987 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
7988 (argp_program_version): Remove variable.
7989 (argp_program_bug_address): Likewise.
7990 (options): Convert from struct argp_option to struct option.
7991 (struct arguments): Remove.
7992 (parse_opt): Remove.
7993 (usage): New function.
7994 (main): Replace struct args members by simple variables.
7995 Replace argp_parse() by getopt_long().
7996 Add switch to evaluate options.
7997 Add missing "(...)" around root_dev in prefix string.
7998
c86f1469 79992008-01-14 Robert Millan <rmh@aybabtu.com>
8000
8001 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8002 for grub_ieee1275_exit(), in order to improve portability.
8003
e622c559 80042008-01-14 Robert Millan <rmh@aybabtu.com>
8005
8006 * util/grub.d/10_linux.in (prefix): Define.
8007 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8008
44cb1ec8 80092008-01-13 Pavel Roskin <proski@gnu.org>
8010
8011 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8012 grub_errno if no errors have been detected.
8013
1eb8c802 80142008-01-12 Robert Millan <rmh@aybabtu.com>
8015
8016 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8017 (grub_util_get_dev_abstraction): New function prototype.
8018
8019 * util/getroot.c: Include `<grub/util/getroot.h>'
8020 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8021 (grub_util_get_dev_abstraction): ... here (new function).
8022
8023 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8024 `PRINT_ABSTRACTION'.
8025 (probe): Probe for abstraction type when requested.
8026 (main): Understand `--target=abstraction'.
8027
8028 * util/i386/efi/grub-install.in: Add abstraction module to core
8029 image when it is found to be necessary.
8030 * util/i386/pc/grub-install.in: Likewise.
8031 * util/powerpc/ieee1275/grub-install.in: Likewise.
8032
8033 * util/update-grub_lib.in (font_path): Return system path without
8034 converting to GRUB path.
8035 * util/update-grub.in: Convert system path returned by font_path()
8036 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8037 abstraction module is needed for loading fonts (if any). Export
8038 that as `GRUB_PRELOAD_MODULES'.
8039 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8040 insmod commands).
8041
52bd3de9 80422008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8043
8044 Remove some unused code from reiserfs.
f19dbdb7 8045
52bd3de9 8046 * fs/reiserfs.c (struct grub_reiserfs_key)
8047 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8048 (struct grub_reiserfs_node_body): Removed.
8049 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8050 Likewise.
8051 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8052 Likewise.
8053 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8054 Likewise.
8055 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8056 Likewise.
8057 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8058 Likewise.
8059 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8060 Likewise.
8061 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8062 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8063 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8064
2f80039d 80652008-01-10 Robert Millan <rmh@aybabtu.com>
8066
8067 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8068 Determines if a file is garbage left by packaging systems, etc.
8069 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8070 for processing /etc/grub.d scripts.
8071 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8072 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8073 as a condition for processing Linux images.
8074
87888032 80752008-01-10 Pavel Roskin <proski@gnu.org>
8076
8077 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8078 to compile reiserfs.c on PowerPC.
8079
7e54fced 80802008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 8081
8082 * kern/device.c (grub_device_iterate): Do not abort device iteration
8083 when one of the devices cannot be opened.
8084 * kern/disk.c (grub_disk_open): Do not account previous failures of
8085 unrelated functions when grub_errno is checked for.
8086
5aa541e6 80872008-01-08 Robert Millan <rmh@aybabtu.com>
8088
8089 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8090 `! grub_linux_is_bzimage', change order of address comparison to make
8091 it more intuitive, and improve "too big zImage" error message.
8092
7076340d 80932008-01-08 Robert Millan <rmh@aybabtu.com>
8094
8095 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8096 `$(update-grub_DATA)'.
8097 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8098 targets.
8099
9ca70333 81002008-01-07 Robert Millan <rmh@aybabtu.com>
8101
8102 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8103 which instruction is modified by grub-setup during installation
8104 (since it wasn't obvious by only looking at this file).
8105
38ccf575 81062008-01-07 Robert Millan <rmh@aybabtu.com>
8107
8108 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8109 listing actual TODO items.
8110
f5db4291 81112008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8112
868967cf 8113 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8114 correctly.
8115 (grub_reiserfs_get_key_offset): Likewise.
8116 (grub_reiserfs_set_key_offset): Likewise.
8117 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 8118 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 8119
8120 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8121 better to remove the bitfield version completely.
f19dbdb7 8122
868967cf 81232008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 8124
f5db4291 8125 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8126 allocated from the heap, due to the fshelp implementation.
8127 (grub_reiserfs_dir): Free NODE, due to the same reason.
8128
492e6d9d 81292008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8130
8131 Mostly from Vincent Pelletier:
f19dbdb7 8132
492e6d9d 8133 * fs/reiserfs.c: New file.
f19dbdb7 8134
492e6d9d 8135 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8136 (reiserfs_mod_SOURCES): New variable.
8137 (reiserfs_mod_CFLAGS): Likewise.
8138 (reiserfs_mod_LDFLAGS): Likewise.
8139
8140 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8141 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8142 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8143 normal/color.c.
8144
9ce3e7c1 81452008-01-06 Robert Millan <rmh@aybabtu.com>
8146
8147 * normal/color.c: Remove `<grub/env.h>'.
8148
f3b58148 81492008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8150
8151 * include/grub/normal.h: Include <grub/env.h>.
8152
7ac3bcfa 81532008-01-05 Robert Millan <rmh@aybabtu.com>
8154
8155 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8156 usage example with `(hd0,1)'.
fb358190 8157 Reported by Samuel Thibault.
7ac3bcfa 8158
c8ee99d7 81592008-01-05 Robert Millan <rmh@aybabtu.com>
8160
8161 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8162 (grub_linux_boot_zimage): Rename to ...
8163 (grub_linux_boot): ... this.
8164 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8165 (grub_linux_boot_zimage): Conditionalize zImage copy.
8166
8167 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8168 (grub_linux_boot_bzimage): Remove prototype.
8169 (grub_linux_boot_zimage): Rename to ...
8170 (grub_linux_boot): ... this.
8171
8172 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8173 (grub_linux_boot): Remove function.
8174
0ece25b1 81752008-01-05 Robert Millan <rmh@aybabtu.com>
8176
8177 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8178 (grub_env_write_color_highlight): Likewise.
8179 (grub_wait_after_message): Likewise.
8180
8181 * normal/color.c: New file.
8182
8183 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8184 (normal_mod_DEPENDENCIES): Likewise.
8185
8186 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8187 (normal_mod_DEPENDENCIES): Likewise.
8188
8189 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8190 (normal_mod_DEPENDENCIES): Likewise.
8191
8192 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8193 (normal_mod_DEPENDENCIES): Likewise.
8194
8195 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8196 for waiting after a message is printed.
8197 * normal/main.c (read_config_file): Likewise.
8198 (grub_normal_init): Register grub_env_write_color_normal() and
8199 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8200 `color_highlight' variables as global.
8201
8202 * normal/menu.c (grub_wait_after_message): New function.
8203 (grub_color_menu_normal): New variable. Replaces ...
8204 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8205 (grub_color_menu_highlight): New variable. Replaces ...
8206 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8207 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8208 `GRUB_TERM_COLOR_STANDARD'.
8209 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8210 `normal_code' and `highlight_code' to `old_color_normal' and
8211 `old_color_highlight', respectively.
8212 (grub_menu_init_page): Update colors when drawing the menu, based on
8213 `menu_color_normal' and `menu_color_highlight' variables.
8214 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8215 a message is printed.
8216
182dd4e5 82172008-01-05 Robert Millan <rmh@aybabtu.com>
8218
8219 * kern/env.c (grub_env_context_open): Propagate hooks for global
8220 variables to new context.
8221
8222 * kern/main.c (grub_set_root_dev): Export `root' variable.
8223
ddf8f6ad 82242008-01-05 Robert Millan <rmh@aybabtu.com>
8225
8226 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 8227 discs unconditionally, since udev and others have options to provide
ddf8f6ad 8228 them.
8229
d8b43d9b 82302008-01-05 Robert Millan <rmh@aybabtu.com>
8231
8232 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8233
2bff2de3 82342008-01-04 Christian Franke <franke@computer.org>
8235
8236 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8237 of eisa_mmap.
8238
97eab917 82392008-01-03 Pavel Roskin <proski@gnu.org>
8240
8241 * kern/i386/linuxbios/init.c: Put "void" to all function
8242 declarations with no arguments.
8243 * kern/powerpc/ieee1275/init.c: Likewise.
8244 * term/i386/pc/at_keyboard.c: Likewise.
8245 * term/i386/pc/vga_text.c: Likewise.
8246 * util/grub-mkdevicemap.c: Likewise.
8247
b9416d00 82482008-01-02 Robert Millan <rmh@aybabtu.com>
8249
8250 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8251 message when loaded image is out of bounds.
8252 (grub_multiboot_load_elf64): Likewise.
8253
92695df9 82542008-01-02 Pavel Roskin <proski@gnu.org>
8255
8256 * util/grub.d/10_linux.in: Try version without ".old" when
8257 looking for initrd. It's better to use initrd from the newer
8258 kernel of the same version than no initrd at all.
8259
d98d9cad 82602008-01-01 Robert Millan <rmh@aybabtu.com>
8261
8262 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8263
dbfdce36 82642008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
8265
f19dbdb7 8266 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 8267 grub_video_get_active_render_target.
8268 (grub_video_adapter): Added unmap_color and get_active_render_target.
8269
f19dbdb7 8270 * video/video.c: Added grub_video_unmap_color and
dbfdce36 8271 grub_video_get_active_render_target.
8272 (grub_video_get_info): Changed method to accept NULL pointer as an
8273 argument to allow detection of active video adapter.
8274
8275 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8276 grub_video_vbe_unmap_color_int.
8277 Added grub_video_vbe_unmap_color and
8278 grub_video_vbe_get_active_render_target.
8279 (grub_video_vbe_adapter): Added unmap_color and
8280 get_active_render_target.
8281
f19dbdb7 8282 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 8283 with grub_video_vbe_unmap_color_int.
8284
8285 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8286 (DEFAULT_NORMAL_COLOR): Likewise.
8287 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8288 (DEFAULT_FG_COLOR): Removed.
8289 (DEFAULT_BG_COLOR): Likewise.
8290 (DEFAULT_CURSOR_COLOR): Changed value.
8291 (grub_virtual_screen): Added standard_color_setting,
8292 normal_color_setting, highlight_color_setting and term_color.
8293 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8294 (bitmap_width): Added.
8295 (bitmap_height): Likewise.
8296 (bitmap): Likewise.
8297 (set_term_color): Likewise.
8298 (grub_virtual_screen_setup): Changed to use new terminal coloring
8299 settings.
8300 (grub_gfxterm_init): Added init for bitmap.
8301 (grub_gfxterm_fini): Added destroy for bitmap.
8302 (redraw_screen_rect): Updated to use background bitmap and new
8303 terminal coloring.
8304 (scroll_up): Added optimization for case when there is no bitmap.
8305 (grub_gfxterm_cls): Fixed to use correct background color.
8306 (grub_virtual_screen_setcolorstate): Changed to use new terminal
8307 coloring.
8308 (grub_virtual_screen_setcolor): Likewise.
8309 (grub_virtual_screen_getcolor): Added.
8310 (grub_gfxterm_background_image_cmd): Likewise.
8311 (grub_video_term): Added setcolor and getcolor.
8312 (MOD_INIT): Added registration of background_image command.
8313 (MOD_TERM): Added unregistration for background_image command.
8314
c3c20931 83152007-12-30 Pavel Roskin <proski@gnu.org>
8316
8317 * loader/multiboot_loader.c: Fix multiboot command
8318 unregistration. Fix all typos in the word "multiboot".
8319
df266716 83202007-12-29 Pavel Roskin <proski@gnu.org>
94239199 8321
8322 * util/grub.d/10_linux.in: Refactor search for initrd. Add
8323 support for initrd names used in Fedora.
8324
fc6e896c 83252007-12-26 Bean <bean123ch@gmail.com>
8326
8327 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8328 (cpio_mod_SOURCES): New variable.
8329 (cpio_mod_CFLAGS): Likewise.
8330 (cpio_mod_LDFLAGS): Likewise.
8331
8332 * fs/cpio.c: New file.
8333
8334 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8335
8336 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8337
8338 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8339
8340 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8341
533110ad 83422007-12-25 Robert Millan <rmh@aybabtu.com>
8343
8344 * include/grub/term.h (struct grub_term): Add `getcolor' function.
8345 (grub_getcolor): New function.
8346
8347 * kern/term.c (grub_getcolor): New function.
8348 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8349 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8350 (print_entry): Set normal and highlight colors to
8351 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8352 respectively, before printing and restore them to old
8353 values afterwards.
8354 (grub_menu_init_page): Likewise. Fill an additional colored space
8355 that would otherwise be left blank.
8356
8357 * term/efi/console.c (grub_console_getcolor): New function.
8358 (struct grub_console_term.getcolor): New variable.
8359 * term/i386/pc/console.c (grub_console_getcolor): New function.
8360 (struct grub_console_term.getcolor): New variable.
8361 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8362 (struct grub_console_term.getcolor): New variable.
8363
8364 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8365 (struct grub_console_term.setcolor): Remove variable.
8366 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8367 (struct grub_console_term.setcolor): Remove variable.
8368 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8369 (struct grub_console_term.setcolor): Remove variable.
8370 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8371 (struct grub_console_term.setcolor): Remove variable.
8372
4931827f 83732007-12-25 Robert Millan <rmh@aybabtu.com>
8374
8375 * configure.ac: Search for possible unifont.hex locations, and
8376 define UNIFONT_HEX if found.
8377
8378 * Makefile.in (UNIFONT_HEX): Define variable.
8379 (DATA): Rename to ...
8380 (PKGLIB): ... this. Update all users.
8381 (PKGDATA): New variable.
8382 (pkgdata_IMAGES): Rename to ...
8383 (pkglib_IMAGES): ... this. Update all users.
8384 (pkgdata_MODULES): Rename to ...
8385 (pkglib_MODULES): ... this. Update all users.
8386 (pkgdata_PROGRAMS): Rename to ...
8387 (pkglib_PROGRAMS): ... this. Update all users.
8388 (pkgdata_DATA): Rename to ...
8389 (pkglib_DATA): ... this. Update all users.
8390 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8391 (unicode.pff, ascii.pff): New rules.
8392 (all-local): Add `$(PKGDATA)' dependency.
8393 (install-local): Process `$(PKGDATA)'.
8394
8395 * util/update-grub_lib.in (font_path): Search for *.pff files in
8396 a few more locations, including `${pkgdata}'.
8397
57e57e31 83982007-12-23 Robert Millan <rmh@aybabtu.com>
8399
8400 Patch from Bean <bean123ch@gmail.com>:
8401 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8402 `size'.
8403
4bc72aa9 84042007-12-21 Bean <bean123ch@gmail.com>
8405
8406 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8407 (ntfscomp_mod_SOURCES): New variable.
8408 (ntfscomp_mod_CFLAGS): Likewise.
8409 (ntfscomp_mod_LDFLAGS): Likewise.
8410
8411 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8412 (grub_probe_SOURCES): Likewise.
8413 (grub_emu_SOURCES): Likewise.
8414
8415 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8416 (grub_emu_SOURCES): Likewise.
8417
8418 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8419 (grub_emu_SOURCES): Likewise.
8420
8421 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8422 (grub_emu_SOURCES): Likewise.
8423
8424 * fs/ntfs.c (grub_ntfscomp_func): New variable.
8425 (read_run_list): Renamed to grub_ntfs_read_run_list.
8426 (decomp_nextvcn): Moved to ntfscomp.c.
8427 (decomp_getch): Likewise.
8428 (decomp_get16): Likewise.
8429 (decomp_block): Likewise.
8430 (read_block): Likewise.
8431 (read_data): Partially moved to ntfscomp.c.
8432 (fixup): Change unsigned to grub_uint16_t.
8433 (read_mft): Change unsigned long to grub_uint32_t.
8434 (read_attr): Likewise.
8435 (read_data): Likewise.
8436 (read_run_data): Likewise.
8437 (read_run_list): Likewise.
8438 (read_mft): Likewise.
8439
8440 * fs/ntfscomp.c: New file.
8441
8442 * include/grub/ntfs.h: New file.
8443
af680a87 84442007-12-16 Robert Millan <rmh@aybabtu.com>
8445
8446 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8447 IDE disk check, since Linux is known to support 20 IDE disks.
8448 Reported by Colin Watson.
8449
84be7599 84502007-12-15 Bean <bean123ch@gmail.com>
8451
8452 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8453 (lnxboot_img_SOURCES): New variable.
8454 (lnxboot_img_ASFLAGS): Likewise.
8455 (lnxboot_img_LDFLAGS): Likewise.
8456
8457 * boot/i386/pc/lnxboot.S: New file.
8458
6af9db01 84592007-11-24 Pavel Roskin <proski@gnu.org>
8460
8461 * configure.ac: Test if '--build-id=none' is supported by the
8462 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
8463 objcopy to generate incorrect binary files (binutils
8464 2.17.50.0.18-1 as shipped by Fedora 8).
8465 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8466 linking, so that build ID doesn't break the test.
8467
7361cfe6 84682007-11-24 Pavel Roskin <proski@gnu.org>
8469
8470 * include/grub/i386/time.h: use "void" in the argument list
8471 of grub_cpu_idle().
8472 * include/grub/powerpc/time.h: Likewise.
8473 * include/grub/sparc64/time.h: Likewise.
8474
1593e10c 84752007-11-18 Christian Franke <franke@computer.org>
8476
8477 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8478 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8479 This fixes the problem that function keys did not work in grub-emu.
8480
3b8db1a8 84812007-11-18 Christian Franke <franke@computer.org>
8482
8483 * disk/host.c (grub_host_open): Remove attribute unused from
8484 name parameter. Add check for "host". This fixes the problem
8485 that grub-emu does not find partitions.
8486
2e29408d 84872007-11-18 Christian Franke <franke@computer.org>
8488
8489 * util/hostfs.c (is_dir): New function.
8490 (grub_hostfs_dir): Handle missing dirent.d_type case.
8491 (grub_hostfs_read): Add missing fseek().
8492 (grub_hostfs_label): Clear label pointer. This fixes a crash
8493 of grub-emu on "ls (host)".
8494
398cd047 84952007-11-18 Christian Franke <franke@computer.org>
8496
8497 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8498 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8499 to 64 bit boundary by default.
8500
c405c391 85012007-11-18 Bean <bean123ch@gmail.com>
8502
8503 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8504 (hexdump_mod_SOURCES): New variable.
8505 (hexdump_mod_CFLAGS): Likewise.
8506 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 8507
c405c391 8508 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8509
8510 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8511
8512 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8513
8514 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8515
8516 * include/grub/hexdump.h: New file.
8517
8518 * commands/hexdump.c: New file.
8519
5cced7fd 85202007-11-10 Robert Millan <rmh@aybabtu.com>
8521
8522 * commands/i386/pc/play.c (beep_off): Switch order of arguments
8523 in grub_outb() calls.
8524 (beep_on): Likewise.
8525
8b714eb0 85262007-11-10 Christian Franke <franke@computer.org>
8527
8528 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8529 (grub_menu_run): Likewise.
8530
ce0f1839 85312007-11-10 Robert Millan <rmh@aybabtu.com>
8532
8533 * include/grub/i386/efi/machine.h: New file.
8534 * include/grub/i386/linuxbios/machine.h: Likewise.
8535 * include/grub/i386/pc/machine.h: Likewise.
8536 * include/grub/powerpc/ieee1275/machine.h: Likewise.
8537 * include/grub/sparc64/ieee1275/machine.h: Likewise.
8538
8539 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8540 (serial_hw_io_addr): New variable.
8541 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8542 instead of `(unsigned short *) 0x400'.
8543
270c237d 85442007-11-10 Bean <bean123ch@gmail.com>
8545
8546 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8547
a87783bf 85482007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8549
8550 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8551 (vga_mod_SOURCES): Added.
8552 (vga_mod_CFLAGS): Likewise.
8553 (vga_mod_LDFLAGS): Likewise.
8554
8555 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8556 grub_outb() calls.
8557 (set_map_mask): Likewise.
8558 (set_read_map): Likewise.
8559 (set_read_address): Likewise.
8560 (vga_font): Removed variable.
8561 (get_vga_glyph): Removed function.
8562 (invalidate_char): Likewise.
8563 (write_char): Changed to use grub_font_get_glyph() for font
8564 information.
8565 (grub_vga_putchar): Likewise.
8566 (grub_vga_getcharwidth): Likewise.
8567
6433b448 85682007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8569
8570 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8571 flags.
8572 (pxeboot_img_LDFLAGS): Likewise.
8573 (diskboot_img_LDFLAGS): Likewise.
8574 (kernel_img_LDFLAGS): Likewise.
8575
49178511 85762007-11-06 Robert Millan <rmh@aybabtu.com>
8577
8578 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8579 in grub_outb() calls.
8580 (serial_hw_init): Likewise.
8581
53b052de 85822007-11-05 Robert Millan <rmh@aybabtu.com>
8583
8584 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8585 spaces. Skip non-regular files.
8586
5ab33bba 85872007-11-05 Robert Millan <rmh@aybabtu.com>
8588
8589 * kern/disk.c (grub_disk_firmware_fini)
8590 (grub_disk_firmware_is_tainted): New variables.
8591
8592 * include/grub/disk.h (grub_disk_firmware_fini)
8593 (grub_disk_firmware_is_tainted): Likewise.
8594
8595 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8596 (grub_disk_biosdisk_fini): ... to here.
8597 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8598 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8599 is set. Register grub_disk_biosdisk_fini() in
8600 `grub_disk_firmware_fini'.
8601
8602 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8603 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8604 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8605 to finish existing firmware disk interface.
8606
8607 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8608 (ata_mod_SOURCES): New variable.
8609 (ata_mod_CFLAGS): Likewise.
8610 (ata_mod_LDFLAGS): Likewise.
8611
0149ab7c 86122007-11-05 Robert Millan <rmh@aybabtu.com>
8613
8614 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
8615 (grub_ata_wait): Reimplement using grub_millisleep().
8616
8617 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8618 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8619
be7ac41e 86202007-11-03 Marco Gerards <marco@gnu.org>
8621
8622 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8623 (CRTC_ADDR_PORT): New macro.
8624 (CRTC_DATA_PORT): Likewise.
8625 (CRTC_CURSOR): Likewise.
8626 (CRTC_CURSOR_ADDR_HIGH): Likewise.
8627 (CRTC_CURSOR_ADDR_LOW): Likewise.
8628 (update_cursor): New function.
8629 (grub_console_real_putchar): Call `update_cursor'.
8630 (grub_console_gotoxy): Likewise.
8631 (grub_console_cls): Set the default color when clearing the
8632 screen.
8633 (grub_console_setcursor): Implemented.
8634
bb06ab2e 86352007-11-03 Marco Gerards <marco@gnu.org>
8636
8637 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8638 become activate.
8639 (grub_ata_pio_write): Likewise.
8640
8641 (grub_atapi_identify): Wait after issuing an ATA command.
8642 (grub_atapi_packet): Likewise.
8643 (grub_ata_identify): Likewise.
8644 (grub_ata_readwrite): Likewise.
8645
cf8f780b 86462007-11-03 Marco Gerards <marco@gnu.org>
8647
8648 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8649 (grub_ata_pio_write): Likewise.
8650 (grub_ata_readwrite): Use `grub_error', instead of
8651 returning `grub_errno'.
8652
ed649e54 86532007-11-03 Marco Gerards <marco@gnu.org>
8654
8655 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8656 grub_ata_pio_write once for every single sector, instead of for
8657 multiple sectors.
8658
ca25d8f0 86592007-10-31 Robert Millan <rmh@aybabtu.com>
8660
8661 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8662
8663 * conf/i386-linuxbios.rmk: New file.
8664
8665 * kern/i386/pc/hardware.c: Likewise.
8666 * term/i386/pc/at_keyboard.c: Likewise.
8667 * term/i386/pc/vga_text.c: Likewise.
8668
8669 * include/grub/i386/linuxbios/boot.h: Likewise.
8670 * include/grub/i386/linuxbios/console.h: Likewise.
8671 * include/grub/i386/linuxbios/init.h: Likewise.
8672 * include/grub/i386/linuxbios/kernel.h: Likewise.
8673 * include/grub/i386/linuxbios/loader.h: Likewise.
8674 * include/grub/i386/linuxbios/memory.h: Likewise.
8675 * include/grub/i386/linuxbios/serial.h: Likewise.
8676 * include/grub/i386/linuxbios/time.h: Likewise.
8677
8678 * kern/i386/linuxbios/init.c: Likewise.
8679 * kern/i386/linuxbios/startup.S: Likewise.
8680 * kern/i386/linuxbios/table.c: Likewise.
8681
e911ecc1 86822007-10-31 Marco Gerards <marco@gnu.org>
8683
8684 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8685 (ata_mod_SOURCES): New variable.
8686 (ata_mod_CFLAGS): Likewise.
8687 (ata_mod_LDFLAGS): Likewise.
8688
8689 * disk/ata.c: New file.
8690
8691 * include/grub/disk.h (grub_disk_dev_id): Add
8692 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 8693
7f66d0e0 86942007-10-31 Robert Millan <rmh@aybabtu.com>
8695
8696 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8697 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8698
8699 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8700 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8701
8702 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8703 `<grub/types.h>'.
8704
8705 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8706
5cd7dd46 87072007-10-27 Robert Millan <rmh@aybabtu.com>
8708
3236ca65 8709 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 8710
2ebfc90f 87112007-10-22 Robert Millan <rmh@aybabtu.com>
8712
8713 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
8714 `"../realmode.S"'.
8715 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
8716
73fcb0f3 87172007-10-22 Robert Millan <rmh@aybabtu.com>
8718
8719 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8720 (pkgdata_MODULES): Add `biosdisk.mod'.
8721 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8722 variables.
8723
8724 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8725 (grub_biosdisk_init): Replace with ...
8726 (GRUB_MOD_INIT(biosdisk)): ... this.
8727 (grub_biosdisk_fini): Replace with ...
8728 (GRUB_MOD_FINI(biosdisk)): ... this.
8729
8730 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8731 (grub_machine_init): Remove call to grub_biosdisk_init().
8732 (grub_machine_fini): Remove call to grub_machine_fini().
8733
8734 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8735
3381d274 87362007-10-22 Robert Millan <rmh@aybabtu.com>
8737
8738 * include/grub/time.h: New file.
8739 * include/grub/i386/time.h: Likewise.
8740 * include/grub/powerpc/time.h: Likewise.
8741 * include/grub/sparc64/time.h: Likewise.
8742
8743 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
8744 instances to ...
8745 (KERNEL_MACHINE_TIME_HEADER): ... this.
8746 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8747 instances to ...
8748 (KERNEL_MACHINE_TIME_HEADER): ... this.
8749 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8750 instances to ...
8751 (KERNEL_MACHINE_TIME_HEADER): ... this.
8752
8753 * kern/i386/efi/init.c: Include `<grub/time.h>'.
8754 (grub_millisleep): New function.
8755 * kern/i386/pc/init.c: Include `<grub/time.h>'.
8756 (grub_millisleep): New function.
8757 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
8758 Remove `grub/machine/time.h' include.
8759 (grub_millisleep): New function.
8760 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
8761 Remove `grub/machine/time.h' include.
8762 (grub_millisleep): New function.
8763
8764 * include/grub/misc.h (grub_div_roundup): New function.
8765
8766 * kern/misc.c: Include `<grub/time.h>'.
8767 (grub_millisleep_generic): New function.
8768
8769 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
8770 Add `time.h'.
8771 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
8772 Add `time.h'.
8773 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
8774 `machine/time.h'. Add `time.h'.
8775 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8776
a39a0312 87772007-10-21 Robert Millan <rmh@aybabtu.com>
8778
8779 * include/grub/misc.h (grub_max): New function.
8780
2aad70e2 87812007-10-21 Robert Millan <rmh@aybabtu.com>
8782
8783 * util/misc.c (grub_util_info): Call fflush() before returning.
8784
54b71c4b 87852007-10-20 Robert Millan <rmh@aybabtu.com>
8786
8787 * genmk.rb (Image): Copy `extra_flags' from here ...
8788 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
8789
8790 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
8791 to `argc' and `args' arguments.
8792
a979f513 87932007-10-17 Robert Millan <rmh@aybabtu.com>
8794
8795 * kern/i386/loader.S: New file.
8796
8797 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
8798 * kern/i386/loader.S (grub_linux_prot_size)... to here.
8799 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
8800 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
8801 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
8802 * kern/i386/loader.S (grub_linux_real_addr)... to here.
8803 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
8804 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
8805 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
8806 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
8807 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
8808 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
8809 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
8810 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
8811
8812 * kern/i386/realmode.S: New file.
8813
8814 * kern/i386/pc/startup.S (protstack): Moved from here ...
8815 * kern/i386/realmode.S (protstack)... to here.
8816 * kern/i386/pc/startup.S (gdt): Moved from here ...
8817 * kern/i386/realmode.S (gdt)... to here.
8818 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
8819 * kern/i386/realmode.S (prot_to_real)... to here.
8820
8821 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
8822 `kern/i386/realmode.S'.
8823
825fc8fd 88242007-10-17 Robert Millan <rmh@aybabtu.com>
8825
8826 * include/grub/i386/loader.h: New file.
8827
8828 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
8829 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8830 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8831 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8832 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
8833 * include/grub/i386/loader.h (grub_linux_prot_size)
8834 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8835 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8836 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8837 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
8838
8839 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
8840
e179b2f4 88412007-10-15 Robert Millan <rmh@aybabtu.com>
8842
8843 * normal/misc.c (grub_normal_print_device_info): Do not probe for
8844 filesystem when dev->disk is unset.
8845 Do probe for filesystem even when dev->disk->has_partitions is set.
8846 In case a filesystem is found, always report it.
8847 In case it isn't, if dev->disk->has_partitions is set, report that
8848 a partition table was found instead of reporting that no filesystem
8849 could be identified.
8850
5db82af6 88512007-10-12 Robert Millan <rmh@aybabtu.com>
8852
8853 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
8854 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
8855
68f6ac74 8856 * include/grub/types.h (grub_host_to_target16): New macro.
8857 (grub_host_to_target32): Likewise.
8858 (grub_host_to_target64): Likewise.
8859 (grub_target_to_host16): Likewise.
8860 (grub_target_to_host32): Likewise.
8861 (grub_target_to_host64): Likewise.
5db82af6 8862
8863 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8864 Renamed from to ...
8865 (GRUB_MOD_ALIGN): ...this. Update all users.
8866
68f6ac74 8867 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
8868 grub_host_to_target32.
8869 Replace grub_be_to_cpu32 with grub_target_to_host32.
8870 (load_modules): Likewise.
8871 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
8872 Replace grub_be_to_cpu32 with grub_target_to_host32.
8873 Replace grub_cpu_to_be16 with grub_host_to_target16.
8874 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 8875
3cf497cc 88762007-10-12 Robert Millan <rmh@aybabtu.com>
8877
8878 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
8879 * util/elf/grub-mkimage.c: ... here.
8880
8881 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
8882 `util/powerpc/ieee1275/grub-mkimage.c'.
8883
c8cc3692 88842007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 8885
c8cc3692 8886 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
8887 and make it easier to figure out.
8888 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
8889 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
8890 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
8891 leave us with less than HEAP_MIN_SIZE total heap.
8892 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 8893
5c58b791 88942007-10-03 Robert Millan <rmh@aybabtu.com>
8895
8896 * include/grub/i386/io.h: New file.
8897 * commands/i386/pc/play.c (inb): Removed.
8898 (outb): Removed.
8899 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8900 with grub_outb().
afcd2ef8 8901 * term/i386/pc/serial.c (inb): Removed.
8902 (outb): Removed.
8903 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8904 with grub_outb().
8905 * term/i386/pc/vga.c (inb): Removed.
8906 (outb): Removed.
8907 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8908 with grub_outb().
5c58b791 8909
1a477ed6 89102007-10-02 Robert Millan <rmh@aybabtu.com>
8911
8912 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
8913 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8914 Reported by Marcin Kurek.
8915
6b5d80fa 89162007-09-07 Robert Millan <rmh@aybabtu.com>
8917
8918 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
8919 SmartFirmware version updates (as released by Sven Luther), and avoid
8920 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
8921 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
8922 known broken.
8923
5618afbf 89242007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8925
8926 From Hitoshi Ozeki:
8927 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
8928 when merging two regions.
8929
6139dcd9 89302007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8931
508e39ee 8932 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
8933 * normal/completion.c (grub_normal_do_completion): Likewise.
8934 Reported by Hitoshi Ozeki.
8935
89362007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 8937
6139dcd9 8938 Do not use devices at boot in chainloading.
f19dbdb7 8939
6139dcd9 8940 * loader/i386/pc/chainloader.c (boot_drive): New variable.
8941 (boot_part_addr): Likewise.
8942 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
8943 with BOOT_DRIVE and BOOT_PART_ADDR.
8944 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
8945 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
8946
38da6516 89472007-08-29 Robert Millan <rmh@aybabtu.com>
8948
8949 Patch from Simon Peter <dn.tlp@gmx.net>:
8950 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
8951 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
8952 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
8953 util/i386/pc/grub-setup.c_DEPENDENCIES.
8954 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
8955 util/grub-probe.c_DEPENDENCIES.
8956 * conf/powerpc-ieee1275.rmk: Likewise.
8957
29d0928c 89582007-08-28 Robert Millan <rmh@aybabtu.com>
8959
8960 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
8961 to tell grub-mkdevicemap how to name devices.
8962 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
8963 feature).
8964
8965 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
8966 util/i386/get_disk_name.c.
8967 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
8968 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
8969 util/ieee1275/get_disk_name.c.
8970
8971 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
8972
8973 * DISTLIST: Add util/i386/get_disk_name.c and
8974 util/ieee1275/get_disk_name.c.
8975
8976 * util/grub-mkdevicemap.c: Replace device naming logic with
8977 grub_util_get_disk_name() calls.
8978
5a0d3cca 89792007-08-20 Robert Millan <rmh@aybabtu.com>
8980
8981 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
8982 (so that it works for both plural and singular quantities).
8983
8b72db2f 89842007-08-05 Robert Millan <rmh@aybabtu.com>
8985
8986 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
8987 so that [xz] isn't taken into account when determining order.
8988
352466bf 89892007-08-02 Marco Gerards <marco@gnu.org>
8990
8991 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
8992 `include/multiboot2.h', `include/grub/elfload.h',
8993 `include/multiboot.h', `include/grub/multiboot.h',
8994 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
8995 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
8996 `kern/elf.c', `loader/multiboot_loader.c',
8997 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
8998 `loader/i386/pc/multiboot2.c',
8999 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9000 `util/i386/pc/grub-mkrescue.in'. Remove
9001 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9002 `include/grub/i386/pc/util/biosdisk.h' and
9003 `include/grub/powerpc/ieee1275/multiboot.h'.
9004
8f096014 90052007-08-02 Bean <bean123ch@gmail.com>
9006
9007 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9008 (ntfs_mod_SOURCES): New variable.
9009 (ntfs_mod_CFLAGS): Likewise.
9010 (ntfs_mod_LDFLAGS): Likewise.
9011
9012 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9013 (grub_probe_SOURCES): Likewise.
9014 (grub_emu_SOURCES): Likewise.
9015
9016 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9017 (grub_emu_SOURCES): Likewise.
9018
9019 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9020 (grub_emu_SOURCES): Likewise.
f19dbdb7 9021
8f096014 9022 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9023
9024 * fs/ntfs.c: New file.
9025
9959f7db 90262007-08-02 Bean <bean123ch@gmail.com>
9027
9028 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9029
9030 * file.h (grub_file): Likewise.
9031
9032 * fshelp.h (grub_fshelp_read_file): Likewise.
9033
9034 * util/i386/pc/grub-setup.c (setup): Likewise.
9035 (save_first_sector): Likewise.
9036 (save_blocklists): Likewise.
f19dbdb7 9037
9959f7db 9038 * fs/affs.c (grub_affs_read_file): Likewise.
9039
9040 * fs/ext2.c (grub_ext2_read_file): Likewise.
9041
9042 * fs/fat.c (grub_fat_read_data): Likewise.
9043
9044 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9045
9046 * fs/hfs.c (grub_hfs_read_file): Likewise.
9047
9048 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9049
9050 * fs/jfs.c (grub_jfs_read_file): Likewise.
9051
9052 * fs/minix.c (grub_minix_read_file): Likewise.
9053
9054 * fs/sfs.c (grub_sfs_read_file): Likewise.
9055
9056 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 9057
9959f7db 9058 * fs/xfs.c (grub_xfs_read_file): Likewise.
9059
9060 * command/blocklist.c (read_blocklist): Likewise.
9061 (print_blocklist): Likewise.
9062
0a203f83 90632007-08-02 Marco Gerards <marco@gnu.org>
9064
9065 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9066 `util/hostfs.c'.
9067
9068 * disk/host.c: New file.
9069
9070 * util/hostfs.c: Likewise.
9071
9072 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9073 return `GRUB_ERR_BAD_FS'.
9074 * fs/sfs.c (grub_sfs_mount): Likewise.
9075 * fs/xfs.c (grub_xfs_mount): Likewise.
9076
9077 * include/grub/disk.h (enum grub_disk_dev_id): Add
9078 `GRUB_DISK_DEVICE_HOST_ID'.
9079
9080 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9081
e5dfe777 90822007-07-24 Jerone Young <jerone@gmail.com>
9083
f19dbdb7 9084 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 9085 modules for compilation.
9086 * conf/powerpc-ieee1275.rmk: Likewise.
9087
9088 * include/multiboot.h: Move multiboot definitions to one file. Rename
9089 many definitions to not get grub specific.
9090 * include/multiboot2.h: Create header with multiboot 2 definitions.
9091 * include/grub/multiboot.h: Header for grub specific function
9092 prototypes and definitions.
9093 * include/grub/multiboot2.h: Likewise.
9094 * include/grub/multiboot_loader.h: Likewise.
9095 * include/grub/i386/pc/multiboot.h: Removed.
9096 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9097
9098 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9099 and 2 to allow for one multiboot and module commands.
9100 * loader/multiboot2.c: Add multiboot2 functionality.
9101 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9102 and definition names.
9103 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9104 2 functions.
9105 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9106 ieee1275 specific multiboot2 code.
9107
9108 * kern/i386/pc/startup.S: Change headers and definition names for
9109 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9110
daf0f0ba 91112007-07-22 Robert Millan <rmh@aybabtu.com>
9112
9113 * geninitheader.sh: Process file specified in first parameter rather
9114 than hardcoding grub_modules_init.lst.
fe6b695a 9115 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 9116 than hardcoding grub_modules_init.h.
9117
9118 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9119 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9120 grub_probe_init.[ch] and grub_setup_init.[ch].
9121
9122 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9123 grub_modules_init.h with grub_emu_init.h.
9124 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9125 grub_probe_init.[ch] files.
9126 * conf/i386-efi.rmk: Likewise.
9127 * conf/i386-pc.rmk: Likewise.
9128 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9129 grub_setup_init.[ch] files.
9130
9131 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9132 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9133 to initialize modules rather than a list of hardcoded functions.
9134 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9135 grub_init_all() to initialize modules rather than a list of hardcoded
9136 functions.
9137
54cdc1cc 91382007-07-22 Robert Millan <rmh@aybabtu.com>
9139
9140 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9141 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9142
ad0686cc 91432007-07-22 Robert Millan <rmh@aybabtu.com>
9144
9145 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9146 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9147 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9148 flag when running on SmartFirmware.
9149 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9150 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9151 was set.
9152
9153 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9154 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9155 rather than decreasing it.
9156
9157 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9158 there's not enough space to do it, fail in the same way as when it
9159 can't be done because there are no partitions.
9160
9161 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9162 when nvsetenv failed.
9163
969c02ec 91642007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9165
9166 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9167 because this rule is automatically generated.
9168 (grub-mkrescue): Removed for the same reason as above.
9169
5a79f472 91702007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9171
9172 Migrate to GNU General Public License Version 3.
f19dbdb7 9173
5a79f472 9174 * COPYING: Replaced with the plain text version of GPLv3.
9175
9176 * config.guess: Updated from gnulib.
9177 * config.sub: Likewise.
9178
9179 * geninit.sh: Output a GPLv3 copyright notice.
9180 * geninitheader.sh: Likewise.
9181 * genmodsrc.sh: Likewise.
9182 * gensymlist.sh.in: Likewise.
9183
9184 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9185 * boot/i386/pc/diskboot.S: Likewise.
9186 * boot/i386/pc/pxeboot.S: Likewise.
9187 * commands/blocklist.c: Likewise.
9188 * commands/boot.c: Likewise.
9189 * commands/cat.c: Likewise.
9190 * commands/cmp.c: Likewise.
9191 * commands/configfile.c: Likewise.
9192 * commands/echo.c: Likewise.
9193 * commands/help.c: Likewise.
9194 * commands/ls.c: Likewise.
9195 * commands/search.c: Likewise.
9196 * commands/terminal.c: Likewise.
9197 * commands/test.c: Likewise.
9198 * commands/videotest.c: Likewise.
9199 * commands/i386/cpuid.c: Likewise.
9200 * commands/i386/pc/halt.c: Likewise.
9201 * commands/i386/pc/play.c: Likewise.
9202 * commands/i386/pc/reboot.c: Likewise.
9203 * commands/i386/pc/vbeinfo.c: Likewise.
9204 * commands/i386/pc/vbetest.c: Likewise.
9205 * commands/ieee1275/halt.c: Likewise.
9206 * commands/ieee1275/reboot.c: Likewise.
9207 * commands/ieee1275/suspend.c: Likewise.
9208 * disk/loopback.c: Likewise.
9209 * disk/lvm.c: Likewise.
9210 * disk/raid.c: Likewise.
9211 * disk/efi/efidisk.c: Likewise.
9212 * disk/i386/pc/biosdisk.c: Likewise.
9213 * disk/ieee1275/ofdisk.c: Likewise.
9214 * font/manager.c: Likewise.
9215 * fs/affs.c: Likewise.
9216 * fs/ext2.c: Likewise.
9217 * fs/fat.c: Likewise.
9218 * fs/fshelp.c: Likewise.
9219 * fs/hfs.c: Likewise.
9220 * fs/hfsplus.c: Likewise.
9221 * fs/iso9660.c: Likewise.
9222 * fs/jfs.c: Likewise.
9223 * fs/minix.c: Likewise.
9224 * fs/sfs.c: Likewise.
9225 * fs/ufs.c: Likewise.
9226 * fs/xfs.c: Likewise.
9227 * hello/hello.c: Likewise.
9228 * include/grub/acorn_filecore.h: Likewise.
9229 * include/grub/arg.h: Likewise.
9230 * include/grub/bitmap.h: Likewise.
9231 * include/grub/boot.h: Likewise.
9232 * include/grub/cache.h: Likewise.
9233 * include/grub/device.h: Likewise.
9234 * include/grub/disk.h: Likewise.
9235 * include/grub/dl.h: Likewise.
9236 * include/grub/elfload.h: Likewise.
9237 * include/grub/env.h: Likewise.
9238 * include/grub/err.h: Likewise.
9239 * include/grub/file.h: Likewise.
9240 * include/grub/font.h: Likewise.
9241 * include/grub/fs.h: Likewise.
9242 * include/grub/fshelp.h: Likewise.
9243 * include/grub/gzio.h: Likewise.
9244 * include/grub/hfs.h: Likewise.
9245 * include/grub/kernel.h: Likewise.
9246 * include/grub/loader.h: Likewise.
9247 * include/grub/lvm.h: Likewise.
9248 * include/grub/misc.h: Likewise.
9249 * include/grub/mm.h: Likewise.
9250 * include/grub/net.h: Likewise.
9251 * include/grub/normal.h: Likewise.
9252 * include/grub/parser.h: Likewise.
9253 * include/grub/partition.h: Likewise.
9254 * include/grub/pc_partition.h: Likewise.
9255 * include/grub/raid.h: Likewise.
9256 * include/grub/rescue.h: Likewise.
9257 * include/grub/script.h: Likewise.
9258 * include/grub/setjmp.h: Likewise.
9259 * include/grub/symbol.h: Likewise.
9260 * include/grub/term.h: Likewise.
9261 * include/grub/terminfo.h: Likewise.
9262 * include/grub/tparm.h: Likewise.
9263 * include/grub/types.h: Likewise.
9264 * include/grub/video.h: Likewise.
9265 * include/grub/efi/api.h: Likewise.
9266 * include/grub/efi/chainloader.h: Likewise.
9267 * include/grub/efi/console.h: Likewise.
9268 * include/grub/efi/console_control.h: Likewise.
9269 * include/grub/efi/disk.h: Likewise.
9270 * include/grub/efi/efi.h: Likewise.
9271 * include/grub/efi/pe32.h: Likewise.
9272 * include/grub/efi/time.h: Likewise.
9273 * include/grub/i386/linux.h: Likewise.
9274 * include/grub/i386/setjmp.h: Likewise.
9275 * include/grub/i386/types.h: Likewise.
9276 * include/grub/i386/efi/kernel.h: Likewise.
9277 * include/grub/i386/efi/loader.h: Likewise.
9278 * include/grub/i386/efi/time.h: Likewise.
9279 * include/grub/i386/pc/biosdisk.h: Likewise.
9280 * include/grub/i386/pc/boot.h: Likewise.
9281 * include/grub/i386/pc/chainloader.h: Likewise.
9282 * include/grub/i386/pc/console.h: Likewise.
9283 * include/grub/i386/pc/init.h: Likewise.
9284 * include/grub/i386/pc/kernel.h: Likewise.
9285 * include/grub/i386/pc/loader.h: Likewise.
9286 * include/grub/i386/pc/memory.h: Likewise.
9287 * include/grub/i386/pc/multiboot.h: Likewise.
9288 * include/grub/i386/pc/serial.h: Likewise.
9289 * include/grub/i386/pc/time.h: Likewise.
9290 * include/grub/i386/pc/vbe.h: Likewise.
9291 * include/grub/i386/pc/vbeblit.h: Likewise.
9292 * include/grub/i386/pc/vbefill.h: Likewise.
9293 * include/grub/i386/pc/vbeutil.h: Likewise.
9294 * include/grub/i386/pc/vga.h: Likewise.
9295 * include/grub/ieee1275/ieee1275.h: Likewise.
9296 * include/grub/ieee1275/ofdisk.h: Likewise.
9297 * include/grub/powerpc/libgcc.h: Likewise.
9298 * include/grub/powerpc/setjmp.h: Likewise.
9299 * include/grub/powerpc/types.h: Likewise.
9300 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9301 * include/grub/powerpc/ieee1275/console.h: Likewise.
9302 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9303 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9304 * include/grub/powerpc/ieee1275/loader.h: Likewise.
9305 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9306 * include/grub/powerpc/ieee1275/time.h: Likewise.
9307 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9308 * include/grub/sparc64/libgcc.h: Likewise.
9309 * include/grub/sparc64/setjmp.h: Likewise.
9310 * include/grub/sparc64/types.h: Likewise.
9311 * include/grub/sparc64/ieee1275/console.h: Likewise.
9312 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9313 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9314 * include/grub/sparc64/ieee1275/time.h: Likewise.
9315 * include/grub/util/biosdisk.h: Likewise.
9316 * include/grub/util/getroot.h: Likewise.
9317 * include/grub/util/lvm.h: Likewise.
9318 * include/grub/util/misc.h: Likewise.
9319 * include/grub/util/raid.h: Likewise.
9320 * include/grub/util/resolve.h: Likewise.
9321 * io/gzio.c: Likewise.
9322 * kern/device.c: Likewise.
9323 * kern/disk.c: Likewise.
9324 * kern/dl.c: Likewise.
9325 * kern/elf.c: Likewise.
9326 * kern/env.c: Likewise.
9327 * kern/err.c: Likewise.
9328 * kern/file.c: Likewise.
9329 * kern/fs.c: Likewise.
9330 * kern/loader.c: Likewise.
9331 * kern/main.c: Likewise.
9332 * kern/misc.c: Likewise.
9333 * kern/mm.c: Likewise.
9334 * kern/parser.c: Likewise.
9335 * kern/partition.c: Likewise.
9336 * kern/rescue.c: Likewise.
9337 * kern/term.c: Likewise.
9338 * kern/efi/efi.c: Likewise.
9339 * kern/efi/init.c: Likewise.
9340 * kern/efi/mm.c: Likewise.
9341 * kern/i386/dl.c: Likewise.
9342 * kern/i386/efi/init.c: Likewise.
9343 * kern/i386/efi/startup.S: Likewise.
9344 * kern/i386/pc/init.c: Likewise.
9345 * kern/i386/pc/lzo1x.S: Likewise.
9346 * kern/i386/pc/startup.S: Likewise.
9347 * kern/ieee1275/ieee1275.c: Likewise.
9348 * kern/powerpc/cache.S: Likewise.
9349 * kern/powerpc/dl.c: Likewise.
9350 * kern/powerpc/ieee1275/cmain.c: Likewise.
9351 * kern/powerpc/ieee1275/crt0.S: Likewise.
9352 * kern/powerpc/ieee1275/init.c: Likewise.
9353 * kern/powerpc/ieee1275/openfw.c: Likewise.
9354 * kern/sparc64/cache.S: Likewise.
9355 * kern/sparc64/dl.c: Likewise.
9356 * kern/sparc64/ieee1275/init.c: Likewise.
9357 * kern/sparc64/ieee1275/openfw.c: Likewise.
9358 * loader/efi/chainloader.c: Likewise.
9359 * loader/efi/chainloader_normal.c: Likewise.
9360 * loader/i386/efi/linux.c: Likewise.
9361 * loader/i386/efi/linux_normal.c: Likewise.
9362 * loader/i386/pc/chainloader.c: Likewise.
9363 * loader/i386/pc/chainloader_normal.c: Likewise.
9364 * loader/i386/pc/linux.c: Likewise.
9365 * loader/i386/pc/linux_normal.c: Likewise.
9366 * loader/i386/pc/multiboot.c: Likewise.
9367 * loader/i386/pc/multiboot_normal.c: Likewise.
9368 * loader/powerpc/ieee1275/linux.c: Likewise.
9369 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9370 * normal/arg.c: Likewise.
9371 * normal/cmdline.c: Likewise.
9372 * normal/command.c: Likewise.
9373 * normal/completion.c: Likewise.
9374 * normal/execute.c: Likewise.
9375 * normal/function.c: Likewise.
9376 * normal/lexer.c: Likewise.
9377 * normal/main.c: Likewise.
9378 * normal/menu.c: Likewise.
9379 * normal/menu_entry.c: Likewise.
9380 * normal/misc.c: Likewise.
9381 * normal/parser.y: Likewise.
9382 * normal/script.c: Likewise.
9383 * normal/i386/setjmp.S: Likewise.
9384 * normal/powerpc/setjmp.S: Likewise.
9385 * normal/sparc64/setjmp.S: Likewise.
9386 * partmap/acorn.c: Likewise.
9387 * partmap/amiga.c: Likewise.
9388 * partmap/apple.c: Likewise.
9389 * partmap/gpt.c: Likewise.
9390 * partmap/pc.c: Likewise.
9391 * partmap/sun.c: Likewise.
9392 * term/gfxterm.c: Likewise.
9393 * term/terminfo.c: Likewise.
9394 * term/efi/console.c: Likewise.
9395 * term/i386/pc/console.c: Likewise.
9396 * term/i386/pc/serial.c: Likewise.
9397 * term/i386/pc/vesafb.c: Likewise.
9398 * term/i386/pc/vga.c: Likewise.
9399 * term/ieee1275/ofconsole.c: Likewise.
9400 * util/biosdisk.c: Likewise.
9401 * util/console.c: Likewise.
9402 * util/genmoddep.c: Likewise.
9403 * util/getroot.c: Likewise.
9404 * util/grub-emu.c: Likewise.
9405 * util/grub-mkdevicemap.c: Likewise.
9406 * util/grub-probe.c: Likewise.
9407 * util/lvm.c: Likewise.
9408 * util/misc.c: Likewise.
9409 * util/raid.c: Likewise.
9410 * util/resolve.c: Likewise.
9411 * util/update-grub.in: Likewise.
9412 * util/update-grub_lib.in: Likewise.
9413 * util/grub.d/00_header.in: Likewise.
9414 * util/grub.d/10_hurd.in: Likewise.
9415 * util/grub.d/10_linux.in: Likewise.
9416 * util/i386/efi/grub-install.in: Likewise.
9417 * util/i386/efi/grub-mkimage.c: Likewise.
9418 * util/i386/pc/grub-install.in: Likewise.
9419 * util/i386/pc/grub-mkimage.c: Likewise.
9420 * util/i386/pc/grub-mkrescue.in: Likewise.
9421 * util/i386/pc/grub-setup.c: Likewise.
9422 * util/i386/pc/misc.c: Likewise.
9423 * util/powerpc/ieee1275/grub-install.in: Likewise.
9424 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9425 * util/powerpc/ieee1275/misc.c: Likewise.
9426 * video/bitmap.c: Likewise.
9427 * video/video.c: Likewise.
9428 * video/i386/pc/vbe.c: Likewise.
9429 * video/i386/pc/vbeblit.c: Likewise.
9430 * video/i386/pc/vbefill.c: Likewise.
9431 * video/i386/pc/vbeutil.c: Likewise.
9432 * video/readers/tga.c: Likewise.
9433
3572d015 94342007-07-02 Robert Millan <rmh@aybabtu.com>
9435
9436 * conf/i386-efi.rmk: Replace obsolete reference to
9437 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9438 with util/getroot.c.
9439 * conf/powerpc-ieee1275.rmk: Likewise.
9440 * conf/sparc64-ieee1275.rmk: Likewise.
9441
9442 * util/grub-emu.c (main): Fix unchecked pointer handling.
9443
2c2a681b 94442007-07-02 Robert Millan <rmh@aybabtu.com>
9445
9446 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9447 invocation to fail, in order to support partition-less media.
9448
9449 * util/i386/pc/grub-install.in: Likewise.
9450
9451 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9452 which fs or partmap modules are needed (akin to its sister scripts).
9453
9454 Also use grub-probe to get rid of unportable /proc/mounts check.
9455
9456 Print the same informational message that the other scripts do, before
fe6b695a 9457 exiting.
2c2a681b 9458
6193defe 94592007-06-23 Robert Millan <rmh@aybabtu.com>
9460
fe6b695a 9461 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 9462 a font file can be found and, if so, echo the GRUB path to it.
9463
9464 * util/update-grub.in: Handle multiple terminals depending on user
9465 input, platform availability and font file presence. Propagate
9466 variables of our findings to /etc/grub.d/ children.
9467
9468 * util/grub.d/00_header.in: Handle multiple terminals, based on
9469 environment setup by update-grub.
9470
eface1dc 94712007-06-23 Robert Millan <rmh@aybabtu.com>
9472
ba50d28f 9473 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 9474
bf697e28 94752007-06-21 Robert Millan <rmh@aybabtu.com>
9476
9477 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9478 indicate end of data section in kernel image.
9479 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9480 GRUB_KERNEL_MACHINE_DATA_END.
9481
9482 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9483 space for it.
9484 * kern/i386/efi/startup.S: Likewise.
9485
9486 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9487 during image generation. Implement --prefix option to override this
9488 patch.
9489 * util/i386/efi/grub-mkimage.c: Likewise.
9490
9491 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9492 code to make path relative to its root into a separate function.
9493
9494 * util/i386/pc/grub-install.in: Use newly provided
9495 make_system_path_relative_to_its_root() to convert ${grubdir}, then
9496 pass the result to grub-install --prefix.
9497
baa574b4 94982007-06-13 Robert Millan <rmh@aybabtu.com>
9499
9500 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9501 DEFAULT_DEVICE_MAP.
9502 * util/grub-emu.c: Use above definitions from misc.h instead of
9503 defining them.
9504 * util/grub-mkdevicemap.c: Likewise.
9505 * util/i386/pc/grub-setup.c: Likewise.
9506 * util/grub-probe.c: Likewise.
9507 (probe): Abort with grub_util_error() when either
9508 grub_guess_root_device or grub_util_get_grub_dev fails.
9509
0215dcbf 95102007-06-12 Robert Millan <rmh@aybabtu.com>
9511
9512 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9513 "pager" assignment.
9514 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9515 "pcdata".
9516 * util/grub-probe.c (probe): Likewise for "drive_name".
9517
8af2ab7b 95182007-06-11 Robert Millan <rmh@aybabtu.com>
9519
9520 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9521 not just the cdrom one.
9522
59d31694 95232007-06-11 Robert Millan <rmh@aybabtu.com>
9524
9525 * util/i386/pc/grub-mkrescue.in: Add "set -e".
9526 Add --pkglibdir=DIR option to override pkglibdir.
9527 Mention --image-type=TYPE in help output.
9528 Fix --grub-mkimage (it was a no-op).
fe6b695a 9529 Abort gracefully when no parameter is given.
59d31694 9530
7ee367e4 95312007-06-11 Robert Millan <rmh@aybabtu.com>
9532
9533 * util/i386/pc/grub-mkrescue.in: New file.
9534 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
9535 * Makefile.in: Handle bin_SCRIPTS.
9536
29b0ed46 95372007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
9538
9539 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9540 list of video modes.
9541
c0f90770 95422007-06-06 Robert Millan <rmh@aybabtu.com>
9543
9544 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9545 file doesn't exist, or if it is in a filesystem grub can't read.
9546
9547 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
9548 not abort if GRUB_DRIVE could not be defined. Rearrange generated
9549 header comment to fit in 80 columns when the variables are resolved.
9550
9551 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9552 could be identified by update-grub. Remove redundant check for
fe6b695a 9553 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 9554 handles that).
9555
fb36dc26 95562007-06-04 Robert Millan <rmh@aybabtu.com>
9557
9558 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9559
9560 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9561
9562 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9563
0c68c93e 95642007-06-04 Robert Millan <rmh@aybabtu.com>
9565
9566 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9567
9568 * include/grub/partition.h: Declare grub_apple_partition_map_init and
9569 grub_apple_partition_map_fini.
9570
9571 * util/biosdisk.c
9572 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9573 to access >2 TiB disks).
9574
9575 Print disk->total_sectors with %llu instead of %lu, since this
9576 variable is always 64-bit (prevents wrong disk size from being displayed
9577 on either >2 TiB disk or big-endian CPU).
9578
9579 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9580 into a generic case that supports all (sane) partition maps.
9581
9582 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9583 breaks big-endian.
9584
9585 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9586 and grub_apple_partition_map_fini() after that.
9587
0f23eb74 95882007-06-01 Robert Millan <rmh@aybabtu.com>
9589
9590 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9591
9592 * util/grub.d/00_header.in: Only enable gfxterm when
9593 convert_system_path_to_grub_path() succeeds.
9594
42c71976 95952007-05-20 Robert Millan <rmh@aybabtu.com>
9596
9597 * util/update-grub_lib.in: New file.
9598 * DISTLIST: Add update-grub_lib.in.
9599 * conf/common.rmk: Generate update-grub_lib and install it in
9600 $(lib_DATA).
9601 * Makefile.in: Add install routine for $(lib_DATA).
9602
9603 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9604 function provided by update-grub_lib to support arbitrary paths of
9605 unifont.pff.
9606 * util/update-grub.in: Use convert_system_path_to_grub_path() to
9607 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9608
5beb2291 96092007-05-19 Robert Millan <rmh@aybabtu.com>
9610
9611 * commands/i386/cpuid.c: New module.
9612 * DISTLIST: Add it.
9613 * conf/i386-efi.rmk: Enable cpuid.mod.
9614 * conf/i386-pc.rmk: Likewise.
9615
7262eca1 96162007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9617
9618 * kern/disk.c (grub_disk_read): Check return value of
9619 grub_realloc().
9620
260ba823 96212007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9622
9623 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9624 arrays.
9625 * disk/raid.c (grub_raid_open): Likewise.
9626
1ecb6cf2 96272007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9628
9629 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9630 stack instead of on the heap.
9631
9632 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9633 before doing a read on it.
9634
9635 * configure.ac: Only use -fno-stack-protector for the target
9636 environment.
f19dbdb7 9637
21c8cbb1 96382007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9639
9640 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9641 __attribute_ ((unused)) to mode_type argument.
9642
9643 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 9644
21c8cbb1 9645 * kern/misc.c (memcmp): Fix prototype.
9646
9647 * include/grub/partition.h [GRUB_UTIL]
9648 (grub_gpt_partition_map_init): Add prototype.
9649 (grub_gpt_partition_map_fini): Likewise.
9650
9651 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9652 at the right place.
9653
9654 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9655 (grub_fat_read_data): Likewise.
9656 (grub_fat_find_dir): Likewise.
9657
9658 * font/manager.c (find_glyph): Make table a const.
9659 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 9660
849d55d3 96612007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
9662
9663 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9664 code, first search for device in /dev/mapper, then in /dev.
9665 (grub_util_get_grub_dev): New function.
9666 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9667 prototype.
9668 * util/grub-probe.c (probe): Remove check for RAID, call
9669 grub_util_get_grub_dev() instead of
9670 grub_util_biosdisk_get_grub_dev().
9671 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9672 grub_util_biosdisk_get_grub_dev().
9673 * util/i386/pc/grub-setup.c (main): Likewise.
9674
8fff7c2f 96752007-05-16 Robert Millan <rmh@aybabtu.com>
9676
9677 * DISTLIST: Update for the latest changes.
9678 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9679 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9680 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9681 grub/util/biosdisk.h.
9682 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9683 grub/util/biosdisk.h.
9684
48e12b52 96852007-05-16 Robert Millan <rmh@aybabtu.com>
9686
9687 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9688
46b9d128 96892007-05-16 Robert Millan <rmh@aybabtu.com>
9690
9691 * util/i386/efi/grub-install.in: New.
9692 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9693 newly added grub-install.
9694 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9695 include.
9696 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9697 grub/util/biosdisk.h.
9698 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9699 grub/util/biosdisk.h.
9700
2d1a40a9 97012007-05-16 Robert Millan <rmh@aybabtu.com>
9702
9703 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9704 * include/grub/util/biosdisk.h: ... here.
9705 * util/i386/pc/biosdisk.c: Moved to ...
9706 * util/biosdisk.c: ... here.
9707 * util/i386/pc/getroot.c: Moved to ...
9708 * util/getroot.c: ... here.
9709 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9710 * util/grub-mkdevicemap.c: ... here.
9711 * util/i386/pc/grub-probe.c: Moved to ...
9712 * util/grub-probe.c: ... here.
9713
9e26e3bc 97142007-05-15 Robert Millan <rmh@aybabtu.com>
9715
9716 * util/update-grub.in: Remove duplicated line in grub.cfg header
9717 message.
9718
57f96397 97192007-05-13 Robert Millan <rmh@aybabtu.com>
9720
9721 * util/update-grub.in: Fix a few assumptions about the devices holding
9722 /, /boot and /boot/grub being the same.
9723 * util/grub.d/00_header.in: Likewise.
9724 * util/grub.d/10_hurd.in: Likewise.
9725 * util/grub.d/10_linux.in: Likewise.
9726
9727 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9728 patterns. Use that to define the `.old' suffix as older than `'.
9729
9730 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9731
9732 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9733 the grub.cfg header message.
9734
2e610d62 97352007-05-11 Robert Millan <rmh@aybabtu.com>
9736
9737 * util/update-grub.in: Create device.map if it doesn't already exist,
9738 before attempting to run grub-probe.
9739 Check for grub-probe and grub-mkdevicemap with the same code
9740 grub-install is using.
9741 Remove test mode.
9742
3f6a10ef 97432007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
9744
9745 * Makefile.in: Add the datarootdir autoconf variable.
9746
02e7b75e 97472007-05-09 Robert Millan <rmh@aybabtu.com>
9748
9749 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 9750 fail gracefully if dev->disk->partition == NULL.
02e7b75e 9751
75f396cc 97522007-05-07 Robert Millan <rmh@aybabtu.com>
9753
9754 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
9755 determine partition map module.
9756 * util/i386/pc/grub-install.in: Use this feature to decide which
9757 partition module to load, instead of hardcoding pc and gpt.
9758
da65cb36 97592007-05-07 Robert Millan <rmh@aybabtu.com>
9760
9761 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
9762 source directory differs from build directory.
9763
b57d6a91 97642007-05-05 Robert Millan <rmh@aybabtu.com>
9765
9766 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
9767 initialisation.
9768
509d00f1 97692007-05-05 Robert Millan <rmh@aybabtu.com>
9770
9771 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
9772
c48f23ef 97732007-05-05 Robert Millan <rmh@aybabtu.com>
9774
9775 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
9776 command-line arguments via ${GRUB_CMDLINE_LINUX}.
9777
20b97658 97782007-05-05 Robert Millan <rmh@aybabtu.com>
9779
9780 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
9781 (grub_probe_SOURCES): Likewise.
9782 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
9783 GPT and initialize dos_part and bsd_part accordingly.
9784 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
9785 install_bsd_part.
9786 (main): Activate gpt module for use during partition identification,
9787 and deactivate it afterwards.
9788 * util/i386/pc/grub-install.in: Add gpt module to core.img.
9789 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
9790 partition identification, and deactivate it afterwards.
9791
99123174 97922007-05-05 Robert Millan <rmh@aybabtu.com>
9793
9794 * term/i386/pc/console.c (grub_console_fini): Call
9795 grub_term_set_current() before grub_term_unregister().
9796
ebd97f6e 97972007-05-04 Robert Millan <rmh@aybabtu.com>
9798
9799 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
9800 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
9801 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
9802 and update-grub_DATA.
9803 * conf/common.rmk: Build and install update-grub components.
9804 * conf/common.mk: Regenerate.
9805 * util/update-grub.in: New. Core of update-grub.
9806 * util/grub.d/00_header.in: New. Generates grub.cfg header.
9807 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
9808 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
9809 * util/grub.d/README: New. Document grub.d directory layout.
9810
b06a264d 98112007-05-01 Robert Millan <rmh@aybabtu.com>
9812
9813 * util/grub-emu.c: Move initialization functions
9814 grub_util_biosdisk_init() and grub_init_all() before
9815 grub_util_biosdisk_get_grub_dev(), which relies on them.
9816
41f0050e 98172007-04-19 Robert Millan <rmh@aybabtu.com>
9818
9819 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
9820 it is used later.
9821
04582bb3 98222007-04-18 Jerone Young <jerone@gmail.com>
9823
f19dbdb7 9824 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 9825 stanza.
9826
08db4632 98272007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 9828
08db4632 9829 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
9830 continue on and look for device node with real device name.
9831
801b76be 98322007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 9833
fe6b695a 9834 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 9835 ability.
9836 * Makefile.in: Add autoconf package transformation code.
9837 * util/i386/pc/grub-install.in: Likewise.
9838 * util/powerpc/ieee1275/grub-install.in: Likewise.
9839
6795c4e1 98402007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9841
9842 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
9843 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
9844 (EXT2_REVISION): Likewise.
9845 (EXT2_INODE_SIZE): Likewise.
9846 (struct grub_ext2_block_group): Added a missing member
9847 "used_dirs".
9848 (grub_ext2_read_inode): Divide by the inode size in a superblock
9849 instead of 128 to obtain INODES_PER_BLOCK.
9850 Use the macro EXT2_INODE_SIZE instead of directly using
9851 SBLOCK->INODE_SIZE.
9852
d70af616 98532007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9854
9855 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
9856 superblock instead of the structure size to compute an
9857 offset. This fixes the problem that GRUB could not read a
9858 filesystem when inode size is different from 128-byte.
9859
3b801603 98602007-03-05 Marco Gerards <marco@gnu.org>
9861
9862 * normal/main.c (read_config_file): When "menu" is not set, create
9863 an initial context.
9864
4785bfe4 98652007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9866
9867 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
9868 (HEAP_LIMIT): New macro.
9869 (grub_claim_heap): Claim memory up to `heaplimit'.
9870
a0cbb023 98712007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9872
9873 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
9874 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
9875 (_start): Likewise.
9876 (grub_arch_modules_addr): Return address after `_end'.
9877 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
9878 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
9879 (add_segments): Calculate `_end' from phdr size and location.
9880 (ALIGN_UP): Moved to ...
9881 * include/grub/misc.h: here.
9882 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9883 New macro.
9884 (GRUB_IEEE1275_MODULE_BASE): Removed.
9885
fd7d8eba 98862007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9887
9888 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
9889 loop boundary.
9890
9b09e6fc 98912007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9892
9893 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
9894 All users updated.
9895 (grub_elf64_load_hook_t): Likewise.
9896 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
9897 debug output.
9898
3ce27299 98992007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9900
9901 * kern/mm.c: Update copyright.
9902 (grub_mm_debug): Correct syntax error.
9903 (grub_mm_dump_free): New function.
9904 (grub_debug_free): Call `grub_free'.
9905 * include/grub/mm.h: Update copyright.
9906 (grub_mm_dump_free): Add declaration.
9907
077d5fee 99082007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9909
9910 * include/grub/ieee1275/ieee1275.h: Update copyright.
9911 * kern/powerpc/ieee1275/init.c: Likewise.
9912 * kern/powerpc/ieee1275/openfw.c: Likewise.
9913
9914 * loader/powerpc/ieee1275/linux.c: Likewise.
9915 * include/grub/elfload.h: Likewise.
9916 * kern/elf.c: Likewise.
9917 (grub_elf32_load): Pass `base' and `size' parameters. Update all
9918 callers.
9919 (grub_elf64_load): Likewise.
9920 (grub_elf32_load_segment): Move to a nested function.
9921 (grub_elf64_load_segment): Likewise.
9922
dc946850 99232007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9924
9925 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
9926 prototype.
9927 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
9928 (grub_heap_len): Likewise.
9929 (HEAP_SIZE): New macro.
9930 (grub_claim_heap): New function.
9931 (grub_machine_init): Don't claim heap directly. Call
9932 `grub_claim_heap'.
9933 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
9934 (grub_available_iterate): New function.
9935
baa2a121 99362007-02-03 Thomas Schwinge <tschwinge@gnu.org>
9937
9938 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
9939 * configure.ac: Use it for testing the HOST and TARGET compilers.
9940
4fe9862e 99412006-12-13 Thomas Schwinge <tschwinge@gnu.org>
9942
9943 * Makefile.in (enable_grub_emu): New variable.
9944 * configure.ac (--enable-grub-emu): New option.
9945 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
9946 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
9947 * conf/i386-pc.rmk: Likewise.
9948 * conf/powerpc-ieee1275.rmk: Likewise.
9949 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
9950
a8aa5762 99512006-12-12 Marco Gerards <marco@gnu.org>
9952
9953 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
9954
9955 * kern/env.c (grub_env_unset): Don't free the member `value' when
9956 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
9957 pointer.
9958
9959 * normal/main.c (current_menu): Removed.
9960 (free_menu): Unset the `menu' environment variable.
9961 (grub_normal_menu_addentry): Make use of the environment variable
9962 `menu', instead of using the global `current_menu'. Allocate
9963 memory for the sourcecode of this entry.
9964 (read_config_file): New argument `nested', changed all callers.
9965 Only in the case of a new context, initialize a new menu. Set the
9966 `menu' environment variable.
9967 (grub_normal_execute): Don't set and unset the environment
9968 variable `menu' here anymore. Only free the menu when leaving the
9969 context.
9970
9971 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
9972 leak.
9973
957b3a3e 99742006-12-11 Marco Gerards <marco@gnu.org>
9975
9976 * normal/menu_entry.c (run): Fix off by one bug so the last line
9977 is executed. Move the loader check to outside the loop.
9978
ef875714 99792006-12-08 Hollis Blanchard <hollis@penguinppc.org>
9980
9981 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
9982
4e739985 99832006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
9984
9985 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
9986 the number of sectors. Reported by Andrey Shuvikov
9987 <mr_hyro@yahoo.com>.
f19dbdb7 9988
790707f2 99892006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
9990
9991 * kern/disk.c (grub_disk_read): When there is a read error, always
9992 try to read only the necessary data.
f19dbdb7 9993
790707f2 9994 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
9995 disk/raid.c.
9996 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
9997 prototype.
9998 [GRUB_UTIL] (grub_raid_fini): Likewise.
9999 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 10000 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 10001 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10002 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10003 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10004 and grub_raid_fini().
f19dbdb7 10005
03e58196 100062006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10007
10008 * include/grub/types.h (__unused): Rename to UNUSED.
10009 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10010 (grub_elf64_size): Likewise.
f19dbdb7 10011
ae4f23bf 100122006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10013
10014 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10015 grub_error_push and grub_error_pop in the error-handling path.
10016 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10017 length.
10018
2166cc83 100192006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10020
10021 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10022 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10023 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10024 (kernel_elf_SOURCES): Likewise.
10025 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10026 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10027 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10028 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10029 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10030 (elf_mod_SOURCES): New variable.
10031 (elf_mod_CFLAGS): Likewise.
10032 (elf_mod_LDFLAGS): Likewise.
10033 * include/grub/types.h (__unused): New macro.
10034 * include/grub/elfload.h: New file.
10035 * kern/elf.c: Likewise.
10036 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10037 (ELF32_LOADMASK): New macro.
10038 (ELF64_LOADMASK): Likewise.
10039 (vmlinux): Removed.
10040 (grub_linux_load32): New function.
10041 (grub_linux_load64): Likewise.
10042 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10043 Use grub_elf_t instead of grub_file_t.
10044
a09d5aa5 100452006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10046
10047 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10048 `catch_result' to struct set_color_args.
10049
d976fc51 100502006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10051
10052 * normal/menu.c: Include grub/script.h.
10053 * normal/menu_entry.c: Likewise.
10054 * include/grub/normal.h: Do not include grub/script.h.
10055
67507549 100562006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10057
10058 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10059
69203a99 100602006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10061
10062 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10063 disk.
10064 (grub_disk_close): Print debug messages when closing a disk.
10065 (grub_disk_read): Print debug messages when disk read fails.
10066 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10067 filesystem type.
10068 * kern/partition.c: Include misc.h.
10069 (grub_partition_iterate): Print debug messages when detecting
10070 partition type.
10071
e2b8278c 100722006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10073
10074 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10075 is negative.
10076 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10077
97b2f2ff 100782006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10079
10080 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10081 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10082
6555d655 100832006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10084
10085 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10086 instead of sizeof(lv). Patch by Michael Guntsche.
10087
4d42b77f 100882006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10089
10090 * disk/lvm.c: Rename VGS to VG_LIST.
10091 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10092 (grub_lvm_open): Likewise.
10093 Thanks to Michael Guntsche for finding this bug.
10094
5d74d927 100952006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10096
10097 * configure.ac (AC_INIT): Bumped to 1.95.
10098
a1bb27e4 100992006-10-14 Robert Millan <rmh@aybabtu.com>
10100
10101 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10102 with "/dev/.static/dev/md".
10103
e0994b8b 101042006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10105
10106 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10107 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10108 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10109 DRIVE_NAME are always freed.
10110
10111 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10112 DOS_PART, as a DOS partition is counted from one instead of zero
10113 now. Reported by Robert Millan.
10114
ddd5cee9 101152006-10-14 Robert Millan <rmh@aybabtu.com>
10116
10117 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10118 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10119 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10120 string returned by grub_guess_root_device.
10121 * util/i386/pc/grub-setup.c: Likewise.
10122 * util/i386/pc/grub-probefs.c: Likewise.
10123
10124 * util/i386/pc/grub-probefs.c: Rename to ...
10125 * util/i386/pc/grub-probe.c: ... this.
10126 * DISTLIST: Remove grub-probefs, add grub-probe.
10127 * conf/i386-efi.rmk: Likewise.
10128 * conf/i386-pc.rmk: Likewise.
10129 * util/i386/pc/grub-install.in: Likewise.
10130
10131 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10132 choose which information we want to print.
10133
2b002173 101342006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10135
10136 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10137 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10138 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10139 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10140 video/readers/tga.c and video/i386/pc/vbeutil.c.
10141
101422006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10143
10144 Added support for RAID and LVM.
f19dbdb7 10145
2b002173 10146 * disk/lvm.c: New file.
10147 * disk/raid.c: Likewise.
10148 * include/grub/lvm.h: Likewise.
f19dbdb7 10149 * include/grub/raid.h: Likewise.
2b002173 10150 * include/grub/util/lvm.h: Likewise.
10151 * include/grub/util/raid.h: Likewise.
10152 * util/lvm.c: Likewise.
10153 * util/raid.c: Likewise.
10154
10155 * include/grub/disk.h (grub_disk_dev_id): Add
10156 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10157 (grub_disk_get_size): New prototype.
10158 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10159 returns a partition.
10160 (grub_disk_get_size): New function.
f19dbdb7 10161
2b002173 10162 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10163 verbatim if grub_install_dos_part is -2.
10164
10165 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10166 and LVM devices.
10167
10168 * util/i386/pc/grub-setup.c (setup): New argument
10169 MUST_EMBED. Force embedding of GRUB when the argument is
10170 true. Close FILE before returning.
10171 (main): Add support for RAID and LVM.
f19dbdb7 10172
2b002173 10173 * conf/common.rmk: Add RAID and LVM modules.
10174 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10175 util/lvm.c.
10176 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10177
10178 * kern/misc.c (grub_strstr): New function.
10179 * include/grub/misc.h (grub_strstr): New prototype.
10180
050548d0 101812006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10182
10183 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10184
da849d2d 101852006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10186
10187 * kern/misc.c (grub_strtoull): Guess the base only if not
10188 specified.
10189
97b2f2ff 101902006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 10191
10192 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10193 PowerMac support.
10194
97b2f2ff 101952006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 10196
10197 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10198
10199 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10200 Remove `flags' argument. All callers changed.
10201 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10202 (IEEE1275_IHANDLE_INVALID): New variable.
10203 (IEEE1275_CELL_INVALID): New variable.
10204 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10205 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10206 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10207 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10208 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10209 codes from Open Firmware. All callers updated.
10210 (grub_ieee1275_next_property): Directly return Open Firmware return
10211 code.
10212 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10213 Standardize error checking from `grub_ieee1275_get_property'.
10214 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10215 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10216
97b2f2ff 102172006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 10218
10219 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10220 `instance_to_package_args' to `instance_to_path_args'.
10221
10222 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10223 `grub_ieee1275_chosen'.
10224
10225 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10226 `grub_ieee1275_interpret'.
10227
97b2f2ff 102282006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 10229
10230 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10231
97b2f2ff 102322006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 10233
10234 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10235 (__cmpdi): Likewise.
10236
10237 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10238 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10239 `grub_ssize_t'.
10240
02bb8acc 10241 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 10242
10243 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10244 to type `grub_ssize_t'.
10245 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10246
7f9a8531 102472006-09-22 Marco Gerards <marco@gnu.org>
10248
10249 * normal/script.c (grub_script_create_cmdmenu): Skip leading
10250 newlines.
10251
b5ef1102 102522006-09-22 Marco Gerards <marco@gnu.org>
10253
10254 * commands/echo.c: New file.
10255
10256 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10257
10258 * conf/common.rmk (echo_mod_SOURCES): New variable.
10259 (echo_mod_CFLAGS): Likewise.
10260 (echo_mod_LDFLAGS): Likewise.
10261
2cff3677 102622006-09-22 Marco Gerards <marco@gnu.org>
10263
10264 * normal/main.c (get_line): Malloc memory instead of using
10265 preallocated memory. Removed the arguments `cmdline' and
10266 `max_len'. Updated all callers.
10267
6ba4688b 102682006-09-22 Marco Gerards <marco@gnu.org>
10269
10270 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10271 (normal_mod_DEPENDENCIES): Likewise.
10272
10273 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10274 (normal_mod_DEPENDENCIES): Likewise.
10275
10276 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10277
e02ac02c 102782006-09-22 Johan Rydberg <jrydberg@gnu.org>
10279
10280 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10281 programs.
10282 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10283 (normal_mod_DEPENDENCIES): Likewise.
10284 * conf/i386-pc.mk: Regenerate.
10285 * conf/i386-efi.mk: Likewise
10286 * conf/common.mk: Likewise.
10287 * conf/powerpc-ieee1275.mk: Likewise.
10288 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10289
8d252e44 102902006-09-22 Robert Millan <rmh@aybabtu.com>
10291
10292 Sync with i386 version.
10293 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10294 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10295
209bf7ac 102962006-09-21 Robert Millan <rmh@aybabtu.com>
10297
10298 Import from GRUB Legacy (lib/device.c):
10299 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10300 (init_device_map) [__linux__]: Add support for I2O devices.
10301
6b146090 103022006-09-14 Marco Gerards <marco@gnu.org>
10303
10304 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10305 `-melf_i386'.
10306
e38600a8 103072006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 10308
10309 * util/i386/pc/grub-install.in: Skip menu.lst when removing
10310 /boot/grub/*.lst.
78fa1790 10311
2952da5d 10312 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 10313
2952da5d 10314 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10315 before adding it to device.map.
10316
01b82a64 103172006-08-15 Johan Rydberg <jrydberg@gnu.org>
10318
fe6b695a 10319 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 10320 compiles a file; using the -MD option.
10321 * conf/common.mk: Regenerate.
10322 * conf/i386-pc.mk: Likewise.
10323 * conf/i386-efi.mk: Likewise.
10324 * conf/powerpc-ieee1275.mk: Likewise.
10325 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10326
1064790d 103272006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10328
10329 Move the prototypes of grub_setjmp and grub_longjmp to
10330 cpu/setjmp.h, so that each architecture may specify different
10331 attributes.
f19dbdb7 10332
1064790d 10333 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10334 (grub_longjmp): Likewise.
10335 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10336 (grub_longjmp): Likewise.
10337 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10338 (grub_longjmp): Likewise.
10339
10340 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10341 [!GRUB_UTIL] (grub_longjmp): Removed.
10342
29dda3ed 103432006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
10344
10345 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10346 "color!" method does not return any value.
10347
ad2a06ed 103482006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10349
10350 * include/grub/bitmap.h: New file.
10351
10352 * include/grub/i386/pc/vbeutil.h: Likewise.
10353
10354 * video/bitmap.c: Likewise.
10355
10356 * video/readers/tga.c: Likewise.
10357
10358 * video/i386/pc/vbeutil.c: Likewise.
10359
10360 * commands/videotest.c: Code cleanup and updated to reflect to new
10361 video API.
10362
10363 * term/gfxterm.c: Likewise.
10364
10365 * video/video.c: Likewise.
10366
10367 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10368 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10369 (bitmap_mod_SOURCES): New entry.
10370 (bitmap_mod_CFLAGS): Likewise.
10371 (bitmap_mod_LDFLAGS): Likewise.
10372 (tga_mod_SOURCES): Likewise.
10373 (tga_mod_CFLAGS): Likewise.
10374 (tga_mod_LDFLAGS): Likewise.
10375
10376 * include/grub/video.h (grub_video_blit_operators): New enum type.
10377 (grub_video_render_target): Changed as forward declaration and moved
10378 actual definition to be video driver specific.
10379 (grub_video_adapter.blit_bitmap): Added blitting operator.
10380 (grub_video_adapter.blit_render_target): Likewise.
10381 (grub_video_blit_bitmap): Likewise.
10382 (grub_video_blit_render_target): Likewise.
10383
10384 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10385 driver specific render target definition.
10386 (grub_video_vbe_map_rgba): Added driver internal helper.
10387 (grub_video_vbe_unmap_color): Updated to use
10388 grub_video_i386_vbeblit_info.
10389 (grub_video_vbe_get_video_ptr): Likewise.
10390
10391 * include/grub/i386/pc/vbeblit.h
10392 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10393 grub_video_i386_vbeblit_info.
10394 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10395 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10396 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10397 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10398 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10399 (grub_video_i386_vbeblit_index_index): Likewise.
10400 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10401 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10402 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10403 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10404 operator.
10405 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10406 operator.
10407
10408 * video/i386/pc/vbeblit.c: Updated to reflect changes on
10409 include/grub/i386/pc/vbeblit.h.
10410
10411 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10412 Updated to use grub_video_i386_vbeblit_info.
10413 (grub_video_i386_vbefill_R8G8B8): Likewise.
10414 (grub_video_i386_vbefill_index): Likewise.
10415 (grub_video_i386_vbefill): Added generic filler.
10416
10417 * video/i386/pc/vbefill.c: Updated to reflect changes on
10418 include/grub/i386/pc/vbefill.h.
10419
10420 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10421 grub_video_i386_vbeblit_info.
10422 (grub_video_vbe_unmap_color): Likewise.
10423 (grub_video_vbe_blit_glyph): Likewise.
10424 (grub_video_vbe_scroll): Likewise.
10425 (grub_video_vbe_draw_pixel): Removed function.
10426 (grub_video_vbe_get_pixel): Likewise.
10427 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10428 updated code to use it.
10429 (common_blitter): Added common blitter for render target and bitmap.
10430 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10431 (grub_video_vbe_blit_render_target): Likewise.
10432
bc8c036d 104332006-07-30 Johan Rydberg <jrydberg@gnu.org>
10434
10435 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10436 is in text mode if there is no console control protocol instance
10437 available.
10438
684a8eff 104392006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10440
10441 * include/grub/video.h: Code cleanup.
10442
10443 * include/grub/i386/pc/vbe.h: Likewise.
10444
10445 * video/i386/pc/vbe.c: Likewise.
10446
10447 * video/i386/pc/vbeblit.c: Likewise.
10448
10449 * video/i386/pc/vbefill.c: Likewise.
10450
10451 * video/video.c: Likewise. Also added more comments.
10452
5915059b 104532006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10454
10455 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10456 (struct grub_biosdisk_dap): Likewise.
10457
10458 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
10459 linkage settings for all functions.
10460
90ce5d56 104612006-07-12 Marco Gerards <marco@gnu.org>
10462
10463 * configure.ac (--enable-mm-debug): Fix typo.
10464
10465 * genkernsyms.sh.in: Use proper quoting for `CC'.
10466
43e7f879 104672006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
10468
10469 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10470 (normal_mod_ASFLAGS): Remove "-m32".
10471
4889bdec 104722006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
10473
10474 * util/misc.c: Include config.h.
10475 [!HAVE_MEMALIGN]: Do not include malloc.h.
10476 (grub_memalign): Use posix_memalign, if present. Then, use
10477 memalign, if present. Otherwise, emit an error.
10478
10479 * util/grub-emu.c: Do not include malloc.h.
10480
10481 * include/grub/util/misc.h: Include unistd.h. This is required for
10482 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10483 D. Eades III <hde@foobar-qux.org>.
10484
10485 * configure.ac (AC_GNU_SOURCE): Added.
10486 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10487 type.
10488
fd39d4da 104892006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
10490
10491 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10492 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10493
b786f3b5 104942006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
10495
10496 * include/grub/types.h (grub_host_addr_t): Rename to
10497 grub_target_addr_t.
10498 (grub_host_off_t): Rename to grub_target_off_t.
10499 (grub_host_size_t): Rename to grub_target_size_t.
10500 (grub_host_ssize_t): Rename to grub_target_ssize_t.
10501 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10502
10503 * include/grub/kernel.h (struct grub_module_header): Change type
10504 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10505 (grub_module_info): Likewise.
f19dbdb7 10506
051988bb 105072006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10508
10509 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10510 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10511 Velazquez <jesus.velazquez@gmail.com>.
10512
deae281b 105132006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10514
10515 Count partitions from 1 instead of 0 in the string representation
10516 of partitions. Still use 0-based internally.
f19dbdb7 10517
deae281b 10518 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10519 (sun_partition_map_iterate): Use grub_partition_t instead of
10520 struct grub_partition *. Cast DESC->START_CYLINDER to
10521 grub_uint64_t after converting the endian.
10522 (sun_partition_map_probe): Subtract 1 for PARTNUM.
10523 (sun_partition_map_get_name): Add 1 to P->INDEX.
10524
10525 * partmap/pc.c (grub_partition_parse): Subtract 1 for
10526 PCDATA->DOS_PART.
10527 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10528
10529 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10530 zero instead of one.
10531 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10532 (gpt_partition_map_get_name): Add 1 into P->INDEX.
10533
10534 * partmap/apple.c (apple_partition_map_iterate): Change the type
10535 of POS to unsigned.
10536 (apple_partition_map_probe): Subtract 1 for PARTNUM.
10537 (apple_partition_map_get_name): Add 1 into P->INDEX.
10538
10539 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10540 of POS to unsigned.
10541 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10542 calculate the offset of a partition.
10543 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10544 (amiga_partition_map_get_name): Add 1 into P->INDEX.
10545
10546 * partmap/acorn.c (acorn_partition_map_find): Change the type of
10547 SECTOR to grub_disk_addr_t.
10548 (acorn_partition_map_iterate): Likewise.
10549 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10550 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10551 top.
10552 (acorn_partition_map_get_name): Add 1 into P->INDEX.
10553
10554 * kern/i386/pc/init.c (make_install_device): Add 1 into
10555 GRUB_INSTALL_DOS_PART.
10556
10557 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10558 conditional.
10559
524a1e6a 105602006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10561
10562 Clean up the code to support 64-bit addressing in disks and
10563 files. This change is not enough for filesystems yet.
f19dbdb7 10564
524a1e6a 10565 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10566 type of "start" to grub_uint64_t.
10567 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10568 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10569 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10570 convert addresses.
10571
10572 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10573 to grub_disk_addr_t.
10574
10575 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10576 string.
10577
10578 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10579
10580 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10581 to char *.
10582
10583 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10584
10585 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10586
10587 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10588
10589 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10590 to grub_off_t, to detect an error from grub_file_seek.
10591 (grub_multiboot_load_elf32): Likewise.
10592
10593 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10594 maximum unsigned long value when an overflow is detected.
10595 (grub_strtoull): New function.
10596 (grub_divmod64): Likewise.
10597 (grub_lltoa): use grub_divmod64.
10598
10599 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10600 grub_disk_addr_t.
10601 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10602 the pointer to next character. Use grub_strtoull instead of
10603 grub_strtoul.
10604 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10605 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10606 respectively.
10607
fe6b695a 10608 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 10609 return value is signed.
10610 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10611 test if OFFSET is less than zero, as OFFSET is unsigned now.
10612
10613 * kern/disk.c (struct grub_disk_cache): Change the type of
10614 "sector" to grub_disk_addr_t.
10615 (grub_disk_cache_get_index): Change the type of SECTOR to
10616 grub_disk_addr_t. Calculate the hash with SECTOR casted to
10617 unsigned after shifting.
10618 (grub_disk_cache_invalidate): Change the type of SECTOR to
10619 grub_disk_addr_t.
10620 (grub_disk_cache_unlock): Likewise.
10621 (grub_disk_cache_store): Likewise.
10622 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10623 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10624 grub_disk_addr_t and grub_uint64_t, respectively.
10625 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10626 body, as the value of OFFSET is tweaked by
10627 grub_disk_check_range. Change the types of START_SECTOR, LEN and
10628 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10629 respectively.
10630 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10631 body, as the value of OFFSET is tweaked by
10632 grub_disk_check_range. Change the types of LEN and N to
10633 grub_size_t.
10634
10635 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10636 and "saved_offset" to grub_off_t.
10637 (test_header): Cast BUF to char *.
10638 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10639 to char *.
10640 (grub_gzio_read): Change the types of OFFSET and SIZE to
10641 grub_off_t and grub_size_t, respectively.
10642
10643 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10644 Removed.
10645 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10646 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10647 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10648 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10649 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10650
10651 * include/grub/types.h (grub_off_t): Unconditionally set to
10652 grub_uint64_t.
10653 (grub_disk_addr_t): Changed to grub_uint64_t.
10654
10655 * include/grub/partition.h (struct grub_partition): Change the
10656 types of "start", "len" and "offset" to grub_disk_addr_t,
10657 grub_uint64_t and grub_disk_addr_t, respectively.
10658 (grub_partition_get_start): Return grub_disk_addr_t.
10659 (grub_partition_get_len): Return grub_uint64_t.
10660
10661 * include/grub/misc.h (grub_strtoull): New prototype.
10662 (grub_divmod64): Likewise.
10663
10664 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10665 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10666 grub_off_t, respectively.
10667 All callers and references changed.
10668
10669 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10670 grub_size_t in "read".
10671 All callers and references changed.
10672
10673 * include/grub/file.h (struct grub_file): Change the types of
10674 "offset" and "size" to grub_off_t and grub_off_t,
10675 respectively. Change the type of SECTOR to grub_disk_addr_t in
10676 "read_hook".
10677 (grub_file_read): Change the type of LEN to grub_size_t.
10678 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10679 grub_off_t.
10680 (grub_file_size): Return grub_off_t.
10681 (grub_file_tell): Likewise.
10682 All callers and references changed.
10683
10684 * include/grub/disk.h (struct grub_disk_dev): Change the types of
10685 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10686 "write".
10687 (struct grub_disk): Change the type of "total_sectors" to
10688 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 10689 "read_hook".
524a1e6a 10690 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10691 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10692 (grub_disk_write): Likewise.
10693 All callers and references changed.
10694
10695 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10696 char * for grub_strncmp to silence gcc.
10697 (grub_iso9660_mount): Likewise.
10698 (grub_iso9660_mount): Likewise.
10699 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10700 return statement.
10701 (grub_iso9660_iterate_dir): Likewise.
10702 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10703
10704 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10705 LEN to grub_disk_addr_t and grub_size_t, respectively.
10706
10707 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10708
10709 * fs/jfs.c (grub_jfs_read_file): Likewise.
10710
10711 * fs/minix.c (grub_jfs_read_file): Likewise.
10712
10713 * fs/sfs.c (grub_jfs_read_file): Likewise.
10714
10715 * fs/ufs.c (grub_jfs_read_file): Likewise.
10716
10717 * fs/xfs.c (grub_jfs_read_file): Likewise.
10718
10719 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10720 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10721 respectively.
10722
10723 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10724 BLKNR to -1 instead of returning GRUB_ERRNO.
10725 (grub_ext2_read_file): Change the types of SECTOR and
10726 LEN to grub_disk_addr_t and grub_size_t, respectively.
10727
10728 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10729 LEN to grub_disk_addr_t and grub_size_t, respectively.
10730
10731 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10732 grub_file_read.
10733
10734 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10735 string. Do not cast SECTOR explicitly.
10736
10737 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
10738 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
10739 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
10740 grub_disk_addr_t and grub_size_t, respectively. If the sector is
10741 over 2TB and LBA mode is not supported, raise an error.
10742 (get_safe_sectors): New function.
10743 (grub_biosdisk_read): Use get_safe_sectors.
10744 (grub_biosdisk_write): Likewise.
10745
10746 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
10747 (grub_efidisk_write): Likewise.
10748
10749 * disk/loopback.c (delete_loopback): Cosmetic changes.
10750 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
10751 correctly.
10752 (grub_loopback_open): Likewise.
10753 (grub_loopback_read): Likewise. Also, change the type of POS to
10754 grub_off_t, and fix the usage of grub_memset.
10755
10756 * commands/i386/pc/play.c: Include grub/machine/time.h.
10757
10758 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
10759 print FILE->SIZE.
10760
10761 * commands/configfile.c: Include grub/env.h.
10762
10763 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
10764 GRUB_ERRNO directly instead. Change the type of POS to
10765 grub_off_t. Follow the coding standard.
10766
10767 * commands/blocklist.c: Include grub/partition.h.
10768 (grub_cmd_blocklist): Return an error if the underlying device is
10769 not a disk. Take the starting sector of a partition into account,
10770 if a partition is used.
10771
10772 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
10773 a length field.
10774 (lba_mode): Support 64-bit addresses.
10775 (chs_mode): Likewise.
10776 (copy_buffer): Adapted to the new offsets of a length field and a
10777 segment field.
10778 (blocklist_default_start): Allocate 64-bit space.
10779
10780 * boot/i386/pc/boot.S (force_lba): Removed.
10781 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 10782 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 10783 space.
10784 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
10785 is useless.
10786 (lba_mode): Refactored to support a 64-bit address. More size
10787 optimization.
10788 (setup_sectors): Likewise.
10789
53af98ad 107902006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10791
10792 * DISTLIST: Added include/grub/i386/linux.h. Removed
10793 include/grub/i386/pc/linux.h
10794
10795 * configure.ac (AC_INIT): Bumped to 1.94.
10796
10797 * config.guess: Updated from gnulib.
10798 * config.sub: Likewise.
10799 * install-sh: Likewise.
10800 * mkinstalldirs: Likewise.
10801
b4c1940a 108022006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10803
10804 * conf/common.rmk (grub_modules_init.lst): Depended on
10805 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
10806 MODSRCFILES.
10807
10808 * genmk.rb (PModule::rule): Reverted the previous change.
10809
cfca1cfd 108102006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10811
10812 * conf/common.rmk (grub_modules_init.lst): Depends on
10813 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
10814 that the target does not exist before producing.
10815 (grub_modules_init.h): Remove the target before generating.
10816 (grub_emu_init.c): Likewise.
10817
10818 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
10819
aa6d7826 108202006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
10821
10822 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
10823 for the target-specific tests. Make sure that we also have the
10824 up-to-date target variables for those tests.
10825
26c607b9 108262006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10827
10828 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
10829 (PModule::rule): Likewise.
10830
0162321a 108312006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10832
10833 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
10834 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
10835 target-specific flags should be prefixed.
10836 (PModule::rule): Likewise.
10837
6c826348 108382006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
10839
10840 * configure.ac (CMP): Check if cmp is available explicitly.
10841
b977bf01 108422006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
10843
10844 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
10845 (target_cpu): New variable.
10846 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 10847
b977bf01 10848 * util/i386/pc/grub-install.in (host_cpu): Removed.
10849 (target_cpu): New variable.
10850 (pkglibdir): Use target_cpu instead of host_cpu.
10851
10852 * util/genmoddep.c: Removed.
f19dbdb7 10853
b977bf01 10854 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
10855 instead of GRUB_HOST_SIZEOF_VOID_P.
10856 * kern/dl.c: Likewise.
10857
10858 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
10859 ...
10860 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10861 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10862 (GRUB_TARGET_SIZEOF_LONG): ... this.
10863 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10864 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10865 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10866 to ...
10867 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10868 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10869 (GRUB_TARGET_SIZEOF_LONG): ... this.
10870 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10871 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10872 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10873 to ...
10874 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10875 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10876 (GRUB_TARGET_SIZEOF_LONG): ... this.
10877 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10878 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10879
10880 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
10881 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
10882 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
10883 instead of GRUB_HOST_SIZEOF_LONG.
10884 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
10885 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
10886 GRUB_CPU_WORDS_BIGENDIAN.
10887 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
10888 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
10889 grub_host_ssize_t.
10890
10891 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
10892 (genmoddep_SOURCES): Likewise.
10893 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
10894 (genmoddep_SOURCES): Likewise.
10895 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
10896 (genmoddep_SOURCES): Likewise.
10897 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
10898 Likewise.
10899 (genmoddep_SOURCES): Likewise.
10900
10901 * genmoddep.awk: New file.
10902
10903 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
10904 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
10905 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
10906 (PModule::rule): Likewise.
10907 (Program::rule): Likewise.
10908 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
10909 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
10910 respectively.
10911
10912 * configure.ac: Rewritten intensively to use host and target
10913 instead of build and host, respectively.
10914
10915 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
10916 (host_cpu): Removed.
10917 (target_cpu): New variable.
10918 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
10919 (BUILD_CC): Removed.
10920 (BUILD_CFLAGS): Likewise.
10921 (BUILD_CPPFLAGS): Likewise.
10922 (TARGET_CC): New variable.
10923 (TARGET_CFLAGS): Likewise.
10924 (TARGET_CPPFLAGS): Likewise.
10925 (TARGET_LDFLAGS): Likewise.
10926 (AWK): Likewise.
10927 (include): Use target_cpu instead of host_cpu.
10928 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 10929
b977bf01 10930 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
10931
f09771a1 109322006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
10933
10934 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
10935 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
10936 field 'false' to 'exec_on_false'.
10937 (grub_script_create_cmdif): Renamed argument names to reflect above
10938 changes.
10939
10940 * normal/execute.c (grub_script_execute_cmdif): Likewise.
10941
10942 * normal/script.c (grub_script_create_cmdif): Likewise.
10943
118f4fb3 109442006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
10945
10946 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
10947 top.
10948 (grub_hfsplus_btree_recptr): Likewise.
10949 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
10950 FILEBLOCK both to pass a block number and store next block
10951 number.
10952 (grub_hfsplus_read_block): Rewritten heavily to support an extent
10953 overflow file correctly. Specify errors appropriately, because
10954 fshelp expects that GRUB_ERRNO is set when fails. Reuse
10955 grub_hfsplus_btree_recptr to get the pointer to a found key.
10956 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
10957 is found.
10958
10959 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
10960 linux.mod.
10961 (_linux_mod_SOURCES): New variable.
10962 (_linux_mod_CFLAGS): Likewise.
10963 (_linux_mod_LDFLAGS): Likewise.
10964 (linux_mod_SOURCES): Likewise.
10965 (linux_mod_CFLAGS): Likewise.
10966 (linux_mod_LDFLAGS): Likewise.
10967
10968 * DISTLIST: Added loader/i386/efi/linux.c,
10969 loader/i386/efi/linux_normal.c and
10970 include/grub/i386/efi/loader.h.
10971
10972 * loader/i386/efi/linux.c: New file.
10973 * loader/i386/efi/linux_normal.c: Likewise.
10974 * include/grub/i386/efi/loader.h: Likewise.
10975
89a7d726 109762006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
10977
10978 * commands/blocklist.c: New file.
10979
10980 * DISTLIST: Added commands/blocklist.c.
10981
10982 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 10983 color for the background, and a darker color for the foreground.
89a7d726 10984 (grub_console_checkkey): Return READ_KEY.
10985 (grub_console_cls): Set the background to
10986 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
10987
10988 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
10989
10990 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
10991 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
10992
10993 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
10994 prototype.
10995
10996 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
10997 BG. The spec is wrong again.
10998
10999 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11000 prototype.
11001 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11002
11003 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11004 commands/blocklist.c.
11005 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 11006
89a7d726 11007 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11008 (blocklist_mod_SOURCES): New variable.
11009 (blocklist_mod_CFLAGS): Likewise.
11010 (blocklist_mod_LDFLAGS): Likewise.
11011
75c8f258 110122006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11013
11014 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11015 duplication.
11016 (lba_mode): Use %eax more intensively to reduce the code size.
11017
da2eb181 110182006-05-20 Marco Gerards <marco@gnu.org>
11019
11020 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11021
11022 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11023 for `menuentry'.
11024 (script): Accept leading newlines.
11025 (newlines): New rule to describe 0 or more newlines.
11026 (commands): Accept `command' with trailing newline. Fixed the
11027 order in which arguments were passed to `grub_script_add_cmd'.
11028 Accept commands separated by newlines.
11029 (function): Changed to accept newlines.
11030 (menuentry) Rewritten.
11031
11032 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11033 front of the list, instead of to the end.
11034
577b4050 110352006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11036
11037 * util/i386/pc/grub-install.in (bindir): New variable.
11038 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11039 Shaver <lbgwjl@gmail.com>.
11040
0d6e1189 110412006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11042
11043 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11044 grub/machine/linux.h
11045 * loader/i386/pc/linux.c: Likewise.
11046
11047 * include/grub/i386/pc/linux.h: Moved to ...
11048 * include/grub/i386/linux.h: ... here.
11049
11050 * include/grub/i386/linux.h (struct linux_kernel_params): New
11051 struct.
f19dbdb7 11052
31b86e9f 110532006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11054
11055 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11056 checking.
11057 (grub_video_vbe_blit_glyph): Likewise.
11058 (grub_video_vbe_blit_bitmap): Likewise.
11059 (grub_video_vbe_blit_render_target): Likewise.
11060
83b984de 110612006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11062
11063 * configure.ac (--with-platform): Properly quote the square
11064 brackets.
11065
5f0413bd 110662006-05-08 Marco Gerards <marco@gnu.org>
11067
11068 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11069 this...
11070 (kernel_elf_HEADERS): ...to this. Updated all users.
11071 (grubof_symlist.c): Renamed from this...
11072 (kernel_elf_symlist.c): ...to this. Updated all users.
11073 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11074 (grubof_SOURCES): Renamed from this...
11075 (kernel_elf_SOURCES): ...to this.
11076 (grubof_HEADERS): Renamed from this...
11077 (kernel_elf_HEADERS): ...to this.
11078 (grubof_CFLAGS): Renamed from this...
11079 (kernel_elf_CFLAGS): ...to this.
11080 (grubof_ASFLAGS): Renamed from this...
11081 (kernel_elf_ASFLAGS): ...to this.
11082 (grubof_LDFLAGS): Renamed from this...
11083 (kernel_elf_LDFLAGS): ...to this.
11084
11085 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11086 this...
11087 (kernel_elf_HEADERS): ...to this. Updated all users.
11088 (grubof_symlist.c): Renamed from this...
11089 (kernel_elf_symlist.c): ...to this. Updated all users.
11090 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11091 (grubof_SOURCES): Renamed from this...
11092 (kernel_elf_SOURCES): ...to this.
11093 (grubof_HEADERS): Renamed from this...
11094 (kernel_elf_HEADERS): ...to this.
11095 (grubof_CFLAGS): Renamed from this...
11096 (kernel_elf_CFLAGS): ...to this.
11097 (grubof_ASFLAGS): Renamed from this...
11098 (kernel_elf_ASFLAGS): ...to this.
11099 (grubof_LDFLAGS): Renamed from this...
11100 (kernel_elf_LDFLAGS): ...to this.
11101
11102 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11103 `kernel.elf' instead of `grubof'.
11104
05568c2e 111052006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11106
11107 Add --with-platform to configure. Use pkglibdir instead of
11108 pkgdatadir. This is reported by Roger Leigh.
11109
11110 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11111 (host_vendor): Likewise.
11112 (host_os): Likewise.
11113 (pkgdatadir): Likewise.
11114 (platform): New variable.
11115 (pkglibdir): Likewise.
11116 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 11117
05568c2e 11118 * util/i386/pc/grub-install.in (datadir): Removed.
11119 (host_vendor): Likewise.
11120 (host_os): Likewise.
11121 (pkgdatadir): Likewise.
11122 (platform): New variable.
11123 (pkglibdir): Likewise.
11124 Use PKGLIBDIR instead of PKGDATADIR.
11125
11126 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11127 instead of GRUB_DATADIR.
11128 (main): Likewise.
11129 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11130 (main): Likewise.
11131 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11132 (main): Likewise.
11133
11134 * configure.ac (--with-platform): New option.
11135 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11136
11137 * Makefile.in: Include a makefile based on PLATFORM instead of
11138 HOST_VENDOR.
11139 (pkgdatadir): Not appended by the machine type.
11140 (pkglibdir): Appended by the machine type.
11141 (host_vendor): Removed.
11142 (platform): New variable.
11143 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11144 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11145 (uninstall): Likewise.
11146
4e93851c 111472006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11148
11149 Use the environment context in the menu. Remove the commands
11150 "default" and "timeout", and use variables instead.
f19dbdb7 11151
4e93851c 11152 * normal/menu.c: Include grub/env.h.
11153 (print_entry): Cast TITLE to silence gcc.
11154 (get_timeout): New function.
11155 (set_timeout): Likewise.
11156 (get_entry_number): Likewise.
11157 (run_menu): Use a default entry, a fallback entry and a timeout
11158 in the environment variables "default", "fallback" and
11159 "timeout". Also, tweak the default entry if it is not within the
11160 current menu entries.
11161 (grub_menu_run): Use a fallback entry in the environment variable
11162 "fallback".
11163
11164 * normal/main.c (read_config_file): Do not initialize
11165 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11166 NEWMENU->TIMEOUT.
11167 (grub_normal_execute): Use a data slot to store the menu.
11168
11169 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11170 fallback_entry and timeout.
11171 (struct grub_menu_list): Removed.
11172 (grub_menu_list_t): Likewise.
11173 (struct grub_context): Likewise.
11174 (grub_context_t): Likewise.
11175 (grub_context_get): Likewise.
11176 (grub_context_get_current_menu): Likewise.
11177 (grub_context_push_menu): Likewise.
11178 (grub_context_pop_menu): Likewise.
11179 (grub_default_init): Likewise.
11180 (grub_default_fini): Likewise.
11181 (grub_timeout_init): Likewise.
11182 (grub_timeout_fini): Likewise.
11183
11184 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11185 and timeout.mod.
11186 (normal_mod_SOURCES): Removed normal/context.c.
11187
11188 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11189 commands/default.c, commands/timeout.c and normal/context.c.
11190 (normal_mod_SOURCES): Removed normal/context.c.
11191
11192 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11193 commands/timeout.c and normal/context.c.
11194 (normal_mod_SOURCES): Removed normal/context.c.
11195
11196 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11197 commands/default.c, commands/timeout.c and normal/context.c.
11198 (normal_mod_SOURCES): Removed normal/context.c.
11199
11200 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11201 timeout.mod.
11202 (default_mod_SOURCES): Removed.
11203 (default_mod_CFLAGS): Likewise.
11204 (default_mod_LDFLAGS): Likewise.
11205 (timeout_mod_SOURCES): Removed.
11206 (timeout_mod_CFLAGS): Likewise.
11207 (timeout_mod_LDFLAGS): Likewise.
11208
11209 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11210 normal/context.c.
11211
11212 * commands/default.c: Removed.
11213 * commands/timeout.c: Likewise.
11214 * normal/context.c: Likewise.
11215
1eb9cc1d 112162006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11217
11218 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11219
385bd9c1 112202006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11221
11222 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11223 "next" to "prev" for readability.
11224 (struct grub_env_sorted_var): New struct.
11225 (grub_env_context): Renamed to ...
11226 (initial_context): ... this.
11227 (grub_env_var_context): Renamed to ...
11228 (current_context): ... this.
11229 (grub_env_find): Look only at CURRENT_CONTEXT.
11230 (grub_env_context_open): Rewritten to copy exported variables from
11231 previous context.
11232 (grub_env_context_close): Rewritten according to the new
11233 scheme. Also, add an assertion to prevent the initial context from
11234 removed.
11235 (grub_env_insert): Removed the code for the sorted list.
11236 (grub_env_remove): Likewise.
11237 (grub_env_export): Simply mark the variable with
11238 GRUB_ENV_VAR_GLOBAL.
11239 (grub_env_set): A cosmetic change for naming consistency.
11240 (grub_env_get): Likewise.
11241 (grub_env_unset): Likewise.
11242 (grub_env_iterate): Rewritten to sort variables within this
11243 function.
11244 (grub_register_variable_hook): Fixed for naming consistency. Call
11245 grub_env_find again, only if NAME is not found at the first time.
11246 (mangle_data_slot_name): New function.
11247 (grub_env_set_data_slot): Likewise.
11248 (grub_env_get_data_slot): Likewise.
11249 (grub_env_unset_data_slot): Likewise.
11250
11251 * include/grub/env.h (grub_env_var_type): New enum.
11252 (GRUB_ENV_VAR_LOCAL): New constant.
11253 (GRUB_ENV_VAR_GLOBAL): Likewise.
11254 (GRUB_ENV_VAR_DATA): Likewise.
11255 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11256 "type".
11257 (grub_env_set): Replace VAR with NAME for consistency.
11258 (grub_register_variable_hook): Likewise.
11259 (grub_env_export): Specify the name of the argument.
11260 (grub_env_set_data_slot): New prototype.
11261 (grub_env_get_data_slot): Likewise.
11262 (grub_env_unset_data_slot): Likewise.
11263
7f362539 112642006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11265
11266 Extend the loader so that GRUB can accept a loader which comes
11267 back to GRUB when a loaded image exits. Also, this change adds
11268 support for a chainloader on EFI.
f19dbdb7 11269
7f362539 11270 * term/efi/console.c: Include grub/misc.h.
11271 (grub_console_checkkey): Display a scan code on the top for
11272 debugging. This will be removed once the EFI port gets stable.
11273 Correct the scan code mapping.
11274
11275 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11276 allocate memory from larger regions, in order to reduce the number
11277 of allocated regions. Otherwise, the MacOSX loader panics.
11278 (filter_memory_map): Avoid less than 1MB for compatibility with
11279 other loaders.
11280 (add_memory_regions): Allocate from the tail of a region, if
11281 possible, to avoid allocating a region near to 1MB, for the MacOSX
11282 loader.
11283
11284 * kern/efi/init.c (grub_efi_set_prefix): Specify
11285 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11286
11287 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11288 argument IMAGE_HANDLE and specify it to get a loaded image.
11289 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11290 grub_efi_get_loaded_image.
fe6b695a 11291 (grub_efi_get_filename): Divide the length by the size of
7f362539 11292 grub_efi_char16_t.
11293 (grub_efi_get_device_path): New function.
11294 (grub_efi_print_device_path): Print End Device Path nodes. Divide
11295 the length by the size of grub_efi_char16_t for a file path device
11296 path node.
11297
11298 * kern/loader.c (grub_loader_noreturn): New variable.
11299 (grub_loader_set): Accept a new argument NORETURN. Set
11300 GRUB_LOADER_NORETURN to NORETURN.
11301 All callers changed.
11302 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11303 grub_machine_fini.
11304
11305 * include/grub/efi/efi.h (grub_efi_get_device_path): New
11306 prototype.
11307 (grub_efi_get_loaded_image): Take an argument to specify an image
11308 handle.
11309
11310 * include/grub/loader.h (grub_loader_set): Added one more argument
11311 NORETURN.
11312
11313 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11314 instead of grub_efi_open_protocol.
11315 (grub_efidisk_get_device_name): Likewise.
11316 (grub_efidisk_close): Print a newline.
11317 (grub_efidisk_get_device_handle): Fixed to use
11318 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11319 GRUB_EFI_DEVICE_PATH_TYPE.
11320
11321 * disk/efi/efidisk.c (device_path_guid): Moved to ...
11322 * kern/efi/efi.c (device_path_guid): ... here.
11323
11324 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11325 chain.mod.
11326 (kernel_mod_HEADERS): Added efi/disk.h.
11327 (_chain_mod_SOURCES): New variable.
11328 (_chain_mod_CFLAGS): Likewise.
11329 (_chain_mod_LDFLAGS): Likewise.
11330 (chain_mod_SOURCES): Likewise.
11331 (chain_mod_CFLAGS): Likewise.
11332 (chain_mod_LDFLAGS): Likewise.
11333
11334 * DISTLIST: Added include/grub/efi/chainloader.h,
11335 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11336
11337 * include/grub/efi/chainloader.h: New file.
11338 * loader/efi/chainloader.c: Likewise.
11339 * loader/efi/chainloader_normal.c: Likewise.
11340
c0111d6e 113412006-04-30 Marco Gerards <marco@gnu.org>
11342
11343 * commands/configfile.c (grub_cmd_source): New function.
11344 (GRUB_MOD_INIT): Register the commands `source' and `.'.
11345 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11346
df5341da 113472006-04-30 Marco Gerards <marco@gnu.org>
11348
11349 * normal/execute.c (grub_script_execute_cmd): Change the return
11350 type to `grub_err_t'. Correctly return the error.
11351 (grub_script_execute_cmdline): In case a command line is not a
11352 command or a function, try to interpret it as an assignment.
11353
f85934bd 113542006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11355
11356 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11357 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11358 skip a node whose name is obviously invalid as UTF-16,
11359 i.e. contains a NUL character. Stop the iteration when the last
11360 directory entry is found. Instead of using the return value of
11361 grub_hfsplus_btree_iterate_node, store the value in RET and use
11362 it, because the iterator can be stopped by the last directory
11363 entry.
11364
8f8a2cf8 113652006-04-30 Marco Gerards <marco@gnu.org>
11366
11367 * include/grub/env.h (grub_env_export): New prototype. Reported
11368 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11369
a27e84ce 113702006-04-30 Marco Gerards <marco@gnu.org>
11371
11372 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11373 size of the extents in a catalog file record.
11374
eaef0553 113752006-04-29 Marco Gerards <marco@gnu.org>
11376
11377 * commands/configfile.c (grub_cmd_configfile): Execute the
11378 configfile within its own context.
11379
11380 * include/grub/env.h (grub_env_context_open): New prototype.
11381 (grub_env_context_close): Likewise.
11382
11383 * kern/env.c (grub_env): Removed.
11384 (grub_env_sorted): Likewise.
11385 (grub_env_context): New variable.
11386 (grub_env_var_context): Likewise.
11387 (grub_env_find): Search both the active context and the global
11388 context.
11389 (grub_env_context_open): New function.
11390 (grub_env_context_close): Likewise.
11391 (grub_env_insert): Likewise.
11392 (grub_env_remove): Likewise.
11393 (grub_env_export): Likewise.
11394 (grub_env_set): Changed to use helper functions to avoid code
11395 duplication.
11396 (grub_env_iterate): Rewritten so both the current context and the
11397 global context are being used.
11398
11399 * normal/command.c (export_command): New function.
11400 (grub_command_init): Register the `export' function.
11401
7b455f4d 114022006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
11403
11404 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11405 explicitly to suppress gcc's warnings.
11406 * fs/fat.c (grub_fat_find_dir): Likewise.
11407 (grub_fat_label): Likewise.
11408 * fs/xfs.c (grub_xfs_read_inode): Likewise.
11409 (grub_xfs_mount): Likewise.
11410 (grub_xfs_label): Likewise.
11411 * fs/affs.c (grub_affs_mount): Likewise.
11412 (grub_affs_label): Likewise.
11413 (grub_affs_iterate_dir): Likewise.
11414 * fs/sfs.c (grub_sfs_mount): Likewise.
11415 (grub_sfs_iterate_dir): Likewise.
11416 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11417 * fs/hfs.c (grub_hfs_mount): Likewise.
11418 (grub_hfs_cmp_catkeys): Likewise.
11419 (grub_hfs_find_dir): Likewise.
11420 (grub_hfs_dir): Likewise.
11421 (grub_hfs_label): Likewise.
11422 * fs/jfs.c (grub_jfs_mount): Likewise.
11423 (grub_jfs_opendir): Likewise.
11424 (grub_jfs_getent): Likewise.
11425 (grub_jfs_lookup_symlink): Likewise.
11426 (grub_jfs_label): Likewise.
11427 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11428 (grub_hfsplus_iterate_dir): Likewise.
11429 (grub_hfsplus_btree_iterate_node): Made static.
11430
11431 * util/grub-emu.c (prefix): New variable.
11432 (grub_machine_set_prefix): New function.
11433 (main): Do not set the environment variable "prefix" here. Only
11434 set PREFIX, which is used later by grub_machine_set_prefix.
11435
11436 * include/grub/video.h: Do not include grub/symbol.h.
11437 (grub_video_register): Not exported. This symbol is not defined in
11438 the kernel.
11439 (grub_video_unregister): Likewise.
11440 (grub_video_iterate): Likewise.
11441 (grub_video_setup): Likewise.
11442 (grub_video_restore): Likewise.
11443 (grub_video_get_info): Likewise.
11444 (grub_video_get_blit_format): Likewise.
11445 (grub_video_set_palette): Likewise.
11446 (grub_video_get_palette): Likewise.
11447 (grub_video_set_viewport): Likewise.
11448 (grub_video_get_viewport): Likewise.
11449 (grub_video_map_color): Likewise.
11450 (grub_video_map_rgb): Likewise.
11451 (grub_video_map_rgba): Likewise.
11452 (grub_video_fill_rect): Likewise.
11453 (grub_video_blit_glyph): Likewise.
11454 (grub_video_blit_bitmap): Likewise.
11455 (grub_video_blit_render_target): Likewise.
11456 (grub_video_scroll): Likewise.
11457 (grub_video_swap_buffers): Likewise.
11458 (grub_video_create_render_target): Likewise.
11459 (grub_video_delete_render_target): Likewise.
11460 (grub_video_set_active_render_target): Likewise.
11461
11462 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11463 Undefined.
11464 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11465
11466 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11467 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11468 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11469 instead of $(srcdir)/genkernsyms.sh.
11470
11471 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11472 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11473 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11474 instead of $(srcdir)/genkernsyms.sh.
11475
11476 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11477 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11478 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11479 instead of $(srcdir)/genkernsyms.sh.
11480
11481 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11482 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11483 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11484 instead of $(srcdir)/genkernsyms.sh.
11485
11486 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11487 genkernsyms.sh.
11488
11489 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11490 genkernsyms.sh.
11491 (gensymlist.sh): New target.
11492 (genkernsyms.sh): Likewise.
11493
11494 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11495 genkernsyms.sh.in and gensymlist.sh.in.
11496
11497 * genkernsyms.sh: Removed.
11498 * gensymlist.sh: Likewise.
f19dbdb7 11499
7b455f4d 11500 * genkernsyms.sh.in: New file.
11501 * gensymlist.sh.in: Likewise.
11502
1885bb27 115032006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11504
11505 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11506 clobber "prefix", since we may have already set it manually.
11507
71538dff 115082006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11509
11510 * kern/misc.c (abort): New alias for grub_abort.
11511
2965c7cc 115122006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
11513
11514 A new machine-specific function "grub_machine_set_prefix" is
11515 defined. This is called after loading modules, so that a prefix
11516 initialization can use modules. Also, this change adds an
11517 intensive debugging feature for the memory manager via the
11518 configure option "--enable-mm-debug".
f19dbdb7 11519
2965c7cc 11520 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11521 PART.LEN.
11522
11523 * kern/sparc64/ieee1275/init.c (abort): Removed.
11524 (grub_stop): Likewise.
11525 (grub_exit): New function.
11526 (grub_set_prefix): Renamed to ...
11527 (grub_machine_set_prefix): ... this.
11528 (grub_machine_init): Do not call grub_set_prefix.
11529
11530 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11531 (grub_machine_set_prefix): ... this.
11532 (grub_machine_init): Do not call grub_set_prefix.
11533
11534 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11535 (grub_machine_init): Do not set the prefix here.
11536
11537 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11538
11539 * kern/efi/init.c: Include grub/mm.h.
11540 (grub_efi_set_prefix): New function.
11541
11542 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11543 (grub_efi_get_filename): New function.
11544 (grub_print_device_path): Renamed to ...
11545 (grub_efi_print_device_path): ... this.
11546
11547 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11548 [MM_DEBUG] (grub_realloc): Likewise.
11549 [MM_DEBUG] (grub_free): Likewise.
11550 [MM_DEBUG] (grub_memalign): Likewise.
11551 [MM_DEBUG] (grub_mm_debug): New variable.
11552 [MM_DEBUG] (grub_debug_malloc): New function.
11553 [MM_DEBUG] (grub_debug_free): New function.
11554 [MM_DEBUG] (grub_debug_realloc): New function.
11555 [MM_DEBUG] (grub_debug_memalign): New function.
11556
11557 * kern/misc.c (grub_abort): Print a newline to distinguish
11558 the message.
11559
11560 * kern/main.c (grub_main): Call grub_machine_set_prefix and
11561 grub_set_root_dev after loading modules. This is necessary when
11562 setting a prefix depends on modules.
11563
11564 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11565 (grub_efi_print_device_path): ... this.
11566 (grub_efi_get_filename): New prototype.
11567 (grub_efi_set_prefix): Likewise.
11568
11569 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11570 and grub/disk.h.
11571 (grub_efidisk_get_device_handle): New prototype.
11572 (grub_efidisk_get_device_name): Likewise.
11573
11574 * include/grub/mm.h: Include config.h.
11575 (MM_DEBUG): Removed.
11576 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11577 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11578 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11579 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11580 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11581 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11582 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11583 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11584 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11585
11586 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11587
11588 * disk/efi/efidisk.c: Include grub/partition.h.
11589 (iterate_child_devices): New function.
11590 (add_device): First, compare only last device path nodes, so that
11591 devices are sorted by the types.
11592 (grub_efidisk_get_device_handle): New function.
11593 (grub_efidisk_get_device_name): Likewise.
11594
11595 * configure.ac (--enable-mm-debug): New option to enable the
11596 memory manager debugging feature. This makes the binary much
11597 bigger, so is disabled by default.
11598
9cacaa17 115992006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
11600
11601 Use grub_abort instead of grub_stop, and grub_exit must be
11602 define in each architecture now. Also, this change adds support
11603 for EFI disks.
f19dbdb7 11604
9cacaa17 11605 * util/i386/pc/grub-probefs.c: Include grub/term.h.
11606 (grub_getkey): New function.
11607 (grub_term_get_current): Likewise.
11608
11609 * util/i386/pc/grub-setup.c: Include grub/term.h.
11610 (grub_getkey): New function.
11611 (grub_term_get_current): Likewise.
11612
11613 * util/misc.c (grub_stop): Renamed to ...
11614 (grub_exit): ... this.
11615
11616 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11617 (grub_exit): ... this.
11618 (grub_machine_init): Use grub_abort instead of abort.
11619 (grub_stop): Removed.
11620
11621 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11622 abort.
11623
11624 * kern/i386/pc/startup.S (grub_exit): New function.
11625 (cold_reboot): New label.
11626
11627 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11628 (grub_efi_init): Call grub_efidisk_init.
11629 (grub_efi_fini): Call grub_efidisk_fini.
11630
11631 * kern/efi/efi.c: Include grub/mm.h.
11632 (grub_efi_console_control_guid): Renamed to ...
11633 (console_control_guid): ... this.
11634 (grub_efi_loaded_image_guid): Renamed to ...
11635 (loaded_image_guid): ... this.
11636 (grub_efi_locate_handle): New function.
11637 (grub_efi_open_protocol): Likewise.
11638 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11639 GRUB_EFI_CONSOLE_CONTROL_GUID.
11640 (grub_efi_exit): Removed.
11641 (grub_stop): Likewise.
11642 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11643 (grub_exit): New function.
11644 (grub_print_device_path): Likewise.
11645
11646 * kern/rescue.c (grub_rescue_cmd_exit): New function.
11647 (grub_enter_rescue_mode): Register "exit".
11648
11649 * kern/misc.c (grub_real_dprintf): A cosmetic change.
11650 (grub_abort): New function.
11651
11652 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11653
11654 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11655
11656 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11657
11658 * include/grub/efi/efi.h (grub_efi_exit): Removed.
11659 (grub_print_device_path): New prototype.
11660 (grub_efi_locate_handle): Likewise.
11661 (grub_efi_open_protocol): Likewise.
11662
11663 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11664 * disk/efi/efidisk.c: Likewise.
11665
11666 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11667
11668 * include/grub/efi/console_control.h
11669 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11670
11671 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11672 last 8 bytes as an array.
11673 (GRUB_EFI_DISK_IO_GUID): New macro.
11674 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11675 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11676 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11677 grub_uint8_t.
11678 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11679 (struct grub_efi_device_path): Rename the member "sub_type" to
11680 "subtype".
11681 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11682 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11683 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11684 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11685 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11686 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11687 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11688 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11689 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11690 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11691 (struct grub_efi_pci_device_path): New structure.
11692 (grub_efi_pci_device_path_t): New type.
11693 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11694 (struct grub_efi_pccard_device_path): New structure.
11695 (grub_efi_pccard_device_path_t): New type.
11696 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11697 (struct grub_efi_memory_mapped_device_path): New structure.
11698 (grub_efi_memory_mapped_device_path_t): New type.
11699 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11700 (struct grub_efi_vendor_device_path): New structure.
11701 (grub_efi_vendor_device_path_t): New type.
11702 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11703 (struct grub_efi_controller_device_path): New structure.
11704 (grub_efi_controller_device_path_t): New type.
11705 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11706 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11707 (struct grub_efi_acpi_device_path): New structure.
11708 (grub_efi_acpi_device_path_t): New type.
11709 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11710 (struct grub_efi_expanded_acpi_device_path): New structure.
11711 (grub_efi_expanded_acpi_device_path_t): New type.
11712 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11713 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11714 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11715 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11716 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11717 (struct grub_efi_atapi_device_path): New structure.
11718 (grub_efi_atapi_device_path_t): New type.
11719 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11720 (struct grub_efi_fibre_channel_device_path): New structure.
11721 (grub_efi_fibre_channel_device_path_t): New type.
11722 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11723 (struct grub_efi_1394_device_path): New structure.
11724 (grub_efi_1394_device_path_t): New type.
11725 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11726 (struct grub_efi_usb_device_path): New structure.
11727 (grub_efi_usb_device_path_t): New type.
11728 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11729 (struct grub_efi_usb_class_device_path): New structure.
11730 (grub_efi_usb_class_device_path_t): New type.
11731 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11732 (struct grub_efi_i2o_device_path): New structure.
11733 (grub_efi_i2o_device_path_t): New type.
11734 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11735 (struct grub_efi_mac_address_device_path): New structure.
11736 (grub_efi_mac_address_device_path_t): New type.
11737 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
11738 (struct grub_efi_ipv4_device_path): New structure.
11739 (grub_efi_ipv4_device_path_t): New type.
11740 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
11741 (struct grub_efi_ipv6_device_path): New structure.
11742 (grub_efi_ipv6_device_path_t): New type.
11743 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
11744 (struct grub_efi_infiniband_device_path): New structure.
11745 (grub_efi_infiniband_device_path_t): New type.
11746 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
11747 (struct grub_efi_uart_device_path): New structure.
11748 (grub_efi_uart_device_path_t): New type.
11749 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
11750 (struct grub_efi_vendor_messaging_device_path): New structure.
11751 (grub_efi_vendor_messaging_device_path_t): New type.
11752 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
11753 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
11754 (struct grub_efi_hard_drive_device_path): New structure.
11755 (grub_efi_hard_drive_device_path_t): New type.
11756 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
11757 (struct grub_efi_cdrom_device_path): New structure.
11758 (grub_efi_cdrom_device_path_t): New type.
11759 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
11760 (struct grub_efi_vendor_media_device_path): New structure.
11761 (grub_efi_vendor_media_device_path_t): New type.
11762 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
11763 (struct grub_efi_file_path_device_path): New structure.
11764 (grub_efi_file_path_device_path_t): New type.
11765 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
11766 (struct grub_efi_protocol_device_path): New structure.
11767 (grub_efi_protocol_device_path_t): New type.
11768 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
11769 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
11770 (struct grub_efi_bios_device_path): New structure.
11771 (grub_efi_bios_device_path_t): New type.
11772 (struct grub_efi_disk_io): New structure.
11773 (grub_efi_disk_io_t): New type.
11774 (struct grub_efi_block_io_media): New structure.
11775 (grub_efi_block_io_media_t): New type.
11776 (struct grub_efi_block_io): New structure.
11777 (grub_efi_block_io_t): New type.
11778
11779 * include/grub/misc.h (grub_stop): Removed.
11780 (grub_exit): New prototype.
11781 (grub_abort): Likewise.
11782
11783 * include/grub/disk.h (enum grub_disk_dev_id): Added
11784 GRUB_DISK_DEVICE_EFIDISK_ID.
11785
11786 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
11787 disk/efi/efidisk.c.
11788 (kernel_syms.lst): Remove the target if an error occurs.
11789
49986a9f 117902006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
11791
11792 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
11793 as it was simply too buggy.
11794
970d3b8a 117952006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
11796
11797 * kern/misc.c (grub_lltoa): New function.
11798 (grub_vsprintf): Added support for the long long suffix,
11799 i.e. "ll".
11800
ff04ec24 118012006-04-20 Hollis Blanchard <hollis@penguinppc.org>
11802
11803 * Makefile.in (LDFLAGS): Add variable.
11804 (LD): Remove variable.
11805 * configure.ac: Add -m32 to LDFLAGS.
11806 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
11807 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
11808 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
11809 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
11810 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
11811 variables.
11812 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
11813 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
11814 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
11815
37e5e1a4 118162006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
11817
11818 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
11819 length for unknown glyph.
11820
c352d8dd 118212006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
11822
2eab1c0d 11823 Add support for pre-loaded modules into the EFI port.
f19dbdb7 11824
2eab1c0d 11825 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
11826 completely. Accept one more argument DIR. The caller has changed.
11827
11828 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
11829
11830 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
11831 (grub_efi_loaded_image_guid): New variable.
11832 (grub_efi_get_loaded_image): New function.
11833 (grub_arch_modules_addr): Likewise.
11834
11835 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
11836 prototype.
11837
11838 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
11839 (struct grub_efi_loaded_image): New structure.
11840 (grub_efi_loaded_image_t): New type.
11841
118422006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 11843
c352d8dd 11844 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
11845 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
11846 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
11847
6d01d6b4 118482006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
11849
11850 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
11851
976a4ea0 118522006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
11853
11854 * DISTLIST: Added include/grub/efi/console.h,
11855 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
11856 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11857
11858 * include/grub/efi/console.h: New file.
11859 * include/grub/efi/time.h: Likewise.
11860 * include/grub/i386/efi/kernel.h: Likewise.
11861 * kern/efi/init.c: Likewise.
11862 * kern/efi/mm.c: Likewise.
11863 * term/efi/console.c: Likewise.
f19dbdb7 11864
976a4ea0 11865 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
11866 (grub_stop): Removed.
11867 (grub_get_rtc): Likewise.
11868 (grub_machine_init): Simply call grub_efi_init.
11869 (grub_machine_fini): Call grub_efi_fini.
11870
11871 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
11872 (grub_efi_output_string): Removed.
11873 (grub_efi_stall): New function.
11874 (grub_stop): Likewise.
11875 (grub_get_rtc): Likewise.
11876
11877 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
11878 (grub_efi_stall): New prototype.
11879 (grub_efi_allocate_pages): Likewise.
11880 (grub_efi_free_pages): Likewise.
11881 (grub_efi_get_memory_map): Likewise.
11882 (grub_efi_mm_init): Likewise.
11883 (grub_efi_mm_fini): Likewise.
11884 (grub_efi_init): Likewise.
11885 (grub_efi_fini): Likewise.
11886
11887 * include/grub/i386/efi/time.h: Do not include
11888 grub/symbol.h. Include grub/efi/time.h.
11889 (GRUB_TICKS_PER_SECOND): Removed.
11890 (grub_get_rtc): Likewise.
11891
11892 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
11893 Added padding. The EFI spec is buggy.
11894 (GRUB_EFI_BLACK): New macro.
11895 (GRUB_EFI_BLUE): Likewise.
11896 (GRUB_EFI_GREEN): Likewise.
11897 (GRUB_EFI_CYAN): Likewise.
11898 (GRUB_EFI_RED): Likewise.
11899 (GRUB_EFI_MAGENTA): Likewise.
11900 (GRUB_EFI_BROWN): Likewise.
11901 (GRUB_EFI_LIGHTGRAY): Likewise.
11902 (GRUB_EFI_BRIGHT): Likewise.
11903 (GRUB_EFI_DARKGRAY): Likewise.
11904 (GRUB_EFI_LIGHTBLUE): Likewise.
11905 (GRUB_EFI_LIGHTGREEN): Likewise.
11906 (GRUB_EFI_LIGHTCYAN): Likewise.
11907 (GRUB_EFI_LIGHTRED): Likewise.
11908 (GRUB_EFI_LIGHTMAGENTA): Likewise.
11909 (GRUB_EFI_YELLOW): Likewise.
11910 (GRUB_EFI_WHITE): Likewise.
11911 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
11912 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
11913 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
11914 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
11915 (GRUB_EFI_BACKGROUND_RED): Likewise.
11916 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
11917 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
11918 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
11919 (GRUB_EFI_TEXT_ATTR): Likewise.
11920
11921 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
11922 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11923 (kernel_mod_HEADERS): Added efi/time.h.
11924
83709125 119252006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
11926
11927 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
11928 include/grub/efi/api.h, include/grub/efi/console_control.h,
11929 include/grub/efi/efi.h, include/grub/efi/pe32.h,
11930 include/grub/i386/efi/time.h, kern/efi/efi.c,
11931 kern/i386/efi/init.c, kern/i386/efi/startup.S,
11932 and util/i386/efi/grub-mkimage.c.
11933
11934 * Makefile.in (RMKFILES): Added i386-efi.rmk.
11935
11936 * genmk.rb (PModule#rule): Do not export symbols if
11937 #{prefix}_EXPORTS is set to "no".
11938
11939 * conf/i386-efi.mk: New file.
11940 * conf/i386-efi.rmk: Likewise.
11941 * include/grub/efi/api.h: Likewise.
11942 * include/grub/efi/console_control.h: Likewise.
11943 * include/grub/efi/efi.h: Likewise.
11944 * include/grub/efi/pe32.h: Likewise.
11945 * include/grub/i386/efi/time.h: Likewise.
11946 * kern/efi/efi.c: Likewise.
11947 * kern/i386/efi/init.c: Likewise.
11948 * kern/i386/efi/startup.S: Likewise.
11949 * util/i386/efi/grub-mkimage.c: Likewise.
11950
119512006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 11952
11953 * include/grub/script.h: Include <grub/parser.h> and
11954 "grub_script.tab.h".
11955 (struct grub_lexer_param): New struct.
11956 (struct grub_parser_param): Likewise.
11957 (grub_script_create_arglist): Pass the state in an argument.
11958 (grub_script_add_arglist): Likewise.
11959 (grub_script_create_cmdline): Likewise.
11960 (grub_script_create_cmdblock): Likewise.
11961 (grub_script_create_cmdif): Likewise.
11962 (grub_script_create_cmdmenu): Likewise.
11963 (grub_script_add_cmd): Likewise.
11964 (grub_script_arg_add): Likewise.
11965 (grub_script_lexer_ref): Likewise.
11966 (grub_script_lexer_deref): Likewise.
11967 (grub_script_lexer_record_start): Likewise.
11968 (grub_script_lexer_record_stop): Likewise.
11969 (grub_script_mem_record): Likewise.
11970 (grub_script_mem_record_stop): Likewise.
11971 (grub_script_malloc): Likewise.
11972 (grub_script_yylex): Likewise.
11973 (grub_script_yyparse): Likewise.
11974 (grub_script_yyerror): Likewise.
11975 (grub_script_yylex): Likewise.
11976 (grub_script_lexer_init): Return the state.
11977
11978 * normal/lexer.c (grub_script_lexer_state): Removed variable.
11979 (grub_script_lexer_done): Likewise.
11980 (grub_script_lexer_getline): Likewise.
11981 (grub_script_lexer_refs): Likewise.
11982 (script): Likewise.
11983 (newscript): Likewise.
11984 (record): Likewise.
11985 (recording): Likewise.
11986 (recordpos): Likewise.
11987 (recordlen): Likewise.
11988 (grub_script_lexer_init): Return the state instead of setting
11989 global variables.
11990 (grub_script_lexer_ref): Use the newly added argument for state
11991 instead of globals.
11992 (grub_script_lexer_deref): Likewise.
11993 (grub_script_lexer_record_start): Likewise.
11994 (grub_script_lexer_record_stop): Likewise.
11995 (recordchar): Likewise.
11996 (nextchar): Likewise.
11997 (grub_script_yylex2): Likewise.
11998 (grub_script_yylex): Likewise.
11999 (grub_script_yyerror): Likewise.
12000
12001 * normal/parser.y (func_mem): Removed variable.
12002 (menu_entry): Likewise.
12003 (err): Likewise.
12004 (%lex-param): New parser option.
12005 (%parse-param): Likewise.
12006 (script): Always return the AST.
12007 (argument): Pass the state around.
12008 (arguments): Likewise.
12009 (grubcmd): Likewise.
12010 (commands): Likewise.
12011 (function): Likewise.
12012 (menuentry): Likewise.
12013 (if_statement): Likewise.
12014 (if): Likewise.
12015
12016 * normal/script.c (grub_script_memused): Removed variable.
12017 (grub_script_parsed): Likewise.
12018 (grub_script_malloc): Added a state argument. Use that instead of
12019 global variables.
12020 (grub_script_mem_record): Likewise.
12021 (grub_script_mem_record_stop): Likewise.
12022 (grub_script_arg_add): Likewise.
12023 (grub_script_add_arglist): Likewise.
12024 (grub_script_create_cmdline): Likewise.
12025 (grub_script_create_cmdif): Likewise.
12026 (grub_script_create_cmdmenu): Likewise.
12027 (grub_script_add_cmd): Likewise.
12028 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 12029
e2a8c904 120302006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 12031
12032 * normal/command.c (grub_command_init): Remove the title command.
12033
12034 * normal/lexer.c (grub_script_yylex): Renamed from this...
12035 (grub_script_yylex2): ... to this.
12036 (grub_script_yylex): New function. Temporary
12037 introduced to filter some tokens.
12038 (grub_script_yyerror): Print a newline.
12039
12040 * normal/main.c (read_config_file): Output information about the
12041 lines that contain errors. Wait for a key after all lines have
12042 been processed. Don't return an empty menu.
12043
12044 * normal/parser.y (func_mem): Don't initialize.
12045 (menu_entry): Likewise.
12046 (err): New variable.
12047 (script): Don't return anything when an error was encountered.
12048 (ws, returns): Removed rules.
12049 (argument): Disabled concatenated variable support.
12050 (arguments): Remove explicit separators.
12051 (grubcmd): Likewise.
12052 (function): Likewise.
12053 (menuentry): Likewise.
12054 (if): Likewise.
12055 (commands): Likewise. Add error handling.
12056
12057 * normal/script.c (grub_script_create_cmdline): If
12058 `grub_script_parsed' is 0, assume the parser encountered an error.
12059
c9a86192 120602006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12061
12062 * configure.ac: Add support for EFI. Fix the typo
12063 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12064
70f3b243 120652006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12066
12067 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12068 foreign multibyte characters should be shown correctly.
12069
65f201ad 120702006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12071
12072 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12073 calculation.
12074 (read_config_file): Made it to close file before returning.
12075
b4b93674 120762006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12077
12078 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12079 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12080 video/i386/pc/vbefill.c.
12081
12082 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12083 video/i386/pc/vbefill.c.
12084
12085 * include/grub/video.h (grub_video_blit_format): New enum.
12086 (grub_video_mode_info): Added new member blit_format.
12087 (grub_video_get_blit_format): New function prototype.
12088
12089 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12090 function prototype.
12091 (grub_video_vbe_map_rgb): Likewise.
12092 (grub_video_vbe_unmap_color): Likewise.
12093
12094 * include/grub/i386/pc/vbeblit.h: New file.
12095
12096 * include/grub/i386/pc/vbefill.h: New file.
12097
12098 * video/video.c (grub_video_get_blit_format): New function.
12099 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12100 (grub_video_vbe_map_rgb): Likewise.
12101 (grub_video_vbe_unmap_color): Likewise.
12102
12103 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12104 optimized fills.
12105 (grub_video_vbe_blit_render_target): Changed to use more optimized
12106 blits.
12107 (grub_video_vbe_setup): Added detection for optimized settings.
12108 (grub_video_vbe_create_render_target): Likewise.
12109
12110 * video/i386/pc/vbeblit.c: New file.
12111
12112 * video/i386/pc/vbefill.c: New file.
12113
c2379b9c 121142006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12115
12116 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12117 here...
12118
12119 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12120 parsing to support both hex and dec ranges. If filename was missing
12121 show usage information.
12122
bd0d7896 121232006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12124
12125 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12126 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12127
12128 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12129 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12130 (video_mod_SOURCES): Added.
12131 (video_mod_CFLAGS): Likewise.
12132 (video_mod_LDFLAGS): Likewise.
12133 (gfxterm_mod_SOURCES): Likewise.
12134 (gfxterm_mod_CFLAGS): Likewise.
12135 (gfxterm_mod_LDFLAGS): Likewise.
12136 (videotest_mod_SOURCES): Likewise.
12137 (videotest_mod_CFLAGS): Likewise.
12138 (videotest_mod_LDFLAGS): Likewise.
12139 (vesafb_mod_SOURCES): Removed.
12140 (vesafb_mod_CFLAGS): Likewise.
12141 (vesafb_mod_LDFLAGS): Likewise.
12142 (vga_mod_SOURCES): Likewise.
12143 (vga_mod_CFLAGS): Likewise.
12144 (vga_mod_LDFLAGS): Likewise.
12145
12146 * commands/videotest.c: New file.
12147
12148 * font/manager.c (fill_with_default_glyph): Modified to use
12149 grub_font_glyph.
12150 (grub_font_get_glyph): Likewise.
12151 (fontmanager): Renamed from this...
12152 (font_manager): ... to this.
12153
12154 * include/grub/font.h (grub_font_glyph): Added new structure.
12155 (grub_font_get_glyph): Modified to use grub_font_glyph.
12156
12157 * include/grub/misc.h (grub_abs): Added as inline function.
12158
12159 * include/grub/video.h: New file.
12160
12161 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12162 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12163 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12164 (grub_vbe_get_controller_info): Renamed from this...
12165 (grub_vbe_bios_get_controller_info): ... to this.
12166 (grub_vbe_get_mode_info): Renamed from this...
12167 (grub_vbe_bios_get_mode_info): ... to this.
12168 (grub_vbe_set_mode): Renamed from this...
12169 (grub_vbe_bios_set_mode): ... to this.
12170 (grub_vbe_get_mode): Renamed from this...
12171 (grub_vbe_bios_get_mode): ... to this.
12172 (grub_vbe_set_memory_window): Renamed from this...
12173 (grub_vbe_bios_set_memory_window): ... to this.
12174 (grub_vbe_get_memory_window): Renamed from this...
12175 (grub_vbe_bios_get_memory_window): ... to this.
12176 (grub_vbe_set_scanline_length): Renamed from this...
12177 (grub_vbe_set_scanline_length): ... to this.
12178 (grub_vbe_get_scanline_length): Renamed from this...
12179 (grub_vbe_bios_get_scanline_length): ... to this.
12180 (grub_vbe_set_display_start): Renamed from this...
12181 (grub_vbe_bios_set_display_start): ... to this.
12182 (grub_vbe_get_display_start): Renamed from this...
12183 (grub_vbe_bios_get_display_start): ... to this.
12184 (grub_vbe_set_palette_data): Renamed from this...
12185 (grub_vbe_bios_set_palette_data): ... to this.
12186 (grub_vbe_set_pixel_rgb): Removed.
12187 (grub_vbe_set_pixel_index): Likewise.
12188
12189 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12190 from this...
12191 (grub_vbe_bios_get_controller_info): ... to this.
12192 (grub_vbe_get_mode_info): Renamed from this...
12193 (grub_vbe_bios_get_mode_info): ... to this.
12194 (grub_vbe_set_mode): Renamed from this...
12195 (grub_vbe_bios_set_mode): ... to this.
12196 (grub_vbe_get_mode): Renamed from this...
12197 (grub_vbe_bios_get_mode): ... to this.
12198 (grub_vbe_set_memory_window): Renamed from this...
12199 (grub_vbe_bios_set_memory_window): ... to this.
12200 (grub_vbe_get_memory_window): Renamed from this...
12201 (grub_vbe_bios_get_memory_window): ... to this.
12202 (grub_vbe_set_scanline_length): Renamed from this...
12203 (grub_vbe_set_scanline_length): ... to this.
12204 (grub_vbe_get_scanline_length): Renamed from this...
12205 (grub_vbe_bios_get_scanline_length): ... to this.
12206 (grub_vbe_set_display_start): Renamed from this...
12207 (grub_vbe_bios_set_display_start): ... to this.
12208 (grub_vbe_get_display_start): Renamed from this...
12209 (grub_vbe_bios_get_display_start): ... to this.
12210 (grub_vbe_set_palette_data): Renamed from this...
12211 (grub_vbe_bios_set_palette_data): ... to this.
12212 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12213 getting corrupted after calling it. Added more pushes and pops.
12214 (grub_vbe_bios_set_mode): Likewise.
12215 (grub_vbe_bios_get_mode): Likewise.
12216 (grub_vbe_bios_get_memory_window): Likewise.
12217 (grub_vbe_bios_set_scanline_length): Likewise.
12218 (grub_vbe_bios_get_scanline_length): Likewise.
12219 (grub_vbe_bios_get_display_start): Likewise.
12220 (grub_vbe_bios_set_palette_data): Likewise.
12221
12222 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12223 (cl_insert): Likewise.
12224 (cl_delete): Likewise.
12225
12226 * term/gfxterm.c: New file.
12227
12228 * term/i386/pc/vesafb.c: Removed file.
12229
12230 * video/video.c: New file.
12231
12232 * video/i386/pc/vbe.c (real2pm): Added new function.
12233 (grub_video_vbe_draw_pixel): Likewise.
12234 (grub_video_vbe_get_video_ptr): Likewise.
12235 (grub_video_vbe_get_pixel): Likewise
12236 (grub_video_vbe_init): Likewise.
12237 (grub_video_vbe_fini): Likewise.
12238 (grub_video_vbe_setup): Likewise.
12239 (grub_video_vbe_get_info): Likewise.
12240 (grub_video_vbe_set_palette): Likewise.
12241 (grub_video_vbe_get_palette): Likewise.
12242 (grub_video_vbe_set_viewport): Likewise.
12243 (grub_video_vbe_get_viewport): Likewise.
12244 (grub_video_vbe_map_color): Likewise.
12245 (grub_video_vbe_map_rgb): Likewise.
12246 (grub_video_vbe_map_rgba): Likewise.
12247 (grub_video_vbe_unmap_color): Likewise.
12248 (grub_video_vbe_fill_rect): Likewise.
12249 (grub_video_vbe_blit_glyph): Likewise.
12250 (grub_video_vbe_blit_bitmap): Likewise.
12251 (grub_video_vbe_blit_render_target): Likewise.
12252 (grub_video_vbe_scroll): Likewise.
12253 (grub_video_vbe_swap_buffers): Likewise.
12254 (grub_video_vbe_create_render_target): Likewise.
12255 (grub_video_vbe_delete_render_target): Likewise.
12256 (grub_video_vbe_set_active_render_target): Likewise.
12257 (grub_vbe_set_pixel_rgb): Remove function.
12258 (grub_vbe_set_pixel_index): Likewise.
12259 (index_color_mode): Remove static variable.
12260 (active_mode): Likewise.
12261 (framebuffer): Likewise.
12262 (bytes_per_scan_line): Likewise.
12263 (grub_video_vbe_adapter): Added new static variable.
12264 (framebuffer): Likewise.
12265 (render_target): Likewise.
12266 (initial_mode): Likewise.
12267 (mode_in_use): Likewise.
12268 (mode_list): Likewise.
12269
5f97350b 122702006-03-10 Marco Gerards <marco@gnu.org>
12271
12272 * configure.ac (AC_INIT): Bumped to 1.93.
12273
12274 * DISTLIST: Added `include/grub/hfs.h'.
12275
a3c5c6f8 122762006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
12277
12278 * boot/i386/pc/boot.S (general_error): Before looping, try INT
12279 18H, which might help the BIOS falling back to next boot media.
12280
6de53d26 122812006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
12282
12283 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12284 Poe Chen <poe.poechen@gmail.com>.
12285
77c4a393 122862006-01-17 Marco Gerards <marco@gnu.org>
12287
12288 * include/grub/normal.h: Include <grub/script.h>.
12289 (grub_command_list): Removed struct.
12290 (grub_command_list_t): Removed type.
12291 (grub_menu_entry): Remove members `num' and `command_list'. Add
12292 members `commands' and `sourcecode'.
12293 * include/grub/script.h: Add inclusion guards.
12294 (grub_script_cmd_menuentry): New struct.
12295 (grub_script_execute_menuentry): New prototype.
12296 (grub_script_lexer_record_start): Likewise.
12297 (grub_script_lexer_record_stop): Likewise.
12298 * normal/execute.c (grub_script_execute_menuentry): New function.
12299 * normal/lexer.c (record, recording, recordpos, recordlen): New
12300 variables.
12301 (grub_script_lexer_record_start): New function.
12302 (grub_script_lexer_record_stop): Likewise.
12303 (recordchar): Likewise.
12304 (nextchar): Likewise.
12305 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
12306 2048 as the buffer size. Add the tokens `menuentry' and `@'.
12307 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12308 (current_menu): New variable.
12309 (free_menu): Mainly rewritten.
12310 (grub_normal_menu_addentry): New function.
12311 (read_config_file): Rewritten.
12312 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 12313 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 12314 the menu entry.
12315 (run): Mainly rewritten.
12316 * normal/parser.y (menu_entry): New variable.
12317 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12318 (menuentry): New rule.
12319 (command): Add `menuentry'.
12320 (if_statement): Allow additional returns before `fi'.
12321 * normal/script.c (grub_script_create_cmdmenu): New function.
12322
144f1f98 123232006-01-03 Marco Gerards <marco@gnu.org>
12324
12325 * INSTALL: GNU Bison is required.
12326 * configure.ac: Rewritten the test to detect Bison.
12327 * Makefile.in (YACC): New variable. Reported by Xun Sun
12328 <xun.sun.cn@gmail.com>.
12329
af4b2d89 123302006-01-03 Marco Gerards <marco@gnu.org>
12331
12332 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12333 the HFS+ filesystem to filesystem blocks.
12334 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12335 GCC warning is silenced.
12336
15643b71 123372006-01-03 Marco Gerards <marco@gnu.org>
12338
12339 * partmap/apple.c (apple_partition_map_iterate): Convert the data
12340 read from disk from big endian to host byte order.
12341
00905879 123422006-01-03 Hollis Blanchard <hollis@penguinppc.org>
12343
12344 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
12345 documentation.
12346 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12347 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12348 embedded HFS+ filesystem.
12349 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12350 (grub_hfs_sblock): Move from here...
12351 * include/grub/hfs.h: To here... New file.
12352 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
12353 documentation.
12354 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12355 New macros.
12356 (grub_hfsplus_volheader): Change type of member `magic' to
12357 `grub_uint16_t'.
12358 (grub_hfsplus_data): Add new member `embedded_offset'.
12359 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12360 returned block.
12361 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12362 Calculate the offset.
12363
8899bc3e 123642005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12365
12366 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12367 Removed.
12368 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12369
ae8c0277 123702005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12371
12372 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12373 ENV->NAME is NULL after allocating ENV->VALUE.
12374
07084456 123752005-12-25 Marco Gerards <marco@gnu.org>
12376
12377 * kern/env.c (grub_env_set): Rewritten the error handling code.
12378
4750f5f1 123792005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12380
12381 * geninit.sh: Made more robust, and more portable.
12382
50214199 123832005-12-25 Marco Gerards <marco@gnu.org>
12384
12385 Add support for Apple HFS+ filesystems.
f19dbdb7 12386
50214199 12387 * fs/hfsplus.c: New file.
12388
12389 * DISTLIST: Added `fs/hfsplus.c'.
12390
12391 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12392 (hfsplus_mod_SOURCES): New variable.
12393 (hfsplus_mod_CFLAGS): Likewise.
12394 (hfsplus_mod_LDFLAGS): Likewise.
12395 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12396 (grub_setup_SOURCES): Likewise.
12397 (grub_mkdevicemap_SOURCES): Likewise.
12398 (grub_emu_SOURCES): Likewise.
12399 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12400
12401 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12402
12403 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12404
befaed6c 124052005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12406
12407 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12408 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12409 include/grub/parser.h, include/grub/script.h, kern/parser.c,
12410 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12411 normal/lexer.c, normal/parser.y, normal/script.c, and
12412 partmap/gpt.c.
12413 Removed kern/sparc64/cache.c.
12414
12415 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12416 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12417 grub_emu_init.c.
12418
12419 * configure.ac (AC_INIT): Bumped to 1.92.
12420
6a124103 124212005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
12422
12423 * kern/err.c (grub_error_push): Added new function to support error
12424 stacks.
12425 (grub_error_pop): Likewise.
12426 (grub_error_stack_items): New local variable to support error stacks.
12427 (grub_error_stack_pos): Likewise.
12428 (grub_error_stack_assert): Likewise.
12429 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12430 stack depth.
12431 (grub_print_error): Added support to print errors from error stack.
12432
12433 * include/grub/err.h (grub_error_push): Added function prototype.
12434 (grub_error_pop): Likewise.
12435
be973c1b 124362005-12-09 Hollis Blanchard <hollis@penguinppc.org>
12437
12438 * configure.ac: Accept `powerpc64' as host_cpu.
12439 (amd64): Rename to `biarch32'.
12440
12441 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12442 non-cacheline-aligned addresses.
12443
12444 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12445 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
12446 if `size' is non-zero.
12447
b04216ab 124482005-12-03 Marco Gerards <mgerards@xs4all.nl>
12449
12450 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12451 and `cd' to make sure the filename is not prefixed with a
12452 directory name.
12453 (pkgdata_MODULES): Add `gpt.mod'.
12454 (gpt_mod_SOURCES): New variable.
12455 (gpt_mod_CFLAGS): Likewise.
12456 (gpt_mod_LDFLAGS): Likewise.
12457
12458 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12459
12460 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12461 New macro.
12462
12463 * partmap/gpt.c: New file.
12464
12465 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12466 GPT partition map is detected.
12467
41730ed9 124682005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
12469
12470 * commands/i386/pc/play.c: New file.
12471 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12472 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12473 macros.
f19dbdb7 12474
95dc3643 124752005-11-27 Marco Gerards <mgerards@xs4all.nl>
12476
12477 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12478 ((unused))' to silence gcc warning.
12479
1569ec51 124802005-11-26 Hollis Blanchard <hollis@penguinppc.org>
12481
12482 * configure.ac: Correct `AC_PROG_YACC' test.
12483
9abde152 124842005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12485
12486 * util/powerpc/ieee1275/grub-install.in: Run the mount point
12487 check before installing files.
12488
44b83271 124892005-11-22 Mike Small <smallm@panix.com>
12490
12491 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12492 number regex so multidigit numbers are recognized correctly.
12493
124942005-11-22 Mike Small <smallm@panix.com>
12495
12496 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12497 debugging message before attempting to claim memory.
12498 (grub_rescue_cmd_initrd): Add a claim debugging message and try
12499 multiple addresses in case of failure.
12500
9c12956b 125012005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12502
12503 * term/tparm.c (get_space): Remove empty `if' statement.
12504
12505 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12506
12507 * kern/parser.c (check_varstate): Rename `state' to 's'.
12508
aeaf81d9 125092005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12510
12511 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
12512 variable definitions to the beginning of each function. Sort stack
12513 variables by size.
12514 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
12515 `buf' argument to `char *'.
12516
79bbb63f 125172005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12518
12519 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12520 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 12521 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 12522 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12523 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12524 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12525 configfile.mod, search.mod, gzio.mod and test.mod.
12526 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12527 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12528 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12529 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12530 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12531 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12532 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12533 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12534 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12535 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12536 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12537 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12538 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12539 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12540 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12541 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12542 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12543 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12544 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12545 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12546 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12547 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12548 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12549
12550 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12551 `grep --include'.
12552 (pkgdata_MODULES): Add test.mod.
12553
233b1628 125542005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12555
12556 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
12557 appending to variables with "+=".
12558 (PModule): Use full pathname to generate *.lst filenames.
12559
12560 * Makefile.in: Fixed list rules moved from genmk.rb.
12561 (.DELETE_ON_ERROR): New special target.
12562 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12563
12564 * conf/i386-pc.rmk: Include conf/common.mk.
12565 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 12566 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 12567 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12568 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12569 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12570 configfile.mod, search.mod, gzio.mod and test.mod.
12571 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12572 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12573 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12574 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12575 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12576 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12577 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12578 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12579 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12580 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12581 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12582 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12583 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12584 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12585 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12586 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12587 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12588 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12589 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12590 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12591 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12592 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12593 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12594 here...
12595 * conf/common.rmk: ... to here. New file.
12596
12597 * conf/common.mk: New file.
12598
16f820c8 125992005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
12600
12601 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12602 (grub_script.tab.c): ... here.
12603
12604 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12605 (grub_script.tab.c): ... here.
12606
12607 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12608 (grub_script.tab.c): ... here.
12609
12610 * normal/command.c (grub_command_find): Fixed a memory leak of
12611 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12612
63ba1554 126132005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12614
12615 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12616 "@" which marks the start of a comment on ARM.
12617 (VARIABLE): Likewise.
12618
7f67dc13 126192005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12620
79bbb63f 12621 Add support for Linux/ADFS partition tables.
7f67dc13 12622
12623 * partmap/acorn.c: New file.
12624
12625 * include/grub/acorn_filecore.h: Likewise.
12626
12627 * DISTLIST: Added `partmap/acorn.c' and
12628 `include/grub/acorn_filecore.h'.
f19dbdb7 12629
7f67dc13 12630 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12631 `partmap/acorn.c'.
12632 (pkgdata_MODULES): Add `acorn.mod'.
12633 (acorn_mod_SOURCES): New variable.
12634 (acorn_mod_CFLAGS): Likewise.
12635
12636 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12637 `partmap/acorn.c'.
12638 (pkgdata_MODULES): Add `acorn.mod'.
12639 (acorn_mod_SOURCES): New variable.
12640 (acorn_mod_CFLAGS): Likewise.
12641
12642 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12643 (pkgdata_MODULES): Add `acorn.mod'.
12644 (acorn_mod_SOURCES): New variable.
12645 (acorn_mod_CFLAGS): Likewise.
12646 (acorn_mod_LDFLAGS): Likewise.
12647
12648 * include/types.h (grub_disk_addr_t): New typedef.
12649
6d099807 126502005-11-13 Marco Gerards <mgerards@xs4all.nl>
12651
12652 * geninit.sh: New file.
12653
12654 * geninitheader.sh: Likewise.
12655
12656 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12657 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12658 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12659 * commands/configfile.c (grub_configfile_init)
12660 (grub_configfile_fini): Likewise.
12661 * commands/default.c (grub_default_init, grub_default_fini):
12662 Likewise.
12663 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12664 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12665 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12666 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12667 Likewise.
12668 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12669 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12670 Likewise.
12671 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 12672 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 12673 Likewise.
12674 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12675 Likewise.
fe6b695a 12676 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 12677 Likewise.
12678 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12679 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12680 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12681 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12682 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12683 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12684 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12685 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12686 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12687 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12688 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12689 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12690 * partmap/amiga.c (grub_amiga_partition_map_init)
12691 (grub_amiga_partition_map_fini): Likewise.
12692 * partmap/apple.c (grub_apple_partition_map_init)
12693 (grub_apple_partition_map_fini): Likewise.
12694 * partmap/pc.c (grub_pc_partition_map_init)
12695 (grub_pc_partition_map_fini): Likewise.
12696 * partmap/sun.c (grub_sun_partition_map_init,
12697 grub_sun_partition_map_fini): Likewise.
12698 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12699 Likewise.
12700
12701 * util/grub-emu.c: Include <grub_modules_init.h>.
12702 (main): Don't initialize and de-initialize any modules directly,
12703 use `grub_init_all' and `grub_fini_all' instead.
12704
12705 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12706 `grub_vesafb_mod_init'.
12707 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
12708 all users.
12709 * term/i386/pc/vga.c (grub_vga_init): Renamed to
12710 `grub_vga_mod_init'. Updated all users.
12711 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 12712
6d099807 12713 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12714 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12715 rules.
12716
12717 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12718 Generate a function to initialize the module in utilities.
12719 Updated all callers.
12720 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
12721 initialize the module in utilities. Updated all callers.
12722
9046bcf0 127232005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12724
12725 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12726 escape sequence and a literal ^L to clear the screen.
12727
12728 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12729 when returning from Open Firmware.
12730
d13ea639 127312005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12732
12733 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12734 (grub_ofconsole_height): Likewise.
12735 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12736 manually insert a '\n'.
12737 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
12738 `grub_ofconsole_height'. Return early if these are already set.
12739
a8fcf206 127402005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
12741
12742 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12743 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
12744 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
12745 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
12746 and `normal/script.c'.
12747 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12748 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12749 (test_mod_SOURCES): New variable.
12750 (test_mod_CFLAGS): Likewise.
12751 (test_mod_LDFLAGS): Likewise.
12752 (pkgdata_MODULES): Add `test.mod'.
12753 (grub_script.tab.c): New rule.
12754 (grub_script.tab.h): Likewise.
12755
b6b32745 127562005-11-07 Marco Gerards <mgerards@xs4all.nl>
12757
12758 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12759 `commands/test.c', `normal/execute.c', `normal/lexer.c',
12760 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12761 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12762 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12763 (test_mod_SOURCES): New variable.
12764 (test_mod_CFLAGS): Likewise.
12765 (pkgdata_MODULES): Add `test.mod'.
12766 (grub_script.tab.c): New rule.
12767 (grub_script.tab.h): Likewise.
12768
daac212a 127692005-11-06 Marco Gerards <mgerards@xs4all.nl>
12770
12771 Add initial scripting support.
12772
12773 * commands/test.c: New file.
12774 * include/grub/script.h: Likewise.
12775 * normal/execute.c: Likewise.
12776 * normal/function.c: Likewise.
12777 * normal/lexer.c: Likewise.
12778 * normal/parser.y: Likewise.
12779 * normal/script.c: Likewise.
12780
12781 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 12782
daac212a 12783 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
12784 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
12785 `normal/function.c' and `normal/script.c'.
12786 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12787 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 12788 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
12789 variables.
daac212a 12790 (pkgdata_MODULES): Add `test.mod'.
12791 (grub_script.tab.c): New rule.
12792 (grub_script.tab.h): Likewise.
12793
12794 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
12795
12796 * include/grub/normal.h (grub_test_init): New prototype.
12797 (grub_test_fini): Likewise.
f19dbdb7 12798
daac212a 12799 * normal/command.c: Include <grub/script.h>.
12800 (grub_command_execute): Rewritten.
f19dbdb7 12801
daac212a 12802 * util/grub-emu.c (main): Call `grub_test_init' and
12803 `grub_test_fini'.
12804
77500b2b 128052005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12806
12807 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
12808 to 0.
12809 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
12810 there are no pending characters.
12811
e45deb9e 128122005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12813
12814 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
12815 `grub_strndup' to drop device arguments. Replace unnecessary
12816 `grub_strndup' with `grub_strdup'.
12817
4ce32619 128182005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12819
12820 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
12821 `debug' environment variable has been set.
12822
128232005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 12824
4ce32619 12825 * Makefile.in (install-local): Use $(DATA).
12826 (uninstall): Likewise.
12827 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
12828 (sbin_UTILITIES): ... to here.
12829 (sbin_SCRIPTS): New variable.
12830 (grub_install_SOURCES): New variable.
12831 * util/powerpc/ieee1275/grub-install.in: New file.
12832 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
12833 variable.
12834 (add_segments): Call `grub_util_get_path'.
12835
25fe6f03 128362005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
12837
12838 From Timothy Baldwin:
12839 * commands/ls.c (grub_ls_list_files): Close FILE with
12840 grub_file_close.
12841 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
12842
04ccf3ec 128432005-10-24 Marco Gerards <mgerards@xs4all.nl>
12844
12845 * include/grub/parser.h: New file.
12846
12847 * kern/parser.c: Likewise.
12848
12849 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
12850 (grub_setup_SOURCES): Likewise.
12851 (grub_probefs_SOURCES): Likewise.
12852 (grub_emu_SOURCES): Likewise.
12853 (kernel_img_HEADERS): Add `parser.h'.
12854
12855 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12856 (grub_emu_SOURCES): Add `kern/parser.c'.
12857 (grubof_SOURCES): Likewise.
12858
12859 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12860 (grubof_SOURCES): Add `kern/parser.c'.
12861
12862 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
12863
12864 * kern/misc.c (grub_split_cmdline): Removed function.
12865
12866 * kern/rescue.c: Include <grub/parser.h>.
12867 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
12868 of `grub_split_cmdline'.
12869
12870 * normal/command.c: Include <grub/parser.h>.
12871 (grub_command_execute): Use `grub_parser_split_cmdline' instead
12872 of `grub_split_cmdline'.
12873
12874 * normal/completion.c: Include <grub/parser.h>.
12875 (cmdline_state): New variable.
12876 (iterate_dir): End the filename with a quote depending on the
12877 command line state.
12878 (get_state): new function.
12879 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
12880 split the arguments and determine the current argument. When the
12881 argument string is not quoted, escape all spaces.
12882
6d8f4b0e 128832005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12884
12885 * normal/sparc64/setjmp.S: New file.
12886
15cf03ed 128872005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12888
12889 * include/grub/sparc64/libgcc.h: New file.
12890 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
12891 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
12892 normal/sparc64/setjmp.c.
12893
03e8661a 128942005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12895
12896 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
12897 * kern/sparc64/cache.S: New file.
12898 * kern/sparc64/cache.c: Removed.
12899 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
12900 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
12901 -mtune=ultrasparc.
12902 (COMMON_LDFLAGS): Add -melf64_sparc.
12903 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
12904 (grubof_SOURCES): Use cache.S instead of cache.c.
12905 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
12906 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
12907 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
12908 commented though.
12909 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
12910 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
12911 (linux_mod_CFLAGS): Commented out.
12912 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
12913 out because module isn't built.
12914 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
12915 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
12916 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
12917 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
12918 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
12919 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12920 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12921 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
12922 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
12923 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
12924 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12925 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12926 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
12927 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
12928
34eeec8a 129292005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
12930
12931 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
12932 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
12933 longer, because HFS should not be used on PC.
12934
708367a3 129352005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12936
12937 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
12938 consistently within the loop.
12939
6fa1251a 129402005-10-15 Marco Gerards <mgerards@xs4all.nl>
12941
12942 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
12943 directory can not be read.
12944
4801580b 129452005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12946
12947 * configure.ac (AC_INIT): Increase the version number to 1.91.
12948
12949 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
12950 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
12951 term/i386/pc/serial.c.
12952
219ad426 129532005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12954
12955 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
12956 file size must be permitted.
12957
12958 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
12959 between %ah and %al.
12960
688e5699 129612005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12962
12963 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
12964 grub_uint64_t.
12965 Call the hook with a NUL-terminated filename.
12966 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
12967 grub_cpu_to_be32.
12968
12969 * kern/term.c (cursor_state): New variable.
12970 (grub_term_set_current): Reset the cursor state on a new
12971 terminal.
12972 (grub_setcursor): Rewritten to use CURSOR_STATE.
12973 (grub_getcursor): New function.
12974
12975 * include/grub/term.h (grub_getcursor): New prototype.
12976
12977 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
12978 integers on ARM. Reported by Timothy Baldwin
12979 <T.E.Baldwin99@members.leeds.ac.uk>.
12980
bb34586c 129812005-10-11 Marco Gerards <mgerards@xs4all.nl>
12982
12983 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
12984 allocated.
12985 (grub_sfs_dir): Likewise.
12986
9a909877 129872005-10-09 Marco Gerards <mgerards@xs4all.nl>
12988
12989 Add support for the SFS filesystem.
12990
12991 * fs/sfs.c: New file.
12992
12993 * DISTLIST: Added `fs/sfs.c'.
12994
12995 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
12996 (grub_probefs_SOURCES): Likewise.
12997 (grub_emu_SOURCES): Likewise.
12998 (pkgdata_MODULES): Add `sfs.mod'.
12999 (sfs_mod_SOURCES): New variable.
13000 (sfs_mod_CFLAGS): Likewise.
13001 (sfs_mod_LDFLAGS): Likewise.
13002
13003 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13004 (pkgdata_MODULES): Add `sfs.mod'.
13005 (sfs_mod_SOURCES): New variable.
13006 (sfs_mod_CFLAGS): Likewise.
13007
13008 * util/grub-emu.c (main): Call `grub_sfs_init' and
13009 `grub_sfs_fini'.
13010
13011 * include/grub/fs.h (grub_sfs_init): New prototype.
13012 (grub_sfs_fini): Likewise.
13013
57bdbde3 130142005-10-07 Marco Gerards <mgerards@xs4all.nl>
13015
13016 Add support for the AFFS filesystem.
13017
13018 * fs/affs.c: New file.
13019
13020 * DISTLIST: Added `fs/affs.c'.
13021
13022 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13023 (grub_probefs_SOURCES): Likewise.
13024 (grub_emu_SOURCES): Likewise.
13025 (pkgdata_MODULES): Add `affs.mod'.
13026 (affs_mod_SOURCES): New variable.
13027 (affs_mod_CFLAGS): Likewise.
13028 (affs_mod_LDFLAGS): Likewise.
13029
13030 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13031 (pkgdata_MODULES): Add `affs.mod'.
13032 (affs_mod_SOURCES): New variable.
13033 (affs_mod_CFLAGS): Likewise.
13034
13035 * util/grub-emu.c (main): Call `grub_affs_init' and
13036 `grub_affs_fini'.
13037
13038 * include/grub/fs.h (grub_affs_init): New prototype.
13039 (grub_affs_fini): Likewise.
13040
047b67e0 130412005-10-01 Marco Gerards <mgerards@xs4all.nl>
13042
13043 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13044
59b8208a 130452005-10-01 Marco Gerards <mgerards@xs4all.nl>
13046
13047 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13048 `-m32' to CFLAGS.
13049
13050 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13051 linking.
f19dbdb7 13052
59b8208a 13053 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13054 (COMMON_LDFLAGS): New variable.
13055 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13056 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13057 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13058 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13059 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13060 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13061 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13062 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13063 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13064 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13065 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13066 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13067 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13068 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13069 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13070 variables.
13071 (normal_mod_ASFLAGS): Add `-m32'.
13072
13073 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13074 (grub_host_size_t, grub_host_ssize_t): New types.
13075 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 13076 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 13077 `GRUB_HOST_SIZEOF_VOID_P'.
13078
13079 * include/grub/kernel.h (struct grub_module_header): Type of
13080 member offset changed to `grub_host_off_t'. Type of member size
13081 changed to `grub_host_size_t'.
13082 (struct grub_module_info): Type of member offset changed to
13083 `grub_host_off_t'. Type of member size changed to
13084 `grub_host_size_t'.
13085
b4093103 130862005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13087
13088 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 13089
b4093103 13090 * kern/i386/pc/startup.S (multiboot_header): New label.
13091 (multiboot_entry): Likewise.
13092 (multiboot_trampoline): Likewise.
13093
13094 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13095 Increased to 0x4A0.
13096
13097 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13098 put parentheses after a question mark.
13099 [!GRUB_UTIL] (my_mod): New variable.
13100
13101 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13102
b2499b29 131032005-09-28 Marco Gerards <mgerards@xs4all.nl>
13104
13105 Adds support for the XFS filesystem. Btrees are not supported
13106 yet.
13107
13108 * fs/xfs.c: New file.
13109
13110 * DISTLIST: Added `fs/xfs.c'.
13111
13112 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13113 (grub_probefs_SOURCES): Likewise.
13114 (grub_emu_SOURCES): Likewise.
13115 (pkgdata_MODULES): Add `xfs.mod'.
13116 (xfs_mod_SOURCES): New variable.
13117 (xfs_mod_CFLAGS): Likewise.
13118
13119 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13120 (pkgdata_MODULES): Add `xfs.mod'.
13121 (xfs_mod_SOURCES): New variable.
13122 (xfs_mod_CFLAGS): Likewise.
13123
13124 * util/grub-emu.c (main): Call `grub_xfs_init' and
13125 `grub_xfs_fini'.
13126
13127 * include/grub/fs.h (grub_xfs_init): New prototype.
13128 (grub_xfs_fini): Likewise.
13129
f19dbdb7 13130
83d37a62 131312005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13132
13133 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13134 color modes, allow greater than 16 colors to be configured as
13135 a default palette.
13136
47d2d65e 131372005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13138
13139 * normal/completion.c (complete_arguments): Add the qualifier
13140 const into OPTIONS.
13141
13142 From Omniflux <omniflux+lists@omniflux.com>:
13143 * include/grub/terminfo.h: New file.
13144 * include/grub/tparm.h: Likewise.
13145 * include/grub/i386/pc/serial.h: Likewise.
13146 * term/terminfo.c: Likewise.
13147 * term/tparm.c: Likewise.
13148 * term/i386/pc/serial.c: Likewise.
13149 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13150 serial.mod.
13151 (terminfo_mod_SOURCES): New variable.
13152 (terminfo_mod_CFLAGS): Likewise.
13153 (serial_mod_SOURCES): Likewise.
13154 (serial_mod_CFLAGS): Likewise.
13155
48b671ff 131562005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13157
13158 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13159 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13160 and kern/powerpc/ieee1275/cmain.c, respectively.
13161
13162 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13163 * kern/powerpc/ieee1275/crt0.S: ... here.
13164
13165 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13166 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 13167
48b671ff 13168 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13169 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13170 instead of boot/powerpc/ieee1275/crt0.S and
13171 boot/powerpc/ieee1275/cmain.c, respectively.
13172
13173 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13174 sectors. It was not used anyway.
13175
09fc77a7 131762005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13177
13178 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13179 `unused parameter' warning.
13180
003789c7 131812005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13182
13183 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13184 function.
13185 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13186 getcharwidth.
13187
67f44c86 131882005-08-28 Marco Gerards <metgerards@student.han.nl>
13189
13190 * include/grub/normal.h (enum grub_completion_type): Added
13191 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13192
13193 * normal/cmdline.c (print_completion): Handle
13194 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13195 * normal/menu_entry.c (store_completion): Likewise.
13196
13197 * normal/completion.c (complete_arguments): New function.
13198 (grub_normal_do_completion): Call `complete_arguments' when the
13199 current words start with a dash.
13200
0b5abe02 132012005-08-27 Marco Gerards <metgerards@student.han.nl>
13202
13203 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13204 `gzio.mod' instead of `io.mod').
13205
d9864ee1 132062005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13207
13208 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13209 (DISTDIRS): Added io and video.
13210 Rewrite the search routine to make an output consistently.
13211
13212 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13213 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13214 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13215 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13216 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13217 util/powerpc/ieee1275/misc.c.
f19dbdb7 13218
d9864ee1 13219 * include/grub/gzio.h: New file.
13220 * io/gzio.c: Likewise.
f19dbdb7 13221
d9864ee1 13222 * kern/file.c (grub_file_close): Call grub_device_close only if
13223 FILE->DEVICE is not NULL.
13224
13225 * include/grub/mm.h [!NULL] (NULL): New macro.
13226
13227 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13228
13229 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13230 (pkgdata_MODULES): Added gzio.mod.
13231 (gzio_mod_SOURCES): New variable.
13232 (gzio_mod_CFLAGS): Likewise.
13233
13234 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13235 (pkgdata_MODULES): Added gzio.mod.
13236 (gzio_mod_SOURCES): New variable.
13237 (gzio_mod_CFLAGS): Likewise.
13238
13239 * commands/cat.c: Include grub/gzio.h.
13240 (grub_cmd_cat): Use grub_gzfile_open instead of
13241 grub_file_open.
f19dbdb7 13242
d9864ee1 13243 * commands/cmp.c: Include grub/gzio.h.
13244 (grub_cmd_cmp): Use grub_gzfile_open instead of
13245 grub_file_open.
13246
13247 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13248 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13249 grub_file_open.
13250 (grub_rescue_cmd_module): Likewise.
13251
fa46f4b5 132522005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13253
13254 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13255 kern/sparc64/ieee1275/init.c because it contains _start.
13256 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13257
e9211b5d 132582005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13259
13260 * configure.ac: Add support for sparc64 host with ieee1275
13261 firmware.
13262 * configure: Generated from configure.ac.
13263 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13264 instead of int.
13265 (grub_ofdisk_read): Likewise.
13266 (grub_ofdisk_open): Use %p to print pointer values, and cast the
13267 pointers as (void *) to remove a warning.
13268 (grub_ofdisk_close): Likewise.
13269 (grub_ofdisk_read): Likewise.
13270 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13271 returns, so make it return void to remove a warning.
13272 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13273 Corresponding prototype change.
13274 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13275 values, and cast the pointers as (void *) to remove a warning.
13276 (grub_mm_dump): Likewise.
13277 * conf/sparc64-ieee1275.mk: New file.
13278 * conf/sparc64-ieee1275.rmk: Likewise.
13279 * include/grub/sparc64/setjmp.h: Likewise.
13280 * include/grub/sparc64/types.h: Likewise.
13281 * include/grub/sparc64/ieee1275/console.h: Likewise.
13282 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13283 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13284 * include/grub/sparc64/ieee1275/time.h: Likewise.
13285 * kern/sparc64/cache.c: Likewise.
13286 * kern/sparc64/dl.c: Likewise.
13287 * kern/sparc64/ieee1275/init.c: Likewise.
13288 * kern/sparc64/ieee1275/openfw.c: Likewise.
13289
385c6a92 132902005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13291
13292 * util/console.c (grub_ncurses_putchar): If C is greater than
13293 0x7f, set C to a question mark.
13294 (grub_ncurses_getcharwidth): New function.
13295 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13296 getcharwidth.
13297
13298 * normal/menu.c (print_entry): Made aware of Unicode. First,
13299 convert TITLE to UCS-4, and predict the cursor position by
13300 grub_getcharwidth.
13301
13302 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13303 const to SRC.
13304 * kern/misc.c (grub_utf16_to_utf8): Likewise.
13305
16ccb8b1 133062005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13307
13308 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13309 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13310 grub_strcat.
13311
13312 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13313 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13314 grub_strcpy and grub_strlen. Take it into account that a space
13315 character is inserted as a delimiter.
13316
6a85ce79 133172005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13318
13319 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 13320 invalid magic in the error.
6a85ce79 13321
13322 * commands/search.c: New file.
f19dbdb7 13323
6a85ce79 13324 * util/grub-emu.c (main): Call grub_search_init and
13325 grub_search_fini.
13326
13327 * kern/rescue.c (grub_rescue_print_disks): Removed.
13328 (grub_rescue_print_devices): New function.
13329 (grub_rescue_cmd_ls): Use grub_device_iterate with
13330 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13331 grub_rescue_print_disks.
13332
13333 * kern/partition.c (grub_partition_iterate): Return the result of
13334 PARTMAP->ITERATE instead of GRUB_ERRNO.
13335
13336 * kern/device.c: Include grub/partition.h.
13337 (grub_device_iterate): New function.
13338
13339 * include/grub/partition.h (grub_partition_iterate): Return int
13340 instead of grub_err_t.
13341
13342 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13343 prototype.
13344 [GRUB_UTIL] (grub_search_fini): Likewise.
13345
13346 * include/grub/device.h (grub_device_iterate): New prototype.
13347
13348 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13349 commands/search.c.
13350 (pkgdata_MODULES): Added search.mod.
13351 (search_mod_SOURCES): New variable.
13352 (search_mod_CFLAGS): Likewise.
13353
13354 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13355 (pkgdata_MODULES): Added search.mod.
13356 (search_mod_SOURCES): New variable.
13357 (search_mod_CFLAGS): Likewise.
13358
13359 * commands/ls.c (grub_ls_list_disks): Renamed to ...
13360 (grub_ls_list_devices): ... this, and use grub_device_iterate.
13361 All callers changed.
13362
13363 * DISTLIST: Added commands/search.c.
13364
ef095434 133652005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13366
13367 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13368 conversion.
13369 (grub_getcharwidth): New function.
13370
13371 * kern/misc.c (grub_utf8_to_ucs4): New function.
13372
13373 * include/grub/term.h (struct grub_term): Added a new member
13374 "getcharwidth".
13375 (grub_getcharwidth): New prototype.
13376
13377 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13378
13379 * term/i386/pc/console.c (map_char): New function. Segregated from
13380 grub_console_putchar.
13381 (grub_console_putchar): Use map_char.
13382 (grub_console_getcharwidth): New function.
13383 (grub_console_term): Specified grub_console_getcharwidth as
13384 getcharwidth.
13385
13386 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13387 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13388
13389 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13390 GRUB_ERRNO.
13391 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13392 on grub_strtoul completely.
13393 (write_char): Declare local variables in the beginning of the
13394 function.
13395 (grub_vesafb_getcharwidth): New function.
13396 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13397 getcharwidth.
13398
1f0a95e4 133992005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
13400
13401 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13402 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13403 commands/i386/pc/vbetest.c.
13404
13405 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13406 call grub_vbe_get_controller_info again, because the returned
13407 information is volatile.
13408 (grub_vbe_set_video_mode): Mostly rewritten.
13409 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13410 grub_vbe_status_t correctly.
13411 (grub_vbe_get_video_mode_info): Likewise.
13412 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13413 several if statements.
13414
13415 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13416 * commands/i386/pc/vbeinfo.c: ... this.
13417
13418 * commands/i386/pc/vbe_test.c: Renamed to ...
13419 * commands/i386/pc/vbetest.c: ... this.
13420
13421 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13422 ...
13423 (grub_cmd_vbeinfo): ... this. Save video modes before
13424 iterating. Skip a video mode, if it is not available, not enough
13425 information is given or it is monochrome. Show the memory
13426 model. Leave the interpretation of MODEVAR to grub_strtoul
13427 completely.
13428 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13429 (GRUB_MOD_FINI): Likewise.
13430
13431 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13432 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13433 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13434 duplicated grub_env_get. Leave the interpretation of MODEVAR to
13435 grub_strtoul completely.
13436 (real2pm): Removed.
13437 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13438 (GRUB_MOD_FINI): Likewise.
13439
13440 * normal/misc.c: Include grub/mm.h.
13441
13442 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13443 vbe_list_modes with vbetest.mod and vbeinfo.mod.
13444 (vbe_list_modes_mod_SOURCES): Removed.
13445 (vbe_list_modes_mod_CFLAGS): Likewise.
13446 (vbe_test_mod_SOURCES): Likewise.
13447 (vbe_test_mod_CFLAGS): Likewise.
13448 (vbeinfo_mod_SOURCES): New variable.
13449 (vbeinfo_mod_CFLAGS): Likewise.
13450 (vbetest_mod_SOURCES): Likewise.
13451 (vbetest_mod_CFLAGS): Likewise.
13452
992ffbbe 134532005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
13454
13455 * normal/misc.c: New file.
13456
13457 * DISTLIST: Added normal/misc.c.
f19dbdb7 13458
992ffbbe 13459 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13460 DISK to HOOK. Call HOOK with DISK.
13461 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13462 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13463 * partmap/sun.c (sun_partition_map_iterate): Likewise.
13464
13465 * normal/menu_entry.c (struct screen): Added a new member
13466 "completion_shown".
13467 (completion_buffer): New global variable.
13468 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13469 (store_completion): New function.
13470 (complete): Likewise.
13471 (clear_completions): Likewise.
13472 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13473 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13474 a tab, call complete.
13475
13476 * normal/completion.c (disk_dev): Removed.
13477 (print_simple_completion): Likewise.
13478 (print_partition_completion): Likewise.
13479 (print_func): New global variable.
13480 (add_completion): Do not take the arguments WHAT or PRINT any
13481 longer. Added a new argument TYPE. Instead of printing directly,
13482 call PRINT_FUNC if not NULL.
13483 All callers changed.
13484 (complete_device): Use a local variable DEV instead of
13485 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13486 (grub_normal_do_completion): Take a new argument HOOK. Do not
13487 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13488 empty string, return NULL instead.
13489 All callers changed.
13490
13491 * normal/cmdline.c (print_completion): New function.
13492
13493 * kern/partition.c (grub_partition_iterate): Add an argument DISK
13494 to HOOK.
13495 All callers changed.
13496
13497 * kern/disk.c (grub_print_partinfo): Removed.
13498
13499 * include/grub/partition.h (struct grub_partition_map): Add a new
13500 argument DISK into HOOK of ITERATE.
13501 (grub_partition_iterate): Add a new argument DISK to HOOK.
13502
13503 * include/grub/normal.h (enum grub_completion_type): New enum.
13504 (grub_completion_type_t): New type.
13505 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13506 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13507 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13508 (GRUB_COMPLETION_TYPE_FILE): Likewise.
13509 (grub_normal_do_completion): Added a new argument HOOK.
13510 (grub_normal_print_device_info): New prototype.
13511
13512 * include/grub/disk.h (grub_print_partinfo): Removed.
13513
13514 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13515 (normal_mod_SOURCES): Likewise.
13516 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13517 (normal_mod_SOURCES): Likewise.
13518
13519 * commands/ls.c (grub_ls_list_disks): Use
13520 grub_normal_print_device_info instead of grub_print_partinfo. Free
13521 PNAME.
13522 (grub_ls_list_files): Use grub_normal_print_device_info instead of
13523 duplicating the code.
13524
0bd41162 135252005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13526
13527 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 13528 follow GCS more precisely.
13529 * commands/i386/pc/vbe_test.c: Likewise.
13530 * include/grub/i386/pc/vbe.h: Likewise.
13531 * term/i386/pc/vesafb.c: Likewise.
13532 * video/i386/pc/vbe.c: Likewise.
0bd41162 13533
6323696a 135342005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13535
13536 * DISTLIST: Added term/i386/pc/vesafb.c
13537 DISTLIST: Added video/i386/pc/vbe.c
13538 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13539 DISTLIST: Added commands/i386/pc/vbe_test.c.
13540 * commands/i386/pc/vbe_list_modes.c: New file.
13541 * commands/i386/pc/vbe_test.c: Likewise.
13542 * term/i386/pc/vesafb.c: Likewise.
13543 * video/i386/pc/vbe.c: Likewise.
13544 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13545 (grub_vbe_probe) Added prototype.
13546 (grub_vbe_set_video_mode) Likewise.
13547 (grub_vbe_get_video_mode) Likewise.
13548 (grub_vbe_get_video_mode_info) Likewise.
13549 (grub_vbe_set_pixel_rgb) Likewise.
13550 (grub_vbe_set_pixel_index) Likewise.
13551 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13552 (pkgdata_MODULES): Added vesafb.mod.
13553 (pkgdata_MODULES): Added vbe_list_modes.mod.
13554 (pkgdata_MODULES): Added vbe_test.mod.
13555 (vbe_mod_SOURCES): Added.
13556 (vbe_mod_CFLAGS): Likewise.
13557 (vesafb_mod_SOURCES): Likewise.
13558 (vesafb_mod_CFLAGS): Likewise.
13559 (vbe_list_modes_mod_SOURCES): Likewise.
13560 (vbe_list_modes_mod_CFLAGS): Likewise.
13561 (vbe_test_mod_SOURCES): Likewise.
13562 (vbe_test_mod_CFLAGS): Likewise.
13563
0a74e62f 135642005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
13565
0a74e62f 13566 * normal/command.c (grub_command_execute): If INTERACTIVE is
13567 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13568 CMDLINE. Disable the pager if INTERACTIVE is true.
13569 All callers are changed.
13570
13571 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13572 before reading a config file.
13573 * normal/main.c (read_config_file): Even if a command is not
13574 found, register it if it is within an entry.
13575
13576 * util/grub-emu.c: Include sys/types.h and unistd.h.
13577 (options): Added --hold.
13578 (struct arguments): Added a new member "hold".
13579 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13580 missing.
13581 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13582 cleared by a debugger, if it is not zero.
13583
13584 * include/grub/normal.h (grub_command_execute): Add an argument
13585 INTERACTIVE.
13586
e51f85ae 135872005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
13588
13589 * DISTLIST: Added include/grub/i386/pc/vbe.h.
13590
e9c6f39b 135912005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
13592
13593 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13594 program with another one, because the old one didn't detect a bug
13595 in gcc-3.4. Always use regparm 2, because the new test is still
13596 not enough for gcc-4.0. Someone must investigate a simple test
13597 case which detects a bug in gcc-4.0.
13598
8de3495c 135992005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
13600
13601 * DISTLIST: Added normal/completion.c.
13602
13603 * normal/completion.c: New file.
f19dbdb7 13604
8de3495c 13605 * term/i386/pc/console.c (grub_console_getwh): New function.
13606 (grub_console_term): Assign grub_console_getwh to getwh.
13607
13608 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13609 function is defined in normal/completion.c as
13610 grub_normal_do_completion.
13611 (grub_cmdline_get): Use grub_normal_do_completion instead of
13612 grub_tab_complete.
13613
13614 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13615 returns non-zero, otherwise return 0.
13616 (grub_partition_iterate): First, probe the partition map. Then,
13617 call ITERATE only for this partition map.
13618
13619 * kern/misc.c (grub_strncmp): Rewritten.
13620
13621 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13622 returns non-zero. Otherwise return 0.
13623
13624 * include/grub/partition.h (grub_partition_map_iterate): Return
13625 int instead of void.
13626
13627 * include/grub/normal.h (grub_normal_do_completion): New prototype.
13628
13629 * include/grub/misc.h (grub_strncmp): Change the type of N to
13630 grub_size_t.
13631
13632 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13633 of void.
13634
13635 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 13636 unsigned explicitly before comparing it with I.
8de3495c 13637
13638 * kern/main.c (grub_env_write_root): Add the attribute unused into
13639 VAR.
13640
13641 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13642 normal/completion.c.
13643 (normal_mod_SOURCES): Likewise.
13644 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13645 (normal_mod_SOURCES): Likewise.
13646
13647 * normal/command.c (grub_iterate_commands): If ITERATE returns
13648 non-zero, return one immediately.
13649
e85e144b 136502005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
13651
13652 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13653 * kern/i386/pc/startup.S: Updated Global Descriptor table's
13654 descriptions.
13655 (grub_vbe_get_controller_info): New function.
13656 (grub_vbe_get_mode_info): Likewise.
13657 (grub_vbe_set_mode): Likewise.
13658 (grub_vbe_get_mode): Likewise.
13659 (grub_vbe_set_memory_window): Likewise.
13660 (grub_vbe_get_memory_window): Likewise.
13661 (grub_vbe_set_scanline_length): Likewise.
13662 (grub_vbe_get_scanline_length): Likewise.
13663 (grub_vbe_set_display_start): Likewise.
13664 (grub_vbe_get_display_start): Likewise.
13665 (grub_vbe_set_palette_data): Likewise.
13666 * include/grub/i386/pc/vbe.h: New file.
13667
c46153d2 136682005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13669
13670 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13671 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13672 * DISTLIST: Likewise.
13673 * kern/ieee1275/of.c: Moved to ...
13674 * kern/ieee1275/ieee1275.c: ... here.
13675
0cb90c45 136762005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13677
13678 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13679 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13680 Pass 0 as `end' parameter to grub_strtoul().
13681
a19fb360 136822005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13683
13684 * include/grub/powerpc/ieee1275/console.h: Do not include
13685 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
13686 ifdef.
13687 (grub_console_cur_color): Remove i386-specific prototype.
13688 (grub_console_real_putchar): Likewise.
13689 (grub_console_checkkey): Likewise.
13690 (grub_console_getkey): Likewise.
13691 (grub_console_getxy): Likewise.
13692 (grub_console_gotoxy): Likewise.
13693 (grub_console_cls): Likewise.
13694 (grub_console_setcursor): Likewise.
13695 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13696 Include <grub/machine/console.h>.
13697 * term/ieee1275/ofconsole.c: Likewise.
13698
4ac9bd04 136992005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
13700
13701 * Makefile.in (LIBLZO): New variable.
13702
13703 * configure.ac: Check for LZO version 2.
13704
13705 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13706 lzo/lzo1x.h instead of lzo1x.h.
13707
13708 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13709 of -llzo.
13710
13711 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13712 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13713
13714 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13715 copying the data from PARTITION to P.
13716
f4917dfd 137172005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13718
13719 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13720 negative, unload the module.
13721
13722 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13723 map is "pc_partition_map" but not "pc".
13724 (usage): Fix the description. The options are --boot-image and
13725 --core-image but not --boot-file or --core-file.
13726 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13727 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13728 DEFAULT_DIRECTORY.
13729
13730 * util/i386/pc/grub-install.in: Do not specify --boot-file or
13731 --core-file. Specify INSTALL_DEVICE as an argument.
13732
13733 * util/console.c: Include config.h.
13734 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13735 [HAVE_NCURSES_H]: Include ncurses.h.
13736 [HAVE_CURSES_H]: Include curses.h.
13737 [!A_NORMAL] (A_NORMAL): Defined as zero.
13738 [!A_STANDOUT] (A_STANDOUT): Likewise.
13739
13740 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
13741 -lncurses.
13742 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
13743
13744 * configure.ac: Check for curses libraries and headers.
13745
13746 * Makefile.in (LIBCURSES): New variable.
13747
13748 * genmk.rb (Script::rule): Set the executable bits.
13749
13750 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
13751 name of the PC partition map is "pc_partition_map" but not "pc".
13752
0e143073 137532005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13754
13755 * util/i386/pc/grub-install.in (grub_probefs): New variable.
13756 (modules): Likewise.
13757 (usage): Added descriptions for --modules and --grub-probefs.
13758 Handle --modules and --grub-probefs. Save the arguments in MODULES
13759 and GRUB_PROBEFS, respectively.
13760 Auto-detect a filesystem module against GRUBDIR. If the result is
13761 empty and modules are not specified explicitly, abort the
13762 installation. Add the result to MODULES.
13763
13764 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
13765 disk/powerpc/ieee1275/ofdisk.c,
13766 include/grub/powerpc/ieee1275/init.h and
13767 term/powerpc/ieee1275/ofconsole.c.
13768 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
13769 term/ieee1275/ofconsole.c.
13770
13771 * include/grub/powerpc/ieee1275/console.h: Resurrected.
13772
13773 * COPYING: Upgraded to the latest version. Only the address of the
13774 FSF office has changed.
f19dbdb7 13775
efd6e6d5 137762005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13777
13778 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13779 kern/ieee1275.c with kern/ieee1275/of.c.
13780
13781 * kern/ieee1275.c: Moved to ...
13782 * kern/ieee1275/of.c: ... here.
13783
8ceafda2 137842005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
13785
13786 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 13787 readability.
8ceafda2 13788
13789 * config.guess: Updated to the latest version from gnulib.
13790 * config.sub: Likewise.
13791 * install.sh: Likewise.
13792 * mkinstalldirs: Likewise.
13793
13794 * include/grub/console.h: Removed. This file is arch-specific. Do
13795 not put this in include/grub.
13796
13797 * include/grub/i386/pc/console.h: Resurrected.
13798
13799 * util/console.c: Include grub/machine/console.h instead of
13800 grub/console.h.
13801 * util/grub-emu.c: Likewise.
13802
267f6cd9 138032005-08-04 Marco Gerards <metgerards@student.han.nl>
13804
13805 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
13806 hardcoded value.
f19dbdb7 13807
267f6cd9 13808 From Vincent Pelletier <subdino2004@yahoo.fr>
13809 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
13810 Redefined to use grub_getwh.
13811 (grub_term): New member named getwh.
13812 (grub_getwh): New prototype.
13813 * kern/term.c (grub_getwh): New function.
13814 * term/i386/pc/console.c (grub_console_getwh): New function.
13815 (grub_console_term): New member `getwh'.
13816 * term/i386/pc/vga.c (grub_vga_getwh): New function.
13817 (grub_vga_term): New member `getwh'.
0b5abe02 13818 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 13819 grub_ssize_t.
13820 (grub_ofconsole_getw): New function.
13821 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
13822 (grub_ofconsole_term): New field named getwh and new initial
13823 value.
13824
3be7266d 138252005-08-03 Hollis Blanchard <hollis@penguinppc.org>
13826
13827 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
13828 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
13829 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
13830 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
13831 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
13832 of <grub/machine/ieee1275.h>.
13833 * commands/ieee1275/reboot.c: Likewise.
13834 * boot/powerpc/ieee1275/ieee1275.c: Move ...
13835 * kern/ieee1275.c: ... to here. All users updated. Change all
13836 parameter structs to use new type `grub_ieee1275_cell_t'.
13837 * term/powerpc/ieee1275/ofconsole.c: Move ...
13838 * term/ieee1275/ofconsole.c: ... to here. All users updated.
13839 * disk/powerpc/ieee1275/ofdisk.c: Move ...
13840 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
13841 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
13842 to return int.
13843 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
13844 Remove unused prototypes. All users updated.
13845 * include/grub/powerpc/ieee1275/console.h: Removed.
13846 * include/grub/powerpc/ieee1275/ieee1275.h: Define
13847 `grub_ieee1275_cell_t'.
13848 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
13849 Cast comparisons with -1 to the correct type.
13850 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
13851 type to match `grub_ieee1275_entry_fn'.
13852
8b5f3938 138532005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
13854
13855 * DISTLIST: Added util/i386/pc/grub-probefs.c.
13856
13857 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
13858 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
13859 partmap/sun.c.
13860 (grub_probefs_SOURCES): New variable.
13861
13862 * util/i386/pc/grub-probefs.c: New file.
13863
13864 * util/i386/pc/grub-setup.c (main): Call
13865 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
13866 grub_hfs_init and grub_jfs_init to initialize the system. Call
13867 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
13868 grub_pc_partition_map_fini to finish the system.
13869
ea409713 138702005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
13871
13872 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
13873 function.
13874 (grub_multiboot_load_elf32): Likewise.
13875 (grub_multiboot_is_elf64): Likewise.
13876 (grub_multiboot_load_elf64): Likewise.
13877 (grub_multiboot_load_elf): Likewise.
13878 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
13879 an ELF32 or ELF64 file.
13880 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
13881
13882 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
13883 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
13884 NULL before calling FS->LABEL.
13885 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
13886 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
13887 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
13888 before calling FS->LABEL.
13889
141a288b 138902005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
13891
13892 * util/i386/pc/grub-install.in (datadir): New variable.
13893 (libdir): Removed.
13894 (pkgdatadir): New variable.
13895 (pkglibdir): Removed.
13896
0d5f8a54 138972005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
13898
13899 * DISTLIST: Added util/i386/pc/grub-install.in.
13900
13901 * util/i386/pc/grub-install.in: New file.
13902
13903 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
13904 (grub_install_SOURCES): Likewise.
13905
13906 * genmk.rb: Added support for scripts.
13907 (Script): New class.
13908 (scripts): New variable.
13909
13910 * Makefile.in (install-local): Install sbin_SCRIPTS by
13911 INSTALL_SCRIPT.
13912 (uninstall): Remove sbin_SCRIPTS.
13913
13914 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
13915 device, try to get a GRUB device by
13916 grub_util_biosdisk_get_grub_dev.
13917 Free DEST_DEV.
13918
13919 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
13920 description for --device-map.
13921
5f968e1e 139222005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13923
13924 Change the semantics of variable hooks. They now return strings
13925 instead of error values.
f19dbdb7 13926
5f968e1e 13927 * util/i386/pc/grub-setup.c: Include grub/env.h.
13928 (setup): Use grub_device_set_root instead of grub_env_set.
13929
13930 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
13931 grub_env_get instead of grub_device_set_root and
13932 grub_device_get_root, respectively.
13933
13934 * kern/main.c (grub_env_write_root): New function.
13935 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
13936 grub_env_set instead of grub_device_set_root.
13937
13938 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
13939 many variables.
13940 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
13941 rather than calling ENV->WRITE_HOOK afterwards.
13942 (grub_env_get): Return the result of ENV->READ_HOOK rather than
13943 passing a pointer of a pointer.
13944 (grub_register_variable_hook): Change the types of "read_hook" and
13945 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
13946 respectively.
13947 Allocate the default empty string on the heap, because this string
13948 may be freed later.
13949
13950 * kern/device.c: Include grub/env.h.
13951 (grub_device_set_root): Removed.
13952 (grub_device_get_root): Likewise.
13953 (grub_device_open): Use grub_env_get instead of
13954 grub_device_get_root.
13955
13956 * include/grub/env.h (grub_env_read_hook_t): New type.
13957 (grub_env_write_hook_t): Likewise.
13958 (grub_env_var): Change the types of "read_hook" and "write_hook"
13959 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
13960 (grub_register_variable_hook): Likewise.
13961
13962 * include/grub/device.h (grub_device_set_root): Removed.
13963 (grub_device_set_root): Likewise.
13964
13965 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
13966 make sure that DIRNAME terminates with '/', so that
13967 grub_fat_find_dir will fail if PATH is not a directory.
13968
13969 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
13970 from DIRNAME.
13971 Use the qualifier auto for print_files and print_files_long.
13972 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
13973 as a regular file.
13974 Put a newline only if there is no error.
13975 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
13976 used.
13977
896f0afd 139782005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13979
13980 * kern/partition.c (grub_partition_probe): Initialize PART to
13981 NULL. Otherwise, when no partition map is registered, this returns
13982 a garbage.
13983
b28b81b2 139842005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
13985
13986 * partmap/apple.c (apple_partition_map_iterate): Check if POS
13987 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
13988 valid.
13989
5f3607e0 139902005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
13991
13992 * commands/ls.c (grub_ls_list_disks): Print the filesystem
13993 information on each device, if it does not have partitions. Print
13994 "Device" instead of "Disk", because this function is not specific
13995 to disk devices.
13996
13997 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
13998 static to ensure that it is put on the memory rather than a
13999 register.
14000
502c87e8 140012005-07-17 Yoshinori Okuji <okuji@enbug.org>
14002
14003 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14004 (grub_cat_init): Likewise.
14005 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14006 (options): Likewise.
14007 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14008 (grub_configfile_init): Likewise.
14009 * font/manager.c (GRUB_MOD_INIT): Likewise.
14010 * commands/help.c (GRUB_MOD_INIT): Likewise.
14011 (grub_help_init): Likewise.
14012 * normal/command.c (grub_command_init): Likewise.
14013 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14014 * disk/loopback.c (grub_loop_init): Likewise.
14015 (GRUB_MOD_INIT): Likewise.
14016 * commands/ls.c (grub_ls_init): Likewise.
14017 (GRUB_MOD_INIT): Likewise.
14018 (options): Likewise.
14019 * commands/boot.c (grub_boot_init): Likewise.
14020 (GRUB_MOD_INIT): Likewise.
14021 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14022 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14023 (GRUB_MOD_INIT): Likewise.
14024 * commands/cmp.c (grub_cmp_init): Likewise.
14025 (GRUB_MOD_INIT): Likewise.
14026
14027 * normal/arg.c: Use <> instead of "" to include header files.
14028 (SHORT_ARG_HELP): New macro.
14029 (SHORT_ARG_USAGE): Likewise.
14030 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14031 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14032 descriptions.
14033 (find_short): Check if C is 'h' or 'u' explicitly.
14034 (grub_arg_show_help): Use space characters instead of tabs. Treat
14035 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14036 are shown with --help and --usage only if they are not used for
14037 the command itself.
14038 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14039 'h' and 'u'.
14040
14041 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14042 const into "longarg". Change the type of "shortarg" to int.
14043
f806d18e 140442005-07-17 Yoshinori Okuji <okuji@enbug.org>
14045
14046 * boot/i386/pc/boot.S (boot_drive_check): New label.
14047
14048 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14049 macro.
14050
14051 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14052 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14053
e293232b 140542005-07-17 Yoshinori Okuji <okuji@enbug.org>
14055
14056 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14057 When turning off Gate A20, skip the check and return immediately,
14058 because this is not fatal usually.
14059
ebedfd00 140602005-07-17 Yoshinori Okuji <okuji@enbug.org>
14061
14062 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14063 be 0x7C00 instead of 0x8000.
14064
14065 * boot/i386/pc/pxeboot.S: Rewritten.
14066
14067 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14068 EXT_C.
14069 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14070 result.
14071
654fc59f 140722005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14073
14074 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14075 robustness. This routine now supports a BIOS call and System
14076 Control Port A to modify the gate A20.
14077
14078 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14079 Increased to 0x440.
14080
09f9923f 140812005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14082
14083 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14084 device path and resulting ihandle.
14085 (grub_ofdisk_close): dprintf the ihandle being closed.
14086 (grub_ofdisk_read): dprintf function parameters.
14087 * kern/mm.c (grub_mm_init_region): Likewise.
14088 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14089 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14090 size, and boot arguments.
14091 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14092 before loading into memory.
14093 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14094 before loading into memory.
14095
7ef504d8 140962005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14097
14098 * kern/mm.c: Added much documentation.
14099 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14100 8, set to 5 instead of 8.
14101
e0f050c2 141022005-07-10 Yoshinori Okuji <okuji@enbug.org>
14103
14104 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14105
14106 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14107 (grub_mkdevicemap_SOURCES): New variable.
14108
14109 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14110 lib/device.c of GRUB Legacy.
14111
7224189a 141122005-07-10 Yoshinori Okuji <okuji@enbug.org>
14113
14114 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14115 instead of PATH is NULL.
14116
68c864eb 141172005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14118
14119 * commands/cmp.c (BUFFER_SIZE): New macro.
14120 (grub_cmd_cmp): Close the right file at the right time. Compare
14121 only data just read. Don't report files of different size as
14122 identical. Dynamically allocate buffers. Move variable
14123 declarations at the beginning of function.
14124
e6f3e614 141252005-07-09 Yoshinori Okuji <okuji@enbug.org>
14126
14127 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14128 reverse.
14129
f8f1559a 141302004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14131
14132 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14133 when backspace is pressed at beginning of line.
14134
39c9d41d 141352005-07-03 Yoshinori Okuji <okuji@enbug.org>
14136
14137 * DISTLIST: Added genfslist.sh.
14138
14139 * normal/main.c (fs_module_list): New variable.
14140 (autoload_fs_module): New function.
14141 (read_fs_list): Likewise.
14142 (grub_normal_execute): Call read_fs_list.
14143
14144 * kern/fs.c (grub_fs_autoload_hook): New variable.
14145 (grub_fs_probe): Added support for auto-loading.
14146
14147 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14148 (grub_fs_module_list_t): New type.
14149
14150 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14151 (grub_fs_autoload_hook): New prototype.
14152
14153 * genfslist.sh: New file.
f19dbdb7 14154
39c9d41d 14155 * genmk.rb: Added a rule to generate a filesystem list.
14156
121c1d83 141572005-06-30 Marco Gerards <metgerards@student.han.nl>
14158
14159 * configure.ac: Fix the test for cross-compiling.
14160
14161 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14162 define GRUB_UTIL anymore.
14163
14164 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14165 so this function works on other systems than just big endian.
14166 (load_modules): Likewise.
14167 (add_segments): Likewise.
14168
e75d76e1 141692005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14170
14171 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14172 contains `l' modifier, get a long from va_arg().
14173
50b5a0a7 141742005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14175
14176 * kern/mm.c (grub_free): If the next free block which is being
14177 merged is the first free block, set the first block to the block
14178 being freed.
14179 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14180
89371b20 141812005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14182
14183 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14184 `grub_ieee1275_chosen'.
14185
168d6e58 141862005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14187
14188 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14189 (grub_ieee1275_chosen): New variable.
14190 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14191 `chosen'.
14192 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14193 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14194 Rename first argument to `phandle' for consistency.
14195 (grub_ieee1275_get_property_length): Likewise.
14196 (grub_ieee1275_next_property): Likewise. Change type of first argument
14197 to grub_ieee1275_phandle_t.
14198 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14199 Move export next to declaration.
14200 (grub_ieee1275_chosen): New variable.
14201 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14202 Correct cosmetic typo.
14203 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14204 `grub_ieee1275_chosen'.
14205 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14206 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14207 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14208 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14209 `grub_ieee1275_chosen'.
14210
ca5baa3f 142112005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14212
14213 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14214 /chosen/bootargs.
14215 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14216 /chosen/bootargs as "variable=value" pairs.
14217
708b345f 142182005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14219
14220 * include/grub/misc.h (grub_dprintf): New macro.
14221 (grub_real_dprintf): New prototype.
14222 (grub_strword): Likewise.
14223 (grub_iswordseparator): Likewise.
14224 * kern/misc.c (grub_real_dprintf): New function.
14225 (grub_strword): Likewise.
14226 (grub_iswordseparator): Likewise.
14227
f4c5e67c 142282005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14229
14230 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14231 (roundup): Remove macro.
14232 (grub_ieee1275_flags): Make static.
14233 (grub_ieee1275_realmode): Remove.
14234 (grub_ieee1275_test_flag): New function.
14235 (grub_ieee1275_set_flag): Likewise.
14236 (find_options): Rename to `grub_ieee1275_find_options'; update
14237 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14238 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14239 (cmain): New prototype.
14240 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14241 `grub_ieee1275_flags' directly.
14242 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14243 machine/biosdisk.h.
14244 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14245 Don't include grub/machine/init.h.
14246 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14247 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14248 Remove prototype.
14249 (grub_ieee1275_realmode): Likewise.
14250 (grub_ieee1275_flag): New enum.
14251 (grub_ieee1275_test_flag): New prototype.
14252 (grub_ieee1275_set_flag): New prototype.
14253 * include/grub/powerpc/ieee1275/init.h: Remove file.
14254 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14255 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14256 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
14257 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
14258 comment.
14259 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14260 `grub_ieee1275_test_flag'.
14261 (grub_ieee1275_encode_devname): Likewise.
14262
ed16607e 142632005-04-21 Hollis Blanchard <hollis@penguinppc.org>
14264
14265 * include/grub/powerpc/ieee1275/ieee1275.h
14266 (grub_ieee1275_encode_devname): New prototype.
14267 (grub_ieee1275_get_filename): Likewise.
14268 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14269 function.
14270 (grub_set_prefix): Likewise.
14271 (grub_machine_init): Call grub_set_prefix.
14272 * kern/powerpc/ieee1275/openfw.c: Fix typos.
14273 (grub_parse_type): New enum.
14274 (grub_ieee1275_get_devargs): New function.
14275 (grub_ieee1275_get_devname): Likewise.
14276 (grub_ieee1275_parse_args): Likewise.
14277 (grub_ieee1275_get_filename): Likewise.
14278 (grub_ieee1275_encode_devname): Likewise.
14279
be369920 142802005-03-30 Marco Gerards <metgerards@student.han.nl>
14281
14282 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14283 `grub_loader_unset'.
14284
a5ce3a4a 142852005-03-26 Hollis Blanchard <hollis@penguinppc.org>
14286
14287 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14288 instead of grub_ieee1275_interpret.
14289 (grub_halt_init): New function.
14290 (grub_halt_fini): Likewise.
14291 (GRUB_MOD_INIT): Correct message grammar.
14292 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14293 instead of grub_ieee1275_interpret.
14294 (grub_reboot_init): New function.
14295 (grub_reboot_fini): Likewise.
14296 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14297 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14298 util/i386/pc/misc.c with commands/ieee1275/halt.c,
14299 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14300 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14301 function.
14302 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14303 Add prototype.
14304 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14305 prototype.
14306 (grub_halt): Likewise.
14307 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14308 (cmain): Remove __attribute__((unused)).
14309 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14310 (grub_heap_len): Likewise.
14311 (grub_machine_fini): New function.
14312 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14313 (grub_halt): Likewise.
14314 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14315 function.
14316 * util/powerpc/ieee1275/misc.c: New file.
14317
0058f771 143182005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14319
14320 * DISTLIST: New file.
14321 * gendistlist.sh: Likewise.
f19dbdb7 14322
0058f771 14323 * Makefile.in (COMMON_DISTFILES): Removed.
14324 (BOOT_DISTFILES): Likewise.
14325 (CONF_DISTFILES): Likewise.
14326 (DISK_DISTFILES): Likewise.
14327 (FS_DISTFILES): Likewise.
14328 (INCLUDE_DISTFILES): Likewise.
14329 (KERN_DISTFILES): Likewise.
14330 (LOADER_DISTFILES): Likewise.
14331 (TERM_DISTFILES): Likewise.
14332 (UTIL_DISTFILES): Likewise.
14333 (DISTFILES): Likewise.
14334 (uninstall): Uninstall files in $(pkgdata_DATA).
14335 (DISTLIST): New target.
14336 (distdir): Use the contents of the file DISTLIST to get a list of
14337 distributed files.
14338
46b3b8a5 143392005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14340
14341 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14342 descriptor. This is ported from GRUB Legacy.
14343
14344 * gencmdlist.sh: Added an extra semicolon to make it work with
14345 old sed versions. Reported by Robert Bihlmeyer
14346 <robbe@orcus.priv.at>.
14347
5822ff87 143482005-03-08 Yoshinori Okuji <okuji@enbug.org>
14349
14350 Automatic loading of commands is supported.
f19dbdb7 14351
5822ff87 14352 * normal/main.c (read_command_list): New function.
14353 (grub_normal_execute): Call read_command_list.
14354
14355 * normal/command.c (grub_register_command): Return zero or CMD.
14356 Allocate CMD->NAME from the heap.
14357 Initialize CMD->MODULE_NAME to zero.
14358 Find the same name as well. If the same command is found and it is
14359 a dummy command, overwrite members. If it is not a dummy command,
14360 return zero.
14361 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14362 (grub_command_find): If a dummy command is found, load a module
14363 and retry to find a command only once.
14364
14365 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14366 make sure that each command is loaded.
14367
14368 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14369 macro.
14370 (struct grub_command): Remove const from the member `name'.
14371 Add a new member `module_name'.
14372 (grub_register_command): Return grub_command_t.
14373
14374 * commands/help.c (grub_cmd_help): Call grub_command_find to make
14375 sure that each command is loaded.
14376
14377 * genmk.rb (PModule::rule): Specify a module name without the
14378 suffix ".mod" to gencmdlist.sh.
14379
7b1f4b57 143802005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14381
14382 * gencmdlist.sh: New file.
f19dbdb7 14383
7b1f4b57 14384 * genmk.rb (PModule::rule): Generate a rule for a command list.
14385 Clean command.lst.
14386 Generate command.lst from $(COMMANDFILES).
14387
14388 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14389 (DATA): Added $(pkgdata_DATA).
14390 (install-local): Install files in $(pkgdata_DATA).
14391
062aaf39 143922005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14393
14394 * term/i386/pc/vga.c (debug_command): Removed.
14395 (GRUB_MOD_INIT): Do not register the command "debug".
14396
14397 From Hollis Blanchard:
14398 * commands/configfile.c: New file.
14399 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14400 commands/configfile.c.
14401 (pkgdata_MODULES): Added configfile.mod.
14402 (configfile_mod_SOURCES): New variable.
14403 (configfile_mod_CFLAGS): Likewise.
14404 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14405 commands/configfile.c.
14406 (pkgdata_MODULES): Added configfile.mod.
14407 (configfile_mod_SOURCES): New variable.
14408 (configfile_mod_CFLAGS): Likewise.
14409 * util/grub-emu.c (main): Call grub_configfile_init and
14410 grub_configfile_fini.
14411 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14412 prototype.
14413 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 14414
cee01aa6 144152005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14416
14417 * normal/arg.c (grub_arg_show_help): Do not show the bug report
14418 address.
14419
14420 * commands/help.c (grub_cmd_help): Do not print newlines after
14421 the last command in print_command_help.
14422
93f3a1d8 144232005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14424
14425 * commands/default.h: New file.
14426 * commands/timeout.h: Likewise.
14427 * normal/context.c: Likewise.
f19dbdb7 14428
93f3a1d8 14429 * util/misc.c: Do not include sys/times.h.
14430 Include sys/time.h and grub/machine/time.h.
14431 (grub_get_rtc): Rewritten with gettimeofday.
14432
14433 * util/grub-emu.c (main): Call grub_default_init and
14434 grub_timeout_init before grub_normal_init, and call
14435 grub_timeout_fini and grub_default_fini after grub_main.
14436
14437 * util/console.c (grub_ncurses_checkkey): Return the read
14438 character or -1.
14439
14440 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14441 timeouts.
14442
14443 * normal/main.c (read_config_file): Push MENU. If this fails,
14444 print an error and wait for a user input.
14445 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14446 If a menu is empty or an error occurs, pop MENU.
14447 (grub_normal_execute): Pop and free MENU after grub_menu_run
14448 returns.
14449
14450 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14451
14452 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14453 include time.h.
14454 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14455 without GRUB_UTIL.
14456 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14457 time.h.
14458 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14459 without GRUB_UTIL.
14460
14461 * include/grub/normal.h (struct grub_menu_list): New struct.
14462 (grub_menu_list_t): New type.
14463 (struct grub_context): New struct.
14464 (grub_context_t): New type.
14465 (grub_register_command): Got rid of EXPORT_FUNC.
14466 (grub_unregister_command): Likewise.
14467 (grub_context_get): New prototype.
14468 (grub_context_get_current_menu): Likewise.
14469 (grub_context_push_menu): Likewise.
14470 (grub_context_pop_menu): Likewise.
14471 [GRUB_UTIL] (grub_default_init): Likewise.
14472 [GRUB_UTIL] (grub_default_fini): Likewise.
14473 [GRUB_UTIL] (grub_timeout_init): Likewise.
14474 [GRUB_UTIL] (grub_timeout_fini): Likewise.
14475
14476 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14477 commands/timeout.c and normal/context.c.
14478 (pkgdata_MODULES): Added default.mod and timeout.mod.
14479 (normal_mod_SOURCES): Added normal/context.c.
14480 (default_mod_SOURCES): New variable.
14481 (default_mod_CFLAGS): Likewise.
14482 (timeout_mod_SOURCES): Likewise.
14483 (timeout_mod_CFLAGS): Likewise.
14484 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14485 conf/i386-pc.rmk.
14486 (pkgdata_MODULES): Added default.mod and timeout.mod.
14487 (normal_mod_SOURCES): Added normal/context.c.
14488 (default_mod_SOURCES): New variable.
14489 (default_mod_CFLAGS): Likewise.
14490 (timeout_mod_SOURCES): Likewise.
14491 (timeout_mod_CFLAGS): Likewise.
14492
14493 * Makefile.in (all-local): Added $(MKFILES).
14494
4ed2e1dd 144952005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
14496
14497 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14498 (grub_emu_SOURCES): Likewise.
14499 (pkgdata_MODULES): Add `sun.mod'.
14500 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14501 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14502 `partmap/sun.c'.
14503 (pkgdata_MODULES): Add `sun.mod'.
14504 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14505 * include/grub/partition.h (grub_sun_partition_map_init): New
14506 prototype.
14507 (grub_sun_partition_map_fini): Likewise.
14508 * partmap/sun.c: New file.
14509 * util/grub-emu.c (main): Initialize and de-initialize the sun
14510 partitionmap support.
14511
4d4e372e 145122005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
14513
14514 This implements an Emacs-like menu entry editor.
f19dbdb7 14515
4d4e372e 14516 * normal/menu_entry.c: New file.
f19dbdb7 14517
4d4e372e 14518 * util/console.c (grub_ncurses_putchar): Translate some Unicode
14519 characters to ASCII.
14520 (saved_char): New variable.
14521 (grub_ncurses_checkkey): Rewritten completely.
14522 (grub_ncurses_getkey): Likewise.
14523 (grub_ncurses_init): Call raw instead of cbreak.
14524
14525 * normal/menu.c (print_entry): Do not put a space.
14526 (init_page): Renamed to ...
14527 (grub_menu_init_page): ... this. All callers changed.
14528 (edit_menu_entry): Removed.
14529 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14530
14531 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14532
14533 * kern/misc.c (grub_vprintf): Call grub_refresh.
14534
14535 * normal/menu.c (DISP_LEFT): Renamed to ...
14536 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14537 * normal/menu.c (DISP_UP): Renamed to ...
14538 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14539 * normal/menu.c (DISP_RIGHT): Renamed to ...
14540 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14541 * normal/menu.c (DISP_DOWN): Renamed to ...
14542 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14543 * normal/menu.c (DISP_HLINE): Renamed to ...
14544 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14545 * normal/menu.c (DISP_VLINE): Renamed to ...
14546 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14547 * normal/menu.c (DISP_UL): Renamed to ...
14548 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14549 * normal/menu.c (DISP_UR): Renamed to ...
14550 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14551 * normal/menu.c (DISP_LL): Renamed to ...
14552 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14553 * normal/menu.c (DISP_LR): Renamed to ...
14554 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14555 * normal/menu.c (TERM_WIDTH): Renamed to ...
14556 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14557 * normal/menu.c (TERM_HEIGHT): Renamed to ...
14558 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14559 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14560 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14561 * normal/menu.c (TERM_MARGIN): Renamed to ...
14562 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14563 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14564 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14565 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14566 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14567 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14568 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14569 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14570 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14571 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14572 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14573 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14574 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14575 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14576 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14577 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14578 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14579 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14580 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14581 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14582 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14583 All callers changed.
14584
14585 * include/grub/normal.h: New prototype.
14586
14587 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14588 normal/menu_entry.c.
14589 (normal_mod_SOURCES): Likewise.
14590 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14591 (normal_mod_SOURCES): Likewise.
14592
e6b92c8a 145932005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
14594
14595 * include/grub/normal.h (grub_halt_init): New prototype.
14596 (grub_halt_fini): Likewise.
14597 (grub_reboot_init): Likewise.
14598 (grub_reboot_fini): Likewise.
14599
14600 * util/grub-emu.c: Include signal.h.
14601 (main_env): New global variable.
14602 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14603 catch C-c.
14604 (grub_machine_fini): New function.
14605 (main): Call grub_halt_init and grub_reboot_init before
14606 grub_main, and grub_reboot_fini and grub_halt_fini after it.
14607 Call setjmp with MAIN_ENV to go back afterwards.
14608 Call grub_machine_fini right before return.
14609
14610 * include/grub/util/misc.h: Include setjmp.h.
14611 (main_env): New prototype.
14612
14613 * include/grub/kernel.h (grub_machine_fini): New prototype.
14614 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14615 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14616
14617 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14618 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14619 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 14620
e6b92c8a 14621 * util/i386/pc/misc.c: New file.
f19dbdb7 14622
e6b92c8a 14623 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14624 util/i386/pc/misc.c, commands/i386/pc/halt.c and
14625 commands/i386/pc/reboot.c.
14626
c642636f 146272005-02-14 Guillem Jover <guillem@hadrons.org>
14628
14629 * include/grub/dl.h (grub_dl_check_header): New prototype.
14630 (grub_arch_dl_check_header): Change return type to grub_err_t,
14631 remove size parameter and export function. Update all callers.
14632 * kern/dl.c (grub_dl_check_header): New function.
14633 (grub_dl_load_core): Use `grub_dl_check_header' instead of
14634 `grub_arch_dl_check_header'. Check ELF type. Check if sections
14635 are inside the core.
14636 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14637 independent ELF header checks.
14638 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14639 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14640 `grub_dl_check_header' instead of explicit checks. Check for the
14641 ELF type.
14642 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14643 `grub_dl_check_header' instead of explicit checks. Remove arch
14644 specific ELF header checks.
14645
e6b92c8a 14646 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14647 argument SIZE.
14648
5eabe94b 146492005-02-13 Hollis Blanchard <hollis@penguinppc.org>
14650
14651 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14652 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14653
1b14a681 146542005-02-12 Hollis Blanchard <hollis@penguinppc.org>
14655
14656 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 14657 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 14658 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 14659 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 14660 * partmap/amiga.c (amiga_partition_map_iterate): Return
14661 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14662 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14663
aca108aa 146642005-02-01 Guillem Jover <guillem@hadrons.org>
14665
14666 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14667 help info.
14668
c9f9c556 146692005-01-31 Marco Gerards <metgerards@student.han.nl>
14670
14671 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14672 Removed prototype.
14673 (grub_rescue_cmd_linux): New prototype.
14674 (grub_rescue_cmd_initrd): Likewise.
14675 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14676 `bi_rec'.
14677 (grub_linux_release_mem): Release the memory for the initrd.
14678 (grub_load_linux): Renamed from this...
14679 (grub_rescue_cmd_linux): ...To this. Changed all callers.
14680 Changed `entry' not to be static. Loop over memory regions to
14681 find another one when the default fails.
14682 (grub_rescue_cmd_initrd): New function.
14683 (grub_linux_init): Remove function.
14684 (grub_linux_fini): Likewise.
14685 (GRUB_MOD_INIT): Register `initrd'.
14686 (GRUB_MOD_FINI): Unregister `initrd'.
14687 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14688 Function removed.
14689 (grub_linux_normal_fini): Likewise.
14690 (GRUB_MOD_INIT): Register `initrd'.
14691 (GRUB_MOD_FINI): Unregister `initrd'.
14692
990cf3aa 146932005-01-31 Marco Gerards <metgerards@student.han.nl>
14694
14695 * commands/help.c: New file.
14696 * normal/arg.c (show_help): Renamed to...
14697 (grub_arg_show_help): ... this.
14698 * commands/i386/pc/halt.c: New file.
14699 * commands/i386/pc/reboot.c: Likewise.
14700 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14701 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14702 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14703 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14704 variables.
14705 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14706 `commands/help.c'.
14707 (pkgdata_MODULES): Add `help.mod'.
14708 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14709 * grub/i386/pc/init.h (grub_reboot): New prototype.
14710 (grub_halt): Likewise.
14711 * include/grub/normal.h (grub_arg_show_help): New prototype.
14712 (grub_help_init): Likewise.
14713 (grub_help_fini): Likewise.
14714 * util/grub-emu.c (main): Initialize and deinitialize the help
14715 command.
14716
14717 * normal/cmdline.c (grub_cmdline_get): Doc fix.
14718
14719 * normal/command.c (grub_command_init): Fixed the description of
14720 the `set' and `unset' commands.
14721
147222005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 14723
14724 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14725 function.
14726 * commands/ieee1275/halt.c: New file.
14727 * commands/ieee1275/reboot.c: Likewise.
14728 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14729 `__attribute__ ((unused))'. Some GCS related fixed.
14730 (grub_suspend_init) [GRUB_UTIL]: Function removed.
14731 (grub_suspend_fini): Likewise.
14732 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14733 and `halt.mod'.
14734 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14735 (halt_mod_CFLAGS): New variables.
14736 * include/grub/powerpc/ieee1275/ieee1275.h
14737 (grub_ieee1275_interpret): New prototype.
14738
1ab09cc7 147392005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
14740
14741 * include/grub/misc.h (memmove): New prototype.
14742 (memcpy): Likewise.
14743
8b8cbdb2 147442005-01-22 Hollis Blanchard <hollis@penguinppc.org>
14745
14746 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
14747 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
14748
e3741a27 147492005-01-22 Marco Gerards <metgerards@student.han.nl>
14750
14751 * kern/misc.c (grub_strndup): Function rewritten.
14752
776bd780 147532005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
14754
14755 * normal/menu.c (TERM_WIDTH): Macro redefined.
14756 (TERM_TOP_BORDER_Y): Likewise.
14757 (draw_border): Replaced while-loop by a for-loop. Make the number
14758 of lines consistent with the number of lines displayed in
14759 print_entries. Added a margin below the rectangle.
14760 (print_entry): Make the entry fit in the rectangle.
14761 (print_entries): Display the scroll arrows next to the right
14762 border.
14763
78026bce 147642005-01-21 Marco Gerards <metgerards@student.han.nl>
14765
14766 * fs/minix.c (grub_minix_find_file): Reserve more space for
14767 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
14768 `grub_strncpy' to copy `path' into it.
14769
67bbaf0f 147702005-01-21 Marco Gerards <metgerards@student.han.nl>
14771
14772 Add the loopback device, a device via which files can be accessed
14773 as devices.
f19dbdb7 14774
67bbaf0f 14775 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
14776 (pkgdata_MODULES): Add loopback.mod.
14777 (loopback_mod_SOURCES): New variable.
14778 (loopback_mod_CFLAGS): Likewise.
14779 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14780 `disk/loopback.c'.
14781 (pkgdata_MODULES): Add loopback.mod.
14782 (loopback_mod_SOURCES): New variable.
14783 (loopback_mod_CFLAGS): Likewise.
14784 * disk/loopback.c: new file.
14785 * include/grub/normal.h (grub_loop_init): New prototype.
14786 (grub_loop_fini): New prototype.
14787 * util/grub-emu.c (main): Initialize and de-initialize loopback
14788 support.
14789 * include/grub/disk.h (grub_disk_dev_id): Add
14790 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
14791
6f1c18bd 147922005-01-20 Hollis Blanchard <hollis@penguinppc.org>
14793
14794 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
14795 function.
14796 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
14797 (suspend_mod_SOURCES): New variable.
14798 (suspend_mod_CFLAGS): Likewise.
14799 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
14800 New prototype.
14801 * commands/ieee1275/suspend.c: New file.
14802
b38551da 148032005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14804
14805 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 14806 ((unused))' to `__attribute__ ((used))'.
b38551da 14807 (GRUB_MOD_FINI): Likewise.
14808 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
14809 * genmk.rb (PModule): Assign space to common symbols when linking
14810 modules.
14811
777aff39 148122005-01-20 Marco Gerards <metgerards@student.han.nl>
14813
14814 * include/grub/mm.h (grub_mm_init_region): Change the type of the
14815 `unsigned' arguments to `grub_size_t'.
14816 (grub_malloc): Likewise.
14817 (grub_realloc): Likewise.
14818 (grub_memalign): Likewise.
14819 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
14820 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14821 * util/misc.c (grub_malloc): Likewise.
14822 (grub_realloc): Likewise.
14823 * kern/mm.c (get_header_from_pointer): Change the casts to
14824 `unsigned' into a cast to `grub_size_t'.
14825
14826 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
14827 point to `currnode' when `currnode' is changed.
14828
14829 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
14830 Schottelius <nico-linux@schottelius.org>.
14831
d0ff18e1 148322005-01-09 Hollis Blanchard <hollis@penguinppc.org>
14833
14834 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
14835 (note_path): Remove variable.
14836 (GRUB_IEEE1275_NOTE_NAME): New macro.
14837 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
14838 (grub_ieee1275_note_hdr): New structure.
14839 (grub_ieee1275_note_desc): Likewise.
14840 (grub_ieee1275_note): Likewise.
14841 (load_note): Remove `dir' argument. All callers updated. Remove
14842 `note_img' and `path'. Do not load a file from `note_path'.
14843 Initialize a struct grub_ieee1275_note and write that to `out'.
14844 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
14845
4ca7004c 148462005-01-05 Marco Gerards <metgerards@student.han.nl>
14847
14848 * util/misc.c (grub_util_read_image): Revert last change. It
14849 called `grub_util_read_at', which seeks from the beginning of the
14850 file.
14851
0b412211 148522005-01-04 Hollis Blanchard <hollis@penguinppc.org>
14853
14854 * TODO: Add note about endianness in grub-mkimage.
14855 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
14856 section.
14857 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
14858 (grub_mkimage_SOURCES): New target.
14859 * include/grub/kernel.h (grub_start_addr): Remove variable.
14860 (grub_end_addr): Likewise.
14861 (grub_total_module_size): Likewise.
14862 (grub_kernel_image_size): Likewise.
14863 (GRUB_MODULE_MAGIC): New constant.
14864 (grub_module_info): New structure.
14865 (grub_arch_modules_addr): New prototype.
14866 (grub_get_end_addr): Remove prototype.
14867 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
14868 * include/grub/powerpc/ieee1275/kernel.h: New file.
14869 * include/grub/util/misc.h (grub_util_get_fp_size): New
14870 prototype.
14871 (grub_util_read_at): Likewise.
14872 (grub_util_write_image_at): Likewise.
14873 * kern/main.c (grub_get_end_addr): Remove function.
14874 (grub_load_modules): Call grub_arch_modules_addr instead of using
14875 grub_end_addr. Look for a grub_module_info struct in memory. Use
14876 the grub_module_info fields instead of calling grub_get_end_addr
14877 as loop conditions. Move grub_add_unused_region code here.
14878 (grub_add_unused_region): Remove function.
14879 * kern/i386/pc/init.c: Include grub/cache.h.
14880 (grub_machine_init): Remove call to grub_get_end_addr. Remove
14881 one call to add_mem_region.
14882 (grub_arch_modules_addr): New function.
14883 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
14884 (grub_total_module_size): Likewise.
14885 Include grub/machine/kernel.h.
14886 (grub_arch_modules_addr): New function.
14887 * util/grub-emu.c (grub_end_addr): Remove variable.
14888 (grub_total_module_size): Likewise.
14889 (grub_arch_modules_addr): New function.
14890 * util/misc.c: Include unistd.h.
14891 (grub_util_get_fp_size): New function.
14892 (grub_util_read_at): Likewise.
14893 (grub_util_write_image_at): Likewise.
14894 (grub_util_read_image): Call grub_util_read_at.
14895 (grub_util_write_image): Call grub_util_write_image_at.
14896 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
14897 additional memory in kernel_img for a struct grub_module_info.
14898 Fill in that grub_module_info.
14899 * util/powerpc/ieee1275/grub-mkimage.c: New file.
14900
458786f8 149012005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14902
14903 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
14904 New function.
14905 * include/grub/powerpc/ieee1275/ieee1275.h
14906 (grub_ieee1275_milliseconds): New prototype.
14907 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
14908 Change to 1000.
14909 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
14910 grub_ieee1275_milliseconds.
14911
ac507d1b 149122005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14913
14914 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
14915 variable.
14916 (find_options): New function.
14917 (cmain): Call find_options.
14918 * include/grub/powerpc/ieee1275/ieee1275.h
14919 (grub_ieee1275_realmode): New extern variable.
14920 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
14921 grub_map if grub_ieee1275_realmode is false.
14922
6b8fd1c4 149232004-12-29 Marco Gerards <metgerards@student.han.nl>
14924
14925 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
14926 lines are inserted and make it work like readline. Reported by
14927 Vincent Pelletier <subdino2004@yahoo.fr>.
14928
8514a1e0 149292004-12-28 Marco Gerards <metgerards@student.han.nl>
14930
14931 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
14932
14933 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
14934 `kern/powerpc/cache.S'.
14935
924b6140 149362004-12-27 Marco Gerards <metgerards@student.han.nl>
14937
14938 * genmk.rb: Handle the `Program' class in the main loop. Written
14939 by Johan Rydberg <jrydberg@gnu.org>.
14940 (Program): New class.
14941 (programs): New variable.
14942 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
14943 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
14944 instead of "grub/kernel.h". Include <grub/machine/init.h>.
14945 (help_arch): Function removed.
14946 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
14947 `powerpc/libgcc.h' and `loader.h'.
14948 (pkgdata_PROGRAMS): New variable.
14949 (sbin_UTILITIES): Variable removed.
14950 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
14951 (grubof_SOURCES): Variable re-defined so it only includes the
14952 core functionality.
14953 (grubof_CFLAGS): Remove `-DGRUBOF'.
14954 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
14955 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
14956 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
14957 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
14958 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
14959 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
14960 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
14961 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
14962 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
14963 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
14964 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14965 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
14966 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
14967 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
14968 (pc_mod_CFLAGS): New variables.
14969 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
14970 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
14971 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
14972 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
14973 Moved from here...
14974 * include/grub/i386/pc/init.h (grub_os_area_addr)
14975 (rub_os_area_size): ... to here.
14976 * include/grub/powerpc/ieee1275/ieee1275.h
14977 (grub_ieee1275_entry_fn): Export symbol.
14978 * include/grub/powerpc/ieee1275/init.h: New file.
14979 * include/grub/powerpc/libgcc.h: Likewise.
14980 * include/grub/cache.h: Likewise.
14981 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
14982 <hollis@penguinppc.org>.
14983 * kern/dl.c: Include <grub/cache.h>.
14984 (grub_dl_flush_cache): New function.
14985 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
14986 for this module.
14987 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
14988 (grub_console_init): Removed prototypes.
14989 (grub_machine_init): Don't initialize the modules anymore.
14990 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
14991 static.
14992 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
14993 Macro undef removed.
14994 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
14995 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
14996 relocation `R_PPC_REL32'. Return an error when the relocation is
14997 unknown.
14998 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
14999 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15000 * util/misc.c (grub_arch_sync_caches): Likewise.
15001
e4b47e0c 150022004-12-19 Marco Gerards <metgerards@student.han.nl>
15003
15004 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15005 `symlist.c', add `grubof_symlist.c'.
15006 (symlist.c): Variable removed.
15007 (grubof_HEADERS): Variable added.
15008 (grubof_symlist.c): New target.
15009 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15010 `kernel_img_HEADERS'.
15011 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15012 * kern/powerpc/dl.c: New file.
15013 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15014 Function removed.
15015 (grub_arch_dl_relocate_symbols): Likewise.
15016 (grub_register_exported_symbols): Likewise.
15017
4ceb3636 150182004-12-13 Marco Gerards <metgerards@student.han.nl>
15019
15020 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15021 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15022 to fail instead. Reported by Vincent Pelletier
15023 <subdino2004@yahoo.fr>.
15024
15025 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15026 it is not allocated. Reported by Vincent Pelletier
15027 <subdino2004@yahoo.fr>.
15028
15029 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15030 output so the output looks better.
f19dbdb7 15031
3f1578fe 150322004-12-04 Marco Gerards <metgerards@student.han.nl>
15033
15034 Modulize the partition map support and add support for the amiga
15035 partition map.
f19dbdb7 15036
3f1578fe 15037 * commands/ls.c: Include <grub/partition.h> instead of
15038 <grub/machine/partition.h>.
15039 * kern/disk.c: Likewise.
15040 * kern/rescue.c: Likewise.
15041 * loader/i386/pc/chainloader.c: Likewise.
15042 * normal/cmdline.c: Likewise.
15043 * kern/powerpc/ieee1275/init.c: Likewise.
15044 (grub_machine_init): Call `grub_pc_partition_map_init',
15045 `grub_amiga_partition_map_init' and
15046 `grub_apple_partition_map_init'.
15047 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15048 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15049 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15050 `partition.h' and `pc_partition.h'.
15051 (grub_setup_SOURCES): Remove
15052 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15053 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15054 (grub_emu_SOURCES): Likewise.
15055 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15056 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15057 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15058 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15059 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15060 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15061 (grubof_SOURCES): Likewise.
15062 * disk/i386/pc/partition.c: File removed.
15063 * disk/powerpc/ieee1275/partition.c: Likewise.
15064 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15065 * include/grub/i386/pc/partition.h: Likewise.
15066 * kern/partition.c: New file.
15067 * partmap/amiga.c: Likewise.
15068 * partmap/apple.c: Likewise.
15069 * partmap/pc.c: Likewise.
15070 * include/grub/partition.h: Likewise..
15071 * include/grub/pc_partition.h: Likewise.
15072 * util/grub-emu.c: Include <grub/partition.h> instead of
15073 <grub/machine/partition.h>.
15074 (main): Call `grub_pc_partition_map_init',
15075 `grub_amiga_partition_map_init' and
15076 `grub_apple_partition_map_init' and deinitialize afterwards.
15077 * util/i386/pc/biosdisk.c: Include `#include
15078 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15079 `<grub/machine/partition.h>'.
15080 * util/i386/pc/grub-setup.c: Likewise.
15081 * util/i386/pc/biosdisk.c: Likewise.
15082 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15083 partition information in case of a PC partition.
15084 * util/i386/pc/grub-setup.c: Include `#include
15085 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15086 `<grub/machine/partition.h>'.
15087 (setup): Only access the PC specific partition information in case
15088 of a PC partition.
15089
0ef4ced9 150902004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 15091
0ef4ced9 15092 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15093 (grub_longjmp): Likewise.
15094 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15095 20.
15096 * normal/powerpc/setjmp.S: New file.
15097 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15098 `normal/powerpc/setjmp.S'.
15099 (grubof_CFLAGS): Add `-DGRUBOF'.
15100 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15101 [GRUB_UTIL && !GRUBOF].
f19dbdb7 15102
19950e29 151032004-11-16 Marco Gerards <metgerards@student.han.nl>
15104
15105 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15106 property named `name'. Correctly handle the error returned by
15107 `grub_ieee1275_finddevice' if a device can not be opened.
15108
a2fea427 151092004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15110
15111 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15112 `actual' for negativity.
15113 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15114 kern/fshelp.c.
15115
41ea0ea3 151162004-11-01 Marco Gerards <metgerards@student.han.nl>
15117
15118 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15119 (PAGE_OFFSET): New macro.
15120 (CRTC_ADDR_PORT): Likewise.
15121 (CRTC_DATA_PORT): Likewise.
15122 (START_ADDR_HIGH_REGISTER): Likewise.
15123 (START_ADDR_LOW_REGISTER): Likewise.
15124 (GRAPHICS_ADDR_PORT): Likewise.
15125 (GRAPHICS_DATA_PORT): Likewise.
15126 (READ_MAP_REGISTER): Likewise.
15127 (INPUT_STATUS1_REGISTER): Likewise.
15128 (INPUT_STATUS1_VERTR_BIT): Likewise.
15129 (page): New variable.
15130 (wait_vretrace): New function.
15131 (set_read_map): Likewise.
15132 (set_start_address): Likewise.
15133 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15134 the right page.
15135 (check_vga_mem): Take the page into account.
15136 (write_char): Likewise.
15137 (write_cursor): Likewise.
15138 (scroll_up): Likewise. Copy the page to the page that is not
15139 shown and switch between both pages.
15140 (grub_vga_putchar): Fix off by one error.
15141 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15142 account.
15143
ad0bd20b 151442004-11-01 Marco Gerards <metgerards@student.han.nl>
15145
15146 Add support for iso9660 (including rockridge).
f19dbdb7 15147
ad0bd20b 15148 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15149 (iso9660_mod_SOURCES): New variable.
15150 (iso9660_mod_CFLAGS): Likewise.
15151 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15152 * include/grub/fs.h (grub_iso9660_init): New prototype.
15153 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15154 * fs/iso9660.c: New file.
15155
15156 * include/grub/misc.h (grub_strncat): New prototype.
15157 * kern/misc.c (grub_strncat): New function.
f19dbdb7 15158
ad0bd20b 15159 * fs/hfs.c (grub_hfs_mount): Translate the error
15160 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15161 * fs/jfs.c (grub_jfs_mount): Likewise.
15162 * fs/ufs.c (grub_ufs_mount): Likewise.
15163
a5477a59 151642004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15165
15166 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15167 which initialized BAT registers.
15168 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15169 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15170 Move from here...
15171 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15172 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15173 ... to here.
15174 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15175 (grub_mapclaim): Likewise.
15176 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15177 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15178 hand.
15179
9304c1f8 151802004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15181
15182 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15183 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15184 -ffreestanding and -msoft-float.
15185
86f4ae25 151862004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15187
15188 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15189 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15190 set in grub_ieee1275_flags.
15191
38912228 151922004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15193
15194 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15195 prototype.
15196 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15197 grub_console_init first.
15198 Change the memory range used for grub_ieee1275_claim and
15199 grub_mm_init_region.
15200 Print an error message if the claim fails.
15201 Include <grub/misc.h>.
15202
d1923dc8 152032004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15204
15205 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15206 Call grub_children_iterate for device nodes of type `scsi',
15207 `ide', or `ata'.
15208 (grub_ofdisk_open): Remove manual device alias resolution.
15209 Fix memory leak when device cannot be opened.
f19dbdb7 15210 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 15211 (grub_children_iterate): New prototype.
15212 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15213 New function.
15214 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15215 Return -1 if args.size was -1.
15216
4512e4f3 152172004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15218
15219 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15220 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15221 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15222 Open Firmware's memory for it; claim memory from _start to _end.
15223 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15224 (_end): New extern.
15225 (_start): Zero BSS from __bss_start to _end.
15226 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15227 New extern.
15228 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15229
4d61feb0 152302004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15231
ad0bd20b 15232 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15233 -1 if args.base was -1.
4d61feb0 15234
026fa2f9 152352004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15236
15237 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15238 escape sequence instead of a literal ^L. Also call
15239 grub_ofconsole_gotoxy.
15240
9f2220ef 152412004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15242
15243 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15244 void * arguments to grub_addr_t. All callers updated. Also make
15245 the `result' argument optional.
15246 (grub_ieee1275_release): change void * arguments to grub_addr_t.
15247 All callers updated.
15248
8a572cd7 152492004-09-22 Hollis Blanchard <hollis@penguinppc.org>
15250
15251 * commands/ls.c (grub_ls_list_files): Use the string following the
15252 initial ')', if present, as the filesystem path.
15253 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15254
15255 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15256
18aa81f2 152572004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
15258
15259 Make the source code of the menu interface more readable.
f19dbdb7 15260
18aa81f2 15261 * normal/menu.c: Include grub/mm.h.
15262 (TERM_WIDTH): New macro.
15263 (TERM_HEIGHT): Likewise.
15264 (TERM_INFO_HEIGHT): Likewise.
15265 (TERM_MARGIN): Likewise.
15266 (TERM_SCROLL_WIDTH): Likewise.
15267 (TERM_TOP_BORDER_Y): Likewise.
15268 (TERM_LEFT_BORDER_X): Likewise.
15269 (TERM_BORDER_WIDTH): Likewise.
15270 (TERM_MESSAGE_HEIGHT): Likewise.
15271 (TERM_BORDER_HEIGHT): Likewise.
15272 (TERM_NUM_ENTRIES): Likewise.
15273 (TERM_FIRST_ENTRY_Y): Likewise.
15274 (TERM_ENTRY_WIDTH): Likewise.
15275 (TERM_CURSOR_X): Likewise.
15276 (draw_border): Use macros instead of magic numbers.
15277 (print_entry): Likewise.
15278 (print_entries): Likewise.
15279 (run_menu): Likewise. Also, handle the key 'e'.
15280 (run_menu_entry): Ignore empty command lines.
15281 (print_message): Added a new argument EDIT. If EDIT is true,
15282 print a different message.
15283 (init_page): Likewise.
15284 (edit_menu_entry): New function. Not implemented yet.
15285
b47efe30 152862004-09-17 Marco Gerards <metgerards@student.han.nl>
15287
15288 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15289 can be loaded from normal mode.
f19dbdb7 15290
b47efe30 15291 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15292 `multiboot.mod'.
15293 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15294 (multiboot_mod_CFLAGS): New variables.
15295 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 15296 * loader/i386/pc/multiboot_normal.c: Likewise.
15297
b47efe30 15298 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15299 attribute `unused'.
f19dbdb7 15300
b47efe30 15301 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
15302 `fdiro' to read the mode information from instead of `diro'.
15303
15304 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15305 looking up a symlink.
15306
15307 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15308 macro.
15309 * normal/command.c (grub_command_execute): Don't parse the
15310 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15311 flags of the command.
15312
15313 * normal/menu.c (grub_menu_run): Fix typo.
15314
da75ac71 153152004-09-14 Hollis Blanchard <hollis@penguinppc.org>
15316
15317 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15318
15319 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15320 `y + 1' instead of `y - 1'.
15321
15322 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 15323
062b24c2 153242004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15325
15326 From Hollis Blanchard <hollis@penguinppc.org>:
15327 * kern/misc.c (memmove): New alias for grub_memmove.
15328 (memcmp): New alias for grub_memcmp.
15329 (memset): New alias for grub_memset.
f19dbdb7 15330 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 15331 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 15332 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 15333 (grub_ieee1275_get_property): Likewise.
f19dbdb7 15334
8ddad845 153352004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15336
15337 Added normal mode command `chainloader' as module chain.mod, which
15338 depends on normal.mod and _chain.mod.
f19dbdb7 15339
8ddad845 15340 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15341 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15342 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15343 Deleted prototype.
15344 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15345 but arguments parsing moved to ...
15346 (grub_chainloader_cmd): ... here. New function.
15347 * include/grub/i386/pc/chainloader.h: New file.
15348 * loader/i386/pc/chainloader_normal.c: Likewise.
15349
2c1f4ce3 153502004-09-11 Marco Gerards <metgerards@student.han.nl>
15351
15352 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15353 (grub_mkimage_LDFLAGS): Likewise.
15354 (grub_emu_SOURCES): Likewise.
15355 (kernel_img_HEADERS): Added fshelp.h.
15356 * fs/ext2.c: Include <grub/fshelp.h>.
15357 (FILETYPE_REG): New macro.
15358 (FILETYPE_INO_REG): Likewise.
15359 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15360 Changed all users.
15361 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
15362 all users.
15363 (grub_fshelp_node): New struct.
15364 (grub_ext2_data): Added member `diropen'. Changed member `inode'
15365 to a pointer.
15366 (grub_ext2_get_file_block): Removed function.
15367 (grub_ext2_read_block): New function.
15368 (grub_ext2_read_file): Replaced parameter `data' by `node'.
15369 This function was written.
15370 (grub_ext2_mount): Read the root inode. Create a diropen struct.
15371 (grub_ext2_find_file): Removed function.
15372 (grub_ext2_read_symlink): New function.
15373 (grub_ext2_iterate_dir): Likewise.
15374 (grub_ext2_open): Rewritten.
15375 (grub_ext2_dir): Rewritten.
15376 * include/grub/fshelp.h: New file.
15377 * fs/fshelp.c: Likewise.
15378
3c52136a 153792004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
15380
15381 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15382 (print_message): Add a missing newline.
15383 (run_menu): Added timeout support.
15384 (run_menu_entry): New local function.
15385 (grub_menu_run): Added support for booting.
15386
15387 * kern/loader.c (grub_loader_is_loaded): New function.
15388
15389 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15390 (grub_get_rtc): Exported.
15391
15392 * include/grub/i386/pc/time.h: Include grub/symbol.h.
15393 (grub_get_rtc): Exported.
15394
15395 * include/grub/normal.h (struct grub_command_list): Remove
15396 constant from the member `command'.
15397
15398 * include/grub/loader.h (grub_loader_is_loaded): Declared.
15399
15400 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15401
15402 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15403
aa033560 154042004-08-28 Marco Gerards <metgerards@student.han.nl>
15405
15406 Add support for the JFS filesystem.
15407
15408 * fs/jfs.c: New file.
15409 * include/grub/fs.h (grub_jfs_init): New prototype.
15410 (grub_jfs_fini): New prototype.
15411 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15412 (grub_emu_SOURCES): Likewise.
15413 (pkgdata_MODULES): Add jfs.mod.
15414 (jfs_mod_SOURCES): New variable.
15415 (jfs_mod_CFLAGS): Likewise.
15416 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15417 (grubof_SOURCES): Likewise.
15418 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15419
15420 * fs/fat.c (grub_fat_find_dir): Convert the filename little
15421 endian to the host endian.
15422 (grub_fat_utf16_to_utf8): Move function from there...
15423 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 15424 the endianness of the source string anymore.
aa033560 15425 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15426
94bc45af 154272004-08-24 Marco Gerards <metgerards@student.han.nl>
15428
15429 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15430 (grub_boot_fini) [GRUB_UTIL]: Likewise.
15431 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15432 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 15433
94bc45af 15434 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15435 (grub_hfs_iterate_dir): Make the function static. Add prototypes
15436 for `node_found' and `it_dir'.
15437 (grub_hfs_dir): Add prototype for `dir_hook'.
15438
15439 * fs/minix.c (grub_minix_get_file_block): Add prototype for
15440 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
15441 and `indir32' to silence a gcc warning.
15442
15443 * include/grub/fs.h (grub_hfs_init): New prototype.
15444 (grub_hfs_fini): Likewise.
f19dbdb7 15445
15446
97543f08 154472004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15448
15449 Each disk device has its own id now. This is useful to make use
15450 of multiple disk devices.
f19dbdb7 15451
97543f08 15452 * include/grub/disk.h (grub_disk_dev_id): New enum.
15453 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15454 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15455
15456 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15457 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15458
15459 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15460 GRUB_DISK_DEVICE_OFDISK_ID as an id.
15461
15462 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15463 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15464
15465 * include/grub/disk.h (struct grub_disk_dev): Added a new member
15466 "id" which is used by the cache manager.
15467
15468 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15469 of just "GRUB".
15470
64372eb4 154712004-08-18 Marco Gerards <metgerards@student.han.nl>
15472
15473 * fs/hfs.c: New file.
15474 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15475 (grub_emu_SOURCES): Likewise.
15476 (pkgdata_MODULES): Add hfs.mod.
15477 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15478 (grubof_SOURCES): Likewise.
15479 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15480
15481 * include/grub/misc.h (grub_strncasecmp): Add prototype.
15482 * kern/misc.c (grub_strncasecmp): Add function.
15483
cc61b58f 154842004-08-14 Marco Gerards <metgerards@student.han.nl>
15485
15486 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15487 with parentheses.
15488
15489 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15490 (grub_ext2_dir): In case the directory entry type is unknown, read
15491 it from the inode.
15492
0ef123f6 154932004-08-02 Peter Bruin <pjbruin@dds.nl>
15494
15495 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15496 grub_load_linux instead of grub_rescue_cmd_linux as second
15497 argument of grub_rescue_register_command.
15498
15499 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15500
a447c5df 155012004-07-27 Marco Gerards <metgerards@student.han.nl>
15502
15503 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15504 function.
15505 * commands/boot.c: Remove the check for `GRUB_UTIL'.
15506 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15507 `loader/powerpc/ieee1275/linux.c',
15508 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15509 * include/grub/powerpc/ieee1275/ieee1275.h
15510 (grub_ieee1275_release): New prototype.
15511 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15512 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15513 normal, boot, linux and linux_normal.
15514 * loader/powerpc/ieee1275/linux.c: New file.
15515 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15516
5a9e3546 155172004-07-12 Marco Gerards <metgerards@student.han.nl>
15518
15519 * normal/arg.c (grub_arg_parse): Correct error handling after
15520 reallocating the argumentlist (check if `argl' is not null instead
15521 of checking if `args' is not null).
15522 * kern/mm.c (grub_realloc): Return the same pointer when using the
15523 same region, instead of returning the header address.
15524
e15199cb 155252004-07-11 Marco Gerards <metgerards@student.han.nl>
15526
15527 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15528 one block instead of two when looking for the initial partition.
15529 (grub_partition_probe): Initialize the local variable `p' with 0.
15530 Use base 10 for the grub_strtoul call.
15531 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
15532 need for one local variable.
15533 (grub_strtoul): Don't add the new value to `num', instead of that
15534 just assign it.
15535
020616c2 155362004-07-11 Marco Gerards <metgerards@student.han.nl>
15537
15538 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15539 (pxeboot_img_SOURCES): New variable.
15540 (pxeboot_img_ASFLAGS): Likewise.
15541 (pxeboot_img_LDFLAGS): Likewise.
15542 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
15543 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
15544 <lode_leroy@hotmail.com>.
15545
6c51eb64 155462004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15547
15548 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15549 there was no input.
15550
cfb12aff 155512004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15552
15553 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
15554 the history buffer logic.
15555
6eabba74 155562004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15557
15558 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15559 (FILETYPE_INO_SYMLINK): New macros.
15560 (grub_ext2_find_file): Check if the node is a directory using the
15561 inode stat information instead of using the filetype in the
15562 dirent. Exclude the first character of an absolute symlink.
15563 (grub_ext2_dir): Mask out the filetype part of the mode member of
15564 the inode.
15565
66e19ef8 155662004-05-24 Marco Gerards <metgerards@student.han.nl>
15567
15568 Add support for UFS version 1 and 2. Add support for the minix
15569 filesystem version 1 and 2, both the variants with 14 and 30 long
15570 filenames.
f19dbdb7 15571
66e19ef8 15572 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15573 fs/minix.c.
15574 (grub_emu_SOURCES): Likewise.
15575 (pkgdata_MODULES): Add ufs.mod and minix.mod.
15576 (ufs_mod_SOURCES): New variable.
15577 (ufs_mod_CFLAGS): Likewise.
15578 (minix_mod_SOURCES): Likewise.
15579 (minix_mod_CFLAGS): Likewise.
15580 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15581 fs/minix.c.
15582 (grubof_SOURCES): Likewise.
15583 * fs/ufs.c: New file.
15584 * fs/minix.c: New file.
15585 * include/grub/fs.h (grub_ufs_init): New prototype.
15586 (grub_ufs_fini): Likewise.
15587 (grub_minix_init): Likewise.
15588 (grub_minix_fini): Likewise.
15589 * util/grub-emu.c (main): Initialize and deinitialize UFS and
15590 minix fs.
15591
cc2e748a 155922004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
15593
15594 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15595 commands/ls.c, commands/terminal.c, commands/boot.c,
15596 commands/cmp.c and commands/cat.c.
15597 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15598
15599 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15600 "env.h"
15601
4b13b216 156022004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15603
15604 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15605 and grub_, respectively. Because the conversion is trivial and
15606 mechanical, I omit the details here. Please refer to the CVS
15607 if you need more information.
15608
6a142551 156092004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15610
15611 * include/pupa: Renamed to ...
15612 * include/grub: ... this.
15613 * util/i386/pc/pupa-mkimage.c: Renamed to ...
15614 * util/i386/pc/grub-mkimage.c: ... this.
15615 * util/i386/pc/pupa-setup.c: Renamed to ...
15616 * util/i386/pc/grub-setup.c: ... this.
15617 * util/pupa-emu.c: Renamed to ...
15618 * util/grub-emu.c: ... this.
15619
e56cdf21 156202004-03-29 Marco Gerards <metgerards@student.han.nl>
15621
15622 Add support for the newworld apple macintosh (PPC). This has been
15623 tested on the powerbook 2000 only. It only adds support for
15624 generic ieee1275 functions, console and disk support. This should
15625 be easy to port to other architectures with support for Open
15626 Firmware.
f19dbdb7 15627
e56cdf21 15628 * configure.ac: Accept the powerpc as host_cpu. In the case of
15629 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
15630 specific tests are only executed while building for the i386.
15631 Inverse test for crosscompile.
15632 * genmk.rb (Utility): Allow assembler files.
15633 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15634 * conf/powerpc-ieee1275.rmk: New file.
15635 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15636 * disk/powerpc/ieee1275/partition.c: Likewise.
15637 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15638 * include/pupa/powerpc/ieee1275/console.h: Likewise.
15639 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15640 * include/pupa/powerpc/ieee1275/time.h: Likewise.
15641 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15642 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15643 * include/pupa/powerpc/ieee1275/loader.h
15644 * include/pupa/powerpc/setjmp.h: Likewise.
15645 * include/pupa/powerpc/types.h: Likewise.
15646 * kern/powerpc/ieee1275/init.c: Likewise.
15647 * kern/powerpc/ieee1275/openfw.c: Likewise.
15648 * term/powerpc/ieee1275/ofconsole.c: Likewise.
15649
15650 These files were written by Johan Rydberg
15651 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 15652
e56cdf21 15653 * boot/powerpc/ieee1275/cmain.c: New file.
15654 * boot/powerpc/ieee1275/crt0.S: Likewise.
15655 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15656 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15657
8c8cc205 156582004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
15659
15660 * Makefile.in: Update copyright.
15661 * genmodsrc.sh: Likewise.
15662 * gensymlist.sh: Likewise.
15663 * term/i386/pc/vga.c: Indent correctly.
15664
15665 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15666 bugreporting address.
15667 * util/i386/pc/pupa-setup.c (usage): Likewise,
15668 (main): Call pupa_ext2_init and pupa_ext2_fini.
15669
f19dbdb7 15670 * fs/fat.c (log2): Renamed to ...
8c8cc205 15671 (fat_log2): ... this.
15672 All callers changed.
15673 * kern/misc.c (memcpy): Alias to pupa_memmove.
15674 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15675 lvalue cast.
15676 * util/console.c (pupa_ncurses_fini): Return 0.
15677
15678 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15679 Move fail label here.
15680 [__GNU__]: Don't warn when using stat.
15681 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15682 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15683 long int. Use strtol instead of strtoul.
f19dbdb7 15684
db1771cf 156852004-03-14 Marco Gerards <metgerards@student.han.nl>
15686
15687 * commands/boot.c: New file.
15688 * commands/cat.c: Likewise.
15689 * commands/cmp.c: Likewise.
15690 * commands/ls.c: Likewise.
15691 * commands/terminal.c: Likewise.
15692 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15693 (pupa_register_command): Changed interface to match the new
15694 argument parser.
15695 (pupa_command_execute): Changed (almost rewritten) so it uses
15696 pupa_split_command. Added support for setting variables using the
15697 syntax `foo=bar'.
15698 (rescue_command): Changed to work with the new argument parser.
15699 (terminal_command): Moved from here to commands/terminal.c.
15700 (set_command): New function.
15701 (unset_command): New function.
15702 (insmod_command): New function.
15703 (rmmod_command): New function.
15704 (lsmod_command): New function.
15705 (pupa_command_init): Don't initialize the command terminal
15706 anymore. Initialize the commands set, unset, insmod, rmmod and
15707 lsmod.
15708 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15709 (kernel_img_HEADERS): Add arg.h and env.h.
15710 (pupa_mkimage_LDFLAGS): Add kern/env.c.
15711 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15712 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15713 normal/arg.c.
15714 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15715 terminal.mod.
15716 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15717 (boot_mod_SOURCES): New variable.
15718 (terminal_mod_SOURCES): Likewise.
15719 (ls_mod_SOURCES): Likewise.
15720 (cmp_mod_SOURCES): Likewise.
15721 (cat_mod_SOURCES): Likewise.
15722
15723 * normal/arg.c: New file.
15724 * kern/env.c: Likewise.
15725 * include/pupa/arg.h: Likewise.
15726 * include/pupa/env.h: Likewise.
15727 * font/manager.c (font_command): Changed to match argument parsing
15728 interface changes.
15729 (PUPA_MOD_INIT): Likewise.
15730 * hello/hello.c (pupa_cmd_hello): Likewise.
15731 (PUPA_MOD_INIT): Likewise.
15732 * include/pupa/disk.h: Include <pupa/device.h>.
15733 (pupa_print_partinfo): New prototype.
15734 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15735 (pupa_dl_get_prefix): Likewise.
15736 * include/pupa/misc.h: Include <pupa/err.h>.
15737 (pupa_isgraph): New prototype.
15738 (pupa_isdigit): Likewise.
15739 (pupa_split_cmdline): Likewise.
15740 * include/pupa/normal.h: Include <pupa/arg.h>.
15741 (pupa_command): Changed the prototype of the member `func' to
15742 match the argument parsing interface. Added member `options'.
15743 (pupa_register_command): Updated to match function.
15744 (pupa_arg_parse): New prototype.
15745 (pupa_hello_init) [PUPA_UTIL]: New prototype.
15746 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
15747 (pupa_ls_init) [PUPA_UTIL]: Likewise.
15748 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
15749 (pupa_cat_init) [PUPA_UTIL]: Likewise.
15750 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
15751 (pupa_boot_init) [PUPA_UTIL]: Likewise.
15752 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
15753 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
15754 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
15755 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
15756 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
15757 * kern/disk.c: Include <pupa/file.h>.
15758 (pupa_print_partinfo): New function.
15759 * kern/dl.c: Include <pupa/env.h>.
15760 (pupa_dl_dir): Variable removed.
15761 (pupa_dl_load): Use the environment variable `prefix' instead of
15762 the variable pupa_dl_dir.
15763 (pupa_dl_set_prefix): Function removed.
15764 (pupa_dl_get_prefix): Likewise.
15765 * kern/i386/pc/init.c: Include <pupa/env.h>.
15766 (pupa_machine_init): Use the environment variable `prefix' instead of
15767 using pupa_dl_set_prefix to set the prefix.
15768 * kern/main.c: Include <pupa/env.h>.
15769 (pupa_set_root_dev): Use the environment variable `prefix' instead of
15770 using pupa_dl_get_prefix to get the prefix.
15771 * kern/misc.c: Include <pupa/env.h>.
15772 (pupa_isdigit): New function.
15773 (pupa_isgraph): Likewise.
15774 (pupa_ftoa): Likewise.
15775 (pupa_vsprintf): Added support for printing values of the type
15776 `double'. Make it possible to format variable output when using
15777 formatting like `%1.2%f'.
15778 (pupa_split_cmdline): New function.
15779 * kern/rescue.c: Include <pupa/env.h>.
15780 (next_word): Removed function.
15781 (pupa_rescue_cmd_prefix): Likewise.
15782 (pupa_rescue_cmd_set): New function.
15783 (pupa_rescue_cmd_unset): New function.
15784 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
15785 split the command line instead of splitting it here. Added
15786 support for setting variables using the syntax `foo=bar'. Don't
15787 initialize the prefix command anymore. Initialized the set and
15788 unset commands.
15789 * normal/cmdline.c: Include <pupa/env.h>.
15790 (pupa_tab_complete): Added prototypes for print_simple_completion,
15791 print_partition_completion, add_completion, iterate_commands,
15792 iterate_dev, iterate_part and iterate_dir. Moved code to print
15793 partition information from here to kern/disk.c.
fe6b695a 15794 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 15795 * normal/main.c: Include <pupa/env.h>.
15796 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
15797 instead of using pupa_dl_get_prefix to get the prefix.
15798 * term/i386/pc/vga.c: Include <pupa/arg.h>.
15799 (check_vga_mem): Cast pointers to `void *' to silence a gcc
15800 warning.
15801 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
15802 (pupa_vga_setcolor): Declare unused variables with `__attribute__
15803 ((unused))' to silence a gcc warning.
15804 (pupa_vga_setcolor): Likewise.
15805 (debug_command): Changed to match argument parsing
15806 interface changes.
15807 * util/pupa-emu.c: Include <pupa/env.h>.
15808 (options): Added 0's for unused fields to silence a gcc warning.
15809 (argp): Likewise.
15810 (main): Use the environment variable `prefix' instead of using
15811 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
15812 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
15813 and terminal.
15814
15815 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
15816 * util/misc.c: Include <malloc.h>.
15817 (pupa_malloc): Rewritten so errors are correctly reported.
15818 (pupa_realloc): Likewise.
15819 (pupa_memalign): Likewise.
15820 (pupa_mm_init_region): Declare unused variables with
15821 `__attribute__ ((unused))' to silence a gcc warning.
15822 * normal/i386/setjmp.S: Remove tab at the end of the file to
15823 silence a gcc warning.
15824 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
15825 variables with `__attribute__ ((unused))' to silence a gcc
15826 warning.
15827 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
15828 local variable i unsigned to silence a gcc warning.
15829
15830 * kern/term.c: Include <pupa/misc.h>.
15831 (pupa_more_lines): New variable.
15832 (pupa_more): Likewise.
15833 (pupa_putcode): When the pager is active pause at the end of every
15834 screen.
15835 (pupa_set_more): New function.
15836 * include/pupa/term.h (pupa_set_more): New prototype.
15837
15838
3b1139cb 158392004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
15840
15841 Now this project is GRUB 2 rather than PUPA. The location of
15842 the CVS repository was moved to GRUB's.
f19dbdb7 15843
3b1139cb 15844 * configure.ac: Use bug-grub as the reporting address.
15845 Use GRUB instead of PUPA.
15846 Change the version number to 1.90.
15847
8367695c 158482004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
15849
15850 * genkernsyms.sh: Updated copyright information.
15851 * genmk.rb: Likewise.
15852 * genmodsrc.sh: Likewise.
15853 * gensymlist.sh: Likewise.
15854 * boot/i386/pc/boot.S: Likewise.
15855 * boot/i386/pc/diskboot.S: Likewise.
15856 * disk/i386/pc/biosdisk.c: Likewise.
15857 * disk/i386/pc/partition.c: Likewise.
15858 * font/manager.c: Likewise.
15859 * fs/ext2.c: Likewise.
15860 * fs/fat.c: Likewise.
15861 * include/pupa/boot.h: Likewise.
15862 * include/pupa/device.h: Likewise.
15863 * include/pupa/disk.h: Likewise.
15864 * include/pupa/dl.h: Likewise.
15865 * include/pupa/elf.h: Likewise.
15866 * include/pupa/err.h: Likewise.
15867 * include/pupa/file.h: Likewise.
15868 * include/pupa/font.h: Likewise.
15869 * include/pupa/fs.h: Likewise.
15870 * include/pupa/kernel.h: Likewise.
15871 * include/pupa/loader.h: Likewise.
15872 * include/pupa/misc.h: Likewise.
15873 * include/pupa/mm.h: Likewise.
15874 * include/pupa/net.h: Likewise.
15875 * include/pupa/normal.h: Likewise.
15876 * include/pupa/rescue.h: Likewise.
15877 * include/pupa/setjmp.h: Likewise.
15878 * include/pupa/symbol.h: Likewise.
15879 * include/pupa/term.h: Likewise.
15880 * include/pupa/types.h: Likewise.
15881 * include/pupa/i386/setjmp.h: Likewise.
15882 * include/pupa/i386/types.h: Likewise.
15883 * include/pupa/i386/pc/biosdisk.h: Likewise.
15884 * include/pupa/i386/pc/boot.h: Likewise.
15885 * include/pupa/i386/pc/console.h: Likewise.
15886 * include/pupa/i386/pc/init.h: Likewise.
15887 * include/pupa/i386/pc/kernel.h: Likewise.
15888 * include/pupa/i386/pc/linux.h: Likewise.
15889 * include/pupa/i386/pc/loader.h: Likewise.
15890 * include/pupa/i386/pc/memory.h: Likewise.
15891 * include/pupa/i386/pc/multiboot.h: Likewise.
15892 * include/pupa/i386/pc/partition.h: Likewise.
15893 * include/pupa/i386/pc/time.h: Likewise.
15894 * include/pupa/i386/pc/vga.h: Likewise.
15895 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
15896 * include/pupa/util/getroot.h: Likewise.
15897 * include/pupa/util/misc.h: Likewise.
15898 * include/pupa/util/resolve.h: Likewise.
15899 * kern/device.c: Likewise.
15900 * kern/disk.c: Likewise.
15901 * kern/dl.c: Likewise.
15902 * kern/err.c: Likewise.
15903 * kern/file.c: Likewise.
15904 * kern/fs.c: Likewise.
15905 * kern/loader.c: Likewise.
15906 * kern/main.c: Likewise.
15907 * kern/misc.c: Likewise.
15908 * kern/mm.c: Likewise.
15909 * kern/rescue.c: Likewise.
15910 * kern/term.c: Likewise.
15911 * kern/i386/dl.c: Likewise.
15912 * kern/i386/pc/init.c: Likewise.
15913 * kern/i386/pc/lzo1x.S: Likewise.
15914 * kern/i386/pc/startup.S: Likewise.
15915 * loader/i386/pc/chainloader.c: Likewise.
15916 * loader/i386/pc/linux.c: Likewise.
15917 * loader/i386/pc/multiboot.c: Likewise.
15918 * normal/cmdline.c: Likewise.
15919 * normal/command.c: Likewise.
15920 * normal/main.c: Likewise.
15921 * normal/menu.c: Likewise.
15922 * normal/i386/setjmp.S: Likewise.
15923 * term/i386/pc/console.c: Likewise.
15924 * term/i386/pc/vga.c: Likewise.
15925 * util/console.c: Likewise.
15926 * util/genmoddep.c: Likewise.
15927 * util/misc.c: Likewise.
15928 * util/pupa-emu.c: Likewise.
15929 * util/resolve.c: Likewise.
15930 * util/unifont2pff.rb: Likewise.
15931 * util/i386/pc/biosdisk.c: Likewise.
15932 * util/i386/pc/getroot.c: Likewise.
15933 * util/i386/pc/pupa-mkimage.c: Likewise.
15934 * util/i386/pc/pupa-setup.c: Likewise.
15935
e6eced71 159362004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
15937
15938 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
15939 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
15940 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
15941 reading and reset it after reading.
15942 (pupa_ext2_close): Return PUPA_ERR_NONE.
15943
15944 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
15945 Correct value.
15946 (struct linux_kernel_header): Add kernel_version and
15947 initrd_addr_max.
15948 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
15949 pupa_file_read succeeds.
15950 (pupa_rescue_cmd_initrd): Implement.
15951
5aded270 159522003-12-03 Marco Gerards <metgerards@student.han.nl>
15953
15954 * fs/ext2.c (pupa_ext2_label): New function.
15955 (pupa_ext2_fs): Added label.
15956 * fs/fat.c (pupa_fat_label): New function.
15957 (pupa_fat_fs): Added label.
15958 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
15959
15960 * kern/misc.c (pupa_strndup): New function.
15961 * include/pupa/misc.h (pupa_strndup): New prototype.
15962
15963 * include/pupa/normal.h: Include <pupa/err.h>.
15964 (pupa_set_history): New prototype.
15965 (pupa_iterate_commands): New prototype.
15966 * normal/cmdline.c: Include <pupa/machine/partition.h>,
15967 <pupa/disk.h>, <pupa/file.h>.
15968 (hist_size): New variable.
15969 (hist_lines): Likewise.
15970 (hist_end): Likewise.
15971 (hist_used): Likewise.
15972 (pupa_set_history): New function.
15973 (pupa_history_get): Likewise.
15974 (pupa_history_add): Likewise.
15975 (pupa_history_replace): Likewise.
15976 (pupa_tab_complete): Likewise.
15977 (pupa_cmdline_run): Added tab completion and history buffer. Tab
15978 completion shows partitionnames while completing partitions, this
15979 feature was suggested by Jeff Bailey.
15980 * normal/command.c (pupa_iterate_commands): New function.
15981 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
15982 (pupa_normal_init): Initialize history buffer.
15983 (PUPA_MOD_INIT): Likewise.
15984 (pupa_normal_fini): Free the history buffer.
15985 (PUPA_MOD_FINI): Likewise.
15986
15987 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
15988 key.
15989
15990 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
15991 * configure.ac [i386]: Check for regparam bug.
15992 (NESTED_FUNC_ATTR) [! i386]: Defined.
15993
1f7315a3 159942003-11-17 Marco Gerards <metgerards@student.han.nl>
15995
15996 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
15997 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
15998 (pupa_emu_SOURCES): New variable.
15999 (pupa_emu_LDFLAGS): Likewise.
16000 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16001 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16002 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16003 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16004 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16005 (pupa_jmp_buf): New typedef.
16006 (pupa_setjmp) [PUPA_UTIL]: New macro.
16007 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16008 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16009 (pupa_refresh): New prototype.
16010 * include/pupa/util/getroot.h: New file.
16011 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16012 it.
16013 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16014 (pupa_rescue_cmd_cat): Likewise.
16015 (pupa_rescue_cmd_ls): Likewise.
16016 (pupa_rescue_cmd_testload): Likewise.
16017 (pupa_rescue_cmd_lsmod): Likewise.
16018 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16019 * normal/menu.c (run_menu): Likewise.
16020 * kern/term.c (pupa_cls): Likewise.
16021 (pupa_refresh): New function.
16022 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16023 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16024 * util/console.c: New file.
f19dbdb7 16025
1f7315a3 16026 * util/i386/pc/getroot.c: New file.
16027 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16028 (pupa_putchar): New function.
16029 (pupa_refresh): Likewise.
16030 (xgetcwd): Function moved to ...
16031 (strip_extra_slashes): Likewise.
16032 (get_prefix): Likewise.
f19dbdb7 16033 * util/i386/pc/getroot.c: ... here.
1f7315a3 16034 (find_root_device): Function moved and renamed to...
16035 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16036 Changed all callers.
16037 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16038 and renamed to...
16039 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16040 Changed all callers.
16041 * util/misc.c (pupa_memalign): New function.
16042 (pupa_mm_init_region): Likewise.
16043 (pupa_register_exported_symbols): Likewise.
16044 (pupa_putchar): Function removed.
16045 * util/pupa-emu.c: New file.
16046
9a5c1ade 160472003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16048
16049 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16050 (_multiboot_mod_SOURCES): New variable.
16051 (_multiboot_mod_CFLAGS): Likewise.
16052 * loader/i386/pc/multiboot.c: New file.
16053 * include/pupa/i386/pc/multiboot.h: Likewise.
16054 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16055 (pupa_multiboot_real_boot): New function.
16056 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16057 (pupa_multiboot_real_boot): New prototype.
16058 (pupa_rescue_cmd_multiboot): Likewise
16059 (pupa_rescue_cmd_module): Likewise.
16060
16061 * kern/loader.c (pupa_loader_set): Continue when
16062 pupa_loader_unload_func() fails.
16063 (pupa_loader_unset): New function.
16064 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16065
16066 * kern/misc.c (pupa_stpcpy): New function.
16067 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16068
8e72a9c0 160692003-11-12 Marco Gerards <metgerards@student.han.nl>
16070
16071 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16072 for available extensions.
16073
16074 * include/pupa/i386/pc/time.h: New file.
16075 * kern/disk.c: Include <pupa/machine/time.h>.
16076 (PUPA_CACHE_TIMEOUT): New macro.
16077 (pupa_last_time): New variable.
16078 (pupa_disk_open): Flush the cache when there was a timeout.
16079 (pupa_disk_close): Reset the timer.
16080 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16081 pupa_currticks.
16082 * util/misc.c: Include <sys/times.h>
16083 (pupa_get_rtc): New function.
16084
c4adbd32 160852003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16086
16087 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16088 as blocks.
16089 (pupa_ext2_get_file_block): Use blocks member.
16090
16091 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16092 first block. Return -1 instead of pupa_errno on error.
16093
bfd30f06 160942003-10-27 Marco Gerards <metgerards@student.han.nl>
16095
16096 * README: In the pupa-mkimage example use _chain instead of chain
16097 and ext2 instead of fat.
16098 * TODO: Replace ext2fs with jfs as an example. Add an item for
16099 adding journal playback for ext2fs.
16100 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16101 (pkgdata_MODULES): Added ext2.mod.
16102 (ext2_mod_SOURCES): New variable.
16103 (ext2_mod_CFLAGS): Likewise.
16104 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16105 * include/pupa/misc.h (pupa_strncpy): New prototype.
16106 (pupa_strcat): Likewise.
16107 (pupa_strncmp): Likewise.
16108 * kern/misc.c (pupa_strcat): Enable function.
16109 (pupa_strncpy): New function.
16110 (pupa_strncmp): Likewise.
16111 * fs/ext2.c: New file.
f19dbdb7 16112
bfd30f06 16113 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16114 when the read failed before retrying.
16115 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16116 (_FILE_OFFSET_BITS): Likewise.
16117 * configure.ac: Added AC_SYS_LARGEFILE.
16118
98d15063 161192003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16120
16121 * genmk.rb (PModule#rule): Make sure to get only symbol names
16122 from the output of nm.
16123 Reported by Robert Millan <zeratul2@wanadoo.es>.
16124
18d9c7cd 161252003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16126
16127 I forgot to check in these changes for a long time. This adds
16128 incomplete support for VGA console, and this is still very
16129 buggy. Also, a lot of consideration is required for I18N,
16130 UNICODE, and VGA font issues. Therefore, assume that this is
16131 such that "better than nothing".
f19dbdb7 16132
18d9c7cd 16133 * font/manager.c: New file.
16134 * include/pupa/font.h: Likewise.
16135 * include/pupa/i386/pc/vga.h: Likewise.
16136 * term/i386/pc/vga.c: Likewise.
16137 * util/unifont2pff.rb: Likewise.
16138
16139 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16140 (pkgdata_MODULES): Added vga.mod and font.mod.
16141 (vga_mod_SOURCES): New variables.
16142 (vga_mod_CFLAGS): Likewise.
16143 (font_mod_SOURCES): Likewise.
16144 (font_mod_CFLAGS): Likewise.
16145
16146 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16147
16148 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 16149 (struct pupa_term): Added init and fini.
18d9c7cd 16150 Changed the argument of putchar to pupa_uint32_t.
16151
16152 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16153 (pupa_console_real_putchar): New prototype.
16154 (pupa_console_putchar): Removed.
16155 (pupa_console_checkkey): Exported.
16156 (pupa_console_getkey): Likewise.
16157
16158 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16159 characters.
16160
16161 * kern/term.c (pupa_term_set_current): Rewritten.
16162 (pupa_putchar): Likewise.
16163 (pupa_putcode): New function.
16164
16165 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16166 (pupa_console_real_putchar): ... this.
16167 (pupa_vga_set_mode): New function.
16168 (pupa_vga_get_font): Likewise.
16169
16170 * normal/command.c: Include pupa/term.h.
16171 (terminal_command): New function.
16172 (pupa_command_init): Register the command "terminal".
16173
16174 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16175 (DISP_UP): Likewise.
16176 (DISP_RIGHT): Likewise.
16177 (DISP_DOWN): Likewise.
16178 (DISP_HLINE): Likewise.
16179 (DISP_VLINE): Likewise.
16180 (DISP_UL): Likewise.
16181 (DISP_UR): Likewise.
16182 (DISP_LL): Likewise.
16183 (DISP_LR): Likewise.
16184
16185 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 16186
977329f5 161872003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16188
16189 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16190 FIX. Reverse the path_list.
16191
16192 * include/pupa/normal.h: Export pupa_register_command and
16193 pupa_unregister_command.
16194
16195 * hello/hello.c (pupa_cmd_hello): New module.
16196 * conf/i386-pc.rmk: Added hello.mod.
16197
1f5ab428 161982003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16199
16200 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 16201
1f5ab428 16202 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16203 (compress_kernel): New variable.
16204 (generate_image): Heavily modified to support compressing a
16205 large part of the core image.
16206
16207 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16208 leak.
16209 (pupa_util_load_image): New function.
16210
16211 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16212 (pupa_compressed_size): New variable.
16213 (codestart): Enable Gate A20 here.
16214 Decompress the compressed part of the core image.
16215 Rearrange the code to put functions and variables which are
16216 required for initialization in the non-compressed part.
16217 Include lzo1x.S.
16218
16219 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16220 here.
16221
16222 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16223
f19dbdb7 16224 * include/pupa/i386/pc/kernel.h
1f5ab428 16225 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16226 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16227 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16228 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16229 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16230
16231 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16232
16233 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16234 (Utility#rule): Likewise.
16235
16236 * configure.ac: Check if LZO is available.
16237
ce5bf700 162382003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16239
16240 * include/pupa/normal.h: New file.
16241 * include/pupa/setjmp.h: Likewise.
16242 * include/pupa/i386/setjmp.h: Likewise.
16243 * normal/cmdline.c: Likewise.
16244 * normal/command.c: Likewise.
16245 * normal/main.c: Likewise.
16246 * normal/menu.c: Likewise.
16247 * normal/i386/setjmp.S: Likewise.
f19dbdb7 16248
ce5bf700 16249 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16250 (pupa_rescue_cmd_initrd): Likewise.
16251
16252 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16253 Likewise.
16254
16255 * kern/i386/pc/startup.S (translation_table): New variable.
16256 (translate_keycode): New function.
16257 (pupa_console_getkey): Call translate_keycode.
16258
16259 * kern/rescue.c (attempt_normal_mode): New function.
16260 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16261 it failed, print a message.
16262
16263 * kern/mm.c (pupa_real_malloc): Print more information when a
16264 free magic is broken.
16265 (pupa_free): If the first free header is not free actually, set
16266 it to P.
16267
16268 * kern/main.c (pupa_load_normal_mode): Just load the module
16269 "normal".
16270 (pupa_main): Don't print the message
16271 "Entering into rescue mode..." here.
16272
16273 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16274 Declared.
16275 (pupa_rescue_cmd_initrd): Likewise.
16276 (pupa_rescue_cmd_initrd): Likewise.
16277
16278 * include/pupa/symbol.h (FUNCTION): Specify the type.
16279 (VARIABLE): Likewise.
16280
16281 * include/pupa/err.h (pupa_err_t): Added
16282 PUPA_ERR_UNKNOWN_COMMAND.
16283
16284 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16285 (pupa_dl_get_prefix): Likewise.
16286
16287 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16288 Added _chain.mod and _linux.mod instead of chain.mod and
16289 linux.mod.
16290 (chain_mod_SOURCES): Renamed to ...
16291 (_chain_mod_SOURCES): ... this.
16292 (chain_mod_CFLAGS): Renamed to ...
16293 (_chain_mod_CFLAGS): ... this.
16294 (linux_mod_SOURCES): Renamed to ...
16295 (_linux_mod_SOURCES): ... this.
16296 (linux_mod_CFLAGS): Renamed to ...
16297 (_linux_mod_CFLAGS): ... this.
16298 (normal_mod_SOURCES): New variable.
16299 (normal_mod_CFLAGS): Likewise.
16300 (normal_mod_ASFLAGS): Likewise.
16301
163022003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
16303
16304 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16305 possible.
16306
fe6b695a 16307 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 16308 recursively.
16309 (pupa_dl_unref): Unrefer depending modules recursively.
16310 Don't call pupa_dl_unload implicitly, because PUPA can crash if
16311 a module is unloaded before one depending on that module is
16312 unloaded.
16313 (pupa_dl_unload): Unload depending modules explicitly,
16314 if possible.
16315
c04da074 163162003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
16317
16318 * include/pupa/i386/pc/linux.h: New file.
16319 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 16320
c04da074 16321 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16322 Removed.
16323 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16324 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16325 of PUPA_CHAINLOADER_BOOT_SECTOR.
16326
16327 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16328 (pupa_linux_prot_size): New variable.
16329 (pupa_linux_tmp_addr): Likewise.
16330 (pupa_linux_real_addr): Likewise.
16331 (pupa_linux_boot_zimage): New function.
16332 (pupa_linux_boot_bzimage): Likewise.
16333
16334 * kern/i386/pc/init.c (struct mem_region): New structure.
16335 (MAX_REGIONS): New macro.
16336 (mem_regions): New variable.
16337 (num_regions): Likewise.
16338 (pupa_os_area_addr): Likewise.
16339 (pupa_os_area_size): Likewise.
16340 (pupa_lower_mem): Likewise.
16341 (pupa_upper_mem): Likewise.
16342 (add_mem_region): New function.
16343 (compact_mem_regions): Likewise.
16344 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16345 the size of the conventional memory and that of so-called upper
16346 memory (before the first memory hole).
16347 Instead of adding each found region to free memory, use
16348 add_mem_region and add them after removing overlaps.
16349 Also, add only 1/4 of the upper memory to free memory. The rest
16350 is used for loading OS images. Maybe this is ad hoc, but this
16351 makes it much easier to relocate OS images when booting.
16352
16353 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16354 (pupa_enter_rescue_mode): Don't register initrd and module.
16355
16356 * kern/mm.c: Include pupa/dl.h.
16357
16358 * kern/main.c: Include pupa/file.h and pupa/device.h.
16359
16360 * kern/loader.c (pupa_loader_load_module_func): Removed.
16361 (pupa_loader_load_module): Likewise.
16362
16363 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16364 ``.o''.
16365
16366 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16367 (pupa_linux_tmp_addr): Likewise.
16368 (pupa_linux_real_addr): Likewise.
16369 (pupa_linux_boot_zimage): Likewise.
16370 (pupa_linux_boot_bzimage): Likewise.
16371
16372 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16373 (pupa_upper_mem): Likewise.
16374 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16375 module is too dangerous.
16376
16377 * include/pupa/loader.h (pupa_os_area_addr): Declared.
16378 (pupa_os_area_size): Likewise.
16379 (pupa_loader_set): Remove the first argument. Loader doesn't
16380 manage modules or initrd any longer.
16381 (pupa_loader_load_module): Removed.
16382
16383 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16384 (linux_mod_SOURCES): New variable.
16385 (linux_mod_CFLAGS): Likewise.
16386
a13f9237 163872003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
16388
16389 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16390 the length of a blocklist correctly.
16391
16392 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16393 Use ioctl only if the OS file is a block device.
16394 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16395 not very useful for normal files.
16396
16397 * kern/main.c (pupa_set_root_dev): New function.
16398 (pupa_load_normal_mode): Likewise.
16399 (pupa_main): Call those above.
16400
16401 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16402 pupa_uint16_t.
16403
16404 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16405
a5ffe966 164062003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
16407
16408 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16409 (setup): Configure the installed partition information and the
16410 dl prefix.
16411
16412 * loader/i386/pc/chainloader.c (my_mod): New variable.
16413 (pupa_chainloader_unload): New function.
16414 (pupa_rescue_cmd_chainloader): Refer itself.
16415 (PUPA_MOD_INIT): Save its own module in MY_MOD.
16416
16417 * kern/i386/pc/startup.S (install_partition): Removed.
16418 (version_string): Likewise.
16419 (config_file): Likewise.
16420 (pupa_install_dos_part): New variable.
16421 (pupa_install_bsd_part): Likewise.
16422 (pupa_prefix): Likewise.
16423 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16424
16425 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16426 and pupa/misc.h.
16427 (make_install_device): New function.
16428 (pupa_machine_init): Set the dl prefix.
16429
16430 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16431 (buf): Renamed to ...
16432 (linebuf): ... this.
16433 (pupa_rescue_cmd_prefix): New function.
16434 (pupa_rescue_cmd_insmod): Likewise.
16435 (pupa_rescue_cmd_rmmod): Likewise.
16436 (pupa_rescue_cmd_lsmod): Likewise.
16437 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16438 rmmod and lsmod.
16439
16440 * kern/mm.c (pupa_memalign): If failed even after invalidating
16441 disk caches, unload unneeded modules and retry.
16442
16443 * kern/misc.c (pupa_memmove): New function.
16444 (pupa_memcpy): Removed.
16445 (pupa_strcpy): New function.
16446 (pupa_itoa): Made static.
16447
16448 * kern/dl.c (pupa_dl_iterate): New function.
16449 (pupa_dl_ref): Likewise.
16450 (pupa_dl_unref): Likewise.
16451 (pupa_dl_unload): Return if succeeded or not.
16452 (pupa_dl_unload_unneeded): New function.
16453 (pupa_dl_unload_all): Likewise.
16454 (pupa_dl_init): Renamed to ...
16455 (pupa_dl_set_prefix): ... this.
16456 (pupa_dl_get_prefix): New function.
16457
16458 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16459 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16460 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16461 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16462 (pupa_install_dos_part): Declared.
16463 (pupa_install_bsd_part): Likewise.
16464 (pupa_prefix): Likewise.
16465 (pupa_boot_drive): Likewise.
16466
16467 * include/pupa/types.h: Fix a typo.
16468
16469 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16470 pupa_memmove.
16471 (pupa_memmove): Declared.
16472 (pupa_strcpy): Likewise.
16473
16474 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16475 pupa_mod_init takes one argument, its own module.
16476 (pupa_dl_unload_unneeded): Declared.
16477 (pupa_dl_unload_all): Likewise.
16478 (pupa_dl_ref): Likewise.
16479 (pupa_dl_unref): Likewise.
16480 (pupa_dl_iterate): Likewise.
16481 (pupa_dl_init): Renamed to ...
16482 (pupa_dl_set_prefix): ... this.
16483 (pupa_dl_get_prefix): Declared.
16484
16485 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 16486 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 16487 unloaded.
16488 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16489 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16490
16491 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16492 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16493
012d7999 164942003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16495
16496 * util/i386/pc/pupa-setup.c (setup): Define the internal
16497 function find_first_partition_start at the top level, because GCC
16498 3.0.x cannot compile internal functions in deeper scopes
16499 correctly.
16500 (find_root_device): Use lstat instead of stat.
16501 Don't follow symbolic links.
16502 Fix the path-constructing code.
16503
16504 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16505 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16506 by a BLKGETSIZE ioctl first, because block devices don't fill
16507 the member st_mode of the structure stat on Linux.
16508 [__linux__] (linux_find_partition): Use a temporary buffer
16509 REAL_DEV for the working space. Copy it to DEV before returning.
16510 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16511 buffer cache consistent.
16512 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16513 strncmp. The previous value was merely wrong.
16514 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16515
16516 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16517 FAT size is 12. The previous value was merely wrong.
16518
16519 * kern/main.c (pupa_main): Don't split the starting message from
16520 newlines.
16521
16522 * kern/term.c (pupa_putchar): Put CR after LF instead of before
16523 LF, because BIOS goes crazy about character attributes in this
16524 case.
16525
1cc73a62 165262003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16527
16528 * include/i386/pc/util/biosdisk.h: New file.
16529 * util/i386/pc/biosdisk.c: Likewise.
16530 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 16531
1cc73a62 16532 * Makefile.in (INCLUDE_DISTFILES): Added
16533 include/pupa/i386/pc/util/biosdisk.h.
16534 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16535 directory util/i386/pc.
16536 (install-local): Added a rule for sbin_UTILITIES.
16537 (uninstall): Likewise.
16538
16539 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16540
16541 * util/misc.c (xrealloc): New function.
16542 (pupa_malloc): Likewise.
16543 (pupa_free): Likewise.
16544 (pupa_realloc): Likewise.
16545 (pupa_stop): Likewise.
16546 (pupa_putchar): Likewise.
16547
16548 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16549
16550 * include/pupa/util/misc.h (xrealloc): Declared.
16551
16552 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16553 macro.
16554 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16555 (PUPA_BOOT_MACHINE_BPB_END): ... this.
16556
16557 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16558 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16559
16560 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16561 way should be implemented.
16562 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16563
16564 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16565 the size of NAME for safety.
16566 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16567 0x88.
16568
16569 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16570 (pupa_setup_SOURCES): Likewise.
16571
16572 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16573
08b70fe8 165742002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16575
16576 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16577 bunch of pushl's from pusha, because this destroys the return
16578 value.
16579
62ddcc8f 165802002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16581
16582 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16583 This means that any missing prototypes could be fatal. Also, you
16584 must take care when writing assembly code. See the comments at
16585 the beginning of startup.S, for more details.
f19dbdb7 16586
62ddcc8f 16587 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16588 compilation mechanism.
16589 (pupa_chainloader_real_boot): Likewise.
16590 (pupa_biosdisk_rw_int13_extensions): Likewise.
16591 (pupa_biosdisk_rw_standard): Likewise.
16592 (pupa_biosdisk_check_int13_extensions): Likewise.
16593 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16594 (pupa_biosdisk_get_diskinfo_standard): Likewise.
16595 (pupa_get_memsize): Likewise.
16596 (pupa_get_mmap_entry): Likewise.
16597 (pupa_console_putchar): Likewise.
16598 (pupa_console_setcursor): Likewise.
16599 (pupa_getrtsecs): Use pushl instead of push.
16600
16601 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16602 memory instead of the stack for a mmap entry, because some
16603 BIOSes may ignore the maximum size and overflow.
16604
16605 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16606
16607 * genmk.rb (PModule#rule): Compile automatically generated
16608 sources with module-specific CFLAGS as well as other sources.
16609
9962ed99 166102002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16611
16612 * configure.ac: Check ld.
16613 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16614 respectively, before checking endianness and sizes.
16615
16616 * Makefile.in (LD): New variable.
f19dbdb7 16617
abdfc3c5 166182002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16619
16620 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16621
6a161fa9 166222002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16623
16624 * Changelog: New file.
16625