]> git.proxmox.com Git - grub2.git/blame - ChangeLog
ident
[grub2.git] / ChangeLog
CommitLineData
33db9015 12009-05-18 Colin D Bennett <colin@gibibit.com>
2
3 Display error messages when parsing a Lua statement fails. Previously,
4 executing a syntactically invalid statement like ")foo" or "bar;" would
5 silently fail.
6
7 * script/lua/grub_main.c (handle_lua_error): New function.
8 (grub_lua_parse_line): Improved reporting of Lua parser and execution
9 errors.
10
46422c89 112009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
12
13 Remove -Werror which causes build to fail on some systems
14
15 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
16 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
17 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 18
22f53a96 192009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
20
21 trampoline for linux on 64-bit platform
22
18f547ad 23 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
24 loader/i386/efi/linux_trampoline.S
25 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
22f53a96 26 declration
27 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from here
28 * loader/i386/linux_trampoline.S: moved here
29 * loader/i386/efi/linux.c (allocate_pages): reserve space for trampoline
30 (jumpvector): removed
31 (grub_linux_trampoline_start): new declaration
32 (grub_linux_trampoline_end): likewise
33 (grub_linux_boot): use trampoline when on 64-bit platform
34 * loader/i386/linux.c: likewise
35
cb5a0f40 362009-05-16 Pavel Roskin <proski@gnu.org>
37
38 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
39 const to avoid a warning.
40 (grub_lua_setenv): Likewise.
41 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
42 lmsg to fix a warning.
43
334f2c28 442009-05-16 Felix Zielcke <fzielcke@z-51.de>
45
46 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 47 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
48 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
49 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
50 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
51 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
52 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
53 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 54
59e5d3ec 552009-05-16 Felix Zielcke <fzielcke@z-51.de>
56
57 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
58
9d87a1ba 592009-05-16 Bean <bean123ch@gmail.com>
60
61 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
62 (lua_mod_SOURCES): New variable.
63 (lua_mod_CFLAGS): Likewise.
64 (lua_mod_LDFLAGS): Likewise.
65
66 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
67 (setjmp_mod_SOURCES): New variable.
68 (setjmp_mod_CFLAGS): Likewise.
69 (setjmp_LDFLAGS): Likewise.
70
71 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
72 (setjmp_mod_SOURCES): New variable.
73 (setjmp_mod_CFLAGS): Likewise.
74 (setjmp_LDFLAGS): Likewise.
75
76 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
77 (setjmp_mod_SOURCES): New variable.
78 (setjmp_mod_CFLAGS): Likewise.
79 (setjmp_LDFLAGS): Likewise.
80
81 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
82 (setjmp_mod_SOURCES): New variable.
83 (setjmp_mod_CFLAGS): Likewise.
84 (setjmp_LDFLAGS): Likewise.
85
86 * normal/i386/setjmp.S: Moved from here ...
87 * lib/i386/setjmp.S: ... Moved here
88 * normal/x86_64/setjmp.S: Moved from here ...
89 * lib/x86_64/setjmp.S: ... Moved here
90 * normal/powerpc/setjmp.S: Moved from here ...
91 * lib/powerpc/setjmp.S: ... Moved here
92 * normal/sparc64/setjmp.S: Moved from here ...
93 * lib/sparc64/setjmp.S: ... Moved here
94
95 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
96 returns_twice in mingw.
97
98 * script/lua/grub_lib.c: New file.
99 * script/lua/grub_lib.h: Likewise.
100 * script/lua/grub_lua.h: Likewise.
101 * script/lua/grub_main.c: Likewise.
102 * script/lua/lapi.c: Likewise.
103 * script/lua/lapi.h: Likewise.
104 * script/lua/lauxlib.c: Likewise.
105 * script/lua/lauxlib.h: Likewise.
106 * script/lua/lbaselib.c: Likewise.
107 * script/lua/lcode.c: Likewise.
108 * script/lua/lcode.h: Likewise.
109 * script/lua/ldblib.c: Likewise.
110 * script/lua/ldebug.c: Likewise.
111 * script/lua/ldebug.h: Likewise.
112 * script/lua/ldo.c: Likewise.
113 * script/lua/ldo.h: Likewise.
114 * script/lua/ldump.c: Likewise.
115 * script/lua/lfunc.c: Likewise.
116 * script/lua/lfunc.h: Likewise.
117 * script/lua/lgc.c: Likewise.
118 * script/lua/lgc.h: Likewise.
119 * script/lua/linit.c: Likewise.
120 * script/lua/liolib.c: Likewise.
121 * script/lua/llex.c: Likewise.
122 * script/lua/llex.h: Likewise.
123 * script/lua/llimits.h: Likewise.
124 * script/lua/lmathlib.c: Likewise.
125 * script/lua/lmem.c: Likewise.
126 * script/lua/lmem.h: Likewise.
127 * script/lua/loadlib.c: Likewise.
128 * script/lua/lobject.c: Likewise.
129 * script/lua/lobject.h: Likewise.
130 * script/lua/lopcodes.c: Likewise.
131 * script/lua/lopcodes.h: Likewise.
132 * script/lua/loslib.c: Likewise.
133 * script/lua/lparser.c: Likewise.
134 * script/lua/lparser.h: Likewise.
135 * script/lua/lstate.c: Likewise.
136 * script/lua/lstate.h: Likewise.
137 * script/lua/lstring.c: Likewise.
138 * script/lua/lstring.h: Likewise.
139 * script/lua/lstrlib.c: Likewise.
140 * script/lua/ltable.c: Likewise.
141 * script/lua/ltable.h: Likewise.
142 * script/lua/ltablib.c: Likewise.
143 * script/lua/ltm.c: Likewise.
144 * script/lua/ltm.h: Likewise.
145 * script/lua/lua.h: Likewise.
146 * script/lua/luaconf.h: Likewise.
147 * script/lua/lualib.h: Likewise.
148 * script/lua/lundump.c: Likewise.
149 * script/lua/lundump.h: Likewise.
150 * script/lua/lvm.c: Likewise.
151 * script/lua/lvm.h: Likewise.
152 * script/lua/lzio.c: Likewise.
153 * script/lua/lzio.h: Likewise.
154
5e898c9d 1552009-05-16 Bean <bean123ch@gmail.com>
156
157 * include/grub/kernel.h (grub_module_header_types): Add type
158 OBJ_TYPE_CONFIG.
159
160 * kern/main.c (grub_load_config): New function.
161 (grub_main): Call grub_load_config to read boot config.
162
163 * grub-mkimage (generate_image): New parameter config_path.
164 (options): New option --config.
165 (main): Parse --config option, and pass it to generate_image.
166
cf353a47 1672009-05-14 Christian Franke <franke@computer.org>
168
169 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
170 This fixes build on Cygwin.
171
3834887f 1722009-05-14 Pavel Roskin <proski@gnu.org>
173
174 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
175 jump. This saves two bytes, so the typical case of 2 swapped
176 drives would fit 32 bytes.
177
8090fc01 1782009-05-13 Pavel Roskin <proski@gnu.org>
179
ac963883 180 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
181 grub_uint32_t to avoid a warning.
182
8090fc01 183 * loader/i386/linux.c (allocate_pages): When assigning
184 real_mode_mem, cast through grub_size_t to fix a warning. The
185 code already makes sure that the value would fit a pointer.
186 (grub_linux_setup_video): Cast render_target->data to
187 grub_size_t to fix a warning.
188
18f547ad 1892009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 190
191 * commands/i386/pc/drivemap.c: New file - implement drivemap
192 command.
193 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
194 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
195
6f6a8b28 1962009-05-13 Pavel Roskin <proski@gnu.org>
197
198 * util/i386/pc/grub-setup.c (setup): Remove unused variable
199 embedding_area_exists.
200
15fbf4c4 2012009-05-13 Robert Millan <rmh.grub@aybabtu.com>
202
203 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
204 it easier to understand / work with.
59978c8a 205 Improve warning messages for cases where there's no embedding area,
206 or when it is too small (or core.img too large).
15fbf4c4 207
238e871f 2082009-05-13 Pavel Roskin <proski@gnu.org>
209
0ab3a9a4 210 * loader/i386/pc/multiboot2.c: Add necessary includes for
211 grub_multiboot2_real_boot().
212
a2c8c5f8 213 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
214 PX record is always little-endian. We only need the lower 2
215 bytes of the mode.
216
faec96af 217 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
218 facilitate code reuse.
219 (grub_cpio_mount): Use "struct head", not a char buffer. This
220 fixes a warning reported by gcc 4.4.
221
238e871f 222 * kernel/disk.c (grub_disk_read): Use void pointer for the
223 buffer.
224 (grub_disk_write): Use const void pointer for the buffer.
225 Adjust all callers. Remove unnecessary casts.
226
901d2f0c 2272009-05-10 Robert Millan <rmh.grub@aybabtu.com>
228
229 * util/i386/pc/grub-install.in: Update copyright year.
230
18f547ad 2312009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 232
233 gptsync
234
235 * commands/gptsync.c: new file
236 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
237 (gptsync_mod_SOURCES): new variable
238 (gptsync_mod_CFLAGS): likewise
239 (gptsync_mod_LDFLAGS): likewise
18f547ad 240 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 241 new definition
242 (GRUB_PC_PARTITION_TYPE_HFS): likewise
243 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
244 * conf/i386-ieee1275.rmk: likewise
245 * conf/i386-pc.rmk: likewise
246 * conf/powerpc-ieee1275.rmk: likewise
247
b4ba690a 2482009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
249
250 Fixed grub-emu
251
252 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
253 (grub_dl_ref): likewise
254
317e1a44 2552009-05-08 Robert Millan <rmh.grub@aybabtu.com>
256
257 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
258 split in two functions (one for msdos and one for gpt).
259
041b8094 2602009-05-08 Pavel Roskin <proski@gnu.org>
261
752473c2 262 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
263 not modified.
264
041b8094 265 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
266 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
267 Initialize them with -1. Add sanity check for bad1. Eliminate
268 nerr variable.
269
172800ce 2702009-05-08 David S. Miller <davem@davemloft.net>
271
272 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
273
29aa5e81 2742009-05-06 Robert Millan <rmh.grub@aybabtu.com>
275
276 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
277 existance.
278
96613b62 2792009-05-05 Felix Zielcke <fzielcke@z-51.de>
280
281 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 282 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 283
eef73c8a 2842009-05-05 David S. Miller <davem@davemloft.net>
285
286 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
287
119494b5 2882009-05-05 Pavel Roskin <proski@gnu.org>
289
290 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
291 of grub_dl_ref() and grub_dl_unref().
292 * commands/parttool.c: Remove preprocessor conditionals around
293 grub_dl_ref() and grub_dl_unref().
294 * fs/affs.c: Likewise.
295 * fs/afs.c: Likewise.
296 * fs/cpio.c: Likewise.
297 * fs/ext2.c: Likewise.
298 * fs/fat.c: Likewise.
299 * fs/hfs.c: Likewise.
300 * fs/hfsplus.c: Likewise.
301 * fs/iso9660.c: Likewise.
302 * fs/jfs.c: Likewise.
303 * fs/minix.c: Likewise.
304 * fs/ntfs.c: Likewise.
305 * fs/reiserfs.c: Likewise.
306 * fs/sfs.c: Likewise.
307 * fs/udf.c: Likewise.
308 * fs/ufs.c: Likewise.
309 * fs/xfs.c: Likewise.
310 * include/grub/dl.h: Likewise.
311 * loader/xnu.c: Likewise.
312
de5fd76e 3132009-05-04 Pavel Roskin <proski@gnu.org>
314
315 * commands/acpi.c: Remove unused variable my_mod.
316 * partmap/amiga.c: Likewise.
317 * partmap/apple.c: Likewise.
318 * partmap/gpt.c: Likewise.
319 * partmap/pc.c: Likewise.
320 * partmap/sun.c: Likewise.
321 * term/gfxterm.c: Likewise.
322 * term/i386/pc/vesafb.c: Likewise.
323 * term/i386/pc/vga.c: Likewise.
324
983598ad 3252009-05-04 David S. Miller <davem@davemloft.net>
326
327 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
328 pointer args to grub_ieee1275_get_property().
329
8aadec43 330 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
331
9554b15e 332 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
333 devices, and do not traverse down under controller nodes.
334
67e23c90 335 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
336 (grub_ofdisk_open): Use it to un-escape "," characters.
337 * kern/disk.c (find_part_sep): New.
338 (grub_disk_open): Use it to find the first non-escaped ','
339 character in the disk name.
340 * util/ieee1275/devicemap.c (escape_of_path): New.
341 (grub_util_emit_devicemap_entry): Use it.
342 * util/sparc64/ieee1275/grub-install.in: Update script to
343 strip partition specifiers properly by not triggering on
344 '\' escaped ',' characters.
345
74bfdd2f 3462009-05-04 Robert Millan <rmh.grub@aybabtu.com>
347
348 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
349 to 0x300.
350 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
351 resolutions.
352 (linux_vesafb_modes): Add a lot of additional modes to the list (based
353 on documentation from Wikipedia).
354
4241d2b1 3552009-05-04 Pavel Roskin <proski@gnu.org>
356
357 * disk/ata.c: Spelling fixes.
358 * disk/raid.c: Likewise.
359 * disk/usbms.c: Likewise.
360 * disk/dmraid_nvidia.c: Likewise.
361 * kern/ieee1275/openfw.c: Likewise.
362 * kern/ieee1275/init.c: Likewise.
363 * kern/ieee1275/cmain.c: Likewise.
364 * boot/i386/pc/cdboot.S: Likewise.
365 * video/readers/png.c: Likewise.
366 * video/i386/pc/vbe.c: Likewise.
367 * fs/udf.c: Likewise.
368 * fs/hfs.c: Likewise.
369 * fs/reiserfs.c: Likewise.
370 * efiemu/runtime/efiemu.c: Likewise.
371 * efiemu/main.c: Likewise.
372 * efiemu/mm.c: Likewise.
373 * include/grub/elf.h: Likewise.
374 * include/grub/xnu.h: Likewise.
375 * include/grub/usbdesc.h: Likewise.
376 * include/grub/usb.h: Likewise.
377 * include/grub/script_sh.h: Likewise.
378 * include/grub/lib/LzmaEnc.h: Likewise.
379 * include/grub/efiemu/efiemu.h: Likewise.
380 * include/grub/command.h: Likewise.
381 * normal/menu.c: Likewise.
382 * normal/main.c: Likewise.
383 * normal/datetime.c: Likewise.
384 * bus/usb/uhci.c: Likewise.
385 * mmap/i386/uppermem.c: Likewise.
386 * mmap/mmap.c: Likewise.
387 * commands/acpi.c: Likewise.
388 * commands/test.c: Likewise.
389 * partmap/apple.c: Likewise.
390 * font/font.c: Likewise.
391 * loader/sparc64/ieee1275/linux.c: Likewise.
392 * loader/macho.c: Likewise.
393 * loader/i386/bsd_trampoline.S: Likewise.
394 * loader/i386/bsd.c: Likewise.
395 * loader/xnu.c: Likewise.
396 * term/i386/pc/vesafb.c: Likewise.
397 * term/usb_keyboard.c: Likewise.
398 * util/resolve.c: Likewise.
399 * util/getroot.c: Likewise.
400
0cfc0083 4012009-05-04 Felix Zielcke <fzielcke@z-51.de>
402
403 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
404
7c1d00cd 4052009-05-04 Robert Millan <rmh.grub@aybabtu.com>
406
407 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
408 build error.
409
b01f0548 4102009-05-04 Robert Millan <rmh.grub@aybabtu.com>
411
412 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
413 parameter only available on BIOS.
414
ecc3eb22 4152009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
416
417 Removed wrong semicolon in declaration
418
419 * grub/misc.h (grub_dprintf): remove semicolon
420
112972a9 4212009-05-04 Robert Millan <rmh.grub@aybabtu.com>
422
423 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
424 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
425 is done by grub_cmd_linux() now).
426 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
427 restore video to text mode.
428 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
429 indicates lack of "vga=" parameter. "vga=0" is mapped to
430 `GRUB_LINUX_VID_MODE_NORMAL'.
431
afd5c115 4322009-05-04 Felix Zielcke <fzielcke@z-51.de>
433
434 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
435 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
436 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 437 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 438 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
439 `grub_script.tab.c'.
440
441 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
442 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
443 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
444 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
445 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
446
faa517ce 447 * Makefile.in: Remove duplicated 2008 in Copyright line.
448
ae0c0bdc 4492009-05-04 Robert Millan <rmh.grub@aybabtu.com>
450
451 * util/misc.c (grub_util_warn): New function. Emmits a warning
452 unconditionally.
453 * include/grub/util/misc.h (grub_util_warn): New declaration.
454
455 * util/i386/pc/grub-install.in: Understand --force and pass it down
456 to grub-setup.
457
458 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
459 down to setup().
460 (setup): Improve error messages and add warnings when requested to
461 install in odd layouts. Refuse to install using blocklists unless
462 --force was set.
463
18f547ad 4642009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 465
466 * disk/raid.c (grub_raid_scan_device): Improve debug message.
467
6d260daa 4682009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
469
470 Updated copyright year
471
472 * fs/hfsplus.c: updated copyright year
18f547ad 473
69f853f8 4742009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
475
476 HFS+ UUID
477
18f547ad 478 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 479 in the space previously used by unused3
480 (grub_hfsplus_uuid): new function
481 (grub_hfsplus_fs): added uuid field
482
4c402e73 4832009-05-03 Pavel Roskin <proski@gnu.org>
484
485 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
486 suppress warnings. It's no longer needed.
487 * disk/host.c: Likewise.
488 * disk/ata_pthru.c: Likewise.
489 * disk/loopback.c: Likewise.
490 * hook/datehook.c: Likewise.
491 * parttool/pcpart.c: Likewise.
492 * fs/i386/pc/pxe.c: Likewise.
493 * fs/ntfscomp.c: Likewise.
494 * efiemu/main.c: Likewise.
495 * mmap/mmap.c: Likewise.
496 * commands/crc.c: Likewise.
497 * commands/hexdump.c: Likewise.
498 * commands/hdparm.c: Likewise.
499 * commands/acpi.c: Likewise.
500 * commands/echo.c: Likewise.
501 * commands/minicmd.c: Likewise.
502 * commands/blocklist.c: Likewise.
503 * commands/memrw.c: Likewise.
504 * commands/loadenv.c: Likewise.
505 * commands/usbtest.c: Likewise.
506 * commands/lsmmap.c: Likewise.
507 * commands/boot.c: Likewise.
508 * commands/parttool.c: Likewise.
509 * commands/configfile.c: Likewise.
510 * commands/search.c: Likewise.
511 * commands/ieee1275/suspend.c: Likewise.
512 * commands/cat.c: Likewise.
513 * commands/i386/pc/pxecmd.c: Likewise.
514 * commands/i386/pc/play.c: Likewise.
515 * commands/i386/pc/halt.c: Likewise.
516 * commands/i386/pc/vbeinfo.c: Likewise.
517 * commands/i386/pc/vbetest.c: Likewise.
518 * commands/lspci.c: Likewise.
519 * commands/date.c: Likewise.
520 * commands/handler.c: Likewise.
521 * commands/ls.c: Likewise.
522 * commands/test.c: Likewise.
523 * commands/cmp.c: Likewise.
524 * commands/efi/loadbios.c: Likewise.
525 * commands/efi/fixvideo.c: Likewise.
526 * commands/halt.c: Likewise.
527 * commands/help.c: Likewise.
528 * commands/reboot.c: Likewise.
529 * hello/hello.c: Likewise.
530 * script/sh/main.c: Likewise.
531 * loader/xnu.c: Likewise.
532 * term/terminfo.c: Likewise.
533 * term/i386/pc/serial.c: Likewise.
534 * term/usb_keyboard.c: Likewise.
535
515b5079 5362009-05-03 David S. Miller <davem@davemloft.net>
537
538 * normal/menu.c: Include grub/parser.h
539
dfc31a22 5402009-05-03 Pavel Roskin <proski@gnu.org>
541
2fee74f1 542 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
543 not char*.
544 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
545 Suggested by Javier Martín <lordhabbit@gmail.com>
546
dfc31a22 547 * util/i386/pc/grub-mkrescue.in: Allow for the case when
548 efiemu??.o doesn't exist.
549 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
550 copying.
551
18f547ad 5522009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 553
554 FreeBSD 64-bit support
555
18f547ad 556 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 557 and loader/i386/bsd_trampoline.S
558 (bsd_mod_ASFLAGS): new variable
559 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
560 (FREEBSD_MODTYPE_KERNEL64): likewise
561 (grub_bsd64_trampoline_start): likewise
562 (grub_bsd64_trampoline_end): likewise
563 (grub_bsd64_trampoline_selfjump): likewise
564 (grub_bsd64_trampoline_gdt): likewise
565 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
566 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
567 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
568 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 569 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 570 of "attrib" member
571 * loader/i386/bsd_pagetable.c: new file
572 * loader/i386/bsd_trampoline.S: likewise
573 * loader/i386/bsd.c (ALIGN_QWORD): new macro
574 (ALIGN_VAR): likewise
575 (entry_hi): new variable
576 (kern_end_mdofs): likewise
577 (is_64bit): likewise
578 (grub_freebsd_add_meta): use ALIGN_VAR
579 (grub_e820_mmap): new declaration
580 (grub_freebsd_add_mmap): new function
581 (grub_freebsd_add_meta_module): support 64 bit kernels
582 (grub_freebsd_list_modules): use ALIGN_VAR
583 (gdt_descriptor): new declaration
584 (grub_freebsd_boot): support 64 bit kernels
585 (grub_bsd_elf64_hook): new function
586 (grub_bsd_load_elf): support elf64
587
038c5720 5882009-05-03 Bean <bean123ch@gmail.com>
589
590 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
591 after we get the result of if statement.
592
fc45fb58 5932009-05-03 Bean <bean123ch@gmail.com>
594
595 * Makefile.in (enable_efiemu): New variable.
596
597 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
598 set.
599 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
600 path.
601 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
602 path, add -mno-red-zone option.
603 (efiemu64_s.o): Likewise.
604 (efiemu64.o): Use macro $^ for source file.
605
606 * configure.ac (--enable-efiemu): New option.
607
bbee0f2b 6082009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
609
610 xnu support
611
612 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
613 (pkglib_MODULES): add xnu.mod
614 (xnu_mod_SOURCES): new variable
615 (xnu_mod_CFLAGS): likewise
616 (xnu_mod_LDFLAGS): likewise
617 (xnu_mod_ASFLAGS): likewise
618 * conf/i386-pc.rmk: likewise
619 * conf/x86_64-efi.rmk: likewise
7dd4a573 620 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 621 new declaration
622 * include/grub/i386/macho.h: new file
623 * include/grub/i386/xnu.h: likewise
624 * include/grub/macho.h: likewise
625 * include/grub/machoload.h: likewise
626 * include/grub/x86_64/macho.h: likewise
627 * include/grub/x86_64/xnu.h: likewise
628 * include/grub/xnu.h: likewise
629 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
630 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
631 * loader/i386/efi/xnu.c: new file
632 * loader/i386/pc/xnu.c: likewise
633 * loader/i386/xnu.c: likewise
634 * loader/i386/xnu_helper.S: likewise
635 * loader/macho.c: likewise
636 * loader/xnu.c: likewise
637 * loader/xnu_resume.c: likewise
638 * util/grub-dumpdevtree: likewise
639 * include/grub/i386/pit.h: include grub/err.h
640 (grub_pit_wait): export
641 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 642
5caf964d 6432009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
644
645 Efiemu
7dd4a573 646
5caf964d 647 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 648 _linux_efi, linux_efi.
649 new files in grub-emu
5caf964d 650 new targets efiemu32.o and efiemu64.o
651 * loader/linux_normal_efiemu.c: likewise
652 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 653 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 654 files to copy
655 * include/grub/autoefi.h: new file
7dd4a573 656 * include/grub/i386/efiemu.h: likewise
5caf964d 657 * include/grub/i386/pc/efiemu.h: likewise
658 * include/grub/efi/api.h: add LL suffix when necessary
659 new definitions relating to tables
660 * include/grub/efiemu/efiemu.h: new file
661 * include/grub/efiemu/runtime.h: likewise
662 * efiemu/prepare.c: likewise
663 * efiemu/loadcore_common.c: likewise
664 * efiemu/loadcore64.c: likewise
665 * efiemu/runtime/efiemu.sh: likewise
666 * efiemu/runtime/efiemu.S: likewise
667 * efiemu/runtime/efiemu.c: likewise
668 * efiemu/runtime/config.h: likewise
669 * efiemu/prepare32.c: likewise
670 * efiemu/main.c: likewise
671 * efiemu/modules/pnvram.c: likewise
672 * efiemu/modules/i386: likewise
673 * efiemu/modules/i386/pc: likewise
674 * efiemu/modules/acpi.c: likewise
675 * efiemu/i386/pc/cfgtables.c: likewise
676 * efiemu/i386/loadcore64.c: likewise
677 * efiemu/i386/loadcore32.c: likewise
678 * efiemu/prepare64.c: likewise
679 * efiemu/loadcore.c: likewise
680 * efiemu/symbols.c: likewise
681 * efiemu/mm.c: likewise
682 * efiemu/loadcore32.c: likewise
7dd4a573 683
6842009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 685
686 ACPI spoofing
687
688 * commands/acpi.c: new file
689 * commands/i386/pc/acpi.c: likewise
690 * commands/efi/acpi.c: likewise
691 * include/grub/acpi.h: likewise
692 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
693 (acpi_mod_SOURCES): new variable
694 (acpi_mod_CFLAGS): likewise
695 (acpi_mod_LDFLAGS): likewise
696 * conf/i386-efi.rmk: likewise
697 * conf/x86_64-efi.rmk: likewise
698
7dd4a573 6992009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 700
701 Missing part from mmap patch
702
703 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
704 (grub_mmap_unregister)
705 (grub_mmap_free_and_unregister): use grub_mmap_register
706
7dd4a573 7072009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 708
709 Mmap services
710
711 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
712 * loader/i386/linux.c (find_mmap_size): likewise
713 (allocate_pages): likewise
714 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
715 (grub_fill_multiboot_mmap): likewise
716 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
717 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
718 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
719 (OPENBSD_MMAP_RESERVED): likewise
720 * include/grub/i386/pc/memory.h: include grub/memory.h
721 (grub_lower_mem): removed
722 (grub_upper_mem): likewise
723 (GRUB_MACHINE_MEMORY_ACPI): new definition
724 (GRUB_MACHINE_MEMORY_NVS): likewise
725 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
726 (GRUB_MACHINE_MEMORY_HOLE): likewise
727 (grub_machine_mmap_register): likewise
728 (grub_machine_mmap_unregister): likewise
729 (grub_machine_get_upper): likewise
730 (grub_machine_get_lower): likewise
731 (grub_machine_get_post64): likewise
732 * include/grub/i386/efi/memory.h: new file
733 * include/grub/x86_64/efi/memory.h: likewise
734 * include/grub/efi/memory.h: likewise
735 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
736 (mmap_mod_SOURCES): new variable
737 (mmap_mod_LDFLAGS): likewise
738 (mmap_mod_ASFLAGS): likewise
739 * conf/i386-coreboot.rmk: likewise
740 * conf/i386-ieee1275.rmk: likewise
741 * conf/i386-efi.rmk: likewise
742 * conf/x86_64-efi.rmk: likewise
743 * include/grub/types.h (UINT_TO_PTR): new macro
744 (PTR_TO_UINT32): likewise
745 (PTR_TO_UINT64): likewise
746 * include/grub/memory.h: new file
747 * mmap/i386/pc/mmap.c: likewise
748 * mmap/i386/pc/mmap_helper.S: likewise
749 * mmap/i386/uppermem.c: likewise
750 * mmap/mmap.c: likewise
751 * mmap/efi/mmap.c: likewise
7dd4a573 752 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 753 grub_upper_mem
754 * kern/i386/pc/init.c (grub_lower_mem): removed variable
755 (grub_upper_mem): likewise
756 (grub_machine_init): don't use grub_upper_mem,
757 make grub_lower_mem local
758 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
759 grub_mmap_iterate and grub_mmap_get_upper
760 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
761
d558e6b5 7622009-05-02 Bean <bean123ch@gmail.com>
763
764 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
765 script/sh/parser.y.
766 (pkglib_MODULES): Add normal.mod and sh.mod.
767 (normal_SOURCES): New variable.
768 (normal_mod_CFLAGS): Likewise.
769 (normal_mod_LDFLAGS): Likewise.
770 (sh_mod_SOURCES): Likewise.
771 (sh_mod_CFLAGS): Likewise.
772 (sh_mod_LDFLAGS): Likewise.
773
774 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
775 script/sh/lexer.c_DEPENDENCIES.
776 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
777 kern/rescue_reader.c and kern/rescue_parser.c.
778 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
779 (grub_emu_SOURCES): Change source files.
780 (pkglib_MODULES): Remove normal.mod.
781 (normal_SOURCES): Removed.
782 (normal_mod_CFLAGS): Likewise.
783 (normal_mod_LDFLAGS): Likewise.
784 * conf/i386-coreboot.rmk: Likewise.
785 * conf/i386-efi.rmk: Likewise.
786 * conf/i386-ieee1276.rmk: Likewise.
787 * conf/powerpc-ieee1275.rmk: Likewise.
788 * conf/sparc64-ieee1275.rmk: Likewise.
789 * conf/x86_64-efi.rmk: Likewise.
790
791 * include/grub/command.h (grub_command_execute): New inline function.
792
793 * include/grub/menu.h (grub_menu_entry): Removed commands field.
794
795 * include/grub/normal.h: Remove <grub/setjmp.h>.
796 (grub_fs_module_list): Moved to normal/autofs.c.
797 (grub_exit_env): Removed.
798 (grub_command_execute): Likewise.
799 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
800 parameter script.
801 (read_command_list): New function declaration.
802 (read_fs_list): Likewise.
803
804 * include/parser.h: Include <grub/reader.h>.
805 (grub_parser_split_cmdline): Change type of getline parameter.
806 (grub_parser): New structure.
807 (grub_parser_class): New variable.
808 (grub_parser_execute): New function declaration.
809 (grub_register_rescue_parser): Likewise.
810 (grub_parser_register): New inline function.
811 (grub_parser_unregister): Likewise.
812 (grub_parser_get_current): Likewise.
813 (grub_parser_set_current): Likewise.
814
815 * include/grub/reader.h: New file.
816 * kern/reader.c: Likewise.
817 * kern/rescue_parser.c: Likewise.
818 * kern/rescue_reader.c: Likewise.
819 * normal/autofs.c: Likewise.
820 * normal/dyncmd.c: Likewise.
821
822 * include/grub/rescue.h: Removed.
823 * normal/command.h: Likewise.
824
825 * include/grub/script.h: Moved to ...
826 * include/grub/script_sh.h: ... Moved here.
827 * normal/execute.c: Moved to ...
828 * script/sh/execute.c: ... Moved here.
829 * normal/function.c: Moved to ...
830 * script/sh/function.c: ... Moved here.
831 * normal/lexer.c: Moved to ...
832 * script/sh/lexer.c: ... Moved here.
833 * normal/parser.y: Moved to ...
834 * script/sh/parser.y: ... Moved here.
835 * normal/script.c: Moved to ...
836 * script/sh/script.c: ... Moved here.
837
838 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
839 <grub/reader.h>.
840 (grub_exit_env): Removed.
841 (fs_module_list): Moved to normal/autofs.c.
842 (grub_file_getline): Don't handle comment here.
843 (free_menu): Skip removed field entry->commands.
844 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
845 script parameter.
846 (read_config_file): Removed nested parameter, change getline function.
847 (grub_enter_normal_mode): Removed.
848 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
849 (read_command_list): Likewise.
850 (autoload_fs_module): Moved to normal/autofs.c.
851 (read_fs_list): Likewise.
852 (reader_nested): New variable.
853 (grub_normal_execute): Run parser.sh to switch to sh parser.
854 (grub_cmd_rescue): Removed.
855 (cmd_normal): Removed.
856 (grub_cmd_normal): Unregister itself at the beginning. Don't register
857 rescue command.
858 (grub_cmdline_run): New function.
859 (grub_normal_reader_init): Likewise.
860 (grub_normal_read_line): Likewise.
861 (grub_env_write_pager): Likewise.
862 (cmdline): New variable.
863 (grub_normal_reader): Likewise.
864 (GRUB_MOD_INIT): Register normal reader and set as current, register
865 pager hook, register normal command with grub_register_command_prio,
866 so that it won't show up in command.lst.
867 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
868 grub_fs_autoload_hook.
869
870 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
871 (grub_menu_execute_entry): Replace grub_script_execute with
872 grub_parser_execute, change parameter to grub_command_execute.
873
874 * normal/menu_text.c: Remove <grub/script.h>.
875
876 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
877 and <grub/parser.h>.
878 (run): Change editor_getline to use new parser interface. Change
879 parameter to grub_command_execute.
880
881 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
882 <grub/reader.h> and <grub/parser.h>.
883 (grub_load_normal_mode): Execute normal command.
884 (grub_main): Call grub_register_core_commands,
885 grub_register_rescue_parser and grub_register_rescue_reader, use
886 grub_reader_loop to enter input loop.
887
7dd4a573 888 * kern/parser.c (grub_parser_split_cmdline): Change type of
889 getline parameter.
d558e6b5 890 (grub_parser_class): New variable.
891 (grub_parser_execute): New function.
892
893 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
894 * loader/multiboot2.c: Likewise.
895 * loader/sparc64/ieee1275/linux.c: Likewise.
896
897 * util/grub-emu.c (read_command_list): New dummy function.
898
18db813d 8992009-05-02 Robert Millan <rmh.grub@aybabtu.com>
900
901 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
902 count to 16 for CCISS and IDA.
903
6c67de15 9042009-05-02 Robert Millan <rmh.grub@aybabtu.com>
905
906 * normal/menu_text.c (grub_wait_after_message): Print a newline
907 after waiting for user input.
908
909 * loader/i386/linux.c: Include `<grub/normal.h>'.
910 (grub_cmd_linux): Improve the error message about `ask' mode, by
911 waiting for user input so it's not missed (we can do this, since
912 user requested interaction).
913
d9dc87b0 9142009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
915
916 Added missing lst to grub-mkrescue
917
918 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
919 and ${input_dir}/parttool.lst
920
ac8a2baa 9212009-04-30 David S. Miller <davem@davemloft.net>
922
ad22a610 923 * util/hostdisk.c (device_is_wholedisk): New function.
924 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
925 zero only if device_is_wholedisk() returns true.
926
6966215d 927 * util/hostdisk.c (convert_system_partition_to_system_disk):
928 Handle virtual disk devices named /dev/vdiskX as found on sparc
929 and powerpc.
930
ac8a2baa 931 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
932 lettered partition specifier is found, convert to numbered.
933
979b4fb4 9342009-04-29 David S. Miller <davem@davemloft.net>
935
e2bf39b2 936 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
937 * include/grub/sparc64/ieee1275/memory.h: Likewise.
938
3c64e104 939 * normal/command.c: Add missing newline at end of file.
940
979b4fb4 941 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
942 warnings.
943 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
944 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
945 grub_ofdisk_read): Likewise, and deal similarly with the fact that
946 ihandles have a 32-bit type but need to be stored in a "void *".
947
136d9f82 9482009-04-28 Pavel Roskin <proski@gnu.org>
949
9459c306 950 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
951 not disk. Adjust all dependencies.
2e08a26a 952 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 953 grub_disk_close().
954
136d9f82 955 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
956 parent's partition, don't copy it by reference, as it gets freed
957 on close.
958
7dd4a573 9592009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 960
961 Preboot hooks support
962
963 * commands/boot.c (struct grub_preboot_t): new declaration
964 (preboots_head): new variable
965 (preboots_tail): likewise
966 (grub_loader_register_preboot_hook): new function
967 (grub_loader_unregister_preboot_hook): likewise
968 (grub_loader_set): launch preboot hooks
969 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
970 (grub_loader_register_preboot_hook): new declaration
971 (grub_loader_unregister_preboot_hook): likewise
972
5af922b5 9732009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
974
975 Warning fix
976
7dd4a573 977 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 978 calling grub_dprintf
979
a5562c30 9802009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
981
982 Bug and warning fixes
983
7dd4a573 984 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 985 declaration
986 * commands/test.c (test_parse): fixed bug with file tests and corrected
987 declaration of find_file
988
4006f85c 9892009-04-26 Pavel Roskin <proski@gnu.org>
990
991 * Makefile.in: Don't install empty manual pages if help2man is
992 missing. Use help2man option for output, not shell redirection.
993
5c77c3de 9942009-04-26 David S. Miller <davem@davemloft.net>
995
996 * util/grub-mkdevicemap.c (make_device_map): Add missing
997 NESTED_FUNC_ATTR to process_device().
998
033b10a8 9992009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1000
1001 Test command
1002
1003 * commands/test.c: rewritten to use bash-like test
1004
e4343593 10052009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1006
1007 Parttool autoloading and improvements
1008
7dd4a573 1009 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 1010 (parttool.lst): new target
1011 * genmk.rb: generate parttool-*
1012 (CLEANFILES): add #{parttool}
1013 (PARTTOOLFILES): new variable
1014 * genparttoollist.sh: new file
7dd4a573 1015 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 1016 (grub_pcpart_type): likewise
1017 * commands/parttool.c (helpmsg): new variable
1018 (grub_cmd_parttool): output help if not enough arguments are supplied
1019 autoload modules
1020 (GRUB_MOD_INIT(parttool)): use helpmsg
1021
0d312500 10222009-04-24 David S. Miller <davem@davemloft.net>
1023
7dd4a573 1024 Avoiding opening same device multiple times in device iterator.
0d312500 1025
1026 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 1027 and use it to build a list of partitions in iterate_disk() and
0d312500 1028 iterate_partition().
1029
ac20caff 1030 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1031 on disk->data.
1032
0dcf7495 1033 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1034 grub_devalias_iterate() result instead of unconditional 0.
1035 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1036 Also, capture hook return value, either directly or via
1037 grub_children_iterate(), and propagate to caller.
1038 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1039 grub_children_iterate): Return value is now 'int' instead of
1040 'grub_err_t'.
1041 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1042 like a proper iterator, stopping when hooks return non-zero.
1043 (grub_devalias_iterate): Likewise.
1044
c8c08833 10452009-04-23 David S. Miller <davem@davemloft.net>
1046
1047 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1048
f01005a8 10492009-04-22 David S. Miller <davem@davemloft.net>
1050
1051 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1052 is larger than address_cells, use that value for address_cells too.
1053
4e8269da 1054 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1055 IEEE1275_MAX_PATH_LEN): Define.
1056 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1057 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1058 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1059 'devtype'. Explicitly NULL terminate devalias expansion.
1060
a1447506 1061 * util/sparc64/ieee1275/misc.c: New file.
1062 * util/sparc64/ieee1275/grub-setup.c: New file.
1063 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1064 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1065 * util/sparc64/ieee1275/grub-install.in: New file.
1066 * util/ieee1275/ofpath.c: New file.
1067 * util/ieee1275/devicemap.c: New file.
1068 * util/devicemap.c: New file.
1069 * util/deviceiter.c: New file.
1070 * kern/sparc64/ieee1275/init.c: New file.
1071 * include/grub/util/ofpath.h: New file.
1072 * include/grub/util/deviceiter.h: New file.
1073 * util/grub-mkdevicemap.c: Include deviceiter.h.
1074 Implement using grub_util_emit_devicemap_entry and
1075 grub_util_iterate_devices.
1076 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1077 util/devicemap.c into grub-mkdevicemap
1078 * conf/i386-efi.rmk: Likewise.
1079 * conf/i386-ieee1275.rmk: Likewise.
1080 * conf/i386-pc.rmk: Likewise.
1081 * conf/powerpc-ieee1275.rmk: Likewise.
1082 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1083 images and installation utilities. Build kernel as image
1084 instead of as elf binary. Use common rules as much as possible.
1085
7dd4a573 10862009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 1087
1088 Correct GPT definition
1089
7dd4a573 1090 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 1091 of "attrib" member
1092
c6c5219f 10932009-04-19 Felix Zielcke <fzielcke@z-51.de>
1094
1095 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1096
0552ff9f 10972009-04-19 David S. Miller <davem@davemloft.net>
1098
1099 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1100 (grub_rescue_cmd_linux): Rename to...
1101 (grub_cmd_linux): and fix prototype.
1102 (grub_rescue_cmd_initrd): Rename to...
1103 (grub_cmd_initrd): and fix prototype.
1104 (cmd_linux, cmd_initrd): New.
1105 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1106 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1107
d1a282fc 11082009-04-17 Pavel Roskin <proski@gnu.org>
1109
07c5039f 1110 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1111 format.
1112 (grub_ohci_transfer): Likewise.
1113
b012002d 1114 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1115
1bc09c35 1116 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1117 return without a value. Fix inconsistent indentation.
1118
e0ff9126 1119 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1120 match struct grub_fs.
1121
d1a282fc 1122 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1123 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1124 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1125 * commands/lspci.c (grub_lspci_iter): Likewise.
1126
a96df3f2 11272009-04-16 Bean <bean123ch@gmail.com>
1128
1129 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1130 value.
1131
41bb0fe9 11322009-04-15 Pavel Roskin <proski@gnu.org>
1133
1134 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1135 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1136 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1137 definitions.
1138
596c6970 11392009-04-15 Felix Zielcke <fzielcke@z-51.de>
1140
1141 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 1142 that no multiple data or metadata areas are supported and `Unknown
596c6970 1143 metadata header'.
1144
7dd4a573 11452009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 1146
1147 Move loader out of the kernel
1148
1149 * kern/loader.c: moved to ...
1150 * commands/boot.c: ... moved here
1151 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1152 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1153 * include/grub/kernel.h (grub_machine_fini): export
1154 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1155 (grub_loader_set): likewise
1156 (grub_loader_unset): likewise
1157 (grub_loader_boot): likewise
1158 * conf/common.rmk: new module boot.mod
1159 (pkglib_MODULES): add boot.mod
1160 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1161 (grub_emu_SOURCES): likewise
1162 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1163 (grub_emu_SOURCES): likewise
1164 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1165 (grub_emu_SOURCES): likewise
1166 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1167 (grub_emu_SOURCES): likewise
1168 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1169 (grub_emu_SOURCES): likewise
7dd4a573 1170 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1171 (grub_emu_SOURCES): likewise
0d5d5653 1172 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 1173 (grub_emu_SOURCES): likewise
0d5d5653 1174
7dd4a573 11752009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 1176
1177 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 1178
5999d619 1179 * kern/misc.c (grub_itoa): Removed function
1180 (grub_ltoa): likewise
1181 (grub_vsprintf): use grub_lltoa
1182
7dd4a573 11832009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 1184
1185 Restore grub-emu
1186
1187 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1188 * conf/i386-coreboot.rmk: likewise
1189 * conf/i386-ieee1275.rmk: likewise
1190 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1191
20318222 11922009-04-15 Felix Zielcke <fzielcke@z-51.de>
1193
1194 * INSTALL: Add that `./autogen.sh' needs to be run before
1195 `./configure.'.
1196
d05f0df3 11972009-04-14 Bean <bean123ch@gmail.com>
1198
1199 * Makefile.in (pkglib_DATA): Add handler.lst.
1200 (handler.lst): New rule.
1201
1202 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1203 * conf/i386-coreboot.rmk: Likewise.
1204 * conf/i386-ieee1275.rmk: Likewise.
1205 * conf/i386-efi.rmk: Likewise.
1206 * conf/x86_64-efi.rmk: Likewise.
1207 * conf/powerpc-ieee1275.rmk: Likewise.
1208 * conf/sparc64-ieee1275.rmk: Likewise.
1209
1210 * genhandlerlist.sh: New file.
1211
1212 * genmk.rb: Add rules to generate handler.lst.
1213
1214 * include/grub/normal.h (grub_file_getline): New function definition.
1215 (read_handler_list): Likewise.
1216 (free_handler_list): Likewise.
1217
1218 * include/grub/term.h (grub_term_register_input): Add name parameter
1219 for auto generation of handler.lst.
1220 (grub_term_register_output): Likewise.
1221
1222 * normal/handler.c: New file.
1223
1224 * normal/main.c (get_line): Renamed to grub_file_getline.
1225 (read_config_file): Use the newly renamed grub_file_getline.
1226 (read_command_list): Likewise.
1227 (read_fs_list): Likewise.
1228 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1229 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1230
1231 * term/efi/console.c (grub_console_init): Add name parameter for auto
1232 generation of handler.lst.
1233 * term/gfxterm.c: Likewise.
1234 * term/i386/pc/at_keyboard.c: Likewise.
1235 * term/i386/pc/console.c: Likewise.
1236 * term/i386/pc/serial.c: Likewise.
1237 * term/i386/pc/vesafb.c: Likewise.
1238 * term/i386/pc/vga.c: Likewise.
1239 * term/i386/pc/vga_text.c: Likewise.
1240 * term/ieee1275/ofconsole.c: Likewise.
1241 * term/usb_keyboard.c: Likewise.
1242
33c846be 12432009-04-14 Bean <bean123ch@gmail.com>
1244
1245 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1246 properly with null character.
1247
4484e01e 12482009-04-14 Felix Zielcke <fzielcke@z-51.de>
1249
1250 * configure: Remove.
1251 * config.h.in: Likewise.
f93d668e 1252 * stamp-h.in: Likewise.
4484e01e 1253 * DISTLIST: Likewise.
1254 * conf/common.mk: Likewise.
1255 * conf/i386-coreboot.mk: Likewise.
1256 * conf/i386-efi.mk: Likewise.
1257 * conf/i386-ieee1275.mk: Likewise.
1258 * conf/i386.mk: Likewise.
1259 * conf/i386-pc.mk: Likewise.
1260 * conf/powerpc-ieee1275.mk: Likewise.
1261 * conf/sparc64-ieee1275.mk: Likewise.
1262 * conf/x86_64-efi.mk: Likewise.
1263
1264 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1265 develop on GRUB.
1266
7dd4a573 12672009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 1268 David S. Miller <davem@davemloft.net>
1269
1270 * util/hostdisk.c (make_device_name): Fix buffer length
1271 calculations.
1272
e25b5a8c 12732009-04-14 Felix Zielcke <fzielcke@z-51.de>
1274
1275 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1276 <sys/param.h> and <sys/sysctl.h>.
1277 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1278 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1279 opening the device and reset them afterwards.
1280
1f1f580c 12812009-04-13 Pavel Roskin <proski@gnu.org>
1282
1283 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1284 Reported by John Stanley <jpsinthemix@verizon.net>
1285
7ebc2d6b 12862009-04-13 Robert Millan <rmh@aybabtu.com>
1287
1288 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 1289 that name for menuentries when appropriate.
7ebc2d6b 1290
d8ba3667 12912009-04-13 Felix Zielcke <fzielcke@z-51.de>
1292
1293 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1294
cba416eb 12952009-04-13 Robert Millan <rmh@aybabtu.com>
1296
1297 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1298 to Linux, simply abort telling the user it's no longer supported.
1299
a547a745 13002009-04-13 Felix Zielcke <fzielcke@z-51.de>
1301
1302 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 1303 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 1304 `freebsd_loadenv' only when devices.hints exist.
1305
232a769c 13062009-04-13 Pavel Roskin <proski@gnu.org>
1307
1308 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1309
c3012039 13102009-04-13 Felix Zielcke <fzielcke@z-51.de>
1311
1312 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1313 partition number.
1314 (grub_drive): Likewise.
1315
234022fe 13162009-04-13 David S. Miller <davem@davemloft.net>
1317
1318 * kern/sparc64/ieee1275/ieee1275.c: New file.
1319 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1320 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1321 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1322 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1323 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1324 grub_ieee1275_alloc_physmem): Declare new exported functions.
1325
d8e1836c 1326 * include/grub/sparc64/ieee1275/loader.h: New file.
1327 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1328 * include/grub/sparc64/kernel.h: Likewise.
1329 * loader/sparc64/ieee1275/linux.c: Likewise.
1330
96bd81ec 1331 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1332 (grub_fstest_SOURCES): Likewise.
1333
6a4737e5 1334 * util/hostdisk.c (make_device_name): Do not make any assumptions
1335 about the length of drive names.
1336
1d7a72fd 1337 * kern/dl.c (grub_dl_load_file): Close file immediately when
1338 we are done using it.
1339
56bc2471 13402009-04-12 David S. Miller <davem@davemloft.net>
1341
1342 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1343 values. Noticed by Pavel Roskin.
1344
df38d0bb 1345 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1346 target compiler.
7dd4a573 1347
e382e93a 1348 * genmk.rb: Add more flexible image type specification, also
1349 pass --strip-unneeded to objcopy.
1350 * conf/i386-pc.rmk: Use *_FORMAT.
1351 * conf/i386-pc.mk: Rebuilt.
1352
f5dbbca9 1353 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1354 (OFDISK_HASH_SZ): Define.
1355 (ofdisk_hash): New hash table.
1356 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1357 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1358 instead of device phandle which is not unique.
1359
91c88b12 1360 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1361 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1362 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1363 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1364 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1365 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1366 GRUB_KERNEL_MACHINE_DATA_END): Define.
1367 (grub_kernel_image_size, grub_total_module_size): Declare.
1368
5b5d4aa5 13692009-04-12 Pavel Roskin <proski@gnu.org>
1370
7dd4a573 1371 * configure.ac: Change the logic when we check for target tools.
1372 Do it when the target is specified and it's different from the
1373 specified value of the host.
5b5d4aa5 1374
c91e1793 13752009-04-11 Felix Zielcke <fzielcke@z-51.de>
1376
1377 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1378 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1379 GNU/kFreeBSD. Check if a device is a character device. Use
1380 DIOCGMEDIASIZE to get the size.
1381 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1382 support for GNU/kFreeBSD.
1383 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1384 is a character device instead of a block device. Add support for
1385 FreeBSD device names.
1386
1387 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1388 is a character device instead of a block device.
1389
1390 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1391 is a character device instead of a block device.
1392
b1ac8644 13932009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1394
1395 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1396 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1397 FreeBSD. Check if a device is a character device. Use
1398 DIOCGMEDIASIZE to get the size.
1399 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1400 support for FreeBSD.
1401 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1402 is a character device instead of a block device. Add support for
1403 FreeBSD device names.
1404
1405 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1406 a character device instead of a block device.
1407 (grub_util_check_char_device): New function.
1408
1409 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1410 a character device instead of a block device.
1411
1412 * include/grub/util/getroot.h (grub_util_check_char_device): New
1413 prototype.
1414
a3f7515a 14152009-04-11 David S. Miller <davem@davemloft.net>
1416
1417 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1418 static libgcc.
1419 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1420 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1421 function, if present.
1422 (__bswapdi2): Likewise.
1423
0d44993d 1424 * include/grub/sparc64/ieee1275/boot.h: New file.
1425 * boot/sparc64/ieee1275/boot.S: Likewise.
1426 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1427
ed3d2bc2 1428 * kern/misc.c (grub_ltoa): New function.
1429 (grub_vsprintf): Use it to format 'long' integers.
1430
d3bfb59c 14312009-04-10 David S. Miller <davem@davemloft.net>
1432
1433 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1434 slots are of type grub_ieee1275_cell_t.
1435 (grub_nand_read): Likewise.
1436 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1437 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1438 macros are used to compare values in arg/ret block of the call.
1439 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1440 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1441 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1442 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1443 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1444 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1445 grub_ieee1275_close, grub_ieee1275_set_property,
1446 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1447 grub_ieee1275_cell_t.
1448 * kern/ieee1275/openfw.c (grub_map): Likewise.
1449 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1450 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1451
450e2238 1452 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1453 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1454 (grub_devalias_iterate): Likewise.
1455
7dd4a573 14562009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 1457
1458 UFS improvements
1459
1460 * fs/ufs.c (INODE_NBLOCKS): new definition
1461 (struct grub_ufs_dirent): added fields for non-BSD dirents
1462 (grub_ufs_get_file_block): fixed double indirect handling
1463 (grub_ufs_lookup_symlink): use more robust way to determine whether
1464 symlink is inline
1465 (grub_ufs_find_file): support for non-BSD dirents
1466 (grub_ufs_dir): support for non-BSD dirents
1467
e7e6862a 14682009-04-10 Bean <bean123ch@gnail.com>
1469
1470 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1471 attribute, otherwise the size would be wrong for i386 platform.
1472
1473 * include/grub/pci.h (grub_pci_read_word): New inline function.
1474 (grub_pci_read_byte): Likewise.
1475 (grub_pci_write): Likewise.
1476 (grub_pci_write_word): Likewise.
1477 (grub_pci_write_byte): Likewise.
1478
1479 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1480
1481 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1482 (find_framebuf): Scan pci to locate the frame buffer address.
1483
1484 * commands/efi/fixvideo.c: New file.
1485
1486 * commands/efi/loadbios.c: Likewise.
1487
1488 * commands/memrw.c: Likewise.
1489
1490 * util/grub-dumpbios.in: Likewise.
1491
1492 * conf/common.rmk (grub-dumpbios): New utility.
1493 (pkglib_MODULES): New module memrw.mod.
1494 (memrw_mod_SOURCE): New macro.
1495 (memrw_mod_CFLAGS): Likewise.
1496 (memrw_mod_LDFLAGS): Likewise.
1497
7dd4a573 1498 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 1499 fixvideo.mod.
1500 (loadbios_mod_SOURCE): New macro.
1501 (loadbios_mod_CFLAGS): Likewise.
1502 (loadbios_mod_LDFLAGS): Likewise.
1503 (fixvideo_mod_SOURCE): Likewise.
1504 (fixvideo_mod_CFLAGS): Likewise.
1505 (fixvideo_mod_LDFLAGS): Likewise.
1506
7dd4a573 1507 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 1508 fixvideo.mod.
1509 (loadbios_mod_SOURCE): New macro.
1510 (loadbios_mod_CFLAGS): Likewise.
1511 (loadbios_mod_LDFLAGS): Likewise.
1512 (fixvideo_mod_SOURCE): Likewise.
1513 (fixvideo_mod_CFLAGS): Likewise.
1514 (fixvideo_mod_LDFLAGS): Likewise.
1515
af63ada2 15162009-04-08 Felix Zielcke <fzielcke@z-51.de>
1517
1518 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1519
c2cdde70 15202009-04-07 David S. Miller <davem@davemloft.net>
1521
1522 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1523 support for R_SPARC_OLO10 relocations. Fix compile warning for
1524 R_SPARC_WDISP30 case.
ea3f72cf 1525 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 1526
761319cf 15272009-04-06 Pavel Roskin <proski@gnu.org>
1528
1007d1f5 1529 * include/grub/misc.h (ARRAY_SIZE): New macro.
1530 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1531 New macro.
1532 * loader/i386/linux.c (allocate_pages): Use free_pages().
1533 (grub_linux_unload): Don't use free_pages().
1534 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1535 wrong index. Treat all other modes as text modes.
1536 (grub_cmd_linux): Initialize vid_mode unconditionally to
1537 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
1538
761319cf 1539 * commands/help.c (print_command_help): Use cmd->prio, not
1540 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1541
ea761d40 15422009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 1543
ea761d40 1544 Parttool
1545
1546 * parttool/pcpart.c: new file
1547 * commands/parttool.c: likewise
1548 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1549 (parttool_mod_SOURCES): new variable
1550 (parttool_mod_CFLAGS): likewise
1551 (parttool_mod_LDFLAGS): likewise
1552 (pcpart_mod_SOURCES): likewise
1553 (pcpart_mod_CFLAGS): likewise
1554 (pcpart_mod_LDFLAGS): likewise
7dd4a573 1555 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 1556 and parttool/pcpart.c
1557 * conf/i386-efi.rmk: likewise
1558 * conf/i386-ieee1275.rmk: likewise
1559 * conf/i386-pc.rmk: likewise
1560 * conf/powerpc-ieee1275.rmk: likewise
1561 * conf/sparc64-ieee1275.rmk: likewise
1562 * conf/x86_64-ieee1275.rmk: likewise
1563
05aaebfb 15642009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1565
1566 Support for mtime and further expandability of dir command
1567
1568 * include/grub/lib/datetime.h: moved to ...
7dd4a573 1569 * include/grub/datetime.h: ... moved here and added
05aaebfb 1570 declaration of grub_unixtime2datetime. All users updated
7dd4a573 1571 * include/grub/fs.h: new syntax for dir and mtime functions in
1572 struct grub_fs
05aaebfb 1573 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1574 and GRUB_FSHELP_FLAGS_MASK
1575 * commands/ls.c (grub_ls_list_files): Write mtime in long format
1576 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1577 (grub_ext2_mtime): new function
1578 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1579 (grub_hfsplus_mtime): new function
1580 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1581 (GRUB_UFS_ATTR_FILE): likewise
1582 (GRUB_UFS_ATTR_LNK): likewise
1583 (struct grub_ufs_sblock): new fields mtime
1584 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1585 all users updated
1586 (grub_ufs_dir): mtime support
1587 (grub_ufs_mtime): new function
1588 * fs/affs.c (grub_affs_dir): use new dir syntax
1589 * fs/afs.c (grub_afs_dir): likewise
1590 * fs/cpio.c (grub_cpio_dir): likewise
1591 * fs/fat.c (grub_fat_find_dir): likewise
1592 * fs/hfs.c (grub_hfs_dir): likewise
1593 * fs/iso9660.c (grub_iso9660_dir): likewise
1594 * fs/jfs.c (grub_jfs_dir): likewise
1595 * fs/minix.c (grub_minix_dir): likewise
1596 * fs/ntfs.c (grub_ntfs_dir): likewise
1597 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1598 * fs/sfs.c (grub_sfs_dir): likewise
1599 * fs/xfs.c (grub_xfs_dir): likewise
1600 * util/hostfs.c (grub_hostfs_dir): likewise
1601 * lib/datetime.c: moved to ...
1602 * normal/datetime.c: ... moved here
1603 (grub_unixtime2datetime): new function
1604 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 1605 * normal/completion.c (iterate_dir): use new dir syntax
1606 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 1607 last modification time of a volume
7dd4a573 1608 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 1609 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 1610 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 1611 (normal_mod_SOURCES): likewise
1612 (datetime_mod_SOURCES): Removed lib/datetime.c
1613 * conf/i386-efi.rmk: likewise
7dd4a573 1614 * conf/i386-ieee1275.rmk: likewise
05aaebfb 1615 * conf/i386-pc.rmk: likewise
1616 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1617 * conf/sparc64-ieee1275.rmk: likewise
1618 * conf/x86_64-efi.rmk: likewise
05aaebfb 1619
8a7e1a14 16202009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1621
1622 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 1623
1624 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 1625 on grub_fat_find_dir
1626 (grub_fat_find_dir): use grub_fat_iterate_dir
1627 (grub_fat_label): likewise
1628
04186a9c 16292009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
1630
7dd4a573 1631 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 1632 and command.h
1633 remove extraneous kernel_elf_HEADERS
1634
da4c0bb6 16352009-04-04 Bean <bean123ch@gnail.com>
1636
1637 * include/grub/util/misc.h: Add dummy function fsync for mingw.
1638
1639 * util/misc.c: Likewise.
1640
54ad9555 16412009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1642
1643 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1644 instead of grub_printf.
1645
7a6bf9f2 16462009-04-03 Robert Millan <rmh@aybabtu.com>
1647
1648 * loader/i386/linux.c (grub_linux_setup_video): Fill
1649 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1650 values from `mode info' structure instead of hardcoded
1651 values.
1652
3fcc2083 16532009-04-01 Pavel Roskin <proski@gnu.org>
1654
1655 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1656 unused now.
1657 * genmk.rb: Likewise.
1658 * configure.ac: Likewise.
1659
5ec9740b 16602009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
1661
1662 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1663 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
1664
5270cec8 16652009-04-01 David S. Miller <davem@davemloft.net>
1666
1667 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 1668 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 1669 (grub_setjmp): Mark with 'returns_twice' attribute.
1670 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1671 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1672 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1673
9c3dd854 16742009-04-01 Robert Millan <rmh@aybabtu.com>
1675
1676 Reapply fix from 2008-07-28 which was accidentally reverted; also
1677 perform the same fix to a similar check in same function.
1678
1679 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1680 with the same number are found, just use issue a warning with
1681 grub_dprintf(), as this error has been reported to be non-fatal.
1682
0d818b7e 16832009-03-31 Pavel Roskin <proski@gnu.org>
1684
1685 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1686 for cross-compilation.
1687
95646d92 16882009-03-30 Robert Millan <rmh@aybabtu.com>
1689
1690 Fix i386-ieee1275 build.
1691
1692 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1693 Remove declaration.
1694
6a003ed1 16952009-03-30 Pavel Roskin <proski@gnu.org>
1696
1697 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1698 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
1699 zero-terminated, rely only on the strlen value. Fix comparison
1700 of strings differing in length.
1701
92f33540 17022009-03-30 Robert Millan <rmh@aybabtu.com>
1703
1704 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1705 checking for abi version. Improve error messages on BIOS to notify
1706 user about `linux16' command.
1707
a8c48fd5 17082009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
1709
f968172e 1710 Leak fixes
a8c48fd5 1711
f968172e 1712 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1713 in case of collision
1714 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 1715
9c323f09 17162009-03-29 Robert Millan <rmh@aybabtu.com>
1717
1718 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1719 set `vid_mode' accordingly.
1720 (grub_linux_boot): Process `vid_mode' and set video mode.
1721
ae68f423 17222009-03-29 Robert Millan <rmh@aybabtu.com>
1723
1724 * util/grub.d/10_linux.in (linux_entry): New function.
1725 Factorize generation of Linux boot entries.
1726
5709cfc4 17272009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
1728
1729 Make the format of Environment Block plain text. The boot loader
1730 part is not tested well yet.
7dd4a573 1731
5709cfc4 1732 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1733 (buffer): Removed.
1734 (envblk): Likewise.
1735 (usage): Remove "info" and "clear". Add "unset". Update the
1736 description of "set", as this does not delete variables any
1737 longer.
1738 (create_envblk_file): Complete rewrite.
1739 (open_envblk_file): Likewise.
1740 (cmd_info): Removed.
1741 (cmd_list): Likewise.
1742 (cmd_set): Likewise.
1743 (cmd_clear): Likewise.
1744 (list_variables): New function.
1745 (write_envblk): Likewise.
1746 (set_variables): Likewise.
1747 (unset_variables): Likewise.
1748 (main): Complete rewrite.
1749
1750 * commands/loadenv.c (buffer): Removed.
1751 (envblk): Likewise.
1752 (open_envblk_file): New function.
1753 (read_envblk_file): Complete rewrite.
1754 (grub_cmd_load_env): Likewise.
1755 (grub_cmd_list_env): Likewise.
1756 (struct blocklist): New struct.
1757 (free_blocklists): New function.
1758 (check_blocklists): Likewise.
1759 (write_blocklists): Likewise.
1760 (grub_cmd_save_env): Complete rewrite.
1761
1762 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1763 a plain text signature.
1764 (GRUB_ENVBLK_MAXLEN): Removed.
1765 (struct grub_envblk): Complete rewrite.
1766 (grub_envblk_find): Removed.
1767 (grub_envblk_insert): Likewise.
1768 (grub_envblk_open): New prototype.
1769 (grub_envblk_set): Likewise.
1770 (grub_envblk_delete): Put const to VALUE.
1771 (grub_envblk_iterate): Put const to NAME and VALUE.
1772 (grub_envblk_close): New prototype.
1773 (grub_envblk_buffer): New inline function.
1774 (grub_envblk_size): Likewise.
1775
1776 * lib/envblk.c: Include grub/mm.h.
1777 (grub_env_find): Removed.
1778 (grub_envblk_open): New function.
1779 (grub_envblk_close): Likewise.
1780 (escaped_value_len): Likewise.
1781 (find_next_line): Likewise.
1782 (grub_envblk_insert): Removed.
1783 (grub_envblk_set): New function.
1784 (grub_envblk_delete): Complete rewrite.
1785 (grub_envblk_iterate): Likewise.
1786
a9368fd3 17872009-03-28 Robert Millan <rmh@aybabtu.com>
1788
1789 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1790 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1791 variables. Use 16-bit loader.
1792 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1793 loader.
1794 * kern/i386/loader.S (grub_linux_boot): Rename to ...
1795 (grub_linux16_boot): ... this. Update all users.
1796 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1797 (grub_linux_boot): ... this. Update all users.
1798
1799 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1800 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
1801 commands to `linux16' and `initrd16'.
1802 (GRUB_MOD_FINI(linux)): Rename to ...
1803 (GRUB_MOD_FINI(linux16)): ... this.
1804
e4dd5a7e 18052009-03-24 Pavel Roskin <proski@gnu.org>
1806
1807 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1808 not just for compilation.
1809
c04d6e05 18102009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
1811
1812 Move multiboot helper out of kernel
1813
1814 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1815 `loader/i386/multiboot_helper.S'.
1816 * conf/i386-coreboot.rmk: Likewise
1817 * conf/i386-ieee1275.rmk: Likewise
1818
1819 * kern/i386/loader.S: Move multiboot helpers from here...
1820 * loader/i386/multiboot_helper.S: ...moved here
1821 * include/grub/i386/loader.h: Move declarations of multiboot
1822 helpers from here...
1823 * include/grub/i386/multiboot.h: ...moved here
1824 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1825
42a5b3fc 18262009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1827
1828 * kern/env.c (grub_env_context_open): Added an argument to specify
1829 whether a new context inherits exported variables from current
1830 one. This is useful when making a sandbox to interpret a config
1831 file.
1832 All callers updated.
1833
1834 * include/grub/env.h (grub_env_context_open): Updated the prototype.
1835
b28bbc4e 18362009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1837
1838 * kern/env.c (grub_env_context_close): Fix memory leaks.
1839
f04f02e4 18402009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1841
1842 * normal/main.c (grub_normal_execute): Added an argument
1843 BATCH to specify if an interactive interface should be provided
1844 after reading a config file.
1845 All callers updated.
1846 (read_command_list): Prevent being executed twice.
1847 (read_fs_list): Likewise.
1848
42a5b3fc 1849 * include/grub/normal.h (grub_normal_execute): Updated the
1850 prototype.
f04f02e4 1851
41473ac2 18522009-03-22 Pavel Roskin <proski@gno.org>
1853
fbc00b0c 1854 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1855 _start.
1856 * kern/i386/pc/startup.S: Likewise.
1857 * kern/i386/efi/startup.S: Likewise.
1858 * kern/i386/ieee1275/startup.S: Likewise.
1859 * kern/i386/coreboot/startup.S: Likewise.
1860 * kern/x86_64/efi/startup.S: Likewise.
1861
41473ac2 1862 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1863 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1864 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1865
2274cc8f 18662009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
1867
1868 Bugfixes in multiboot for bugs uncovered by solaris kernel.
1869
1870 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1871 limit detection.
1872 Use vaddr of correct segment for entry_point.
1873
b1b797cb 18742009-03-21 Bean <bean123ch@gmail.com>
1875
1876 * commands/blocklist.c: Add include file <grub/command.h>, remove
1877 <grub/normal.h> and <grub/arg.h>.
1878 (grub_cmd_blocklist): Use the new command interface.
1879 (GRUB_MOD_INIT): Likewise.
1880 (GRUB_MOD_FINI): Likewise.
1881 * commands/boot.c: Likewise.
1882 * commands/cat.c: Likewise.
1883 * commands/cmp.c: Likewise.
1884 * commands/configfile.c: Likewise.
1885 * commands/crc.c: Likewise.
1886 * commands/echo.c: Likewise.
1887 * commands/halt.c: Likewise.
1888 * commands/handler.c: Likewise.
1889 * commands/hdparm.c: Likewise.
1890 * commands/help.c: Likewise.
1891 * commands/hexdump.c: Likewise.
1892 * commands/loadenv.c: Likewise.
1893 * commands/ls.c: Likewise.
1894 * commands/lsmmap.c: Likewise.
1895 * commands/lspci.c: Likewise.
1896 * commands/loadenv.c: Likewise.
1897 * commands/read.c: Likewise.
1898 * commands/reboot.c: Likewise.
1899 * commands/search.c: Likewise.
1900 * commands/sleep.c: Likewise.
1901 * commands/test.c: Likewise.
1902 * commands/usbtest.c: Likewise.
1903 * commands/videotest.c: Likewise.
1904 * commands/i386/cpuid.c: Likewise.
1905 * commands/i386/pc/halt.c: Likewise.
1906 * commands/i386/pc/play.c: Likewise.
1907 * commands/i386/pc/pxecmd.c: Likewise.
1908 * commands/i386/pc/vbeinfo.c: Likewise.
1909 * commands/i386/pc/vbetest.c: Likewise.
1910 * commands/ieee1275/suspend.c: Likewise.
1911 * disk/loopback.c: Likewise.
1912 * font/font_cmd.c: Likewise.
1913 * hello/hello.c: Likewise.
1914 * loader/efi/appleloader.c: Likewise.
1915 * loader/efi/chainloader.c: Likewise.
1916 * loader/i386/bsd.c: Likewise.
1917 * loader/i386/efi/linux.c: Likewise.
1918 * loader/i386/ieee1275/linux.c: Likewise.
1919 * loader/i386/linux.c: Likewise.
1920 * loader/i386/pc/chainloader.c: Likewise.
1921 * loader/i386/pc/linux.c: Likewise.
1922 * loader/powerpc/ieee1275/linux.c: Likewise.
1923 * loader/multiboot_loader.c: Likewise.
1924 * term/gfxterm.c: Likewise.
1925 * term/i386/pc/serial.c: Likewise.
1926 * term/terminfo.c: Likewise.
1927
1928 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1929 * term/i386/pc/vga.c: Likewise.
1930 * video/readers/jpeg.c: Likewise.
1931 * video/readers/png.c: Likewise.
1932 * video/readers/tga.c: Likewise.
1933
1934 * util/grub-fstest (cmd_loopback): Removed.
1935 (cmd_blocklist): Likewise.
1936 (cmd_ls): Likewise.
1937 (grub_register_command): Likewise.
1938 (grub_unregister_command): Likewise.
1939 (execute_command): Use grub_command_find to locate command and execute
1940 it.
1941
1942 * include/grub/efi/chainloader.h: Removed.
1943 * loader/efi/chainloader_normal.c: Likewise.
1944 * loader/i386/bsd_normal.c: Likewise.
1945 * loader/i386/pc/chainloader_normal.c: Likewise.
1946 * loader/i386/pc/multiboot_normal.c: Likewise.
1947 * loader/linux_normal.c: Likewise.
1948 * loader/multiboot_loader_normal.c: Likewise.
1949 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1950
1951 * gencmdlist.sh: Scan new registration command grub_register_extcmd
1952 and grub_register_command_p1.
1953
1954 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1955 kern/command.c, lib/arg.c and commands/extcmd.c.
1956 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1957 (minicmd_mod_SOURCES): New variable.
1958 (minicmd_mod_CFLAGS): Likewise.
1959 (minicmd_mod_LDFLAGS): Likewise.
1960 (extcmd_mod_SOURCES): Likewise.
1961 (extcmd_mod_CFLAGS): Likewise.
1962 (extcmd_mod_LDFLAGS): Likewise.
1963 (boot_mod_SOURCES): Removed.
1964 (boot_mod_CFLAGS): Likewise.
1965 (boot_mod_LDFLAGS): Likewise.
1966
1967 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1968 kern/corecmd.c.
1969 (kernel_img_HEADERS): Add command.h.
1970 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1971 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1972 and lib/arg.c.
1973 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1974 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1975 remove the corresponding normal mode command.
1976 (normal_mod_SOURCES): Remove normal/arg.c.
1977 * conf/i386-coreboot.rmk: Likewise.
1978 * conf/i386-efi.rmk: Likewise.
1979 * conf/i386-ieee1275.rmk: Likewise.
1980 * conf/powerpc-ieee1275.rmk: Likewise.
1981 * conf/x86_64-efi.rmk: Likewise.
1982
1983 * include/grub/arg.h: Move from here ...
1984 * include/grub/lib/arg.h: ... to here.
1985
1986 * normal/arg.c: Move from here ...
1987 * lib/arg.c: ... to here.
1988
1989 * commands/extcmd.c: New file.
1990 * commands/minicmd.c: Likewise.
1991 * include/grub/command.h: Likewise.
1992 * include/grub/extcmd.h: Likewise.
1993 * kern/command.c: Likewise.
1994 * kern/corecmd.c: Likewise.
1995
1996 * kern/list.c (grub_list_iterate): Return int instead of void.
1997 (grub_list_insert): New function.
1998 (grub_prio_list_insert): Likewise.
1999
2000 * kern/rescue.c (grub_rescue_command): Removed.
2001 (grub_rescue_command_list): Likewise.
2002 (grub_rescue_register_command): Likewise.
2003 (grub_rescue_unregister_command): Likewise.
2004 (grub_rescue_cmd_boot): Move to minicmd.c
2005 (grub_rescue_cmd_help): Likewise.
2006 (grub_rescue_cmd_info): Likewise.
2007 (grub_rescue_cmd_boot): Likewise.
2008 (grub_rescue_cmd_testload): Likewise.
2009 (grub_rescue_cmd_dump): Likewise.
2010 (grub_rescue_cmd_rmmod): Likewise.
2011 (grub_rescue_cmd_lsmod): Likewise.
2012 (grub_rescue_cmd_exit): Likewise.
2013 (grub_rescue_print_devices): Moved to corecmd.c.
2014 (grub_rescue_print_files): Likewise.
2015 (grub_rescue_cmd_ls): Likewise.
2016 (grub_rescue_cmd_insmod): Likewise.
2017 (grub_rescue_cmd_set): Likewise.
2018 (grub_rescue_cmd_unset): Likewise.
7d074e3c 2019 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 2020 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 2021 commands, remove grub_rescue_register_command calls.
b1b797cb 2022
7d074e3c 2023 * normal/command.c (grub_register_command): Removed.
b1b797cb 2024 (grub_unregister_command): Likewise.
2025 (grub_command_find): Likewise.
2026 (grub_iterate_commands): Likewise.
2027 (rescue_command): Likewise.
2028 (export_command): Moved to corecmd.c.
2029 (set_command): Removed.
2030 (unset_command): Likewise.
2031 (insmod_command): Likewise.
2032 (rmmod_command): Likewise.
2033 (lsmod_command): Likewise.
2034 (grub_command_init): Likewise.
2035
2036 * normal/completion.c (iterate_command): Use cmd->prio to check for
2037 active command.
2038 (complete_arguments): Use grub_extcmd_t structure to find options.
2039 (grub_normal_do_completion): Change function grub_iterate_commands to
2040 grub_command_iterate.
2041
2042 * normal/execute.c (grub_script_execute_cmd): No need to parse
2043 argument here.
2044
2045 * normal/main.c (grub_dyncmd_dispatcher): New function.
2046 (read_command_list): Register unload commands as dyncmd.
2047 (grub_cmd_normal): Use new command interface, register rescue,
2048 unregister normal at entry, register normal, unregister rescue at exit.
2049
2050 * include/grub/list.h (grub_list_test_t): New type.
2051 (grub_list_iterate): Return int instead of void.
2052 (grub_list_insert): New function.
2053 (GRUB_AS_NAMED_LIST_P): New macro.
2054 (GRUB_AS_PRIO_LIST): Likewise.
2055 (GRUB_AS_PRIO_LIST_P): Likewise.
2056 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2057 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2058 (grub_prio_list): New structure.
2059 (grub_prio_list_insert): New function.
2060 (grub_prio_list_remove): New inline function.
2061
2062 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2063 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2064 (GRUB_COMMAND_FLAG_MENU): Likewise.
2065 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2066 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2067 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2068 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2069 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2070 (grub_command): Likewise.
2071 (grub_register_command): Likewise.
2072 (grub_command_find): Likewise.
2073 (grub_iterate_commands): Likewise.
2074 (grub_command_init): Likewise.
2075 (grub_arg_parse): Likewise.
2076 (grub_arg_show_help): Likewise.
2077
2078 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2079 (grub_rescue_unregister_command): Likewise.
2080
2081 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2082 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2083 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2084
2085 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2086 grub_rescue_cmd_initrd.
2087 * include/grub/i386/loader.h: Likewise.
2088 * include/grub/x86_64/loader.h: Likewise.
2089
2090 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2091
1f4147aa 20922009-03-21 Bean <bean123ch@gmail.com>
2093
2094 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2095 instead of stat in mingw environment.
2096
2097 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2098
2099 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2100
2101 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2102 AC_CONFIG_LINKS.
2103
2156d5ba 21042009-03-21 Bean <bean123ch@gmail.com>
2105
2106 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2107 out of range error.
2108
177b82ca 21092009-03-18 Michel Dänzer <michel@daenzer.net>
2110
2111 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2112 checking inode flags for EXT4_EXTENTS_FLAG.
2113
14aad807 21142009-03-18 Robert Millan <rmh@aybabtu.com>
2115
2116 * loader/i386/linux.c: Include `<grub/video.h>' and
2117 `<grub/i386/pc/vbe.h>'..
2118 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2119 (grub_linux32_boot): Attempt to configure video settings with
2120 grub_linux_setup_video().
2121 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2122 to avoid grub_console_fini() which would step out of graphical mode
2123 unconditionally.
2124
8cf83a27 21252009-03-14 Robert Millan <rmh@aybabtu.com>
2126
2127 Fix build on powerpc.
2128 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2129
40164e75 21302009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2131
2132 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2133 background image command.
2134
c58bc32a 21352009-03-12 Colin D Bennett <colin@gibibit.com>
2136
2137 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2138 (grub_gfxterm_putchar): Extract pairs of identical calls to
2139 draw_cursor out of conditional blocks.
2140
5415144a 21412009-03-11 Pavel Roskin <proski@gnu.org>
2142
2143 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2144 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2145
6394042e 21462009-03-11 Robert Millan <rmh@aybabtu.com>
2147
2148 * loader/i386/multiboot_elfxx.c
2149 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2150
b7b50e5f 21512009-03-11 Felix Zielcke <fzielcke@z-51.de>
2152
2153 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2154 `kern/handler.c'.
2155
1ca7fc96 21562009-03-11 Robert Millan <rmh@aybabtu.com>
2157
2158 * loader/i386/multiboot.c (code_size): New variable.
2159 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 2160 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 2161 4-byte alignment to MBI and others by increasing
7d074e3c 2162 `boot_loader_name_length' appropriately.
1ca7fc96 2163
2164 * loader/i386/multiboot_elfxx.c
2165 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2166
a83ea1d2 21672009-03-09 Felix Zielcke <fzielcke@z-51.de>
2168
2169 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2170 `fs/ext2.c'.
2171
aa9f3bff 21722009-03-08 Robert Millan <rmh@aybabtu.com>
2173
2174 Make loader/i386/linux.c usable on i386-pc again.
2175
2176 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2177 memory to heap.
2178 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2179 `#error' stanza.
2180
d8b3b60e 21812009-03-07 Bean <bean123ch@gmail.com>
2182
2183 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2184 allocation.
2185
b362c9e9 21862009-03-06 Robert Millan <rmh@aybabtu.com>
2187
2188 Fix display issue on terminals with screen size other than 80x25
2189 (e.g. gfxterm with resolution higher than 640x480).
2190
2191 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 2192 position relative to the center of the terminal instead of relying
b362c9e9 2193 on a hardcoded offset.
2194
9304eef1 21952009-03-04 Robert Millan <rmh@aybabtu.com>
2196
2197 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2198 installed.
2199
2200 * Makefile.in (host_kernel): New variable.
2201 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2202 scripts instead of just the windows one.
2203 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2204
eabc95fb 22052009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 2206
2207 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2208 `kern/handler.c'.
2209 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2210 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2211 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2212 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2213 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2214 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2215
ceb1223c 22162009-03-04 Felix Zielcke <fzielcke@z-51.de>
2217
2218 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2219 or if there's no space for the disk label and print the partition number on a
2220 invalid magic.
2221
4910684a 22222009-03-04 Felix Zielcke <fzielcke@z-51.de>
2223
2224 * util/misc.c: Include <time.h>.
2225 (grub_millisleep): New function.
2226
7e9ca17a 22272009-03-04 Bean <bean123ch@gmail.com>
2228
2229 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2230 another option -mno-red-zone.
2231
2232 * commands/handler.c: Change module description.
2233
2234 * kern/handler.c: Add missing space at the end of description line.
2235
2236 * kern/list.c: Likewise.
2237
f501677c 22382009-03-03 Robert Millan <rmh@aybabtu.com>
2239
2240 Move more components to the relocation area, and fix mbi pointer
2241 handling to use the destination rather than the origin (thanks to
2242 Vladimir Serbinenko for spotting).
2243
2244 * loader/i386/multiboot.c (mbi_dest): New variable.
2245 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2246 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2247 relocation area.
2248
9902d047 22492009-03-01 Bean <bean123ch@gmail.com>
2250
50fb7002 2251 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 2252 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2253 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2254 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2255
2256 * loader/i386/efi/linux.c (acpi_guid): New variable.
2257 (acpi_guid): Likewise.
2258 (EBDA_SEG_ADDR): New constant.
2259 (LOW_MEM_ADDR): Likewise.
2260 (FAKE_EBDA_SEG): Likewise.
2261 (fake_bios_data): New function.
2262 (grub_linux_boot): Call fake_bios_data.
2263
71b9f361 22642009-03-01 Bean <bean123ch@gmail.com>
2265
2266 * commands/terminal.c: Removed.
2267
2268 * commands/handler.c: New file.
2269
2270 * include/grub/list.h: Likewise.
2271
2272 * include/grub/handler.h: Likewise.
2273
2274 * kern/list.c: Likewise.
2275
2276 * kern/handler.c: Likewise.
2277
2278 * kern/term.h: Include header file <grub/handler.h>.
2279 (grub_term_input): Move next field to the beginning.
2280 (grub_term_output): Likewise.
2281 (grub_term_input_class): New variable.
2282 (grub_term_output_class): Likewise.
2283 (grub_term_register_input): Changed to inline function.
2284 (grub_term_register_output): Likewise.
2285 (grub_term_unregister_input): Likewise.
2286 (grub_term_unregister_output): Likewise.
2287 (grub_term_set_current_input): Likewise.
2288 (grub_term_set_current_output): Likewise.
2289 (grub_term_get_current_input): Likewise.
2290 (grub_term_get_current_output): Likewise.
2291 (grub_term_iterate_input): Removed.
2292 (grub_term_iterate_output): Likewise.
2293
2294 * kern/term.c (grub_term_list_input): Removed.
2295 (grub_term_list_output): Likewise.
2296 (grub_term_input_class): New variable.
2297 (grub_term_output_class): Likewise.
50fb7002 2298 (grub_cur_term_input): Change variable as macro.
71b9f361 2299 (grub_cur_term_output): Likewise.
2300 (grub_term_register_input): Removed.
2301 (grub_term_register_output): Likewise.
2302 (grub_term_unregister_input): Likewise.
2303 (grub_term_unregister_output): Likewise.
2304 (grub_term_set_current_input): Likewise.
2305 (grub_term_set_current_output): Likewise.
2306 (grub_term_iterate_input): Likewise.
2307 (grub_term_iterate_output): Likewise.
2308 (grub_term_get_current_input): Likewise.
2309 (grub_term_get_current_output): Likewise.
2310
2311 * util/grub-editenv.c: Include header file <grub/handler.h>.
2312 (grub_term_get_current_input): Removed.
2313 (grub_term_get_current_output): Likewise.
2314 (grub_term_input_class): New variable.
50fb7002 2315 (grub_term_output_class): Likewise.
71b9f361 2316
2317 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2318 (grub_term_get_current_output): Likewise.
2319 (grub_term_input_class): New variable.
50fb7002 2320 (grub_term_output_class): Likewise.
71b9f361 2321
2322 * util/grub-probe.c (grub_term_get_current_input): Removed.
2323 (grub_term_get_current_output): Likewise.
2324 (grub_term_input_class): New variable.
50fb7002 2325 (grub_term_output_class): Likewise.
71b9f361 2326
2327 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2328 (grub_term_get_current_output): Likewise.
2329 (grub_term_input_class): New variable.
50fb7002 2330 (grub_term_output_class): Likewise.
71b9f361 2331
2332 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2333 (terminal_mod_SOURCES): Likewise.
2334 (terminal_mod_CFLAGS): Likewise.
2335 (terminal_mod_LDFLAGS): Likewise.
2336
2337 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2338 handler.c.
2339 (kernel_img_SOURCES): Add list.c and handler.c.
2340 (kernel_img_HEADERS): Add list.h and handler.h.
2341
2342 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2343 handler.c.
2344 (kernel_mod_SOURCES): Add list.c and handler.c.
2345 (kernel_mod_HEADERS): Add list.h and handler.h.
2346
2347 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2348 handler.c.
2349 (kernel_elf_SOURCES): Add list.c and handler.c.
2350 (kernel_elf_HEADERS): Add list.h and handler.h.
2351
2352 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2353 handler.c.
2354 (kernel_elf_SOURCES): Add list.c and handler.c.
2355 (kernel_elf_HEADERS): Add list.h and handler.h.
2356
2357 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2358 handler.c.
2359 (kernel_mod_SOURCES): Add list.c and handler.c.
2360 (kernel_mod_HEADERS): Add list.h and handler.h.
2361
2362 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2363 handler.c.
2364 (kernel_elf_SOURCES): Add list.c and handler.c.
2365 (kernel_elf_HEADERS): Add list.h and handler.h.
2366
8a31787f 23672009-02-27 Robert Millan <rmh@aybabtu.com>
2368
2369 Factorize elf32 / elf64 code in Multiboot loader. This will
2370 prevent it from getting out of sync again.
2371
2372 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2373 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2374 grub_multiboot_load_elf64): Move from here ...
2375 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2376 grub_multiboot_load_elf): ... to here (new file).
2377
51cd3dfc 23782009-02-27 Robert Millan <rmh@aybabtu.com>
2379
2380 * util/grub.d/10_linux.in: Rename "single-user mode" to
2381 "recovery mode".
2382
6e8c9c3a 23832009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2384
2385 Don't leak in SCSI code.
2386 * disk/scsi.c (grub_scsi_close): free `scsi'.
2387
4b6bf4f9 23882009-02-27 Robert Millan <rmh@aybabtu.com>
2389
2390 * loader/i386/pc/multiboot.c: Move from here ...
2391 * loader/i386/multiboot.c: ... to here. Update all users.
2392
b9413424 23932009-02-27 Robert Millan <rmh@aybabtu.com>
2394
2395 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2396 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2397
50fb7002 23982009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 2399
2400 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2401 b-tree.
2402
8cc50345 24032009-02-27 Robert Millan <rmh@aybabtu.com>
2404
2405 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2406 `0x' qualifier as 0 when base is specified as parameter).
2407
6e09b8b7 24082009-02-24 Bean <bean123ch@gmail.com>
2409
2410 * configure.ac: Check for -mcmodel=large in x86_64 target.
2411
2412 * include/grub/efi/api.h (efi_call_10): New macro.
2413 (efi_wrap_10): New function.
2414
2415 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2416 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2417 (GRUB_PE32_REL_BASED_LOW): Likewise.
2418 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2419 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2420 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2421 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2422 (GRUB_PE32_REL_BASED_REL): Likewise.
2423 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2424 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2425 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2426
2427 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2428 issue.
2429
2430 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2431 (efi_wrap_10): New function.
2432
2433 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2434
2435 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2436 MB/MBP model (NV chipset).
2437 (devdata_devs): Add devpath_5 to the list.
2438
2439 * load/i386/efi/linux.c (video_base): Remove variable.
2440 (RGB_MASK): New macro.
2441 (RGB_MAGIC): Likewise.
2442 (LINE_MIN): Likewise.
2443 (LINE_MAX): Likewise.
2444 (FBTEST_STEP): Likewise.
2445 (FBTEST_COUNT): Likewise.
2446 (fb_list): New variable.
2447 (grub_find_video_card): Remove function.
2448 (find_framebuf): New function.
2449 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2450 line length.
2451
2452 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2453 problem for x86_64.
2454
74b21bee 24552009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2456
2457 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2458
2459 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2460 coding tool name.
2461
a455f472 24622009-02-22 Robert Millan <rmh@aybabtu.com>
2463
2464 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2465 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2466 in our relocation, instead of using it directly from heap. Also
2467 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2468
6374daf3 24692009-02-21 Robert Millan <rmh@aybabtu.com>
2470
2471 Implement USB keyboard support (based on patch by Marco Gerards)
2472
2473 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2474 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2475 (usb_keyboard_mod_LDFLAGS): New variables.
2476
2477 * term/usb_keyboard.c: New file.
2478
8fa4ea70 24792009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2480
2481 Corrected wrong declaration
2482
2483 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2484
353976ac 24852009-02-14 Christian Franke <franke@computer.org>
2486
2487 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2488 (grub_lspci_iter): Print class code and programming interface byte.
2489
6aa1169b 24902009-02-14 Christian Franke <franke@computer.org>
2491
2492 * gendistlist.sh: Ignore `.svn' directories.
2493
265372ca 24942009-02-14 Felix Zielcke <fzielcke@z-51.de>
2495
2496 * fs/fat.c: Add 2009 to Copyright line.
2497
9ff516f3 24982009-02-14 Christian Franke <franke@computer.org>
2499
2500 * commands/hdparm.c: New file. Provides `hdparm' command
2501 which sends ATA commands via grub_disk_ata_pass_through ().
2502
2503 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2504
2505 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2506 and <grub/cpu/io.h> to include/grub/ata.h.
2507 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2508 (GRUB_CDROM_SECTOR_SIZE): Remove.
2509 (GRUB_ATA_*): Move to include/grub/ata.h.
2510 (GRUB_ATAPI_*): Likewise.
2511 (enum grub_ata_commands): Likewise.
2512 (enum grub_ata_timeout_milliseconds): Likewise.
2513 (struct grub_ata_device): Likewise.
2514 (grub_ata_regset): Likewise.
2515 (grub_ata_regget): Likewise.
2516 (grub_ata_regset2): Likewise.
2517 (grub_ata_regget2): Likewise.
2518 (grub_ata_check_ready): Likewise.
2519 (grub_ata_wait_not_busy): Remove static, exported in
2520 include/grub/ata.h.
2521 (grub_ata_wait_drq): Likewise.
2522 (grub_ata_pio_read): Likewise.
2523
2524 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
2525 function for hdparm.mod.
2526
2527 * include/grub/ata.h: New file, contains declarations from
2528 disk/ata.c.
2529 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2530
2531 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2532 (grub_disk_ata_pass_through): New exported variable.
2533
2534 * kern/disk.c (grub_disk_ata_pass_through): New variable.
2535
772e23da 25362009-02-13 Colin D Bennett <colin@gibibit.com>
2537
2538 Support multiple fallback entries, and provide an API to support
2539 executing default+fallback menu entries. Renamed the `terminal' menu
2540 viewer to `text'.
2541
2542 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2543 variable declaration.
2544 (grub_menu_execute_callback): New structure declaration.
2545 (grub_menu_execute_callback_t): New typedef.
2546 (grub_menu_execute_with_fallback): New function declaration.
2547 (grub_menu_get_entry): Likewise.
2548 (grub_menu_get_timeout): Likewise.
2549 (grub_menu_set_timeout): Likewise.
2550
2551 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2552
2553 * normal/menu.c (grub_wait_after_message): Moved to
2554 `normal/menu_text.c'.
2555 (draw_border): Likewise.
2556 (print_message): Likewise.
2557 (print_entry): Likewise.
2558 (print_entries): Likewise.
2559 (grub_menu_init_page): Likewise.
2560 (get_entry_number): Likewise.
2561 (print_timeout): Likewise.
2562 (run_menu): Likewise.
2563 (grub_menu_execute_entry): Likewise.
2564 (show_text_menu): Likewise.
2565 (get_and_remove_first_entry_number): New function.
2566 (grub_menu_execute_with_fallback): Likewise.
2567 (get_entry): Renamed to ...
2568 (grub_menu_get_entry): .. this and made it global.
2569 (get_timeout): Renamed to ...
2570 (grub_menu_get_timeout): ... this and made it global.
2571 (set_timeout): Renamed to ...
2572 (grub_menu_set_timeout): ... this and made it global.
2573 (grub_normal_terminal_menu_viewer): Renamed to ...
2574 (grub_normal_text_menu_viewer): ... this.
2575
2576 * normal/menu_text.c: New file. Extracted text-menu-specific code
2577 from normal/menu.c.
2578
2579 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2580 (normal_mod_SOURCES): Likewise.
2581
2582 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2583 (normal_mod_SOURCES): Likewise.
2584
2585 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2586 (normal_mod_SOURCES): Likewise.
2587
2588 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2589 (normal_mod_SOURCES): Likewise.
2590
2591 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2592 (normal_mod_SOURCES): Likewise.
2593
2594 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2595 (normal_mod_SOURCES): Likewise.
2596
2597 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2598 (normal_mod_SOURCES): Likewise.
2599
16ac430e 26002009-02-11 Robert Millan <rmh@aybabtu.com>
2601
2602 * util/grub.d/00_header.in: Update old reference to `font' command.
2603
06ff20fc 26042009-02-10 Felix Zielcke <fzielcke@z-51.de>
2605
2606 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2607
2608 Based on patch from Javier Martín.
2609
96da9407 26102009-02-09 Felix Zielcke <fzielcke@z-51.de>
2611
2612 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 2613 to avoid false positives with FAT.
96da9407 2614 (grub_fstest_SOURCES): Likewise.
2615 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2616 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2617 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2618 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2619 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2620 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2621
6dca6fe4 26222009-02-09 Felix Zielcke <fzielcke@z-51.de>
2623
06ff20fc 2624 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 2625 bpb.version_specific.fat12_or_fat16.fstype and
2626 bpb.version_specific.fat32.fstype.
2627
2550c62f 26282009-02-08 Robert Millan <rmh@aybabtu.com>
2629
be110b30 2630 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 2631
56978920 26322009-02-08 Robert Millan <rmh@aybabtu.com>
2633
2634 * Makefile.in (host_os, host_cpu): New variables.
2635 (target_os): Remove. Update all users.
2636
d64399b5 26372009-02-08 Marco Gerards <marco@gnu.org>
2638
2639 * Makefile.in (enable_grub_emu_usb): New variable.
2640 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2641 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2642 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2643 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2644 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2645 `usbtest.mod' and `usbms.mod'.
2646 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2647 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2648 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2649 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2650 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2651 variables.
2652
2653 * disk/usbms.c: New file.
2654
2655 * include/grub/usb.h: Likewise.
2656
2657 * include/grub/usbtrans.h: Likewise.
2658
2659 * include/grub/usbdesc.h: Likewise.
2660
2661 * bus/usb/usbtrans.c: Likewise.
2662
2663 * bus/usb/ohci.c: Likewise.
2664
2665 * bus/usb/uhci.c: Likewise.
2666
2667 * bus/usb/usbhub.c: Likewise.
2668
2669 * bus/usb/usb.c: Likewise.
2670
2671 * commands/usbtest.c: Likewise.
2672
2673 * util/usb.c: Likewise.
50fb7002 2674
d64399b5 2675 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2676
2677 * configure.ac: Test for libusb presence.
50fb7002 2678
d64399b5 2679 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2680
2b40d6bb 26812009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
2682
2683 * kern/mm.c: Add more comments.
2684
73a4ce81 26852009-02-08 Robert Millan <rmh@aybabtu.com>
2686
2687 Patch from Javier Martín.
2688 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2689 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2690
f821ce59 26912009-02-08 Robert Millan <rmh@aybabtu.com>
2692
2693 * fs/cpio.c: Split tar functionality to ...
2694 * fs/tar.c: ... here (new file). Update all users.
2695
aebfc4b0 26962009-02-07 Robert Millan <rmh@aybabtu.com>
2697
2698 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2699 backward-incompatible features.
2700
2701 Based on patch from Javier Martín, with some adjustments.
2702
50fb7002 27032009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 2704
2705 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2706
0bb5115e 27072009-02-07 Robert Millan <rmh@aybabtu.com>
2708
2709 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2710 position of `disk/lvm.c' to ensure grub_init_all() always picks it
2711 after the RAID stuff.
2712
38a0f8e7 27132009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
2714
50fb7002 2715 Fixes problem when running vbetest command as reported by
38a0f8e7 2716 Vladimir Serbinenko <phcoder@gmail.com>.
2717
2718 * (grub_vbe_set_video_mode): Fixed problem with text modes.
2719
3143cc1c 27202009-02-04 Felix Zielcke <fzielcke@z-51.de>
2721
2722 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2723 /dev/md/NpN style mdraid devices.
2724
9cba6fce 27252009-02-03 Felix Zielcke <fzielcke@z-51.de>
2726
2727 * util/unifont2pff.rb: Remove.
2728
e507a2c1 27292009-02-03 Felix Zielcke <fzielcke@z-51.de>
2730
2731 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2732 `#'.
2733
d2c2b4cd 27342009-02-03 Felix Zielcke <fzielcke@z-51.de>
2735
2736 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2737 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2738 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2739 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2740 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2741 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2742 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2743
b4315fb0 27442009-02-02 Christian Franke <franke@computer.org>
2745
2746 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2747
de3aa260 27482009-02-01 Felix Zielcke <fzielcke@z-51.de>
2749
7c3ff286 2750 * INSTALL: Note that we now require at least autoconf 2.59 and
2751 that LZO is optional.
de3aa260 2752
825a182b 27532009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2754
2755 Base on patch on bug #24154 created by Tomas Tintera
2756 <trosos@seznam.cz>.
2757
2758 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2759
a69ef770 27602009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2761
7c3ff286 2762 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 2763 <bero@arklinux.org>.
2764
2765 * normal/parser.y (script_init): Add missing semicolon.
2766
6fa42fa6 27672009-01-31 Colin D Bennett <colin@gibibit.com>
2768
7c3ff286 2769 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 2770 (free_menu_entry_classes): Added.
2771 (grub_normal_menu_addentry): Added class property handling.
2772 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2773 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2774
2775 * normal/menu_viewer.c: New file.
2776
2777 * normal/menu.c (run_menu_entry): Renamed to ...
2778 (grub_menu_execute_entry): ... this and made it as global.
2779 (grub_menu_run): Renamed to ...
2780 (show_text_menu): ... this and made it local.
2781 (show_text_menu): Adapt to new function names.
2782 (grub_normal_terminal_menu_viewer): New global variable.
2783
2784 * include/grub/menu.h: New file.
2785
2786 * include/grub/menu_viewer.h: New file.
2787
2788 * include/grub/normal.h: Added include to grub/menu.h.
2789 (grub_menu_entry): Moved to include/grub/menu.h.
2790 (grub_menu_entry_t): Likewise.
2791 (grub_menu): Likewise.
2792 (grub_menu_t): Likewise.
2793 (grub_normal_terminal_menu_viewer): Added.
2794 (grub_menu_execute_entry): Likewise.
2795 (grub_menu_run): Removed.
2796
2797 * DISTLIST: Added include/grub/menu.h.
2798 Added include/grub/menu_viewer.h.
2799 Added normal/menu_viewer.c.
2800
28012009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
2802
2803 * normal/execute.c (grub_script_execute_menuentry): Changed to use
2804 arglist for menutitle arguments.
2805
2806 * normal/main.c (grub_normal_menu_addentry): Likewise.
2807
2808 * normal/parser.y (menuentry): Likewise.
2809
2810 * normal/script.c (grub_script_create_cmdmenu): Likewise.
2811
2812 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2813 (grub_script_create_cmdmenu): Likewise.
2814
2815 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2816
2817 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2818 changes.
2819
2820 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2821
2822 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2823
2824 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2825
2826 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2827
2828 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2829
2830 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2831
56192c23 28322009-01-30 Christian Franke <franke@computer.org>
2833
2834 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2835 in option help text.
2836
d72521b3 28372009-01-27 Pavel Roskin <proski@gnu.org>
2838
2839 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2840
994b5e84 28412009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2842
2843 * commands/lsmmap.c: Add include to grub/machine/memory.h.
2844
2845 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2846
2847 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2848 unregister function.
2849
6a7eab2c 28502009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2851
2852 * disk/scsi.c (grub_scsi_read): Fix sign problem.
2853
2854 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2855
2856 * util/grub-mkfont.c (usage): Fix typo.
2857
2858 * util/elf/grub-mkimage.c (load_modules): Fix warning.
2859
1806b56e 28602009-01-26 Daniel Mierswa <impulze@impulze.org>
2861
3fb18f09 2862 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2863
336e1fb9 2864 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2865
1806b56e 2866 * kern/misc.c (grub_strcasecmp): New function.
2867 (grub_strcasecmp): Use grub_size_t instead of int for length.
2868 Fix return value.
2869 * include/grub/misc.h: Update function prototypes.
2870
580b2a0f 28712009-01-26 Robert Millan <rmh@aybabtu.com>
2872
2873 * configure.ac: Fix cross-compilation check.
ef257b36 2874
d31c24f1 28752009-01-22 Christian Franke <franke@computer.org>
2876
2877 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2878 (precision) digit string. Allow `.format2' without `format1' (width).
2879 Limit input chars for `%s' output to `format2' if specified. This is
2880 compatible with standard printf ().
2881
3138b44c 28822009-01-22 Christian Franke <franke@computer.org>
2883
2884 * disk/ata.c (grub_ata_wait_status): Replace by ...
2885 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
2886 other status bits may be invalid while BSY is asserted.
2887 (grub_ata_check_ready): New function.
2888 (grub_ata_cmd): Removed.
2889 (grub_ata_wait_drq): New function.
2890 (grub_ata_strncpy): Remove inline.
2891 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
2892 and error check now done by grub_ata_wait_drq ().
2893 (grub_ata_pio_write): Likewise.
2894 (grub_atapi_identify): Set DEV before check for !BSY. Use
2895 grub_ata_wait_drq () to wait for data.
2896 (grub_ata_device_initialize): Add status register check to
2897 detect missing SATA slave devices. Add debug messages.
2898 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2899 (grub_atapi_packet): Set DEV before check for !BSY. Replace
2900 transfer loop by grub_ata_pio_write ().
2901 (grub_ata_identify): Set DEV before check for !BSY. Use
2902 grub_ata_wait_drq () to wait for data.
ef257b36 2903 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 2904 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2905 read/write in one loop. Fix invalid command on write. Fix incomplete
2906 command on (size % batch) == 0. Add missing error check after write of
2907 last block. Add debug messages.
2908 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
2909
59a64ef6 29102009-01-19 Christian Franke <franke@computer.org>
2911
2912 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2913 (GRUB_ATAPI_IREASON_*): Likewise.
2914 (grub_ata_pio_write): Fix timeout error return.
2915 (grub_atapi_identify): Add grub_ata_wait () after cmd.
2916 (grub_atapi_wait_drq): New function.
2917 (grub_atapi_packet): New parameter `size'.
2918 Use grub_atapi_wait_drq () and direct write instead of
2919 grub_ata_pio_write ().
2920 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2921 reads the number of bytes requested by the device for each DRQ
2922 assertion.
2923 (grub_atapi_write): Remove old implementation, return not
2924 implemented instead.
2925
1cfe20b3 29262009-01-19 Christian Franke <franke@computer.org>
2927
2928 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2929 of 512 to calculate data size.
2930 (grub_scsi_read12): Likewise.
2931 (grub_scsi_write10): Likewise.
2932 (grub_scsi_write12): Likewise.
2933 (grub_scsi_read): Adjust size according to blocksize.
2934 Add checks for invalid blocksize and unaligned transfer.
2935
bee5fe5d 29362009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
2937
2938 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2939
ef257b36 2940 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 2941 width glyphs.
2942
3e643f8c 29432009-01-19 Robert Millan <rmh@aybabtu.com>
2944
2945 * config.guess: Update to latest version from config git.
2946 * config.sub: Likewise.
2947
4fa80998 29482009-01-17 Felix Zielcke <fzielcke@z-51.de>
2949
2950 * Makefile.in: Change font compilation to use new grub-mkfont instead
2951 of java version.
2952
2953 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2954 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2955 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2956 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2957 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2958 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2959 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2960 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2961 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2962
7086085b 29632009-01-16 Christian Franke <franke@computer.org>
2964
2965 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2966 (enum grub_ata_timeout_milliseconds): New enum.
2967 (grub_ata_wait_status): Add parameter milliseconds.
2968 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
2969 recovery from timed-out commands.
2970 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
2971 return grub_errno instead of REG_ERROR.
2972 (grub_ata_pio_write): Add parameter milliseconds.
2973 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2974 Pass milliseconds to grub_ata_wait_status () and
2975 grub_ata_pio_read ().
2976 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2977 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
2978 grub_ata_wait_status (). Fix IDENTIFY timeout check.
2979 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2980 It is not suitable for device detection, because DEV bit is ignored,
2981 the command may run too long, and not all devices set the signature
2982 properly.
2983 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2984 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2985 Fix device selection, DEV bit must be set first to address the registers
2986 of the correct device.
2987 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2988 grub_ata_pio_read/write ().
2989 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2990 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2991
4a412913 29922009-01-13 Carles Pina i Estany <carles@pina.cat>
2993
2994 * util/grub-editenv.c (main): Use fseeko(), not fseek().
2995
7795c55e 29962009-01-13 Bean <bean123ch@gmail.com>
d913988c 2997
2998 * util/grub-mkfont.c (write_font): forget to remove some debug code.
2999
7795c55e 30002009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 3001
3002 * Makefile.in: (enable_grub_mkfont): New variable.
3003 (freetype_cflags): Likewise.
3004 (freetype_libs): Likewise.
3005
3006 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3007 (grub_mkfont_SOURCES): New variable.
3008 (grub_mkfont_CFLAGS): Likewise.
3009 (grub_mkfont_LDFLAGS): Likewise.
3010
3011 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3012 library if `--enable-grub-mkfont' is requested.
3013 (enable_grub_mkfont): New variable.
3014 (freetype_cflags): Likewise.
3015 (freetype_libs): Likewise.
3016
3017 * util/grub-mkfont.c: New file.
3018
093af1fe 30192009-01-12 Christian Franke <franke@computer.org>
3020
3021 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3022 mode check. Fix setting of compat_use[].
3023
f36cc108 30242009-01-10 Robert Millan <rmh@aybabtu.com>
3025
3026 Update a few copyright years which we forgot to do in 2008 (only for
3027 files whose changes made in 2008 were copyright-significant)
3028
3029 * Makefile.in: Add 2008 to Copyright line.
3030 * disk/ieee1275/ofdisk.c: Likewise.
3031 * disk/efi/efidisk.c: Likewise.
3032 * kern/dl.c: Likewise.
3033 * kern/sparc64/ieee1275/init.c: Likewise.
3034 * kern/mm.c: Likewise.
3035 * kern/efi/mm.c: Likewise.
3036 * boot/i386/pc/boot.S: Likewise.
3037 * genfslist.sh: Likewise.
3038 * fs/iso9660.c: Likewise.
3039 * fs/hfs.c: Likewise.
3040 * fs/jfs.c: Likewise.
3041 * fs/minix.c: Likewise.
3042 * fs/ufs.c: Likewise.
3043 * gensymlist.sh.in: Likewise.
3044 * genkernsyms.sh.in: Likewise.
3045 * include/grub/misc.h: Likewise.
3046 * include/grub/types.h: Likewise.
3047 * include/grub/symbol.h: Likewise.
3048 * include/grub/elf.h: Likewise.
3049 * include/grub/kernel.h: Likewise.
3050 * include/grub/disk.h: Likewise.
3051 * include/grub/dl.h: Likewise.
3052 * include/grub/i386/linux.h: Likewise.
3053 * include/grub/i386/pc/biosdisk.h: Likewise.
3054 * include/grub/efi/api.h: Likewise.
3055 * include/grub/efi/pe32.h: Likewise.
3056 * include/grub/util/misc.h: Likewise.
3057 * normal/execute.c: Likewise.
3058 * normal/arg.c: Likewise.
3059 * normal/completion.c: Likewise.
3060 * normal/lexer.c: Likewise.
3061 * normal/parser.y: Likewise.
3062 * normal/misc.c: Likewise.
3063 * commands/i386/pc/vbeinfo.c: Likewise.
3064 * commands/hexdump.c: Likewise.
3065 * commands/terminal.c: Likewise.
3066 * commands/ls.c: Likewise.
3067 * commands/help.c: Likewise.
3068 * partmap/pc.c: Likewise.
3069 * loader/efi/chainloader.c: Likewise.
3070 * loader/multiboot_loader.c: Likewise.
3071 * loader/i386/pc/multiboot2.c: Likewise.
3072 * term/efi/console.c: Likewise.
3073 * term/i386/pc/serial.c: Likewise.
3074 * util/lvm.c: Likewise.
3075 * util/console.c: Likewise.
3076 * util/i386/efi/grub-mkimage.c: Likewise.
3077 * util/raid.c: Likewise.
3078
7f02114b 30792009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3080
3081 * commands/videotest.c: Removed include to grub/machine/memory.h.
3082
3083 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3084 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3085 (video_mod_SOURCES): Removed.
3086 (video_mod_CFLAGS): Likewise.
3087 (video_mod_LDFLAGS): Likewise.
3088 (gfxterm_mod_SOURCES): Likewise.
3089 (gfxterm_mod_CFLAGS): Likewise.
3090 (gfxterm_mod_LDFLAGS): Likewise.
3091 (videotest_mod_SOURCES): Likewise.
3092 (videotest_mod_CFLAGS): Likewise.
3093 (videotest_mod_LDFLAGS): Likewise.
3094 (bitmap_mod_SOURCES): Likewise.
3095 (bitmap_mod_CFLAGS): Likewise.
3096 (bitmap_mod_LDFLAGS): Likewise.
3097 (tga_mod_SOURCES): Likewise.
3098 (tga_mod_CFLAGS): Likewise.
3099 (tga_mod_LDFLAGS): Likewise.
3100 (jpeg_mod_SOURCES): Likewise.
3101 (jpeg_mod_CFLAGS): Likewise.
3102 (jpeg_mod_LDFLAGS): Likewise.
3103 (png_mod_SOURCES): Likewise.
3104 (png_mod_CFLAGS): Likewise.
3105 (png_mod_LDFLAGS): Likewise.
3106
3107 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3108 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3109 (video_mod_SOURCES): Added.
3110 (video_mod_CFLAGS): Likewise.
3111 (video_mod_LDFLAGS): Likewise.
3112 (videotest_mod_SOURCES): Likewise.
3113 (videotest_mod_CFLAGS): Likewise.
3114 (videotest_mod_LDFLAGS): Likewise.
3115 (bitmap_mod_SOURCES): Likewise.
3116 (bitmap_mod_CFLAGS): Likewise.
3117 (bitmap_mod_LDFLAGS): Likewise.
3118 (tga_mod_SOURCES): Likewise.
3119 (tga_mod_CFLAGS): Likewise.
3120 (tga_mod_LDFLAGS): Likewise.
3121 (jpeg_mod_SOURCES): Likewise.
3122 (jpeg_mod_CFLAGS): Likewise.
3123 (jpeg_mod_LDFLAGS): Likewise.
3124 (png_mod_SOURCES): Likewise.
3125 (png_mod_CFLAGS): Likewise.
3126 (png_mod_LDFLAGS): Likewise.
3127 (gfxterm_mod_SOURCES): Likewise.
3128 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 3129 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 3130
3131 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3132 grub/machine/console.h.
3133
644fff97 31342009-01-04 Jerone Young <jerone@gmail.com>
3135
3136 Make on screen instructions clearer
3137
3138 Based on patch created by Jidanni <jidanni@jidanni.org>
3139
3140 * normal/menu.c: print clearer instructions on the screen
3141
1e901a75 31422009-01-02 Colin D Bennett <colin@gibibit.com>
3143
3144 New font engine.
34c44600 3145
1e901a75 3146 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3147 build system and fixed gfxterm.c to work with different sized fonts.
3148
3149 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 3150
1e901a75 3151 * configure: Re-generated.
34c44600 3152
1e901a75 3153 * DISTLIST: Removed font/manager.c.
3154 Added font/font.c.
3155 Added font/font_cmd.c.
34c44600 3156
1e901a75 3157 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3158 compilation.
34c44600 3159
1e901a75 3160 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 3161
3162 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 3163
3164 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 3165
1e901a75 3166 * normal/menu.c: Likewise.
34c44600 3167
1e901a75 3168 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3169 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 3170
1e901a75 3171 * include/grub/font.h: Replaced with new file.
34c44600 3172
1e901a75 3173 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3174 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3175 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3176 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3177 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 3178 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 3179 fg_red, fg_green, fg_blue, fg_alpha.
3180 (grub_video_adapter): Removed blit_glyph.
34c44600 3181 (grub_video_blit_glyph): Removed.
3182
1e901a75 3183 * font/manager.c: Removed file.
34c44600 3184
3185 * font/font.c: New file.
3186
1e901a75 3187 * font/font_cmd.c: Likewise.
34c44600 3188
1e901a75 3189 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 3190
1e901a75 3191 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3192 (grub_video_vbe_map_rgba): Likewise.
3193 (grub_video_vbe_unmap_color_int): Likewise.
3194 (grub_video_vbe_blit_glyph): Removed.
3195 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 3196
1e901a75 3197 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3198 (get_pixel): Likewise.
34c44600 3199 (set_pixel): Likewise.
3200
1e901a75 3201 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 3202
1e901a75 3203 * term/gfxterm.c: Adapted to new font engine.
34c44600 3204
1e901a75 3205 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 3206
1e901a75 3207 * term/i386/pc/vga.c: Likewise.
34c44600 3208
1e901a75 3209 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 3210
1e901a75 3211 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 3212
1e901a75 3213 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3214
1e901a75 3215 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3216
1e901a75 3217 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 3218
1e901a75 3219 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 3220
1e901a75 3221 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 3222
1e901a75 3223 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 3224
1e901a75 3225 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3226
3227 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 3228
1e901a75 3229 * util/grub-mkconfig_lib.in: Changed font extension.
3230
278922e8 32312008-12-28 Felix Zielcke <fzielcke@z-51.de>
3232
3233 * util/getroot.c (grub_util_get_grub_dev): Add support for
3234 /dev/md/dNNpNN style partitionable mdraid devices.
3235
3ced05cf 32362008-12-12 Alex Smith <alex@alex-smith.me.uk>
3237
3238 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3239 at a time limit of the PXE TFTP API correctly.
3240 (grub_pxefs_close): Likewise.
3241
7fd0ee30 32422008-11-29 Robert Millan <rmh@aybabtu.com>
3243
34c44600 3244 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 3245 grub_ata_device_initialize() calls.
3246
34c44600 32472008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 3248
3249 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3250 iteration failed.
3251 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3252
89313780 32532008-11-28 Robert Millan <rmh@aybabtu.com>
3254
3255 Fix build on powerpc-ieee1275. Based on patch created by
3256 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3257 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3258 `kern/ieee1275/mmap.c'.
3259 * include/grub/powerpc/ieee1275/memory.h: New file.
3260
15257703 3261 Provide grub-install on coreboot.
3262 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3263 (grub_install_SOURCES): New variable.
3264 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3265 usable on coreboot.
3266
9fc5388a 32672008-11-25 Felix Zielcke <fzielcke@z-51.de>
3268
3269 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3270 to `grub_term_input_t'.
3271 (grub_term_get_current_output): Change return type to
3272 `grub_term_output_t'.
3273
bc3a2f31 32742008-11-22 Robert Millan <rmh@aybabtu.com>
3275
34c44600 3276 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 3277 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3278 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3279 grub_vga_text_cls().
3280
80fc88f2 3281 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 3282 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 3283
cbf36fd3 3284 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3285 to 0x200000 (avoids trouble with some OFW implementations, and matches
3286 with the one in Yaboot).
3287 Reported by Manoel Abranches
3288
73e8e268 32892008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 3290
3291 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3292 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3293
73e8e268 3294 * util/grub-mkconfig_lib.in (grub_warn): New function.
3295 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3296 warnings, to obtain consistent formatting.
3297 * util/grub.d/00_header.in: Likewise.
3298 * util/update-grub_lib.in: Likewise.
3299
e94045a1 3300 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 3301 Move comment text to `#error' stanza.
e94045a1 3302
79d29fd7 3303 Harmonize ieee1275's grub_available_iterate() with the generic
3304 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3305 build problem on i386-ieee1275):
3306 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3307 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3308 parameter `type'. Update all users of this function.
3309 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3310 `kern/ieee1275/mmap.c'.
3311 * kern/ieee1275/init.c
3312 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3313 with ...
3314 (grub_machine_mmap_iterate): ... this.
3315 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3316 return type to `grub_err_t'. Update all implementations of this
3317 function prototype.
3318 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3319 Likewise.
3320
60d6b16e 3321 Add `lsmmap' command (lists firmware-provided memory map):
3322 * commands/lsmmap.c: New file.
3323 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3324 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3325 variables.
3326 * conf/powerpc-ieee1275.rmk: Likewise.
3327 * conf/i386-coreboot.rmk: Likewise.
3328 * conf/i386-ieee1275.rmk: Likewise.
3329
ebaaf49b 33302008-11-19 Robert Millan <rmh@aybabtu.com>
3331
3332 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 3333 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3334 constraints to initrd allocation (based on code from
3335 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3336 for Linux to find it.
ebaaf49b 3337
dfab719f 33382008-11-14 Robert Millan <rmh@aybabtu.com>
3339
3340 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3341 order to cope with duplicate slashes.
3342
10fc3eb9 33432008-11-14 Robert Millan <rmh@aybabtu.com>
3344
3345 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3346 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3347 don't want to mess with lower memory, because it is used in the Linux
3348 loader.
3349
3350 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 3351 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 3352 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3353 is in our heap (probably as a result of it being corrupted during
2f2a3442 3354 decompression). Add #error instance with comment to explain why this
3355 loader isn't currently usable on PC/BIOS.
10fc3eb9 3356
e2e07847 33572008-11-14 Robert Millan <rmh@aybabtu.com>
3358
3359 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 3360 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 3361
fe8e8d69 33622008-11-12 Robert Millan <rmh@aybabtu.com>
3363
3364 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3365
3366 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3367 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3368 from here ...
3369 * include/grub/i386/pc/memory.h: ... to here.
3370
976b07d0 33712008-11-12 Robert Millan <rmh@aybabtu.com>
3372
3373 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3374 split).
3375
3376 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3377 (grub_console_cur_color, grub_console_real_putchar)
3378 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3379 (grub_console_setcolorstate, grub_console_setcolor)
3380 (grub_console_getcolor): Move from here ...
3381 * include/grub/i386/vga_common.h: ... to here (new file).
3382
3383 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3384 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3385 `<grub/i386/io.h>'.
3386 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3387 `<grub/i386/vga_common.h>'.
3388
76679cd3 33892008-11-12 Robert Millan <rmh@aybabtu.com>
3390
3391 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3392 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3393 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3394 variables.
3395 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3396 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3397
3398 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3399 grub_console_init() with call to grub_vga_text_init().
3400 (grub_machine_fini): Replace call to
3401 grub_console_fini() with call to grub_vga_text_fini() and
3402 grub_at_keyboard_fini().
3403
3404 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3405 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3406 (grub_console_setcolorstate, grub_console_setcolor)
3407 (grub_console_getcolor): New function prototypes.
3408
3409 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3410 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3411 (grub_vga_text_setcursor): Static-ize.
3412 (grub_vga_text_term): New structure.
3413 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3414
3415 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3416 (grub_console_cur_color, grub_console_standard_color)
3417 (grub_console_normal_color, grub_console_highlight_color)
3418 (map_char, grub_console_putchar, grub_console_getcharwidth)
3419 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3420 (grub_console_getcolor): Move from here ...
3421 * term/i386/vga_common.c: ... to here (same function names).
3422
95b841d3 34232008-11-12 Robert Millan <rmh@aybabtu.com>
3424
3425 Use newly-added Multiboot support in coreboot.
3426
3427 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3428 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3429
3430 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3431 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3432 (codestart): Store the MBI in `startup_multiboot_info' when we're
3433 being loaded using Multiboot.
3434
3435 * kern/i386/coreboot/init.c (grub_machine_init): Move
3436 grub_at_keyboard_init() call to beginning of function (useful for
3437 debugging). Call grub_machine_mmap_init() before attempting to use
3438 grub_machine_mmap_iterate().
3439 (grub_lower_mem, grub_upper_mem): Move from here ...
3440 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3441 here (new file).
3442
3443 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3444 function prototype.
3445
761ca975 34462008-11-12 Robert Millan <rmh@aybabtu.com>
3447
3448 Fix a regression introduced by the at_keyboard.mod split. Because
3449 some terminals are default on some platforms and non-default on
3450 others, the first terminal being registered determines which is
3451 going to be default.
3452
3453 * kern/term.c (grub_term_register_input): If this is the first
3454 terminal being registered, set it as the current one.
3455 (grub_term_register_output): Likewise.
3456
3457 * term/efi/console.c (grub_console_init): Do not call
3458 grub_term_set_current_output() or grub_term_set_current_input().
3459 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3460 * term/i386/pc/console.c (grub_console_init): Likewise.
3461 (grub_console_fini): Do not call grub_term_set_current_input()
3462 (but leave grub_term_set_current_output() to restore text mode).
3463
6c529df7 34642008-11-10 Robert Millan <rmh@aybabtu.com>
3465
3466 * util/grub.d/00_header.in: Add backward compatibility check for
3467 versions of terminal.mod that don't understand `terminal_input' or
3468 `terminal_output'.
3469
132e4113 34702008-11-09 Robert Millan <rmh@aybabtu.com>
3471
3472 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3473 `terminal_input' / `terminal_output', not `terminal'.
3474
ac293d50 34752008-11-08 Robert Millan <rmh@aybabtu.com>
3476
3477 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 3478 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 3479
0025933a 34802008-11-08 Robert Millan <rmh@aybabtu.com>
3481
3482 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 3483 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 3484 members. Update all users.
3485 * util/console.c (grub_ncurses_term): Split in ...
3486 (grub_ncurses_term_input): ... this, and ...
3487 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 3488 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 3489
37c86336 34902008-11-08 Robert Millan <rmh@aybabtu.com>
3491
3492 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3493 (PKGDATA): Add $(pkgdata_SRCDIR).
3494 (pkglib_BUILDDIR): New variable.
3495 (pkgdata_SRCDIR): New variable.
3496 (build_env.mk): New target.
3497 (include_DATA): New variable.
3498 (install-local): Install $(include_DATA) files in $(includedir).
3499
b6c15a2d 35002008-11-07 Pavel Roskin <proski@gnu.org>
3501
d99d46f1 3502 * gendistlist.sh: Use C locale for sorting to ensure consistent
3503 output on all systems.
3504
b6c15a2d 3505 * util/grub.d/00_header.in: Remove incorrect space before
3506 "serial".
3507
c32ee8c9 35082008-11-07 Robert Millan <rmh@aybabtu.com>
3509
3510 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3511 per specification.
3512 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3513 * loader/multiboot_loader.c (find_multi_boot2_header): New function
3514 (based on find_multi_boot1_header).
3515 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3516 using find_multi_boot2_header(), and abort if neither Multiboot or
3517 Multiboot headers were found.
3518
651c29b7 35192008-11-07 Robert Millan <rmh@aybabtu.com>
3520
3521 Modularize at_keyboard.mod:
3522
3523 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3524 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3525 (at_keyboard_mod_LDFLAGS): New variables.
3526
3527 Actual terminal split:
3528
3529 * include/grub/term.h (struct grub_term): Split in ...
3530 (struct grub_term_input): ... this, and ...
3531 (struct grub_term_output): ... this. Update all users.
3532 (grub_term_set_current): Split in ...
3533 (grub_term_set_current_input): ... this, and ...
3534 (grub_term_set_current_output): ... this.
3535 (grub_term_get_current): Split in ...
3536 (grub_term_get_current_input): ... this, and ...
3537 (grub_term_get_current_output): ... this.
3538 (grub_term_register): Split in ...
3539 (grub_term_register_input): ... this, and ...
3540 (grub_term_register_output): ... this.
3541 (grub_term_unregister): Split in ...
3542 (grub_term_unregister_input): ... this, and ...
3543 (grub_term_unregister_output): ... this.
3544 (grub_term_iterate): Split in ...
3545 (grub_term_iterate_input): ... this, and ...
3546 (grub_term_iterate_output): ... this.
3547
3548 * kern/term.c (grub_term_list): Split in ...
3549 (grub_term_list_input): ... this, and ...
3550 (grub_term_list_output): ... this. Update all users.
3551 (grub_cur_term): Split in ...
3552 (grub_cur_term_input): ... this, and ...
3553 (grub_cur_term_output): ... this. Update all users.
3554 (grub_term_set_current): Split in ...
3555 (grub_term_set_current_input): ... this, and ...
3556 (grub_term_set_current_output): ... this.
3557 (grub_term_get_current): Split in ...
3558 (grub_term_get_current_input): ... this, and ...
3559 (grub_term_get_current_output): ... this.
3560 (grub_term_register): Split in ...
3561 (grub_term_register_input): ... this, and ...
3562 (grub_term_register_output): ... this.
3563 (grub_term_unregister): Split in ...
3564 (grub_term_unregister_input): ... this, and ...
3565 (grub_term_unregister_output): ... this.
3566 (grub_term_iterate): Split in ...
3567 (grub_term_iterate_input): ... this, and ...
3568 (grub_term_iterate_output): ... this.
3569
3570 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3571 a check for input and one for output (and only attempt to get keys
3572 from user when input works).
3573
3574 * util/grub-probe.c (grub_term_get_current): Split in ...
3575 (grub_term_get_current_input): ... this, and ...
3576 (grub_term_get_current_output): ... this.
3577 * util/grub-fstest.c: Likewise.
3578 * util/i386/pc/grub-setup.c: Likewise.
3579 * util/grub-editenv.c: Likewise.
3580
3581 Portability adjustments:
3582
3583 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3584 `term/i386/pc/at_keyboard.c'.
3585 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3586 grub_keyboard_controller_init() (now handled by terminal .init).
3587 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3588 grub_at_keyboard_init().
3589 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3590 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3591 at_keyboard.mod via input terminal interface).
3592 * include/grub/i386/coreboot/console.h: Convert into a stub for
3593 `<grub/i386/pc/console.h>'.
3594
3595 Migrate full terminals to new API:
3596
3597 * term/efi/console.c (grub_console_term): Split into ...
3598 (grub_console_term_input): ... this, and ...
3599 (grub_console_term_output): ... this. Update all users.
3600 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3601 (grub_ofconsole_init): Split into ...
3602 (grub_ofconsole_init_input): ... this, and ...
3603 (grub_ofconsole_init_output): ... this.
3604 (grub_ofconsole_term): Split into ...
3605 (grub_ofconsole_term_input): ... this, and ...
3606 (grub_ofconsole_term_output): ... this. Update all users.
3607 * term/i386/pc/serial.c (grub_serial_term): Split into ...
3608 (grub_serial_term_input): ... this, and ...
3609 (grub_serial_term_output): ... this. Update all users.
3610 * term/i386/pc/console.c (grub_console_term): Split into ...
3611 (grub_console_term_input): ... this, and ...
3612 (grub_console_term_output): ... this. Update all users.
3613 (grub_console_term_input): Only enable it on PC/BIOS platform.
3614 (grub_console_init): Remove grub_keyboard_controller_init() call.
3615
3616 Migrate input terminals to new API:
3617
3618 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3619 `i386' and `i386/pc' to enable build on x86_64 (this driver is
3620 i386-specific anyway).
3621 (grub_console_checkkey): Rename to ...
3622 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
3623 users.
3624 (grub_keyboard_controller_orig): New variable.
3625 (grub_console_getkey): Rename to ...
3626 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
3627 users.
3628 (grub_keyboard_controller_init): Static-ize. Save original
3629 controller value so that it can be restored ...
3630 (grub_keyboard_controller_fini): ... here (new function).
3631 (grub_at_keyboard_term): New structure.
3632 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3633 functions.
3634
3635 Migrate output terminals to new API:
3636
3637 * term/i386/pc/vga.c (grub_vga_term): Change type to
3638 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3639 members. Update all users.
3640 * term/gfxterm.c (grub_video_term): Change type to
3641 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3642 members. Update all users.
3643 * include/grub/i386/pc/console.h (grub_console_checkkey)
3644 (grub_console_getkey): Do not export (no longer needed by gfxterm,
3645 etc).
3646
3647 Migrate `terminal' command and userland tools to new API:
3648
3649 * commands/terminal.c (grub_cmd_terminal): Split into ...
3650 (grub_cmd_terminal_input): ... this, and ...
3651 (grub_cmd_terminal_output): ... this.
3652 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3653 `terminal_input' and `terminal_output'.
3654 * util/grub.d/00_header.in: Adjust `terminal' calls to new
3655 `terminal_input' / `terminal_output' API.
3656 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3657 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3658 provided ${GRUB_TERMINAL}, convert it).
3659
96e5d876 36602008-11-04 Robert Millan <rmh@aybabtu.com>
3661
3662 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
3663 for FreeBSD.
3664 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3665
556f3775 36662008-11-03 Bean <bean123ch@gmail.com>
3667
3668 * kern/elf.c (grub_elf32_load): Revert to previous code.
3669 (grub_elf64_load): Likewise.
3670
3671 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3672
926b9823 36732008-11-01 Robert Millan <rmh@aybabtu.com>
3674
3675 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3676 (TARGET_CPPFLAGS): Likewise.
3677 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3678
1432e958 36792008-11-01 Carles Pina i Estany <carles@pina.cat>
3680
3681 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3682
dba3f844 36832008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 3684
3685 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3686 addition of objects until the code is not going to be able to fail.
3687
dba3f844 36882008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 3689
3690 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3691 (add a missing NULL check, and correct them by moving the pointer
3692 operations after the actual check).
3693
7ab28c21 36942008-10-29 Robert Millan <rmh@aybabtu.com>
3695
3696 * util/i386/pc/grub-install.in: Handle empty string as output from
3697 make_system_path_relative_to_its_root().
3698
1b7748eb 36992008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
3700
3701 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3702 circular metadata worst case scenario. If the metadata is circular
3703 then copy the wrap in place.
3704 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3705 project lib/format_text/layout.h
3706 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3707
c9618ab2 37082008-10-03 Felix Zielcke <fzielcke@z-51.de>
3709
7a36edca 3710 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 3711
bf981c62 37122008-10-03 Felix Zielcke <fzielcke@z-51.de>
3713
3714 * util/update-grub_lib.in: Mention filename in warning message.
3715
6d994591 37162008-09-29 Felix Zielcke <fzielcke@z-51.de>
3717
3718 * NEWS: Update for rename of update-grub to grub-mkconfig.
3719
18ade780 37202008-09-29 Felix Zielcke <fzielcke@z-51.de>
3721
3722 * util/update-grub_lib.in: Copy to ...
3723 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 3724 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 3725 * util/update-grub.in: Rename to ...
3726 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
3727 option. Add `--output' option to allow users to specify the generated
3728 configuration file. Default to stdout.
3729 (update_grub_dir): Rename to ...
3730 (grub_mkconfig_dir): ... this.
3731 (grub_cfg): Default to an empty string.
3732 * conf/common.rmk (update-grub): Rename to ...
3733 (grub-mkconfig): ... this.
3734 (update-grub_lib): Copy to ...
3735 (grub-mkconfig_lib): ... this.
3736 (update-grub_SCRIPTS): Copy to ...
3737 (grub-mkconfig_SCRIPTS): ... this. Update all users.
3738 (update-grub_DATA): Rename to ...
3739 (grub-mkconfig_DATA): ... this.
3740
556ce6ac 37412008-09-28 Robert Millan <rmh@aybabtu.com>
3742
3743 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3744 to `modified'. Add the real `created' field.
3745 (grub_iso9660_uuid): Use `modified' rather than `created' for
3746 constructing the UUID.
3747
37482008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 3749
3750 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3751 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3752
92274e85 37532008-09-28 Bean <bean123ch@gmail.com>
3754
3755 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3756 Thanks to Christian Franke for finding this bug.
3757
add6f17a 37582008-09-25 Robert Millan <rmh@aybabtu.com>
3759
3760 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3761 instances of grub_util_get_disk_name() (see previous commit).
3762
d2a367b8 37632008-09-25 Robert Millan <rmh@aybabtu.com>
3764
3765 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3766 `util/i386/get_disk_name.c'.
3767 * conf/i386-efi.rmk: Likewise.
3768 * conf/x86_64-efi.rmk: Likewise.
3769 * conf/i386-coreboot.rmk: Likewise.
3770 * conf/i386-ieee1275.rmk: Likewise.
3771 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3772 `util/ieee1275/get_disk_name.c'.
3773 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3774 * util/ieee1275/get_disk_name.c: Remove file.
3775 * util/i386/get_disk_name.c: Remove file.
3776 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3777 "hd%d" for device.map entries, rather than using
3778 grub_util_get_disk_name().
3779
81a06771 37802008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 3781
3782 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3783 warning.
3784 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3785
5a004279 37862008-09-24 Carles Pina i Estany <carles@pina.cat>
3787
3788 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3789 Changed to 0x5100.
3790 (GRUB_TERM_PPAGE): Changed to 0x4900.
3791
397093d3 37922008-09-24 Robert Millan <rmh@aybabtu.com>
3793
3794 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3795 macros (they were i386-pc specific).
3796 * include/grub/sparc64/ieee1275/console.h: Likewise.
3797 * include/grub/efi/console.h: Likewise.
3798
a91b6c7c 37992008-09-22 Bean <bean123ch@gmail.com>
3800
3801 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3802 resident and in attribute list.
3803
3804 * include/grub/ntfs.h (BMP_LEN): Removed.
3805
c40fd116 38062008-09-22 Bean <bean123ch@gmail.com>
3807
81a06771 3808 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 3809 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3810
3811 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3812 error occurs, as grub_disk_open will call grub_disk_close, which will
3813 call p->close (scsi).
3814
81a06771 38152008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 3816
3817 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3818 (AC_PREREQ): Bumped to 2.59.
3819 (AC_TRY_COMPILE): Replace obsolete macro with ...
3820 (AC_COMPILE_IFELSE): ... this.
3821 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3822 (AC_LINK_IFELSE): ... this.
3823
5dc43410 38242008-09-21 Felix Zielcke <fzielcke@z-51.de>
3825
3826 * autogen.sh: Add a call to `gendistlist.sh'.
3827
9035dce4 38282008-09-19 Christian Franke <franke@computer.org>
3829
3830 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3831 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3832 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3833 Export __enable_execute_stack() to modules.
3834 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3835 New function.
3836
7fd75377 38372008-09-09 Felix Zielcke <fzielcke@z-51.de>
3838
040030b3 3839 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3840 Sort the list.
3841
38422008-09-09 Felix Zielcke <fzielcke@z-51.de>
3843
3844 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 3845 #include <grub/util/hostdisk.h>.
3846
89d5ffcf 38472008-09-08 Robert Millan <rmh@aybabtu.com>
3848
3849 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3850 segments when their filesz is zero (grub_file_read() interprets
81a06771 3851 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 3852 Use `lowest_segment' rather than 0 for calculating the current
3853 segment load address.
3854
40da438f 38552008-09-08 Robert Millan <rmh@aybabtu.com>
3856
3857 * util/hostdisk.c (open_device): Replace a grub_util_info() call
3858 with grub_dprintf("hostdisk", ...), as it was so verbose that it
3859 clobbered useful information.
3860
ddbf5556 38612008-09-08 Robert Millan <rmh@aybabtu.com>
3862
3863 * include/grub/util/biosdisk.h: Move to ...
3864 * include/grub/util/hostdisk.h: ... here. Update all users.
3865 * util/biosdisk.c: Move to ...
3866 * util/hostdisk.c: ... here. Update all users.
3867
783d0f48 38682008-09-07 Robert Millan <rmh@aybabtu.com>
3869
3870 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3871 variables.
3872 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3873 and length can be stored directly in the `mbi->mmap_addr' and
3874 `mbi->mmap_length' struct fields.
3875
548e2ea5 38762008-09-07 Robert Millan <rmh@aybabtu.com>
3877
3878 * conf/i386.rmk: New file. Provides declaration for building
3879 `cpuid.mod'.
3880 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3881 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3882 variables.
3883 Include `conf/i386.mk'.
3884 * conf/i386-efi.rmk: Likewise.
3885 * conf/x86_64-efi.rmk: Likewise.
3886 * conf/i386-coreboot.rmk: Likewise.
3887 * conf/i386-ieee1275.rmk: Likewise.
3888
0ea85a37 38892008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
3890
3891 Based on patch created by Colin D Bennett <colin@gibibit.com>.
3892 Adds optimization support for BGR based modes.
3893
3894 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3895 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3896 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3897 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3898 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3899 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3900 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3901 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3902 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3903 (grub_video_i386_vbeblit_index_index): Likewise.
3904 (grub_video_i386_vbeblit_replace_directN): Added.
3905 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3906 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3907 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3908 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3909 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3910 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 3911 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 3912 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3913 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3914 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3915 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3916 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3917 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3918
3919 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3920 (grub_video_i386_vbefill_R8G8B8): Likewise.
3921 (grub_video_i386_vbefill_index): Likewise.
3922 (grub_video_i386_vbefill_direct32): Added.
3923 (grub_video_i386_vbefill_direct24): Likewise.
3924 (grub_video_i386_vbefill_direct16): Likewise.
3925 (grub_video_i386_vbefill_direct8): Likewise.
3926
81a06771 3927 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 3928 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3929 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3930 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3931 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3932 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 3933
0ea85a37 3934 * video/video.c (grub_video_get_blit_format): Updated to use new
3935 blit formats. Added handling for 16 bit color modes.
81a06771 3936
3937 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 3938 fillers.
3939 (common_blitter): Updated to use new blitters.
3940
3941 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3942 Removed.
3943 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3944 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3945 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3946 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3947 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3948 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3949 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3950 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3951 (grub_video_i386_vbeblit_index_index): Likewise.
3952 (grub_video_i386_vbeblit_replace_directN): Added.
3953 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3954 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3955 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3956 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3957 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3958 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3959 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3960 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3961 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3962 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3963 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3964 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3965 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 3966
0ea85a37 3967 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3968 (grub_video_i386_vbefill_R8G8B8): Likewise.
3969 (grub_video_i386_vbefill_index): Likewise.
3970 (grub_video_i386_vbefill_direct32): Added.
3971 (grub_video_i386_vbefill_direct24): Likewise.
3972 (grub_video_i386_vbefill_direct16): Likewise.
3973 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 3974
0ea85a37 3975 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3976 types.
81a06771 3977
0ea85a37 3978 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3979 types.
81a06771 3980
0ea85a37 3981 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3982 blitter types.
81a06771 3983
0ea85a37 3984 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3985 types.
3986
e8a83df6 39872008-09-06 Felix Zielcke <fzielcke@z-51.de>
3988
3989 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3990 RAID level 1.
3991
6bcd8ee5 39922008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 3993
6bcd8ee5 3994 * fs/iso9660.c (grub_iso9660_date): New structure.
3995 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3996 (grub_iso9660_uuid): New function.
c375ae58 3997
59261157 39982008-09-05 Bean <bean123ch@gmail.com>
3999
4000 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4001
4002 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4003 insensitive bit for names in Win32 and Win32 & DOS namespace.
4004
4005 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4006
4007 * include/grub/types.h (LONG_MAX): Likewise.
4008
58b6645a 40092008-09-04 Felix Zielcke <fzielcke@z-51.de>
4010
4ee55921 4011 * util/getroot.c: Include <config.h>.
4012 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4013 add support for /dev/md/N devices and handle LVM double dash escaping.
4014
40152008-09-04 Felix Zielcke <fzielcke@z-51.de>
4016
4017 * config.guess: Update to latest version from config git.
4018 * config.sub: Likewise.
58b6645a 4019
9124f65d 40202008-09-03 Robert Millan <rmh@aybabtu.com>
4021
4022 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4023 `disk->total_sectors'.
4024
81a06771 40252008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 4026
4027 * include/grub/normal.h: Fixed incorrect comment for
4028 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4029
81a06771 40302008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 4031
4032 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4033 values with defines.
4034
4035 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4036 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4037 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4038 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4039 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4040 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4041 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4042 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4043 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4044 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4045 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4046 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4047 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4048 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4049 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4050 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4051 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4052 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4053 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4054
93d5cbf8 40552008-08-31 Robert Millan <rmh@aybabtu.com>
4056
4057 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4058 declaration.
4059 (grub_multiboot): Fix a few warnings.
4060
21751d50 40612008-08-31 Robert Millan <rmh@aybabtu.com>
4062
4063 * loader/i386/pc/multiboot.c: Update comment not to say that
4064 boot_device support is unimplemented.
4065
e27a75c5 40662008-08-31 Robert Millan <rmh@aybabtu.com>
4067
4068 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4069 or memory map support are unimplemented.
4070
81a06771 40712008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 4072
4073 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4074
81a06771 40752008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 4076
4077 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4078 total video memory in 'vbeinfo' output; show color format details for
4079 each video mode.
4080
7c5d8d95 40812008-08-30 Pavel Roskin <proski@gnu.org>
4082
4083 * util/genmoddep.c: Remove for real this time.
4084 * DISTLIST: Remove util/genmoddep.c.
4085
4cebd25a 40862008-08-30 Robert Millan <rmh@aybabtu.com>
4087
4088 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4089 as required by Multiboot spec (it was already 4-byte aligned, but
4090 only by chance).
4091
b497a269 40922008-08-29 Pavel Roskin <proski@gnu.org>
4093
e3925185 4094 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4095 * kern/powerpc/ieee1275/startup.S: ... this.
4096 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4097 * DISTLIST: Likewise.
4098
b497a269 4099 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4100 grub/cpu/kernel.h. Add start label for consistency with other
4101 platforms. Add grub_prefix immediately after start. Add jump
4102 to the code after grub_prefix.
4103 * include/grub/powerpc/kernel.h: Provide valid values for
4104 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4105
6e5a42fe 41062008-08-29 Bean <bean123ch@gmail.com>
4107
4108 * configure.ac: Change host_os to cygwin for mingw.
4109 (asprintf): New check for function.
4110
4111 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4112 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4113
4114 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 4115 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 4116 sync, sleep and grub_util_get_disk_size for mingw.
4117
4118 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4119 to get size in mingw.
4120 (open_device): Use flag O_BINARY if it's defined.
4121 (find_root_device): Add dummy code for mingw.
4122
4123 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4124 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4125 (get_scsi_disk_name): Return 0 for mingw.
4126
4127 * util/hostfs.c: #include <grub/util/misc.h>.
4128 (grub_hostfs_open): Use "rb" flag to open file, use
4129 grub_util_get_disk_size to get disk size for mingw.
4130
4131 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4132 (asprintf): New function if HAVE_ASPRINTF is not set.
4133 (sync): New function for mingw.
4134 (sleep): Likewise.
4135 (grub_util_get_disk_size): Likewise.
4136
ab3f2673 41372008-08-28 Pavel Roskin <proski@gnu.org>
4138
4139 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4140 kern/time.c.
4141
1c282483 41422008-08-28 Robert Millan <rmh@aybabtu.com>
4143
4144 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4145
678e849c 41462008-08-28 Robert Millan <rmh@aybabtu.com>
4147
4148 Change find_grub_drive() syntax so it doesn't prevent it from
4149 detecting NULL names as errors.
4150
4151 * util/biosdisk.c (find_grub_drive): Move free slot search code
4152 from here ...
4153 (find_free_slot): ... to here.
4154 (read_device_map): Use find_free_slot() to search for free slots.
4155
965c75ca 41562008-08-27 Marco Gerards <marco@gnu.org>
4157
4158 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4159 (scsi_mod_SOURCES): New variable.
4160 (scsi_mod_CFLAGS): Likewise
4161 (scsi_mod_LDFLAGS): Likewise.
4162
4163 * disk/scsi.c: New file.
4164
4165 * include/grub/scsi.h: Likewise.
4166
4167 * include/grub/scsicmd.h: Likewise.
4168
4169 * disk/ata.c: Include <grub/scsi.h>.
4170 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4171 instead.
4172 (grub_ata_iterate): Skip ATAPI devices.
4173 (grub_ata_open): Only handle ATAPI devices.
4174 (struct grub_atapi_read): Removed.
4175 (grub_atapi_readsector): Likewise.
4176 (grub_ata_read): No longer handle ATAPI devices.
4177 (grub_ata_write): Likewise.
4178 (grub_atapi_iterate): New function.
4179 (grub_atapi_read): Likewise.
4180 (grub_atapi_write): Likewise.
4181 (grub_atapi_open): Likewise.
4182 (grub_atapi_close): Likewise.
4183 (grub_atapi_dev): New variable.
4184 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4185 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4186
4187 * include/grub/disk.h (enum grub_disk_dev_id): Add
4188 `GRUB_DISK_DEVICE_SCSI_ID'.
4189
c07ae501 41902008-08-26 Robert Millan <rmh@aybabtu.com>
4191
4192 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4193 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4194 descriptive.
4195
5ed20adc 41962008-08-23 Bean <bean123ch@gmail.com>
4197
4198 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4199 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4200 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4201 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4202 dm_nv.mod.
4203 (raid5rec_mod_SOURCES): New macro.
4204 (raid5rec_mod_CFLAGS): Likewise.
4205 (raid5rec_mod_LDFLAGS): Likewise.
4206 (raid6rec_mod_SOURCES): Likewise.
4207 (raid6rec_mod_CFLAGS): Likewise.
4208 (raid6rec_mod_LDFLAGS): Likewise.
4209 (mdraid_mod_SOURCES): Likewise.
4210 (mdraid_mod_CFLAGS): Likewise.
4211 (mdraid_mod_LDFLAGS): Likewise.
4212 (dm_nv_mod_SOURCES): Likewise.
4213 (dm_nv_mod_CFLAGS): Likewise.
4214 (dm_nv_mod_LDFLAGS): Likewise.
4215
4216 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4217 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4218 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4219
4220 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4221 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4222
4223 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4224
4225 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4226
4227 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4228
4229 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4230
4231 * disk/raid5_recover.c: New file.
4232
4233 * disk/raid6_recover.c: Likewise.
4234
4235 * disk/mdraid_linux.c: Likewise.
4236
4237 * disk/dmraid_nvidia.c: Likewise.
4238
4239 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4240 ULONG_MAX.
4241
4242 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4243 calculate the size of raid device.
4244 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4245 different layout of raid5.
4246 (grub_raid_scan_device): Remove code specific to mdraid.
4247 (grub_raid_list): New variable.
4248 (free_array): New function.
4249 (grub_raid_register): Likewise.
4250 (grub_raid_unregister): Likewise.
4251 (grub_raid_rescan): Likewise.
4252 (GRUB_MOD_INIT): Don't iterate device here.
4253 (GRUB_MOD_FINI): Use free_array to release resource.
4254
4255 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4256 (grub_raid5_recover_func_t): New function variable type.
4257 (grub_raid6_recover_func_t): Likewise.
4258 (grub_raid5_recover_func): New variable.
4259 (grub_raid6_recover_func): Likewise.
4260 (grub_raid_register): New function.
4261 (grub_raid_unregister): Likewise.
4262 (grub_raid_rescan): Likewise.
4263 (grub_raid_block_xor): Likewise.
4264
4265 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4266 (CMD_CRC): New macro.
4267 (part): Removed.
4268 (read_file): Handle device as well as file.
4269 (cmd_crc): New function.
4270 (fstest): Handle multiple disks.
4271 (options): Remove part, raw and long, add root and diskcount.
4272 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 4273 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 4274 add handling for the new options, support multiple disks.
4275
4276 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4277
29c18915 42782008-08-23 Bean <bean123ch@gmail.com>
4279
4280 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4281
4282 * genfslist.sh: Ignore kernel.mod.
4283
4284 * genpartmaplist.sh: Likewise.
4285
8415f261 42862008-08-23 Robert Millan <rmh@aybabtu.com>
4287
4288 * util/getroot.c (find_root_device): Skip anything that starts with
4289 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4290
d5a7dc5b 42912008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 4292
d5a7dc5b 4293 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4294 * util/grub.d/00_header.in: Allow the administrator to change default
4295 gfxmode via ${GRUB_GFXMODE}.
4296
380cfbb4 42972008-08-21 Felix Zielcke <fzielcke@z-51.de>
4298
4299 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4300
c9baafe7 43012008-08-21 Robert Millan <rmh@aybabtu.com>
4302
4303 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4304 loader.
4305 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4306 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4307
e290bef2 43082008-08-20 Carles Pina i Estany <carles@pina.cat>
4309
4310 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4311 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4312
f9dbfc96 43132008-08-19 Robert Millan <rmh@aybabtu.com>
4314
4315 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4316 (struct grub_virtual_screen): Remove `cursor_color'.
4317 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4318 initialization.
4319 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4320
dd6bd6ab 43212008-08-18 Robert Millan <rmh@aybabtu.com>
4322
4323 Unify (identical) linux_normal.c files.
4324 * loader/i386/efi/linux_normal.c: Move from here ...
4325 * loader/linux_normal.c: ... to here. Update all users.
4326 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4327 * loader/i386/ieee1275/linux_normal.c: Likewise.
4328
7f42f83e 43292008-08-18 Robert Millan <rmh@aybabtu.com>
4330
4331 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4332 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4333 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4334 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4335 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4336 New macros.
4337 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4338 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4339 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4340 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4341 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4342 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4343 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4344 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4345 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4346 portably using grub_getxy().
4347 Replace `-EFI' with `-bzImage' in boot message.
4348
38487ddb 43492008-08-17 Robert Millan <rmh@aybabtu.com>
4350
4351 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4352
deceb3ec 43532008-08-17 Robert Millan <rmh@aybabtu.com>
4354
4355 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4356
4357 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4358 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4359 (grub_machine_mmap_iterate): New function declaration.
4360 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4361 structure.
4362 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4363 macros.
4364
4365 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4366 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4367 Move e820 parsing from here ...
4368 * kern/i386/pc/mmap.c: New file.
4369 (grub_machine_mmap_iterate): ... to here.
4370
4371 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4372 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4373 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4374 (grub_available_iterate): Redeclare to return `void', and redeclare
4375 its hook to use grub_uint64_t as addr and size parameters, and rename
4376 to ...
4377 (grub_machine_mmap_iterate): ... this. Update all users.
4378
4379 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4380 to make it more readable. Rename to ...
4381 (grub_machine_mmap_iterate): ... this.
4382
4383 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4384 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4385 (grub_multiboot): Allocate an extra region after the payload, and fill
4386 it with a Multiboot memory map. Adjust a.out loader to calculate size
4387 with the extra space.
4388 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4389 with the extra space.
4390
f8aa0f43 43912008-08-17 Carles Pina i Estany <carles@pina.cat>
4392
9807deb9 4393 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 4394
605f5bb6 43952008-08-17 Felix Zielcke <fzielcke@z-51.de>
4396
4397 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4398 mdate-sh to the list `find' searches for.
4399 * DISTLIST: Regenerated.
4400
210db6c6 44012008-08-16 Felix Zielcke <fzielcke@z-51.de>
4402
4403 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4404 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 4405 genmoddep.awk, gensymlist.sh.in.
4406 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 4407 * DISTLIST: Regenerated.
48cdbfd4 4408 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 4409
1082b929 44102008-08-16 Robert Millan <rmh@aybabtu.com>
4411
4412 * disk/raid.c (grub_raid_init): Handle/report errors set by
4413 grub_device_iterate().
4414 * disk/lvm.c (grub_lvm_init): Likewise.
4415
42ce5170 44162008-08-15 Bean <bean123ch@gmail.com>
4417
4418 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4419 and datehook.mod.
4420 (datetime_mod_SOURCES): New macro.
4421 (datetime_mod_CFLAGS): Likewise.
4422 (datetime_mod_LDFLAGS): Likewise.
4423 (date_mod_SOURCES): Likewise.
4424 (date_mod_CFLAGS): Likewise.
4425 (date_mod_LDFLAGS): Likewise.
4426 (datehook_mod_SOURCES): Likewise.
4427 (datehook_mod_CFLAGS): Likewise.
4428 (datehook_mod_LDFLAGS): Likewise.
4429
4430 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4431 and datehook.mod.
4432 (datetime_mod_SOURCES): New macro.
4433 (datetime_mod_CFLAGS): Likewise.
4434 (datetime_mod_LDFLAGS): Likewise.
4435 (date_mod_SOURCES): Likewise.
4436 (date_mod_CFLAGS): Likewise.
4437 (date_mod_LDFLAGS): Likewise.
4438 (datehook_mod_SOURCES): Likewise.
4439 (datehook_mod_CFLAGS): Likewise.
4440 (datehook_mod_LDFLAGS): Likewise.
4441
4442 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4443 and datehook.mod.
4444 (datetime_mod_SOURCES): New macro.
4445 (datetime_mod_CFLAGS): Likewise.
4446 (datetime_mod_LDFLAGS): Likewise.
4447 (date_mod_SOURCES): Likewise.
4448 (date_mod_CFLAGS): Likewise.
4449 (date_mod_LDFLAGS): Likewise.
4450 (datehook_mod_SOURCES): Likewise.
4451 (datehook_mod_CFLAGS): Likewise.
4452 (datehook_mod_LDFLAGS): Likewise.
4453
4454 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4455 and datehook.mod.
4456 (datetime_mod_SOURCES): New macro.
4457 (datetime_mod_CFLAGS): Likewise.
4458 (datetime_mod_LDFLAGS): Likewise.
4459 (date_mod_SOURCES): Likewise.
4460 (date_mod_CFLAGS): Likewise.
4461 (date_mod_LDFLAGS): Likewise.
4462 (datehook_mod_SOURCES): Likewise.
4463 (datehook_mod_CFLAGS): Likewise.
4464 (datehook_mod_LDFLAGS): Likewise.
4465
4466 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4467 and datehook.mod.
4468 (datetime_mod_SOURCES): New macro.
4469 (datetime_mod_CFLAGS): Likewise.
4470 (datetime_mod_LDFLAGS): Likewise.
4471 (date_mod_SOURCES): Likewise.
4472 (date_mod_CFLAGS): Likewise.
4473 (date_mod_LDFLAGS): Likewise.
4474 (datehook_mod_SOURCES): Likewise.
4475 (datehook_mod_CFLAGS): Likewise.
4476 (datehook_mod_LDFLAGS): Likewise.
4477
4478 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4479
4480 * commands/date.c: New file.
4481
4482 * hook/datehook.c: Likewise.
4483
4484 * include/grub/lib/datetime.h: Likewise.
4485
4486 * include/grub/i386/cmos.h: Likewise.
4487
4488 * lib/datetime.c: Likewise.
4489
4490 * lib/i386/datetime.c: Likewise.
4491
4492 * lib/efi/datetime.c: Likewise.
4493
0e9242da 44942008-08-14 Robert Millan <rmh@aybabtu.com>
4495
4496 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4497 (grub_mkelfimage_SOURCES): New variable.
4498 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4499
4500 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4501 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4502 * conf/powerpc-ieee1275.rmk: Likewise.
4503 * conf/i386-ieee1275.rmk: Likewise.
4504
4505 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4506 * kern/i386/coreboot/init.c: Likewise.
4507
4508 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4509 with `<grub/cpu/kernel.h>'.
4510 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4511 to ...
4512 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4513 * kern/i386/coreboot/startup.S: Likewise.
4514
4515 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4516 (GRUB_MOD_GAP): Remove.
4517 * include/grub/powerpc/kernel.h: New file.
4518 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4519 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4520 * include/grub/i386/kernel.h: New file.
4521 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4522 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4523 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4524
4525 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4526 `grub-mkelfimage'.
4527 Use --directory when invoking grub_mkimage.
4528
4529 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4530 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4531 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4532 and GRUB_KERNEL_CPU_PREFIX.
4533
b86408f8 45342008-08-14 Felix Zielcke <fzielcke@z-51.de>
4535
d5e619ca 4536 * include/grub/err.h (grub_err_printf): New function prototype.
4537 * util/misc.c (grub_err_printf): New function.
4538 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4539 grub_printf.
4540 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 4541
7161f0e0 45422008-08-13 Robert Millan <rmh@aybabtu.com>
4543
4544 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4545
a1967522 45462008-08-13 Robert Millan <rmh@aybabtu.com>
4547
4548 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4549 boot entry.
4550
371458b5 45512008-08-12 Robert Millan <rmh@aybabtu.com>
4552
4553 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4554 of the relocation code from here ...
4555 (grub_multiboot): ... to here.
4556 (forward_relocator, backward_relocator): Move from here ...
4557 * kern/i386/loader.S (grub_multiboot_forward_relocator)
4558 (grub_multiboot_backward_relocator): ... to here.
4559 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
4560 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
4561 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4562 (grub_multiboot_forward_relocator_end)
4563 (grub_multiboot_backward_relocator)
4564 (grub_multiboot_backward_relocator_end): New variables.
4565
05f9452b 45662008-08-12 Bean <bean123ch@gmail.com>
4567
4568 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4569
20024ab0 45702008-08-11 Robert Millan <rmh@aybabtu.com>
4571
4572 * kern/i386/linuxbios/startup.S: Move from here ...
4573 * kern/i386/coreboot/startup.S: ... to here.
4574
4575 * kern/i386/linuxbios/init.c: Move from here ...
4576 * kern/i386/coreboot/init.c: ... to here.
4577
4578 * kern/i386/linuxbios/table.c: Move from here ...
4579 * kern/i386/coreboot/mmap.c: ... to here.
4580
4581 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4582
e352e9cd 45832008-08-11 Robert Millan <rmh@aybabtu.com>
4584
4585 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4586 errors. Leave it to the upper layer to handle them.
4587
2d05bc6a 45882008-08-09 Christian Franke <franke@computer.org>
4589
4590 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4591 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4592 Install `grub.d/10_windows' only on Cygwin.
4593 * configure.ac: Add subst of `target_os'.
4594 Check `target_os' also before setting TARGET_OBJ2ELF.
4595 Add `--enable-grub-pe2elf'.
4596
042bd419 45972008-08-08 Robert Millan <rmh@aybabtu.com>
4598
4599 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4600 (grub_last_time): Change type to grub_uint64_t.
4601 (grub_disk_open): Migrate code from to using grub_get_time_ms().
4602 (grub_disk_close): Likewise.
4603
4604 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4605 (run_menu): Migrate code from to using grub_get_time_ms().
4606
4607 * util/misc.c (grub_get_time_ms): New function.
4608
7f280db5 46092008-08-08 Marco Gerards <marco@gnu.org>
4610
4611 * disk/ata.c (grub_ata_regget): Change return type to
4612 `grub_uint8_t'.
4613 (grub_ata_regget2): Likewise.
4614 (grub_ata_wait_status): New function.
4615 (grub_ata_wait_busy): Removed function, updated all users to use
4616 `grub_ata_wait_status'.
4617 (grub_ata_wait_drq): Likewise.
4618 (grub_ata_cmd): New function.
4619 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
4620 error handling.
4621 (grub_ata_pio_write): Add error handling.
4622 (grub_atapi_identify): Likewise.
4623 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4624 handling.
4625 (grub_ata_identify): Use `grub_ata_cmd' and improve error
4626 handling. Actually use the detected registers. Reorder the
4627 detection logic such that it is easier to read.
4628 (grub_ata_pciinit): Do not assign the same ID to each controller.
4629 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4630 handling.
4631 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4632
4633 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4634
1fbc5e66 46352008-08-08 Marco Gerards <marco@gnu.org>
4636
4637 * NEWS: Update.
4638
819ce6c0 46392008-08-07 Bean <bean123ch@gmail.com>
4640
4641 * include/grub/x86_64/pci.h: New file.
4642
5c41d44d 46432008-08-07 Christian Franke <franke@computer.org>
4644
4645 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4646 (TIMER2_GATE): Likewise.
4647 (grub_pit_wait): Add enable/disable of the timer2 gate
4648 bit of port 0x61. This fixes a possible infinite loop.
4649
5ebc275d 46502008-08-07 Bean <bean123ch@gmail.com>
4651
4652 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4653 kern/i386/tsc.c and kern/i386/pit.c.
4654
4655 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4656 x86_64 platform.
4657
4658 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4659 <grub/i386/tsc.h>.
4660
4661 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4662
e383b3d0 46632008-08-07 Bean <bean123ch@gmail.com>
4664
4665 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4666
4667 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4668
4669 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4670 multiple inclusion. Add #include <grub/types.h>.
4671
1cbb58ac 46722008-08-06 Christian Franke <franke@computer.org>
4673
4674 * conf/common.rmk: Build and install `10_windows'.
4675 * util/grub.d/10_windows.in: New script.
4676
337f5a1e 46772008-08-06 Pavel Roskin <proski@gnu.org>
4678
4679 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4680
057bc4ac 46812008-08-06 Robert Millan <rmh@aybabtu.com>
4682
4683 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4684 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4685
2b99f123 46862008-08-06 Bean <bean123ch@gmail.com>
4687
4688 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4689 (grub_pxefs_fs_int): Remove dummy definition.
4690 (grub_pxefs_open): Use data->block_size to store the current block
4691 size setting.
4692 (grub_pxefs_read): Use block size stored in data->block_size. As the
4693 value of grub_pxe_blksize can be changed after the file is opened.
4694
9f0234cb 46952008-08-06 Bean <bean123ch@gmail.com>
4696
4697 * fs/i386/pc/pxe.c (curr_file): new variable.
4698 (grub_pxefs_open): Simply the handling of pxe file system. Don't
4699 require the dummy internal file system anymore.
4700 (grub_pxefs_read): Removed.
4701 (grub_pxefs_close): Likewise.
4702 (grub_pxefs_fs_int): Likewise.
4703 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4704 connection when we switch file.
4705 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4706
a55d42e0 47072008-08-06 Robert Millan <rmh@aybabtu.com>
4708
4709 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4710 `halt.mod'.
4711 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4712 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4713
4714 * kern/i386/halt.c: New file.
4715 * kern/i386/reboot.c: Likewise.
4716 * include/grub/i386/reboot.h: Likewise.
4717 * include/grub/i386/halt.h: Likewise.
4718
4719 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4720 Include `<grub/cpu/halt.h>'.
4721 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4722 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4723
4724 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4725 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4726 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4727 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4728 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4729 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4730 from here ...
4731 * include/grub/i386/at_keyboard.h: ... to here.
4732
24371d26 47332008-08-05 Robert Millan <rmh@aybabtu.com>
4734
4735 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4736 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4737 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4738 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4739 `kern/generic/millisleep.c'.
4740
4741 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4742 instead of grub_get_rtc().
4743 (grub_tsc_init): Initialize `tsc_boot_time'.
4744
4745 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4746 (grub_machine_init): Use grub_tsc_init() rather than
4747 installing an RTC-based handler via grub_install_get_time_ms().
4748
4749 * kern/i386/pit.c: New file.
4750 * include/grub/i386/pit.h: Likewise.
4751
9e7007b3 47522008-08-05 Bean <bean123ch@gmail.com>
4753
4754 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4755
4756 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4757 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4758 (pxe_mod_SOURCES): New macro.
4759 (pxe_mod_CFLAGS): Likewise.
4760 (pxe_mod_LDFLAGS): Likewise.
4761 (pxecmd_mod_SOURCES): Likewise.
4762 (pxecmd_mod_CFLAGS): Likewise.
4763 (pxecmd_mod_LDFLAGS): Likewise.
4764
4765 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4766 (grub_pxe_call): Likewise.
4767
4768 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4769
4770 * commands/i386/pc/pxecmd.c: New file.
4771
9f0234cb 4772 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 4773
4774 * include/grub/i386/pc/pxe.h: Likewise.
4775
6977d49f 47762008-08-05 Bean <bean123ch@gmail.com>
4777
4778 * util/console.c (grub_console_cur_color): New variable.
4779 (grub_console_standard_color): Likewise.
4780 (grub_console_normal_color): Likewise.
4781 (grub_console_highlight_color): Likewise.
4782 (color_map): Likewise.
4783 (use_color): Likewise.
4784 (NUM_COLORS): New macro.
4785 (grub_ncurses_setcolorstate): Handle color properly.
4786 (grub_ncurses_setcolor): Don't change color here, just remember the
4787 settings, color will be set in grub_ncurses_setcolorstate.
4788 (grub_ncurses_getcolor): New function.
4789 (grub_ncurses_init): Initialize color pairs.
4790 (grub_ncurses_term): New member grub_ncurses_getcolor.
4791
9c2ff3ee 47922008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 4793
9c2ff3ee 4794 High resolution timer support. Implemented for x86 CPUs using TSC.
4795 Extracted generic grub_millisleep() so it's linked in only as needed.
4796 This requires a Pentium compatible CPU; if the RDTSC instruction is
4797 not supported, then it falls back on the generic grub_get_time_ms()
4798 implementation that uses the machine's RTC.
4799
4800 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4801 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4802 `kern/generic/millisleep.c'.
4803
4804 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4805 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4806
4807 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4808 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4809
4810 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4811
4812 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4813 `kern/generic/millisleep.c'.
4814
4815 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4816
4817 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4818
4819 * kern/generic/rtc_get_time_ms.c: New file.
4820
4821 * kern/generic/millisleep.c: New file.
337f5a1e 4822
9c2ff3ee 4823 * kern/misc.c: Don't include
4824 <kern/time.h> anymore.
4825 (grub_millisleep_generic): Removed.
4826
4827 * commands/sleep.c (grub_interruptible_millisleep): Uses
4828 grub_get_time_ms() instead of grub_get_rtc().
4829
4830 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
4831 function.
4832 (grub_cpu_is_cpuid_supported): New inline function.
4833 (grub_cpu_is_tsc_supported): New inline function.
4834 (grub_tsc_init): New function prototype.
4835 (grub_tsc_get_time_ms): New function prototype.
4836
4837 * kern/i386/tsc.c (grub_get_time_ms): New file.
4838
4839 * include/grub/time.h: Include <grub/types.h.
4840 (grub_millisleep_generic): Removed.
4841 (grub_get_time_ms): New prototype.
4842 (grub_install_get_time_ms): New prototype.
4843 (grub_rtc_get_time_ms): New prototype.
4844
4845 * kern/time.c (grub_get_time_ms): New function.
4846 (grub_install_get_time_ms): New function.
4847
4848 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
4849 <grub/time.h> anymore.
4850 (grub_millisleep): Removed.
4851 (grub_machine_init): Call grub_tsc_init.
4852
4853 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4854 get_time_ms() implementation.
4855
4856 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4857 (ieee1275_get_time_ms): New function.
4858 (grub_machine_init): Install get_time_ms() implementation.
4859
4860 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4861 (grub_machine_init): Call grub_tsc_init().
4862 (grub_millisleep): Removed.
bf06a93f 4863
9c2ff3ee 4864 * kern/ieee1275/init.c (grub_millisleep): Removed.
4865 (grub_machine_init): Install ieee1275_get_time_ms()
4866 implementation.
4867 (ieee1275_get_time_ms): New function.
4868 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4869 real work.
4870
9ec92aaf 48712008-08-05 Marco Gerards <marco@gnu.org>
4872
4873 * disk/ata.c: Include <grub/pci.h>.
4874 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4875 (grub_ata_initialize): Rewritten.
4876 (grub_ata_device_initialize): New function.
4877
8d23f507 48782008-08-04 Pavel Roskin <proski@gnu.org>
4879
4880 * kern/main.c: Include grub/mm.h.
4881
5e15ee3d 48822008-08-04 Robert Millan <rmh@aybabtu.com>
4883
4884 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4885 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4886 corruption problem).
4887
a9053f8f 48882008-08-04 Robert Millan <rmh@aybabtu.com>
4889
4890 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4891 warnings introduced in my last commit.
4892
dd19c7d7 48932008-08-03 Robert Millan <rmh@aybabtu.com>
4894
4895 Make PCI available on all i386 architectures.
4896
4897 * include/grub/i386/pc/pci.h: Move from here ...
4898 * include/grub/i386/pci.h: ... to here.
4899
4900 * include/grub/i386/pc/pci.h: Remove.
4901 * include/grub/i386/efi/pci.h: Remove.
4902 * include/grub/x86_64/efi/pci.h: Remove.
4903
4904 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4905 `<grub/cpu/pci.h>'.
4906
4907 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4908 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4909 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4910
4911 * conf/i386-ieee1275.rmk: Likewise.
4912
e14a6184 49132008-08-03 Robert Millan <rmh@aybabtu.com>
4914
4915 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4916 (grub_console_setcursor): Make it possible to set cursor off.
4917
52768e37 49182008-08-03 Robert Millan <rmh@aybabtu.com>
4919
4920 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
4921 of modules instead of assuming which platform provides what.
4922 * util/update-grub.in: Likewise.
4923
2d52f57f 49242008-08-03 Robert Millan <rmh@aybabtu.com>
4925
4926 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4927 instead of `grub_install_dos_part' to determine whether a drive needs
4928 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 4929 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 4930
2a5cd121 49312008-08-02 Robert Millan <rmh@aybabtu.com>
4932
4933 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4934
93808428 49352008-08-02 Robert Millan <rmh@aybabtu.com>
4936
4937 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4938 of informational grub_dprintf() calls.
4939
3bd0a12a 49402008-08-02 Robert Millan <rmh@aybabtu.com>
4941
4942 * disk/memdisk.c (memdisk_size): Don't initialize.
4943 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4944
4945 * include/grub/i386/pc/kernel.h
4946 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4947 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4948 (grub_memdisk_image_size, grub_arch_memdisk_addr)
4949 (grub_arch_memdisk_size): Remove.
4950
4951 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4952 field (was only used to transfer a constant). Add `type' field to
4953 support multiple module types.
4954 (grub_module_iterate): New function.
4955
4956 * kern/device.c (grub_device_open): Do not hide error messages
4957 when grub_disk_open() fails. Use grub_print_error() instead.
4958
4959 * kern/i386/pc/init.c (grub_arch_modules_addr)
4960 (grub_arch_memdisk_size): Remove functions.
4961 (grub_arch_modules_addr): Return the module address in high memory
4962 (now that it isn't copied anymore).
4963
4964 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4965 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4966 decompression routine (grub_total_module_size already includes that
4967 now). Don't copy modules back to low memory.
4968
4969 * kern/main.c: Include `<grub/mm.h>'.
4970 (grub_load_modules): Split out (and use) ...
4971 (grub_module_iterate): ... this function, which iterates through
4972 module objects and runs a hook.
4973 Comment out grub_mm_init_region() call, as it would cause non-ELF
4974 modules to be overwritten.
4975
4976 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4977 the memdisk image in its own region, make it part of the module list.
4978 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4979 (main): Parse --memdisk|-m option, and pass user-provided path as
4980 parameter to generate_image().
4981 (add_segments): Pass `memdisk_path' down to load_modules().
4982 (load_modules): Embed memdisk image in module section when requested.
4983 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4984 `header.type' instead of `header.offset'.
4985
4986 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4987 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4988 (memdisk_mod_LDFLAGS): New variables.
4989 * conf/i386-coreboot.rmk: Likewise.
4990 * conf/i386-ieee1275.rmk: Likewise.
4991
a927cc73 49922008-08-02 Robert Millan <rmh@aybabtu.com>
4993
4994 * loader/i386/pc/multiboot.c (playground, forward_relocator)
4995 (backward_relocator): New variables. Used to allocate and relocate
4996 the payload, respectively.
4997 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 4998 address, install the appropriate relocator code in each bound of
a927cc73 4999 the payload, and set the entry point such that
5000 grub_multiboot_real_boot() will jump to one of them.
5001
5002 * kern/i386/loader.S (grub_multiboot_payload_size)
5003 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5004 (grub_multiboot_payload_entry_offset): New variables.
5005 (grub_multiboot_real_boot): Set cpu context to what the relocator
5006 expects, and jump to the relocator instead of the payload.
5007
5008 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5009 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5010 (grub_multiboot_payload_entry_offset): Export.
5011
b15d8a0c 50122008-08-01 Bean <bean123ch@gmail.com>
5013
5014 * normal/menu_entry.c (editor_getline): Don't return the original
5015 string as result, as it will be released by lexer once it has done
5016 using it.
5017
cdfb3d22 50182008-08-01 Robert Millan <rmh@aybabtu.com>
5019
5020 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5021 within menuentries, not before them.
5022 util/grub.d/10_hurd.in: Likewise.
5023
9175e93d 50242008-08-01 Bean <bean123ch@gmail.com>
5025
5026 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5027 (bufio_mod_SOURCES): New macro.
5028 (bufio_mod_CFLAGS): Likewise.
5029 (bufio_mod_LDFLAGS): Likewise.
5030
5031 * include/grub/bufio.h: New file.
5032
5033 * io/bufio.c: Likewise.
5034
5035 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5036 (grub_video_reader_png): Use grub_buffile_open to open file.
5037
5038 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5039 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5040
5041 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5042 (grub_video_reader_tga): Use grub_buffile_open to open file.
5043
5044 * font/manager.c: Include <grub/bufio.h>.
5045 (add_font): Use grub_buffile_open to open file.
5046
3d8383e7 50472008-07-31 Robert Millan <rmh@aybabtu.com>
5048
5049 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5050 ELF segments, use a macro for arbitrarily accessing any of them instead
5051 of preparing a pointer that allows access to one at a time.
5052 (grub_multiboot_load_elf64): Likewise.
5053
16e641b6 50542008-07-31 Bean <bean123ch@gmail.com>
5055
5056 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5057 GRUB_KERNEL_MACHINE_DATA_END.
5058
59198b72 50592008-07-30 Robert Millan <rmh@aybabtu.com>
5060
5061 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5062 Increase from 0x50 to 0x60.
5063 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5064 use UUIDs to identify the root drive for them. If that's not
5065 possible, abort.
5066 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5067 check, for cross-disk installs.
5068
ae88bca3 50692008-07-30 Robert Millan <rmh@aybabtu.com>
5070
5071 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5072 is non-empty, use it to set the `prefix' environment variable instead
5073 of the usual approach.
5074 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5075 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5076 environment variable instead of dummy make_install_device().
5077
5078 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5079 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 5080 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 5081
5082 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5083 New variable reference.
5084 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5085 New macro. Defines offset of `grub_prefix' within startup.S (relative
5086 to `start').
5087 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5088 section within startup.S (relative to `start').
5089 * include/grub/i386/coreboot/kernel.h: Likewise.
5090
5091 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5092 Overwrite grub_prefix with its contents, at the beginning of the
5093 first segment.
5094 (main): Understand -p|--prefix.
5095
14f41dd1 50962008-07-30 Robert Millan <rmh@aybabtu.com>
5097
5098 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5099
4ca049a3 51002008-07-30 Robert Millan <rmh@aybabtu.com>
5101
5102 * term/i386/pc/vga_text.c (grub_console_cls): Use
5103 grub_console_gotoxy() to go back to beginning of the screen.
5104 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5105
2921d337 51062008-07-29 Christian Franke <franke@computer.org>
5107
5108 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5109 Add conversion of emulated mount points on Cygwin.
5110
b609876d 51112008-07-29 Christian Franke <franke@computer.org>
5112
5113 * util/update-grub.in: Add a check for admin
5114 group on Cygwin.
5115 Remove old `grub.cfg.new' before creation.
5116 Add `-f' to `mv' to handle the different filesystem
5117 semantics of Windows.
5118
e93e4679 51192008-07-29 Bean <bean123ch@gmail.com>
5120
5121 * normal/main.c (get_line): Fix buffer overflow bug.
5122
41694fd0 51232008-07-28 Robert Millan <rmh@aybabtu.com>
5124
5125 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5126 (struct grub_apple_header): New struct. Describes the layout of
5127 the partmap header.
5128 (apple_partition_map_iterate): Check the header magic as well as the
5129 partition magic (which was already being checked).
5130
cfd0b4e6 51312008-07-28 Pavel Roskin <proski@gnu.org>
5132
5133 * genmk.rb: Add a warning to the beginning of the output that
5134 it's a generated file and should not be edited.
5135
93cce016 51362008-07-28 Robert Millan <rmh@aybabtu.com>
5137
5138 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5139 with the same number are found, just use issue a warning with
5140 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 5141
cd1df915 51422008-07-27 Robert Millan <rmh@aybabtu.com>
5143
5144 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5145 information.
5146
b70a8427 51472008-07-27 Bean <bean123ch@gmail.com>
5148
5149 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5150 (grub_fat_find_dir): Ignore case when comparing filename.
5151
8f5e379f 51522008-07-27 Bean <bean123ch@gmail.com>
5153
5154 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5155 smallino, as it's more descriptive, and i8count can be confused with
5156 the other field count.
5157 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5158 inode type.
5159
a85cd5a0 51602008-07-27 Bean <bean123ch@gmail.com>
5161
5162 * commands/crc.c: New file.
5163
5164 * lib/crc.c: Likewise.
5165
5166 * include/grub/lib/crc.h: Likewise.
5167
5168 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5169
5170 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5171 (hexdump): Move this function to ...
5172
5173 * lib/hexdump.c: ... here.
5174
5175 * include/grub/hexdump.h: Renamed to ...
5176
5177 * include/grub/lib/hexdump.h: ... this.
5178
5179 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5180
5181 * util/grub-editenv.c: Likewise.
5182
5183 * include/envblk.h: Renamed to ...
5184
5185 * include/lib/envblk.h: ... this.
5186
5187 * util/envblk.c: Renamed to ...
5188
5189 * lib/envblk.c: ... this.
5190
5191 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5192 lib/hexdump.c.
5193 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5194 (pkglib_MODULES): Add crc.mod.
5195 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5196 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5197 (crc_mod_SOURCES): New macro.
5198 (crc_mod_CFLAGS): Likewise.
5199 (crc_mod_LDFLAGS): Likewise.
5200
5201 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5202
5203 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5204
5205 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5206
5207 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5208
5209 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5210
c298def0 52112008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 5212
5213 * commands/help.c: Include <grub/term.h>.
5214 (TERM_WIDTH): Removed. Updated all users.
5215
cc349fb3 52162008-07-27 Pavel Roskin <proski@gnu.org>
5217
5218 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5219 spurious warnings about a comment within a comment.
5220
9051607e 52212008-07-25 Robert Millan <rmh@aybabtu.com>
5222
5223 * util/getroot.c (find_root_device): Skip devices that match
5224 /dev/dm-[0-9]. This lets the real device be found for any type of
5225 abstraction (LVM, EVMS, RAID..).
5226 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5227 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5228 device is found first, find_root_device() will now skip it.
5229
01453bfc 52302008-07-24 Pavel Roskin <proski@gnu.org>
5231
5232 * include/grub/types.h: Use __builtin_bswap32() and
5233 __builtin_bswap64() with gcc 4.3 and newer.
5234
6af9849f 52352008-07-24 Christian Franke <franke@computer.org>
5236
3a0fa256 5237 * util/i386/pc/grub-install.in: If `--debug' is specified,
5238 pass `--verbose' to grub-setup.
5239 Abort script if make_system_path_relative_to_its_root() fails.
5240
7810e747 52412008-07-24 Bean <bean123ch@gmail.com>
5242
5243 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5244 variable `target_platform' should be `platform'.
5245
42290e17 52462008-07-24 Bean <bean123ch@gmail.com>
5247
51cc5193 5248 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 5249 (grub_png_init_fixed_block): New function.
5250 (grub_png_decode_image_data): Handle fixed huffman code compression.
5251
2a8a80e4 52522008-07-24 Bean <bean123ch@gmail.com>
5253
5254 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5255 (grub_pe2elf_SOURCES): New macro.
5256 (CLEANFILES): Add grub-pe2elf.
5257
5258 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5259 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5260 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5261 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5262 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5263 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5264 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5265 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5266 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5267 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5268 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5269 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5270 (GRUB_PE32_DT_FUNCTION): Likewise.
5271 (GRUB_PE32_REL_I386_DIR32): Likewise.
5272 (GRUB_PE32_REL_I386_REL32): Likewise.
5273 (grub_pe32_symbol): New structure.
5274 (grub_pe32_reloc): Likewise.
5275
5276 * util/grub-pe2elf.c: New file.
5277
5278 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5279 start symbol in non pc platform.
5280
5281 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5282
5283 The following patches are from Christian Franke.
5284
5285 * include/grub/dl.h: Remove .previous, gas supports this only
5286 for ELF format.
5287
5288 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5289 Remove .type, gas supports this only for ELF format.
5290
5291 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5292 nullbytes in symbol table. This fixes an infinite loop if table is
5293 zero filled.
5294
5295 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5296 TARGET_IMG_LDFLAGS and EXEEXT.
5297
5298 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5299 TARGET_IMG_LDFLAGS_AC.
5300 (grub_CHECK_STACK_ARG_PROBE): New function.
5301
5302 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5303
5304 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5305
5306 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5307 to set TARGET_IMG_LD* accordingly.
5308 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5309 Add call to grub_CHECK_STACK_ARG_PROBE.
5310 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5311
5312 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5313
5314 * genmk.rb: Add EXEEXT to CLEANFILES.
5315
12ccdb75 53162008-07-23 Robert Millan <rmh@aybabtu.com>
5317
5318 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5319 define the codes for arrows and lines used for the menu).
5320 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5321 as well.
5322
5323 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5324 fonts, because the latter are too slow.
5325
18eeaf04 53262008-07-21 Bean <bean123ch@gmail.com>
5327
5328 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5329 a20. Run keyboard test last, as it will cause macbook to halt.
5330
b095e2ad 53312008-07-18 Pavel Roskin <proski@gnu.org>
5332
5333 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5334 load foreign architecture modules correctly anyway. Keep
5335 support for loading host architecture modules, whether we
5336 compile them or not.
5337
737feb35 53382008-07-17 Pavel Roskin <proski@gnu.org>
5339
3f4ce737 5340 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5341 change target_cpu. The compiler default can mismatch target_cpu
5342 in any case.
5343
4ad2d049 5344 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5345 * kern/efi/efi.c: Likewise.
5346
f6130a12 5347 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5348 target compiler is functional.
5349 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5350 are set up.
5351
58393a2d 5352 * configure.ac: Default to efi platform for x86_64-apple. Allow
5353 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5354 adjustments from the rest, only do them if target is not
5355 explicitly given. Merge other adjustments with the final sanity
5356 check. Remove an extraneous check for supported CPU. Be
5357 specific which CPU and which platform is not supported.
5358
737feb35 5359 * configure.ac: Default to pc platform for x86_64.
5360
546f966a 53612008-07-17 Robert Millan <rmh@aybabtu.com>
5362
5363 Partial LinuxBIOS -> Coreboot rename.
5364
5365 * conf/i386-linuxbios.rmk: Renamed to ...
5366 * conf/i386-coreboot.rmk: ... this.
5367 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5368 * configure.ac: Accept "coreboot" as input platform (but maintain
5369 compatibility with "linuxbios").
5370 * include/grub/i386/linuxbios: Renamed to ...
5371 * include/grub/i386/coreboot: ... this.
5372
20011694 53732008-07-17 Bean <bean123ch@gmail.com>
5374
5375 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 5376 (appleldr_mod_SOURCE): New variable.
20011694 5377 (appleldr_mod_CFLAGS): Likewise.
5378 (appleldr_mod_LDFLAGS): Likewise.
5379 (pci_mod_SOURCES): Likewise.
5380 (pci_mod_CFLAGS): Likewise.
5381 (pci_mod_LDFLAGS): Likewise.
5382 (lspci_mod_SOURCES): Likewise.
5383 (lspci_mod_CFLAGS): Likewise.
5384 (lspci_mod_LDFLAGS): Likewise.
5385
5386 * conf/x86_64-efi.rmk: New file.
5387
5388 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5389 macro.
5390 (grub_efidisk_write): Likewise.
5391
5392 * include/efi/api.h (efi_call_0): New macro.
5393 (efi_call_1): Likewise.
5394 (efi_call_2): Likewise.
5395 (efi_call_3): Likewise.
5396 (efi_call_4): Likewise.
5397 (efi_call_5): Likewise.
5398 (efi_call_6): Likewise.
5399
5400 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5401 grub_rescue_cmd_chainloader.
5402
5403 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5404 (grub_pe32_optional_header): Change some fields based on i386 or
5405 x86_64 platform.
5406 (GRUB_PE32_PE32_MAGIC): Likewise.
5407
5408 * include/grub/efi/uga_draw.h: New file.
5409
5410 * include/grub/elf.h (STN_ABS): New constant.
5411 (R_X86_64_NONE): Relocation constant for x86_64.
5412 (R_X86_64_64): Likewise.
5413 (R_X86_64_PC32): Likewise.
5414 (R_X86_64_GOT32): Likewise.
5415 (R_X86_64_PLT32): Likewise.
5416 (R_X86_64_COPY): Likewise.
5417 (R_X86_64_GLOB_DAT): Likewise.
5418 (R_X86_64_JUMP_SLOT): Likewise.
5419 (R_X86_64_RELATIVE): Likewise.
5420 (R_X86_64_GOTPCREL): Likewise.
5421 (R_X86_64_32): Likewise.
5422 (R_X86_64_32S): Likewise.
5423 (R_X86_64_16): Likewise.
5424 (R_X86_64_PC16): Likewise.
5425 (R_X86_64_8): Likewise.
5426 (R_X86_64_PC8): Likewise.
5427
5428 * include/grub/i386/efi/pci.h: New file.
5429
5430 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5431 Change it value based on platform.
5432 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5433 (GRUB_E820_RAM): Likewise.
5434 (GRUB_E820_RESERVED): Likewise.
5435 (GRUB_E820_ACPI): Likewise.
5436 (GRUB_E820_NVS): Likewise.
5437 (GRUB_E820_EXEC_CODE): Likewise.
5438 (GRUB_E820_MAX_ENTRY): Likewise.
5439 (grub_e820_mmap): New structure.
5440 (linux_kernel_header): Change the efi field according to different
5441 kernel version, also field from linux_kernel_header.
5442
5443 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5444
5445 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5446 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5447 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5448 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5449 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5450 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5451 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5452 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5453 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5454 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5455
5456 * include/grub/x86_64/efi/kernel.h: New file.
5457
5458 * include/grub/x86_64/efi/loader.h: Likewise.
5459
5460 * include/grub/x86_64/efi/machine.h: Likewise.
5461
5462 * include/grub/x86_64/efi/pci.h: Likewise.
5463
5464 * include/grub/x86_64/efi/time.h: Likewise.
5465
5466 * include/grub/x86_64/linux.h: Likewise.
5467
5468 * include/grub/x86_64/setjmp.h: Likewise.
5469
5470 * include/grub/x86_64/time.h: Likewise.
5471
5472 * include/grub/x86_64/types.h: Likewise.
5473
5474 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5475 GRUB_TARGET_SIZEOF_VOID_P.
5476
5477 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5478 (grub_efi_locate_handle): Likewise.
5479 (grub_efi_open_protocol): Likewise.
5480 (grub_efi_set_text_mode): Likewise.
5481 (grub_efi_stall): Likewise.
5482 (grub_exit): Likewise.
5483 (grub_reboot): Likewise.
5484 (grub_halt): Likewise.
5485 (grub_efi_exit_boot_services): Likewise.
5486 (grub_get_rtc): Likewise.
5487
5488 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5489 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5490 (grub_efi_allocate_pages): Wrap efi calls.
5491 (grub_efi_free_pages): Wrap efi calls.
5492 (grub_efi_get_memory_map): Wrap efi calls.
5493
5494 * kern/x86_64/dl.c: New file.
5495
5496 * kern/x86_64/efi/callwrap.S: Likewise.
5497
5498 * kern/x86_64/efi/startup.S: Likewise.
5499
5500 * loader/efi/appleloader.c: Likewise.
5501
5502 * loader/efi/chainloader.c (cmdline): New variable.
5503 (grub_chainloader_unload): Wrap efi calls.
5504 (grub_chainloader_boot): Likewise.
5505 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5506 command line.
5507
5508 * loader/efi/chainloader_normal.c (chainloader_command):
5509 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5510 command line.
5511
5512 * loader/i386/efi/linux.c (allocate_pages): Change allocation
5513 method.
5514 (grub_e820_add_region): New function.
5515 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5516 booting.
5517 (grub_find_video_card): New function.
5518 (grub_linux_setup_video): New function.
5519 (grub_rescue_cmd_linux): Probe for video information.
5520
5521 * normal/x86_64/setjmp.S: New file.
5522
5523 * term/efi/console.c (map_char): New function.
5524 (grub_console_putchar): Map unicode char.
5525 (grub_console_checkkey): Wrap efi calls.
5526 (grub_console_getkey): Likewise.
5527 (grub_console_getwh): Likewise.
5528 (grub_console_gotoxy): Likewise.
5529 (grub_console_cls): Likewise.
5530 (grub_console_setcolorstate): Likewise.
5531 (grub_console_setcursor): Likewise.
5532
5533 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5534
59652a20 55352008-07-16 Pavel Roskin <proski@gnu.org>
5536
ef294055 5537 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5538 format strings.
5539
59652a20 5540 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5541 pointer, not an integer. This fixes a warning and prevents
5542 precision loss on 64-bit systems.
5543 (relocate_addresses): Remove unneeded cast.
5544
afc3b5d7 55452008-07-15 Pavel Roskin <proski@gnu.org>
5546
506b2b3e 5547 * kern/i386/ieee1275/init.c: Include grub/cache.h.
5548
62ead89c 5549 * term/ieee1275/ofconsole.c: Disable code unused on i386.
5550
c4cd51d7 5551 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5552 Fix comparison between signed and unsigned.
5553
0d3d8f28 5554 * include/grub/i386/ieee1275/console.h: Declare
5555 grub_console_init() and grub_console_fini().
5556
8804b286 5557 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5558 It's empty and unused.
5559
ee01cf35 5560 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5561 beginning to avoid warnings with some compilers.
5562
afc3b5d7 5563 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5564 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5565
e4e8eaa5 55662008-07-14 Pavel Roskin <proski@gnu.org>
5567
407aceb4 5568 * kern/env.c (grub_register_variable_hook): Don't copy empty
5569 string, it leaks memory. Pass "" to grub_env_set(), it should
5570 handle constant strings.
5571
e4e8eaa5 5572 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5573 * commands/cmp.c (grub_cmd_cmp): Likewise.
5574 * kern/dl.c (grub_dl_flush_cache): Likewise.
5575 (grub_dl_load_core): Likewise.
5576 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5577 (grub_elf64_load_phdrs): Likewise.
5578
d4e2dad3 55792008-07-13 Pavel Roskin <proski@gnu.org>
5580
5581 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5582 between signed and unsigned.
5583 (LzmaEnc_Finish): Fix warning about an unused parameter.
5584
aa24b516 55852008-07-13 Bean <bean123ch@gmail.com>
5586
5587 * Makefile.in (enable_lzo): New rule.
5588
5589 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5590
5591 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5592
5593 * boot/i386/pc/lnxboot.S: #include <config.h>.
5594
5595 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 5596 its value according to the compression algorithm used, lzo or lzma.
aa24b516 5597
5598 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5599 compression algorithm according to configure macro.
5600
5601 * kern/i386/pc/startup.S (codestart): Likewise.
5602
5603 * kern/i386/pc/lzma_decode.S: New file.
5604
5605 * include/grub/lib/LzFind.h: Likewise.
5606
5607 * include/grub/lib/LzHash.h: Likewise.
5608
5609 * include/grub/lib/LzmaDec.h: Likewise.
5610
5611 * include/grub/lib/LzmaEnc.h: Likewise.
5612
5613 * include/grub/lib/LzmaTypes.h: Likewise.
5614
5615 * lib/LzFind.c: Likewise.
5616
5617 * lib/LzmaDec.c: Likewise.
5618
5619 * lib/LzmaEnc.c: Likewise.
5620
4ae821ac 56212008-07-13 Bean <bean123ch@gmail.com>
5622
5623 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5624 (grub_ext4_extent_header): New structure.
5625 (grub_ext4_extent): Likewise.
5626 (grub_ext4_extent_idx): Likewise.
5627 (grub_ext4_find_leaf): New function.
5628 (grub_ext2_read_block): Handle extents.
5629
9a745147 56302008-07-12 Robert Millan <rmh@aybabtu.com>
5631
5632 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5633
d49a4cf6 56342008-07-11 Robert Millan <rmh@aybabtu.com>
5635
5636 * util/grub.d/40_custom.in: New file. Example on how to add custom
5637 entries to /etc/grub.d.
5638 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5639 40_custom (implicitly, by merging all the grub.d rules).
5640
947414b4 56412008-07-11 Pavel Roskin <proski@gnu.org>
5642
0059cf6f 5643 * commands/read.c (grub_getline): Fix invalid memory access.
5644 Don't add newline to the variable value.
5645
947414b4 5646 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5647 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5648 (serial_hw_get_port): Check validity of the port number.
5649 (grub_cmd_serial): Check return value of serial_hw_get_port().
5650
62a02d00 56512008-07-07 Pavel Roskin <proski@gnu.org>
5652
5653 * boot/i386/pc/diskboot.S (notification_string): Replace
5654 "Loading kernel" with just "loading". This is shorter, less
5655 confusing and saves a few bytes for possible future changes.
5656
3e5581b0 56572008-07-05 Pavel Roskin <proski@gnu.org>
5658
ea387a48 5659 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5660 size for ATAPI devices, they are undefined. Output sector
5661 number in decimal form.
5662
3e5581b0 5663 * disk/ata.c: Use named constants for status bits.
5664
fdecb8fd 56652008-07-04 Pavel Roskin <proski@gnu.org>
5666
bcd35b90 5667 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5668 grub_addr_t before casting it to the void pointer to fix a
5669 warning. Non-addressable regions are discarded earlier.
5670 (grub_arch_modules_addr): Cast _end to grub_addr_t.
5671 * kern/i386/linuxbios/table.c: Include grub/misc.h.
5672 (check_signature): Don't shadow table_header.
5673 (grub_linuxbios_table_iterate): Cast numeric constants to
5674 grub_linuxbios_table_header_t.
5675 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5676 grub_stop().
5677
af58ab3d 5678 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5679 prevent warnings.
5680
1759aa57 5681 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5682 pointer, which can cause warnings. Support 64-bit addresses.
5683
fdecb8fd 5684 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5685 of sizeof(long). This fixes PowerPC image generation on x86_64.
5686
8516d2a8 56872008-07-04 Robert Millan <rmh@aybabtu.com>
5688
5689 This fixes a performance issue when pc & gpt partmap iterators
5690 didn't abort iteration even after our hook found what it was
fe987087 5691 looking for (often causing expensive probes of non-existent drives).
8516d2a8 5692
5693 Some callers relied on previous buggy behaviour, since they would
34c44600 5694 raise an error when their own hooks caused early abortion of its
8516d2a8 5695 iteration.
5696
5697 * kern/device.c (grub_device_open): Improve error message.
5698 * disk/lvm.c (grub_lvm_open): Likewise.
5699 * disk/raid.c (grub_raid_open): Likewise.
5700
5701 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5702 when hook requests it, independently of grub_errno.
5703 (pc_partition_map_probe): Do not fail when find_func() caused
5704 early abortion of pc_partition_map_iterate().
5705
5706 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5707 when hook requests it, independently of grub_errno.
5708 (gpt_partition_map_probe): Do not fail when find_func() caused
5709 early abortion of gpt_partition_map_iterate().
5710
5711 * kern/partition.c (grub_partition_iterate): Abort parent iteration
5712 when hook requests it, independently of grub_errno. Do not fail when
5713 part_map_iterate_hook() caused early abortion of p->iterate().
5714
5715 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5716 when grub_partition_iterate() returned with non-zero.
5717
277d0de9 57182008-07-03 Pavel Roskin <proski@gnu.org>
5719
5720 * disk/ata.c (grub_ata_pio_write): Check status before writing,
5721 like we do in grub_ata_pio_read().
5722 (grub_ata_readwrite): Always write individual sectors. Fix the
5723 sector count for the remainder.
5724 (grub_ata_write): Enable writing to ATA devices. Correctly
5725 report error for ATAPI devices.
5726
d4c9b428 57272008-07-02 Pavel Roskin <proski@gnu.org>
5728
e43fc690 5729 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5730 warning.
5731
f707af42 5732 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5733 for every read sector, we already increment it for the whole
5734 batch. This fixes reading more than 256 sectors at once.
5735
11e16b15 5736 * util/grub-editenv.c (cmd_info): Cast argument to long
5737 explicitly. ptrdiff_t reduces to int on i386.
5738
cbabfdd4 5739 * util/grub-editenv.c (main): Be specific which parameter is
5740 missing.
5741
b8fbce0a 5742 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5743 (memdisk): Make memdisk_orig_addr a pointer.
5744
c9c8e606 5745 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5746 for file offsets, use grub_off_t instead. Fix printf format
5747 warnings.
5748
ca62e598 5749 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5750 there. Real unexpected warnings should not drown in the noise
5751 about known problems.
5752
ce8d1766 5753 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5754 grub_disk_addr_t for memory addresses.
5755
00c7a56a 5756 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5757 explicitly to fix a warning.
5758
08d3ef09 5759 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5760
cb71ba20 5761 * Makefile.in (MODULE_LDFLAGS): New variable.
5762 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
5763 the linker accepts --build-id=none.
5764 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
5765 MODULE_LDFLAGS.
5766 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5767
d4c9b428 5768 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5769 those in Linux XFS code. Provide a way to access 64-bit parent
5770 inode.
5771 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
5772 the end of struct grub_xfs_dir_header.
5773
d4156eee 57742008-07-02 Bean <bean123ch@gmail.com>
5775
5776 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5777 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5778 and GRUB_IEEE1275_FLAG_NO_ANSI.
5779
5780 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5781 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5782 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5783
5784 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5785 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5786
5787 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5788 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5789
5790 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5791 esc sequence on non ANSI terminal.
5792 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5793
5794 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5795 beginning of file.
5796
2270f77b 57972008-07-02 Bean <bean123ch@gmail.com>
5798
5799 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5800 (grub_editenv_SOURCES): New variable.
5801 (pkglib_MODULES): Add loadenv.mod.
5802 (loadenv_mod_SOURCES): New variable.
5803 (loadenv_mod_CFLAGS): Likewise.
5804 (loadenv_mod_LDFLAGS): Likewise.
5805
5806 * include/grub/envblk.h: New file.
5807
5808 * util/envblk.c: New file.
5809
5810 * util/grub-editenv.c: New file.
5811
5812 * commands/loadenv.c: New file.
5813
0e9e51ec 58142008-07-01 Pavel Roskin <proski@gnu.org>
5815
d89b7634 5816 * include/multiboot2.h (struct multiboot_tag_module): Use char,
5817 not unsigned char. This fixes warnings and is consistent with
5818 other tags.
5819
bf1835b1 5820 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5821
8222a04b 5822 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5823
6a42d99d 5824 * term/tparm.c (analyze): Always set *popcount.
5825
10b159d1 5826 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5827 cast to fix a warning.
5828
b8789f6c 5829 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5830 cast to suppress a warning.
5831
29d7e38a 5832 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5833 grub_fshelp_read_file() expects.
5834
f341f669 5835 * fs/fat.c: Fix UUID calculation on big-endian systems. We
5836 write uuid as a 32-bit value in CPU byte order, so declare and
5837 use it as such.
5838
0e9e51ec 5839 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5840 long if the format specifier expects it.
5841 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5842 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5843 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5844 long to fix a warning.
5845 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5846 grub_dprintf() arguments to fix warnings.
5847
3aefa857 58482008-06-30 Pavel Roskin <proski@gnu.org>
5849
56c7668b 5850 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5851 install_bsd_part immediately before core.img is embedded or
5852 modified on disk. This fixes core.img verification if core.img
5853 cannot be embedded.
5854
3aefa857 5855 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5856 core_path to calculate the blocklist.
5857 Patch from Javier Martín <lordhabbit@gmail.com>
5858
5444088d 58592008-06-29 Robert Millan <rmh@aybabtu.com>
5860
5861 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
5862 block to disk block.
5863 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5864 Patch from Niels Böhm <bitbucket@arcor.de>
5865
674835c8 58662008-06-29 Robert Millan <rmh@aybabtu.com>
5867
5868 * util/update-grub_lib.in (font_path): Search for fonts in
5869 /boot/grub first, which is more likely to be readable (we aren't
5870 deciding where fonts live, just looking for them).
5871
f527dbc8 58722008-06-26 Pavel Roskin <proski@gnu.org>
5873
6c2d8df6 5874 * util/biosdisk.c (read_device_map): Don't leave dead map
5875 entries for devices failing stat() check.
5876
f527dbc8 5877 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5878 core_path_dev for the core.img path on the target device.
5879
aebe3d13 58802008-06-26 Robert Millan <rmh@aybabtu.com>
5881
5882 * disk/fs_uuid.c: New file.
5883 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5884 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5885 (fs_uuid_mod_LDFLAGS): New variables.
5886 * include/grub/disk.h (grub_disk_dev_id): Add
5887 `GRUB_DISK_DEVICE_UUID_ID'.
5888 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5889 implement iterate().
5890
37aaf354 58912008-06-26 Robert Millan <rmh@aybabtu.com>
5892
5893 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5894 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5895 Linux image includes no initrd.
5896
25ff262a 58972008-06-21 Javier Martín <lordhabbit@gmail.com>
5898
5899 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5900 call to resolve the core image location that effectively appended the
5901 name twice.
5902
76a2bd44 59032008-06-21 Robert Millan <rmh@aybabtu.com>
5904
5905 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5906 call from here ...
5907
5908 * util/grub.d/10_hurd.in: ... to here ...
5909 * util/grub.d/10_linux.in: ... and here.
5910
650e1c79 59112008-06-19 Robert Millan <rmh@aybabtu.com>
5912
fe987087 5913 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 5914 after it has been set by grub_machine_set_prefix().
5915
6ce63911 59162008-06-19 Robert Millan <rmh@aybabtu.com>
5917
5918 * commands/search.c (search_label, search_fs_uuid, search_file): Print
5919 search result when not saving to variable, not the other way around.
5920 When saving to variable, abort iteration as soon as a match is found.
5921
73940cec 59222008-06-19 Robert Millan <rmh@aybabtu.com>
5923
5924 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5925 check for partition that provides /boot/grub. Its logic is flawed,
5926 as it prevents prepare_grub_to_access_device() from being called
5927 multiple times.
5928
3c62a39d 59292008-06-19 Robert Millan <rmh@aybabtu.com>
5930
5931 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5932 "insmod" command directly when abstraction modules are needed,
fe987087 5933 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 5934 since it had already been processed).
5935
47395a42 59362008-06-19 Pavel Roskin <proski@gnu.org>
5937
5938 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5939 changed. This is needed in case GRUB_LIBDIR changes.
5940 * conf/i386-ieee1275.rmk: Likewise.
5941 * conf/i386-linuxbios.rmk: Likewise.
5942 * conf/i386-pc.rmk: Likewise.
5943 * conf/powerpc-ieee1275.rmk: Likewise.
5944
a145ac2d 59452008-06-18 Pavel Roskin <proski@gnu.org>
5946
5947 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5948 kernel_elf_symlist.c to symlist.c for consistency with other
5949 architectures. Update all users.
5950 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5951
7847c51e 59522008-06-18 Robert Millan <rmh@aybabtu.com>
5953
5954 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5955 it in prefix.
5956
5957 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
5958 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
5959 a RAID device, run setup() for all members independently on whether
5960 LVM abstraction is being used.
5961 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5962 If grub-mkimage has set `*install_dos_part == -2', don't override this
5963 value.
5964 Perform *install_dos_part adjustments independently on whether
5965 we're embedding or not.
5966 Clarify error message when image is too big for embedding.
5967 Remove duplicate *install_dos_part stanza.
5968
b23e5644 59692008-06-17 Robert Millan <rmh@aybabtu.com>
5970
5971 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5972 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5973 variables.
5974 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5975 values in grub_ofconsole_normal_color and
5976 grub_ofconsole_highlight_color (they're not directly related to
5977 background and foreground).
5978 (grub_ofconsole_setcolorstate): Extract background and foreground
5979 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5980
0aac2f79 59812008-06-17 Robert Millan <rmh@aybabtu.com>
5982
5983 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5984 /boot/grub for the check in last commit, not /boot (they could be
5985 different partitions).
5986
3cca7ef3 59872008-06-16 Robert Millan <rmh@aybabtu.com>
5988
5989 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5990 asked to setup access for the same partition that provides /boot,
5991 don't bother using UUIDs since our root already has the value we
5992 want.
5993
347396d8 59942008-06-16 Robert Millan <rmh@aybabtu.com>
5995
5996 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5997 I2O devices.
5998 Patch from Sven Mueller <sven@debian.org>.
5999
991477f8 60002008-06-16 Robert Millan <rmh@aybabtu.com>
6001
6002 * util/update-grub.in: Check for $EUID instead of $UID.
6003 Reported by Vincent Zweije.
6004
d31a32a1 60052008-06-16 Bean <bean123ch@gmail.com>
6006
fe987087 6007 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 6008 (grub_ext2_read_block): Likewise.
6009 (grub_ext2_read_inode): Likewise.
6010 (grub_ext2_mount): Likewise.
6011 (grub_ext2_close): Likewise.
6012 (grub_ext3_get_journal): Removed.
6013
fe987087 6014 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 6015 (grub_reiserfs_read_symlink): Likewise.
6016 (grub_reiserfs_mount): Likewise.
6017 (grub_reiserfs_open): Likewise.
6018 (grub_reiserfs_read): Likewise.
6019 (grub_reiserfs_close): Likewise.
6020 (grub_reiserfs_get_journal): Removed.
6021
6022 * fs/fshelp.c (grub_fshelp_read): Removed.
6023 (grub_fshelp_map_block): Likewise.
6024
6025 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6026 (grub_fshelp_journal): Likewise.
6027 (grub_fshelp_read): Likewise.
6028 (grub_fshelp_map_block): Likewise.
6029
3540a760 60302008-06-16 Pavel Roskin <proski@gnu.org>
6031
6032 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6033 floating point anymore.
6034 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6035
95614c84 60362008-06-15 Pavel Roskin <proski@gnu.org>
6037
6038 * commands/ls.c (grub_ls_list_files): Use integer calculations
6039 for human readable format, avoid floating point use.
6040 * kern/misc.c (grub_ftoa): Remove.
6041 (grub_vsprintf): Remove floating point support.
6042
50465dd6 60432008-06-15 Robert Millan <rmh@aybabtu.com>
6044
fe6b695a 6045 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 6046 devices.
6047 Reported by Max Vozeler.
6048
a9207284 60492008-06-15 Robert Millan <rmh@aybabtu.com>
6050
6051 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6052 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6053 skipped later.
6054 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6055 the beginning of the prefix.
6056
6057 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6058 It is assumed that if we have a memdisk, grub-mkimage has set
6059 grub_prefix to include the "(memdisk)" drive in it.
6060
a7cbd45a 60612008-06-15 Robert Millan <rmh@aybabtu.com>
6062
6063 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6064 Initialize keyboard controller after registering the terminal, so that
6065 grub_printf() can be called from grub_keyboard_controller_init().
6066
21cf716a 60672008-06-15 Robert Millan <rmh@aybabtu.com>
6068
6069 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6070 extent-btree which is written as big endian on disk.
6071 Reported by Alain Greppin <al@chilibi.org>.
6072
23a64d8e 60732008-06-14 Robert Millan <rmh@aybabtu.com>
6074
6075 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6076 * util/i386/pc/grub-install.in (modules): Likewise.
6077
d687651c 60782008-06-13 Pavel Roskin <proski@gnu.org>
6079
6080 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6081
dfe9ddd4 60822008-06-13 Bean <bean123ch@gmail.com>
6083
6084 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6085
6086 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6087
6088 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6089 to indicate sparse block.
6090
16ae7781 60912008-06-12 Pavel Roskin <proski@gnu.org>
6092
e6d1a308 6093 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6094 number, grub_fshelp_read() does it for us.
6095
16ae7781 6096 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6097 linear disk read with journal translation.
6098 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6099 * include/grub/fshelp.h: Declare grub_fshelp_read().
6100
40fd3a2b 61012008-06-09 Pavel Roskin <proski@gnu.org>
6102
6103 * fs/minix.c (grub_minix_mount): Handle error reading
6104 superblock.
6105
f5679726 61062008-06-08 Robert Millan <rmh@aybabtu.com>
6107
6108 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6109 don't append the RAID prefix afterwards.
6110 Reported by Clint Adams.
6111
ce525529 61122008-06-08 Robert Millan <rmh@aybabtu.com>
6113
6114 Based on description from Pavel:
6115 * kern/disk.c (grub_disk_check_range): Rename to ...
6116 (grub_disk_adjust_range): ... this. Add a comment explaining the
6117 tasks performed by this function.
6118
ad4936a0 61192008-06-08 Robert Millan <rmh@aybabtu.com>
6120
6121 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6122 `num_serial' (for consistency with other variables).
6123 (struct grub_ntfs_data): Add `uuid' member.
6124 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6125 (grub_ntfs_uuid): New function.
6126 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6127
dc20b0f9 61282008-06-07 Pavel Roskin <proski@gnu.org>
6129
6130 * util/biosdisk.c (open_device): Revert last change to the
6131 function, it broke installation. The sector needs to be
6132 different dependent on which device is opened.
6133
c5e3cfba 61342008-06-06 Robert Millan <rmh@aybabtu.com>
6135
6136 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6137 rest of GRUB, and breakage doesn't happen if its value were modified.
6138
6139 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6140 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6141 a constant (same value).
6142 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6143 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6144
26a1f8c4 61452008-06-06 Robert Millan <rmh@aybabtu.com>
6146
6147 * util/biosdisk.c (open_device): Do not modify sector offset when
6148 accessing a partition. kern/disk.c already handles this for us.
6149
25d6b327 61502008-06-06 Robert Millan <rmh@aybabtu.com>
6151
6152 * util/grub-emu.c (grub_machine_init): Move code in this function from
6153 here ...
6154 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6155 segfault in case grub_printf() is called).
6156
6157 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6158 grub_probe. Update all users not to explicitly add it again.
6159 (grub_device): New variable; contains corresponding device for grubdir.
6160 (fs_module, partmap_module, devabstraction_module): Pass
6161 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6162 every time.
6163
9ece62fb 61642008-06-05 Robert Millan <rmh@aybabtu.com>
6165
6166 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6167 is found, print it (same layout as with labels).
6168
1ad36d37 61692008-06-04 Robert Millan <rmh@aybabtu.com>
6170
6171 * util/biosdisk.c (get_drive): Rename to ...
6172 (find_grub_drive): ... this. Update all users.
6173
6174 (get_os_disk): Rename to ...
6175 (convert_system_partition_to_system_disk): ... this. Update all users.
6176
6177 (find_drive): Rename to ...
6178 (find_system_device): ... this. Update all users.
6179
e6a30859 61802008-06-04 Robert Millan <rmh@aybabtu.com>
6181
6182 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6183 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6184 (make_device_map): Likewise.
6185
00c108a4 61862008-06-01 Robert Millan <rmh@aybabtu.com>
6187
6188 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6189 before dereferencing it.
6190
6191 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6192 union with fat12/fat16-specific ones. Add some new fields, including
6193 `num_serial' for both versions.
6194 (struct grub_fat_data): Add `uuid' member.
6195 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6196 names. Initialize `data->uuid' using `num_serial'.
6197 (grub_fat_uuid): New function.
6198 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6199
6200 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6201 (grub_reiserfs_uuid): New function.
6202 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6203 member.
6204
6205 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6206 (grub_xfs_uuid): New function.
6207 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6208
1385c5bb 62092008-06-01 Robert Millan <rmh@aybabtu.com>
6210
6211 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6212 code that is backward compatible with pre-uuid search command.
6213
c682dfd7 62142008-05-31 Robert Millan <rmh@aybabtu.com>
6215
6216 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6217 floppies after everything else, to ensure floppy drive isn't accessed
6218 unnecessarily (patch from Bean).
6219
b7db5d47 62202008-05-31 Robert Millan <rmh@aybabtu.com>
6221
6222 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6223 not print device names when we were asked to set a variable.
6224
6e037aa9 62252008-05-31 Robert Millan <rmh@aybabtu.com>
6226
6227 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6228 using "cursor-on" and "cursor-off" commands (understood at least by
6229 the Open Firmware flavour on OLPC).
6230
41305bc8 62312008-05-31 Michael Gorven <michael@gorven.za.net>
6232
6233 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6234 on and off sequences.
6235
69ba137e 62362008-05-31 Robert Millan <rmh@aybabtu.com>
6237
6238 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6239 * util/update-grub.in: Likewise.
6240
520ae21b 62412008-05-30 Pavel Roskin <proski@gnu.org>
6242
6243 * util/biosdisk.c (linux_find_partition): Simplify logic and
6244 make the code more universal. Keep special processing for
6245 devfs, but use a simple rule for all other devices. If the
6246 device ends with a number, append 'p' and the partition number.
6247 Otherwise, append only the partition number.
6248
5786569b 62492008-05-30 Robert Millan <rmh@aybabtu.com>
6250
6251 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6252 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6253 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6254 the `root' parameter to Linux.
6255
51500452 62562008-05-30 Robert Millan <rmh@aybabtu.com>
6257
6258 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6259 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6260 --fs_uuid with --fs-uuid.
6261 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6262 all filesystems support them).
6263
811d3878 62642008-05-30 Robert Millan <rmh@aybabtu.com>
6265
6266 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 6267 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 6268
cab63c95 62692008-05-30 Robert Millan <rmh@aybabtu.com>
6270
6271 * util/grub.d/00_header.in: Remove obsolete comment referencing
6272 convert_system_path_to_grub_path().
6273 * util/update-grub.in: Likewise.
6274 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6275 (convert_system_path_to_grub_path): Add a warning message explaining
6276 that this function is deprecated. Rely on is_path_readable_by_grub()
6277 for the readability checks.
6278 (font_path): Use is_path_readable_by_grub() for the readability
6279 check rather than convert_system_path_to_grub_path().
6280
972e2f7a 62812008-05-30 Robert Millan <rmh@aybabtu.com>
6282
6283 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6284 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6285 converting it first.
6286 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6287 grub.cfg for access to font file, and afterwards call it again to set
6288 the root device.
6289
62191274 62902008-05-30 Robert Millan <rmh@aybabtu.com>
6291
6292 * commands/search.c (options): Add --fs_uuid option.
6293 (search_fs_uuid): New function.
6294 (grub_cmd_search): Fix --set argument passing.
6295 Use search_fs_uuid() when requested via --fs_uuid.
6296 (grub_search_init): Update help message.
6297 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6298 and redeclare it as an array of 16-bit words.
6299 (grub_ext2_uuid): New function.
6300 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6301 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6302 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6303 (GRUB_DEVICE_BOOT_UUID): New variables.
6304 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6305 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6306 whenever possible.
6307 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6308 just assume `root' variable has the right value.
6309 * util/grub.d/10_linux.in: Likewise.
6310 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6311 via PRINT_FS_UUID.
6312 (main): Recognise `-t fs_uuid' argument.
6313
01b73ec8 63142008-05-30 Robert Millan <rmh@aybabtu.com>
6315
6316 * util/biosdisk.c (map): Redefine structure to hold information
6317 about GRUB drive name.
fe6b695a 6318 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 6319 drive names.
6320 (call_hook): Remove.
6321 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6322 member. Assume drive has partitions.
6323 (grub_util_biosdisk_open): Access device names via `.device' struct
6324 member.
6325 (open_device): Likewise.
6326 (find_drive): Likewise.
6327 (read_device_map): Adjust map[] usage to match the new struct
6328 definition. Don't check for duplicates (still possible, but not cheap
6329 anymore).
6330 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6331 (make_device_name): Remove assumption of BIOS-like drive names.
6332
22f16596 63332008-05-30 Pavel Roskin <proski@gnu.org>
6334
6335 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6336 compiling execute.c doesn't need grub_script.tab.h anymore.
6337 (normal/command.c_DEPENDENCIES): Likewise.
6338 (normal/function.c_DEPENDENCIES): Likewise.
6339 * conf/i386-ieee1275.rmk: Likewise.
6340 * conf/i386-linuxbios.rmk: Likewise.
6341 * conf/i386-pc.rmk: Likewise.
6342 * conf/powerpc-ieee1275.rmk: Likewise.
6343 * conf/sparc64-ieee1275.rmk: Likewise.
6344
528ad8f2 63452008-05-29 Pavel Roskin <proski@gnu.org>
6346
d1dff95d 6347 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6348 when scanning metadata for volume group name.
6349
528ad8f2 6350 * include/grub/script.h: Don't include grub_script.tab.h. It's
6351 a generated file, which may only be included from the files with
6352 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6353 use union YYSTYPE, as the later allows forward declaration.
6354 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6355
47248e08 63562008-05-29 Robert Millan <rmh@aybabtu.com>
6357
6358 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6359 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6360 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6361 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6362 scan codes.
6363
ee632529 63642008-05-29 Robert Millan <rmh@aybabtu.com>
6365
6366 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6367 control key combinations.
6368
eee96e08 63692008-05-29 Robert Millan <rmh@aybabtu.com>
6370
6371 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6372 * util/ieee1275/grub-install.in: ... to here.
6373 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6374 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6375 (grub_install_SOURCES): Likewise.
6376
da9a6a94 63772008-05-29 Robert Millan <rmh@aybabtu.com>
6378
6379 * fs/affs.c: Update copyright year.
6380 * fs/ext2.c: Likewise.
6381 * fs/fshelp.c: Likewise.
6382 * fs/hfsplus.c: Likewise.
6383 * fs/ntfs.c: Likewise.
6384 * fs/xfs.c: Likewise.
6385 * include/grub/fshelp.h: Likewise.
6386 * util/grub-mkdevicemap.c: Likewise.
6387
12e65f3a 63882008-05-28 Robert Millan <rmh@aybabtu.com>
6389
6390 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6391 might need to be fatfs to support some firmware implementations
6392 (e.g. OFW or EFI).
6393
23023641 63942008-05-28 Robert Millan <rmh@aybabtu.com>
6395
6396 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6397 devices.
6398 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6399 (make_device_map): Likewise.
6400
887d2619 64012008-05-20 Bean <bean123ch@gmail.com>
6402
6403 * fs/fshelp.c (grub_fshelp_map_block): New function.
6404 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6405 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6406
6407 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6408 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6409 (grub_fshelp_journal): New structure.
6410 (grub_fshelp_map_block): New function prototype.
6411 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6412 (grub_fshelp_map_block): Likewise.
6413
6414 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6415 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6416 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6417 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6418 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6419 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6420 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6421 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6422 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6423 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6424 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6425 (grub_ext2_sblock): New members for journal support.
6426 (grub_ext3_journal_header): New structure.
6427 (grub_ext3_journal_revoke_header): Likewise.
6428 (grub_ext3_journal_block_tag): Likewise.
6429 (grub_ext3_journal_sblock): Likewise.
6430 (grub_fshelp_node): New members logfile and journal.
6431 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6432 grub_fshelp_map_block to get real block number.
6433 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6434 number.
6435 (grub_ext2_read_inode): Likewise.
6436 (grub_ext3_get_journal): New function.
6437 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6438 (grub_ext2_close): Release memory used by journal.
6439
6440 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6441 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6442 (grub_reiserfs_transaction_header): Renamed to
6443 grub_reiserfs_description_block, replace field data with real_blocks.
6444 (grub_reiserfs_commit_block): New structure.
6445 (grub_reiserfs_data): New member journal.
6446 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6447 number.
6448 (grub_reiserfs_read_symlink): Likewise.
6449 (grub_reiserfs_iterate_dir): Likewise.
6450 (grub_reiserfs_open): Likewise.
6451 (grub_reiserfs_read): Likewise.
6452 (grub_reiserfs_get_journal): New function.
6453 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6454 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6455 using grub_reiserfs_get_journal.
6456 (grub_reiserfs_close): Release memory used by journal.
6457
6458 * fs/affs.c (grub_affs_read_block): Change block type to
6459 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6460
6461 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6462
6463 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6464
6465 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6466
6467 * fs/udf.c (grub_udf_read_block): Change block type to
6468 grub_disk_addr_t. Use type cast to avoid warning.
6469
6470 * fs/xfs.c (grub_xfs_read_block): Likewise.
6471
b7c6bed5 64722008-05-16 Christian Franke <franke@computer.org>
6473
6474 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6475 to ensure that break with ESC will always work.
6476 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6477 Remove ESC from keyboard queue.
6478
eedf167f 64792008-05-16 Christian Franke <franke@computer.org>
6480
6481 * util/biosdisk.c: [__CYGWIN__] Add includes.
6482 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6483 (get_os_disk): Move variable declarations to OS specific
6484 parts to avoid warning.
6485 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6486 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6487 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6488 Cygwin.
6489 * util/getroot.c: [__CYGWIN__] Add includes.
6490 (strip_extra_slashes): Fix "/" case.
6491 [__CYGWIN__] (get_win32_path): New function.
6492 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6493 [__CYGWIN__] (find_root_device): Disable.
6494 [__CYGWIN__] (get_bootsec_serial): New function.
6495 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6496 [__linux__] (grub_guess_root_device): Add early returns to simplify
6497 structure.
6498 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6499 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6500 check for Linux only.
6501
a079699e 65022008-05-15 Bean <bean123ch@gmail.com>
6503
6504 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6505 keyboard hang problem in apple's intel mac.
6506
1cf4059a 65072008-05-09 Robert Millan <rmh@aybabtu.com>
6508
6509 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6510 devices.
6511 * util/grub-mkdevicemap.c (get_virtio_disk_name)
6512 (make_device_map): Likewise.
6513 Reported by Aurelien Jarno <aurel32@debian.org>
6514
ed759390 65152008-05-07 Ian Campbell <ijc@hellion.org.uk>
6516
6517 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6518 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6519 (make_device_map): Output entries for xvd type disks.
6520
b56c4eaa 65212008-05-07 Robert Millan <rmh@aybabtu.com>
6522
6523 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6524 devices.
6525 * util/grub-mkdevicemap.c (get_cciss_disk_name)
6526 (make_device_map): Likewise.
6527 Reported by Roland Dreier <rdreier@cisco.com>
6528
7f8866ed 65292008-05-07 Robert Millan <rmh@aybabtu.com>
6530
6531 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6532 grub_strstr() call. Correct a few mistakes in failure path handling.
6533
b0346e0f 65342008-05-06 Robert Millan <rmh@aybabtu.com>
6535
6536 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6537 Do not print a trailing slash (therefore, the root directory is an
6538 empty string).
6539 (convert_system_path_to_grub_path): Do not remove trailing slash
6540 from make_system_path_relative_to_its_root() output.
6541
6542 * util/i386/pc/grub-install.in: Add trailing slash to output from
6543 make_system_path_relative_to_its_root().
6544
6cf12cbd 65452008-05-06 Robert Millan <rmh@aybabtu.com>
6546
6547 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
6548 ensures that output lines aren't intermangled with those sent to
6549 stderr (via grub_util_info()).
6550 * util/grub-probe.c (grub_refresh): Likewise.
6551 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6552
0fbb3117 65532008-05-05 Christian Franke <franke@computer.org>
6554
6555 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6556 Add Cygwin device names.
6557 (get_ide_disk_name) [__CYGWIN__]: Likewise.
6558 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6559 (check_device): Return error instead of success on empty name.
6560 (make_device_map): Move label inside linux specific code to
6561 prevent compiler warning.
6562
8124cdb7 65632008-04-30 Robert Millan <rmh@aybabtu.com>
6564
6565 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6566 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6567 first boot option.
6568 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6569
094c01d0 65702008-04-29 Robert Millan <rmh@aybabtu.com>
6571
6572 * docs/grub.cfg: New file (example GRUB configuration).
6573
f4b1fc02 65742008-04-26 Robert Millan <rmh@aybabtu.com>
6575
329ce2a5 6576 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
6577 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6578 and `disk/ieee1275/nand.c'.
f4b1fc02 6579
25f16ec1 65802008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 6581
25f16ec1 6582 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6583 i386-linuxbios.
6584
6585 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6586 change the buffer size to 4096 for cdrom device.
6587
6588 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6589 and nand.mod.
6590 (_linux_mod_SOURCES): New variable.
6591 (_linux_mod_CFLAGS): Likewise.
6592 (_linux_mod_LDFLAGS): Likewise.
6593 (linux_mod_SOURCES): Likewise.
6594 (linux_mod_CFLAGS): Likewise.
6595 (linux_mod_LDFLAGS): Likewise.
6596 (nand_mod_SOURCES): Likewise.
6597 (nand_mod_CFLAGS): Likewise.
6598 (nand_mod_LDFLAGS): Likewise.
6599
6600 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6601 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6602 type property. (nand device in olpc don't have this property)
6603
6604 * include/grub/disk.h (grub_disk_dev_id): New macro
6605 GRUB_DISK_DEVICE_NAND_ID.
6606
6607 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6608 function prototype.
6609 (grub_rescue_cmd_initrd): Likewise.
6610
6611 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6612 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6613 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 6614
25f16ec1 6615 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6616 GRUB_MACHINE_IEEE1275 is defined.
6617
6618 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6619 Use NESTED_FUNC_ATTR attribute on the hook parameter.
6620
6621 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6622 on nested function heap_init.
6623 (grub_upper_mem): New variable for i386-ieee1275.
6624 (grub_get_extended_memory): New function for i386-ieee1275.
6625 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6626
6627 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6628 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6629 property.
f19dbdb7 6630
25f16ec1 6631 * loader/i386/ieee1275/linux.c: New file.
6632
6633 * loader/i386/ieee1275/linux_normal.c: New file.
6634
6635 * disk/ieee1275/nand.c: New file.
6636
e89d61e9 66372008-04-18 Thomas Schwinge <tschwinge@gnu.org>
6638
6639 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6640 value.
6641 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6642
602566f6 66432008-04-18 Robert Millan <rmh@aybabtu.com>
6644
6645 Restructures early code path on ieee1275 to unify grub_main() as
6646 the first C function that is executed in every platform.
6647
6648 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6649 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6650 cmain().
6651 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6652 * kern/ieee1275/cmain.c (cmain): Rename to ...
6653 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6654 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6655 at the beginning.
6656
57490c2b 66572008-04-18 Robert Millan <rmh@aybabtu.com>
6658
6659 * util/update-grub.in: Fix syntax error when setting
6660 `GRUB_PRELOAD_MODULES'.
6661 Reported by Stephane Chazelas <stephane@artesyncp.com>
6662
1977517d 66632008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
6664
6665 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6666 section into account, newer toolchains generate unique build ids
6667 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 6668 we want build ids to be preserved
1977517d 6669 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6670 far from other sections don't cause the raw binary images grow
6671 size
6672
bfb1f1a2 66732008-04-15 Robert Millan <rmh@aybabtu.com>
6674
6675 * disk/lvm.c: Update copyright year.
6676 * kern/misc.c: Likewise.
6677
01979850 66782008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6679
6680 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 6681 there is no memory left for physical volume name.
01979850 6682
0a1150e2 66832008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6684
6685 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6686 volume name mapping to support bigger than 9 character names properly.
6687
82ead3fe 66882008-04-13 Robert Millan <rmh@aybabtu.com>
6689
6690 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6691 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6692
e54a72f5 66932008-04-13 Christian Franke <franke@computer.org>
6694
6695 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6696 to create a floppy emulation boot CD when non emulation mode
6697 does not work.
6698 Enable Joliet CD filesystem extension.
6699
9fe86034 67002008-04-13 Robert Millan <rmh@aybabtu.com>
6701
6702 * kern/misc.c (grub_strncat): Fix off-by-one error.
6703 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6704
6705 * kern/env.c (grub_env_context_close): Clear current context, not
6706 previous one.
6707 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6708
6709 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6710
7ceeee39 67112008-04-13 Robert Millan <rmh@aybabtu.com>
6712
6713 Improve robustness when handling LVM.
6714
6715 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 6716 (and leave `*p' unmodified).
7ceeee39 6717 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6718 through it.
6719 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6720 iterating through it.
6721 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6722 through it.
fe6b695a 6723 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 6724 when due) on each grub_lvm_getvalue() or grub_strstr() call.
6725 Don't assume `vg->pvs != NULL' when iterating through it.
6726
58cd3d85 67272008-04-13 Robert Millan <rmh@aybabtu.com>
6728
6729 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6730 * genmk.rb (partmap): New variable.
6731 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6732 (#{partmap}): New target rule.
6733 * genpartmaplist.sh: New file.
6734 * Makefile.in (pkglib_DATA): Add partmap.lst.
6735 (partmap.lst): New target rule.
6736 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6737 modules (including all partition maps), instead of preloading them.
6738
78b51059 67392007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
6740
6741 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6742 `linux-boot-prober' (if installed) to detect other operating
6743 systems which are installed on the computer and add them to
6744 the boot menu.
6745 * conf/common.rmk: Build and install 30_os-prober.
6746
a91627b4 67472008-04-12 Robert Millan <rmh@aybabtu.com>
6748
6749 * kern/powerpc/ieee1275/init.c: Move from here ...
6750 * kern/ieee1275/init.c: ... to here. Update all users.
6751
6752 * kern/powerpc/ieee1275/cmain.c: Move from here ...
6753 * kern/ieee1275/cmain.c: ... to here. Update all users.
6754
6755 * kern/powerpc/ieee1275/openfw.c: Move from here ...
6756 * kern/ieee1275/openfw.c: ... to here. Update all users.
6757
6758 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6759 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
6760
322562ea 67612008-04-10 Pavel Roskin <proski@gnu.org>
6762
6763 * configure.ac: Always use "_cv_" in cache variables for
6764 compatibility with Autoconf 2.62.
6765
a02a73c5 67662008-04-07 Robert Millan <rmh@aybabtu.com>
6767
6768 Revert grub/machine/init.h addition by Pavel (since it breaks on
6769 i386-ieee1275 and others):
6770 * util/i386/pc/misc.c: Remove grub/machine/init.h.
6771 * util/powerpc/ieee1275/misc.c: Likewise.
6772
25c024b1 67732008-04-07 Robert Millan <rmh@aybabtu.com>
6774
6775 * util/grub-probe.c (probe): Improve error message.
6776
3cbd2f98 67772008-04-07 Robert Millan <rmh@aybabtu.com>
6778
6779 * util/biosdisk.c (read_device_map): Skip devices that don't exist
6780 (this prevents the presence of a bogus entry from ruining the whole
6781 thing).
6782
87a297bf 67832008-04-06 Pavel Roskin <proski@gnu.org>
6784
36747a62 6785 * util/biosdisk.c: Include grub/util/biosdisk.h.
6786 * util/grub-fstest.c (execute_command): Make static.
6787 * util/grub-mkdevicemap.c (check_device): Likewise.
6788 * util/i386/pc/misc.c: Include grub/machine/init.h.
6789 * util/powerpc/ieee1275/misc.c: Likewise.
6790 * util/lvm.c: Include grub/util/lvm.h.
6791 * util/misc.c: Include grub/kernel.h, grub/misc.h and
6792 grub/cache.h.
6793 * util/raid.c: Include grub/util/raid.h.
6794 (grub_util_getdiskname): Make static.
6795
87a297bf 6796 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6797 grub_hostfs_fini(), as they are called from grub_init_all() and
6798 grub_fini_all() respectively. This fixes an infinite loop in
6799 grub-fstest due to double registration of hostfs.
6800 Reported by Christian Franke <Christian.Franke@t-online.de>
6801
f6ce7629 68022008-04-05 Pavel Roskin <proski@gnu.org>
6803
6804 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6805 all 8 functions. Otherwise, probe function 0 only.
6806
070e49e4 68072008-04-04 Pavel Roskin <proski@gnu.org>
6808
8b088a4c 6809 * commands/lspci.c (grub_lspci_iter): Print the bus number
6810 correctly.
6811
4f657021 6812 * commands/lspci.c (grub_pci_classes): Fix typos.
6813 (grub_lspci_iter): Don't print func twice. Print vendor ID
6814 before device ID, as it's normally done.
6815
070e49e4 6816 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6817 Fix signedness warnings.
6818 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6819 Likewise.
6820 * util/ieee1275/get_disk_name.c: Include config.h so that
6821 _GNU_SOURCE is defined and getline() is declared. Mark an
6822 unused argument as such. Fix a signedness warning.
6823
ba7328dc 68242008-04-02 Pavel Roskin <proski@gnu.org>
6825
26887f22 6826 * genkernsyms.sh.in: Use more robust assignments for CC and
6827 srcdir. Quote srcdir.
6828 * gensymlist.sh.in: Likewise. Assert at the compile time that
6829 the symbol table is not empty.
6830
ba7328dc 6831 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6832 * fs/cpio.c (grub_cpio_read): Likewise.
6833
0f582c6b 68342008-04-01 Pavel Roskin <proski@gnu.org>
6835
4b6e1995 6836 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6837 * disk/host.c (grub_host_open): Likewise.
6838 * disk/loopback.c (grub_loopback_open): Likewise.
6839 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6840 disk->id as in disk/host.c, not a multi-character constant.
6841
828a2768 6842 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
6843 later is obsolete, potentially dangerous and sets a bad example.
6844 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6845 * util/misc.c (grub_util_get_image_size): Likewise.
6846
2bb4fb47 6847 * disk/loopback.c (options): Improve help for "--partitions".
6848
0f582c6b 6849 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6850 options to align them with the short options, e.g. "echo -e".
6851
a33224e0 68522008-03-31 Bean <bean123ch@gmail.com>
6853
6854 * video/reader/png.c (grub_png_data): New member is_16bit and
6855 image_data.
6856 (grub_png_decode_image_header): Detect 16 bit png image.
6857 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6858 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6859 (grub_video_reader_png): Release memory occupied by image_data.
6860
6861 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6862 4096 bytes.
6863 (grub_nfs_mount): Skip the test for sector per cluster.
6864
6865 * include/grub/ntfs.h (MAX_SPC): Removed.
6866
86cb4f54 68672008-03-31 Bean <bean123ch@gmail.com>
6868
6869 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6870 (grub_probe_SOURCES): Add fs/afs.c.
6871 (grub_fstest_SOURCES): Likewise.
6872 (afs_mod_SOURCES): New variable.
6873 (afs_mod_CFLAGS): Likewise.
6874 (afs_mod_LDFLAGS): Likewise.
6875
6876 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6877 (grub_emu_SOURCES): Likewise.
6878
6879 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6880
6881 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6882
6883 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6884
6885 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6886
6887 * fs/afs.c: New file.
6888
17c74c21 68892008-03-30 Pavel Roskin <proski@gnu.org>
6890
4cb68e89 6891 * disk/host.c: Include grub/misc.h to fix a warning.
6892 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6893 warnings about implicit declarations.
6894
8790bb04 6895 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6896 variable.
6897 * include/grub/i386/loader.h: Change declaration of
6898 grub_linux_boot() to match what grub_loader_set() expects.
6899 * util/getroot.c (grub_guess_root_device): Return const char* to
6900 fix a warning.
6901 * util/grub-probe.c (probe): Fix a warning about uninitialized
6902 abstraction_name variable.
6903 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6904 second argument as unused to fix a warning.
6905
9a3f3296 6906 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6907 missing grub_error() call.
6908
0ecef90d 6909 * util/update-grub_lib.in: Define datarootdir, since Autoconf
6910 2.60 and newer uses it to define datadir.
6911
0bf6d401 6912 * commands/sleep.c: Fix warning about implicit declaration.
6913 * disk/memdisk.c: Likewise.
6914 * loader/aout.c: Likewise.
6915 * loader/i386/bsd_normal.c: Likewise.
6916 * util/grub-probe.c: Likewise.
6917
7cdacf97 6918 * commands/i386/cpuid.c (has_longmode): Make static.
6919 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6920 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6921
17c74c21 6922 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6923 GDT. This is more robust, as %ds can change.
6924 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6925 calling real_to_prot().
6926 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6927
80a3e68b 69282008-03-28 Pavel Roskin <proski@gnu.org>
6929
6930 * kern/i386/pc/startup.S: Assert that uncompressed functions
6931 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6932 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6933 code, as they push parts of the code (error handlers) beyond
6934 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
6935 code as correctness and size.
6936
77bcd272 69372008-03-28 Pavel Roskin <proski@gnu.org>
6938
6939 * kern/i386/pc/startup.S
6940 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6941 data block address to the real mode, keep offset minimal. This
6942 works around a bug in AWARD BIOS on old Athlon systems, which
6943 makes CD detection hang.
6944
c5dfd43b 69452008-03-26 Pavel Roskin <proski@gnu.org>
6946
6947 * normal/color.c (grub_parse_color_name_pair): Make `name' a
6948 const.
6949 * include/grub/normal.h: Add grub_parse_color_name_pair()
6950 declaration.
6951
bf962df2 69522008-03-24 Bean <bean123ch@gmail.com>
6953
6954 * disk/i386/pc/biosdisk.c (cd_start): Removed.
6955 (cd_count): Removed.
6956 (cd_drive): New variable.
6957 (grub_biosdisk_get_drive): Don't check for (cdN) device.
6958 (grub_biosdisk_call_hook): Likewise.
6959 (grub_biosdisk_iterate): Change cdrom detection method.
6960 (grub_biosdisk_open): Replace cd_start with cd_drive.
6961 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6962 detect cdrom device.
6963
6964 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6965 Removed.
6966 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6967 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6968 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6969 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6970 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6971 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6972 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6973 (grub_biosdisk_cdrp): New structure.
6974 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6975
6976 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6977
6978 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6979 device.
6980
6981 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6982 New function.
6983
68e7fc7a 69842008-03-20 Robert Millan <rmh@aybabtu.com>
6985
6986 Remove 2 TiB limit in ata.mod.
6987 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6988 (grub_ata_dumpinfo): Print sector count with 0x%llx.
6989 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6990 grub_uint64_t instead of grub_uint32_t.
6991
38ad2cf5 69922008-03-05 Bean <bean123ch@gmail.com>
6993
6994 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6995 (grub_multiboot): Set boot device.
6996
6997 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6998
2b89344e 69992008-03-02 Bean <bean123ch@gmail.com>
7000
7001 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7002 symlink_buffer.
7003
87a95d1f 70042008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7005
7006 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7007 texinfo.tex.
7008
7009 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7010 modified.
7011
7012 * docs/fdl.texi: New file.
f19dbdb7 7013
87a95d1f 7014 * docs/mdate-sh: New file. Copied from gnulib.
7015 * docs/texinfo.tex: Likewise.
7016
7017 * config.guess: Updated from gnulib.
7018 * install-sh: Likewise.
7019
7dc15d8e 70202008-02-28 Robert Millan <rmh@aybabtu.com>
7021
7022 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7023 (aout_mod_SOURCES): New variable.
7024 (aout_mod_CFLAGS): Likewise.
7025 (aout_mod_LDFLAGS): Likewise.
7026
7027 * conf/i386-ieee1275.rmk: Likewise.
7028
b00ab696 70292008-02-28 Robert Millan <rmh@aybabtu.com>
7030
7031 * util/update-grub.in: Reorganise terminal validity check. Accept
7032 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7033 Based on suggestion by Franklin PIAT.
7034
79ca2d78 70352008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7036
7037 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7038 function.
7039 * util/getroot.c (grub_util_check_block_device): New function that
7040 returns the given argument if it is a block device and returns NULL else.
7041 * util/grub-probe.c (argument_is_device): New variable.
7042 (probe): Promote device_name from a variable to an argument. Receive
7043 device_name from grub_util_check_block_device() if path is NULL and from
7044 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 7045 (options): Introduce new parameter '-d, --device'.
79ca2d78 7046 (main): Add description of the new parameter to the help screen.
7047 Rename path variable to argument. Set argument_is_device if the '-d'
7048 option is given. Pass argument to probe() depending on
7049 argument_is_device.
7050
0d16e571 70512008-02-24 Bean <bean123ch@gmail.com>
7052
7053 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7054 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7055 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7056 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7057 (GRUB_ISO9660_VOLDESC_END): Likewise.
7058 (grub_iso9660_primary_voldesc): New member escape.
7059 (grub_iso9660_data): New member joliet.
7060 (grub_iso9660_convert_string): New function.
7061 (grub_iso9660_mount): Detect joliet extension.
7062 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7063 (grub_iso9660_iso9660_label): Likewise.
7064
7065 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7066 (grub_setup_SOURCES): Add fs/udf.c.
7067 (grub_fstest_SOURCES): Likewise.
7068 (udf_mod_SOURCES): New variable.
7069 (udf_mod_CFLAGS): Likewise.
7070 (udf_mod_LDFLAGS): Likewise.
7071
7072 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7073 (grub_emu_SOURCES): Likewise.
7074
7075 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7076
7077 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7078
7079 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7080
7081 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7082
7083 * fs/udf.c: New file.
7084
8a594a17 70852008-02-24 Robert Millan <rmh@aybabtu.com>
7086
7087 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7088 (normal/lexer.c_DEPENDENCIES): New variables.
7089 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7090 (normal/lexer.c_DEPENDENCIES): Likewise.
7091 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7092 (normal/lexer.c_DEPENDENCIES): Likewise.
7093 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7094 (normal/lexer.c_DEPENDENCIES): Likewise.
7095 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7096 (normal/lexer.c_DEPENDENCIES): Likewise.
7097 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7098 (normal/lexer.c_DEPENDENCIES): Likewise.
7099
2dc33c03 71002008-02-23 Robert Millan <rmh@aybabtu.com>
7101
7102 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7103 since they were intended to be in hex. This didn't break previously
7104 because of a bug in gpt_partition_map_iterate() (see below).
7105
7106 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7107 when checking the validity of GPT header.
7108 Remove `partno', since it always provides the same information as `i'.
7109
f6f4cfb0 71102008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7111
7112 * include/grub/efi/time.h: Fix a wrong comment.
7113
79ff665f 71142008-02-19 Pavel Roskin <proski@gnu.org>
7115
7116 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7117 message.
7118
d38e24c2 71192008-02-19 Bean <bean123ch@gmail.com>
7120
7121 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7122 (aout_mod_SOURCES): New variable.
7123 (aout_mod_CFLAGS): Likewise.
7124 (aout_mod_LDFLAGS): Likewise.
7125 (_bsd_mod_SOURCES): New variable.
7126 (_bsd_mod_CFLAGS): Likewise.
7127 (_bsd_mod_LDFLAGS): Likewise.
7128 (bsd_mod_SOURCES): New variable.
7129 (bsd_mod_CFLAGS): Likewise.
7130 (bsd_mod_LDFLAGS): Likewise.
7131
7132 * include/grub/aout.h: New file.
7133
7134 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7135
7136 * include/grub/i386/bsd.h: New file.
7137
7138 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7139 to make it public.
7140
7141 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7142 function is called, so that it's possible to change it inside the hook.
7143 (grub_elf64_load): Likewise.
7144 (grub_elf_file): Don't close the file if elf header is not found.
7145 (grub_elf_close): Close the file if grub_elf_file fails (The new
7146 grub_elf_file won't close it).
7147 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7148 (grub_elf64_size): Likewise.
7149
7150 * kern/i386/loader.S (grub_unix_real_boot): New function.
7151
7152 * loader/aout.c: New file.
7153
7154 * loader/i386/bsd.c: New file.
7155
7156 * loader/i386/bsd_normal.c: New file.
7157
7158 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7159
7160 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 7161 can test other formats.
d38e24c2 7162
b93bdb0f 71632008-02-19 Robert Millan <rmh@aybabtu.com>
7164
7165 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7166 (grub_gpt_partition_type_empty): Redefine with macro from
7167 `<grub/gpt_partition.h>'.
7168 (gpt_partition_map_iterate): Adjust partition type comparison.
7169
7170 Export `entry' as partmap-specific `part.data' struct.
7171 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7172
7173 * include/grub/gpt_partition.h (grub_gpt_header)
7174 (grub_gpt_partentry): ... to here (new file).
7175
7176 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7177
7178 (grub_gpt_partition_type_bios_boot): New const variable, defined
7179 with macro from `<grub/gpt_partition.h>'.
7180
7181 (setup): Replace `first_start' with `embed_region', which keeps
7182 track of the embed region (and is partmap-agnostic).
7183
7184 Replace find_first_partition_start() with find_usable_region(),
7185 which finds a usable region for embedding using partmap-specific
7186 knowledge (supports PC/MSDOS and GPT).
7187
7188 Fix all assumptions that the embed region start at sector 1, using
7189 `embed_region.start' from now on. Similarly, use `embed_region.end'
7190 rather than `first_start' to calculate available size.
7191
7192 In grub_util_info() message, replace "into after the MBR" with an
7193 indication of the specific sector our embed region starts at.
7194
66cb40f6 71952008-02-19 Robert Millan <rmh@aybabtu.com>
7196
7197 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7198 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7199 `commands/reboot.c'.
7200 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7201 (halt_mod_SOURCES): Likewise.
7202 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7203 (halt_mod_SOURCES): Likewise.
7204
b7202015 72052008-02-17 Christian Franke <franke@computer.org>
7206
7207 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7208
32b0fc49 72092008-02-17 Robert Millan <rmh@aybabtu.com>
7210
7211 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7212 set `first_start' to 0 for non-PC/MSDOS partition maps.
7213
aca63502 72142008-02-16 Robert Millan <rmh@aybabtu.com>
7215
7216 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7217 do not assume partition map is PC/MSDOS before performing checks that
7218 are specific to that layout.
7219
0de8be86 72202008-02-13 Robert Millan <rmh@aybabtu.com>
7221
7222 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7223 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7224 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7225
c3db8364 72262008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7227
7228 * configure.ac: Only a cosmetic change on the handling of
7229 -fno-stack-protector.
7230
f714229e 72312008-02-12 Alexandre Boeglin <alex@boeglin.org>
7232
c3db8364 7233 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7234 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7235 reboot.c.
f714229e 7236 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7237 (halt_mod_SOURCES): New variable.
7238 (halt_mod_CFLAGS): Likewise.
7239 (halt_mod_LDFLAGS): Likewise.
7240 (reboot_mod_SOURCES): Likewise.
7241 (reboot_mod_CFLAGS): Likewise.
7242 (reboot_mod_LDFLAGS): Likewise.
7243
c3db8364 7244 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7245 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7246 reboot.c.
f714229e 7247 (halt_mod_SOURCES): Likewise.
7248 (reboot_mod_SOURCES): Likewise.
7249
c3db8364 7250 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7251 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 7252 (reboot_mod_SOURCES): Likewise.
7253
7254 * commands/i386/pc/reboot.c: merge this file ...
7255
7256 * commands/ieee1275/reboot.c: ... and this file ...
7257
7258 * commands/reboot.c: ... to this file.
c3db8364 7259 Add some precompiler directive to include the correct header for
7260 each machine.
f714229e 7261
7262 * commands/ieee1275/halt.c: move this file ...
7263
7264 * commands/halt.c: ... to here.
c3db8364 7265 Add some precompiler directive to include the correct header for
7266 each machine.
f714229e 7267
7268 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7269 (grub_halt): Likewise.
7270
7271 * kern/efi/efi.c (grub_reboot): New function.
7272 (grub_halt): Likewise.
7273
c74493e0 72742008-02-12 Robert Millan <rmh@aybabtu.com>
7275
7276 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7277 /dev (like it is done for /dev/mapper). This doesn't provide support
7278 for EVMS, but at least it is now easy to identify the problem when it
7279 arises.
7280
d0db4b04 72812008-02-11 Robert Millan <rmh@aybabtu.com>
7282
7283 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7284 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7285 comparing it with -1, not 0.
7286
bf748642 72872008-02-10 Robert Millan <rmh@aybabtu.com>
7288
7289 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7290 `disk/lvm.c'.
7291 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7292 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7293
7294 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7295 `disk/lvm.c' to the end of the list.
7296 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7297 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7298
b5db202a 72992008-02-10 Robert Millan <rmh@aybabtu.com>
7300
7301 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7302 grub_print_error() instead. This will let user know why we're entering
7303 rescue mode.
7304 Based on suggestions from Sam Morris.
7305
83abee31 73062008-02-10 Alexandre Boeglin <alex@boeglin.org>
7307
7308 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7309 on remaining N args, instead of "--" arg N times.
7310
78d5a08b 73112008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7312
7313 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7314 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7315 pattern for unknown glyphs.
7316
68807e5f 73172008-02-09 Robert Millan <rmh@aybabtu.com>
7318
7319 * configure.ac: Probe for `help2man'.
7320 * Makefile.in (builddir): New variable.
7321 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7322 or otherwise add a few flags/options to it.
7323 (install-local): For every executable utility or script that is
7324 installed, invoke $(HELP2MAN) to install a manpage based on --help
7325 output.
7326
7327 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7328 that it doesn't prevent --help from working in build tree.
7329
7330 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7331 with `bug-grub@gnu.org'.
7332 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7333 * util/update-grub.in (usage): New function.
7334 Implement proper argument check, with support for --help and --version
7335 (as well as existing -y).
7336
73372008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 7338
7339 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7340 avoid overwriting previous output.
7341 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7342
c1962162 73432008-02-09 Robert Millan <rmh@aybabtu.com>
7344
7345 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7346 drawing the menu.
7347
3dac2e3f 73482008-02-09 Robert Millan <rmh@aybabtu.com>
7349
7350 * commands/sleep.c: New file.
7351 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7352 (sleep_mod_SOURCES): New variable.
7353 (sleep_mod_CFLAGS): Likewise.
7354 (sleep_mod_LDFLAGS): Likewise.
7355
7a634e08 73562008-02-09 Robert Millan <rmh@aybabtu.com>
7357
7358 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7359 situations in which we can deduce the RAID size and the superblock
7360 doesn't match it.
7361
b92f0c18 73622008-02-09 Robert Millan <rmh@aybabtu.com>
7363
7364 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7365 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7366 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7367
7368 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7369 and return a grub_diskmemberlist_t composed of physical array members.
7370 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7371
7372 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7373 prototype.
7374 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7375 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7376 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7377
7378 * util/grub-probe.c (probe): Move partmap probing code from here ...
7379 (probe_partmap): ... to here.
7380 (probe): Use probe_partmap() once for the disk we're probing, and
7381 additionally, when such disk contains a memberlist() struct member,
7382 once for each disk that is contained in the structure returned by
7383 memberlist().
7384
91a4bf68 73852008-02-09 Robert Millan <rmh@aybabtu.com>
7386
7387 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7388 environment variable to 'all' in order to obtain debug output from
7389 non-util/ code.
7390 * util/i386/pc/grub-setup.c (main): Likewise.
7391
a96f9caa 73922008-02-08 Robert Millan <rmh@aybabtu.com>
7393
7394 * disk/raid.c (grub_raid_scan_device): Check for
7395 `array->device[sb.this_disk.number]' rather than for
7396 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 7397 guaranteed to be accessible.
a96f9caa 7398
b37a9222 73992008-02-08 Robert Millan <rmh@aybabtu.com>
7400
7401 * disk/raid.c: Update copyright.
7402 * fs/cpio.c: Likewise.
7403 * include/grub/raid.h: Likewise.
7404 * loader/i386/pc/multiboot.c: Likewise.
7405 * util/hostfs.c: Likewise.
7406
5626aee1 74072008-02-08 Robert Millan <rmh@aybabtu.com>
7408
7409 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7410 to a grub_disk_t array.
7411 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7412 `device[x]'.
7413 (grub_raid_scan_device): Replace `device[x].name' accesses with
7414 `device[x]->name'. Simplify initialization of `array->device[x]'.
7415
554f0187 74162008-02-08 Robert Millan <rmh@aybabtu.com>
7417
7418 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7419 grub_dprintf() calls.
7420 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7421 error message.
7422
1ec8425d 74232008-02-07 Christian Franke <franke@computer.org>
7424
7425 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7426 instead of fseek and ftell to support large files.
7427 (grub_hostfs_read): Likewise.
7428
f2156fda 74292008-02-07 Robert Millan <rmh@aybabtu.com>
7430
7431 Patch from Jeroen Dekkers.
7432 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 7433 failure, since successfully reading all array members might not be
f2156fda 7434 required.
7435
9216e0e7 74362008-02-06 Robert Millan <rmh@aybabtu.com>
7437
7438 * util/grub-probe.c (probe): Simplify partmap probing (with the
7439 assumption that the first word up to the underscore equals to
7440 the module name).
7441
b0dfd29a 74422008-02-06 Christian Franke <franke@computer.org>
7443
7444 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7445 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7446 last block of a cpio or tar stream.
7447 Check for "TRAILER!!!" instead of any empty data
7448 block to detect last block of a cpio stream.
7449 (grub_cpio_dir): Fix constness of variable np.
7450 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7451 cpio or tar trailer is detected. This fixes a crash
7452 on open of a non existing file.
7453
c32865bf 74542008-02-05 Bean <bean123ch@gmail.com>
7455
7456 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7457 address of entry.
7458 (grub_multiboot_load_elf64): Likewise.
7459 (grub_multiboot): Initialize mbi structure.
7460
7461 * util/grub-fstest.c: Don't include unused header file script.h.
7462
fe6b695a 7463 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 7464 of file.
7465 (grub_fstest_SOURCES): Likewise.
7466
409480b7 74672008-02-05 Robert Millan <rmh@aybabtu.com>
7468
7469 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7470 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7471 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7472 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7473
7474 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7475 (translation_table): Replace hardcoded values with macros
7476 provided by `<grub/term.h>'.
7477
7478 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7479 (keyboard_map): Correct/add a few values, with macros provided
7480 by `<grub/term.h>'.
7481 (keyboard_map_shift): Zero values that don't differ from their
7482 `keyboard_map' equivalents.
7483 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7484 Discard the second scan code that is always sent by Caps lock.
7485 Only use `keyboard_map_shift' when it provides a non-zero value,
7486 otherwise fallback to `keyboard_map'.
7487
99fadbaa 74882008-02-04 Bean <bean123ch@gmail.com>
7489
7490 * Makefile.in (enable_grub_fstest): New variable.
7491
7492 * conf/common.rmk (grub_fstest_init.lst): New rule.
7493 (grub_fstest_init.h): Likewise.
7494 (grub_fstest_init.c): Likewise.
7495 (util/grub-fstest.c_DEPENDENCIES): New variable.
7496 (grub_fstest_SOURCES): Likewise.
7497
7498 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7499
7500 * util/grub-fstest.c: New file.
7501
bf567c50 75022008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7503
7504 Make grub-setup handle a separate root device.
f19dbdb7 7505
bf567c50 7506 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7507 so that the root device can be compared with the destination
7508 device.
7509 When embedding the core image, if the root and destination devices
7510 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7511 0xFF.
7512 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 7513
9be6b98b 75142008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7515
7516 Add support for having a grub directory in a different drive. This
7517 is still only the data handling part.
f19dbdb7 7518
9be6b98b 7519 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7520 (codestart): Save %dh in GRUB_ROOT_DRIVE.
7521 (grub_root_drive): New variable.
7522
7523 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7524 instead of GRUB_BOOT_DRIVE to construct a device name. Set
7525 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7526 as it was.
7527
7528 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7529
7530 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7531 macro.
7532 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7533
7534 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7535 is bogus, because PXE booting does not specify any drive
7536 correctly.
7537
7538 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7539 am not sure if this is really correct.
7540
7541 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7542 is always identical to the boot drive when booting from a CD.
7543
7544 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7545 longer.
7546 (root_drive): New variable.
7547 (real_start): Unconditionally set %dh to ROOT_DRIVE.
7548 (setup_sectors): Push %dx right after popping it, because %dh will
7549 be modified later.
7550 (copy_buffer): Restore %dx.
7551
e0ca0677 75522008-02-03 Robert Millan <rmh@aybabtu.com>
7553
7554 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7555 use `cdboot.img' for cdrom images.
7556
3b3f6629 75572008-02-03 Robert Millan <rmh@aybabtu.com>
7558
7559 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7560 only setup gfxterm when `font' command has succeeded.
7561
d42b3672 75622008-02-03 Robert Millan <rmh@aybabtu.com>
7563
7564 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7565 (grub_rescue_cmd_multiboot_loader)
7566 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7567
fa370ea6 75682008-02-03 Pavel Roskin <proski@gnu.org>
7569
e0c5dacb 7570 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 7571 %edx and %esi from stack only after grub_gate_a20() is called.
7572 grub_gate_a20() clobbers %edx.
7573
f2a76e1d 75742008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7575
7576 * configure.ac (AC_INIT): Bumped to 1.96.
7577
7578 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7579 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7580 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7581 video/readers/png.c.
7582
90fd32d1 75832008-02-03 Bean <bean123ch@gmail.com>
9be665dd 7584
7585 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7586 (cdboot_img_SOURCES): New variable.
7587 (cdboot_img_ASFLAGS): New variable.
7588 (cdboot_img_LDFLAGS): New variable.
7589
7590 * boot/i386/pc/cdboot.S: New file.
7591
7592 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7593 (cd_count): Likewise.
7594 (grub_biosdisk_get_drive): Add support for cd device.
7595 (grub_biosdisk_call_hook): Likewise.
7596 (grub_biosdisk_iterate): Likewise.
7597 (grub_biosdisk_open): Likewise.
7598 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7599 (grub_biosdisk_rw): Support reading from cd device.
7600 (GRUB_MOD_INIT): Iterate cd devices.
7601
7602 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7603 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7604 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7605
7606 * kern/i386/pc/init.c (make_install_device): Check for cd device.
7607
4020aa53 76082008-02-02 Robert Millan <rmh@aybabtu.com>
7609
7610 * commands/read.c: New file.
7611 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7612 (read_mod_SOURCES): New variable.
7613 (read_mod_CFLAGS): Likewise.
7614 (read_mod_LDFLAGS): Likewise.
7615
e03a1132 76162008-02-02 Robert Millan <rmh@aybabtu.com>
7617
7618 * normal/main.c (grub_normal_execute): Check for `menu->size' when
7619 determining whether menu has to be displayed.
7620
58c69220 76212008-02-02 Marco Gerards <marco@gnu.org>
7622
7623 * bus/pci.c: New file.
7624
7625 * include/grub/pci.h: Likewise.
7626
7627 * include/grub/i386/pc/pci.h: Likewise.
7628
7629 * commands/lspci.c: Likewise.
7630
7631 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7632 `lspci.mod'.
7633 (pci_mod_SOURCES): New variable.
7634 (pci_mod_CFLAGS): Likewise.
7635 (pci_mod_LDFLAGS): Likewise.
7636 (lspci_mod_SOURCES): Likewise.
7637 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 7638 (lspci_mod_LDFLAGS): Likewise.
58c69220 7639
c004e1b4 76402008-02-02 Bean <bean123ch@gmail.com>
7641
7642 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7643 (grub_ufs_get_file_block): Fix indirect block calculation problem.
7644
7645 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7646 (grub_xfs_btree_node): New structure.
7647 (grub_xfs_btree_root): New structure.
7648 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7649 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7650 (GRUB_XFS_EXTENT_BLOCK): Likewise.
7651 (GRUB_XFS_EXTENT_SIZE): Likewise.
7652 (grub_xfs_read_block): Support btree format type.
7653 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7654 Use directory block as basic unit.
7655
7656 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7657
7658 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7659 __attribute__ ((__regparm__ (1))).
7660
f95562bf 76612008-02-01 Robert Millan <rmh@aybabtu.com>
7662
7663 Correct a mistake in previous commit.
7664
7665 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7666 top.
7667 (normal/command.c_DEPENDENCIES): New variable.
7668
7d31f41f 76692008-02-01 Robert Millan <rmh@aybabtu.com>
7670
7671 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7672 top.
7673 (normal/command.c_DEPENDENCIES): New variable.
7674 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7675 * conf/i386-ieee1275.rmk: Likewise.
7676 * conf/i386-linuxbios.rmk: Likewise.
7677 * conf/i386-pc.rmk: Likewise.
7678 * conf/sparc64-ieee1275.rmk: Likewise.
7679 * conf/powerpc-ieee1275.rmk: Likewise.
7680 (grub_emu_SOURCES): Add `fs/fshelp.c'.
7681
7682 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7683
60b6be74 76842008-02-01 Robert Millan <rmh@aybabtu.com>
7685
7686 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7687 call at beginning of function.
7688
078522ab 76892008-01-31 Pavel Roskin <proski@gnu.org>
7690
7691 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 7692 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7693 (grub_mkrescue_SOURCES): Likewise.
078522ab 7694 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7695
ccaa8a5f 76962008-01-30 Robert Millan <rmh@aybabtu.com>
7697
7698 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7699 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7700 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7701 (grub_probe_SOURCES): ... to here.
7702
7703 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7704 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7705 * conf/i386-ieee1275.rmk: Likewise.
7706 * conf/i386-linuxbios.rmk: Likewise.
7707 * conf/powerpc-ieee1275.rmk: Likewise.
7708
ae5a9cd7 77092008-01-30 Tristan Gingold <gingold@free.fr>
7710
7711 * kern/rescue.c: Silently accept empty lines.
7712
70bc2ef2 77132008-01-29 Bean <bean123ch@gmail.com>
7714
7715 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7716 (real_code_2): Code cleanup and change comment style.
7717 (move_memory): Avoid using 32-bit address mode.
7718
6a4d50ea 77192008-01-29 Bean <bean123ch@gmail.com>
7720
7721 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7722 (png_mod_SOURCES): New variable.
7723 (png_mod_CFLAGS): Likewise.
7724 (png_mod_LDFLAGS): Likewise.
7725
7726 * video/readers/png.c: New file.
7727
11cc30ac 77282008-01-28 Robert Millan <rmh@aybabtu.com>
7729
7730 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7731 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7732 `ifndef GRUB_MOD_GAP' hack.
7733 * util/elf/grub-mkimage.c (add_segments): Likewise.
7734
3abc589f 77352008-01-27 Robert Millan <rmh@aybabtu.com>
7736
7737 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7738 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 7739 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 7740
e1907778 77412008-01-27 Robert Millan <rmh@aybabtu.com>
7742
7743 Get grub-emu to build again (including parallel builds).
7744
7745 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7746 Split into ...
7747 (util/grub-emu.c_DEPENDENCIES): ... this, ...
7748 (normal/execute.c_DEPENDENCIES): ... this, ...
7749 (grub-emu_DEPENDENCIES): ... and this.
7750
7751 * conf/i386-efi.rmk: Likewise.
7752 * conf/i386-linuxbios.rmk: Likewise.
7753 * conf/i386-ieee1275.rmk: Likewise.
7754 * conf/powerpc-ieee1275.rmk: Likewise.
7755 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7756
2216b101 77572008-01-27 Robert Millan <rmh@aybabtu.com>
7758
7759 * NEWS: Add a few items.
7760
f75172d9 77612008-01-27 Robert Millan <rmh@aybabtu.com>
7762
7763 Fix parallel builds with grub-emu. Based on earlier commit for
7764 grub-probe and grub-setup.
7765
7766 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7767 (util/grub-emu.c_DEPENDENCIES): ... this.
7768 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7769 (util/grub-emu.c_DEPENDENCIES): ... this.
7770 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7771 (util/grub-emu.c_DEPENDENCIES): ... this.
7772 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7773 (util/grub-emu.c_DEPENDENCIES): ... this.
7774 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7775 (util/grub-emu.c_DEPENDENCIES): ... this.
7776
3f51de77 77772008-01-27 Pavel Roskin <proski@gnu.org>
7778
7779 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7780 to create a gap between _end and the modules added to the image
7781 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
7782 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7783 * util/elf/grub-mkimage.c (add_segments): Likewise.
7784
2033f53e 77852008-01-26 Pavel Roskin <proski@gnu.org>
7786
7787 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7788 just return an error.
7789
22da1f6f 77902008-01-26 Bean <bean123ch@gmail.com>
7791
7792 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7793 (grub_reiserfs_get_item): Save offset of the next item.
7794 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7795
2a9525e6 77962008-01-25 Robert Millan <rmh@aybabtu.com>
7797
7798 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7799 make all filesystem sources appear together (possibly fixing omissions
7800 while at it).
7801 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7802 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7803 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7804 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7805
7806 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
7807 add `kern/file.c'.
7808 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7809 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7810 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7811 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7812
7813 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7814 (probe): Add a sanity check to make sure of our ability to read
7815 requested files when probing for filesystem type.
7816
7817 * genmk.rb: Update copyright year (2007).
7818
7819 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7820 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7821 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7822 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7823 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7824 : Remove function prototypes.
7825
b95f71b5 78262008-01-25 Robert Millan <rmh@aybabtu.com>
7827
7828 Revert my previous commits (based on wrong assumption of how grub_errno
7829 works).
7830
fe6b695a 7831 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 7832 * kern/file.c (grub_file_open): Likewise.
7833
d08bbb49 78342008-01-24 Pavel Roskin <proski@gnu.org>
7835
7836 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7837 that hang if GRUB tries to setup colors.
7838 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7839 colors for firmwares that don't support it.
7840 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7841 Recognize Open Hack'Ware, set flags to work around its
7842 limitations.
7843
605e36ed 78442008-01-24 Robert Millan <rmh@aybabtu.com>
7845
7846 * kern/file.c (grub_file_open): Do not account previous failures of
7847 unrelated functions when grub_errno is checked for.
7848 Reported by Oleg Strikov.
7849
bac332a1 78502008-01-24 Bean <bean123ch@gmail.com>
7851
7852 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7853 (grub_ufs_sblock): New member volume name.
7854 (grub_ufs_find_file): Fix string copy bug.
7855 (grub_ufs_label): Implement this function properly.
7856
7857 * fs/hfs.c (grub_hfs_cnid_type): New enum.
7858 (grub_hfs_iterate_records): Use the correct file number for extents
7859 and catalog file. Fix problem in next index calculation.
7860 (grub_hfs_find_node): Replace recursive function call with loop.
7861 (grub_hfs_iterate_dir): Replace recursive function call with loop.
7862
15c80c09 78632008-01-23 Robert Millan <rmh@aybabtu.com>
7864
7865 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7866 `<grub/symbol.h>' and `<grub/multiboot.h>'.
7867 (grub_multiboot2_real_boot): New function prototype.
7868
7869 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7870 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7871
7872 * kern/i386/ieee1275/init.c (grub_os_area_addr)
7873 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7874
305338fd 78752008-01-23 Robert Millan <rmh@aybabtu.com>
7876
7877 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7878 #ifdef'ed out grub_printf().
7879
3ea52685 78802008-01-23 Robert Millan <rmh@aybabtu.com>
7881
7882 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7883 grub_dprintf calls, since they make "debug=all" mode unusable.
7884 (grub_console_checkkey): Likewise.
7885
5882ae4b 78862008-01-23 Robert Millan <rmh@aybabtu.com>
7887
7888 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7889 `term/i386/pc/at_keyboard.c'.
7890 (pkglib_MODULES): Add `serial.mod'.
7891 (serial_mod_SOURCES): New variable.
7892 (serial_mod_CFLAGS): Likewise.
7893 (serial_mod_LDFLAGS): Likewise.
7894
7895 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
7896 `<grub/powerpc/ieee1275/console.h>'.
7897 (grub_keyboard_controller_init): New function prototype.
7898 (grub_console_checkkey): Likewise.
7899 (grub_console_getkey): Likewise.
7900
7901 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7902 keyboard on i386.
7903
7904 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7905 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7906
06ab5303 79072008-01-23 Robert Millan <rmh@aybabtu.com>
7908
7909 * kern/i386/pc/init.c (make_install_device): When memdisk image is
7910 present, "(memdisk)/boot/grub" becomes the default prefix.
7911
7912 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7913 a memdisk tarball with all the modules. Add --overlay=DIR option that
7914 allows users to overlay additional files into the image.
7915
dbb475a4 79162008-01-23 Robert Millan <rmh@aybabtu.com>
7917
7918 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7919 and `machine/memory.h'.
7920 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7921 (_multiboot_mod_SOURCES): New variable.
7922 (_multiboot_mod_CFLAGS): Likewise.
7923 (_multiboot_mod_LDFLAGS): Likewise.
7924 (multiboot_mod_SOURCES): Likewise.
7925 (multiboot_mod_CFLAGS): Likewise.
7926 (multiboot_mod_LDFLAGS): Likewise.
7927
7928 * include/grub/i386/ieee1275/loader.h: New file.
7929
7930 * include/grub/i386/ieee1275/machine.h: Likewise.
7931
7932 * include/grub/i386/ieee1275/memory.h: Likewise.
7933
7934 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7935 variable declaration.
7936 (grub_os_area_size): Likewise.
7937
7938 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7939 (grub_lower_mem, grub_upper_mem): New variables.
7940 (grub_stop_floppy): New function (just to make
7941 grub_multiboot2_real_boot() happy).
7942
7943 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7944 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7945 (grub_stop): New function.
7946 Include `"../realmode.S"' and `"../loader.S"'.
7947
7948 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7949 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7950
7951 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7952 rely on grub_multiboot2_real_boot() for final boot.
7953
25638629 79542008-01-22 Robert Millan <rmh@aybabtu.com>
7955
7956 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7957 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7958 device that doesn't look like an SD card.
7959 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7960 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7961 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7962 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7963 found.
7964
9dad816d 79652008-01-22 Robert Millan <rmh@aybabtu.com>
7966
7967 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7968 avoid claiming over our own code.
7969
34842f2d 79702008-01-22 Bean <bean123ch@gmail.com>
7971
7972 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7973 (jpeg_mod_SOURCES): New variable.
7974 (jpeg_mod_CFLAGS): Likewise.
7975 (jpeg_mod_LDFLAGS): Likewise.
7976
7977 * video/readers/jpeg.c : New file.
7978
44023a28 79792008-01-22 Bean <bean123ch@gmail.com>
7980
7981 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7982 there are no more items.
7983
bc2d8ac6 79842008-01-21 Robert Millan <rmh@aybabtu.com>
7985
7986 * kern/mm.c (grub_mm_init_region): Improve debug message.
7987
261bd4bc 79882008-01-21 Robert Millan <rmh@aybabtu.com>
7989
7990 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7991 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7992 address.
7993 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7994 a C macro.
7995 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7996 Indicates start of upper memory.
7997 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7998 (generate_image): Abort when image size is big enough to corrupt
7999 upper memory.
8000
8001 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8002 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8003 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8004 instead of hardcoding 0xA0000.
8005 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8006 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8007 instead of hardcoding 0xA0000.
8008
f970b55e 80092008-01-21 Robert Millan <rmh@aybabtu.com>
8010
8011 * disk/memdisk.c (memdisk_size): New variable.
8012 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8013 `memdisk_size'.
8014 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8015 image to dynamic memory.
8016 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8017 `memdisk_size'. Free memdisk block.
8018
1a8b0526 80192008-01-21 Robert Millan <rmh@aybabtu.com>
8020
8021 Fix detection of very small filesystems (like tar).
8022
8023 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8024 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8025 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8026 a problem with this disk).
8027
6e9b4aab 80282008-01-21 Robert Millan <rmh@aybabtu.com>
8029
8030 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8031 on grub_biosdisk_rw_standard() error.
8032
0d8837b2 80332008-01-21 Robert Millan <rmh@aybabtu.com>
8034
8035 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8036 recent changes.
8037 * kern/elf.c: Likewise.
8038 * kern/ieee1275/ieee1275.c: Likewise.
8039 * kern/powerpc/ieee1275/openfw.c: Likewise.
8040 * term/ieee1275/ofconsole.c: Likewise.
8041
ffd36e34 80422008-01-21 Robert Millan <rmh@aybabtu.com>
8043
8044 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8045
3f0093d0 8046 * include/grub/kernel.h (grub_arch_memdisk_addr)
8047 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 8048
3f0093d0 8049 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8050 (grub_arch_memdisk_size): ... to here.
ffd36e34 8051
6c391b21 80522008-01-21 Robert Millan <rmh@aybabtu.com>
8053
8054 Mostly based on bugfix from Bean.
8055
8056 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8057 attribute with hook() parameter.
8058 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8059 declaration.
8060 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8061 attribute with hook() parameter.
8062 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8063 declaration.
8064
55a581dc 80652008-01-21 Robert Millan <rmh@aybabtu.com>
8066
8067 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8068 (pkglib_MODULES): Add `memdisk.mod'.
8069 (memdisk_mod_SOURCES): New variable.
8070 (memdisk_mod_CFLAGS): Likewise.
8071 (memdisk_mod_LDFLAGS): Likewise.
8072
8073 * disk/memdisk.c: New file.
8074
8075 * include/grub/disk.h (grub_disk_dev_id): Add
8076 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8077
8078 * include/grub/i386/pc/kernel.h
8079 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8080 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8081 (grub_kernel_image_size): New variable declaration.
8082 (grub_total_module_size): Likewise.
8083 (grub_memdisk_image_size): Likewise.
8084
8085 * include/grub/i386/pc/memory.h
8086 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8087
8088 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8089 (grub_arch_memdisk_addr): New variable declaration.
8090 (grub_arch_memdisk_size): Likewise.
8091
8092 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8093 (grub_arch_memdisk_size): Likewise.
8094
8095 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8096 (codestart): Replace hardcoded `0x100000' with
8097 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8098
8099 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8100 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8101 not NULL, append the contents of the file it refers to, at the end of
8102 the compressed kernel image. Initialize `grub_memdisk_image_size'
8103 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8104 (options): Add "memdisk"|'m' option.
8105 (main): Parse --memdisk|-m option, and pass user-provided path as
8106 parameter to generate_image().
8107
3d7f54c9 81082008-01-20 Robert Millan <rmh@aybabtu.com>
8109
8110 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8111 grub_dprintf() calls from here ...
8112 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8113
0bf74728 81142008-01-20 Robert Millan <rmh@aybabtu.com>
8115
8116 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8117
8118 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8119 declaration.
8120 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8121 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8122 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 8123 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 8124 property).
8125 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8126 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8127
33bf70a7 81282008-01-19 Robert Millan <rmh@aybabtu.com>
8129
fe6b695a 8130 Get rid of confusing function (superseded by
33bf70a7 8131 `grub_ieee1275_get_integer_property')
8132 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8133 prototype.
8134 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8135 function.
8136 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8137 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 8138 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 8139
e2da7d26 81402008-01-19 Robert Millan <rmh@aybabtu.com>
8141
8142 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8143 command after "shut-down", since implementations differ on which
8144 the command for halt is.
8145
59f1fd8d 81462008-01-19 Robert Millan <rmh@aybabtu.com>
8147
8148 * include/grub/i386/linuxbios/console.h: Add header protection.
8149 (grub_keyboard_controller_init): New function prototype.
8150 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8151 (KEYBOARD_COMMAND_READ): Likewise.
8152 (KEYBOARD_COMMAND_WRITE): Likewise.
8153 (KEYBOARD_SCANCODE_SET1): Likewise.
8154 (grub_keyboard_controller_write): New function.
8155 (grub_keyboard_controller_read): Likewise.
8156 (grub_keyboard_controller_init): Likewise.
8157
8158 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8159 (grub_console_init): On coreboot/LinuxBIOS, call
8160 grub_keyboard_controller_init().
8161
5f5a7c15 81622008-01-19 Robert Millan <rmh@aybabtu.com>
8163
8164 PowerPC changes provided by Pavel Roskin.
8165
8166 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8167 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8168 don't rely on cmain() doing it.
8169 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8170 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8171
1210e168 81722008-01-16 Robert Millan <rmh@aybabtu.com>
8173
8174 * include/grub/i386/linuxbios/memory.h
8175 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8176 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8177 receive `table_header' as argument. Instead, probe for it in the
8178 known memory ranges where it can be present.
8179 (grub_available_iterate): Do not pass a fixed `table_header' address
8180 to grub_linuxbios_table_iterate().
8181
3d04eab8 81822008-01-15 Robert Millan <rmh@aybabtu.com>
8183
8184 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8185 * conf/i386-ieee1275.rmk: New file.
8186 * include/grub/i386/ieee1275/console.h: Likewise.
8187 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8188 * include/grub/i386/ieee1275/kernel.h: Likewise.
8189 * include/grub/i386/ieee1275/time.h: Likewise.
8190 * kern/i386/ieee1275/init.c: Likewise.
8191 * kern/i386/ieee1275/startup.S: Likewise.
8192
d1bc1b73 81932008-01-15 Robert Millan <rmh@aybabtu.com>
8194
8195 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8196 when pointers are 32-bit (but still do set it to one when they are
8197 64-bit).
8198
66a65807 81992008-01-15 Robert Millan <rmh@aybabtu.com>
8200
8201 * include/grub/ieee1275/ieee1275.h
8202 (grub_ieee1275_get_integer_property): New function prototype.
8203
8204 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8205 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 8206 grub_ieee1275_get_property() to handle endianness.
66a65807 8207
8208 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8209 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 8210 where appropriate.
66a65807 8211 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8212 (grub_map): Likewise.
8213 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8214
a83ccafd 82152008-01-15 Bean <bean123ch@gmail.com>
8216
8217 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8218 (grub_script_execute_cmdline): Reset grub_errno.
8219
8220 * normal/main.c (read_config_file): Reset grub_errno.
8221
8222 * normal/parse.y (script_init): New.
8223 (script): Move function and menuentry here.
8224 (delimiter): New.
8225 (command): Add delimiter at the end of command.
8226 (commands): Adjust to match the new command.
8227 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 8228 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 8229 (if): Use the new commands.
8230
8231 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8232
df6ecfc6 82332008-01-15 Robert Millan <rmh@aybabtu.com>
8234
8235 * normal/menu.c (run_menu): Move timeout message from here ...
8236 (print_timeout): ... to here.
8237 (run_menu): Use print_timeout() once during initial draw to print
8238 the whole message, and again in every clock tick to update only
8239 the number of seconds.
8240
87ae25eb 82412008-01-15 Robert Millan <rmh@aybabtu.com>
8242
8243 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8244 actual size of `available' from grub_ieee1275_get_property(), and
8245 restrict parsing to that bound.
8246
47bf09a4 82472008-01-15 Christian Franke <franke@computer.org>
8248
8249 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8250 (argp_program_version): Remove variable.
8251 (argp_program_bug_address): Likewise.
8252 (options): Convert from struct argp_option to struct option.
8253 (struct arguments): Remove.
8254 (parse_opt): Remove.
8255 (usage): New function.
8256 (main): Replace struct args members by simple variables.
8257 Replace argp_parse() by getopt_long().
8258 Add switch to evaluate options.
8259 Add missing "(...)" around root_dev in prefix string.
8260
c86f1469 82612008-01-14 Robert Millan <rmh@aybabtu.com>
8262
8263 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8264 for grub_ieee1275_exit(), in order to improve portability.
8265
e622c559 82662008-01-14 Robert Millan <rmh@aybabtu.com>
8267
8268 * util/grub.d/10_linux.in (prefix): Define.
8269 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8270
44cb1ec8 82712008-01-13 Pavel Roskin <proski@gnu.org>
8272
8273 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8274 grub_errno if no errors have been detected.
8275
1eb8c802 82762008-01-12 Robert Millan <rmh@aybabtu.com>
8277
8278 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8279 (grub_util_get_dev_abstraction): New function prototype.
8280
8281 * util/getroot.c: Include `<grub/util/getroot.h>'
8282 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8283 (grub_util_get_dev_abstraction): ... here (new function).
8284
8285 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8286 `PRINT_ABSTRACTION'.
8287 (probe): Probe for abstraction type when requested.
8288 (main): Understand `--target=abstraction'.
8289
8290 * util/i386/efi/grub-install.in: Add abstraction module to core
8291 image when it is found to be necessary.
8292 * util/i386/pc/grub-install.in: Likewise.
8293 * util/powerpc/ieee1275/grub-install.in: Likewise.
8294
8295 * util/update-grub_lib.in (font_path): Return system path without
8296 converting to GRUB path.
8297 * util/update-grub.in: Convert system path returned by font_path()
8298 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8299 abstraction module is needed for loading fonts (if any). Export
8300 that as `GRUB_PRELOAD_MODULES'.
8301 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8302 insmod commands).
8303
52bd3de9 83042008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8305
8306 Remove some unused code from reiserfs.
f19dbdb7 8307
52bd3de9 8308 * fs/reiserfs.c (struct grub_reiserfs_key)
8309 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8310 (struct grub_reiserfs_node_body): Removed.
8311 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8312 Likewise.
8313 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8314 Likewise.
8315 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8316 Likewise.
8317 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8318 Likewise.
8319 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8320 Likewise.
8321 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8322 Likewise.
8323 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8324 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8325 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8326
2f80039d 83272008-01-10 Robert Millan <rmh@aybabtu.com>
8328
8329 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8330 Determines if a file is garbage left by packaging systems, etc.
8331 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8332 for processing /etc/grub.d scripts.
8333 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8334 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8335 as a condition for processing Linux images.
8336
87888032 83372008-01-10 Pavel Roskin <proski@gnu.org>
8338
8339 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8340 to compile reiserfs.c on PowerPC.
8341
7e54fced 83422008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 8343
8344 * kern/device.c (grub_device_iterate): Do not abort device iteration
8345 when one of the devices cannot be opened.
8346 * kern/disk.c (grub_disk_open): Do not account previous failures of
8347 unrelated functions when grub_errno is checked for.
8348
5aa541e6 83492008-01-08 Robert Millan <rmh@aybabtu.com>
8350
8351 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8352 `! grub_linux_is_bzimage', change order of address comparison to make
8353 it more intuitive, and improve "too big zImage" error message.
8354
7076340d 83552008-01-08 Robert Millan <rmh@aybabtu.com>
8356
8357 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8358 `$(update-grub_DATA)'.
8359 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8360 targets.
8361
9ca70333 83622008-01-07 Robert Millan <rmh@aybabtu.com>
8363
8364 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8365 which instruction is modified by grub-setup during installation
8366 (since it wasn't obvious by only looking at this file).
8367
38ccf575 83682008-01-07 Robert Millan <rmh@aybabtu.com>
8369
8370 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8371 listing actual TODO items.
8372
f5db4291 83732008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8374
868967cf 8375 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8376 correctly.
8377 (grub_reiserfs_get_key_offset): Likewise.
8378 (grub_reiserfs_set_key_offset): Likewise.
8379 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 8380 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 8381
8382 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8383 better to remove the bitfield version completely.
f19dbdb7 8384
868967cf 83852008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 8386
f5db4291 8387 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8388 allocated from the heap, due to the fshelp implementation.
8389 (grub_reiserfs_dir): Free NODE, due to the same reason.
8390
492e6d9d 83912008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8392
8393 Mostly from Vincent Pelletier:
f19dbdb7 8394
492e6d9d 8395 * fs/reiserfs.c: New file.
f19dbdb7 8396
492e6d9d 8397 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8398 (reiserfs_mod_SOURCES): New variable.
8399 (reiserfs_mod_CFLAGS): Likewise.
8400 (reiserfs_mod_LDFLAGS): Likewise.
8401
8402 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8403 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8404 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8405 normal/color.c.
8406
9ce3e7c1 84072008-01-06 Robert Millan <rmh@aybabtu.com>
8408
8409 * normal/color.c: Remove `<grub/env.h>'.
8410
f3b58148 84112008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8412
8413 * include/grub/normal.h: Include <grub/env.h>.
8414
7ac3bcfa 84152008-01-05 Robert Millan <rmh@aybabtu.com>
8416
8417 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8418 usage example with `(hd0,1)'.
fb358190 8419 Reported by Samuel Thibault.
7ac3bcfa 8420
c8ee99d7 84212008-01-05 Robert Millan <rmh@aybabtu.com>
8422
8423 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8424 (grub_linux_boot_zimage): Rename to ...
8425 (grub_linux_boot): ... this.
8426 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8427 (grub_linux_boot_zimage): Conditionalize zImage copy.
8428
8429 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8430 (grub_linux_boot_bzimage): Remove prototype.
8431 (grub_linux_boot_zimage): Rename to ...
8432 (grub_linux_boot): ... this.
8433
8434 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8435 (grub_linux_boot): Remove function.
8436
0ece25b1 84372008-01-05 Robert Millan <rmh@aybabtu.com>
8438
8439 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8440 (grub_env_write_color_highlight): Likewise.
8441 (grub_wait_after_message): Likewise.
8442
8443 * normal/color.c: New file.
8444
8445 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8446 (normal_mod_DEPENDENCIES): Likewise.
8447
8448 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8449 (normal_mod_DEPENDENCIES): Likewise.
8450
8451 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8452 (normal_mod_DEPENDENCIES): Likewise.
8453
8454 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8455 (normal_mod_DEPENDENCIES): Likewise.
8456
8457 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8458 for waiting after a message is printed.
8459 * normal/main.c (read_config_file): Likewise.
8460 (grub_normal_init): Register grub_env_write_color_normal() and
8461 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8462 `color_highlight' variables as global.
8463
8464 * normal/menu.c (grub_wait_after_message): New function.
8465 (grub_color_menu_normal): New variable. Replaces ...
8466 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8467 (grub_color_menu_highlight): New variable. Replaces ...
8468 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8469 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8470 `GRUB_TERM_COLOR_STANDARD'.
8471 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8472 `normal_code' and `highlight_code' to `old_color_normal' and
8473 `old_color_highlight', respectively.
8474 (grub_menu_init_page): Update colors when drawing the menu, based on
8475 `menu_color_normal' and `menu_color_highlight' variables.
8476 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8477 a message is printed.
8478
182dd4e5 84792008-01-05 Robert Millan <rmh@aybabtu.com>
8480
8481 * kern/env.c (grub_env_context_open): Propagate hooks for global
8482 variables to new context.
8483
8484 * kern/main.c (grub_set_root_dev): Export `root' variable.
8485
ddf8f6ad 84862008-01-05 Robert Millan <rmh@aybabtu.com>
8487
8488 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 8489 discs unconditionally, since udev and others have options to provide
ddf8f6ad 8490 them.
8491
d8b43d9b 84922008-01-05 Robert Millan <rmh@aybabtu.com>
8493
8494 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8495
2bff2de3 84962008-01-04 Christian Franke <franke@computer.org>
8497
8498 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8499 of eisa_mmap.
8500
97eab917 85012008-01-03 Pavel Roskin <proski@gnu.org>
8502
8503 * kern/i386/linuxbios/init.c: Put "void" to all function
8504 declarations with no arguments.
8505 * kern/powerpc/ieee1275/init.c: Likewise.
8506 * term/i386/pc/at_keyboard.c: Likewise.
8507 * term/i386/pc/vga_text.c: Likewise.
8508 * util/grub-mkdevicemap.c: Likewise.
8509
b9416d00 85102008-01-02 Robert Millan <rmh@aybabtu.com>
8511
8512 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8513 message when loaded image is out of bounds.
8514 (grub_multiboot_load_elf64): Likewise.
8515
92695df9 85162008-01-02 Pavel Roskin <proski@gnu.org>
8517
8518 * util/grub.d/10_linux.in: Try version without ".old" when
8519 looking for initrd. It's better to use initrd from the newer
8520 kernel of the same version than no initrd at all.
8521
d98d9cad 85222008-01-01 Robert Millan <rmh@aybabtu.com>
8523
8524 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8525
dbfdce36 85262008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
8527
f19dbdb7 8528 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 8529 grub_video_get_active_render_target.
8530 (grub_video_adapter): Added unmap_color and get_active_render_target.
8531
f19dbdb7 8532 * video/video.c: Added grub_video_unmap_color and
dbfdce36 8533 grub_video_get_active_render_target.
8534 (grub_video_get_info): Changed method to accept NULL pointer as an
8535 argument to allow detection of active video adapter.
8536
8537 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8538 grub_video_vbe_unmap_color_int.
8539 Added grub_video_vbe_unmap_color and
8540 grub_video_vbe_get_active_render_target.
8541 (grub_video_vbe_adapter): Added unmap_color and
8542 get_active_render_target.
8543
f19dbdb7 8544 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 8545 with grub_video_vbe_unmap_color_int.
8546
8547 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8548 (DEFAULT_NORMAL_COLOR): Likewise.
8549 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8550 (DEFAULT_FG_COLOR): Removed.
8551 (DEFAULT_BG_COLOR): Likewise.
8552 (DEFAULT_CURSOR_COLOR): Changed value.
8553 (grub_virtual_screen): Added standard_color_setting,
8554 normal_color_setting, highlight_color_setting and term_color.
8555 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8556 (bitmap_width): Added.
8557 (bitmap_height): Likewise.
8558 (bitmap): Likewise.
8559 (set_term_color): Likewise.
8560 (grub_virtual_screen_setup): Changed to use new terminal coloring
8561 settings.
8562 (grub_gfxterm_init): Added init for bitmap.
8563 (grub_gfxterm_fini): Added destroy for bitmap.
8564 (redraw_screen_rect): Updated to use background bitmap and new
8565 terminal coloring.
8566 (scroll_up): Added optimization for case when there is no bitmap.
8567 (grub_gfxterm_cls): Fixed to use correct background color.
8568 (grub_virtual_screen_setcolorstate): Changed to use new terminal
8569 coloring.
8570 (grub_virtual_screen_setcolor): Likewise.
8571 (grub_virtual_screen_getcolor): Added.
8572 (grub_gfxterm_background_image_cmd): Likewise.
8573 (grub_video_term): Added setcolor and getcolor.
8574 (MOD_INIT): Added registration of background_image command.
8575 (MOD_TERM): Added unregistration for background_image command.
8576
c3c20931 85772007-12-30 Pavel Roskin <proski@gnu.org>
8578
8579 * loader/multiboot_loader.c: Fix multiboot command
8580 unregistration. Fix all typos in the word "multiboot".
8581
df266716 85822007-12-29 Pavel Roskin <proski@gnu.org>
94239199 8583
8584 * util/grub.d/10_linux.in: Refactor search for initrd. Add
8585 support for initrd names used in Fedora.
8586
fc6e896c 85872007-12-26 Bean <bean123ch@gmail.com>
8588
8589 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8590 (cpio_mod_SOURCES): New variable.
8591 (cpio_mod_CFLAGS): Likewise.
8592 (cpio_mod_LDFLAGS): Likewise.
8593
8594 * fs/cpio.c: New file.
8595
8596 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8597
8598 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8599
8600 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8601
8602 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8603
533110ad 86042007-12-25 Robert Millan <rmh@aybabtu.com>
8605
8606 * include/grub/term.h (struct grub_term): Add `getcolor' function.
8607 (grub_getcolor): New function.
8608
8609 * kern/term.c (grub_getcolor): New function.
8610 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8611 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8612 (print_entry): Set normal and highlight colors to
8613 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8614 respectively, before printing and restore them to old
8615 values afterwards.
8616 (grub_menu_init_page): Likewise. Fill an additional colored space
8617 that would otherwise be left blank.
8618
8619 * term/efi/console.c (grub_console_getcolor): New function.
8620 (struct grub_console_term.getcolor): New variable.
8621 * term/i386/pc/console.c (grub_console_getcolor): New function.
8622 (struct grub_console_term.getcolor): New variable.
8623 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8624 (struct grub_console_term.getcolor): New variable.
8625
8626 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8627 (struct grub_console_term.setcolor): Remove variable.
8628 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8629 (struct grub_console_term.setcolor): Remove variable.
8630 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8631 (struct grub_console_term.setcolor): Remove variable.
8632 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8633 (struct grub_console_term.setcolor): Remove variable.
8634
4931827f 86352007-12-25 Robert Millan <rmh@aybabtu.com>
8636
8637 * configure.ac: Search for possible unifont.hex locations, and
8638 define UNIFONT_HEX if found.
8639
8640 * Makefile.in (UNIFONT_HEX): Define variable.
8641 (DATA): Rename to ...
8642 (PKGLIB): ... this. Update all users.
8643 (PKGDATA): New variable.
8644 (pkgdata_IMAGES): Rename to ...
8645 (pkglib_IMAGES): ... this. Update all users.
8646 (pkgdata_MODULES): Rename to ...
8647 (pkglib_MODULES): ... this. Update all users.
8648 (pkgdata_PROGRAMS): Rename to ...
8649 (pkglib_PROGRAMS): ... this. Update all users.
8650 (pkgdata_DATA): Rename to ...
8651 (pkglib_DATA): ... this. Update all users.
8652 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8653 (unicode.pff, ascii.pff): New rules.
8654 (all-local): Add `$(PKGDATA)' dependency.
8655 (install-local): Process `$(PKGDATA)'.
8656
8657 * util/update-grub_lib.in (font_path): Search for *.pff files in
8658 a few more locations, including `${pkgdata}'.
8659
57e57e31 86602007-12-23 Robert Millan <rmh@aybabtu.com>
8661
8662 Patch from Bean <bean123ch@gmail.com>:
8663 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8664 `size'.
8665
4bc72aa9 86662007-12-21 Bean <bean123ch@gmail.com>
8667
8668 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8669 (ntfscomp_mod_SOURCES): New variable.
8670 (ntfscomp_mod_CFLAGS): Likewise.
8671 (ntfscomp_mod_LDFLAGS): Likewise.
8672
8673 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8674 (grub_probe_SOURCES): Likewise.
8675 (grub_emu_SOURCES): Likewise.
8676
8677 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8678 (grub_emu_SOURCES): Likewise.
8679
8680 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8681 (grub_emu_SOURCES): Likewise.
8682
8683 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8684 (grub_emu_SOURCES): Likewise.
8685
8686 * fs/ntfs.c (grub_ntfscomp_func): New variable.
8687 (read_run_list): Renamed to grub_ntfs_read_run_list.
8688 (decomp_nextvcn): Moved to ntfscomp.c.
8689 (decomp_getch): Likewise.
8690 (decomp_get16): Likewise.
8691 (decomp_block): Likewise.
8692 (read_block): Likewise.
8693 (read_data): Partially moved to ntfscomp.c.
8694 (fixup): Change unsigned to grub_uint16_t.
8695 (read_mft): Change unsigned long to grub_uint32_t.
8696 (read_attr): Likewise.
8697 (read_data): Likewise.
8698 (read_run_data): Likewise.
8699 (read_run_list): Likewise.
8700 (read_mft): Likewise.
8701
8702 * fs/ntfscomp.c: New file.
8703
8704 * include/grub/ntfs.h: New file.
8705
af680a87 87062007-12-16 Robert Millan <rmh@aybabtu.com>
8707
8708 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8709 IDE disk check, since Linux is known to support 20 IDE disks.
8710 Reported by Colin Watson.
8711
84be7599 87122007-12-15 Bean <bean123ch@gmail.com>
8713
8714 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8715 (lnxboot_img_SOURCES): New variable.
8716 (lnxboot_img_ASFLAGS): Likewise.
8717 (lnxboot_img_LDFLAGS): Likewise.
8718
8719 * boot/i386/pc/lnxboot.S: New file.
8720
6af9db01 87212007-11-24 Pavel Roskin <proski@gnu.org>
8722
8723 * configure.ac: Test if '--build-id=none' is supported by the
8724 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
8725 objcopy to generate incorrect binary files (binutils
8726 2.17.50.0.18-1 as shipped by Fedora 8).
8727 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8728 linking, so that build ID doesn't break the test.
8729
7361cfe6 87302007-11-24 Pavel Roskin <proski@gnu.org>
8731
8732 * include/grub/i386/time.h: use "void" in the argument list
8733 of grub_cpu_idle().
8734 * include/grub/powerpc/time.h: Likewise.
8735 * include/grub/sparc64/time.h: Likewise.
8736
1593e10c 87372007-11-18 Christian Franke <franke@computer.org>
8738
8739 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8740 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8741 This fixes the problem that function keys did not work in grub-emu.
8742
3b8db1a8 87432007-11-18 Christian Franke <franke@computer.org>
8744
8745 * disk/host.c (grub_host_open): Remove attribute unused from
8746 name parameter. Add check for "host". This fixes the problem
8747 that grub-emu does not find partitions.
8748
2e29408d 87492007-11-18 Christian Franke <franke@computer.org>
8750
8751 * util/hostfs.c (is_dir): New function.
8752 (grub_hostfs_dir): Handle missing dirent.d_type case.
8753 (grub_hostfs_read): Add missing fseek().
8754 (grub_hostfs_label): Clear label pointer. This fixes a crash
8755 of grub-emu on "ls (host)".
8756
398cd047 87572007-11-18 Christian Franke <franke@computer.org>
8758
8759 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8760 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8761 to 64 bit boundary by default.
8762
c405c391 87632007-11-18 Bean <bean123ch@gmail.com>
8764
8765 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8766 (hexdump_mod_SOURCES): New variable.
8767 (hexdump_mod_CFLAGS): Likewise.
8768 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 8769
c405c391 8770 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8771
8772 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8773
8774 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8775
8776 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8777
8778 * include/grub/hexdump.h: New file.
8779
8780 * commands/hexdump.c: New file.
8781
5cced7fd 87822007-11-10 Robert Millan <rmh@aybabtu.com>
8783
8784 * commands/i386/pc/play.c (beep_off): Switch order of arguments
8785 in grub_outb() calls.
8786 (beep_on): Likewise.
8787
8b714eb0 87882007-11-10 Christian Franke <franke@computer.org>
8789
8790 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8791 (grub_menu_run): Likewise.
8792
ce0f1839 87932007-11-10 Robert Millan <rmh@aybabtu.com>
8794
8795 * include/grub/i386/efi/machine.h: New file.
8796 * include/grub/i386/linuxbios/machine.h: Likewise.
8797 * include/grub/i386/pc/machine.h: Likewise.
8798 * include/grub/powerpc/ieee1275/machine.h: Likewise.
8799 * include/grub/sparc64/ieee1275/machine.h: Likewise.
8800
8801 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8802 (serial_hw_io_addr): New variable.
8803 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8804 instead of `(unsigned short *) 0x400'.
8805
270c237d 88062007-11-10 Bean <bean123ch@gmail.com>
8807
8808 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8809
a87783bf 88102007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8811
8812 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8813 (vga_mod_SOURCES): Added.
8814 (vga_mod_CFLAGS): Likewise.
8815 (vga_mod_LDFLAGS): Likewise.
8816
8817 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8818 grub_outb() calls.
8819 (set_map_mask): Likewise.
8820 (set_read_map): Likewise.
8821 (set_read_address): Likewise.
8822 (vga_font): Removed variable.
8823 (get_vga_glyph): Removed function.
8824 (invalidate_char): Likewise.
8825 (write_char): Changed to use grub_font_get_glyph() for font
8826 information.
8827 (grub_vga_putchar): Likewise.
8828 (grub_vga_getcharwidth): Likewise.
8829
6433b448 88302007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8831
8832 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8833 flags.
8834 (pxeboot_img_LDFLAGS): Likewise.
8835 (diskboot_img_LDFLAGS): Likewise.
8836 (kernel_img_LDFLAGS): Likewise.
8837
49178511 88382007-11-06 Robert Millan <rmh@aybabtu.com>
8839
8840 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8841 in grub_outb() calls.
8842 (serial_hw_init): Likewise.
8843
53b052de 88442007-11-05 Robert Millan <rmh@aybabtu.com>
8845
8846 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8847 spaces. Skip non-regular files.
8848
5ab33bba 88492007-11-05 Robert Millan <rmh@aybabtu.com>
8850
8851 * kern/disk.c (grub_disk_firmware_fini)
8852 (grub_disk_firmware_is_tainted): New variables.
8853
8854 * include/grub/disk.h (grub_disk_firmware_fini)
8855 (grub_disk_firmware_is_tainted): Likewise.
8856
8857 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8858 (grub_disk_biosdisk_fini): ... to here.
8859 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8860 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8861 is set. Register grub_disk_biosdisk_fini() in
8862 `grub_disk_firmware_fini'.
8863
8864 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8865 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8866 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8867 to finish existing firmware disk interface.
8868
8869 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8870 (ata_mod_SOURCES): New variable.
8871 (ata_mod_CFLAGS): Likewise.
8872 (ata_mod_LDFLAGS): Likewise.
8873
0149ab7c 88742007-11-05 Robert Millan <rmh@aybabtu.com>
8875
8876 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
8877 (grub_ata_wait): Reimplement using grub_millisleep().
8878
8879 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8880 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8881
be7ac41e 88822007-11-03 Marco Gerards <marco@gnu.org>
8883
8884 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8885 (CRTC_ADDR_PORT): New macro.
8886 (CRTC_DATA_PORT): Likewise.
8887 (CRTC_CURSOR): Likewise.
8888 (CRTC_CURSOR_ADDR_HIGH): Likewise.
8889 (CRTC_CURSOR_ADDR_LOW): Likewise.
8890 (update_cursor): New function.
8891 (grub_console_real_putchar): Call `update_cursor'.
8892 (grub_console_gotoxy): Likewise.
8893 (grub_console_cls): Set the default color when clearing the
8894 screen.
8895 (grub_console_setcursor): Implemented.
8896
bb06ab2e 88972007-11-03 Marco Gerards <marco@gnu.org>
8898
8899 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8900 become activate.
8901 (grub_ata_pio_write): Likewise.
8902
8903 (grub_atapi_identify): Wait after issuing an ATA command.
8904 (grub_atapi_packet): Likewise.
8905 (grub_ata_identify): Likewise.
8906 (grub_ata_readwrite): Likewise.
8907
cf8f780b 89082007-11-03 Marco Gerards <marco@gnu.org>
8909
8910 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8911 (grub_ata_pio_write): Likewise.
8912 (grub_ata_readwrite): Use `grub_error', instead of
8913 returning `grub_errno'.
8914
ed649e54 89152007-11-03 Marco Gerards <marco@gnu.org>
8916
8917 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8918 grub_ata_pio_write once for every single sector, instead of for
8919 multiple sectors.
8920
ca25d8f0 89212007-10-31 Robert Millan <rmh@aybabtu.com>
8922
8923 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8924
8925 * conf/i386-linuxbios.rmk: New file.
8926
8927 * kern/i386/pc/hardware.c: Likewise.
8928 * term/i386/pc/at_keyboard.c: Likewise.
8929 * term/i386/pc/vga_text.c: Likewise.
8930
8931 * include/grub/i386/linuxbios/boot.h: Likewise.
8932 * include/grub/i386/linuxbios/console.h: Likewise.
8933 * include/grub/i386/linuxbios/init.h: Likewise.
8934 * include/grub/i386/linuxbios/kernel.h: Likewise.
8935 * include/grub/i386/linuxbios/loader.h: Likewise.
8936 * include/grub/i386/linuxbios/memory.h: Likewise.
8937 * include/grub/i386/linuxbios/serial.h: Likewise.
8938 * include/grub/i386/linuxbios/time.h: Likewise.
8939
8940 * kern/i386/linuxbios/init.c: Likewise.
8941 * kern/i386/linuxbios/startup.S: Likewise.
8942 * kern/i386/linuxbios/table.c: Likewise.
8943
e911ecc1 89442007-10-31 Marco Gerards <marco@gnu.org>
8945
8946 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8947 (ata_mod_SOURCES): New variable.
8948 (ata_mod_CFLAGS): Likewise.
8949 (ata_mod_LDFLAGS): Likewise.
8950
8951 * disk/ata.c: New file.
8952
8953 * include/grub/disk.h (grub_disk_dev_id): Add
8954 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 8955
7f66d0e0 89562007-10-31 Robert Millan <rmh@aybabtu.com>
8957
8958 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8959 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8960
8961 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8962 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8963
8964 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8965 `<grub/types.h>'.
8966
8967 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8968
5cd7dd46 89692007-10-27 Robert Millan <rmh@aybabtu.com>
8970
3236ca65 8971 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 8972
2ebfc90f 89732007-10-22 Robert Millan <rmh@aybabtu.com>
8974
8975 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
8976 `"../realmode.S"'.
8977 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
8978
73fcb0f3 89792007-10-22 Robert Millan <rmh@aybabtu.com>
8980
8981 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8982 (pkgdata_MODULES): Add `biosdisk.mod'.
8983 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8984 variables.
8985
8986 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8987 (grub_biosdisk_init): Replace with ...
8988 (GRUB_MOD_INIT(biosdisk)): ... this.
8989 (grub_biosdisk_fini): Replace with ...
8990 (GRUB_MOD_FINI(biosdisk)): ... this.
8991
8992 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8993 (grub_machine_init): Remove call to grub_biosdisk_init().
8994 (grub_machine_fini): Remove call to grub_machine_fini().
8995
8996 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8997
3381d274 89982007-10-22 Robert Millan <rmh@aybabtu.com>
8999
9000 * include/grub/time.h: New file.
9001 * include/grub/i386/time.h: Likewise.
9002 * include/grub/powerpc/time.h: Likewise.
9003 * include/grub/sparc64/time.h: Likewise.
9004
9005 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9006 instances to ...
9007 (KERNEL_MACHINE_TIME_HEADER): ... this.
9008 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9009 instances to ...
9010 (KERNEL_MACHINE_TIME_HEADER): ... this.
9011 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9012 instances to ...
9013 (KERNEL_MACHINE_TIME_HEADER): ... this.
9014
9015 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9016 (grub_millisleep): New function.
9017 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9018 (grub_millisleep): New function.
9019 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9020 Remove `grub/machine/time.h' include.
9021 (grub_millisleep): New function.
9022 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9023 Remove `grub/machine/time.h' include.
9024 (grub_millisleep): New function.
9025
9026 * include/grub/misc.h (grub_div_roundup): New function.
9027
9028 * kern/misc.c: Include `<grub/time.h>'.
9029 (grub_millisleep_generic): New function.
9030
9031 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9032 Add `time.h'.
9033 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9034 Add `time.h'.
9035 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9036 `machine/time.h'. Add `time.h'.
9037 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9038
a39a0312 90392007-10-21 Robert Millan <rmh@aybabtu.com>
9040
9041 * include/grub/misc.h (grub_max): New function.
9042
2aad70e2 90432007-10-21 Robert Millan <rmh@aybabtu.com>
9044
9045 * util/misc.c (grub_util_info): Call fflush() before returning.
9046
54b71c4b 90472007-10-20 Robert Millan <rmh@aybabtu.com>
9048
9049 * genmk.rb (Image): Copy `extra_flags' from here ...
9050 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9051
9052 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9053 to `argc' and `args' arguments.
9054
a979f513 90552007-10-17 Robert Millan <rmh@aybabtu.com>
9056
9057 * kern/i386/loader.S: New file.
9058
9059 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9060 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9061 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9062 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9063 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9064 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9065 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9066 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9067 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9068 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9069 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9070 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9071 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9072 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9073
9074 * kern/i386/realmode.S: New file.
9075
9076 * kern/i386/pc/startup.S (protstack): Moved from here ...
9077 * kern/i386/realmode.S (protstack)... to here.
9078 * kern/i386/pc/startup.S (gdt): Moved from here ...
9079 * kern/i386/realmode.S (gdt)... to here.
9080 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9081 * kern/i386/realmode.S (prot_to_real)... to here.
9082
9083 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9084 `kern/i386/realmode.S'.
9085
825fc8fd 90862007-10-17 Robert Millan <rmh@aybabtu.com>
9087
9088 * include/grub/i386/loader.h: New file.
9089
9090 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9091 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9092 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9093 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9094 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9095 * include/grub/i386/loader.h (grub_linux_prot_size)
9096 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9097 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9098 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9099 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9100
9101 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9102
e179b2f4 91032007-10-15 Robert Millan <rmh@aybabtu.com>
9104
9105 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9106 filesystem when dev->disk is unset.
9107 Do probe for filesystem even when dev->disk->has_partitions is set.
9108 In case a filesystem is found, always report it.
9109 In case it isn't, if dev->disk->has_partitions is set, report that
9110 a partition table was found instead of reporting that no filesystem
9111 could be identified.
9112
5db82af6 91132007-10-12 Robert Millan <rmh@aybabtu.com>
9114
9115 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9116 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9117
68f6ac74 9118 * include/grub/types.h (grub_host_to_target16): New macro.
9119 (grub_host_to_target32): Likewise.
9120 (grub_host_to_target64): Likewise.
9121 (grub_target_to_host16): Likewise.
9122 (grub_target_to_host32): Likewise.
9123 (grub_target_to_host64): Likewise.
5db82af6 9124
9125 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9126 Renamed from to ...
9127 (GRUB_MOD_ALIGN): ...this. Update all users.
9128
68f6ac74 9129 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9130 grub_host_to_target32.
9131 Replace grub_be_to_cpu32 with grub_target_to_host32.
9132 (load_modules): Likewise.
9133 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9134 Replace grub_be_to_cpu32 with grub_target_to_host32.
9135 Replace grub_cpu_to_be16 with grub_host_to_target16.
9136 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 9137
3cf497cc 91382007-10-12 Robert Millan <rmh@aybabtu.com>
9139
9140 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9141 * util/elf/grub-mkimage.c: ... here.
9142
9143 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9144 `util/powerpc/ieee1275/grub-mkimage.c'.
9145
c8cc3692 91462007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 9147
c8cc3692 9148 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9149 and make it easier to figure out.
9150 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9151 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9152 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9153 leave us with less than HEAP_MIN_SIZE total heap.
9154 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 9155
5c58b791 91562007-10-03 Robert Millan <rmh@aybabtu.com>
9157
9158 * include/grub/i386/io.h: New file.
9159 * commands/i386/pc/play.c (inb): Removed.
9160 (outb): Removed.
9161 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9162 with grub_outb().
afcd2ef8 9163 * term/i386/pc/serial.c (inb): Removed.
9164 (outb): Removed.
9165 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9166 with grub_outb().
9167 * term/i386/pc/vga.c (inb): Removed.
9168 (outb): Removed.
9169 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9170 with grub_outb().
5c58b791 9171
1a477ed6 91722007-10-02 Robert Millan <rmh@aybabtu.com>
9173
9174 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9175 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9176 Reported by Marcin Kurek.
9177
6b5d80fa 91782007-09-07 Robert Millan <rmh@aybabtu.com>
9179
9180 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9181 SmartFirmware version updates (as released by Sven Luther), and avoid
9182 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9183 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9184 known broken.
9185
5618afbf 91862007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9187
9188 From Hitoshi Ozeki:
9189 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9190 when merging two regions.
9191
6139dcd9 91922007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9193
508e39ee 9194 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9195 * normal/completion.c (grub_normal_do_completion): Likewise.
9196 Reported by Hitoshi Ozeki.
9197
91982007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9199
6139dcd9 9200 Do not use devices at boot in chainloading.
f19dbdb7 9201
6139dcd9 9202 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9203 (boot_part_addr): Likewise.
9204 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9205 with BOOT_DRIVE and BOOT_PART_ADDR.
9206 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9207 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9208
38da6516 92092007-08-29 Robert Millan <rmh@aybabtu.com>
9210
9211 Patch from Simon Peter <dn.tlp@gmx.net>:
9212 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9213 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9214 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9215 util/i386/pc/grub-setup.c_DEPENDENCIES.
9216 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9217 util/grub-probe.c_DEPENDENCIES.
9218 * conf/powerpc-ieee1275.rmk: Likewise.
9219
29d0928c 92202007-08-28 Robert Millan <rmh@aybabtu.com>
9221
9222 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9223 to tell grub-mkdevicemap how to name devices.
9224 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9225 feature).
9226
9227 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9228 util/i386/get_disk_name.c.
9229 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9230 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9231 util/ieee1275/get_disk_name.c.
9232
9233 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9234
9235 * DISTLIST: Add util/i386/get_disk_name.c and
9236 util/ieee1275/get_disk_name.c.
9237
9238 * util/grub-mkdevicemap.c: Replace device naming logic with
9239 grub_util_get_disk_name() calls.
9240
5a0d3cca 92412007-08-20 Robert Millan <rmh@aybabtu.com>
9242
9243 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9244 (so that it works for both plural and singular quantities).
9245
8b72db2f 92462007-08-05 Robert Millan <rmh@aybabtu.com>
9247
9248 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9249 so that [xz] isn't taken into account when determining order.
9250
352466bf 92512007-08-02 Marco Gerards <marco@gnu.org>
9252
9253 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9254 `include/multiboot2.h', `include/grub/elfload.h',
9255 `include/multiboot.h', `include/grub/multiboot.h',
9256 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9257 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9258 `kern/elf.c', `loader/multiboot_loader.c',
9259 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9260 `loader/i386/pc/multiboot2.c',
9261 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9262 `util/i386/pc/grub-mkrescue.in'. Remove
9263 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9264 `include/grub/i386/pc/util/biosdisk.h' and
9265 `include/grub/powerpc/ieee1275/multiboot.h'.
9266
8f096014 92672007-08-02 Bean <bean123ch@gmail.com>
9268
9269 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9270 (ntfs_mod_SOURCES): New variable.
9271 (ntfs_mod_CFLAGS): Likewise.
9272 (ntfs_mod_LDFLAGS): Likewise.
9273
9274 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9275 (grub_probe_SOURCES): Likewise.
9276 (grub_emu_SOURCES): Likewise.
9277
9278 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9279 (grub_emu_SOURCES): Likewise.
9280
9281 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9282 (grub_emu_SOURCES): Likewise.
f19dbdb7 9283
8f096014 9284 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9285
9286 * fs/ntfs.c: New file.
9287
9959f7db 92882007-08-02 Bean <bean123ch@gmail.com>
9289
9290 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9291
9292 * file.h (grub_file): Likewise.
9293
9294 * fshelp.h (grub_fshelp_read_file): Likewise.
9295
9296 * util/i386/pc/grub-setup.c (setup): Likewise.
9297 (save_first_sector): Likewise.
9298 (save_blocklists): Likewise.
f19dbdb7 9299
9959f7db 9300 * fs/affs.c (grub_affs_read_file): Likewise.
9301
9302 * fs/ext2.c (grub_ext2_read_file): Likewise.
9303
9304 * fs/fat.c (grub_fat_read_data): Likewise.
9305
9306 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9307
9308 * fs/hfs.c (grub_hfs_read_file): Likewise.
9309
9310 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9311
9312 * fs/jfs.c (grub_jfs_read_file): Likewise.
9313
9314 * fs/minix.c (grub_minix_read_file): Likewise.
9315
9316 * fs/sfs.c (grub_sfs_read_file): Likewise.
9317
9318 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 9319
9959f7db 9320 * fs/xfs.c (grub_xfs_read_file): Likewise.
9321
9322 * command/blocklist.c (read_blocklist): Likewise.
9323 (print_blocklist): Likewise.
9324
0a203f83 93252007-08-02 Marco Gerards <marco@gnu.org>
9326
9327 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9328 `util/hostfs.c'.
9329
9330 * disk/host.c: New file.
9331
9332 * util/hostfs.c: Likewise.
9333
9334 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9335 return `GRUB_ERR_BAD_FS'.
9336 * fs/sfs.c (grub_sfs_mount): Likewise.
9337 * fs/xfs.c (grub_xfs_mount): Likewise.
9338
9339 * include/grub/disk.h (enum grub_disk_dev_id): Add
9340 `GRUB_DISK_DEVICE_HOST_ID'.
9341
9342 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9343
e5dfe777 93442007-07-24 Jerone Young <jerone@gmail.com>
9345
f19dbdb7 9346 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 9347 modules for compilation.
9348 * conf/powerpc-ieee1275.rmk: Likewise.
9349
9350 * include/multiboot.h: Move multiboot definitions to one file. Rename
9351 many definitions to not get grub specific.
9352 * include/multiboot2.h: Create header with multiboot 2 definitions.
9353 * include/grub/multiboot.h: Header for grub specific function
9354 prototypes and definitions.
9355 * include/grub/multiboot2.h: Likewise.
9356 * include/grub/multiboot_loader.h: Likewise.
9357 * include/grub/i386/pc/multiboot.h: Removed.
9358 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9359
9360 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9361 and 2 to allow for one multiboot and module commands.
9362 * loader/multiboot2.c: Add multiboot2 functionality.
9363 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9364 and definition names.
9365 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9366 2 functions.
9367 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9368 ieee1275 specific multiboot2 code.
9369
9370 * kern/i386/pc/startup.S: Change headers and definition names for
9371 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9372
daf0f0ba 93732007-07-22 Robert Millan <rmh@aybabtu.com>
9374
9375 * geninitheader.sh: Process file specified in first parameter rather
9376 than hardcoding grub_modules_init.lst.
fe6b695a 9377 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 9378 than hardcoding grub_modules_init.h.
9379
9380 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9381 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9382 grub_probe_init.[ch] and grub_setup_init.[ch].
9383
9384 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9385 grub_modules_init.h with grub_emu_init.h.
9386 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9387 grub_probe_init.[ch] files.
9388 * conf/i386-efi.rmk: Likewise.
9389 * conf/i386-pc.rmk: Likewise.
9390 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9391 grub_setup_init.[ch] files.
9392
9393 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9394 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9395 to initialize modules rather than a list of hardcoded functions.
9396 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9397 grub_init_all() to initialize modules rather than a list of hardcoded
9398 functions.
9399
54cdc1cc 94002007-07-22 Robert Millan <rmh@aybabtu.com>
9401
9402 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9403 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9404
ad0686cc 94052007-07-22 Robert Millan <rmh@aybabtu.com>
9406
9407 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9408 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9409 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9410 flag when running on SmartFirmware.
9411 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9412 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9413 was set.
9414
9415 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9416 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9417 rather than decreasing it.
9418
9419 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9420 there's not enough space to do it, fail in the same way as when it
9421 can't be done because there are no partitions.
9422
9423 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9424 when nvsetenv failed.
9425
969c02ec 94262007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9427
9428 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9429 because this rule is automatically generated.
9430 (grub-mkrescue): Removed for the same reason as above.
9431
5a79f472 94322007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9433
9434 Migrate to GNU General Public License Version 3.
f19dbdb7 9435
5a79f472 9436 * COPYING: Replaced with the plain text version of GPLv3.
9437
9438 * config.guess: Updated from gnulib.
9439 * config.sub: Likewise.
9440
9441 * geninit.sh: Output a GPLv3 copyright notice.
9442 * geninitheader.sh: Likewise.
9443 * genmodsrc.sh: Likewise.
9444 * gensymlist.sh.in: Likewise.
9445
9446 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9447 * boot/i386/pc/diskboot.S: Likewise.
9448 * boot/i386/pc/pxeboot.S: Likewise.
9449 * commands/blocklist.c: Likewise.
9450 * commands/boot.c: Likewise.
9451 * commands/cat.c: Likewise.
9452 * commands/cmp.c: Likewise.
9453 * commands/configfile.c: Likewise.
9454 * commands/echo.c: Likewise.
9455 * commands/help.c: Likewise.
9456 * commands/ls.c: Likewise.
9457 * commands/search.c: Likewise.
9458 * commands/terminal.c: Likewise.
9459 * commands/test.c: Likewise.
9460 * commands/videotest.c: Likewise.
9461 * commands/i386/cpuid.c: Likewise.
9462 * commands/i386/pc/halt.c: Likewise.
9463 * commands/i386/pc/play.c: Likewise.
9464 * commands/i386/pc/reboot.c: Likewise.
9465 * commands/i386/pc/vbeinfo.c: Likewise.
9466 * commands/i386/pc/vbetest.c: Likewise.
9467 * commands/ieee1275/halt.c: Likewise.
9468 * commands/ieee1275/reboot.c: Likewise.
9469 * commands/ieee1275/suspend.c: Likewise.
9470 * disk/loopback.c: Likewise.
9471 * disk/lvm.c: Likewise.
9472 * disk/raid.c: Likewise.
9473 * disk/efi/efidisk.c: Likewise.
9474 * disk/i386/pc/biosdisk.c: Likewise.
9475 * disk/ieee1275/ofdisk.c: Likewise.
9476 * font/manager.c: Likewise.
9477 * fs/affs.c: Likewise.
9478 * fs/ext2.c: Likewise.
9479 * fs/fat.c: Likewise.
9480 * fs/fshelp.c: Likewise.
9481 * fs/hfs.c: Likewise.
9482 * fs/hfsplus.c: Likewise.
9483 * fs/iso9660.c: Likewise.
9484 * fs/jfs.c: Likewise.
9485 * fs/minix.c: Likewise.
9486 * fs/sfs.c: Likewise.
9487 * fs/ufs.c: Likewise.
9488 * fs/xfs.c: Likewise.
9489 * hello/hello.c: Likewise.
9490 * include/grub/acorn_filecore.h: Likewise.
9491 * include/grub/arg.h: Likewise.
9492 * include/grub/bitmap.h: Likewise.
9493 * include/grub/boot.h: Likewise.
9494 * include/grub/cache.h: Likewise.
9495 * include/grub/device.h: Likewise.
9496 * include/grub/disk.h: Likewise.
9497 * include/grub/dl.h: Likewise.
9498 * include/grub/elfload.h: Likewise.
9499 * include/grub/env.h: Likewise.
9500 * include/grub/err.h: Likewise.
9501 * include/grub/file.h: Likewise.
9502 * include/grub/font.h: Likewise.
9503 * include/grub/fs.h: Likewise.
9504 * include/grub/fshelp.h: Likewise.
9505 * include/grub/gzio.h: Likewise.
9506 * include/grub/hfs.h: Likewise.
9507 * include/grub/kernel.h: Likewise.
9508 * include/grub/loader.h: Likewise.
9509 * include/grub/lvm.h: Likewise.
9510 * include/grub/misc.h: Likewise.
9511 * include/grub/mm.h: Likewise.
9512 * include/grub/net.h: Likewise.
9513 * include/grub/normal.h: Likewise.
9514 * include/grub/parser.h: Likewise.
9515 * include/grub/partition.h: Likewise.
9516 * include/grub/pc_partition.h: Likewise.
9517 * include/grub/raid.h: Likewise.
9518 * include/grub/rescue.h: Likewise.
9519 * include/grub/script.h: Likewise.
9520 * include/grub/setjmp.h: Likewise.
9521 * include/grub/symbol.h: Likewise.
9522 * include/grub/term.h: Likewise.
9523 * include/grub/terminfo.h: Likewise.
9524 * include/grub/tparm.h: Likewise.
9525 * include/grub/types.h: Likewise.
9526 * include/grub/video.h: Likewise.
9527 * include/grub/efi/api.h: Likewise.
9528 * include/grub/efi/chainloader.h: Likewise.
9529 * include/grub/efi/console.h: Likewise.
9530 * include/grub/efi/console_control.h: Likewise.
9531 * include/grub/efi/disk.h: Likewise.
9532 * include/grub/efi/efi.h: Likewise.
9533 * include/grub/efi/pe32.h: Likewise.
9534 * include/grub/efi/time.h: Likewise.
9535 * include/grub/i386/linux.h: Likewise.
9536 * include/grub/i386/setjmp.h: Likewise.
9537 * include/grub/i386/types.h: Likewise.
9538 * include/grub/i386/efi/kernel.h: Likewise.
9539 * include/grub/i386/efi/loader.h: Likewise.
9540 * include/grub/i386/efi/time.h: Likewise.
9541 * include/grub/i386/pc/biosdisk.h: Likewise.
9542 * include/grub/i386/pc/boot.h: Likewise.
9543 * include/grub/i386/pc/chainloader.h: Likewise.
9544 * include/grub/i386/pc/console.h: Likewise.
9545 * include/grub/i386/pc/init.h: Likewise.
9546 * include/grub/i386/pc/kernel.h: Likewise.
9547 * include/grub/i386/pc/loader.h: Likewise.
9548 * include/grub/i386/pc/memory.h: Likewise.
9549 * include/grub/i386/pc/multiboot.h: Likewise.
9550 * include/grub/i386/pc/serial.h: Likewise.
9551 * include/grub/i386/pc/time.h: Likewise.
9552 * include/grub/i386/pc/vbe.h: Likewise.
9553 * include/grub/i386/pc/vbeblit.h: Likewise.
9554 * include/grub/i386/pc/vbefill.h: Likewise.
9555 * include/grub/i386/pc/vbeutil.h: Likewise.
9556 * include/grub/i386/pc/vga.h: Likewise.
9557 * include/grub/ieee1275/ieee1275.h: Likewise.
9558 * include/grub/ieee1275/ofdisk.h: Likewise.
9559 * include/grub/powerpc/libgcc.h: Likewise.
9560 * include/grub/powerpc/setjmp.h: Likewise.
9561 * include/grub/powerpc/types.h: Likewise.
9562 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9563 * include/grub/powerpc/ieee1275/console.h: Likewise.
9564 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9565 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9566 * include/grub/powerpc/ieee1275/loader.h: Likewise.
9567 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9568 * include/grub/powerpc/ieee1275/time.h: Likewise.
9569 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9570 * include/grub/sparc64/libgcc.h: Likewise.
9571 * include/grub/sparc64/setjmp.h: Likewise.
9572 * include/grub/sparc64/types.h: Likewise.
9573 * include/grub/sparc64/ieee1275/console.h: Likewise.
9574 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9575 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9576 * include/grub/sparc64/ieee1275/time.h: Likewise.
9577 * include/grub/util/biosdisk.h: Likewise.
9578 * include/grub/util/getroot.h: Likewise.
9579 * include/grub/util/lvm.h: Likewise.
9580 * include/grub/util/misc.h: Likewise.
9581 * include/grub/util/raid.h: Likewise.
9582 * include/grub/util/resolve.h: Likewise.
9583 * io/gzio.c: Likewise.
9584 * kern/device.c: Likewise.
9585 * kern/disk.c: Likewise.
9586 * kern/dl.c: Likewise.
9587 * kern/elf.c: Likewise.
9588 * kern/env.c: Likewise.
9589 * kern/err.c: Likewise.
9590 * kern/file.c: Likewise.
9591 * kern/fs.c: Likewise.
9592 * kern/loader.c: Likewise.
9593 * kern/main.c: Likewise.
9594 * kern/misc.c: Likewise.
9595 * kern/mm.c: Likewise.
9596 * kern/parser.c: Likewise.
9597 * kern/partition.c: Likewise.
9598 * kern/rescue.c: Likewise.
9599 * kern/term.c: Likewise.
9600 * kern/efi/efi.c: Likewise.
9601 * kern/efi/init.c: Likewise.
9602 * kern/efi/mm.c: Likewise.
9603 * kern/i386/dl.c: Likewise.
9604 * kern/i386/efi/init.c: Likewise.
9605 * kern/i386/efi/startup.S: Likewise.
9606 * kern/i386/pc/init.c: Likewise.
9607 * kern/i386/pc/lzo1x.S: Likewise.
9608 * kern/i386/pc/startup.S: Likewise.
9609 * kern/ieee1275/ieee1275.c: Likewise.
9610 * kern/powerpc/cache.S: Likewise.
9611 * kern/powerpc/dl.c: Likewise.
9612 * kern/powerpc/ieee1275/cmain.c: Likewise.
9613 * kern/powerpc/ieee1275/crt0.S: Likewise.
9614 * kern/powerpc/ieee1275/init.c: Likewise.
9615 * kern/powerpc/ieee1275/openfw.c: Likewise.
9616 * kern/sparc64/cache.S: Likewise.
9617 * kern/sparc64/dl.c: Likewise.
9618 * kern/sparc64/ieee1275/init.c: Likewise.
9619 * kern/sparc64/ieee1275/openfw.c: Likewise.
9620 * loader/efi/chainloader.c: Likewise.
9621 * loader/efi/chainloader_normal.c: Likewise.
9622 * loader/i386/efi/linux.c: Likewise.
9623 * loader/i386/efi/linux_normal.c: Likewise.
9624 * loader/i386/pc/chainloader.c: Likewise.
9625 * loader/i386/pc/chainloader_normal.c: Likewise.
9626 * loader/i386/pc/linux.c: Likewise.
9627 * loader/i386/pc/linux_normal.c: Likewise.
9628 * loader/i386/pc/multiboot.c: Likewise.
9629 * loader/i386/pc/multiboot_normal.c: Likewise.
9630 * loader/powerpc/ieee1275/linux.c: Likewise.
9631 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9632 * normal/arg.c: Likewise.
9633 * normal/cmdline.c: Likewise.
9634 * normal/command.c: Likewise.
9635 * normal/completion.c: Likewise.
9636 * normal/execute.c: Likewise.
9637 * normal/function.c: Likewise.
9638 * normal/lexer.c: Likewise.
9639 * normal/main.c: Likewise.
9640 * normal/menu.c: Likewise.
9641 * normal/menu_entry.c: Likewise.
9642 * normal/misc.c: Likewise.
9643 * normal/parser.y: Likewise.
9644 * normal/script.c: Likewise.
9645 * normal/i386/setjmp.S: Likewise.
9646 * normal/powerpc/setjmp.S: Likewise.
9647 * normal/sparc64/setjmp.S: Likewise.
9648 * partmap/acorn.c: Likewise.
9649 * partmap/amiga.c: Likewise.
9650 * partmap/apple.c: Likewise.
9651 * partmap/gpt.c: Likewise.
9652 * partmap/pc.c: Likewise.
9653 * partmap/sun.c: Likewise.
9654 * term/gfxterm.c: Likewise.
9655 * term/terminfo.c: Likewise.
9656 * term/efi/console.c: Likewise.
9657 * term/i386/pc/console.c: Likewise.
9658 * term/i386/pc/serial.c: Likewise.
9659 * term/i386/pc/vesafb.c: Likewise.
9660 * term/i386/pc/vga.c: Likewise.
9661 * term/ieee1275/ofconsole.c: Likewise.
9662 * util/biosdisk.c: Likewise.
9663 * util/console.c: Likewise.
9664 * util/genmoddep.c: Likewise.
9665 * util/getroot.c: Likewise.
9666 * util/grub-emu.c: Likewise.
9667 * util/grub-mkdevicemap.c: Likewise.
9668 * util/grub-probe.c: Likewise.
9669 * util/lvm.c: Likewise.
9670 * util/misc.c: Likewise.
9671 * util/raid.c: Likewise.
9672 * util/resolve.c: Likewise.
9673 * util/update-grub.in: Likewise.
9674 * util/update-grub_lib.in: Likewise.
9675 * util/grub.d/00_header.in: Likewise.
9676 * util/grub.d/10_hurd.in: Likewise.
9677 * util/grub.d/10_linux.in: Likewise.
9678 * util/i386/efi/grub-install.in: Likewise.
9679 * util/i386/efi/grub-mkimage.c: Likewise.
9680 * util/i386/pc/grub-install.in: Likewise.
9681 * util/i386/pc/grub-mkimage.c: Likewise.
9682 * util/i386/pc/grub-mkrescue.in: Likewise.
9683 * util/i386/pc/grub-setup.c: Likewise.
9684 * util/i386/pc/misc.c: Likewise.
9685 * util/powerpc/ieee1275/grub-install.in: Likewise.
9686 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9687 * util/powerpc/ieee1275/misc.c: Likewise.
9688 * video/bitmap.c: Likewise.
9689 * video/video.c: Likewise.
9690 * video/i386/pc/vbe.c: Likewise.
9691 * video/i386/pc/vbeblit.c: Likewise.
9692 * video/i386/pc/vbefill.c: Likewise.
9693 * video/i386/pc/vbeutil.c: Likewise.
9694 * video/readers/tga.c: Likewise.
9695
3572d015 96962007-07-02 Robert Millan <rmh@aybabtu.com>
9697
9698 * conf/i386-efi.rmk: Replace obsolete reference to
9699 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9700 with util/getroot.c.
9701 * conf/powerpc-ieee1275.rmk: Likewise.
9702 * conf/sparc64-ieee1275.rmk: Likewise.
9703
9704 * util/grub-emu.c (main): Fix unchecked pointer handling.
9705
2c2a681b 97062007-07-02 Robert Millan <rmh@aybabtu.com>
9707
9708 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9709 invocation to fail, in order to support partition-less media.
9710
9711 * util/i386/pc/grub-install.in: Likewise.
9712
9713 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9714 which fs or partmap modules are needed (akin to its sister scripts).
9715
9716 Also use grub-probe to get rid of unportable /proc/mounts check.
9717
9718 Print the same informational message that the other scripts do, before
fe6b695a 9719 exiting.
2c2a681b 9720
6193defe 97212007-06-23 Robert Millan <rmh@aybabtu.com>
9722
fe6b695a 9723 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 9724 a font file can be found and, if so, echo the GRUB path to it.
9725
9726 * util/update-grub.in: Handle multiple terminals depending on user
9727 input, platform availability and font file presence. Propagate
9728 variables of our findings to /etc/grub.d/ children.
9729
9730 * util/grub.d/00_header.in: Handle multiple terminals, based on
9731 environment setup by update-grub.
9732
eface1dc 97332007-06-23 Robert Millan <rmh@aybabtu.com>
9734
ba50d28f 9735 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 9736
bf697e28 97372007-06-21 Robert Millan <rmh@aybabtu.com>
9738
9739 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9740 indicate end of data section in kernel image.
9741 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9742 GRUB_KERNEL_MACHINE_DATA_END.
9743
9744 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9745 space for it.
9746 * kern/i386/efi/startup.S: Likewise.
9747
9748 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9749 during image generation. Implement --prefix option to override this
9750 patch.
9751 * util/i386/efi/grub-mkimage.c: Likewise.
9752
9753 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9754 code to make path relative to its root into a separate function.
9755
9756 * util/i386/pc/grub-install.in: Use newly provided
9757 make_system_path_relative_to_its_root() to convert ${grubdir}, then
9758 pass the result to grub-install --prefix.
9759
baa574b4 97602007-06-13 Robert Millan <rmh@aybabtu.com>
9761
9762 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9763 DEFAULT_DEVICE_MAP.
9764 * util/grub-emu.c: Use above definitions from misc.h instead of
9765 defining them.
9766 * util/grub-mkdevicemap.c: Likewise.
9767 * util/i386/pc/grub-setup.c: Likewise.
9768 * util/grub-probe.c: Likewise.
9769 (probe): Abort with grub_util_error() when either
9770 grub_guess_root_device or grub_util_get_grub_dev fails.
9771
0215dcbf 97722007-06-12 Robert Millan <rmh@aybabtu.com>
9773
9774 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9775 "pager" assignment.
9776 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9777 "pcdata".
9778 * util/grub-probe.c (probe): Likewise for "drive_name".
9779
8af2ab7b 97802007-06-11 Robert Millan <rmh@aybabtu.com>
9781
9782 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9783 not just the cdrom one.
9784
59d31694 97852007-06-11 Robert Millan <rmh@aybabtu.com>
9786
9787 * util/i386/pc/grub-mkrescue.in: Add "set -e".
9788 Add --pkglibdir=DIR option to override pkglibdir.
9789 Mention --image-type=TYPE in help output.
9790 Fix --grub-mkimage (it was a no-op).
fe6b695a 9791 Abort gracefully when no parameter is given.
59d31694 9792
7ee367e4 97932007-06-11 Robert Millan <rmh@aybabtu.com>
9794
9795 * util/i386/pc/grub-mkrescue.in: New file.
9796 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
9797 * Makefile.in: Handle bin_SCRIPTS.
9798
29b0ed46 97992007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
9800
9801 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9802 list of video modes.
9803
c0f90770 98042007-06-06 Robert Millan <rmh@aybabtu.com>
9805
9806 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9807 file doesn't exist, or if it is in a filesystem grub can't read.
9808
9809 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
9810 not abort if GRUB_DRIVE could not be defined. Rearrange generated
9811 header comment to fit in 80 columns when the variables are resolved.
9812
9813 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9814 could be identified by update-grub. Remove redundant check for
fe6b695a 9815 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 9816 handles that).
9817
fb36dc26 98182007-06-04 Robert Millan <rmh@aybabtu.com>
9819
9820 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9821
9822 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9823
9824 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9825
0c68c93e 98262007-06-04 Robert Millan <rmh@aybabtu.com>
9827
9828 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9829
9830 * include/grub/partition.h: Declare grub_apple_partition_map_init and
9831 grub_apple_partition_map_fini.
9832
9833 * util/biosdisk.c
9834 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9835 to access >2 TiB disks).
9836
9837 Print disk->total_sectors with %llu instead of %lu, since this
9838 variable is always 64-bit (prevents wrong disk size from being displayed
9839 on either >2 TiB disk or big-endian CPU).
9840
9841 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9842 into a generic case that supports all (sane) partition maps.
9843
9844 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9845 breaks big-endian.
9846
9847 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9848 and grub_apple_partition_map_fini() after that.
9849
0f23eb74 98502007-06-01 Robert Millan <rmh@aybabtu.com>
9851
9852 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9853
9854 * util/grub.d/00_header.in: Only enable gfxterm when
9855 convert_system_path_to_grub_path() succeeds.
9856
42c71976 98572007-05-20 Robert Millan <rmh@aybabtu.com>
9858
9859 * util/update-grub_lib.in: New file.
9860 * DISTLIST: Add update-grub_lib.in.
9861 * conf/common.rmk: Generate update-grub_lib and install it in
9862 $(lib_DATA).
9863 * Makefile.in: Add install routine for $(lib_DATA).
9864
9865 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9866 function provided by update-grub_lib to support arbitrary paths of
9867 unifont.pff.
9868 * util/update-grub.in: Use convert_system_path_to_grub_path() to
9869 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9870
5beb2291 98712007-05-19 Robert Millan <rmh@aybabtu.com>
9872
9873 * commands/i386/cpuid.c: New module.
9874 * DISTLIST: Add it.
9875 * conf/i386-efi.rmk: Enable cpuid.mod.
9876 * conf/i386-pc.rmk: Likewise.
9877
7262eca1 98782007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9879
9880 * kern/disk.c (grub_disk_read): Check return value of
9881 grub_realloc().
9882
260ba823 98832007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9884
9885 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9886 arrays.
9887 * disk/raid.c (grub_raid_open): Likewise.
9888
1ecb6cf2 98892007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9890
9891 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9892 stack instead of on the heap.
9893
9894 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9895 before doing a read on it.
9896
9897 * configure.ac: Only use -fno-stack-protector for the target
9898 environment.
f19dbdb7 9899
21c8cbb1 99002007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9901
9902 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9903 __attribute_ ((unused)) to mode_type argument.
9904
9905 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 9906
21c8cbb1 9907 * kern/misc.c (memcmp): Fix prototype.
9908
9909 * include/grub/partition.h [GRUB_UTIL]
9910 (grub_gpt_partition_map_init): Add prototype.
9911 (grub_gpt_partition_map_fini): Likewise.
9912
9913 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9914 at the right place.
9915
9916 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9917 (grub_fat_read_data): Likewise.
9918 (grub_fat_find_dir): Likewise.
9919
9920 * font/manager.c (find_glyph): Make table a const.
9921 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 9922
849d55d3 99232007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
9924
9925 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9926 code, first search for device in /dev/mapper, then in /dev.
9927 (grub_util_get_grub_dev): New function.
9928 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9929 prototype.
9930 * util/grub-probe.c (probe): Remove check for RAID, call
9931 grub_util_get_grub_dev() instead of
9932 grub_util_biosdisk_get_grub_dev().
9933 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9934 grub_util_biosdisk_get_grub_dev().
9935 * util/i386/pc/grub-setup.c (main): Likewise.
9936
8fff7c2f 99372007-05-16 Robert Millan <rmh@aybabtu.com>
9938
9939 * DISTLIST: Update for the latest changes.
9940 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9941 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9942 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9943 grub/util/biosdisk.h.
9944 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9945 grub/util/biosdisk.h.
9946
48e12b52 99472007-05-16 Robert Millan <rmh@aybabtu.com>
9948
9949 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9950
46b9d128 99512007-05-16 Robert Millan <rmh@aybabtu.com>
9952
9953 * util/i386/efi/grub-install.in: New.
9954 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9955 newly added grub-install.
9956 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9957 include.
9958 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9959 grub/util/biosdisk.h.
9960 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9961 grub/util/biosdisk.h.
9962
2d1a40a9 99632007-05-16 Robert Millan <rmh@aybabtu.com>
9964
9965 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9966 * include/grub/util/biosdisk.h: ... here.
9967 * util/i386/pc/biosdisk.c: Moved to ...
9968 * util/biosdisk.c: ... here.
9969 * util/i386/pc/getroot.c: Moved to ...
9970 * util/getroot.c: ... here.
9971 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9972 * util/grub-mkdevicemap.c: ... here.
9973 * util/i386/pc/grub-probe.c: Moved to ...
9974 * util/grub-probe.c: ... here.
9975
9e26e3bc 99762007-05-15 Robert Millan <rmh@aybabtu.com>
9977
9978 * util/update-grub.in: Remove duplicated line in grub.cfg header
9979 message.
9980
57f96397 99812007-05-13 Robert Millan <rmh@aybabtu.com>
9982
9983 * util/update-grub.in: Fix a few assumptions about the devices holding
9984 /, /boot and /boot/grub being the same.
9985 * util/grub.d/00_header.in: Likewise.
9986 * util/grub.d/10_hurd.in: Likewise.
9987 * util/grub.d/10_linux.in: Likewise.
9988
9989 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9990 patterns. Use that to define the `.old' suffix as older than `'.
9991
9992 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9993
9994 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9995 the grub.cfg header message.
9996
2e610d62 99972007-05-11 Robert Millan <rmh@aybabtu.com>
9998
9999 * util/update-grub.in: Create device.map if it doesn't already exist,
10000 before attempting to run grub-probe.
10001 Check for grub-probe and grub-mkdevicemap with the same code
10002 grub-install is using.
10003 Remove test mode.
10004
3f6a10ef 100052007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10006
10007 * Makefile.in: Add the datarootdir autoconf variable.
10008
02e7b75e 100092007-05-09 Robert Millan <rmh@aybabtu.com>
10010
10011 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 10012 fail gracefully if dev->disk->partition == NULL.
02e7b75e 10013
75f396cc 100142007-05-07 Robert Millan <rmh@aybabtu.com>
10015
10016 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10017 determine partition map module.
10018 * util/i386/pc/grub-install.in: Use this feature to decide which
10019 partition module to load, instead of hardcoding pc and gpt.
10020
da65cb36 100212007-05-07 Robert Millan <rmh@aybabtu.com>
10022
10023 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10024 source directory differs from build directory.
10025
b57d6a91 100262007-05-05 Robert Millan <rmh@aybabtu.com>
10027
10028 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10029 initialisation.
10030
509d00f1 100312007-05-05 Robert Millan <rmh@aybabtu.com>
10032
10033 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10034
c48f23ef 100352007-05-05 Robert Millan <rmh@aybabtu.com>
10036
10037 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10038 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10039
20b97658 100402007-05-05 Robert Millan <rmh@aybabtu.com>
10041
10042 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10043 (grub_probe_SOURCES): Likewise.
10044 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10045 GPT and initialize dos_part and bsd_part accordingly.
10046 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10047 install_bsd_part.
10048 (main): Activate gpt module for use during partition identification,
10049 and deactivate it afterwards.
10050 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10051 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10052 partition identification, and deactivate it afterwards.
10053
99123174 100542007-05-05 Robert Millan <rmh@aybabtu.com>
10055
10056 * term/i386/pc/console.c (grub_console_fini): Call
10057 grub_term_set_current() before grub_term_unregister().
10058
ebd97f6e 100592007-05-04 Robert Millan <rmh@aybabtu.com>
10060
10061 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10062 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10063 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10064 and update-grub_DATA.
10065 * conf/common.rmk: Build and install update-grub components.
10066 * conf/common.mk: Regenerate.
10067 * util/update-grub.in: New. Core of update-grub.
10068 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10069 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10070 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10071 * util/grub.d/README: New. Document grub.d directory layout.
10072
b06a264d 100732007-05-01 Robert Millan <rmh@aybabtu.com>
10074
10075 * util/grub-emu.c: Move initialization functions
10076 grub_util_biosdisk_init() and grub_init_all() before
10077 grub_util_biosdisk_get_grub_dev(), which relies on them.
10078
41f0050e 100792007-04-19 Robert Millan <rmh@aybabtu.com>
10080
10081 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10082 it is used later.
10083
04582bb3 100842007-04-18 Jerone Young <jerone@gmail.com>
10085
f19dbdb7 10086 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 10087 stanza.
10088
08db4632 100892007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 10090
08db4632 10091 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10092 continue on and look for device node with real device name.
10093
801b76be 100942007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 10095
fe6b695a 10096 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 10097 ability.
10098 * Makefile.in: Add autoconf package transformation code.
10099 * util/i386/pc/grub-install.in: Likewise.
10100 * util/powerpc/ieee1275/grub-install.in: Likewise.
10101
6795c4e1 101022007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10103
10104 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10105 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10106 (EXT2_REVISION): Likewise.
10107 (EXT2_INODE_SIZE): Likewise.
10108 (struct grub_ext2_block_group): Added a missing member
10109 "used_dirs".
10110 (grub_ext2_read_inode): Divide by the inode size in a superblock
10111 instead of 128 to obtain INODES_PER_BLOCK.
10112 Use the macro EXT2_INODE_SIZE instead of directly using
10113 SBLOCK->INODE_SIZE.
10114
d70af616 101152007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10116
10117 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10118 superblock instead of the structure size to compute an
10119 offset. This fixes the problem that GRUB could not read a
10120 filesystem when inode size is different from 128-byte.
10121
3b801603 101222007-03-05 Marco Gerards <marco@gnu.org>
10123
10124 * normal/main.c (read_config_file): When "menu" is not set, create
10125 an initial context.
10126
4785bfe4 101272007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10128
10129 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10130 (HEAP_LIMIT): New macro.
10131 (grub_claim_heap): Claim memory up to `heaplimit'.
10132
a0cbb023 101332007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10134
10135 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10136 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10137 (_start): Likewise.
10138 (grub_arch_modules_addr): Return address after `_end'.
10139 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10140 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10141 (add_segments): Calculate `_end' from phdr size and location.
10142 (ALIGN_UP): Moved to ...
10143 * include/grub/misc.h: here.
10144 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10145 New macro.
10146 (GRUB_IEEE1275_MODULE_BASE): Removed.
10147
fd7d8eba 101482007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10149
10150 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10151 loop boundary.
10152
9b09e6fc 101532007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10154
10155 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10156 All users updated.
10157 (grub_elf64_load_hook_t): Likewise.
10158 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10159 debug output.
10160
3ce27299 101612007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10162
10163 * kern/mm.c: Update copyright.
10164 (grub_mm_debug): Correct syntax error.
10165 (grub_mm_dump_free): New function.
10166 (grub_debug_free): Call `grub_free'.
10167 * include/grub/mm.h: Update copyright.
10168 (grub_mm_dump_free): Add declaration.
10169
077d5fee 101702007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10171
10172 * include/grub/ieee1275/ieee1275.h: Update copyright.
10173 * kern/powerpc/ieee1275/init.c: Likewise.
10174 * kern/powerpc/ieee1275/openfw.c: Likewise.
10175
10176 * loader/powerpc/ieee1275/linux.c: Likewise.
10177 * include/grub/elfload.h: Likewise.
10178 * kern/elf.c: Likewise.
10179 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10180 callers.
10181 (grub_elf64_load): Likewise.
10182 (grub_elf32_load_segment): Move to a nested function.
10183 (grub_elf64_load_segment): Likewise.
10184
dc946850 101852007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10186
10187 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10188 prototype.
10189 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10190 (grub_heap_len): Likewise.
10191 (HEAP_SIZE): New macro.
10192 (grub_claim_heap): New function.
10193 (grub_machine_init): Don't claim heap directly. Call
10194 `grub_claim_heap'.
10195 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10196 (grub_available_iterate): New function.
10197
baa2a121 101982007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10199
10200 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10201 * configure.ac: Use it for testing the HOST and TARGET compilers.
10202
4fe9862e 102032006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10204
10205 * Makefile.in (enable_grub_emu): New variable.
10206 * configure.ac (--enable-grub-emu): New option.
10207 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10208 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10209 * conf/i386-pc.rmk: Likewise.
10210 * conf/powerpc-ieee1275.rmk: Likewise.
10211 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10212
a8aa5762 102132006-12-12 Marco Gerards <marco@gnu.org>
10214
10215 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10216
10217 * kern/env.c (grub_env_unset): Don't free the member `value' when
10218 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10219 pointer.
10220
10221 * normal/main.c (current_menu): Removed.
10222 (free_menu): Unset the `menu' environment variable.
10223 (grub_normal_menu_addentry): Make use of the environment variable
10224 `menu', instead of using the global `current_menu'. Allocate
10225 memory for the sourcecode of this entry.
10226 (read_config_file): New argument `nested', changed all callers.
10227 Only in the case of a new context, initialize a new menu. Set the
10228 `menu' environment variable.
10229 (grub_normal_execute): Don't set and unset the environment
10230 variable `menu' here anymore. Only free the menu when leaving the
10231 context.
10232
10233 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10234 leak.
10235
957b3a3e 102362006-12-11 Marco Gerards <marco@gnu.org>
10237
10238 * normal/menu_entry.c (run): Fix off by one bug so the last line
10239 is executed. Move the loader check to outside the loop.
10240
ef875714 102412006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10242
10243 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10244
4e739985 102452006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10246
10247 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10248 the number of sectors. Reported by Andrey Shuvikov
10249 <mr_hyro@yahoo.com>.
f19dbdb7 10250
790707f2 102512006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10252
10253 * kern/disk.c (grub_disk_read): When there is a read error, always
10254 try to read only the necessary data.
f19dbdb7 10255
790707f2 10256 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10257 disk/raid.c.
10258 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10259 prototype.
10260 [GRUB_UTIL] (grub_raid_fini): Likewise.
10261 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 10262 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 10263 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10264 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10265 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10266 and grub_raid_fini().
f19dbdb7 10267
03e58196 102682006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10269
10270 * include/grub/types.h (__unused): Rename to UNUSED.
10271 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10272 (grub_elf64_size): Likewise.
f19dbdb7 10273
ae4f23bf 102742006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10275
10276 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10277 grub_error_push and grub_error_pop in the error-handling path.
10278 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10279 length.
10280
2166cc83 102812006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10282
10283 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10284 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10285 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10286 (kernel_elf_SOURCES): Likewise.
10287 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10288 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10289 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10290 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10291 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10292 (elf_mod_SOURCES): New variable.
10293 (elf_mod_CFLAGS): Likewise.
10294 (elf_mod_LDFLAGS): Likewise.
10295 * include/grub/types.h (__unused): New macro.
10296 * include/grub/elfload.h: New file.
10297 * kern/elf.c: Likewise.
10298 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10299 (ELF32_LOADMASK): New macro.
10300 (ELF64_LOADMASK): Likewise.
10301 (vmlinux): Removed.
10302 (grub_linux_load32): New function.
10303 (grub_linux_load64): Likewise.
10304 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10305 Use grub_elf_t instead of grub_file_t.
10306
a09d5aa5 103072006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10308
10309 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10310 `catch_result' to struct set_color_args.
10311
d976fc51 103122006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10313
10314 * normal/menu.c: Include grub/script.h.
10315 * normal/menu_entry.c: Likewise.
10316 * include/grub/normal.h: Do not include grub/script.h.
10317
67507549 103182006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10319
10320 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10321
69203a99 103222006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10323
10324 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10325 disk.
10326 (grub_disk_close): Print debug messages when closing a disk.
10327 (grub_disk_read): Print debug messages when disk read fails.
10328 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10329 filesystem type.
10330 * kern/partition.c: Include misc.h.
10331 (grub_partition_iterate): Print debug messages when detecting
10332 partition type.
10333
e2b8278c 103342006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10335
10336 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10337 is negative.
10338 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10339
97b2f2ff 103402006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10341
10342 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10343 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10344
6555d655 103452006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10346
10347 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10348 instead of sizeof(lv). Patch by Michael Guntsche.
10349
4d42b77f 103502006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10351
10352 * disk/lvm.c: Rename VGS to VG_LIST.
10353 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10354 (grub_lvm_open): Likewise.
10355 Thanks to Michael Guntsche for finding this bug.
10356
5d74d927 103572006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10358
10359 * configure.ac (AC_INIT): Bumped to 1.95.
10360
a1bb27e4 103612006-10-14 Robert Millan <rmh@aybabtu.com>
10362
10363 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10364 with "/dev/.static/dev/md".
10365
e0994b8b 103662006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10367
10368 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10369 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10370 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10371 DRIVE_NAME are always freed.
10372
10373 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10374 DOS_PART, as a DOS partition is counted from one instead of zero
10375 now. Reported by Robert Millan.
10376
ddd5cee9 103772006-10-14 Robert Millan <rmh@aybabtu.com>
10378
10379 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10380 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10381 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10382 string returned by grub_guess_root_device.
10383 * util/i386/pc/grub-setup.c: Likewise.
10384 * util/i386/pc/grub-probefs.c: Likewise.
10385
10386 * util/i386/pc/grub-probefs.c: Rename to ...
10387 * util/i386/pc/grub-probe.c: ... this.
10388 * DISTLIST: Remove grub-probefs, add grub-probe.
10389 * conf/i386-efi.rmk: Likewise.
10390 * conf/i386-pc.rmk: Likewise.
10391 * util/i386/pc/grub-install.in: Likewise.
10392
10393 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10394 choose which information we want to print.
10395
2b002173 103962006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10397
10398 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10399 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10400 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10401 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10402 video/readers/tga.c and video/i386/pc/vbeutil.c.
10403
104042006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10405
10406 Added support for RAID and LVM.
f19dbdb7 10407
2b002173 10408 * disk/lvm.c: New file.
10409 * disk/raid.c: Likewise.
10410 * include/grub/lvm.h: Likewise.
f19dbdb7 10411 * include/grub/raid.h: Likewise.
2b002173 10412 * include/grub/util/lvm.h: Likewise.
10413 * include/grub/util/raid.h: Likewise.
10414 * util/lvm.c: Likewise.
10415 * util/raid.c: Likewise.
10416
10417 * include/grub/disk.h (grub_disk_dev_id): Add
10418 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10419 (grub_disk_get_size): New prototype.
10420 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10421 returns a partition.
10422 (grub_disk_get_size): New function.
f19dbdb7 10423
2b002173 10424 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10425 verbatim if grub_install_dos_part is -2.
10426
10427 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10428 and LVM devices.
10429
10430 * util/i386/pc/grub-setup.c (setup): New argument
10431 MUST_EMBED. Force embedding of GRUB when the argument is
10432 true. Close FILE before returning.
10433 (main): Add support for RAID and LVM.
f19dbdb7 10434
2b002173 10435 * conf/common.rmk: Add RAID and LVM modules.
10436 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10437 util/lvm.c.
10438 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10439
10440 * kern/misc.c (grub_strstr): New function.
10441 * include/grub/misc.h (grub_strstr): New prototype.
10442
050548d0 104432006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10444
10445 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10446
da849d2d 104472006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10448
10449 * kern/misc.c (grub_strtoull): Guess the base only if not
10450 specified.
10451
97b2f2ff 104522006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 10453
10454 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10455 PowerMac support.
10456
97b2f2ff 104572006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 10458
10459 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10460
10461 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10462 Remove `flags' argument. All callers changed.
10463 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10464 (IEEE1275_IHANDLE_INVALID): New variable.
10465 (IEEE1275_CELL_INVALID): New variable.
10466 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10467 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10468 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10469 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10470 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10471 codes from Open Firmware. All callers updated.
10472 (grub_ieee1275_next_property): Directly return Open Firmware return
10473 code.
10474 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10475 Standardize error checking from `grub_ieee1275_get_property'.
10476 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10477 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10478
97b2f2ff 104792006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 10480
10481 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10482 `instance_to_package_args' to `instance_to_path_args'.
10483
10484 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10485 `grub_ieee1275_chosen'.
10486
10487 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10488 `grub_ieee1275_interpret'.
10489
97b2f2ff 104902006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 10491
10492 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10493
97b2f2ff 104942006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 10495
10496 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10497 (__cmpdi): Likewise.
10498
10499 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10500 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10501 `grub_ssize_t'.
10502
02bb8acc 10503 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 10504
10505 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10506 to type `grub_ssize_t'.
10507 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10508
7f9a8531 105092006-09-22 Marco Gerards <marco@gnu.org>
10510
10511 * normal/script.c (grub_script_create_cmdmenu): Skip leading
10512 newlines.
10513
b5ef1102 105142006-09-22 Marco Gerards <marco@gnu.org>
10515
10516 * commands/echo.c: New file.
10517
10518 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10519
10520 * conf/common.rmk (echo_mod_SOURCES): New variable.
10521 (echo_mod_CFLAGS): Likewise.
10522 (echo_mod_LDFLAGS): Likewise.
10523
2cff3677 105242006-09-22 Marco Gerards <marco@gnu.org>
10525
10526 * normal/main.c (get_line): Malloc memory instead of using
10527 preallocated memory. Removed the arguments `cmdline' and
10528 `max_len'. Updated all callers.
10529
6ba4688b 105302006-09-22 Marco Gerards <marco@gnu.org>
10531
10532 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10533 (normal_mod_DEPENDENCIES): Likewise.
10534
10535 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10536 (normal_mod_DEPENDENCIES): Likewise.
10537
10538 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10539
e02ac02c 105402006-09-22 Johan Rydberg <jrydberg@gnu.org>
10541
10542 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10543 programs.
10544 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10545 (normal_mod_DEPENDENCIES): Likewise.
10546 * conf/i386-pc.mk: Regenerate.
10547 * conf/i386-efi.mk: Likewise
10548 * conf/common.mk: Likewise.
10549 * conf/powerpc-ieee1275.mk: Likewise.
10550 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10551
8d252e44 105522006-09-22 Robert Millan <rmh@aybabtu.com>
10553
10554 Sync with i386 version.
10555 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10556 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10557
209bf7ac 105582006-09-21 Robert Millan <rmh@aybabtu.com>
10559
10560 Import from GRUB Legacy (lib/device.c):
10561 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10562 (init_device_map) [__linux__]: Add support for I2O devices.
10563
6b146090 105642006-09-14 Marco Gerards <marco@gnu.org>
10565
10566 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10567 `-melf_i386'.
10568
e38600a8 105692006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 10570
10571 * util/i386/pc/grub-install.in: Skip menu.lst when removing
10572 /boot/grub/*.lst.
78fa1790 10573
2952da5d 10574 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 10575
2952da5d 10576 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10577 before adding it to device.map.
10578
01b82a64 105792006-08-15 Johan Rydberg <jrydberg@gnu.org>
10580
fe6b695a 10581 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 10582 compiles a file; using the -MD option.
10583 * conf/common.mk: Regenerate.
10584 * conf/i386-pc.mk: Likewise.
10585 * conf/i386-efi.mk: Likewise.
10586 * conf/powerpc-ieee1275.mk: Likewise.
10587 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10588
1064790d 105892006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10590
10591 Move the prototypes of grub_setjmp and grub_longjmp to
10592 cpu/setjmp.h, so that each architecture may specify different
10593 attributes.
f19dbdb7 10594
1064790d 10595 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10596 (grub_longjmp): Likewise.
10597 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10598 (grub_longjmp): Likewise.
10599 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10600 (grub_longjmp): Likewise.
10601
10602 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10603 [!GRUB_UTIL] (grub_longjmp): Removed.
10604
29dda3ed 106052006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
10606
10607 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10608 "color!" method does not return any value.
10609
ad2a06ed 106102006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10611
10612 * include/grub/bitmap.h: New file.
10613
10614 * include/grub/i386/pc/vbeutil.h: Likewise.
10615
10616 * video/bitmap.c: Likewise.
10617
10618 * video/readers/tga.c: Likewise.
10619
10620 * video/i386/pc/vbeutil.c: Likewise.
10621
10622 * commands/videotest.c: Code cleanup and updated to reflect to new
10623 video API.
10624
10625 * term/gfxterm.c: Likewise.
10626
10627 * video/video.c: Likewise.
10628
10629 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10630 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10631 (bitmap_mod_SOURCES): New entry.
10632 (bitmap_mod_CFLAGS): Likewise.
10633 (bitmap_mod_LDFLAGS): Likewise.
10634 (tga_mod_SOURCES): Likewise.
10635 (tga_mod_CFLAGS): Likewise.
10636 (tga_mod_LDFLAGS): Likewise.
10637
10638 * include/grub/video.h (grub_video_blit_operators): New enum type.
10639 (grub_video_render_target): Changed as forward declaration and moved
10640 actual definition to be video driver specific.
10641 (grub_video_adapter.blit_bitmap): Added blitting operator.
10642 (grub_video_adapter.blit_render_target): Likewise.
10643 (grub_video_blit_bitmap): Likewise.
10644 (grub_video_blit_render_target): Likewise.
10645
10646 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10647 driver specific render target definition.
10648 (grub_video_vbe_map_rgba): Added driver internal helper.
10649 (grub_video_vbe_unmap_color): Updated to use
10650 grub_video_i386_vbeblit_info.
10651 (grub_video_vbe_get_video_ptr): Likewise.
10652
10653 * include/grub/i386/pc/vbeblit.h
10654 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10655 grub_video_i386_vbeblit_info.
10656 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10657 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10658 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10659 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10660 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10661 (grub_video_i386_vbeblit_index_index): Likewise.
10662 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10663 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10664 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10665 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10666 operator.
10667 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10668 operator.
10669
10670 * video/i386/pc/vbeblit.c: Updated to reflect changes on
10671 include/grub/i386/pc/vbeblit.h.
10672
10673 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10674 Updated to use grub_video_i386_vbeblit_info.
10675 (grub_video_i386_vbefill_R8G8B8): Likewise.
10676 (grub_video_i386_vbefill_index): Likewise.
10677 (grub_video_i386_vbefill): Added generic filler.
10678
10679 * video/i386/pc/vbefill.c: Updated to reflect changes on
10680 include/grub/i386/pc/vbefill.h.
10681
10682 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10683 grub_video_i386_vbeblit_info.
10684 (grub_video_vbe_unmap_color): Likewise.
10685 (grub_video_vbe_blit_glyph): Likewise.
10686 (grub_video_vbe_scroll): Likewise.
10687 (grub_video_vbe_draw_pixel): Removed function.
10688 (grub_video_vbe_get_pixel): Likewise.
10689 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10690 updated code to use it.
10691 (common_blitter): Added common blitter for render target and bitmap.
10692 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10693 (grub_video_vbe_blit_render_target): Likewise.
10694
bc8c036d 106952006-07-30 Johan Rydberg <jrydberg@gnu.org>
10696
10697 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10698 is in text mode if there is no console control protocol instance
10699 available.
10700
684a8eff 107012006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10702
10703 * include/grub/video.h: Code cleanup.
10704
10705 * include/grub/i386/pc/vbe.h: Likewise.
10706
10707 * video/i386/pc/vbe.c: Likewise.
10708
10709 * video/i386/pc/vbeblit.c: Likewise.
10710
10711 * video/i386/pc/vbefill.c: Likewise.
10712
10713 * video/video.c: Likewise. Also added more comments.
10714
5915059b 107152006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10716
10717 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10718 (struct grub_biosdisk_dap): Likewise.
10719
10720 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
10721 linkage settings for all functions.
10722
90ce5d56 107232006-07-12 Marco Gerards <marco@gnu.org>
10724
10725 * configure.ac (--enable-mm-debug): Fix typo.
10726
10727 * genkernsyms.sh.in: Use proper quoting for `CC'.
10728
43e7f879 107292006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
10730
10731 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10732 (normal_mod_ASFLAGS): Remove "-m32".
10733
4889bdec 107342006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
10735
10736 * util/misc.c: Include config.h.
10737 [!HAVE_MEMALIGN]: Do not include malloc.h.
10738 (grub_memalign): Use posix_memalign, if present. Then, use
10739 memalign, if present. Otherwise, emit an error.
10740
10741 * util/grub-emu.c: Do not include malloc.h.
10742
10743 * include/grub/util/misc.h: Include unistd.h. This is required for
10744 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10745 D. Eades III <hde@foobar-qux.org>.
10746
10747 * configure.ac (AC_GNU_SOURCE): Added.
10748 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10749 type.
10750
fd39d4da 107512006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
10752
10753 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10754 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10755
b786f3b5 107562006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
10757
10758 * include/grub/types.h (grub_host_addr_t): Rename to
10759 grub_target_addr_t.
10760 (grub_host_off_t): Rename to grub_target_off_t.
10761 (grub_host_size_t): Rename to grub_target_size_t.
10762 (grub_host_ssize_t): Rename to grub_target_ssize_t.
10763 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10764
10765 * include/grub/kernel.h (struct grub_module_header): Change type
10766 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10767 (grub_module_info): Likewise.
f19dbdb7 10768
051988bb 107692006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10770
10771 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10772 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10773 Velazquez <jesus.velazquez@gmail.com>.
10774
deae281b 107752006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10776
10777 Count partitions from 1 instead of 0 in the string representation
10778 of partitions. Still use 0-based internally.
f19dbdb7 10779
deae281b 10780 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10781 (sun_partition_map_iterate): Use grub_partition_t instead of
10782 struct grub_partition *. Cast DESC->START_CYLINDER to
10783 grub_uint64_t after converting the endian.
10784 (sun_partition_map_probe): Subtract 1 for PARTNUM.
10785 (sun_partition_map_get_name): Add 1 to P->INDEX.
10786
10787 * partmap/pc.c (grub_partition_parse): Subtract 1 for
10788 PCDATA->DOS_PART.
10789 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10790
10791 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10792 zero instead of one.
10793 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10794 (gpt_partition_map_get_name): Add 1 into P->INDEX.
10795
10796 * partmap/apple.c (apple_partition_map_iterate): Change the type
10797 of POS to unsigned.
10798 (apple_partition_map_probe): Subtract 1 for PARTNUM.
10799 (apple_partition_map_get_name): Add 1 into P->INDEX.
10800
10801 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10802 of POS to unsigned.
10803 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10804 calculate the offset of a partition.
10805 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10806 (amiga_partition_map_get_name): Add 1 into P->INDEX.
10807
10808 * partmap/acorn.c (acorn_partition_map_find): Change the type of
10809 SECTOR to grub_disk_addr_t.
10810 (acorn_partition_map_iterate): Likewise.
10811 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10812 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10813 top.
10814 (acorn_partition_map_get_name): Add 1 into P->INDEX.
10815
10816 * kern/i386/pc/init.c (make_install_device): Add 1 into
10817 GRUB_INSTALL_DOS_PART.
10818
10819 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10820 conditional.
10821
524a1e6a 108222006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10823
10824 Clean up the code to support 64-bit addressing in disks and
10825 files. This change is not enough for filesystems yet.
f19dbdb7 10826
524a1e6a 10827 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10828 type of "start" to grub_uint64_t.
10829 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10830 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10831 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10832 convert addresses.
10833
10834 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10835 to grub_disk_addr_t.
10836
10837 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10838 string.
10839
10840 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10841
10842 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10843 to char *.
10844
10845 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10846
10847 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10848
10849 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10850
10851 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10852 to grub_off_t, to detect an error from grub_file_seek.
10853 (grub_multiboot_load_elf32): Likewise.
10854
10855 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10856 maximum unsigned long value when an overflow is detected.
10857 (grub_strtoull): New function.
10858 (grub_divmod64): Likewise.
10859 (grub_lltoa): use grub_divmod64.
10860
10861 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10862 grub_disk_addr_t.
10863 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10864 the pointer to next character. Use grub_strtoull instead of
10865 grub_strtoul.
10866 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10867 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10868 respectively.
10869
fe6b695a 10870 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 10871 return value is signed.
10872 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10873 test if OFFSET is less than zero, as OFFSET is unsigned now.
10874
10875 * kern/disk.c (struct grub_disk_cache): Change the type of
10876 "sector" to grub_disk_addr_t.
10877 (grub_disk_cache_get_index): Change the type of SECTOR to
10878 grub_disk_addr_t. Calculate the hash with SECTOR casted to
10879 unsigned after shifting.
10880 (grub_disk_cache_invalidate): Change the type of SECTOR to
10881 grub_disk_addr_t.
10882 (grub_disk_cache_unlock): Likewise.
10883 (grub_disk_cache_store): Likewise.
10884 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10885 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10886 grub_disk_addr_t and grub_uint64_t, respectively.
10887 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10888 body, as the value of OFFSET is tweaked by
10889 grub_disk_check_range. Change the types of START_SECTOR, LEN and
10890 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10891 respectively.
10892 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10893 body, as the value of OFFSET is tweaked by
10894 grub_disk_check_range. Change the types of LEN and N to
10895 grub_size_t.
10896
10897 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10898 and "saved_offset" to grub_off_t.
10899 (test_header): Cast BUF to char *.
10900 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10901 to char *.
10902 (grub_gzio_read): Change the types of OFFSET and SIZE to
10903 grub_off_t and grub_size_t, respectively.
10904
10905 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10906 Removed.
10907 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10908 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10909 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10910 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10911 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10912
10913 * include/grub/types.h (grub_off_t): Unconditionally set to
10914 grub_uint64_t.
10915 (grub_disk_addr_t): Changed to grub_uint64_t.
10916
10917 * include/grub/partition.h (struct grub_partition): Change the
10918 types of "start", "len" and "offset" to grub_disk_addr_t,
10919 grub_uint64_t and grub_disk_addr_t, respectively.
10920 (grub_partition_get_start): Return grub_disk_addr_t.
10921 (grub_partition_get_len): Return grub_uint64_t.
10922
10923 * include/grub/misc.h (grub_strtoull): New prototype.
10924 (grub_divmod64): Likewise.
10925
10926 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10927 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10928 grub_off_t, respectively.
10929 All callers and references changed.
10930
10931 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10932 grub_size_t in "read".
10933 All callers and references changed.
10934
10935 * include/grub/file.h (struct grub_file): Change the types of
10936 "offset" and "size" to grub_off_t and grub_off_t,
10937 respectively. Change the type of SECTOR to grub_disk_addr_t in
10938 "read_hook".
10939 (grub_file_read): Change the type of LEN to grub_size_t.
10940 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10941 grub_off_t.
10942 (grub_file_size): Return grub_off_t.
10943 (grub_file_tell): Likewise.
10944 All callers and references changed.
10945
10946 * include/grub/disk.h (struct grub_disk_dev): Change the types of
10947 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10948 "write".
10949 (struct grub_disk): Change the type of "total_sectors" to
10950 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 10951 "read_hook".
524a1e6a 10952 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10953 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10954 (grub_disk_write): Likewise.
10955 All callers and references changed.
10956
10957 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10958 char * for grub_strncmp to silence gcc.
10959 (grub_iso9660_mount): Likewise.
10960 (grub_iso9660_mount): Likewise.
10961 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10962 return statement.
10963 (grub_iso9660_iterate_dir): Likewise.
10964 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10965
10966 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10967 LEN to grub_disk_addr_t and grub_size_t, respectively.
10968
10969 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10970
10971 * fs/jfs.c (grub_jfs_read_file): Likewise.
10972
10973 * fs/minix.c (grub_jfs_read_file): Likewise.
10974
10975 * fs/sfs.c (grub_jfs_read_file): Likewise.
10976
10977 * fs/ufs.c (grub_jfs_read_file): Likewise.
10978
10979 * fs/xfs.c (grub_jfs_read_file): Likewise.
10980
10981 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10982 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10983 respectively.
10984
10985 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10986 BLKNR to -1 instead of returning GRUB_ERRNO.
10987 (grub_ext2_read_file): Change the types of SECTOR and
10988 LEN to grub_disk_addr_t and grub_size_t, respectively.
10989
10990 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10991 LEN to grub_disk_addr_t and grub_size_t, respectively.
10992
10993 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10994 grub_file_read.
10995
10996 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10997 string. Do not cast SECTOR explicitly.
10998
10999 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11000 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11001 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11002 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11003 over 2TB and LBA mode is not supported, raise an error.
11004 (get_safe_sectors): New function.
11005 (grub_biosdisk_read): Use get_safe_sectors.
11006 (grub_biosdisk_write): Likewise.
11007
11008 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11009 (grub_efidisk_write): Likewise.
11010
11011 * disk/loopback.c (delete_loopback): Cosmetic changes.
11012 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11013 correctly.
11014 (grub_loopback_open): Likewise.
11015 (grub_loopback_read): Likewise. Also, change the type of POS to
11016 grub_off_t, and fix the usage of grub_memset.
11017
11018 * commands/i386/pc/play.c: Include grub/machine/time.h.
11019
11020 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11021 print FILE->SIZE.
11022
11023 * commands/configfile.c: Include grub/env.h.
11024
11025 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11026 GRUB_ERRNO directly instead. Change the type of POS to
11027 grub_off_t. Follow the coding standard.
11028
11029 * commands/blocklist.c: Include grub/partition.h.
11030 (grub_cmd_blocklist): Return an error if the underlying device is
11031 not a disk. Take the starting sector of a partition into account,
11032 if a partition is used.
11033
11034 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11035 a length field.
11036 (lba_mode): Support 64-bit addresses.
11037 (chs_mode): Likewise.
11038 (copy_buffer): Adapted to the new offsets of a length field and a
11039 segment field.
11040 (blocklist_default_start): Allocate 64-bit space.
11041
11042 * boot/i386/pc/boot.S (force_lba): Removed.
11043 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 11044 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 11045 space.
11046 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11047 is useless.
11048 (lba_mode): Refactored to support a 64-bit address. More size
11049 optimization.
11050 (setup_sectors): Likewise.
11051
53af98ad 110522006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11053
11054 * DISTLIST: Added include/grub/i386/linux.h. Removed
11055 include/grub/i386/pc/linux.h
11056
11057 * configure.ac (AC_INIT): Bumped to 1.94.
11058
11059 * config.guess: Updated from gnulib.
11060 * config.sub: Likewise.
11061 * install-sh: Likewise.
11062 * mkinstalldirs: Likewise.
11063
b4c1940a 110642006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11065
11066 * conf/common.rmk (grub_modules_init.lst): Depended on
11067 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11068 MODSRCFILES.
11069
11070 * genmk.rb (PModule::rule): Reverted the previous change.
11071
cfca1cfd 110722006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11073
11074 * conf/common.rmk (grub_modules_init.lst): Depends on
11075 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11076 that the target does not exist before producing.
11077 (grub_modules_init.h): Remove the target before generating.
11078 (grub_emu_init.c): Likewise.
11079
11080 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11081
aa6d7826 110822006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11083
11084 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11085 for the target-specific tests. Make sure that we also have the
11086 up-to-date target variables for those tests.
11087
26c607b9 110882006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11089
11090 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11091 (PModule::rule): Likewise.
11092
0162321a 110932006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11094
11095 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11096 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11097 target-specific flags should be prefixed.
11098 (PModule::rule): Likewise.
11099
6c826348 111002006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11101
11102 * configure.ac (CMP): Check if cmp is available explicitly.
11103
b977bf01 111042006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11105
11106 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11107 (target_cpu): New variable.
11108 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 11109
b977bf01 11110 * util/i386/pc/grub-install.in (host_cpu): Removed.
11111 (target_cpu): New variable.
11112 (pkglibdir): Use target_cpu instead of host_cpu.
11113
11114 * util/genmoddep.c: Removed.
f19dbdb7 11115
b977bf01 11116 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11117 instead of GRUB_HOST_SIZEOF_VOID_P.
11118 * kern/dl.c: Likewise.
11119
11120 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11121 ...
11122 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11123 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11124 (GRUB_TARGET_SIZEOF_LONG): ... this.
11125 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11126 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11127 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11128 to ...
11129 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11130 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11131 (GRUB_TARGET_SIZEOF_LONG): ... this.
11132 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11133 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11134 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11135 to ...
11136 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11137 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11138 (GRUB_TARGET_SIZEOF_LONG): ... this.
11139 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11140 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11141
11142 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11143 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11144 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11145 instead of GRUB_HOST_SIZEOF_LONG.
11146 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11147 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11148 GRUB_CPU_WORDS_BIGENDIAN.
11149 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11150 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11151 grub_host_ssize_t.
11152
11153 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11154 (genmoddep_SOURCES): Likewise.
11155 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11156 (genmoddep_SOURCES): Likewise.
11157 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11158 (genmoddep_SOURCES): Likewise.
11159 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11160 Likewise.
11161 (genmoddep_SOURCES): Likewise.
11162
11163 * genmoddep.awk: New file.
11164
11165 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11166 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11167 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11168 (PModule::rule): Likewise.
11169 (Program::rule): Likewise.
11170 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11171 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11172 respectively.
11173
11174 * configure.ac: Rewritten intensively to use host and target
11175 instead of build and host, respectively.
11176
11177 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11178 (host_cpu): Removed.
11179 (target_cpu): New variable.
11180 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11181 (BUILD_CC): Removed.
11182 (BUILD_CFLAGS): Likewise.
11183 (BUILD_CPPFLAGS): Likewise.
11184 (TARGET_CC): New variable.
11185 (TARGET_CFLAGS): Likewise.
11186 (TARGET_CPPFLAGS): Likewise.
11187 (TARGET_LDFLAGS): Likewise.
11188 (AWK): Likewise.
11189 (include): Use target_cpu instead of host_cpu.
11190 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 11191
b977bf01 11192 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11193
f09771a1 111942006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11195
11196 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11197 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11198 field 'false' to 'exec_on_false'.
11199 (grub_script_create_cmdif): Renamed argument names to reflect above
11200 changes.
11201
11202 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11203
11204 * normal/script.c (grub_script_create_cmdif): Likewise.
11205
118f4fb3 112062006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11207
11208 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11209 top.
11210 (grub_hfsplus_btree_recptr): Likewise.
11211 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11212 FILEBLOCK both to pass a block number and store next block
11213 number.
11214 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11215 overflow file correctly. Specify errors appropriately, because
11216 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11217 grub_hfsplus_btree_recptr to get the pointer to a found key.
11218 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11219 is found.
11220
11221 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11222 linux.mod.
11223 (_linux_mod_SOURCES): New variable.
11224 (_linux_mod_CFLAGS): Likewise.
11225 (_linux_mod_LDFLAGS): Likewise.
11226 (linux_mod_SOURCES): Likewise.
11227 (linux_mod_CFLAGS): Likewise.
11228 (linux_mod_LDFLAGS): Likewise.
11229
11230 * DISTLIST: Added loader/i386/efi/linux.c,
11231 loader/i386/efi/linux_normal.c and
11232 include/grub/i386/efi/loader.h.
11233
11234 * loader/i386/efi/linux.c: New file.
11235 * loader/i386/efi/linux_normal.c: Likewise.
11236 * include/grub/i386/efi/loader.h: Likewise.
11237
89a7d726 112382006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11239
11240 * commands/blocklist.c: New file.
11241
11242 * DISTLIST: Added commands/blocklist.c.
11243
11244 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 11245 color for the background, and a darker color for the foreground.
89a7d726 11246 (grub_console_checkkey): Return READ_KEY.
11247 (grub_console_cls): Set the background to
11248 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11249
11250 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11251
11252 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11253 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11254
11255 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11256 prototype.
11257
11258 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11259 BG. The spec is wrong again.
11260
11261 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11262 prototype.
11263 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11264
11265 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11266 commands/blocklist.c.
11267 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 11268
89a7d726 11269 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11270 (blocklist_mod_SOURCES): New variable.
11271 (blocklist_mod_CFLAGS): Likewise.
11272 (blocklist_mod_LDFLAGS): Likewise.
11273
75c8f258 112742006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11275
11276 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11277 duplication.
11278 (lba_mode): Use %eax more intensively to reduce the code size.
11279
da2eb181 112802006-05-20 Marco Gerards <marco@gnu.org>
11281
11282 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11283
11284 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11285 for `menuentry'.
11286 (script): Accept leading newlines.
11287 (newlines): New rule to describe 0 or more newlines.
11288 (commands): Accept `command' with trailing newline. Fixed the
11289 order in which arguments were passed to `grub_script_add_cmd'.
11290 Accept commands separated by newlines.
11291 (function): Changed to accept newlines.
11292 (menuentry) Rewritten.
11293
11294 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11295 front of the list, instead of to the end.
11296
577b4050 112972006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11298
11299 * util/i386/pc/grub-install.in (bindir): New variable.
11300 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11301 Shaver <lbgwjl@gmail.com>.
11302
0d6e1189 113032006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11304
11305 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11306 grub/machine/linux.h
11307 * loader/i386/pc/linux.c: Likewise.
11308
11309 * include/grub/i386/pc/linux.h: Moved to ...
11310 * include/grub/i386/linux.h: ... here.
11311
11312 * include/grub/i386/linux.h (struct linux_kernel_params): New
11313 struct.
f19dbdb7 11314
31b86e9f 113152006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11316
11317 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11318 checking.
11319 (grub_video_vbe_blit_glyph): Likewise.
11320 (grub_video_vbe_blit_bitmap): Likewise.
11321 (grub_video_vbe_blit_render_target): Likewise.
11322
83b984de 113232006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11324
11325 * configure.ac (--with-platform): Properly quote the square
11326 brackets.
11327
5f0413bd 113282006-05-08 Marco Gerards <marco@gnu.org>
11329
11330 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11331 this...
11332 (kernel_elf_HEADERS): ...to this. Updated all users.
11333 (grubof_symlist.c): Renamed from this...
11334 (kernel_elf_symlist.c): ...to this. Updated all users.
11335 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11336 (grubof_SOURCES): Renamed from this...
11337 (kernel_elf_SOURCES): ...to this.
11338 (grubof_HEADERS): Renamed from this...
11339 (kernel_elf_HEADERS): ...to this.
11340 (grubof_CFLAGS): Renamed from this...
11341 (kernel_elf_CFLAGS): ...to this.
11342 (grubof_ASFLAGS): Renamed from this...
11343 (kernel_elf_ASFLAGS): ...to this.
11344 (grubof_LDFLAGS): Renamed from this...
11345 (kernel_elf_LDFLAGS): ...to this.
11346
11347 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11348 this...
11349 (kernel_elf_HEADERS): ...to this. Updated all users.
11350 (grubof_symlist.c): Renamed from this...
11351 (kernel_elf_symlist.c): ...to this. Updated all users.
11352 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11353 (grubof_SOURCES): Renamed from this...
11354 (kernel_elf_SOURCES): ...to this.
11355 (grubof_HEADERS): Renamed from this...
11356 (kernel_elf_HEADERS): ...to this.
11357 (grubof_CFLAGS): Renamed from this...
11358 (kernel_elf_CFLAGS): ...to this.
11359 (grubof_ASFLAGS): Renamed from this...
11360 (kernel_elf_ASFLAGS): ...to this.
11361 (grubof_LDFLAGS): Renamed from this...
11362 (kernel_elf_LDFLAGS): ...to this.
11363
11364 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11365 `kernel.elf' instead of `grubof'.
11366
05568c2e 113672006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11368
11369 Add --with-platform to configure. Use pkglibdir instead of
11370 pkgdatadir. This is reported by Roger Leigh.
11371
11372 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11373 (host_vendor): Likewise.
11374 (host_os): Likewise.
11375 (pkgdatadir): Likewise.
11376 (platform): New variable.
11377 (pkglibdir): Likewise.
11378 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 11379
05568c2e 11380 * util/i386/pc/grub-install.in (datadir): Removed.
11381 (host_vendor): Likewise.
11382 (host_os): Likewise.
11383 (pkgdatadir): Likewise.
11384 (platform): New variable.
11385 (pkglibdir): Likewise.
11386 Use PKGLIBDIR instead of PKGDATADIR.
11387
11388 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11389 instead of GRUB_DATADIR.
11390 (main): Likewise.
11391 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11392 (main): Likewise.
11393 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11394 (main): Likewise.
11395
11396 * configure.ac (--with-platform): New option.
11397 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11398
11399 * Makefile.in: Include a makefile based on PLATFORM instead of
11400 HOST_VENDOR.
11401 (pkgdatadir): Not appended by the machine type.
11402 (pkglibdir): Appended by the machine type.
11403 (host_vendor): Removed.
11404 (platform): New variable.
11405 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11406 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11407 (uninstall): Likewise.
11408
4e93851c 114092006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11410
11411 Use the environment context in the menu. Remove the commands
11412 "default" and "timeout", and use variables instead.
f19dbdb7 11413
4e93851c 11414 * normal/menu.c: Include grub/env.h.
11415 (print_entry): Cast TITLE to silence gcc.
11416 (get_timeout): New function.
11417 (set_timeout): Likewise.
11418 (get_entry_number): Likewise.
11419 (run_menu): Use a default entry, a fallback entry and a timeout
11420 in the environment variables "default", "fallback" and
11421 "timeout". Also, tweak the default entry if it is not within the
11422 current menu entries.
11423 (grub_menu_run): Use a fallback entry in the environment variable
11424 "fallback".
11425
11426 * normal/main.c (read_config_file): Do not initialize
11427 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11428 NEWMENU->TIMEOUT.
11429 (grub_normal_execute): Use a data slot to store the menu.
11430
11431 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11432 fallback_entry and timeout.
11433 (struct grub_menu_list): Removed.
11434 (grub_menu_list_t): Likewise.
11435 (struct grub_context): Likewise.
11436 (grub_context_t): Likewise.
11437 (grub_context_get): Likewise.
11438 (grub_context_get_current_menu): Likewise.
11439 (grub_context_push_menu): Likewise.
11440 (grub_context_pop_menu): Likewise.
11441 (grub_default_init): Likewise.
11442 (grub_default_fini): Likewise.
11443 (grub_timeout_init): Likewise.
11444 (grub_timeout_fini): Likewise.
11445
11446 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11447 and timeout.mod.
11448 (normal_mod_SOURCES): Removed normal/context.c.
11449
11450 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11451 commands/default.c, commands/timeout.c and normal/context.c.
11452 (normal_mod_SOURCES): Removed normal/context.c.
11453
11454 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11455 commands/timeout.c and normal/context.c.
11456 (normal_mod_SOURCES): Removed normal/context.c.
11457
11458 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11459 commands/default.c, commands/timeout.c and normal/context.c.
11460 (normal_mod_SOURCES): Removed normal/context.c.
11461
11462 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11463 timeout.mod.
11464 (default_mod_SOURCES): Removed.
11465 (default_mod_CFLAGS): Likewise.
11466 (default_mod_LDFLAGS): Likewise.
11467 (timeout_mod_SOURCES): Removed.
11468 (timeout_mod_CFLAGS): Likewise.
11469 (timeout_mod_LDFLAGS): Likewise.
11470
11471 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11472 normal/context.c.
11473
11474 * commands/default.c: Removed.
11475 * commands/timeout.c: Likewise.
11476 * normal/context.c: Likewise.
11477
1eb9cc1d 114782006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11479
11480 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11481
385bd9c1 114822006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11483
11484 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11485 "next" to "prev" for readability.
11486 (struct grub_env_sorted_var): New struct.
11487 (grub_env_context): Renamed to ...
11488 (initial_context): ... this.
11489 (grub_env_var_context): Renamed to ...
11490 (current_context): ... this.
11491 (grub_env_find): Look only at CURRENT_CONTEXT.
11492 (grub_env_context_open): Rewritten to copy exported variables from
11493 previous context.
11494 (grub_env_context_close): Rewritten according to the new
11495 scheme. Also, add an assertion to prevent the initial context from
11496 removed.
11497 (grub_env_insert): Removed the code for the sorted list.
11498 (grub_env_remove): Likewise.
11499 (grub_env_export): Simply mark the variable with
11500 GRUB_ENV_VAR_GLOBAL.
11501 (grub_env_set): A cosmetic change for naming consistency.
11502 (grub_env_get): Likewise.
11503 (grub_env_unset): Likewise.
11504 (grub_env_iterate): Rewritten to sort variables within this
11505 function.
11506 (grub_register_variable_hook): Fixed for naming consistency. Call
11507 grub_env_find again, only if NAME is not found at the first time.
11508 (mangle_data_slot_name): New function.
11509 (grub_env_set_data_slot): Likewise.
11510 (grub_env_get_data_slot): Likewise.
11511 (grub_env_unset_data_slot): Likewise.
11512
11513 * include/grub/env.h (grub_env_var_type): New enum.
11514 (GRUB_ENV_VAR_LOCAL): New constant.
11515 (GRUB_ENV_VAR_GLOBAL): Likewise.
11516 (GRUB_ENV_VAR_DATA): Likewise.
11517 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11518 "type".
11519 (grub_env_set): Replace VAR with NAME for consistency.
11520 (grub_register_variable_hook): Likewise.
11521 (grub_env_export): Specify the name of the argument.
11522 (grub_env_set_data_slot): New prototype.
11523 (grub_env_get_data_slot): Likewise.
11524 (grub_env_unset_data_slot): Likewise.
11525
7f362539 115262006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11527
11528 Extend the loader so that GRUB can accept a loader which comes
11529 back to GRUB when a loaded image exits. Also, this change adds
11530 support for a chainloader on EFI.
f19dbdb7 11531
7f362539 11532 * term/efi/console.c: Include grub/misc.h.
11533 (grub_console_checkkey): Display a scan code on the top for
11534 debugging. This will be removed once the EFI port gets stable.
11535 Correct the scan code mapping.
11536
11537 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11538 allocate memory from larger regions, in order to reduce the number
11539 of allocated regions. Otherwise, the MacOSX loader panics.
11540 (filter_memory_map): Avoid less than 1MB for compatibility with
11541 other loaders.
11542 (add_memory_regions): Allocate from the tail of a region, if
11543 possible, to avoid allocating a region near to 1MB, for the MacOSX
11544 loader.
11545
11546 * kern/efi/init.c (grub_efi_set_prefix): Specify
11547 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11548
11549 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11550 argument IMAGE_HANDLE and specify it to get a loaded image.
11551 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11552 grub_efi_get_loaded_image.
fe6b695a 11553 (grub_efi_get_filename): Divide the length by the size of
7f362539 11554 grub_efi_char16_t.
11555 (grub_efi_get_device_path): New function.
11556 (grub_efi_print_device_path): Print End Device Path nodes. Divide
11557 the length by the size of grub_efi_char16_t for a file path device
11558 path node.
11559
11560 * kern/loader.c (grub_loader_noreturn): New variable.
11561 (grub_loader_set): Accept a new argument NORETURN. Set
11562 GRUB_LOADER_NORETURN to NORETURN.
11563 All callers changed.
11564 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11565 grub_machine_fini.
11566
11567 * include/grub/efi/efi.h (grub_efi_get_device_path): New
11568 prototype.
11569 (grub_efi_get_loaded_image): Take an argument to specify an image
11570 handle.
11571
11572 * include/grub/loader.h (grub_loader_set): Added one more argument
11573 NORETURN.
11574
11575 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11576 instead of grub_efi_open_protocol.
11577 (grub_efidisk_get_device_name): Likewise.
11578 (grub_efidisk_close): Print a newline.
11579 (grub_efidisk_get_device_handle): Fixed to use
11580 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11581 GRUB_EFI_DEVICE_PATH_TYPE.
11582
11583 * disk/efi/efidisk.c (device_path_guid): Moved to ...
11584 * kern/efi/efi.c (device_path_guid): ... here.
11585
11586 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11587 chain.mod.
11588 (kernel_mod_HEADERS): Added efi/disk.h.
11589 (_chain_mod_SOURCES): New variable.
11590 (_chain_mod_CFLAGS): Likewise.
11591 (_chain_mod_LDFLAGS): Likewise.
11592 (chain_mod_SOURCES): Likewise.
11593 (chain_mod_CFLAGS): Likewise.
11594 (chain_mod_LDFLAGS): Likewise.
11595
11596 * DISTLIST: Added include/grub/efi/chainloader.h,
11597 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11598
11599 * include/grub/efi/chainloader.h: New file.
11600 * loader/efi/chainloader.c: Likewise.
11601 * loader/efi/chainloader_normal.c: Likewise.
11602
c0111d6e 116032006-04-30 Marco Gerards <marco@gnu.org>
11604
11605 * commands/configfile.c (grub_cmd_source): New function.
11606 (GRUB_MOD_INIT): Register the commands `source' and `.'.
11607 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11608
df5341da 116092006-04-30 Marco Gerards <marco@gnu.org>
11610
11611 * normal/execute.c (grub_script_execute_cmd): Change the return
11612 type to `grub_err_t'. Correctly return the error.
11613 (grub_script_execute_cmdline): In case a command line is not a
11614 command or a function, try to interpret it as an assignment.
11615
f85934bd 116162006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11617
11618 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11619 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11620 skip a node whose name is obviously invalid as UTF-16,
11621 i.e. contains a NUL character. Stop the iteration when the last
11622 directory entry is found. Instead of using the return value of
11623 grub_hfsplus_btree_iterate_node, store the value in RET and use
11624 it, because the iterator can be stopped by the last directory
11625 entry.
11626
8f8a2cf8 116272006-04-30 Marco Gerards <marco@gnu.org>
11628
11629 * include/grub/env.h (grub_env_export): New prototype. Reported
11630 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11631
a27e84ce 116322006-04-30 Marco Gerards <marco@gnu.org>
11633
11634 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11635 size of the extents in a catalog file record.
11636
eaef0553 116372006-04-29 Marco Gerards <marco@gnu.org>
11638
11639 * commands/configfile.c (grub_cmd_configfile): Execute the
11640 configfile within its own context.
11641
11642 * include/grub/env.h (grub_env_context_open): New prototype.
11643 (grub_env_context_close): Likewise.
11644
11645 * kern/env.c (grub_env): Removed.
11646 (grub_env_sorted): Likewise.
11647 (grub_env_context): New variable.
11648 (grub_env_var_context): Likewise.
11649 (grub_env_find): Search both the active context and the global
11650 context.
11651 (grub_env_context_open): New function.
11652 (grub_env_context_close): Likewise.
11653 (grub_env_insert): Likewise.
11654 (grub_env_remove): Likewise.
11655 (grub_env_export): Likewise.
11656 (grub_env_set): Changed to use helper functions to avoid code
11657 duplication.
11658 (grub_env_iterate): Rewritten so both the current context and the
11659 global context are being used.
11660
11661 * normal/command.c (export_command): New function.
11662 (grub_command_init): Register the `export' function.
11663
7b455f4d 116642006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
11665
11666 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11667 explicitly to suppress gcc's warnings.
11668 * fs/fat.c (grub_fat_find_dir): Likewise.
11669 (grub_fat_label): Likewise.
11670 * fs/xfs.c (grub_xfs_read_inode): Likewise.
11671 (grub_xfs_mount): Likewise.
11672 (grub_xfs_label): Likewise.
11673 * fs/affs.c (grub_affs_mount): Likewise.
11674 (grub_affs_label): Likewise.
11675 (grub_affs_iterate_dir): Likewise.
11676 * fs/sfs.c (grub_sfs_mount): Likewise.
11677 (grub_sfs_iterate_dir): Likewise.
11678 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11679 * fs/hfs.c (grub_hfs_mount): Likewise.
11680 (grub_hfs_cmp_catkeys): Likewise.
11681 (grub_hfs_find_dir): Likewise.
11682 (grub_hfs_dir): Likewise.
11683 (grub_hfs_label): Likewise.
11684 * fs/jfs.c (grub_jfs_mount): Likewise.
11685 (grub_jfs_opendir): Likewise.
11686 (grub_jfs_getent): Likewise.
11687 (grub_jfs_lookup_symlink): Likewise.
11688 (grub_jfs_label): Likewise.
11689 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11690 (grub_hfsplus_iterate_dir): Likewise.
11691 (grub_hfsplus_btree_iterate_node): Made static.
11692
11693 * util/grub-emu.c (prefix): New variable.
11694 (grub_machine_set_prefix): New function.
11695 (main): Do not set the environment variable "prefix" here. Only
11696 set PREFIX, which is used later by grub_machine_set_prefix.
11697
11698 * include/grub/video.h: Do not include grub/symbol.h.
11699 (grub_video_register): Not exported. This symbol is not defined in
11700 the kernel.
11701 (grub_video_unregister): Likewise.
11702 (grub_video_iterate): Likewise.
11703 (grub_video_setup): Likewise.
11704 (grub_video_restore): Likewise.
11705 (grub_video_get_info): Likewise.
11706 (grub_video_get_blit_format): Likewise.
11707 (grub_video_set_palette): Likewise.
11708 (grub_video_get_palette): Likewise.
11709 (grub_video_set_viewport): Likewise.
11710 (grub_video_get_viewport): Likewise.
11711 (grub_video_map_color): Likewise.
11712 (grub_video_map_rgb): Likewise.
11713 (grub_video_map_rgba): Likewise.
11714 (grub_video_fill_rect): Likewise.
11715 (grub_video_blit_glyph): Likewise.
11716 (grub_video_blit_bitmap): Likewise.
11717 (grub_video_blit_render_target): Likewise.
11718 (grub_video_scroll): Likewise.
11719 (grub_video_swap_buffers): Likewise.
11720 (grub_video_create_render_target): Likewise.
11721 (grub_video_delete_render_target): Likewise.
11722 (grub_video_set_active_render_target): Likewise.
11723
11724 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11725 Undefined.
11726 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11727
11728 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11729 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11730 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11731 instead of $(srcdir)/genkernsyms.sh.
11732
11733 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11734 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11735 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11736 instead of $(srcdir)/genkernsyms.sh.
11737
11738 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11739 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11740 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11741 instead of $(srcdir)/genkernsyms.sh.
11742
11743 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11744 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11745 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11746 instead of $(srcdir)/genkernsyms.sh.
11747
11748 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11749 genkernsyms.sh.
11750
11751 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11752 genkernsyms.sh.
11753 (gensymlist.sh): New target.
11754 (genkernsyms.sh): Likewise.
11755
11756 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11757 genkernsyms.sh.in and gensymlist.sh.in.
11758
11759 * genkernsyms.sh: Removed.
11760 * gensymlist.sh: Likewise.
f19dbdb7 11761
7b455f4d 11762 * genkernsyms.sh.in: New file.
11763 * gensymlist.sh.in: Likewise.
11764
1885bb27 117652006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11766
11767 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11768 clobber "prefix", since we may have already set it manually.
11769
71538dff 117702006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11771
11772 * kern/misc.c (abort): New alias for grub_abort.
11773
2965c7cc 117742006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
11775
11776 A new machine-specific function "grub_machine_set_prefix" is
11777 defined. This is called after loading modules, so that a prefix
11778 initialization can use modules. Also, this change adds an
11779 intensive debugging feature for the memory manager via the
11780 configure option "--enable-mm-debug".
f19dbdb7 11781
2965c7cc 11782 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11783 PART.LEN.
11784
11785 * kern/sparc64/ieee1275/init.c (abort): Removed.
11786 (grub_stop): Likewise.
11787 (grub_exit): New function.
11788 (grub_set_prefix): Renamed to ...
11789 (grub_machine_set_prefix): ... this.
11790 (grub_machine_init): Do not call grub_set_prefix.
11791
11792 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11793 (grub_machine_set_prefix): ... this.
11794 (grub_machine_init): Do not call grub_set_prefix.
11795
11796 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11797 (grub_machine_init): Do not set the prefix here.
11798
11799 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11800
11801 * kern/efi/init.c: Include grub/mm.h.
11802 (grub_efi_set_prefix): New function.
11803
11804 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11805 (grub_efi_get_filename): New function.
11806 (grub_print_device_path): Renamed to ...
11807 (grub_efi_print_device_path): ... this.
11808
11809 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11810 [MM_DEBUG] (grub_realloc): Likewise.
11811 [MM_DEBUG] (grub_free): Likewise.
11812 [MM_DEBUG] (grub_memalign): Likewise.
11813 [MM_DEBUG] (grub_mm_debug): New variable.
11814 [MM_DEBUG] (grub_debug_malloc): New function.
11815 [MM_DEBUG] (grub_debug_free): New function.
11816 [MM_DEBUG] (grub_debug_realloc): New function.
11817 [MM_DEBUG] (grub_debug_memalign): New function.
11818
11819 * kern/misc.c (grub_abort): Print a newline to distinguish
11820 the message.
11821
11822 * kern/main.c (grub_main): Call grub_machine_set_prefix and
11823 grub_set_root_dev after loading modules. This is necessary when
11824 setting a prefix depends on modules.
11825
11826 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11827 (grub_efi_print_device_path): ... this.
11828 (grub_efi_get_filename): New prototype.
11829 (grub_efi_set_prefix): Likewise.
11830
11831 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11832 and grub/disk.h.
11833 (grub_efidisk_get_device_handle): New prototype.
11834 (grub_efidisk_get_device_name): Likewise.
11835
11836 * include/grub/mm.h: Include config.h.
11837 (MM_DEBUG): Removed.
11838 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11839 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11840 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11841 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11842 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11843 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11844 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11845 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11846 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11847
11848 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11849
11850 * disk/efi/efidisk.c: Include grub/partition.h.
11851 (iterate_child_devices): New function.
11852 (add_device): First, compare only last device path nodes, so that
11853 devices are sorted by the types.
11854 (grub_efidisk_get_device_handle): New function.
11855 (grub_efidisk_get_device_name): Likewise.
11856
11857 * configure.ac (--enable-mm-debug): New option to enable the
11858 memory manager debugging feature. This makes the binary much
11859 bigger, so is disabled by default.
11860
9cacaa17 118612006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
11862
11863 Use grub_abort instead of grub_stop, and grub_exit must be
11864 define in each architecture now. Also, this change adds support
11865 for EFI disks.
f19dbdb7 11866
9cacaa17 11867 * util/i386/pc/grub-probefs.c: Include grub/term.h.
11868 (grub_getkey): New function.
11869 (grub_term_get_current): Likewise.
11870
11871 * util/i386/pc/grub-setup.c: Include grub/term.h.
11872 (grub_getkey): New function.
11873 (grub_term_get_current): Likewise.
11874
11875 * util/misc.c (grub_stop): Renamed to ...
11876 (grub_exit): ... this.
11877
11878 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11879 (grub_exit): ... this.
11880 (grub_machine_init): Use grub_abort instead of abort.
11881 (grub_stop): Removed.
11882
11883 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11884 abort.
11885
11886 * kern/i386/pc/startup.S (grub_exit): New function.
11887 (cold_reboot): New label.
11888
11889 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11890 (grub_efi_init): Call grub_efidisk_init.
11891 (grub_efi_fini): Call grub_efidisk_fini.
11892
11893 * kern/efi/efi.c: Include grub/mm.h.
11894 (grub_efi_console_control_guid): Renamed to ...
11895 (console_control_guid): ... this.
11896 (grub_efi_loaded_image_guid): Renamed to ...
11897 (loaded_image_guid): ... this.
11898 (grub_efi_locate_handle): New function.
11899 (grub_efi_open_protocol): Likewise.
11900 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11901 GRUB_EFI_CONSOLE_CONTROL_GUID.
11902 (grub_efi_exit): Removed.
11903 (grub_stop): Likewise.
11904 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11905 (grub_exit): New function.
11906 (grub_print_device_path): Likewise.
11907
11908 * kern/rescue.c (grub_rescue_cmd_exit): New function.
11909 (grub_enter_rescue_mode): Register "exit".
11910
11911 * kern/misc.c (grub_real_dprintf): A cosmetic change.
11912 (grub_abort): New function.
11913
11914 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11915
11916 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11917
11918 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11919
11920 * include/grub/efi/efi.h (grub_efi_exit): Removed.
11921 (grub_print_device_path): New prototype.
11922 (grub_efi_locate_handle): Likewise.
11923 (grub_efi_open_protocol): Likewise.
11924
11925 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11926 * disk/efi/efidisk.c: Likewise.
11927
11928 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11929
11930 * include/grub/efi/console_control.h
11931 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11932
11933 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11934 last 8 bytes as an array.
11935 (GRUB_EFI_DISK_IO_GUID): New macro.
11936 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11937 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11938 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11939 grub_uint8_t.
11940 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11941 (struct grub_efi_device_path): Rename the member "sub_type" to
11942 "subtype".
11943 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11944 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11945 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11946 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11947 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11948 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11949 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11950 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11951 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11952 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11953 (struct grub_efi_pci_device_path): New structure.
11954 (grub_efi_pci_device_path_t): New type.
11955 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11956 (struct grub_efi_pccard_device_path): New structure.
11957 (grub_efi_pccard_device_path_t): New type.
11958 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11959 (struct grub_efi_memory_mapped_device_path): New structure.
11960 (grub_efi_memory_mapped_device_path_t): New type.
11961 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11962 (struct grub_efi_vendor_device_path): New structure.
11963 (grub_efi_vendor_device_path_t): New type.
11964 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11965 (struct grub_efi_controller_device_path): New structure.
11966 (grub_efi_controller_device_path_t): New type.
11967 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11968 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11969 (struct grub_efi_acpi_device_path): New structure.
11970 (grub_efi_acpi_device_path_t): New type.
11971 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11972 (struct grub_efi_expanded_acpi_device_path): New structure.
11973 (grub_efi_expanded_acpi_device_path_t): New type.
11974 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11975 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11976 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11977 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11978 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11979 (struct grub_efi_atapi_device_path): New structure.
11980 (grub_efi_atapi_device_path_t): New type.
11981 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11982 (struct grub_efi_fibre_channel_device_path): New structure.
11983 (grub_efi_fibre_channel_device_path_t): New type.
11984 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11985 (struct grub_efi_1394_device_path): New structure.
11986 (grub_efi_1394_device_path_t): New type.
11987 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11988 (struct grub_efi_usb_device_path): New structure.
11989 (grub_efi_usb_device_path_t): New type.
11990 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11991 (struct grub_efi_usb_class_device_path): New structure.
11992 (grub_efi_usb_class_device_path_t): New type.
11993 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11994 (struct grub_efi_i2o_device_path): New structure.
11995 (grub_efi_i2o_device_path_t): New type.
11996 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11997 (struct grub_efi_mac_address_device_path): New structure.
11998 (grub_efi_mac_address_device_path_t): New type.
11999 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12000 (struct grub_efi_ipv4_device_path): New structure.
12001 (grub_efi_ipv4_device_path_t): New type.
12002 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12003 (struct grub_efi_ipv6_device_path): New structure.
12004 (grub_efi_ipv6_device_path_t): New type.
12005 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12006 (struct grub_efi_infiniband_device_path): New structure.
12007 (grub_efi_infiniband_device_path_t): New type.
12008 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12009 (struct grub_efi_uart_device_path): New structure.
12010 (grub_efi_uart_device_path_t): New type.
12011 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12012 (struct grub_efi_vendor_messaging_device_path): New structure.
12013 (grub_efi_vendor_messaging_device_path_t): New type.
12014 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12015 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12016 (struct grub_efi_hard_drive_device_path): New structure.
12017 (grub_efi_hard_drive_device_path_t): New type.
12018 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12019 (struct grub_efi_cdrom_device_path): New structure.
12020 (grub_efi_cdrom_device_path_t): New type.
12021 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12022 (struct grub_efi_vendor_media_device_path): New structure.
12023 (grub_efi_vendor_media_device_path_t): New type.
12024 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12025 (struct grub_efi_file_path_device_path): New structure.
12026 (grub_efi_file_path_device_path_t): New type.
12027 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12028 (struct grub_efi_protocol_device_path): New structure.
12029 (grub_efi_protocol_device_path_t): New type.
12030 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12031 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12032 (struct grub_efi_bios_device_path): New structure.
12033 (grub_efi_bios_device_path_t): New type.
12034 (struct grub_efi_disk_io): New structure.
12035 (grub_efi_disk_io_t): New type.
12036 (struct grub_efi_block_io_media): New structure.
12037 (grub_efi_block_io_media_t): New type.
12038 (struct grub_efi_block_io): New structure.
12039 (grub_efi_block_io_t): New type.
12040
12041 * include/grub/misc.h (grub_stop): Removed.
12042 (grub_exit): New prototype.
12043 (grub_abort): Likewise.
12044
12045 * include/grub/disk.h (enum grub_disk_dev_id): Added
12046 GRUB_DISK_DEVICE_EFIDISK_ID.
12047
12048 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12049 disk/efi/efidisk.c.
12050 (kernel_syms.lst): Remove the target if an error occurs.
12051
49986a9f 120522006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12053
12054 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12055 as it was simply too buggy.
12056
970d3b8a 120572006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12058
12059 * kern/misc.c (grub_lltoa): New function.
12060 (grub_vsprintf): Added support for the long long suffix,
12061 i.e. "ll".
12062
ff04ec24 120632006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12064
12065 * Makefile.in (LDFLAGS): Add variable.
12066 (LD): Remove variable.
12067 * configure.ac: Add -m32 to LDFLAGS.
12068 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12069 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12070 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12071 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12072 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12073 variables.
12074 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12075 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12076 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12077
37e5e1a4 120782006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12079
12080 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12081 length for unknown glyph.
12082
c352d8dd 120832006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12084
2eab1c0d 12085 Add support for pre-loaded modules into the EFI port.
f19dbdb7 12086
2eab1c0d 12087 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12088 completely. Accept one more argument DIR. The caller has changed.
12089
12090 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12091
12092 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12093 (grub_efi_loaded_image_guid): New variable.
12094 (grub_efi_get_loaded_image): New function.
12095 (grub_arch_modules_addr): Likewise.
12096
12097 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12098 prototype.
12099
12100 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12101 (struct grub_efi_loaded_image): New structure.
12102 (grub_efi_loaded_image_t): New type.
12103
121042006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 12105
c352d8dd 12106 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12107 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12108 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12109
6d01d6b4 121102006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12111
12112 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12113
976a4ea0 121142006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12115
12116 * DISTLIST: Added include/grub/efi/console.h,
12117 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12118 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12119
12120 * include/grub/efi/console.h: New file.
12121 * include/grub/efi/time.h: Likewise.
12122 * include/grub/i386/efi/kernel.h: Likewise.
12123 * kern/efi/init.c: Likewise.
12124 * kern/efi/mm.c: Likewise.
12125 * term/efi/console.c: Likewise.
f19dbdb7 12126
976a4ea0 12127 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12128 (grub_stop): Removed.
12129 (grub_get_rtc): Likewise.
12130 (grub_machine_init): Simply call grub_efi_init.
12131 (grub_machine_fini): Call grub_efi_fini.
12132
12133 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12134 (grub_efi_output_string): Removed.
12135 (grub_efi_stall): New function.
12136 (grub_stop): Likewise.
12137 (grub_get_rtc): Likewise.
12138
12139 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12140 (grub_efi_stall): New prototype.
12141 (grub_efi_allocate_pages): Likewise.
12142 (grub_efi_free_pages): Likewise.
12143 (grub_efi_get_memory_map): Likewise.
12144 (grub_efi_mm_init): Likewise.
12145 (grub_efi_mm_fini): Likewise.
12146 (grub_efi_init): Likewise.
12147 (grub_efi_fini): Likewise.
12148
12149 * include/grub/i386/efi/time.h: Do not include
12150 grub/symbol.h. Include grub/efi/time.h.
12151 (GRUB_TICKS_PER_SECOND): Removed.
12152 (grub_get_rtc): Likewise.
12153
12154 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12155 Added padding. The EFI spec is buggy.
12156 (GRUB_EFI_BLACK): New macro.
12157 (GRUB_EFI_BLUE): Likewise.
12158 (GRUB_EFI_GREEN): Likewise.
12159 (GRUB_EFI_CYAN): Likewise.
12160 (GRUB_EFI_RED): Likewise.
12161 (GRUB_EFI_MAGENTA): Likewise.
12162 (GRUB_EFI_BROWN): Likewise.
12163 (GRUB_EFI_LIGHTGRAY): Likewise.
12164 (GRUB_EFI_BRIGHT): Likewise.
12165 (GRUB_EFI_DARKGRAY): Likewise.
12166 (GRUB_EFI_LIGHTBLUE): Likewise.
12167 (GRUB_EFI_LIGHTGREEN): Likewise.
12168 (GRUB_EFI_LIGHTCYAN): Likewise.
12169 (GRUB_EFI_LIGHTRED): Likewise.
12170 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12171 (GRUB_EFI_YELLOW): Likewise.
12172 (GRUB_EFI_WHITE): Likewise.
12173 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12174 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12175 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12176 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12177 (GRUB_EFI_BACKGROUND_RED): Likewise.
12178 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12179 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12180 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12181 (GRUB_EFI_TEXT_ATTR): Likewise.
12182
12183 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12184 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12185 (kernel_mod_HEADERS): Added efi/time.h.
12186
83709125 121872006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12188
12189 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12190 include/grub/efi/api.h, include/grub/efi/console_control.h,
12191 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12192 include/grub/i386/efi/time.h, kern/efi/efi.c,
12193 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12194 and util/i386/efi/grub-mkimage.c.
12195
12196 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12197
12198 * genmk.rb (PModule#rule): Do not export symbols if
12199 #{prefix}_EXPORTS is set to "no".
12200
12201 * conf/i386-efi.mk: New file.
12202 * conf/i386-efi.rmk: Likewise.
12203 * include/grub/efi/api.h: Likewise.
12204 * include/grub/efi/console_control.h: Likewise.
12205 * include/grub/efi/efi.h: Likewise.
12206 * include/grub/efi/pe32.h: Likewise.
12207 * include/grub/i386/efi/time.h: Likewise.
12208 * kern/efi/efi.c: Likewise.
12209 * kern/i386/efi/init.c: Likewise.
12210 * kern/i386/efi/startup.S: Likewise.
12211 * util/i386/efi/grub-mkimage.c: Likewise.
12212
122132006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 12214
12215 * include/grub/script.h: Include <grub/parser.h> and
12216 "grub_script.tab.h".
12217 (struct grub_lexer_param): New struct.
12218 (struct grub_parser_param): Likewise.
12219 (grub_script_create_arglist): Pass the state in an argument.
12220 (grub_script_add_arglist): Likewise.
12221 (grub_script_create_cmdline): Likewise.
12222 (grub_script_create_cmdblock): Likewise.
12223 (grub_script_create_cmdif): Likewise.
12224 (grub_script_create_cmdmenu): Likewise.
12225 (grub_script_add_cmd): Likewise.
12226 (grub_script_arg_add): Likewise.
12227 (grub_script_lexer_ref): Likewise.
12228 (grub_script_lexer_deref): Likewise.
12229 (grub_script_lexer_record_start): Likewise.
12230 (grub_script_lexer_record_stop): Likewise.
12231 (grub_script_mem_record): Likewise.
12232 (grub_script_mem_record_stop): Likewise.
12233 (grub_script_malloc): Likewise.
12234 (grub_script_yylex): Likewise.
12235 (grub_script_yyparse): Likewise.
12236 (grub_script_yyerror): Likewise.
12237 (grub_script_yylex): Likewise.
12238 (grub_script_lexer_init): Return the state.
12239
12240 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12241 (grub_script_lexer_done): Likewise.
12242 (grub_script_lexer_getline): Likewise.
12243 (grub_script_lexer_refs): Likewise.
12244 (script): Likewise.
12245 (newscript): Likewise.
12246 (record): Likewise.
12247 (recording): Likewise.
12248 (recordpos): Likewise.
12249 (recordlen): Likewise.
12250 (grub_script_lexer_init): Return the state instead of setting
12251 global variables.
12252 (grub_script_lexer_ref): Use the newly added argument for state
12253 instead of globals.
12254 (grub_script_lexer_deref): Likewise.
12255 (grub_script_lexer_record_start): Likewise.
12256 (grub_script_lexer_record_stop): Likewise.
12257 (recordchar): Likewise.
12258 (nextchar): Likewise.
12259 (grub_script_yylex2): Likewise.
12260 (grub_script_yylex): Likewise.
12261 (grub_script_yyerror): Likewise.
12262
12263 * normal/parser.y (func_mem): Removed variable.
12264 (menu_entry): Likewise.
12265 (err): Likewise.
12266 (%lex-param): New parser option.
12267 (%parse-param): Likewise.
12268 (script): Always return the AST.
12269 (argument): Pass the state around.
12270 (arguments): Likewise.
12271 (grubcmd): Likewise.
12272 (commands): Likewise.
12273 (function): Likewise.
12274 (menuentry): Likewise.
12275 (if_statement): Likewise.
12276 (if): Likewise.
12277
12278 * normal/script.c (grub_script_memused): Removed variable.
12279 (grub_script_parsed): Likewise.
12280 (grub_script_malloc): Added a state argument. Use that instead of
12281 global variables.
12282 (grub_script_mem_record): Likewise.
12283 (grub_script_mem_record_stop): Likewise.
12284 (grub_script_arg_add): Likewise.
12285 (grub_script_add_arglist): Likewise.
12286 (grub_script_create_cmdline): Likewise.
12287 (grub_script_create_cmdif): Likewise.
12288 (grub_script_create_cmdmenu): Likewise.
12289 (grub_script_add_cmd): Likewise.
12290 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 12291
e2a8c904 122922006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 12293
12294 * normal/command.c (grub_command_init): Remove the title command.
12295
12296 * normal/lexer.c (grub_script_yylex): Renamed from this...
12297 (grub_script_yylex2): ... to this.
12298 (grub_script_yylex): New function. Temporary
12299 introduced to filter some tokens.
12300 (grub_script_yyerror): Print a newline.
12301
12302 * normal/main.c (read_config_file): Output information about the
12303 lines that contain errors. Wait for a key after all lines have
12304 been processed. Don't return an empty menu.
12305
12306 * normal/parser.y (func_mem): Don't initialize.
12307 (menu_entry): Likewise.
12308 (err): New variable.
12309 (script): Don't return anything when an error was encountered.
12310 (ws, returns): Removed rules.
12311 (argument): Disabled concatenated variable support.
12312 (arguments): Remove explicit separators.
12313 (grubcmd): Likewise.
12314 (function): Likewise.
12315 (menuentry): Likewise.
12316 (if): Likewise.
12317 (commands): Likewise. Add error handling.
12318
12319 * normal/script.c (grub_script_create_cmdline): If
12320 `grub_script_parsed' is 0, assume the parser encountered an error.
12321
c9a86192 123222006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12323
12324 * configure.ac: Add support for EFI. Fix the typo
12325 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12326
70f3b243 123272006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12328
12329 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12330 foreign multibyte characters should be shown correctly.
12331
65f201ad 123322006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12333
12334 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12335 calculation.
12336 (read_config_file): Made it to close file before returning.
12337
b4b93674 123382006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12339
12340 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12341 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12342 video/i386/pc/vbefill.c.
12343
12344 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12345 video/i386/pc/vbefill.c.
12346
12347 * include/grub/video.h (grub_video_blit_format): New enum.
12348 (grub_video_mode_info): Added new member blit_format.
12349 (grub_video_get_blit_format): New function prototype.
12350
12351 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12352 function prototype.
12353 (grub_video_vbe_map_rgb): Likewise.
12354 (grub_video_vbe_unmap_color): Likewise.
12355
12356 * include/grub/i386/pc/vbeblit.h: New file.
12357
12358 * include/grub/i386/pc/vbefill.h: New file.
12359
12360 * video/video.c (grub_video_get_blit_format): New function.
12361 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12362 (grub_video_vbe_map_rgb): Likewise.
12363 (grub_video_vbe_unmap_color): Likewise.
12364
12365 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12366 optimized fills.
12367 (grub_video_vbe_blit_render_target): Changed to use more optimized
12368 blits.
12369 (grub_video_vbe_setup): Added detection for optimized settings.
12370 (grub_video_vbe_create_render_target): Likewise.
12371
12372 * video/i386/pc/vbeblit.c: New file.
12373
12374 * video/i386/pc/vbefill.c: New file.
12375
c2379b9c 123762006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12377
12378 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12379 here...
12380
12381 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12382 parsing to support both hex and dec ranges. If filename was missing
12383 show usage information.
12384
bd0d7896 123852006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12386
12387 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12388 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12389
12390 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12391 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12392 (video_mod_SOURCES): Added.
12393 (video_mod_CFLAGS): Likewise.
12394 (video_mod_LDFLAGS): Likewise.
12395 (gfxterm_mod_SOURCES): Likewise.
12396 (gfxterm_mod_CFLAGS): Likewise.
12397 (gfxterm_mod_LDFLAGS): Likewise.
12398 (videotest_mod_SOURCES): Likewise.
12399 (videotest_mod_CFLAGS): Likewise.
12400 (videotest_mod_LDFLAGS): Likewise.
12401 (vesafb_mod_SOURCES): Removed.
12402 (vesafb_mod_CFLAGS): Likewise.
12403 (vesafb_mod_LDFLAGS): Likewise.
12404 (vga_mod_SOURCES): Likewise.
12405 (vga_mod_CFLAGS): Likewise.
12406 (vga_mod_LDFLAGS): Likewise.
12407
12408 * commands/videotest.c: New file.
12409
12410 * font/manager.c (fill_with_default_glyph): Modified to use
12411 grub_font_glyph.
12412 (grub_font_get_glyph): Likewise.
12413 (fontmanager): Renamed from this...
12414 (font_manager): ... to this.
12415
12416 * include/grub/font.h (grub_font_glyph): Added new structure.
12417 (grub_font_get_glyph): Modified to use grub_font_glyph.
12418
12419 * include/grub/misc.h (grub_abs): Added as inline function.
12420
12421 * include/grub/video.h: New file.
12422
12423 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12424 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12425 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12426 (grub_vbe_get_controller_info): Renamed from this...
12427 (grub_vbe_bios_get_controller_info): ... to this.
12428 (grub_vbe_get_mode_info): Renamed from this...
12429 (grub_vbe_bios_get_mode_info): ... to this.
12430 (grub_vbe_set_mode): Renamed from this...
12431 (grub_vbe_bios_set_mode): ... to this.
12432 (grub_vbe_get_mode): Renamed from this...
12433 (grub_vbe_bios_get_mode): ... to this.
12434 (grub_vbe_set_memory_window): Renamed from this...
12435 (grub_vbe_bios_set_memory_window): ... to this.
12436 (grub_vbe_get_memory_window): Renamed from this...
12437 (grub_vbe_bios_get_memory_window): ... to this.
12438 (grub_vbe_set_scanline_length): Renamed from this...
12439 (grub_vbe_set_scanline_length): ... to this.
12440 (grub_vbe_get_scanline_length): Renamed from this...
12441 (grub_vbe_bios_get_scanline_length): ... to this.
12442 (grub_vbe_set_display_start): Renamed from this...
12443 (grub_vbe_bios_set_display_start): ... to this.
12444 (grub_vbe_get_display_start): Renamed from this...
12445 (grub_vbe_bios_get_display_start): ... to this.
12446 (grub_vbe_set_palette_data): Renamed from this...
12447 (grub_vbe_bios_set_palette_data): ... to this.
12448 (grub_vbe_set_pixel_rgb): Removed.
12449 (grub_vbe_set_pixel_index): Likewise.
12450
12451 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12452 from this...
12453 (grub_vbe_bios_get_controller_info): ... to this.
12454 (grub_vbe_get_mode_info): Renamed from this...
12455 (grub_vbe_bios_get_mode_info): ... to this.
12456 (grub_vbe_set_mode): Renamed from this...
12457 (grub_vbe_bios_set_mode): ... to this.
12458 (grub_vbe_get_mode): Renamed from this...
12459 (grub_vbe_bios_get_mode): ... to this.
12460 (grub_vbe_set_memory_window): Renamed from this...
12461 (grub_vbe_bios_set_memory_window): ... to this.
12462 (grub_vbe_get_memory_window): Renamed from this...
12463 (grub_vbe_bios_get_memory_window): ... to this.
12464 (grub_vbe_set_scanline_length): Renamed from this...
12465 (grub_vbe_set_scanline_length): ... to this.
12466 (grub_vbe_get_scanline_length): Renamed from this...
12467 (grub_vbe_bios_get_scanline_length): ... to this.
12468 (grub_vbe_set_display_start): Renamed from this...
12469 (grub_vbe_bios_set_display_start): ... to this.
12470 (grub_vbe_get_display_start): Renamed from this...
12471 (grub_vbe_bios_get_display_start): ... to this.
12472 (grub_vbe_set_palette_data): Renamed from this...
12473 (grub_vbe_bios_set_palette_data): ... to this.
12474 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12475 getting corrupted after calling it. Added more pushes and pops.
12476 (grub_vbe_bios_set_mode): Likewise.
12477 (grub_vbe_bios_get_mode): Likewise.
12478 (grub_vbe_bios_get_memory_window): Likewise.
12479 (grub_vbe_bios_set_scanline_length): Likewise.
12480 (grub_vbe_bios_get_scanline_length): Likewise.
12481 (grub_vbe_bios_get_display_start): Likewise.
12482 (grub_vbe_bios_set_palette_data): Likewise.
12483
12484 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12485 (cl_insert): Likewise.
12486 (cl_delete): Likewise.
12487
12488 * term/gfxterm.c: New file.
12489
12490 * term/i386/pc/vesafb.c: Removed file.
12491
12492 * video/video.c: New file.
12493
12494 * video/i386/pc/vbe.c (real2pm): Added new function.
12495 (grub_video_vbe_draw_pixel): Likewise.
12496 (grub_video_vbe_get_video_ptr): Likewise.
12497 (grub_video_vbe_get_pixel): Likewise
12498 (grub_video_vbe_init): Likewise.
12499 (grub_video_vbe_fini): Likewise.
12500 (grub_video_vbe_setup): Likewise.
12501 (grub_video_vbe_get_info): Likewise.
12502 (grub_video_vbe_set_palette): Likewise.
12503 (grub_video_vbe_get_palette): Likewise.
12504 (grub_video_vbe_set_viewport): Likewise.
12505 (grub_video_vbe_get_viewport): Likewise.
12506 (grub_video_vbe_map_color): Likewise.
12507 (grub_video_vbe_map_rgb): Likewise.
12508 (grub_video_vbe_map_rgba): Likewise.
12509 (grub_video_vbe_unmap_color): Likewise.
12510 (grub_video_vbe_fill_rect): Likewise.
12511 (grub_video_vbe_blit_glyph): Likewise.
12512 (grub_video_vbe_blit_bitmap): Likewise.
12513 (grub_video_vbe_blit_render_target): Likewise.
12514 (grub_video_vbe_scroll): Likewise.
12515 (grub_video_vbe_swap_buffers): Likewise.
12516 (grub_video_vbe_create_render_target): Likewise.
12517 (grub_video_vbe_delete_render_target): Likewise.
12518 (grub_video_vbe_set_active_render_target): Likewise.
12519 (grub_vbe_set_pixel_rgb): Remove function.
12520 (grub_vbe_set_pixel_index): Likewise.
12521 (index_color_mode): Remove static variable.
12522 (active_mode): Likewise.
12523 (framebuffer): Likewise.
12524 (bytes_per_scan_line): Likewise.
12525 (grub_video_vbe_adapter): Added new static variable.
12526 (framebuffer): Likewise.
12527 (render_target): Likewise.
12528 (initial_mode): Likewise.
12529 (mode_in_use): Likewise.
12530 (mode_list): Likewise.
12531
5f97350b 125322006-03-10 Marco Gerards <marco@gnu.org>
12533
12534 * configure.ac (AC_INIT): Bumped to 1.93.
12535
12536 * DISTLIST: Added `include/grub/hfs.h'.
12537
a3c5c6f8 125382006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
12539
12540 * boot/i386/pc/boot.S (general_error): Before looping, try INT
12541 18H, which might help the BIOS falling back to next boot media.
12542
6de53d26 125432006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
12544
12545 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12546 Poe Chen <poe.poechen@gmail.com>.
12547
77c4a393 125482006-01-17 Marco Gerards <marco@gnu.org>
12549
12550 * include/grub/normal.h: Include <grub/script.h>.
12551 (grub_command_list): Removed struct.
12552 (grub_command_list_t): Removed type.
12553 (grub_menu_entry): Remove members `num' and `command_list'. Add
12554 members `commands' and `sourcecode'.
12555 * include/grub/script.h: Add inclusion guards.
12556 (grub_script_cmd_menuentry): New struct.
12557 (grub_script_execute_menuentry): New prototype.
12558 (grub_script_lexer_record_start): Likewise.
12559 (grub_script_lexer_record_stop): Likewise.
12560 * normal/execute.c (grub_script_execute_menuentry): New function.
12561 * normal/lexer.c (record, recording, recordpos, recordlen): New
12562 variables.
12563 (grub_script_lexer_record_start): New function.
12564 (grub_script_lexer_record_stop): Likewise.
12565 (recordchar): Likewise.
12566 (nextchar): Likewise.
12567 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
12568 2048 as the buffer size. Add the tokens `menuentry' and `@'.
12569 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12570 (current_menu): New variable.
12571 (free_menu): Mainly rewritten.
12572 (grub_normal_menu_addentry): New function.
12573 (read_config_file): Rewritten.
12574 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 12575 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 12576 the menu entry.
12577 (run): Mainly rewritten.
12578 * normal/parser.y (menu_entry): New variable.
12579 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12580 (menuentry): New rule.
12581 (command): Add `menuentry'.
12582 (if_statement): Allow additional returns before `fi'.
12583 * normal/script.c (grub_script_create_cmdmenu): New function.
12584
144f1f98 125852006-01-03 Marco Gerards <marco@gnu.org>
12586
12587 * INSTALL: GNU Bison is required.
12588 * configure.ac: Rewritten the test to detect Bison.
12589 * Makefile.in (YACC): New variable. Reported by Xun Sun
12590 <xun.sun.cn@gmail.com>.
12591
af4b2d89 125922006-01-03 Marco Gerards <marco@gnu.org>
12593
12594 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12595 the HFS+ filesystem to filesystem blocks.
12596 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12597 GCC warning is silenced.
12598
15643b71 125992006-01-03 Marco Gerards <marco@gnu.org>
12600
12601 * partmap/apple.c (apple_partition_map_iterate): Convert the data
12602 read from disk from big endian to host byte order.
12603
00905879 126042006-01-03 Hollis Blanchard <hollis@penguinppc.org>
12605
12606 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
12607 documentation.
12608 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12609 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12610 embedded HFS+ filesystem.
12611 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12612 (grub_hfs_sblock): Move from here...
12613 * include/grub/hfs.h: To here... New file.
12614 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
12615 documentation.
12616 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12617 New macros.
12618 (grub_hfsplus_volheader): Change type of member `magic' to
12619 `grub_uint16_t'.
12620 (grub_hfsplus_data): Add new member `embedded_offset'.
12621 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12622 returned block.
12623 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12624 Calculate the offset.
12625
8899bc3e 126262005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12627
12628 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12629 Removed.
12630 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12631
ae8c0277 126322005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12633
12634 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12635 ENV->NAME is NULL after allocating ENV->VALUE.
12636
07084456 126372005-12-25 Marco Gerards <marco@gnu.org>
12638
12639 * kern/env.c (grub_env_set): Rewritten the error handling code.
12640
4750f5f1 126412005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12642
12643 * geninit.sh: Made more robust, and more portable.
12644
50214199 126452005-12-25 Marco Gerards <marco@gnu.org>
12646
12647 Add support for Apple HFS+ filesystems.
f19dbdb7 12648
50214199 12649 * fs/hfsplus.c: New file.
12650
12651 * DISTLIST: Added `fs/hfsplus.c'.
12652
12653 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12654 (hfsplus_mod_SOURCES): New variable.
12655 (hfsplus_mod_CFLAGS): Likewise.
12656 (hfsplus_mod_LDFLAGS): Likewise.
12657 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12658 (grub_setup_SOURCES): Likewise.
12659 (grub_mkdevicemap_SOURCES): Likewise.
12660 (grub_emu_SOURCES): Likewise.
12661 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12662
12663 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12664
12665 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12666
befaed6c 126672005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12668
12669 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12670 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12671 include/grub/parser.h, include/grub/script.h, kern/parser.c,
12672 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12673 normal/lexer.c, normal/parser.y, normal/script.c, and
12674 partmap/gpt.c.
12675 Removed kern/sparc64/cache.c.
12676
12677 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12678 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12679 grub_emu_init.c.
12680
12681 * configure.ac (AC_INIT): Bumped to 1.92.
12682
6a124103 126832005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
12684
12685 * kern/err.c (grub_error_push): Added new function to support error
12686 stacks.
12687 (grub_error_pop): Likewise.
12688 (grub_error_stack_items): New local variable to support error stacks.
12689 (grub_error_stack_pos): Likewise.
12690 (grub_error_stack_assert): Likewise.
12691 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12692 stack depth.
12693 (grub_print_error): Added support to print errors from error stack.
12694
12695 * include/grub/err.h (grub_error_push): Added function prototype.
12696 (grub_error_pop): Likewise.
12697
be973c1b 126982005-12-09 Hollis Blanchard <hollis@penguinppc.org>
12699
12700 * configure.ac: Accept `powerpc64' as host_cpu.
12701 (amd64): Rename to `biarch32'.
12702
12703 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12704 non-cacheline-aligned addresses.
12705
12706 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12707 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
12708 if `size' is non-zero.
12709
b04216ab 127102005-12-03 Marco Gerards <mgerards@xs4all.nl>
12711
12712 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12713 and `cd' to make sure the filename is not prefixed with a
12714 directory name.
12715 (pkgdata_MODULES): Add `gpt.mod'.
12716 (gpt_mod_SOURCES): New variable.
12717 (gpt_mod_CFLAGS): Likewise.
12718 (gpt_mod_LDFLAGS): Likewise.
12719
12720 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12721
12722 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12723 New macro.
12724
12725 * partmap/gpt.c: New file.
12726
12727 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12728 GPT partition map is detected.
12729
41730ed9 127302005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
12731
12732 * commands/i386/pc/play.c: New file.
12733 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12734 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12735 macros.
f19dbdb7 12736
95dc3643 127372005-11-27 Marco Gerards <mgerards@xs4all.nl>
12738
12739 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12740 ((unused))' to silence gcc warning.
12741
1569ec51 127422005-11-26 Hollis Blanchard <hollis@penguinppc.org>
12743
12744 * configure.ac: Correct `AC_PROG_YACC' test.
12745
9abde152 127462005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12747
12748 * util/powerpc/ieee1275/grub-install.in: Run the mount point
12749 check before installing files.
12750
44b83271 127512005-11-22 Mike Small <smallm@panix.com>
12752
12753 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12754 number regex so multidigit numbers are recognized correctly.
12755
127562005-11-22 Mike Small <smallm@panix.com>
12757
12758 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12759 debugging message before attempting to claim memory.
12760 (grub_rescue_cmd_initrd): Add a claim debugging message and try
12761 multiple addresses in case of failure.
12762
9c12956b 127632005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12764
12765 * term/tparm.c (get_space): Remove empty `if' statement.
12766
12767 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12768
12769 * kern/parser.c (check_varstate): Rename `state' to 's'.
12770
aeaf81d9 127712005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12772
12773 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
12774 variable definitions to the beginning of each function. Sort stack
12775 variables by size.
12776 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
12777 `buf' argument to `char *'.
12778
79bbb63f 127792005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12780
12781 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12782 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 12783 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 12784 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12785 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12786 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12787 configfile.mod, search.mod, gzio.mod and test.mod.
12788 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12789 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12790 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12791 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12792 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12793 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12794 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12795 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12796 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12797 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12798 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12799 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12800 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12801 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12802 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12803 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12804 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12805 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12806 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12807 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12808 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12809 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12810 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12811
12812 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12813 `grep --include'.
12814 (pkgdata_MODULES): Add test.mod.
12815
233b1628 128162005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12817
12818 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
12819 appending to variables with "+=".
12820 (PModule): Use full pathname to generate *.lst filenames.
12821
12822 * Makefile.in: Fixed list rules moved from genmk.rb.
12823 (.DELETE_ON_ERROR): New special target.
12824 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12825
12826 * conf/i386-pc.rmk: Include conf/common.mk.
12827 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 12828 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 12829 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12830 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12831 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12832 configfile.mod, search.mod, gzio.mod and test.mod.
12833 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12834 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12835 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12836 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12837 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12838 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12839 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12840 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12841 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12842 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12843 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12844 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12845 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12846 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12847 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12848 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12849 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12850 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12851 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12852 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12853 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12854 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12855 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12856 here...
12857 * conf/common.rmk: ... to here. New file.
12858
12859 * conf/common.mk: New file.
12860
16f820c8 128612005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
12862
12863 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12864 (grub_script.tab.c): ... here.
12865
12866 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12867 (grub_script.tab.c): ... here.
12868
12869 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12870 (grub_script.tab.c): ... here.
12871
12872 * normal/command.c (grub_command_find): Fixed a memory leak of
12873 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12874
63ba1554 128752005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12876
12877 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12878 "@" which marks the start of a comment on ARM.
12879 (VARIABLE): Likewise.
12880
7f67dc13 128812005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12882
79bbb63f 12883 Add support for Linux/ADFS partition tables.
7f67dc13 12884
12885 * partmap/acorn.c: New file.
12886
12887 * include/grub/acorn_filecore.h: Likewise.
12888
12889 * DISTLIST: Added `partmap/acorn.c' and
12890 `include/grub/acorn_filecore.h'.
f19dbdb7 12891
7f67dc13 12892 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12893 `partmap/acorn.c'.
12894 (pkgdata_MODULES): Add `acorn.mod'.
12895 (acorn_mod_SOURCES): New variable.
12896 (acorn_mod_CFLAGS): Likewise.
12897
12898 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12899 `partmap/acorn.c'.
12900 (pkgdata_MODULES): Add `acorn.mod'.
12901 (acorn_mod_SOURCES): New variable.
12902 (acorn_mod_CFLAGS): Likewise.
12903
12904 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12905 (pkgdata_MODULES): Add `acorn.mod'.
12906 (acorn_mod_SOURCES): New variable.
12907 (acorn_mod_CFLAGS): Likewise.
12908 (acorn_mod_LDFLAGS): Likewise.
12909
12910 * include/types.h (grub_disk_addr_t): New typedef.
12911
6d099807 129122005-11-13 Marco Gerards <mgerards@xs4all.nl>
12913
12914 * geninit.sh: New file.
12915
12916 * geninitheader.sh: Likewise.
12917
12918 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12919 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12920 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12921 * commands/configfile.c (grub_configfile_init)
12922 (grub_configfile_fini): Likewise.
12923 * commands/default.c (grub_default_init, grub_default_fini):
12924 Likewise.
12925 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12926 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12927 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12928 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12929 Likewise.
12930 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12931 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12932 Likewise.
12933 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 12934 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 12935 Likewise.
12936 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12937 Likewise.
fe6b695a 12938 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 12939 Likewise.
12940 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12941 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12942 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12943 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12944 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12945 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12946 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12947 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12948 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12949 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12950 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12951 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12952 * partmap/amiga.c (grub_amiga_partition_map_init)
12953 (grub_amiga_partition_map_fini): Likewise.
12954 * partmap/apple.c (grub_apple_partition_map_init)
12955 (grub_apple_partition_map_fini): Likewise.
12956 * partmap/pc.c (grub_pc_partition_map_init)
12957 (grub_pc_partition_map_fini): Likewise.
12958 * partmap/sun.c (grub_sun_partition_map_init,
12959 grub_sun_partition_map_fini): Likewise.
12960 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12961 Likewise.
12962
12963 * util/grub-emu.c: Include <grub_modules_init.h>.
12964 (main): Don't initialize and de-initialize any modules directly,
12965 use `grub_init_all' and `grub_fini_all' instead.
12966
12967 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12968 `grub_vesafb_mod_init'.
12969 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
12970 all users.
12971 * term/i386/pc/vga.c (grub_vga_init): Renamed to
12972 `grub_vga_mod_init'. Updated all users.
12973 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 12974
6d099807 12975 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12976 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12977 rules.
12978
12979 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12980 Generate a function to initialize the module in utilities.
12981 Updated all callers.
12982 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
12983 initialize the module in utilities. Updated all callers.
12984
9046bcf0 129852005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12986
12987 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12988 escape sequence and a literal ^L to clear the screen.
12989
12990 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12991 when returning from Open Firmware.
12992
d13ea639 129932005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12994
12995 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12996 (grub_ofconsole_height): Likewise.
12997 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12998 manually insert a '\n'.
12999 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13000 `grub_ofconsole_height'. Return early if these are already set.
13001
a8fcf206 130022005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13003
13004 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13005 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13006 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13007 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13008 and `normal/script.c'.
13009 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13010 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13011 (test_mod_SOURCES): New variable.
13012 (test_mod_CFLAGS): Likewise.
13013 (test_mod_LDFLAGS): Likewise.
13014 (pkgdata_MODULES): Add `test.mod'.
13015 (grub_script.tab.c): New rule.
13016 (grub_script.tab.h): Likewise.
13017
b6b32745 130182005-11-07 Marco Gerards <mgerards@xs4all.nl>
13019
13020 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13021 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13022 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13023 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13024 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13025 (test_mod_SOURCES): New variable.
13026 (test_mod_CFLAGS): Likewise.
13027 (pkgdata_MODULES): Add `test.mod'.
13028 (grub_script.tab.c): New rule.
13029 (grub_script.tab.h): Likewise.
13030
daac212a 130312005-11-06 Marco Gerards <mgerards@xs4all.nl>
13032
13033 Add initial scripting support.
13034
13035 * commands/test.c: New file.
13036 * include/grub/script.h: Likewise.
13037 * normal/execute.c: Likewise.
13038 * normal/function.c: Likewise.
13039 * normal/lexer.c: Likewise.
13040 * normal/parser.y: Likewise.
13041 * normal/script.c: Likewise.
13042
13043 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 13044
daac212a 13045 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13046 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13047 `normal/function.c' and `normal/script.c'.
13048 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13049 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 13050 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13051 variables.
daac212a 13052 (pkgdata_MODULES): Add `test.mod'.
13053 (grub_script.tab.c): New rule.
13054 (grub_script.tab.h): Likewise.
13055
13056 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13057
13058 * include/grub/normal.h (grub_test_init): New prototype.
13059 (grub_test_fini): Likewise.
f19dbdb7 13060
daac212a 13061 * normal/command.c: Include <grub/script.h>.
13062 (grub_command_execute): Rewritten.
f19dbdb7 13063
daac212a 13064 * util/grub-emu.c (main): Call `grub_test_init' and
13065 `grub_test_fini'.
13066
77500b2b 130672005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13068
13069 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13070 to 0.
13071 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13072 there are no pending characters.
13073
e45deb9e 130742005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13075
13076 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13077 `grub_strndup' to drop device arguments. Replace unnecessary
13078 `grub_strndup' with `grub_strdup'.
13079
4ce32619 130802005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13081
13082 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13083 `debug' environment variable has been set.
13084
130852005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 13086
4ce32619 13087 * Makefile.in (install-local): Use $(DATA).
13088 (uninstall): Likewise.
13089 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13090 (sbin_UTILITIES): ... to here.
13091 (sbin_SCRIPTS): New variable.
13092 (grub_install_SOURCES): New variable.
13093 * util/powerpc/ieee1275/grub-install.in: New file.
13094 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13095 variable.
13096 (add_segments): Call `grub_util_get_path'.
13097
25fe6f03 130982005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13099
13100 From Timothy Baldwin:
13101 * commands/ls.c (grub_ls_list_files): Close FILE with
13102 grub_file_close.
13103 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13104
04ccf3ec 131052005-10-24 Marco Gerards <mgerards@xs4all.nl>
13106
13107 * include/grub/parser.h: New file.
13108
13109 * kern/parser.c: Likewise.
13110
13111 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13112 (grub_setup_SOURCES): Likewise.
13113 (grub_probefs_SOURCES): Likewise.
13114 (grub_emu_SOURCES): Likewise.
13115 (kernel_img_HEADERS): Add `parser.h'.
13116
13117 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13118 (grub_emu_SOURCES): Add `kern/parser.c'.
13119 (grubof_SOURCES): Likewise.
13120
13121 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13122 (grubof_SOURCES): Add `kern/parser.c'.
13123
13124 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13125
13126 * kern/misc.c (grub_split_cmdline): Removed function.
13127
13128 * kern/rescue.c: Include <grub/parser.h>.
13129 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13130 of `grub_split_cmdline'.
13131
13132 * normal/command.c: Include <grub/parser.h>.
13133 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13134 of `grub_split_cmdline'.
13135
13136 * normal/completion.c: Include <grub/parser.h>.
13137 (cmdline_state): New variable.
13138 (iterate_dir): End the filename with a quote depending on the
13139 command line state.
13140 (get_state): new function.
13141 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13142 split the arguments and determine the current argument. When the
13143 argument string is not quoted, escape all spaces.
13144
6d8f4b0e 131452005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13146
13147 * normal/sparc64/setjmp.S: New file.
13148
15cf03ed 131492005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13150
13151 * include/grub/sparc64/libgcc.h: New file.
13152 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13153 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13154 normal/sparc64/setjmp.c.
13155
03e8661a 131562005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13157
13158 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13159 * kern/sparc64/cache.S: New file.
13160 * kern/sparc64/cache.c: Removed.
13161 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13162 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13163 -mtune=ultrasparc.
13164 (COMMON_LDFLAGS): Add -melf64_sparc.
13165 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13166 (grubof_SOURCES): Use cache.S instead of cache.c.
13167 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13168 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13169 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13170 commented though.
13171 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13172 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13173 (linux_mod_CFLAGS): Commented out.
13174 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13175 out because module isn't built.
13176 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13177 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13178 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13179 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13180 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13181 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13182 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13183 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13184 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13185 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13186 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13187 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13188 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13189 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13190
34eeec8a 131912005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13192
13193 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13194 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13195 longer, because HFS should not be used on PC.
13196
708367a3 131972005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13198
13199 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13200 consistently within the loop.
13201
6fa1251a 132022005-10-15 Marco Gerards <mgerards@xs4all.nl>
13203
13204 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13205 directory can not be read.
13206
4801580b 132072005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13208
13209 * configure.ac (AC_INIT): Increase the version number to 1.91.
13210
13211 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13212 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13213 term/i386/pc/serial.c.
13214
219ad426 132152005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13216
13217 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13218 file size must be permitted.
13219
13220 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13221 between %ah and %al.
13222
688e5699 132232005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13224
13225 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13226 grub_uint64_t.
13227 Call the hook with a NUL-terminated filename.
13228 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13229 grub_cpu_to_be32.
13230
13231 * kern/term.c (cursor_state): New variable.
13232 (grub_term_set_current): Reset the cursor state on a new
13233 terminal.
13234 (grub_setcursor): Rewritten to use CURSOR_STATE.
13235 (grub_getcursor): New function.
13236
13237 * include/grub/term.h (grub_getcursor): New prototype.
13238
13239 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13240 integers on ARM. Reported by Timothy Baldwin
13241 <T.E.Baldwin99@members.leeds.ac.uk>.
13242
bb34586c 132432005-10-11 Marco Gerards <mgerards@xs4all.nl>
13244
13245 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13246 allocated.
13247 (grub_sfs_dir): Likewise.
13248
9a909877 132492005-10-09 Marco Gerards <mgerards@xs4all.nl>
13250
13251 Add support for the SFS filesystem.
13252
13253 * fs/sfs.c: New file.
13254
13255 * DISTLIST: Added `fs/sfs.c'.
13256
13257 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13258 (grub_probefs_SOURCES): Likewise.
13259 (grub_emu_SOURCES): Likewise.
13260 (pkgdata_MODULES): Add `sfs.mod'.
13261 (sfs_mod_SOURCES): New variable.
13262 (sfs_mod_CFLAGS): Likewise.
13263 (sfs_mod_LDFLAGS): Likewise.
13264
13265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13266 (pkgdata_MODULES): Add `sfs.mod'.
13267 (sfs_mod_SOURCES): New variable.
13268 (sfs_mod_CFLAGS): Likewise.
13269
13270 * util/grub-emu.c (main): Call `grub_sfs_init' and
13271 `grub_sfs_fini'.
13272
13273 * include/grub/fs.h (grub_sfs_init): New prototype.
13274 (grub_sfs_fini): Likewise.
13275
57bdbde3 132762005-10-07 Marco Gerards <mgerards@xs4all.nl>
13277
13278 Add support for the AFFS filesystem.
13279
13280 * fs/affs.c: New file.
13281
13282 * DISTLIST: Added `fs/affs.c'.
13283
13284 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13285 (grub_probefs_SOURCES): Likewise.
13286 (grub_emu_SOURCES): Likewise.
13287 (pkgdata_MODULES): Add `affs.mod'.
13288 (affs_mod_SOURCES): New variable.
13289 (affs_mod_CFLAGS): Likewise.
13290 (affs_mod_LDFLAGS): Likewise.
13291
13292 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13293 (pkgdata_MODULES): Add `affs.mod'.
13294 (affs_mod_SOURCES): New variable.
13295 (affs_mod_CFLAGS): Likewise.
13296
13297 * util/grub-emu.c (main): Call `grub_affs_init' and
13298 `grub_affs_fini'.
13299
13300 * include/grub/fs.h (grub_affs_init): New prototype.
13301 (grub_affs_fini): Likewise.
13302
047b67e0 133032005-10-01 Marco Gerards <mgerards@xs4all.nl>
13304
13305 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13306
59b8208a 133072005-10-01 Marco Gerards <mgerards@xs4all.nl>
13308
13309 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13310 `-m32' to CFLAGS.
13311
13312 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13313 linking.
f19dbdb7 13314
59b8208a 13315 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13316 (COMMON_LDFLAGS): New variable.
13317 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13318 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13319 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13320 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13321 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13322 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13323 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13324 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13325 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13326 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13327 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13328 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13329 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13330 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13331 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13332 variables.
13333 (normal_mod_ASFLAGS): Add `-m32'.
13334
13335 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13336 (grub_host_size_t, grub_host_ssize_t): New types.
13337 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 13338 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 13339 `GRUB_HOST_SIZEOF_VOID_P'.
13340
13341 * include/grub/kernel.h (struct grub_module_header): Type of
13342 member offset changed to `grub_host_off_t'. Type of member size
13343 changed to `grub_host_size_t'.
13344 (struct grub_module_info): Type of member offset changed to
13345 `grub_host_off_t'. Type of member size changed to
13346 `grub_host_size_t'.
13347
b4093103 133482005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13349
13350 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 13351
b4093103 13352 * kern/i386/pc/startup.S (multiboot_header): New label.
13353 (multiboot_entry): Likewise.
13354 (multiboot_trampoline): Likewise.
13355
13356 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13357 Increased to 0x4A0.
13358
13359 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13360 put parentheses after a question mark.
13361 [!GRUB_UTIL] (my_mod): New variable.
13362
13363 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13364
b2499b29 133652005-09-28 Marco Gerards <mgerards@xs4all.nl>
13366
13367 Adds support for the XFS filesystem. Btrees are not supported
13368 yet.
13369
13370 * fs/xfs.c: New file.
13371
13372 * DISTLIST: Added `fs/xfs.c'.
13373
13374 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13375 (grub_probefs_SOURCES): Likewise.
13376 (grub_emu_SOURCES): Likewise.
13377 (pkgdata_MODULES): Add `xfs.mod'.
13378 (xfs_mod_SOURCES): New variable.
13379 (xfs_mod_CFLAGS): Likewise.
13380
13381 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13382 (pkgdata_MODULES): Add `xfs.mod'.
13383 (xfs_mod_SOURCES): New variable.
13384 (xfs_mod_CFLAGS): Likewise.
13385
13386 * util/grub-emu.c (main): Call `grub_xfs_init' and
13387 `grub_xfs_fini'.
13388
13389 * include/grub/fs.h (grub_xfs_init): New prototype.
13390 (grub_xfs_fini): Likewise.
13391
f19dbdb7 13392
83d37a62 133932005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13394
13395 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13396 color modes, allow greater than 16 colors to be configured as
13397 a default palette.
13398
47d2d65e 133992005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13400
13401 * normal/completion.c (complete_arguments): Add the qualifier
13402 const into OPTIONS.
13403
13404 From Omniflux <omniflux+lists@omniflux.com>:
13405 * include/grub/terminfo.h: New file.
13406 * include/grub/tparm.h: Likewise.
13407 * include/grub/i386/pc/serial.h: Likewise.
13408 * term/terminfo.c: Likewise.
13409 * term/tparm.c: Likewise.
13410 * term/i386/pc/serial.c: Likewise.
13411 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13412 serial.mod.
13413 (terminfo_mod_SOURCES): New variable.
13414 (terminfo_mod_CFLAGS): Likewise.
13415 (serial_mod_SOURCES): Likewise.
13416 (serial_mod_CFLAGS): Likewise.
13417
48b671ff 134182005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13419
13420 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13421 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13422 and kern/powerpc/ieee1275/cmain.c, respectively.
13423
13424 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13425 * kern/powerpc/ieee1275/crt0.S: ... here.
13426
13427 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13428 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 13429
48b671ff 13430 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13431 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13432 instead of boot/powerpc/ieee1275/crt0.S and
13433 boot/powerpc/ieee1275/cmain.c, respectively.
13434
13435 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13436 sectors. It was not used anyway.
13437
09fc77a7 134382005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13439
13440 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13441 `unused parameter' warning.
13442
003789c7 134432005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13444
13445 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13446 function.
13447 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13448 getcharwidth.
13449
67f44c86 134502005-08-28 Marco Gerards <metgerards@student.han.nl>
13451
13452 * include/grub/normal.h (enum grub_completion_type): Added
13453 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13454
13455 * normal/cmdline.c (print_completion): Handle
13456 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13457 * normal/menu_entry.c (store_completion): Likewise.
13458
13459 * normal/completion.c (complete_arguments): New function.
13460 (grub_normal_do_completion): Call `complete_arguments' when the
13461 current words start with a dash.
13462
0b5abe02 134632005-08-27 Marco Gerards <metgerards@student.han.nl>
13464
13465 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13466 `gzio.mod' instead of `io.mod').
13467
d9864ee1 134682005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13469
13470 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13471 (DISTDIRS): Added io and video.
13472 Rewrite the search routine to make an output consistently.
13473
13474 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13475 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13476 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13477 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13478 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13479 util/powerpc/ieee1275/misc.c.
f19dbdb7 13480
d9864ee1 13481 * include/grub/gzio.h: New file.
13482 * io/gzio.c: Likewise.
f19dbdb7 13483
d9864ee1 13484 * kern/file.c (grub_file_close): Call grub_device_close only if
13485 FILE->DEVICE is not NULL.
13486
13487 * include/grub/mm.h [!NULL] (NULL): New macro.
13488
13489 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13490
13491 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13492 (pkgdata_MODULES): Added gzio.mod.
13493 (gzio_mod_SOURCES): New variable.
13494 (gzio_mod_CFLAGS): Likewise.
13495
13496 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13497 (pkgdata_MODULES): Added gzio.mod.
13498 (gzio_mod_SOURCES): New variable.
13499 (gzio_mod_CFLAGS): Likewise.
13500
13501 * commands/cat.c: Include grub/gzio.h.
13502 (grub_cmd_cat): Use grub_gzfile_open instead of
13503 grub_file_open.
f19dbdb7 13504
d9864ee1 13505 * commands/cmp.c: Include grub/gzio.h.
13506 (grub_cmd_cmp): Use grub_gzfile_open instead of
13507 grub_file_open.
13508
13509 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13510 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13511 grub_file_open.
13512 (grub_rescue_cmd_module): Likewise.
13513
fa46f4b5 135142005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13515
13516 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13517 kern/sparc64/ieee1275/init.c because it contains _start.
13518 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13519
e9211b5d 135202005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13521
13522 * configure.ac: Add support for sparc64 host with ieee1275
13523 firmware.
13524 * configure: Generated from configure.ac.
13525 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13526 instead of int.
13527 (grub_ofdisk_read): Likewise.
13528 (grub_ofdisk_open): Use %p to print pointer values, and cast the
13529 pointers as (void *) to remove a warning.
13530 (grub_ofdisk_close): Likewise.
13531 (grub_ofdisk_read): Likewise.
13532 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13533 returns, so make it return void to remove a warning.
13534 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13535 Corresponding prototype change.
13536 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13537 values, and cast the pointers as (void *) to remove a warning.
13538 (grub_mm_dump): Likewise.
13539 * conf/sparc64-ieee1275.mk: New file.
13540 * conf/sparc64-ieee1275.rmk: Likewise.
13541 * include/grub/sparc64/setjmp.h: Likewise.
13542 * include/grub/sparc64/types.h: Likewise.
13543 * include/grub/sparc64/ieee1275/console.h: Likewise.
13544 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13545 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13546 * include/grub/sparc64/ieee1275/time.h: Likewise.
13547 * kern/sparc64/cache.c: Likewise.
13548 * kern/sparc64/dl.c: Likewise.
13549 * kern/sparc64/ieee1275/init.c: Likewise.
13550 * kern/sparc64/ieee1275/openfw.c: Likewise.
13551
385c6a92 135522005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13553
13554 * util/console.c (grub_ncurses_putchar): If C is greater than
13555 0x7f, set C to a question mark.
13556 (grub_ncurses_getcharwidth): New function.
13557 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13558 getcharwidth.
13559
13560 * normal/menu.c (print_entry): Made aware of Unicode. First,
13561 convert TITLE to UCS-4, and predict the cursor position by
13562 grub_getcharwidth.
13563
13564 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13565 const to SRC.
13566 * kern/misc.c (grub_utf16_to_utf8): Likewise.
13567
16ccb8b1 135682005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13569
13570 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13571 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13572 grub_strcat.
13573
13574 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13575 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13576 grub_strcpy and grub_strlen. Take it into account that a space
13577 character is inserted as a delimiter.
13578
6a85ce79 135792005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13580
13581 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 13582 invalid magic in the error.
6a85ce79 13583
13584 * commands/search.c: New file.
f19dbdb7 13585
6a85ce79 13586 * util/grub-emu.c (main): Call grub_search_init and
13587 grub_search_fini.
13588
13589 * kern/rescue.c (grub_rescue_print_disks): Removed.
13590 (grub_rescue_print_devices): New function.
13591 (grub_rescue_cmd_ls): Use grub_device_iterate with
13592 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13593 grub_rescue_print_disks.
13594
13595 * kern/partition.c (grub_partition_iterate): Return the result of
13596 PARTMAP->ITERATE instead of GRUB_ERRNO.
13597
13598 * kern/device.c: Include grub/partition.h.
13599 (grub_device_iterate): New function.
13600
13601 * include/grub/partition.h (grub_partition_iterate): Return int
13602 instead of grub_err_t.
13603
13604 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13605 prototype.
13606 [GRUB_UTIL] (grub_search_fini): Likewise.
13607
13608 * include/grub/device.h (grub_device_iterate): New prototype.
13609
13610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13611 commands/search.c.
13612 (pkgdata_MODULES): Added search.mod.
13613 (search_mod_SOURCES): New variable.
13614 (search_mod_CFLAGS): Likewise.
13615
13616 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13617 (pkgdata_MODULES): Added search.mod.
13618 (search_mod_SOURCES): New variable.
13619 (search_mod_CFLAGS): Likewise.
13620
13621 * commands/ls.c (grub_ls_list_disks): Renamed to ...
13622 (grub_ls_list_devices): ... this, and use grub_device_iterate.
13623 All callers changed.
13624
13625 * DISTLIST: Added commands/search.c.
13626
ef095434 136272005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13628
13629 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13630 conversion.
13631 (grub_getcharwidth): New function.
13632
13633 * kern/misc.c (grub_utf8_to_ucs4): New function.
13634
13635 * include/grub/term.h (struct grub_term): Added a new member
13636 "getcharwidth".
13637 (grub_getcharwidth): New prototype.
13638
13639 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13640
13641 * term/i386/pc/console.c (map_char): New function. Segregated from
13642 grub_console_putchar.
13643 (grub_console_putchar): Use map_char.
13644 (grub_console_getcharwidth): New function.
13645 (grub_console_term): Specified grub_console_getcharwidth as
13646 getcharwidth.
13647
13648 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13649 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13650
13651 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13652 GRUB_ERRNO.
13653 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13654 on grub_strtoul completely.
13655 (write_char): Declare local variables in the beginning of the
13656 function.
13657 (grub_vesafb_getcharwidth): New function.
13658 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13659 getcharwidth.
13660
1f0a95e4 136612005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
13662
13663 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13664 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13665 commands/i386/pc/vbetest.c.
13666
13667 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13668 call grub_vbe_get_controller_info again, because the returned
13669 information is volatile.
13670 (grub_vbe_set_video_mode): Mostly rewritten.
13671 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13672 grub_vbe_status_t correctly.
13673 (grub_vbe_get_video_mode_info): Likewise.
13674 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13675 several if statements.
13676
13677 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13678 * commands/i386/pc/vbeinfo.c: ... this.
13679
13680 * commands/i386/pc/vbe_test.c: Renamed to ...
13681 * commands/i386/pc/vbetest.c: ... this.
13682
13683 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13684 ...
13685 (grub_cmd_vbeinfo): ... this. Save video modes before
13686 iterating. Skip a video mode, if it is not available, not enough
13687 information is given or it is monochrome. Show the memory
13688 model. Leave the interpretation of MODEVAR to grub_strtoul
13689 completely.
13690 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13691 (GRUB_MOD_FINI): Likewise.
13692
13693 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13694 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13695 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13696 duplicated grub_env_get. Leave the interpretation of MODEVAR to
13697 grub_strtoul completely.
13698 (real2pm): Removed.
13699 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13700 (GRUB_MOD_FINI): Likewise.
13701
13702 * normal/misc.c: Include grub/mm.h.
13703
13704 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13705 vbe_list_modes with vbetest.mod and vbeinfo.mod.
13706 (vbe_list_modes_mod_SOURCES): Removed.
13707 (vbe_list_modes_mod_CFLAGS): Likewise.
13708 (vbe_test_mod_SOURCES): Likewise.
13709 (vbe_test_mod_CFLAGS): Likewise.
13710 (vbeinfo_mod_SOURCES): New variable.
13711 (vbeinfo_mod_CFLAGS): Likewise.
13712 (vbetest_mod_SOURCES): Likewise.
13713 (vbetest_mod_CFLAGS): Likewise.
13714
992ffbbe 137152005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
13716
13717 * normal/misc.c: New file.
13718
13719 * DISTLIST: Added normal/misc.c.
f19dbdb7 13720
992ffbbe 13721 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13722 DISK to HOOK. Call HOOK with DISK.
13723 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13724 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13725 * partmap/sun.c (sun_partition_map_iterate): Likewise.
13726
13727 * normal/menu_entry.c (struct screen): Added a new member
13728 "completion_shown".
13729 (completion_buffer): New global variable.
13730 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13731 (store_completion): New function.
13732 (complete): Likewise.
13733 (clear_completions): Likewise.
13734 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13735 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13736 a tab, call complete.
13737
13738 * normal/completion.c (disk_dev): Removed.
13739 (print_simple_completion): Likewise.
13740 (print_partition_completion): Likewise.
13741 (print_func): New global variable.
13742 (add_completion): Do not take the arguments WHAT or PRINT any
13743 longer. Added a new argument TYPE. Instead of printing directly,
13744 call PRINT_FUNC if not NULL.
13745 All callers changed.
13746 (complete_device): Use a local variable DEV instead of
13747 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13748 (grub_normal_do_completion): Take a new argument HOOK. Do not
13749 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13750 empty string, return NULL instead.
13751 All callers changed.
13752
13753 * normal/cmdline.c (print_completion): New function.
13754
13755 * kern/partition.c (grub_partition_iterate): Add an argument DISK
13756 to HOOK.
13757 All callers changed.
13758
13759 * kern/disk.c (grub_print_partinfo): Removed.
13760
13761 * include/grub/partition.h (struct grub_partition_map): Add a new
13762 argument DISK into HOOK of ITERATE.
13763 (grub_partition_iterate): Add a new argument DISK to HOOK.
13764
13765 * include/grub/normal.h (enum grub_completion_type): New enum.
13766 (grub_completion_type_t): New type.
13767 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13768 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13769 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13770 (GRUB_COMPLETION_TYPE_FILE): Likewise.
13771 (grub_normal_do_completion): Added a new argument HOOK.
13772 (grub_normal_print_device_info): New prototype.
13773
13774 * include/grub/disk.h (grub_print_partinfo): Removed.
13775
13776 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13777 (normal_mod_SOURCES): Likewise.
13778 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13779 (normal_mod_SOURCES): Likewise.
13780
13781 * commands/ls.c (grub_ls_list_disks): Use
13782 grub_normal_print_device_info instead of grub_print_partinfo. Free
13783 PNAME.
13784 (grub_ls_list_files): Use grub_normal_print_device_info instead of
13785 duplicating the code.
13786
0bd41162 137872005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13788
13789 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 13790 follow GCS more precisely.
13791 * commands/i386/pc/vbe_test.c: Likewise.
13792 * include/grub/i386/pc/vbe.h: Likewise.
13793 * term/i386/pc/vesafb.c: Likewise.
13794 * video/i386/pc/vbe.c: Likewise.
0bd41162 13795
6323696a 137962005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13797
13798 * DISTLIST: Added term/i386/pc/vesafb.c
13799 DISTLIST: Added video/i386/pc/vbe.c
13800 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13801 DISTLIST: Added commands/i386/pc/vbe_test.c.
13802 * commands/i386/pc/vbe_list_modes.c: New file.
13803 * commands/i386/pc/vbe_test.c: Likewise.
13804 * term/i386/pc/vesafb.c: Likewise.
13805 * video/i386/pc/vbe.c: Likewise.
13806 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13807 (grub_vbe_probe) Added prototype.
13808 (grub_vbe_set_video_mode) Likewise.
13809 (grub_vbe_get_video_mode) Likewise.
13810 (grub_vbe_get_video_mode_info) Likewise.
13811 (grub_vbe_set_pixel_rgb) Likewise.
13812 (grub_vbe_set_pixel_index) Likewise.
13813 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13814 (pkgdata_MODULES): Added vesafb.mod.
13815 (pkgdata_MODULES): Added vbe_list_modes.mod.
13816 (pkgdata_MODULES): Added vbe_test.mod.
13817 (vbe_mod_SOURCES): Added.
13818 (vbe_mod_CFLAGS): Likewise.
13819 (vesafb_mod_SOURCES): Likewise.
13820 (vesafb_mod_CFLAGS): Likewise.
13821 (vbe_list_modes_mod_SOURCES): Likewise.
13822 (vbe_list_modes_mod_CFLAGS): Likewise.
13823 (vbe_test_mod_SOURCES): Likewise.
13824 (vbe_test_mod_CFLAGS): Likewise.
13825
0a74e62f 138262005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
13827
0a74e62f 13828 * normal/command.c (grub_command_execute): If INTERACTIVE is
13829 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13830 CMDLINE. Disable the pager if INTERACTIVE is true.
13831 All callers are changed.
13832
13833 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13834 before reading a config file.
13835 * normal/main.c (read_config_file): Even if a command is not
13836 found, register it if it is within an entry.
13837
13838 * util/grub-emu.c: Include sys/types.h and unistd.h.
13839 (options): Added --hold.
13840 (struct arguments): Added a new member "hold".
13841 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13842 missing.
13843 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13844 cleared by a debugger, if it is not zero.
13845
13846 * include/grub/normal.h (grub_command_execute): Add an argument
13847 INTERACTIVE.
13848
e51f85ae 138492005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
13850
13851 * DISTLIST: Added include/grub/i386/pc/vbe.h.
13852
e9c6f39b 138532005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
13854
13855 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13856 program with another one, because the old one didn't detect a bug
13857 in gcc-3.4. Always use regparm 2, because the new test is still
13858 not enough for gcc-4.0. Someone must investigate a simple test
13859 case which detects a bug in gcc-4.0.
13860
8de3495c 138612005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
13862
13863 * DISTLIST: Added normal/completion.c.
13864
13865 * normal/completion.c: New file.
f19dbdb7 13866
8de3495c 13867 * term/i386/pc/console.c (grub_console_getwh): New function.
13868 (grub_console_term): Assign grub_console_getwh to getwh.
13869
13870 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13871 function is defined in normal/completion.c as
13872 grub_normal_do_completion.
13873 (grub_cmdline_get): Use grub_normal_do_completion instead of
13874 grub_tab_complete.
13875
13876 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13877 returns non-zero, otherwise return 0.
13878 (grub_partition_iterate): First, probe the partition map. Then,
13879 call ITERATE only for this partition map.
13880
13881 * kern/misc.c (grub_strncmp): Rewritten.
13882
13883 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13884 returns non-zero. Otherwise return 0.
13885
13886 * include/grub/partition.h (grub_partition_map_iterate): Return
13887 int instead of void.
13888
13889 * include/grub/normal.h (grub_normal_do_completion): New prototype.
13890
13891 * include/grub/misc.h (grub_strncmp): Change the type of N to
13892 grub_size_t.
13893
13894 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13895 of void.
13896
13897 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 13898 unsigned explicitly before comparing it with I.
8de3495c 13899
13900 * kern/main.c (grub_env_write_root): Add the attribute unused into
13901 VAR.
13902
13903 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13904 normal/completion.c.
13905 (normal_mod_SOURCES): Likewise.
13906 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13907 (normal_mod_SOURCES): Likewise.
13908
13909 * normal/command.c (grub_iterate_commands): If ITERATE returns
13910 non-zero, return one immediately.
13911
e85e144b 139122005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
13913
13914 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13915 * kern/i386/pc/startup.S: Updated Global Descriptor table's
13916 descriptions.
13917 (grub_vbe_get_controller_info): New function.
13918 (grub_vbe_get_mode_info): Likewise.
13919 (grub_vbe_set_mode): Likewise.
13920 (grub_vbe_get_mode): Likewise.
13921 (grub_vbe_set_memory_window): Likewise.
13922 (grub_vbe_get_memory_window): Likewise.
13923 (grub_vbe_set_scanline_length): Likewise.
13924 (grub_vbe_get_scanline_length): Likewise.
13925 (grub_vbe_set_display_start): Likewise.
13926 (grub_vbe_get_display_start): Likewise.
13927 (grub_vbe_set_palette_data): Likewise.
13928 * include/grub/i386/pc/vbe.h: New file.
13929
c46153d2 139302005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13931
13932 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13933 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13934 * DISTLIST: Likewise.
13935 * kern/ieee1275/of.c: Moved to ...
13936 * kern/ieee1275/ieee1275.c: ... here.
13937
0cb90c45 139382005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13939
13940 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13941 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13942 Pass 0 as `end' parameter to grub_strtoul().
13943
a19fb360 139442005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13945
13946 * include/grub/powerpc/ieee1275/console.h: Do not include
13947 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
13948 ifdef.
13949 (grub_console_cur_color): Remove i386-specific prototype.
13950 (grub_console_real_putchar): Likewise.
13951 (grub_console_checkkey): Likewise.
13952 (grub_console_getkey): Likewise.
13953 (grub_console_getxy): Likewise.
13954 (grub_console_gotoxy): Likewise.
13955 (grub_console_cls): Likewise.
13956 (grub_console_setcursor): Likewise.
13957 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13958 Include <grub/machine/console.h>.
13959 * term/ieee1275/ofconsole.c: Likewise.
13960
4ac9bd04 139612005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
13962
13963 * Makefile.in (LIBLZO): New variable.
13964
13965 * configure.ac: Check for LZO version 2.
13966
13967 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13968 lzo/lzo1x.h instead of lzo1x.h.
13969
13970 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13971 of -llzo.
13972
13973 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13974 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13975
13976 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13977 copying the data from PARTITION to P.
13978
f4917dfd 139792005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13980
13981 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13982 negative, unload the module.
13983
13984 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13985 map is "pc_partition_map" but not "pc".
13986 (usage): Fix the description. The options are --boot-image and
13987 --core-image but not --boot-file or --core-file.
13988 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13989 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13990 DEFAULT_DIRECTORY.
13991
13992 * util/i386/pc/grub-install.in: Do not specify --boot-file or
13993 --core-file. Specify INSTALL_DEVICE as an argument.
13994
13995 * util/console.c: Include config.h.
13996 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13997 [HAVE_NCURSES_H]: Include ncurses.h.
13998 [HAVE_CURSES_H]: Include curses.h.
13999 [!A_NORMAL] (A_NORMAL): Defined as zero.
14000 [!A_STANDOUT] (A_STANDOUT): Likewise.
14001
14002 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14003 -lncurses.
14004 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14005
14006 * configure.ac: Check for curses libraries and headers.
14007
14008 * Makefile.in (LIBCURSES): New variable.
14009
14010 * genmk.rb (Script::rule): Set the executable bits.
14011
14012 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14013 name of the PC partition map is "pc_partition_map" but not "pc".
14014
0e143073 140152005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14016
14017 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14018 (modules): Likewise.
14019 (usage): Added descriptions for --modules and --grub-probefs.
14020 Handle --modules and --grub-probefs. Save the arguments in MODULES
14021 and GRUB_PROBEFS, respectively.
14022 Auto-detect a filesystem module against GRUBDIR. If the result is
14023 empty and modules are not specified explicitly, abort the
14024 installation. Add the result to MODULES.
14025
14026 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14027 disk/powerpc/ieee1275/ofdisk.c,
14028 include/grub/powerpc/ieee1275/init.h and
14029 term/powerpc/ieee1275/ofconsole.c.
14030 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14031 term/ieee1275/ofconsole.c.
14032
14033 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14034
14035 * COPYING: Upgraded to the latest version. Only the address of the
14036 FSF office has changed.
f19dbdb7 14037
efd6e6d5 140382005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14039
14040 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14041 kern/ieee1275.c with kern/ieee1275/of.c.
14042
14043 * kern/ieee1275.c: Moved to ...
14044 * kern/ieee1275/of.c: ... here.
14045
8ceafda2 140462005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14047
14048 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 14049 readability.
8ceafda2 14050
14051 * config.guess: Updated to the latest version from gnulib.
14052 * config.sub: Likewise.
14053 * install.sh: Likewise.
14054 * mkinstalldirs: Likewise.
14055
14056 * include/grub/console.h: Removed. This file is arch-specific. Do
14057 not put this in include/grub.
14058
14059 * include/grub/i386/pc/console.h: Resurrected.
14060
14061 * util/console.c: Include grub/machine/console.h instead of
14062 grub/console.h.
14063 * util/grub-emu.c: Likewise.
14064
267f6cd9 140652005-08-04 Marco Gerards <metgerards@student.han.nl>
14066
14067 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14068 hardcoded value.
f19dbdb7 14069
267f6cd9 14070 From Vincent Pelletier <subdino2004@yahoo.fr>
14071 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14072 Redefined to use grub_getwh.
14073 (grub_term): New member named getwh.
14074 (grub_getwh): New prototype.
14075 * kern/term.c (grub_getwh): New function.
14076 * term/i386/pc/console.c (grub_console_getwh): New function.
14077 (grub_console_term): New member `getwh'.
14078 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14079 (grub_vga_term): New member `getwh'.
0b5abe02 14080 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 14081 grub_ssize_t.
14082 (grub_ofconsole_getw): New function.
14083 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14084 (grub_ofconsole_term): New field named getwh and new initial
14085 value.
14086
3be7266d 140872005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14088
14089 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14090 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14091 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14092 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14093 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14094 of <grub/machine/ieee1275.h>.
14095 * commands/ieee1275/reboot.c: Likewise.
14096 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14097 * kern/ieee1275.c: ... to here. All users updated. Change all
14098 parameter structs to use new type `grub_ieee1275_cell_t'.
14099 * term/powerpc/ieee1275/ofconsole.c: Move ...
14100 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14101 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14102 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14103 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14104 to return int.
14105 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14106 Remove unused prototypes. All users updated.
14107 * include/grub/powerpc/ieee1275/console.h: Removed.
14108 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14109 `grub_ieee1275_cell_t'.
14110 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14111 Cast comparisons with -1 to the correct type.
14112 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14113 type to match `grub_ieee1275_entry_fn'.
14114
8b5f3938 141152005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14116
14117 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14118
14119 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14120 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14121 partmap/sun.c.
14122 (grub_probefs_SOURCES): New variable.
14123
14124 * util/i386/pc/grub-probefs.c: New file.
14125
14126 * util/i386/pc/grub-setup.c (main): Call
14127 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14128 grub_hfs_init and grub_jfs_init to initialize the system. Call
14129 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14130 grub_pc_partition_map_fini to finish the system.
14131
ea409713 141322005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14133
14134 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14135 function.
14136 (grub_multiboot_load_elf32): Likewise.
14137 (grub_multiboot_is_elf64): Likewise.
14138 (grub_multiboot_load_elf64): Likewise.
14139 (grub_multiboot_load_elf): Likewise.
14140 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14141 an ELF32 or ELF64 file.
14142 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14143
14144 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14145 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14146 NULL before calling FS->LABEL.
14147 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14148 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14149 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14150 before calling FS->LABEL.
14151
141a288b 141522005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14153
14154 * util/i386/pc/grub-install.in (datadir): New variable.
14155 (libdir): Removed.
14156 (pkgdatadir): New variable.
14157 (pkglibdir): Removed.
14158
0d5f8a54 141592005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14160
14161 * DISTLIST: Added util/i386/pc/grub-install.in.
14162
14163 * util/i386/pc/grub-install.in: New file.
14164
14165 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14166 (grub_install_SOURCES): Likewise.
14167
14168 * genmk.rb: Added support for scripts.
14169 (Script): New class.
14170 (scripts): New variable.
14171
14172 * Makefile.in (install-local): Install sbin_SCRIPTS by
14173 INSTALL_SCRIPT.
14174 (uninstall): Remove sbin_SCRIPTS.
14175
14176 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14177 device, try to get a GRUB device by
14178 grub_util_biosdisk_get_grub_dev.
14179 Free DEST_DEV.
14180
14181 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14182 description for --device-map.
14183
5f968e1e 141842005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14185
14186 Change the semantics of variable hooks. They now return strings
14187 instead of error values.
f19dbdb7 14188
5f968e1e 14189 * util/i386/pc/grub-setup.c: Include grub/env.h.
14190 (setup): Use grub_device_set_root instead of grub_env_set.
14191
14192 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14193 grub_env_get instead of grub_device_set_root and
14194 grub_device_get_root, respectively.
14195
14196 * kern/main.c (grub_env_write_root): New function.
14197 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14198 grub_env_set instead of grub_device_set_root.
14199
14200 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14201 many variables.
14202 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14203 rather than calling ENV->WRITE_HOOK afterwards.
14204 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14205 passing a pointer of a pointer.
14206 (grub_register_variable_hook): Change the types of "read_hook" and
14207 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14208 respectively.
14209 Allocate the default empty string on the heap, because this string
14210 may be freed later.
14211
14212 * kern/device.c: Include grub/env.h.
14213 (grub_device_set_root): Removed.
14214 (grub_device_get_root): Likewise.
14215 (grub_device_open): Use grub_env_get instead of
14216 grub_device_get_root.
14217
14218 * include/grub/env.h (grub_env_read_hook_t): New type.
14219 (grub_env_write_hook_t): Likewise.
14220 (grub_env_var): Change the types of "read_hook" and "write_hook"
14221 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14222 (grub_register_variable_hook): Likewise.
14223
14224 * include/grub/device.h (grub_device_set_root): Removed.
14225 (grub_device_set_root): Likewise.
14226
14227 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14228 make sure that DIRNAME terminates with '/', so that
14229 grub_fat_find_dir will fail if PATH is not a directory.
14230
14231 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14232 from DIRNAME.
14233 Use the qualifier auto for print_files and print_files_long.
14234 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14235 as a regular file.
14236 Put a newline only if there is no error.
14237 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14238 used.
14239
896f0afd 142402005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14241
14242 * kern/partition.c (grub_partition_probe): Initialize PART to
14243 NULL. Otherwise, when no partition map is registered, this returns
14244 a garbage.
14245
b28b81b2 142462005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14247
14248 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14249 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14250 valid.
14251
5f3607e0 142522005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14253
14254 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14255 information on each device, if it does not have partitions. Print
14256 "Device" instead of "Disk", because this function is not specific
14257 to disk devices.
14258
14259 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14260 static to ensure that it is put on the memory rather than a
14261 register.
14262
502c87e8 142632005-07-17 Yoshinori Okuji <okuji@enbug.org>
14264
14265 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14266 (grub_cat_init): Likewise.
14267 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14268 (options): Likewise.
14269 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14270 (grub_configfile_init): Likewise.
14271 * font/manager.c (GRUB_MOD_INIT): Likewise.
14272 * commands/help.c (GRUB_MOD_INIT): Likewise.
14273 (grub_help_init): Likewise.
14274 * normal/command.c (grub_command_init): Likewise.
14275 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14276 * disk/loopback.c (grub_loop_init): Likewise.
14277 (GRUB_MOD_INIT): Likewise.
14278 * commands/ls.c (grub_ls_init): Likewise.
14279 (GRUB_MOD_INIT): Likewise.
14280 (options): Likewise.
14281 * commands/boot.c (grub_boot_init): Likewise.
14282 (GRUB_MOD_INIT): Likewise.
14283 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14284 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14285 (GRUB_MOD_INIT): Likewise.
14286 * commands/cmp.c (grub_cmp_init): Likewise.
14287 (GRUB_MOD_INIT): Likewise.
14288
14289 * normal/arg.c: Use <> instead of "" to include header files.
14290 (SHORT_ARG_HELP): New macro.
14291 (SHORT_ARG_USAGE): Likewise.
14292 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14293 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14294 descriptions.
14295 (find_short): Check if C is 'h' or 'u' explicitly.
14296 (grub_arg_show_help): Use space characters instead of tabs. Treat
14297 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14298 are shown with --help and --usage only if they are not used for
14299 the command itself.
14300 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14301 'h' and 'u'.
14302
14303 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14304 const into "longarg". Change the type of "shortarg" to int.
14305
f806d18e 143062005-07-17 Yoshinori Okuji <okuji@enbug.org>
14307
14308 * boot/i386/pc/boot.S (boot_drive_check): New label.
14309
14310 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14311 macro.
14312
14313 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14314 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14315
e293232b 143162005-07-17 Yoshinori Okuji <okuji@enbug.org>
14317
14318 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14319 When turning off Gate A20, skip the check and return immediately,
14320 because this is not fatal usually.
14321
ebedfd00 143222005-07-17 Yoshinori Okuji <okuji@enbug.org>
14323
14324 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14325 be 0x7C00 instead of 0x8000.
14326
14327 * boot/i386/pc/pxeboot.S: Rewritten.
14328
14329 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14330 EXT_C.
14331 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14332 result.
14333
654fc59f 143342005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14335
14336 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14337 robustness. This routine now supports a BIOS call and System
14338 Control Port A to modify the gate A20.
14339
14340 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14341 Increased to 0x440.
14342
09f9923f 143432005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14344
14345 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14346 device path and resulting ihandle.
14347 (grub_ofdisk_close): dprintf the ihandle being closed.
14348 (grub_ofdisk_read): dprintf function parameters.
14349 * kern/mm.c (grub_mm_init_region): Likewise.
14350 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14351 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14352 size, and boot arguments.
14353 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14354 before loading into memory.
14355 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14356 before loading into memory.
14357
7ef504d8 143582005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14359
14360 * kern/mm.c: Added much documentation.
14361 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14362 8, set to 5 instead of 8.
14363
e0f050c2 143642005-07-10 Yoshinori Okuji <okuji@enbug.org>
14365
14366 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14367
14368 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14369 (grub_mkdevicemap_SOURCES): New variable.
14370
14371 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14372 lib/device.c of GRUB Legacy.
14373
7224189a 143742005-07-10 Yoshinori Okuji <okuji@enbug.org>
14375
14376 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14377 instead of PATH is NULL.
14378
68c864eb 143792005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14380
14381 * commands/cmp.c (BUFFER_SIZE): New macro.
14382 (grub_cmd_cmp): Close the right file at the right time. Compare
14383 only data just read. Don't report files of different size as
14384 identical. Dynamically allocate buffers. Move variable
14385 declarations at the beginning of function.
14386
e6f3e614 143872005-07-09 Yoshinori Okuji <okuji@enbug.org>
14388
14389 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14390 reverse.
14391
f8f1559a 143922004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14393
14394 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14395 when backspace is pressed at beginning of line.
14396
39c9d41d 143972005-07-03 Yoshinori Okuji <okuji@enbug.org>
14398
14399 * DISTLIST: Added genfslist.sh.
14400
14401 * normal/main.c (fs_module_list): New variable.
14402 (autoload_fs_module): New function.
14403 (read_fs_list): Likewise.
14404 (grub_normal_execute): Call read_fs_list.
14405
14406 * kern/fs.c (grub_fs_autoload_hook): New variable.
14407 (grub_fs_probe): Added support for auto-loading.
14408
14409 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14410 (grub_fs_module_list_t): New type.
14411
14412 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14413 (grub_fs_autoload_hook): New prototype.
14414
14415 * genfslist.sh: New file.
f19dbdb7 14416
39c9d41d 14417 * genmk.rb: Added a rule to generate a filesystem list.
14418
121c1d83 144192005-06-30 Marco Gerards <metgerards@student.han.nl>
14420
14421 * configure.ac: Fix the test for cross-compiling.
14422
14423 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14424 define GRUB_UTIL anymore.
14425
14426 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14427 so this function works on other systems than just big endian.
14428 (load_modules): Likewise.
14429 (add_segments): Likewise.
14430
e75d76e1 144312005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14432
14433 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14434 contains `l' modifier, get a long from va_arg().
14435
50b5a0a7 144362005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14437
14438 * kern/mm.c (grub_free): If the next free block which is being
14439 merged is the first free block, set the first block to the block
14440 being freed.
14441 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14442
89371b20 144432005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14444
14445 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14446 `grub_ieee1275_chosen'.
14447
168d6e58 144482005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14449
14450 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14451 (grub_ieee1275_chosen): New variable.
14452 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14453 `chosen'.
14454 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14455 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14456 Rename first argument to `phandle' for consistency.
14457 (grub_ieee1275_get_property_length): Likewise.
14458 (grub_ieee1275_next_property): Likewise. Change type of first argument
14459 to grub_ieee1275_phandle_t.
14460 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14461 Move export next to declaration.
14462 (grub_ieee1275_chosen): New variable.
14463 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14464 Correct cosmetic typo.
14465 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14466 `grub_ieee1275_chosen'.
14467 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14468 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14469 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14470 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14471 `grub_ieee1275_chosen'.
14472
ca5baa3f 144732005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14474
14475 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14476 /chosen/bootargs.
14477 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14478 /chosen/bootargs as "variable=value" pairs.
14479
708b345f 144802005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14481
14482 * include/grub/misc.h (grub_dprintf): New macro.
14483 (grub_real_dprintf): New prototype.
14484 (grub_strword): Likewise.
14485 (grub_iswordseparator): Likewise.
14486 * kern/misc.c (grub_real_dprintf): New function.
14487 (grub_strword): Likewise.
14488 (grub_iswordseparator): Likewise.
14489
f4c5e67c 144902005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14491
14492 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14493 (roundup): Remove macro.
14494 (grub_ieee1275_flags): Make static.
14495 (grub_ieee1275_realmode): Remove.
14496 (grub_ieee1275_test_flag): New function.
14497 (grub_ieee1275_set_flag): Likewise.
14498 (find_options): Rename to `grub_ieee1275_find_options'; update
14499 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14500 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14501 (cmain): New prototype.
14502 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14503 `grub_ieee1275_flags' directly.
14504 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14505 machine/biosdisk.h.
14506 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14507 Don't include grub/machine/init.h.
14508 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14509 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14510 Remove prototype.
14511 (grub_ieee1275_realmode): Likewise.
14512 (grub_ieee1275_flag): New enum.
14513 (grub_ieee1275_test_flag): New prototype.
14514 (grub_ieee1275_set_flag): New prototype.
14515 * include/grub/powerpc/ieee1275/init.h: Remove file.
14516 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14517 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14518 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
14519 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
14520 comment.
14521 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14522 `grub_ieee1275_test_flag'.
14523 (grub_ieee1275_encode_devname): Likewise.
14524
ed16607e 145252005-04-21 Hollis Blanchard <hollis@penguinppc.org>
14526
14527 * include/grub/powerpc/ieee1275/ieee1275.h
14528 (grub_ieee1275_encode_devname): New prototype.
14529 (grub_ieee1275_get_filename): Likewise.
14530 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14531 function.
14532 (grub_set_prefix): Likewise.
14533 (grub_machine_init): Call grub_set_prefix.
14534 * kern/powerpc/ieee1275/openfw.c: Fix typos.
14535 (grub_parse_type): New enum.
14536 (grub_ieee1275_get_devargs): New function.
14537 (grub_ieee1275_get_devname): Likewise.
14538 (grub_ieee1275_parse_args): Likewise.
14539 (grub_ieee1275_get_filename): Likewise.
14540 (grub_ieee1275_encode_devname): Likewise.
14541
be369920 145422005-03-30 Marco Gerards <metgerards@student.han.nl>
14543
14544 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14545 `grub_loader_unset'.
14546
a5ce3a4a 145472005-03-26 Hollis Blanchard <hollis@penguinppc.org>
14548
14549 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14550 instead of grub_ieee1275_interpret.
14551 (grub_halt_init): New function.
14552 (grub_halt_fini): Likewise.
14553 (GRUB_MOD_INIT): Correct message grammar.
14554 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14555 instead of grub_ieee1275_interpret.
14556 (grub_reboot_init): New function.
14557 (grub_reboot_fini): Likewise.
14558 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14559 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14560 util/i386/pc/misc.c with commands/ieee1275/halt.c,
14561 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14562 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14563 function.
14564 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14565 Add prototype.
14566 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14567 prototype.
14568 (grub_halt): Likewise.
14569 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14570 (cmain): Remove __attribute__((unused)).
14571 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14572 (grub_heap_len): Likewise.
14573 (grub_machine_fini): New function.
14574 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14575 (grub_halt): Likewise.
14576 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14577 function.
14578 * util/powerpc/ieee1275/misc.c: New file.
14579
0058f771 145802005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14581
14582 * DISTLIST: New file.
14583 * gendistlist.sh: Likewise.
f19dbdb7 14584
0058f771 14585 * Makefile.in (COMMON_DISTFILES): Removed.
14586 (BOOT_DISTFILES): Likewise.
14587 (CONF_DISTFILES): Likewise.
14588 (DISK_DISTFILES): Likewise.
14589 (FS_DISTFILES): Likewise.
14590 (INCLUDE_DISTFILES): Likewise.
14591 (KERN_DISTFILES): Likewise.
14592 (LOADER_DISTFILES): Likewise.
14593 (TERM_DISTFILES): Likewise.
14594 (UTIL_DISTFILES): Likewise.
14595 (DISTFILES): Likewise.
14596 (uninstall): Uninstall files in $(pkgdata_DATA).
14597 (DISTLIST): New target.
14598 (distdir): Use the contents of the file DISTLIST to get a list of
14599 distributed files.
14600
46b3b8a5 146012005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14602
14603 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14604 descriptor. This is ported from GRUB Legacy.
14605
14606 * gencmdlist.sh: Added an extra semicolon to make it work with
14607 old sed versions. Reported by Robert Bihlmeyer
14608 <robbe@orcus.priv.at>.
14609
5822ff87 146102005-03-08 Yoshinori Okuji <okuji@enbug.org>
14611
14612 Automatic loading of commands is supported.
f19dbdb7 14613
5822ff87 14614 * normal/main.c (read_command_list): New function.
14615 (grub_normal_execute): Call read_command_list.
14616
14617 * normal/command.c (grub_register_command): Return zero or CMD.
14618 Allocate CMD->NAME from the heap.
14619 Initialize CMD->MODULE_NAME to zero.
14620 Find the same name as well. If the same command is found and it is
14621 a dummy command, overwrite members. If it is not a dummy command,
14622 return zero.
14623 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14624 (grub_command_find): If a dummy command is found, load a module
14625 and retry to find a command only once.
14626
14627 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14628 make sure that each command is loaded.
14629
14630 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14631 macro.
14632 (struct grub_command): Remove const from the member `name'.
14633 Add a new member `module_name'.
14634 (grub_register_command): Return grub_command_t.
14635
14636 * commands/help.c (grub_cmd_help): Call grub_command_find to make
14637 sure that each command is loaded.
14638
14639 * genmk.rb (PModule::rule): Specify a module name without the
14640 suffix ".mod" to gencmdlist.sh.
14641
7b1f4b57 146422005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14643
14644 * gencmdlist.sh: New file.
f19dbdb7 14645
7b1f4b57 14646 * genmk.rb (PModule::rule): Generate a rule for a command list.
14647 Clean command.lst.
14648 Generate command.lst from $(COMMANDFILES).
14649
14650 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14651 (DATA): Added $(pkgdata_DATA).
14652 (install-local): Install files in $(pkgdata_DATA).
14653
062aaf39 146542005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14655
14656 * term/i386/pc/vga.c (debug_command): Removed.
14657 (GRUB_MOD_INIT): Do not register the command "debug".
14658
14659 From Hollis Blanchard:
14660 * commands/configfile.c: New file.
14661 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14662 commands/configfile.c.
14663 (pkgdata_MODULES): Added configfile.mod.
14664 (configfile_mod_SOURCES): New variable.
14665 (configfile_mod_CFLAGS): Likewise.
14666 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14667 commands/configfile.c.
14668 (pkgdata_MODULES): Added configfile.mod.
14669 (configfile_mod_SOURCES): New variable.
14670 (configfile_mod_CFLAGS): Likewise.
14671 * util/grub-emu.c (main): Call grub_configfile_init and
14672 grub_configfile_fini.
14673 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14674 prototype.
14675 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 14676
cee01aa6 146772005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14678
14679 * normal/arg.c (grub_arg_show_help): Do not show the bug report
14680 address.
14681
14682 * commands/help.c (grub_cmd_help): Do not print newlines after
14683 the last command in print_command_help.
14684
93f3a1d8 146852005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14686
14687 * commands/default.h: New file.
14688 * commands/timeout.h: Likewise.
14689 * normal/context.c: Likewise.
f19dbdb7 14690
93f3a1d8 14691 * util/misc.c: Do not include sys/times.h.
14692 Include sys/time.h and grub/machine/time.h.
14693 (grub_get_rtc): Rewritten with gettimeofday.
14694
14695 * util/grub-emu.c (main): Call grub_default_init and
14696 grub_timeout_init before grub_normal_init, and call
14697 grub_timeout_fini and grub_default_fini after grub_main.
14698
14699 * util/console.c (grub_ncurses_checkkey): Return the read
14700 character or -1.
14701
14702 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14703 timeouts.
14704
14705 * normal/main.c (read_config_file): Push MENU. If this fails,
14706 print an error and wait for a user input.
14707 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14708 If a menu is empty or an error occurs, pop MENU.
14709 (grub_normal_execute): Pop and free MENU after grub_menu_run
14710 returns.
14711
14712 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14713
14714 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14715 include time.h.
14716 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14717 without GRUB_UTIL.
14718 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14719 time.h.
14720 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14721 without GRUB_UTIL.
14722
14723 * include/grub/normal.h (struct grub_menu_list): New struct.
14724 (grub_menu_list_t): New type.
14725 (struct grub_context): New struct.
14726 (grub_context_t): New type.
14727 (grub_register_command): Got rid of EXPORT_FUNC.
14728 (grub_unregister_command): Likewise.
14729 (grub_context_get): New prototype.
14730 (grub_context_get_current_menu): Likewise.
14731 (grub_context_push_menu): Likewise.
14732 (grub_context_pop_menu): Likewise.
14733 [GRUB_UTIL] (grub_default_init): Likewise.
14734 [GRUB_UTIL] (grub_default_fini): Likewise.
14735 [GRUB_UTIL] (grub_timeout_init): Likewise.
14736 [GRUB_UTIL] (grub_timeout_fini): Likewise.
14737
14738 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14739 commands/timeout.c and normal/context.c.
14740 (pkgdata_MODULES): Added default.mod and timeout.mod.
14741 (normal_mod_SOURCES): Added normal/context.c.
14742 (default_mod_SOURCES): New variable.
14743 (default_mod_CFLAGS): Likewise.
14744 (timeout_mod_SOURCES): Likewise.
14745 (timeout_mod_CFLAGS): Likewise.
14746 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14747 conf/i386-pc.rmk.
14748 (pkgdata_MODULES): Added default.mod and timeout.mod.
14749 (normal_mod_SOURCES): Added normal/context.c.
14750 (default_mod_SOURCES): New variable.
14751 (default_mod_CFLAGS): Likewise.
14752 (timeout_mod_SOURCES): Likewise.
14753 (timeout_mod_CFLAGS): Likewise.
14754
14755 * Makefile.in (all-local): Added $(MKFILES).
14756
4ed2e1dd 147572005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
14758
14759 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14760 (grub_emu_SOURCES): Likewise.
14761 (pkgdata_MODULES): Add `sun.mod'.
14762 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14763 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14764 `partmap/sun.c'.
14765 (pkgdata_MODULES): Add `sun.mod'.
14766 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14767 * include/grub/partition.h (grub_sun_partition_map_init): New
14768 prototype.
14769 (grub_sun_partition_map_fini): Likewise.
14770 * partmap/sun.c: New file.
14771 * util/grub-emu.c (main): Initialize and de-initialize the sun
14772 partitionmap support.
14773
4d4e372e 147742005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
14775
14776 This implements an Emacs-like menu entry editor.
f19dbdb7 14777
4d4e372e 14778 * normal/menu_entry.c: New file.
f19dbdb7 14779
4d4e372e 14780 * util/console.c (grub_ncurses_putchar): Translate some Unicode
14781 characters to ASCII.
14782 (saved_char): New variable.
14783 (grub_ncurses_checkkey): Rewritten completely.
14784 (grub_ncurses_getkey): Likewise.
14785 (grub_ncurses_init): Call raw instead of cbreak.
14786
14787 * normal/menu.c (print_entry): Do not put a space.
14788 (init_page): Renamed to ...
14789 (grub_menu_init_page): ... this. All callers changed.
14790 (edit_menu_entry): Removed.
14791 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14792
14793 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14794
14795 * kern/misc.c (grub_vprintf): Call grub_refresh.
14796
14797 * normal/menu.c (DISP_LEFT): Renamed to ...
14798 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14799 * normal/menu.c (DISP_UP): Renamed to ...
14800 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14801 * normal/menu.c (DISP_RIGHT): Renamed to ...
14802 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14803 * normal/menu.c (DISP_DOWN): Renamed to ...
14804 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14805 * normal/menu.c (DISP_HLINE): Renamed to ...
14806 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14807 * normal/menu.c (DISP_VLINE): Renamed to ...
14808 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14809 * normal/menu.c (DISP_UL): Renamed to ...
14810 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14811 * normal/menu.c (DISP_UR): Renamed to ...
14812 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14813 * normal/menu.c (DISP_LL): Renamed to ...
14814 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14815 * normal/menu.c (DISP_LR): Renamed to ...
14816 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14817 * normal/menu.c (TERM_WIDTH): Renamed to ...
14818 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14819 * normal/menu.c (TERM_HEIGHT): Renamed to ...
14820 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14821 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14822 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14823 * normal/menu.c (TERM_MARGIN): Renamed to ...
14824 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14825 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14826 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14827 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14828 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14829 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14830 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14831 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14832 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14833 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14834 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14835 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14836 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14837 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14838 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14839 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14840 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14841 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14842 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14843 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14844 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14845 All callers changed.
14846
14847 * include/grub/normal.h: New prototype.
14848
14849 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14850 normal/menu_entry.c.
14851 (normal_mod_SOURCES): Likewise.
14852 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14853 (normal_mod_SOURCES): Likewise.
14854
e6b92c8a 148552005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
14856
14857 * include/grub/normal.h (grub_halt_init): New prototype.
14858 (grub_halt_fini): Likewise.
14859 (grub_reboot_init): Likewise.
14860 (grub_reboot_fini): Likewise.
14861
14862 * util/grub-emu.c: Include signal.h.
14863 (main_env): New global variable.
14864 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14865 catch C-c.
14866 (grub_machine_fini): New function.
14867 (main): Call grub_halt_init and grub_reboot_init before
14868 grub_main, and grub_reboot_fini and grub_halt_fini after it.
14869 Call setjmp with MAIN_ENV to go back afterwards.
14870 Call grub_machine_fini right before return.
14871
14872 * include/grub/util/misc.h: Include setjmp.h.
14873 (main_env): New prototype.
14874
14875 * include/grub/kernel.h (grub_machine_fini): New prototype.
14876 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14877 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14878
14879 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14880 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14881 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 14882
e6b92c8a 14883 * util/i386/pc/misc.c: New file.
f19dbdb7 14884
e6b92c8a 14885 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14886 util/i386/pc/misc.c, commands/i386/pc/halt.c and
14887 commands/i386/pc/reboot.c.
14888
c642636f 148892005-02-14 Guillem Jover <guillem@hadrons.org>
14890
14891 * include/grub/dl.h (grub_dl_check_header): New prototype.
14892 (grub_arch_dl_check_header): Change return type to grub_err_t,
14893 remove size parameter and export function. Update all callers.
14894 * kern/dl.c (grub_dl_check_header): New function.
14895 (grub_dl_load_core): Use `grub_dl_check_header' instead of
14896 `grub_arch_dl_check_header'. Check ELF type. Check if sections
14897 are inside the core.
14898 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14899 independent ELF header checks.
14900 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14901 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14902 `grub_dl_check_header' instead of explicit checks. Check for the
14903 ELF type.
14904 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14905 `grub_dl_check_header' instead of explicit checks. Remove arch
14906 specific ELF header checks.
14907
e6b92c8a 14908 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14909 argument SIZE.
14910
5eabe94b 149112005-02-13 Hollis Blanchard <hollis@penguinppc.org>
14912
14913 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14914 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14915
1b14a681 149162005-02-12 Hollis Blanchard <hollis@penguinppc.org>
14917
14918 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 14919 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 14920 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 14921 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 14922 * partmap/amiga.c (amiga_partition_map_iterate): Return
14923 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14924 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14925
aca108aa 149262005-02-01 Guillem Jover <guillem@hadrons.org>
14927
14928 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14929 help info.
14930
c9f9c556 149312005-01-31 Marco Gerards <metgerards@student.han.nl>
14932
14933 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14934 Removed prototype.
14935 (grub_rescue_cmd_linux): New prototype.
14936 (grub_rescue_cmd_initrd): Likewise.
14937 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14938 `bi_rec'.
14939 (grub_linux_release_mem): Release the memory for the initrd.
14940 (grub_load_linux): Renamed from this...
14941 (grub_rescue_cmd_linux): ...To this. Changed all callers.
14942 Changed `entry' not to be static. Loop over memory regions to
14943 find another one when the default fails.
14944 (grub_rescue_cmd_initrd): New function.
14945 (grub_linux_init): Remove function.
14946 (grub_linux_fini): Likewise.
14947 (GRUB_MOD_INIT): Register `initrd'.
14948 (GRUB_MOD_FINI): Unregister `initrd'.
14949 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14950 Function removed.
14951 (grub_linux_normal_fini): Likewise.
14952 (GRUB_MOD_INIT): Register `initrd'.
14953 (GRUB_MOD_FINI): Unregister `initrd'.
14954
990cf3aa 149552005-01-31 Marco Gerards <metgerards@student.han.nl>
14956
14957 * commands/help.c: New file.
14958 * normal/arg.c (show_help): Renamed to...
14959 (grub_arg_show_help): ... this.
14960 * commands/i386/pc/halt.c: New file.
14961 * commands/i386/pc/reboot.c: Likewise.
14962 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14963 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14964 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14965 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14966 variables.
14967 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14968 `commands/help.c'.
14969 (pkgdata_MODULES): Add `help.mod'.
14970 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14971 * grub/i386/pc/init.h (grub_reboot): New prototype.
14972 (grub_halt): Likewise.
14973 * include/grub/normal.h (grub_arg_show_help): New prototype.
14974 (grub_help_init): Likewise.
14975 (grub_help_fini): Likewise.
14976 * util/grub-emu.c (main): Initialize and deinitialize the help
14977 command.
14978
14979 * normal/cmdline.c (grub_cmdline_get): Doc fix.
14980
14981 * normal/command.c (grub_command_init): Fixed the description of
14982 the `set' and `unset' commands.
14983
149842005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 14985
14986 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14987 function.
14988 * commands/ieee1275/halt.c: New file.
14989 * commands/ieee1275/reboot.c: Likewise.
14990 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14991 `__attribute__ ((unused))'. Some GCS related fixed.
14992 (grub_suspend_init) [GRUB_UTIL]: Function removed.
14993 (grub_suspend_fini): Likewise.
14994 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14995 and `halt.mod'.
14996 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14997 (halt_mod_CFLAGS): New variables.
14998 * include/grub/powerpc/ieee1275/ieee1275.h
14999 (grub_ieee1275_interpret): New prototype.
15000
1ab09cc7 150012005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15002
15003 * include/grub/misc.h (memmove): New prototype.
15004 (memcpy): Likewise.
15005
8b8cbdb2 150062005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15007
15008 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15009 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15010
e3741a27 150112005-01-22 Marco Gerards <metgerards@student.han.nl>
15012
15013 * kern/misc.c (grub_strndup): Function rewritten.
15014
776bd780 150152005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15016
15017 * normal/menu.c (TERM_WIDTH): Macro redefined.
15018 (TERM_TOP_BORDER_Y): Likewise.
15019 (draw_border): Replaced while-loop by a for-loop. Make the number
15020 of lines consistent with the number of lines displayed in
15021 print_entries. Added a margin below the rectangle.
15022 (print_entry): Make the entry fit in the rectangle.
15023 (print_entries): Display the scroll arrows next to the right
15024 border.
15025
78026bce 150262005-01-21 Marco Gerards <metgerards@student.han.nl>
15027
15028 * fs/minix.c (grub_minix_find_file): Reserve more space for
15029 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15030 `grub_strncpy' to copy `path' into it.
15031
67bbaf0f 150322005-01-21 Marco Gerards <metgerards@student.han.nl>
15033
15034 Add the loopback device, a device via which files can be accessed
15035 as devices.
f19dbdb7 15036
67bbaf0f 15037 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15038 (pkgdata_MODULES): Add loopback.mod.
15039 (loopback_mod_SOURCES): New variable.
15040 (loopback_mod_CFLAGS): Likewise.
15041 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15042 `disk/loopback.c'.
15043 (pkgdata_MODULES): Add loopback.mod.
15044 (loopback_mod_SOURCES): New variable.
15045 (loopback_mod_CFLAGS): Likewise.
15046 * disk/loopback.c: new file.
15047 * include/grub/normal.h (grub_loop_init): New prototype.
15048 (grub_loop_fini): New prototype.
15049 * util/grub-emu.c (main): Initialize and de-initialize loopback
15050 support.
15051 * include/grub/disk.h (grub_disk_dev_id): Add
15052 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15053
6f1c18bd 150542005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15055
15056 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15057 function.
15058 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15059 (suspend_mod_SOURCES): New variable.
15060 (suspend_mod_CFLAGS): Likewise.
15061 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15062 New prototype.
15063 * commands/ieee1275/suspend.c: New file.
15064
b38551da 150652005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15066
15067 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 15068 ((unused))' to `__attribute__ ((used))'.
b38551da 15069 (GRUB_MOD_FINI): Likewise.
15070 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15071 * genmk.rb (PModule): Assign space to common symbols when linking
15072 modules.
15073
777aff39 150742005-01-20 Marco Gerards <metgerards@student.han.nl>
15075
15076 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15077 `unsigned' arguments to `grub_size_t'.
15078 (grub_malloc): Likewise.
15079 (grub_realloc): Likewise.
15080 (grub_memalign): Likewise.
15081 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15082 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15083 * util/misc.c (grub_malloc): Likewise.
15084 (grub_realloc): Likewise.
15085 * kern/mm.c (get_header_from_pointer): Change the casts to
15086 `unsigned' into a cast to `grub_size_t'.
15087
15088 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15089 point to `currnode' when `currnode' is changed.
15090
15091 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15092 Schottelius <nico-linux@schottelius.org>.
15093
d0ff18e1 150942005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15095
15096 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15097 (note_path): Remove variable.
15098 (GRUB_IEEE1275_NOTE_NAME): New macro.
15099 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15100 (grub_ieee1275_note_hdr): New structure.
15101 (grub_ieee1275_note_desc): Likewise.
15102 (grub_ieee1275_note): Likewise.
15103 (load_note): Remove `dir' argument. All callers updated. Remove
15104 `note_img' and `path'. Do not load a file from `note_path'.
15105 Initialize a struct grub_ieee1275_note and write that to `out'.
15106 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15107
4ca7004c 151082005-01-05 Marco Gerards <metgerards@student.han.nl>
15109
15110 * util/misc.c (grub_util_read_image): Revert last change. It
15111 called `grub_util_read_at', which seeks from the beginning of the
15112 file.
15113
0b412211 151142005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15115
15116 * TODO: Add note about endianness in grub-mkimage.
15117 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15118 section.
15119 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15120 (grub_mkimage_SOURCES): New target.
15121 * include/grub/kernel.h (grub_start_addr): Remove variable.
15122 (grub_end_addr): Likewise.
15123 (grub_total_module_size): Likewise.
15124 (grub_kernel_image_size): Likewise.
15125 (GRUB_MODULE_MAGIC): New constant.
15126 (grub_module_info): New structure.
15127 (grub_arch_modules_addr): New prototype.
15128 (grub_get_end_addr): Remove prototype.
15129 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15130 * include/grub/powerpc/ieee1275/kernel.h: New file.
15131 * include/grub/util/misc.h (grub_util_get_fp_size): New
15132 prototype.
15133 (grub_util_read_at): Likewise.
15134 (grub_util_write_image_at): Likewise.
15135 * kern/main.c (grub_get_end_addr): Remove function.
15136 (grub_load_modules): Call grub_arch_modules_addr instead of using
15137 grub_end_addr. Look for a grub_module_info struct in memory. Use
15138 the grub_module_info fields instead of calling grub_get_end_addr
15139 as loop conditions. Move grub_add_unused_region code here.
15140 (grub_add_unused_region): Remove function.
15141 * kern/i386/pc/init.c: Include grub/cache.h.
15142 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15143 one call to add_mem_region.
15144 (grub_arch_modules_addr): New function.
15145 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15146 (grub_total_module_size): Likewise.
15147 Include grub/machine/kernel.h.
15148 (grub_arch_modules_addr): New function.
15149 * util/grub-emu.c (grub_end_addr): Remove variable.
15150 (grub_total_module_size): Likewise.
15151 (grub_arch_modules_addr): New function.
15152 * util/misc.c: Include unistd.h.
15153 (grub_util_get_fp_size): New function.
15154 (grub_util_read_at): Likewise.
15155 (grub_util_write_image_at): Likewise.
15156 (grub_util_read_image): Call grub_util_read_at.
15157 (grub_util_write_image): Call grub_util_write_image_at.
15158 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15159 additional memory in kernel_img for a struct grub_module_info.
15160 Fill in that grub_module_info.
15161 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15162
458786f8 151632005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15164
15165 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15166 New function.
15167 * include/grub/powerpc/ieee1275/ieee1275.h
15168 (grub_ieee1275_milliseconds): New prototype.
15169 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15170 Change to 1000.
15171 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15172 grub_ieee1275_milliseconds.
15173
ac507d1b 151742005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15175
15176 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15177 variable.
15178 (find_options): New function.
15179 (cmain): Call find_options.
15180 * include/grub/powerpc/ieee1275/ieee1275.h
15181 (grub_ieee1275_realmode): New extern variable.
15182 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15183 grub_map if grub_ieee1275_realmode is false.
15184
6b8fd1c4 151852004-12-29 Marco Gerards <metgerards@student.han.nl>
15186
15187 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15188 lines are inserted and make it work like readline. Reported by
15189 Vincent Pelletier <subdino2004@yahoo.fr>.
15190
8514a1e0 151912004-12-28 Marco Gerards <metgerards@student.han.nl>
15192
15193 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15194
15195 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15196 `kern/powerpc/cache.S'.
15197
924b6140 151982004-12-27 Marco Gerards <metgerards@student.han.nl>
15199
15200 * genmk.rb: Handle the `Program' class in the main loop. Written
15201 by Johan Rydberg <jrydberg@gnu.org>.
15202 (Program): New class.
15203 (programs): New variable.
15204 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15205 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15206 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15207 (help_arch): Function removed.
15208 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15209 `powerpc/libgcc.h' and `loader.h'.
15210 (pkgdata_PROGRAMS): New variable.
15211 (sbin_UTILITIES): Variable removed.
15212 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15213 (grubof_SOURCES): Variable re-defined so it only includes the
15214 core functionality.
15215 (grubof_CFLAGS): Remove `-DGRUBOF'.
15216 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15217 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15218 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15219 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15220 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15221 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15222 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15223 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15224 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15225 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15226 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15227 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15228 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15229 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15230 (pc_mod_CFLAGS): New variables.
15231 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15232 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15233 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15234 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15235 Moved from here...
15236 * include/grub/i386/pc/init.h (grub_os_area_addr)
15237 (rub_os_area_size): ... to here.
15238 * include/grub/powerpc/ieee1275/ieee1275.h
15239 (grub_ieee1275_entry_fn): Export symbol.
15240 * include/grub/powerpc/ieee1275/init.h: New file.
15241 * include/grub/powerpc/libgcc.h: Likewise.
15242 * include/grub/cache.h: Likewise.
15243 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15244 <hollis@penguinppc.org>.
15245 * kern/dl.c: Include <grub/cache.h>.
15246 (grub_dl_flush_cache): New function.
15247 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15248 for this module.
15249 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15250 (grub_console_init): Removed prototypes.
15251 (grub_machine_init): Don't initialize the modules anymore.
15252 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15253 static.
15254 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15255 Macro undef removed.
15256 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15257 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15258 relocation `R_PPC_REL32'. Return an error when the relocation is
15259 unknown.
15260 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15261 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15262 * util/misc.c (grub_arch_sync_caches): Likewise.
15263
e4b47e0c 152642004-12-19 Marco Gerards <metgerards@student.han.nl>
15265
15266 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15267 `symlist.c', add `grubof_symlist.c'.
15268 (symlist.c): Variable removed.
15269 (grubof_HEADERS): Variable added.
15270 (grubof_symlist.c): New target.
15271 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15272 `kernel_img_HEADERS'.
15273 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15274 * kern/powerpc/dl.c: New file.
15275 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15276 Function removed.
15277 (grub_arch_dl_relocate_symbols): Likewise.
15278 (grub_register_exported_symbols): Likewise.
15279
4ceb3636 152802004-12-13 Marco Gerards <metgerards@student.han.nl>
15281
15282 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15283 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15284 to fail instead. Reported by Vincent Pelletier
15285 <subdino2004@yahoo.fr>.
15286
15287 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15288 it is not allocated. Reported by Vincent Pelletier
15289 <subdino2004@yahoo.fr>.
15290
15291 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15292 output so the output looks better.
f19dbdb7 15293
3f1578fe 152942004-12-04 Marco Gerards <metgerards@student.han.nl>
15295
15296 Modulize the partition map support and add support for the amiga
15297 partition map.
f19dbdb7 15298
3f1578fe 15299 * commands/ls.c: Include <grub/partition.h> instead of
15300 <grub/machine/partition.h>.
15301 * kern/disk.c: Likewise.
15302 * kern/rescue.c: Likewise.
15303 * loader/i386/pc/chainloader.c: Likewise.
15304 * normal/cmdline.c: Likewise.
15305 * kern/powerpc/ieee1275/init.c: Likewise.
15306 (grub_machine_init): Call `grub_pc_partition_map_init',
15307 `grub_amiga_partition_map_init' and
15308 `grub_apple_partition_map_init'.
15309 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15310 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15311 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15312 `partition.h' and `pc_partition.h'.
15313 (grub_setup_SOURCES): Remove
15314 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15315 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15316 (grub_emu_SOURCES): Likewise.
15317 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15318 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15319 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15320 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15321 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15322 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15323 (grubof_SOURCES): Likewise.
15324 * disk/i386/pc/partition.c: File removed.
15325 * disk/powerpc/ieee1275/partition.c: Likewise.
15326 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15327 * include/grub/i386/pc/partition.h: Likewise.
15328 * kern/partition.c: New file.
15329 * partmap/amiga.c: Likewise.
15330 * partmap/apple.c: Likewise.
15331 * partmap/pc.c: Likewise.
15332 * include/grub/partition.h: Likewise..
15333 * include/grub/pc_partition.h: Likewise.
15334 * util/grub-emu.c: Include <grub/partition.h> instead of
15335 <grub/machine/partition.h>.
15336 (main): Call `grub_pc_partition_map_init',
15337 `grub_amiga_partition_map_init' and
15338 `grub_apple_partition_map_init' and deinitialize afterwards.
15339 * util/i386/pc/biosdisk.c: Include `#include
15340 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15341 `<grub/machine/partition.h>'.
15342 * util/i386/pc/grub-setup.c: Likewise.
15343 * util/i386/pc/biosdisk.c: Likewise.
15344 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15345 partition information in case of a PC partition.
15346 * util/i386/pc/grub-setup.c: Include `#include
15347 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15348 `<grub/machine/partition.h>'.
15349 (setup): Only access the PC specific partition information in case
15350 of a PC partition.
15351
0ef4ced9 153522004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 15353
0ef4ced9 15354 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15355 (grub_longjmp): Likewise.
15356 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15357 20.
15358 * normal/powerpc/setjmp.S: New file.
15359 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15360 `normal/powerpc/setjmp.S'.
15361 (grubof_CFLAGS): Add `-DGRUBOF'.
15362 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15363 [GRUB_UTIL && !GRUBOF].
f19dbdb7 15364
19950e29 153652004-11-16 Marco Gerards <metgerards@student.han.nl>
15366
15367 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15368 property named `name'. Correctly handle the error returned by
15369 `grub_ieee1275_finddevice' if a device can not be opened.
15370
a2fea427 153712004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15372
15373 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15374 `actual' for negativity.
15375 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15376 kern/fshelp.c.
15377
41ea0ea3 153782004-11-01 Marco Gerards <metgerards@student.han.nl>
15379
15380 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15381 (PAGE_OFFSET): New macro.
15382 (CRTC_ADDR_PORT): Likewise.
15383 (CRTC_DATA_PORT): Likewise.
15384 (START_ADDR_HIGH_REGISTER): Likewise.
15385 (START_ADDR_LOW_REGISTER): Likewise.
15386 (GRAPHICS_ADDR_PORT): Likewise.
15387 (GRAPHICS_DATA_PORT): Likewise.
15388 (READ_MAP_REGISTER): Likewise.
15389 (INPUT_STATUS1_REGISTER): Likewise.
15390 (INPUT_STATUS1_VERTR_BIT): Likewise.
15391 (page): New variable.
15392 (wait_vretrace): New function.
15393 (set_read_map): Likewise.
15394 (set_start_address): Likewise.
15395 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15396 the right page.
15397 (check_vga_mem): Take the page into account.
15398 (write_char): Likewise.
15399 (write_cursor): Likewise.
15400 (scroll_up): Likewise. Copy the page to the page that is not
15401 shown and switch between both pages.
15402 (grub_vga_putchar): Fix off by one error.
15403 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15404 account.
15405
ad0bd20b 154062004-11-01 Marco Gerards <metgerards@student.han.nl>
15407
15408 Add support for iso9660 (including rockridge).
f19dbdb7 15409
ad0bd20b 15410 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15411 (iso9660_mod_SOURCES): New variable.
15412 (iso9660_mod_CFLAGS): Likewise.
15413 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15414 * include/grub/fs.h (grub_iso9660_init): New prototype.
15415 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15416 * fs/iso9660.c: New file.
15417
15418 * include/grub/misc.h (grub_strncat): New prototype.
15419 * kern/misc.c (grub_strncat): New function.
f19dbdb7 15420
ad0bd20b 15421 * fs/hfs.c (grub_hfs_mount): Translate the error
15422 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15423 * fs/jfs.c (grub_jfs_mount): Likewise.
15424 * fs/ufs.c (grub_ufs_mount): Likewise.
15425
a5477a59 154262004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15427
15428 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15429 which initialized BAT registers.
15430 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15431 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15432 Move from here...
15433 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15434 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15435 ... to here.
15436 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15437 (grub_mapclaim): Likewise.
15438 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15439 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15440 hand.
15441
9304c1f8 154422004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15443
15444 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15445 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15446 -ffreestanding and -msoft-float.
15447
86f4ae25 154482004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15449
15450 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15451 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15452 set in grub_ieee1275_flags.
15453
38912228 154542004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15455
15456 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15457 prototype.
15458 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15459 grub_console_init first.
15460 Change the memory range used for grub_ieee1275_claim and
15461 grub_mm_init_region.
15462 Print an error message if the claim fails.
15463 Include <grub/misc.h>.
15464
d1923dc8 154652004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15466
15467 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15468 Call grub_children_iterate for device nodes of type `scsi',
15469 `ide', or `ata'.
15470 (grub_ofdisk_open): Remove manual device alias resolution.
15471 Fix memory leak when device cannot be opened.
f19dbdb7 15472 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 15473 (grub_children_iterate): New prototype.
15474 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15475 New function.
15476 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15477 Return -1 if args.size was -1.
15478
4512e4f3 154792004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15480
15481 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15482 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15483 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15484 Open Firmware's memory for it; claim memory from _start to _end.
15485 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15486 (_end): New extern.
15487 (_start): Zero BSS from __bss_start to _end.
15488 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15489 New extern.
15490 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15491
4d61feb0 154922004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15493
ad0bd20b 15494 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15495 -1 if args.base was -1.
4d61feb0 15496
026fa2f9 154972004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15498
15499 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15500 escape sequence instead of a literal ^L. Also call
15501 grub_ofconsole_gotoxy.
15502
9f2220ef 155032004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15504
15505 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15506 void * arguments to grub_addr_t. All callers updated. Also make
15507 the `result' argument optional.
15508 (grub_ieee1275_release): change void * arguments to grub_addr_t.
15509 All callers updated.
15510
8a572cd7 155112004-09-22 Hollis Blanchard <hollis@penguinppc.org>
15512
15513 * commands/ls.c (grub_ls_list_files): Use the string following the
15514 initial ')', if present, as the filesystem path.
15515 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15516
15517 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15518
18aa81f2 155192004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
15520
15521 Make the source code of the menu interface more readable.
f19dbdb7 15522
18aa81f2 15523 * normal/menu.c: Include grub/mm.h.
15524 (TERM_WIDTH): New macro.
15525 (TERM_HEIGHT): Likewise.
15526 (TERM_INFO_HEIGHT): Likewise.
15527 (TERM_MARGIN): Likewise.
15528 (TERM_SCROLL_WIDTH): Likewise.
15529 (TERM_TOP_BORDER_Y): Likewise.
15530 (TERM_LEFT_BORDER_X): Likewise.
15531 (TERM_BORDER_WIDTH): Likewise.
15532 (TERM_MESSAGE_HEIGHT): Likewise.
15533 (TERM_BORDER_HEIGHT): Likewise.
15534 (TERM_NUM_ENTRIES): Likewise.
15535 (TERM_FIRST_ENTRY_Y): Likewise.
15536 (TERM_ENTRY_WIDTH): Likewise.
15537 (TERM_CURSOR_X): Likewise.
15538 (draw_border): Use macros instead of magic numbers.
15539 (print_entry): Likewise.
15540 (print_entries): Likewise.
15541 (run_menu): Likewise. Also, handle the key 'e'.
15542 (run_menu_entry): Ignore empty command lines.
15543 (print_message): Added a new argument EDIT. If EDIT is true,
15544 print a different message.
15545 (init_page): Likewise.
15546 (edit_menu_entry): New function. Not implemented yet.
15547
b47efe30 155482004-09-17 Marco Gerards <metgerards@student.han.nl>
15549
15550 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15551 can be loaded from normal mode.
f19dbdb7 15552
b47efe30 15553 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15554 `multiboot.mod'.
15555 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15556 (multiboot_mod_CFLAGS): New variables.
15557 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 15558 * loader/i386/pc/multiboot_normal.c: Likewise.
15559
b47efe30 15560 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15561 attribute `unused'.
f19dbdb7 15562
b47efe30 15563 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
15564 `fdiro' to read the mode information from instead of `diro'.
15565
15566 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15567 looking up a symlink.
15568
15569 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15570 macro.
15571 * normal/command.c (grub_command_execute): Don't parse the
15572 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15573 flags of the command.
15574
15575 * normal/menu.c (grub_menu_run): Fix typo.
15576
da75ac71 155772004-09-14 Hollis Blanchard <hollis@penguinppc.org>
15578
15579 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15580
15581 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15582 `y + 1' instead of `y - 1'.
15583
15584 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 15585
062b24c2 155862004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15587
15588 From Hollis Blanchard <hollis@penguinppc.org>:
15589 * kern/misc.c (memmove): New alias for grub_memmove.
15590 (memcmp): New alias for grub_memcmp.
15591 (memset): New alias for grub_memset.
f19dbdb7 15592 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 15593 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 15594 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 15595 (grub_ieee1275_get_property): Likewise.
f19dbdb7 15596
8ddad845 155972004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15598
15599 Added normal mode command `chainloader' as module chain.mod, which
15600 depends on normal.mod and _chain.mod.
f19dbdb7 15601
8ddad845 15602 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15603 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15604 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15605 Deleted prototype.
15606 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15607 but arguments parsing moved to ...
15608 (grub_chainloader_cmd): ... here. New function.
15609 * include/grub/i386/pc/chainloader.h: New file.
15610 * loader/i386/pc/chainloader_normal.c: Likewise.
15611
2c1f4ce3 156122004-09-11 Marco Gerards <metgerards@student.han.nl>
15613
15614 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15615 (grub_mkimage_LDFLAGS): Likewise.
15616 (grub_emu_SOURCES): Likewise.
15617 (kernel_img_HEADERS): Added fshelp.h.
15618 * fs/ext2.c: Include <grub/fshelp.h>.
15619 (FILETYPE_REG): New macro.
15620 (FILETYPE_INO_REG): Likewise.
15621 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15622 Changed all users.
15623 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
15624 all users.
15625 (grub_fshelp_node): New struct.
15626 (grub_ext2_data): Added member `diropen'. Changed member `inode'
15627 to a pointer.
15628 (grub_ext2_get_file_block): Removed function.
15629 (grub_ext2_read_block): New function.
15630 (grub_ext2_read_file): Replaced parameter `data' by `node'.
15631 This function was written.
15632 (grub_ext2_mount): Read the root inode. Create a diropen struct.
15633 (grub_ext2_find_file): Removed function.
15634 (grub_ext2_read_symlink): New function.
15635 (grub_ext2_iterate_dir): Likewise.
15636 (grub_ext2_open): Rewritten.
15637 (grub_ext2_dir): Rewritten.
15638 * include/grub/fshelp.h: New file.
15639 * fs/fshelp.c: Likewise.
15640
3c52136a 156412004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
15642
15643 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15644 (print_message): Add a missing newline.
15645 (run_menu): Added timeout support.
15646 (run_menu_entry): New local function.
15647 (grub_menu_run): Added support for booting.
15648
15649 * kern/loader.c (grub_loader_is_loaded): New function.
15650
15651 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15652 (grub_get_rtc): Exported.
15653
15654 * include/grub/i386/pc/time.h: Include grub/symbol.h.
15655 (grub_get_rtc): Exported.
15656
15657 * include/grub/normal.h (struct grub_command_list): Remove
15658 constant from the member `command'.
15659
15660 * include/grub/loader.h (grub_loader_is_loaded): Declared.
15661
15662 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15663
15664 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15665
aa033560 156662004-08-28 Marco Gerards <metgerards@student.han.nl>
15667
15668 Add support for the JFS filesystem.
15669
15670 * fs/jfs.c: New file.
15671 * include/grub/fs.h (grub_jfs_init): New prototype.
15672 (grub_jfs_fini): New prototype.
15673 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15674 (grub_emu_SOURCES): Likewise.
15675 (pkgdata_MODULES): Add jfs.mod.
15676 (jfs_mod_SOURCES): New variable.
15677 (jfs_mod_CFLAGS): Likewise.
15678 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15679 (grubof_SOURCES): Likewise.
15680 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15681
15682 * fs/fat.c (grub_fat_find_dir): Convert the filename little
15683 endian to the host endian.
15684 (grub_fat_utf16_to_utf8): Move function from there...
15685 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 15686 the endianness of the source string anymore.
aa033560 15687 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15688
94bc45af 156892004-08-24 Marco Gerards <metgerards@student.han.nl>
15690
15691 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15692 (grub_boot_fini) [GRUB_UTIL]: Likewise.
15693 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15694 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 15695
94bc45af 15696 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15697 (grub_hfs_iterate_dir): Make the function static. Add prototypes
15698 for `node_found' and `it_dir'.
15699 (grub_hfs_dir): Add prototype for `dir_hook'.
15700
15701 * fs/minix.c (grub_minix_get_file_block): Add prototype for
15702 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
15703 and `indir32' to silence a gcc warning.
15704
15705 * include/grub/fs.h (grub_hfs_init): New prototype.
15706 (grub_hfs_fini): Likewise.
f19dbdb7 15707
15708
97543f08 157092004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15710
15711 Each disk device has its own id now. This is useful to make use
15712 of multiple disk devices.
f19dbdb7 15713
97543f08 15714 * include/grub/disk.h (grub_disk_dev_id): New enum.
15715 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15716 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15717
15718 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15719 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15720
15721 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15722 GRUB_DISK_DEVICE_OFDISK_ID as an id.
15723
15724 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15725 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15726
15727 * include/grub/disk.h (struct grub_disk_dev): Added a new member
15728 "id" which is used by the cache manager.
15729
15730 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15731 of just "GRUB".
15732
64372eb4 157332004-08-18 Marco Gerards <metgerards@student.han.nl>
15734
15735 * fs/hfs.c: New file.
15736 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15737 (grub_emu_SOURCES): Likewise.
15738 (pkgdata_MODULES): Add hfs.mod.
15739 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15740 (grubof_SOURCES): Likewise.
15741 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15742
15743 * include/grub/misc.h (grub_strncasecmp): Add prototype.
15744 * kern/misc.c (grub_strncasecmp): Add function.
15745
cc61b58f 157462004-08-14 Marco Gerards <metgerards@student.han.nl>
15747
15748 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15749 with parentheses.
15750
15751 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15752 (grub_ext2_dir): In case the directory entry type is unknown, read
15753 it from the inode.
15754
0ef123f6 157552004-08-02 Peter Bruin <pjbruin@dds.nl>
15756
15757 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15758 grub_load_linux instead of grub_rescue_cmd_linux as second
15759 argument of grub_rescue_register_command.
15760
15761 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15762
a447c5df 157632004-07-27 Marco Gerards <metgerards@student.han.nl>
15764
15765 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15766 function.
15767 * commands/boot.c: Remove the check for `GRUB_UTIL'.
15768 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15769 `loader/powerpc/ieee1275/linux.c',
15770 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15771 * include/grub/powerpc/ieee1275/ieee1275.h
15772 (grub_ieee1275_release): New prototype.
15773 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15774 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15775 normal, boot, linux and linux_normal.
15776 * loader/powerpc/ieee1275/linux.c: New file.
15777 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15778
5a9e3546 157792004-07-12 Marco Gerards <metgerards@student.han.nl>
15780
15781 * normal/arg.c (grub_arg_parse): Correct error handling after
15782 reallocating the argumentlist (check if `argl' is not null instead
15783 of checking if `args' is not null).
15784 * kern/mm.c (grub_realloc): Return the same pointer when using the
15785 same region, instead of returning the header address.
15786
e15199cb 157872004-07-11 Marco Gerards <metgerards@student.han.nl>
15788
15789 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15790 one block instead of two when looking for the initial partition.
15791 (grub_partition_probe): Initialize the local variable `p' with 0.
15792 Use base 10 for the grub_strtoul call.
15793 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
15794 need for one local variable.
15795 (grub_strtoul): Don't add the new value to `num', instead of that
15796 just assign it.
15797
020616c2 157982004-07-11 Marco Gerards <metgerards@student.han.nl>
15799
15800 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15801 (pxeboot_img_SOURCES): New variable.
15802 (pxeboot_img_ASFLAGS): Likewise.
15803 (pxeboot_img_LDFLAGS): Likewise.
15804 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
15805 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
15806 <lode_leroy@hotmail.com>.
15807
6c51eb64 158082004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15809
15810 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15811 there was no input.
15812
cfb12aff 158132004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15814
15815 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
15816 the history buffer logic.
15817
6eabba74 158182004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15819
15820 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15821 (FILETYPE_INO_SYMLINK): New macros.
15822 (grub_ext2_find_file): Check if the node is a directory using the
15823 inode stat information instead of using the filetype in the
15824 dirent. Exclude the first character of an absolute symlink.
15825 (grub_ext2_dir): Mask out the filetype part of the mode member of
15826 the inode.
15827
66e19ef8 158282004-05-24 Marco Gerards <metgerards@student.han.nl>
15829
15830 Add support for UFS version 1 and 2. Add support for the minix
15831 filesystem version 1 and 2, both the variants with 14 and 30 long
15832 filenames.
f19dbdb7 15833
66e19ef8 15834 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15835 fs/minix.c.
15836 (grub_emu_SOURCES): Likewise.
15837 (pkgdata_MODULES): Add ufs.mod and minix.mod.
15838 (ufs_mod_SOURCES): New variable.
15839 (ufs_mod_CFLAGS): Likewise.
15840 (minix_mod_SOURCES): Likewise.
15841 (minix_mod_CFLAGS): Likewise.
15842 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15843 fs/minix.c.
15844 (grubof_SOURCES): Likewise.
15845 * fs/ufs.c: New file.
15846 * fs/minix.c: New file.
15847 * include/grub/fs.h (grub_ufs_init): New prototype.
15848 (grub_ufs_fini): Likewise.
15849 (grub_minix_init): Likewise.
15850 (grub_minix_fini): Likewise.
15851 * util/grub-emu.c (main): Initialize and deinitialize UFS and
15852 minix fs.
15853
cc2e748a 158542004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
15855
15856 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15857 commands/ls.c, commands/terminal.c, commands/boot.c,
15858 commands/cmp.c and commands/cat.c.
15859 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15860
15861 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15862 "env.h"
15863
4b13b216 158642004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15865
15866 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15867 and grub_, respectively. Because the conversion is trivial and
15868 mechanical, I omit the details here. Please refer to the CVS
15869 if you need more information.
15870
6a142551 158712004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15872
15873 * include/pupa: Renamed to ...
15874 * include/grub: ... this.
15875 * util/i386/pc/pupa-mkimage.c: Renamed to ...
15876 * util/i386/pc/grub-mkimage.c: ... this.
15877 * util/i386/pc/pupa-setup.c: Renamed to ...
15878 * util/i386/pc/grub-setup.c: ... this.
15879 * util/pupa-emu.c: Renamed to ...
15880 * util/grub-emu.c: ... this.
15881
e56cdf21 158822004-03-29 Marco Gerards <metgerards@student.han.nl>
15883
15884 Add support for the newworld apple macintosh (PPC). This has been
15885 tested on the powerbook 2000 only. It only adds support for
15886 generic ieee1275 functions, console and disk support. This should
15887 be easy to port to other architectures with support for Open
15888 Firmware.
f19dbdb7 15889
e56cdf21 15890 * configure.ac: Accept the powerpc as host_cpu. In the case of
15891 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
15892 specific tests are only executed while building for the i386.
15893 Inverse test for crosscompile.
15894 * genmk.rb (Utility): Allow assembler files.
15895 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15896 * conf/powerpc-ieee1275.rmk: New file.
15897 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15898 * disk/powerpc/ieee1275/partition.c: Likewise.
15899 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15900 * include/pupa/powerpc/ieee1275/console.h: Likewise.
15901 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15902 * include/pupa/powerpc/ieee1275/time.h: Likewise.
15903 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15904 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15905 * include/pupa/powerpc/ieee1275/loader.h
15906 * include/pupa/powerpc/setjmp.h: Likewise.
15907 * include/pupa/powerpc/types.h: Likewise.
15908 * kern/powerpc/ieee1275/init.c: Likewise.
15909 * kern/powerpc/ieee1275/openfw.c: Likewise.
15910 * term/powerpc/ieee1275/ofconsole.c: Likewise.
15911
15912 These files were written by Johan Rydberg
15913 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 15914
e56cdf21 15915 * boot/powerpc/ieee1275/cmain.c: New file.
15916 * boot/powerpc/ieee1275/crt0.S: Likewise.
15917 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15918 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15919
8c8cc205 159202004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
15921
15922 * Makefile.in: Update copyright.
15923 * genmodsrc.sh: Likewise.
15924 * gensymlist.sh: Likewise.
15925 * term/i386/pc/vga.c: Indent correctly.
15926
15927 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15928 bugreporting address.
15929 * util/i386/pc/pupa-setup.c (usage): Likewise,
15930 (main): Call pupa_ext2_init and pupa_ext2_fini.
15931
f19dbdb7 15932 * fs/fat.c (log2): Renamed to ...
8c8cc205 15933 (fat_log2): ... this.
15934 All callers changed.
15935 * kern/misc.c (memcpy): Alias to pupa_memmove.
15936 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15937 lvalue cast.
15938 * util/console.c (pupa_ncurses_fini): Return 0.
15939
15940 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15941 Move fail label here.
15942 [__GNU__]: Don't warn when using stat.
15943 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15944 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15945 long int. Use strtol instead of strtoul.
f19dbdb7 15946
db1771cf 159472004-03-14 Marco Gerards <metgerards@student.han.nl>
15948
15949 * commands/boot.c: New file.
15950 * commands/cat.c: Likewise.
15951 * commands/cmp.c: Likewise.
15952 * commands/ls.c: Likewise.
15953 * commands/terminal.c: Likewise.
15954 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15955 (pupa_register_command): Changed interface to match the new
15956 argument parser.
15957 (pupa_command_execute): Changed (almost rewritten) so it uses
15958 pupa_split_command. Added support for setting variables using the
15959 syntax `foo=bar'.
15960 (rescue_command): Changed to work with the new argument parser.
15961 (terminal_command): Moved from here to commands/terminal.c.
15962 (set_command): New function.
15963 (unset_command): New function.
15964 (insmod_command): New function.
15965 (rmmod_command): New function.
15966 (lsmod_command): New function.
15967 (pupa_command_init): Don't initialize the command terminal
15968 anymore. Initialize the commands set, unset, insmod, rmmod and
15969 lsmod.
15970 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15971 (kernel_img_HEADERS): Add arg.h and env.h.
15972 (pupa_mkimage_LDFLAGS): Add kern/env.c.
15973 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15974 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15975 normal/arg.c.
15976 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15977 terminal.mod.
15978 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15979 (boot_mod_SOURCES): New variable.
15980 (terminal_mod_SOURCES): Likewise.
15981 (ls_mod_SOURCES): Likewise.
15982 (cmp_mod_SOURCES): Likewise.
15983 (cat_mod_SOURCES): Likewise.
15984
15985 * normal/arg.c: New file.
15986 * kern/env.c: Likewise.
15987 * include/pupa/arg.h: Likewise.
15988 * include/pupa/env.h: Likewise.
15989 * font/manager.c (font_command): Changed to match argument parsing
15990 interface changes.
15991 (PUPA_MOD_INIT): Likewise.
15992 * hello/hello.c (pupa_cmd_hello): Likewise.
15993 (PUPA_MOD_INIT): Likewise.
15994 * include/pupa/disk.h: Include <pupa/device.h>.
15995 (pupa_print_partinfo): New prototype.
15996 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15997 (pupa_dl_get_prefix): Likewise.
15998 * include/pupa/misc.h: Include <pupa/err.h>.
15999 (pupa_isgraph): New prototype.
16000 (pupa_isdigit): Likewise.
16001 (pupa_split_cmdline): Likewise.
16002 * include/pupa/normal.h: Include <pupa/arg.h>.
16003 (pupa_command): Changed the prototype of the member `func' to
16004 match the argument parsing interface. Added member `options'.
16005 (pupa_register_command): Updated to match function.
16006 (pupa_arg_parse): New prototype.
16007 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16008 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16009 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16010 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16011 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16012 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16013 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16014 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16015 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16016 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16017 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16018 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16019 * kern/disk.c: Include <pupa/file.h>.
16020 (pupa_print_partinfo): New function.
16021 * kern/dl.c: Include <pupa/env.h>.
16022 (pupa_dl_dir): Variable removed.
16023 (pupa_dl_load): Use the environment variable `prefix' instead of
16024 the variable pupa_dl_dir.
16025 (pupa_dl_set_prefix): Function removed.
16026 (pupa_dl_get_prefix): Likewise.
16027 * kern/i386/pc/init.c: Include <pupa/env.h>.
16028 (pupa_machine_init): Use the environment variable `prefix' instead of
16029 using pupa_dl_set_prefix to set the prefix.
16030 * kern/main.c: Include <pupa/env.h>.
16031 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16032 using pupa_dl_get_prefix to get the prefix.
16033 * kern/misc.c: Include <pupa/env.h>.
16034 (pupa_isdigit): New function.
16035 (pupa_isgraph): Likewise.
16036 (pupa_ftoa): Likewise.
16037 (pupa_vsprintf): Added support for printing values of the type
16038 `double'. Make it possible to format variable output when using
16039 formatting like `%1.2%f'.
16040 (pupa_split_cmdline): New function.
16041 * kern/rescue.c: Include <pupa/env.h>.
16042 (next_word): Removed function.
16043 (pupa_rescue_cmd_prefix): Likewise.
16044 (pupa_rescue_cmd_set): New function.
16045 (pupa_rescue_cmd_unset): New function.
16046 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16047 split the command line instead of splitting it here. Added
16048 support for setting variables using the syntax `foo=bar'. Don't
16049 initialize the prefix command anymore. Initialized the set and
16050 unset commands.
16051 * normal/cmdline.c: Include <pupa/env.h>.
16052 (pupa_tab_complete): Added prototypes for print_simple_completion,
16053 print_partition_completion, add_completion, iterate_commands,
16054 iterate_dev, iterate_part and iterate_dir. Moved code to print
16055 partition information from here to kern/disk.c.
fe6b695a 16056 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 16057 * normal/main.c: Include <pupa/env.h>.
16058 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16059 instead of using pupa_dl_get_prefix to get the prefix.
16060 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16061 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16062 warning.
16063 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16064 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16065 ((unused))' to silence a gcc warning.
16066 (pupa_vga_setcolor): Likewise.
16067 (debug_command): Changed to match argument parsing
16068 interface changes.
16069 * util/pupa-emu.c: Include <pupa/env.h>.
16070 (options): Added 0's for unused fields to silence a gcc warning.
16071 (argp): Likewise.
16072 (main): Use the environment variable `prefix' instead of using
16073 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16074 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16075 and terminal.
16076
16077 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16078 * util/misc.c: Include <malloc.h>.
16079 (pupa_malloc): Rewritten so errors are correctly reported.
16080 (pupa_realloc): Likewise.
16081 (pupa_memalign): Likewise.
16082 (pupa_mm_init_region): Declare unused variables with
16083 `__attribute__ ((unused))' to silence a gcc warning.
16084 * normal/i386/setjmp.S: Remove tab at the end of the file to
16085 silence a gcc warning.
16086 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16087 variables with `__attribute__ ((unused))' to silence a gcc
16088 warning.
16089 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16090 local variable i unsigned to silence a gcc warning.
16091
16092 * kern/term.c: Include <pupa/misc.h>.
16093 (pupa_more_lines): New variable.
16094 (pupa_more): Likewise.
16095 (pupa_putcode): When the pager is active pause at the end of every
16096 screen.
16097 (pupa_set_more): New function.
16098 * include/pupa/term.h (pupa_set_more): New prototype.
16099
16100
3b1139cb 161012004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16102
16103 Now this project is GRUB 2 rather than PUPA. The location of
16104 the CVS repository was moved to GRUB's.
f19dbdb7 16105
3b1139cb 16106 * configure.ac: Use bug-grub as the reporting address.
16107 Use GRUB instead of PUPA.
16108 Change the version number to 1.90.
16109
8367695c 161102004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16111
16112 * genkernsyms.sh: Updated copyright information.
16113 * genmk.rb: Likewise.
16114 * genmodsrc.sh: Likewise.
16115 * gensymlist.sh: Likewise.
16116 * boot/i386/pc/boot.S: Likewise.
16117 * boot/i386/pc/diskboot.S: Likewise.
16118 * disk/i386/pc/biosdisk.c: Likewise.
16119 * disk/i386/pc/partition.c: Likewise.
16120 * font/manager.c: Likewise.
16121 * fs/ext2.c: Likewise.
16122 * fs/fat.c: Likewise.
16123 * include/pupa/boot.h: Likewise.
16124 * include/pupa/device.h: Likewise.
16125 * include/pupa/disk.h: Likewise.
16126 * include/pupa/dl.h: Likewise.
16127 * include/pupa/elf.h: Likewise.
16128 * include/pupa/err.h: Likewise.
16129 * include/pupa/file.h: Likewise.
16130 * include/pupa/font.h: Likewise.
16131 * include/pupa/fs.h: Likewise.
16132 * include/pupa/kernel.h: Likewise.
16133 * include/pupa/loader.h: Likewise.
16134 * include/pupa/misc.h: Likewise.
16135 * include/pupa/mm.h: Likewise.
16136 * include/pupa/net.h: Likewise.
16137 * include/pupa/normal.h: Likewise.
16138 * include/pupa/rescue.h: Likewise.
16139 * include/pupa/setjmp.h: Likewise.
16140 * include/pupa/symbol.h: Likewise.
16141 * include/pupa/term.h: Likewise.
16142 * include/pupa/types.h: Likewise.
16143 * include/pupa/i386/setjmp.h: Likewise.
16144 * include/pupa/i386/types.h: Likewise.
16145 * include/pupa/i386/pc/biosdisk.h: Likewise.
16146 * include/pupa/i386/pc/boot.h: Likewise.
16147 * include/pupa/i386/pc/console.h: Likewise.
16148 * include/pupa/i386/pc/init.h: Likewise.
16149 * include/pupa/i386/pc/kernel.h: Likewise.
16150 * include/pupa/i386/pc/linux.h: Likewise.
16151 * include/pupa/i386/pc/loader.h: Likewise.
16152 * include/pupa/i386/pc/memory.h: Likewise.
16153 * include/pupa/i386/pc/multiboot.h: Likewise.
16154 * include/pupa/i386/pc/partition.h: Likewise.
16155 * include/pupa/i386/pc/time.h: Likewise.
16156 * include/pupa/i386/pc/vga.h: Likewise.
16157 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16158 * include/pupa/util/getroot.h: Likewise.
16159 * include/pupa/util/misc.h: Likewise.
16160 * include/pupa/util/resolve.h: Likewise.
16161 * kern/device.c: Likewise.
16162 * kern/disk.c: Likewise.
16163 * kern/dl.c: Likewise.
16164 * kern/err.c: Likewise.
16165 * kern/file.c: Likewise.
16166 * kern/fs.c: Likewise.
16167 * kern/loader.c: Likewise.
16168 * kern/main.c: Likewise.
16169 * kern/misc.c: Likewise.
16170 * kern/mm.c: Likewise.
16171 * kern/rescue.c: Likewise.
16172 * kern/term.c: Likewise.
16173 * kern/i386/dl.c: Likewise.
16174 * kern/i386/pc/init.c: Likewise.
16175 * kern/i386/pc/lzo1x.S: Likewise.
16176 * kern/i386/pc/startup.S: Likewise.
16177 * loader/i386/pc/chainloader.c: Likewise.
16178 * loader/i386/pc/linux.c: Likewise.
16179 * loader/i386/pc/multiboot.c: Likewise.
16180 * normal/cmdline.c: Likewise.
16181 * normal/command.c: Likewise.
16182 * normal/main.c: Likewise.
16183 * normal/menu.c: Likewise.
16184 * normal/i386/setjmp.S: Likewise.
16185 * term/i386/pc/console.c: Likewise.
16186 * term/i386/pc/vga.c: Likewise.
16187 * util/console.c: Likewise.
16188 * util/genmoddep.c: Likewise.
16189 * util/misc.c: Likewise.
16190 * util/pupa-emu.c: Likewise.
16191 * util/resolve.c: Likewise.
16192 * util/unifont2pff.rb: Likewise.
16193 * util/i386/pc/biosdisk.c: Likewise.
16194 * util/i386/pc/getroot.c: Likewise.
16195 * util/i386/pc/pupa-mkimage.c: Likewise.
16196 * util/i386/pc/pupa-setup.c: Likewise.
16197
e6eced71 161982004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16199
16200 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16201 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16202 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16203 reading and reset it after reading.
16204 (pupa_ext2_close): Return PUPA_ERR_NONE.
16205
16206 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16207 Correct value.
16208 (struct linux_kernel_header): Add kernel_version and
16209 initrd_addr_max.
16210 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16211 pupa_file_read succeeds.
16212 (pupa_rescue_cmd_initrd): Implement.
16213
5aded270 162142003-12-03 Marco Gerards <metgerards@student.han.nl>
16215
16216 * fs/ext2.c (pupa_ext2_label): New function.
16217 (pupa_ext2_fs): Added label.
16218 * fs/fat.c (pupa_fat_label): New function.
16219 (pupa_fat_fs): Added label.
16220 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16221
16222 * kern/misc.c (pupa_strndup): New function.
16223 * include/pupa/misc.h (pupa_strndup): New prototype.
16224
16225 * include/pupa/normal.h: Include <pupa/err.h>.
16226 (pupa_set_history): New prototype.
16227 (pupa_iterate_commands): New prototype.
16228 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16229 <pupa/disk.h>, <pupa/file.h>.
16230 (hist_size): New variable.
16231 (hist_lines): Likewise.
16232 (hist_end): Likewise.
16233 (hist_used): Likewise.
16234 (pupa_set_history): New function.
16235 (pupa_history_get): Likewise.
16236 (pupa_history_add): Likewise.
16237 (pupa_history_replace): Likewise.
16238 (pupa_tab_complete): Likewise.
16239 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16240 completion shows partitionnames while completing partitions, this
16241 feature was suggested by Jeff Bailey.
16242 * normal/command.c (pupa_iterate_commands): New function.
16243 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16244 (pupa_normal_init): Initialize history buffer.
16245 (PUPA_MOD_INIT): Likewise.
16246 (pupa_normal_fini): Free the history buffer.
16247 (PUPA_MOD_FINI): Likewise.
16248
16249 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16250 key.
16251
16252 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16253 * configure.ac [i386]: Check for regparam bug.
16254 (NESTED_FUNC_ATTR) [! i386]: Defined.
16255
1f7315a3 162562003-11-17 Marco Gerards <metgerards@student.han.nl>
16257
16258 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16259 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16260 (pupa_emu_SOURCES): New variable.
16261 (pupa_emu_LDFLAGS): Likewise.
16262 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16263 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16264 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16265 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16266 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16267 (pupa_jmp_buf): New typedef.
16268 (pupa_setjmp) [PUPA_UTIL]: New macro.
16269 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16270 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16271 (pupa_refresh): New prototype.
16272 * include/pupa/util/getroot.h: New file.
16273 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16274 it.
16275 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16276 (pupa_rescue_cmd_cat): Likewise.
16277 (pupa_rescue_cmd_ls): Likewise.
16278 (pupa_rescue_cmd_testload): Likewise.
16279 (pupa_rescue_cmd_lsmod): Likewise.
16280 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16281 * normal/menu.c (run_menu): Likewise.
16282 * kern/term.c (pupa_cls): Likewise.
16283 (pupa_refresh): New function.
16284 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16285 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16286 * util/console.c: New file.
f19dbdb7 16287
1f7315a3 16288 * util/i386/pc/getroot.c: New file.
16289 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16290 (pupa_putchar): New function.
16291 (pupa_refresh): Likewise.
16292 (xgetcwd): Function moved to ...
16293 (strip_extra_slashes): Likewise.
16294 (get_prefix): Likewise.
f19dbdb7 16295 * util/i386/pc/getroot.c: ... here.
1f7315a3 16296 (find_root_device): Function moved and renamed to...
16297 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16298 Changed all callers.
16299 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16300 and renamed to...
16301 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16302 Changed all callers.
16303 * util/misc.c (pupa_memalign): New function.
16304 (pupa_mm_init_region): Likewise.
16305 (pupa_register_exported_symbols): Likewise.
16306 (pupa_putchar): Function removed.
16307 * util/pupa-emu.c: New file.
16308
9a5c1ade 163092003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16310
16311 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16312 (_multiboot_mod_SOURCES): New variable.
16313 (_multiboot_mod_CFLAGS): Likewise.
16314 * loader/i386/pc/multiboot.c: New file.
16315 * include/pupa/i386/pc/multiboot.h: Likewise.
16316 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16317 (pupa_multiboot_real_boot): New function.
16318 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16319 (pupa_multiboot_real_boot): New prototype.
16320 (pupa_rescue_cmd_multiboot): Likewise
16321 (pupa_rescue_cmd_module): Likewise.
16322
16323 * kern/loader.c (pupa_loader_set): Continue when
16324 pupa_loader_unload_func() fails.
16325 (pupa_loader_unset): New function.
16326 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16327
16328 * kern/misc.c (pupa_stpcpy): New function.
16329 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16330
8e72a9c0 163312003-11-12 Marco Gerards <metgerards@student.han.nl>
16332
16333 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16334 for available extensions.
16335
16336 * include/pupa/i386/pc/time.h: New file.
16337 * kern/disk.c: Include <pupa/machine/time.h>.
16338 (PUPA_CACHE_TIMEOUT): New macro.
16339 (pupa_last_time): New variable.
16340 (pupa_disk_open): Flush the cache when there was a timeout.
16341 (pupa_disk_close): Reset the timer.
16342 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16343 pupa_currticks.
16344 * util/misc.c: Include <sys/times.h>
16345 (pupa_get_rtc): New function.
16346
c4adbd32 163472003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16348
16349 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16350 as blocks.
16351 (pupa_ext2_get_file_block): Use blocks member.
16352
16353 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16354 first block. Return -1 instead of pupa_errno on error.
16355
bfd30f06 163562003-10-27 Marco Gerards <metgerards@student.han.nl>
16357
16358 * README: In the pupa-mkimage example use _chain instead of chain
16359 and ext2 instead of fat.
16360 * TODO: Replace ext2fs with jfs as an example. Add an item for
16361 adding journal playback for ext2fs.
16362 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16363 (pkgdata_MODULES): Added ext2.mod.
16364 (ext2_mod_SOURCES): New variable.
16365 (ext2_mod_CFLAGS): Likewise.
16366 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16367 * include/pupa/misc.h (pupa_strncpy): New prototype.
16368 (pupa_strcat): Likewise.
16369 (pupa_strncmp): Likewise.
16370 * kern/misc.c (pupa_strcat): Enable function.
16371 (pupa_strncpy): New function.
16372 (pupa_strncmp): Likewise.
16373 * fs/ext2.c: New file.
f19dbdb7 16374
bfd30f06 16375 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16376 when the read failed before retrying.
16377 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16378 (_FILE_OFFSET_BITS): Likewise.
16379 * configure.ac: Added AC_SYS_LARGEFILE.
16380
98d15063 163812003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16382
16383 * genmk.rb (PModule#rule): Make sure to get only symbol names
16384 from the output of nm.
16385 Reported by Robert Millan <zeratul2@wanadoo.es>.
16386
18d9c7cd 163872003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16388
16389 I forgot to check in these changes for a long time. This adds
16390 incomplete support for VGA console, and this is still very
16391 buggy. Also, a lot of consideration is required for I18N,
16392 UNICODE, and VGA font issues. Therefore, assume that this is
16393 such that "better than nothing".
f19dbdb7 16394
18d9c7cd 16395 * font/manager.c: New file.
16396 * include/pupa/font.h: Likewise.
16397 * include/pupa/i386/pc/vga.h: Likewise.
16398 * term/i386/pc/vga.c: Likewise.
16399 * util/unifont2pff.rb: Likewise.
16400
16401 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16402 (pkgdata_MODULES): Added vga.mod and font.mod.
16403 (vga_mod_SOURCES): New variables.
16404 (vga_mod_CFLAGS): Likewise.
16405 (font_mod_SOURCES): Likewise.
16406 (font_mod_CFLAGS): Likewise.
16407
16408 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16409
16410 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 16411 (struct pupa_term): Added init and fini.
18d9c7cd 16412 Changed the argument of putchar to pupa_uint32_t.
16413
16414 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16415 (pupa_console_real_putchar): New prototype.
16416 (pupa_console_putchar): Removed.
16417 (pupa_console_checkkey): Exported.
16418 (pupa_console_getkey): Likewise.
16419
16420 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16421 characters.
16422
16423 * kern/term.c (pupa_term_set_current): Rewritten.
16424 (pupa_putchar): Likewise.
16425 (pupa_putcode): New function.
16426
16427 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16428 (pupa_console_real_putchar): ... this.
16429 (pupa_vga_set_mode): New function.
16430 (pupa_vga_get_font): Likewise.
16431
16432 * normal/command.c: Include pupa/term.h.
16433 (terminal_command): New function.
16434 (pupa_command_init): Register the command "terminal".
16435
16436 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16437 (DISP_UP): Likewise.
16438 (DISP_RIGHT): Likewise.
16439 (DISP_DOWN): Likewise.
16440 (DISP_HLINE): Likewise.
16441 (DISP_VLINE): Likewise.
16442 (DISP_UL): Likewise.
16443 (DISP_UR): Likewise.
16444 (DISP_LL): Likewise.
16445 (DISP_LR): Likewise.
16446
16447 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 16448
977329f5 164492003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16450
16451 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16452 FIX. Reverse the path_list.
16453
16454 * include/pupa/normal.h: Export pupa_register_command and
16455 pupa_unregister_command.
16456
16457 * hello/hello.c (pupa_cmd_hello): New module.
16458 * conf/i386-pc.rmk: Added hello.mod.
16459
1f5ab428 164602003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16461
16462 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 16463
1f5ab428 16464 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16465 (compress_kernel): New variable.
16466 (generate_image): Heavily modified to support compressing a
16467 large part of the core image.
16468
16469 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16470 leak.
16471 (pupa_util_load_image): New function.
16472
16473 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16474 (pupa_compressed_size): New variable.
16475 (codestart): Enable Gate A20 here.
16476 Decompress the compressed part of the core image.
16477 Rearrange the code to put functions and variables which are
16478 required for initialization in the non-compressed part.
16479 Include lzo1x.S.
16480
16481 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16482 here.
16483
16484 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16485
f19dbdb7 16486 * include/pupa/i386/pc/kernel.h
1f5ab428 16487 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16488 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16489 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16490 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16491 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16492
16493 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16494
16495 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16496 (Utility#rule): Likewise.
16497
16498 * configure.ac: Check if LZO is available.
16499
ce5bf700 165002003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16501
16502 * include/pupa/normal.h: New file.
16503 * include/pupa/setjmp.h: Likewise.
16504 * include/pupa/i386/setjmp.h: Likewise.
16505 * normal/cmdline.c: Likewise.
16506 * normal/command.c: Likewise.
16507 * normal/main.c: Likewise.
16508 * normal/menu.c: Likewise.
16509 * normal/i386/setjmp.S: Likewise.
f19dbdb7 16510
ce5bf700 16511 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16512 (pupa_rescue_cmd_initrd): Likewise.
16513
16514 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16515 Likewise.
16516
16517 * kern/i386/pc/startup.S (translation_table): New variable.
16518 (translate_keycode): New function.
16519 (pupa_console_getkey): Call translate_keycode.
16520
16521 * kern/rescue.c (attempt_normal_mode): New function.
16522 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16523 it failed, print a message.
16524
16525 * kern/mm.c (pupa_real_malloc): Print more information when a
16526 free magic is broken.
16527 (pupa_free): If the first free header is not free actually, set
16528 it to P.
16529
16530 * kern/main.c (pupa_load_normal_mode): Just load the module
16531 "normal".
16532 (pupa_main): Don't print the message
16533 "Entering into rescue mode..." here.
16534
16535 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16536 Declared.
16537 (pupa_rescue_cmd_initrd): Likewise.
16538 (pupa_rescue_cmd_initrd): Likewise.
16539
16540 * include/pupa/symbol.h (FUNCTION): Specify the type.
16541 (VARIABLE): Likewise.
16542
16543 * include/pupa/err.h (pupa_err_t): Added
16544 PUPA_ERR_UNKNOWN_COMMAND.
16545
16546 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16547 (pupa_dl_get_prefix): Likewise.
16548
16549 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16550 Added _chain.mod and _linux.mod instead of chain.mod and
16551 linux.mod.
16552 (chain_mod_SOURCES): Renamed to ...
16553 (_chain_mod_SOURCES): ... this.
16554 (chain_mod_CFLAGS): Renamed to ...
16555 (_chain_mod_CFLAGS): ... this.
16556 (linux_mod_SOURCES): Renamed to ...
16557 (_linux_mod_SOURCES): ... this.
16558 (linux_mod_CFLAGS): Renamed to ...
16559 (_linux_mod_CFLAGS): ... this.
16560 (normal_mod_SOURCES): New variable.
16561 (normal_mod_CFLAGS): Likewise.
16562 (normal_mod_ASFLAGS): Likewise.
16563
165642003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
16565
16566 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16567 possible.
16568
fe6b695a 16569 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 16570 recursively.
16571 (pupa_dl_unref): Unrefer depending modules recursively.
16572 Don't call pupa_dl_unload implicitly, because PUPA can crash if
16573 a module is unloaded before one depending on that module is
16574 unloaded.
16575 (pupa_dl_unload): Unload depending modules explicitly,
16576 if possible.
16577
c04da074 165782003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
16579
16580 * include/pupa/i386/pc/linux.h: New file.
16581 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 16582
c04da074 16583 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16584 Removed.
16585 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16586 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16587 of PUPA_CHAINLOADER_BOOT_SECTOR.
16588
16589 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16590 (pupa_linux_prot_size): New variable.
16591 (pupa_linux_tmp_addr): Likewise.
16592 (pupa_linux_real_addr): Likewise.
16593 (pupa_linux_boot_zimage): New function.
16594 (pupa_linux_boot_bzimage): Likewise.
16595
16596 * kern/i386/pc/init.c (struct mem_region): New structure.
16597 (MAX_REGIONS): New macro.
16598 (mem_regions): New variable.
16599 (num_regions): Likewise.
16600 (pupa_os_area_addr): Likewise.
16601 (pupa_os_area_size): Likewise.
16602 (pupa_lower_mem): Likewise.
16603 (pupa_upper_mem): Likewise.
16604 (add_mem_region): New function.
16605 (compact_mem_regions): Likewise.
16606 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16607 the size of the conventional memory and that of so-called upper
16608 memory (before the first memory hole).
16609 Instead of adding each found region to free memory, use
16610 add_mem_region and add them after removing overlaps.
16611 Also, add only 1/4 of the upper memory to free memory. The rest
16612 is used for loading OS images. Maybe this is ad hoc, but this
16613 makes it much easier to relocate OS images when booting.
16614
16615 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16616 (pupa_enter_rescue_mode): Don't register initrd and module.
16617
16618 * kern/mm.c: Include pupa/dl.h.
16619
16620 * kern/main.c: Include pupa/file.h and pupa/device.h.
16621
16622 * kern/loader.c (pupa_loader_load_module_func): Removed.
16623 (pupa_loader_load_module): Likewise.
16624
16625 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16626 ``.o''.
16627
16628 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16629 (pupa_linux_tmp_addr): Likewise.
16630 (pupa_linux_real_addr): Likewise.
16631 (pupa_linux_boot_zimage): Likewise.
16632 (pupa_linux_boot_bzimage): Likewise.
16633
16634 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16635 (pupa_upper_mem): Likewise.
16636 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16637 module is too dangerous.
16638
16639 * include/pupa/loader.h (pupa_os_area_addr): Declared.
16640 (pupa_os_area_size): Likewise.
16641 (pupa_loader_set): Remove the first argument. Loader doesn't
16642 manage modules or initrd any longer.
16643 (pupa_loader_load_module): Removed.
16644
16645 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16646 (linux_mod_SOURCES): New variable.
16647 (linux_mod_CFLAGS): Likewise.
16648
a13f9237 166492003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
16650
16651 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16652 the length of a blocklist correctly.
16653
16654 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16655 Use ioctl only if the OS file is a block device.
16656 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16657 not very useful for normal files.
16658
16659 * kern/main.c (pupa_set_root_dev): New function.
16660 (pupa_load_normal_mode): Likewise.
16661 (pupa_main): Call those above.
16662
16663 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16664 pupa_uint16_t.
16665
16666 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16667
a5ffe966 166682003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
16669
16670 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16671 (setup): Configure the installed partition information and the
16672 dl prefix.
16673
16674 * loader/i386/pc/chainloader.c (my_mod): New variable.
16675 (pupa_chainloader_unload): New function.
16676 (pupa_rescue_cmd_chainloader): Refer itself.
16677 (PUPA_MOD_INIT): Save its own module in MY_MOD.
16678
16679 * kern/i386/pc/startup.S (install_partition): Removed.
16680 (version_string): Likewise.
16681 (config_file): Likewise.
16682 (pupa_install_dos_part): New variable.
16683 (pupa_install_bsd_part): Likewise.
16684 (pupa_prefix): Likewise.
16685 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16686
16687 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16688 and pupa/misc.h.
16689 (make_install_device): New function.
16690 (pupa_machine_init): Set the dl prefix.
16691
16692 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16693 (buf): Renamed to ...
16694 (linebuf): ... this.
16695 (pupa_rescue_cmd_prefix): New function.
16696 (pupa_rescue_cmd_insmod): Likewise.
16697 (pupa_rescue_cmd_rmmod): Likewise.
16698 (pupa_rescue_cmd_lsmod): Likewise.
16699 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16700 rmmod and lsmod.
16701
16702 * kern/mm.c (pupa_memalign): If failed even after invalidating
16703 disk caches, unload unneeded modules and retry.
16704
16705 * kern/misc.c (pupa_memmove): New function.
16706 (pupa_memcpy): Removed.
16707 (pupa_strcpy): New function.
16708 (pupa_itoa): Made static.
16709
16710 * kern/dl.c (pupa_dl_iterate): New function.
16711 (pupa_dl_ref): Likewise.
16712 (pupa_dl_unref): Likewise.
16713 (pupa_dl_unload): Return if succeeded or not.
16714 (pupa_dl_unload_unneeded): New function.
16715 (pupa_dl_unload_all): Likewise.
16716 (pupa_dl_init): Renamed to ...
16717 (pupa_dl_set_prefix): ... this.
16718 (pupa_dl_get_prefix): New function.
16719
16720 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16721 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16722 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16723 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16724 (pupa_install_dos_part): Declared.
16725 (pupa_install_bsd_part): Likewise.
16726 (pupa_prefix): Likewise.
16727 (pupa_boot_drive): Likewise.
16728
16729 * include/pupa/types.h: Fix a typo.
16730
16731 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16732 pupa_memmove.
16733 (pupa_memmove): Declared.
16734 (pupa_strcpy): Likewise.
16735
16736 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16737 pupa_mod_init takes one argument, its own module.
16738 (pupa_dl_unload_unneeded): Declared.
16739 (pupa_dl_unload_all): Likewise.
16740 (pupa_dl_ref): Likewise.
16741 (pupa_dl_unref): Likewise.
16742 (pupa_dl_iterate): Likewise.
16743 (pupa_dl_init): Renamed to ...
16744 (pupa_dl_set_prefix): ... this.
16745 (pupa_dl_get_prefix): Declared.
16746
16747 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 16748 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 16749 unloaded.
16750 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16751 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16752
16753 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16754 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16755
012d7999 167562003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16757
16758 * util/i386/pc/pupa-setup.c (setup): Define the internal
16759 function find_first_partition_start at the top level, because GCC
16760 3.0.x cannot compile internal functions in deeper scopes
16761 correctly.
16762 (find_root_device): Use lstat instead of stat.
16763 Don't follow symbolic links.
16764 Fix the path-constructing code.
16765
16766 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16767 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16768 by a BLKGETSIZE ioctl first, because block devices don't fill
16769 the member st_mode of the structure stat on Linux.
16770 [__linux__] (linux_find_partition): Use a temporary buffer
16771 REAL_DEV for the working space. Copy it to DEV before returning.
16772 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16773 buffer cache consistent.
16774 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16775 strncmp. The previous value was merely wrong.
16776 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16777
16778 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16779 FAT size is 12. The previous value was merely wrong.
16780
16781 * kern/main.c (pupa_main): Don't split the starting message from
16782 newlines.
16783
16784 * kern/term.c (pupa_putchar): Put CR after LF instead of before
16785 LF, because BIOS goes crazy about character attributes in this
16786 case.
16787
1cc73a62 167882003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16789
16790 * include/i386/pc/util/biosdisk.h: New file.
16791 * util/i386/pc/biosdisk.c: Likewise.
16792 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 16793
1cc73a62 16794 * Makefile.in (INCLUDE_DISTFILES): Added
16795 include/pupa/i386/pc/util/biosdisk.h.
16796 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16797 directory util/i386/pc.
16798 (install-local): Added a rule for sbin_UTILITIES.
16799 (uninstall): Likewise.
16800
16801 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16802
16803 * util/misc.c (xrealloc): New function.
16804 (pupa_malloc): Likewise.
16805 (pupa_free): Likewise.
16806 (pupa_realloc): Likewise.
16807 (pupa_stop): Likewise.
16808 (pupa_putchar): Likewise.
16809
16810 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16811
16812 * include/pupa/util/misc.h (xrealloc): Declared.
16813
16814 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16815 macro.
16816 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16817 (PUPA_BOOT_MACHINE_BPB_END): ... this.
16818
16819 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16820 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16821
16822 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16823 way should be implemented.
16824 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16825
16826 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16827 the size of NAME for safety.
16828 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16829 0x88.
16830
16831 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16832 (pupa_setup_SOURCES): Likewise.
16833
16834 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16835
08b70fe8 168362002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16837
16838 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16839 bunch of pushl's from pusha, because this destroys the return
16840 value.
16841
62ddcc8f 168422002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16843
16844 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16845 This means that any missing prototypes could be fatal. Also, you
16846 must take care when writing assembly code. See the comments at
16847 the beginning of startup.S, for more details.
f19dbdb7 16848
62ddcc8f 16849 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16850 compilation mechanism.
16851 (pupa_chainloader_real_boot): Likewise.
16852 (pupa_biosdisk_rw_int13_extensions): Likewise.
16853 (pupa_biosdisk_rw_standard): Likewise.
16854 (pupa_biosdisk_check_int13_extensions): Likewise.
16855 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16856 (pupa_biosdisk_get_diskinfo_standard): Likewise.
16857 (pupa_get_memsize): Likewise.
16858 (pupa_get_mmap_entry): Likewise.
16859 (pupa_console_putchar): Likewise.
16860 (pupa_console_setcursor): Likewise.
16861 (pupa_getrtsecs): Use pushl instead of push.
16862
16863 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16864 memory instead of the stack for a mmap entry, because some
16865 BIOSes may ignore the maximum size and overflow.
16866
16867 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16868
16869 * genmk.rb (PModule#rule): Compile automatically generated
16870 sources with module-specific CFLAGS as well as other sources.
16871
9962ed99 168722002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16873
16874 * configure.ac: Check ld.
16875 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16876 respectively, before checking endianness and sizes.
16877
16878 * Makefile.in (LD): New variable.
f19dbdb7 16879
abdfc3c5 168802002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16881
16882 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16883
6a161fa9 168842002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16885
16886 * Changelog: New file.
16887