]> git.proxmox.com Git - grub2.git/blame - ChangeLog
Fix spacing and excessively long lines
[grub2.git] / ChangeLog
CommitLineData
0a15ce80 12009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
2
3 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
4 * loader/i386/linux_trampoline.S: Fix identation
5 * loader/i386/xnu_helper.S: Likewise
d6da58e6 6
33db9015 72009-05-18 Colin D Bennett <colin@gibibit.com>
8
d6da58e6 9 Display error messages when parsing a Lua statement fails.
10 Previously, executing a syntactically invalid statement like
11 ")foo" or "bar;" would silently fail.
33db9015 12
13 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 14 (grub_lua_parse_line): Improved reporting of Lua parser and
15 execution errors.
33db9015 16
46422c89 172009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
18
19 Remove -Werror which causes build to fail on some systems
20
21 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
22 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
23 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 24
22f53a96 252009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
26
27 trampoline for linux on 64-bit platform
28
18f547ad 29 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
30 loader/i386/efi/linux_trampoline.S
31 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
22f53a96 32 declration
d6da58e6 33 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
34 here
22f53a96 35 * loader/i386/linux_trampoline.S: moved here
d6da58e6 36 * loader/i386/efi/linux.c (allocate_pages): reserve space for
37 trampoline
22f53a96 38 (jumpvector): removed
39 (grub_linux_trampoline_start): new declaration
40 (grub_linux_trampoline_end): likewise
41 (grub_linux_boot): use trampoline when on 64-bit platform
42 * loader/i386/linux.c: likewise
43
cb5a0f40 442009-05-16 Pavel Roskin <proski@gnu.org>
45
46 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
47 const to avoid a warning.
48 (grub_lua_setenv): Likewise.
49 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
50 lmsg to fix a warning.
51
334f2c28 522009-05-16 Felix Zielcke <fzielcke@z-51.de>
53
54 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 55 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
56 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
57 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
58 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
59 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
60 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
61 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 62
59e5d3ec 632009-05-16 Felix Zielcke <fzielcke@z-51.de>
64
65 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
66
9d87a1ba 672009-05-16 Bean <bean123ch@gmail.com>
68
69 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
70 (lua_mod_SOURCES): New variable.
71 (lua_mod_CFLAGS): Likewise.
72 (lua_mod_LDFLAGS): Likewise.
73
74 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
75 (setjmp_mod_SOURCES): New variable.
76 (setjmp_mod_CFLAGS): Likewise.
77 (setjmp_LDFLAGS): Likewise.
78
79 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
80 (setjmp_mod_SOURCES): New variable.
81 (setjmp_mod_CFLAGS): Likewise.
82 (setjmp_LDFLAGS): Likewise.
83
84 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
85 (setjmp_mod_SOURCES): New variable.
86 (setjmp_mod_CFLAGS): Likewise.
87 (setjmp_LDFLAGS): Likewise.
88
89 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
90 (setjmp_mod_SOURCES): New variable.
91 (setjmp_mod_CFLAGS): Likewise.
92 (setjmp_LDFLAGS): Likewise.
93
94 * normal/i386/setjmp.S: Moved from here ...
95 * lib/i386/setjmp.S: ... Moved here
96 * normal/x86_64/setjmp.S: Moved from here ...
97 * lib/x86_64/setjmp.S: ... Moved here
98 * normal/powerpc/setjmp.S: Moved from here ...
99 * lib/powerpc/setjmp.S: ... Moved here
100 * normal/sparc64/setjmp.S: Moved from here ...
101 * lib/sparc64/setjmp.S: ... Moved here
102
103 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
104 returns_twice in mingw.
105
106 * script/lua/grub_lib.c: New file.
107 * script/lua/grub_lib.h: Likewise.
108 * script/lua/grub_lua.h: Likewise.
109 * script/lua/grub_main.c: Likewise.
110 * script/lua/lapi.c: Likewise.
111 * script/lua/lapi.h: Likewise.
112 * script/lua/lauxlib.c: Likewise.
113 * script/lua/lauxlib.h: Likewise.
114 * script/lua/lbaselib.c: Likewise.
115 * script/lua/lcode.c: Likewise.
116 * script/lua/lcode.h: Likewise.
117 * script/lua/ldblib.c: Likewise.
118 * script/lua/ldebug.c: Likewise.
119 * script/lua/ldebug.h: Likewise.
120 * script/lua/ldo.c: Likewise.
121 * script/lua/ldo.h: Likewise.
122 * script/lua/ldump.c: Likewise.
123 * script/lua/lfunc.c: Likewise.
124 * script/lua/lfunc.h: Likewise.
125 * script/lua/lgc.c: Likewise.
126 * script/lua/lgc.h: Likewise.
127 * script/lua/linit.c: Likewise.
128 * script/lua/liolib.c: Likewise.
129 * script/lua/llex.c: Likewise.
130 * script/lua/llex.h: Likewise.
131 * script/lua/llimits.h: Likewise.
132 * script/lua/lmathlib.c: Likewise.
133 * script/lua/lmem.c: Likewise.
134 * script/lua/lmem.h: Likewise.
135 * script/lua/loadlib.c: Likewise.
136 * script/lua/lobject.c: Likewise.
137 * script/lua/lobject.h: Likewise.
138 * script/lua/lopcodes.c: Likewise.
139 * script/lua/lopcodes.h: Likewise.
140 * script/lua/loslib.c: Likewise.
141 * script/lua/lparser.c: Likewise.
142 * script/lua/lparser.h: Likewise.
143 * script/lua/lstate.c: Likewise.
144 * script/lua/lstate.h: Likewise.
145 * script/lua/lstring.c: Likewise.
146 * script/lua/lstring.h: Likewise.
147 * script/lua/lstrlib.c: Likewise.
148 * script/lua/ltable.c: Likewise.
149 * script/lua/ltable.h: Likewise.
150 * script/lua/ltablib.c: Likewise.
151 * script/lua/ltm.c: Likewise.
152 * script/lua/ltm.h: Likewise.
153 * script/lua/lua.h: Likewise.
154 * script/lua/luaconf.h: Likewise.
155 * script/lua/lualib.h: Likewise.
156 * script/lua/lundump.c: Likewise.
157 * script/lua/lundump.h: Likewise.
158 * script/lua/lvm.c: Likewise.
159 * script/lua/lvm.h: Likewise.
160 * script/lua/lzio.c: Likewise.
161 * script/lua/lzio.h: Likewise.
162
5e898c9d 1632009-05-16 Bean <bean123ch@gmail.com>
164
165 * include/grub/kernel.h (grub_module_header_types): Add type
166 OBJ_TYPE_CONFIG.
167
168 * kern/main.c (grub_load_config): New function.
169 (grub_main): Call grub_load_config to read boot config.
170
171 * grub-mkimage (generate_image): New parameter config_path.
172 (options): New option --config.
173 (main): Parse --config option, and pass it to generate_image.
174
cf353a47 1752009-05-14 Christian Franke <franke@computer.org>
176
177 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
178 This fixes build on Cygwin.
179
3834887f 1802009-05-14 Pavel Roskin <proski@gnu.org>
181
182 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
183 jump. This saves two bytes, so the typical case of 2 swapped
184 drives would fit 32 bytes.
185
8090fc01 1862009-05-13 Pavel Roskin <proski@gnu.org>
187
ac963883 188 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
189 grub_uint32_t to avoid a warning.
190
8090fc01 191 * loader/i386/linux.c (allocate_pages): When assigning
192 real_mode_mem, cast through grub_size_t to fix a warning. The
193 code already makes sure that the value would fit a pointer.
194 (grub_linux_setup_video): Cast render_target->data to
195 grub_size_t to fix a warning.
196
18f547ad 1972009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 198
199 * commands/i386/pc/drivemap.c: New file - implement drivemap
200 command.
201 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
202 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
203
6f6a8b28 2042009-05-13 Pavel Roskin <proski@gnu.org>
205
206 * util/i386/pc/grub-setup.c (setup): Remove unused variable
207 embedding_area_exists.
208
15fbf4c4 2092009-05-13 Robert Millan <rmh.grub@aybabtu.com>
210
211 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
212 it easier to understand / work with.
59978c8a 213 Improve warning messages for cases where there's no embedding area,
214 or when it is too small (or core.img too large).
15fbf4c4 215
238e871f 2162009-05-13 Pavel Roskin <proski@gnu.org>
217
0ab3a9a4 218 * loader/i386/pc/multiboot2.c: Add necessary includes for
219 grub_multiboot2_real_boot().
220
a2c8c5f8 221 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
222 PX record is always little-endian. We only need the lower 2
223 bytes of the mode.
224
faec96af 225 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
226 facilitate code reuse.
227 (grub_cpio_mount): Use "struct head", not a char buffer. This
228 fixes a warning reported by gcc 4.4.
229
238e871f 230 * kernel/disk.c (grub_disk_read): Use void pointer for the
231 buffer.
232 (grub_disk_write): Use const void pointer for the buffer.
233 Adjust all callers. Remove unnecessary casts.
234
901d2f0c 2352009-05-10 Robert Millan <rmh.grub@aybabtu.com>
236
237 * util/i386/pc/grub-install.in: Update copyright year.
238
18f547ad 2392009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 240
241 gptsync
242
243 * commands/gptsync.c: new file
244 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
245 (gptsync_mod_SOURCES): new variable
246 (gptsync_mod_CFLAGS): likewise
247 (gptsync_mod_LDFLAGS): likewise
18f547ad 248 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 249 new definition
250 (GRUB_PC_PARTITION_TYPE_HFS): likewise
251 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
252 * conf/i386-ieee1275.rmk: likewise
253 * conf/i386-pc.rmk: likewise
254 * conf/powerpc-ieee1275.rmk: likewise
255
b4ba690a 2562009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
257
258 Fixed grub-emu
259
260 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
261 (grub_dl_ref): likewise
262
317e1a44 2632009-05-08 Robert Millan <rmh.grub@aybabtu.com>
264
265 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
266 split in two functions (one for msdos and one for gpt).
267
041b8094 2682009-05-08 Pavel Roskin <proski@gnu.org>
269
752473c2 270 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
271 not modified.
272
041b8094 273 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
274 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
275 Initialize them with -1. Add sanity check for bad1. Eliminate
276 nerr variable.
277
172800ce 2782009-05-08 David S. Miller <davem@davemloft.net>
279
280 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
281
29aa5e81 2822009-05-06 Robert Millan <rmh.grub@aybabtu.com>
283
284 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
285 existance.
286
96613b62 2872009-05-05 Felix Zielcke <fzielcke@z-51.de>
288
289 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 290 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 291
eef73c8a 2922009-05-05 David S. Miller <davem@davemloft.net>
293
294 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
295
119494b5 2962009-05-05 Pavel Roskin <proski@gnu.org>
297
298 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
299 of grub_dl_ref() and grub_dl_unref().
300 * commands/parttool.c: Remove preprocessor conditionals around
301 grub_dl_ref() and grub_dl_unref().
302 * fs/affs.c: Likewise.
303 * fs/afs.c: Likewise.
304 * fs/cpio.c: Likewise.
305 * fs/ext2.c: Likewise.
306 * fs/fat.c: Likewise.
307 * fs/hfs.c: Likewise.
308 * fs/hfsplus.c: Likewise.
309 * fs/iso9660.c: Likewise.
310 * fs/jfs.c: Likewise.
311 * fs/minix.c: Likewise.
312 * fs/ntfs.c: Likewise.
313 * fs/reiserfs.c: Likewise.
314 * fs/sfs.c: Likewise.
315 * fs/udf.c: Likewise.
316 * fs/ufs.c: Likewise.
317 * fs/xfs.c: Likewise.
318 * include/grub/dl.h: Likewise.
319 * loader/xnu.c: Likewise.
320
de5fd76e 3212009-05-04 Pavel Roskin <proski@gnu.org>
322
323 * commands/acpi.c: Remove unused variable my_mod.
324 * partmap/amiga.c: Likewise.
325 * partmap/apple.c: Likewise.
326 * partmap/gpt.c: Likewise.
327 * partmap/pc.c: Likewise.
328 * partmap/sun.c: Likewise.
329 * term/gfxterm.c: Likewise.
330 * term/i386/pc/vesafb.c: Likewise.
331 * term/i386/pc/vga.c: Likewise.
332
983598ad 3332009-05-04 David S. Miller <davem@davemloft.net>
334
335 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
336 pointer args to grub_ieee1275_get_property().
337
8aadec43 338 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
339
9554b15e 340 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
341 devices, and do not traverse down under controller nodes.
342
67e23c90 343 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
344 (grub_ofdisk_open): Use it to un-escape "," characters.
345 * kern/disk.c (find_part_sep): New.
346 (grub_disk_open): Use it to find the first non-escaped ','
347 character in the disk name.
348 * util/ieee1275/devicemap.c (escape_of_path): New.
349 (grub_util_emit_devicemap_entry): Use it.
350 * util/sparc64/ieee1275/grub-install.in: Update script to
351 strip partition specifiers properly by not triggering on
352 '\' escaped ',' characters.
353
74bfdd2f 3542009-05-04 Robert Millan <rmh.grub@aybabtu.com>
355
356 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
357 to 0x300.
358 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
359 resolutions.
360 (linux_vesafb_modes): Add a lot of additional modes to the list (based
361 on documentation from Wikipedia).
362
4241d2b1 3632009-05-04 Pavel Roskin <proski@gnu.org>
364
365 * disk/ata.c: Spelling fixes.
366 * disk/raid.c: Likewise.
367 * disk/usbms.c: Likewise.
368 * disk/dmraid_nvidia.c: Likewise.
369 * kern/ieee1275/openfw.c: Likewise.
370 * kern/ieee1275/init.c: Likewise.
371 * kern/ieee1275/cmain.c: Likewise.
372 * boot/i386/pc/cdboot.S: Likewise.
373 * video/readers/png.c: Likewise.
374 * video/i386/pc/vbe.c: Likewise.
375 * fs/udf.c: Likewise.
376 * fs/hfs.c: Likewise.
377 * fs/reiserfs.c: Likewise.
378 * efiemu/runtime/efiemu.c: Likewise.
379 * efiemu/main.c: Likewise.
380 * efiemu/mm.c: Likewise.
381 * include/grub/elf.h: Likewise.
382 * include/grub/xnu.h: Likewise.
383 * include/grub/usbdesc.h: Likewise.
384 * include/grub/usb.h: Likewise.
385 * include/grub/script_sh.h: Likewise.
386 * include/grub/lib/LzmaEnc.h: Likewise.
387 * include/grub/efiemu/efiemu.h: Likewise.
388 * include/grub/command.h: Likewise.
389 * normal/menu.c: Likewise.
390 * normal/main.c: Likewise.
391 * normal/datetime.c: Likewise.
392 * bus/usb/uhci.c: Likewise.
393 * mmap/i386/uppermem.c: Likewise.
394 * mmap/mmap.c: Likewise.
395 * commands/acpi.c: Likewise.
396 * commands/test.c: Likewise.
397 * partmap/apple.c: Likewise.
398 * font/font.c: Likewise.
399 * loader/sparc64/ieee1275/linux.c: Likewise.
400 * loader/macho.c: Likewise.
401 * loader/i386/bsd_trampoline.S: Likewise.
402 * loader/i386/bsd.c: Likewise.
403 * loader/xnu.c: Likewise.
404 * term/i386/pc/vesafb.c: Likewise.
405 * term/usb_keyboard.c: Likewise.
406 * util/resolve.c: Likewise.
407 * util/getroot.c: Likewise.
408
0cfc0083 4092009-05-04 Felix Zielcke <fzielcke@z-51.de>
410
411 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
412
7c1d00cd 4132009-05-04 Robert Millan <rmh.grub@aybabtu.com>
414
415 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
416 build error.
417
b01f0548 4182009-05-04 Robert Millan <rmh.grub@aybabtu.com>
419
420 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
421 parameter only available on BIOS.
422
ecc3eb22 4232009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
424
425 Removed wrong semicolon in declaration
426
427 * grub/misc.h (grub_dprintf): remove semicolon
428
112972a9 4292009-05-04 Robert Millan <rmh.grub@aybabtu.com>
430
431 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
432 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
433 is done by grub_cmd_linux() now).
434 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
435 restore video to text mode.
436 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
437 indicates lack of "vga=" parameter. "vga=0" is mapped to
438 `GRUB_LINUX_VID_MODE_NORMAL'.
439
afd5c115 4402009-05-04 Felix Zielcke <fzielcke@z-51.de>
441
442 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
443 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
444 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 445 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 446 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
447 `grub_script.tab.c'.
448
449 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
450 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
451 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
452 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
453 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
454
faa517ce 455 * Makefile.in: Remove duplicated 2008 in Copyright line.
456
ae0c0bdc 4572009-05-04 Robert Millan <rmh.grub@aybabtu.com>
458
459 * util/misc.c (grub_util_warn): New function. Emmits a warning
460 unconditionally.
461 * include/grub/util/misc.h (grub_util_warn): New declaration.
462
463 * util/i386/pc/grub-install.in: Understand --force and pass it down
464 to grub-setup.
465
466 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
467 down to setup().
468 (setup): Improve error messages and add warnings when requested to
469 install in odd layouts. Refuse to install using blocklists unless
470 --force was set.
471
18f547ad 4722009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 473
474 * disk/raid.c (grub_raid_scan_device): Improve debug message.
475
6d260daa 4762009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
477
478 Updated copyright year
479
480 * fs/hfsplus.c: updated copyright year
18f547ad 481
69f853f8 4822009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
483
484 HFS+ UUID
485
18f547ad 486 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 487 in the space previously used by unused3
488 (grub_hfsplus_uuid): new function
489 (grub_hfsplus_fs): added uuid field
490
4c402e73 4912009-05-03 Pavel Roskin <proski@gnu.org>
492
493 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
494 suppress warnings. It's no longer needed.
495 * disk/host.c: Likewise.
496 * disk/ata_pthru.c: Likewise.
497 * disk/loopback.c: Likewise.
498 * hook/datehook.c: Likewise.
499 * parttool/pcpart.c: Likewise.
500 * fs/i386/pc/pxe.c: Likewise.
501 * fs/ntfscomp.c: Likewise.
502 * efiemu/main.c: Likewise.
503 * mmap/mmap.c: Likewise.
504 * commands/crc.c: Likewise.
505 * commands/hexdump.c: Likewise.
506 * commands/hdparm.c: Likewise.
507 * commands/acpi.c: Likewise.
508 * commands/echo.c: Likewise.
509 * commands/minicmd.c: Likewise.
510 * commands/blocklist.c: Likewise.
511 * commands/memrw.c: Likewise.
512 * commands/loadenv.c: Likewise.
513 * commands/usbtest.c: Likewise.
514 * commands/lsmmap.c: Likewise.
515 * commands/boot.c: Likewise.
516 * commands/parttool.c: Likewise.
517 * commands/configfile.c: Likewise.
518 * commands/search.c: Likewise.
519 * commands/ieee1275/suspend.c: Likewise.
520 * commands/cat.c: Likewise.
521 * commands/i386/pc/pxecmd.c: Likewise.
522 * commands/i386/pc/play.c: Likewise.
523 * commands/i386/pc/halt.c: Likewise.
524 * commands/i386/pc/vbeinfo.c: Likewise.
525 * commands/i386/pc/vbetest.c: Likewise.
526 * commands/lspci.c: Likewise.
527 * commands/date.c: Likewise.
528 * commands/handler.c: Likewise.
529 * commands/ls.c: Likewise.
530 * commands/test.c: Likewise.
531 * commands/cmp.c: Likewise.
532 * commands/efi/loadbios.c: Likewise.
533 * commands/efi/fixvideo.c: Likewise.
534 * commands/halt.c: Likewise.
535 * commands/help.c: Likewise.
536 * commands/reboot.c: Likewise.
537 * hello/hello.c: Likewise.
538 * script/sh/main.c: Likewise.
539 * loader/xnu.c: Likewise.
540 * term/terminfo.c: Likewise.
541 * term/i386/pc/serial.c: Likewise.
542 * term/usb_keyboard.c: Likewise.
543
515b5079 5442009-05-03 David S. Miller <davem@davemloft.net>
545
546 * normal/menu.c: Include grub/parser.h
547
dfc31a22 5482009-05-03 Pavel Roskin <proski@gnu.org>
549
2fee74f1 550 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
551 not char*.
552 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
553 Suggested by Javier Martín <lordhabbit@gmail.com>
554
dfc31a22 555 * util/i386/pc/grub-mkrescue.in: Allow for the case when
556 efiemu??.o doesn't exist.
557 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
558 copying.
559
18f547ad 5602009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 561
562 FreeBSD 64-bit support
563
18f547ad 564 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 565 and loader/i386/bsd_trampoline.S
566 (bsd_mod_ASFLAGS): new variable
567 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
568 (FREEBSD_MODTYPE_KERNEL64): likewise
569 (grub_bsd64_trampoline_start): likewise
570 (grub_bsd64_trampoline_end): likewise
571 (grub_bsd64_trampoline_selfjump): likewise
572 (grub_bsd64_trampoline_gdt): likewise
573 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
574 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
575 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
576 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 577 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 578 of "attrib" member
579 * loader/i386/bsd_pagetable.c: new file
580 * loader/i386/bsd_trampoline.S: likewise
581 * loader/i386/bsd.c (ALIGN_QWORD): new macro
582 (ALIGN_VAR): likewise
583 (entry_hi): new variable
584 (kern_end_mdofs): likewise
585 (is_64bit): likewise
586 (grub_freebsd_add_meta): use ALIGN_VAR
587 (grub_e820_mmap): new declaration
588 (grub_freebsd_add_mmap): new function
589 (grub_freebsd_add_meta_module): support 64 bit kernels
590 (grub_freebsd_list_modules): use ALIGN_VAR
591 (gdt_descriptor): new declaration
592 (grub_freebsd_boot): support 64 bit kernels
593 (grub_bsd_elf64_hook): new function
594 (grub_bsd_load_elf): support elf64
595
038c5720 5962009-05-03 Bean <bean123ch@gmail.com>
597
598 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
599 after we get the result of if statement.
600
fc45fb58 6012009-05-03 Bean <bean123ch@gmail.com>
602
603 * Makefile.in (enable_efiemu): New variable.
604
605 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
606 set.
607 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
608 path.
609 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
610 path, add -mno-red-zone option.
611 (efiemu64_s.o): Likewise.
612 (efiemu64.o): Use macro $^ for source file.
613
614 * configure.ac (--enable-efiemu): New option.
615
bbee0f2b 6162009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
617
618 xnu support
619
620 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
621 (pkglib_MODULES): add xnu.mod
622 (xnu_mod_SOURCES): new variable
623 (xnu_mod_CFLAGS): likewise
624 (xnu_mod_LDFLAGS): likewise
625 (xnu_mod_ASFLAGS): likewise
626 * conf/i386-pc.rmk: likewise
627 * conf/x86_64-efi.rmk: likewise
7dd4a573 628 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 629 new declaration
630 * include/grub/i386/macho.h: new file
631 * include/grub/i386/xnu.h: likewise
632 * include/grub/macho.h: likewise
633 * include/grub/machoload.h: likewise
634 * include/grub/x86_64/macho.h: likewise
635 * include/grub/x86_64/xnu.h: likewise
636 * include/grub/xnu.h: likewise
637 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
638 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
639 * loader/i386/efi/xnu.c: new file
640 * loader/i386/pc/xnu.c: likewise
641 * loader/i386/xnu.c: likewise
642 * loader/i386/xnu_helper.S: likewise
643 * loader/macho.c: likewise
644 * loader/xnu.c: likewise
645 * loader/xnu_resume.c: likewise
646 * util/grub-dumpdevtree: likewise
647 * include/grub/i386/pit.h: include grub/err.h
648 (grub_pit_wait): export
649 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 650
5caf964d 6512009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
652
653 Efiemu
7dd4a573 654
5caf964d 655 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 656 _linux_efi, linux_efi.
657 new files in grub-emu
5caf964d 658 new targets efiemu32.o and efiemu64.o
659 * loader/linux_normal_efiemu.c: likewise
660 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 661 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 662 files to copy
663 * include/grub/autoefi.h: new file
7dd4a573 664 * include/grub/i386/efiemu.h: likewise
5caf964d 665 * include/grub/i386/pc/efiemu.h: likewise
666 * include/grub/efi/api.h: add LL suffix when necessary
667 new definitions relating to tables
668 * include/grub/efiemu/efiemu.h: new file
669 * include/grub/efiemu/runtime.h: likewise
670 * efiemu/prepare.c: likewise
671 * efiemu/loadcore_common.c: likewise
672 * efiemu/loadcore64.c: likewise
673 * efiemu/runtime/efiemu.sh: likewise
674 * efiemu/runtime/efiemu.S: likewise
675 * efiemu/runtime/efiemu.c: likewise
676 * efiemu/runtime/config.h: likewise
677 * efiemu/prepare32.c: likewise
678 * efiemu/main.c: likewise
679 * efiemu/modules/pnvram.c: likewise
680 * efiemu/modules/i386: likewise
681 * efiemu/modules/i386/pc: likewise
682 * efiemu/modules/acpi.c: likewise
683 * efiemu/i386/pc/cfgtables.c: likewise
684 * efiemu/i386/loadcore64.c: likewise
685 * efiemu/i386/loadcore32.c: likewise
686 * efiemu/prepare64.c: likewise
687 * efiemu/loadcore.c: likewise
688 * efiemu/symbols.c: likewise
689 * efiemu/mm.c: likewise
690 * efiemu/loadcore32.c: likewise
7dd4a573 691
6922009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 693
694 ACPI spoofing
695
696 * commands/acpi.c: new file
697 * commands/i386/pc/acpi.c: likewise
698 * commands/efi/acpi.c: likewise
699 * include/grub/acpi.h: likewise
700 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
701 (acpi_mod_SOURCES): new variable
702 (acpi_mod_CFLAGS): likewise
703 (acpi_mod_LDFLAGS): likewise
704 * conf/i386-efi.rmk: likewise
705 * conf/x86_64-efi.rmk: likewise
706
7dd4a573 7072009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 708
709 Missing part from mmap patch
710
711 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
712 (grub_mmap_unregister)
713 (grub_mmap_free_and_unregister): use grub_mmap_register
714
7dd4a573 7152009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 716
717 Mmap services
718
719 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
720 * loader/i386/linux.c (find_mmap_size): likewise
721 (allocate_pages): likewise
722 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
723 (grub_fill_multiboot_mmap): likewise
724 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
725 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
726 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
727 (OPENBSD_MMAP_RESERVED): likewise
728 * include/grub/i386/pc/memory.h: include grub/memory.h
729 (grub_lower_mem): removed
730 (grub_upper_mem): likewise
731 (GRUB_MACHINE_MEMORY_ACPI): new definition
732 (GRUB_MACHINE_MEMORY_NVS): likewise
733 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
734 (GRUB_MACHINE_MEMORY_HOLE): likewise
735 (grub_machine_mmap_register): likewise
736 (grub_machine_mmap_unregister): likewise
737 (grub_machine_get_upper): likewise
738 (grub_machine_get_lower): likewise
739 (grub_machine_get_post64): likewise
740 * include/grub/i386/efi/memory.h: new file
741 * include/grub/x86_64/efi/memory.h: likewise
742 * include/grub/efi/memory.h: likewise
743 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
744 (mmap_mod_SOURCES): new variable
745 (mmap_mod_LDFLAGS): likewise
746 (mmap_mod_ASFLAGS): likewise
747 * conf/i386-coreboot.rmk: likewise
748 * conf/i386-ieee1275.rmk: likewise
749 * conf/i386-efi.rmk: likewise
750 * conf/x86_64-efi.rmk: likewise
751 * include/grub/types.h (UINT_TO_PTR): new macro
752 (PTR_TO_UINT32): likewise
753 (PTR_TO_UINT64): likewise
754 * include/grub/memory.h: new file
755 * mmap/i386/pc/mmap.c: likewise
756 * mmap/i386/pc/mmap_helper.S: likewise
757 * mmap/i386/uppermem.c: likewise
758 * mmap/mmap.c: likewise
759 * mmap/efi/mmap.c: likewise
7dd4a573 760 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 761 grub_upper_mem
762 * kern/i386/pc/init.c (grub_lower_mem): removed variable
763 (grub_upper_mem): likewise
764 (grub_machine_init): don't use grub_upper_mem,
765 make grub_lower_mem local
766 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
767 grub_mmap_iterate and grub_mmap_get_upper
768 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
769
d558e6b5 7702009-05-02 Bean <bean123ch@gmail.com>
771
772 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
773 script/sh/parser.y.
774 (pkglib_MODULES): Add normal.mod and sh.mod.
775 (normal_SOURCES): New variable.
776 (normal_mod_CFLAGS): Likewise.
777 (normal_mod_LDFLAGS): Likewise.
778 (sh_mod_SOURCES): Likewise.
779 (sh_mod_CFLAGS): Likewise.
780 (sh_mod_LDFLAGS): Likewise.
781
782 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
783 script/sh/lexer.c_DEPENDENCIES.
784 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
785 kern/rescue_reader.c and kern/rescue_parser.c.
786 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
787 (grub_emu_SOURCES): Change source files.
788 (pkglib_MODULES): Remove normal.mod.
789 (normal_SOURCES): Removed.
790 (normal_mod_CFLAGS): Likewise.
791 (normal_mod_LDFLAGS): Likewise.
792 * conf/i386-coreboot.rmk: Likewise.
793 * conf/i386-efi.rmk: Likewise.
794 * conf/i386-ieee1276.rmk: Likewise.
795 * conf/powerpc-ieee1275.rmk: Likewise.
796 * conf/sparc64-ieee1275.rmk: Likewise.
797 * conf/x86_64-efi.rmk: Likewise.
798
799 * include/grub/command.h (grub_command_execute): New inline function.
800
801 * include/grub/menu.h (grub_menu_entry): Removed commands field.
802
803 * include/grub/normal.h: Remove <grub/setjmp.h>.
804 (grub_fs_module_list): Moved to normal/autofs.c.
805 (grub_exit_env): Removed.
806 (grub_command_execute): Likewise.
807 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
808 parameter script.
809 (read_command_list): New function declaration.
810 (read_fs_list): Likewise.
811
812 * include/parser.h: Include <grub/reader.h>.
813 (grub_parser_split_cmdline): Change type of getline parameter.
814 (grub_parser): New structure.
815 (grub_parser_class): New variable.
816 (grub_parser_execute): New function declaration.
817 (grub_register_rescue_parser): Likewise.
818 (grub_parser_register): New inline function.
819 (grub_parser_unregister): Likewise.
820 (grub_parser_get_current): Likewise.
821 (grub_parser_set_current): Likewise.
822
823 * include/grub/reader.h: New file.
824 * kern/reader.c: Likewise.
825 * kern/rescue_parser.c: Likewise.
826 * kern/rescue_reader.c: Likewise.
827 * normal/autofs.c: Likewise.
828 * normal/dyncmd.c: Likewise.
829
830 * include/grub/rescue.h: Removed.
831 * normal/command.h: Likewise.
832
833 * include/grub/script.h: Moved to ...
834 * include/grub/script_sh.h: ... Moved here.
835 * normal/execute.c: Moved to ...
836 * script/sh/execute.c: ... Moved here.
837 * normal/function.c: Moved to ...
838 * script/sh/function.c: ... Moved here.
839 * normal/lexer.c: Moved to ...
840 * script/sh/lexer.c: ... Moved here.
841 * normal/parser.y: Moved to ...
842 * script/sh/parser.y: ... Moved here.
843 * normal/script.c: Moved to ...
844 * script/sh/script.c: ... Moved here.
845
846 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
847 <grub/reader.h>.
848 (grub_exit_env): Removed.
849 (fs_module_list): Moved to normal/autofs.c.
850 (grub_file_getline): Don't handle comment here.
851 (free_menu): Skip removed field entry->commands.
852 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
853 script parameter.
854 (read_config_file): Removed nested parameter, change getline function.
855 (grub_enter_normal_mode): Removed.
856 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
857 (read_command_list): Likewise.
858 (autoload_fs_module): Moved to normal/autofs.c.
859 (read_fs_list): Likewise.
860 (reader_nested): New variable.
861 (grub_normal_execute): Run parser.sh to switch to sh parser.
862 (grub_cmd_rescue): Removed.
863 (cmd_normal): Removed.
864 (grub_cmd_normal): Unregister itself at the beginning. Don't register
865 rescue command.
866 (grub_cmdline_run): New function.
867 (grub_normal_reader_init): Likewise.
868 (grub_normal_read_line): Likewise.
869 (grub_env_write_pager): Likewise.
870 (cmdline): New variable.
871 (grub_normal_reader): Likewise.
872 (GRUB_MOD_INIT): Register normal reader and set as current, register
873 pager hook, register normal command with grub_register_command_prio,
874 so that it won't show up in command.lst.
875 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
876 grub_fs_autoload_hook.
877
878 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
879 (grub_menu_execute_entry): Replace grub_script_execute with
880 grub_parser_execute, change parameter to grub_command_execute.
881
882 * normal/menu_text.c: Remove <grub/script.h>.
883
884 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
885 and <grub/parser.h>.
886 (run): Change editor_getline to use new parser interface. Change
887 parameter to grub_command_execute.
888
889 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
890 <grub/reader.h> and <grub/parser.h>.
891 (grub_load_normal_mode): Execute normal command.
892 (grub_main): Call grub_register_core_commands,
893 grub_register_rescue_parser and grub_register_rescue_reader, use
894 grub_reader_loop to enter input loop.
895
7dd4a573 896 * kern/parser.c (grub_parser_split_cmdline): Change type of
897 getline parameter.
d558e6b5 898 (grub_parser_class): New variable.
899 (grub_parser_execute): New function.
900
901 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
902 * loader/multiboot2.c: Likewise.
903 * loader/sparc64/ieee1275/linux.c: Likewise.
904
905 * util/grub-emu.c (read_command_list): New dummy function.
906
18db813d 9072009-05-02 Robert Millan <rmh.grub@aybabtu.com>
908
909 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
910 count to 16 for CCISS and IDA.
911
6c67de15 9122009-05-02 Robert Millan <rmh.grub@aybabtu.com>
913
914 * normal/menu_text.c (grub_wait_after_message): Print a newline
915 after waiting for user input.
916
917 * loader/i386/linux.c: Include `<grub/normal.h>'.
918 (grub_cmd_linux): Improve the error message about `ask' mode, by
919 waiting for user input so it's not missed (we can do this, since
920 user requested interaction).
921
d9dc87b0 9222009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
923
924 Added missing lst to grub-mkrescue
925
926 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
927 and ${input_dir}/parttool.lst
928
ac8a2baa 9292009-04-30 David S. Miller <davem@davemloft.net>
930
ad22a610 931 * util/hostdisk.c (device_is_wholedisk): New function.
932 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
933 zero only if device_is_wholedisk() returns true.
934
6966215d 935 * util/hostdisk.c (convert_system_partition_to_system_disk):
936 Handle virtual disk devices named /dev/vdiskX as found on sparc
937 and powerpc.
938
ac8a2baa 939 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
940 lettered partition specifier is found, convert to numbered.
941
979b4fb4 9422009-04-29 David S. Miller <davem@davemloft.net>
943
e2bf39b2 944 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
945 * include/grub/sparc64/ieee1275/memory.h: Likewise.
946
3c64e104 947 * normal/command.c: Add missing newline at end of file.
948
979b4fb4 949 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
950 warnings.
951 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
952 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
953 grub_ofdisk_read): Likewise, and deal similarly with the fact that
954 ihandles have a 32-bit type but need to be stored in a "void *".
955
136d9f82 9562009-04-28 Pavel Roskin <proski@gnu.org>
957
9459c306 958 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
959 not disk. Adjust all dependencies.
2e08a26a 960 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 961 grub_disk_close().
962
136d9f82 963 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
964 parent's partition, don't copy it by reference, as it gets freed
965 on close.
966
7dd4a573 9672009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 968
969 Preboot hooks support
970
971 * commands/boot.c (struct grub_preboot_t): new declaration
972 (preboots_head): new variable
973 (preboots_tail): likewise
974 (grub_loader_register_preboot_hook): new function
975 (grub_loader_unregister_preboot_hook): likewise
976 (grub_loader_set): launch preboot hooks
977 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
978 (grub_loader_register_preboot_hook): new declaration
979 (grub_loader_unregister_preboot_hook): likewise
980
5af922b5 9812009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
982
983 Warning fix
984
7dd4a573 985 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 986 calling grub_dprintf
987
a5562c30 9882009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
989
990 Bug and warning fixes
991
7dd4a573 992 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 993 declaration
994 * commands/test.c (test_parse): fixed bug with file tests and corrected
995 declaration of find_file
996
4006f85c 9972009-04-26 Pavel Roskin <proski@gnu.org>
998
999 * Makefile.in: Don't install empty manual pages if help2man is
1000 missing. Use help2man option for output, not shell redirection.
1001
5c77c3de 10022009-04-26 David S. Miller <davem@davemloft.net>
1003
1004 * util/grub-mkdevicemap.c (make_device_map): Add missing
1005 NESTED_FUNC_ATTR to process_device().
1006
033b10a8 10072009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1008
1009 Test command
1010
1011 * commands/test.c: rewritten to use bash-like test
1012
e4343593 10132009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1014
1015 Parttool autoloading and improvements
1016
7dd4a573 1017 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 1018 (parttool.lst): new target
1019 * genmk.rb: generate parttool-*
1020 (CLEANFILES): add #{parttool}
1021 (PARTTOOLFILES): new variable
1022 * genparttoollist.sh: new file
7dd4a573 1023 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 1024 (grub_pcpart_type): likewise
1025 * commands/parttool.c (helpmsg): new variable
1026 (grub_cmd_parttool): output help if not enough arguments are supplied
1027 autoload modules
1028 (GRUB_MOD_INIT(parttool)): use helpmsg
1029
0d312500 10302009-04-24 David S. Miller <davem@davemloft.net>
1031
7dd4a573 1032 Avoiding opening same device multiple times in device iterator.
0d312500 1033
1034 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 1035 and use it to build a list of partitions in iterate_disk() and
0d312500 1036 iterate_partition().
1037
ac20caff 1038 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1039 on disk->data.
1040
0dcf7495 1041 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1042 grub_devalias_iterate() result instead of unconditional 0.
1043 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1044 Also, capture hook return value, either directly or via
1045 grub_children_iterate(), and propagate to caller.
1046 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1047 grub_children_iterate): Return value is now 'int' instead of
1048 'grub_err_t'.
1049 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1050 like a proper iterator, stopping when hooks return non-zero.
1051 (grub_devalias_iterate): Likewise.
1052
c8c08833 10532009-04-23 David S. Miller <davem@davemloft.net>
1054
1055 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1056
f01005a8 10572009-04-22 David S. Miller <davem@davemloft.net>
1058
1059 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1060 is larger than address_cells, use that value for address_cells too.
1061
4e8269da 1062 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1063 IEEE1275_MAX_PATH_LEN): Define.
1064 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1065 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1066 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1067 'devtype'. Explicitly NULL terminate devalias expansion.
1068
a1447506 1069 * util/sparc64/ieee1275/misc.c: New file.
1070 * util/sparc64/ieee1275/grub-setup.c: New file.
1071 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1072 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1073 * util/sparc64/ieee1275/grub-install.in: New file.
1074 * util/ieee1275/ofpath.c: New file.
1075 * util/ieee1275/devicemap.c: New file.
1076 * util/devicemap.c: New file.
1077 * util/deviceiter.c: New file.
1078 * kern/sparc64/ieee1275/init.c: New file.
1079 * include/grub/util/ofpath.h: New file.
1080 * include/grub/util/deviceiter.h: New file.
1081 * util/grub-mkdevicemap.c: Include deviceiter.h.
1082 Implement using grub_util_emit_devicemap_entry and
1083 grub_util_iterate_devices.
1084 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1085 util/devicemap.c into grub-mkdevicemap
1086 * conf/i386-efi.rmk: Likewise.
1087 * conf/i386-ieee1275.rmk: Likewise.
1088 * conf/i386-pc.rmk: Likewise.
1089 * conf/powerpc-ieee1275.rmk: Likewise.
1090 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1091 images and installation utilities. Build kernel as image
1092 instead of as elf binary. Use common rules as much as possible.
1093
7dd4a573 10942009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 1095
1096 Correct GPT definition
1097
7dd4a573 1098 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 1099 of "attrib" member
1100
c6c5219f 11012009-04-19 Felix Zielcke <fzielcke@z-51.de>
1102
1103 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1104
0552ff9f 11052009-04-19 David S. Miller <davem@davemloft.net>
1106
1107 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1108 (grub_rescue_cmd_linux): Rename to...
1109 (grub_cmd_linux): and fix prototype.
1110 (grub_rescue_cmd_initrd): Rename to...
1111 (grub_cmd_initrd): and fix prototype.
1112 (cmd_linux, cmd_initrd): New.
1113 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1114 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1115
d1a282fc 11162009-04-17 Pavel Roskin <proski@gnu.org>
1117
07c5039f 1118 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1119 format.
1120 (grub_ohci_transfer): Likewise.
1121
b012002d 1122 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1123
1bc09c35 1124 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1125 return without a value. Fix inconsistent indentation.
1126
e0ff9126 1127 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1128 match struct grub_fs.
1129
d1a282fc 1130 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1131 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1132 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1133 * commands/lspci.c (grub_lspci_iter): Likewise.
1134
a96df3f2 11352009-04-16 Bean <bean123ch@gmail.com>
1136
1137 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1138 value.
1139
41bb0fe9 11402009-04-15 Pavel Roskin <proski@gnu.org>
1141
1142 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1143 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1144 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1145 definitions.
1146
596c6970 11472009-04-15 Felix Zielcke <fzielcke@z-51.de>
1148
1149 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 1150 that no multiple data or metadata areas are supported and `Unknown
596c6970 1151 metadata header'.
1152
7dd4a573 11532009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 1154
1155 Move loader out of the kernel
1156
1157 * kern/loader.c: moved to ...
1158 * commands/boot.c: ... moved here
1159 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1160 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1161 * include/grub/kernel.h (grub_machine_fini): export
1162 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1163 (grub_loader_set): likewise
1164 (grub_loader_unset): likewise
1165 (grub_loader_boot): likewise
1166 * conf/common.rmk: new module boot.mod
1167 (pkglib_MODULES): add boot.mod
1168 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1169 (grub_emu_SOURCES): likewise
1170 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1171 (grub_emu_SOURCES): likewise
1172 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1173 (grub_emu_SOURCES): likewise
1174 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1175 (grub_emu_SOURCES): likewise
1176 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1177 (grub_emu_SOURCES): likewise
7dd4a573 1178 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1179 (grub_emu_SOURCES): likewise
0d5d5653 1180 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 1181 (grub_emu_SOURCES): likewise
0d5d5653 1182
7dd4a573 11832009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 1184
1185 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 1186
5999d619 1187 * kern/misc.c (grub_itoa): Removed function
1188 (grub_ltoa): likewise
1189 (grub_vsprintf): use grub_lltoa
1190
7dd4a573 11912009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 1192
1193 Restore grub-emu
1194
1195 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1196 * conf/i386-coreboot.rmk: likewise
1197 * conf/i386-ieee1275.rmk: likewise
1198 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1199
20318222 12002009-04-15 Felix Zielcke <fzielcke@z-51.de>
1201
1202 * INSTALL: Add that `./autogen.sh' needs to be run before
1203 `./configure.'.
1204
d05f0df3 12052009-04-14 Bean <bean123ch@gmail.com>
1206
1207 * Makefile.in (pkglib_DATA): Add handler.lst.
1208 (handler.lst): New rule.
1209
1210 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1211 * conf/i386-coreboot.rmk: Likewise.
1212 * conf/i386-ieee1275.rmk: Likewise.
1213 * conf/i386-efi.rmk: Likewise.
1214 * conf/x86_64-efi.rmk: Likewise.
1215 * conf/powerpc-ieee1275.rmk: Likewise.
1216 * conf/sparc64-ieee1275.rmk: Likewise.
1217
1218 * genhandlerlist.sh: New file.
1219
1220 * genmk.rb: Add rules to generate handler.lst.
1221
1222 * include/grub/normal.h (grub_file_getline): New function definition.
1223 (read_handler_list): Likewise.
1224 (free_handler_list): Likewise.
1225
1226 * include/grub/term.h (grub_term_register_input): Add name parameter
1227 for auto generation of handler.lst.
1228 (grub_term_register_output): Likewise.
1229
1230 * normal/handler.c: New file.
1231
1232 * normal/main.c (get_line): Renamed to grub_file_getline.
1233 (read_config_file): Use the newly renamed grub_file_getline.
1234 (read_command_list): Likewise.
1235 (read_fs_list): Likewise.
1236 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1237 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1238
1239 * term/efi/console.c (grub_console_init): Add name parameter for auto
1240 generation of handler.lst.
1241 * term/gfxterm.c: Likewise.
1242 * term/i386/pc/at_keyboard.c: Likewise.
1243 * term/i386/pc/console.c: Likewise.
1244 * term/i386/pc/serial.c: Likewise.
1245 * term/i386/pc/vesafb.c: Likewise.
1246 * term/i386/pc/vga.c: Likewise.
1247 * term/i386/pc/vga_text.c: Likewise.
1248 * term/ieee1275/ofconsole.c: Likewise.
1249 * term/usb_keyboard.c: Likewise.
1250
33c846be 12512009-04-14 Bean <bean123ch@gmail.com>
1252
1253 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1254 properly with null character.
1255
4484e01e 12562009-04-14 Felix Zielcke <fzielcke@z-51.de>
1257
1258 * configure: Remove.
1259 * config.h.in: Likewise.
f93d668e 1260 * stamp-h.in: Likewise.
4484e01e 1261 * DISTLIST: Likewise.
1262 * conf/common.mk: Likewise.
1263 * conf/i386-coreboot.mk: Likewise.
1264 * conf/i386-efi.mk: Likewise.
1265 * conf/i386-ieee1275.mk: Likewise.
1266 * conf/i386.mk: Likewise.
1267 * conf/i386-pc.mk: Likewise.
1268 * conf/powerpc-ieee1275.mk: Likewise.
1269 * conf/sparc64-ieee1275.mk: Likewise.
1270 * conf/x86_64-efi.mk: Likewise.
1271
1272 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1273 develop on GRUB.
1274
7dd4a573 12752009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 1276 David S. Miller <davem@davemloft.net>
1277
1278 * util/hostdisk.c (make_device_name): Fix buffer length
1279 calculations.
1280
e25b5a8c 12812009-04-14 Felix Zielcke <fzielcke@z-51.de>
1282
1283 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1284 <sys/param.h> and <sys/sysctl.h>.
1285 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1286 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1287 opening the device and reset them afterwards.
1288
1f1f580c 12892009-04-13 Pavel Roskin <proski@gnu.org>
1290
1291 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1292 Reported by John Stanley <jpsinthemix@verizon.net>
1293
7ebc2d6b 12942009-04-13 Robert Millan <rmh@aybabtu.com>
1295
1296 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 1297 that name for menuentries when appropriate.
7ebc2d6b 1298
d8ba3667 12992009-04-13 Felix Zielcke <fzielcke@z-51.de>
1300
1301 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1302
cba416eb 13032009-04-13 Robert Millan <rmh@aybabtu.com>
1304
1305 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1306 to Linux, simply abort telling the user it's no longer supported.
1307
a547a745 13082009-04-13 Felix Zielcke <fzielcke@z-51.de>
1309
1310 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 1311 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 1312 `freebsd_loadenv' only when devices.hints exist.
1313
232a769c 13142009-04-13 Pavel Roskin <proski@gnu.org>
1315
1316 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1317
c3012039 13182009-04-13 Felix Zielcke <fzielcke@z-51.de>
1319
1320 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1321 partition number.
1322 (grub_drive): Likewise.
1323
234022fe 13242009-04-13 David S. Miller <davem@davemloft.net>
1325
1326 * kern/sparc64/ieee1275/ieee1275.c: New file.
1327 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1328 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1329 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1330 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1331 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1332 grub_ieee1275_alloc_physmem): Declare new exported functions.
1333
d8e1836c 1334 * include/grub/sparc64/ieee1275/loader.h: New file.
1335 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1336 * include/grub/sparc64/kernel.h: Likewise.
1337 * loader/sparc64/ieee1275/linux.c: Likewise.
1338
96bd81ec 1339 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1340 (grub_fstest_SOURCES): Likewise.
1341
6a4737e5 1342 * util/hostdisk.c (make_device_name): Do not make any assumptions
1343 about the length of drive names.
1344
1d7a72fd 1345 * kern/dl.c (grub_dl_load_file): Close file immediately when
1346 we are done using it.
1347
56bc2471 13482009-04-12 David S. Miller <davem@davemloft.net>
1349
1350 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1351 values. Noticed by Pavel Roskin.
1352
df38d0bb 1353 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1354 target compiler.
7dd4a573 1355
e382e93a 1356 * genmk.rb: Add more flexible image type specification, also
1357 pass --strip-unneeded to objcopy.
1358 * conf/i386-pc.rmk: Use *_FORMAT.
1359 * conf/i386-pc.mk: Rebuilt.
1360
f5dbbca9 1361 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1362 (OFDISK_HASH_SZ): Define.
1363 (ofdisk_hash): New hash table.
1364 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1365 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1366 instead of device phandle which is not unique.
1367
91c88b12 1368 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1369 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1370 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1371 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1372 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1373 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1374 GRUB_KERNEL_MACHINE_DATA_END): Define.
1375 (grub_kernel_image_size, grub_total_module_size): Declare.
1376
5b5d4aa5 13772009-04-12 Pavel Roskin <proski@gnu.org>
1378
7dd4a573 1379 * configure.ac: Change the logic when we check for target tools.
1380 Do it when the target is specified and it's different from the
1381 specified value of the host.
5b5d4aa5 1382
c91e1793 13832009-04-11 Felix Zielcke <fzielcke@z-51.de>
1384
1385 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1386 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1387 GNU/kFreeBSD. Check if a device is a character device. Use
1388 DIOCGMEDIASIZE to get the size.
1389 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1390 support for GNU/kFreeBSD.
1391 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1392 is a character device instead of a block device. Add support for
1393 FreeBSD device names.
1394
1395 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1396 is a character device instead of a block device.
1397
1398 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1399 is a character device instead of a block device.
1400
b1ac8644 14012009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1402
1403 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1404 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1405 FreeBSD. Check if a device is a character device. Use
1406 DIOCGMEDIASIZE to get the size.
1407 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1408 support for FreeBSD.
1409 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1410 is a character device instead of a block device. Add support for
1411 FreeBSD device names.
1412
1413 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1414 a character device instead of a block device.
1415 (grub_util_check_char_device): New function.
1416
1417 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1418 a character device instead of a block device.
1419
1420 * include/grub/util/getroot.h (grub_util_check_char_device): New
1421 prototype.
1422
a3f7515a 14232009-04-11 David S. Miller <davem@davemloft.net>
1424
1425 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1426 static libgcc.
1427 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1428 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1429 function, if present.
1430 (__bswapdi2): Likewise.
1431
0d44993d 1432 * include/grub/sparc64/ieee1275/boot.h: New file.
1433 * boot/sparc64/ieee1275/boot.S: Likewise.
1434 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1435
ed3d2bc2 1436 * kern/misc.c (grub_ltoa): New function.
1437 (grub_vsprintf): Use it to format 'long' integers.
1438
d3bfb59c 14392009-04-10 David S. Miller <davem@davemloft.net>
1440
1441 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1442 slots are of type grub_ieee1275_cell_t.
1443 (grub_nand_read): Likewise.
1444 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1445 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1446 macros are used to compare values in arg/ret block of the call.
1447 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1448 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1449 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1450 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1451 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1452 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1453 grub_ieee1275_close, grub_ieee1275_set_property,
1454 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1455 grub_ieee1275_cell_t.
1456 * kern/ieee1275/openfw.c (grub_map): Likewise.
1457 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1458 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1459
450e2238 1460 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1461 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1462 (grub_devalias_iterate): Likewise.
1463
7dd4a573 14642009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 1465
1466 UFS improvements
1467
1468 * fs/ufs.c (INODE_NBLOCKS): new definition
1469 (struct grub_ufs_dirent): added fields for non-BSD dirents
1470 (grub_ufs_get_file_block): fixed double indirect handling
1471 (grub_ufs_lookup_symlink): use more robust way to determine whether
1472 symlink is inline
1473 (grub_ufs_find_file): support for non-BSD dirents
1474 (grub_ufs_dir): support for non-BSD dirents
1475
e7e6862a 14762009-04-10 Bean <bean123ch@gnail.com>
1477
1478 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1479 attribute, otherwise the size would be wrong for i386 platform.
1480
1481 * include/grub/pci.h (grub_pci_read_word): New inline function.
1482 (grub_pci_read_byte): Likewise.
1483 (grub_pci_write): Likewise.
1484 (grub_pci_write_word): Likewise.
1485 (grub_pci_write_byte): Likewise.
1486
1487 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1488
1489 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1490 (find_framebuf): Scan pci to locate the frame buffer address.
1491
1492 * commands/efi/fixvideo.c: New file.
1493
1494 * commands/efi/loadbios.c: Likewise.
1495
1496 * commands/memrw.c: Likewise.
1497
1498 * util/grub-dumpbios.in: Likewise.
1499
1500 * conf/common.rmk (grub-dumpbios): New utility.
1501 (pkglib_MODULES): New module memrw.mod.
1502 (memrw_mod_SOURCE): New macro.
1503 (memrw_mod_CFLAGS): Likewise.
1504 (memrw_mod_LDFLAGS): Likewise.
1505
7dd4a573 1506 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 1507 fixvideo.mod.
1508 (loadbios_mod_SOURCE): New macro.
1509 (loadbios_mod_CFLAGS): Likewise.
1510 (loadbios_mod_LDFLAGS): Likewise.
1511 (fixvideo_mod_SOURCE): Likewise.
1512 (fixvideo_mod_CFLAGS): Likewise.
1513 (fixvideo_mod_LDFLAGS): Likewise.
1514
7dd4a573 1515 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 1516 fixvideo.mod.
1517 (loadbios_mod_SOURCE): New macro.
1518 (loadbios_mod_CFLAGS): Likewise.
1519 (loadbios_mod_LDFLAGS): Likewise.
1520 (fixvideo_mod_SOURCE): Likewise.
1521 (fixvideo_mod_CFLAGS): Likewise.
1522 (fixvideo_mod_LDFLAGS): Likewise.
1523
af63ada2 15242009-04-08 Felix Zielcke <fzielcke@z-51.de>
1525
1526 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1527
c2cdde70 15282009-04-07 David S. Miller <davem@davemloft.net>
1529
1530 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1531 support for R_SPARC_OLO10 relocations. Fix compile warning for
1532 R_SPARC_WDISP30 case.
ea3f72cf 1533 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 1534
761319cf 15352009-04-06 Pavel Roskin <proski@gnu.org>
1536
1007d1f5 1537 * include/grub/misc.h (ARRAY_SIZE): New macro.
1538 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1539 New macro.
1540 * loader/i386/linux.c (allocate_pages): Use free_pages().
1541 (grub_linux_unload): Don't use free_pages().
1542 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1543 wrong index. Treat all other modes as text modes.
1544 (grub_cmd_linux): Initialize vid_mode unconditionally to
1545 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
1546
761319cf 1547 * commands/help.c (print_command_help): Use cmd->prio, not
1548 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1549
ea761d40 15502009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 1551
ea761d40 1552 Parttool
1553
1554 * parttool/pcpart.c: new file
1555 * commands/parttool.c: likewise
1556 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1557 (parttool_mod_SOURCES): new variable
1558 (parttool_mod_CFLAGS): likewise
1559 (parttool_mod_LDFLAGS): likewise
1560 (pcpart_mod_SOURCES): likewise
1561 (pcpart_mod_CFLAGS): likewise
1562 (pcpart_mod_LDFLAGS): likewise
7dd4a573 1563 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 1564 and parttool/pcpart.c
1565 * conf/i386-efi.rmk: likewise
1566 * conf/i386-ieee1275.rmk: likewise
1567 * conf/i386-pc.rmk: likewise
1568 * conf/powerpc-ieee1275.rmk: likewise
1569 * conf/sparc64-ieee1275.rmk: likewise
1570 * conf/x86_64-ieee1275.rmk: likewise
1571
05aaebfb 15722009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1573
1574 Support for mtime and further expandability of dir command
1575
1576 * include/grub/lib/datetime.h: moved to ...
7dd4a573 1577 * include/grub/datetime.h: ... moved here and added
05aaebfb 1578 declaration of grub_unixtime2datetime. All users updated
7dd4a573 1579 * include/grub/fs.h: new syntax for dir and mtime functions in
1580 struct grub_fs
05aaebfb 1581 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1582 and GRUB_FSHELP_FLAGS_MASK
1583 * commands/ls.c (grub_ls_list_files): Write mtime in long format
1584 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1585 (grub_ext2_mtime): new function
1586 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1587 (grub_hfsplus_mtime): new function
1588 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1589 (GRUB_UFS_ATTR_FILE): likewise
1590 (GRUB_UFS_ATTR_LNK): likewise
1591 (struct grub_ufs_sblock): new fields mtime
1592 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1593 all users updated
1594 (grub_ufs_dir): mtime support
1595 (grub_ufs_mtime): new function
1596 * fs/affs.c (grub_affs_dir): use new dir syntax
1597 * fs/afs.c (grub_afs_dir): likewise
1598 * fs/cpio.c (grub_cpio_dir): likewise
1599 * fs/fat.c (grub_fat_find_dir): likewise
1600 * fs/hfs.c (grub_hfs_dir): likewise
1601 * fs/iso9660.c (grub_iso9660_dir): likewise
1602 * fs/jfs.c (grub_jfs_dir): likewise
1603 * fs/minix.c (grub_minix_dir): likewise
1604 * fs/ntfs.c (grub_ntfs_dir): likewise
1605 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1606 * fs/sfs.c (grub_sfs_dir): likewise
1607 * fs/xfs.c (grub_xfs_dir): likewise
1608 * util/hostfs.c (grub_hostfs_dir): likewise
1609 * lib/datetime.c: moved to ...
1610 * normal/datetime.c: ... moved here
1611 (grub_unixtime2datetime): new function
1612 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 1613 * normal/completion.c (iterate_dir): use new dir syntax
1614 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 1615 last modification time of a volume
7dd4a573 1616 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 1617 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 1618 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 1619 (normal_mod_SOURCES): likewise
1620 (datetime_mod_SOURCES): Removed lib/datetime.c
1621 * conf/i386-efi.rmk: likewise
7dd4a573 1622 * conf/i386-ieee1275.rmk: likewise
05aaebfb 1623 * conf/i386-pc.rmk: likewise
1624 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1625 * conf/sparc64-ieee1275.rmk: likewise
1626 * conf/x86_64-efi.rmk: likewise
05aaebfb 1627
8a7e1a14 16282009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1629
1630 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 1631
1632 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 1633 on grub_fat_find_dir
1634 (grub_fat_find_dir): use grub_fat_iterate_dir
1635 (grub_fat_label): likewise
1636
04186a9c 16372009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
1638
7dd4a573 1639 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 1640 and command.h
1641 remove extraneous kernel_elf_HEADERS
1642
da4c0bb6 16432009-04-04 Bean <bean123ch@gnail.com>
1644
1645 * include/grub/util/misc.h: Add dummy function fsync for mingw.
1646
1647 * util/misc.c: Likewise.
1648
54ad9555 16492009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1650
1651 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1652 instead of grub_printf.
1653
7a6bf9f2 16542009-04-03 Robert Millan <rmh@aybabtu.com>
1655
1656 * loader/i386/linux.c (grub_linux_setup_video): Fill
1657 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1658 values from `mode info' structure instead of hardcoded
1659 values.
1660
3fcc2083 16612009-04-01 Pavel Roskin <proski@gnu.org>
1662
1663 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1664 unused now.
1665 * genmk.rb: Likewise.
1666 * configure.ac: Likewise.
1667
5ec9740b 16682009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
1669
1670 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1671 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
1672
5270cec8 16732009-04-01 David S. Miller <davem@davemloft.net>
1674
1675 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 1676 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 1677 (grub_setjmp): Mark with 'returns_twice' attribute.
1678 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1679 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1680 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1681
9c3dd854 16822009-04-01 Robert Millan <rmh@aybabtu.com>
1683
1684 Reapply fix from 2008-07-28 which was accidentally reverted; also
1685 perform the same fix to a similar check in same function.
1686
1687 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1688 with the same number are found, just use issue a warning with
1689 grub_dprintf(), as this error has been reported to be non-fatal.
1690
0d818b7e 16912009-03-31 Pavel Roskin <proski@gnu.org>
1692
1693 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1694 for cross-compilation.
1695
95646d92 16962009-03-30 Robert Millan <rmh@aybabtu.com>
1697
1698 Fix i386-ieee1275 build.
1699
1700 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1701 Remove declaration.
1702
6a003ed1 17032009-03-30 Pavel Roskin <proski@gnu.org>
1704
1705 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1706 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
1707 zero-terminated, rely only on the strlen value. Fix comparison
1708 of strings differing in length.
1709
92f33540 17102009-03-30 Robert Millan <rmh@aybabtu.com>
1711
1712 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1713 checking for abi version. Improve error messages on BIOS to notify
1714 user about `linux16' command.
1715
a8c48fd5 17162009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
1717
f968172e 1718 Leak fixes
a8c48fd5 1719
f968172e 1720 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1721 in case of collision
1722 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 1723
9c323f09 17242009-03-29 Robert Millan <rmh@aybabtu.com>
1725
1726 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1727 set `vid_mode' accordingly.
1728 (grub_linux_boot): Process `vid_mode' and set video mode.
1729
ae68f423 17302009-03-29 Robert Millan <rmh@aybabtu.com>
1731
1732 * util/grub.d/10_linux.in (linux_entry): New function.
1733 Factorize generation of Linux boot entries.
1734
5709cfc4 17352009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
1736
1737 Make the format of Environment Block plain text. The boot loader
1738 part is not tested well yet.
7dd4a573 1739
5709cfc4 1740 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1741 (buffer): Removed.
1742 (envblk): Likewise.
1743 (usage): Remove "info" and "clear". Add "unset". Update the
1744 description of "set", as this does not delete variables any
1745 longer.
1746 (create_envblk_file): Complete rewrite.
1747 (open_envblk_file): Likewise.
1748 (cmd_info): Removed.
1749 (cmd_list): Likewise.
1750 (cmd_set): Likewise.
1751 (cmd_clear): Likewise.
1752 (list_variables): New function.
1753 (write_envblk): Likewise.
1754 (set_variables): Likewise.
1755 (unset_variables): Likewise.
1756 (main): Complete rewrite.
1757
1758 * commands/loadenv.c (buffer): Removed.
1759 (envblk): Likewise.
1760 (open_envblk_file): New function.
1761 (read_envblk_file): Complete rewrite.
1762 (grub_cmd_load_env): Likewise.
1763 (grub_cmd_list_env): Likewise.
1764 (struct blocklist): New struct.
1765 (free_blocklists): New function.
1766 (check_blocklists): Likewise.
1767 (write_blocklists): Likewise.
1768 (grub_cmd_save_env): Complete rewrite.
1769
1770 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1771 a plain text signature.
1772 (GRUB_ENVBLK_MAXLEN): Removed.
1773 (struct grub_envblk): Complete rewrite.
1774 (grub_envblk_find): Removed.
1775 (grub_envblk_insert): Likewise.
1776 (grub_envblk_open): New prototype.
1777 (grub_envblk_set): Likewise.
1778 (grub_envblk_delete): Put const to VALUE.
1779 (grub_envblk_iterate): Put const to NAME and VALUE.
1780 (grub_envblk_close): New prototype.
1781 (grub_envblk_buffer): New inline function.
1782 (grub_envblk_size): Likewise.
1783
1784 * lib/envblk.c: Include grub/mm.h.
1785 (grub_env_find): Removed.
1786 (grub_envblk_open): New function.
1787 (grub_envblk_close): Likewise.
1788 (escaped_value_len): Likewise.
1789 (find_next_line): Likewise.
1790 (grub_envblk_insert): Removed.
1791 (grub_envblk_set): New function.
1792 (grub_envblk_delete): Complete rewrite.
1793 (grub_envblk_iterate): Likewise.
1794
a9368fd3 17952009-03-28 Robert Millan <rmh@aybabtu.com>
1796
1797 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1798 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1799 variables. Use 16-bit loader.
1800 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1801 loader.
1802 * kern/i386/loader.S (grub_linux_boot): Rename to ...
1803 (grub_linux16_boot): ... this. Update all users.
1804 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1805 (grub_linux_boot): ... this. Update all users.
1806
1807 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1808 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
1809 commands to `linux16' and `initrd16'.
1810 (GRUB_MOD_FINI(linux)): Rename to ...
1811 (GRUB_MOD_FINI(linux16)): ... this.
1812
e4dd5a7e 18132009-03-24 Pavel Roskin <proski@gnu.org>
1814
1815 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1816 not just for compilation.
1817
c04d6e05 18182009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
1819
1820 Move multiboot helper out of kernel
1821
1822 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1823 `loader/i386/multiboot_helper.S'.
1824 * conf/i386-coreboot.rmk: Likewise
1825 * conf/i386-ieee1275.rmk: Likewise
1826
1827 * kern/i386/loader.S: Move multiboot helpers from here...
1828 * loader/i386/multiboot_helper.S: ...moved here
1829 * include/grub/i386/loader.h: Move declarations of multiboot
1830 helpers from here...
1831 * include/grub/i386/multiboot.h: ...moved here
1832 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1833
42a5b3fc 18342009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1835
1836 * kern/env.c (grub_env_context_open): Added an argument to specify
1837 whether a new context inherits exported variables from current
1838 one. This is useful when making a sandbox to interpret a config
1839 file.
1840 All callers updated.
1841
1842 * include/grub/env.h (grub_env_context_open): Updated the prototype.
1843
b28bbc4e 18442009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1845
1846 * kern/env.c (grub_env_context_close): Fix memory leaks.
1847
f04f02e4 18482009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1849
1850 * normal/main.c (grub_normal_execute): Added an argument
1851 BATCH to specify if an interactive interface should be provided
1852 after reading a config file.
1853 All callers updated.
1854 (read_command_list): Prevent being executed twice.
1855 (read_fs_list): Likewise.
1856
42a5b3fc 1857 * include/grub/normal.h (grub_normal_execute): Updated the
1858 prototype.
f04f02e4 1859
41473ac2 18602009-03-22 Pavel Roskin <proski@gno.org>
1861
fbc00b0c 1862 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1863 _start.
1864 * kern/i386/pc/startup.S: Likewise.
1865 * kern/i386/efi/startup.S: Likewise.
1866 * kern/i386/ieee1275/startup.S: Likewise.
1867 * kern/i386/coreboot/startup.S: Likewise.
1868 * kern/x86_64/efi/startup.S: Likewise.
1869
41473ac2 1870 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1871 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1872 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1873
2274cc8f 18742009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
1875
1876 Bugfixes in multiboot for bugs uncovered by solaris kernel.
1877
1878 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1879 limit detection.
1880 Use vaddr of correct segment for entry_point.
1881
b1b797cb 18822009-03-21 Bean <bean123ch@gmail.com>
1883
1884 * commands/blocklist.c: Add include file <grub/command.h>, remove
1885 <grub/normal.h> and <grub/arg.h>.
1886 (grub_cmd_blocklist): Use the new command interface.
1887 (GRUB_MOD_INIT): Likewise.
1888 (GRUB_MOD_FINI): Likewise.
1889 * commands/boot.c: Likewise.
1890 * commands/cat.c: Likewise.
1891 * commands/cmp.c: Likewise.
1892 * commands/configfile.c: Likewise.
1893 * commands/crc.c: Likewise.
1894 * commands/echo.c: Likewise.
1895 * commands/halt.c: Likewise.
1896 * commands/handler.c: Likewise.
1897 * commands/hdparm.c: Likewise.
1898 * commands/help.c: Likewise.
1899 * commands/hexdump.c: Likewise.
1900 * commands/loadenv.c: Likewise.
1901 * commands/ls.c: Likewise.
1902 * commands/lsmmap.c: Likewise.
1903 * commands/lspci.c: Likewise.
1904 * commands/loadenv.c: Likewise.
1905 * commands/read.c: Likewise.
1906 * commands/reboot.c: Likewise.
1907 * commands/search.c: Likewise.
1908 * commands/sleep.c: Likewise.
1909 * commands/test.c: Likewise.
1910 * commands/usbtest.c: Likewise.
1911 * commands/videotest.c: Likewise.
1912 * commands/i386/cpuid.c: Likewise.
1913 * commands/i386/pc/halt.c: Likewise.
1914 * commands/i386/pc/play.c: Likewise.
1915 * commands/i386/pc/pxecmd.c: Likewise.
1916 * commands/i386/pc/vbeinfo.c: Likewise.
1917 * commands/i386/pc/vbetest.c: Likewise.
1918 * commands/ieee1275/suspend.c: Likewise.
1919 * disk/loopback.c: Likewise.
1920 * font/font_cmd.c: Likewise.
1921 * hello/hello.c: Likewise.
1922 * loader/efi/appleloader.c: Likewise.
1923 * loader/efi/chainloader.c: Likewise.
1924 * loader/i386/bsd.c: Likewise.
1925 * loader/i386/efi/linux.c: Likewise.
1926 * loader/i386/ieee1275/linux.c: Likewise.
1927 * loader/i386/linux.c: Likewise.
1928 * loader/i386/pc/chainloader.c: Likewise.
1929 * loader/i386/pc/linux.c: Likewise.
1930 * loader/powerpc/ieee1275/linux.c: Likewise.
1931 * loader/multiboot_loader.c: Likewise.
1932 * term/gfxterm.c: Likewise.
1933 * term/i386/pc/serial.c: Likewise.
1934 * term/terminfo.c: Likewise.
1935
1936 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1937 * term/i386/pc/vga.c: Likewise.
1938 * video/readers/jpeg.c: Likewise.
1939 * video/readers/png.c: Likewise.
1940 * video/readers/tga.c: Likewise.
1941
1942 * util/grub-fstest (cmd_loopback): Removed.
1943 (cmd_blocklist): Likewise.
1944 (cmd_ls): Likewise.
1945 (grub_register_command): Likewise.
1946 (grub_unregister_command): Likewise.
1947 (execute_command): Use grub_command_find to locate command and execute
1948 it.
1949
1950 * include/grub/efi/chainloader.h: Removed.
1951 * loader/efi/chainloader_normal.c: Likewise.
1952 * loader/i386/bsd_normal.c: Likewise.
1953 * loader/i386/pc/chainloader_normal.c: Likewise.
1954 * loader/i386/pc/multiboot_normal.c: Likewise.
1955 * loader/linux_normal.c: Likewise.
1956 * loader/multiboot_loader_normal.c: Likewise.
1957 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1958
1959 * gencmdlist.sh: Scan new registration command grub_register_extcmd
1960 and grub_register_command_p1.
1961
1962 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1963 kern/command.c, lib/arg.c and commands/extcmd.c.
1964 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1965 (minicmd_mod_SOURCES): New variable.
1966 (minicmd_mod_CFLAGS): Likewise.
1967 (minicmd_mod_LDFLAGS): Likewise.
1968 (extcmd_mod_SOURCES): Likewise.
1969 (extcmd_mod_CFLAGS): Likewise.
1970 (extcmd_mod_LDFLAGS): Likewise.
1971 (boot_mod_SOURCES): Removed.
1972 (boot_mod_CFLAGS): Likewise.
1973 (boot_mod_LDFLAGS): Likewise.
1974
1975 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1976 kern/corecmd.c.
1977 (kernel_img_HEADERS): Add command.h.
1978 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1979 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1980 and lib/arg.c.
1981 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1982 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1983 remove the corresponding normal mode command.
1984 (normal_mod_SOURCES): Remove normal/arg.c.
1985 * conf/i386-coreboot.rmk: Likewise.
1986 * conf/i386-efi.rmk: Likewise.
1987 * conf/i386-ieee1275.rmk: Likewise.
1988 * conf/powerpc-ieee1275.rmk: Likewise.
1989 * conf/x86_64-efi.rmk: Likewise.
1990
1991 * include/grub/arg.h: Move from here ...
1992 * include/grub/lib/arg.h: ... to here.
1993
1994 * normal/arg.c: Move from here ...
1995 * lib/arg.c: ... to here.
1996
1997 * commands/extcmd.c: New file.
1998 * commands/minicmd.c: Likewise.
1999 * include/grub/command.h: Likewise.
2000 * include/grub/extcmd.h: Likewise.
2001 * kern/command.c: Likewise.
2002 * kern/corecmd.c: Likewise.
2003
2004 * kern/list.c (grub_list_iterate): Return int instead of void.
2005 (grub_list_insert): New function.
2006 (grub_prio_list_insert): Likewise.
2007
2008 * kern/rescue.c (grub_rescue_command): Removed.
2009 (grub_rescue_command_list): Likewise.
2010 (grub_rescue_register_command): Likewise.
2011 (grub_rescue_unregister_command): Likewise.
2012 (grub_rescue_cmd_boot): Move to minicmd.c
2013 (grub_rescue_cmd_help): Likewise.
2014 (grub_rescue_cmd_info): Likewise.
2015 (grub_rescue_cmd_boot): Likewise.
2016 (grub_rescue_cmd_testload): Likewise.
2017 (grub_rescue_cmd_dump): Likewise.
2018 (grub_rescue_cmd_rmmod): Likewise.
2019 (grub_rescue_cmd_lsmod): Likewise.
2020 (grub_rescue_cmd_exit): Likewise.
2021 (grub_rescue_print_devices): Moved to corecmd.c.
2022 (grub_rescue_print_files): Likewise.
2023 (grub_rescue_cmd_ls): Likewise.
2024 (grub_rescue_cmd_insmod): Likewise.
2025 (grub_rescue_cmd_set): Likewise.
2026 (grub_rescue_cmd_unset): Likewise.
7d074e3c 2027 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 2028 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 2029 commands, remove grub_rescue_register_command calls.
b1b797cb 2030
7d074e3c 2031 * normal/command.c (grub_register_command): Removed.
b1b797cb 2032 (grub_unregister_command): Likewise.
2033 (grub_command_find): Likewise.
2034 (grub_iterate_commands): Likewise.
2035 (rescue_command): Likewise.
2036 (export_command): Moved to corecmd.c.
2037 (set_command): Removed.
2038 (unset_command): Likewise.
2039 (insmod_command): Likewise.
2040 (rmmod_command): Likewise.
2041 (lsmod_command): Likewise.
2042 (grub_command_init): Likewise.
2043
2044 * normal/completion.c (iterate_command): Use cmd->prio to check for
2045 active command.
2046 (complete_arguments): Use grub_extcmd_t structure to find options.
2047 (grub_normal_do_completion): Change function grub_iterate_commands to
2048 grub_command_iterate.
2049
2050 * normal/execute.c (grub_script_execute_cmd): No need to parse
2051 argument here.
2052
2053 * normal/main.c (grub_dyncmd_dispatcher): New function.
2054 (read_command_list): Register unload commands as dyncmd.
2055 (grub_cmd_normal): Use new command interface, register rescue,
2056 unregister normal at entry, register normal, unregister rescue at exit.
2057
2058 * include/grub/list.h (grub_list_test_t): New type.
2059 (grub_list_iterate): Return int instead of void.
2060 (grub_list_insert): New function.
2061 (GRUB_AS_NAMED_LIST_P): New macro.
2062 (GRUB_AS_PRIO_LIST): Likewise.
2063 (GRUB_AS_PRIO_LIST_P): Likewise.
2064 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2065 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2066 (grub_prio_list): New structure.
2067 (grub_prio_list_insert): New function.
2068 (grub_prio_list_remove): New inline function.
2069
2070 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2071 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2072 (GRUB_COMMAND_FLAG_MENU): Likewise.
2073 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2074 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2075 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2076 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2077 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2078 (grub_command): Likewise.
2079 (grub_register_command): Likewise.
2080 (grub_command_find): Likewise.
2081 (grub_iterate_commands): Likewise.
2082 (grub_command_init): Likewise.
2083 (grub_arg_parse): Likewise.
2084 (grub_arg_show_help): Likewise.
2085
2086 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2087 (grub_rescue_unregister_command): Likewise.
2088
2089 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2090 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2091 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2092
2093 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2094 grub_rescue_cmd_initrd.
2095 * include/grub/i386/loader.h: Likewise.
2096 * include/grub/x86_64/loader.h: Likewise.
2097
2098 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2099
1f4147aa 21002009-03-21 Bean <bean123ch@gmail.com>
2101
2102 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2103 instead of stat in mingw environment.
2104
2105 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2106
2107 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2108
2109 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2110 AC_CONFIG_LINKS.
2111
2156d5ba 21122009-03-21 Bean <bean123ch@gmail.com>
2113
2114 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2115 out of range error.
2116
177b82ca 21172009-03-18 Michel Dänzer <michel@daenzer.net>
2118
2119 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2120 checking inode flags for EXT4_EXTENTS_FLAG.
2121
14aad807 21222009-03-18 Robert Millan <rmh@aybabtu.com>
2123
2124 * loader/i386/linux.c: Include `<grub/video.h>' and
2125 `<grub/i386/pc/vbe.h>'..
2126 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2127 (grub_linux32_boot): Attempt to configure video settings with
2128 grub_linux_setup_video().
2129 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2130 to avoid grub_console_fini() which would step out of graphical mode
2131 unconditionally.
2132
8cf83a27 21332009-03-14 Robert Millan <rmh@aybabtu.com>
2134
2135 Fix build on powerpc.
2136 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2137
40164e75 21382009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2139
2140 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2141 background image command.
2142
c58bc32a 21432009-03-12 Colin D Bennett <colin@gibibit.com>
2144
2145 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2146 (grub_gfxterm_putchar): Extract pairs of identical calls to
2147 draw_cursor out of conditional blocks.
2148
5415144a 21492009-03-11 Pavel Roskin <proski@gnu.org>
2150
2151 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2152 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2153
6394042e 21542009-03-11 Robert Millan <rmh@aybabtu.com>
2155
2156 * loader/i386/multiboot_elfxx.c
2157 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2158
b7b50e5f 21592009-03-11 Felix Zielcke <fzielcke@z-51.de>
2160
2161 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2162 `kern/handler.c'.
2163
1ca7fc96 21642009-03-11 Robert Millan <rmh@aybabtu.com>
2165
2166 * loader/i386/multiboot.c (code_size): New variable.
2167 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 2168 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 2169 4-byte alignment to MBI and others by increasing
7d074e3c 2170 `boot_loader_name_length' appropriately.
1ca7fc96 2171
2172 * loader/i386/multiboot_elfxx.c
2173 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2174
a83ea1d2 21752009-03-09 Felix Zielcke <fzielcke@z-51.de>
2176
2177 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2178 `fs/ext2.c'.
2179
aa9f3bff 21802009-03-08 Robert Millan <rmh@aybabtu.com>
2181
2182 Make loader/i386/linux.c usable on i386-pc again.
2183
2184 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2185 memory to heap.
2186 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2187 `#error' stanza.
2188
d8b3b60e 21892009-03-07 Bean <bean123ch@gmail.com>
2190
2191 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2192 allocation.
2193
b362c9e9 21942009-03-06 Robert Millan <rmh@aybabtu.com>
2195
2196 Fix display issue on terminals with screen size other than 80x25
2197 (e.g. gfxterm with resolution higher than 640x480).
2198
2199 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 2200 position relative to the center of the terminal instead of relying
b362c9e9 2201 on a hardcoded offset.
2202
9304eef1 22032009-03-04 Robert Millan <rmh@aybabtu.com>
2204
2205 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2206 installed.
2207
2208 * Makefile.in (host_kernel): New variable.
2209 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2210 scripts instead of just the windows one.
2211 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2212
eabc95fb 22132009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 2214
2215 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2216 `kern/handler.c'.
2217 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2218 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2219 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2220 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2221 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2222 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2223
ceb1223c 22242009-03-04 Felix Zielcke <fzielcke@z-51.de>
2225
2226 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2227 or if there's no space for the disk label and print the partition number on a
2228 invalid magic.
2229
4910684a 22302009-03-04 Felix Zielcke <fzielcke@z-51.de>
2231
2232 * util/misc.c: Include <time.h>.
2233 (grub_millisleep): New function.
2234
7e9ca17a 22352009-03-04 Bean <bean123ch@gmail.com>
2236
2237 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2238 another option -mno-red-zone.
2239
2240 * commands/handler.c: Change module description.
2241
2242 * kern/handler.c: Add missing space at the end of description line.
2243
2244 * kern/list.c: Likewise.
2245
f501677c 22462009-03-03 Robert Millan <rmh@aybabtu.com>
2247
2248 Move more components to the relocation area, and fix mbi pointer
2249 handling to use the destination rather than the origin (thanks to
2250 Vladimir Serbinenko for spotting).
2251
2252 * loader/i386/multiboot.c (mbi_dest): New variable.
2253 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2254 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2255 relocation area.
2256
9902d047 22572009-03-01 Bean <bean123ch@gmail.com>
2258
50fb7002 2259 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 2260 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2261 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2262 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2263
2264 * loader/i386/efi/linux.c (acpi_guid): New variable.
2265 (acpi_guid): Likewise.
2266 (EBDA_SEG_ADDR): New constant.
2267 (LOW_MEM_ADDR): Likewise.
2268 (FAKE_EBDA_SEG): Likewise.
2269 (fake_bios_data): New function.
2270 (grub_linux_boot): Call fake_bios_data.
2271
71b9f361 22722009-03-01 Bean <bean123ch@gmail.com>
2273
2274 * commands/terminal.c: Removed.
2275
2276 * commands/handler.c: New file.
2277
2278 * include/grub/list.h: Likewise.
2279
2280 * include/grub/handler.h: Likewise.
2281
2282 * kern/list.c: Likewise.
2283
2284 * kern/handler.c: Likewise.
2285
2286 * kern/term.h: Include header file <grub/handler.h>.
2287 (grub_term_input): Move next field to the beginning.
2288 (grub_term_output): Likewise.
2289 (grub_term_input_class): New variable.
2290 (grub_term_output_class): Likewise.
2291 (grub_term_register_input): Changed to inline function.
2292 (grub_term_register_output): Likewise.
2293 (grub_term_unregister_input): Likewise.
2294 (grub_term_unregister_output): Likewise.
2295 (grub_term_set_current_input): Likewise.
2296 (grub_term_set_current_output): Likewise.
2297 (grub_term_get_current_input): Likewise.
2298 (grub_term_get_current_output): Likewise.
2299 (grub_term_iterate_input): Removed.
2300 (grub_term_iterate_output): Likewise.
2301
2302 * kern/term.c (grub_term_list_input): Removed.
2303 (grub_term_list_output): Likewise.
2304 (grub_term_input_class): New variable.
2305 (grub_term_output_class): Likewise.
50fb7002 2306 (grub_cur_term_input): Change variable as macro.
71b9f361 2307 (grub_cur_term_output): Likewise.
2308 (grub_term_register_input): Removed.
2309 (grub_term_register_output): Likewise.
2310 (grub_term_unregister_input): Likewise.
2311 (grub_term_unregister_output): Likewise.
2312 (grub_term_set_current_input): Likewise.
2313 (grub_term_set_current_output): Likewise.
2314 (grub_term_iterate_input): Likewise.
2315 (grub_term_iterate_output): Likewise.
2316 (grub_term_get_current_input): Likewise.
2317 (grub_term_get_current_output): Likewise.
2318
2319 * util/grub-editenv.c: Include header file <grub/handler.h>.
2320 (grub_term_get_current_input): Removed.
2321 (grub_term_get_current_output): Likewise.
2322 (grub_term_input_class): New variable.
50fb7002 2323 (grub_term_output_class): Likewise.
71b9f361 2324
2325 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2326 (grub_term_get_current_output): Likewise.
2327 (grub_term_input_class): New variable.
50fb7002 2328 (grub_term_output_class): Likewise.
71b9f361 2329
2330 * util/grub-probe.c (grub_term_get_current_input): Removed.
2331 (grub_term_get_current_output): Likewise.
2332 (grub_term_input_class): New variable.
50fb7002 2333 (grub_term_output_class): Likewise.
71b9f361 2334
2335 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2336 (grub_term_get_current_output): Likewise.
2337 (grub_term_input_class): New variable.
50fb7002 2338 (grub_term_output_class): Likewise.
71b9f361 2339
2340 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2341 (terminal_mod_SOURCES): Likewise.
2342 (terminal_mod_CFLAGS): Likewise.
2343 (terminal_mod_LDFLAGS): Likewise.
2344
2345 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2346 handler.c.
2347 (kernel_img_SOURCES): Add list.c and handler.c.
2348 (kernel_img_HEADERS): Add list.h and handler.h.
2349
2350 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2351 handler.c.
2352 (kernel_mod_SOURCES): Add list.c and handler.c.
2353 (kernel_mod_HEADERS): Add list.h and handler.h.
2354
2355 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2356 handler.c.
2357 (kernel_elf_SOURCES): Add list.c and handler.c.
2358 (kernel_elf_HEADERS): Add list.h and handler.h.
2359
2360 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2361 handler.c.
2362 (kernel_elf_SOURCES): Add list.c and handler.c.
2363 (kernel_elf_HEADERS): Add list.h and handler.h.
2364
2365 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2366 handler.c.
2367 (kernel_mod_SOURCES): Add list.c and handler.c.
2368 (kernel_mod_HEADERS): Add list.h and handler.h.
2369
2370 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2371 handler.c.
2372 (kernel_elf_SOURCES): Add list.c and handler.c.
2373 (kernel_elf_HEADERS): Add list.h and handler.h.
2374
8a31787f 23752009-02-27 Robert Millan <rmh@aybabtu.com>
2376
2377 Factorize elf32 / elf64 code in Multiboot loader. This will
2378 prevent it from getting out of sync again.
2379
2380 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2381 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2382 grub_multiboot_load_elf64): Move from here ...
2383 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2384 grub_multiboot_load_elf): ... to here (new file).
2385
51cd3dfc 23862009-02-27 Robert Millan <rmh@aybabtu.com>
2387
2388 * util/grub.d/10_linux.in: Rename "single-user mode" to
2389 "recovery mode".
2390
6e8c9c3a 23912009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2392
2393 Don't leak in SCSI code.
2394 * disk/scsi.c (grub_scsi_close): free `scsi'.
2395
4b6bf4f9 23962009-02-27 Robert Millan <rmh@aybabtu.com>
2397
2398 * loader/i386/pc/multiboot.c: Move from here ...
2399 * loader/i386/multiboot.c: ... to here. Update all users.
2400
b9413424 24012009-02-27 Robert Millan <rmh@aybabtu.com>
2402
2403 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2404 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2405
50fb7002 24062009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 2407
2408 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2409 b-tree.
2410
8cc50345 24112009-02-27 Robert Millan <rmh@aybabtu.com>
2412
2413 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2414 `0x' qualifier as 0 when base is specified as parameter).
2415
6e09b8b7 24162009-02-24 Bean <bean123ch@gmail.com>
2417
2418 * configure.ac: Check for -mcmodel=large in x86_64 target.
2419
2420 * include/grub/efi/api.h (efi_call_10): New macro.
2421 (efi_wrap_10): New function.
2422
2423 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2424 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2425 (GRUB_PE32_REL_BASED_LOW): Likewise.
2426 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2427 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2428 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2429 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2430 (GRUB_PE32_REL_BASED_REL): Likewise.
2431 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2432 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2433 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2434
2435 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2436 issue.
2437
2438 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2439 (efi_wrap_10): New function.
2440
2441 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2442
2443 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2444 MB/MBP model (NV chipset).
2445 (devdata_devs): Add devpath_5 to the list.
2446
2447 * load/i386/efi/linux.c (video_base): Remove variable.
2448 (RGB_MASK): New macro.
2449 (RGB_MAGIC): Likewise.
2450 (LINE_MIN): Likewise.
2451 (LINE_MAX): Likewise.
2452 (FBTEST_STEP): Likewise.
2453 (FBTEST_COUNT): Likewise.
2454 (fb_list): New variable.
2455 (grub_find_video_card): Remove function.
2456 (find_framebuf): New function.
2457 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2458 line length.
2459
2460 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2461 problem for x86_64.
2462
74b21bee 24632009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2464
2465 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2466
2467 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2468 coding tool name.
2469
a455f472 24702009-02-22 Robert Millan <rmh@aybabtu.com>
2471
2472 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2473 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2474 in our relocation, instead of using it directly from heap. Also
2475 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2476
6374daf3 24772009-02-21 Robert Millan <rmh@aybabtu.com>
2478
2479 Implement USB keyboard support (based on patch by Marco Gerards)
2480
2481 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2482 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2483 (usb_keyboard_mod_LDFLAGS): New variables.
2484
2485 * term/usb_keyboard.c: New file.
2486
8fa4ea70 24872009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2488
2489 Corrected wrong declaration
2490
2491 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2492
353976ac 24932009-02-14 Christian Franke <franke@computer.org>
2494
2495 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2496 (grub_lspci_iter): Print class code and programming interface byte.
2497
6aa1169b 24982009-02-14 Christian Franke <franke@computer.org>
2499
2500 * gendistlist.sh: Ignore `.svn' directories.
2501
265372ca 25022009-02-14 Felix Zielcke <fzielcke@z-51.de>
2503
2504 * fs/fat.c: Add 2009 to Copyright line.
2505
9ff516f3 25062009-02-14 Christian Franke <franke@computer.org>
2507
2508 * commands/hdparm.c: New file. Provides `hdparm' command
2509 which sends ATA commands via grub_disk_ata_pass_through ().
2510
2511 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2512
2513 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2514 and <grub/cpu/io.h> to include/grub/ata.h.
2515 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2516 (GRUB_CDROM_SECTOR_SIZE): Remove.
2517 (GRUB_ATA_*): Move to include/grub/ata.h.
2518 (GRUB_ATAPI_*): Likewise.
2519 (enum grub_ata_commands): Likewise.
2520 (enum grub_ata_timeout_milliseconds): Likewise.
2521 (struct grub_ata_device): Likewise.
2522 (grub_ata_regset): Likewise.
2523 (grub_ata_regget): Likewise.
2524 (grub_ata_regset2): Likewise.
2525 (grub_ata_regget2): Likewise.
2526 (grub_ata_check_ready): Likewise.
2527 (grub_ata_wait_not_busy): Remove static, exported in
2528 include/grub/ata.h.
2529 (grub_ata_wait_drq): Likewise.
2530 (grub_ata_pio_read): Likewise.
2531
2532 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
2533 function for hdparm.mod.
2534
2535 * include/grub/ata.h: New file, contains declarations from
2536 disk/ata.c.
2537 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2538
2539 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2540 (grub_disk_ata_pass_through): New exported variable.
2541
2542 * kern/disk.c (grub_disk_ata_pass_through): New variable.
2543
772e23da 25442009-02-13 Colin D Bennett <colin@gibibit.com>
2545
2546 Support multiple fallback entries, and provide an API to support
2547 executing default+fallback menu entries. Renamed the `terminal' menu
2548 viewer to `text'.
2549
2550 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2551 variable declaration.
2552 (grub_menu_execute_callback): New structure declaration.
2553 (grub_menu_execute_callback_t): New typedef.
2554 (grub_menu_execute_with_fallback): New function declaration.
2555 (grub_menu_get_entry): Likewise.
2556 (grub_menu_get_timeout): Likewise.
2557 (grub_menu_set_timeout): Likewise.
2558
2559 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2560
2561 * normal/menu.c (grub_wait_after_message): Moved to
2562 `normal/menu_text.c'.
2563 (draw_border): Likewise.
2564 (print_message): Likewise.
2565 (print_entry): Likewise.
2566 (print_entries): Likewise.
2567 (grub_menu_init_page): Likewise.
2568 (get_entry_number): Likewise.
2569 (print_timeout): Likewise.
2570 (run_menu): Likewise.
2571 (grub_menu_execute_entry): Likewise.
2572 (show_text_menu): Likewise.
2573 (get_and_remove_first_entry_number): New function.
2574 (grub_menu_execute_with_fallback): Likewise.
2575 (get_entry): Renamed to ...
2576 (grub_menu_get_entry): .. this and made it global.
2577 (get_timeout): Renamed to ...
2578 (grub_menu_get_timeout): ... this and made it global.
2579 (set_timeout): Renamed to ...
2580 (grub_menu_set_timeout): ... this and made it global.
2581 (grub_normal_terminal_menu_viewer): Renamed to ...
2582 (grub_normal_text_menu_viewer): ... this.
2583
2584 * normal/menu_text.c: New file. Extracted text-menu-specific code
2585 from normal/menu.c.
2586
2587 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2588 (normal_mod_SOURCES): Likewise.
2589
2590 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2591 (normal_mod_SOURCES): Likewise.
2592
2593 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2594 (normal_mod_SOURCES): Likewise.
2595
2596 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2597 (normal_mod_SOURCES): Likewise.
2598
2599 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2600 (normal_mod_SOURCES): Likewise.
2601
2602 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2603 (normal_mod_SOURCES): Likewise.
2604
2605 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2606 (normal_mod_SOURCES): Likewise.
2607
16ac430e 26082009-02-11 Robert Millan <rmh@aybabtu.com>
2609
2610 * util/grub.d/00_header.in: Update old reference to `font' command.
2611
06ff20fc 26122009-02-10 Felix Zielcke <fzielcke@z-51.de>
2613
2614 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2615
2616 Based on patch from Javier Martín.
2617
96da9407 26182009-02-09 Felix Zielcke <fzielcke@z-51.de>
2619
2620 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 2621 to avoid false positives with FAT.
96da9407 2622 (grub_fstest_SOURCES): Likewise.
2623 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2624 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2625 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2626 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2627 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2628 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2629
6dca6fe4 26302009-02-09 Felix Zielcke <fzielcke@z-51.de>
2631
06ff20fc 2632 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 2633 bpb.version_specific.fat12_or_fat16.fstype and
2634 bpb.version_specific.fat32.fstype.
2635
2550c62f 26362009-02-08 Robert Millan <rmh@aybabtu.com>
2637
be110b30 2638 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 2639
56978920 26402009-02-08 Robert Millan <rmh@aybabtu.com>
2641
2642 * Makefile.in (host_os, host_cpu): New variables.
2643 (target_os): Remove. Update all users.
2644
d64399b5 26452009-02-08 Marco Gerards <marco@gnu.org>
2646
2647 * Makefile.in (enable_grub_emu_usb): New variable.
2648 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2649 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2650 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2651 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2652 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2653 `usbtest.mod' and `usbms.mod'.
2654 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2655 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2656 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2657 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2658 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2659 variables.
2660
2661 * disk/usbms.c: New file.
2662
2663 * include/grub/usb.h: Likewise.
2664
2665 * include/grub/usbtrans.h: Likewise.
2666
2667 * include/grub/usbdesc.h: Likewise.
2668
2669 * bus/usb/usbtrans.c: Likewise.
2670
2671 * bus/usb/ohci.c: Likewise.
2672
2673 * bus/usb/uhci.c: Likewise.
2674
2675 * bus/usb/usbhub.c: Likewise.
2676
2677 * bus/usb/usb.c: Likewise.
2678
2679 * commands/usbtest.c: Likewise.
2680
2681 * util/usb.c: Likewise.
50fb7002 2682
d64399b5 2683 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2684
2685 * configure.ac: Test for libusb presence.
50fb7002 2686
d64399b5 2687 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2688
2b40d6bb 26892009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
2690
2691 * kern/mm.c: Add more comments.
2692
73a4ce81 26932009-02-08 Robert Millan <rmh@aybabtu.com>
2694
2695 Patch from Javier Martín.
2696 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2697 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2698
f821ce59 26992009-02-08 Robert Millan <rmh@aybabtu.com>
2700
2701 * fs/cpio.c: Split tar functionality to ...
2702 * fs/tar.c: ... here (new file). Update all users.
2703
aebfc4b0 27042009-02-07 Robert Millan <rmh@aybabtu.com>
2705
2706 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2707 backward-incompatible features.
2708
2709 Based on patch from Javier Martín, with some adjustments.
2710
50fb7002 27112009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 2712
2713 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2714
0bb5115e 27152009-02-07 Robert Millan <rmh@aybabtu.com>
2716
2717 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2718 position of `disk/lvm.c' to ensure grub_init_all() always picks it
2719 after the RAID stuff.
2720
38a0f8e7 27212009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
2722
50fb7002 2723 Fixes problem when running vbetest command as reported by
38a0f8e7 2724 Vladimir Serbinenko <phcoder@gmail.com>.
2725
2726 * (grub_vbe_set_video_mode): Fixed problem with text modes.
2727
3143cc1c 27282009-02-04 Felix Zielcke <fzielcke@z-51.de>
2729
2730 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2731 /dev/md/NpN style mdraid devices.
2732
9cba6fce 27332009-02-03 Felix Zielcke <fzielcke@z-51.de>
2734
2735 * util/unifont2pff.rb: Remove.
2736
e507a2c1 27372009-02-03 Felix Zielcke <fzielcke@z-51.de>
2738
2739 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2740 `#'.
2741
d2c2b4cd 27422009-02-03 Felix Zielcke <fzielcke@z-51.de>
2743
2744 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2745 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2746 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2747 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2748 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2749 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2750 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2751
b4315fb0 27522009-02-02 Christian Franke <franke@computer.org>
2753
2754 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2755
de3aa260 27562009-02-01 Felix Zielcke <fzielcke@z-51.de>
2757
7c3ff286 2758 * INSTALL: Note that we now require at least autoconf 2.59 and
2759 that LZO is optional.
de3aa260 2760
825a182b 27612009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2762
2763 Base on patch on bug #24154 created by Tomas Tintera
2764 <trosos@seznam.cz>.
2765
2766 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2767
a69ef770 27682009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2769
7c3ff286 2770 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 2771 <bero@arklinux.org>.
2772
2773 * normal/parser.y (script_init): Add missing semicolon.
2774
6fa42fa6 27752009-01-31 Colin D Bennett <colin@gibibit.com>
2776
7c3ff286 2777 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 2778 (free_menu_entry_classes): Added.
2779 (grub_normal_menu_addentry): Added class property handling.
2780 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2781 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2782
2783 * normal/menu_viewer.c: New file.
2784
2785 * normal/menu.c (run_menu_entry): Renamed to ...
2786 (grub_menu_execute_entry): ... this and made it as global.
2787 (grub_menu_run): Renamed to ...
2788 (show_text_menu): ... this and made it local.
2789 (show_text_menu): Adapt to new function names.
2790 (grub_normal_terminal_menu_viewer): New global variable.
2791
2792 * include/grub/menu.h: New file.
2793
2794 * include/grub/menu_viewer.h: New file.
2795
2796 * include/grub/normal.h: Added include to grub/menu.h.
2797 (grub_menu_entry): Moved to include/grub/menu.h.
2798 (grub_menu_entry_t): Likewise.
2799 (grub_menu): Likewise.
2800 (grub_menu_t): Likewise.
2801 (grub_normal_terminal_menu_viewer): Added.
2802 (grub_menu_execute_entry): Likewise.
2803 (grub_menu_run): Removed.
2804
2805 * DISTLIST: Added include/grub/menu.h.
2806 Added include/grub/menu_viewer.h.
2807 Added normal/menu_viewer.c.
2808
28092009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
2810
2811 * normal/execute.c (grub_script_execute_menuentry): Changed to use
2812 arglist for menutitle arguments.
2813
2814 * normal/main.c (grub_normal_menu_addentry): Likewise.
2815
2816 * normal/parser.y (menuentry): Likewise.
2817
2818 * normal/script.c (grub_script_create_cmdmenu): Likewise.
2819
2820 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2821 (grub_script_create_cmdmenu): Likewise.
2822
2823 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2824
2825 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2826 changes.
2827
2828 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2829
2830 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2831
2832 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2833
2834 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2835
2836 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2837
2838 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2839
56192c23 28402009-01-30 Christian Franke <franke@computer.org>
2841
2842 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2843 in option help text.
2844
d72521b3 28452009-01-27 Pavel Roskin <proski@gnu.org>
2846
2847 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2848
994b5e84 28492009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2850
2851 * commands/lsmmap.c: Add include to grub/machine/memory.h.
2852
2853 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2854
2855 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2856 unregister function.
2857
6a7eab2c 28582009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2859
2860 * disk/scsi.c (grub_scsi_read): Fix sign problem.
2861
2862 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2863
2864 * util/grub-mkfont.c (usage): Fix typo.
2865
2866 * util/elf/grub-mkimage.c (load_modules): Fix warning.
2867
1806b56e 28682009-01-26 Daniel Mierswa <impulze@impulze.org>
2869
3fb18f09 2870 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2871
336e1fb9 2872 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2873
1806b56e 2874 * kern/misc.c (grub_strcasecmp): New function.
2875 (grub_strcasecmp): Use grub_size_t instead of int for length.
2876 Fix return value.
2877 * include/grub/misc.h: Update function prototypes.
2878
580b2a0f 28792009-01-26 Robert Millan <rmh@aybabtu.com>
2880
2881 * configure.ac: Fix cross-compilation check.
ef257b36 2882
d31c24f1 28832009-01-22 Christian Franke <franke@computer.org>
2884
2885 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2886 (precision) digit string. Allow `.format2' without `format1' (width).
2887 Limit input chars for `%s' output to `format2' if specified. This is
2888 compatible with standard printf ().
2889
3138b44c 28902009-01-22 Christian Franke <franke@computer.org>
2891
2892 * disk/ata.c (grub_ata_wait_status): Replace by ...
2893 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
2894 other status bits may be invalid while BSY is asserted.
2895 (grub_ata_check_ready): New function.
2896 (grub_ata_cmd): Removed.
2897 (grub_ata_wait_drq): New function.
2898 (grub_ata_strncpy): Remove inline.
2899 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
2900 and error check now done by grub_ata_wait_drq ().
2901 (grub_ata_pio_write): Likewise.
2902 (grub_atapi_identify): Set DEV before check for !BSY. Use
2903 grub_ata_wait_drq () to wait for data.
2904 (grub_ata_device_initialize): Add status register check to
2905 detect missing SATA slave devices. Add debug messages.
2906 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2907 (grub_atapi_packet): Set DEV before check for !BSY. Replace
2908 transfer loop by grub_ata_pio_write ().
2909 (grub_ata_identify): Set DEV before check for !BSY. Use
2910 grub_ata_wait_drq () to wait for data.
ef257b36 2911 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 2912 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2913 read/write in one loop. Fix invalid command on write. Fix incomplete
2914 command on (size % batch) == 0. Add missing error check after write of
2915 last block. Add debug messages.
2916 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
2917
59a64ef6 29182009-01-19 Christian Franke <franke@computer.org>
2919
2920 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2921 (GRUB_ATAPI_IREASON_*): Likewise.
2922 (grub_ata_pio_write): Fix timeout error return.
2923 (grub_atapi_identify): Add grub_ata_wait () after cmd.
2924 (grub_atapi_wait_drq): New function.
2925 (grub_atapi_packet): New parameter `size'.
2926 Use grub_atapi_wait_drq () and direct write instead of
2927 grub_ata_pio_write ().
2928 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2929 reads the number of bytes requested by the device for each DRQ
2930 assertion.
2931 (grub_atapi_write): Remove old implementation, return not
2932 implemented instead.
2933
1cfe20b3 29342009-01-19 Christian Franke <franke@computer.org>
2935
2936 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2937 of 512 to calculate data size.
2938 (grub_scsi_read12): Likewise.
2939 (grub_scsi_write10): Likewise.
2940 (grub_scsi_write12): Likewise.
2941 (grub_scsi_read): Adjust size according to blocksize.
2942 Add checks for invalid blocksize and unaligned transfer.
2943
bee5fe5d 29442009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
2945
2946 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2947
ef257b36 2948 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 2949 width glyphs.
2950
3e643f8c 29512009-01-19 Robert Millan <rmh@aybabtu.com>
2952
2953 * config.guess: Update to latest version from config git.
2954 * config.sub: Likewise.
2955
4fa80998 29562009-01-17 Felix Zielcke <fzielcke@z-51.de>
2957
2958 * Makefile.in: Change font compilation to use new grub-mkfont instead
2959 of java version.
2960
2961 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2962 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2963 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2964 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2965 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2966 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2967 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2968 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2969 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2970
7086085b 29712009-01-16 Christian Franke <franke@computer.org>
2972
2973 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2974 (enum grub_ata_timeout_milliseconds): New enum.
2975 (grub_ata_wait_status): Add parameter milliseconds.
2976 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
2977 recovery from timed-out commands.
2978 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
2979 return grub_errno instead of REG_ERROR.
2980 (grub_ata_pio_write): Add parameter milliseconds.
2981 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2982 Pass milliseconds to grub_ata_wait_status () and
2983 grub_ata_pio_read ().
2984 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2985 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
2986 grub_ata_wait_status (). Fix IDENTIFY timeout check.
2987 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2988 It is not suitable for device detection, because DEV bit is ignored,
2989 the command may run too long, and not all devices set the signature
2990 properly.
2991 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2992 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2993 Fix device selection, DEV bit must be set first to address the registers
2994 of the correct device.
2995 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2996 grub_ata_pio_read/write ().
2997 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2998 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2999
4a412913 30002009-01-13 Carles Pina i Estany <carles@pina.cat>
3001
3002 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3003
7795c55e 30042009-01-13 Bean <bean123ch@gmail.com>
d913988c 3005
3006 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3007
7795c55e 30082009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 3009
3010 * Makefile.in: (enable_grub_mkfont): New variable.
3011 (freetype_cflags): Likewise.
3012 (freetype_libs): Likewise.
3013
3014 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3015 (grub_mkfont_SOURCES): New variable.
3016 (grub_mkfont_CFLAGS): Likewise.
3017 (grub_mkfont_LDFLAGS): Likewise.
3018
3019 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3020 library if `--enable-grub-mkfont' is requested.
3021 (enable_grub_mkfont): New variable.
3022 (freetype_cflags): Likewise.
3023 (freetype_libs): Likewise.
3024
3025 * util/grub-mkfont.c: New file.
3026
093af1fe 30272009-01-12 Christian Franke <franke@computer.org>
3028
3029 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3030 mode check. Fix setting of compat_use[].
3031
f36cc108 30322009-01-10 Robert Millan <rmh@aybabtu.com>
3033
3034 Update a few copyright years which we forgot to do in 2008 (only for
3035 files whose changes made in 2008 were copyright-significant)
3036
3037 * Makefile.in: Add 2008 to Copyright line.
3038 * disk/ieee1275/ofdisk.c: Likewise.
3039 * disk/efi/efidisk.c: Likewise.
3040 * kern/dl.c: Likewise.
3041 * kern/sparc64/ieee1275/init.c: Likewise.
3042 * kern/mm.c: Likewise.
3043 * kern/efi/mm.c: Likewise.
3044 * boot/i386/pc/boot.S: Likewise.
3045 * genfslist.sh: Likewise.
3046 * fs/iso9660.c: Likewise.
3047 * fs/hfs.c: Likewise.
3048 * fs/jfs.c: Likewise.
3049 * fs/minix.c: Likewise.
3050 * fs/ufs.c: Likewise.
3051 * gensymlist.sh.in: Likewise.
3052 * genkernsyms.sh.in: Likewise.
3053 * include/grub/misc.h: Likewise.
3054 * include/grub/types.h: Likewise.
3055 * include/grub/symbol.h: Likewise.
3056 * include/grub/elf.h: Likewise.
3057 * include/grub/kernel.h: Likewise.
3058 * include/grub/disk.h: Likewise.
3059 * include/grub/dl.h: Likewise.
3060 * include/grub/i386/linux.h: Likewise.
3061 * include/grub/i386/pc/biosdisk.h: Likewise.
3062 * include/grub/efi/api.h: Likewise.
3063 * include/grub/efi/pe32.h: Likewise.
3064 * include/grub/util/misc.h: Likewise.
3065 * normal/execute.c: Likewise.
3066 * normal/arg.c: Likewise.
3067 * normal/completion.c: Likewise.
3068 * normal/lexer.c: Likewise.
3069 * normal/parser.y: Likewise.
3070 * normal/misc.c: Likewise.
3071 * commands/i386/pc/vbeinfo.c: Likewise.
3072 * commands/hexdump.c: Likewise.
3073 * commands/terminal.c: Likewise.
3074 * commands/ls.c: Likewise.
3075 * commands/help.c: Likewise.
3076 * partmap/pc.c: Likewise.
3077 * loader/efi/chainloader.c: Likewise.
3078 * loader/multiboot_loader.c: Likewise.
3079 * loader/i386/pc/multiboot2.c: Likewise.
3080 * term/efi/console.c: Likewise.
3081 * term/i386/pc/serial.c: Likewise.
3082 * util/lvm.c: Likewise.
3083 * util/console.c: Likewise.
3084 * util/i386/efi/grub-mkimage.c: Likewise.
3085 * util/raid.c: Likewise.
3086
7f02114b 30872009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3088
3089 * commands/videotest.c: Removed include to grub/machine/memory.h.
3090
3091 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3092 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3093 (video_mod_SOURCES): Removed.
3094 (video_mod_CFLAGS): Likewise.
3095 (video_mod_LDFLAGS): Likewise.
3096 (gfxterm_mod_SOURCES): Likewise.
3097 (gfxterm_mod_CFLAGS): Likewise.
3098 (gfxterm_mod_LDFLAGS): Likewise.
3099 (videotest_mod_SOURCES): Likewise.
3100 (videotest_mod_CFLAGS): Likewise.
3101 (videotest_mod_LDFLAGS): Likewise.
3102 (bitmap_mod_SOURCES): Likewise.
3103 (bitmap_mod_CFLAGS): Likewise.
3104 (bitmap_mod_LDFLAGS): Likewise.
3105 (tga_mod_SOURCES): Likewise.
3106 (tga_mod_CFLAGS): Likewise.
3107 (tga_mod_LDFLAGS): Likewise.
3108 (jpeg_mod_SOURCES): Likewise.
3109 (jpeg_mod_CFLAGS): Likewise.
3110 (jpeg_mod_LDFLAGS): Likewise.
3111 (png_mod_SOURCES): Likewise.
3112 (png_mod_CFLAGS): Likewise.
3113 (png_mod_LDFLAGS): Likewise.
3114
3115 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3116 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3117 (video_mod_SOURCES): Added.
3118 (video_mod_CFLAGS): Likewise.
3119 (video_mod_LDFLAGS): Likewise.
3120 (videotest_mod_SOURCES): Likewise.
3121 (videotest_mod_CFLAGS): Likewise.
3122 (videotest_mod_LDFLAGS): Likewise.
3123 (bitmap_mod_SOURCES): Likewise.
3124 (bitmap_mod_CFLAGS): Likewise.
3125 (bitmap_mod_LDFLAGS): Likewise.
3126 (tga_mod_SOURCES): Likewise.
3127 (tga_mod_CFLAGS): Likewise.
3128 (tga_mod_LDFLAGS): Likewise.
3129 (jpeg_mod_SOURCES): Likewise.
3130 (jpeg_mod_CFLAGS): Likewise.
3131 (jpeg_mod_LDFLAGS): Likewise.
3132 (png_mod_SOURCES): Likewise.
3133 (png_mod_CFLAGS): Likewise.
3134 (png_mod_LDFLAGS): Likewise.
3135 (gfxterm_mod_SOURCES): Likewise.
3136 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 3137 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 3138
3139 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3140 grub/machine/console.h.
3141
644fff97 31422009-01-04 Jerone Young <jerone@gmail.com>
3143
3144 Make on screen instructions clearer
3145
3146 Based on patch created by Jidanni <jidanni@jidanni.org>
3147
3148 * normal/menu.c: print clearer instructions on the screen
3149
1e901a75 31502009-01-02 Colin D Bennett <colin@gibibit.com>
3151
3152 New font engine.
34c44600 3153
1e901a75 3154 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3155 build system and fixed gfxterm.c to work with different sized fonts.
3156
3157 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 3158
1e901a75 3159 * configure: Re-generated.
34c44600 3160
1e901a75 3161 * DISTLIST: Removed font/manager.c.
3162 Added font/font.c.
3163 Added font/font_cmd.c.
34c44600 3164
1e901a75 3165 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3166 compilation.
34c44600 3167
1e901a75 3168 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 3169
3170 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 3171
3172 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 3173
1e901a75 3174 * normal/menu.c: Likewise.
34c44600 3175
1e901a75 3176 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3177 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 3178
1e901a75 3179 * include/grub/font.h: Replaced with new file.
34c44600 3180
1e901a75 3181 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3182 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3183 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3184 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3185 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 3186 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 3187 fg_red, fg_green, fg_blue, fg_alpha.
3188 (grub_video_adapter): Removed blit_glyph.
34c44600 3189 (grub_video_blit_glyph): Removed.
3190
1e901a75 3191 * font/manager.c: Removed file.
34c44600 3192
3193 * font/font.c: New file.
3194
1e901a75 3195 * font/font_cmd.c: Likewise.
34c44600 3196
1e901a75 3197 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 3198
1e901a75 3199 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3200 (grub_video_vbe_map_rgba): Likewise.
3201 (grub_video_vbe_unmap_color_int): Likewise.
3202 (grub_video_vbe_blit_glyph): Removed.
3203 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 3204
1e901a75 3205 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3206 (get_pixel): Likewise.
34c44600 3207 (set_pixel): Likewise.
3208
1e901a75 3209 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 3210
1e901a75 3211 * term/gfxterm.c: Adapted to new font engine.
34c44600 3212
1e901a75 3213 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 3214
1e901a75 3215 * term/i386/pc/vga.c: Likewise.
34c44600 3216
1e901a75 3217 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 3218
1e901a75 3219 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 3220
1e901a75 3221 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3222
1e901a75 3223 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 3224
1e901a75 3225 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 3226
1e901a75 3227 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 3228
1e901a75 3229 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 3230
1e901a75 3231 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 3232
1e901a75 3233 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3234
3235 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 3236
1e901a75 3237 * util/grub-mkconfig_lib.in: Changed font extension.
3238
278922e8 32392008-12-28 Felix Zielcke <fzielcke@z-51.de>
3240
3241 * util/getroot.c (grub_util_get_grub_dev): Add support for
3242 /dev/md/dNNpNN style partitionable mdraid devices.
3243
3ced05cf 32442008-12-12 Alex Smith <alex@alex-smith.me.uk>
3245
3246 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3247 at a time limit of the PXE TFTP API correctly.
3248 (grub_pxefs_close): Likewise.
3249
7fd0ee30 32502008-11-29 Robert Millan <rmh@aybabtu.com>
3251
34c44600 3252 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 3253 grub_ata_device_initialize() calls.
3254
34c44600 32552008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 3256
3257 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3258 iteration failed.
3259 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3260
89313780 32612008-11-28 Robert Millan <rmh@aybabtu.com>
3262
3263 Fix build on powerpc-ieee1275. Based on patch created by
3264 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3265 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3266 `kern/ieee1275/mmap.c'.
3267 * include/grub/powerpc/ieee1275/memory.h: New file.
3268
15257703 3269 Provide grub-install on coreboot.
3270 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3271 (grub_install_SOURCES): New variable.
3272 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3273 usable on coreboot.
3274
9fc5388a 32752008-11-25 Felix Zielcke <fzielcke@z-51.de>
3276
3277 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3278 to `grub_term_input_t'.
3279 (grub_term_get_current_output): Change return type to
3280 `grub_term_output_t'.
3281
bc3a2f31 32822008-11-22 Robert Millan <rmh@aybabtu.com>
3283
34c44600 3284 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 3285 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3286 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3287 grub_vga_text_cls().
3288
80fc88f2 3289 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 3290 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 3291
cbf36fd3 3292 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3293 to 0x200000 (avoids trouble with some OFW implementations, and matches
3294 with the one in Yaboot).
3295 Reported by Manoel Abranches
3296
73e8e268 32972008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 3298
3299 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3300 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3301
73e8e268 3302 * util/grub-mkconfig_lib.in (grub_warn): New function.
3303 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3304 warnings, to obtain consistent formatting.
3305 * util/grub.d/00_header.in: Likewise.
3306 * util/update-grub_lib.in: Likewise.
3307
e94045a1 3308 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 3309 Move comment text to `#error' stanza.
e94045a1 3310
79d29fd7 3311 Harmonize ieee1275's grub_available_iterate() with the generic
3312 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3313 build problem on i386-ieee1275):
3314 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3315 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3316 parameter `type'. Update all users of this function.
3317 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3318 `kern/ieee1275/mmap.c'.
3319 * kern/ieee1275/init.c
3320 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3321 with ...
3322 (grub_machine_mmap_iterate): ... this.
3323 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3324 return type to `grub_err_t'. Update all implementations of this
3325 function prototype.
3326 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3327 Likewise.
3328
60d6b16e 3329 Add `lsmmap' command (lists firmware-provided memory map):
3330 * commands/lsmmap.c: New file.
3331 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3332 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3333 variables.
3334 * conf/powerpc-ieee1275.rmk: Likewise.
3335 * conf/i386-coreboot.rmk: Likewise.
3336 * conf/i386-ieee1275.rmk: Likewise.
3337
ebaaf49b 33382008-11-19 Robert Millan <rmh@aybabtu.com>
3339
3340 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 3341 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3342 constraints to initrd allocation (based on code from
3343 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3344 for Linux to find it.
ebaaf49b 3345
dfab719f 33462008-11-14 Robert Millan <rmh@aybabtu.com>
3347
3348 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3349 order to cope with duplicate slashes.
3350
10fc3eb9 33512008-11-14 Robert Millan <rmh@aybabtu.com>
3352
3353 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3354 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3355 don't want to mess with lower memory, because it is used in the Linux
3356 loader.
3357
3358 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 3359 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 3360 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3361 is in our heap (probably as a result of it being corrupted during
2f2a3442 3362 decompression). Add #error instance with comment to explain why this
3363 loader isn't currently usable on PC/BIOS.
10fc3eb9 3364
e2e07847 33652008-11-14 Robert Millan <rmh@aybabtu.com>
3366
3367 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 3368 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 3369
fe8e8d69 33702008-11-12 Robert Millan <rmh@aybabtu.com>
3371
3372 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3373
3374 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3375 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3376 from here ...
3377 * include/grub/i386/pc/memory.h: ... to here.
3378
976b07d0 33792008-11-12 Robert Millan <rmh@aybabtu.com>
3380
3381 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3382 split).
3383
3384 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3385 (grub_console_cur_color, grub_console_real_putchar)
3386 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3387 (grub_console_setcolorstate, grub_console_setcolor)
3388 (grub_console_getcolor): Move from here ...
3389 * include/grub/i386/vga_common.h: ... to here (new file).
3390
3391 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3392 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3393 `<grub/i386/io.h>'.
3394 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3395 `<grub/i386/vga_common.h>'.
3396
76679cd3 33972008-11-12 Robert Millan <rmh@aybabtu.com>
3398
3399 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3400 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3401 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3402 variables.
3403 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3404 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3405
3406 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3407 grub_console_init() with call to grub_vga_text_init().
3408 (grub_machine_fini): Replace call to
3409 grub_console_fini() with call to grub_vga_text_fini() and
3410 grub_at_keyboard_fini().
3411
3412 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3413 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3414 (grub_console_setcolorstate, grub_console_setcolor)
3415 (grub_console_getcolor): New function prototypes.
3416
3417 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3418 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3419 (grub_vga_text_setcursor): Static-ize.
3420 (grub_vga_text_term): New structure.
3421 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3422
3423 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3424 (grub_console_cur_color, grub_console_standard_color)
3425 (grub_console_normal_color, grub_console_highlight_color)
3426 (map_char, grub_console_putchar, grub_console_getcharwidth)
3427 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3428 (grub_console_getcolor): Move from here ...
3429 * term/i386/vga_common.c: ... to here (same function names).
3430
95b841d3 34312008-11-12 Robert Millan <rmh@aybabtu.com>
3432
3433 Use newly-added Multiboot support in coreboot.
3434
3435 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3436 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3437
3438 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3439 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3440 (codestart): Store the MBI in `startup_multiboot_info' when we're
3441 being loaded using Multiboot.
3442
3443 * kern/i386/coreboot/init.c (grub_machine_init): Move
3444 grub_at_keyboard_init() call to beginning of function (useful for
3445 debugging). Call grub_machine_mmap_init() before attempting to use
3446 grub_machine_mmap_iterate().
3447 (grub_lower_mem, grub_upper_mem): Move from here ...
3448 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3449 here (new file).
3450
3451 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3452 function prototype.
3453
761ca975 34542008-11-12 Robert Millan <rmh@aybabtu.com>
3455
3456 Fix a regression introduced by the at_keyboard.mod split. Because
3457 some terminals are default on some platforms and non-default on
3458 others, the first terminal being registered determines which is
3459 going to be default.
3460
3461 * kern/term.c (grub_term_register_input): If this is the first
3462 terminal being registered, set it as the current one.
3463 (grub_term_register_output): Likewise.
3464
3465 * term/efi/console.c (grub_console_init): Do not call
3466 grub_term_set_current_output() or grub_term_set_current_input().
3467 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3468 * term/i386/pc/console.c (grub_console_init): Likewise.
3469 (grub_console_fini): Do not call grub_term_set_current_input()
3470 (but leave grub_term_set_current_output() to restore text mode).
3471
6c529df7 34722008-11-10 Robert Millan <rmh@aybabtu.com>
3473
3474 * util/grub.d/00_header.in: Add backward compatibility check for
3475 versions of terminal.mod that don't understand `terminal_input' or
3476 `terminal_output'.
3477
132e4113 34782008-11-09 Robert Millan <rmh@aybabtu.com>
3479
3480 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3481 `terminal_input' / `terminal_output', not `terminal'.
3482
ac293d50 34832008-11-08 Robert Millan <rmh@aybabtu.com>
3484
3485 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 3486 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 3487
0025933a 34882008-11-08 Robert Millan <rmh@aybabtu.com>
3489
3490 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 3491 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 3492 members. Update all users.
3493 * util/console.c (grub_ncurses_term): Split in ...
3494 (grub_ncurses_term_input): ... this, and ...
3495 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 3496 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 3497
37c86336 34982008-11-08 Robert Millan <rmh@aybabtu.com>
3499
3500 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3501 (PKGDATA): Add $(pkgdata_SRCDIR).
3502 (pkglib_BUILDDIR): New variable.
3503 (pkgdata_SRCDIR): New variable.
3504 (build_env.mk): New target.
3505 (include_DATA): New variable.
3506 (install-local): Install $(include_DATA) files in $(includedir).
3507
b6c15a2d 35082008-11-07 Pavel Roskin <proski@gnu.org>
3509
d99d46f1 3510 * gendistlist.sh: Use C locale for sorting to ensure consistent
3511 output on all systems.
3512
b6c15a2d 3513 * util/grub.d/00_header.in: Remove incorrect space before
3514 "serial".
3515
c32ee8c9 35162008-11-07 Robert Millan <rmh@aybabtu.com>
3517
3518 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3519 per specification.
3520 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3521 * loader/multiboot_loader.c (find_multi_boot2_header): New function
3522 (based on find_multi_boot1_header).
3523 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3524 using find_multi_boot2_header(), and abort if neither Multiboot or
3525 Multiboot headers were found.
3526
651c29b7 35272008-11-07 Robert Millan <rmh@aybabtu.com>
3528
3529 Modularize at_keyboard.mod:
3530
3531 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3532 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3533 (at_keyboard_mod_LDFLAGS): New variables.
3534
3535 Actual terminal split:
3536
3537 * include/grub/term.h (struct grub_term): Split in ...
3538 (struct grub_term_input): ... this, and ...
3539 (struct grub_term_output): ... this. Update all users.
3540 (grub_term_set_current): Split in ...
3541 (grub_term_set_current_input): ... this, and ...
3542 (grub_term_set_current_output): ... this.
3543 (grub_term_get_current): Split in ...
3544 (grub_term_get_current_input): ... this, and ...
3545 (grub_term_get_current_output): ... this.
3546 (grub_term_register): Split in ...
3547 (grub_term_register_input): ... this, and ...
3548 (grub_term_register_output): ... this.
3549 (grub_term_unregister): Split in ...
3550 (grub_term_unregister_input): ... this, and ...
3551 (grub_term_unregister_output): ... this.
3552 (grub_term_iterate): Split in ...
3553 (grub_term_iterate_input): ... this, and ...
3554 (grub_term_iterate_output): ... this.
3555
3556 * kern/term.c (grub_term_list): Split in ...
3557 (grub_term_list_input): ... this, and ...
3558 (grub_term_list_output): ... this. Update all users.
3559 (grub_cur_term): Split in ...
3560 (grub_cur_term_input): ... this, and ...
3561 (grub_cur_term_output): ... this. Update all users.
3562 (grub_term_set_current): Split in ...
3563 (grub_term_set_current_input): ... this, and ...
3564 (grub_term_set_current_output): ... this.
3565 (grub_term_get_current): Split in ...
3566 (grub_term_get_current_input): ... this, and ...
3567 (grub_term_get_current_output): ... this.
3568 (grub_term_register): Split in ...
3569 (grub_term_register_input): ... this, and ...
3570 (grub_term_register_output): ... this.
3571 (grub_term_unregister): Split in ...
3572 (grub_term_unregister_input): ... this, and ...
3573 (grub_term_unregister_output): ... this.
3574 (grub_term_iterate): Split in ...
3575 (grub_term_iterate_input): ... this, and ...
3576 (grub_term_iterate_output): ... this.
3577
3578 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3579 a check for input and one for output (and only attempt to get keys
3580 from user when input works).
3581
3582 * util/grub-probe.c (grub_term_get_current): Split in ...
3583 (grub_term_get_current_input): ... this, and ...
3584 (grub_term_get_current_output): ... this.
3585 * util/grub-fstest.c: Likewise.
3586 * util/i386/pc/grub-setup.c: Likewise.
3587 * util/grub-editenv.c: Likewise.
3588
3589 Portability adjustments:
3590
3591 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3592 `term/i386/pc/at_keyboard.c'.
3593 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3594 grub_keyboard_controller_init() (now handled by terminal .init).
3595 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3596 grub_at_keyboard_init().
3597 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3598 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3599 at_keyboard.mod via input terminal interface).
3600 * include/grub/i386/coreboot/console.h: Convert into a stub for
3601 `<grub/i386/pc/console.h>'.
3602
3603 Migrate full terminals to new API:
3604
3605 * term/efi/console.c (grub_console_term): Split into ...
3606 (grub_console_term_input): ... this, and ...
3607 (grub_console_term_output): ... this. Update all users.
3608 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3609 (grub_ofconsole_init): Split into ...
3610 (grub_ofconsole_init_input): ... this, and ...
3611 (grub_ofconsole_init_output): ... this.
3612 (grub_ofconsole_term): Split into ...
3613 (grub_ofconsole_term_input): ... this, and ...
3614 (grub_ofconsole_term_output): ... this. Update all users.
3615 * term/i386/pc/serial.c (grub_serial_term): Split into ...
3616 (grub_serial_term_input): ... this, and ...
3617 (grub_serial_term_output): ... this. Update all users.
3618 * term/i386/pc/console.c (grub_console_term): Split into ...
3619 (grub_console_term_input): ... this, and ...
3620 (grub_console_term_output): ... this. Update all users.
3621 (grub_console_term_input): Only enable it on PC/BIOS platform.
3622 (grub_console_init): Remove grub_keyboard_controller_init() call.
3623
3624 Migrate input terminals to new API:
3625
3626 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3627 `i386' and `i386/pc' to enable build on x86_64 (this driver is
3628 i386-specific anyway).
3629 (grub_console_checkkey): Rename to ...
3630 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
3631 users.
3632 (grub_keyboard_controller_orig): New variable.
3633 (grub_console_getkey): Rename to ...
3634 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
3635 users.
3636 (grub_keyboard_controller_init): Static-ize. Save original
3637 controller value so that it can be restored ...
3638 (grub_keyboard_controller_fini): ... here (new function).
3639 (grub_at_keyboard_term): New structure.
3640 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3641 functions.
3642
3643 Migrate output terminals to new API:
3644
3645 * term/i386/pc/vga.c (grub_vga_term): Change type to
3646 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3647 members. Update all users.
3648 * term/gfxterm.c (grub_video_term): Change type to
3649 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3650 members. Update all users.
3651 * include/grub/i386/pc/console.h (grub_console_checkkey)
3652 (grub_console_getkey): Do not export (no longer needed by gfxterm,
3653 etc).
3654
3655 Migrate `terminal' command and userland tools to new API:
3656
3657 * commands/terminal.c (grub_cmd_terminal): Split into ...
3658 (grub_cmd_terminal_input): ... this, and ...
3659 (grub_cmd_terminal_output): ... this.
3660 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3661 `terminal_input' and `terminal_output'.
3662 * util/grub.d/00_header.in: Adjust `terminal' calls to new
3663 `terminal_input' / `terminal_output' API.
3664 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3665 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3666 provided ${GRUB_TERMINAL}, convert it).
3667
96e5d876 36682008-11-04 Robert Millan <rmh@aybabtu.com>
3669
3670 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
3671 for FreeBSD.
3672 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3673
556f3775 36742008-11-03 Bean <bean123ch@gmail.com>
3675
3676 * kern/elf.c (grub_elf32_load): Revert to previous code.
3677 (grub_elf64_load): Likewise.
3678
3679 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3680
926b9823 36812008-11-01 Robert Millan <rmh@aybabtu.com>
3682
3683 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3684 (TARGET_CPPFLAGS): Likewise.
3685 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3686
1432e958 36872008-11-01 Carles Pina i Estany <carles@pina.cat>
3688
3689 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3690
dba3f844 36912008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 3692
3693 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3694 addition of objects until the code is not going to be able to fail.
3695
dba3f844 36962008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 3697
3698 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3699 (add a missing NULL check, and correct them by moving the pointer
3700 operations after the actual check).
3701
7ab28c21 37022008-10-29 Robert Millan <rmh@aybabtu.com>
3703
3704 * util/i386/pc/grub-install.in: Handle empty string as output from
3705 make_system_path_relative_to_its_root().
3706
1b7748eb 37072008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
3708
3709 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3710 circular metadata worst case scenario. If the metadata is circular
3711 then copy the wrap in place.
3712 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3713 project lib/format_text/layout.h
3714 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3715
c9618ab2 37162008-10-03 Felix Zielcke <fzielcke@z-51.de>
3717
7a36edca 3718 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 3719
bf981c62 37202008-10-03 Felix Zielcke <fzielcke@z-51.de>
3721
3722 * util/update-grub_lib.in: Mention filename in warning message.
3723
6d994591 37242008-09-29 Felix Zielcke <fzielcke@z-51.de>
3725
3726 * NEWS: Update for rename of update-grub to grub-mkconfig.
3727
18ade780 37282008-09-29 Felix Zielcke <fzielcke@z-51.de>
3729
3730 * util/update-grub_lib.in: Copy to ...
3731 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 3732 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 3733 * util/update-grub.in: Rename to ...
3734 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
3735 option. Add `--output' option to allow users to specify the generated
3736 configuration file. Default to stdout.
3737 (update_grub_dir): Rename to ...
3738 (grub_mkconfig_dir): ... this.
3739 (grub_cfg): Default to an empty string.
3740 * conf/common.rmk (update-grub): Rename to ...
3741 (grub-mkconfig): ... this.
3742 (update-grub_lib): Copy to ...
3743 (grub-mkconfig_lib): ... this.
3744 (update-grub_SCRIPTS): Copy to ...
3745 (grub-mkconfig_SCRIPTS): ... this. Update all users.
3746 (update-grub_DATA): Rename to ...
3747 (grub-mkconfig_DATA): ... this.
3748
556ce6ac 37492008-09-28 Robert Millan <rmh@aybabtu.com>
3750
3751 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3752 to `modified'. Add the real `created' field.
3753 (grub_iso9660_uuid): Use `modified' rather than `created' for
3754 constructing the UUID.
3755
37562008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 3757
3758 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3759 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3760
92274e85 37612008-09-28 Bean <bean123ch@gmail.com>
3762
3763 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3764 Thanks to Christian Franke for finding this bug.
3765
add6f17a 37662008-09-25 Robert Millan <rmh@aybabtu.com>
3767
3768 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3769 instances of grub_util_get_disk_name() (see previous commit).
3770
d2a367b8 37712008-09-25 Robert Millan <rmh@aybabtu.com>
3772
3773 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3774 `util/i386/get_disk_name.c'.
3775 * conf/i386-efi.rmk: Likewise.
3776 * conf/x86_64-efi.rmk: Likewise.
3777 * conf/i386-coreboot.rmk: Likewise.
3778 * conf/i386-ieee1275.rmk: Likewise.
3779 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3780 `util/ieee1275/get_disk_name.c'.
3781 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3782 * util/ieee1275/get_disk_name.c: Remove file.
3783 * util/i386/get_disk_name.c: Remove file.
3784 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3785 "hd%d" for device.map entries, rather than using
3786 grub_util_get_disk_name().
3787
81a06771 37882008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 3789
3790 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3791 warning.
3792 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3793
5a004279 37942008-09-24 Carles Pina i Estany <carles@pina.cat>
3795
3796 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3797 Changed to 0x5100.
3798 (GRUB_TERM_PPAGE): Changed to 0x4900.
3799
397093d3 38002008-09-24 Robert Millan <rmh@aybabtu.com>
3801
3802 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3803 macros (they were i386-pc specific).
3804 * include/grub/sparc64/ieee1275/console.h: Likewise.
3805 * include/grub/efi/console.h: Likewise.
3806
a91b6c7c 38072008-09-22 Bean <bean123ch@gmail.com>
3808
3809 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3810 resident and in attribute list.
3811
3812 * include/grub/ntfs.h (BMP_LEN): Removed.
3813
c40fd116 38142008-09-22 Bean <bean123ch@gmail.com>
3815
81a06771 3816 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 3817 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3818
3819 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3820 error occurs, as grub_disk_open will call grub_disk_close, which will
3821 call p->close (scsi).
3822
81a06771 38232008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 3824
3825 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3826 (AC_PREREQ): Bumped to 2.59.
3827 (AC_TRY_COMPILE): Replace obsolete macro with ...
3828 (AC_COMPILE_IFELSE): ... this.
3829 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3830 (AC_LINK_IFELSE): ... this.
3831
5dc43410 38322008-09-21 Felix Zielcke <fzielcke@z-51.de>
3833
3834 * autogen.sh: Add a call to `gendistlist.sh'.
3835
9035dce4 38362008-09-19 Christian Franke <franke@computer.org>
3837
3838 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3839 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3840 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3841 Export __enable_execute_stack() to modules.
3842 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3843 New function.
3844
7fd75377 38452008-09-09 Felix Zielcke <fzielcke@z-51.de>
3846
040030b3 3847 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3848 Sort the list.
3849
38502008-09-09 Felix Zielcke <fzielcke@z-51.de>
3851
3852 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 3853 #include <grub/util/hostdisk.h>.
3854
89d5ffcf 38552008-09-08 Robert Millan <rmh@aybabtu.com>
3856
3857 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3858 segments when their filesz is zero (grub_file_read() interprets
81a06771 3859 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 3860 Use `lowest_segment' rather than 0 for calculating the current
3861 segment load address.
3862
40da438f 38632008-09-08 Robert Millan <rmh@aybabtu.com>
3864
3865 * util/hostdisk.c (open_device): Replace a grub_util_info() call
3866 with grub_dprintf("hostdisk", ...), as it was so verbose that it
3867 clobbered useful information.
3868
ddbf5556 38692008-09-08 Robert Millan <rmh@aybabtu.com>
3870
3871 * include/grub/util/biosdisk.h: Move to ...
3872 * include/grub/util/hostdisk.h: ... here. Update all users.
3873 * util/biosdisk.c: Move to ...
3874 * util/hostdisk.c: ... here. Update all users.
3875
783d0f48 38762008-09-07 Robert Millan <rmh@aybabtu.com>
3877
3878 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3879 variables.
3880 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3881 and length can be stored directly in the `mbi->mmap_addr' and
3882 `mbi->mmap_length' struct fields.
3883
548e2ea5 38842008-09-07 Robert Millan <rmh@aybabtu.com>
3885
3886 * conf/i386.rmk: New file. Provides declaration for building
3887 `cpuid.mod'.
3888 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3889 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3890 variables.
3891 Include `conf/i386.mk'.
3892 * conf/i386-efi.rmk: Likewise.
3893 * conf/x86_64-efi.rmk: Likewise.
3894 * conf/i386-coreboot.rmk: Likewise.
3895 * conf/i386-ieee1275.rmk: Likewise.
3896
0ea85a37 38972008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
3898
3899 Based on patch created by Colin D Bennett <colin@gibibit.com>.
3900 Adds optimization support for BGR based modes.
3901
3902 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3903 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3904 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3905 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3906 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3907 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3908 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3909 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3910 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3911 (grub_video_i386_vbeblit_index_index): Likewise.
3912 (grub_video_i386_vbeblit_replace_directN): Added.
3913 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3914 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3915 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3916 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3917 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3918 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 3919 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 3920 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3921 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3922 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3923 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3924 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3925 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3926
3927 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3928 (grub_video_i386_vbefill_R8G8B8): Likewise.
3929 (grub_video_i386_vbefill_index): Likewise.
3930 (grub_video_i386_vbefill_direct32): Added.
3931 (grub_video_i386_vbefill_direct24): Likewise.
3932 (grub_video_i386_vbefill_direct16): Likewise.
3933 (grub_video_i386_vbefill_direct8): Likewise.
3934
81a06771 3935 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 3936 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3937 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3938 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3939 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3940 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 3941
0ea85a37 3942 * video/video.c (grub_video_get_blit_format): Updated to use new
3943 blit formats. Added handling for 16 bit color modes.
81a06771 3944
3945 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 3946 fillers.
3947 (common_blitter): Updated to use new blitters.
3948
3949 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3950 Removed.
3951 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3952 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3953 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3954 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3955 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3956 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3957 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3958 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3959 (grub_video_i386_vbeblit_index_index): Likewise.
3960 (grub_video_i386_vbeblit_replace_directN): Added.
3961 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3962 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3963 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3964 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3965 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3966 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3967 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3968 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3969 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3970 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3971 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3972 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3973 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 3974
0ea85a37 3975 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3976 (grub_video_i386_vbefill_R8G8B8): Likewise.
3977 (grub_video_i386_vbefill_index): Likewise.
3978 (grub_video_i386_vbefill_direct32): Added.
3979 (grub_video_i386_vbefill_direct24): Likewise.
3980 (grub_video_i386_vbefill_direct16): Likewise.
3981 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 3982
0ea85a37 3983 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3984 types.
81a06771 3985
0ea85a37 3986 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3987 types.
81a06771 3988
0ea85a37 3989 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3990 blitter types.
81a06771 3991
0ea85a37 3992 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3993 types.
3994
e8a83df6 39952008-09-06 Felix Zielcke <fzielcke@z-51.de>
3996
3997 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3998 RAID level 1.
3999
6bcd8ee5 40002008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 4001
6bcd8ee5 4002 * fs/iso9660.c (grub_iso9660_date): New structure.
4003 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4004 (grub_iso9660_uuid): New function.
c375ae58 4005
59261157 40062008-09-05 Bean <bean123ch@gmail.com>
4007
4008 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4009
4010 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4011 insensitive bit for names in Win32 and Win32 & DOS namespace.
4012
4013 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4014
4015 * include/grub/types.h (LONG_MAX): Likewise.
4016
58b6645a 40172008-09-04 Felix Zielcke <fzielcke@z-51.de>
4018
4ee55921 4019 * util/getroot.c: Include <config.h>.
4020 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4021 add support for /dev/md/N devices and handle LVM double dash escaping.
4022
40232008-09-04 Felix Zielcke <fzielcke@z-51.de>
4024
4025 * config.guess: Update to latest version from config git.
4026 * config.sub: Likewise.
58b6645a 4027
9124f65d 40282008-09-03 Robert Millan <rmh@aybabtu.com>
4029
4030 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4031 `disk->total_sectors'.
4032
81a06771 40332008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 4034
4035 * include/grub/normal.h: Fixed incorrect comment for
4036 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4037
81a06771 40382008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 4039
4040 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4041 values with defines.
4042
4043 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4044 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4045 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4046 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4047 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4048 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4049 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4050 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4051 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4052 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4053 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4054 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4055 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4056 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4057 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4058 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4059 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4060 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4061 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4062
93d5cbf8 40632008-08-31 Robert Millan <rmh@aybabtu.com>
4064
4065 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4066 declaration.
4067 (grub_multiboot): Fix a few warnings.
4068
21751d50 40692008-08-31 Robert Millan <rmh@aybabtu.com>
4070
4071 * loader/i386/pc/multiboot.c: Update comment not to say that
4072 boot_device support is unimplemented.
4073
e27a75c5 40742008-08-31 Robert Millan <rmh@aybabtu.com>
4075
4076 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4077 or memory map support are unimplemented.
4078
81a06771 40792008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 4080
4081 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4082
81a06771 40832008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 4084
4085 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4086 total video memory in 'vbeinfo' output; show color format details for
4087 each video mode.
4088
7c5d8d95 40892008-08-30 Pavel Roskin <proski@gnu.org>
4090
4091 * util/genmoddep.c: Remove for real this time.
4092 * DISTLIST: Remove util/genmoddep.c.
4093
4cebd25a 40942008-08-30 Robert Millan <rmh@aybabtu.com>
4095
4096 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4097 as required by Multiboot spec (it was already 4-byte aligned, but
4098 only by chance).
4099
b497a269 41002008-08-29 Pavel Roskin <proski@gnu.org>
4101
e3925185 4102 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4103 * kern/powerpc/ieee1275/startup.S: ... this.
4104 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4105 * DISTLIST: Likewise.
4106
b497a269 4107 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4108 grub/cpu/kernel.h. Add start label for consistency with other
4109 platforms. Add grub_prefix immediately after start. Add jump
4110 to the code after grub_prefix.
4111 * include/grub/powerpc/kernel.h: Provide valid values for
4112 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4113
6e5a42fe 41142008-08-29 Bean <bean123ch@gmail.com>
4115
4116 * configure.ac: Change host_os to cygwin for mingw.
4117 (asprintf): New check for function.
4118
4119 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4120 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4121
4122 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 4123 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 4124 sync, sleep and grub_util_get_disk_size for mingw.
4125
4126 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4127 to get size in mingw.
4128 (open_device): Use flag O_BINARY if it's defined.
4129 (find_root_device): Add dummy code for mingw.
4130
4131 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4132 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4133 (get_scsi_disk_name): Return 0 for mingw.
4134
4135 * util/hostfs.c: #include <grub/util/misc.h>.
4136 (grub_hostfs_open): Use "rb" flag to open file, use
4137 grub_util_get_disk_size to get disk size for mingw.
4138
4139 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4140 (asprintf): New function if HAVE_ASPRINTF is not set.
4141 (sync): New function for mingw.
4142 (sleep): Likewise.
4143 (grub_util_get_disk_size): Likewise.
4144
ab3f2673 41452008-08-28 Pavel Roskin <proski@gnu.org>
4146
4147 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4148 kern/time.c.
4149
1c282483 41502008-08-28 Robert Millan <rmh@aybabtu.com>
4151
4152 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4153
678e849c 41542008-08-28 Robert Millan <rmh@aybabtu.com>
4155
4156 Change find_grub_drive() syntax so it doesn't prevent it from
4157 detecting NULL names as errors.
4158
4159 * util/biosdisk.c (find_grub_drive): Move free slot search code
4160 from here ...
4161 (find_free_slot): ... to here.
4162 (read_device_map): Use find_free_slot() to search for free slots.
4163
965c75ca 41642008-08-27 Marco Gerards <marco@gnu.org>
4165
4166 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4167 (scsi_mod_SOURCES): New variable.
4168 (scsi_mod_CFLAGS): Likewise
4169 (scsi_mod_LDFLAGS): Likewise.
4170
4171 * disk/scsi.c: New file.
4172
4173 * include/grub/scsi.h: Likewise.
4174
4175 * include/grub/scsicmd.h: Likewise.
4176
4177 * disk/ata.c: Include <grub/scsi.h>.
4178 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4179 instead.
4180 (grub_ata_iterate): Skip ATAPI devices.
4181 (grub_ata_open): Only handle ATAPI devices.
4182 (struct grub_atapi_read): Removed.
4183 (grub_atapi_readsector): Likewise.
4184 (grub_ata_read): No longer handle ATAPI devices.
4185 (grub_ata_write): Likewise.
4186 (grub_atapi_iterate): New function.
4187 (grub_atapi_read): Likewise.
4188 (grub_atapi_write): Likewise.
4189 (grub_atapi_open): Likewise.
4190 (grub_atapi_close): Likewise.
4191 (grub_atapi_dev): New variable.
4192 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4193 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4194
4195 * include/grub/disk.h (enum grub_disk_dev_id): Add
4196 `GRUB_DISK_DEVICE_SCSI_ID'.
4197
c07ae501 41982008-08-26 Robert Millan <rmh@aybabtu.com>
4199
4200 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4201 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4202 descriptive.
4203
5ed20adc 42042008-08-23 Bean <bean123ch@gmail.com>
4205
4206 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4207 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4208 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4209 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4210 dm_nv.mod.
4211 (raid5rec_mod_SOURCES): New macro.
4212 (raid5rec_mod_CFLAGS): Likewise.
4213 (raid5rec_mod_LDFLAGS): Likewise.
4214 (raid6rec_mod_SOURCES): Likewise.
4215 (raid6rec_mod_CFLAGS): Likewise.
4216 (raid6rec_mod_LDFLAGS): Likewise.
4217 (mdraid_mod_SOURCES): Likewise.
4218 (mdraid_mod_CFLAGS): Likewise.
4219 (mdraid_mod_LDFLAGS): Likewise.
4220 (dm_nv_mod_SOURCES): Likewise.
4221 (dm_nv_mod_CFLAGS): Likewise.
4222 (dm_nv_mod_LDFLAGS): Likewise.
4223
4224 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4225 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4226 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4227
4228 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4229 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4230
4231 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4232
4233 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4234
4235 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4236
4237 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4238
4239 * disk/raid5_recover.c: New file.
4240
4241 * disk/raid6_recover.c: Likewise.
4242
4243 * disk/mdraid_linux.c: Likewise.
4244
4245 * disk/dmraid_nvidia.c: Likewise.
4246
4247 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4248 ULONG_MAX.
4249
4250 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4251 calculate the size of raid device.
4252 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4253 different layout of raid5.
4254 (grub_raid_scan_device): Remove code specific to mdraid.
4255 (grub_raid_list): New variable.
4256 (free_array): New function.
4257 (grub_raid_register): Likewise.
4258 (grub_raid_unregister): Likewise.
4259 (grub_raid_rescan): Likewise.
4260 (GRUB_MOD_INIT): Don't iterate device here.
4261 (GRUB_MOD_FINI): Use free_array to release resource.
4262
4263 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4264 (grub_raid5_recover_func_t): New function variable type.
4265 (grub_raid6_recover_func_t): Likewise.
4266 (grub_raid5_recover_func): New variable.
4267 (grub_raid6_recover_func): Likewise.
4268 (grub_raid_register): New function.
4269 (grub_raid_unregister): Likewise.
4270 (grub_raid_rescan): Likewise.
4271 (grub_raid_block_xor): Likewise.
4272
4273 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4274 (CMD_CRC): New macro.
4275 (part): Removed.
4276 (read_file): Handle device as well as file.
4277 (cmd_crc): New function.
4278 (fstest): Handle multiple disks.
4279 (options): Remove part, raw and long, add root and diskcount.
4280 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 4281 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 4282 add handling for the new options, support multiple disks.
4283
4284 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4285
29c18915 42862008-08-23 Bean <bean123ch@gmail.com>
4287
4288 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4289
4290 * genfslist.sh: Ignore kernel.mod.
4291
4292 * genpartmaplist.sh: Likewise.
4293
8415f261 42942008-08-23 Robert Millan <rmh@aybabtu.com>
4295
4296 * util/getroot.c (find_root_device): Skip anything that starts with
4297 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4298
d5a7dc5b 42992008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 4300
d5a7dc5b 4301 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4302 * util/grub.d/00_header.in: Allow the administrator to change default
4303 gfxmode via ${GRUB_GFXMODE}.
4304
380cfbb4 43052008-08-21 Felix Zielcke <fzielcke@z-51.de>
4306
4307 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4308
c9baafe7 43092008-08-21 Robert Millan <rmh@aybabtu.com>
4310
4311 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4312 loader.
4313 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4314 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4315
e290bef2 43162008-08-20 Carles Pina i Estany <carles@pina.cat>
4317
4318 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4319 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4320
f9dbfc96 43212008-08-19 Robert Millan <rmh@aybabtu.com>
4322
4323 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4324 (struct grub_virtual_screen): Remove `cursor_color'.
4325 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4326 initialization.
4327 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4328
dd6bd6ab 43292008-08-18 Robert Millan <rmh@aybabtu.com>
4330
4331 Unify (identical) linux_normal.c files.
4332 * loader/i386/efi/linux_normal.c: Move from here ...
4333 * loader/linux_normal.c: ... to here. Update all users.
4334 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4335 * loader/i386/ieee1275/linux_normal.c: Likewise.
4336
7f42f83e 43372008-08-18 Robert Millan <rmh@aybabtu.com>
4338
4339 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4340 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4341 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4342 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4343 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4344 New macros.
4345 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4346 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4347 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4348 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4349 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4350 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4351 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4352 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4353 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4354 portably using grub_getxy().
4355 Replace `-EFI' with `-bzImage' in boot message.
4356
38487ddb 43572008-08-17 Robert Millan <rmh@aybabtu.com>
4358
4359 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4360
deceb3ec 43612008-08-17 Robert Millan <rmh@aybabtu.com>
4362
4363 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4364
4365 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4366 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4367 (grub_machine_mmap_iterate): New function declaration.
4368 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4369 structure.
4370 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4371 macros.
4372
4373 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4374 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4375 Move e820 parsing from here ...
4376 * kern/i386/pc/mmap.c: New file.
4377 (grub_machine_mmap_iterate): ... to here.
4378
4379 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4380 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4381 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4382 (grub_available_iterate): Redeclare to return `void', and redeclare
4383 its hook to use grub_uint64_t as addr and size parameters, and rename
4384 to ...
4385 (grub_machine_mmap_iterate): ... this. Update all users.
4386
4387 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4388 to make it more readable. Rename to ...
4389 (grub_machine_mmap_iterate): ... this.
4390
4391 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4392 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4393 (grub_multiboot): Allocate an extra region after the payload, and fill
4394 it with a Multiboot memory map. Adjust a.out loader to calculate size
4395 with the extra space.
4396 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4397 with the extra space.
4398
f8aa0f43 43992008-08-17 Carles Pina i Estany <carles@pina.cat>
4400
9807deb9 4401 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 4402
605f5bb6 44032008-08-17 Felix Zielcke <fzielcke@z-51.de>
4404
4405 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4406 mdate-sh to the list `find' searches for.
4407 * DISTLIST: Regenerated.
4408
210db6c6 44092008-08-16 Felix Zielcke <fzielcke@z-51.de>
4410
4411 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4412 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 4413 genmoddep.awk, gensymlist.sh.in.
4414 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 4415 * DISTLIST: Regenerated.
48cdbfd4 4416 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 4417
1082b929 44182008-08-16 Robert Millan <rmh@aybabtu.com>
4419
4420 * disk/raid.c (grub_raid_init): Handle/report errors set by
4421 grub_device_iterate().
4422 * disk/lvm.c (grub_lvm_init): Likewise.
4423
42ce5170 44242008-08-15 Bean <bean123ch@gmail.com>
4425
4426 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4427 and datehook.mod.
4428 (datetime_mod_SOURCES): New macro.
4429 (datetime_mod_CFLAGS): Likewise.
4430 (datetime_mod_LDFLAGS): Likewise.
4431 (date_mod_SOURCES): Likewise.
4432 (date_mod_CFLAGS): Likewise.
4433 (date_mod_LDFLAGS): Likewise.
4434 (datehook_mod_SOURCES): Likewise.
4435 (datehook_mod_CFLAGS): Likewise.
4436 (datehook_mod_LDFLAGS): Likewise.
4437
4438 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4439 and datehook.mod.
4440 (datetime_mod_SOURCES): New macro.
4441 (datetime_mod_CFLAGS): Likewise.
4442 (datetime_mod_LDFLAGS): Likewise.
4443 (date_mod_SOURCES): Likewise.
4444 (date_mod_CFLAGS): Likewise.
4445 (date_mod_LDFLAGS): Likewise.
4446 (datehook_mod_SOURCES): Likewise.
4447 (datehook_mod_CFLAGS): Likewise.
4448 (datehook_mod_LDFLAGS): Likewise.
4449
4450 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4451 and datehook.mod.
4452 (datetime_mod_SOURCES): New macro.
4453 (datetime_mod_CFLAGS): Likewise.
4454 (datetime_mod_LDFLAGS): Likewise.
4455 (date_mod_SOURCES): Likewise.
4456 (date_mod_CFLAGS): Likewise.
4457 (date_mod_LDFLAGS): Likewise.
4458 (datehook_mod_SOURCES): Likewise.
4459 (datehook_mod_CFLAGS): Likewise.
4460 (datehook_mod_LDFLAGS): Likewise.
4461
4462 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4463 and datehook.mod.
4464 (datetime_mod_SOURCES): New macro.
4465 (datetime_mod_CFLAGS): Likewise.
4466 (datetime_mod_LDFLAGS): Likewise.
4467 (date_mod_SOURCES): Likewise.
4468 (date_mod_CFLAGS): Likewise.
4469 (date_mod_LDFLAGS): Likewise.
4470 (datehook_mod_SOURCES): Likewise.
4471 (datehook_mod_CFLAGS): Likewise.
4472 (datehook_mod_LDFLAGS): Likewise.
4473
4474 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4475 and datehook.mod.
4476 (datetime_mod_SOURCES): New macro.
4477 (datetime_mod_CFLAGS): Likewise.
4478 (datetime_mod_LDFLAGS): Likewise.
4479 (date_mod_SOURCES): Likewise.
4480 (date_mod_CFLAGS): Likewise.
4481 (date_mod_LDFLAGS): Likewise.
4482 (datehook_mod_SOURCES): Likewise.
4483 (datehook_mod_CFLAGS): Likewise.
4484 (datehook_mod_LDFLAGS): Likewise.
4485
4486 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4487
4488 * commands/date.c: New file.
4489
4490 * hook/datehook.c: Likewise.
4491
4492 * include/grub/lib/datetime.h: Likewise.
4493
4494 * include/grub/i386/cmos.h: Likewise.
4495
4496 * lib/datetime.c: Likewise.
4497
4498 * lib/i386/datetime.c: Likewise.
4499
4500 * lib/efi/datetime.c: Likewise.
4501
0e9242da 45022008-08-14 Robert Millan <rmh@aybabtu.com>
4503
4504 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4505 (grub_mkelfimage_SOURCES): New variable.
4506 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4507
4508 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4509 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4510 * conf/powerpc-ieee1275.rmk: Likewise.
4511 * conf/i386-ieee1275.rmk: Likewise.
4512
4513 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4514 * kern/i386/coreboot/init.c: Likewise.
4515
4516 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4517 with `<grub/cpu/kernel.h>'.
4518 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4519 to ...
4520 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4521 * kern/i386/coreboot/startup.S: Likewise.
4522
4523 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4524 (GRUB_MOD_GAP): Remove.
4525 * include/grub/powerpc/kernel.h: New file.
4526 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4527 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4528 * include/grub/i386/kernel.h: New file.
4529 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4530 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4531 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4532
4533 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4534 `grub-mkelfimage'.
4535 Use --directory when invoking grub_mkimage.
4536
4537 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4538 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4539 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4540 and GRUB_KERNEL_CPU_PREFIX.
4541
b86408f8 45422008-08-14 Felix Zielcke <fzielcke@z-51.de>
4543
d5e619ca 4544 * include/grub/err.h (grub_err_printf): New function prototype.
4545 * util/misc.c (grub_err_printf): New function.
4546 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4547 grub_printf.
4548 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 4549
7161f0e0 45502008-08-13 Robert Millan <rmh@aybabtu.com>
4551
4552 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4553
a1967522 45542008-08-13 Robert Millan <rmh@aybabtu.com>
4555
4556 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4557 boot entry.
4558
371458b5 45592008-08-12 Robert Millan <rmh@aybabtu.com>
4560
4561 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4562 of the relocation code from here ...
4563 (grub_multiboot): ... to here.
4564 (forward_relocator, backward_relocator): Move from here ...
4565 * kern/i386/loader.S (grub_multiboot_forward_relocator)
4566 (grub_multiboot_backward_relocator): ... to here.
4567 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
4568 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
4569 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4570 (grub_multiboot_forward_relocator_end)
4571 (grub_multiboot_backward_relocator)
4572 (grub_multiboot_backward_relocator_end): New variables.
4573
05f9452b 45742008-08-12 Bean <bean123ch@gmail.com>
4575
4576 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4577
20024ab0 45782008-08-11 Robert Millan <rmh@aybabtu.com>
4579
4580 * kern/i386/linuxbios/startup.S: Move from here ...
4581 * kern/i386/coreboot/startup.S: ... to here.
4582
4583 * kern/i386/linuxbios/init.c: Move from here ...
4584 * kern/i386/coreboot/init.c: ... to here.
4585
4586 * kern/i386/linuxbios/table.c: Move from here ...
4587 * kern/i386/coreboot/mmap.c: ... to here.
4588
4589 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4590
e352e9cd 45912008-08-11 Robert Millan <rmh@aybabtu.com>
4592
4593 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4594 errors. Leave it to the upper layer to handle them.
4595
2d05bc6a 45962008-08-09 Christian Franke <franke@computer.org>
4597
4598 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4599 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4600 Install `grub.d/10_windows' only on Cygwin.
4601 * configure.ac: Add subst of `target_os'.
4602 Check `target_os' also before setting TARGET_OBJ2ELF.
4603 Add `--enable-grub-pe2elf'.
4604
042bd419 46052008-08-08 Robert Millan <rmh@aybabtu.com>
4606
4607 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4608 (grub_last_time): Change type to grub_uint64_t.
4609 (grub_disk_open): Migrate code from to using grub_get_time_ms().
4610 (grub_disk_close): Likewise.
4611
4612 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4613 (run_menu): Migrate code from to using grub_get_time_ms().
4614
4615 * util/misc.c (grub_get_time_ms): New function.
4616
7f280db5 46172008-08-08 Marco Gerards <marco@gnu.org>
4618
4619 * disk/ata.c (grub_ata_regget): Change return type to
4620 `grub_uint8_t'.
4621 (grub_ata_regget2): Likewise.
4622 (grub_ata_wait_status): New function.
4623 (grub_ata_wait_busy): Removed function, updated all users to use
4624 `grub_ata_wait_status'.
4625 (grub_ata_wait_drq): Likewise.
4626 (grub_ata_cmd): New function.
4627 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
4628 error handling.
4629 (grub_ata_pio_write): Add error handling.
4630 (grub_atapi_identify): Likewise.
4631 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4632 handling.
4633 (grub_ata_identify): Use `grub_ata_cmd' and improve error
4634 handling. Actually use the detected registers. Reorder the
4635 detection logic such that it is easier to read.
4636 (grub_ata_pciinit): Do not assign the same ID to each controller.
4637 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4638 handling.
4639 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4640
4641 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4642
1fbc5e66 46432008-08-08 Marco Gerards <marco@gnu.org>
4644
4645 * NEWS: Update.
4646
819ce6c0 46472008-08-07 Bean <bean123ch@gmail.com>
4648
4649 * include/grub/x86_64/pci.h: New file.
4650
5c41d44d 46512008-08-07 Christian Franke <franke@computer.org>
4652
4653 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4654 (TIMER2_GATE): Likewise.
4655 (grub_pit_wait): Add enable/disable of the timer2 gate
4656 bit of port 0x61. This fixes a possible infinite loop.
4657
5ebc275d 46582008-08-07 Bean <bean123ch@gmail.com>
4659
4660 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4661 kern/i386/tsc.c and kern/i386/pit.c.
4662
4663 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4664 x86_64 platform.
4665
4666 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4667 <grub/i386/tsc.h>.
4668
4669 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4670
e383b3d0 46712008-08-07 Bean <bean123ch@gmail.com>
4672
4673 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4674
4675 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4676
4677 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4678 multiple inclusion. Add #include <grub/types.h>.
4679
1cbb58ac 46802008-08-06 Christian Franke <franke@computer.org>
4681
4682 * conf/common.rmk: Build and install `10_windows'.
4683 * util/grub.d/10_windows.in: New script.
4684
337f5a1e 46852008-08-06 Pavel Roskin <proski@gnu.org>
4686
4687 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4688
057bc4ac 46892008-08-06 Robert Millan <rmh@aybabtu.com>
4690
4691 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4692 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4693
2b99f123 46942008-08-06 Bean <bean123ch@gmail.com>
4695
4696 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4697 (grub_pxefs_fs_int): Remove dummy definition.
4698 (grub_pxefs_open): Use data->block_size to store the current block
4699 size setting.
4700 (grub_pxefs_read): Use block size stored in data->block_size. As the
4701 value of grub_pxe_blksize can be changed after the file is opened.
4702
9f0234cb 47032008-08-06 Bean <bean123ch@gmail.com>
4704
4705 * fs/i386/pc/pxe.c (curr_file): new variable.
4706 (grub_pxefs_open): Simply the handling of pxe file system. Don't
4707 require the dummy internal file system anymore.
4708 (grub_pxefs_read): Removed.
4709 (grub_pxefs_close): Likewise.
4710 (grub_pxefs_fs_int): Likewise.
4711 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4712 connection when we switch file.
4713 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4714
a55d42e0 47152008-08-06 Robert Millan <rmh@aybabtu.com>
4716
4717 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4718 `halt.mod'.
4719 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4720 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4721
4722 * kern/i386/halt.c: New file.
4723 * kern/i386/reboot.c: Likewise.
4724 * include/grub/i386/reboot.h: Likewise.
4725 * include/grub/i386/halt.h: Likewise.
4726
4727 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4728 Include `<grub/cpu/halt.h>'.
4729 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4730 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4731
4732 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4733 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4734 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4735 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4736 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4737 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4738 from here ...
4739 * include/grub/i386/at_keyboard.h: ... to here.
4740
24371d26 47412008-08-05 Robert Millan <rmh@aybabtu.com>
4742
4743 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4744 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4745 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4746 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4747 `kern/generic/millisleep.c'.
4748
4749 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4750 instead of grub_get_rtc().
4751 (grub_tsc_init): Initialize `tsc_boot_time'.
4752
4753 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4754 (grub_machine_init): Use grub_tsc_init() rather than
4755 installing an RTC-based handler via grub_install_get_time_ms().
4756
4757 * kern/i386/pit.c: New file.
4758 * include/grub/i386/pit.h: Likewise.
4759
9e7007b3 47602008-08-05 Bean <bean123ch@gmail.com>
4761
4762 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4763
4764 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4765 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4766 (pxe_mod_SOURCES): New macro.
4767 (pxe_mod_CFLAGS): Likewise.
4768 (pxe_mod_LDFLAGS): Likewise.
4769 (pxecmd_mod_SOURCES): Likewise.
4770 (pxecmd_mod_CFLAGS): Likewise.
4771 (pxecmd_mod_LDFLAGS): Likewise.
4772
4773 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4774 (grub_pxe_call): Likewise.
4775
4776 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4777
4778 * commands/i386/pc/pxecmd.c: New file.
4779
9f0234cb 4780 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 4781
4782 * include/grub/i386/pc/pxe.h: Likewise.
4783
6977d49f 47842008-08-05 Bean <bean123ch@gmail.com>
4785
4786 * util/console.c (grub_console_cur_color): New variable.
4787 (grub_console_standard_color): Likewise.
4788 (grub_console_normal_color): Likewise.
4789 (grub_console_highlight_color): Likewise.
4790 (color_map): Likewise.
4791 (use_color): Likewise.
4792 (NUM_COLORS): New macro.
4793 (grub_ncurses_setcolorstate): Handle color properly.
4794 (grub_ncurses_setcolor): Don't change color here, just remember the
4795 settings, color will be set in grub_ncurses_setcolorstate.
4796 (grub_ncurses_getcolor): New function.
4797 (grub_ncurses_init): Initialize color pairs.
4798 (grub_ncurses_term): New member grub_ncurses_getcolor.
4799
9c2ff3ee 48002008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 4801
9c2ff3ee 4802 High resolution timer support. Implemented for x86 CPUs using TSC.
4803 Extracted generic grub_millisleep() so it's linked in only as needed.
4804 This requires a Pentium compatible CPU; if the RDTSC instruction is
4805 not supported, then it falls back on the generic grub_get_time_ms()
4806 implementation that uses the machine's RTC.
4807
4808 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4809 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4810 `kern/generic/millisleep.c'.
4811
4812 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4813 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4814
4815 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4816 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4817
4818 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4819
4820 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4821 `kern/generic/millisleep.c'.
4822
4823 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4824
4825 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4826
4827 * kern/generic/rtc_get_time_ms.c: New file.
4828
4829 * kern/generic/millisleep.c: New file.
337f5a1e 4830
9c2ff3ee 4831 * kern/misc.c: Don't include
4832 <kern/time.h> anymore.
4833 (grub_millisleep_generic): Removed.
4834
4835 * commands/sleep.c (grub_interruptible_millisleep): Uses
4836 grub_get_time_ms() instead of grub_get_rtc().
4837
4838 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
4839 function.
4840 (grub_cpu_is_cpuid_supported): New inline function.
4841 (grub_cpu_is_tsc_supported): New inline function.
4842 (grub_tsc_init): New function prototype.
4843 (grub_tsc_get_time_ms): New function prototype.
4844
4845 * kern/i386/tsc.c (grub_get_time_ms): New file.
4846
4847 * include/grub/time.h: Include <grub/types.h.
4848 (grub_millisleep_generic): Removed.
4849 (grub_get_time_ms): New prototype.
4850 (grub_install_get_time_ms): New prototype.
4851 (grub_rtc_get_time_ms): New prototype.
4852
4853 * kern/time.c (grub_get_time_ms): New function.
4854 (grub_install_get_time_ms): New function.
4855
4856 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
4857 <grub/time.h> anymore.
4858 (grub_millisleep): Removed.
4859 (grub_machine_init): Call grub_tsc_init.
4860
4861 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4862 get_time_ms() implementation.
4863
4864 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4865 (ieee1275_get_time_ms): New function.
4866 (grub_machine_init): Install get_time_ms() implementation.
4867
4868 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4869 (grub_machine_init): Call grub_tsc_init().
4870 (grub_millisleep): Removed.
bf06a93f 4871
9c2ff3ee 4872 * kern/ieee1275/init.c (grub_millisleep): Removed.
4873 (grub_machine_init): Install ieee1275_get_time_ms()
4874 implementation.
4875 (ieee1275_get_time_ms): New function.
4876 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4877 real work.
4878
9ec92aaf 48792008-08-05 Marco Gerards <marco@gnu.org>
4880
4881 * disk/ata.c: Include <grub/pci.h>.
4882 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4883 (grub_ata_initialize): Rewritten.
4884 (grub_ata_device_initialize): New function.
4885
8d23f507 48862008-08-04 Pavel Roskin <proski@gnu.org>
4887
4888 * kern/main.c: Include grub/mm.h.
4889
5e15ee3d 48902008-08-04 Robert Millan <rmh@aybabtu.com>
4891
4892 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4893 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4894 corruption problem).
4895
a9053f8f 48962008-08-04 Robert Millan <rmh@aybabtu.com>
4897
4898 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4899 warnings introduced in my last commit.
4900
dd19c7d7 49012008-08-03 Robert Millan <rmh@aybabtu.com>
4902
4903 Make PCI available on all i386 architectures.
4904
4905 * include/grub/i386/pc/pci.h: Move from here ...
4906 * include/grub/i386/pci.h: ... to here.
4907
4908 * include/grub/i386/pc/pci.h: Remove.
4909 * include/grub/i386/efi/pci.h: Remove.
4910 * include/grub/x86_64/efi/pci.h: Remove.
4911
4912 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4913 `<grub/cpu/pci.h>'.
4914
4915 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4916 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4917 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4918
4919 * conf/i386-ieee1275.rmk: Likewise.
4920
e14a6184 49212008-08-03 Robert Millan <rmh@aybabtu.com>
4922
4923 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4924 (grub_console_setcursor): Make it possible to set cursor off.
4925
52768e37 49262008-08-03 Robert Millan <rmh@aybabtu.com>
4927
4928 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
4929 of modules instead of assuming which platform provides what.
4930 * util/update-grub.in: Likewise.
4931
2d52f57f 49322008-08-03 Robert Millan <rmh@aybabtu.com>
4933
4934 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4935 instead of `grub_install_dos_part' to determine whether a drive needs
4936 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 4937 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 4938
2a5cd121 49392008-08-02 Robert Millan <rmh@aybabtu.com>
4940
4941 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4942
93808428 49432008-08-02 Robert Millan <rmh@aybabtu.com>
4944
4945 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4946 of informational grub_dprintf() calls.
4947
3bd0a12a 49482008-08-02 Robert Millan <rmh@aybabtu.com>
4949
4950 * disk/memdisk.c (memdisk_size): Don't initialize.
4951 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4952
4953 * include/grub/i386/pc/kernel.h
4954 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4955 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4956 (grub_memdisk_image_size, grub_arch_memdisk_addr)
4957 (grub_arch_memdisk_size): Remove.
4958
4959 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4960 field (was only used to transfer a constant). Add `type' field to
4961 support multiple module types.
4962 (grub_module_iterate): New function.
4963
4964 * kern/device.c (grub_device_open): Do not hide error messages
4965 when grub_disk_open() fails. Use grub_print_error() instead.
4966
4967 * kern/i386/pc/init.c (grub_arch_modules_addr)
4968 (grub_arch_memdisk_size): Remove functions.
4969 (grub_arch_modules_addr): Return the module address in high memory
4970 (now that it isn't copied anymore).
4971
4972 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4973 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4974 decompression routine (grub_total_module_size already includes that
4975 now). Don't copy modules back to low memory.
4976
4977 * kern/main.c: Include `<grub/mm.h>'.
4978 (grub_load_modules): Split out (and use) ...
4979 (grub_module_iterate): ... this function, which iterates through
4980 module objects and runs a hook.
4981 Comment out grub_mm_init_region() call, as it would cause non-ELF
4982 modules to be overwritten.
4983
4984 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4985 the memdisk image in its own region, make it part of the module list.
4986 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4987 (main): Parse --memdisk|-m option, and pass user-provided path as
4988 parameter to generate_image().
4989 (add_segments): Pass `memdisk_path' down to load_modules().
4990 (load_modules): Embed memdisk image in module section when requested.
4991 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4992 `header.type' instead of `header.offset'.
4993
4994 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4995 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4996 (memdisk_mod_LDFLAGS): New variables.
4997 * conf/i386-coreboot.rmk: Likewise.
4998 * conf/i386-ieee1275.rmk: Likewise.
4999
a927cc73 50002008-08-02 Robert Millan <rmh@aybabtu.com>
5001
5002 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5003 (backward_relocator): New variables. Used to allocate and relocate
5004 the payload, respectively.
5005 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 5006 address, install the appropriate relocator code in each bound of
a927cc73 5007 the payload, and set the entry point such that
5008 grub_multiboot_real_boot() will jump to one of them.
5009
5010 * kern/i386/loader.S (grub_multiboot_payload_size)
5011 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5012 (grub_multiboot_payload_entry_offset): New variables.
5013 (grub_multiboot_real_boot): Set cpu context to what the relocator
5014 expects, and jump to the relocator instead of the payload.
5015
5016 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5017 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5018 (grub_multiboot_payload_entry_offset): Export.
5019
b15d8a0c 50202008-08-01 Bean <bean123ch@gmail.com>
5021
5022 * normal/menu_entry.c (editor_getline): Don't return the original
5023 string as result, as it will be released by lexer once it has done
5024 using it.
5025
cdfb3d22 50262008-08-01 Robert Millan <rmh@aybabtu.com>
5027
5028 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5029 within menuentries, not before them.
5030 util/grub.d/10_hurd.in: Likewise.
5031
9175e93d 50322008-08-01 Bean <bean123ch@gmail.com>
5033
5034 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5035 (bufio_mod_SOURCES): New macro.
5036 (bufio_mod_CFLAGS): Likewise.
5037 (bufio_mod_LDFLAGS): Likewise.
5038
5039 * include/grub/bufio.h: New file.
5040
5041 * io/bufio.c: Likewise.
5042
5043 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5044 (grub_video_reader_png): Use grub_buffile_open to open file.
5045
5046 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5047 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5048
5049 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5050 (grub_video_reader_tga): Use grub_buffile_open to open file.
5051
5052 * font/manager.c: Include <grub/bufio.h>.
5053 (add_font): Use grub_buffile_open to open file.
5054
3d8383e7 50552008-07-31 Robert Millan <rmh@aybabtu.com>
5056
5057 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5058 ELF segments, use a macro for arbitrarily accessing any of them instead
5059 of preparing a pointer that allows access to one at a time.
5060 (grub_multiboot_load_elf64): Likewise.
5061
16e641b6 50622008-07-31 Bean <bean123ch@gmail.com>
5063
5064 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5065 GRUB_KERNEL_MACHINE_DATA_END.
5066
59198b72 50672008-07-30 Robert Millan <rmh@aybabtu.com>
5068
5069 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5070 Increase from 0x50 to 0x60.
5071 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5072 use UUIDs to identify the root drive for them. If that's not
5073 possible, abort.
5074 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5075 check, for cross-disk installs.
5076
ae88bca3 50772008-07-30 Robert Millan <rmh@aybabtu.com>
5078
5079 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5080 is non-empty, use it to set the `prefix' environment variable instead
5081 of the usual approach.
5082 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5083 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5084 environment variable instead of dummy make_install_device().
5085
5086 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5087 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 5088 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 5089
5090 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5091 New variable reference.
5092 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5093 New macro. Defines offset of `grub_prefix' within startup.S (relative
5094 to `start').
5095 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5096 section within startup.S (relative to `start').
5097 * include/grub/i386/coreboot/kernel.h: Likewise.
5098
5099 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5100 Overwrite grub_prefix with its contents, at the beginning of the
5101 first segment.
5102 (main): Understand -p|--prefix.
5103
14f41dd1 51042008-07-30 Robert Millan <rmh@aybabtu.com>
5105
5106 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5107
4ca049a3 51082008-07-30 Robert Millan <rmh@aybabtu.com>
5109
5110 * term/i386/pc/vga_text.c (grub_console_cls): Use
5111 grub_console_gotoxy() to go back to beginning of the screen.
5112 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5113
2921d337 51142008-07-29 Christian Franke <franke@computer.org>
5115
5116 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5117 Add conversion of emulated mount points on Cygwin.
5118
b609876d 51192008-07-29 Christian Franke <franke@computer.org>
5120
5121 * util/update-grub.in: Add a check for admin
5122 group on Cygwin.
5123 Remove old `grub.cfg.new' before creation.
5124 Add `-f' to `mv' to handle the different filesystem
5125 semantics of Windows.
5126
e93e4679 51272008-07-29 Bean <bean123ch@gmail.com>
5128
5129 * normal/main.c (get_line): Fix buffer overflow bug.
5130
41694fd0 51312008-07-28 Robert Millan <rmh@aybabtu.com>
5132
5133 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5134 (struct grub_apple_header): New struct. Describes the layout of
5135 the partmap header.
5136 (apple_partition_map_iterate): Check the header magic as well as the
5137 partition magic (which was already being checked).
5138
cfd0b4e6 51392008-07-28 Pavel Roskin <proski@gnu.org>
5140
5141 * genmk.rb: Add a warning to the beginning of the output that
5142 it's a generated file and should not be edited.
5143
93cce016 51442008-07-28 Robert Millan <rmh@aybabtu.com>
5145
5146 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5147 with the same number are found, just use issue a warning with
5148 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 5149
cd1df915 51502008-07-27 Robert Millan <rmh@aybabtu.com>
5151
5152 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5153 information.
5154
b70a8427 51552008-07-27 Bean <bean123ch@gmail.com>
5156
5157 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5158 (grub_fat_find_dir): Ignore case when comparing filename.
5159
8f5e379f 51602008-07-27 Bean <bean123ch@gmail.com>
5161
5162 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5163 smallino, as it's more descriptive, and i8count can be confused with
5164 the other field count.
5165 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5166 inode type.
5167
a85cd5a0 51682008-07-27 Bean <bean123ch@gmail.com>
5169
5170 * commands/crc.c: New file.
5171
5172 * lib/crc.c: Likewise.
5173
5174 * include/grub/lib/crc.h: Likewise.
5175
5176 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5177
5178 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5179 (hexdump): Move this function to ...
5180
5181 * lib/hexdump.c: ... here.
5182
5183 * include/grub/hexdump.h: Renamed to ...
5184
5185 * include/grub/lib/hexdump.h: ... this.
5186
5187 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5188
5189 * util/grub-editenv.c: Likewise.
5190
5191 * include/envblk.h: Renamed to ...
5192
5193 * include/lib/envblk.h: ... this.
5194
5195 * util/envblk.c: Renamed to ...
5196
5197 * lib/envblk.c: ... this.
5198
5199 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5200 lib/hexdump.c.
5201 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5202 (pkglib_MODULES): Add crc.mod.
5203 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5204 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5205 (crc_mod_SOURCES): New macro.
5206 (crc_mod_CFLAGS): Likewise.
5207 (crc_mod_LDFLAGS): Likewise.
5208
5209 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5210
5211 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5212
5213 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5214
5215 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5216
5217 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5218
c298def0 52192008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 5220
5221 * commands/help.c: Include <grub/term.h>.
5222 (TERM_WIDTH): Removed. Updated all users.
5223
cc349fb3 52242008-07-27 Pavel Roskin <proski@gnu.org>
5225
5226 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5227 spurious warnings about a comment within a comment.
5228
9051607e 52292008-07-25 Robert Millan <rmh@aybabtu.com>
5230
5231 * util/getroot.c (find_root_device): Skip devices that match
5232 /dev/dm-[0-9]. This lets the real device be found for any type of
5233 abstraction (LVM, EVMS, RAID..).
5234 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5235 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5236 device is found first, find_root_device() will now skip it.
5237
01453bfc 52382008-07-24 Pavel Roskin <proski@gnu.org>
5239
5240 * include/grub/types.h: Use __builtin_bswap32() and
5241 __builtin_bswap64() with gcc 4.3 and newer.
5242
6af9849f 52432008-07-24 Christian Franke <franke@computer.org>
5244
3a0fa256 5245 * util/i386/pc/grub-install.in: If `--debug' is specified,
5246 pass `--verbose' to grub-setup.
5247 Abort script if make_system_path_relative_to_its_root() fails.
5248
7810e747 52492008-07-24 Bean <bean123ch@gmail.com>
5250
5251 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5252 variable `target_platform' should be `platform'.
5253
42290e17 52542008-07-24 Bean <bean123ch@gmail.com>
5255
51cc5193 5256 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 5257 (grub_png_init_fixed_block): New function.
5258 (grub_png_decode_image_data): Handle fixed huffman code compression.
5259
2a8a80e4 52602008-07-24 Bean <bean123ch@gmail.com>
5261
5262 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5263 (grub_pe2elf_SOURCES): New macro.
5264 (CLEANFILES): Add grub-pe2elf.
5265
5266 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5267 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5268 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5269 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5270 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5271 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5272 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5273 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5274 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5275 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5276 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5277 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5278 (GRUB_PE32_DT_FUNCTION): Likewise.
5279 (GRUB_PE32_REL_I386_DIR32): Likewise.
5280 (GRUB_PE32_REL_I386_REL32): Likewise.
5281 (grub_pe32_symbol): New structure.
5282 (grub_pe32_reloc): Likewise.
5283
5284 * util/grub-pe2elf.c: New file.
5285
5286 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5287 start symbol in non pc platform.
5288
5289 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5290
5291 The following patches are from Christian Franke.
5292
5293 * include/grub/dl.h: Remove .previous, gas supports this only
5294 for ELF format.
5295
5296 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5297 Remove .type, gas supports this only for ELF format.
5298
5299 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5300 nullbytes in symbol table. This fixes an infinite loop if table is
5301 zero filled.
5302
5303 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5304 TARGET_IMG_LDFLAGS and EXEEXT.
5305
5306 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5307 TARGET_IMG_LDFLAGS_AC.
5308 (grub_CHECK_STACK_ARG_PROBE): New function.
5309
5310 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5311
5312 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5313
5314 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5315 to set TARGET_IMG_LD* accordingly.
5316 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5317 Add call to grub_CHECK_STACK_ARG_PROBE.
5318 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5319
5320 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5321
5322 * genmk.rb: Add EXEEXT to CLEANFILES.
5323
12ccdb75 53242008-07-23 Robert Millan <rmh@aybabtu.com>
5325
5326 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5327 define the codes for arrows and lines used for the menu).
5328 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5329 as well.
5330
5331 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5332 fonts, because the latter are too slow.
5333
18eeaf04 53342008-07-21 Bean <bean123ch@gmail.com>
5335
5336 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5337 a20. Run keyboard test last, as it will cause macbook to halt.
5338
b095e2ad 53392008-07-18 Pavel Roskin <proski@gnu.org>
5340
5341 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5342 load foreign architecture modules correctly anyway. Keep
5343 support for loading host architecture modules, whether we
5344 compile them or not.
5345
737feb35 53462008-07-17 Pavel Roskin <proski@gnu.org>
5347
3f4ce737 5348 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5349 change target_cpu. The compiler default can mismatch target_cpu
5350 in any case.
5351
4ad2d049 5352 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5353 * kern/efi/efi.c: Likewise.
5354
f6130a12 5355 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5356 target compiler is functional.
5357 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5358 are set up.
5359
58393a2d 5360 * configure.ac: Default to efi platform for x86_64-apple. Allow
5361 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5362 adjustments from the rest, only do them if target is not
5363 explicitly given. Merge other adjustments with the final sanity
5364 check. Remove an extraneous check for supported CPU. Be
5365 specific which CPU and which platform is not supported.
5366
737feb35 5367 * configure.ac: Default to pc platform for x86_64.
5368
546f966a 53692008-07-17 Robert Millan <rmh@aybabtu.com>
5370
5371 Partial LinuxBIOS -> Coreboot rename.
5372
5373 * conf/i386-linuxbios.rmk: Renamed to ...
5374 * conf/i386-coreboot.rmk: ... this.
5375 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5376 * configure.ac: Accept "coreboot" as input platform (but maintain
5377 compatibility with "linuxbios").
5378 * include/grub/i386/linuxbios: Renamed to ...
5379 * include/grub/i386/coreboot: ... this.
5380
20011694 53812008-07-17 Bean <bean123ch@gmail.com>
5382
5383 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 5384 (appleldr_mod_SOURCE): New variable.
20011694 5385 (appleldr_mod_CFLAGS): Likewise.
5386 (appleldr_mod_LDFLAGS): Likewise.
5387 (pci_mod_SOURCES): Likewise.
5388 (pci_mod_CFLAGS): Likewise.
5389 (pci_mod_LDFLAGS): Likewise.
5390 (lspci_mod_SOURCES): Likewise.
5391 (lspci_mod_CFLAGS): Likewise.
5392 (lspci_mod_LDFLAGS): Likewise.
5393
5394 * conf/x86_64-efi.rmk: New file.
5395
5396 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5397 macro.
5398 (grub_efidisk_write): Likewise.
5399
5400 * include/efi/api.h (efi_call_0): New macro.
5401 (efi_call_1): Likewise.
5402 (efi_call_2): Likewise.
5403 (efi_call_3): Likewise.
5404 (efi_call_4): Likewise.
5405 (efi_call_5): Likewise.
5406 (efi_call_6): Likewise.
5407
5408 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5409 grub_rescue_cmd_chainloader.
5410
5411 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5412 (grub_pe32_optional_header): Change some fields based on i386 or
5413 x86_64 platform.
5414 (GRUB_PE32_PE32_MAGIC): Likewise.
5415
5416 * include/grub/efi/uga_draw.h: New file.
5417
5418 * include/grub/elf.h (STN_ABS): New constant.
5419 (R_X86_64_NONE): Relocation constant for x86_64.
5420 (R_X86_64_64): Likewise.
5421 (R_X86_64_PC32): Likewise.
5422 (R_X86_64_GOT32): Likewise.
5423 (R_X86_64_PLT32): Likewise.
5424 (R_X86_64_COPY): Likewise.
5425 (R_X86_64_GLOB_DAT): Likewise.
5426 (R_X86_64_JUMP_SLOT): Likewise.
5427 (R_X86_64_RELATIVE): Likewise.
5428 (R_X86_64_GOTPCREL): Likewise.
5429 (R_X86_64_32): Likewise.
5430 (R_X86_64_32S): Likewise.
5431 (R_X86_64_16): Likewise.
5432 (R_X86_64_PC16): Likewise.
5433 (R_X86_64_8): Likewise.
5434 (R_X86_64_PC8): Likewise.
5435
5436 * include/grub/i386/efi/pci.h: New file.
5437
5438 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5439 Change it value based on platform.
5440 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5441 (GRUB_E820_RAM): Likewise.
5442 (GRUB_E820_RESERVED): Likewise.
5443 (GRUB_E820_ACPI): Likewise.
5444 (GRUB_E820_NVS): Likewise.
5445 (GRUB_E820_EXEC_CODE): Likewise.
5446 (GRUB_E820_MAX_ENTRY): Likewise.
5447 (grub_e820_mmap): New structure.
5448 (linux_kernel_header): Change the efi field according to different
5449 kernel version, also field from linux_kernel_header.
5450
5451 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5452
5453 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5454 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5455 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5456 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5457 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5458 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5459 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5460 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5461 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5462 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5463
5464 * include/grub/x86_64/efi/kernel.h: New file.
5465
5466 * include/grub/x86_64/efi/loader.h: Likewise.
5467
5468 * include/grub/x86_64/efi/machine.h: Likewise.
5469
5470 * include/grub/x86_64/efi/pci.h: Likewise.
5471
5472 * include/grub/x86_64/efi/time.h: Likewise.
5473
5474 * include/grub/x86_64/linux.h: Likewise.
5475
5476 * include/grub/x86_64/setjmp.h: Likewise.
5477
5478 * include/grub/x86_64/time.h: Likewise.
5479
5480 * include/grub/x86_64/types.h: Likewise.
5481
5482 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5483 GRUB_TARGET_SIZEOF_VOID_P.
5484
5485 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5486 (grub_efi_locate_handle): Likewise.
5487 (grub_efi_open_protocol): Likewise.
5488 (grub_efi_set_text_mode): Likewise.
5489 (grub_efi_stall): Likewise.
5490 (grub_exit): Likewise.
5491 (grub_reboot): Likewise.
5492 (grub_halt): Likewise.
5493 (grub_efi_exit_boot_services): Likewise.
5494 (grub_get_rtc): Likewise.
5495
5496 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5497 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5498 (grub_efi_allocate_pages): Wrap efi calls.
5499 (grub_efi_free_pages): Wrap efi calls.
5500 (grub_efi_get_memory_map): Wrap efi calls.
5501
5502 * kern/x86_64/dl.c: New file.
5503
5504 * kern/x86_64/efi/callwrap.S: Likewise.
5505
5506 * kern/x86_64/efi/startup.S: Likewise.
5507
5508 * loader/efi/appleloader.c: Likewise.
5509
5510 * loader/efi/chainloader.c (cmdline): New variable.
5511 (grub_chainloader_unload): Wrap efi calls.
5512 (grub_chainloader_boot): Likewise.
5513 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5514 command line.
5515
5516 * loader/efi/chainloader_normal.c (chainloader_command):
5517 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5518 command line.
5519
5520 * loader/i386/efi/linux.c (allocate_pages): Change allocation
5521 method.
5522 (grub_e820_add_region): New function.
5523 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5524 booting.
5525 (grub_find_video_card): New function.
5526 (grub_linux_setup_video): New function.
5527 (grub_rescue_cmd_linux): Probe for video information.
5528
5529 * normal/x86_64/setjmp.S: New file.
5530
5531 * term/efi/console.c (map_char): New function.
5532 (grub_console_putchar): Map unicode char.
5533 (grub_console_checkkey): Wrap efi calls.
5534 (grub_console_getkey): Likewise.
5535 (grub_console_getwh): Likewise.
5536 (grub_console_gotoxy): Likewise.
5537 (grub_console_cls): Likewise.
5538 (grub_console_setcolorstate): Likewise.
5539 (grub_console_setcursor): Likewise.
5540
5541 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5542
59652a20 55432008-07-16 Pavel Roskin <proski@gnu.org>
5544
ef294055 5545 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5546 format strings.
5547
59652a20 5548 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5549 pointer, not an integer. This fixes a warning and prevents
5550 precision loss on 64-bit systems.
5551 (relocate_addresses): Remove unneeded cast.
5552
afc3b5d7 55532008-07-15 Pavel Roskin <proski@gnu.org>
5554
506b2b3e 5555 * kern/i386/ieee1275/init.c: Include grub/cache.h.
5556
62ead89c 5557 * term/ieee1275/ofconsole.c: Disable code unused on i386.
5558
c4cd51d7 5559 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5560 Fix comparison between signed and unsigned.
5561
0d3d8f28 5562 * include/grub/i386/ieee1275/console.h: Declare
5563 grub_console_init() and grub_console_fini().
5564
8804b286 5565 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5566 It's empty and unused.
5567
ee01cf35 5568 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5569 beginning to avoid warnings with some compilers.
5570
afc3b5d7 5571 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5572 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5573
e4e8eaa5 55742008-07-14 Pavel Roskin <proski@gnu.org>
5575
407aceb4 5576 * kern/env.c (grub_register_variable_hook): Don't copy empty
5577 string, it leaks memory. Pass "" to grub_env_set(), it should
5578 handle constant strings.
5579
e4e8eaa5 5580 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5581 * commands/cmp.c (grub_cmd_cmp): Likewise.
5582 * kern/dl.c (grub_dl_flush_cache): Likewise.
5583 (grub_dl_load_core): Likewise.
5584 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5585 (grub_elf64_load_phdrs): Likewise.
5586
d4e2dad3 55872008-07-13 Pavel Roskin <proski@gnu.org>
5588
5589 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5590 between signed and unsigned.
5591 (LzmaEnc_Finish): Fix warning about an unused parameter.
5592
aa24b516 55932008-07-13 Bean <bean123ch@gmail.com>
5594
5595 * Makefile.in (enable_lzo): New rule.
5596
5597 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5598
5599 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5600
5601 * boot/i386/pc/lnxboot.S: #include <config.h>.
5602
5603 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 5604 its value according to the compression algorithm used, lzo or lzma.
aa24b516 5605
5606 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5607 compression algorithm according to configure macro.
5608
5609 * kern/i386/pc/startup.S (codestart): Likewise.
5610
5611 * kern/i386/pc/lzma_decode.S: New file.
5612
5613 * include/grub/lib/LzFind.h: Likewise.
5614
5615 * include/grub/lib/LzHash.h: Likewise.
5616
5617 * include/grub/lib/LzmaDec.h: Likewise.
5618
5619 * include/grub/lib/LzmaEnc.h: Likewise.
5620
5621 * include/grub/lib/LzmaTypes.h: Likewise.
5622
5623 * lib/LzFind.c: Likewise.
5624
5625 * lib/LzmaDec.c: Likewise.
5626
5627 * lib/LzmaEnc.c: Likewise.
5628
4ae821ac 56292008-07-13 Bean <bean123ch@gmail.com>
5630
5631 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5632 (grub_ext4_extent_header): New structure.
5633 (grub_ext4_extent): Likewise.
5634 (grub_ext4_extent_idx): Likewise.
5635 (grub_ext4_find_leaf): New function.
5636 (grub_ext2_read_block): Handle extents.
5637
9a745147 56382008-07-12 Robert Millan <rmh@aybabtu.com>
5639
5640 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5641
d49a4cf6 56422008-07-11 Robert Millan <rmh@aybabtu.com>
5643
5644 * util/grub.d/40_custom.in: New file. Example on how to add custom
5645 entries to /etc/grub.d.
5646 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5647 40_custom (implicitly, by merging all the grub.d rules).
5648
947414b4 56492008-07-11 Pavel Roskin <proski@gnu.org>
5650
0059cf6f 5651 * commands/read.c (grub_getline): Fix invalid memory access.
5652 Don't add newline to the variable value.
5653
947414b4 5654 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5655 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5656 (serial_hw_get_port): Check validity of the port number.
5657 (grub_cmd_serial): Check return value of serial_hw_get_port().
5658
62a02d00 56592008-07-07 Pavel Roskin <proski@gnu.org>
5660
5661 * boot/i386/pc/diskboot.S (notification_string): Replace
5662 "Loading kernel" with just "loading". This is shorter, less
5663 confusing and saves a few bytes for possible future changes.
5664
3e5581b0 56652008-07-05 Pavel Roskin <proski@gnu.org>
5666
ea387a48 5667 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5668 size for ATAPI devices, they are undefined. Output sector
5669 number in decimal form.
5670
3e5581b0 5671 * disk/ata.c: Use named constants for status bits.
5672
fdecb8fd 56732008-07-04 Pavel Roskin <proski@gnu.org>
5674
bcd35b90 5675 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5676 grub_addr_t before casting it to the void pointer to fix a
5677 warning. Non-addressable regions are discarded earlier.
5678 (grub_arch_modules_addr): Cast _end to grub_addr_t.
5679 * kern/i386/linuxbios/table.c: Include grub/misc.h.
5680 (check_signature): Don't shadow table_header.
5681 (grub_linuxbios_table_iterate): Cast numeric constants to
5682 grub_linuxbios_table_header_t.
5683 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5684 grub_stop().
5685
af58ab3d 5686 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5687 prevent warnings.
5688
1759aa57 5689 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5690 pointer, which can cause warnings. Support 64-bit addresses.
5691
fdecb8fd 5692 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5693 of sizeof(long). This fixes PowerPC image generation on x86_64.
5694
8516d2a8 56952008-07-04 Robert Millan <rmh@aybabtu.com>
5696
5697 This fixes a performance issue when pc & gpt partmap iterators
5698 didn't abort iteration even after our hook found what it was
fe987087 5699 looking for (often causing expensive probes of non-existent drives).
8516d2a8 5700
5701 Some callers relied on previous buggy behaviour, since they would
34c44600 5702 raise an error when their own hooks caused early abortion of its
8516d2a8 5703 iteration.
5704
5705 * kern/device.c (grub_device_open): Improve error message.
5706 * disk/lvm.c (grub_lvm_open): Likewise.
5707 * disk/raid.c (grub_raid_open): Likewise.
5708
5709 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5710 when hook requests it, independently of grub_errno.
5711 (pc_partition_map_probe): Do not fail when find_func() caused
5712 early abortion of pc_partition_map_iterate().
5713
5714 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5715 when hook requests it, independently of grub_errno.
5716 (gpt_partition_map_probe): Do not fail when find_func() caused
5717 early abortion of gpt_partition_map_iterate().
5718
5719 * kern/partition.c (grub_partition_iterate): Abort parent iteration
5720 when hook requests it, independently of grub_errno. Do not fail when
5721 part_map_iterate_hook() caused early abortion of p->iterate().
5722
5723 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5724 when grub_partition_iterate() returned with non-zero.
5725
277d0de9 57262008-07-03 Pavel Roskin <proski@gnu.org>
5727
5728 * disk/ata.c (grub_ata_pio_write): Check status before writing,
5729 like we do in grub_ata_pio_read().
5730 (grub_ata_readwrite): Always write individual sectors. Fix the
5731 sector count for the remainder.
5732 (grub_ata_write): Enable writing to ATA devices. Correctly
5733 report error for ATAPI devices.
5734
d4c9b428 57352008-07-02 Pavel Roskin <proski@gnu.org>
5736
e43fc690 5737 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5738 warning.
5739
f707af42 5740 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5741 for every read sector, we already increment it for the whole
5742 batch. This fixes reading more than 256 sectors at once.
5743
11e16b15 5744 * util/grub-editenv.c (cmd_info): Cast argument to long
5745 explicitly. ptrdiff_t reduces to int on i386.
5746
cbabfdd4 5747 * util/grub-editenv.c (main): Be specific which parameter is
5748 missing.
5749
b8fbce0a 5750 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5751 (memdisk): Make memdisk_orig_addr a pointer.
5752
c9c8e606 5753 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5754 for file offsets, use grub_off_t instead. Fix printf format
5755 warnings.
5756
ca62e598 5757 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5758 there. Real unexpected warnings should not drown in the noise
5759 about known problems.
5760
ce8d1766 5761 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5762 grub_disk_addr_t for memory addresses.
5763
00c7a56a 5764 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5765 explicitly to fix a warning.
5766
08d3ef09 5767 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5768
cb71ba20 5769 * Makefile.in (MODULE_LDFLAGS): New variable.
5770 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
5771 the linker accepts --build-id=none.
5772 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
5773 MODULE_LDFLAGS.
5774 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5775
d4c9b428 5776 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5777 those in Linux XFS code. Provide a way to access 64-bit parent
5778 inode.
5779 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
5780 the end of struct grub_xfs_dir_header.
5781
d4156eee 57822008-07-02 Bean <bean123ch@gmail.com>
5783
5784 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5785 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5786 and GRUB_IEEE1275_FLAG_NO_ANSI.
5787
5788 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5789 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5790 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5791
5792 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5793 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5794
5795 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5796 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5797
5798 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5799 esc sequence on non ANSI terminal.
5800 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5801
5802 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5803 beginning of file.
5804
2270f77b 58052008-07-02 Bean <bean123ch@gmail.com>
5806
5807 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5808 (grub_editenv_SOURCES): New variable.
5809 (pkglib_MODULES): Add loadenv.mod.
5810 (loadenv_mod_SOURCES): New variable.
5811 (loadenv_mod_CFLAGS): Likewise.
5812 (loadenv_mod_LDFLAGS): Likewise.
5813
5814 * include/grub/envblk.h: New file.
5815
5816 * util/envblk.c: New file.
5817
5818 * util/grub-editenv.c: New file.
5819
5820 * commands/loadenv.c: New file.
5821
0e9e51ec 58222008-07-01 Pavel Roskin <proski@gnu.org>
5823
d89b7634 5824 * include/multiboot2.h (struct multiboot_tag_module): Use char,
5825 not unsigned char. This fixes warnings and is consistent with
5826 other tags.
5827
bf1835b1 5828 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5829
8222a04b 5830 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5831
6a42d99d 5832 * term/tparm.c (analyze): Always set *popcount.
5833
10b159d1 5834 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5835 cast to fix a warning.
5836
b8789f6c 5837 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5838 cast to suppress a warning.
5839
29d7e38a 5840 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5841 grub_fshelp_read_file() expects.
5842
f341f669 5843 * fs/fat.c: Fix UUID calculation on big-endian systems. We
5844 write uuid as a 32-bit value in CPU byte order, so declare and
5845 use it as such.
5846
0e9e51ec 5847 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5848 long if the format specifier expects it.
5849 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5850 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5851 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5852 long to fix a warning.
5853 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5854 grub_dprintf() arguments to fix warnings.
5855
3aefa857 58562008-06-30 Pavel Roskin <proski@gnu.org>
5857
56c7668b 5858 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5859 install_bsd_part immediately before core.img is embedded or
5860 modified on disk. This fixes core.img verification if core.img
5861 cannot be embedded.
5862
3aefa857 5863 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5864 core_path to calculate the blocklist.
5865 Patch from Javier Martín <lordhabbit@gmail.com>
5866
5444088d 58672008-06-29 Robert Millan <rmh@aybabtu.com>
5868
5869 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
5870 block to disk block.
5871 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5872 Patch from Niels Böhm <bitbucket@arcor.de>
5873
674835c8 58742008-06-29 Robert Millan <rmh@aybabtu.com>
5875
5876 * util/update-grub_lib.in (font_path): Search for fonts in
5877 /boot/grub first, which is more likely to be readable (we aren't
5878 deciding where fonts live, just looking for them).
5879
f527dbc8 58802008-06-26 Pavel Roskin <proski@gnu.org>
5881
6c2d8df6 5882 * util/biosdisk.c (read_device_map): Don't leave dead map
5883 entries for devices failing stat() check.
5884
f527dbc8 5885 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5886 core_path_dev for the core.img path on the target device.
5887
aebe3d13 58882008-06-26 Robert Millan <rmh@aybabtu.com>
5889
5890 * disk/fs_uuid.c: New file.
5891 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5892 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5893 (fs_uuid_mod_LDFLAGS): New variables.
5894 * include/grub/disk.h (grub_disk_dev_id): Add
5895 `GRUB_DISK_DEVICE_UUID_ID'.
5896 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5897 implement iterate().
5898
37aaf354 58992008-06-26 Robert Millan <rmh@aybabtu.com>
5900
5901 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5902 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5903 Linux image includes no initrd.
5904
25ff262a 59052008-06-21 Javier Martín <lordhabbit@gmail.com>
5906
5907 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5908 call to resolve the core image location that effectively appended the
5909 name twice.
5910
76a2bd44 59112008-06-21 Robert Millan <rmh@aybabtu.com>
5912
5913 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5914 call from here ...
5915
5916 * util/grub.d/10_hurd.in: ... to here ...
5917 * util/grub.d/10_linux.in: ... and here.
5918
650e1c79 59192008-06-19 Robert Millan <rmh@aybabtu.com>
5920
fe987087 5921 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 5922 after it has been set by grub_machine_set_prefix().
5923
6ce63911 59242008-06-19 Robert Millan <rmh@aybabtu.com>
5925
5926 * commands/search.c (search_label, search_fs_uuid, search_file): Print
5927 search result when not saving to variable, not the other way around.
5928 When saving to variable, abort iteration as soon as a match is found.
5929
73940cec 59302008-06-19 Robert Millan <rmh@aybabtu.com>
5931
5932 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5933 check for partition that provides /boot/grub. Its logic is flawed,
5934 as it prevents prepare_grub_to_access_device() from being called
5935 multiple times.
5936
3c62a39d 59372008-06-19 Robert Millan <rmh@aybabtu.com>
5938
5939 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5940 "insmod" command directly when abstraction modules are needed,
fe987087 5941 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 5942 since it had already been processed).
5943
47395a42 59442008-06-19 Pavel Roskin <proski@gnu.org>
5945
5946 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5947 changed. This is needed in case GRUB_LIBDIR changes.
5948 * conf/i386-ieee1275.rmk: Likewise.
5949 * conf/i386-linuxbios.rmk: Likewise.
5950 * conf/i386-pc.rmk: Likewise.
5951 * conf/powerpc-ieee1275.rmk: Likewise.
5952
a145ac2d 59532008-06-18 Pavel Roskin <proski@gnu.org>
5954
5955 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5956 kernel_elf_symlist.c to symlist.c for consistency with other
5957 architectures. Update all users.
5958 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5959
7847c51e 59602008-06-18 Robert Millan <rmh@aybabtu.com>
5961
5962 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5963 it in prefix.
5964
5965 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
5966 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
5967 a RAID device, run setup() for all members independently on whether
5968 LVM abstraction is being used.
5969 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5970 If grub-mkimage has set `*install_dos_part == -2', don't override this
5971 value.
5972 Perform *install_dos_part adjustments independently on whether
5973 we're embedding or not.
5974 Clarify error message when image is too big for embedding.
5975 Remove duplicate *install_dos_part stanza.
5976
b23e5644 59772008-06-17 Robert Millan <rmh@aybabtu.com>
5978
5979 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5980 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5981 variables.
5982 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5983 values in grub_ofconsole_normal_color and
5984 grub_ofconsole_highlight_color (they're not directly related to
5985 background and foreground).
5986 (grub_ofconsole_setcolorstate): Extract background and foreground
5987 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5988
0aac2f79 59892008-06-17 Robert Millan <rmh@aybabtu.com>
5990
5991 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5992 /boot/grub for the check in last commit, not /boot (they could be
5993 different partitions).
5994
3cca7ef3 59952008-06-16 Robert Millan <rmh@aybabtu.com>
5996
5997 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5998 asked to setup access for the same partition that provides /boot,
5999 don't bother using UUIDs since our root already has the value we
6000 want.
6001
347396d8 60022008-06-16 Robert Millan <rmh@aybabtu.com>
6003
6004 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6005 I2O devices.
6006 Patch from Sven Mueller <sven@debian.org>.
6007
991477f8 60082008-06-16 Robert Millan <rmh@aybabtu.com>
6009
6010 * util/update-grub.in: Check for $EUID instead of $UID.
6011 Reported by Vincent Zweije.
6012
d31a32a1 60132008-06-16 Bean <bean123ch@gmail.com>
6014
fe987087 6015 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 6016 (grub_ext2_read_block): Likewise.
6017 (grub_ext2_read_inode): Likewise.
6018 (grub_ext2_mount): Likewise.
6019 (grub_ext2_close): Likewise.
6020 (grub_ext3_get_journal): Removed.
6021
fe987087 6022 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 6023 (grub_reiserfs_read_symlink): Likewise.
6024 (grub_reiserfs_mount): Likewise.
6025 (grub_reiserfs_open): Likewise.
6026 (grub_reiserfs_read): Likewise.
6027 (grub_reiserfs_close): Likewise.
6028 (grub_reiserfs_get_journal): Removed.
6029
6030 * fs/fshelp.c (grub_fshelp_read): Removed.
6031 (grub_fshelp_map_block): Likewise.
6032
6033 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6034 (grub_fshelp_journal): Likewise.
6035 (grub_fshelp_read): Likewise.
6036 (grub_fshelp_map_block): Likewise.
6037
3540a760 60382008-06-16 Pavel Roskin <proski@gnu.org>
6039
6040 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6041 floating point anymore.
6042 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6043
95614c84 60442008-06-15 Pavel Roskin <proski@gnu.org>
6045
6046 * commands/ls.c (grub_ls_list_files): Use integer calculations
6047 for human readable format, avoid floating point use.
6048 * kern/misc.c (grub_ftoa): Remove.
6049 (grub_vsprintf): Remove floating point support.
6050
50465dd6 60512008-06-15 Robert Millan <rmh@aybabtu.com>
6052
fe6b695a 6053 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 6054 devices.
6055 Reported by Max Vozeler.
6056
a9207284 60572008-06-15 Robert Millan <rmh@aybabtu.com>
6058
6059 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6060 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6061 skipped later.
6062 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6063 the beginning of the prefix.
6064
6065 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6066 It is assumed that if we have a memdisk, grub-mkimage has set
6067 grub_prefix to include the "(memdisk)" drive in it.
6068
a7cbd45a 60692008-06-15 Robert Millan <rmh@aybabtu.com>
6070
6071 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6072 Initialize keyboard controller after registering the terminal, so that
6073 grub_printf() can be called from grub_keyboard_controller_init().
6074
21cf716a 60752008-06-15 Robert Millan <rmh@aybabtu.com>
6076
6077 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6078 extent-btree which is written as big endian on disk.
6079 Reported by Alain Greppin <al@chilibi.org>.
6080
23a64d8e 60812008-06-14 Robert Millan <rmh@aybabtu.com>
6082
6083 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6084 * util/i386/pc/grub-install.in (modules): Likewise.
6085
d687651c 60862008-06-13 Pavel Roskin <proski@gnu.org>
6087
6088 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6089
dfe9ddd4 60902008-06-13 Bean <bean123ch@gmail.com>
6091
6092 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6093
6094 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6095
6096 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6097 to indicate sparse block.
6098
16ae7781 60992008-06-12 Pavel Roskin <proski@gnu.org>
6100
e6d1a308 6101 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6102 number, grub_fshelp_read() does it for us.
6103
16ae7781 6104 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6105 linear disk read with journal translation.
6106 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6107 * include/grub/fshelp.h: Declare grub_fshelp_read().
6108
40fd3a2b 61092008-06-09 Pavel Roskin <proski@gnu.org>
6110
6111 * fs/minix.c (grub_minix_mount): Handle error reading
6112 superblock.
6113
f5679726 61142008-06-08 Robert Millan <rmh@aybabtu.com>
6115
6116 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6117 don't append the RAID prefix afterwards.
6118 Reported by Clint Adams.
6119
ce525529 61202008-06-08 Robert Millan <rmh@aybabtu.com>
6121
6122 Based on description from Pavel:
6123 * kern/disk.c (grub_disk_check_range): Rename to ...
6124 (grub_disk_adjust_range): ... this. Add a comment explaining the
6125 tasks performed by this function.
6126
ad4936a0 61272008-06-08 Robert Millan <rmh@aybabtu.com>
6128
6129 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6130 `num_serial' (for consistency with other variables).
6131 (struct grub_ntfs_data): Add `uuid' member.
6132 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6133 (grub_ntfs_uuid): New function.
6134 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6135
dc20b0f9 61362008-06-07 Pavel Roskin <proski@gnu.org>
6137
6138 * util/biosdisk.c (open_device): Revert last change to the
6139 function, it broke installation. The sector needs to be
6140 different dependent on which device is opened.
6141
c5e3cfba 61422008-06-06 Robert Millan <rmh@aybabtu.com>
6143
6144 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6145 rest of GRUB, and breakage doesn't happen if its value were modified.
6146
6147 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6148 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6149 a constant (same value).
6150 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6151 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6152
26a1f8c4 61532008-06-06 Robert Millan <rmh@aybabtu.com>
6154
6155 * util/biosdisk.c (open_device): Do not modify sector offset when
6156 accessing a partition. kern/disk.c already handles this for us.
6157
25d6b327 61582008-06-06 Robert Millan <rmh@aybabtu.com>
6159
6160 * util/grub-emu.c (grub_machine_init): Move code in this function from
6161 here ...
6162 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6163 segfault in case grub_printf() is called).
6164
6165 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6166 grub_probe. Update all users not to explicitly add it again.
6167 (grub_device): New variable; contains corresponding device for grubdir.
6168 (fs_module, partmap_module, devabstraction_module): Pass
6169 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6170 every time.
6171
9ece62fb 61722008-06-05 Robert Millan <rmh@aybabtu.com>
6173
6174 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6175 is found, print it (same layout as with labels).
6176
1ad36d37 61772008-06-04 Robert Millan <rmh@aybabtu.com>
6178
6179 * util/biosdisk.c (get_drive): Rename to ...
6180 (find_grub_drive): ... this. Update all users.
6181
6182 (get_os_disk): Rename to ...
6183 (convert_system_partition_to_system_disk): ... this. Update all users.
6184
6185 (find_drive): Rename to ...
6186 (find_system_device): ... this. Update all users.
6187
e6a30859 61882008-06-04 Robert Millan <rmh@aybabtu.com>
6189
6190 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6191 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6192 (make_device_map): Likewise.
6193
00c108a4 61942008-06-01 Robert Millan <rmh@aybabtu.com>
6195
6196 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6197 before dereferencing it.
6198
6199 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6200 union with fat12/fat16-specific ones. Add some new fields, including
6201 `num_serial' for both versions.
6202 (struct grub_fat_data): Add `uuid' member.
6203 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6204 names. Initialize `data->uuid' using `num_serial'.
6205 (grub_fat_uuid): New function.
6206 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6207
6208 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6209 (grub_reiserfs_uuid): New function.
6210 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6211 member.
6212
6213 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6214 (grub_xfs_uuid): New function.
6215 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6216
1385c5bb 62172008-06-01 Robert Millan <rmh@aybabtu.com>
6218
6219 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6220 code that is backward compatible with pre-uuid search command.
6221
c682dfd7 62222008-05-31 Robert Millan <rmh@aybabtu.com>
6223
6224 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6225 floppies after everything else, to ensure floppy drive isn't accessed
6226 unnecessarily (patch from Bean).
6227
b7db5d47 62282008-05-31 Robert Millan <rmh@aybabtu.com>
6229
6230 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6231 not print device names when we were asked to set a variable.
6232
6e037aa9 62332008-05-31 Robert Millan <rmh@aybabtu.com>
6234
6235 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6236 using "cursor-on" and "cursor-off" commands (understood at least by
6237 the Open Firmware flavour on OLPC).
6238
41305bc8 62392008-05-31 Michael Gorven <michael@gorven.za.net>
6240
6241 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6242 on and off sequences.
6243
69ba137e 62442008-05-31 Robert Millan <rmh@aybabtu.com>
6245
6246 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6247 * util/update-grub.in: Likewise.
6248
520ae21b 62492008-05-30 Pavel Roskin <proski@gnu.org>
6250
6251 * util/biosdisk.c (linux_find_partition): Simplify logic and
6252 make the code more universal. Keep special processing for
6253 devfs, but use a simple rule for all other devices. If the
6254 device ends with a number, append 'p' and the partition number.
6255 Otherwise, append only the partition number.
6256
5786569b 62572008-05-30 Robert Millan <rmh@aybabtu.com>
6258
6259 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6260 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6261 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6262 the `root' parameter to Linux.
6263
51500452 62642008-05-30 Robert Millan <rmh@aybabtu.com>
6265
6266 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6267 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6268 --fs_uuid with --fs-uuid.
6269 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6270 all filesystems support them).
6271
811d3878 62722008-05-30 Robert Millan <rmh@aybabtu.com>
6273
6274 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 6275 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 6276
cab63c95 62772008-05-30 Robert Millan <rmh@aybabtu.com>
6278
6279 * util/grub.d/00_header.in: Remove obsolete comment referencing
6280 convert_system_path_to_grub_path().
6281 * util/update-grub.in: Likewise.
6282 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6283 (convert_system_path_to_grub_path): Add a warning message explaining
6284 that this function is deprecated. Rely on is_path_readable_by_grub()
6285 for the readability checks.
6286 (font_path): Use is_path_readable_by_grub() for the readability
6287 check rather than convert_system_path_to_grub_path().
6288
972e2f7a 62892008-05-30 Robert Millan <rmh@aybabtu.com>
6290
6291 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6292 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6293 converting it first.
6294 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6295 grub.cfg for access to font file, and afterwards call it again to set
6296 the root device.
6297
62191274 62982008-05-30 Robert Millan <rmh@aybabtu.com>
6299
6300 * commands/search.c (options): Add --fs_uuid option.
6301 (search_fs_uuid): New function.
6302 (grub_cmd_search): Fix --set argument passing.
6303 Use search_fs_uuid() when requested via --fs_uuid.
6304 (grub_search_init): Update help message.
6305 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6306 and redeclare it as an array of 16-bit words.
6307 (grub_ext2_uuid): New function.
6308 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6309 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6310 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6311 (GRUB_DEVICE_BOOT_UUID): New variables.
6312 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6313 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6314 whenever possible.
6315 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6316 just assume `root' variable has the right value.
6317 * util/grub.d/10_linux.in: Likewise.
6318 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6319 via PRINT_FS_UUID.
6320 (main): Recognise `-t fs_uuid' argument.
6321
01b73ec8 63222008-05-30 Robert Millan <rmh@aybabtu.com>
6323
6324 * util/biosdisk.c (map): Redefine structure to hold information
6325 about GRUB drive name.
fe6b695a 6326 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 6327 drive names.
6328 (call_hook): Remove.
6329 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6330 member. Assume drive has partitions.
6331 (grub_util_biosdisk_open): Access device names via `.device' struct
6332 member.
6333 (open_device): Likewise.
6334 (find_drive): Likewise.
6335 (read_device_map): Adjust map[] usage to match the new struct
6336 definition. Don't check for duplicates (still possible, but not cheap
6337 anymore).
6338 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6339 (make_device_name): Remove assumption of BIOS-like drive names.
6340
22f16596 63412008-05-30 Pavel Roskin <proski@gnu.org>
6342
6343 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6344 compiling execute.c doesn't need grub_script.tab.h anymore.
6345 (normal/command.c_DEPENDENCIES): Likewise.
6346 (normal/function.c_DEPENDENCIES): Likewise.
6347 * conf/i386-ieee1275.rmk: Likewise.
6348 * conf/i386-linuxbios.rmk: Likewise.
6349 * conf/i386-pc.rmk: Likewise.
6350 * conf/powerpc-ieee1275.rmk: Likewise.
6351 * conf/sparc64-ieee1275.rmk: Likewise.
6352
528ad8f2 63532008-05-29 Pavel Roskin <proski@gnu.org>
6354
d1dff95d 6355 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6356 when scanning metadata for volume group name.
6357
528ad8f2 6358 * include/grub/script.h: Don't include grub_script.tab.h. It's
6359 a generated file, which may only be included from the files with
6360 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6361 use union YYSTYPE, as the later allows forward declaration.
6362 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6363
47248e08 63642008-05-29 Robert Millan <rmh@aybabtu.com>
6365
6366 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6367 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6368 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6369 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6370 scan codes.
6371
ee632529 63722008-05-29 Robert Millan <rmh@aybabtu.com>
6373
6374 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6375 control key combinations.
6376
eee96e08 63772008-05-29 Robert Millan <rmh@aybabtu.com>
6378
6379 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6380 * util/ieee1275/grub-install.in: ... to here.
6381 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6382 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6383 (grub_install_SOURCES): Likewise.
6384
da9a6a94 63852008-05-29 Robert Millan <rmh@aybabtu.com>
6386
6387 * fs/affs.c: Update copyright year.
6388 * fs/ext2.c: Likewise.
6389 * fs/fshelp.c: Likewise.
6390 * fs/hfsplus.c: Likewise.
6391 * fs/ntfs.c: Likewise.
6392 * fs/xfs.c: Likewise.
6393 * include/grub/fshelp.h: Likewise.
6394 * util/grub-mkdevicemap.c: Likewise.
6395
12e65f3a 63962008-05-28 Robert Millan <rmh@aybabtu.com>
6397
6398 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6399 might need to be fatfs to support some firmware implementations
6400 (e.g. OFW or EFI).
6401
23023641 64022008-05-28 Robert Millan <rmh@aybabtu.com>
6403
6404 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6405 devices.
6406 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6407 (make_device_map): Likewise.
6408
887d2619 64092008-05-20 Bean <bean123ch@gmail.com>
6410
6411 * fs/fshelp.c (grub_fshelp_map_block): New function.
6412 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6413 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6414
6415 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6416 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6417 (grub_fshelp_journal): New structure.
6418 (grub_fshelp_map_block): New function prototype.
6419 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6420 (grub_fshelp_map_block): Likewise.
6421
6422 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6423 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6424 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6425 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6426 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6427 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6428 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6429 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6430 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6431 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6432 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6433 (grub_ext2_sblock): New members for journal support.
6434 (grub_ext3_journal_header): New structure.
6435 (grub_ext3_journal_revoke_header): Likewise.
6436 (grub_ext3_journal_block_tag): Likewise.
6437 (grub_ext3_journal_sblock): Likewise.
6438 (grub_fshelp_node): New members logfile and journal.
6439 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6440 grub_fshelp_map_block to get real block number.
6441 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6442 number.
6443 (grub_ext2_read_inode): Likewise.
6444 (grub_ext3_get_journal): New function.
6445 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6446 (grub_ext2_close): Release memory used by journal.
6447
6448 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6449 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6450 (grub_reiserfs_transaction_header): Renamed to
6451 grub_reiserfs_description_block, replace field data with real_blocks.
6452 (grub_reiserfs_commit_block): New structure.
6453 (grub_reiserfs_data): New member journal.
6454 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6455 number.
6456 (grub_reiserfs_read_symlink): Likewise.
6457 (grub_reiserfs_iterate_dir): Likewise.
6458 (grub_reiserfs_open): Likewise.
6459 (grub_reiserfs_read): Likewise.
6460 (grub_reiserfs_get_journal): New function.
6461 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6462 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6463 using grub_reiserfs_get_journal.
6464 (grub_reiserfs_close): Release memory used by journal.
6465
6466 * fs/affs.c (grub_affs_read_block): Change block type to
6467 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6468
6469 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6470
6471 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6472
6473 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6474
6475 * fs/udf.c (grub_udf_read_block): Change block type to
6476 grub_disk_addr_t. Use type cast to avoid warning.
6477
6478 * fs/xfs.c (grub_xfs_read_block): Likewise.
6479
b7c6bed5 64802008-05-16 Christian Franke <franke@computer.org>
6481
6482 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6483 to ensure that break with ESC will always work.
6484 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6485 Remove ESC from keyboard queue.
6486
eedf167f 64872008-05-16 Christian Franke <franke@computer.org>
6488
6489 * util/biosdisk.c: [__CYGWIN__] Add includes.
6490 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6491 (get_os_disk): Move variable declarations to OS specific
6492 parts to avoid warning.
6493 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6494 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6495 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6496 Cygwin.
6497 * util/getroot.c: [__CYGWIN__] Add includes.
6498 (strip_extra_slashes): Fix "/" case.
6499 [__CYGWIN__] (get_win32_path): New function.
6500 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6501 [__CYGWIN__] (find_root_device): Disable.
6502 [__CYGWIN__] (get_bootsec_serial): New function.
6503 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6504 [__linux__] (grub_guess_root_device): Add early returns to simplify
6505 structure.
6506 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6507 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6508 check for Linux only.
6509
a079699e 65102008-05-15 Bean <bean123ch@gmail.com>
6511
6512 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6513 keyboard hang problem in apple's intel mac.
6514
1cf4059a 65152008-05-09 Robert Millan <rmh@aybabtu.com>
6516
6517 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6518 devices.
6519 * util/grub-mkdevicemap.c (get_virtio_disk_name)
6520 (make_device_map): Likewise.
6521 Reported by Aurelien Jarno <aurel32@debian.org>
6522
ed759390 65232008-05-07 Ian Campbell <ijc@hellion.org.uk>
6524
6525 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6526 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6527 (make_device_map): Output entries for xvd type disks.
6528
b56c4eaa 65292008-05-07 Robert Millan <rmh@aybabtu.com>
6530
6531 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6532 devices.
6533 * util/grub-mkdevicemap.c (get_cciss_disk_name)
6534 (make_device_map): Likewise.
6535 Reported by Roland Dreier <rdreier@cisco.com>
6536
7f8866ed 65372008-05-07 Robert Millan <rmh@aybabtu.com>
6538
6539 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6540 grub_strstr() call. Correct a few mistakes in failure path handling.
6541
b0346e0f 65422008-05-06 Robert Millan <rmh@aybabtu.com>
6543
6544 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6545 Do not print a trailing slash (therefore, the root directory is an
6546 empty string).
6547 (convert_system_path_to_grub_path): Do not remove trailing slash
6548 from make_system_path_relative_to_its_root() output.
6549
6550 * util/i386/pc/grub-install.in: Add trailing slash to output from
6551 make_system_path_relative_to_its_root().
6552
6cf12cbd 65532008-05-06 Robert Millan <rmh@aybabtu.com>
6554
6555 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
6556 ensures that output lines aren't intermangled with those sent to
6557 stderr (via grub_util_info()).
6558 * util/grub-probe.c (grub_refresh): Likewise.
6559 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6560
0fbb3117 65612008-05-05 Christian Franke <franke@computer.org>
6562
6563 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6564 Add Cygwin device names.
6565 (get_ide_disk_name) [__CYGWIN__]: Likewise.
6566 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6567 (check_device): Return error instead of success on empty name.
6568 (make_device_map): Move label inside linux specific code to
6569 prevent compiler warning.
6570
8124cdb7 65712008-04-30 Robert Millan <rmh@aybabtu.com>
6572
6573 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6574 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6575 first boot option.
6576 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6577
094c01d0 65782008-04-29 Robert Millan <rmh@aybabtu.com>
6579
6580 * docs/grub.cfg: New file (example GRUB configuration).
6581
f4b1fc02 65822008-04-26 Robert Millan <rmh@aybabtu.com>
6583
329ce2a5 6584 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
6585 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6586 and `disk/ieee1275/nand.c'.
f4b1fc02 6587
25f16ec1 65882008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 6589
25f16ec1 6590 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6591 i386-linuxbios.
6592
6593 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6594 change the buffer size to 4096 for cdrom device.
6595
6596 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6597 and nand.mod.
6598 (_linux_mod_SOURCES): New variable.
6599 (_linux_mod_CFLAGS): Likewise.
6600 (_linux_mod_LDFLAGS): Likewise.
6601 (linux_mod_SOURCES): Likewise.
6602 (linux_mod_CFLAGS): Likewise.
6603 (linux_mod_LDFLAGS): Likewise.
6604 (nand_mod_SOURCES): Likewise.
6605 (nand_mod_CFLAGS): Likewise.
6606 (nand_mod_LDFLAGS): Likewise.
6607
6608 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6609 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6610 type property. (nand device in olpc don't have this property)
6611
6612 * include/grub/disk.h (grub_disk_dev_id): New macro
6613 GRUB_DISK_DEVICE_NAND_ID.
6614
6615 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6616 function prototype.
6617 (grub_rescue_cmd_initrd): Likewise.
6618
6619 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6620 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6621 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 6622
25f16ec1 6623 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6624 GRUB_MACHINE_IEEE1275 is defined.
6625
6626 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6627 Use NESTED_FUNC_ATTR attribute on the hook parameter.
6628
6629 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6630 on nested function heap_init.
6631 (grub_upper_mem): New variable for i386-ieee1275.
6632 (grub_get_extended_memory): New function for i386-ieee1275.
6633 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6634
6635 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6636 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6637 property.
f19dbdb7 6638
25f16ec1 6639 * loader/i386/ieee1275/linux.c: New file.
6640
6641 * loader/i386/ieee1275/linux_normal.c: New file.
6642
6643 * disk/ieee1275/nand.c: New file.
6644
e89d61e9 66452008-04-18 Thomas Schwinge <tschwinge@gnu.org>
6646
6647 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6648 value.
6649 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6650
602566f6 66512008-04-18 Robert Millan <rmh@aybabtu.com>
6652
6653 Restructures early code path on ieee1275 to unify grub_main() as
6654 the first C function that is executed in every platform.
6655
6656 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6657 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6658 cmain().
6659 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6660 * kern/ieee1275/cmain.c (cmain): Rename to ...
6661 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6662 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6663 at the beginning.
6664
57490c2b 66652008-04-18 Robert Millan <rmh@aybabtu.com>
6666
6667 * util/update-grub.in: Fix syntax error when setting
6668 `GRUB_PRELOAD_MODULES'.
6669 Reported by Stephane Chazelas <stephane@artesyncp.com>
6670
1977517d 66712008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
6672
6673 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6674 section into account, newer toolchains generate unique build ids
6675 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 6676 we want build ids to be preserved
1977517d 6677 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6678 far from other sections don't cause the raw binary images grow
6679 size
6680
bfb1f1a2 66812008-04-15 Robert Millan <rmh@aybabtu.com>
6682
6683 * disk/lvm.c: Update copyright year.
6684 * kern/misc.c: Likewise.
6685
01979850 66862008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6687
6688 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 6689 there is no memory left for physical volume name.
01979850 6690
0a1150e2 66912008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6692
6693 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6694 volume name mapping to support bigger than 9 character names properly.
6695
82ead3fe 66962008-04-13 Robert Millan <rmh@aybabtu.com>
6697
6698 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6699 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6700
e54a72f5 67012008-04-13 Christian Franke <franke@computer.org>
6702
6703 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6704 to create a floppy emulation boot CD when non emulation mode
6705 does not work.
6706 Enable Joliet CD filesystem extension.
6707
9fe86034 67082008-04-13 Robert Millan <rmh@aybabtu.com>
6709
6710 * kern/misc.c (grub_strncat): Fix off-by-one error.
6711 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6712
6713 * kern/env.c (grub_env_context_close): Clear current context, not
6714 previous one.
6715 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6716
6717 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6718
7ceeee39 67192008-04-13 Robert Millan <rmh@aybabtu.com>
6720
6721 Improve robustness when handling LVM.
6722
6723 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 6724 (and leave `*p' unmodified).
7ceeee39 6725 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6726 through it.
6727 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6728 iterating through it.
6729 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6730 through it.
fe6b695a 6731 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 6732 when due) on each grub_lvm_getvalue() or grub_strstr() call.
6733 Don't assume `vg->pvs != NULL' when iterating through it.
6734
58cd3d85 67352008-04-13 Robert Millan <rmh@aybabtu.com>
6736
6737 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6738 * genmk.rb (partmap): New variable.
6739 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6740 (#{partmap}): New target rule.
6741 * genpartmaplist.sh: New file.
6742 * Makefile.in (pkglib_DATA): Add partmap.lst.
6743 (partmap.lst): New target rule.
6744 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6745 modules (including all partition maps), instead of preloading them.
6746
78b51059 67472007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
6748
6749 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6750 `linux-boot-prober' (if installed) to detect other operating
6751 systems which are installed on the computer and add them to
6752 the boot menu.
6753 * conf/common.rmk: Build and install 30_os-prober.
6754
a91627b4 67552008-04-12 Robert Millan <rmh@aybabtu.com>
6756
6757 * kern/powerpc/ieee1275/init.c: Move from here ...
6758 * kern/ieee1275/init.c: ... to here. Update all users.
6759
6760 * kern/powerpc/ieee1275/cmain.c: Move from here ...
6761 * kern/ieee1275/cmain.c: ... to here. Update all users.
6762
6763 * kern/powerpc/ieee1275/openfw.c: Move from here ...
6764 * kern/ieee1275/openfw.c: ... to here. Update all users.
6765
6766 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6767 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
6768
322562ea 67692008-04-10 Pavel Roskin <proski@gnu.org>
6770
6771 * configure.ac: Always use "_cv_" in cache variables for
6772 compatibility with Autoconf 2.62.
6773
a02a73c5 67742008-04-07 Robert Millan <rmh@aybabtu.com>
6775
6776 Revert grub/machine/init.h addition by Pavel (since it breaks on
6777 i386-ieee1275 and others):
6778 * util/i386/pc/misc.c: Remove grub/machine/init.h.
6779 * util/powerpc/ieee1275/misc.c: Likewise.
6780
25c024b1 67812008-04-07 Robert Millan <rmh@aybabtu.com>
6782
6783 * util/grub-probe.c (probe): Improve error message.
6784
3cbd2f98 67852008-04-07 Robert Millan <rmh@aybabtu.com>
6786
6787 * util/biosdisk.c (read_device_map): Skip devices that don't exist
6788 (this prevents the presence of a bogus entry from ruining the whole
6789 thing).
6790
87a297bf 67912008-04-06 Pavel Roskin <proski@gnu.org>
6792
36747a62 6793 * util/biosdisk.c: Include grub/util/biosdisk.h.
6794 * util/grub-fstest.c (execute_command): Make static.
6795 * util/grub-mkdevicemap.c (check_device): Likewise.
6796 * util/i386/pc/misc.c: Include grub/machine/init.h.
6797 * util/powerpc/ieee1275/misc.c: Likewise.
6798 * util/lvm.c: Include grub/util/lvm.h.
6799 * util/misc.c: Include grub/kernel.h, grub/misc.h and
6800 grub/cache.h.
6801 * util/raid.c: Include grub/util/raid.h.
6802 (grub_util_getdiskname): Make static.
6803
87a297bf 6804 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6805 grub_hostfs_fini(), as they are called from grub_init_all() and
6806 grub_fini_all() respectively. This fixes an infinite loop in
6807 grub-fstest due to double registration of hostfs.
6808 Reported by Christian Franke <Christian.Franke@t-online.de>
6809
f6ce7629 68102008-04-05 Pavel Roskin <proski@gnu.org>
6811
6812 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6813 all 8 functions. Otherwise, probe function 0 only.
6814
070e49e4 68152008-04-04 Pavel Roskin <proski@gnu.org>
6816
8b088a4c 6817 * commands/lspci.c (grub_lspci_iter): Print the bus number
6818 correctly.
6819
4f657021 6820 * commands/lspci.c (grub_pci_classes): Fix typos.
6821 (grub_lspci_iter): Don't print func twice. Print vendor ID
6822 before device ID, as it's normally done.
6823
070e49e4 6824 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6825 Fix signedness warnings.
6826 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6827 Likewise.
6828 * util/ieee1275/get_disk_name.c: Include config.h so that
6829 _GNU_SOURCE is defined and getline() is declared. Mark an
6830 unused argument as such. Fix a signedness warning.
6831
ba7328dc 68322008-04-02 Pavel Roskin <proski@gnu.org>
6833
26887f22 6834 * genkernsyms.sh.in: Use more robust assignments for CC and
6835 srcdir. Quote srcdir.
6836 * gensymlist.sh.in: Likewise. Assert at the compile time that
6837 the symbol table is not empty.
6838
ba7328dc 6839 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6840 * fs/cpio.c (grub_cpio_read): Likewise.
6841
0f582c6b 68422008-04-01 Pavel Roskin <proski@gnu.org>
6843
4b6e1995 6844 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6845 * disk/host.c (grub_host_open): Likewise.
6846 * disk/loopback.c (grub_loopback_open): Likewise.
6847 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6848 disk->id as in disk/host.c, not a multi-character constant.
6849
828a2768 6850 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
6851 later is obsolete, potentially dangerous and sets a bad example.
6852 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6853 * util/misc.c (grub_util_get_image_size): Likewise.
6854
2bb4fb47 6855 * disk/loopback.c (options): Improve help for "--partitions".
6856
0f582c6b 6857 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6858 options to align them with the short options, e.g. "echo -e".
6859
a33224e0 68602008-03-31 Bean <bean123ch@gmail.com>
6861
6862 * video/reader/png.c (grub_png_data): New member is_16bit and
6863 image_data.
6864 (grub_png_decode_image_header): Detect 16 bit png image.
6865 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6866 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6867 (grub_video_reader_png): Release memory occupied by image_data.
6868
6869 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6870 4096 bytes.
6871 (grub_nfs_mount): Skip the test for sector per cluster.
6872
6873 * include/grub/ntfs.h (MAX_SPC): Removed.
6874
86cb4f54 68752008-03-31 Bean <bean123ch@gmail.com>
6876
6877 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6878 (grub_probe_SOURCES): Add fs/afs.c.
6879 (grub_fstest_SOURCES): Likewise.
6880 (afs_mod_SOURCES): New variable.
6881 (afs_mod_CFLAGS): Likewise.
6882 (afs_mod_LDFLAGS): Likewise.
6883
6884 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6885 (grub_emu_SOURCES): Likewise.
6886
6887 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6888
6889 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6890
6891 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6892
6893 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6894
6895 * fs/afs.c: New file.
6896
17c74c21 68972008-03-30 Pavel Roskin <proski@gnu.org>
6898
4cb68e89 6899 * disk/host.c: Include grub/misc.h to fix a warning.
6900 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6901 warnings about implicit declarations.
6902
8790bb04 6903 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6904 variable.
6905 * include/grub/i386/loader.h: Change declaration of
6906 grub_linux_boot() to match what grub_loader_set() expects.
6907 * util/getroot.c (grub_guess_root_device): Return const char* to
6908 fix a warning.
6909 * util/grub-probe.c (probe): Fix a warning about uninitialized
6910 abstraction_name variable.
6911 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6912 second argument as unused to fix a warning.
6913
9a3f3296 6914 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6915 missing grub_error() call.
6916
0ecef90d 6917 * util/update-grub_lib.in: Define datarootdir, since Autoconf
6918 2.60 and newer uses it to define datadir.
6919
0bf6d401 6920 * commands/sleep.c: Fix warning about implicit declaration.
6921 * disk/memdisk.c: Likewise.
6922 * loader/aout.c: Likewise.
6923 * loader/i386/bsd_normal.c: Likewise.
6924 * util/grub-probe.c: Likewise.
6925
7cdacf97 6926 * commands/i386/cpuid.c (has_longmode): Make static.
6927 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6928 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6929
17c74c21 6930 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6931 GDT. This is more robust, as %ds can change.
6932 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6933 calling real_to_prot().
6934 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6935
80a3e68b 69362008-03-28 Pavel Roskin <proski@gnu.org>
6937
6938 * kern/i386/pc/startup.S: Assert that uncompressed functions
6939 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6940 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6941 code, as they push parts of the code (error handlers) beyond
6942 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
6943 code as correctness and size.
6944
77bcd272 69452008-03-28 Pavel Roskin <proski@gnu.org>
6946
6947 * kern/i386/pc/startup.S
6948 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6949 data block address to the real mode, keep offset minimal. This
6950 works around a bug in AWARD BIOS on old Athlon systems, which
6951 makes CD detection hang.
6952
c5dfd43b 69532008-03-26 Pavel Roskin <proski@gnu.org>
6954
6955 * normal/color.c (grub_parse_color_name_pair): Make `name' a
6956 const.
6957 * include/grub/normal.h: Add grub_parse_color_name_pair()
6958 declaration.
6959
bf962df2 69602008-03-24 Bean <bean123ch@gmail.com>
6961
6962 * disk/i386/pc/biosdisk.c (cd_start): Removed.
6963 (cd_count): Removed.
6964 (cd_drive): New variable.
6965 (grub_biosdisk_get_drive): Don't check for (cdN) device.
6966 (grub_biosdisk_call_hook): Likewise.
6967 (grub_biosdisk_iterate): Change cdrom detection method.
6968 (grub_biosdisk_open): Replace cd_start with cd_drive.
6969 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6970 detect cdrom device.
6971
6972 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6973 Removed.
6974 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6975 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6976 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6977 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6978 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6979 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6980 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6981 (grub_biosdisk_cdrp): New structure.
6982 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6983
6984 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6985
6986 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6987 device.
6988
6989 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6990 New function.
6991
68e7fc7a 69922008-03-20 Robert Millan <rmh@aybabtu.com>
6993
6994 Remove 2 TiB limit in ata.mod.
6995 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6996 (grub_ata_dumpinfo): Print sector count with 0x%llx.
6997 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6998 grub_uint64_t instead of grub_uint32_t.
6999
38ad2cf5 70002008-03-05 Bean <bean123ch@gmail.com>
7001
7002 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7003 (grub_multiboot): Set boot device.
7004
7005 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7006
2b89344e 70072008-03-02 Bean <bean123ch@gmail.com>
7008
7009 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7010 symlink_buffer.
7011
87a95d1f 70122008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7013
7014 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7015 texinfo.tex.
7016
7017 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7018 modified.
7019
7020 * docs/fdl.texi: New file.
f19dbdb7 7021
87a95d1f 7022 * docs/mdate-sh: New file. Copied from gnulib.
7023 * docs/texinfo.tex: Likewise.
7024
7025 * config.guess: Updated from gnulib.
7026 * install-sh: Likewise.
7027
7dc15d8e 70282008-02-28 Robert Millan <rmh@aybabtu.com>
7029
7030 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7031 (aout_mod_SOURCES): New variable.
7032 (aout_mod_CFLAGS): Likewise.
7033 (aout_mod_LDFLAGS): Likewise.
7034
7035 * conf/i386-ieee1275.rmk: Likewise.
7036
b00ab696 70372008-02-28 Robert Millan <rmh@aybabtu.com>
7038
7039 * util/update-grub.in: Reorganise terminal validity check. Accept
7040 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7041 Based on suggestion by Franklin PIAT.
7042
79ca2d78 70432008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7044
7045 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7046 function.
7047 * util/getroot.c (grub_util_check_block_device): New function that
7048 returns the given argument if it is a block device and returns NULL else.
7049 * util/grub-probe.c (argument_is_device): New variable.
7050 (probe): Promote device_name from a variable to an argument. Receive
7051 device_name from grub_util_check_block_device() if path is NULL and from
7052 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 7053 (options): Introduce new parameter '-d, --device'.
79ca2d78 7054 (main): Add description of the new parameter to the help screen.
7055 Rename path variable to argument. Set argument_is_device if the '-d'
7056 option is given. Pass argument to probe() depending on
7057 argument_is_device.
7058
0d16e571 70592008-02-24 Bean <bean123ch@gmail.com>
7060
7061 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7062 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7063 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7064 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7065 (GRUB_ISO9660_VOLDESC_END): Likewise.
7066 (grub_iso9660_primary_voldesc): New member escape.
7067 (grub_iso9660_data): New member joliet.
7068 (grub_iso9660_convert_string): New function.
7069 (grub_iso9660_mount): Detect joliet extension.
7070 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7071 (grub_iso9660_iso9660_label): Likewise.
7072
7073 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7074 (grub_setup_SOURCES): Add fs/udf.c.
7075 (grub_fstest_SOURCES): Likewise.
7076 (udf_mod_SOURCES): New variable.
7077 (udf_mod_CFLAGS): Likewise.
7078 (udf_mod_LDFLAGS): Likewise.
7079
7080 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7081 (grub_emu_SOURCES): Likewise.
7082
7083 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7084
7085 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7086
7087 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7088
7089 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7090
7091 * fs/udf.c: New file.
7092
8a594a17 70932008-02-24 Robert Millan <rmh@aybabtu.com>
7094
7095 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7096 (normal/lexer.c_DEPENDENCIES): New variables.
7097 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7098 (normal/lexer.c_DEPENDENCIES): Likewise.
7099 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7100 (normal/lexer.c_DEPENDENCIES): Likewise.
7101 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7102 (normal/lexer.c_DEPENDENCIES): Likewise.
7103 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7104 (normal/lexer.c_DEPENDENCIES): Likewise.
7105 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7106 (normal/lexer.c_DEPENDENCIES): Likewise.
7107
2dc33c03 71082008-02-23 Robert Millan <rmh@aybabtu.com>
7109
7110 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7111 since they were intended to be in hex. This didn't break previously
7112 because of a bug in gpt_partition_map_iterate() (see below).
7113
7114 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7115 when checking the validity of GPT header.
7116 Remove `partno', since it always provides the same information as `i'.
7117
f6f4cfb0 71182008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7119
7120 * include/grub/efi/time.h: Fix a wrong comment.
7121
79ff665f 71222008-02-19 Pavel Roskin <proski@gnu.org>
7123
7124 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7125 message.
7126
d38e24c2 71272008-02-19 Bean <bean123ch@gmail.com>
7128
7129 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7130 (aout_mod_SOURCES): New variable.
7131 (aout_mod_CFLAGS): Likewise.
7132 (aout_mod_LDFLAGS): Likewise.
7133 (_bsd_mod_SOURCES): New variable.
7134 (_bsd_mod_CFLAGS): Likewise.
7135 (_bsd_mod_LDFLAGS): Likewise.
7136 (bsd_mod_SOURCES): New variable.
7137 (bsd_mod_CFLAGS): Likewise.
7138 (bsd_mod_LDFLAGS): Likewise.
7139
7140 * include/grub/aout.h: New file.
7141
7142 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7143
7144 * include/grub/i386/bsd.h: New file.
7145
7146 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7147 to make it public.
7148
7149 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7150 function is called, so that it's possible to change it inside the hook.
7151 (grub_elf64_load): Likewise.
7152 (grub_elf_file): Don't close the file if elf header is not found.
7153 (grub_elf_close): Close the file if grub_elf_file fails (The new
7154 grub_elf_file won't close it).
7155 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7156 (grub_elf64_size): Likewise.
7157
7158 * kern/i386/loader.S (grub_unix_real_boot): New function.
7159
7160 * loader/aout.c: New file.
7161
7162 * loader/i386/bsd.c: New file.
7163
7164 * loader/i386/bsd_normal.c: New file.
7165
7166 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7167
7168 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 7169 can test other formats.
d38e24c2 7170
b93bdb0f 71712008-02-19 Robert Millan <rmh@aybabtu.com>
7172
7173 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7174 (grub_gpt_partition_type_empty): Redefine with macro from
7175 `<grub/gpt_partition.h>'.
7176 (gpt_partition_map_iterate): Adjust partition type comparison.
7177
7178 Export `entry' as partmap-specific `part.data' struct.
7179 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7180
7181 * include/grub/gpt_partition.h (grub_gpt_header)
7182 (grub_gpt_partentry): ... to here (new file).
7183
7184 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7185
7186 (grub_gpt_partition_type_bios_boot): New const variable, defined
7187 with macro from `<grub/gpt_partition.h>'.
7188
7189 (setup): Replace `first_start' with `embed_region', which keeps
7190 track of the embed region (and is partmap-agnostic).
7191
7192 Replace find_first_partition_start() with find_usable_region(),
7193 which finds a usable region for embedding using partmap-specific
7194 knowledge (supports PC/MSDOS and GPT).
7195
7196 Fix all assumptions that the embed region start at sector 1, using
7197 `embed_region.start' from now on. Similarly, use `embed_region.end'
7198 rather than `first_start' to calculate available size.
7199
7200 In grub_util_info() message, replace "into after the MBR" with an
7201 indication of the specific sector our embed region starts at.
7202
66cb40f6 72032008-02-19 Robert Millan <rmh@aybabtu.com>
7204
7205 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7206 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7207 `commands/reboot.c'.
7208 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7209 (halt_mod_SOURCES): Likewise.
7210 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7211 (halt_mod_SOURCES): Likewise.
7212
b7202015 72132008-02-17 Christian Franke <franke@computer.org>
7214
7215 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7216
32b0fc49 72172008-02-17 Robert Millan <rmh@aybabtu.com>
7218
7219 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7220 set `first_start' to 0 for non-PC/MSDOS partition maps.
7221
aca63502 72222008-02-16 Robert Millan <rmh@aybabtu.com>
7223
7224 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7225 do not assume partition map is PC/MSDOS before performing checks that
7226 are specific to that layout.
7227
0de8be86 72282008-02-13 Robert Millan <rmh@aybabtu.com>
7229
7230 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7231 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7232 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7233
c3db8364 72342008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7235
7236 * configure.ac: Only a cosmetic change on the handling of
7237 -fno-stack-protector.
7238
f714229e 72392008-02-12 Alexandre Boeglin <alex@boeglin.org>
7240
c3db8364 7241 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7242 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7243 reboot.c.
f714229e 7244 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7245 (halt_mod_SOURCES): New variable.
7246 (halt_mod_CFLAGS): Likewise.
7247 (halt_mod_LDFLAGS): Likewise.
7248 (reboot_mod_SOURCES): Likewise.
7249 (reboot_mod_CFLAGS): Likewise.
7250 (reboot_mod_LDFLAGS): Likewise.
7251
c3db8364 7252 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7253 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7254 reboot.c.
f714229e 7255 (halt_mod_SOURCES): Likewise.
7256 (reboot_mod_SOURCES): Likewise.
7257
c3db8364 7258 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7259 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 7260 (reboot_mod_SOURCES): Likewise.
7261
7262 * commands/i386/pc/reboot.c: merge this file ...
7263
7264 * commands/ieee1275/reboot.c: ... and this file ...
7265
7266 * commands/reboot.c: ... to this file.
c3db8364 7267 Add some precompiler directive to include the correct header for
7268 each machine.
f714229e 7269
7270 * commands/ieee1275/halt.c: move this file ...
7271
7272 * commands/halt.c: ... to here.
c3db8364 7273 Add some precompiler directive to include the correct header for
7274 each machine.
f714229e 7275
7276 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7277 (grub_halt): Likewise.
7278
7279 * kern/efi/efi.c (grub_reboot): New function.
7280 (grub_halt): Likewise.
7281
c74493e0 72822008-02-12 Robert Millan <rmh@aybabtu.com>
7283
7284 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7285 /dev (like it is done for /dev/mapper). This doesn't provide support
7286 for EVMS, but at least it is now easy to identify the problem when it
7287 arises.
7288
d0db4b04 72892008-02-11 Robert Millan <rmh@aybabtu.com>
7290
7291 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7292 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7293 comparing it with -1, not 0.
7294
bf748642 72952008-02-10 Robert Millan <rmh@aybabtu.com>
7296
7297 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7298 `disk/lvm.c'.
7299 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7300 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7301
7302 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7303 `disk/lvm.c' to the end of the list.
7304 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7305 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7306
b5db202a 73072008-02-10 Robert Millan <rmh@aybabtu.com>
7308
7309 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7310 grub_print_error() instead. This will let user know why we're entering
7311 rescue mode.
7312 Based on suggestions from Sam Morris.
7313
83abee31 73142008-02-10 Alexandre Boeglin <alex@boeglin.org>
7315
7316 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7317 on remaining N args, instead of "--" arg N times.
7318
78d5a08b 73192008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7320
7321 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7322 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7323 pattern for unknown glyphs.
7324
68807e5f 73252008-02-09 Robert Millan <rmh@aybabtu.com>
7326
7327 * configure.ac: Probe for `help2man'.
7328 * Makefile.in (builddir): New variable.
7329 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7330 or otherwise add a few flags/options to it.
7331 (install-local): For every executable utility or script that is
7332 installed, invoke $(HELP2MAN) to install a manpage based on --help
7333 output.
7334
7335 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7336 that it doesn't prevent --help from working in build tree.
7337
7338 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7339 with `bug-grub@gnu.org'.
7340 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7341 * util/update-grub.in (usage): New function.
7342 Implement proper argument check, with support for --help and --version
7343 (as well as existing -y).
7344
73452008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 7346
7347 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7348 avoid overwriting previous output.
7349 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7350
c1962162 73512008-02-09 Robert Millan <rmh@aybabtu.com>
7352
7353 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7354 drawing the menu.
7355
3dac2e3f 73562008-02-09 Robert Millan <rmh@aybabtu.com>
7357
7358 * commands/sleep.c: New file.
7359 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7360 (sleep_mod_SOURCES): New variable.
7361 (sleep_mod_CFLAGS): Likewise.
7362 (sleep_mod_LDFLAGS): Likewise.
7363
7a634e08 73642008-02-09 Robert Millan <rmh@aybabtu.com>
7365
7366 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7367 situations in which we can deduce the RAID size and the superblock
7368 doesn't match it.
7369
b92f0c18 73702008-02-09 Robert Millan <rmh@aybabtu.com>
7371
7372 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7373 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7374 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7375
7376 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7377 and return a grub_diskmemberlist_t composed of physical array members.
7378 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7379
7380 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7381 prototype.
7382 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7383 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7384 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7385
7386 * util/grub-probe.c (probe): Move partmap probing code from here ...
7387 (probe_partmap): ... to here.
7388 (probe): Use probe_partmap() once for the disk we're probing, and
7389 additionally, when such disk contains a memberlist() struct member,
7390 once for each disk that is contained in the structure returned by
7391 memberlist().
7392
91a4bf68 73932008-02-09 Robert Millan <rmh@aybabtu.com>
7394
7395 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7396 environment variable to 'all' in order to obtain debug output from
7397 non-util/ code.
7398 * util/i386/pc/grub-setup.c (main): Likewise.
7399
a96f9caa 74002008-02-08 Robert Millan <rmh@aybabtu.com>
7401
7402 * disk/raid.c (grub_raid_scan_device): Check for
7403 `array->device[sb.this_disk.number]' rather than for
7404 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 7405 guaranteed to be accessible.
a96f9caa 7406
b37a9222 74072008-02-08 Robert Millan <rmh@aybabtu.com>
7408
7409 * disk/raid.c: Update copyright.
7410 * fs/cpio.c: Likewise.
7411 * include/grub/raid.h: Likewise.
7412 * loader/i386/pc/multiboot.c: Likewise.
7413 * util/hostfs.c: Likewise.
7414
5626aee1 74152008-02-08 Robert Millan <rmh@aybabtu.com>
7416
7417 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7418 to a grub_disk_t array.
7419 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7420 `device[x]'.
7421 (grub_raid_scan_device): Replace `device[x].name' accesses with
7422 `device[x]->name'. Simplify initialization of `array->device[x]'.
7423
554f0187 74242008-02-08 Robert Millan <rmh@aybabtu.com>
7425
7426 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7427 grub_dprintf() calls.
7428 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7429 error message.
7430
1ec8425d 74312008-02-07 Christian Franke <franke@computer.org>
7432
7433 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7434 instead of fseek and ftell to support large files.
7435 (grub_hostfs_read): Likewise.
7436
f2156fda 74372008-02-07 Robert Millan <rmh@aybabtu.com>
7438
7439 Patch from Jeroen Dekkers.
7440 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 7441 failure, since successfully reading all array members might not be
f2156fda 7442 required.
7443
9216e0e7 74442008-02-06 Robert Millan <rmh@aybabtu.com>
7445
7446 * util/grub-probe.c (probe): Simplify partmap probing (with the
7447 assumption that the first word up to the underscore equals to
7448 the module name).
7449
b0dfd29a 74502008-02-06 Christian Franke <franke@computer.org>
7451
7452 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7453 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7454 last block of a cpio or tar stream.
7455 Check for "TRAILER!!!" instead of any empty data
7456 block to detect last block of a cpio stream.
7457 (grub_cpio_dir): Fix constness of variable np.
7458 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7459 cpio or tar trailer is detected. This fixes a crash
7460 on open of a non existing file.
7461
c32865bf 74622008-02-05 Bean <bean123ch@gmail.com>
7463
7464 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7465 address of entry.
7466 (grub_multiboot_load_elf64): Likewise.
7467 (grub_multiboot): Initialize mbi structure.
7468
7469 * util/grub-fstest.c: Don't include unused header file script.h.
7470
fe6b695a 7471 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 7472 of file.
7473 (grub_fstest_SOURCES): Likewise.
7474
409480b7 74752008-02-05 Robert Millan <rmh@aybabtu.com>
7476
7477 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7478 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7479 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7480 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7481
7482 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7483 (translation_table): Replace hardcoded values with macros
7484 provided by `<grub/term.h>'.
7485
7486 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7487 (keyboard_map): Correct/add a few values, with macros provided
7488 by `<grub/term.h>'.
7489 (keyboard_map_shift): Zero values that don't differ from their
7490 `keyboard_map' equivalents.
7491 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7492 Discard the second scan code that is always sent by Caps lock.
7493 Only use `keyboard_map_shift' when it provides a non-zero value,
7494 otherwise fallback to `keyboard_map'.
7495
99fadbaa 74962008-02-04 Bean <bean123ch@gmail.com>
7497
7498 * Makefile.in (enable_grub_fstest): New variable.
7499
7500 * conf/common.rmk (grub_fstest_init.lst): New rule.
7501 (grub_fstest_init.h): Likewise.
7502 (grub_fstest_init.c): Likewise.
7503 (util/grub-fstest.c_DEPENDENCIES): New variable.
7504 (grub_fstest_SOURCES): Likewise.
7505
7506 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7507
7508 * util/grub-fstest.c: New file.
7509
bf567c50 75102008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7511
7512 Make grub-setup handle a separate root device.
f19dbdb7 7513
bf567c50 7514 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7515 so that the root device can be compared with the destination
7516 device.
7517 When embedding the core image, if the root and destination devices
7518 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7519 0xFF.
7520 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 7521
9be6b98b 75222008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7523
7524 Add support for having a grub directory in a different drive. This
7525 is still only the data handling part.
f19dbdb7 7526
9be6b98b 7527 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7528 (codestart): Save %dh in GRUB_ROOT_DRIVE.
7529 (grub_root_drive): New variable.
7530
7531 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7532 instead of GRUB_BOOT_DRIVE to construct a device name. Set
7533 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7534 as it was.
7535
7536 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7537
7538 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7539 macro.
7540 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7541
7542 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7543 is bogus, because PXE booting does not specify any drive
7544 correctly.
7545
7546 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7547 am not sure if this is really correct.
7548
7549 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7550 is always identical to the boot drive when booting from a CD.
7551
7552 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7553 longer.
7554 (root_drive): New variable.
7555 (real_start): Unconditionally set %dh to ROOT_DRIVE.
7556 (setup_sectors): Push %dx right after popping it, because %dh will
7557 be modified later.
7558 (copy_buffer): Restore %dx.
7559
e0ca0677 75602008-02-03 Robert Millan <rmh@aybabtu.com>
7561
7562 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7563 use `cdboot.img' for cdrom images.
7564
3b3f6629 75652008-02-03 Robert Millan <rmh@aybabtu.com>
7566
7567 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7568 only setup gfxterm when `font' command has succeeded.
7569
d42b3672 75702008-02-03 Robert Millan <rmh@aybabtu.com>
7571
7572 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7573 (grub_rescue_cmd_multiboot_loader)
7574 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7575
fa370ea6 75762008-02-03 Pavel Roskin <proski@gnu.org>
7577
e0c5dacb 7578 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 7579 %edx and %esi from stack only after grub_gate_a20() is called.
7580 grub_gate_a20() clobbers %edx.
7581
f2a76e1d 75822008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7583
7584 * configure.ac (AC_INIT): Bumped to 1.96.
7585
7586 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7587 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7588 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7589 video/readers/png.c.
7590
90fd32d1 75912008-02-03 Bean <bean123ch@gmail.com>
9be665dd 7592
7593 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7594 (cdboot_img_SOURCES): New variable.
7595 (cdboot_img_ASFLAGS): New variable.
7596 (cdboot_img_LDFLAGS): New variable.
7597
7598 * boot/i386/pc/cdboot.S: New file.
7599
7600 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7601 (cd_count): Likewise.
7602 (grub_biosdisk_get_drive): Add support for cd device.
7603 (grub_biosdisk_call_hook): Likewise.
7604 (grub_biosdisk_iterate): Likewise.
7605 (grub_biosdisk_open): Likewise.
7606 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7607 (grub_biosdisk_rw): Support reading from cd device.
7608 (GRUB_MOD_INIT): Iterate cd devices.
7609
7610 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7611 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7612 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7613
7614 * kern/i386/pc/init.c (make_install_device): Check for cd device.
7615
4020aa53 76162008-02-02 Robert Millan <rmh@aybabtu.com>
7617
7618 * commands/read.c: New file.
7619 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7620 (read_mod_SOURCES): New variable.
7621 (read_mod_CFLAGS): Likewise.
7622 (read_mod_LDFLAGS): Likewise.
7623
e03a1132 76242008-02-02 Robert Millan <rmh@aybabtu.com>
7625
7626 * normal/main.c (grub_normal_execute): Check for `menu->size' when
7627 determining whether menu has to be displayed.
7628
58c69220 76292008-02-02 Marco Gerards <marco@gnu.org>
7630
7631 * bus/pci.c: New file.
7632
7633 * include/grub/pci.h: Likewise.
7634
7635 * include/grub/i386/pc/pci.h: Likewise.
7636
7637 * commands/lspci.c: Likewise.
7638
7639 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7640 `lspci.mod'.
7641 (pci_mod_SOURCES): New variable.
7642 (pci_mod_CFLAGS): Likewise.
7643 (pci_mod_LDFLAGS): Likewise.
7644 (lspci_mod_SOURCES): Likewise.
7645 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 7646 (lspci_mod_LDFLAGS): Likewise.
58c69220 7647
c004e1b4 76482008-02-02 Bean <bean123ch@gmail.com>
7649
7650 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7651 (grub_ufs_get_file_block): Fix indirect block calculation problem.
7652
7653 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7654 (grub_xfs_btree_node): New structure.
7655 (grub_xfs_btree_root): New structure.
7656 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7657 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7658 (GRUB_XFS_EXTENT_BLOCK): Likewise.
7659 (GRUB_XFS_EXTENT_SIZE): Likewise.
7660 (grub_xfs_read_block): Support btree format type.
7661 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7662 Use directory block as basic unit.
7663
7664 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7665
7666 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7667 __attribute__ ((__regparm__ (1))).
7668
f95562bf 76692008-02-01 Robert Millan <rmh@aybabtu.com>
7670
7671 Correct a mistake in previous commit.
7672
7673 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7674 top.
7675 (normal/command.c_DEPENDENCIES): New variable.
7676
7d31f41f 76772008-02-01 Robert Millan <rmh@aybabtu.com>
7678
7679 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7680 top.
7681 (normal/command.c_DEPENDENCIES): New variable.
7682 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7683 * conf/i386-ieee1275.rmk: Likewise.
7684 * conf/i386-linuxbios.rmk: Likewise.
7685 * conf/i386-pc.rmk: Likewise.
7686 * conf/sparc64-ieee1275.rmk: Likewise.
7687 * conf/powerpc-ieee1275.rmk: Likewise.
7688 (grub_emu_SOURCES): Add `fs/fshelp.c'.
7689
7690 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7691
60b6be74 76922008-02-01 Robert Millan <rmh@aybabtu.com>
7693
7694 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7695 call at beginning of function.
7696
078522ab 76972008-01-31 Pavel Roskin <proski@gnu.org>
7698
7699 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 7700 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7701 (grub_mkrescue_SOURCES): Likewise.
078522ab 7702 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7703
ccaa8a5f 77042008-01-30 Robert Millan <rmh@aybabtu.com>
7705
7706 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7707 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7708 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7709 (grub_probe_SOURCES): ... to here.
7710
7711 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7712 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7713 * conf/i386-ieee1275.rmk: Likewise.
7714 * conf/i386-linuxbios.rmk: Likewise.
7715 * conf/powerpc-ieee1275.rmk: Likewise.
7716
ae5a9cd7 77172008-01-30 Tristan Gingold <gingold@free.fr>
7718
7719 * kern/rescue.c: Silently accept empty lines.
7720
70bc2ef2 77212008-01-29 Bean <bean123ch@gmail.com>
7722
7723 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7724 (real_code_2): Code cleanup and change comment style.
7725 (move_memory): Avoid using 32-bit address mode.
7726
6a4d50ea 77272008-01-29 Bean <bean123ch@gmail.com>
7728
7729 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7730 (png_mod_SOURCES): New variable.
7731 (png_mod_CFLAGS): Likewise.
7732 (png_mod_LDFLAGS): Likewise.
7733
7734 * video/readers/png.c: New file.
7735
11cc30ac 77362008-01-28 Robert Millan <rmh@aybabtu.com>
7737
7738 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7739 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7740 `ifndef GRUB_MOD_GAP' hack.
7741 * util/elf/grub-mkimage.c (add_segments): Likewise.
7742
3abc589f 77432008-01-27 Robert Millan <rmh@aybabtu.com>
7744
7745 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7746 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 7747 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 7748
e1907778 77492008-01-27 Robert Millan <rmh@aybabtu.com>
7750
7751 Get grub-emu to build again (including parallel builds).
7752
7753 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7754 Split into ...
7755 (util/grub-emu.c_DEPENDENCIES): ... this, ...
7756 (normal/execute.c_DEPENDENCIES): ... this, ...
7757 (grub-emu_DEPENDENCIES): ... and this.
7758
7759 * conf/i386-efi.rmk: Likewise.
7760 * conf/i386-linuxbios.rmk: Likewise.
7761 * conf/i386-ieee1275.rmk: Likewise.
7762 * conf/powerpc-ieee1275.rmk: Likewise.
7763 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7764
2216b101 77652008-01-27 Robert Millan <rmh@aybabtu.com>
7766
7767 * NEWS: Add a few items.
7768
f75172d9 77692008-01-27 Robert Millan <rmh@aybabtu.com>
7770
7771 Fix parallel builds with grub-emu. Based on earlier commit for
7772 grub-probe and grub-setup.
7773
7774 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7775 (util/grub-emu.c_DEPENDENCIES): ... this.
7776 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7777 (util/grub-emu.c_DEPENDENCIES): ... this.
7778 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7779 (util/grub-emu.c_DEPENDENCIES): ... this.
7780 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7781 (util/grub-emu.c_DEPENDENCIES): ... this.
7782 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7783 (util/grub-emu.c_DEPENDENCIES): ... this.
7784
3f51de77 77852008-01-27 Pavel Roskin <proski@gnu.org>
7786
7787 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7788 to create a gap between _end and the modules added to the image
7789 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
7790 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7791 * util/elf/grub-mkimage.c (add_segments): Likewise.
7792
2033f53e 77932008-01-26 Pavel Roskin <proski@gnu.org>
7794
7795 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7796 just return an error.
7797
22da1f6f 77982008-01-26 Bean <bean123ch@gmail.com>
7799
7800 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7801 (grub_reiserfs_get_item): Save offset of the next item.
7802 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7803
2a9525e6 78042008-01-25 Robert Millan <rmh@aybabtu.com>
7805
7806 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7807 make all filesystem sources appear together (possibly fixing omissions
7808 while at it).
7809 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7810 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7811 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7812 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7813
7814 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
7815 add `kern/file.c'.
7816 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7817 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7818 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7819 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7820
7821 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7822 (probe): Add a sanity check to make sure of our ability to read
7823 requested files when probing for filesystem type.
7824
7825 * genmk.rb: Update copyright year (2007).
7826
7827 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7828 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7829 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7830 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7831 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7832 : Remove function prototypes.
7833
b95f71b5 78342008-01-25 Robert Millan <rmh@aybabtu.com>
7835
7836 Revert my previous commits (based on wrong assumption of how grub_errno
7837 works).
7838
fe6b695a 7839 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 7840 * kern/file.c (grub_file_open): Likewise.
7841
d08bbb49 78422008-01-24 Pavel Roskin <proski@gnu.org>
7843
7844 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7845 that hang if GRUB tries to setup colors.
7846 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7847 colors for firmwares that don't support it.
7848 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7849 Recognize Open Hack'Ware, set flags to work around its
7850 limitations.
7851
605e36ed 78522008-01-24 Robert Millan <rmh@aybabtu.com>
7853
7854 * kern/file.c (grub_file_open): Do not account previous failures of
7855 unrelated functions when grub_errno is checked for.
7856 Reported by Oleg Strikov.
7857
bac332a1 78582008-01-24 Bean <bean123ch@gmail.com>
7859
7860 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7861 (grub_ufs_sblock): New member volume name.
7862 (grub_ufs_find_file): Fix string copy bug.
7863 (grub_ufs_label): Implement this function properly.
7864
7865 * fs/hfs.c (grub_hfs_cnid_type): New enum.
7866 (grub_hfs_iterate_records): Use the correct file number for extents
7867 and catalog file. Fix problem in next index calculation.
7868 (grub_hfs_find_node): Replace recursive function call with loop.
7869 (grub_hfs_iterate_dir): Replace recursive function call with loop.
7870
15c80c09 78712008-01-23 Robert Millan <rmh@aybabtu.com>
7872
7873 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7874 `<grub/symbol.h>' and `<grub/multiboot.h>'.
7875 (grub_multiboot2_real_boot): New function prototype.
7876
7877 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7878 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7879
7880 * kern/i386/ieee1275/init.c (grub_os_area_addr)
7881 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7882
305338fd 78832008-01-23 Robert Millan <rmh@aybabtu.com>
7884
7885 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7886 #ifdef'ed out grub_printf().
7887
3ea52685 78882008-01-23 Robert Millan <rmh@aybabtu.com>
7889
7890 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7891 grub_dprintf calls, since they make "debug=all" mode unusable.
7892 (grub_console_checkkey): Likewise.
7893
5882ae4b 78942008-01-23 Robert Millan <rmh@aybabtu.com>
7895
7896 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7897 `term/i386/pc/at_keyboard.c'.
7898 (pkglib_MODULES): Add `serial.mod'.
7899 (serial_mod_SOURCES): New variable.
7900 (serial_mod_CFLAGS): Likewise.
7901 (serial_mod_LDFLAGS): Likewise.
7902
7903 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
7904 `<grub/powerpc/ieee1275/console.h>'.
7905 (grub_keyboard_controller_init): New function prototype.
7906 (grub_console_checkkey): Likewise.
7907 (grub_console_getkey): Likewise.
7908
7909 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7910 keyboard on i386.
7911
7912 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7913 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7914
06ab5303 79152008-01-23 Robert Millan <rmh@aybabtu.com>
7916
7917 * kern/i386/pc/init.c (make_install_device): When memdisk image is
7918 present, "(memdisk)/boot/grub" becomes the default prefix.
7919
7920 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7921 a memdisk tarball with all the modules. Add --overlay=DIR option that
7922 allows users to overlay additional files into the image.
7923
dbb475a4 79242008-01-23 Robert Millan <rmh@aybabtu.com>
7925
7926 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7927 and `machine/memory.h'.
7928 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7929 (_multiboot_mod_SOURCES): New variable.
7930 (_multiboot_mod_CFLAGS): Likewise.
7931 (_multiboot_mod_LDFLAGS): Likewise.
7932 (multiboot_mod_SOURCES): Likewise.
7933 (multiboot_mod_CFLAGS): Likewise.
7934 (multiboot_mod_LDFLAGS): Likewise.
7935
7936 * include/grub/i386/ieee1275/loader.h: New file.
7937
7938 * include/grub/i386/ieee1275/machine.h: Likewise.
7939
7940 * include/grub/i386/ieee1275/memory.h: Likewise.
7941
7942 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7943 variable declaration.
7944 (grub_os_area_size): Likewise.
7945
7946 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7947 (grub_lower_mem, grub_upper_mem): New variables.
7948 (grub_stop_floppy): New function (just to make
7949 grub_multiboot2_real_boot() happy).
7950
7951 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7952 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7953 (grub_stop): New function.
7954 Include `"../realmode.S"' and `"../loader.S"'.
7955
7956 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7957 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7958
7959 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7960 rely on grub_multiboot2_real_boot() for final boot.
7961
25638629 79622008-01-22 Robert Millan <rmh@aybabtu.com>
7963
7964 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7965 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7966 device that doesn't look like an SD card.
7967 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7968 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7969 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7970 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7971 found.
7972
9dad816d 79732008-01-22 Robert Millan <rmh@aybabtu.com>
7974
7975 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7976 avoid claiming over our own code.
7977
34842f2d 79782008-01-22 Bean <bean123ch@gmail.com>
7979
7980 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7981 (jpeg_mod_SOURCES): New variable.
7982 (jpeg_mod_CFLAGS): Likewise.
7983 (jpeg_mod_LDFLAGS): Likewise.
7984
7985 * video/readers/jpeg.c : New file.
7986
44023a28 79872008-01-22 Bean <bean123ch@gmail.com>
7988
7989 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7990 there are no more items.
7991
bc2d8ac6 79922008-01-21 Robert Millan <rmh@aybabtu.com>
7993
7994 * kern/mm.c (grub_mm_init_region): Improve debug message.
7995
261bd4bc 79962008-01-21 Robert Millan <rmh@aybabtu.com>
7997
7998 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7999 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8000 address.
8001 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8002 a C macro.
8003 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8004 Indicates start of upper memory.
8005 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8006 (generate_image): Abort when image size is big enough to corrupt
8007 upper memory.
8008
8009 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8010 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8011 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8012 instead of hardcoding 0xA0000.
8013 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8014 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8015 instead of hardcoding 0xA0000.
8016
f970b55e 80172008-01-21 Robert Millan <rmh@aybabtu.com>
8018
8019 * disk/memdisk.c (memdisk_size): New variable.
8020 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8021 `memdisk_size'.
8022 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8023 image to dynamic memory.
8024 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8025 `memdisk_size'. Free memdisk block.
8026
1a8b0526 80272008-01-21 Robert Millan <rmh@aybabtu.com>
8028
8029 Fix detection of very small filesystems (like tar).
8030
8031 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8032 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8033 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8034 a problem with this disk).
8035
6e9b4aab 80362008-01-21 Robert Millan <rmh@aybabtu.com>
8037
8038 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8039 on grub_biosdisk_rw_standard() error.
8040
0d8837b2 80412008-01-21 Robert Millan <rmh@aybabtu.com>
8042
8043 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8044 recent changes.
8045 * kern/elf.c: Likewise.
8046 * kern/ieee1275/ieee1275.c: Likewise.
8047 * kern/powerpc/ieee1275/openfw.c: Likewise.
8048 * term/ieee1275/ofconsole.c: Likewise.
8049
ffd36e34 80502008-01-21 Robert Millan <rmh@aybabtu.com>
8051
8052 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8053
3f0093d0 8054 * include/grub/kernel.h (grub_arch_memdisk_addr)
8055 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 8056
3f0093d0 8057 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8058 (grub_arch_memdisk_size): ... to here.
ffd36e34 8059
6c391b21 80602008-01-21 Robert Millan <rmh@aybabtu.com>
8061
8062 Mostly based on bugfix from Bean.
8063
8064 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8065 attribute with hook() parameter.
8066 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8067 declaration.
8068 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8069 attribute with hook() parameter.
8070 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8071 declaration.
8072
55a581dc 80732008-01-21 Robert Millan <rmh@aybabtu.com>
8074
8075 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8076 (pkglib_MODULES): Add `memdisk.mod'.
8077 (memdisk_mod_SOURCES): New variable.
8078 (memdisk_mod_CFLAGS): Likewise.
8079 (memdisk_mod_LDFLAGS): Likewise.
8080
8081 * disk/memdisk.c: New file.
8082
8083 * include/grub/disk.h (grub_disk_dev_id): Add
8084 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8085
8086 * include/grub/i386/pc/kernel.h
8087 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8088 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8089 (grub_kernel_image_size): New variable declaration.
8090 (grub_total_module_size): Likewise.
8091 (grub_memdisk_image_size): Likewise.
8092
8093 * include/grub/i386/pc/memory.h
8094 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8095
8096 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8097 (grub_arch_memdisk_addr): New variable declaration.
8098 (grub_arch_memdisk_size): Likewise.
8099
8100 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8101 (grub_arch_memdisk_size): Likewise.
8102
8103 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8104 (codestart): Replace hardcoded `0x100000' with
8105 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8106
8107 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8108 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8109 not NULL, append the contents of the file it refers to, at the end of
8110 the compressed kernel image. Initialize `grub_memdisk_image_size'
8111 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8112 (options): Add "memdisk"|'m' option.
8113 (main): Parse --memdisk|-m option, and pass user-provided path as
8114 parameter to generate_image().
8115
3d7f54c9 81162008-01-20 Robert Millan <rmh@aybabtu.com>
8117
8118 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8119 grub_dprintf() calls from here ...
8120 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8121
0bf74728 81222008-01-20 Robert Millan <rmh@aybabtu.com>
8123
8124 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8125
8126 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8127 declaration.
8128 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8129 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8130 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 8131 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 8132 property).
8133 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8134 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8135
33bf70a7 81362008-01-19 Robert Millan <rmh@aybabtu.com>
8137
fe6b695a 8138 Get rid of confusing function (superseded by
33bf70a7 8139 `grub_ieee1275_get_integer_property')
8140 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8141 prototype.
8142 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8143 function.
8144 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8145 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 8146 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 8147
e2da7d26 81482008-01-19 Robert Millan <rmh@aybabtu.com>
8149
8150 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8151 command after "shut-down", since implementations differ on which
8152 the command for halt is.
8153
59f1fd8d 81542008-01-19 Robert Millan <rmh@aybabtu.com>
8155
8156 * include/grub/i386/linuxbios/console.h: Add header protection.
8157 (grub_keyboard_controller_init): New function prototype.
8158 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8159 (KEYBOARD_COMMAND_READ): Likewise.
8160 (KEYBOARD_COMMAND_WRITE): Likewise.
8161 (KEYBOARD_SCANCODE_SET1): Likewise.
8162 (grub_keyboard_controller_write): New function.
8163 (grub_keyboard_controller_read): Likewise.
8164 (grub_keyboard_controller_init): Likewise.
8165
8166 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8167 (grub_console_init): On coreboot/LinuxBIOS, call
8168 grub_keyboard_controller_init().
8169
5f5a7c15 81702008-01-19 Robert Millan <rmh@aybabtu.com>
8171
8172 PowerPC changes provided by Pavel Roskin.
8173
8174 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8175 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8176 don't rely on cmain() doing it.
8177 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8178 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8179
1210e168 81802008-01-16 Robert Millan <rmh@aybabtu.com>
8181
8182 * include/grub/i386/linuxbios/memory.h
8183 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8184 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8185 receive `table_header' as argument. Instead, probe for it in the
8186 known memory ranges where it can be present.
8187 (grub_available_iterate): Do not pass a fixed `table_header' address
8188 to grub_linuxbios_table_iterate().
8189
3d04eab8 81902008-01-15 Robert Millan <rmh@aybabtu.com>
8191
8192 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8193 * conf/i386-ieee1275.rmk: New file.
8194 * include/grub/i386/ieee1275/console.h: Likewise.
8195 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8196 * include/grub/i386/ieee1275/kernel.h: Likewise.
8197 * include/grub/i386/ieee1275/time.h: Likewise.
8198 * kern/i386/ieee1275/init.c: Likewise.
8199 * kern/i386/ieee1275/startup.S: Likewise.
8200
d1bc1b73 82012008-01-15 Robert Millan <rmh@aybabtu.com>
8202
8203 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8204 when pointers are 32-bit (but still do set it to one when they are
8205 64-bit).
8206
66a65807 82072008-01-15 Robert Millan <rmh@aybabtu.com>
8208
8209 * include/grub/ieee1275/ieee1275.h
8210 (grub_ieee1275_get_integer_property): New function prototype.
8211
8212 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8213 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 8214 grub_ieee1275_get_property() to handle endianness.
66a65807 8215
8216 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8217 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 8218 where appropriate.
66a65807 8219 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8220 (grub_map): Likewise.
8221 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8222
a83ccafd 82232008-01-15 Bean <bean123ch@gmail.com>
8224
8225 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8226 (grub_script_execute_cmdline): Reset grub_errno.
8227
8228 * normal/main.c (read_config_file): Reset grub_errno.
8229
8230 * normal/parse.y (script_init): New.
8231 (script): Move function and menuentry here.
8232 (delimiter): New.
8233 (command): Add delimiter at the end of command.
8234 (commands): Adjust to match the new command.
8235 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 8236 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 8237 (if): Use the new commands.
8238
8239 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8240
df6ecfc6 82412008-01-15 Robert Millan <rmh@aybabtu.com>
8242
8243 * normal/menu.c (run_menu): Move timeout message from here ...
8244 (print_timeout): ... to here.
8245 (run_menu): Use print_timeout() once during initial draw to print
8246 the whole message, and again in every clock tick to update only
8247 the number of seconds.
8248
87ae25eb 82492008-01-15 Robert Millan <rmh@aybabtu.com>
8250
8251 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8252 actual size of `available' from grub_ieee1275_get_property(), and
8253 restrict parsing to that bound.
8254
47bf09a4 82552008-01-15 Christian Franke <franke@computer.org>
8256
8257 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8258 (argp_program_version): Remove variable.
8259 (argp_program_bug_address): Likewise.
8260 (options): Convert from struct argp_option to struct option.
8261 (struct arguments): Remove.
8262 (parse_opt): Remove.
8263 (usage): New function.
8264 (main): Replace struct args members by simple variables.
8265 Replace argp_parse() by getopt_long().
8266 Add switch to evaluate options.
8267 Add missing "(...)" around root_dev in prefix string.
8268
c86f1469 82692008-01-14 Robert Millan <rmh@aybabtu.com>
8270
8271 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8272 for grub_ieee1275_exit(), in order to improve portability.
8273
e622c559 82742008-01-14 Robert Millan <rmh@aybabtu.com>
8275
8276 * util/grub.d/10_linux.in (prefix): Define.
8277 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8278
44cb1ec8 82792008-01-13 Pavel Roskin <proski@gnu.org>
8280
8281 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8282 grub_errno if no errors have been detected.
8283
1eb8c802 82842008-01-12 Robert Millan <rmh@aybabtu.com>
8285
8286 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8287 (grub_util_get_dev_abstraction): New function prototype.
8288
8289 * util/getroot.c: Include `<grub/util/getroot.h>'
8290 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8291 (grub_util_get_dev_abstraction): ... here (new function).
8292
8293 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8294 `PRINT_ABSTRACTION'.
8295 (probe): Probe for abstraction type when requested.
8296 (main): Understand `--target=abstraction'.
8297
8298 * util/i386/efi/grub-install.in: Add abstraction module to core
8299 image when it is found to be necessary.
8300 * util/i386/pc/grub-install.in: Likewise.
8301 * util/powerpc/ieee1275/grub-install.in: Likewise.
8302
8303 * util/update-grub_lib.in (font_path): Return system path without
8304 converting to GRUB path.
8305 * util/update-grub.in: Convert system path returned by font_path()
8306 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8307 abstraction module is needed for loading fonts (if any). Export
8308 that as `GRUB_PRELOAD_MODULES'.
8309 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8310 insmod commands).
8311
52bd3de9 83122008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8313
8314 Remove some unused code from reiserfs.
f19dbdb7 8315
52bd3de9 8316 * fs/reiserfs.c (struct grub_reiserfs_key)
8317 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8318 (struct grub_reiserfs_node_body): Removed.
8319 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8320 Likewise.
8321 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8322 Likewise.
8323 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8324 Likewise.
8325 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8326 Likewise.
8327 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8328 Likewise.
8329 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8330 Likewise.
8331 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8332 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8333 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8334
2f80039d 83352008-01-10 Robert Millan <rmh@aybabtu.com>
8336
8337 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8338 Determines if a file is garbage left by packaging systems, etc.
8339 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8340 for processing /etc/grub.d scripts.
8341 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8342 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8343 as a condition for processing Linux images.
8344
87888032 83452008-01-10 Pavel Roskin <proski@gnu.org>
8346
8347 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8348 to compile reiserfs.c on PowerPC.
8349
7e54fced 83502008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 8351
8352 * kern/device.c (grub_device_iterate): Do not abort device iteration
8353 when one of the devices cannot be opened.
8354 * kern/disk.c (grub_disk_open): Do not account previous failures of
8355 unrelated functions when grub_errno is checked for.
8356
5aa541e6 83572008-01-08 Robert Millan <rmh@aybabtu.com>
8358
8359 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8360 `! grub_linux_is_bzimage', change order of address comparison to make
8361 it more intuitive, and improve "too big zImage" error message.
8362
7076340d 83632008-01-08 Robert Millan <rmh@aybabtu.com>
8364
8365 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8366 `$(update-grub_DATA)'.
8367 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8368 targets.
8369
9ca70333 83702008-01-07 Robert Millan <rmh@aybabtu.com>
8371
8372 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8373 which instruction is modified by grub-setup during installation
8374 (since it wasn't obvious by only looking at this file).
8375
38ccf575 83762008-01-07 Robert Millan <rmh@aybabtu.com>
8377
8378 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8379 listing actual TODO items.
8380
f5db4291 83812008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8382
868967cf 8383 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8384 correctly.
8385 (grub_reiserfs_get_key_offset): Likewise.
8386 (grub_reiserfs_set_key_offset): Likewise.
8387 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 8388 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 8389
8390 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8391 better to remove the bitfield version completely.
f19dbdb7 8392
868967cf 83932008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 8394
f5db4291 8395 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8396 allocated from the heap, due to the fshelp implementation.
8397 (grub_reiserfs_dir): Free NODE, due to the same reason.
8398
492e6d9d 83992008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8400
8401 Mostly from Vincent Pelletier:
f19dbdb7 8402
492e6d9d 8403 * fs/reiserfs.c: New file.
f19dbdb7 8404
492e6d9d 8405 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8406 (reiserfs_mod_SOURCES): New variable.
8407 (reiserfs_mod_CFLAGS): Likewise.
8408 (reiserfs_mod_LDFLAGS): Likewise.
8409
8410 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8411 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8412 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8413 normal/color.c.
8414
9ce3e7c1 84152008-01-06 Robert Millan <rmh@aybabtu.com>
8416
8417 * normal/color.c: Remove `<grub/env.h>'.
8418
f3b58148 84192008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8420
8421 * include/grub/normal.h: Include <grub/env.h>.
8422
7ac3bcfa 84232008-01-05 Robert Millan <rmh@aybabtu.com>
8424
8425 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8426 usage example with `(hd0,1)'.
fb358190 8427 Reported by Samuel Thibault.
7ac3bcfa 8428
c8ee99d7 84292008-01-05 Robert Millan <rmh@aybabtu.com>
8430
8431 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8432 (grub_linux_boot_zimage): Rename to ...
8433 (grub_linux_boot): ... this.
8434 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8435 (grub_linux_boot_zimage): Conditionalize zImage copy.
8436
8437 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8438 (grub_linux_boot_bzimage): Remove prototype.
8439 (grub_linux_boot_zimage): Rename to ...
8440 (grub_linux_boot): ... this.
8441
8442 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8443 (grub_linux_boot): Remove function.
8444
0ece25b1 84452008-01-05 Robert Millan <rmh@aybabtu.com>
8446
8447 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8448 (grub_env_write_color_highlight): Likewise.
8449 (grub_wait_after_message): Likewise.
8450
8451 * normal/color.c: New file.
8452
8453 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8454 (normal_mod_DEPENDENCIES): Likewise.
8455
8456 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8457 (normal_mod_DEPENDENCIES): Likewise.
8458
8459 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8460 (normal_mod_DEPENDENCIES): Likewise.
8461
8462 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8463 (normal_mod_DEPENDENCIES): Likewise.
8464
8465 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8466 for waiting after a message is printed.
8467 * normal/main.c (read_config_file): Likewise.
8468 (grub_normal_init): Register grub_env_write_color_normal() and
8469 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8470 `color_highlight' variables as global.
8471
8472 * normal/menu.c (grub_wait_after_message): New function.
8473 (grub_color_menu_normal): New variable. Replaces ...
8474 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8475 (grub_color_menu_highlight): New variable. Replaces ...
8476 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8477 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8478 `GRUB_TERM_COLOR_STANDARD'.
8479 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8480 `normal_code' and `highlight_code' to `old_color_normal' and
8481 `old_color_highlight', respectively.
8482 (grub_menu_init_page): Update colors when drawing the menu, based on
8483 `menu_color_normal' and `menu_color_highlight' variables.
8484 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8485 a message is printed.
8486
182dd4e5 84872008-01-05 Robert Millan <rmh@aybabtu.com>
8488
8489 * kern/env.c (grub_env_context_open): Propagate hooks for global
8490 variables to new context.
8491
8492 * kern/main.c (grub_set_root_dev): Export `root' variable.
8493
ddf8f6ad 84942008-01-05 Robert Millan <rmh@aybabtu.com>
8495
8496 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 8497 discs unconditionally, since udev and others have options to provide
ddf8f6ad 8498 them.
8499
d8b43d9b 85002008-01-05 Robert Millan <rmh@aybabtu.com>
8501
8502 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8503
2bff2de3 85042008-01-04 Christian Franke <franke@computer.org>
8505
8506 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8507 of eisa_mmap.
8508
97eab917 85092008-01-03 Pavel Roskin <proski@gnu.org>
8510
8511 * kern/i386/linuxbios/init.c: Put "void" to all function
8512 declarations with no arguments.
8513 * kern/powerpc/ieee1275/init.c: Likewise.
8514 * term/i386/pc/at_keyboard.c: Likewise.
8515 * term/i386/pc/vga_text.c: Likewise.
8516 * util/grub-mkdevicemap.c: Likewise.
8517
b9416d00 85182008-01-02 Robert Millan <rmh@aybabtu.com>
8519
8520 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8521 message when loaded image is out of bounds.
8522 (grub_multiboot_load_elf64): Likewise.
8523
92695df9 85242008-01-02 Pavel Roskin <proski@gnu.org>
8525
8526 * util/grub.d/10_linux.in: Try version without ".old" when
8527 looking for initrd. It's better to use initrd from the newer
8528 kernel of the same version than no initrd at all.
8529
d98d9cad 85302008-01-01 Robert Millan <rmh@aybabtu.com>
8531
8532 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8533
dbfdce36 85342008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
8535
f19dbdb7 8536 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 8537 grub_video_get_active_render_target.
8538 (grub_video_adapter): Added unmap_color and get_active_render_target.
8539
f19dbdb7 8540 * video/video.c: Added grub_video_unmap_color and
dbfdce36 8541 grub_video_get_active_render_target.
8542 (grub_video_get_info): Changed method to accept NULL pointer as an
8543 argument to allow detection of active video adapter.
8544
8545 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8546 grub_video_vbe_unmap_color_int.
8547 Added grub_video_vbe_unmap_color and
8548 grub_video_vbe_get_active_render_target.
8549 (grub_video_vbe_adapter): Added unmap_color and
8550 get_active_render_target.
8551
f19dbdb7 8552 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 8553 with grub_video_vbe_unmap_color_int.
8554
8555 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8556 (DEFAULT_NORMAL_COLOR): Likewise.
8557 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8558 (DEFAULT_FG_COLOR): Removed.
8559 (DEFAULT_BG_COLOR): Likewise.
8560 (DEFAULT_CURSOR_COLOR): Changed value.
8561 (grub_virtual_screen): Added standard_color_setting,
8562 normal_color_setting, highlight_color_setting and term_color.
8563 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8564 (bitmap_width): Added.
8565 (bitmap_height): Likewise.
8566 (bitmap): Likewise.
8567 (set_term_color): Likewise.
8568 (grub_virtual_screen_setup): Changed to use new terminal coloring
8569 settings.
8570 (grub_gfxterm_init): Added init for bitmap.
8571 (grub_gfxterm_fini): Added destroy for bitmap.
8572 (redraw_screen_rect): Updated to use background bitmap and new
8573 terminal coloring.
8574 (scroll_up): Added optimization for case when there is no bitmap.
8575 (grub_gfxterm_cls): Fixed to use correct background color.
8576 (grub_virtual_screen_setcolorstate): Changed to use new terminal
8577 coloring.
8578 (grub_virtual_screen_setcolor): Likewise.
8579 (grub_virtual_screen_getcolor): Added.
8580 (grub_gfxterm_background_image_cmd): Likewise.
8581 (grub_video_term): Added setcolor and getcolor.
8582 (MOD_INIT): Added registration of background_image command.
8583 (MOD_TERM): Added unregistration for background_image command.
8584
c3c20931 85852007-12-30 Pavel Roskin <proski@gnu.org>
8586
8587 * loader/multiboot_loader.c: Fix multiboot command
8588 unregistration. Fix all typos in the word "multiboot".
8589
df266716 85902007-12-29 Pavel Roskin <proski@gnu.org>
94239199 8591
8592 * util/grub.d/10_linux.in: Refactor search for initrd. Add
8593 support for initrd names used in Fedora.
8594
fc6e896c 85952007-12-26 Bean <bean123ch@gmail.com>
8596
8597 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8598 (cpio_mod_SOURCES): New variable.
8599 (cpio_mod_CFLAGS): Likewise.
8600 (cpio_mod_LDFLAGS): Likewise.
8601
8602 * fs/cpio.c: New file.
8603
8604 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8605
8606 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8607
8608 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8609
8610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8611
533110ad 86122007-12-25 Robert Millan <rmh@aybabtu.com>
8613
8614 * include/grub/term.h (struct grub_term): Add `getcolor' function.
8615 (grub_getcolor): New function.
8616
8617 * kern/term.c (grub_getcolor): New function.
8618 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8619 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8620 (print_entry): Set normal and highlight colors to
8621 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8622 respectively, before printing and restore them to old
8623 values afterwards.
8624 (grub_menu_init_page): Likewise. Fill an additional colored space
8625 that would otherwise be left blank.
8626
8627 * term/efi/console.c (grub_console_getcolor): New function.
8628 (struct grub_console_term.getcolor): New variable.
8629 * term/i386/pc/console.c (grub_console_getcolor): New function.
8630 (struct grub_console_term.getcolor): New variable.
8631 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8632 (struct grub_console_term.getcolor): New variable.
8633
8634 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8635 (struct grub_console_term.setcolor): Remove variable.
8636 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8637 (struct grub_console_term.setcolor): Remove variable.
8638 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8639 (struct grub_console_term.setcolor): Remove variable.
8640 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8641 (struct grub_console_term.setcolor): Remove variable.
8642
4931827f 86432007-12-25 Robert Millan <rmh@aybabtu.com>
8644
8645 * configure.ac: Search for possible unifont.hex locations, and
8646 define UNIFONT_HEX if found.
8647
8648 * Makefile.in (UNIFONT_HEX): Define variable.
8649 (DATA): Rename to ...
8650 (PKGLIB): ... this. Update all users.
8651 (PKGDATA): New variable.
8652 (pkgdata_IMAGES): Rename to ...
8653 (pkglib_IMAGES): ... this. Update all users.
8654 (pkgdata_MODULES): Rename to ...
8655 (pkglib_MODULES): ... this. Update all users.
8656 (pkgdata_PROGRAMS): Rename to ...
8657 (pkglib_PROGRAMS): ... this. Update all users.
8658 (pkgdata_DATA): Rename to ...
8659 (pkglib_DATA): ... this. Update all users.
8660 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8661 (unicode.pff, ascii.pff): New rules.
8662 (all-local): Add `$(PKGDATA)' dependency.
8663 (install-local): Process `$(PKGDATA)'.
8664
8665 * util/update-grub_lib.in (font_path): Search for *.pff files in
8666 a few more locations, including `${pkgdata}'.
8667
57e57e31 86682007-12-23 Robert Millan <rmh@aybabtu.com>
8669
8670 Patch from Bean <bean123ch@gmail.com>:
8671 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8672 `size'.
8673
4bc72aa9 86742007-12-21 Bean <bean123ch@gmail.com>
8675
8676 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8677 (ntfscomp_mod_SOURCES): New variable.
8678 (ntfscomp_mod_CFLAGS): Likewise.
8679 (ntfscomp_mod_LDFLAGS): Likewise.
8680
8681 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8682 (grub_probe_SOURCES): Likewise.
8683 (grub_emu_SOURCES): Likewise.
8684
8685 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8686 (grub_emu_SOURCES): Likewise.
8687
8688 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8689 (grub_emu_SOURCES): Likewise.
8690
8691 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8692 (grub_emu_SOURCES): Likewise.
8693
8694 * fs/ntfs.c (grub_ntfscomp_func): New variable.
8695 (read_run_list): Renamed to grub_ntfs_read_run_list.
8696 (decomp_nextvcn): Moved to ntfscomp.c.
8697 (decomp_getch): Likewise.
8698 (decomp_get16): Likewise.
8699 (decomp_block): Likewise.
8700 (read_block): Likewise.
8701 (read_data): Partially moved to ntfscomp.c.
8702 (fixup): Change unsigned to grub_uint16_t.
8703 (read_mft): Change unsigned long to grub_uint32_t.
8704 (read_attr): Likewise.
8705 (read_data): Likewise.
8706 (read_run_data): Likewise.
8707 (read_run_list): Likewise.
8708 (read_mft): Likewise.
8709
8710 * fs/ntfscomp.c: New file.
8711
8712 * include/grub/ntfs.h: New file.
8713
af680a87 87142007-12-16 Robert Millan <rmh@aybabtu.com>
8715
8716 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8717 IDE disk check, since Linux is known to support 20 IDE disks.
8718 Reported by Colin Watson.
8719
84be7599 87202007-12-15 Bean <bean123ch@gmail.com>
8721
8722 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8723 (lnxboot_img_SOURCES): New variable.
8724 (lnxboot_img_ASFLAGS): Likewise.
8725 (lnxboot_img_LDFLAGS): Likewise.
8726
8727 * boot/i386/pc/lnxboot.S: New file.
8728
6af9db01 87292007-11-24 Pavel Roskin <proski@gnu.org>
8730
8731 * configure.ac: Test if '--build-id=none' is supported by the
8732 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
8733 objcopy to generate incorrect binary files (binutils
8734 2.17.50.0.18-1 as shipped by Fedora 8).
8735 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8736 linking, so that build ID doesn't break the test.
8737
7361cfe6 87382007-11-24 Pavel Roskin <proski@gnu.org>
8739
8740 * include/grub/i386/time.h: use "void" in the argument list
8741 of grub_cpu_idle().
8742 * include/grub/powerpc/time.h: Likewise.
8743 * include/grub/sparc64/time.h: Likewise.
8744
1593e10c 87452007-11-18 Christian Franke <franke@computer.org>
8746
8747 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8748 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8749 This fixes the problem that function keys did not work in grub-emu.
8750
3b8db1a8 87512007-11-18 Christian Franke <franke@computer.org>
8752
8753 * disk/host.c (grub_host_open): Remove attribute unused from
8754 name parameter. Add check for "host". This fixes the problem
8755 that grub-emu does not find partitions.
8756
2e29408d 87572007-11-18 Christian Franke <franke@computer.org>
8758
8759 * util/hostfs.c (is_dir): New function.
8760 (grub_hostfs_dir): Handle missing dirent.d_type case.
8761 (grub_hostfs_read): Add missing fseek().
8762 (grub_hostfs_label): Clear label pointer. This fixes a crash
8763 of grub-emu on "ls (host)".
8764
398cd047 87652007-11-18 Christian Franke <franke@computer.org>
8766
8767 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8768 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8769 to 64 bit boundary by default.
8770
c405c391 87712007-11-18 Bean <bean123ch@gmail.com>
8772
8773 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8774 (hexdump_mod_SOURCES): New variable.
8775 (hexdump_mod_CFLAGS): Likewise.
8776 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 8777
c405c391 8778 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8779
8780 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8781
8782 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8783
8784 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8785
8786 * include/grub/hexdump.h: New file.
8787
8788 * commands/hexdump.c: New file.
8789
5cced7fd 87902007-11-10 Robert Millan <rmh@aybabtu.com>
8791
8792 * commands/i386/pc/play.c (beep_off): Switch order of arguments
8793 in grub_outb() calls.
8794 (beep_on): Likewise.
8795
8b714eb0 87962007-11-10 Christian Franke <franke@computer.org>
8797
8798 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8799 (grub_menu_run): Likewise.
8800
ce0f1839 88012007-11-10 Robert Millan <rmh@aybabtu.com>
8802
8803 * include/grub/i386/efi/machine.h: New file.
8804 * include/grub/i386/linuxbios/machine.h: Likewise.
8805 * include/grub/i386/pc/machine.h: Likewise.
8806 * include/grub/powerpc/ieee1275/machine.h: Likewise.
8807 * include/grub/sparc64/ieee1275/machine.h: Likewise.
8808
8809 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8810 (serial_hw_io_addr): New variable.
8811 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8812 instead of `(unsigned short *) 0x400'.
8813
270c237d 88142007-11-10 Bean <bean123ch@gmail.com>
8815
8816 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8817
a87783bf 88182007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8819
8820 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8821 (vga_mod_SOURCES): Added.
8822 (vga_mod_CFLAGS): Likewise.
8823 (vga_mod_LDFLAGS): Likewise.
8824
8825 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8826 grub_outb() calls.
8827 (set_map_mask): Likewise.
8828 (set_read_map): Likewise.
8829 (set_read_address): Likewise.
8830 (vga_font): Removed variable.
8831 (get_vga_glyph): Removed function.
8832 (invalidate_char): Likewise.
8833 (write_char): Changed to use grub_font_get_glyph() for font
8834 information.
8835 (grub_vga_putchar): Likewise.
8836 (grub_vga_getcharwidth): Likewise.
8837
6433b448 88382007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8839
8840 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8841 flags.
8842 (pxeboot_img_LDFLAGS): Likewise.
8843 (diskboot_img_LDFLAGS): Likewise.
8844 (kernel_img_LDFLAGS): Likewise.
8845
49178511 88462007-11-06 Robert Millan <rmh@aybabtu.com>
8847
8848 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8849 in grub_outb() calls.
8850 (serial_hw_init): Likewise.
8851
53b052de 88522007-11-05 Robert Millan <rmh@aybabtu.com>
8853
8854 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8855 spaces. Skip non-regular files.
8856
5ab33bba 88572007-11-05 Robert Millan <rmh@aybabtu.com>
8858
8859 * kern/disk.c (grub_disk_firmware_fini)
8860 (grub_disk_firmware_is_tainted): New variables.
8861
8862 * include/grub/disk.h (grub_disk_firmware_fini)
8863 (grub_disk_firmware_is_tainted): Likewise.
8864
8865 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8866 (grub_disk_biosdisk_fini): ... to here.
8867 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8868 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8869 is set. Register grub_disk_biosdisk_fini() in
8870 `grub_disk_firmware_fini'.
8871
8872 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8873 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8874 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8875 to finish existing firmware disk interface.
8876
8877 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8878 (ata_mod_SOURCES): New variable.
8879 (ata_mod_CFLAGS): Likewise.
8880 (ata_mod_LDFLAGS): Likewise.
8881
0149ab7c 88822007-11-05 Robert Millan <rmh@aybabtu.com>
8883
8884 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
8885 (grub_ata_wait): Reimplement using grub_millisleep().
8886
8887 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8888 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8889
be7ac41e 88902007-11-03 Marco Gerards <marco@gnu.org>
8891
8892 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8893 (CRTC_ADDR_PORT): New macro.
8894 (CRTC_DATA_PORT): Likewise.
8895 (CRTC_CURSOR): Likewise.
8896 (CRTC_CURSOR_ADDR_HIGH): Likewise.
8897 (CRTC_CURSOR_ADDR_LOW): Likewise.
8898 (update_cursor): New function.
8899 (grub_console_real_putchar): Call `update_cursor'.
8900 (grub_console_gotoxy): Likewise.
8901 (grub_console_cls): Set the default color when clearing the
8902 screen.
8903 (grub_console_setcursor): Implemented.
8904
bb06ab2e 89052007-11-03 Marco Gerards <marco@gnu.org>
8906
8907 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8908 become activate.
8909 (grub_ata_pio_write): Likewise.
8910
8911 (grub_atapi_identify): Wait after issuing an ATA command.
8912 (grub_atapi_packet): Likewise.
8913 (grub_ata_identify): Likewise.
8914 (grub_ata_readwrite): Likewise.
8915
cf8f780b 89162007-11-03 Marco Gerards <marco@gnu.org>
8917
8918 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8919 (grub_ata_pio_write): Likewise.
8920 (grub_ata_readwrite): Use `grub_error', instead of
8921 returning `grub_errno'.
8922
ed649e54 89232007-11-03 Marco Gerards <marco@gnu.org>
8924
8925 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8926 grub_ata_pio_write once for every single sector, instead of for
8927 multiple sectors.
8928
ca25d8f0 89292007-10-31 Robert Millan <rmh@aybabtu.com>
8930
8931 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8932
8933 * conf/i386-linuxbios.rmk: New file.
8934
8935 * kern/i386/pc/hardware.c: Likewise.
8936 * term/i386/pc/at_keyboard.c: Likewise.
8937 * term/i386/pc/vga_text.c: Likewise.
8938
8939 * include/grub/i386/linuxbios/boot.h: Likewise.
8940 * include/grub/i386/linuxbios/console.h: Likewise.
8941 * include/grub/i386/linuxbios/init.h: Likewise.
8942 * include/grub/i386/linuxbios/kernel.h: Likewise.
8943 * include/grub/i386/linuxbios/loader.h: Likewise.
8944 * include/grub/i386/linuxbios/memory.h: Likewise.
8945 * include/grub/i386/linuxbios/serial.h: Likewise.
8946 * include/grub/i386/linuxbios/time.h: Likewise.
8947
8948 * kern/i386/linuxbios/init.c: Likewise.
8949 * kern/i386/linuxbios/startup.S: Likewise.
8950 * kern/i386/linuxbios/table.c: Likewise.
8951
e911ecc1 89522007-10-31 Marco Gerards <marco@gnu.org>
8953
8954 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8955 (ata_mod_SOURCES): New variable.
8956 (ata_mod_CFLAGS): Likewise.
8957 (ata_mod_LDFLAGS): Likewise.
8958
8959 * disk/ata.c: New file.
8960
8961 * include/grub/disk.h (grub_disk_dev_id): Add
8962 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 8963
7f66d0e0 89642007-10-31 Robert Millan <rmh@aybabtu.com>
8965
8966 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8967 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8968
8969 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8970 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8971
8972 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8973 `<grub/types.h>'.
8974
8975 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8976
5cd7dd46 89772007-10-27 Robert Millan <rmh@aybabtu.com>
8978
3236ca65 8979 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 8980
2ebfc90f 89812007-10-22 Robert Millan <rmh@aybabtu.com>
8982
8983 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
8984 `"../realmode.S"'.
8985 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
8986
73fcb0f3 89872007-10-22 Robert Millan <rmh@aybabtu.com>
8988
8989 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8990 (pkgdata_MODULES): Add `biosdisk.mod'.
8991 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8992 variables.
8993
8994 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8995 (grub_biosdisk_init): Replace with ...
8996 (GRUB_MOD_INIT(biosdisk)): ... this.
8997 (grub_biosdisk_fini): Replace with ...
8998 (GRUB_MOD_FINI(biosdisk)): ... this.
8999
9000 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9001 (grub_machine_init): Remove call to grub_biosdisk_init().
9002 (grub_machine_fini): Remove call to grub_machine_fini().
9003
9004 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9005
3381d274 90062007-10-22 Robert Millan <rmh@aybabtu.com>
9007
9008 * include/grub/time.h: New file.
9009 * include/grub/i386/time.h: Likewise.
9010 * include/grub/powerpc/time.h: Likewise.
9011 * include/grub/sparc64/time.h: Likewise.
9012
9013 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9014 instances to ...
9015 (KERNEL_MACHINE_TIME_HEADER): ... this.
9016 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9017 instances to ...
9018 (KERNEL_MACHINE_TIME_HEADER): ... this.
9019 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9020 instances to ...
9021 (KERNEL_MACHINE_TIME_HEADER): ... this.
9022
9023 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9024 (grub_millisleep): New function.
9025 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9026 (grub_millisleep): New function.
9027 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9028 Remove `grub/machine/time.h' include.
9029 (grub_millisleep): New function.
9030 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9031 Remove `grub/machine/time.h' include.
9032 (grub_millisleep): New function.
9033
9034 * include/grub/misc.h (grub_div_roundup): New function.
9035
9036 * kern/misc.c: Include `<grub/time.h>'.
9037 (grub_millisleep_generic): New function.
9038
9039 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9040 Add `time.h'.
9041 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9042 Add `time.h'.
9043 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9044 `machine/time.h'. Add `time.h'.
9045 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9046
a39a0312 90472007-10-21 Robert Millan <rmh@aybabtu.com>
9048
9049 * include/grub/misc.h (grub_max): New function.
9050
2aad70e2 90512007-10-21 Robert Millan <rmh@aybabtu.com>
9052
9053 * util/misc.c (grub_util_info): Call fflush() before returning.
9054
54b71c4b 90552007-10-20 Robert Millan <rmh@aybabtu.com>
9056
9057 * genmk.rb (Image): Copy `extra_flags' from here ...
9058 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9059
9060 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9061 to `argc' and `args' arguments.
9062
a979f513 90632007-10-17 Robert Millan <rmh@aybabtu.com>
9064
9065 * kern/i386/loader.S: New file.
9066
9067 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9068 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9069 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9070 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9071 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9072 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9073 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9074 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9075 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9076 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9077 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9078 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9079 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9080 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9081
9082 * kern/i386/realmode.S: New file.
9083
9084 * kern/i386/pc/startup.S (protstack): Moved from here ...
9085 * kern/i386/realmode.S (protstack)... to here.
9086 * kern/i386/pc/startup.S (gdt): Moved from here ...
9087 * kern/i386/realmode.S (gdt)... to here.
9088 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9089 * kern/i386/realmode.S (prot_to_real)... to here.
9090
9091 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9092 `kern/i386/realmode.S'.
9093
825fc8fd 90942007-10-17 Robert Millan <rmh@aybabtu.com>
9095
9096 * include/grub/i386/loader.h: New file.
9097
9098 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9099 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9100 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9101 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9102 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9103 * include/grub/i386/loader.h (grub_linux_prot_size)
9104 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9105 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9106 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9107 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9108
9109 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9110
e179b2f4 91112007-10-15 Robert Millan <rmh@aybabtu.com>
9112
9113 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9114 filesystem when dev->disk is unset.
9115 Do probe for filesystem even when dev->disk->has_partitions is set.
9116 In case a filesystem is found, always report it.
9117 In case it isn't, if dev->disk->has_partitions is set, report that
9118 a partition table was found instead of reporting that no filesystem
9119 could be identified.
9120
5db82af6 91212007-10-12 Robert Millan <rmh@aybabtu.com>
9122
9123 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9124 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9125
68f6ac74 9126 * include/grub/types.h (grub_host_to_target16): New macro.
9127 (grub_host_to_target32): Likewise.
9128 (grub_host_to_target64): Likewise.
9129 (grub_target_to_host16): Likewise.
9130 (grub_target_to_host32): Likewise.
9131 (grub_target_to_host64): Likewise.
5db82af6 9132
9133 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9134 Renamed from to ...
9135 (GRUB_MOD_ALIGN): ...this. Update all users.
9136
68f6ac74 9137 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9138 grub_host_to_target32.
9139 Replace grub_be_to_cpu32 with grub_target_to_host32.
9140 (load_modules): Likewise.
9141 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9142 Replace grub_be_to_cpu32 with grub_target_to_host32.
9143 Replace grub_cpu_to_be16 with grub_host_to_target16.
9144 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 9145
3cf497cc 91462007-10-12 Robert Millan <rmh@aybabtu.com>
9147
9148 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9149 * util/elf/grub-mkimage.c: ... here.
9150
9151 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9152 `util/powerpc/ieee1275/grub-mkimage.c'.
9153
c8cc3692 91542007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 9155
c8cc3692 9156 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9157 and make it easier to figure out.
9158 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9159 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9160 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9161 leave us with less than HEAP_MIN_SIZE total heap.
9162 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 9163
5c58b791 91642007-10-03 Robert Millan <rmh@aybabtu.com>
9165
9166 * include/grub/i386/io.h: New file.
9167 * commands/i386/pc/play.c (inb): Removed.
9168 (outb): Removed.
9169 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9170 with grub_outb().
afcd2ef8 9171 * term/i386/pc/serial.c (inb): Removed.
9172 (outb): Removed.
9173 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9174 with grub_outb().
9175 * term/i386/pc/vga.c (inb): Removed.
9176 (outb): Removed.
9177 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9178 with grub_outb().
5c58b791 9179
1a477ed6 91802007-10-02 Robert Millan <rmh@aybabtu.com>
9181
9182 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9183 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9184 Reported by Marcin Kurek.
9185
6b5d80fa 91862007-09-07 Robert Millan <rmh@aybabtu.com>
9187
9188 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9189 SmartFirmware version updates (as released by Sven Luther), and avoid
9190 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9191 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9192 known broken.
9193
5618afbf 91942007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9195
9196 From Hitoshi Ozeki:
9197 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9198 when merging two regions.
9199
6139dcd9 92002007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9201
508e39ee 9202 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9203 * normal/completion.c (grub_normal_do_completion): Likewise.
9204 Reported by Hitoshi Ozeki.
9205
92062007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9207
6139dcd9 9208 Do not use devices at boot in chainloading.
f19dbdb7 9209
6139dcd9 9210 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9211 (boot_part_addr): Likewise.
9212 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9213 with BOOT_DRIVE and BOOT_PART_ADDR.
9214 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9215 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9216
38da6516 92172007-08-29 Robert Millan <rmh@aybabtu.com>
9218
9219 Patch from Simon Peter <dn.tlp@gmx.net>:
9220 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9221 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9222 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9223 util/i386/pc/grub-setup.c_DEPENDENCIES.
9224 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9225 util/grub-probe.c_DEPENDENCIES.
9226 * conf/powerpc-ieee1275.rmk: Likewise.
9227
29d0928c 92282007-08-28 Robert Millan <rmh@aybabtu.com>
9229
9230 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9231 to tell grub-mkdevicemap how to name devices.
9232 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9233 feature).
9234
9235 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9236 util/i386/get_disk_name.c.
9237 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9238 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9239 util/ieee1275/get_disk_name.c.
9240
9241 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9242
9243 * DISTLIST: Add util/i386/get_disk_name.c and
9244 util/ieee1275/get_disk_name.c.
9245
9246 * util/grub-mkdevicemap.c: Replace device naming logic with
9247 grub_util_get_disk_name() calls.
9248
5a0d3cca 92492007-08-20 Robert Millan <rmh@aybabtu.com>
9250
9251 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9252 (so that it works for both plural and singular quantities).
9253
8b72db2f 92542007-08-05 Robert Millan <rmh@aybabtu.com>
9255
9256 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9257 so that [xz] isn't taken into account when determining order.
9258
352466bf 92592007-08-02 Marco Gerards <marco@gnu.org>
9260
9261 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9262 `include/multiboot2.h', `include/grub/elfload.h',
9263 `include/multiboot.h', `include/grub/multiboot.h',
9264 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9265 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9266 `kern/elf.c', `loader/multiboot_loader.c',
9267 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9268 `loader/i386/pc/multiboot2.c',
9269 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9270 `util/i386/pc/grub-mkrescue.in'. Remove
9271 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9272 `include/grub/i386/pc/util/biosdisk.h' and
9273 `include/grub/powerpc/ieee1275/multiboot.h'.
9274
8f096014 92752007-08-02 Bean <bean123ch@gmail.com>
9276
9277 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9278 (ntfs_mod_SOURCES): New variable.
9279 (ntfs_mod_CFLAGS): Likewise.
9280 (ntfs_mod_LDFLAGS): Likewise.
9281
9282 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9283 (grub_probe_SOURCES): Likewise.
9284 (grub_emu_SOURCES): Likewise.
9285
9286 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9287 (grub_emu_SOURCES): Likewise.
9288
9289 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9290 (grub_emu_SOURCES): Likewise.
f19dbdb7 9291
8f096014 9292 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9293
9294 * fs/ntfs.c: New file.
9295
9959f7db 92962007-08-02 Bean <bean123ch@gmail.com>
9297
9298 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9299
9300 * file.h (grub_file): Likewise.
9301
9302 * fshelp.h (grub_fshelp_read_file): Likewise.
9303
9304 * util/i386/pc/grub-setup.c (setup): Likewise.
9305 (save_first_sector): Likewise.
9306 (save_blocklists): Likewise.
f19dbdb7 9307
9959f7db 9308 * fs/affs.c (grub_affs_read_file): Likewise.
9309
9310 * fs/ext2.c (grub_ext2_read_file): Likewise.
9311
9312 * fs/fat.c (grub_fat_read_data): Likewise.
9313
9314 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9315
9316 * fs/hfs.c (grub_hfs_read_file): Likewise.
9317
9318 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9319
9320 * fs/jfs.c (grub_jfs_read_file): Likewise.
9321
9322 * fs/minix.c (grub_minix_read_file): Likewise.
9323
9324 * fs/sfs.c (grub_sfs_read_file): Likewise.
9325
9326 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 9327
9959f7db 9328 * fs/xfs.c (grub_xfs_read_file): Likewise.
9329
9330 * command/blocklist.c (read_blocklist): Likewise.
9331 (print_blocklist): Likewise.
9332
0a203f83 93332007-08-02 Marco Gerards <marco@gnu.org>
9334
9335 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9336 `util/hostfs.c'.
9337
9338 * disk/host.c: New file.
9339
9340 * util/hostfs.c: Likewise.
9341
9342 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9343 return `GRUB_ERR_BAD_FS'.
9344 * fs/sfs.c (grub_sfs_mount): Likewise.
9345 * fs/xfs.c (grub_xfs_mount): Likewise.
9346
9347 * include/grub/disk.h (enum grub_disk_dev_id): Add
9348 `GRUB_DISK_DEVICE_HOST_ID'.
9349
9350 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9351
e5dfe777 93522007-07-24 Jerone Young <jerone@gmail.com>
9353
f19dbdb7 9354 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 9355 modules for compilation.
9356 * conf/powerpc-ieee1275.rmk: Likewise.
9357
9358 * include/multiboot.h: Move multiboot definitions to one file. Rename
9359 many definitions to not get grub specific.
9360 * include/multiboot2.h: Create header with multiboot 2 definitions.
9361 * include/grub/multiboot.h: Header for grub specific function
9362 prototypes and definitions.
9363 * include/grub/multiboot2.h: Likewise.
9364 * include/grub/multiboot_loader.h: Likewise.
9365 * include/grub/i386/pc/multiboot.h: Removed.
9366 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9367
9368 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9369 and 2 to allow for one multiboot and module commands.
9370 * loader/multiboot2.c: Add multiboot2 functionality.
9371 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9372 and definition names.
9373 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9374 2 functions.
9375 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9376 ieee1275 specific multiboot2 code.
9377
9378 * kern/i386/pc/startup.S: Change headers and definition names for
9379 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9380
daf0f0ba 93812007-07-22 Robert Millan <rmh@aybabtu.com>
9382
9383 * geninitheader.sh: Process file specified in first parameter rather
9384 than hardcoding grub_modules_init.lst.
fe6b695a 9385 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 9386 than hardcoding grub_modules_init.h.
9387
9388 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9389 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9390 grub_probe_init.[ch] and grub_setup_init.[ch].
9391
9392 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9393 grub_modules_init.h with grub_emu_init.h.
9394 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9395 grub_probe_init.[ch] files.
9396 * conf/i386-efi.rmk: Likewise.
9397 * conf/i386-pc.rmk: Likewise.
9398 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9399 grub_setup_init.[ch] files.
9400
9401 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9402 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9403 to initialize modules rather than a list of hardcoded functions.
9404 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9405 grub_init_all() to initialize modules rather than a list of hardcoded
9406 functions.
9407
54cdc1cc 94082007-07-22 Robert Millan <rmh@aybabtu.com>
9409
9410 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9411 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9412
ad0686cc 94132007-07-22 Robert Millan <rmh@aybabtu.com>
9414
9415 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9416 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9417 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9418 flag when running on SmartFirmware.
9419 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9420 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9421 was set.
9422
9423 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9424 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9425 rather than decreasing it.
9426
9427 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9428 there's not enough space to do it, fail in the same way as when it
9429 can't be done because there are no partitions.
9430
9431 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9432 when nvsetenv failed.
9433
969c02ec 94342007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9435
9436 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9437 because this rule is automatically generated.
9438 (grub-mkrescue): Removed for the same reason as above.
9439
5a79f472 94402007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9441
9442 Migrate to GNU General Public License Version 3.
f19dbdb7 9443
5a79f472 9444 * COPYING: Replaced with the plain text version of GPLv3.
9445
9446 * config.guess: Updated from gnulib.
9447 * config.sub: Likewise.
9448
9449 * geninit.sh: Output a GPLv3 copyright notice.
9450 * geninitheader.sh: Likewise.
9451 * genmodsrc.sh: Likewise.
9452 * gensymlist.sh.in: Likewise.
9453
9454 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9455 * boot/i386/pc/diskboot.S: Likewise.
9456 * boot/i386/pc/pxeboot.S: Likewise.
9457 * commands/blocklist.c: Likewise.
9458 * commands/boot.c: Likewise.
9459 * commands/cat.c: Likewise.
9460 * commands/cmp.c: Likewise.
9461 * commands/configfile.c: Likewise.
9462 * commands/echo.c: Likewise.
9463 * commands/help.c: Likewise.
9464 * commands/ls.c: Likewise.
9465 * commands/search.c: Likewise.
9466 * commands/terminal.c: Likewise.
9467 * commands/test.c: Likewise.
9468 * commands/videotest.c: Likewise.
9469 * commands/i386/cpuid.c: Likewise.
9470 * commands/i386/pc/halt.c: Likewise.
9471 * commands/i386/pc/play.c: Likewise.
9472 * commands/i386/pc/reboot.c: Likewise.
9473 * commands/i386/pc/vbeinfo.c: Likewise.
9474 * commands/i386/pc/vbetest.c: Likewise.
9475 * commands/ieee1275/halt.c: Likewise.
9476 * commands/ieee1275/reboot.c: Likewise.
9477 * commands/ieee1275/suspend.c: Likewise.
9478 * disk/loopback.c: Likewise.
9479 * disk/lvm.c: Likewise.
9480 * disk/raid.c: Likewise.
9481 * disk/efi/efidisk.c: Likewise.
9482 * disk/i386/pc/biosdisk.c: Likewise.
9483 * disk/ieee1275/ofdisk.c: Likewise.
9484 * font/manager.c: Likewise.
9485 * fs/affs.c: Likewise.
9486 * fs/ext2.c: Likewise.
9487 * fs/fat.c: Likewise.
9488 * fs/fshelp.c: Likewise.
9489 * fs/hfs.c: Likewise.
9490 * fs/hfsplus.c: Likewise.
9491 * fs/iso9660.c: Likewise.
9492 * fs/jfs.c: Likewise.
9493 * fs/minix.c: Likewise.
9494 * fs/sfs.c: Likewise.
9495 * fs/ufs.c: Likewise.
9496 * fs/xfs.c: Likewise.
9497 * hello/hello.c: Likewise.
9498 * include/grub/acorn_filecore.h: Likewise.
9499 * include/grub/arg.h: Likewise.
9500 * include/grub/bitmap.h: Likewise.
9501 * include/grub/boot.h: Likewise.
9502 * include/grub/cache.h: Likewise.
9503 * include/grub/device.h: Likewise.
9504 * include/grub/disk.h: Likewise.
9505 * include/grub/dl.h: Likewise.
9506 * include/grub/elfload.h: Likewise.
9507 * include/grub/env.h: Likewise.
9508 * include/grub/err.h: Likewise.
9509 * include/grub/file.h: Likewise.
9510 * include/grub/font.h: Likewise.
9511 * include/grub/fs.h: Likewise.
9512 * include/grub/fshelp.h: Likewise.
9513 * include/grub/gzio.h: Likewise.
9514 * include/grub/hfs.h: Likewise.
9515 * include/grub/kernel.h: Likewise.
9516 * include/grub/loader.h: Likewise.
9517 * include/grub/lvm.h: Likewise.
9518 * include/grub/misc.h: Likewise.
9519 * include/grub/mm.h: Likewise.
9520 * include/grub/net.h: Likewise.
9521 * include/grub/normal.h: Likewise.
9522 * include/grub/parser.h: Likewise.
9523 * include/grub/partition.h: Likewise.
9524 * include/grub/pc_partition.h: Likewise.
9525 * include/grub/raid.h: Likewise.
9526 * include/grub/rescue.h: Likewise.
9527 * include/grub/script.h: Likewise.
9528 * include/grub/setjmp.h: Likewise.
9529 * include/grub/symbol.h: Likewise.
9530 * include/grub/term.h: Likewise.
9531 * include/grub/terminfo.h: Likewise.
9532 * include/grub/tparm.h: Likewise.
9533 * include/grub/types.h: Likewise.
9534 * include/grub/video.h: Likewise.
9535 * include/grub/efi/api.h: Likewise.
9536 * include/grub/efi/chainloader.h: Likewise.
9537 * include/grub/efi/console.h: Likewise.
9538 * include/grub/efi/console_control.h: Likewise.
9539 * include/grub/efi/disk.h: Likewise.
9540 * include/grub/efi/efi.h: Likewise.
9541 * include/grub/efi/pe32.h: Likewise.
9542 * include/grub/efi/time.h: Likewise.
9543 * include/grub/i386/linux.h: Likewise.
9544 * include/grub/i386/setjmp.h: Likewise.
9545 * include/grub/i386/types.h: Likewise.
9546 * include/grub/i386/efi/kernel.h: Likewise.
9547 * include/grub/i386/efi/loader.h: Likewise.
9548 * include/grub/i386/efi/time.h: Likewise.
9549 * include/grub/i386/pc/biosdisk.h: Likewise.
9550 * include/grub/i386/pc/boot.h: Likewise.
9551 * include/grub/i386/pc/chainloader.h: Likewise.
9552 * include/grub/i386/pc/console.h: Likewise.
9553 * include/grub/i386/pc/init.h: Likewise.
9554 * include/grub/i386/pc/kernel.h: Likewise.
9555 * include/grub/i386/pc/loader.h: Likewise.
9556 * include/grub/i386/pc/memory.h: Likewise.
9557 * include/grub/i386/pc/multiboot.h: Likewise.
9558 * include/grub/i386/pc/serial.h: Likewise.
9559 * include/grub/i386/pc/time.h: Likewise.
9560 * include/grub/i386/pc/vbe.h: Likewise.
9561 * include/grub/i386/pc/vbeblit.h: Likewise.
9562 * include/grub/i386/pc/vbefill.h: Likewise.
9563 * include/grub/i386/pc/vbeutil.h: Likewise.
9564 * include/grub/i386/pc/vga.h: Likewise.
9565 * include/grub/ieee1275/ieee1275.h: Likewise.
9566 * include/grub/ieee1275/ofdisk.h: Likewise.
9567 * include/grub/powerpc/libgcc.h: Likewise.
9568 * include/grub/powerpc/setjmp.h: Likewise.
9569 * include/grub/powerpc/types.h: Likewise.
9570 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9571 * include/grub/powerpc/ieee1275/console.h: Likewise.
9572 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9573 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9574 * include/grub/powerpc/ieee1275/loader.h: Likewise.
9575 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9576 * include/grub/powerpc/ieee1275/time.h: Likewise.
9577 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9578 * include/grub/sparc64/libgcc.h: Likewise.
9579 * include/grub/sparc64/setjmp.h: Likewise.
9580 * include/grub/sparc64/types.h: Likewise.
9581 * include/grub/sparc64/ieee1275/console.h: Likewise.
9582 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9583 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9584 * include/grub/sparc64/ieee1275/time.h: Likewise.
9585 * include/grub/util/biosdisk.h: Likewise.
9586 * include/grub/util/getroot.h: Likewise.
9587 * include/grub/util/lvm.h: Likewise.
9588 * include/grub/util/misc.h: Likewise.
9589 * include/grub/util/raid.h: Likewise.
9590 * include/grub/util/resolve.h: Likewise.
9591 * io/gzio.c: Likewise.
9592 * kern/device.c: Likewise.
9593 * kern/disk.c: Likewise.
9594 * kern/dl.c: Likewise.
9595 * kern/elf.c: Likewise.
9596 * kern/env.c: Likewise.
9597 * kern/err.c: Likewise.
9598 * kern/file.c: Likewise.
9599 * kern/fs.c: Likewise.
9600 * kern/loader.c: Likewise.
9601 * kern/main.c: Likewise.
9602 * kern/misc.c: Likewise.
9603 * kern/mm.c: Likewise.
9604 * kern/parser.c: Likewise.
9605 * kern/partition.c: Likewise.
9606 * kern/rescue.c: Likewise.
9607 * kern/term.c: Likewise.
9608 * kern/efi/efi.c: Likewise.
9609 * kern/efi/init.c: Likewise.
9610 * kern/efi/mm.c: Likewise.
9611 * kern/i386/dl.c: Likewise.
9612 * kern/i386/efi/init.c: Likewise.
9613 * kern/i386/efi/startup.S: Likewise.
9614 * kern/i386/pc/init.c: Likewise.
9615 * kern/i386/pc/lzo1x.S: Likewise.
9616 * kern/i386/pc/startup.S: Likewise.
9617 * kern/ieee1275/ieee1275.c: Likewise.
9618 * kern/powerpc/cache.S: Likewise.
9619 * kern/powerpc/dl.c: Likewise.
9620 * kern/powerpc/ieee1275/cmain.c: Likewise.
9621 * kern/powerpc/ieee1275/crt0.S: Likewise.
9622 * kern/powerpc/ieee1275/init.c: Likewise.
9623 * kern/powerpc/ieee1275/openfw.c: Likewise.
9624 * kern/sparc64/cache.S: Likewise.
9625 * kern/sparc64/dl.c: Likewise.
9626 * kern/sparc64/ieee1275/init.c: Likewise.
9627 * kern/sparc64/ieee1275/openfw.c: Likewise.
9628 * loader/efi/chainloader.c: Likewise.
9629 * loader/efi/chainloader_normal.c: Likewise.
9630 * loader/i386/efi/linux.c: Likewise.
9631 * loader/i386/efi/linux_normal.c: Likewise.
9632 * loader/i386/pc/chainloader.c: Likewise.
9633 * loader/i386/pc/chainloader_normal.c: Likewise.
9634 * loader/i386/pc/linux.c: Likewise.
9635 * loader/i386/pc/linux_normal.c: Likewise.
9636 * loader/i386/pc/multiboot.c: Likewise.
9637 * loader/i386/pc/multiboot_normal.c: Likewise.
9638 * loader/powerpc/ieee1275/linux.c: Likewise.
9639 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9640 * normal/arg.c: Likewise.
9641 * normal/cmdline.c: Likewise.
9642 * normal/command.c: Likewise.
9643 * normal/completion.c: Likewise.
9644 * normal/execute.c: Likewise.
9645 * normal/function.c: Likewise.
9646 * normal/lexer.c: Likewise.
9647 * normal/main.c: Likewise.
9648 * normal/menu.c: Likewise.
9649 * normal/menu_entry.c: Likewise.
9650 * normal/misc.c: Likewise.
9651 * normal/parser.y: Likewise.
9652 * normal/script.c: Likewise.
9653 * normal/i386/setjmp.S: Likewise.
9654 * normal/powerpc/setjmp.S: Likewise.
9655 * normal/sparc64/setjmp.S: Likewise.
9656 * partmap/acorn.c: Likewise.
9657 * partmap/amiga.c: Likewise.
9658 * partmap/apple.c: Likewise.
9659 * partmap/gpt.c: Likewise.
9660 * partmap/pc.c: Likewise.
9661 * partmap/sun.c: Likewise.
9662 * term/gfxterm.c: Likewise.
9663 * term/terminfo.c: Likewise.
9664 * term/efi/console.c: Likewise.
9665 * term/i386/pc/console.c: Likewise.
9666 * term/i386/pc/serial.c: Likewise.
9667 * term/i386/pc/vesafb.c: Likewise.
9668 * term/i386/pc/vga.c: Likewise.
9669 * term/ieee1275/ofconsole.c: Likewise.
9670 * util/biosdisk.c: Likewise.
9671 * util/console.c: Likewise.
9672 * util/genmoddep.c: Likewise.
9673 * util/getroot.c: Likewise.
9674 * util/grub-emu.c: Likewise.
9675 * util/grub-mkdevicemap.c: Likewise.
9676 * util/grub-probe.c: Likewise.
9677 * util/lvm.c: Likewise.
9678 * util/misc.c: Likewise.
9679 * util/raid.c: Likewise.
9680 * util/resolve.c: Likewise.
9681 * util/update-grub.in: Likewise.
9682 * util/update-grub_lib.in: Likewise.
9683 * util/grub.d/00_header.in: Likewise.
9684 * util/grub.d/10_hurd.in: Likewise.
9685 * util/grub.d/10_linux.in: Likewise.
9686 * util/i386/efi/grub-install.in: Likewise.
9687 * util/i386/efi/grub-mkimage.c: Likewise.
9688 * util/i386/pc/grub-install.in: Likewise.
9689 * util/i386/pc/grub-mkimage.c: Likewise.
9690 * util/i386/pc/grub-mkrescue.in: Likewise.
9691 * util/i386/pc/grub-setup.c: Likewise.
9692 * util/i386/pc/misc.c: Likewise.
9693 * util/powerpc/ieee1275/grub-install.in: Likewise.
9694 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9695 * util/powerpc/ieee1275/misc.c: Likewise.
9696 * video/bitmap.c: Likewise.
9697 * video/video.c: Likewise.
9698 * video/i386/pc/vbe.c: Likewise.
9699 * video/i386/pc/vbeblit.c: Likewise.
9700 * video/i386/pc/vbefill.c: Likewise.
9701 * video/i386/pc/vbeutil.c: Likewise.
9702 * video/readers/tga.c: Likewise.
9703
3572d015 97042007-07-02 Robert Millan <rmh@aybabtu.com>
9705
9706 * conf/i386-efi.rmk: Replace obsolete reference to
9707 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9708 with util/getroot.c.
9709 * conf/powerpc-ieee1275.rmk: Likewise.
9710 * conf/sparc64-ieee1275.rmk: Likewise.
9711
9712 * util/grub-emu.c (main): Fix unchecked pointer handling.
9713
2c2a681b 97142007-07-02 Robert Millan <rmh@aybabtu.com>
9715
9716 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9717 invocation to fail, in order to support partition-less media.
9718
9719 * util/i386/pc/grub-install.in: Likewise.
9720
9721 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9722 which fs or partmap modules are needed (akin to its sister scripts).
9723
9724 Also use grub-probe to get rid of unportable /proc/mounts check.
9725
9726 Print the same informational message that the other scripts do, before
fe6b695a 9727 exiting.
2c2a681b 9728
6193defe 97292007-06-23 Robert Millan <rmh@aybabtu.com>
9730
fe6b695a 9731 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 9732 a font file can be found and, if so, echo the GRUB path to it.
9733
9734 * util/update-grub.in: Handle multiple terminals depending on user
9735 input, platform availability and font file presence. Propagate
9736 variables of our findings to /etc/grub.d/ children.
9737
9738 * util/grub.d/00_header.in: Handle multiple terminals, based on
9739 environment setup by update-grub.
9740
eface1dc 97412007-06-23 Robert Millan <rmh@aybabtu.com>
9742
ba50d28f 9743 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 9744
bf697e28 97452007-06-21 Robert Millan <rmh@aybabtu.com>
9746
9747 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9748 indicate end of data section in kernel image.
9749 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9750 GRUB_KERNEL_MACHINE_DATA_END.
9751
9752 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9753 space for it.
9754 * kern/i386/efi/startup.S: Likewise.
9755
9756 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9757 during image generation. Implement --prefix option to override this
9758 patch.
9759 * util/i386/efi/grub-mkimage.c: Likewise.
9760
9761 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9762 code to make path relative to its root into a separate function.
9763
9764 * util/i386/pc/grub-install.in: Use newly provided
9765 make_system_path_relative_to_its_root() to convert ${grubdir}, then
9766 pass the result to grub-install --prefix.
9767
baa574b4 97682007-06-13 Robert Millan <rmh@aybabtu.com>
9769
9770 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9771 DEFAULT_DEVICE_MAP.
9772 * util/grub-emu.c: Use above definitions from misc.h instead of
9773 defining them.
9774 * util/grub-mkdevicemap.c: Likewise.
9775 * util/i386/pc/grub-setup.c: Likewise.
9776 * util/grub-probe.c: Likewise.
9777 (probe): Abort with grub_util_error() when either
9778 grub_guess_root_device or grub_util_get_grub_dev fails.
9779
0215dcbf 97802007-06-12 Robert Millan <rmh@aybabtu.com>
9781
9782 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9783 "pager" assignment.
9784 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9785 "pcdata".
9786 * util/grub-probe.c (probe): Likewise for "drive_name".
9787
8af2ab7b 97882007-06-11 Robert Millan <rmh@aybabtu.com>
9789
9790 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9791 not just the cdrom one.
9792
59d31694 97932007-06-11 Robert Millan <rmh@aybabtu.com>
9794
9795 * util/i386/pc/grub-mkrescue.in: Add "set -e".
9796 Add --pkglibdir=DIR option to override pkglibdir.
9797 Mention --image-type=TYPE in help output.
9798 Fix --grub-mkimage (it was a no-op).
fe6b695a 9799 Abort gracefully when no parameter is given.
59d31694 9800
7ee367e4 98012007-06-11 Robert Millan <rmh@aybabtu.com>
9802
9803 * util/i386/pc/grub-mkrescue.in: New file.
9804 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
9805 * Makefile.in: Handle bin_SCRIPTS.
9806
29b0ed46 98072007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
9808
9809 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9810 list of video modes.
9811
c0f90770 98122007-06-06 Robert Millan <rmh@aybabtu.com>
9813
9814 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9815 file doesn't exist, or if it is in a filesystem grub can't read.
9816
9817 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
9818 not abort if GRUB_DRIVE could not be defined. Rearrange generated
9819 header comment to fit in 80 columns when the variables are resolved.
9820
9821 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9822 could be identified by update-grub. Remove redundant check for
fe6b695a 9823 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 9824 handles that).
9825
fb36dc26 98262007-06-04 Robert Millan <rmh@aybabtu.com>
9827
9828 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9829
9830 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9831
9832 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9833
0c68c93e 98342007-06-04 Robert Millan <rmh@aybabtu.com>
9835
9836 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9837
9838 * include/grub/partition.h: Declare grub_apple_partition_map_init and
9839 grub_apple_partition_map_fini.
9840
9841 * util/biosdisk.c
9842 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9843 to access >2 TiB disks).
9844
9845 Print disk->total_sectors with %llu instead of %lu, since this
9846 variable is always 64-bit (prevents wrong disk size from being displayed
9847 on either >2 TiB disk or big-endian CPU).
9848
9849 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9850 into a generic case that supports all (sane) partition maps.
9851
9852 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9853 breaks big-endian.
9854
9855 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9856 and grub_apple_partition_map_fini() after that.
9857
0f23eb74 98582007-06-01 Robert Millan <rmh@aybabtu.com>
9859
9860 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9861
9862 * util/grub.d/00_header.in: Only enable gfxterm when
9863 convert_system_path_to_grub_path() succeeds.
9864
42c71976 98652007-05-20 Robert Millan <rmh@aybabtu.com>
9866
9867 * util/update-grub_lib.in: New file.
9868 * DISTLIST: Add update-grub_lib.in.
9869 * conf/common.rmk: Generate update-grub_lib and install it in
9870 $(lib_DATA).
9871 * Makefile.in: Add install routine for $(lib_DATA).
9872
9873 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9874 function provided by update-grub_lib to support arbitrary paths of
9875 unifont.pff.
9876 * util/update-grub.in: Use convert_system_path_to_grub_path() to
9877 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9878
5beb2291 98792007-05-19 Robert Millan <rmh@aybabtu.com>
9880
9881 * commands/i386/cpuid.c: New module.
9882 * DISTLIST: Add it.
9883 * conf/i386-efi.rmk: Enable cpuid.mod.
9884 * conf/i386-pc.rmk: Likewise.
9885
7262eca1 98862007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9887
9888 * kern/disk.c (grub_disk_read): Check return value of
9889 grub_realloc().
9890
260ba823 98912007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9892
9893 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9894 arrays.
9895 * disk/raid.c (grub_raid_open): Likewise.
9896
1ecb6cf2 98972007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9898
9899 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9900 stack instead of on the heap.
9901
9902 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9903 before doing a read on it.
9904
9905 * configure.ac: Only use -fno-stack-protector for the target
9906 environment.
f19dbdb7 9907
21c8cbb1 99082007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9909
9910 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9911 __attribute_ ((unused)) to mode_type argument.
9912
9913 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 9914
21c8cbb1 9915 * kern/misc.c (memcmp): Fix prototype.
9916
9917 * include/grub/partition.h [GRUB_UTIL]
9918 (grub_gpt_partition_map_init): Add prototype.
9919 (grub_gpt_partition_map_fini): Likewise.
9920
9921 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9922 at the right place.
9923
9924 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9925 (grub_fat_read_data): Likewise.
9926 (grub_fat_find_dir): Likewise.
9927
9928 * font/manager.c (find_glyph): Make table a const.
9929 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 9930
849d55d3 99312007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
9932
9933 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9934 code, first search for device in /dev/mapper, then in /dev.
9935 (grub_util_get_grub_dev): New function.
9936 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9937 prototype.
9938 * util/grub-probe.c (probe): Remove check for RAID, call
9939 grub_util_get_grub_dev() instead of
9940 grub_util_biosdisk_get_grub_dev().
9941 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9942 grub_util_biosdisk_get_grub_dev().
9943 * util/i386/pc/grub-setup.c (main): Likewise.
9944
8fff7c2f 99452007-05-16 Robert Millan <rmh@aybabtu.com>
9946
9947 * DISTLIST: Update for the latest changes.
9948 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9949 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9950 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9951 grub/util/biosdisk.h.
9952 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9953 grub/util/biosdisk.h.
9954
48e12b52 99552007-05-16 Robert Millan <rmh@aybabtu.com>
9956
9957 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9958
46b9d128 99592007-05-16 Robert Millan <rmh@aybabtu.com>
9960
9961 * util/i386/efi/grub-install.in: New.
9962 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9963 newly added grub-install.
9964 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9965 include.
9966 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9967 grub/util/biosdisk.h.
9968 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9969 grub/util/biosdisk.h.
9970
2d1a40a9 99712007-05-16 Robert Millan <rmh@aybabtu.com>
9972
9973 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9974 * include/grub/util/biosdisk.h: ... here.
9975 * util/i386/pc/biosdisk.c: Moved to ...
9976 * util/biosdisk.c: ... here.
9977 * util/i386/pc/getroot.c: Moved to ...
9978 * util/getroot.c: ... here.
9979 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9980 * util/grub-mkdevicemap.c: ... here.
9981 * util/i386/pc/grub-probe.c: Moved to ...
9982 * util/grub-probe.c: ... here.
9983
9e26e3bc 99842007-05-15 Robert Millan <rmh@aybabtu.com>
9985
9986 * util/update-grub.in: Remove duplicated line in grub.cfg header
9987 message.
9988
57f96397 99892007-05-13 Robert Millan <rmh@aybabtu.com>
9990
9991 * util/update-grub.in: Fix a few assumptions about the devices holding
9992 /, /boot and /boot/grub being the same.
9993 * util/grub.d/00_header.in: Likewise.
9994 * util/grub.d/10_hurd.in: Likewise.
9995 * util/grub.d/10_linux.in: Likewise.
9996
9997 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9998 patterns. Use that to define the `.old' suffix as older than `'.
9999
10000 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10001
10002 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10003 the grub.cfg header message.
10004
2e610d62 100052007-05-11 Robert Millan <rmh@aybabtu.com>
10006
10007 * util/update-grub.in: Create device.map if it doesn't already exist,
10008 before attempting to run grub-probe.
10009 Check for grub-probe and grub-mkdevicemap with the same code
10010 grub-install is using.
10011 Remove test mode.
10012
3f6a10ef 100132007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10014
10015 * Makefile.in: Add the datarootdir autoconf variable.
10016
02e7b75e 100172007-05-09 Robert Millan <rmh@aybabtu.com>
10018
10019 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 10020 fail gracefully if dev->disk->partition == NULL.
02e7b75e 10021
75f396cc 100222007-05-07 Robert Millan <rmh@aybabtu.com>
10023
10024 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10025 determine partition map module.
10026 * util/i386/pc/grub-install.in: Use this feature to decide which
10027 partition module to load, instead of hardcoding pc and gpt.
10028
da65cb36 100292007-05-07 Robert Millan <rmh@aybabtu.com>
10030
10031 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10032 source directory differs from build directory.
10033
b57d6a91 100342007-05-05 Robert Millan <rmh@aybabtu.com>
10035
10036 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10037 initialisation.
10038
509d00f1 100392007-05-05 Robert Millan <rmh@aybabtu.com>
10040
10041 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10042
c48f23ef 100432007-05-05 Robert Millan <rmh@aybabtu.com>
10044
10045 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10046 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10047
20b97658 100482007-05-05 Robert Millan <rmh@aybabtu.com>
10049
10050 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10051 (grub_probe_SOURCES): Likewise.
10052 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10053 GPT and initialize dos_part and bsd_part accordingly.
10054 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10055 install_bsd_part.
10056 (main): Activate gpt module for use during partition identification,
10057 and deactivate it afterwards.
10058 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10059 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10060 partition identification, and deactivate it afterwards.
10061
99123174 100622007-05-05 Robert Millan <rmh@aybabtu.com>
10063
10064 * term/i386/pc/console.c (grub_console_fini): Call
10065 grub_term_set_current() before grub_term_unregister().
10066
ebd97f6e 100672007-05-04 Robert Millan <rmh@aybabtu.com>
10068
10069 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10070 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10071 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10072 and update-grub_DATA.
10073 * conf/common.rmk: Build and install update-grub components.
10074 * conf/common.mk: Regenerate.
10075 * util/update-grub.in: New. Core of update-grub.
10076 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10077 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10078 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10079 * util/grub.d/README: New. Document grub.d directory layout.
10080
b06a264d 100812007-05-01 Robert Millan <rmh@aybabtu.com>
10082
10083 * util/grub-emu.c: Move initialization functions
10084 grub_util_biosdisk_init() and grub_init_all() before
10085 grub_util_biosdisk_get_grub_dev(), which relies on them.
10086
41f0050e 100872007-04-19 Robert Millan <rmh@aybabtu.com>
10088
10089 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10090 it is used later.
10091
04582bb3 100922007-04-18 Jerone Young <jerone@gmail.com>
10093
f19dbdb7 10094 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 10095 stanza.
10096
08db4632 100972007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 10098
08db4632 10099 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10100 continue on and look for device node with real device name.
10101
801b76be 101022007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 10103
fe6b695a 10104 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 10105 ability.
10106 * Makefile.in: Add autoconf package transformation code.
10107 * util/i386/pc/grub-install.in: Likewise.
10108 * util/powerpc/ieee1275/grub-install.in: Likewise.
10109
6795c4e1 101102007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10111
10112 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10113 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10114 (EXT2_REVISION): Likewise.
10115 (EXT2_INODE_SIZE): Likewise.
10116 (struct grub_ext2_block_group): Added a missing member
10117 "used_dirs".
10118 (grub_ext2_read_inode): Divide by the inode size in a superblock
10119 instead of 128 to obtain INODES_PER_BLOCK.
10120 Use the macro EXT2_INODE_SIZE instead of directly using
10121 SBLOCK->INODE_SIZE.
10122
d70af616 101232007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10124
10125 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10126 superblock instead of the structure size to compute an
10127 offset. This fixes the problem that GRUB could not read a
10128 filesystem when inode size is different from 128-byte.
10129
3b801603 101302007-03-05 Marco Gerards <marco@gnu.org>
10131
10132 * normal/main.c (read_config_file): When "menu" is not set, create
10133 an initial context.
10134
4785bfe4 101352007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10136
10137 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10138 (HEAP_LIMIT): New macro.
10139 (grub_claim_heap): Claim memory up to `heaplimit'.
10140
a0cbb023 101412007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10142
10143 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10144 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10145 (_start): Likewise.
10146 (grub_arch_modules_addr): Return address after `_end'.
10147 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10148 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10149 (add_segments): Calculate `_end' from phdr size and location.
10150 (ALIGN_UP): Moved to ...
10151 * include/grub/misc.h: here.
10152 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10153 New macro.
10154 (GRUB_IEEE1275_MODULE_BASE): Removed.
10155
fd7d8eba 101562007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10157
10158 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10159 loop boundary.
10160
9b09e6fc 101612007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10162
10163 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10164 All users updated.
10165 (grub_elf64_load_hook_t): Likewise.
10166 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10167 debug output.
10168
3ce27299 101692007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10170
10171 * kern/mm.c: Update copyright.
10172 (grub_mm_debug): Correct syntax error.
10173 (grub_mm_dump_free): New function.
10174 (grub_debug_free): Call `grub_free'.
10175 * include/grub/mm.h: Update copyright.
10176 (grub_mm_dump_free): Add declaration.
10177
077d5fee 101782007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10179
10180 * include/grub/ieee1275/ieee1275.h: Update copyright.
10181 * kern/powerpc/ieee1275/init.c: Likewise.
10182 * kern/powerpc/ieee1275/openfw.c: Likewise.
10183
10184 * loader/powerpc/ieee1275/linux.c: Likewise.
10185 * include/grub/elfload.h: Likewise.
10186 * kern/elf.c: Likewise.
10187 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10188 callers.
10189 (grub_elf64_load): Likewise.
10190 (grub_elf32_load_segment): Move to a nested function.
10191 (grub_elf64_load_segment): Likewise.
10192
dc946850 101932007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10194
10195 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10196 prototype.
10197 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10198 (grub_heap_len): Likewise.
10199 (HEAP_SIZE): New macro.
10200 (grub_claim_heap): New function.
10201 (grub_machine_init): Don't claim heap directly. Call
10202 `grub_claim_heap'.
10203 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10204 (grub_available_iterate): New function.
10205
baa2a121 102062007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10207
10208 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10209 * configure.ac: Use it for testing the HOST and TARGET compilers.
10210
4fe9862e 102112006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10212
10213 * Makefile.in (enable_grub_emu): New variable.
10214 * configure.ac (--enable-grub-emu): New option.
10215 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10216 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10217 * conf/i386-pc.rmk: Likewise.
10218 * conf/powerpc-ieee1275.rmk: Likewise.
10219 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10220
a8aa5762 102212006-12-12 Marco Gerards <marco@gnu.org>
10222
10223 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10224
10225 * kern/env.c (grub_env_unset): Don't free the member `value' when
10226 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10227 pointer.
10228
10229 * normal/main.c (current_menu): Removed.
10230 (free_menu): Unset the `menu' environment variable.
10231 (grub_normal_menu_addentry): Make use of the environment variable
10232 `menu', instead of using the global `current_menu'. Allocate
10233 memory for the sourcecode of this entry.
10234 (read_config_file): New argument `nested', changed all callers.
10235 Only in the case of a new context, initialize a new menu. Set the
10236 `menu' environment variable.
10237 (grub_normal_execute): Don't set and unset the environment
10238 variable `menu' here anymore. Only free the menu when leaving the
10239 context.
10240
10241 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10242 leak.
10243
957b3a3e 102442006-12-11 Marco Gerards <marco@gnu.org>
10245
10246 * normal/menu_entry.c (run): Fix off by one bug so the last line
10247 is executed. Move the loader check to outside the loop.
10248
ef875714 102492006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10250
10251 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10252
4e739985 102532006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10254
10255 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10256 the number of sectors. Reported by Andrey Shuvikov
10257 <mr_hyro@yahoo.com>.
f19dbdb7 10258
790707f2 102592006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10260
10261 * kern/disk.c (grub_disk_read): When there is a read error, always
10262 try to read only the necessary data.
f19dbdb7 10263
790707f2 10264 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10265 disk/raid.c.
10266 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10267 prototype.
10268 [GRUB_UTIL] (grub_raid_fini): Likewise.
10269 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 10270 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 10271 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10272 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10273 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10274 and grub_raid_fini().
f19dbdb7 10275
03e58196 102762006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10277
10278 * include/grub/types.h (__unused): Rename to UNUSED.
10279 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10280 (grub_elf64_size): Likewise.
f19dbdb7 10281
ae4f23bf 102822006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10283
10284 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10285 grub_error_push and grub_error_pop in the error-handling path.
10286 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10287 length.
10288
2166cc83 102892006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10290
10291 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10292 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10293 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10294 (kernel_elf_SOURCES): Likewise.
10295 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10296 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10297 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10298 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10299 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10300 (elf_mod_SOURCES): New variable.
10301 (elf_mod_CFLAGS): Likewise.
10302 (elf_mod_LDFLAGS): Likewise.
10303 * include/grub/types.h (__unused): New macro.
10304 * include/grub/elfload.h: New file.
10305 * kern/elf.c: Likewise.
10306 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10307 (ELF32_LOADMASK): New macro.
10308 (ELF64_LOADMASK): Likewise.
10309 (vmlinux): Removed.
10310 (grub_linux_load32): New function.
10311 (grub_linux_load64): Likewise.
10312 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10313 Use grub_elf_t instead of grub_file_t.
10314
a09d5aa5 103152006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10316
10317 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10318 `catch_result' to struct set_color_args.
10319
d976fc51 103202006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10321
10322 * normal/menu.c: Include grub/script.h.
10323 * normal/menu_entry.c: Likewise.
10324 * include/grub/normal.h: Do not include grub/script.h.
10325
67507549 103262006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10327
10328 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10329
69203a99 103302006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10331
10332 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10333 disk.
10334 (grub_disk_close): Print debug messages when closing a disk.
10335 (grub_disk_read): Print debug messages when disk read fails.
10336 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10337 filesystem type.
10338 * kern/partition.c: Include misc.h.
10339 (grub_partition_iterate): Print debug messages when detecting
10340 partition type.
10341
e2b8278c 103422006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10343
10344 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10345 is negative.
10346 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10347
97b2f2ff 103482006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10349
10350 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10351 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10352
6555d655 103532006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10354
10355 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10356 instead of sizeof(lv). Patch by Michael Guntsche.
10357
4d42b77f 103582006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10359
10360 * disk/lvm.c: Rename VGS to VG_LIST.
10361 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10362 (grub_lvm_open): Likewise.
10363 Thanks to Michael Guntsche for finding this bug.
10364
5d74d927 103652006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10366
10367 * configure.ac (AC_INIT): Bumped to 1.95.
10368
a1bb27e4 103692006-10-14 Robert Millan <rmh@aybabtu.com>
10370
10371 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10372 with "/dev/.static/dev/md".
10373
e0994b8b 103742006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10375
10376 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10377 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10378 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10379 DRIVE_NAME are always freed.
10380
10381 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10382 DOS_PART, as a DOS partition is counted from one instead of zero
10383 now. Reported by Robert Millan.
10384
ddd5cee9 103852006-10-14 Robert Millan <rmh@aybabtu.com>
10386
10387 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10388 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10389 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10390 string returned by grub_guess_root_device.
10391 * util/i386/pc/grub-setup.c: Likewise.
10392 * util/i386/pc/grub-probefs.c: Likewise.
10393
10394 * util/i386/pc/grub-probefs.c: Rename to ...
10395 * util/i386/pc/grub-probe.c: ... this.
10396 * DISTLIST: Remove grub-probefs, add grub-probe.
10397 * conf/i386-efi.rmk: Likewise.
10398 * conf/i386-pc.rmk: Likewise.
10399 * util/i386/pc/grub-install.in: Likewise.
10400
10401 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10402 choose which information we want to print.
10403
2b002173 104042006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10405
10406 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10407 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10408 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10409 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10410 video/readers/tga.c and video/i386/pc/vbeutil.c.
10411
104122006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10413
10414 Added support for RAID and LVM.
f19dbdb7 10415
2b002173 10416 * disk/lvm.c: New file.
10417 * disk/raid.c: Likewise.
10418 * include/grub/lvm.h: Likewise.
f19dbdb7 10419 * include/grub/raid.h: Likewise.
2b002173 10420 * include/grub/util/lvm.h: Likewise.
10421 * include/grub/util/raid.h: Likewise.
10422 * util/lvm.c: Likewise.
10423 * util/raid.c: Likewise.
10424
10425 * include/grub/disk.h (grub_disk_dev_id): Add
10426 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10427 (grub_disk_get_size): New prototype.
10428 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10429 returns a partition.
10430 (grub_disk_get_size): New function.
f19dbdb7 10431
2b002173 10432 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10433 verbatim if grub_install_dos_part is -2.
10434
10435 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10436 and LVM devices.
10437
10438 * util/i386/pc/grub-setup.c (setup): New argument
10439 MUST_EMBED. Force embedding of GRUB when the argument is
10440 true. Close FILE before returning.
10441 (main): Add support for RAID and LVM.
f19dbdb7 10442
2b002173 10443 * conf/common.rmk: Add RAID and LVM modules.
10444 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10445 util/lvm.c.
10446 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10447
10448 * kern/misc.c (grub_strstr): New function.
10449 * include/grub/misc.h (grub_strstr): New prototype.
10450
050548d0 104512006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10452
10453 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10454
da849d2d 104552006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10456
10457 * kern/misc.c (grub_strtoull): Guess the base only if not
10458 specified.
10459
97b2f2ff 104602006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 10461
10462 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10463 PowerMac support.
10464
97b2f2ff 104652006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 10466
10467 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10468
10469 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10470 Remove `flags' argument. All callers changed.
10471 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10472 (IEEE1275_IHANDLE_INVALID): New variable.
10473 (IEEE1275_CELL_INVALID): New variable.
10474 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10475 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10476 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10477 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10478 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10479 codes from Open Firmware. All callers updated.
10480 (grub_ieee1275_next_property): Directly return Open Firmware return
10481 code.
10482 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10483 Standardize error checking from `grub_ieee1275_get_property'.
10484 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10485 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10486
97b2f2ff 104872006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 10488
10489 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10490 `instance_to_package_args' to `instance_to_path_args'.
10491
10492 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10493 `grub_ieee1275_chosen'.
10494
10495 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10496 `grub_ieee1275_interpret'.
10497
97b2f2ff 104982006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 10499
10500 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10501
97b2f2ff 105022006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 10503
10504 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10505 (__cmpdi): Likewise.
10506
10507 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10508 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10509 `grub_ssize_t'.
10510
02bb8acc 10511 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 10512
10513 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10514 to type `grub_ssize_t'.
10515 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10516
7f9a8531 105172006-09-22 Marco Gerards <marco@gnu.org>
10518
10519 * normal/script.c (grub_script_create_cmdmenu): Skip leading
10520 newlines.
10521
b5ef1102 105222006-09-22 Marco Gerards <marco@gnu.org>
10523
10524 * commands/echo.c: New file.
10525
10526 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10527
10528 * conf/common.rmk (echo_mod_SOURCES): New variable.
10529 (echo_mod_CFLAGS): Likewise.
10530 (echo_mod_LDFLAGS): Likewise.
10531
2cff3677 105322006-09-22 Marco Gerards <marco@gnu.org>
10533
10534 * normal/main.c (get_line): Malloc memory instead of using
10535 preallocated memory. Removed the arguments `cmdline' and
10536 `max_len'. Updated all callers.
10537
6ba4688b 105382006-09-22 Marco Gerards <marco@gnu.org>
10539
10540 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10541 (normal_mod_DEPENDENCIES): Likewise.
10542
10543 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10544 (normal_mod_DEPENDENCIES): Likewise.
10545
10546 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10547
e02ac02c 105482006-09-22 Johan Rydberg <jrydberg@gnu.org>
10549
10550 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10551 programs.
10552 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10553 (normal_mod_DEPENDENCIES): Likewise.
10554 * conf/i386-pc.mk: Regenerate.
10555 * conf/i386-efi.mk: Likewise
10556 * conf/common.mk: Likewise.
10557 * conf/powerpc-ieee1275.mk: Likewise.
10558 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10559
8d252e44 105602006-09-22 Robert Millan <rmh@aybabtu.com>
10561
10562 Sync with i386 version.
10563 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10564 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10565
209bf7ac 105662006-09-21 Robert Millan <rmh@aybabtu.com>
10567
10568 Import from GRUB Legacy (lib/device.c):
10569 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10570 (init_device_map) [__linux__]: Add support for I2O devices.
10571
6b146090 105722006-09-14 Marco Gerards <marco@gnu.org>
10573
10574 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10575 `-melf_i386'.
10576
e38600a8 105772006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 10578
10579 * util/i386/pc/grub-install.in: Skip menu.lst when removing
10580 /boot/grub/*.lst.
78fa1790 10581
2952da5d 10582 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 10583
2952da5d 10584 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10585 before adding it to device.map.
10586
01b82a64 105872006-08-15 Johan Rydberg <jrydberg@gnu.org>
10588
fe6b695a 10589 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 10590 compiles a file; using the -MD option.
10591 * conf/common.mk: Regenerate.
10592 * conf/i386-pc.mk: Likewise.
10593 * conf/i386-efi.mk: Likewise.
10594 * conf/powerpc-ieee1275.mk: Likewise.
10595 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10596
1064790d 105972006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10598
10599 Move the prototypes of grub_setjmp and grub_longjmp to
10600 cpu/setjmp.h, so that each architecture may specify different
10601 attributes.
f19dbdb7 10602
1064790d 10603 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10604 (grub_longjmp): Likewise.
10605 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10606 (grub_longjmp): Likewise.
10607 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10608 (grub_longjmp): Likewise.
10609
10610 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10611 [!GRUB_UTIL] (grub_longjmp): Removed.
10612
29dda3ed 106132006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
10614
10615 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10616 "color!" method does not return any value.
10617
ad2a06ed 106182006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10619
10620 * include/grub/bitmap.h: New file.
10621
10622 * include/grub/i386/pc/vbeutil.h: Likewise.
10623
10624 * video/bitmap.c: Likewise.
10625
10626 * video/readers/tga.c: Likewise.
10627
10628 * video/i386/pc/vbeutil.c: Likewise.
10629
10630 * commands/videotest.c: Code cleanup and updated to reflect to new
10631 video API.
10632
10633 * term/gfxterm.c: Likewise.
10634
10635 * video/video.c: Likewise.
10636
10637 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10638 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10639 (bitmap_mod_SOURCES): New entry.
10640 (bitmap_mod_CFLAGS): Likewise.
10641 (bitmap_mod_LDFLAGS): Likewise.
10642 (tga_mod_SOURCES): Likewise.
10643 (tga_mod_CFLAGS): Likewise.
10644 (tga_mod_LDFLAGS): Likewise.
10645
10646 * include/grub/video.h (grub_video_blit_operators): New enum type.
10647 (grub_video_render_target): Changed as forward declaration and moved
10648 actual definition to be video driver specific.
10649 (grub_video_adapter.blit_bitmap): Added blitting operator.
10650 (grub_video_adapter.blit_render_target): Likewise.
10651 (grub_video_blit_bitmap): Likewise.
10652 (grub_video_blit_render_target): Likewise.
10653
10654 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10655 driver specific render target definition.
10656 (grub_video_vbe_map_rgba): Added driver internal helper.
10657 (grub_video_vbe_unmap_color): Updated to use
10658 grub_video_i386_vbeblit_info.
10659 (grub_video_vbe_get_video_ptr): Likewise.
10660
10661 * include/grub/i386/pc/vbeblit.h
10662 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10663 grub_video_i386_vbeblit_info.
10664 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10665 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10666 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10667 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10668 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10669 (grub_video_i386_vbeblit_index_index): Likewise.
10670 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10671 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10672 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10673 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10674 operator.
10675 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10676 operator.
10677
10678 * video/i386/pc/vbeblit.c: Updated to reflect changes on
10679 include/grub/i386/pc/vbeblit.h.
10680
10681 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10682 Updated to use grub_video_i386_vbeblit_info.
10683 (grub_video_i386_vbefill_R8G8B8): Likewise.
10684 (grub_video_i386_vbefill_index): Likewise.
10685 (grub_video_i386_vbefill): Added generic filler.
10686
10687 * video/i386/pc/vbefill.c: Updated to reflect changes on
10688 include/grub/i386/pc/vbefill.h.
10689
10690 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10691 grub_video_i386_vbeblit_info.
10692 (grub_video_vbe_unmap_color): Likewise.
10693 (grub_video_vbe_blit_glyph): Likewise.
10694 (grub_video_vbe_scroll): Likewise.
10695 (grub_video_vbe_draw_pixel): Removed function.
10696 (grub_video_vbe_get_pixel): Likewise.
10697 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10698 updated code to use it.
10699 (common_blitter): Added common blitter for render target and bitmap.
10700 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10701 (grub_video_vbe_blit_render_target): Likewise.
10702
bc8c036d 107032006-07-30 Johan Rydberg <jrydberg@gnu.org>
10704
10705 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10706 is in text mode if there is no console control protocol instance
10707 available.
10708
684a8eff 107092006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10710
10711 * include/grub/video.h: Code cleanup.
10712
10713 * include/grub/i386/pc/vbe.h: Likewise.
10714
10715 * video/i386/pc/vbe.c: Likewise.
10716
10717 * video/i386/pc/vbeblit.c: Likewise.
10718
10719 * video/i386/pc/vbefill.c: Likewise.
10720
10721 * video/video.c: Likewise. Also added more comments.
10722
5915059b 107232006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10724
10725 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10726 (struct grub_biosdisk_dap): Likewise.
10727
10728 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
10729 linkage settings for all functions.
10730
90ce5d56 107312006-07-12 Marco Gerards <marco@gnu.org>
10732
10733 * configure.ac (--enable-mm-debug): Fix typo.
10734
10735 * genkernsyms.sh.in: Use proper quoting for `CC'.
10736
43e7f879 107372006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
10738
10739 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10740 (normal_mod_ASFLAGS): Remove "-m32".
10741
4889bdec 107422006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
10743
10744 * util/misc.c: Include config.h.
10745 [!HAVE_MEMALIGN]: Do not include malloc.h.
10746 (grub_memalign): Use posix_memalign, if present. Then, use
10747 memalign, if present. Otherwise, emit an error.
10748
10749 * util/grub-emu.c: Do not include malloc.h.
10750
10751 * include/grub/util/misc.h: Include unistd.h. This is required for
10752 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10753 D. Eades III <hde@foobar-qux.org>.
10754
10755 * configure.ac (AC_GNU_SOURCE): Added.
10756 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10757 type.
10758
fd39d4da 107592006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
10760
10761 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10762 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10763
b786f3b5 107642006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
10765
10766 * include/grub/types.h (grub_host_addr_t): Rename to
10767 grub_target_addr_t.
10768 (grub_host_off_t): Rename to grub_target_off_t.
10769 (grub_host_size_t): Rename to grub_target_size_t.
10770 (grub_host_ssize_t): Rename to grub_target_ssize_t.
10771 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10772
10773 * include/grub/kernel.h (struct grub_module_header): Change type
10774 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10775 (grub_module_info): Likewise.
f19dbdb7 10776
051988bb 107772006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10778
10779 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10780 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10781 Velazquez <jesus.velazquez@gmail.com>.
10782
deae281b 107832006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10784
10785 Count partitions from 1 instead of 0 in the string representation
10786 of partitions. Still use 0-based internally.
f19dbdb7 10787
deae281b 10788 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10789 (sun_partition_map_iterate): Use grub_partition_t instead of
10790 struct grub_partition *. Cast DESC->START_CYLINDER to
10791 grub_uint64_t after converting the endian.
10792 (sun_partition_map_probe): Subtract 1 for PARTNUM.
10793 (sun_partition_map_get_name): Add 1 to P->INDEX.
10794
10795 * partmap/pc.c (grub_partition_parse): Subtract 1 for
10796 PCDATA->DOS_PART.
10797 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10798
10799 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10800 zero instead of one.
10801 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10802 (gpt_partition_map_get_name): Add 1 into P->INDEX.
10803
10804 * partmap/apple.c (apple_partition_map_iterate): Change the type
10805 of POS to unsigned.
10806 (apple_partition_map_probe): Subtract 1 for PARTNUM.
10807 (apple_partition_map_get_name): Add 1 into P->INDEX.
10808
10809 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10810 of POS to unsigned.
10811 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10812 calculate the offset of a partition.
10813 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10814 (amiga_partition_map_get_name): Add 1 into P->INDEX.
10815
10816 * partmap/acorn.c (acorn_partition_map_find): Change the type of
10817 SECTOR to grub_disk_addr_t.
10818 (acorn_partition_map_iterate): Likewise.
10819 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10820 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10821 top.
10822 (acorn_partition_map_get_name): Add 1 into P->INDEX.
10823
10824 * kern/i386/pc/init.c (make_install_device): Add 1 into
10825 GRUB_INSTALL_DOS_PART.
10826
10827 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10828 conditional.
10829
524a1e6a 108302006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10831
10832 Clean up the code to support 64-bit addressing in disks and
10833 files. This change is not enough for filesystems yet.
f19dbdb7 10834
524a1e6a 10835 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10836 type of "start" to grub_uint64_t.
10837 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10838 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10839 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10840 convert addresses.
10841
10842 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10843 to grub_disk_addr_t.
10844
10845 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10846 string.
10847
10848 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10849
10850 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10851 to char *.
10852
10853 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10854
10855 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10856
10857 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10858
10859 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10860 to grub_off_t, to detect an error from grub_file_seek.
10861 (grub_multiboot_load_elf32): Likewise.
10862
10863 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10864 maximum unsigned long value when an overflow is detected.
10865 (grub_strtoull): New function.
10866 (grub_divmod64): Likewise.
10867 (grub_lltoa): use grub_divmod64.
10868
10869 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10870 grub_disk_addr_t.
10871 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10872 the pointer to next character. Use grub_strtoull instead of
10873 grub_strtoul.
10874 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10875 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10876 respectively.
10877
fe6b695a 10878 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 10879 return value is signed.
10880 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10881 test if OFFSET is less than zero, as OFFSET is unsigned now.
10882
10883 * kern/disk.c (struct grub_disk_cache): Change the type of
10884 "sector" to grub_disk_addr_t.
10885 (grub_disk_cache_get_index): Change the type of SECTOR to
10886 grub_disk_addr_t. Calculate the hash with SECTOR casted to
10887 unsigned after shifting.
10888 (grub_disk_cache_invalidate): Change the type of SECTOR to
10889 grub_disk_addr_t.
10890 (grub_disk_cache_unlock): Likewise.
10891 (grub_disk_cache_store): Likewise.
10892 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10893 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10894 grub_disk_addr_t and grub_uint64_t, respectively.
10895 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10896 body, as the value of OFFSET is tweaked by
10897 grub_disk_check_range. Change the types of START_SECTOR, LEN and
10898 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10899 respectively.
10900 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10901 body, as the value of OFFSET is tweaked by
10902 grub_disk_check_range. Change the types of LEN and N to
10903 grub_size_t.
10904
10905 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10906 and "saved_offset" to grub_off_t.
10907 (test_header): Cast BUF to char *.
10908 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10909 to char *.
10910 (grub_gzio_read): Change the types of OFFSET and SIZE to
10911 grub_off_t and grub_size_t, respectively.
10912
10913 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10914 Removed.
10915 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10916 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10917 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10918 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10919 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10920
10921 * include/grub/types.h (grub_off_t): Unconditionally set to
10922 grub_uint64_t.
10923 (grub_disk_addr_t): Changed to grub_uint64_t.
10924
10925 * include/grub/partition.h (struct grub_partition): Change the
10926 types of "start", "len" and "offset" to grub_disk_addr_t,
10927 grub_uint64_t and grub_disk_addr_t, respectively.
10928 (grub_partition_get_start): Return grub_disk_addr_t.
10929 (grub_partition_get_len): Return grub_uint64_t.
10930
10931 * include/grub/misc.h (grub_strtoull): New prototype.
10932 (grub_divmod64): Likewise.
10933
10934 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10935 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10936 grub_off_t, respectively.
10937 All callers and references changed.
10938
10939 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10940 grub_size_t in "read".
10941 All callers and references changed.
10942
10943 * include/grub/file.h (struct grub_file): Change the types of
10944 "offset" and "size" to grub_off_t and grub_off_t,
10945 respectively. Change the type of SECTOR to grub_disk_addr_t in
10946 "read_hook".
10947 (grub_file_read): Change the type of LEN to grub_size_t.
10948 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10949 grub_off_t.
10950 (grub_file_size): Return grub_off_t.
10951 (grub_file_tell): Likewise.
10952 All callers and references changed.
10953
10954 * include/grub/disk.h (struct grub_disk_dev): Change the types of
10955 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10956 "write".
10957 (struct grub_disk): Change the type of "total_sectors" to
10958 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 10959 "read_hook".
524a1e6a 10960 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10961 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10962 (grub_disk_write): Likewise.
10963 All callers and references changed.
10964
10965 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10966 char * for grub_strncmp to silence gcc.
10967 (grub_iso9660_mount): Likewise.
10968 (grub_iso9660_mount): Likewise.
10969 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10970 return statement.
10971 (grub_iso9660_iterate_dir): Likewise.
10972 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10973
10974 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10975 LEN to grub_disk_addr_t and grub_size_t, respectively.
10976
10977 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10978
10979 * fs/jfs.c (grub_jfs_read_file): Likewise.
10980
10981 * fs/minix.c (grub_jfs_read_file): Likewise.
10982
10983 * fs/sfs.c (grub_jfs_read_file): Likewise.
10984
10985 * fs/ufs.c (grub_jfs_read_file): Likewise.
10986
10987 * fs/xfs.c (grub_jfs_read_file): Likewise.
10988
10989 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10990 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10991 respectively.
10992
10993 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10994 BLKNR to -1 instead of returning GRUB_ERRNO.
10995 (grub_ext2_read_file): Change the types of SECTOR and
10996 LEN to grub_disk_addr_t and grub_size_t, respectively.
10997
10998 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10999 LEN to grub_disk_addr_t and grub_size_t, respectively.
11000
11001 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11002 grub_file_read.
11003
11004 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11005 string. Do not cast SECTOR explicitly.
11006
11007 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11008 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11009 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11010 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11011 over 2TB and LBA mode is not supported, raise an error.
11012 (get_safe_sectors): New function.
11013 (grub_biosdisk_read): Use get_safe_sectors.
11014 (grub_biosdisk_write): Likewise.
11015
11016 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11017 (grub_efidisk_write): Likewise.
11018
11019 * disk/loopback.c (delete_loopback): Cosmetic changes.
11020 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11021 correctly.
11022 (grub_loopback_open): Likewise.
11023 (grub_loopback_read): Likewise. Also, change the type of POS to
11024 grub_off_t, and fix the usage of grub_memset.
11025
11026 * commands/i386/pc/play.c: Include grub/machine/time.h.
11027
11028 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11029 print FILE->SIZE.
11030
11031 * commands/configfile.c: Include grub/env.h.
11032
11033 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11034 GRUB_ERRNO directly instead. Change the type of POS to
11035 grub_off_t. Follow the coding standard.
11036
11037 * commands/blocklist.c: Include grub/partition.h.
11038 (grub_cmd_blocklist): Return an error if the underlying device is
11039 not a disk. Take the starting sector of a partition into account,
11040 if a partition is used.
11041
11042 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11043 a length field.
11044 (lba_mode): Support 64-bit addresses.
11045 (chs_mode): Likewise.
11046 (copy_buffer): Adapted to the new offsets of a length field and a
11047 segment field.
11048 (blocklist_default_start): Allocate 64-bit space.
11049
11050 * boot/i386/pc/boot.S (force_lba): Removed.
11051 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 11052 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 11053 space.
11054 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11055 is useless.
11056 (lba_mode): Refactored to support a 64-bit address. More size
11057 optimization.
11058 (setup_sectors): Likewise.
11059
53af98ad 110602006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11061
11062 * DISTLIST: Added include/grub/i386/linux.h. Removed
11063 include/grub/i386/pc/linux.h
11064
11065 * configure.ac (AC_INIT): Bumped to 1.94.
11066
11067 * config.guess: Updated from gnulib.
11068 * config.sub: Likewise.
11069 * install-sh: Likewise.
11070 * mkinstalldirs: Likewise.
11071
b4c1940a 110722006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11073
11074 * conf/common.rmk (grub_modules_init.lst): Depended on
11075 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11076 MODSRCFILES.
11077
11078 * genmk.rb (PModule::rule): Reverted the previous change.
11079
cfca1cfd 110802006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11081
11082 * conf/common.rmk (grub_modules_init.lst): Depends on
11083 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11084 that the target does not exist before producing.
11085 (grub_modules_init.h): Remove the target before generating.
11086 (grub_emu_init.c): Likewise.
11087
11088 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11089
aa6d7826 110902006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11091
11092 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11093 for the target-specific tests. Make sure that we also have the
11094 up-to-date target variables for those tests.
11095
26c607b9 110962006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11097
11098 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11099 (PModule::rule): Likewise.
11100
0162321a 111012006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11102
11103 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11104 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11105 target-specific flags should be prefixed.
11106 (PModule::rule): Likewise.
11107
6c826348 111082006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11109
11110 * configure.ac (CMP): Check if cmp is available explicitly.
11111
b977bf01 111122006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11113
11114 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11115 (target_cpu): New variable.
11116 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 11117
b977bf01 11118 * util/i386/pc/grub-install.in (host_cpu): Removed.
11119 (target_cpu): New variable.
11120 (pkglibdir): Use target_cpu instead of host_cpu.
11121
11122 * util/genmoddep.c: Removed.
f19dbdb7 11123
b977bf01 11124 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11125 instead of GRUB_HOST_SIZEOF_VOID_P.
11126 * kern/dl.c: Likewise.
11127
11128 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11129 ...
11130 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11131 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11132 (GRUB_TARGET_SIZEOF_LONG): ... this.
11133 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11134 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11135 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11136 to ...
11137 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11138 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11139 (GRUB_TARGET_SIZEOF_LONG): ... this.
11140 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11141 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11142 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11143 to ...
11144 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11145 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11146 (GRUB_TARGET_SIZEOF_LONG): ... this.
11147 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11148 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11149
11150 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11151 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11152 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11153 instead of GRUB_HOST_SIZEOF_LONG.
11154 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11155 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11156 GRUB_CPU_WORDS_BIGENDIAN.
11157 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11158 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11159 grub_host_ssize_t.
11160
11161 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11162 (genmoddep_SOURCES): Likewise.
11163 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11164 (genmoddep_SOURCES): Likewise.
11165 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11166 (genmoddep_SOURCES): Likewise.
11167 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11168 Likewise.
11169 (genmoddep_SOURCES): Likewise.
11170
11171 * genmoddep.awk: New file.
11172
11173 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11174 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11175 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11176 (PModule::rule): Likewise.
11177 (Program::rule): Likewise.
11178 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11179 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11180 respectively.
11181
11182 * configure.ac: Rewritten intensively to use host and target
11183 instead of build and host, respectively.
11184
11185 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11186 (host_cpu): Removed.
11187 (target_cpu): New variable.
11188 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11189 (BUILD_CC): Removed.
11190 (BUILD_CFLAGS): Likewise.
11191 (BUILD_CPPFLAGS): Likewise.
11192 (TARGET_CC): New variable.
11193 (TARGET_CFLAGS): Likewise.
11194 (TARGET_CPPFLAGS): Likewise.
11195 (TARGET_LDFLAGS): Likewise.
11196 (AWK): Likewise.
11197 (include): Use target_cpu instead of host_cpu.
11198 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 11199
b977bf01 11200 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11201
f09771a1 112022006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11203
11204 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11205 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11206 field 'false' to 'exec_on_false'.
11207 (grub_script_create_cmdif): Renamed argument names to reflect above
11208 changes.
11209
11210 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11211
11212 * normal/script.c (grub_script_create_cmdif): Likewise.
11213
118f4fb3 112142006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11215
11216 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11217 top.
11218 (grub_hfsplus_btree_recptr): Likewise.
11219 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11220 FILEBLOCK both to pass a block number and store next block
11221 number.
11222 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11223 overflow file correctly. Specify errors appropriately, because
11224 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11225 grub_hfsplus_btree_recptr to get the pointer to a found key.
11226 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11227 is found.
11228
11229 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11230 linux.mod.
11231 (_linux_mod_SOURCES): New variable.
11232 (_linux_mod_CFLAGS): Likewise.
11233 (_linux_mod_LDFLAGS): Likewise.
11234 (linux_mod_SOURCES): Likewise.
11235 (linux_mod_CFLAGS): Likewise.
11236 (linux_mod_LDFLAGS): Likewise.
11237
11238 * DISTLIST: Added loader/i386/efi/linux.c,
11239 loader/i386/efi/linux_normal.c and
11240 include/grub/i386/efi/loader.h.
11241
11242 * loader/i386/efi/linux.c: New file.
11243 * loader/i386/efi/linux_normal.c: Likewise.
11244 * include/grub/i386/efi/loader.h: Likewise.
11245
89a7d726 112462006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11247
11248 * commands/blocklist.c: New file.
11249
11250 * DISTLIST: Added commands/blocklist.c.
11251
11252 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 11253 color for the background, and a darker color for the foreground.
89a7d726 11254 (grub_console_checkkey): Return READ_KEY.
11255 (grub_console_cls): Set the background to
11256 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11257
11258 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11259
11260 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11261 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11262
11263 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11264 prototype.
11265
11266 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11267 BG. The spec is wrong again.
11268
11269 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11270 prototype.
11271 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11272
11273 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11274 commands/blocklist.c.
11275 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 11276
89a7d726 11277 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11278 (blocklist_mod_SOURCES): New variable.
11279 (blocklist_mod_CFLAGS): Likewise.
11280 (blocklist_mod_LDFLAGS): Likewise.
11281
75c8f258 112822006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11283
11284 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11285 duplication.
11286 (lba_mode): Use %eax more intensively to reduce the code size.
11287
da2eb181 112882006-05-20 Marco Gerards <marco@gnu.org>
11289
11290 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11291
11292 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11293 for `menuentry'.
11294 (script): Accept leading newlines.
11295 (newlines): New rule to describe 0 or more newlines.
11296 (commands): Accept `command' with trailing newline. Fixed the
11297 order in which arguments were passed to `grub_script_add_cmd'.
11298 Accept commands separated by newlines.
11299 (function): Changed to accept newlines.
11300 (menuentry) Rewritten.
11301
11302 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11303 front of the list, instead of to the end.
11304
577b4050 113052006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11306
11307 * util/i386/pc/grub-install.in (bindir): New variable.
11308 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11309 Shaver <lbgwjl@gmail.com>.
11310
0d6e1189 113112006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11312
11313 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11314 grub/machine/linux.h
11315 * loader/i386/pc/linux.c: Likewise.
11316
11317 * include/grub/i386/pc/linux.h: Moved to ...
11318 * include/grub/i386/linux.h: ... here.
11319
11320 * include/grub/i386/linux.h (struct linux_kernel_params): New
11321 struct.
f19dbdb7 11322
31b86e9f 113232006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11324
11325 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11326 checking.
11327 (grub_video_vbe_blit_glyph): Likewise.
11328 (grub_video_vbe_blit_bitmap): Likewise.
11329 (grub_video_vbe_blit_render_target): Likewise.
11330
83b984de 113312006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11332
11333 * configure.ac (--with-platform): Properly quote the square
11334 brackets.
11335
5f0413bd 113362006-05-08 Marco Gerards <marco@gnu.org>
11337
11338 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11339 this...
11340 (kernel_elf_HEADERS): ...to this. Updated all users.
11341 (grubof_symlist.c): Renamed from this...
11342 (kernel_elf_symlist.c): ...to this. Updated all users.
11343 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11344 (grubof_SOURCES): Renamed from this...
11345 (kernel_elf_SOURCES): ...to this.
11346 (grubof_HEADERS): Renamed from this...
11347 (kernel_elf_HEADERS): ...to this.
11348 (grubof_CFLAGS): Renamed from this...
11349 (kernel_elf_CFLAGS): ...to this.
11350 (grubof_ASFLAGS): Renamed from this...
11351 (kernel_elf_ASFLAGS): ...to this.
11352 (grubof_LDFLAGS): Renamed from this...
11353 (kernel_elf_LDFLAGS): ...to this.
11354
11355 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11356 this...
11357 (kernel_elf_HEADERS): ...to this. Updated all users.
11358 (grubof_symlist.c): Renamed from this...
11359 (kernel_elf_symlist.c): ...to this. Updated all users.
11360 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11361 (grubof_SOURCES): Renamed from this...
11362 (kernel_elf_SOURCES): ...to this.
11363 (grubof_HEADERS): Renamed from this...
11364 (kernel_elf_HEADERS): ...to this.
11365 (grubof_CFLAGS): Renamed from this...
11366 (kernel_elf_CFLAGS): ...to this.
11367 (grubof_ASFLAGS): Renamed from this...
11368 (kernel_elf_ASFLAGS): ...to this.
11369 (grubof_LDFLAGS): Renamed from this...
11370 (kernel_elf_LDFLAGS): ...to this.
11371
11372 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11373 `kernel.elf' instead of `grubof'.
11374
05568c2e 113752006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11376
11377 Add --with-platform to configure. Use pkglibdir instead of
11378 pkgdatadir. This is reported by Roger Leigh.
11379
11380 * util/powerpc/ieee1275/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.
f19dbdb7 11387
05568c2e 11388 * util/i386/pc/grub-install.in (datadir): Removed.
11389 (host_vendor): Likewise.
11390 (host_os): Likewise.
11391 (pkgdatadir): Likewise.
11392 (platform): New variable.
11393 (pkglibdir): Likewise.
11394 Use PKGLIBDIR instead of PKGDATADIR.
11395
11396 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11397 instead of GRUB_DATADIR.
11398 (main): Likewise.
11399 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11400 (main): Likewise.
11401 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11402 (main): Likewise.
11403
11404 * configure.ac (--with-platform): New option.
11405 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11406
11407 * Makefile.in: Include a makefile based on PLATFORM instead of
11408 HOST_VENDOR.
11409 (pkgdatadir): Not appended by the machine type.
11410 (pkglibdir): Appended by the machine type.
11411 (host_vendor): Removed.
11412 (platform): New variable.
11413 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11414 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11415 (uninstall): Likewise.
11416
4e93851c 114172006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11418
11419 Use the environment context in the menu. Remove the commands
11420 "default" and "timeout", and use variables instead.
f19dbdb7 11421
4e93851c 11422 * normal/menu.c: Include grub/env.h.
11423 (print_entry): Cast TITLE to silence gcc.
11424 (get_timeout): New function.
11425 (set_timeout): Likewise.
11426 (get_entry_number): Likewise.
11427 (run_menu): Use a default entry, a fallback entry and a timeout
11428 in the environment variables "default", "fallback" and
11429 "timeout". Also, tweak the default entry if it is not within the
11430 current menu entries.
11431 (grub_menu_run): Use a fallback entry in the environment variable
11432 "fallback".
11433
11434 * normal/main.c (read_config_file): Do not initialize
11435 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11436 NEWMENU->TIMEOUT.
11437 (grub_normal_execute): Use a data slot to store the menu.
11438
11439 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11440 fallback_entry and timeout.
11441 (struct grub_menu_list): Removed.
11442 (grub_menu_list_t): Likewise.
11443 (struct grub_context): Likewise.
11444 (grub_context_t): Likewise.
11445 (grub_context_get): Likewise.
11446 (grub_context_get_current_menu): Likewise.
11447 (grub_context_push_menu): Likewise.
11448 (grub_context_pop_menu): Likewise.
11449 (grub_default_init): Likewise.
11450 (grub_default_fini): Likewise.
11451 (grub_timeout_init): Likewise.
11452 (grub_timeout_fini): Likewise.
11453
11454 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11455 and timeout.mod.
11456 (normal_mod_SOURCES): Removed normal/context.c.
11457
11458 * conf/powerpc-ieee1275.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/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11463 commands/timeout.c and normal/context.c.
11464 (normal_mod_SOURCES): Removed normal/context.c.
11465
11466 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11467 commands/default.c, commands/timeout.c and normal/context.c.
11468 (normal_mod_SOURCES): Removed normal/context.c.
11469
11470 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11471 timeout.mod.
11472 (default_mod_SOURCES): Removed.
11473 (default_mod_CFLAGS): Likewise.
11474 (default_mod_LDFLAGS): Likewise.
11475 (timeout_mod_SOURCES): Removed.
11476 (timeout_mod_CFLAGS): Likewise.
11477 (timeout_mod_LDFLAGS): Likewise.
11478
11479 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11480 normal/context.c.
11481
11482 * commands/default.c: Removed.
11483 * commands/timeout.c: Likewise.
11484 * normal/context.c: Likewise.
11485
1eb9cc1d 114862006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11487
11488 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11489
385bd9c1 114902006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11491
11492 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11493 "next" to "prev" for readability.
11494 (struct grub_env_sorted_var): New struct.
11495 (grub_env_context): Renamed to ...
11496 (initial_context): ... this.
11497 (grub_env_var_context): Renamed to ...
11498 (current_context): ... this.
11499 (grub_env_find): Look only at CURRENT_CONTEXT.
11500 (grub_env_context_open): Rewritten to copy exported variables from
11501 previous context.
11502 (grub_env_context_close): Rewritten according to the new
11503 scheme. Also, add an assertion to prevent the initial context from
11504 removed.
11505 (grub_env_insert): Removed the code for the sorted list.
11506 (grub_env_remove): Likewise.
11507 (grub_env_export): Simply mark the variable with
11508 GRUB_ENV_VAR_GLOBAL.
11509 (grub_env_set): A cosmetic change for naming consistency.
11510 (grub_env_get): Likewise.
11511 (grub_env_unset): Likewise.
11512 (grub_env_iterate): Rewritten to sort variables within this
11513 function.
11514 (grub_register_variable_hook): Fixed for naming consistency. Call
11515 grub_env_find again, only if NAME is not found at the first time.
11516 (mangle_data_slot_name): New function.
11517 (grub_env_set_data_slot): Likewise.
11518 (grub_env_get_data_slot): Likewise.
11519 (grub_env_unset_data_slot): Likewise.
11520
11521 * include/grub/env.h (grub_env_var_type): New enum.
11522 (GRUB_ENV_VAR_LOCAL): New constant.
11523 (GRUB_ENV_VAR_GLOBAL): Likewise.
11524 (GRUB_ENV_VAR_DATA): Likewise.
11525 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11526 "type".
11527 (grub_env_set): Replace VAR with NAME for consistency.
11528 (grub_register_variable_hook): Likewise.
11529 (grub_env_export): Specify the name of the argument.
11530 (grub_env_set_data_slot): New prototype.
11531 (grub_env_get_data_slot): Likewise.
11532 (grub_env_unset_data_slot): Likewise.
11533
7f362539 115342006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11535
11536 Extend the loader so that GRUB can accept a loader which comes
11537 back to GRUB when a loaded image exits. Also, this change adds
11538 support for a chainloader on EFI.
f19dbdb7 11539
7f362539 11540 * term/efi/console.c: Include grub/misc.h.
11541 (grub_console_checkkey): Display a scan code on the top for
11542 debugging. This will be removed once the EFI port gets stable.
11543 Correct the scan code mapping.
11544
11545 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11546 allocate memory from larger regions, in order to reduce the number
11547 of allocated regions. Otherwise, the MacOSX loader panics.
11548 (filter_memory_map): Avoid less than 1MB for compatibility with
11549 other loaders.
11550 (add_memory_regions): Allocate from the tail of a region, if
11551 possible, to avoid allocating a region near to 1MB, for the MacOSX
11552 loader.
11553
11554 * kern/efi/init.c (grub_efi_set_prefix): Specify
11555 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11556
11557 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11558 argument IMAGE_HANDLE and specify it to get a loaded image.
11559 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11560 grub_efi_get_loaded_image.
fe6b695a 11561 (grub_efi_get_filename): Divide the length by the size of
7f362539 11562 grub_efi_char16_t.
11563 (grub_efi_get_device_path): New function.
11564 (grub_efi_print_device_path): Print End Device Path nodes. Divide
11565 the length by the size of grub_efi_char16_t for a file path device
11566 path node.
11567
11568 * kern/loader.c (grub_loader_noreturn): New variable.
11569 (grub_loader_set): Accept a new argument NORETURN. Set
11570 GRUB_LOADER_NORETURN to NORETURN.
11571 All callers changed.
11572 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11573 grub_machine_fini.
11574
11575 * include/grub/efi/efi.h (grub_efi_get_device_path): New
11576 prototype.
11577 (grub_efi_get_loaded_image): Take an argument to specify an image
11578 handle.
11579
11580 * include/grub/loader.h (grub_loader_set): Added one more argument
11581 NORETURN.
11582
11583 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11584 instead of grub_efi_open_protocol.
11585 (grub_efidisk_get_device_name): Likewise.
11586 (grub_efidisk_close): Print a newline.
11587 (grub_efidisk_get_device_handle): Fixed to use
11588 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11589 GRUB_EFI_DEVICE_PATH_TYPE.
11590
11591 * disk/efi/efidisk.c (device_path_guid): Moved to ...
11592 * kern/efi/efi.c (device_path_guid): ... here.
11593
11594 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11595 chain.mod.
11596 (kernel_mod_HEADERS): Added efi/disk.h.
11597 (_chain_mod_SOURCES): New variable.
11598 (_chain_mod_CFLAGS): Likewise.
11599 (_chain_mod_LDFLAGS): Likewise.
11600 (chain_mod_SOURCES): Likewise.
11601 (chain_mod_CFLAGS): Likewise.
11602 (chain_mod_LDFLAGS): Likewise.
11603
11604 * DISTLIST: Added include/grub/efi/chainloader.h,
11605 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11606
11607 * include/grub/efi/chainloader.h: New file.
11608 * loader/efi/chainloader.c: Likewise.
11609 * loader/efi/chainloader_normal.c: Likewise.
11610
c0111d6e 116112006-04-30 Marco Gerards <marco@gnu.org>
11612
11613 * commands/configfile.c (grub_cmd_source): New function.
11614 (GRUB_MOD_INIT): Register the commands `source' and `.'.
11615 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11616
df5341da 116172006-04-30 Marco Gerards <marco@gnu.org>
11618
11619 * normal/execute.c (grub_script_execute_cmd): Change the return
11620 type to `grub_err_t'. Correctly return the error.
11621 (grub_script_execute_cmdline): In case a command line is not a
11622 command or a function, try to interpret it as an assignment.
11623
f85934bd 116242006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11625
11626 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11627 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11628 skip a node whose name is obviously invalid as UTF-16,
11629 i.e. contains a NUL character. Stop the iteration when the last
11630 directory entry is found. Instead of using the return value of
11631 grub_hfsplus_btree_iterate_node, store the value in RET and use
11632 it, because the iterator can be stopped by the last directory
11633 entry.
11634
8f8a2cf8 116352006-04-30 Marco Gerards <marco@gnu.org>
11636
11637 * include/grub/env.h (grub_env_export): New prototype. Reported
11638 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11639
a27e84ce 116402006-04-30 Marco Gerards <marco@gnu.org>
11641
11642 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11643 size of the extents in a catalog file record.
11644
eaef0553 116452006-04-29 Marco Gerards <marco@gnu.org>
11646
11647 * commands/configfile.c (grub_cmd_configfile): Execute the
11648 configfile within its own context.
11649
11650 * include/grub/env.h (grub_env_context_open): New prototype.
11651 (grub_env_context_close): Likewise.
11652
11653 * kern/env.c (grub_env): Removed.
11654 (grub_env_sorted): Likewise.
11655 (grub_env_context): New variable.
11656 (grub_env_var_context): Likewise.
11657 (grub_env_find): Search both the active context and the global
11658 context.
11659 (grub_env_context_open): New function.
11660 (grub_env_context_close): Likewise.
11661 (grub_env_insert): Likewise.
11662 (grub_env_remove): Likewise.
11663 (grub_env_export): Likewise.
11664 (grub_env_set): Changed to use helper functions to avoid code
11665 duplication.
11666 (grub_env_iterate): Rewritten so both the current context and the
11667 global context are being used.
11668
11669 * normal/command.c (export_command): New function.
11670 (grub_command_init): Register the `export' function.
11671
7b455f4d 116722006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
11673
11674 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11675 explicitly to suppress gcc's warnings.
11676 * fs/fat.c (grub_fat_find_dir): Likewise.
11677 (grub_fat_label): Likewise.
11678 * fs/xfs.c (grub_xfs_read_inode): Likewise.
11679 (grub_xfs_mount): Likewise.
11680 (grub_xfs_label): Likewise.
11681 * fs/affs.c (grub_affs_mount): Likewise.
11682 (grub_affs_label): Likewise.
11683 (grub_affs_iterate_dir): Likewise.
11684 * fs/sfs.c (grub_sfs_mount): Likewise.
11685 (grub_sfs_iterate_dir): Likewise.
11686 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11687 * fs/hfs.c (grub_hfs_mount): Likewise.
11688 (grub_hfs_cmp_catkeys): Likewise.
11689 (grub_hfs_find_dir): Likewise.
11690 (grub_hfs_dir): Likewise.
11691 (grub_hfs_label): Likewise.
11692 * fs/jfs.c (grub_jfs_mount): Likewise.
11693 (grub_jfs_opendir): Likewise.
11694 (grub_jfs_getent): Likewise.
11695 (grub_jfs_lookup_symlink): Likewise.
11696 (grub_jfs_label): Likewise.
11697 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11698 (grub_hfsplus_iterate_dir): Likewise.
11699 (grub_hfsplus_btree_iterate_node): Made static.
11700
11701 * util/grub-emu.c (prefix): New variable.
11702 (grub_machine_set_prefix): New function.
11703 (main): Do not set the environment variable "prefix" here. Only
11704 set PREFIX, which is used later by grub_machine_set_prefix.
11705
11706 * include/grub/video.h: Do not include grub/symbol.h.
11707 (grub_video_register): Not exported. This symbol is not defined in
11708 the kernel.
11709 (grub_video_unregister): Likewise.
11710 (grub_video_iterate): Likewise.
11711 (grub_video_setup): Likewise.
11712 (grub_video_restore): Likewise.
11713 (grub_video_get_info): Likewise.
11714 (grub_video_get_blit_format): Likewise.
11715 (grub_video_set_palette): Likewise.
11716 (grub_video_get_palette): Likewise.
11717 (grub_video_set_viewport): Likewise.
11718 (grub_video_get_viewport): Likewise.
11719 (grub_video_map_color): Likewise.
11720 (grub_video_map_rgb): Likewise.
11721 (grub_video_map_rgba): Likewise.
11722 (grub_video_fill_rect): Likewise.
11723 (grub_video_blit_glyph): Likewise.
11724 (grub_video_blit_bitmap): Likewise.
11725 (grub_video_blit_render_target): Likewise.
11726 (grub_video_scroll): Likewise.
11727 (grub_video_swap_buffers): Likewise.
11728 (grub_video_create_render_target): Likewise.
11729 (grub_video_delete_render_target): Likewise.
11730 (grub_video_set_active_render_target): Likewise.
11731
11732 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11733 Undefined.
11734 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11735
11736 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11737 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11738 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11739 instead of $(srcdir)/genkernsyms.sh.
11740
11741 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11742 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11743 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11744 instead of $(srcdir)/genkernsyms.sh.
11745
11746 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11747 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11748 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11749 instead of $(srcdir)/genkernsyms.sh.
11750
11751 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11752 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11753 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11754 instead of $(srcdir)/genkernsyms.sh.
11755
11756 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11757 genkernsyms.sh.
11758
11759 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11760 genkernsyms.sh.
11761 (gensymlist.sh): New target.
11762 (genkernsyms.sh): Likewise.
11763
11764 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11765 genkernsyms.sh.in and gensymlist.sh.in.
11766
11767 * genkernsyms.sh: Removed.
11768 * gensymlist.sh: Likewise.
f19dbdb7 11769
7b455f4d 11770 * genkernsyms.sh.in: New file.
11771 * gensymlist.sh.in: Likewise.
11772
1885bb27 117732006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11774
11775 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11776 clobber "prefix", since we may have already set it manually.
11777
71538dff 117782006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11779
11780 * kern/misc.c (abort): New alias for grub_abort.
11781
2965c7cc 117822006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
11783
11784 A new machine-specific function "grub_machine_set_prefix" is
11785 defined. This is called after loading modules, so that a prefix
11786 initialization can use modules. Also, this change adds an
11787 intensive debugging feature for the memory manager via the
11788 configure option "--enable-mm-debug".
f19dbdb7 11789
2965c7cc 11790 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11791 PART.LEN.
11792
11793 * kern/sparc64/ieee1275/init.c (abort): Removed.
11794 (grub_stop): Likewise.
11795 (grub_exit): New function.
11796 (grub_set_prefix): Renamed to ...
11797 (grub_machine_set_prefix): ... this.
11798 (grub_machine_init): Do not call grub_set_prefix.
11799
11800 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11801 (grub_machine_set_prefix): ... this.
11802 (grub_machine_init): Do not call grub_set_prefix.
11803
11804 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11805 (grub_machine_init): Do not set the prefix here.
11806
11807 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11808
11809 * kern/efi/init.c: Include grub/mm.h.
11810 (grub_efi_set_prefix): New function.
11811
11812 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11813 (grub_efi_get_filename): New function.
11814 (grub_print_device_path): Renamed to ...
11815 (grub_efi_print_device_path): ... this.
11816
11817 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11818 [MM_DEBUG] (grub_realloc): Likewise.
11819 [MM_DEBUG] (grub_free): Likewise.
11820 [MM_DEBUG] (grub_memalign): Likewise.
11821 [MM_DEBUG] (grub_mm_debug): New variable.
11822 [MM_DEBUG] (grub_debug_malloc): New function.
11823 [MM_DEBUG] (grub_debug_free): New function.
11824 [MM_DEBUG] (grub_debug_realloc): New function.
11825 [MM_DEBUG] (grub_debug_memalign): New function.
11826
11827 * kern/misc.c (grub_abort): Print a newline to distinguish
11828 the message.
11829
11830 * kern/main.c (grub_main): Call grub_machine_set_prefix and
11831 grub_set_root_dev after loading modules. This is necessary when
11832 setting a prefix depends on modules.
11833
11834 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11835 (grub_efi_print_device_path): ... this.
11836 (grub_efi_get_filename): New prototype.
11837 (grub_efi_set_prefix): Likewise.
11838
11839 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11840 and grub/disk.h.
11841 (grub_efidisk_get_device_handle): New prototype.
11842 (grub_efidisk_get_device_name): Likewise.
11843
11844 * include/grub/mm.h: Include config.h.
11845 (MM_DEBUG): Removed.
11846 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11847 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11848 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11849 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11850 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11851 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11852 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11853 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11854 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11855
11856 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11857
11858 * disk/efi/efidisk.c: Include grub/partition.h.
11859 (iterate_child_devices): New function.
11860 (add_device): First, compare only last device path nodes, so that
11861 devices are sorted by the types.
11862 (grub_efidisk_get_device_handle): New function.
11863 (grub_efidisk_get_device_name): Likewise.
11864
11865 * configure.ac (--enable-mm-debug): New option to enable the
11866 memory manager debugging feature. This makes the binary much
11867 bigger, so is disabled by default.
11868
9cacaa17 118692006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
11870
11871 Use grub_abort instead of grub_stop, and grub_exit must be
11872 define in each architecture now. Also, this change adds support
11873 for EFI disks.
f19dbdb7 11874
9cacaa17 11875 * util/i386/pc/grub-probefs.c: Include grub/term.h.
11876 (grub_getkey): New function.
11877 (grub_term_get_current): Likewise.
11878
11879 * util/i386/pc/grub-setup.c: Include grub/term.h.
11880 (grub_getkey): New function.
11881 (grub_term_get_current): Likewise.
11882
11883 * util/misc.c (grub_stop): Renamed to ...
11884 (grub_exit): ... this.
11885
11886 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11887 (grub_exit): ... this.
11888 (grub_machine_init): Use grub_abort instead of abort.
11889 (grub_stop): Removed.
11890
11891 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11892 abort.
11893
11894 * kern/i386/pc/startup.S (grub_exit): New function.
11895 (cold_reboot): New label.
11896
11897 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11898 (grub_efi_init): Call grub_efidisk_init.
11899 (grub_efi_fini): Call grub_efidisk_fini.
11900
11901 * kern/efi/efi.c: Include grub/mm.h.
11902 (grub_efi_console_control_guid): Renamed to ...
11903 (console_control_guid): ... this.
11904 (grub_efi_loaded_image_guid): Renamed to ...
11905 (loaded_image_guid): ... this.
11906 (grub_efi_locate_handle): New function.
11907 (grub_efi_open_protocol): Likewise.
11908 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11909 GRUB_EFI_CONSOLE_CONTROL_GUID.
11910 (grub_efi_exit): Removed.
11911 (grub_stop): Likewise.
11912 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11913 (grub_exit): New function.
11914 (grub_print_device_path): Likewise.
11915
11916 * kern/rescue.c (grub_rescue_cmd_exit): New function.
11917 (grub_enter_rescue_mode): Register "exit".
11918
11919 * kern/misc.c (grub_real_dprintf): A cosmetic change.
11920 (grub_abort): New function.
11921
11922 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11923
11924 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11925
11926 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11927
11928 * include/grub/efi/efi.h (grub_efi_exit): Removed.
11929 (grub_print_device_path): New prototype.
11930 (grub_efi_locate_handle): Likewise.
11931 (grub_efi_open_protocol): Likewise.
11932
11933 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11934 * disk/efi/efidisk.c: Likewise.
11935
11936 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11937
11938 * include/grub/efi/console_control.h
11939 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11940
11941 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11942 last 8 bytes as an array.
11943 (GRUB_EFI_DISK_IO_GUID): New macro.
11944 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11945 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11946 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11947 grub_uint8_t.
11948 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11949 (struct grub_efi_device_path): Rename the member "sub_type" to
11950 "subtype".
11951 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11952 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11953 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11954 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11955 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11956 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11957 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11958 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11959 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11960 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11961 (struct grub_efi_pci_device_path): New structure.
11962 (grub_efi_pci_device_path_t): New type.
11963 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11964 (struct grub_efi_pccard_device_path): New structure.
11965 (grub_efi_pccard_device_path_t): New type.
11966 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11967 (struct grub_efi_memory_mapped_device_path): New structure.
11968 (grub_efi_memory_mapped_device_path_t): New type.
11969 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11970 (struct grub_efi_vendor_device_path): New structure.
11971 (grub_efi_vendor_device_path_t): New type.
11972 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11973 (struct grub_efi_controller_device_path): New structure.
11974 (grub_efi_controller_device_path_t): New type.
11975 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11976 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11977 (struct grub_efi_acpi_device_path): New structure.
11978 (grub_efi_acpi_device_path_t): New type.
11979 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11980 (struct grub_efi_expanded_acpi_device_path): New structure.
11981 (grub_efi_expanded_acpi_device_path_t): New type.
11982 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11983 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11984 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11985 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11986 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11987 (struct grub_efi_atapi_device_path): New structure.
11988 (grub_efi_atapi_device_path_t): New type.
11989 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11990 (struct grub_efi_fibre_channel_device_path): New structure.
11991 (grub_efi_fibre_channel_device_path_t): New type.
11992 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11993 (struct grub_efi_1394_device_path): New structure.
11994 (grub_efi_1394_device_path_t): New type.
11995 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11996 (struct grub_efi_usb_device_path): New structure.
11997 (grub_efi_usb_device_path_t): New type.
11998 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11999 (struct grub_efi_usb_class_device_path): New structure.
12000 (grub_efi_usb_class_device_path_t): New type.
12001 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12002 (struct grub_efi_i2o_device_path): New structure.
12003 (grub_efi_i2o_device_path_t): New type.
12004 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12005 (struct grub_efi_mac_address_device_path): New structure.
12006 (grub_efi_mac_address_device_path_t): New type.
12007 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12008 (struct grub_efi_ipv4_device_path): New structure.
12009 (grub_efi_ipv4_device_path_t): New type.
12010 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12011 (struct grub_efi_ipv6_device_path): New structure.
12012 (grub_efi_ipv6_device_path_t): New type.
12013 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12014 (struct grub_efi_infiniband_device_path): New structure.
12015 (grub_efi_infiniband_device_path_t): New type.
12016 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12017 (struct grub_efi_uart_device_path): New structure.
12018 (grub_efi_uart_device_path_t): New type.
12019 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12020 (struct grub_efi_vendor_messaging_device_path): New structure.
12021 (grub_efi_vendor_messaging_device_path_t): New type.
12022 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12023 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12024 (struct grub_efi_hard_drive_device_path): New structure.
12025 (grub_efi_hard_drive_device_path_t): New type.
12026 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12027 (struct grub_efi_cdrom_device_path): New structure.
12028 (grub_efi_cdrom_device_path_t): New type.
12029 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12030 (struct grub_efi_vendor_media_device_path): New structure.
12031 (grub_efi_vendor_media_device_path_t): New type.
12032 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12033 (struct grub_efi_file_path_device_path): New structure.
12034 (grub_efi_file_path_device_path_t): New type.
12035 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12036 (struct grub_efi_protocol_device_path): New structure.
12037 (grub_efi_protocol_device_path_t): New type.
12038 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12039 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12040 (struct grub_efi_bios_device_path): New structure.
12041 (grub_efi_bios_device_path_t): New type.
12042 (struct grub_efi_disk_io): New structure.
12043 (grub_efi_disk_io_t): New type.
12044 (struct grub_efi_block_io_media): New structure.
12045 (grub_efi_block_io_media_t): New type.
12046 (struct grub_efi_block_io): New structure.
12047 (grub_efi_block_io_t): New type.
12048
12049 * include/grub/misc.h (grub_stop): Removed.
12050 (grub_exit): New prototype.
12051 (grub_abort): Likewise.
12052
12053 * include/grub/disk.h (enum grub_disk_dev_id): Added
12054 GRUB_DISK_DEVICE_EFIDISK_ID.
12055
12056 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12057 disk/efi/efidisk.c.
12058 (kernel_syms.lst): Remove the target if an error occurs.
12059
49986a9f 120602006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12061
12062 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12063 as it was simply too buggy.
12064
970d3b8a 120652006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12066
12067 * kern/misc.c (grub_lltoa): New function.
12068 (grub_vsprintf): Added support for the long long suffix,
12069 i.e. "ll".
12070
ff04ec24 120712006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12072
12073 * Makefile.in (LDFLAGS): Add variable.
12074 (LD): Remove variable.
12075 * configure.ac: Add -m32 to LDFLAGS.
12076 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12077 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12078 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12079 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12080 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12081 variables.
12082 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12083 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12084 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12085
37e5e1a4 120862006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12087
12088 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12089 length for unknown glyph.
12090
c352d8dd 120912006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12092
2eab1c0d 12093 Add support for pre-loaded modules into the EFI port.
f19dbdb7 12094
2eab1c0d 12095 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12096 completely. Accept one more argument DIR. The caller has changed.
12097
12098 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12099
12100 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12101 (grub_efi_loaded_image_guid): New variable.
12102 (grub_efi_get_loaded_image): New function.
12103 (grub_arch_modules_addr): Likewise.
12104
12105 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12106 prototype.
12107
12108 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12109 (struct grub_efi_loaded_image): New structure.
12110 (grub_efi_loaded_image_t): New type.
12111
121122006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 12113
c352d8dd 12114 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12115 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12116 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12117
6d01d6b4 121182006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12119
12120 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12121
976a4ea0 121222006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12123
12124 * DISTLIST: Added include/grub/efi/console.h,
12125 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12126 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12127
12128 * include/grub/efi/console.h: New file.
12129 * include/grub/efi/time.h: Likewise.
12130 * include/grub/i386/efi/kernel.h: Likewise.
12131 * kern/efi/init.c: Likewise.
12132 * kern/efi/mm.c: Likewise.
12133 * term/efi/console.c: Likewise.
f19dbdb7 12134
976a4ea0 12135 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12136 (grub_stop): Removed.
12137 (grub_get_rtc): Likewise.
12138 (grub_machine_init): Simply call grub_efi_init.
12139 (grub_machine_fini): Call grub_efi_fini.
12140
12141 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12142 (grub_efi_output_string): Removed.
12143 (grub_efi_stall): New function.
12144 (grub_stop): Likewise.
12145 (grub_get_rtc): Likewise.
12146
12147 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12148 (grub_efi_stall): New prototype.
12149 (grub_efi_allocate_pages): Likewise.
12150 (grub_efi_free_pages): Likewise.
12151 (grub_efi_get_memory_map): Likewise.
12152 (grub_efi_mm_init): Likewise.
12153 (grub_efi_mm_fini): Likewise.
12154 (grub_efi_init): Likewise.
12155 (grub_efi_fini): Likewise.
12156
12157 * include/grub/i386/efi/time.h: Do not include
12158 grub/symbol.h. Include grub/efi/time.h.
12159 (GRUB_TICKS_PER_SECOND): Removed.
12160 (grub_get_rtc): Likewise.
12161
12162 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12163 Added padding. The EFI spec is buggy.
12164 (GRUB_EFI_BLACK): New macro.
12165 (GRUB_EFI_BLUE): Likewise.
12166 (GRUB_EFI_GREEN): Likewise.
12167 (GRUB_EFI_CYAN): Likewise.
12168 (GRUB_EFI_RED): Likewise.
12169 (GRUB_EFI_MAGENTA): Likewise.
12170 (GRUB_EFI_BROWN): Likewise.
12171 (GRUB_EFI_LIGHTGRAY): Likewise.
12172 (GRUB_EFI_BRIGHT): Likewise.
12173 (GRUB_EFI_DARKGRAY): Likewise.
12174 (GRUB_EFI_LIGHTBLUE): Likewise.
12175 (GRUB_EFI_LIGHTGREEN): Likewise.
12176 (GRUB_EFI_LIGHTCYAN): Likewise.
12177 (GRUB_EFI_LIGHTRED): Likewise.
12178 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12179 (GRUB_EFI_YELLOW): Likewise.
12180 (GRUB_EFI_WHITE): Likewise.
12181 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12182 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12183 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12184 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12185 (GRUB_EFI_BACKGROUND_RED): Likewise.
12186 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12187 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12188 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12189 (GRUB_EFI_TEXT_ATTR): Likewise.
12190
12191 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12192 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12193 (kernel_mod_HEADERS): Added efi/time.h.
12194
83709125 121952006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12196
12197 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12198 include/grub/efi/api.h, include/grub/efi/console_control.h,
12199 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12200 include/grub/i386/efi/time.h, kern/efi/efi.c,
12201 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12202 and util/i386/efi/grub-mkimage.c.
12203
12204 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12205
12206 * genmk.rb (PModule#rule): Do not export symbols if
12207 #{prefix}_EXPORTS is set to "no".
12208
12209 * conf/i386-efi.mk: New file.
12210 * conf/i386-efi.rmk: Likewise.
12211 * include/grub/efi/api.h: Likewise.
12212 * include/grub/efi/console_control.h: Likewise.
12213 * include/grub/efi/efi.h: Likewise.
12214 * include/grub/efi/pe32.h: Likewise.
12215 * include/grub/i386/efi/time.h: Likewise.
12216 * kern/efi/efi.c: Likewise.
12217 * kern/i386/efi/init.c: Likewise.
12218 * kern/i386/efi/startup.S: Likewise.
12219 * util/i386/efi/grub-mkimage.c: Likewise.
12220
122212006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 12222
12223 * include/grub/script.h: Include <grub/parser.h> and
12224 "grub_script.tab.h".
12225 (struct grub_lexer_param): New struct.
12226 (struct grub_parser_param): Likewise.
12227 (grub_script_create_arglist): Pass the state in an argument.
12228 (grub_script_add_arglist): Likewise.
12229 (grub_script_create_cmdline): Likewise.
12230 (grub_script_create_cmdblock): Likewise.
12231 (grub_script_create_cmdif): Likewise.
12232 (grub_script_create_cmdmenu): Likewise.
12233 (grub_script_add_cmd): Likewise.
12234 (grub_script_arg_add): Likewise.
12235 (grub_script_lexer_ref): Likewise.
12236 (grub_script_lexer_deref): Likewise.
12237 (grub_script_lexer_record_start): Likewise.
12238 (grub_script_lexer_record_stop): Likewise.
12239 (grub_script_mem_record): Likewise.
12240 (grub_script_mem_record_stop): Likewise.
12241 (grub_script_malloc): Likewise.
12242 (grub_script_yylex): Likewise.
12243 (grub_script_yyparse): Likewise.
12244 (grub_script_yyerror): Likewise.
12245 (grub_script_yylex): Likewise.
12246 (grub_script_lexer_init): Return the state.
12247
12248 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12249 (grub_script_lexer_done): Likewise.
12250 (grub_script_lexer_getline): Likewise.
12251 (grub_script_lexer_refs): Likewise.
12252 (script): Likewise.
12253 (newscript): Likewise.
12254 (record): Likewise.
12255 (recording): Likewise.
12256 (recordpos): Likewise.
12257 (recordlen): Likewise.
12258 (grub_script_lexer_init): Return the state instead of setting
12259 global variables.
12260 (grub_script_lexer_ref): Use the newly added argument for state
12261 instead of globals.
12262 (grub_script_lexer_deref): Likewise.
12263 (grub_script_lexer_record_start): Likewise.
12264 (grub_script_lexer_record_stop): Likewise.
12265 (recordchar): Likewise.
12266 (nextchar): Likewise.
12267 (grub_script_yylex2): Likewise.
12268 (grub_script_yylex): Likewise.
12269 (grub_script_yyerror): Likewise.
12270
12271 * normal/parser.y (func_mem): Removed variable.
12272 (menu_entry): Likewise.
12273 (err): Likewise.
12274 (%lex-param): New parser option.
12275 (%parse-param): Likewise.
12276 (script): Always return the AST.
12277 (argument): Pass the state around.
12278 (arguments): Likewise.
12279 (grubcmd): Likewise.
12280 (commands): Likewise.
12281 (function): Likewise.
12282 (menuentry): Likewise.
12283 (if_statement): Likewise.
12284 (if): Likewise.
12285
12286 * normal/script.c (grub_script_memused): Removed variable.
12287 (grub_script_parsed): Likewise.
12288 (grub_script_malloc): Added a state argument. Use that instead of
12289 global variables.
12290 (grub_script_mem_record): Likewise.
12291 (grub_script_mem_record_stop): Likewise.
12292 (grub_script_arg_add): Likewise.
12293 (grub_script_add_arglist): Likewise.
12294 (grub_script_create_cmdline): Likewise.
12295 (grub_script_create_cmdif): Likewise.
12296 (grub_script_create_cmdmenu): Likewise.
12297 (grub_script_add_cmd): Likewise.
12298 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 12299
e2a8c904 123002006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 12301
12302 * normal/command.c (grub_command_init): Remove the title command.
12303
12304 * normal/lexer.c (grub_script_yylex): Renamed from this...
12305 (grub_script_yylex2): ... to this.
12306 (grub_script_yylex): New function. Temporary
12307 introduced to filter some tokens.
12308 (grub_script_yyerror): Print a newline.
12309
12310 * normal/main.c (read_config_file): Output information about the
12311 lines that contain errors. Wait for a key after all lines have
12312 been processed. Don't return an empty menu.
12313
12314 * normal/parser.y (func_mem): Don't initialize.
12315 (menu_entry): Likewise.
12316 (err): New variable.
12317 (script): Don't return anything when an error was encountered.
12318 (ws, returns): Removed rules.
12319 (argument): Disabled concatenated variable support.
12320 (arguments): Remove explicit separators.
12321 (grubcmd): Likewise.
12322 (function): Likewise.
12323 (menuentry): Likewise.
12324 (if): Likewise.
12325 (commands): Likewise. Add error handling.
12326
12327 * normal/script.c (grub_script_create_cmdline): If
12328 `grub_script_parsed' is 0, assume the parser encountered an error.
12329
c9a86192 123302006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12331
12332 * configure.ac: Add support for EFI. Fix the typo
12333 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12334
70f3b243 123352006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12336
12337 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12338 foreign multibyte characters should be shown correctly.
12339
65f201ad 123402006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12341
12342 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12343 calculation.
12344 (read_config_file): Made it to close file before returning.
12345
b4b93674 123462006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12347
12348 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12349 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12350 video/i386/pc/vbefill.c.
12351
12352 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12353 video/i386/pc/vbefill.c.
12354
12355 * include/grub/video.h (grub_video_blit_format): New enum.
12356 (grub_video_mode_info): Added new member blit_format.
12357 (grub_video_get_blit_format): New function prototype.
12358
12359 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12360 function prototype.
12361 (grub_video_vbe_map_rgb): Likewise.
12362 (grub_video_vbe_unmap_color): Likewise.
12363
12364 * include/grub/i386/pc/vbeblit.h: New file.
12365
12366 * include/grub/i386/pc/vbefill.h: New file.
12367
12368 * video/video.c (grub_video_get_blit_format): New function.
12369 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12370 (grub_video_vbe_map_rgb): Likewise.
12371 (grub_video_vbe_unmap_color): Likewise.
12372
12373 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12374 optimized fills.
12375 (grub_video_vbe_blit_render_target): Changed to use more optimized
12376 blits.
12377 (grub_video_vbe_setup): Added detection for optimized settings.
12378 (grub_video_vbe_create_render_target): Likewise.
12379
12380 * video/i386/pc/vbeblit.c: New file.
12381
12382 * video/i386/pc/vbefill.c: New file.
12383
c2379b9c 123842006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12385
12386 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12387 here...
12388
12389 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12390 parsing to support both hex and dec ranges. If filename was missing
12391 show usage information.
12392
bd0d7896 123932006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12394
12395 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12396 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12397
12398 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12399 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12400 (video_mod_SOURCES): Added.
12401 (video_mod_CFLAGS): Likewise.
12402 (video_mod_LDFLAGS): Likewise.
12403 (gfxterm_mod_SOURCES): Likewise.
12404 (gfxterm_mod_CFLAGS): Likewise.
12405 (gfxterm_mod_LDFLAGS): Likewise.
12406 (videotest_mod_SOURCES): Likewise.
12407 (videotest_mod_CFLAGS): Likewise.
12408 (videotest_mod_LDFLAGS): Likewise.
12409 (vesafb_mod_SOURCES): Removed.
12410 (vesafb_mod_CFLAGS): Likewise.
12411 (vesafb_mod_LDFLAGS): Likewise.
12412 (vga_mod_SOURCES): Likewise.
12413 (vga_mod_CFLAGS): Likewise.
12414 (vga_mod_LDFLAGS): Likewise.
12415
12416 * commands/videotest.c: New file.
12417
12418 * font/manager.c (fill_with_default_glyph): Modified to use
12419 grub_font_glyph.
12420 (grub_font_get_glyph): Likewise.
12421 (fontmanager): Renamed from this...
12422 (font_manager): ... to this.
12423
12424 * include/grub/font.h (grub_font_glyph): Added new structure.
12425 (grub_font_get_glyph): Modified to use grub_font_glyph.
12426
12427 * include/grub/misc.h (grub_abs): Added as inline function.
12428
12429 * include/grub/video.h: New file.
12430
12431 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12432 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12433 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12434 (grub_vbe_get_controller_info): Renamed from this...
12435 (grub_vbe_bios_get_controller_info): ... to this.
12436 (grub_vbe_get_mode_info): Renamed from this...
12437 (grub_vbe_bios_get_mode_info): ... to this.
12438 (grub_vbe_set_mode): Renamed from this...
12439 (grub_vbe_bios_set_mode): ... to this.
12440 (grub_vbe_get_mode): Renamed from this...
12441 (grub_vbe_bios_get_mode): ... to this.
12442 (grub_vbe_set_memory_window): Renamed from this...
12443 (grub_vbe_bios_set_memory_window): ... to this.
12444 (grub_vbe_get_memory_window): Renamed from this...
12445 (grub_vbe_bios_get_memory_window): ... to this.
12446 (grub_vbe_set_scanline_length): Renamed from this...
12447 (grub_vbe_set_scanline_length): ... to this.
12448 (grub_vbe_get_scanline_length): Renamed from this...
12449 (grub_vbe_bios_get_scanline_length): ... to this.
12450 (grub_vbe_set_display_start): Renamed from this...
12451 (grub_vbe_bios_set_display_start): ... to this.
12452 (grub_vbe_get_display_start): Renamed from this...
12453 (grub_vbe_bios_get_display_start): ... to this.
12454 (grub_vbe_set_palette_data): Renamed from this...
12455 (grub_vbe_bios_set_palette_data): ... to this.
12456 (grub_vbe_set_pixel_rgb): Removed.
12457 (grub_vbe_set_pixel_index): Likewise.
12458
12459 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12460 from this...
12461 (grub_vbe_bios_get_controller_info): ... to this.
12462 (grub_vbe_get_mode_info): Renamed from this...
12463 (grub_vbe_bios_get_mode_info): ... to this.
12464 (grub_vbe_set_mode): Renamed from this...
12465 (grub_vbe_bios_set_mode): ... to this.
12466 (grub_vbe_get_mode): Renamed from this...
12467 (grub_vbe_bios_get_mode): ... to this.
12468 (grub_vbe_set_memory_window): Renamed from this...
12469 (grub_vbe_bios_set_memory_window): ... to this.
12470 (grub_vbe_get_memory_window): Renamed from this...
12471 (grub_vbe_bios_get_memory_window): ... to this.
12472 (grub_vbe_set_scanline_length): Renamed from this...
12473 (grub_vbe_set_scanline_length): ... to this.
12474 (grub_vbe_get_scanline_length): Renamed from this...
12475 (grub_vbe_bios_get_scanline_length): ... to this.
12476 (grub_vbe_set_display_start): Renamed from this...
12477 (grub_vbe_bios_set_display_start): ... to this.
12478 (grub_vbe_get_display_start): Renamed from this...
12479 (grub_vbe_bios_get_display_start): ... to this.
12480 (grub_vbe_set_palette_data): Renamed from this...
12481 (grub_vbe_bios_set_palette_data): ... to this.
12482 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12483 getting corrupted after calling it. Added more pushes and pops.
12484 (grub_vbe_bios_set_mode): Likewise.
12485 (grub_vbe_bios_get_mode): Likewise.
12486 (grub_vbe_bios_get_memory_window): Likewise.
12487 (grub_vbe_bios_set_scanline_length): Likewise.
12488 (grub_vbe_bios_get_scanline_length): Likewise.
12489 (grub_vbe_bios_get_display_start): Likewise.
12490 (grub_vbe_bios_set_palette_data): Likewise.
12491
12492 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12493 (cl_insert): Likewise.
12494 (cl_delete): Likewise.
12495
12496 * term/gfxterm.c: New file.
12497
12498 * term/i386/pc/vesafb.c: Removed file.
12499
12500 * video/video.c: New file.
12501
12502 * video/i386/pc/vbe.c (real2pm): Added new function.
12503 (grub_video_vbe_draw_pixel): Likewise.
12504 (grub_video_vbe_get_video_ptr): Likewise.
12505 (grub_video_vbe_get_pixel): Likewise
12506 (grub_video_vbe_init): Likewise.
12507 (grub_video_vbe_fini): Likewise.
12508 (grub_video_vbe_setup): Likewise.
12509 (grub_video_vbe_get_info): Likewise.
12510 (grub_video_vbe_set_palette): Likewise.
12511 (grub_video_vbe_get_palette): Likewise.
12512 (grub_video_vbe_set_viewport): Likewise.
12513 (grub_video_vbe_get_viewport): Likewise.
12514 (grub_video_vbe_map_color): Likewise.
12515 (grub_video_vbe_map_rgb): Likewise.
12516 (grub_video_vbe_map_rgba): Likewise.
12517 (grub_video_vbe_unmap_color): Likewise.
12518 (grub_video_vbe_fill_rect): Likewise.
12519 (grub_video_vbe_blit_glyph): Likewise.
12520 (grub_video_vbe_blit_bitmap): Likewise.
12521 (grub_video_vbe_blit_render_target): Likewise.
12522 (grub_video_vbe_scroll): Likewise.
12523 (grub_video_vbe_swap_buffers): Likewise.
12524 (grub_video_vbe_create_render_target): Likewise.
12525 (grub_video_vbe_delete_render_target): Likewise.
12526 (grub_video_vbe_set_active_render_target): Likewise.
12527 (grub_vbe_set_pixel_rgb): Remove function.
12528 (grub_vbe_set_pixel_index): Likewise.
12529 (index_color_mode): Remove static variable.
12530 (active_mode): Likewise.
12531 (framebuffer): Likewise.
12532 (bytes_per_scan_line): Likewise.
12533 (grub_video_vbe_adapter): Added new static variable.
12534 (framebuffer): Likewise.
12535 (render_target): Likewise.
12536 (initial_mode): Likewise.
12537 (mode_in_use): Likewise.
12538 (mode_list): Likewise.
12539
5f97350b 125402006-03-10 Marco Gerards <marco@gnu.org>
12541
12542 * configure.ac (AC_INIT): Bumped to 1.93.
12543
12544 * DISTLIST: Added `include/grub/hfs.h'.
12545
a3c5c6f8 125462006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
12547
12548 * boot/i386/pc/boot.S (general_error): Before looping, try INT
12549 18H, which might help the BIOS falling back to next boot media.
12550
6de53d26 125512006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
12552
12553 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12554 Poe Chen <poe.poechen@gmail.com>.
12555
77c4a393 125562006-01-17 Marco Gerards <marco@gnu.org>
12557
12558 * include/grub/normal.h: Include <grub/script.h>.
12559 (grub_command_list): Removed struct.
12560 (grub_command_list_t): Removed type.
12561 (grub_menu_entry): Remove members `num' and `command_list'. Add
12562 members `commands' and `sourcecode'.
12563 * include/grub/script.h: Add inclusion guards.
12564 (grub_script_cmd_menuentry): New struct.
12565 (grub_script_execute_menuentry): New prototype.
12566 (grub_script_lexer_record_start): Likewise.
12567 (grub_script_lexer_record_stop): Likewise.
12568 * normal/execute.c (grub_script_execute_menuentry): New function.
12569 * normal/lexer.c (record, recording, recordpos, recordlen): New
12570 variables.
12571 (grub_script_lexer_record_start): New function.
12572 (grub_script_lexer_record_stop): Likewise.
12573 (recordchar): Likewise.
12574 (nextchar): Likewise.
12575 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
12576 2048 as the buffer size. Add the tokens `menuentry' and `@'.
12577 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12578 (current_menu): New variable.
12579 (free_menu): Mainly rewritten.
12580 (grub_normal_menu_addentry): New function.
12581 (read_config_file): Rewritten.
12582 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 12583 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 12584 the menu entry.
12585 (run): Mainly rewritten.
12586 * normal/parser.y (menu_entry): New variable.
12587 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12588 (menuentry): New rule.
12589 (command): Add `menuentry'.
12590 (if_statement): Allow additional returns before `fi'.
12591 * normal/script.c (grub_script_create_cmdmenu): New function.
12592
144f1f98 125932006-01-03 Marco Gerards <marco@gnu.org>
12594
12595 * INSTALL: GNU Bison is required.
12596 * configure.ac: Rewritten the test to detect Bison.
12597 * Makefile.in (YACC): New variable. Reported by Xun Sun
12598 <xun.sun.cn@gmail.com>.
12599
af4b2d89 126002006-01-03 Marco Gerards <marco@gnu.org>
12601
12602 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12603 the HFS+ filesystem to filesystem blocks.
12604 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12605 GCC warning is silenced.
12606
15643b71 126072006-01-03 Marco Gerards <marco@gnu.org>
12608
12609 * partmap/apple.c (apple_partition_map_iterate): Convert the data
12610 read from disk from big endian to host byte order.
12611
00905879 126122006-01-03 Hollis Blanchard <hollis@penguinppc.org>
12613
12614 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
12615 documentation.
12616 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12617 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12618 embedded HFS+ filesystem.
12619 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12620 (grub_hfs_sblock): Move from here...
12621 * include/grub/hfs.h: To here... New file.
12622 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
12623 documentation.
12624 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12625 New macros.
12626 (grub_hfsplus_volheader): Change type of member `magic' to
12627 `grub_uint16_t'.
12628 (grub_hfsplus_data): Add new member `embedded_offset'.
12629 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12630 returned block.
12631 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12632 Calculate the offset.
12633
8899bc3e 126342005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12635
12636 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12637 Removed.
12638 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12639
ae8c0277 126402005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12641
12642 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12643 ENV->NAME is NULL after allocating ENV->VALUE.
12644
07084456 126452005-12-25 Marco Gerards <marco@gnu.org>
12646
12647 * kern/env.c (grub_env_set): Rewritten the error handling code.
12648
4750f5f1 126492005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12650
12651 * geninit.sh: Made more robust, and more portable.
12652
50214199 126532005-12-25 Marco Gerards <marco@gnu.org>
12654
12655 Add support for Apple HFS+ filesystems.
f19dbdb7 12656
50214199 12657 * fs/hfsplus.c: New file.
12658
12659 * DISTLIST: Added `fs/hfsplus.c'.
12660
12661 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12662 (hfsplus_mod_SOURCES): New variable.
12663 (hfsplus_mod_CFLAGS): Likewise.
12664 (hfsplus_mod_LDFLAGS): Likewise.
12665 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12666 (grub_setup_SOURCES): Likewise.
12667 (grub_mkdevicemap_SOURCES): Likewise.
12668 (grub_emu_SOURCES): Likewise.
12669 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12670
12671 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12672
12673 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12674
befaed6c 126752005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12676
12677 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12678 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12679 include/grub/parser.h, include/grub/script.h, kern/parser.c,
12680 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12681 normal/lexer.c, normal/parser.y, normal/script.c, and
12682 partmap/gpt.c.
12683 Removed kern/sparc64/cache.c.
12684
12685 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12686 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12687 grub_emu_init.c.
12688
12689 * configure.ac (AC_INIT): Bumped to 1.92.
12690
6a124103 126912005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
12692
12693 * kern/err.c (grub_error_push): Added new function to support error
12694 stacks.
12695 (grub_error_pop): Likewise.
12696 (grub_error_stack_items): New local variable to support error stacks.
12697 (grub_error_stack_pos): Likewise.
12698 (grub_error_stack_assert): Likewise.
12699 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12700 stack depth.
12701 (grub_print_error): Added support to print errors from error stack.
12702
12703 * include/grub/err.h (grub_error_push): Added function prototype.
12704 (grub_error_pop): Likewise.
12705
be973c1b 127062005-12-09 Hollis Blanchard <hollis@penguinppc.org>
12707
12708 * configure.ac: Accept `powerpc64' as host_cpu.
12709 (amd64): Rename to `biarch32'.
12710
12711 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12712 non-cacheline-aligned addresses.
12713
12714 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12715 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
12716 if `size' is non-zero.
12717
b04216ab 127182005-12-03 Marco Gerards <mgerards@xs4all.nl>
12719
12720 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12721 and `cd' to make sure the filename is not prefixed with a
12722 directory name.
12723 (pkgdata_MODULES): Add `gpt.mod'.
12724 (gpt_mod_SOURCES): New variable.
12725 (gpt_mod_CFLAGS): Likewise.
12726 (gpt_mod_LDFLAGS): Likewise.
12727
12728 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12729
12730 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12731 New macro.
12732
12733 * partmap/gpt.c: New file.
12734
12735 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12736 GPT partition map is detected.
12737
41730ed9 127382005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
12739
12740 * commands/i386/pc/play.c: New file.
12741 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12742 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12743 macros.
f19dbdb7 12744
95dc3643 127452005-11-27 Marco Gerards <mgerards@xs4all.nl>
12746
12747 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12748 ((unused))' to silence gcc warning.
12749
1569ec51 127502005-11-26 Hollis Blanchard <hollis@penguinppc.org>
12751
12752 * configure.ac: Correct `AC_PROG_YACC' test.
12753
9abde152 127542005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12755
12756 * util/powerpc/ieee1275/grub-install.in: Run the mount point
12757 check before installing files.
12758
44b83271 127592005-11-22 Mike Small <smallm@panix.com>
12760
12761 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12762 number regex so multidigit numbers are recognized correctly.
12763
127642005-11-22 Mike Small <smallm@panix.com>
12765
12766 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12767 debugging message before attempting to claim memory.
12768 (grub_rescue_cmd_initrd): Add a claim debugging message and try
12769 multiple addresses in case of failure.
12770
9c12956b 127712005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12772
12773 * term/tparm.c (get_space): Remove empty `if' statement.
12774
12775 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12776
12777 * kern/parser.c (check_varstate): Rename `state' to 's'.
12778
aeaf81d9 127792005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12780
12781 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
12782 variable definitions to the beginning of each function. Sort stack
12783 variables by size.
12784 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
12785 `buf' argument to `char *'.
12786
79bbb63f 127872005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12788
12789 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12790 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 12791 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 12792 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12793 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12794 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12795 configfile.mod, search.mod, gzio.mod and test.mod.
12796 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12797 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12798 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12799 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12800 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12801 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12802 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12803 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12804 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12805 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12806 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12807 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12808 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12809 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12810 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12811 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12812 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12813 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12814 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12815 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12816 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12817 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12818 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12819
12820 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12821 `grep --include'.
12822 (pkgdata_MODULES): Add test.mod.
12823
233b1628 128242005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12825
12826 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
12827 appending to variables with "+=".
12828 (PModule): Use full pathname to generate *.lst filenames.
12829
12830 * Makefile.in: Fixed list rules moved from genmk.rb.
12831 (.DELETE_ON_ERROR): New special target.
12832 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12833
12834 * conf/i386-pc.rmk: Include conf/common.mk.
12835 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 12836 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 12837 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12838 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12839 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12840 configfile.mod, search.mod, gzio.mod and test.mod.
12841 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12842 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12843 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12844 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12845 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12846 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12847 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12848 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12849 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12850 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12851 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12852 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12853 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12854 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12855 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12856 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12857 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12858 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12859 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12860 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12861 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12862 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12863 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12864 here...
12865 * conf/common.rmk: ... to here. New file.
12866
12867 * conf/common.mk: New file.
12868
16f820c8 128692005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
12870
12871 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12872 (grub_script.tab.c): ... here.
12873
12874 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12875 (grub_script.tab.c): ... here.
12876
12877 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12878 (grub_script.tab.c): ... here.
12879
12880 * normal/command.c (grub_command_find): Fixed a memory leak of
12881 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12882
63ba1554 128832005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12884
12885 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12886 "@" which marks the start of a comment on ARM.
12887 (VARIABLE): Likewise.
12888
7f67dc13 128892005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12890
79bbb63f 12891 Add support for Linux/ADFS partition tables.
7f67dc13 12892
12893 * partmap/acorn.c: New file.
12894
12895 * include/grub/acorn_filecore.h: Likewise.
12896
12897 * DISTLIST: Added `partmap/acorn.c' and
12898 `include/grub/acorn_filecore.h'.
f19dbdb7 12899
7f67dc13 12900 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12901 `partmap/acorn.c'.
12902 (pkgdata_MODULES): Add `acorn.mod'.
12903 (acorn_mod_SOURCES): New variable.
12904 (acorn_mod_CFLAGS): Likewise.
12905
12906 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12907 `partmap/acorn.c'.
12908 (pkgdata_MODULES): Add `acorn.mod'.
12909 (acorn_mod_SOURCES): New variable.
12910 (acorn_mod_CFLAGS): Likewise.
12911
12912 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12913 (pkgdata_MODULES): Add `acorn.mod'.
12914 (acorn_mod_SOURCES): New variable.
12915 (acorn_mod_CFLAGS): Likewise.
12916 (acorn_mod_LDFLAGS): Likewise.
12917
12918 * include/types.h (grub_disk_addr_t): New typedef.
12919
6d099807 129202005-11-13 Marco Gerards <mgerards@xs4all.nl>
12921
12922 * geninit.sh: New file.
12923
12924 * geninitheader.sh: Likewise.
12925
12926 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12927 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12928 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12929 * commands/configfile.c (grub_configfile_init)
12930 (grub_configfile_fini): Likewise.
12931 * commands/default.c (grub_default_init, grub_default_fini):
12932 Likewise.
12933 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12934 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12935 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12936 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12937 Likewise.
12938 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12939 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12940 Likewise.
12941 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 12942 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 12943 Likewise.
12944 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12945 Likewise.
fe6b695a 12946 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 12947 Likewise.
12948 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12949 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12950 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12951 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12952 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12953 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12954 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12955 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12956 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12957 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12958 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12959 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12960 * partmap/amiga.c (grub_amiga_partition_map_init)
12961 (grub_amiga_partition_map_fini): Likewise.
12962 * partmap/apple.c (grub_apple_partition_map_init)
12963 (grub_apple_partition_map_fini): Likewise.
12964 * partmap/pc.c (grub_pc_partition_map_init)
12965 (grub_pc_partition_map_fini): Likewise.
12966 * partmap/sun.c (grub_sun_partition_map_init,
12967 grub_sun_partition_map_fini): Likewise.
12968 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12969 Likewise.
12970
12971 * util/grub-emu.c: Include <grub_modules_init.h>.
12972 (main): Don't initialize and de-initialize any modules directly,
12973 use `grub_init_all' and `grub_fini_all' instead.
12974
12975 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12976 `grub_vesafb_mod_init'.
12977 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
12978 all users.
12979 * term/i386/pc/vga.c (grub_vga_init): Renamed to
12980 `grub_vga_mod_init'. Updated all users.
12981 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 12982
6d099807 12983 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12984 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12985 rules.
12986
12987 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12988 Generate a function to initialize the module in utilities.
12989 Updated all callers.
12990 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
12991 initialize the module in utilities. Updated all callers.
12992
9046bcf0 129932005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12994
12995 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12996 escape sequence and a literal ^L to clear the screen.
12997
12998 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12999 when returning from Open Firmware.
13000
d13ea639 130012005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13002
13003 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13004 (grub_ofconsole_height): Likewise.
13005 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13006 manually insert a '\n'.
13007 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13008 `grub_ofconsole_height'. Return early if these are already set.
13009
a8fcf206 130102005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13011
13012 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13013 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13014 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13015 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13016 and `normal/script.c'.
13017 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13018 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13019 (test_mod_SOURCES): New variable.
13020 (test_mod_CFLAGS): Likewise.
13021 (test_mod_LDFLAGS): Likewise.
13022 (pkgdata_MODULES): Add `test.mod'.
13023 (grub_script.tab.c): New rule.
13024 (grub_script.tab.h): Likewise.
13025
b6b32745 130262005-11-07 Marco Gerards <mgerards@xs4all.nl>
13027
13028 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13029 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13030 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13031 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13032 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13033 (test_mod_SOURCES): New variable.
13034 (test_mod_CFLAGS): Likewise.
13035 (pkgdata_MODULES): Add `test.mod'.
13036 (grub_script.tab.c): New rule.
13037 (grub_script.tab.h): Likewise.
13038
daac212a 130392005-11-06 Marco Gerards <mgerards@xs4all.nl>
13040
13041 Add initial scripting support.
13042
13043 * commands/test.c: New file.
13044 * include/grub/script.h: Likewise.
13045 * normal/execute.c: Likewise.
13046 * normal/function.c: Likewise.
13047 * normal/lexer.c: Likewise.
13048 * normal/parser.y: Likewise.
13049 * normal/script.c: Likewise.
13050
13051 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 13052
daac212a 13053 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13054 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13055 `normal/function.c' and `normal/script.c'.
13056 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13057 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 13058 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13059 variables.
daac212a 13060 (pkgdata_MODULES): Add `test.mod'.
13061 (grub_script.tab.c): New rule.
13062 (grub_script.tab.h): Likewise.
13063
13064 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13065
13066 * include/grub/normal.h (grub_test_init): New prototype.
13067 (grub_test_fini): Likewise.
f19dbdb7 13068
daac212a 13069 * normal/command.c: Include <grub/script.h>.
13070 (grub_command_execute): Rewritten.
f19dbdb7 13071
daac212a 13072 * util/grub-emu.c (main): Call `grub_test_init' and
13073 `grub_test_fini'.
13074
77500b2b 130752005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13076
13077 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13078 to 0.
13079 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13080 there are no pending characters.
13081
e45deb9e 130822005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13083
13084 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13085 `grub_strndup' to drop device arguments. Replace unnecessary
13086 `grub_strndup' with `grub_strdup'.
13087
4ce32619 130882005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13089
13090 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13091 `debug' environment variable has been set.
13092
130932005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 13094
4ce32619 13095 * Makefile.in (install-local): Use $(DATA).
13096 (uninstall): Likewise.
13097 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13098 (sbin_UTILITIES): ... to here.
13099 (sbin_SCRIPTS): New variable.
13100 (grub_install_SOURCES): New variable.
13101 * util/powerpc/ieee1275/grub-install.in: New file.
13102 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13103 variable.
13104 (add_segments): Call `grub_util_get_path'.
13105
25fe6f03 131062005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13107
13108 From Timothy Baldwin:
13109 * commands/ls.c (grub_ls_list_files): Close FILE with
13110 grub_file_close.
13111 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13112
04ccf3ec 131132005-10-24 Marco Gerards <mgerards@xs4all.nl>
13114
13115 * include/grub/parser.h: New file.
13116
13117 * kern/parser.c: Likewise.
13118
13119 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13120 (grub_setup_SOURCES): Likewise.
13121 (grub_probefs_SOURCES): Likewise.
13122 (grub_emu_SOURCES): Likewise.
13123 (kernel_img_HEADERS): Add `parser.h'.
13124
13125 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13126 (grub_emu_SOURCES): Add `kern/parser.c'.
13127 (grubof_SOURCES): Likewise.
13128
13129 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13130 (grubof_SOURCES): Add `kern/parser.c'.
13131
13132 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13133
13134 * kern/misc.c (grub_split_cmdline): Removed function.
13135
13136 * kern/rescue.c: Include <grub/parser.h>.
13137 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13138 of `grub_split_cmdline'.
13139
13140 * normal/command.c: Include <grub/parser.h>.
13141 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13142 of `grub_split_cmdline'.
13143
13144 * normal/completion.c: Include <grub/parser.h>.
13145 (cmdline_state): New variable.
13146 (iterate_dir): End the filename with a quote depending on the
13147 command line state.
13148 (get_state): new function.
13149 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13150 split the arguments and determine the current argument. When the
13151 argument string is not quoted, escape all spaces.
13152
6d8f4b0e 131532005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13154
13155 * normal/sparc64/setjmp.S: New file.
13156
15cf03ed 131572005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13158
13159 * include/grub/sparc64/libgcc.h: New file.
13160 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13161 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13162 normal/sparc64/setjmp.c.
13163
03e8661a 131642005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13165
13166 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13167 * kern/sparc64/cache.S: New file.
13168 * kern/sparc64/cache.c: Removed.
13169 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13170 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13171 -mtune=ultrasparc.
13172 (COMMON_LDFLAGS): Add -melf64_sparc.
13173 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13174 (grubof_SOURCES): Use cache.S instead of cache.c.
13175 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13176 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13177 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13178 commented though.
13179 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13180 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13181 (linux_mod_CFLAGS): Commented out.
13182 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13183 out because module isn't built.
13184 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13185 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13186 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13187 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13188 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13189 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13190 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13191 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13192 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13193 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13194 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13195 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13196 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13197 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13198
34eeec8a 131992005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13200
13201 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13202 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13203 longer, because HFS should not be used on PC.
13204
708367a3 132052005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13206
13207 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13208 consistently within the loop.
13209
6fa1251a 132102005-10-15 Marco Gerards <mgerards@xs4all.nl>
13211
13212 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13213 directory can not be read.
13214
4801580b 132152005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13216
13217 * configure.ac (AC_INIT): Increase the version number to 1.91.
13218
13219 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13220 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13221 term/i386/pc/serial.c.
13222
219ad426 132232005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13224
13225 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13226 file size must be permitted.
13227
13228 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13229 between %ah and %al.
13230
688e5699 132312005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13232
13233 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13234 grub_uint64_t.
13235 Call the hook with a NUL-terminated filename.
13236 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13237 grub_cpu_to_be32.
13238
13239 * kern/term.c (cursor_state): New variable.
13240 (grub_term_set_current): Reset the cursor state on a new
13241 terminal.
13242 (grub_setcursor): Rewritten to use CURSOR_STATE.
13243 (grub_getcursor): New function.
13244
13245 * include/grub/term.h (grub_getcursor): New prototype.
13246
13247 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13248 integers on ARM. Reported by Timothy Baldwin
13249 <T.E.Baldwin99@members.leeds.ac.uk>.
13250
bb34586c 132512005-10-11 Marco Gerards <mgerards@xs4all.nl>
13252
13253 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13254 allocated.
13255 (grub_sfs_dir): Likewise.
13256
9a909877 132572005-10-09 Marco Gerards <mgerards@xs4all.nl>
13258
13259 Add support for the SFS filesystem.
13260
13261 * fs/sfs.c: New file.
13262
13263 * DISTLIST: Added `fs/sfs.c'.
13264
13265 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13266 (grub_probefs_SOURCES): Likewise.
13267 (grub_emu_SOURCES): Likewise.
13268 (pkgdata_MODULES): Add `sfs.mod'.
13269 (sfs_mod_SOURCES): New variable.
13270 (sfs_mod_CFLAGS): Likewise.
13271 (sfs_mod_LDFLAGS): Likewise.
13272
13273 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13274 (pkgdata_MODULES): Add `sfs.mod'.
13275 (sfs_mod_SOURCES): New variable.
13276 (sfs_mod_CFLAGS): Likewise.
13277
13278 * util/grub-emu.c (main): Call `grub_sfs_init' and
13279 `grub_sfs_fini'.
13280
13281 * include/grub/fs.h (grub_sfs_init): New prototype.
13282 (grub_sfs_fini): Likewise.
13283
57bdbde3 132842005-10-07 Marco Gerards <mgerards@xs4all.nl>
13285
13286 Add support for the AFFS filesystem.
13287
13288 * fs/affs.c: New file.
13289
13290 * DISTLIST: Added `fs/affs.c'.
13291
13292 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13293 (grub_probefs_SOURCES): Likewise.
13294 (grub_emu_SOURCES): Likewise.
13295 (pkgdata_MODULES): Add `affs.mod'.
13296 (affs_mod_SOURCES): New variable.
13297 (affs_mod_CFLAGS): Likewise.
13298 (affs_mod_LDFLAGS): Likewise.
13299
13300 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13301 (pkgdata_MODULES): Add `affs.mod'.
13302 (affs_mod_SOURCES): New variable.
13303 (affs_mod_CFLAGS): Likewise.
13304
13305 * util/grub-emu.c (main): Call `grub_affs_init' and
13306 `grub_affs_fini'.
13307
13308 * include/grub/fs.h (grub_affs_init): New prototype.
13309 (grub_affs_fini): Likewise.
13310
047b67e0 133112005-10-01 Marco Gerards <mgerards@xs4all.nl>
13312
13313 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13314
59b8208a 133152005-10-01 Marco Gerards <mgerards@xs4all.nl>
13316
13317 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13318 `-m32' to CFLAGS.
13319
13320 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13321 linking.
f19dbdb7 13322
59b8208a 13323 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13324 (COMMON_LDFLAGS): New variable.
13325 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13326 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13327 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13328 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13329 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13330 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13331 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13332 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13333 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13334 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13335 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13336 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13337 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13338 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13339 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13340 variables.
13341 (normal_mod_ASFLAGS): Add `-m32'.
13342
13343 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13344 (grub_host_size_t, grub_host_ssize_t): New types.
13345 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 13346 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 13347 `GRUB_HOST_SIZEOF_VOID_P'.
13348
13349 * include/grub/kernel.h (struct grub_module_header): Type of
13350 member offset changed to `grub_host_off_t'. Type of member size
13351 changed to `grub_host_size_t'.
13352 (struct grub_module_info): Type of member offset changed to
13353 `grub_host_off_t'. Type of member size changed to
13354 `grub_host_size_t'.
13355
b4093103 133562005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13357
13358 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 13359
b4093103 13360 * kern/i386/pc/startup.S (multiboot_header): New label.
13361 (multiboot_entry): Likewise.
13362 (multiboot_trampoline): Likewise.
13363
13364 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13365 Increased to 0x4A0.
13366
13367 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13368 put parentheses after a question mark.
13369 [!GRUB_UTIL] (my_mod): New variable.
13370
13371 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13372
b2499b29 133732005-09-28 Marco Gerards <mgerards@xs4all.nl>
13374
13375 Adds support for the XFS filesystem. Btrees are not supported
13376 yet.
13377
13378 * fs/xfs.c: New file.
13379
13380 * DISTLIST: Added `fs/xfs.c'.
13381
13382 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13383 (grub_probefs_SOURCES): Likewise.
13384 (grub_emu_SOURCES): Likewise.
13385 (pkgdata_MODULES): Add `xfs.mod'.
13386 (xfs_mod_SOURCES): New variable.
13387 (xfs_mod_CFLAGS): Likewise.
13388
13389 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13390 (pkgdata_MODULES): Add `xfs.mod'.
13391 (xfs_mod_SOURCES): New variable.
13392 (xfs_mod_CFLAGS): Likewise.
13393
13394 * util/grub-emu.c (main): Call `grub_xfs_init' and
13395 `grub_xfs_fini'.
13396
13397 * include/grub/fs.h (grub_xfs_init): New prototype.
13398 (grub_xfs_fini): Likewise.
13399
f19dbdb7 13400
83d37a62 134012005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13402
13403 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13404 color modes, allow greater than 16 colors to be configured as
13405 a default palette.
13406
47d2d65e 134072005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13408
13409 * normal/completion.c (complete_arguments): Add the qualifier
13410 const into OPTIONS.
13411
13412 From Omniflux <omniflux+lists@omniflux.com>:
13413 * include/grub/terminfo.h: New file.
13414 * include/grub/tparm.h: Likewise.
13415 * include/grub/i386/pc/serial.h: Likewise.
13416 * term/terminfo.c: Likewise.
13417 * term/tparm.c: Likewise.
13418 * term/i386/pc/serial.c: Likewise.
13419 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13420 serial.mod.
13421 (terminfo_mod_SOURCES): New variable.
13422 (terminfo_mod_CFLAGS): Likewise.
13423 (serial_mod_SOURCES): Likewise.
13424 (serial_mod_CFLAGS): Likewise.
13425
48b671ff 134262005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13427
13428 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13429 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13430 and kern/powerpc/ieee1275/cmain.c, respectively.
13431
13432 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13433 * kern/powerpc/ieee1275/crt0.S: ... here.
13434
13435 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13436 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 13437
48b671ff 13438 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13439 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13440 instead of boot/powerpc/ieee1275/crt0.S and
13441 boot/powerpc/ieee1275/cmain.c, respectively.
13442
13443 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13444 sectors. It was not used anyway.
13445
09fc77a7 134462005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13447
13448 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13449 `unused parameter' warning.
13450
003789c7 134512005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13452
13453 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13454 function.
13455 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13456 getcharwidth.
13457
67f44c86 134582005-08-28 Marco Gerards <metgerards@student.han.nl>
13459
13460 * include/grub/normal.h (enum grub_completion_type): Added
13461 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13462
13463 * normal/cmdline.c (print_completion): Handle
13464 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13465 * normal/menu_entry.c (store_completion): Likewise.
13466
13467 * normal/completion.c (complete_arguments): New function.
13468 (grub_normal_do_completion): Call `complete_arguments' when the
13469 current words start with a dash.
13470
0b5abe02 134712005-08-27 Marco Gerards <metgerards@student.han.nl>
13472
13473 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13474 `gzio.mod' instead of `io.mod').
13475
d9864ee1 134762005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13477
13478 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13479 (DISTDIRS): Added io and video.
13480 Rewrite the search routine to make an output consistently.
13481
13482 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13483 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13484 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13485 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13486 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13487 util/powerpc/ieee1275/misc.c.
f19dbdb7 13488
d9864ee1 13489 * include/grub/gzio.h: New file.
13490 * io/gzio.c: Likewise.
f19dbdb7 13491
d9864ee1 13492 * kern/file.c (grub_file_close): Call grub_device_close only if
13493 FILE->DEVICE is not NULL.
13494
13495 * include/grub/mm.h [!NULL] (NULL): New macro.
13496
13497 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13498
13499 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13500 (pkgdata_MODULES): Added gzio.mod.
13501 (gzio_mod_SOURCES): New variable.
13502 (gzio_mod_CFLAGS): Likewise.
13503
13504 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13505 (pkgdata_MODULES): Added gzio.mod.
13506 (gzio_mod_SOURCES): New variable.
13507 (gzio_mod_CFLAGS): Likewise.
13508
13509 * commands/cat.c: Include grub/gzio.h.
13510 (grub_cmd_cat): Use grub_gzfile_open instead of
13511 grub_file_open.
f19dbdb7 13512
d9864ee1 13513 * commands/cmp.c: Include grub/gzio.h.
13514 (grub_cmd_cmp): Use grub_gzfile_open instead of
13515 grub_file_open.
13516
13517 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13518 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13519 grub_file_open.
13520 (grub_rescue_cmd_module): Likewise.
13521
fa46f4b5 135222005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13523
13524 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13525 kern/sparc64/ieee1275/init.c because it contains _start.
13526 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13527
e9211b5d 135282005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13529
13530 * configure.ac: Add support for sparc64 host with ieee1275
13531 firmware.
13532 * configure: Generated from configure.ac.
13533 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13534 instead of int.
13535 (grub_ofdisk_read): Likewise.
13536 (grub_ofdisk_open): Use %p to print pointer values, and cast the
13537 pointers as (void *) to remove a warning.
13538 (grub_ofdisk_close): Likewise.
13539 (grub_ofdisk_read): Likewise.
13540 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13541 returns, so make it return void to remove a warning.
13542 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13543 Corresponding prototype change.
13544 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13545 values, and cast the pointers as (void *) to remove a warning.
13546 (grub_mm_dump): Likewise.
13547 * conf/sparc64-ieee1275.mk: New file.
13548 * conf/sparc64-ieee1275.rmk: Likewise.
13549 * include/grub/sparc64/setjmp.h: Likewise.
13550 * include/grub/sparc64/types.h: Likewise.
13551 * include/grub/sparc64/ieee1275/console.h: Likewise.
13552 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13553 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13554 * include/grub/sparc64/ieee1275/time.h: Likewise.
13555 * kern/sparc64/cache.c: Likewise.
13556 * kern/sparc64/dl.c: Likewise.
13557 * kern/sparc64/ieee1275/init.c: Likewise.
13558 * kern/sparc64/ieee1275/openfw.c: Likewise.
13559
385c6a92 135602005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13561
13562 * util/console.c (grub_ncurses_putchar): If C is greater than
13563 0x7f, set C to a question mark.
13564 (grub_ncurses_getcharwidth): New function.
13565 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13566 getcharwidth.
13567
13568 * normal/menu.c (print_entry): Made aware of Unicode. First,
13569 convert TITLE to UCS-4, and predict the cursor position by
13570 grub_getcharwidth.
13571
13572 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13573 const to SRC.
13574 * kern/misc.c (grub_utf16_to_utf8): Likewise.
13575
16ccb8b1 135762005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13577
13578 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13579 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13580 grub_strcat.
13581
13582 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13583 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13584 grub_strcpy and grub_strlen. Take it into account that a space
13585 character is inserted as a delimiter.
13586
6a85ce79 135872005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13588
13589 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 13590 invalid magic in the error.
6a85ce79 13591
13592 * commands/search.c: New file.
f19dbdb7 13593
6a85ce79 13594 * util/grub-emu.c (main): Call grub_search_init and
13595 grub_search_fini.
13596
13597 * kern/rescue.c (grub_rescue_print_disks): Removed.
13598 (grub_rescue_print_devices): New function.
13599 (grub_rescue_cmd_ls): Use grub_device_iterate with
13600 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13601 grub_rescue_print_disks.
13602
13603 * kern/partition.c (grub_partition_iterate): Return the result of
13604 PARTMAP->ITERATE instead of GRUB_ERRNO.
13605
13606 * kern/device.c: Include grub/partition.h.
13607 (grub_device_iterate): New function.
13608
13609 * include/grub/partition.h (grub_partition_iterate): Return int
13610 instead of grub_err_t.
13611
13612 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13613 prototype.
13614 [GRUB_UTIL] (grub_search_fini): Likewise.
13615
13616 * include/grub/device.h (grub_device_iterate): New prototype.
13617
13618 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13619 commands/search.c.
13620 (pkgdata_MODULES): Added search.mod.
13621 (search_mod_SOURCES): New variable.
13622 (search_mod_CFLAGS): Likewise.
13623
13624 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13625 (pkgdata_MODULES): Added search.mod.
13626 (search_mod_SOURCES): New variable.
13627 (search_mod_CFLAGS): Likewise.
13628
13629 * commands/ls.c (grub_ls_list_disks): Renamed to ...
13630 (grub_ls_list_devices): ... this, and use grub_device_iterate.
13631 All callers changed.
13632
13633 * DISTLIST: Added commands/search.c.
13634
ef095434 136352005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13636
13637 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13638 conversion.
13639 (grub_getcharwidth): New function.
13640
13641 * kern/misc.c (grub_utf8_to_ucs4): New function.
13642
13643 * include/grub/term.h (struct grub_term): Added a new member
13644 "getcharwidth".
13645 (grub_getcharwidth): New prototype.
13646
13647 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13648
13649 * term/i386/pc/console.c (map_char): New function. Segregated from
13650 grub_console_putchar.
13651 (grub_console_putchar): Use map_char.
13652 (grub_console_getcharwidth): New function.
13653 (grub_console_term): Specified grub_console_getcharwidth as
13654 getcharwidth.
13655
13656 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13657 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13658
13659 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13660 GRUB_ERRNO.
13661 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13662 on grub_strtoul completely.
13663 (write_char): Declare local variables in the beginning of the
13664 function.
13665 (grub_vesafb_getcharwidth): New function.
13666 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13667 getcharwidth.
13668
1f0a95e4 136692005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
13670
13671 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13672 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13673 commands/i386/pc/vbetest.c.
13674
13675 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13676 call grub_vbe_get_controller_info again, because the returned
13677 information is volatile.
13678 (grub_vbe_set_video_mode): Mostly rewritten.
13679 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13680 grub_vbe_status_t correctly.
13681 (grub_vbe_get_video_mode_info): Likewise.
13682 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13683 several if statements.
13684
13685 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13686 * commands/i386/pc/vbeinfo.c: ... this.
13687
13688 * commands/i386/pc/vbe_test.c: Renamed to ...
13689 * commands/i386/pc/vbetest.c: ... this.
13690
13691 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13692 ...
13693 (grub_cmd_vbeinfo): ... this. Save video modes before
13694 iterating. Skip a video mode, if it is not available, not enough
13695 information is given or it is monochrome. Show the memory
13696 model. Leave the interpretation of MODEVAR to grub_strtoul
13697 completely.
13698 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13699 (GRUB_MOD_FINI): Likewise.
13700
13701 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13702 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13703 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13704 duplicated grub_env_get. Leave the interpretation of MODEVAR to
13705 grub_strtoul completely.
13706 (real2pm): Removed.
13707 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13708 (GRUB_MOD_FINI): Likewise.
13709
13710 * normal/misc.c: Include grub/mm.h.
13711
13712 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13713 vbe_list_modes with vbetest.mod and vbeinfo.mod.
13714 (vbe_list_modes_mod_SOURCES): Removed.
13715 (vbe_list_modes_mod_CFLAGS): Likewise.
13716 (vbe_test_mod_SOURCES): Likewise.
13717 (vbe_test_mod_CFLAGS): Likewise.
13718 (vbeinfo_mod_SOURCES): New variable.
13719 (vbeinfo_mod_CFLAGS): Likewise.
13720 (vbetest_mod_SOURCES): Likewise.
13721 (vbetest_mod_CFLAGS): Likewise.
13722
992ffbbe 137232005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
13724
13725 * normal/misc.c: New file.
13726
13727 * DISTLIST: Added normal/misc.c.
f19dbdb7 13728
992ffbbe 13729 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13730 DISK to HOOK. Call HOOK with DISK.
13731 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13732 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13733 * partmap/sun.c (sun_partition_map_iterate): Likewise.
13734
13735 * normal/menu_entry.c (struct screen): Added a new member
13736 "completion_shown".
13737 (completion_buffer): New global variable.
13738 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13739 (store_completion): New function.
13740 (complete): Likewise.
13741 (clear_completions): Likewise.
13742 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13743 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13744 a tab, call complete.
13745
13746 * normal/completion.c (disk_dev): Removed.
13747 (print_simple_completion): Likewise.
13748 (print_partition_completion): Likewise.
13749 (print_func): New global variable.
13750 (add_completion): Do not take the arguments WHAT or PRINT any
13751 longer. Added a new argument TYPE. Instead of printing directly,
13752 call PRINT_FUNC if not NULL.
13753 All callers changed.
13754 (complete_device): Use a local variable DEV instead of
13755 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13756 (grub_normal_do_completion): Take a new argument HOOK. Do not
13757 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13758 empty string, return NULL instead.
13759 All callers changed.
13760
13761 * normal/cmdline.c (print_completion): New function.
13762
13763 * kern/partition.c (grub_partition_iterate): Add an argument DISK
13764 to HOOK.
13765 All callers changed.
13766
13767 * kern/disk.c (grub_print_partinfo): Removed.
13768
13769 * include/grub/partition.h (struct grub_partition_map): Add a new
13770 argument DISK into HOOK of ITERATE.
13771 (grub_partition_iterate): Add a new argument DISK to HOOK.
13772
13773 * include/grub/normal.h (enum grub_completion_type): New enum.
13774 (grub_completion_type_t): New type.
13775 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13776 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13777 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13778 (GRUB_COMPLETION_TYPE_FILE): Likewise.
13779 (grub_normal_do_completion): Added a new argument HOOK.
13780 (grub_normal_print_device_info): New prototype.
13781
13782 * include/grub/disk.h (grub_print_partinfo): Removed.
13783
13784 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13785 (normal_mod_SOURCES): Likewise.
13786 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13787 (normal_mod_SOURCES): Likewise.
13788
13789 * commands/ls.c (grub_ls_list_disks): Use
13790 grub_normal_print_device_info instead of grub_print_partinfo. Free
13791 PNAME.
13792 (grub_ls_list_files): Use grub_normal_print_device_info instead of
13793 duplicating the code.
13794
0bd41162 137952005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13796
13797 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 13798 follow GCS more precisely.
13799 * commands/i386/pc/vbe_test.c: Likewise.
13800 * include/grub/i386/pc/vbe.h: Likewise.
13801 * term/i386/pc/vesafb.c: Likewise.
13802 * video/i386/pc/vbe.c: Likewise.
0bd41162 13803
6323696a 138042005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13805
13806 * DISTLIST: Added term/i386/pc/vesafb.c
13807 DISTLIST: Added video/i386/pc/vbe.c
13808 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13809 DISTLIST: Added commands/i386/pc/vbe_test.c.
13810 * commands/i386/pc/vbe_list_modes.c: New file.
13811 * commands/i386/pc/vbe_test.c: Likewise.
13812 * term/i386/pc/vesafb.c: Likewise.
13813 * video/i386/pc/vbe.c: Likewise.
13814 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13815 (grub_vbe_probe) Added prototype.
13816 (grub_vbe_set_video_mode) Likewise.
13817 (grub_vbe_get_video_mode) Likewise.
13818 (grub_vbe_get_video_mode_info) Likewise.
13819 (grub_vbe_set_pixel_rgb) Likewise.
13820 (grub_vbe_set_pixel_index) Likewise.
13821 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13822 (pkgdata_MODULES): Added vesafb.mod.
13823 (pkgdata_MODULES): Added vbe_list_modes.mod.
13824 (pkgdata_MODULES): Added vbe_test.mod.
13825 (vbe_mod_SOURCES): Added.
13826 (vbe_mod_CFLAGS): Likewise.
13827 (vesafb_mod_SOURCES): Likewise.
13828 (vesafb_mod_CFLAGS): Likewise.
13829 (vbe_list_modes_mod_SOURCES): Likewise.
13830 (vbe_list_modes_mod_CFLAGS): Likewise.
13831 (vbe_test_mod_SOURCES): Likewise.
13832 (vbe_test_mod_CFLAGS): Likewise.
13833
0a74e62f 138342005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
13835
0a74e62f 13836 * normal/command.c (grub_command_execute): If INTERACTIVE is
13837 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13838 CMDLINE. Disable the pager if INTERACTIVE is true.
13839 All callers are changed.
13840
13841 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13842 before reading a config file.
13843 * normal/main.c (read_config_file): Even if a command is not
13844 found, register it if it is within an entry.
13845
13846 * util/grub-emu.c: Include sys/types.h and unistd.h.
13847 (options): Added --hold.
13848 (struct arguments): Added a new member "hold".
13849 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13850 missing.
13851 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13852 cleared by a debugger, if it is not zero.
13853
13854 * include/grub/normal.h (grub_command_execute): Add an argument
13855 INTERACTIVE.
13856
e51f85ae 138572005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
13858
13859 * DISTLIST: Added include/grub/i386/pc/vbe.h.
13860
e9c6f39b 138612005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
13862
13863 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13864 program with another one, because the old one didn't detect a bug
13865 in gcc-3.4. Always use regparm 2, because the new test is still
13866 not enough for gcc-4.0. Someone must investigate a simple test
13867 case which detects a bug in gcc-4.0.
13868
8de3495c 138692005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
13870
13871 * DISTLIST: Added normal/completion.c.
13872
13873 * normal/completion.c: New file.
f19dbdb7 13874
8de3495c 13875 * term/i386/pc/console.c (grub_console_getwh): New function.
13876 (grub_console_term): Assign grub_console_getwh to getwh.
13877
13878 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13879 function is defined in normal/completion.c as
13880 grub_normal_do_completion.
13881 (grub_cmdline_get): Use grub_normal_do_completion instead of
13882 grub_tab_complete.
13883
13884 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13885 returns non-zero, otherwise return 0.
13886 (grub_partition_iterate): First, probe the partition map. Then,
13887 call ITERATE only for this partition map.
13888
13889 * kern/misc.c (grub_strncmp): Rewritten.
13890
13891 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13892 returns non-zero. Otherwise return 0.
13893
13894 * include/grub/partition.h (grub_partition_map_iterate): Return
13895 int instead of void.
13896
13897 * include/grub/normal.h (grub_normal_do_completion): New prototype.
13898
13899 * include/grub/misc.h (grub_strncmp): Change the type of N to
13900 grub_size_t.
13901
13902 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13903 of void.
13904
13905 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 13906 unsigned explicitly before comparing it with I.
8de3495c 13907
13908 * kern/main.c (grub_env_write_root): Add the attribute unused into
13909 VAR.
13910
13911 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13912 normal/completion.c.
13913 (normal_mod_SOURCES): Likewise.
13914 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13915 (normal_mod_SOURCES): Likewise.
13916
13917 * normal/command.c (grub_iterate_commands): If ITERATE returns
13918 non-zero, return one immediately.
13919
e85e144b 139202005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
13921
13922 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13923 * kern/i386/pc/startup.S: Updated Global Descriptor table's
13924 descriptions.
13925 (grub_vbe_get_controller_info): New function.
13926 (grub_vbe_get_mode_info): Likewise.
13927 (grub_vbe_set_mode): Likewise.
13928 (grub_vbe_get_mode): Likewise.
13929 (grub_vbe_set_memory_window): Likewise.
13930 (grub_vbe_get_memory_window): Likewise.
13931 (grub_vbe_set_scanline_length): Likewise.
13932 (grub_vbe_get_scanline_length): Likewise.
13933 (grub_vbe_set_display_start): Likewise.
13934 (grub_vbe_get_display_start): Likewise.
13935 (grub_vbe_set_palette_data): Likewise.
13936 * include/grub/i386/pc/vbe.h: New file.
13937
c46153d2 139382005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13939
13940 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13941 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13942 * DISTLIST: Likewise.
13943 * kern/ieee1275/of.c: Moved to ...
13944 * kern/ieee1275/ieee1275.c: ... here.
13945
0cb90c45 139462005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13947
13948 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13949 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13950 Pass 0 as `end' parameter to grub_strtoul().
13951
a19fb360 139522005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13953
13954 * include/grub/powerpc/ieee1275/console.h: Do not include
13955 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
13956 ifdef.
13957 (grub_console_cur_color): Remove i386-specific prototype.
13958 (grub_console_real_putchar): Likewise.
13959 (grub_console_checkkey): Likewise.
13960 (grub_console_getkey): Likewise.
13961 (grub_console_getxy): Likewise.
13962 (grub_console_gotoxy): Likewise.
13963 (grub_console_cls): Likewise.
13964 (grub_console_setcursor): Likewise.
13965 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13966 Include <grub/machine/console.h>.
13967 * term/ieee1275/ofconsole.c: Likewise.
13968
4ac9bd04 139692005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
13970
13971 * Makefile.in (LIBLZO): New variable.
13972
13973 * configure.ac: Check for LZO version 2.
13974
13975 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13976 lzo/lzo1x.h instead of lzo1x.h.
13977
13978 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13979 of -llzo.
13980
13981 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13982 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13983
13984 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13985 copying the data from PARTITION to P.
13986
f4917dfd 139872005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13988
13989 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13990 negative, unload the module.
13991
13992 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13993 map is "pc_partition_map" but not "pc".
13994 (usage): Fix the description. The options are --boot-image and
13995 --core-image but not --boot-file or --core-file.
13996 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13997 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13998 DEFAULT_DIRECTORY.
13999
14000 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14001 --core-file. Specify INSTALL_DEVICE as an argument.
14002
14003 * util/console.c: Include config.h.
14004 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14005 [HAVE_NCURSES_H]: Include ncurses.h.
14006 [HAVE_CURSES_H]: Include curses.h.
14007 [!A_NORMAL] (A_NORMAL): Defined as zero.
14008 [!A_STANDOUT] (A_STANDOUT): Likewise.
14009
14010 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14011 -lncurses.
14012 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14013
14014 * configure.ac: Check for curses libraries and headers.
14015
14016 * Makefile.in (LIBCURSES): New variable.
14017
14018 * genmk.rb (Script::rule): Set the executable bits.
14019
14020 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14021 name of the PC partition map is "pc_partition_map" but not "pc".
14022
0e143073 140232005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14024
14025 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14026 (modules): Likewise.
14027 (usage): Added descriptions for --modules and --grub-probefs.
14028 Handle --modules and --grub-probefs. Save the arguments in MODULES
14029 and GRUB_PROBEFS, respectively.
14030 Auto-detect a filesystem module against GRUBDIR. If the result is
14031 empty and modules are not specified explicitly, abort the
14032 installation. Add the result to MODULES.
14033
14034 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14035 disk/powerpc/ieee1275/ofdisk.c,
14036 include/grub/powerpc/ieee1275/init.h and
14037 term/powerpc/ieee1275/ofconsole.c.
14038 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14039 term/ieee1275/ofconsole.c.
14040
14041 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14042
14043 * COPYING: Upgraded to the latest version. Only the address of the
14044 FSF office has changed.
f19dbdb7 14045
efd6e6d5 140462005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14047
14048 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14049 kern/ieee1275.c with kern/ieee1275/of.c.
14050
14051 * kern/ieee1275.c: Moved to ...
14052 * kern/ieee1275/of.c: ... here.
14053
8ceafda2 140542005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14055
14056 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 14057 readability.
8ceafda2 14058
14059 * config.guess: Updated to the latest version from gnulib.
14060 * config.sub: Likewise.
14061 * install.sh: Likewise.
14062 * mkinstalldirs: Likewise.
14063
14064 * include/grub/console.h: Removed. This file is arch-specific. Do
14065 not put this in include/grub.
14066
14067 * include/grub/i386/pc/console.h: Resurrected.
14068
14069 * util/console.c: Include grub/machine/console.h instead of
14070 grub/console.h.
14071 * util/grub-emu.c: Likewise.
14072
267f6cd9 140732005-08-04 Marco Gerards <metgerards@student.han.nl>
14074
14075 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14076 hardcoded value.
f19dbdb7 14077
267f6cd9 14078 From Vincent Pelletier <subdino2004@yahoo.fr>
14079 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14080 Redefined to use grub_getwh.
14081 (grub_term): New member named getwh.
14082 (grub_getwh): New prototype.
14083 * kern/term.c (grub_getwh): New function.
14084 * term/i386/pc/console.c (grub_console_getwh): New function.
14085 (grub_console_term): New member `getwh'.
14086 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14087 (grub_vga_term): New member `getwh'.
0b5abe02 14088 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 14089 grub_ssize_t.
14090 (grub_ofconsole_getw): New function.
14091 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14092 (grub_ofconsole_term): New field named getwh and new initial
14093 value.
14094
3be7266d 140952005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14096
14097 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14098 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14099 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14100 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14101 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14102 of <grub/machine/ieee1275.h>.
14103 * commands/ieee1275/reboot.c: Likewise.
14104 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14105 * kern/ieee1275.c: ... to here. All users updated. Change all
14106 parameter structs to use new type `grub_ieee1275_cell_t'.
14107 * term/powerpc/ieee1275/ofconsole.c: Move ...
14108 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14109 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14110 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14111 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14112 to return int.
14113 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14114 Remove unused prototypes. All users updated.
14115 * include/grub/powerpc/ieee1275/console.h: Removed.
14116 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14117 `grub_ieee1275_cell_t'.
14118 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14119 Cast comparisons with -1 to the correct type.
14120 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14121 type to match `grub_ieee1275_entry_fn'.
14122
8b5f3938 141232005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14124
14125 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14126
14127 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14128 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14129 partmap/sun.c.
14130 (grub_probefs_SOURCES): New variable.
14131
14132 * util/i386/pc/grub-probefs.c: New file.
14133
14134 * util/i386/pc/grub-setup.c (main): Call
14135 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14136 grub_hfs_init and grub_jfs_init to initialize the system. Call
14137 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14138 grub_pc_partition_map_fini to finish the system.
14139
ea409713 141402005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14141
14142 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14143 function.
14144 (grub_multiboot_load_elf32): Likewise.
14145 (grub_multiboot_is_elf64): Likewise.
14146 (grub_multiboot_load_elf64): Likewise.
14147 (grub_multiboot_load_elf): Likewise.
14148 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14149 an ELF32 or ELF64 file.
14150 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14151
14152 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14153 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14154 NULL before calling FS->LABEL.
14155 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14156 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14157 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14158 before calling FS->LABEL.
14159
141a288b 141602005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14161
14162 * util/i386/pc/grub-install.in (datadir): New variable.
14163 (libdir): Removed.
14164 (pkgdatadir): New variable.
14165 (pkglibdir): Removed.
14166
0d5f8a54 141672005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14168
14169 * DISTLIST: Added util/i386/pc/grub-install.in.
14170
14171 * util/i386/pc/grub-install.in: New file.
14172
14173 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14174 (grub_install_SOURCES): Likewise.
14175
14176 * genmk.rb: Added support for scripts.
14177 (Script): New class.
14178 (scripts): New variable.
14179
14180 * Makefile.in (install-local): Install sbin_SCRIPTS by
14181 INSTALL_SCRIPT.
14182 (uninstall): Remove sbin_SCRIPTS.
14183
14184 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14185 device, try to get a GRUB device by
14186 grub_util_biosdisk_get_grub_dev.
14187 Free DEST_DEV.
14188
14189 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14190 description for --device-map.
14191
5f968e1e 141922005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14193
14194 Change the semantics of variable hooks. They now return strings
14195 instead of error values.
f19dbdb7 14196
5f968e1e 14197 * util/i386/pc/grub-setup.c: Include grub/env.h.
14198 (setup): Use grub_device_set_root instead of grub_env_set.
14199
14200 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14201 grub_env_get instead of grub_device_set_root and
14202 grub_device_get_root, respectively.
14203
14204 * kern/main.c (grub_env_write_root): New function.
14205 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14206 grub_env_set instead of grub_device_set_root.
14207
14208 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14209 many variables.
14210 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14211 rather than calling ENV->WRITE_HOOK afterwards.
14212 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14213 passing a pointer of a pointer.
14214 (grub_register_variable_hook): Change the types of "read_hook" and
14215 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14216 respectively.
14217 Allocate the default empty string on the heap, because this string
14218 may be freed later.
14219
14220 * kern/device.c: Include grub/env.h.
14221 (grub_device_set_root): Removed.
14222 (grub_device_get_root): Likewise.
14223 (grub_device_open): Use grub_env_get instead of
14224 grub_device_get_root.
14225
14226 * include/grub/env.h (grub_env_read_hook_t): New type.
14227 (grub_env_write_hook_t): Likewise.
14228 (grub_env_var): Change the types of "read_hook" and "write_hook"
14229 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14230 (grub_register_variable_hook): Likewise.
14231
14232 * include/grub/device.h (grub_device_set_root): Removed.
14233 (grub_device_set_root): Likewise.
14234
14235 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14236 make sure that DIRNAME terminates with '/', so that
14237 grub_fat_find_dir will fail if PATH is not a directory.
14238
14239 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14240 from DIRNAME.
14241 Use the qualifier auto for print_files and print_files_long.
14242 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14243 as a regular file.
14244 Put a newline only if there is no error.
14245 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14246 used.
14247
896f0afd 142482005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14249
14250 * kern/partition.c (grub_partition_probe): Initialize PART to
14251 NULL. Otherwise, when no partition map is registered, this returns
14252 a garbage.
14253
b28b81b2 142542005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14255
14256 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14257 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14258 valid.
14259
5f3607e0 142602005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14261
14262 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14263 information on each device, if it does not have partitions. Print
14264 "Device" instead of "Disk", because this function is not specific
14265 to disk devices.
14266
14267 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14268 static to ensure that it is put on the memory rather than a
14269 register.
14270
502c87e8 142712005-07-17 Yoshinori Okuji <okuji@enbug.org>
14272
14273 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14274 (grub_cat_init): Likewise.
14275 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14276 (options): Likewise.
14277 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14278 (grub_configfile_init): Likewise.
14279 * font/manager.c (GRUB_MOD_INIT): Likewise.
14280 * commands/help.c (GRUB_MOD_INIT): Likewise.
14281 (grub_help_init): Likewise.
14282 * normal/command.c (grub_command_init): Likewise.
14283 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14284 * disk/loopback.c (grub_loop_init): Likewise.
14285 (GRUB_MOD_INIT): Likewise.
14286 * commands/ls.c (grub_ls_init): Likewise.
14287 (GRUB_MOD_INIT): Likewise.
14288 (options): Likewise.
14289 * commands/boot.c (grub_boot_init): Likewise.
14290 (GRUB_MOD_INIT): Likewise.
14291 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14292 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14293 (GRUB_MOD_INIT): Likewise.
14294 * commands/cmp.c (grub_cmp_init): Likewise.
14295 (GRUB_MOD_INIT): Likewise.
14296
14297 * normal/arg.c: Use <> instead of "" to include header files.
14298 (SHORT_ARG_HELP): New macro.
14299 (SHORT_ARG_USAGE): Likewise.
14300 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14301 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14302 descriptions.
14303 (find_short): Check if C is 'h' or 'u' explicitly.
14304 (grub_arg_show_help): Use space characters instead of tabs. Treat
14305 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14306 are shown with --help and --usage only if they are not used for
14307 the command itself.
14308 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14309 'h' and 'u'.
14310
14311 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14312 const into "longarg". Change the type of "shortarg" to int.
14313
f806d18e 143142005-07-17 Yoshinori Okuji <okuji@enbug.org>
14315
14316 * boot/i386/pc/boot.S (boot_drive_check): New label.
14317
14318 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14319 macro.
14320
14321 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14322 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14323
e293232b 143242005-07-17 Yoshinori Okuji <okuji@enbug.org>
14325
14326 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14327 When turning off Gate A20, skip the check and return immediately,
14328 because this is not fatal usually.
14329
ebedfd00 143302005-07-17 Yoshinori Okuji <okuji@enbug.org>
14331
14332 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14333 be 0x7C00 instead of 0x8000.
14334
14335 * boot/i386/pc/pxeboot.S: Rewritten.
14336
14337 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14338 EXT_C.
14339 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14340 result.
14341
654fc59f 143422005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14343
14344 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14345 robustness. This routine now supports a BIOS call and System
14346 Control Port A to modify the gate A20.
14347
14348 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14349 Increased to 0x440.
14350
09f9923f 143512005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14352
14353 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14354 device path and resulting ihandle.
14355 (grub_ofdisk_close): dprintf the ihandle being closed.
14356 (grub_ofdisk_read): dprintf function parameters.
14357 * kern/mm.c (grub_mm_init_region): Likewise.
14358 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14359 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14360 size, and boot arguments.
14361 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14362 before loading into memory.
14363 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14364 before loading into memory.
14365
7ef504d8 143662005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14367
14368 * kern/mm.c: Added much documentation.
14369 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14370 8, set to 5 instead of 8.
14371
e0f050c2 143722005-07-10 Yoshinori Okuji <okuji@enbug.org>
14373
14374 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14375
14376 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14377 (grub_mkdevicemap_SOURCES): New variable.
14378
14379 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14380 lib/device.c of GRUB Legacy.
14381
7224189a 143822005-07-10 Yoshinori Okuji <okuji@enbug.org>
14383
14384 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14385 instead of PATH is NULL.
14386
68c864eb 143872005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14388
14389 * commands/cmp.c (BUFFER_SIZE): New macro.
14390 (grub_cmd_cmp): Close the right file at the right time. Compare
14391 only data just read. Don't report files of different size as
14392 identical. Dynamically allocate buffers. Move variable
14393 declarations at the beginning of function.
14394
e6f3e614 143952005-07-09 Yoshinori Okuji <okuji@enbug.org>
14396
14397 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14398 reverse.
14399
f8f1559a 144002004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14401
14402 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14403 when backspace is pressed at beginning of line.
14404
39c9d41d 144052005-07-03 Yoshinori Okuji <okuji@enbug.org>
14406
14407 * DISTLIST: Added genfslist.sh.
14408
14409 * normal/main.c (fs_module_list): New variable.
14410 (autoload_fs_module): New function.
14411 (read_fs_list): Likewise.
14412 (grub_normal_execute): Call read_fs_list.
14413
14414 * kern/fs.c (grub_fs_autoload_hook): New variable.
14415 (grub_fs_probe): Added support for auto-loading.
14416
14417 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14418 (grub_fs_module_list_t): New type.
14419
14420 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14421 (grub_fs_autoload_hook): New prototype.
14422
14423 * genfslist.sh: New file.
f19dbdb7 14424
39c9d41d 14425 * genmk.rb: Added a rule to generate a filesystem list.
14426
121c1d83 144272005-06-30 Marco Gerards <metgerards@student.han.nl>
14428
14429 * configure.ac: Fix the test for cross-compiling.
14430
14431 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14432 define GRUB_UTIL anymore.
14433
14434 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14435 so this function works on other systems than just big endian.
14436 (load_modules): Likewise.
14437 (add_segments): Likewise.
14438
e75d76e1 144392005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14440
14441 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14442 contains `l' modifier, get a long from va_arg().
14443
50b5a0a7 144442005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14445
14446 * kern/mm.c (grub_free): If the next free block which is being
14447 merged is the first free block, set the first block to the block
14448 being freed.
14449 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14450
89371b20 144512005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14452
14453 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14454 `grub_ieee1275_chosen'.
14455
168d6e58 144562005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14457
14458 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14459 (grub_ieee1275_chosen): New variable.
14460 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14461 `chosen'.
14462 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14463 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14464 Rename first argument to `phandle' for consistency.
14465 (grub_ieee1275_get_property_length): Likewise.
14466 (grub_ieee1275_next_property): Likewise. Change type of first argument
14467 to grub_ieee1275_phandle_t.
14468 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14469 Move export next to declaration.
14470 (grub_ieee1275_chosen): New variable.
14471 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14472 Correct cosmetic typo.
14473 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14474 `grub_ieee1275_chosen'.
14475 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14476 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14477 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14478 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14479 `grub_ieee1275_chosen'.
14480
ca5baa3f 144812005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14482
14483 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14484 /chosen/bootargs.
14485 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14486 /chosen/bootargs as "variable=value" pairs.
14487
708b345f 144882005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14489
14490 * include/grub/misc.h (grub_dprintf): New macro.
14491 (grub_real_dprintf): New prototype.
14492 (grub_strword): Likewise.
14493 (grub_iswordseparator): Likewise.
14494 * kern/misc.c (grub_real_dprintf): New function.
14495 (grub_strword): Likewise.
14496 (grub_iswordseparator): Likewise.
14497
f4c5e67c 144982005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14499
14500 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14501 (roundup): Remove macro.
14502 (grub_ieee1275_flags): Make static.
14503 (grub_ieee1275_realmode): Remove.
14504 (grub_ieee1275_test_flag): New function.
14505 (grub_ieee1275_set_flag): Likewise.
14506 (find_options): Rename to `grub_ieee1275_find_options'; update
14507 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14508 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14509 (cmain): New prototype.
14510 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14511 `grub_ieee1275_flags' directly.
14512 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14513 machine/biosdisk.h.
14514 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14515 Don't include grub/machine/init.h.
14516 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14517 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14518 Remove prototype.
14519 (grub_ieee1275_realmode): Likewise.
14520 (grub_ieee1275_flag): New enum.
14521 (grub_ieee1275_test_flag): New prototype.
14522 (grub_ieee1275_set_flag): New prototype.
14523 * include/grub/powerpc/ieee1275/init.h: Remove file.
14524 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14525 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14526 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
14527 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
14528 comment.
14529 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14530 `grub_ieee1275_test_flag'.
14531 (grub_ieee1275_encode_devname): Likewise.
14532
ed16607e 145332005-04-21 Hollis Blanchard <hollis@penguinppc.org>
14534
14535 * include/grub/powerpc/ieee1275/ieee1275.h
14536 (grub_ieee1275_encode_devname): New prototype.
14537 (grub_ieee1275_get_filename): Likewise.
14538 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14539 function.
14540 (grub_set_prefix): Likewise.
14541 (grub_machine_init): Call grub_set_prefix.
14542 * kern/powerpc/ieee1275/openfw.c: Fix typos.
14543 (grub_parse_type): New enum.
14544 (grub_ieee1275_get_devargs): New function.
14545 (grub_ieee1275_get_devname): Likewise.
14546 (grub_ieee1275_parse_args): Likewise.
14547 (grub_ieee1275_get_filename): Likewise.
14548 (grub_ieee1275_encode_devname): Likewise.
14549
be369920 145502005-03-30 Marco Gerards <metgerards@student.han.nl>
14551
14552 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14553 `grub_loader_unset'.
14554
a5ce3a4a 145552005-03-26 Hollis Blanchard <hollis@penguinppc.org>
14556
14557 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14558 instead of grub_ieee1275_interpret.
14559 (grub_halt_init): New function.
14560 (grub_halt_fini): Likewise.
14561 (GRUB_MOD_INIT): Correct message grammar.
14562 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14563 instead of grub_ieee1275_interpret.
14564 (grub_reboot_init): New function.
14565 (grub_reboot_fini): Likewise.
14566 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14567 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14568 util/i386/pc/misc.c with commands/ieee1275/halt.c,
14569 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14570 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14571 function.
14572 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14573 Add prototype.
14574 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14575 prototype.
14576 (grub_halt): Likewise.
14577 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14578 (cmain): Remove __attribute__((unused)).
14579 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14580 (grub_heap_len): Likewise.
14581 (grub_machine_fini): New function.
14582 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14583 (grub_halt): Likewise.
14584 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14585 function.
14586 * util/powerpc/ieee1275/misc.c: New file.
14587
0058f771 145882005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14589
14590 * DISTLIST: New file.
14591 * gendistlist.sh: Likewise.
f19dbdb7 14592
0058f771 14593 * Makefile.in (COMMON_DISTFILES): Removed.
14594 (BOOT_DISTFILES): Likewise.
14595 (CONF_DISTFILES): Likewise.
14596 (DISK_DISTFILES): Likewise.
14597 (FS_DISTFILES): Likewise.
14598 (INCLUDE_DISTFILES): Likewise.
14599 (KERN_DISTFILES): Likewise.
14600 (LOADER_DISTFILES): Likewise.
14601 (TERM_DISTFILES): Likewise.
14602 (UTIL_DISTFILES): Likewise.
14603 (DISTFILES): Likewise.
14604 (uninstall): Uninstall files in $(pkgdata_DATA).
14605 (DISTLIST): New target.
14606 (distdir): Use the contents of the file DISTLIST to get a list of
14607 distributed files.
14608
46b3b8a5 146092005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14610
14611 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14612 descriptor. This is ported from GRUB Legacy.
14613
14614 * gencmdlist.sh: Added an extra semicolon to make it work with
14615 old sed versions. Reported by Robert Bihlmeyer
14616 <robbe@orcus.priv.at>.
14617
5822ff87 146182005-03-08 Yoshinori Okuji <okuji@enbug.org>
14619
14620 Automatic loading of commands is supported.
f19dbdb7 14621
5822ff87 14622 * normal/main.c (read_command_list): New function.
14623 (grub_normal_execute): Call read_command_list.
14624
14625 * normal/command.c (grub_register_command): Return zero or CMD.
14626 Allocate CMD->NAME from the heap.
14627 Initialize CMD->MODULE_NAME to zero.
14628 Find the same name as well. If the same command is found and it is
14629 a dummy command, overwrite members. If it is not a dummy command,
14630 return zero.
14631 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14632 (grub_command_find): If a dummy command is found, load a module
14633 and retry to find a command only once.
14634
14635 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14636 make sure that each command is loaded.
14637
14638 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14639 macro.
14640 (struct grub_command): Remove const from the member `name'.
14641 Add a new member `module_name'.
14642 (grub_register_command): Return grub_command_t.
14643
14644 * commands/help.c (grub_cmd_help): Call grub_command_find to make
14645 sure that each command is loaded.
14646
14647 * genmk.rb (PModule::rule): Specify a module name without the
14648 suffix ".mod" to gencmdlist.sh.
14649
7b1f4b57 146502005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14651
14652 * gencmdlist.sh: New file.
f19dbdb7 14653
7b1f4b57 14654 * genmk.rb (PModule::rule): Generate a rule for a command list.
14655 Clean command.lst.
14656 Generate command.lst from $(COMMANDFILES).
14657
14658 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14659 (DATA): Added $(pkgdata_DATA).
14660 (install-local): Install files in $(pkgdata_DATA).
14661
062aaf39 146622005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14663
14664 * term/i386/pc/vga.c (debug_command): Removed.
14665 (GRUB_MOD_INIT): Do not register the command "debug".
14666
14667 From Hollis Blanchard:
14668 * commands/configfile.c: New file.
14669 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14670 commands/configfile.c.
14671 (pkgdata_MODULES): Added configfile.mod.
14672 (configfile_mod_SOURCES): New variable.
14673 (configfile_mod_CFLAGS): Likewise.
14674 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14675 commands/configfile.c.
14676 (pkgdata_MODULES): Added configfile.mod.
14677 (configfile_mod_SOURCES): New variable.
14678 (configfile_mod_CFLAGS): Likewise.
14679 * util/grub-emu.c (main): Call grub_configfile_init and
14680 grub_configfile_fini.
14681 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14682 prototype.
14683 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 14684
cee01aa6 146852005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14686
14687 * normal/arg.c (grub_arg_show_help): Do not show the bug report
14688 address.
14689
14690 * commands/help.c (grub_cmd_help): Do not print newlines after
14691 the last command in print_command_help.
14692
93f3a1d8 146932005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14694
14695 * commands/default.h: New file.
14696 * commands/timeout.h: Likewise.
14697 * normal/context.c: Likewise.
f19dbdb7 14698
93f3a1d8 14699 * util/misc.c: Do not include sys/times.h.
14700 Include sys/time.h and grub/machine/time.h.
14701 (grub_get_rtc): Rewritten with gettimeofday.
14702
14703 * util/grub-emu.c (main): Call grub_default_init and
14704 grub_timeout_init before grub_normal_init, and call
14705 grub_timeout_fini and grub_default_fini after grub_main.
14706
14707 * util/console.c (grub_ncurses_checkkey): Return the read
14708 character or -1.
14709
14710 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14711 timeouts.
14712
14713 * normal/main.c (read_config_file): Push MENU. If this fails,
14714 print an error and wait for a user input.
14715 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14716 If a menu is empty or an error occurs, pop MENU.
14717 (grub_normal_execute): Pop and free MENU after grub_menu_run
14718 returns.
14719
14720 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14721
14722 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14723 include time.h.
14724 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14725 without GRUB_UTIL.
14726 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14727 time.h.
14728 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14729 without GRUB_UTIL.
14730
14731 * include/grub/normal.h (struct grub_menu_list): New struct.
14732 (grub_menu_list_t): New type.
14733 (struct grub_context): New struct.
14734 (grub_context_t): New type.
14735 (grub_register_command): Got rid of EXPORT_FUNC.
14736 (grub_unregister_command): Likewise.
14737 (grub_context_get): New prototype.
14738 (grub_context_get_current_menu): Likewise.
14739 (grub_context_push_menu): Likewise.
14740 (grub_context_pop_menu): Likewise.
14741 [GRUB_UTIL] (grub_default_init): Likewise.
14742 [GRUB_UTIL] (grub_default_fini): Likewise.
14743 [GRUB_UTIL] (grub_timeout_init): Likewise.
14744 [GRUB_UTIL] (grub_timeout_fini): Likewise.
14745
14746 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14747 commands/timeout.c and normal/context.c.
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 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14755 conf/i386-pc.rmk.
14756 (pkgdata_MODULES): Added default.mod and timeout.mod.
14757 (normal_mod_SOURCES): Added normal/context.c.
14758 (default_mod_SOURCES): New variable.
14759 (default_mod_CFLAGS): Likewise.
14760 (timeout_mod_SOURCES): Likewise.
14761 (timeout_mod_CFLAGS): Likewise.
14762
14763 * Makefile.in (all-local): Added $(MKFILES).
14764
4ed2e1dd 147652005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
14766
14767 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14768 (grub_emu_SOURCES): Likewise.
14769 (pkgdata_MODULES): Add `sun.mod'.
14770 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14771 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14772 `partmap/sun.c'.
14773 (pkgdata_MODULES): Add `sun.mod'.
14774 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14775 * include/grub/partition.h (grub_sun_partition_map_init): New
14776 prototype.
14777 (grub_sun_partition_map_fini): Likewise.
14778 * partmap/sun.c: New file.
14779 * util/grub-emu.c (main): Initialize and de-initialize the sun
14780 partitionmap support.
14781
4d4e372e 147822005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
14783
14784 This implements an Emacs-like menu entry editor.
f19dbdb7 14785
4d4e372e 14786 * normal/menu_entry.c: New file.
f19dbdb7 14787
4d4e372e 14788 * util/console.c (grub_ncurses_putchar): Translate some Unicode
14789 characters to ASCII.
14790 (saved_char): New variable.
14791 (grub_ncurses_checkkey): Rewritten completely.
14792 (grub_ncurses_getkey): Likewise.
14793 (grub_ncurses_init): Call raw instead of cbreak.
14794
14795 * normal/menu.c (print_entry): Do not put a space.
14796 (init_page): Renamed to ...
14797 (grub_menu_init_page): ... this. All callers changed.
14798 (edit_menu_entry): Removed.
14799 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14800
14801 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14802
14803 * kern/misc.c (grub_vprintf): Call grub_refresh.
14804
14805 * normal/menu.c (DISP_LEFT): Renamed to ...
14806 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14807 * normal/menu.c (DISP_UP): Renamed to ...
14808 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14809 * normal/menu.c (DISP_RIGHT): Renamed to ...
14810 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14811 * normal/menu.c (DISP_DOWN): Renamed to ...
14812 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14813 * normal/menu.c (DISP_HLINE): Renamed to ...
14814 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14815 * normal/menu.c (DISP_VLINE): Renamed to ...
14816 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14817 * normal/menu.c (DISP_UL): Renamed to ...
14818 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14819 * normal/menu.c (DISP_UR): Renamed to ...
14820 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14821 * normal/menu.c (DISP_LL): Renamed to ...
14822 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14823 * normal/menu.c (DISP_LR): Renamed to ...
14824 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14825 * normal/menu.c (TERM_WIDTH): Renamed to ...
14826 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14827 * normal/menu.c (TERM_HEIGHT): Renamed to ...
14828 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14829 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14830 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14831 * normal/menu.c (TERM_MARGIN): Renamed to ...
14832 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14833 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14834 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14835 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14836 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14837 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14838 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14839 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14840 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14841 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14842 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14843 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14844 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14845 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14846 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14847 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14848 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14849 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14850 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14851 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14852 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14853 All callers changed.
14854
14855 * include/grub/normal.h: New prototype.
14856
14857 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14858 normal/menu_entry.c.
14859 (normal_mod_SOURCES): Likewise.
14860 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14861 (normal_mod_SOURCES): Likewise.
14862
e6b92c8a 148632005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
14864
14865 * include/grub/normal.h (grub_halt_init): New prototype.
14866 (grub_halt_fini): Likewise.
14867 (grub_reboot_init): Likewise.
14868 (grub_reboot_fini): Likewise.
14869
14870 * util/grub-emu.c: Include signal.h.
14871 (main_env): New global variable.
14872 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14873 catch C-c.
14874 (grub_machine_fini): New function.
14875 (main): Call grub_halt_init and grub_reboot_init before
14876 grub_main, and grub_reboot_fini and grub_halt_fini after it.
14877 Call setjmp with MAIN_ENV to go back afterwards.
14878 Call grub_machine_fini right before return.
14879
14880 * include/grub/util/misc.h: Include setjmp.h.
14881 (main_env): New prototype.
14882
14883 * include/grub/kernel.h (grub_machine_fini): New prototype.
14884 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14885 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14886
14887 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14888 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14889 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 14890
e6b92c8a 14891 * util/i386/pc/misc.c: New file.
f19dbdb7 14892
e6b92c8a 14893 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14894 util/i386/pc/misc.c, commands/i386/pc/halt.c and
14895 commands/i386/pc/reboot.c.
14896
c642636f 148972005-02-14 Guillem Jover <guillem@hadrons.org>
14898
14899 * include/grub/dl.h (grub_dl_check_header): New prototype.
14900 (grub_arch_dl_check_header): Change return type to grub_err_t,
14901 remove size parameter and export function. Update all callers.
14902 * kern/dl.c (grub_dl_check_header): New function.
14903 (grub_dl_load_core): Use `grub_dl_check_header' instead of
14904 `grub_arch_dl_check_header'. Check ELF type. Check if sections
14905 are inside the core.
14906 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14907 independent ELF header checks.
14908 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14909 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14910 `grub_dl_check_header' instead of explicit checks. Check for the
14911 ELF type.
14912 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14913 `grub_dl_check_header' instead of explicit checks. Remove arch
14914 specific ELF header checks.
14915
e6b92c8a 14916 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14917 argument SIZE.
14918
5eabe94b 149192005-02-13 Hollis Blanchard <hollis@penguinppc.org>
14920
14921 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14922 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14923
1b14a681 149242005-02-12 Hollis Blanchard <hollis@penguinppc.org>
14925
14926 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 14927 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 14928 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 14929 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 14930 * partmap/amiga.c (amiga_partition_map_iterate): Return
14931 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14932 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14933
aca108aa 149342005-02-01 Guillem Jover <guillem@hadrons.org>
14935
14936 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14937 help info.
14938
c9f9c556 149392005-01-31 Marco Gerards <metgerards@student.han.nl>
14940
14941 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14942 Removed prototype.
14943 (grub_rescue_cmd_linux): New prototype.
14944 (grub_rescue_cmd_initrd): Likewise.
14945 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14946 `bi_rec'.
14947 (grub_linux_release_mem): Release the memory for the initrd.
14948 (grub_load_linux): Renamed from this...
14949 (grub_rescue_cmd_linux): ...To this. Changed all callers.
14950 Changed `entry' not to be static. Loop over memory regions to
14951 find another one when the default fails.
14952 (grub_rescue_cmd_initrd): New function.
14953 (grub_linux_init): Remove function.
14954 (grub_linux_fini): Likewise.
14955 (GRUB_MOD_INIT): Register `initrd'.
14956 (GRUB_MOD_FINI): Unregister `initrd'.
14957 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14958 Function removed.
14959 (grub_linux_normal_fini): Likewise.
14960 (GRUB_MOD_INIT): Register `initrd'.
14961 (GRUB_MOD_FINI): Unregister `initrd'.
14962
990cf3aa 149632005-01-31 Marco Gerards <metgerards@student.han.nl>
14964
14965 * commands/help.c: New file.
14966 * normal/arg.c (show_help): Renamed to...
14967 (grub_arg_show_help): ... this.
14968 * commands/i386/pc/halt.c: New file.
14969 * commands/i386/pc/reboot.c: Likewise.
14970 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14971 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14972 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14973 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14974 variables.
14975 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14976 `commands/help.c'.
14977 (pkgdata_MODULES): Add `help.mod'.
14978 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14979 * grub/i386/pc/init.h (grub_reboot): New prototype.
14980 (grub_halt): Likewise.
14981 * include/grub/normal.h (grub_arg_show_help): New prototype.
14982 (grub_help_init): Likewise.
14983 (grub_help_fini): Likewise.
14984 * util/grub-emu.c (main): Initialize and deinitialize the help
14985 command.
14986
14987 * normal/cmdline.c (grub_cmdline_get): Doc fix.
14988
14989 * normal/command.c (grub_command_init): Fixed the description of
14990 the `set' and `unset' commands.
14991
149922005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 14993
14994 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14995 function.
14996 * commands/ieee1275/halt.c: New file.
14997 * commands/ieee1275/reboot.c: Likewise.
14998 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14999 `__attribute__ ((unused))'. Some GCS related fixed.
15000 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15001 (grub_suspend_fini): Likewise.
15002 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15003 and `halt.mod'.
15004 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15005 (halt_mod_CFLAGS): New variables.
15006 * include/grub/powerpc/ieee1275/ieee1275.h
15007 (grub_ieee1275_interpret): New prototype.
15008
1ab09cc7 150092005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15010
15011 * include/grub/misc.h (memmove): New prototype.
15012 (memcpy): Likewise.
15013
8b8cbdb2 150142005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15015
15016 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15017 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15018
e3741a27 150192005-01-22 Marco Gerards <metgerards@student.han.nl>
15020
15021 * kern/misc.c (grub_strndup): Function rewritten.
15022
776bd780 150232005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15024
15025 * normal/menu.c (TERM_WIDTH): Macro redefined.
15026 (TERM_TOP_BORDER_Y): Likewise.
15027 (draw_border): Replaced while-loop by a for-loop. Make the number
15028 of lines consistent with the number of lines displayed in
15029 print_entries. Added a margin below the rectangle.
15030 (print_entry): Make the entry fit in the rectangle.
15031 (print_entries): Display the scroll arrows next to the right
15032 border.
15033
78026bce 150342005-01-21 Marco Gerards <metgerards@student.han.nl>
15035
15036 * fs/minix.c (grub_minix_find_file): Reserve more space for
15037 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15038 `grub_strncpy' to copy `path' into it.
15039
67bbaf0f 150402005-01-21 Marco Gerards <metgerards@student.han.nl>
15041
15042 Add the loopback device, a device via which files can be accessed
15043 as devices.
f19dbdb7 15044
67bbaf0f 15045 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15046 (pkgdata_MODULES): Add loopback.mod.
15047 (loopback_mod_SOURCES): New variable.
15048 (loopback_mod_CFLAGS): Likewise.
15049 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15050 `disk/loopback.c'.
15051 (pkgdata_MODULES): Add loopback.mod.
15052 (loopback_mod_SOURCES): New variable.
15053 (loopback_mod_CFLAGS): Likewise.
15054 * disk/loopback.c: new file.
15055 * include/grub/normal.h (grub_loop_init): New prototype.
15056 (grub_loop_fini): New prototype.
15057 * util/grub-emu.c (main): Initialize and de-initialize loopback
15058 support.
15059 * include/grub/disk.h (grub_disk_dev_id): Add
15060 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15061
6f1c18bd 150622005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15063
15064 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15065 function.
15066 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15067 (suspend_mod_SOURCES): New variable.
15068 (suspend_mod_CFLAGS): Likewise.
15069 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15070 New prototype.
15071 * commands/ieee1275/suspend.c: New file.
15072
b38551da 150732005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15074
15075 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 15076 ((unused))' to `__attribute__ ((used))'.
b38551da 15077 (GRUB_MOD_FINI): Likewise.
15078 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15079 * genmk.rb (PModule): Assign space to common symbols when linking
15080 modules.
15081
777aff39 150822005-01-20 Marco Gerards <metgerards@student.han.nl>
15083
15084 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15085 `unsigned' arguments to `grub_size_t'.
15086 (grub_malloc): Likewise.
15087 (grub_realloc): Likewise.
15088 (grub_memalign): Likewise.
15089 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15090 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15091 * util/misc.c (grub_malloc): Likewise.
15092 (grub_realloc): Likewise.
15093 * kern/mm.c (get_header_from_pointer): Change the casts to
15094 `unsigned' into a cast to `grub_size_t'.
15095
15096 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15097 point to `currnode' when `currnode' is changed.
15098
15099 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15100 Schottelius <nico-linux@schottelius.org>.
15101
d0ff18e1 151022005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15103
15104 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15105 (note_path): Remove variable.
15106 (GRUB_IEEE1275_NOTE_NAME): New macro.
15107 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15108 (grub_ieee1275_note_hdr): New structure.
15109 (grub_ieee1275_note_desc): Likewise.
15110 (grub_ieee1275_note): Likewise.
15111 (load_note): Remove `dir' argument. All callers updated. Remove
15112 `note_img' and `path'. Do not load a file from `note_path'.
15113 Initialize a struct grub_ieee1275_note and write that to `out'.
15114 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15115
4ca7004c 151162005-01-05 Marco Gerards <metgerards@student.han.nl>
15117
15118 * util/misc.c (grub_util_read_image): Revert last change. It
15119 called `grub_util_read_at', which seeks from the beginning of the
15120 file.
15121
0b412211 151222005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15123
15124 * TODO: Add note about endianness in grub-mkimage.
15125 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15126 section.
15127 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15128 (grub_mkimage_SOURCES): New target.
15129 * include/grub/kernel.h (grub_start_addr): Remove variable.
15130 (grub_end_addr): Likewise.
15131 (grub_total_module_size): Likewise.
15132 (grub_kernel_image_size): Likewise.
15133 (GRUB_MODULE_MAGIC): New constant.
15134 (grub_module_info): New structure.
15135 (grub_arch_modules_addr): New prototype.
15136 (grub_get_end_addr): Remove prototype.
15137 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15138 * include/grub/powerpc/ieee1275/kernel.h: New file.
15139 * include/grub/util/misc.h (grub_util_get_fp_size): New
15140 prototype.
15141 (grub_util_read_at): Likewise.
15142 (grub_util_write_image_at): Likewise.
15143 * kern/main.c (grub_get_end_addr): Remove function.
15144 (grub_load_modules): Call grub_arch_modules_addr instead of using
15145 grub_end_addr. Look for a grub_module_info struct in memory. Use
15146 the grub_module_info fields instead of calling grub_get_end_addr
15147 as loop conditions. Move grub_add_unused_region code here.
15148 (grub_add_unused_region): Remove function.
15149 * kern/i386/pc/init.c: Include grub/cache.h.
15150 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15151 one call to add_mem_region.
15152 (grub_arch_modules_addr): New function.
15153 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15154 (grub_total_module_size): Likewise.
15155 Include grub/machine/kernel.h.
15156 (grub_arch_modules_addr): New function.
15157 * util/grub-emu.c (grub_end_addr): Remove variable.
15158 (grub_total_module_size): Likewise.
15159 (grub_arch_modules_addr): New function.
15160 * util/misc.c: Include unistd.h.
15161 (grub_util_get_fp_size): New function.
15162 (grub_util_read_at): Likewise.
15163 (grub_util_write_image_at): Likewise.
15164 (grub_util_read_image): Call grub_util_read_at.
15165 (grub_util_write_image): Call grub_util_write_image_at.
15166 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15167 additional memory in kernel_img for a struct grub_module_info.
15168 Fill in that grub_module_info.
15169 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15170
458786f8 151712005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15172
15173 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15174 New function.
15175 * include/grub/powerpc/ieee1275/ieee1275.h
15176 (grub_ieee1275_milliseconds): New prototype.
15177 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15178 Change to 1000.
15179 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15180 grub_ieee1275_milliseconds.
15181
ac507d1b 151822005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15183
15184 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15185 variable.
15186 (find_options): New function.
15187 (cmain): Call find_options.
15188 * include/grub/powerpc/ieee1275/ieee1275.h
15189 (grub_ieee1275_realmode): New extern variable.
15190 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15191 grub_map if grub_ieee1275_realmode is false.
15192
6b8fd1c4 151932004-12-29 Marco Gerards <metgerards@student.han.nl>
15194
15195 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15196 lines are inserted and make it work like readline. Reported by
15197 Vincent Pelletier <subdino2004@yahoo.fr>.
15198
8514a1e0 151992004-12-28 Marco Gerards <metgerards@student.han.nl>
15200
15201 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15202
15203 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15204 `kern/powerpc/cache.S'.
15205
924b6140 152062004-12-27 Marco Gerards <metgerards@student.han.nl>
15207
15208 * genmk.rb: Handle the `Program' class in the main loop. Written
15209 by Johan Rydberg <jrydberg@gnu.org>.
15210 (Program): New class.
15211 (programs): New variable.
15212 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15213 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15214 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15215 (help_arch): Function removed.
15216 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15217 `powerpc/libgcc.h' and `loader.h'.
15218 (pkgdata_PROGRAMS): New variable.
15219 (sbin_UTILITIES): Variable removed.
15220 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15221 (grubof_SOURCES): Variable re-defined so it only includes the
15222 core functionality.
15223 (grubof_CFLAGS): Remove `-DGRUBOF'.
15224 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15225 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15226 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15227 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15228 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15229 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15230 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15231 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15232 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15233 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15234 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15235 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15236 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15237 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15238 (pc_mod_CFLAGS): New variables.
15239 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15240 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15241 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15242 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15243 Moved from here...
15244 * include/grub/i386/pc/init.h (grub_os_area_addr)
15245 (rub_os_area_size): ... to here.
15246 * include/grub/powerpc/ieee1275/ieee1275.h
15247 (grub_ieee1275_entry_fn): Export symbol.
15248 * include/grub/powerpc/ieee1275/init.h: New file.
15249 * include/grub/powerpc/libgcc.h: Likewise.
15250 * include/grub/cache.h: Likewise.
15251 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15252 <hollis@penguinppc.org>.
15253 * kern/dl.c: Include <grub/cache.h>.
15254 (grub_dl_flush_cache): New function.
15255 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15256 for this module.
15257 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15258 (grub_console_init): Removed prototypes.
15259 (grub_machine_init): Don't initialize the modules anymore.
15260 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15261 static.
15262 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15263 Macro undef removed.
15264 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15265 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15266 relocation `R_PPC_REL32'. Return an error when the relocation is
15267 unknown.
15268 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15269 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15270 * util/misc.c (grub_arch_sync_caches): Likewise.
15271
e4b47e0c 152722004-12-19 Marco Gerards <metgerards@student.han.nl>
15273
15274 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15275 `symlist.c', add `grubof_symlist.c'.
15276 (symlist.c): Variable removed.
15277 (grubof_HEADERS): Variable added.
15278 (grubof_symlist.c): New target.
15279 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15280 `kernel_img_HEADERS'.
15281 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15282 * kern/powerpc/dl.c: New file.
15283 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15284 Function removed.
15285 (grub_arch_dl_relocate_symbols): Likewise.
15286 (grub_register_exported_symbols): Likewise.
15287
4ceb3636 152882004-12-13 Marco Gerards <metgerards@student.han.nl>
15289
15290 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15291 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15292 to fail instead. Reported by Vincent Pelletier
15293 <subdino2004@yahoo.fr>.
15294
15295 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15296 it is not allocated. Reported by Vincent Pelletier
15297 <subdino2004@yahoo.fr>.
15298
15299 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15300 output so the output looks better.
f19dbdb7 15301
3f1578fe 153022004-12-04 Marco Gerards <metgerards@student.han.nl>
15303
15304 Modulize the partition map support and add support for the amiga
15305 partition map.
f19dbdb7 15306
3f1578fe 15307 * commands/ls.c: Include <grub/partition.h> instead of
15308 <grub/machine/partition.h>.
15309 * kern/disk.c: Likewise.
15310 * kern/rescue.c: Likewise.
15311 * loader/i386/pc/chainloader.c: Likewise.
15312 * normal/cmdline.c: Likewise.
15313 * kern/powerpc/ieee1275/init.c: Likewise.
15314 (grub_machine_init): Call `grub_pc_partition_map_init',
15315 `grub_amiga_partition_map_init' and
15316 `grub_apple_partition_map_init'.
15317 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15318 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15319 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15320 `partition.h' and `pc_partition.h'.
15321 (grub_setup_SOURCES): Remove
15322 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15323 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15324 (grub_emu_SOURCES): Likewise.
15325 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15326 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15327 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15328 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15329 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15330 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15331 (grubof_SOURCES): Likewise.
15332 * disk/i386/pc/partition.c: File removed.
15333 * disk/powerpc/ieee1275/partition.c: Likewise.
15334 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15335 * include/grub/i386/pc/partition.h: Likewise.
15336 * kern/partition.c: New file.
15337 * partmap/amiga.c: Likewise.
15338 * partmap/apple.c: Likewise.
15339 * partmap/pc.c: Likewise.
15340 * include/grub/partition.h: Likewise..
15341 * include/grub/pc_partition.h: Likewise.
15342 * util/grub-emu.c: Include <grub/partition.h> instead of
15343 <grub/machine/partition.h>.
15344 (main): Call `grub_pc_partition_map_init',
15345 `grub_amiga_partition_map_init' and
15346 `grub_apple_partition_map_init' and deinitialize afterwards.
15347 * util/i386/pc/biosdisk.c: Include `#include
15348 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15349 `<grub/machine/partition.h>'.
15350 * util/i386/pc/grub-setup.c: Likewise.
15351 * util/i386/pc/biosdisk.c: Likewise.
15352 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15353 partition information in case of a PC partition.
15354 * util/i386/pc/grub-setup.c: Include `#include
15355 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15356 `<grub/machine/partition.h>'.
15357 (setup): Only access the PC specific partition information in case
15358 of a PC partition.
15359
0ef4ced9 153602004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 15361
0ef4ced9 15362 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15363 (grub_longjmp): Likewise.
15364 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15365 20.
15366 * normal/powerpc/setjmp.S: New file.
15367 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15368 `normal/powerpc/setjmp.S'.
15369 (grubof_CFLAGS): Add `-DGRUBOF'.
15370 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15371 [GRUB_UTIL && !GRUBOF].
f19dbdb7 15372
19950e29 153732004-11-16 Marco Gerards <metgerards@student.han.nl>
15374
15375 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15376 property named `name'. Correctly handle the error returned by
15377 `grub_ieee1275_finddevice' if a device can not be opened.
15378
a2fea427 153792004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15380
15381 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15382 `actual' for negativity.
15383 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15384 kern/fshelp.c.
15385
41ea0ea3 153862004-11-01 Marco Gerards <metgerards@student.han.nl>
15387
15388 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15389 (PAGE_OFFSET): New macro.
15390 (CRTC_ADDR_PORT): Likewise.
15391 (CRTC_DATA_PORT): Likewise.
15392 (START_ADDR_HIGH_REGISTER): Likewise.
15393 (START_ADDR_LOW_REGISTER): Likewise.
15394 (GRAPHICS_ADDR_PORT): Likewise.
15395 (GRAPHICS_DATA_PORT): Likewise.
15396 (READ_MAP_REGISTER): Likewise.
15397 (INPUT_STATUS1_REGISTER): Likewise.
15398 (INPUT_STATUS1_VERTR_BIT): Likewise.
15399 (page): New variable.
15400 (wait_vretrace): New function.
15401 (set_read_map): Likewise.
15402 (set_start_address): Likewise.
15403 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15404 the right page.
15405 (check_vga_mem): Take the page into account.
15406 (write_char): Likewise.
15407 (write_cursor): Likewise.
15408 (scroll_up): Likewise. Copy the page to the page that is not
15409 shown and switch between both pages.
15410 (grub_vga_putchar): Fix off by one error.
15411 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15412 account.
15413
ad0bd20b 154142004-11-01 Marco Gerards <metgerards@student.han.nl>
15415
15416 Add support for iso9660 (including rockridge).
f19dbdb7 15417
ad0bd20b 15418 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15419 (iso9660_mod_SOURCES): New variable.
15420 (iso9660_mod_CFLAGS): Likewise.
15421 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15422 * include/grub/fs.h (grub_iso9660_init): New prototype.
15423 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15424 * fs/iso9660.c: New file.
15425
15426 * include/grub/misc.h (grub_strncat): New prototype.
15427 * kern/misc.c (grub_strncat): New function.
f19dbdb7 15428
ad0bd20b 15429 * fs/hfs.c (grub_hfs_mount): Translate the error
15430 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15431 * fs/jfs.c (grub_jfs_mount): Likewise.
15432 * fs/ufs.c (grub_ufs_mount): Likewise.
15433
a5477a59 154342004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15435
15436 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15437 which initialized BAT registers.
15438 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15439 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15440 Move from here...
15441 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15442 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15443 ... to here.
15444 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15445 (grub_mapclaim): Likewise.
15446 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15447 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15448 hand.
15449
9304c1f8 154502004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15451
15452 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15453 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15454 -ffreestanding and -msoft-float.
15455
86f4ae25 154562004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15457
15458 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15459 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15460 set in grub_ieee1275_flags.
15461
38912228 154622004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15463
15464 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15465 prototype.
15466 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15467 grub_console_init first.
15468 Change the memory range used for grub_ieee1275_claim and
15469 grub_mm_init_region.
15470 Print an error message if the claim fails.
15471 Include <grub/misc.h>.
15472
d1923dc8 154732004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15474
15475 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15476 Call grub_children_iterate for device nodes of type `scsi',
15477 `ide', or `ata'.
15478 (grub_ofdisk_open): Remove manual device alias resolution.
15479 Fix memory leak when device cannot be opened.
f19dbdb7 15480 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 15481 (grub_children_iterate): New prototype.
15482 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15483 New function.
15484 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15485 Return -1 if args.size was -1.
15486
4512e4f3 154872004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15488
15489 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15490 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15491 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15492 Open Firmware's memory for it; claim memory from _start to _end.
15493 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15494 (_end): New extern.
15495 (_start): Zero BSS from __bss_start to _end.
15496 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15497 New extern.
15498 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15499
4d61feb0 155002004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15501
ad0bd20b 15502 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15503 -1 if args.base was -1.
4d61feb0 15504
026fa2f9 155052004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15506
15507 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15508 escape sequence instead of a literal ^L. Also call
15509 grub_ofconsole_gotoxy.
15510
9f2220ef 155112004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15512
15513 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15514 void * arguments to grub_addr_t. All callers updated. Also make
15515 the `result' argument optional.
15516 (grub_ieee1275_release): change void * arguments to grub_addr_t.
15517 All callers updated.
15518
8a572cd7 155192004-09-22 Hollis Blanchard <hollis@penguinppc.org>
15520
15521 * commands/ls.c (grub_ls_list_files): Use the string following the
15522 initial ')', if present, as the filesystem path.
15523 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15524
15525 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15526
18aa81f2 155272004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
15528
15529 Make the source code of the menu interface more readable.
f19dbdb7 15530
18aa81f2 15531 * normal/menu.c: Include grub/mm.h.
15532 (TERM_WIDTH): New macro.
15533 (TERM_HEIGHT): Likewise.
15534 (TERM_INFO_HEIGHT): Likewise.
15535 (TERM_MARGIN): Likewise.
15536 (TERM_SCROLL_WIDTH): Likewise.
15537 (TERM_TOP_BORDER_Y): Likewise.
15538 (TERM_LEFT_BORDER_X): Likewise.
15539 (TERM_BORDER_WIDTH): Likewise.
15540 (TERM_MESSAGE_HEIGHT): Likewise.
15541 (TERM_BORDER_HEIGHT): Likewise.
15542 (TERM_NUM_ENTRIES): Likewise.
15543 (TERM_FIRST_ENTRY_Y): Likewise.
15544 (TERM_ENTRY_WIDTH): Likewise.
15545 (TERM_CURSOR_X): Likewise.
15546 (draw_border): Use macros instead of magic numbers.
15547 (print_entry): Likewise.
15548 (print_entries): Likewise.
15549 (run_menu): Likewise. Also, handle the key 'e'.
15550 (run_menu_entry): Ignore empty command lines.
15551 (print_message): Added a new argument EDIT. If EDIT is true,
15552 print a different message.
15553 (init_page): Likewise.
15554 (edit_menu_entry): New function. Not implemented yet.
15555
b47efe30 155562004-09-17 Marco Gerards <metgerards@student.han.nl>
15557
15558 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15559 can be loaded from normal mode.
f19dbdb7 15560
b47efe30 15561 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15562 `multiboot.mod'.
15563 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15564 (multiboot_mod_CFLAGS): New variables.
15565 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 15566 * loader/i386/pc/multiboot_normal.c: Likewise.
15567
b47efe30 15568 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15569 attribute `unused'.
f19dbdb7 15570
b47efe30 15571 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
15572 `fdiro' to read the mode information from instead of `diro'.
15573
15574 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15575 looking up a symlink.
15576
15577 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15578 macro.
15579 * normal/command.c (grub_command_execute): Don't parse the
15580 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15581 flags of the command.
15582
15583 * normal/menu.c (grub_menu_run): Fix typo.
15584
da75ac71 155852004-09-14 Hollis Blanchard <hollis@penguinppc.org>
15586
15587 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15588
15589 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15590 `y + 1' instead of `y - 1'.
15591
15592 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 15593
062b24c2 155942004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15595
15596 From Hollis Blanchard <hollis@penguinppc.org>:
15597 * kern/misc.c (memmove): New alias for grub_memmove.
15598 (memcmp): New alias for grub_memcmp.
15599 (memset): New alias for grub_memset.
f19dbdb7 15600 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 15601 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 15602 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 15603 (grub_ieee1275_get_property): Likewise.
f19dbdb7 15604
8ddad845 156052004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15606
15607 Added normal mode command `chainloader' as module chain.mod, which
15608 depends on normal.mod and _chain.mod.
f19dbdb7 15609
8ddad845 15610 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15611 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15612 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15613 Deleted prototype.
15614 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15615 but arguments parsing moved to ...
15616 (grub_chainloader_cmd): ... here. New function.
15617 * include/grub/i386/pc/chainloader.h: New file.
15618 * loader/i386/pc/chainloader_normal.c: Likewise.
15619
2c1f4ce3 156202004-09-11 Marco Gerards <metgerards@student.han.nl>
15621
15622 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15623 (grub_mkimage_LDFLAGS): Likewise.
15624 (grub_emu_SOURCES): Likewise.
15625 (kernel_img_HEADERS): Added fshelp.h.
15626 * fs/ext2.c: Include <grub/fshelp.h>.
15627 (FILETYPE_REG): New macro.
15628 (FILETYPE_INO_REG): Likewise.
15629 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15630 Changed all users.
15631 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
15632 all users.
15633 (grub_fshelp_node): New struct.
15634 (grub_ext2_data): Added member `diropen'. Changed member `inode'
15635 to a pointer.
15636 (grub_ext2_get_file_block): Removed function.
15637 (grub_ext2_read_block): New function.
15638 (grub_ext2_read_file): Replaced parameter `data' by `node'.
15639 This function was written.
15640 (grub_ext2_mount): Read the root inode. Create a diropen struct.
15641 (grub_ext2_find_file): Removed function.
15642 (grub_ext2_read_symlink): New function.
15643 (grub_ext2_iterate_dir): Likewise.
15644 (grub_ext2_open): Rewritten.
15645 (grub_ext2_dir): Rewritten.
15646 * include/grub/fshelp.h: New file.
15647 * fs/fshelp.c: Likewise.
15648
3c52136a 156492004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
15650
15651 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15652 (print_message): Add a missing newline.
15653 (run_menu): Added timeout support.
15654 (run_menu_entry): New local function.
15655 (grub_menu_run): Added support for booting.
15656
15657 * kern/loader.c (grub_loader_is_loaded): New function.
15658
15659 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15660 (grub_get_rtc): Exported.
15661
15662 * include/grub/i386/pc/time.h: Include grub/symbol.h.
15663 (grub_get_rtc): Exported.
15664
15665 * include/grub/normal.h (struct grub_command_list): Remove
15666 constant from the member `command'.
15667
15668 * include/grub/loader.h (grub_loader_is_loaded): Declared.
15669
15670 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15671
15672 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15673
aa033560 156742004-08-28 Marco Gerards <metgerards@student.han.nl>
15675
15676 Add support for the JFS filesystem.
15677
15678 * fs/jfs.c: New file.
15679 * include/grub/fs.h (grub_jfs_init): New prototype.
15680 (grub_jfs_fini): New prototype.
15681 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15682 (grub_emu_SOURCES): Likewise.
15683 (pkgdata_MODULES): Add jfs.mod.
15684 (jfs_mod_SOURCES): New variable.
15685 (jfs_mod_CFLAGS): Likewise.
15686 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15687 (grubof_SOURCES): Likewise.
15688 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15689
15690 * fs/fat.c (grub_fat_find_dir): Convert the filename little
15691 endian to the host endian.
15692 (grub_fat_utf16_to_utf8): Move function from there...
15693 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 15694 the endianness of the source string anymore.
aa033560 15695 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15696
94bc45af 156972004-08-24 Marco Gerards <metgerards@student.han.nl>
15698
15699 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15700 (grub_boot_fini) [GRUB_UTIL]: Likewise.
15701 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15702 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 15703
94bc45af 15704 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15705 (grub_hfs_iterate_dir): Make the function static. Add prototypes
15706 for `node_found' and `it_dir'.
15707 (grub_hfs_dir): Add prototype for `dir_hook'.
15708
15709 * fs/minix.c (grub_minix_get_file_block): Add prototype for
15710 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
15711 and `indir32' to silence a gcc warning.
15712
15713 * include/grub/fs.h (grub_hfs_init): New prototype.
15714 (grub_hfs_fini): Likewise.
f19dbdb7 15715
15716
97543f08 157172004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15718
15719 Each disk device has its own id now. This is useful to make use
15720 of multiple disk devices.
f19dbdb7 15721
97543f08 15722 * include/grub/disk.h (grub_disk_dev_id): New enum.
15723 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15724 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15725
15726 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15727 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15728
15729 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15730 GRUB_DISK_DEVICE_OFDISK_ID as an id.
15731
15732 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15733 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15734
15735 * include/grub/disk.h (struct grub_disk_dev): Added a new member
15736 "id" which is used by the cache manager.
15737
15738 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15739 of just "GRUB".
15740
64372eb4 157412004-08-18 Marco Gerards <metgerards@student.han.nl>
15742
15743 * fs/hfs.c: New file.
15744 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15745 (grub_emu_SOURCES): Likewise.
15746 (pkgdata_MODULES): Add hfs.mod.
15747 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15748 (grubof_SOURCES): Likewise.
15749 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15750
15751 * include/grub/misc.h (grub_strncasecmp): Add prototype.
15752 * kern/misc.c (grub_strncasecmp): Add function.
15753
cc61b58f 157542004-08-14 Marco Gerards <metgerards@student.han.nl>
15755
15756 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15757 with parentheses.
15758
15759 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15760 (grub_ext2_dir): In case the directory entry type is unknown, read
15761 it from the inode.
15762
0ef123f6 157632004-08-02 Peter Bruin <pjbruin@dds.nl>
15764
15765 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15766 grub_load_linux instead of grub_rescue_cmd_linux as second
15767 argument of grub_rescue_register_command.
15768
15769 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15770
a447c5df 157712004-07-27 Marco Gerards <metgerards@student.han.nl>
15772
15773 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15774 function.
15775 * commands/boot.c: Remove the check for `GRUB_UTIL'.
15776 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15777 `loader/powerpc/ieee1275/linux.c',
15778 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15779 * include/grub/powerpc/ieee1275/ieee1275.h
15780 (grub_ieee1275_release): New prototype.
15781 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15782 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15783 normal, boot, linux and linux_normal.
15784 * loader/powerpc/ieee1275/linux.c: New file.
15785 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15786
5a9e3546 157872004-07-12 Marco Gerards <metgerards@student.han.nl>
15788
15789 * normal/arg.c (grub_arg_parse): Correct error handling after
15790 reallocating the argumentlist (check if `argl' is not null instead
15791 of checking if `args' is not null).
15792 * kern/mm.c (grub_realloc): Return the same pointer when using the
15793 same region, instead of returning the header address.
15794
e15199cb 157952004-07-11 Marco Gerards <metgerards@student.han.nl>
15796
15797 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15798 one block instead of two when looking for the initial partition.
15799 (grub_partition_probe): Initialize the local variable `p' with 0.
15800 Use base 10 for the grub_strtoul call.
15801 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
15802 need for one local variable.
15803 (grub_strtoul): Don't add the new value to `num', instead of that
15804 just assign it.
15805
020616c2 158062004-07-11 Marco Gerards <metgerards@student.han.nl>
15807
15808 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15809 (pxeboot_img_SOURCES): New variable.
15810 (pxeboot_img_ASFLAGS): Likewise.
15811 (pxeboot_img_LDFLAGS): Likewise.
15812 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
15813 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
15814 <lode_leroy@hotmail.com>.
15815
6c51eb64 158162004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15817
15818 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15819 there was no input.
15820
cfb12aff 158212004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15822
15823 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
15824 the history buffer logic.
15825
6eabba74 158262004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15827
15828 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15829 (FILETYPE_INO_SYMLINK): New macros.
15830 (grub_ext2_find_file): Check if the node is a directory using the
15831 inode stat information instead of using the filetype in the
15832 dirent. Exclude the first character of an absolute symlink.
15833 (grub_ext2_dir): Mask out the filetype part of the mode member of
15834 the inode.
15835
66e19ef8 158362004-05-24 Marco Gerards <metgerards@student.han.nl>
15837
15838 Add support for UFS version 1 and 2. Add support for the minix
15839 filesystem version 1 and 2, both the variants with 14 and 30 long
15840 filenames.
f19dbdb7 15841
66e19ef8 15842 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15843 fs/minix.c.
15844 (grub_emu_SOURCES): Likewise.
15845 (pkgdata_MODULES): Add ufs.mod and minix.mod.
15846 (ufs_mod_SOURCES): New variable.
15847 (ufs_mod_CFLAGS): Likewise.
15848 (minix_mod_SOURCES): Likewise.
15849 (minix_mod_CFLAGS): Likewise.
15850 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15851 fs/minix.c.
15852 (grubof_SOURCES): Likewise.
15853 * fs/ufs.c: New file.
15854 * fs/minix.c: New file.
15855 * include/grub/fs.h (grub_ufs_init): New prototype.
15856 (grub_ufs_fini): Likewise.
15857 (grub_minix_init): Likewise.
15858 (grub_minix_fini): Likewise.
15859 * util/grub-emu.c (main): Initialize and deinitialize UFS and
15860 minix fs.
15861
cc2e748a 158622004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
15863
15864 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15865 commands/ls.c, commands/terminal.c, commands/boot.c,
15866 commands/cmp.c and commands/cat.c.
15867 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15868
15869 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15870 "env.h"
15871
4b13b216 158722004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15873
15874 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15875 and grub_, respectively. Because the conversion is trivial and
15876 mechanical, I omit the details here. Please refer to the CVS
15877 if you need more information.
15878
6a142551 158792004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15880
15881 * include/pupa: Renamed to ...
15882 * include/grub: ... this.
15883 * util/i386/pc/pupa-mkimage.c: Renamed to ...
15884 * util/i386/pc/grub-mkimage.c: ... this.
15885 * util/i386/pc/pupa-setup.c: Renamed to ...
15886 * util/i386/pc/grub-setup.c: ... this.
15887 * util/pupa-emu.c: Renamed to ...
15888 * util/grub-emu.c: ... this.
15889
e56cdf21 158902004-03-29 Marco Gerards <metgerards@student.han.nl>
15891
15892 Add support for the newworld apple macintosh (PPC). This has been
15893 tested on the powerbook 2000 only. It only adds support for
15894 generic ieee1275 functions, console and disk support. This should
15895 be easy to port to other architectures with support for Open
15896 Firmware.
f19dbdb7 15897
e56cdf21 15898 * configure.ac: Accept the powerpc as host_cpu. In the case of
15899 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
15900 specific tests are only executed while building for the i386.
15901 Inverse test for crosscompile.
15902 * genmk.rb (Utility): Allow assembler files.
15903 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15904 * conf/powerpc-ieee1275.rmk: New file.
15905 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15906 * disk/powerpc/ieee1275/partition.c: Likewise.
15907 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15908 * include/pupa/powerpc/ieee1275/console.h: Likewise.
15909 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15910 * include/pupa/powerpc/ieee1275/time.h: Likewise.
15911 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15912 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15913 * include/pupa/powerpc/ieee1275/loader.h
15914 * include/pupa/powerpc/setjmp.h: Likewise.
15915 * include/pupa/powerpc/types.h: Likewise.
15916 * kern/powerpc/ieee1275/init.c: Likewise.
15917 * kern/powerpc/ieee1275/openfw.c: Likewise.
15918 * term/powerpc/ieee1275/ofconsole.c: Likewise.
15919
15920 These files were written by Johan Rydberg
15921 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 15922
e56cdf21 15923 * boot/powerpc/ieee1275/cmain.c: New file.
15924 * boot/powerpc/ieee1275/crt0.S: Likewise.
15925 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15926 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15927
8c8cc205 159282004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
15929
15930 * Makefile.in: Update copyright.
15931 * genmodsrc.sh: Likewise.
15932 * gensymlist.sh: Likewise.
15933 * term/i386/pc/vga.c: Indent correctly.
15934
15935 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15936 bugreporting address.
15937 * util/i386/pc/pupa-setup.c (usage): Likewise,
15938 (main): Call pupa_ext2_init and pupa_ext2_fini.
15939
f19dbdb7 15940 * fs/fat.c (log2): Renamed to ...
8c8cc205 15941 (fat_log2): ... this.
15942 All callers changed.
15943 * kern/misc.c (memcpy): Alias to pupa_memmove.
15944 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15945 lvalue cast.
15946 * util/console.c (pupa_ncurses_fini): Return 0.
15947
15948 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15949 Move fail label here.
15950 [__GNU__]: Don't warn when using stat.
15951 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15952 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15953 long int. Use strtol instead of strtoul.
f19dbdb7 15954
db1771cf 159552004-03-14 Marco Gerards <metgerards@student.han.nl>
15956
15957 * commands/boot.c: New file.
15958 * commands/cat.c: Likewise.
15959 * commands/cmp.c: Likewise.
15960 * commands/ls.c: Likewise.
15961 * commands/terminal.c: Likewise.
15962 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15963 (pupa_register_command): Changed interface to match the new
15964 argument parser.
15965 (pupa_command_execute): Changed (almost rewritten) so it uses
15966 pupa_split_command. Added support for setting variables using the
15967 syntax `foo=bar'.
15968 (rescue_command): Changed to work with the new argument parser.
15969 (terminal_command): Moved from here to commands/terminal.c.
15970 (set_command): New function.
15971 (unset_command): New function.
15972 (insmod_command): New function.
15973 (rmmod_command): New function.
15974 (lsmod_command): New function.
15975 (pupa_command_init): Don't initialize the command terminal
15976 anymore. Initialize the commands set, unset, insmod, rmmod and
15977 lsmod.
15978 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15979 (kernel_img_HEADERS): Add arg.h and env.h.
15980 (pupa_mkimage_LDFLAGS): Add kern/env.c.
15981 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15982 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15983 normal/arg.c.
15984 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15985 terminal.mod.
15986 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15987 (boot_mod_SOURCES): New variable.
15988 (terminal_mod_SOURCES): Likewise.
15989 (ls_mod_SOURCES): Likewise.
15990 (cmp_mod_SOURCES): Likewise.
15991 (cat_mod_SOURCES): Likewise.
15992
15993 * normal/arg.c: New file.
15994 * kern/env.c: Likewise.
15995 * include/pupa/arg.h: Likewise.
15996 * include/pupa/env.h: Likewise.
15997 * font/manager.c (font_command): Changed to match argument parsing
15998 interface changes.
15999 (PUPA_MOD_INIT): Likewise.
16000 * hello/hello.c (pupa_cmd_hello): Likewise.
16001 (PUPA_MOD_INIT): Likewise.
16002 * include/pupa/disk.h: Include <pupa/device.h>.
16003 (pupa_print_partinfo): New prototype.
16004 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16005 (pupa_dl_get_prefix): Likewise.
16006 * include/pupa/misc.h: Include <pupa/err.h>.
16007 (pupa_isgraph): New prototype.
16008 (pupa_isdigit): Likewise.
16009 (pupa_split_cmdline): Likewise.
16010 * include/pupa/normal.h: Include <pupa/arg.h>.
16011 (pupa_command): Changed the prototype of the member `func' to
16012 match the argument parsing interface. Added member `options'.
16013 (pupa_register_command): Updated to match function.
16014 (pupa_arg_parse): New prototype.
16015 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16016 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16017 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16018 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16019 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16020 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16021 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16022 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16023 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16024 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16025 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16026 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16027 * kern/disk.c: Include <pupa/file.h>.
16028 (pupa_print_partinfo): New function.
16029 * kern/dl.c: Include <pupa/env.h>.
16030 (pupa_dl_dir): Variable removed.
16031 (pupa_dl_load): Use the environment variable `prefix' instead of
16032 the variable pupa_dl_dir.
16033 (pupa_dl_set_prefix): Function removed.
16034 (pupa_dl_get_prefix): Likewise.
16035 * kern/i386/pc/init.c: Include <pupa/env.h>.
16036 (pupa_machine_init): Use the environment variable `prefix' instead of
16037 using pupa_dl_set_prefix to set the prefix.
16038 * kern/main.c: Include <pupa/env.h>.
16039 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16040 using pupa_dl_get_prefix to get the prefix.
16041 * kern/misc.c: Include <pupa/env.h>.
16042 (pupa_isdigit): New function.
16043 (pupa_isgraph): Likewise.
16044 (pupa_ftoa): Likewise.
16045 (pupa_vsprintf): Added support for printing values of the type
16046 `double'. Make it possible to format variable output when using
16047 formatting like `%1.2%f'.
16048 (pupa_split_cmdline): New function.
16049 * kern/rescue.c: Include <pupa/env.h>.
16050 (next_word): Removed function.
16051 (pupa_rescue_cmd_prefix): Likewise.
16052 (pupa_rescue_cmd_set): New function.
16053 (pupa_rescue_cmd_unset): New function.
16054 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16055 split the command line instead of splitting it here. Added
16056 support for setting variables using the syntax `foo=bar'. Don't
16057 initialize the prefix command anymore. Initialized the set and
16058 unset commands.
16059 * normal/cmdline.c: Include <pupa/env.h>.
16060 (pupa_tab_complete): Added prototypes for print_simple_completion,
16061 print_partition_completion, add_completion, iterate_commands,
16062 iterate_dev, iterate_part and iterate_dir. Moved code to print
16063 partition information from here to kern/disk.c.
fe6b695a 16064 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 16065 * normal/main.c: Include <pupa/env.h>.
16066 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16067 instead of using pupa_dl_get_prefix to get the prefix.
16068 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16069 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16070 warning.
16071 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16072 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16073 ((unused))' to silence a gcc warning.
16074 (pupa_vga_setcolor): Likewise.
16075 (debug_command): Changed to match argument parsing
16076 interface changes.
16077 * util/pupa-emu.c: Include <pupa/env.h>.
16078 (options): Added 0's for unused fields to silence a gcc warning.
16079 (argp): Likewise.
16080 (main): Use the environment variable `prefix' instead of using
16081 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16082 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16083 and terminal.
16084
16085 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16086 * util/misc.c: Include <malloc.h>.
16087 (pupa_malloc): Rewritten so errors are correctly reported.
16088 (pupa_realloc): Likewise.
16089 (pupa_memalign): Likewise.
16090 (pupa_mm_init_region): Declare unused variables with
16091 `__attribute__ ((unused))' to silence a gcc warning.
16092 * normal/i386/setjmp.S: Remove tab at the end of the file to
16093 silence a gcc warning.
16094 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16095 variables with `__attribute__ ((unused))' to silence a gcc
16096 warning.
16097 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16098 local variable i unsigned to silence a gcc warning.
16099
16100 * kern/term.c: Include <pupa/misc.h>.
16101 (pupa_more_lines): New variable.
16102 (pupa_more): Likewise.
16103 (pupa_putcode): When the pager is active pause at the end of every
16104 screen.
16105 (pupa_set_more): New function.
16106 * include/pupa/term.h (pupa_set_more): New prototype.
16107
16108
3b1139cb 161092004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16110
16111 Now this project is GRUB 2 rather than PUPA. The location of
16112 the CVS repository was moved to GRUB's.
f19dbdb7 16113
3b1139cb 16114 * configure.ac: Use bug-grub as the reporting address.
16115 Use GRUB instead of PUPA.
16116 Change the version number to 1.90.
16117
8367695c 161182004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16119
16120 * genkernsyms.sh: Updated copyright information.
16121 * genmk.rb: Likewise.
16122 * genmodsrc.sh: Likewise.
16123 * gensymlist.sh: Likewise.
16124 * boot/i386/pc/boot.S: Likewise.
16125 * boot/i386/pc/diskboot.S: Likewise.
16126 * disk/i386/pc/biosdisk.c: Likewise.
16127 * disk/i386/pc/partition.c: Likewise.
16128 * font/manager.c: Likewise.
16129 * fs/ext2.c: Likewise.
16130 * fs/fat.c: Likewise.
16131 * include/pupa/boot.h: Likewise.
16132 * include/pupa/device.h: Likewise.
16133 * include/pupa/disk.h: Likewise.
16134 * include/pupa/dl.h: Likewise.
16135 * include/pupa/elf.h: Likewise.
16136 * include/pupa/err.h: Likewise.
16137 * include/pupa/file.h: Likewise.
16138 * include/pupa/font.h: Likewise.
16139 * include/pupa/fs.h: Likewise.
16140 * include/pupa/kernel.h: Likewise.
16141 * include/pupa/loader.h: Likewise.
16142 * include/pupa/misc.h: Likewise.
16143 * include/pupa/mm.h: Likewise.
16144 * include/pupa/net.h: Likewise.
16145 * include/pupa/normal.h: Likewise.
16146 * include/pupa/rescue.h: Likewise.
16147 * include/pupa/setjmp.h: Likewise.
16148 * include/pupa/symbol.h: Likewise.
16149 * include/pupa/term.h: Likewise.
16150 * include/pupa/types.h: Likewise.
16151 * include/pupa/i386/setjmp.h: Likewise.
16152 * include/pupa/i386/types.h: Likewise.
16153 * include/pupa/i386/pc/biosdisk.h: Likewise.
16154 * include/pupa/i386/pc/boot.h: Likewise.
16155 * include/pupa/i386/pc/console.h: Likewise.
16156 * include/pupa/i386/pc/init.h: Likewise.
16157 * include/pupa/i386/pc/kernel.h: Likewise.
16158 * include/pupa/i386/pc/linux.h: Likewise.
16159 * include/pupa/i386/pc/loader.h: Likewise.
16160 * include/pupa/i386/pc/memory.h: Likewise.
16161 * include/pupa/i386/pc/multiboot.h: Likewise.
16162 * include/pupa/i386/pc/partition.h: Likewise.
16163 * include/pupa/i386/pc/time.h: Likewise.
16164 * include/pupa/i386/pc/vga.h: Likewise.
16165 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16166 * include/pupa/util/getroot.h: Likewise.
16167 * include/pupa/util/misc.h: Likewise.
16168 * include/pupa/util/resolve.h: Likewise.
16169 * kern/device.c: Likewise.
16170 * kern/disk.c: Likewise.
16171 * kern/dl.c: Likewise.
16172 * kern/err.c: Likewise.
16173 * kern/file.c: Likewise.
16174 * kern/fs.c: Likewise.
16175 * kern/loader.c: Likewise.
16176 * kern/main.c: Likewise.
16177 * kern/misc.c: Likewise.
16178 * kern/mm.c: Likewise.
16179 * kern/rescue.c: Likewise.
16180 * kern/term.c: Likewise.
16181 * kern/i386/dl.c: Likewise.
16182 * kern/i386/pc/init.c: Likewise.
16183 * kern/i386/pc/lzo1x.S: Likewise.
16184 * kern/i386/pc/startup.S: Likewise.
16185 * loader/i386/pc/chainloader.c: Likewise.
16186 * loader/i386/pc/linux.c: Likewise.
16187 * loader/i386/pc/multiboot.c: Likewise.
16188 * normal/cmdline.c: Likewise.
16189 * normal/command.c: Likewise.
16190 * normal/main.c: Likewise.
16191 * normal/menu.c: Likewise.
16192 * normal/i386/setjmp.S: Likewise.
16193 * term/i386/pc/console.c: Likewise.
16194 * term/i386/pc/vga.c: Likewise.
16195 * util/console.c: Likewise.
16196 * util/genmoddep.c: Likewise.
16197 * util/misc.c: Likewise.
16198 * util/pupa-emu.c: Likewise.
16199 * util/resolve.c: Likewise.
16200 * util/unifont2pff.rb: Likewise.
16201 * util/i386/pc/biosdisk.c: Likewise.
16202 * util/i386/pc/getroot.c: Likewise.
16203 * util/i386/pc/pupa-mkimage.c: Likewise.
16204 * util/i386/pc/pupa-setup.c: Likewise.
16205
e6eced71 162062004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16207
16208 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16209 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16210 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16211 reading and reset it after reading.
16212 (pupa_ext2_close): Return PUPA_ERR_NONE.
16213
16214 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16215 Correct value.
16216 (struct linux_kernel_header): Add kernel_version and
16217 initrd_addr_max.
16218 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16219 pupa_file_read succeeds.
16220 (pupa_rescue_cmd_initrd): Implement.
16221
5aded270 162222003-12-03 Marco Gerards <metgerards@student.han.nl>
16223
16224 * fs/ext2.c (pupa_ext2_label): New function.
16225 (pupa_ext2_fs): Added label.
16226 * fs/fat.c (pupa_fat_label): New function.
16227 (pupa_fat_fs): Added label.
16228 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16229
16230 * kern/misc.c (pupa_strndup): New function.
16231 * include/pupa/misc.h (pupa_strndup): New prototype.
16232
16233 * include/pupa/normal.h: Include <pupa/err.h>.
16234 (pupa_set_history): New prototype.
16235 (pupa_iterate_commands): New prototype.
16236 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16237 <pupa/disk.h>, <pupa/file.h>.
16238 (hist_size): New variable.
16239 (hist_lines): Likewise.
16240 (hist_end): Likewise.
16241 (hist_used): Likewise.
16242 (pupa_set_history): New function.
16243 (pupa_history_get): Likewise.
16244 (pupa_history_add): Likewise.
16245 (pupa_history_replace): Likewise.
16246 (pupa_tab_complete): Likewise.
16247 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16248 completion shows partitionnames while completing partitions, this
16249 feature was suggested by Jeff Bailey.
16250 * normal/command.c (pupa_iterate_commands): New function.
16251 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16252 (pupa_normal_init): Initialize history buffer.
16253 (PUPA_MOD_INIT): Likewise.
16254 (pupa_normal_fini): Free the history buffer.
16255 (PUPA_MOD_FINI): Likewise.
16256
16257 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16258 key.
16259
16260 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16261 * configure.ac [i386]: Check for regparam bug.
16262 (NESTED_FUNC_ATTR) [! i386]: Defined.
16263
1f7315a3 162642003-11-17 Marco Gerards <metgerards@student.han.nl>
16265
16266 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16267 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16268 (pupa_emu_SOURCES): New variable.
16269 (pupa_emu_LDFLAGS): Likewise.
16270 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16271 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16272 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16273 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16274 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16275 (pupa_jmp_buf): New typedef.
16276 (pupa_setjmp) [PUPA_UTIL]: New macro.
16277 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16278 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16279 (pupa_refresh): New prototype.
16280 * include/pupa/util/getroot.h: New file.
16281 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16282 it.
16283 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16284 (pupa_rescue_cmd_cat): Likewise.
16285 (pupa_rescue_cmd_ls): Likewise.
16286 (pupa_rescue_cmd_testload): Likewise.
16287 (pupa_rescue_cmd_lsmod): Likewise.
16288 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16289 * normal/menu.c (run_menu): Likewise.
16290 * kern/term.c (pupa_cls): Likewise.
16291 (pupa_refresh): New function.
16292 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16293 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16294 * util/console.c: New file.
f19dbdb7 16295
1f7315a3 16296 * util/i386/pc/getroot.c: New file.
16297 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16298 (pupa_putchar): New function.
16299 (pupa_refresh): Likewise.
16300 (xgetcwd): Function moved to ...
16301 (strip_extra_slashes): Likewise.
16302 (get_prefix): Likewise.
f19dbdb7 16303 * util/i386/pc/getroot.c: ... here.
1f7315a3 16304 (find_root_device): Function moved and renamed to...
16305 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16306 Changed all callers.
16307 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16308 and renamed to...
16309 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16310 Changed all callers.
16311 * util/misc.c (pupa_memalign): New function.
16312 (pupa_mm_init_region): Likewise.
16313 (pupa_register_exported_symbols): Likewise.
16314 (pupa_putchar): Function removed.
16315 * util/pupa-emu.c: New file.
16316
9a5c1ade 163172003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16318
16319 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16320 (_multiboot_mod_SOURCES): New variable.
16321 (_multiboot_mod_CFLAGS): Likewise.
16322 * loader/i386/pc/multiboot.c: New file.
16323 * include/pupa/i386/pc/multiboot.h: Likewise.
16324 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16325 (pupa_multiboot_real_boot): New function.
16326 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16327 (pupa_multiboot_real_boot): New prototype.
16328 (pupa_rescue_cmd_multiboot): Likewise
16329 (pupa_rescue_cmd_module): Likewise.
16330
16331 * kern/loader.c (pupa_loader_set): Continue when
16332 pupa_loader_unload_func() fails.
16333 (pupa_loader_unset): New function.
16334 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16335
16336 * kern/misc.c (pupa_stpcpy): New function.
16337 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16338
8e72a9c0 163392003-11-12 Marco Gerards <metgerards@student.han.nl>
16340
16341 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16342 for available extensions.
16343
16344 * include/pupa/i386/pc/time.h: New file.
16345 * kern/disk.c: Include <pupa/machine/time.h>.
16346 (PUPA_CACHE_TIMEOUT): New macro.
16347 (pupa_last_time): New variable.
16348 (pupa_disk_open): Flush the cache when there was a timeout.
16349 (pupa_disk_close): Reset the timer.
16350 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16351 pupa_currticks.
16352 * util/misc.c: Include <sys/times.h>
16353 (pupa_get_rtc): New function.
16354
c4adbd32 163552003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16356
16357 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16358 as blocks.
16359 (pupa_ext2_get_file_block): Use blocks member.
16360
16361 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16362 first block. Return -1 instead of pupa_errno on error.
16363
bfd30f06 163642003-10-27 Marco Gerards <metgerards@student.han.nl>
16365
16366 * README: In the pupa-mkimage example use _chain instead of chain
16367 and ext2 instead of fat.
16368 * TODO: Replace ext2fs with jfs as an example. Add an item for
16369 adding journal playback for ext2fs.
16370 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16371 (pkgdata_MODULES): Added ext2.mod.
16372 (ext2_mod_SOURCES): New variable.
16373 (ext2_mod_CFLAGS): Likewise.
16374 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16375 * include/pupa/misc.h (pupa_strncpy): New prototype.
16376 (pupa_strcat): Likewise.
16377 (pupa_strncmp): Likewise.
16378 * kern/misc.c (pupa_strcat): Enable function.
16379 (pupa_strncpy): New function.
16380 (pupa_strncmp): Likewise.
16381 * fs/ext2.c: New file.
f19dbdb7 16382
bfd30f06 16383 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16384 when the read failed before retrying.
16385 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16386 (_FILE_OFFSET_BITS): Likewise.
16387 * configure.ac: Added AC_SYS_LARGEFILE.
16388
98d15063 163892003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16390
16391 * genmk.rb (PModule#rule): Make sure to get only symbol names
16392 from the output of nm.
16393 Reported by Robert Millan <zeratul2@wanadoo.es>.
16394
18d9c7cd 163952003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16396
16397 I forgot to check in these changes for a long time. This adds
16398 incomplete support for VGA console, and this is still very
16399 buggy. Also, a lot of consideration is required for I18N,
16400 UNICODE, and VGA font issues. Therefore, assume that this is
16401 such that "better than nothing".
f19dbdb7 16402
18d9c7cd 16403 * font/manager.c: New file.
16404 * include/pupa/font.h: Likewise.
16405 * include/pupa/i386/pc/vga.h: Likewise.
16406 * term/i386/pc/vga.c: Likewise.
16407 * util/unifont2pff.rb: Likewise.
16408
16409 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16410 (pkgdata_MODULES): Added vga.mod and font.mod.
16411 (vga_mod_SOURCES): New variables.
16412 (vga_mod_CFLAGS): Likewise.
16413 (font_mod_SOURCES): Likewise.
16414 (font_mod_CFLAGS): Likewise.
16415
16416 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16417
16418 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 16419 (struct pupa_term): Added init and fini.
18d9c7cd 16420 Changed the argument of putchar to pupa_uint32_t.
16421
16422 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16423 (pupa_console_real_putchar): New prototype.
16424 (pupa_console_putchar): Removed.
16425 (pupa_console_checkkey): Exported.
16426 (pupa_console_getkey): Likewise.
16427
16428 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16429 characters.
16430
16431 * kern/term.c (pupa_term_set_current): Rewritten.
16432 (pupa_putchar): Likewise.
16433 (pupa_putcode): New function.
16434
16435 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16436 (pupa_console_real_putchar): ... this.
16437 (pupa_vga_set_mode): New function.
16438 (pupa_vga_get_font): Likewise.
16439
16440 * normal/command.c: Include pupa/term.h.
16441 (terminal_command): New function.
16442 (pupa_command_init): Register the command "terminal".
16443
16444 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16445 (DISP_UP): Likewise.
16446 (DISP_RIGHT): Likewise.
16447 (DISP_DOWN): Likewise.
16448 (DISP_HLINE): Likewise.
16449 (DISP_VLINE): Likewise.
16450 (DISP_UL): Likewise.
16451 (DISP_UR): Likewise.
16452 (DISP_LL): Likewise.
16453 (DISP_LR): Likewise.
16454
16455 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 16456
977329f5 164572003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16458
16459 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16460 FIX. Reverse the path_list.
16461
16462 * include/pupa/normal.h: Export pupa_register_command and
16463 pupa_unregister_command.
16464
16465 * hello/hello.c (pupa_cmd_hello): New module.
16466 * conf/i386-pc.rmk: Added hello.mod.
16467
1f5ab428 164682003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16469
16470 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 16471
1f5ab428 16472 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16473 (compress_kernel): New variable.
16474 (generate_image): Heavily modified to support compressing a
16475 large part of the core image.
16476
16477 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16478 leak.
16479 (pupa_util_load_image): New function.
16480
16481 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16482 (pupa_compressed_size): New variable.
16483 (codestart): Enable Gate A20 here.
16484 Decompress the compressed part of the core image.
16485 Rearrange the code to put functions and variables which are
16486 required for initialization in the non-compressed part.
16487 Include lzo1x.S.
16488
16489 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16490 here.
16491
16492 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16493
f19dbdb7 16494 * include/pupa/i386/pc/kernel.h
1f5ab428 16495 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16496 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16497 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16498 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16499 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16500
16501 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16502
16503 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16504 (Utility#rule): Likewise.
16505
16506 * configure.ac: Check if LZO is available.
16507
ce5bf700 165082003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16509
16510 * include/pupa/normal.h: New file.
16511 * include/pupa/setjmp.h: Likewise.
16512 * include/pupa/i386/setjmp.h: Likewise.
16513 * normal/cmdline.c: Likewise.
16514 * normal/command.c: Likewise.
16515 * normal/main.c: Likewise.
16516 * normal/menu.c: Likewise.
16517 * normal/i386/setjmp.S: Likewise.
f19dbdb7 16518
ce5bf700 16519 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16520 (pupa_rescue_cmd_initrd): Likewise.
16521
16522 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16523 Likewise.
16524
16525 * kern/i386/pc/startup.S (translation_table): New variable.
16526 (translate_keycode): New function.
16527 (pupa_console_getkey): Call translate_keycode.
16528
16529 * kern/rescue.c (attempt_normal_mode): New function.
16530 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16531 it failed, print a message.
16532
16533 * kern/mm.c (pupa_real_malloc): Print more information when a
16534 free magic is broken.
16535 (pupa_free): If the first free header is not free actually, set
16536 it to P.
16537
16538 * kern/main.c (pupa_load_normal_mode): Just load the module
16539 "normal".
16540 (pupa_main): Don't print the message
16541 "Entering into rescue mode..." here.
16542
16543 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16544 Declared.
16545 (pupa_rescue_cmd_initrd): Likewise.
16546 (pupa_rescue_cmd_initrd): Likewise.
16547
16548 * include/pupa/symbol.h (FUNCTION): Specify the type.
16549 (VARIABLE): Likewise.
16550
16551 * include/pupa/err.h (pupa_err_t): Added
16552 PUPA_ERR_UNKNOWN_COMMAND.
16553
16554 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16555 (pupa_dl_get_prefix): Likewise.
16556
16557 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16558 Added _chain.mod and _linux.mod instead of chain.mod and
16559 linux.mod.
16560 (chain_mod_SOURCES): Renamed to ...
16561 (_chain_mod_SOURCES): ... this.
16562 (chain_mod_CFLAGS): Renamed to ...
16563 (_chain_mod_CFLAGS): ... this.
16564 (linux_mod_SOURCES): Renamed to ...
16565 (_linux_mod_SOURCES): ... this.
16566 (linux_mod_CFLAGS): Renamed to ...
16567 (_linux_mod_CFLAGS): ... this.
16568 (normal_mod_SOURCES): New variable.
16569 (normal_mod_CFLAGS): Likewise.
16570 (normal_mod_ASFLAGS): Likewise.
16571
165722003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
16573
16574 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16575 possible.
16576
fe6b695a 16577 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 16578 recursively.
16579 (pupa_dl_unref): Unrefer depending modules recursively.
16580 Don't call pupa_dl_unload implicitly, because PUPA can crash if
16581 a module is unloaded before one depending on that module is
16582 unloaded.
16583 (pupa_dl_unload): Unload depending modules explicitly,
16584 if possible.
16585
c04da074 165862003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
16587
16588 * include/pupa/i386/pc/linux.h: New file.
16589 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 16590
c04da074 16591 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16592 Removed.
16593 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16594 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16595 of PUPA_CHAINLOADER_BOOT_SECTOR.
16596
16597 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16598 (pupa_linux_prot_size): New variable.
16599 (pupa_linux_tmp_addr): Likewise.
16600 (pupa_linux_real_addr): Likewise.
16601 (pupa_linux_boot_zimage): New function.
16602 (pupa_linux_boot_bzimage): Likewise.
16603
16604 * kern/i386/pc/init.c (struct mem_region): New structure.
16605 (MAX_REGIONS): New macro.
16606 (mem_regions): New variable.
16607 (num_regions): Likewise.
16608 (pupa_os_area_addr): Likewise.
16609 (pupa_os_area_size): Likewise.
16610 (pupa_lower_mem): Likewise.
16611 (pupa_upper_mem): Likewise.
16612 (add_mem_region): New function.
16613 (compact_mem_regions): Likewise.
16614 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16615 the size of the conventional memory and that of so-called upper
16616 memory (before the first memory hole).
16617 Instead of adding each found region to free memory, use
16618 add_mem_region and add them after removing overlaps.
16619 Also, add only 1/4 of the upper memory to free memory. The rest
16620 is used for loading OS images. Maybe this is ad hoc, but this
16621 makes it much easier to relocate OS images when booting.
16622
16623 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16624 (pupa_enter_rescue_mode): Don't register initrd and module.
16625
16626 * kern/mm.c: Include pupa/dl.h.
16627
16628 * kern/main.c: Include pupa/file.h and pupa/device.h.
16629
16630 * kern/loader.c (pupa_loader_load_module_func): Removed.
16631 (pupa_loader_load_module): Likewise.
16632
16633 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16634 ``.o''.
16635
16636 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16637 (pupa_linux_tmp_addr): Likewise.
16638 (pupa_linux_real_addr): Likewise.
16639 (pupa_linux_boot_zimage): Likewise.
16640 (pupa_linux_boot_bzimage): Likewise.
16641
16642 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16643 (pupa_upper_mem): Likewise.
16644 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16645 module is too dangerous.
16646
16647 * include/pupa/loader.h (pupa_os_area_addr): Declared.
16648 (pupa_os_area_size): Likewise.
16649 (pupa_loader_set): Remove the first argument. Loader doesn't
16650 manage modules or initrd any longer.
16651 (pupa_loader_load_module): Removed.
16652
16653 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16654 (linux_mod_SOURCES): New variable.
16655 (linux_mod_CFLAGS): Likewise.
16656
a13f9237 166572003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
16658
16659 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16660 the length of a blocklist correctly.
16661
16662 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16663 Use ioctl only if the OS file is a block device.
16664 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16665 not very useful for normal files.
16666
16667 * kern/main.c (pupa_set_root_dev): New function.
16668 (pupa_load_normal_mode): Likewise.
16669 (pupa_main): Call those above.
16670
16671 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16672 pupa_uint16_t.
16673
16674 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16675
a5ffe966 166762003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
16677
16678 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16679 (setup): Configure the installed partition information and the
16680 dl prefix.
16681
16682 * loader/i386/pc/chainloader.c (my_mod): New variable.
16683 (pupa_chainloader_unload): New function.
16684 (pupa_rescue_cmd_chainloader): Refer itself.
16685 (PUPA_MOD_INIT): Save its own module in MY_MOD.
16686
16687 * kern/i386/pc/startup.S (install_partition): Removed.
16688 (version_string): Likewise.
16689 (config_file): Likewise.
16690 (pupa_install_dos_part): New variable.
16691 (pupa_install_bsd_part): Likewise.
16692 (pupa_prefix): Likewise.
16693 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16694
16695 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16696 and pupa/misc.h.
16697 (make_install_device): New function.
16698 (pupa_machine_init): Set the dl prefix.
16699
16700 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16701 (buf): Renamed to ...
16702 (linebuf): ... this.
16703 (pupa_rescue_cmd_prefix): New function.
16704 (pupa_rescue_cmd_insmod): Likewise.
16705 (pupa_rescue_cmd_rmmod): Likewise.
16706 (pupa_rescue_cmd_lsmod): Likewise.
16707 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16708 rmmod and lsmod.
16709
16710 * kern/mm.c (pupa_memalign): If failed even after invalidating
16711 disk caches, unload unneeded modules and retry.
16712
16713 * kern/misc.c (pupa_memmove): New function.
16714 (pupa_memcpy): Removed.
16715 (pupa_strcpy): New function.
16716 (pupa_itoa): Made static.
16717
16718 * kern/dl.c (pupa_dl_iterate): New function.
16719 (pupa_dl_ref): Likewise.
16720 (pupa_dl_unref): Likewise.
16721 (pupa_dl_unload): Return if succeeded or not.
16722 (pupa_dl_unload_unneeded): New function.
16723 (pupa_dl_unload_all): Likewise.
16724 (pupa_dl_init): Renamed to ...
16725 (pupa_dl_set_prefix): ... this.
16726 (pupa_dl_get_prefix): New function.
16727
16728 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16729 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16730 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16731 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16732 (pupa_install_dos_part): Declared.
16733 (pupa_install_bsd_part): Likewise.
16734 (pupa_prefix): Likewise.
16735 (pupa_boot_drive): Likewise.
16736
16737 * include/pupa/types.h: Fix a typo.
16738
16739 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16740 pupa_memmove.
16741 (pupa_memmove): Declared.
16742 (pupa_strcpy): Likewise.
16743
16744 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16745 pupa_mod_init takes one argument, its own module.
16746 (pupa_dl_unload_unneeded): Declared.
16747 (pupa_dl_unload_all): Likewise.
16748 (pupa_dl_ref): Likewise.
16749 (pupa_dl_unref): Likewise.
16750 (pupa_dl_iterate): Likewise.
16751 (pupa_dl_init): Renamed to ...
16752 (pupa_dl_set_prefix): ... this.
16753 (pupa_dl_get_prefix): Declared.
16754
16755 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 16756 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 16757 unloaded.
16758 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16759 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16760
16761 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16762 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16763
012d7999 167642003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16765
16766 * util/i386/pc/pupa-setup.c (setup): Define the internal
16767 function find_first_partition_start at the top level, because GCC
16768 3.0.x cannot compile internal functions in deeper scopes
16769 correctly.
16770 (find_root_device): Use lstat instead of stat.
16771 Don't follow symbolic links.
16772 Fix the path-constructing code.
16773
16774 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16775 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16776 by a BLKGETSIZE ioctl first, because block devices don't fill
16777 the member st_mode of the structure stat on Linux.
16778 [__linux__] (linux_find_partition): Use a temporary buffer
16779 REAL_DEV for the working space. Copy it to DEV before returning.
16780 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16781 buffer cache consistent.
16782 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16783 strncmp. The previous value was merely wrong.
16784 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16785
16786 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16787 FAT size is 12. The previous value was merely wrong.
16788
16789 * kern/main.c (pupa_main): Don't split the starting message from
16790 newlines.
16791
16792 * kern/term.c (pupa_putchar): Put CR after LF instead of before
16793 LF, because BIOS goes crazy about character attributes in this
16794 case.
16795
1cc73a62 167962003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16797
16798 * include/i386/pc/util/biosdisk.h: New file.
16799 * util/i386/pc/biosdisk.c: Likewise.
16800 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 16801
1cc73a62 16802 * Makefile.in (INCLUDE_DISTFILES): Added
16803 include/pupa/i386/pc/util/biosdisk.h.
16804 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16805 directory util/i386/pc.
16806 (install-local): Added a rule for sbin_UTILITIES.
16807 (uninstall): Likewise.
16808
16809 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16810
16811 * util/misc.c (xrealloc): New function.
16812 (pupa_malloc): Likewise.
16813 (pupa_free): Likewise.
16814 (pupa_realloc): Likewise.
16815 (pupa_stop): Likewise.
16816 (pupa_putchar): Likewise.
16817
16818 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16819
16820 * include/pupa/util/misc.h (xrealloc): Declared.
16821
16822 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16823 macro.
16824 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16825 (PUPA_BOOT_MACHINE_BPB_END): ... this.
16826
16827 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16828 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16829
16830 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16831 way should be implemented.
16832 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16833
16834 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16835 the size of NAME for safety.
16836 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16837 0x88.
16838
16839 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16840 (pupa_setup_SOURCES): Likewise.
16841
16842 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16843
08b70fe8 168442002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16845
16846 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16847 bunch of pushl's from pusha, because this destroys the return
16848 value.
16849
62ddcc8f 168502002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16851
16852 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16853 This means that any missing prototypes could be fatal. Also, you
16854 must take care when writing assembly code. See the comments at
16855 the beginning of startup.S, for more details.
f19dbdb7 16856
62ddcc8f 16857 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16858 compilation mechanism.
16859 (pupa_chainloader_real_boot): Likewise.
16860 (pupa_biosdisk_rw_int13_extensions): Likewise.
16861 (pupa_biosdisk_rw_standard): Likewise.
16862 (pupa_biosdisk_check_int13_extensions): Likewise.
16863 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16864 (pupa_biosdisk_get_diskinfo_standard): Likewise.
16865 (pupa_get_memsize): Likewise.
16866 (pupa_get_mmap_entry): Likewise.
16867 (pupa_console_putchar): Likewise.
16868 (pupa_console_setcursor): Likewise.
16869 (pupa_getrtsecs): Use pushl instead of push.
16870
16871 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16872 memory instead of the stack for a mmap entry, because some
16873 BIOSes may ignore the maximum size and overflow.
16874
16875 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16876
16877 * genmk.rb (PModule#rule): Compile automatically generated
16878 sources with module-specific CFLAGS as well as other sources.
16879
9962ed99 168802002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16881
16882 * configure.ac: Check ld.
16883 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16884 respectively, before checking endianness and sizes.
16885
16886 * Makefile.in (LD): New variable.
f19dbdb7 16887
abdfc3c5 168882002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16889
16890 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16891
6a161fa9 168922002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16893
16894 * Changelog: New file.
16895