changing mime-type of docs/*.texi and docs/texinfo.tex to text/plain
[grub2/phcoder.git] / ChangeLog
blobad1e6adaf9419e708bcd3d123e96d500c6008894
1 2008-09-03  Robert Millan  <rmh@aybabtu.com>
3         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4         `disk->total_sectors'.
6 2008-09-01  Colin D Bennett <colin@gibibit.com>
8         * include/grub/normal.h: Fixed incorrect comment for
9         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
11 2008-09-01  Colin D Bennett <colin@gibibit.com>
13         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
14         values with defines.
16         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
17         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
18         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
19         (GRUB_VBE_MODEATTR_COLOR): Likewise.
20         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
21         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
22         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
23         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
24         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
25         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
26         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
27         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
28         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
29         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
30         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
31         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
32         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
33         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
34         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
36 2008-08-31  Robert Millan  <rmh@aybabtu.com>
38         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
39         declaration.
40         (grub_multiboot): Fix a few warnings.
42 2008-08-31  Robert Millan  <rmh@aybabtu.com>
44         * loader/i386/pc/multiboot.c: Update comment not to say that
45         boot_device support is unimplemented.
47 2008-08-31  Robert Millan  <rmh@aybabtu.com>
49         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
50         or memory map support are unimplemented.
52 2008-08-31  Colin D Bennett <colin@gibibit.com>
54         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
56 2008-08-31  Colin D Bennett <colin@gibibit.com>
58         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
59         total video memory in 'vbeinfo' output; show color format details for
60         each video mode.
62 2008-08-30  Pavel Roskin  <proski@gnu.org>
64         * util/genmoddep.c: Remove for real this time.
65         * DISTLIST: Remove util/genmoddep.c.
67 2008-08-30  Robert Millan  <rmh@aybabtu.com>
69         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
70         as required by Multiboot spec (it was already 4-byte aligned, but
71         only by chance).
73 2008-08-29  Pavel Roskin  <proski@gnu.org>
75         * kern/powerpc/ieee1275/crt0.S: Rename to ...
76         * kern/powerpc/ieee1275/startup.S: ... this.
77         * conf/powerpc-ieee1275.rmk: Adjust for the above.
78         * DISTLIST: Likewise.
80         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
81         grub/cpu/kernel.h.  Add start label for consistency with other
82         platforms.  Add grub_prefix immediately after start.  Add jump
83         to the code after grub_prefix.
84         * include/grub/powerpc/kernel.h: Provide valid values for
85         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
87 2008-08-29  Bean  <bean123ch@gmail.com>
89         * configure.ac: Change host_os to cygwin for mingw.
90         (asprintf): New check for function.
92         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
93         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
95         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
96         declear asprintf if HAVE_ASPRINTF is not set, declear fseeko, ftello,
97         sync, sleep and grub_util_get_disk_size for mingw.
99         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
100         to get size in mingw.
101         (open_device): Use flag O_BINARY if it's defined.
102         (find_root_device): Add dummy code for mingw.
104         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
105         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
106         (get_scsi_disk_name): Return 0 for mingw.
108         * util/hostfs.c: #include <grub/util/misc.h>.
109         (grub_hostfs_open): Use "rb" flag to open file, use
110         grub_util_get_disk_size to get disk size for mingw.
112         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
113         (asprintf): New function if HAVE_ASPRINTF is not set.
114         (sync): New function for mingw.
115         (sleep): Likewise.
116         (grub_util_get_disk_size): Likewise.
118 2008-08-28  Pavel Roskin  <proski@gnu.org>
120         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
121         kern/time.c.
123 2008-08-28  Robert Millan  <rmh@aybabtu.com>
125         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
127 2008-08-28  Robert Millan  <rmh@aybabtu.com>
129         Change find_grub_drive() syntax so it doesn't prevent it from
130         detecting NULL names as errors.
132         * util/biosdisk.c (find_grub_drive): Move free slot search code
133         from here ...
134         (find_free_slot): ... to here.
135         (read_device_map): Use find_free_slot() to search for free slots.
137 2008-08-27  Marco Gerards  <marco@gnu.org>
139         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
140         (scsi_mod_SOURCES): New variable.
141         (scsi_mod_CFLAGS): Likewise
142         (scsi_mod_LDFLAGS): Likewise.
144         * disk/scsi.c: New file.
146         * include/grub/scsi.h: Likewise.
148         * include/grub/scsicmd.h: Likewise.
150         * disk/ata.c: Include <grub/scsi.h>.
151         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
152         instead.
153         (grub_ata_iterate): Skip ATAPI devices.
154         (grub_ata_open): Only handle ATAPI devices.
155         (struct grub_atapi_read): Removed.
156         (grub_atapi_readsector): Likewise.
157         (grub_ata_read): No longer handle ATAPI devices.
158         (grub_ata_write): Likewise.
159         (grub_atapi_iterate): New function.
160         (grub_atapi_read): Likewise.
161         (grub_atapi_write): Likewise.
162         (grub_atapi_open): Likewise.
163         (grub_atapi_close): Likewise.
164         (grub_atapi_dev): New variable.
165         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
166         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
168         * include/grub/disk.h (enum grub_disk_dev_id): Add
169         `GRUB_DISK_DEVICE_SCSI_ID'.
171 2008-08-26  Robert Millan  <rmh@aybabtu.com>
173         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
174         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
175         descriptive.
177 2008-08-23  Bean  <bean123ch@gmail.com>
179         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
180         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
181         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
182         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
183         dm_nv.mod.
184         (raid5rec_mod_SOURCES): New macro.
185         (raid5rec_mod_CFLAGS): Likewise.
186         (raid5rec_mod_LDFLAGS): Likewise.
187         (raid6rec_mod_SOURCES): Likewise.
188         (raid6rec_mod_CFLAGS): Likewise.
189         (raid6rec_mod_LDFLAGS): Likewise.
190         (mdraid_mod_SOURCES): Likewise.
191         (mdraid_mod_CFLAGS): Likewise.
192         (mdraid_mod_LDFLAGS): Likewise.
193         (dm_nv_mod_SOURCES): Likewise.
194         (dm_nv_mod_CFLAGS): Likewise.
195         (dm_nv_mod_LDFLAGS): Likewise.
197         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
198         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
199         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
201         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
202         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
204         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
206         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
208         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
210         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
212         * disk/raid5_recover.c: New file.
214         * disk/raid6_recover.c: Likewise.
216         * disk/mdraid_linux.c: Likewise.
218         * disk/dmraid_nvidia.c: Likewise.
220         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
221         ULONG_MAX.
223         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
224         calculate the size of raid device.
225         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
226         different layout of raid5.
227         (grub_raid_scan_device): Remove code specific to mdraid.
228         (grub_raid_list): New variable.
229         (free_array): New function.
230         (grub_raid_register): Likewise.
231         (grub_raid_unregister): Likewise.
232         (grub_raid_rescan): Likewise.
233         (GRUB_MOD_INIT): Don't iterate device here.
234         (GRUB_MOD_FINI): Use free_array to release resource.
236         * include/grub/raid.h: Remove macro and structure specific to mdraid.
237         (grub_raid5_recover_func_t): New function variable type.
238         (grub_raid6_recover_func_t): Likewise.
239         (grub_raid5_recover_func): New variable.
240         (grub_raid6_recover_func): Likewise.
241         (grub_raid_register): New function.
242         (grub_raid_unregister): Likewise.
243         (grub_raid_rescan): Likewise.
244         (grub_raid_block_xor): Likewise.
246         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
247         (CMD_CRC): New macro.
248         (part): Removed.
249         (read_file): Handle device as well as file.
250         (cmd_crc): New function.
251         (fstest): Handle multiple disks.
252         (options): Remove part, raw and long, add root and diskcount.
253         (usage): Add crc, remove -p, -r, -l, add -r and -c.
254         (main): Find the first non option entry and ignore subsequence options,
255         add handling for the new options, support multiple disks.
257         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
259 2008-08-23  Bean  <bean123ch@gmail.com>
261         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
263         * genfslist.sh: Ignore kernel.mod.
265         * genpartmaplist.sh: Likewise.
267 2008-08-23  Robert Millan  <rmh@aybabtu.com>
269         * util/getroot.c (find_root_device): Skip anything that starts with
270         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
272 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
273          
274         * util/update-grub.in (GRUB_GFXMODE): Export variable.
275         * util/grub.d/00_header.in: Allow the administrator to change default
276         gfxmode via ${GRUB_GFXMODE}.
278 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
280         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
282 2008-08-21  Robert Millan  <rmh@aybabtu.com>
284         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
285         loader.
286         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
287         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
289 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
291         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
292         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
294 2008-08-19  Robert Millan  <rmh@aybabtu.com>
296         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
297         (struct grub_virtual_screen): Remove `cursor_color'.
298         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
299         initialization.
300         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
302 2008-08-18  Robert Millan  <rmh@aybabtu.com>
304         Unify (identical) linux_normal.c files.
305         * loader/i386/efi/linux_normal.c: Move from here ...
306         * loader/linux_normal.c: ... to here.  Update all users.
307         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
308         * loader/i386/ieee1275/linux_normal.c: Likewise.
310 2008-08-18  Robert Millan  <rmh@aybabtu.com>
312         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
313         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
314         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
315         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
316         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
317         New macros.
318         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
319         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
320         (GRUB_LINUX_CL_END_OFFSET): ... to here.
321         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
322         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
323         (GRUB_EFI_CL_END_OFFSET): Rename to ...
324         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
325         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
326         Initialize `params->video_cursor_x' and `params->video_cursor_y'
327         portably using grub_getxy().
328         Replace `-EFI' with `-bzImage' in boot message.
330 2008-08-17  Robert Millan  <rmh@aybabtu.com>
332         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
334 2008-08-17  Robert Millan  <rmh@aybabtu.com>
336         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
338         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
339         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
340         (grub_machine_mmap_iterate): New function declaration.
341         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
342         structure.
343         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
344         macros.
346         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
347         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
348         Move e820 parsing from here ...
349         * kern/i386/pc/mmap.c: New file.
350         (grub_machine_mmap_iterate): ... to here.
352         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
353         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
354         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
355         (grub_available_iterate): Redeclare to return `void', and redeclare
356         its hook to use grub_uint64_t as addr and size parameters, and rename
357         to ...
358         (grub_machine_mmap_iterate): ... this.  Update all users.
360         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
361         to make it more readable.  Rename to ...
362         (grub_machine_mmap_iterate): ... this.
364         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
365         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
366         (grub_multiboot): Allocate an extra region after the payload, and fill
367         it with a Multiboot memory map.  Adjust a.out loader to calculate size
368         with the extra space.
369         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
370         with the extra space.
372 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
374         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
376 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
378         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
379         mdate-sh to the list `find' searches for.
380         * DISTLIST: Regenerated.
382 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
384         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
385         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
386         genmoddep.awk, gensymlist.sh.in.
387         (DISTDIRS): Add bus, docs, hook, lib.
388         * DISTLIST: Regenerated.
389         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
391 2008-08-16  Robert Millan  <rmh@aybabtu.com>
393         * disk/raid.c (grub_raid_init): Handle/report errors set by
394         grub_device_iterate().
395         * disk/lvm.c (grub_lvm_init): Likewise.
397 2008-08-15  Bean  <bean123ch@gmail.com>
399         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
400         and datehook.mod.
401         (datetime_mod_SOURCES): New macro.
402         (datetime_mod_CFLAGS): Likewise.
403         (datetime_mod_LDFLAGS): Likewise.
404         (date_mod_SOURCES): Likewise.
405         (date_mod_CFLAGS): Likewise.
406         (date_mod_LDFLAGS): Likewise.
407         (datehook_mod_SOURCES): Likewise.
408         (datehook_mod_CFLAGS): Likewise.
409         (datehook_mod_LDFLAGS): Likewise.
411         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
412         and datehook.mod.
413         (datetime_mod_SOURCES): New macro.
414         (datetime_mod_CFLAGS): Likewise.
415         (datetime_mod_LDFLAGS): Likewise.
416         (date_mod_SOURCES): Likewise.
417         (date_mod_CFLAGS): Likewise.
418         (date_mod_LDFLAGS): Likewise.
419         (datehook_mod_SOURCES): Likewise.
420         (datehook_mod_CFLAGS): Likewise.
421         (datehook_mod_LDFLAGS): Likewise.
423         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
424         and datehook.mod.
425         (datetime_mod_SOURCES): New macro.
426         (datetime_mod_CFLAGS): Likewise.
427         (datetime_mod_LDFLAGS): Likewise.
428         (date_mod_SOURCES): Likewise.
429         (date_mod_CFLAGS): Likewise.
430         (date_mod_LDFLAGS): Likewise.
431         (datehook_mod_SOURCES): Likewise.
432         (datehook_mod_CFLAGS): Likewise.
433         (datehook_mod_LDFLAGS): Likewise.
435         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
436         and datehook.mod.
437         (datetime_mod_SOURCES): New macro.
438         (datetime_mod_CFLAGS): Likewise.
439         (datetime_mod_LDFLAGS): Likewise.
440         (date_mod_SOURCES): Likewise.
441         (date_mod_CFLAGS): Likewise.
442         (date_mod_LDFLAGS): Likewise.
443         (datehook_mod_SOURCES): Likewise.
444         (datehook_mod_CFLAGS): Likewise.
445         (datehook_mod_LDFLAGS): Likewise.
447         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
448         and datehook.mod.
449         (datetime_mod_SOURCES): New macro.
450         (datetime_mod_CFLAGS): Likewise.
451         (datetime_mod_LDFLAGS): Likewise.
452         (date_mod_SOURCES): Likewise.
453         (date_mod_CFLAGS): Likewise.
454         (date_mod_LDFLAGS): Likewise.
455         (datehook_mod_SOURCES): Likewise.
456         (datehook_mod_CFLAGS): Likewise.
457         (datehook_mod_LDFLAGS): Likewise.
459         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
461         * commands/date.c: New file.
463         * hook/datehook.c: Likewise.
465         * include/grub/lib/datetime.h: Likewise.
467         * include/grub/i386/cmos.h: Likewise.
469         * lib/datetime.c: Likewise.
471         * lib/i386/datetime.c: Likewise.
473         * lib/efi/datetime.c: Likewise.
475 2008-08-14  Robert Millan  <rmh@aybabtu.com>
477         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
478         (grub_mkelfimage_SOURCES): New variable.
479         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
481         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
482         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
483         * conf/powerpc-ieee1275.rmk: Likewise.
484         * conf/i386-ieee1275.rmk: Likewise.
486         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
487         * kern/i386/coreboot/init.c: Likewise.
489         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
490         with `<grub/cpu/kernel.h>'.
491         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
492         to ...
493         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
494         * kern/i386/coreboot/startup.S: Likewise.
496         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
497         (GRUB_MOD_GAP): Remove.
498         * include/grub/powerpc/kernel.h: New file.
499         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
500         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
501         * include/grub/i386/kernel.h: New file.
502         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
503         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
504         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
506         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
507         `grub-mkelfimage'.
508         Use --directory when invoking grub_mkimage.
510         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
511         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
512         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
513         and GRUB_KERNEL_CPU_PREFIX.
515 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
517         * include/grub/err.h (grub_err_printf): New function prototype.
518         * util/misc.c (grub_err_printf): New function.
519         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
520         grub_printf.
521         * kern/err.c (grub_print_error): Use grub_err_printf.
523 2008-08-13  Robert Millan  <rmh@aybabtu.com>
525         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
527 2008-08-13  Robert Millan  <rmh@aybabtu.com>
529         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
530         boot entry.
532 2008-08-12  Robert Millan  <rmh@aybabtu.com>
534         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
535         of the relocation code from here ...
536         (grub_multiboot): ... to here.
537         (forward_relocator, backward_relocator): Move from here ...
538         * kern/i386/loader.S (grub_multiboot_forward_relocator)
539         (grub_multiboot_backward_relocator): ... to here.
540         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
541         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
542         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
543         (grub_multiboot_forward_relocator_end)
544         (grub_multiboot_backward_relocator)
545         (grub_multiboot_backward_relocator_end): New variables.
547 2008-08-12  Bean  <bean123ch@gmail.com>
549         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
551 2008-08-11  Robert Millan  <rmh@aybabtu.com>
553         * kern/i386/linuxbios/startup.S: Move from here ...
554         * kern/i386/coreboot/startup.S: ... to here.
556         * kern/i386/linuxbios/init.c: Move from here ...
557         * kern/i386/coreboot/init.c: ... to here.
559         * kern/i386/linuxbios/table.c: Move from here ...
560         * kern/i386/coreboot/mmap.c: ... to here.
562         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
564 2008-08-11  Robert Millan  <rmh@aybabtu.com>
566         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
567         errors.  Leave it to the upper layer to handle them.
569 2008-08-09  Christian Franke  <franke@computer.org>
571         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
572         * conf/common.rmk: Install `grub-pe2elf' only if requested.
573         Install `grub.d/10_windows' only on Cygwin.
574         * configure.ac: Add subst of `target_os'.
575         Check `target_os' also before setting TARGET_OBJ2ELF.
576         Add `--enable-grub-pe2elf'.
578 2008-08-08  Robert Millan  <rmh@aybabtu.com>
580         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
581         (grub_last_time): Change type to grub_uint64_t.
582         (grub_disk_open): Migrate code from to using grub_get_time_ms().
583         (grub_disk_close): Likewise.
585         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
586         (run_menu): Migrate code from to using grub_get_time_ms().
588         * util/misc.c (grub_get_time_ms): New function.
590 2008-08-08  Marco Gerards  <marco@gnu.org>
592         * disk/ata.c (grub_ata_regget): Change return type to
593         `grub_uint8_t'.
594         (grub_ata_regget2): Likewise.
595         (grub_ata_wait_status): New function.
596         (grub_ata_wait_busy): Removed function, updated all users to use
597         `grub_ata_wait_status'.
598         (grub_ata_wait_drq): Likewise.
599         (grub_ata_cmd): New function.
600         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
601         error handling.
602         (grub_ata_pio_write): Add error handling.
603         (grub_atapi_identify): Likewise.
604         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
605         handling.
606         (grub_ata_identify): Use `grub_ata_cmd' and improve error
607         handling.  Actually use the detected registers.  Reorder the
608         detection logic such that it is easier to read.
609         (grub_ata_pciinit): Do not assign the same ID to each controller.
610         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
611         handling.
612         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
614         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
616 2008-08-08  Marco Gerards  <marco@gnu.org>
618         * NEWS: Update.
620 2008-08-07  Bean  <bean123ch@gmail.com>
622         * include/grub/x86_64/pci.h: New file.
624 2008-08-07  Christian Franke  <franke@computer.org>
626         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
627         (TIMER2_GATE): Likewise.
628         (grub_pit_wait): Add enable/disable of the timer2 gate
629         bit of port 0x61.  This fixes a possible infinite loop.
631 2008-08-07  Bean  <bean123ch@gmail.com>
633         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
634         kern/i386/tsc.c and kern/i386/pit.c.
636         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
637         x86_64 platform.
639         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
640         <grub/i386/tsc.h>.
642         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
644 2008-08-07  Bean  <bean123ch@gmail.com>
646         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
648         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
650         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
651         multiple inclusion. Add #include <grub/types.h>.
653 2008-08-06  Christian Franke  <franke@computer.org>
655         * conf/common.rmk: Build and install `10_windows'.
656         * util/grub.d/10_windows.in: New script.
658 2008-08-06  Pavel Roskin  <proski@gnu.org>
660         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
662 2008-08-06  Robert Millan  <rmh@aybabtu.com>
664         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
665         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
667 2008-08-06  Bean  <bean123ch@gmail.com>
669         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
670         (grub_pxefs_fs_int): Remove dummy definition.
671         (grub_pxefs_open): Use data->block_size to store the current block
672         size setting.
673         (grub_pxefs_read): Use block size stored in data->block_size. As the
674         value of grub_pxe_blksize can be changed after the file is opened.
676 2008-08-06  Bean  <bean123ch@gmail.com>
678         * fs/i386/pc/pxe.c (curr_file): new variable.
679         (grub_pxefs_open): Simply the handling of pxe file system. Don't
680         require the dummy internal file system anymore.
681         (grub_pxefs_read): Removed.
682         (grub_pxefs_close): Likewise.
683         (grub_pxefs_fs_int): Likewise.
684         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
685         connection when we switch file.
686         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
688 2008-08-06  Robert Millan  <rmh@aybabtu.com>
690         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
691         `halt.mod'.
692         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
693         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
695         * kern/i386/halt.c: New file.
696         * kern/i386/reboot.c: Likewise.
697         * include/grub/i386/reboot.h: Likewise.
698         * include/grub/i386/halt.h: Likewise.
700         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
701         Include `<grub/cpu/halt.h>'.
702         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
703         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
705         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
706         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
707         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
708         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
709         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
710         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
711         from here ...
712         * include/grub/i386/at_keyboard.h: ... to here.
714 2008-08-05  Robert Millan  <rmh@aybabtu.com>
716         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
717         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
718         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
719         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
720         `kern/generic/millisleep.c'.
722         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
723         instead of grub_get_rtc().
724         (grub_tsc_init): Initialize `tsc_boot_time'.
726         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
727         (grub_machine_init): Use grub_tsc_init() rather than
728         installing an RTC-based handler via grub_install_get_time_ms().
730         * kern/i386/pit.c: New file.
731         * include/grub/i386/pit.h: Likewise.
733 2008-08-05  Bean  <bean123ch@gmail.com>
735         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
737         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
738         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
739         (pxe_mod_SOURCES): New macro.
740         (pxe_mod_CFLAGS): Likewise.
741         (pxe_mod_LDFLAGS): Likewise.
742         (pxecmd_mod_SOURCES): Likewise.
743         (pxecmd_mod_CFLAGS): Likewise.
744         (pxecmd_mod_LDFLAGS): Likewise.
746         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
747         (grub_pxe_call): Likewise.
749         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
751         * commands/i386/pc/pxecmd.c: New file.
753         * fs/i386/pc/pxe.c: Likewise.
755         * include/grub/i386/pc/pxe.h: Likewise.
757 2008-08-05  Bean  <bean123ch@gmail.com>
759         * util/console.c (grub_console_cur_color): New variable.
760         (grub_console_standard_color): Likewise.
761         (grub_console_normal_color): Likewise.
762         (grub_console_highlight_color): Likewise.
763         (color_map): Likewise.
764         (use_color): Likewise.
765         (NUM_COLORS): New macro.
766         (grub_ncurses_setcolorstate): Handle color properly.
767         (grub_ncurses_setcolor): Don't change color here, just remember the
768         settings, color will be set in grub_ncurses_setcolorstate.
769         (grub_ncurses_getcolor): New function.
770         (grub_ncurses_init): Initialize color pairs.
771         (grub_ncurses_term): New member grub_ncurses_getcolor.
773 2008-08-05  Colin D Bennett  <colin@gibibit.com>
775         High resolution timer support.  Implemented for x86 CPUs using TSC.
776         Extracted generic grub_millisleep() so it's linked in only as needed.
777         This requires a Pentium compatible CPU; if the RDTSC instruction is
778         not supported, then it falls back on the generic grub_get_time_ms()
779         implementation that uses the machine's RTC.
781         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
782         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
783         `kern/generic/millisleep.c'.
785         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
786         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
788         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
789         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
791         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
793         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
794         `kern/generic/millisleep.c'.
796         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
798         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
800         * kern/generic/rtc_get_time_ms.c: New file.
802         * kern/generic/millisleep.c: New file.
804         * kern/misc.c: Don't include
805         <kern/time.h> anymore.
806         (grub_millisleep_generic): Removed.
808         * commands/sleep.c (grub_interruptible_millisleep): Uses
809         grub_get_time_ms() instead of grub_get_rtc().
811         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
812         function.
813         (grub_cpu_is_cpuid_supported): New inline function.
814         (grub_cpu_is_tsc_supported): New inline function.
815         (grub_tsc_init): New function prototype.
816         (grub_tsc_get_time_ms): New function prototype.
818         * kern/i386/tsc.c (grub_get_time_ms): New file.
820         * include/grub/time.h: Include <grub/types.h.
821         (grub_millisleep_generic): Removed.
822         (grub_get_time_ms): New prototype.
823         (grub_install_get_time_ms): New prototype.
824         (grub_rtc_get_time_ms): New prototype.
826         * kern/time.c (grub_get_time_ms): New function.
827         (grub_install_get_time_ms): New function.
829         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
830         <grub/time.h> anymore.
831         (grub_millisleep): Removed.
832         (grub_machine_init): Call grub_tsc_init.
834         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
835         get_time_ms() implementation.
837         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
838         (ieee1275_get_time_ms): New function.
839         (grub_machine_init): Install get_time_ms() implementation.
841         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
842         (grub_machine_init): Call grub_tsc_init().
843         (grub_millisleep): Removed.
845         * kern/ieee1275/init.c (grub_millisleep): Removed.
846         (grub_machine_init): Install ieee1275_get_time_ms()
847         implementation.
848         (ieee1275_get_time_ms): New function.
849         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
850         real work.
852 2008-08-05  Marco Gerards  <marco@gnu.org>
854         * disk/ata.c: Include <grub/pci.h>.
855         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
856         (grub_ata_initialize): Rewritten.
857         (grub_ata_device_initialize): New function.
859 2008-08-04  Pavel Roskin  <proski@gnu.org>
861         * kern/main.c: Include grub/mm.h.
863 2008-08-04  Robert Millan  <rmh@aybabtu.com>
865         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
866         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
867         corruption problem).
869 2008-08-04  Robert Millan  <rmh@aybabtu.com>
871         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
872         warnings introduced in my last commit.
874 2008-08-03  Robert Millan  <rmh@aybabtu.com>
876         Make PCI available on all i386 architectures.
878         * include/grub/i386/pc/pci.h: Move from here ...
879         * include/grub/i386/pci.h: ... to here.
881         * include/grub/i386/pc/pci.h: Remove.
882         * include/grub/i386/efi/pci.h: Remove.
883         * include/grub/x86_64/efi/pci.h: Remove.
885         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
886         `<grub/cpu/pci.h>'.
888         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
889         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
890         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
892         * conf/i386-ieee1275.rmk: Likewise.
894 2008-08-03  Robert Millan  <rmh@aybabtu.com>
896         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
897         (grub_console_setcursor): Make it possible to set cursor off.
899 2008-08-03  Robert Millan  <rmh@aybabtu.com>
901         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
902         of modules instead of assuming which platform provides what.
903         * util/update-grub.in: Likewise.
905 2008-08-03  Robert Millan  <rmh@aybabtu.com>
907         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
908         instead of `grub_install_dos_part' to determine whether a drive needs
909         to be prepended to prefix (`grub_install_dos_part' is not reliable,
910         because it can be overridden when loading GRUB via Multiboot).
912 2008-08-02  Robert Millan  <rmh@aybabtu.com>
914         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
916 2008-08-02  Robert Millan  <rmh@aybabtu.com>
918         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
919         of informational grub_dprintf() calls.
921 2008-08-02  Robert Millan  <rmh@aybabtu.com>
923         * disk/memdisk.c (memdisk_size): Don't initialize.
924         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
926         * include/grub/i386/pc/kernel.h
927         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
928         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
929         (grub_memdisk_image_size, grub_arch_memdisk_addr)
930         (grub_arch_memdisk_size): Remove.
932         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
933         field (was only used to transfer a constant).  Add `type' field to
934         support multiple module types.
935         (grub_module_iterate): New function.
937         * kern/device.c (grub_device_open): Do not hide error messages
938         when grub_disk_open() fails.  Use grub_print_error() instead.
940         * kern/i386/pc/init.c (grub_arch_modules_addr)
941         (grub_arch_memdisk_size): Remove functions.
942         (grub_arch_modules_addr): Return the module address in high memory
943         (now that it isn't copied anymore).
945         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
946         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
947         decompression routine (grub_total_module_size already includes that
948         now).  Don't copy modules back to low memory.
950         * kern/main.c: Include `<grub/mm.h>'.
951         (grub_load_modules): Split out (and use) ...
952         (grub_module_iterate): ... this function, which iterates through
953         module objects and runs a hook.
954         Comment out grub_mm_init_region() call, as it would cause non-ELF
955         modules to be overwritten.
957         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
958         the memdisk image in its own region, make it part of the module list.
959         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
960         (main): Parse --memdisk|-m option, and pass user-provided path as
961         parameter to generate_image().
962         (add_segments): Pass `memdisk_path' down to load_modules().
963         (load_modules): Embed memdisk image in module section when requested.
964         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
965         `header.type' instead of `header.offset'.
967         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
968         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
969         (memdisk_mod_LDFLAGS): New variables.
970         * conf/i386-coreboot.rmk: Likewise.
971         * conf/i386-ieee1275.rmk: Likewise.
973 2008-08-02  Robert Millan  <rmh@aybabtu.com>
975         * loader/i386/pc/multiboot.c (playground, forward_relocator)
976         (backward_relocator): New variables.  Used to allocate and relocate
977         the payload, respectively.
978         (grub_multiboot_load_elf32): Load into heap instead of requested
979         address, install the appropriate relocator code in each bound of
980         the payload, and set the entry point such that
981         grub_multiboot_real_boot() will jump to one of them.
983         * kern/i386/loader.S (grub_multiboot_payload_size)
984         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
985         (grub_multiboot_payload_entry_offset): New variables.
986         (grub_multiboot_real_boot): Set cpu context to what the relocator
987         expects, and jump to the relocator instead of the payload.
989         * include/grub/i386/loader.h (grub_multiboot_payload_size)
990         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
991         (grub_multiboot_payload_entry_offset): Export.
993 2008-08-01  Bean  <bean123ch@gmail.com>
995         * normal/menu_entry.c (editor_getline): Don't return the original
996         string as result, as it will be released by lexer once it has done
997         using it.
999 2008-08-01  Robert Millan  <rmh@aybabtu.com>
1001         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1002         within menuentries, not before them.
1003         util/grub.d/10_hurd.in: Likewise.
1005 2008-08-01  Bean  <bean123ch@gmail.com>
1007         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1008         (bufio_mod_SOURCES): New macro.
1009         (bufio_mod_CFLAGS): Likewise.
1010         (bufio_mod_LDFLAGS): Likewise.
1012         * include/grub/bufio.h: New file.
1014         * io/bufio.c: Likewise.
1016         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1017         (grub_video_reader_png): Use grub_buffile_open to open file.
1019         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1020         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1022         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1023         (grub_video_reader_tga): Use grub_buffile_open to open file.
1025         * font/manager.c: Include <grub/bufio.h>.
1026         (add_font): Use grub_buffile_open to open file.
1028 2008-07-31  Robert Millan  <rmh@aybabtu.com>
1030         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1031         ELF segments, use a macro for arbitrarily accessing any of them instead
1032         of preparing a pointer that allows access to one at a time.
1033         (grub_multiboot_load_elf64): Likewise.
1035 2008-07-31  Bean  <bean123ch@gmail.com>
1037         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1038         GRUB_KERNEL_MACHINE_DATA_END.
1040 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1042         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1043         Increase from 0x50 to 0x60.
1044         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1045         use UUIDs to identify the root drive for them.  If that's not
1046         possible, abort.
1047         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1048         check, for cross-disk installs.
1050 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1052         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1053         is non-empty, use it to set the `prefix' environment variable instead
1054         of the usual approach.
1055         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1056         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1057         environment variable instead of dummy make_install_device().
1059         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1060         (start): Insert a data section, with `grub_prefix' variable.
1061         * kern/i386/linuxbios/startup.S: Likewise.
1063         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1064         New variable reference.
1065         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1066         New macro.  Defines offset of `grub_prefix' within startup.S (relative
1067         to `start').
1068         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
1069         section within startup.S (relative to `start').
1070         * include/grub/i386/coreboot/kernel.h: Likewise.
1072         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1073         Overwrite grub_prefix with its contents, at the beginning of the
1074         first segment.
1075         (main): Understand -p|--prefix.
1077 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1079         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1081 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1083         * term/i386/pc/vga_text.c (grub_console_cls): Use
1084         grub_console_gotoxy() to go back to beginning of the screen.
1085         Found by Patrick Georgi <patrick.georgi@coresystems.de>
1087 2008-07-29  Christian Franke  <franke@computer.org>
1089         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1090         Add conversion of emulated mount points on Cygwin.
1092 2008-07-29  Christian Franke  <franke@computer.org>
1094         * util/update-grub.in: Add a check for admin
1095         group on Cygwin.
1096         Remove old `grub.cfg.new' before creation.
1097         Add `-f' to `mv' to handle the different filesystem
1098         semantics of Windows.
1100 2008-07-29  Bean  <bean123ch@gmail.com>
1102         * normal/main.c (get_line): Fix buffer overflow bug.
1104 2008-07-28  Robert Millan  <rmh@aybabtu.com>
1106         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1107         (struct grub_apple_header): New struct.  Describes the layout of
1108         the partmap header.
1109         (apple_partition_map_iterate): Check the header magic as well as the
1110         partition magic (which was already being checked).
1112 2008-07-28  Pavel Roskin  <proski@gnu.org>
1114         * genmk.rb: Add a warning to the beginning of the output that
1115         it's a generated file and should not be edited.
1117 2008-07-28  Robert Millan  <rmh@aybabtu.com>
1119         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1120         with the same number are found, just use issue a warning with
1121         grub_dprintf(), as this error has been reported to be non-fatal.
1123 2008-07-27  Robert Millan  <rmh@aybabtu.com>
1125         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1126         information.
1128 2008-07-27  Bean  <bean123ch@gmail.com>
1130         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1131         (grub_fat_find_dir): Ignore case when comparing filename.
1133 2008-07-27  Bean  <bean123ch@gmail.com>
1135         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1136         smallino, as it's more descriptive, and i8count can be confused with
1137         the other field count.
1138         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1139         inode type.
1141 2008-07-27  Bean  <bean123ch@gmail.com>
1143         * commands/crc.c: New file.
1145         * lib/crc.c: Likewise.
1147         * include/grub/lib/crc.h: Likewise.
1149         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1151         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1152         (hexdump): Move this function to ...
1154         * lib/hexdump.c: ... here.
1156         * include/grub/hexdump.h: Renamed to ...
1158         * include/grub/lib/hexdump.h: ... this.
1160         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1162         * util/grub-editenv.c: Likewise.
1164         * include/envblk.h: Renamed to ...
1166         * include/lib/envblk.h: ... this.
1168         * util/envblk.c: Renamed to ...
1170         * lib/envblk.c: ... this.
1172         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1173         lib/hexdump.c.
1174         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1175         (pkglib_MODULES): Add crc.mod.
1176         (hexdump_mod_SOURCES): Add lib/hexdump.c.
1177         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1178         (crc_mod_SOURCES): New macro.
1179         (crc_mod_CFLAGS): Likewise.
1180         (crc_mod_LDFLAGS): Likewise.
1182         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1184         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1186         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1188         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1190         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1192 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
1194         * commands/help.c: Include <grub/term.h>.
1195         (TERM_WIDTH): Removed.  Updated all users.
1197 2008-07-27  Pavel Roskin  <proski@gnu.org>
1199         * util/getroot.c (find_root_device): Rephrase a comment to avoid
1200         spurious warnings about a comment within a comment.
1202 2008-07-25  Robert Millan  <rmh@aybabtu.com>
1204         * util/getroot.c (find_root_device): Skip devices that match
1205         /dev/dm-[0-9].  This lets the real device be found for any type of
1206         abstraction (LVM, EVMS, RAID..).
1207         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1208         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
1209         device is found first, find_root_device() will now skip it.
1211 2008-07-24  Pavel Roskin  <proski@gnu.org>
1213         * include/grub/types.h: Use __builtin_bswap32() and
1214         __builtin_bswap64() with gcc 4.3 and newer.
1216 2008-07-24  Christian Franke  <franke@computer.org>
1218         * util/i386/pc/grub-install.in: If `--debug' is specified,
1219         pass `--verbose' to grub-setup.
1220         Abort script if make_system_path_relative_to_its_root() fails.
1222 2008-07-24  Bean  <bean123ch@gmail.com>
1224         * configure.ac: Fixed a bug caused by the previous cygwin patch,
1225         variable `target_platform' should be `platform'.
1227 2008-07-24  Bean  <bean123ch@gmail.com>
1229         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1230         (grub_png_init_fixed_block): New function.
1231         (grub_png_decode_image_data): Handle fixed huffman code compression.
1233 2008-07-24  Bean  <bean123ch@gmail.com>
1235         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1236         (grub_pe2elf_SOURCES): New macro.
1237         (CLEANFILES): Add grub-pe2elf.
1239         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1240         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1241         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1242         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1243         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1244         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1245         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1246         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1247         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1248         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1249         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1250         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1251         (GRUB_PE32_DT_FUNCTION): Likewise.
1252         (GRUB_PE32_REL_I386_DIR32): Likewise.
1253         (GRUB_PE32_REL_I386_REL32): Likewise.
1254         (grub_pe32_symbol): New structure.
1255         (grub_pe32_reloc): Likewise.
1257         * util/grub-pe2elf.c: New file.
1259         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1260         start symbol in non pc platform.
1262         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1264         The following patches are from Christian Franke.
1266         * include/grub/dl.h: Remove .previous, gas supports this only
1267         for ELF format.
1269         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1270         Remove .type, gas supports this only for ELF format.
1272         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1273         nullbytes in symbol table. This fixes an infinite loop if table is
1274         zero filled.
1276         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1277         TARGET_IMG_LDFLAGS and EXEEXT.
1279         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1280         TARGET_IMG_LDFLAGS_AC.
1281         (grub_CHECK_STACK_ARG_PROBE): New function.
1283         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1285         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1287         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1288         to set TARGET_IMG_LD* accordingly.
1289         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1290         Add call to grub_CHECK_STACK_ARG_PROBE.
1291         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1293         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1295         * genmk.rb: Add EXEEXT to CLEANFILES.
1297 2008-07-23  Robert Millan  <rmh@aybabtu.com>
1299         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1300         define the codes for arrows and lines used for the menu).
1301         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1302         as well.
1304         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1305         fonts, because the latter are too slow.
1307 2008-07-21  Bean  <bean123ch@gmail.com>
1309         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1310         a20. Run keyboard test last, as it will cause macbook to halt.
1312 2008-07-18  Pavel Roskin  <proski@gnu.org>
1314         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
1315         load foreign architecture modules correctly anyway.  Keep
1316         support for loading host architecture modules, whether we
1317         compile them or not.
1319 2008-07-17  Pavel Roskin  <proski@gnu.org>
1321         * configure.ac: Use -m32 or -m64 regardless of whether we had to
1322         change target_cpu.  The compiler default can mismatch target_cpu
1323         in any case.
1325         * disk/efi/efidisk.c: Fix format warnings on x86_64.
1326         * kern/efi/efi.c: Likewise.
1328         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
1329         target compiler is functional.
1330         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
1331         are set up.
1333         * configure.ac: Default to efi platform for x86_64-apple.  Allow
1334         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
1335         adjustments from the rest, only do them if target is not
1336         explicitly given.  Merge other adjustments with the final sanity
1337         check.  Remove an extraneous check for supported CPU.  Be
1338         specific which CPU and which platform is not supported.
1340         * configure.ac: Default to pc platform for x86_64.
1342 2008-07-17  Robert Millan  <rmh@aybabtu.com>
1344         Partial LinuxBIOS -> Coreboot rename.
1346         * conf/i386-linuxbios.rmk: Renamed to ...
1347         * conf/i386-coreboot.rmk: ... this.
1348         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
1349         * configure.ac: Accept "coreboot" as input platform (but maintain
1350         compatibility with "linuxbios").
1351         * include/grub/i386/linuxbios: Renamed to ...
1352         * include/grub/i386/coreboot: ... this.
1354 2008-07-17  Bean  <bean123ch@gmail.com>
1356         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
1357         (appleldr_mod_SOURCE): New variable.
1358         (appleldr_mod_CFLAGS): Likewise.
1359         (appleldr_mod_LDFLAGS): Likewise.
1360         (pci_mod_SOURCES): Likewise.
1361         (pci_mod_CFLAGS): Likewise.
1362         (pci_mod_LDFLAGS): Likewise.
1363         (lspci_mod_SOURCES): Likewise.
1364         (lspci_mod_CFLAGS): Likewise.
1365         (lspci_mod_LDFLAGS): Likewise.
1367         * conf/x86_64-efi.rmk: New file.
1369         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
1370         macro.
1371         (grub_efidisk_write): Likewise.
1373         * include/efi/api.h (efi_call_0): New macro.
1374         (efi_call_1): Likewise.
1375         (efi_call_2): Likewise.
1376         (efi_call_3): Likewise.
1377         (efi_call_4): Likewise.
1378         (efi_call_5): Likewise.
1379         (efi_call_6): Likewise.
1381         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
1382         grub_rescue_cmd_chainloader.
1384         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
1385         (grub_pe32_optional_header): Change some fields based on i386 or
1386         x86_64 platform.
1387         (GRUB_PE32_PE32_MAGIC): Likewise.
1389         * include/grub/efi/uga_draw.h: New file.
1391         * include/grub/elf.h (STN_ABS): New constant.
1392         (R_X86_64_NONE): Relocation constant for x86_64.
1393         (R_X86_64_64): Likewise.
1394         (R_X86_64_PC32): Likewise.
1395         (R_X86_64_GOT32): Likewise.
1396         (R_X86_64_PLT32): Likewise.
1397         (R_X86_64_COPY): Likewise.
1398         (R_X86_64_GLOB_DAT): Likewise.
1399         (R_X86_64_JUMP_SLOT): Likewise.
1400         (R_X86_64_RELATIVE): Likewise.
1401         (R_X86_64_GOTPCREL): Likewise.
1402         (R_X86_64_32): Likewise.
1403         (R_X86_64_32S): Likewise.
1404         (R_X86_64_16): Likewise.
1405         (R_X86_64_PC16): Likewise.
1406         (R_X86_64_8): Likewise.
1407         (R_X86_64_PC8): Likewise.
1409         * include/grub/i386/efi/pci.h: New file.
1411         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1412         Change it value based on platform.
1413         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1414         (GRUB_E820_RAM): Likewise.
1415         (GRUB_E820_RESERVED): Likewise.
1416         (GRUB_E820_ACPI): Likewise.
1417         (GRUB_E820_NVS): Likewise.
1418         (GRUB_E820_EXEC_CODE): Likewise.
1419         (GRUB_E820_MAX_ENTRY): Likewise.
1420         (grub_e820_mmap): New structure.
1421         (linux_kernel_header): Change the efi field according to different
1422         kernel version, also field from linux_kernel_header.
1424         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1426         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1427         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1428         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1429         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1430         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1431         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1432         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1433         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1434         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1435         (GRUB_PCI_ADDR_IO_MASK): Likewise.
1437         * include/grub/x86_64/efi/kernel.h: New file.
1439         * include/grub/x86_64/efi/loader.h: Likewise.
1441         * include/grub/x86_64/efi/machine.h: Likewise.
1443         * include/grub/x86_64/efi/pci.h: Likewise.
1445         * include/grub/x86_64/efi/time.h: Likewise.
1447         * include/grub/x86_64/linux.h: Likewise.
1449         * include/grub/x86_64/setjmp.h: Likewise.
1451         * include/grub/x86_64/time.h: Likewise.
1453         * include/grub/x86_64/types.h: Likewise.
1455         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1456          GRUB_TARGET_SIZEOF_VOID_P.
1458         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1459         (grub_efi_locate_handle): Likewise.
1460         (grub_efi_open_protocol): Likewise.
1461         (grub_efi_set_text_mode): Likewise.
1462         (grub_efi_stall): Likewise.
1463         (grub_exit): Likewise.
1464         (grub_reboot): Likewise.
1465         (grub_halt): Likewise.
1466         (grub_efi_exit_boot_services): Likewise.
1467         (grub_get_rtc): Likewise.
1469         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
1470         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
1471         (grub_efi_allocate_pages): Wrap efi calls.
1472         (grub_efi_free_pages): Wrap efi calls.
1473         (grub_efi_get_memory_map): Wrap efi calls.
1475         * kern/x86_64/dl.c: New file.
1477         * kern/x86_64/efi/callwrap.S: Likewise.
1479         * kern/x86_64/efi/startup.S: Likewise.
1481         * loader/efi/appleloader.c: Likewise.
1483         * loader/efi/chainloader.c (cmdline): New variable.
1484         (grub_chainloader_unload): Wrap efi calls.
1485         (grub_chainloader_boot): Likewise.
1486         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
1487         command line.
1489         * loader/efi/chainloader_normal.c (chainloader_command):
1490         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
1491         command line.
1493         * loader/i386/efi/linux.c (allocate_pages): Change allocation
1494         method.
1495         (grub_e820_add_region): New function.
1496         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
1497         booting.
1498         (grub_find_video_card): New function.
1499         (grub_linux_setup_video): New function.
1500         (grub_rescue_cmd_linux): Probe for video information.
1502         * normal/x86_64/setjmp.S: New file.
1504         * term/efi/console.c (map_char): New function.
1505         (grub_console_putchar): Map unicode char.
1506         (grub_console_checkkey): Wrap efi calls.
1507         (grub_console_getkey): Likewise.
1508         (grub_console_getwh): Likewise.
1509         (grub_console_gotoxy): Likewise.
1510         (grub_console_cls): Likewise.
1511         (grub_console_setcolorstate): Likewise.
1512         (grub_console_setcursor): Likewise.
1514         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
1516 2008-07-16  Pavel Roskin  <proski@gnu.org>
1518         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
1519         format strings.
1521         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
1522         pointer, not an integer.  This fixes a warning and prevents
1523         precision loss on 64-bit systems.
1524         (relocate_addresses): Remove unneeded cast.
1526 2008-07-15  Pavel Roskin  <proski@gnu.org>
1528         * kern/i386/ieee1275/init.c: Include grub/cache.h.
1530         * term/ieee1275/ofconsole.c: Disable code unused on i386.
1532         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
1533         Fix comparison between signed and unsigned.
1535         * include/grub/i386/ieee1275/console.h: Declare
1536         grub_console_init() and grub_console_fini().
1538         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
1539         It's empty and unused.
1541         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
1542         beginning to avoid warnings with some compilers.
1544         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
1545         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
1547 2008-07-14  Pavel Roskin  <proski@gnu.org>
1549         * kern/env.c (grub_register_variable_hook): Don't copy empty
1550         string, it leaks memory.  Pass "" to grub_env_set(), it should
1551         handle constant strings.
1553         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
1554         * commands/cmp.c (grub_cmd_cmp): Likewise.
1555         * kern/dl.c (grub_dl_flush_cache): Likewise.
1556         (grub_dl_load_core): Likewise.
1557         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
1558         (grub_elf64_load_phdrs): Likewise.
1560 2008-07-13  Pavel Roskin  <proski@gnu.org>
1562         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
1563         between signed and unsigned.
1564         (LzmaEnc_Finish): Fix warning about an unused parameter.
1566 2008-07-13  Bean  <bean123ch@gmail.com>
1568         * Makefile.in (enable_lzo): New rule.
1570         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
1572         * configure.ac (ENABLE_LZO): New option --enable-lzo.
1574         * boot/i386/pc/lnxboot.S: #include <config.h>.
1576         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
1577         its value according to the compression algorithm used, lzo or lzma.
1579         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
1580         compression algorithm according to configure macro.
1582         * kern/i386/pc/startup.S (codestart): Likewise.
1584         * kern/i386/pc/lzma_decode.S: New file.
1586         * include/grub/lib/LzFind.h: Likewise.
1588         * include/grub/lib/LzHash.h: Likewise.
1590         * include/grub/lib/LzmaDec.h: Likewise.
1592         * include/grub/lib/LzmaEnc.h: Likewise.
1594         * include/grub/lib/LzmaTypes.h: Likewise.
1596         * lib/LzFind.c: Likewise.
1598         * lib/LzmaDec.c: Likewise.
1600         * lib/LzmaEnc.c: Likewise.
1602 2008-07-13  Bean  <bean123ch@gmail.com>
1604         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
1605         (grub_ext4_extent_header): New structure.
1606         (grub_ext4_extent): Likewise.
1607         (grub_ext4_extent_idx): Likewise.
1608         (grub_ext4_find_leaf): New function.
1609         (grub_ext2_read_block): Handle extents.
1611 2008-07-12  Robert Millan  <rmh@aybabtu.com>
1613         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
1615 2008-07-11  Robert Millan  <rmh@aybabtu.com>
1617         * util/grub.d/40_custom.in: New file. Example on how to add custom
1618         entries to /etc/grub.d.
1619         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
1620         40_custom (implicitly, by merging all the grub.d rules).
1622 2008-07-11  Pavel Roskin  <proski@gnu.org>
1624         * commands/read.c (grub_getline): Fix invalid memory access.
1625         Don't add newline to the variable value.
1627         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
1628         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
1629         (serial_hw_get_port): Check validity of the port number.
1630         (grub_cmd_serial): Check return value of serial_hw_get_port().
1632 2008-07-07  Pavel Roskin  <proski@gnu.org>
1634         * boot/i386/pc/diskboot.S (notification_string): Replace
1635         "Loading kernel" with just "loading".  This is shorter, less
1636         confusing and saves a few bytes for possible future changes.
1638 2008-07-05  Pavel Roskin  <proski@gnu.org>
1640         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
1641         size for ATAPI devices, they are undefined.  Output sector
1642         number in decimal form.
1644         * disk/ata.c: Use named constants for status bits.
1646 2008-07-04  Pavel Roskin  <proski@gnu.org>
1648         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
1649         grub_addr_t before casting it to the void pointer to fix a
1650         warning.  Non-addressable regions are discarded earlier.
1651         (grub_arch_modules_addr): Cast _end to grub_addr_t.
1652         * kern/i386/linuxbios/table.c: Include grub/misc.h.
1653         (check_signature): Don't shadow table_header.
1654         (grub_linuxbios_table_iterate): Cast numeric constants to
1655         grub_linuxbios_table_header_t.
1656         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
1657         grub_stop().
1659         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
1660         prevent warnings.
1662         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
1663         pointer, which can cause warnings.  Support 64-bit addresses.
1665         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
1666         of sizeof(long).  This fixes PowerPC image generation on x86_64.
1668 2008-07-04  Robert Millan  <rmh@aybabtu.com>
1670         This fixes a performance issue when pc & gpt partmap iterators
1671         didn't abort iteration even after our hook found what it was
1672         looking for (often causing expensive probes of non-existent drives).
1674         Some callers relied on previous buggy behaviour, since they would
1675         rise an error when their own hooks caused early abortion of its
1676         iteration.
1678         * kern/device.c (grub_device_open): Improve error message.
1679         * disk/lvm.c (grub_lvm_open): Likewise.
1680         * disk/raid.c (grub_raid_open): Likewise.
1682         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
1683         when hook requests it, independently of grub_errno.
1684         (pc_partition_map_probe): Do not fail when find_func() caused
1685         early abortion of pc_partition_map_iterate().
1687         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
1688         when hook requests it, independently of grub_errno.
1689         (gpt_partition_map_probe): Do not fail when find_func() caused
1690         early abortion of gpt_partition_map_iterate().
1692         * kern/partition.c (grub_partition_iterate): Abort parent iteration
1693         when hook requests it, independently of grub_errno.  Do not fail when
1694         part_map_iterate_hook() caused early abortion of p->iterate().
1696         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
1697         when grub_partition_iterate() returned with non-zero.
1699 2008-07-03  Pavel Roskin  <proski@gnu.org>
1701         * disk/ata.c (grub_ata_pio_write): Check status before writing,
1702         like we do in grub_ata_pio_read().
1703         (grub_ata_readwrite): Always write individual sectors.  Fix the
1704         sector count for the remainder.
1705         (grub_ata_write): Enable writing to ATA devices.  Correctly
1706         report error for ATAPI devices.
1708 2008-07-02  Pavel Roskin  <proski@gnu.org>
1710         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
1711         warning.
1713         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
1714         for every read sector, we already increment it for the whole
1715         batch.  This fixes reading more than 256 sectors at once.
1717         * util/grub-editenv.c (cmd_info): Cast argument to long
1718         explicitly.  ptrdiff_t reduces to int on i386.
1720         * util/grub-editenv.c (main): Be specific which parameter is
1721         missing.
1723         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
1724         (memdisk): Make memdisk_orig_addr a pointer.
1726         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
1727         for file offsets, use grub_off_t instead.  Fix printf format
1728         warnings.
1730         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
1731         there.  Real unexpected warnings should not drown in the noise
1732         about known problems.
1734         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
1735         grub_disk_addr_t for memory addresses.
1737         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
1738         explicitly to fix a warning.
1740         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
1742         * Makefile.in (MODULE_LDFLAGS): New variable.
1743         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
1744         the linker accepts --build-id=none.
1745         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
1746         MODULE_LDFLAGS.
1747         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
1749         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
1750         those in Linux XFS code.  Provide a way to access 64-bit parent
1751         inode.
1752         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
1753         the end of struct grub_xfs_dir_header.
1755 2008-07-02  Bean  <bean123ch@gmail.com>
1757         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
1758         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
1759         and GRUB_IEEE1275_FLAG_NO_ANSI.
1761         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
1762         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
1763         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
1765         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
1766         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
1768         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
1769         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
1771         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
1772         esc sequence on non ANSI terminal.
1773         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
1775         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
1776         beginning of file.
1778 2008-07-02  Bean  <bean123ch@gmail.com>
1780         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
1781         (grub_editenv_SOURCES): New variable.
1782         (pkglib_MODULES): Add loadenv.mod.
1783         (loadenv_mod_SOURCES): New variable.
1784         (loadenv_mod_CFLAGS): Likewise.
1785         (loadenv_mod_LDFLAGS): Likewise.
1787         * include/grub/envblk.h: New file.
1789         * util/envblk.c: New file.
1791         * util/grub-editenv.c: New file.
1793         * commands/loadenv.c: New file.
1795 2008-07-01  Pavel Roskin  <proski@gnu.org>
1797         * include/multiboot2.h (struct multiboot_tag_module): Use char,
1798         not unsigned char.  This fixes warnings and is consistent with
1799         other tags.
1801         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
1803         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
1805         * term/tparm.c (analyze): Always set *popcount.
1807         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
1808         cast to fix a warning.
1810         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
1811         cast to suppress a warning.
1813         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
1814         grub_fshelp_read_file() expects.
1816         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
1817         write uuid as a 32-bit value in CPU byte order, so declare and
1818         use it as such.
1820         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
1821         long if the format specifier expects it.
1822         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
1823         * partmap/pc.c (pc_partition_map_iterate): Likewise.
1824         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
1825         long to fix a warning.
1826         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
1827         grub_dprintf() arguments to fix warnings.
1829 2008-06-30  Pavel Roskin  <proski@gnu.org>
1831         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
1832         install_bsd_part immediately before core.img is embedded or
1833         modified on disk.  This fixes core.img verification if core.img
1834         cannot be embedded.
1836         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
1837         core_path to calculate the blocklist.
1838         Patch from Javier Martín <lordhabbit@gmail.com>
1840 2008-06-29  Robert Millan  <rmh@aybabtu.com>
1842         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
1843         block to disk block.
1844         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
1845         Patch from Niels Böhm <bitbucket@arcor.de>
1847 2008-06-29  Robert Millan  <rmh@aybabtu.com>
1849         * util/update-grub_lib.in (font_path): Search for fonts in
1850         /boot/grub first, which is more likely to be readable (we aren't
1851         deciding where fonts live, just looking for them).
1853 2008-06-26  Pavel Roskin  <proski@gnu.org>
1855         * util/biosdisk.c (read_device_map): Don't leave dead map
1856         entries for devices failing stat() check.
1858         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
1859         core_path_dev for the core.img path on the target device.
1861 2008-06-26  Robert Millan  <rmh@aybabtu.com>
1863         * disk/fs_uuid.c: New file.
1864         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
1865         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
1866         (fs_uuid_mod_LDFLAGS): New variables.
1867         * include/grub/disk.h (grub_disk_dev_id): Add
1868         `GRUB_DISK_DEVICE_UUID_ID'.
1869         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
1870         implement iterate().
1872 2008-06-26  Robert Millan  <rmh@aybabtu.com>
1874         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
1875         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
1876         Linux image includes no initrd.
1878 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
1880         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
1881         call to resolve the core image location that effectively appended the
1882         name twice.
1884 2008-06-21  Robert Millan  <rmh@aybabtu.com>
1886         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
1887         call from here ...
1889         * util/grub.d/10_hurd.in: ... to here ...
1890         * util/grub.d/10_linux.in: ... and here.
1892 2008-06-19  Robert Millan  <rmh@aybabtu.com>
1894         * kern/main.c (grub_main): Export `prefix' variable immediately
1895         after it has been set by grub_machine_set_prefix().
1897 2008-06-19  Robert Millan  <rmh@aybabtu.com>
1899         * commands/search.c (search_label, search_fs_uuid, search_file): Print
1900         search result when not saving to variable, not the other way around.
1901         When saving to variable, abort iteration as soon as a match is found.
1903 2008-06-19  Robert Millan  <rmh@aybabtu.com>
1905         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
1906         check for partition that provides /boot/grub.  Its logic is flawed,
1907         as it prevents prepare_grub_to_access_device() from being called
1908         multiple times.
1910 2008-06-19  Robert Millan  <rmh@aybabtu.com>
1912         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
1913         "insmod" command directly when abstraction modules are needed,
1914         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
1915         since it had already been processed).
1917 2008-06-19  Pavel Roskin  <proski@gnu.org>
1919         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
1920         changed.  This is needed in case GRUB_LIBDIR changes.
1921         * conf/i386-ieee1275.rmk: Likewise.
1922         * conf/i386-linuxbios.rmk: Likewise.
1923         * conf/i386-pc.rmk: Likewise.
1924         * conf/powerpc-ieee1275.rmk: Likewise.
1926 2008-06-18  Pavel Roskin  <proski@gnu.org>
1928         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
1929         kernel_elf_symlist.c to symlist.c for consistency with other
1930         architectures.  Update all users.
1931         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1933 2008-06-18  Robert Millan  <rmh@aybabtu.com>
1935         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
1936         it in prefix.
1938         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
1939         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
1940         a RAID device, run setup() for all members independently on whether
1941         LVM abstraction is being used.
1942         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
1943         If grub-mkimage has set `*install_dos_part == -2', don't override this
1944         value.
1945         Perform *install_dos_part adjustments independently on whether
1946         we're embedding or not.
1947         Clarify error message when image is too big for embedding.
1948         Remove duplicate *install_dos_part stanza.
1950 2008-06-17  Robert Millan  <rmh@aybabtu.com>
1952         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
1953         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
1954         variables.
1955         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
1956         values in grub_ofconsole_normal_color and
1957         grub_ofconsole_highlight_color (they're not directly related to
1958         background and foreground).
1959         (grub_ofconsole_setcolorstate): Extract background and foreground
1960         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
1962 2008-06-17  Robert Millan  <rmh@aybabtu.com>
1964         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
1965         /boot/grub for the check in last commit, not /boot (they could be
1966         different partitions).
1968 2008-06-16  Robert Millan  <rmh@aybabtu.com>
1970         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
1971         asked to setup access for the same partition that provides /boot,
1972         don't bother using UUIDs since our root already has the value we
1973         want.
1975 2008-06-16  Robert Millan  <rmh@aybabtu.com>
1977         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
1978         I2O devices.
1979         Patch from Sven Mueller <sven@debian.org>.
1981 2008-06-16  Robert Millan  <rmh@aybabtu.com>
1983         * util/update-grub.in: Check for $EUID instead of $UID.
1984         Reported by Vincent Zweije.
1986 2008-06-16  Bean  <bean123ch@gmail.com>
1988         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
1989         (grub_ext2_read_block): Likewise.
1990         (grub_ext2_read_inode): Likewise.
1991         (grub_ext2_mount): Likewise.
1992         (grub_ext2_close): Likewise.
1993         (grub_ext3_get_journal): Removed.
1995         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
1996         (grub_reiserfs_read_symlink): Likewise.
1997         (grub_reiserfs_mount): Likewise.
1998         (grub_reiserfs_open): Likewise.
1999         (grub_reiserfs_read): Likewise.
2000         (grub_reiserfs_close): Likewise.
2001         (grub_reiserfs_get_journal): Removed.
2003         * fs/fshelp.c (grub_fshelp_read): Removed.
2004         (grub_fshelp_map_block): Likewise.
2006         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2007         (grub_fshelp_journal): Likewise.
2008         (grub_fshelp_read): Likewise.
2009         (grub_fshelp_map_block): Likewise.
2011 2008-06-16  Pavel Roskin  <proski@gnu.org>
2013         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2014         floating point anymore.
2015         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2017 2008-06-15  Pavel Roskin  <proski@gnu.org>
2019         * commands/ls.c (grub_ls_list_files): Use integer calculations
2020         for human readable format, avoid floating point use.
2021         * kern/misc.c (grub_ftoa): Remove.
2022         (grub_vsprintf): Remove floating point support.
2024 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2026         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2027         devices.
2028         Reported by Max Vozeler.
2030 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2032         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2033         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2034         skipped later.
2035         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2036         the beginning of the prefix.
2038         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2039         It is assumed that if we have a memdisk, grub-mkimage has set
2040         grub_prefix to include the "(memdisk)" drive in it.
2042 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2044         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2045         Initialize keyboard controller after registering the terminal, so that
2046         grub_printf() can be called from grub_keyboard_controller_init().
2048 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2050         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2051         extent-btree which is written as big endian on disk.
2052         Reported by Alain Greppin  <al@chilibi.org>.
2054 2008-06-14  Robert Millan  <rmh@aybabtu.com>
2056         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2057         * util/i386/pc/grub-install.in (modules): Likewise.
2059 2008-06-13  Pavel Roskin  <proski@gnu.org>
2061         * commands/ls.c (grub_ls_list_files): Fix format warnings.
2063 2008-06-13  Bean  <bean123ch@gmail.com>
2065         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2067         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2069         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2070         to indicate sparse block.
2072 2008-06-12  Pavel Roskin  <proski@gnu.org>
2074         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2075         number, grub_fshelp_read() does it for us.
2077         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
2078         linear disk read with journal translation.
2079         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2080         * include/grub/fshelp.h: Declare grub_fshelp_read().
2082 2008-06-09  Pavel Roskin  <proski@gnu.org>
2084         * fs/minix.c (grub_minix_mount): Handle error reading
2085         superblock.
2087 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2089         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2090         don't append the RAID prefix afterwards.
2091         Reported by Clint Adams.
2093 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2095         Based on description from Pavel:
2096         * kern/disk.c (grub_disk_check_range): Rename to ...
2097         (grub_disk_adjust_range): ... this.  Add a comment explaining the
2098         tasks performed by this function.
2100 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2102         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2103         `num_serial' (for consistency with other variables).
2104         (struct grub_ntfs_data): Add `uuid' member.
2105         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2106         (grub_ntfs_uuid): New function.
2107         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2109 2008-06-07  Pavel Roskin  <proski@gnu.org>
2111         * util/biosdisk.c (open_device): Revert last change to the
2112         function, it broke installation.  The sector needs to be
2113         different dependent on which device is opened.
2115 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2117         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2118         rest of GRUB, and breakage doesn't happen if its value were modified.
2120         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2121         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2122         a constant (same value).
2123         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2124         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2126 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2128         * util/biosdisk.c (open_device): Do not modify sector offset when
2129         accessing a partition.  kern/disk.c already handles this for us.
2131 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2133         * util/grub-emu.c (grub_machine_init): Move code in this function from
2134         here ...
2135         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2136         segfault in case grub_printf() is called).
2138         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2139         grub_probe.  Update all users not to explicitly add it again.
2140         (grub_device): New variable; contains corresponding device for grubdir.
2141         (fs_module, partmap_module, devabstraction_module): Pass
2142         `--device ${grub_device}' to grub_probe to avoid traversing /dev
2143         every time.
2145 2008-06-05  Robert Millan  <rmh@aybabtu.com>
2147         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2148         is found, print it (same layout as with labels).
2150 2008-06-04  Robert Millan  <rmh@aybabtu.com>
2152         * util/biosdisk.c (get_drive): Rename to ...
2153         (find_grub_drive): ... this.  Update all users.
2155         (get_os_disk): Rename to ...
2156         (convert_system_partition_to_system_disk): ... this.  Update all users.
2158         (find_drive): Rename to ...
2159         (find_system_device): ... this.  Update all users.
2161 2008-06-04  Robert Millan  <rmh@aybabtu.com>
2163         * util/biosdisk.c (get_os_disk): Handle IDA devices.
2164         * util/grub-mkdevicemap.c (get_mmc_disk_name)
2165         (make_device_map): Likewise.
2167 2008-06-01  Robert Millan  <rmh@aybabtu.com>
2169         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2170         before dereferencing it.
2172         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2173         union with fat12/fat16-specific ones.  Add some new fields, including
2174         `num_serial' for both versions.
2175         (struct grub_fat_data): Add `uuid' member.
2176         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2177         names.  Initialize `data->uuid' using `num_serial'.
2178         (grub_fat_uuid): New function.
2179         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2181         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2182         (grub_reiserfs_uuid): New function.
2183         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2184         member.
2186         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2187         (grub_xfs_uuid): New function.
2188         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2190 2008-06-01  Robert Millan  <rmh@aybabtu.com>
2192         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2193         code that is backward compatible with pre-uuid search command.
2195 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2197         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2198         floppies after everything else, to ensure floppy drive isn't accessed
2199         unnecessarily (patch from Bean).
2201 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2203         * commands/search.c (search_label, search_fs_uuid, search_file): Do
2204         not print device names when we were asked to set a variable.
2206 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2208         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2209         using "cursor-on" and "cursor-off" commands (understood at least by
2210         the Open Firmware flavour on OLPC).
2212 2008-05-31  Michael Gorven  <michael@gorven.za.net>
2214         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2215         on and off sequences.
2217 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2219         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2220         * util/update-grub.in: Likewise.
2222 2008-05-30  Pavel Roskin  <proski@gnu.org>
2224         * util/biosdisk.c (linux_find_partition): Simplify logic and
2225         make the code more universal.  Keep special processing for
2226         devfs, but use a simple rule for all other devices.  If the
2227         device ends with a number, append 'p' and the partition number.
2228         Otherwise, append only the partition number.
2230 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2232         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2233         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2234         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2235         the `root' parameter to Linux.
2237 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2239         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2240         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2241         --fs_uuid with --fs-uuid.
2242         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2243         all filesystems support them).
2245 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2247         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2248         grub_printf() flags, since we're printing in units of 2 bytes.
2250 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2252         * util/grub.d/00_header.in: Remove obsolete comment referencing
2253         convert_system_path_to_grub_path().
2254         * util/update-grub.in: Likewise.
2255         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2256         (convert_system_path_to_grub_path): Add a warning message explaining
2257         that this function is deprecated.  Rely on is_path_readable_by_grub()
2258         for the readability checks.
2259         (font_path): Use is_path_readable_by_grub() for the readability
2260         check rather than convert_system_path_to_grub_path().
2262 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2264         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2265         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2266         converting it first.
2267         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2268         grub.cfg for access to font file, and afterwards call it again to set
2269         the root device.
2271 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2273         * commands/search.c (options): Add --fs_uuid option.
2274         (search_fs_uuid): New function.
2275         (grub_cmd_search): Fix --set argument passing.
2276         Use search_fs_uuid() when requested via --fs_uuid.
2277         (grub_search_init): Update help message.
2278         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2279         and redeclare it as an array of 16-bit words.
2280         (grub_ext2_uuid): New function.
2281         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2282         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2283         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2284         (GRUB_DEVICE_BOOT_UUID): New variables.
2285         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2286         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2287         whenever possible.
2288         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
2289         just assume `root' variable has the right value.
2290         * util/grub.d/10_linux.in: Likewise.
2291         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2292         via PRINT_FS_UUID.
2293         (main): Recognise `-t fs_uuid' argument.
2295 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2297         * util/biosdisk.c (map): Redefine structure to hold information
2298         about GRUB drive name.
2299         (get_drive): Reimplement without assuming (and verifying) BIOS-like
2300         drive names.
2301         (call_hook): Remove.
2302         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2303         member.  Assume drive has partitions.
2304         (grub_util_biosdisk_open): Access device names via `.device' struct
2305         member.
2306         (open_device): Likewise.
2307         (find_drive): Likewise.
2308         (read_device_map): Adjust map[] usage to match the new struct
2309         definition.  Don't check for duplicates (still possible, but not cheap
2310         anymore).
2311         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2312         (make_device_name): Remove assumption of BIOS-like drive names.
2314 2008-05-30  Pavel Roskin  <proski@gnu.org>
2316         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2317         compiling execute.c doesn't need grub_script.tab.h anymore.
2318         (normal/command.c_DEPENDENCIES): Likewise.
2319         (normal/function.c_DEPENDENCIES): Likewise.
2320         * conf/i386-ieee1275.rmk: Likewise.
2321         * conf/i386-linuxbios.rmk: Likewise.
2322         * conf/i386-pc.rmk: Likewise.
2323         * conf/powerpc-ieee1275.rmk: Likewise.
2324         * conf/sparc64-ieee1275.rmk: Likewise.
2326 2008-05-29  Pavel Roskin  <proski@gnu.org>
2328         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
2329         when scanning metadata for volume group name.
2331         * include/grub/script.h: Don't include grub_script.tab.h.  It's
2332         a generated file, which may only be included from the files with
2333         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
2334         use union YYSTYPE, as the later allows forward declaration.
2335         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
2337 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2339         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
2340         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
2341         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
2342         (grub_console_checkkey): Add grub_dprintf() call to report unknown
2343         scan codes.
2345 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2347         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
2348         control key combinations.
2350 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2352         * util/powerpc/ieee1275/grub-install.in: Move from here ...
2353         * util/ieee1275/grub-install.in: ... to here.
2354         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
2355         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
2356         (grub_install_SOURCES): Likewise.
2358 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2360         * fs/affs.c: Update copyright year.
2361         * fs/ext2.c: Likewise.
2362         * fs/fshelp.c: Likewise.
2363         * fs/hfsplus.c: Likewise.
2364         * fs/ntfs.c: Likewise.
2365         * fs/xfs.c: Likewise.
2366         * include/grub/fshelp.h: Likewise.
2367         * util/grub-mkdevicemap.c: Likewise.
2369 2008-05-28  Robert Millan  <rmh@aybabtu.com>
2371         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
2372         might need to be fatfs to support some firmware implementations
2373         (e.g. OFW or EFI).
2375 2008-05-28  Robert Millan  <rmh@aybabtu.com>
2377         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
2378         devices.
2379         * util/grub-mkdevicemap.c (get_mmc_disk_name)
2380         (make_device_map): Likewise.
2382 2008-05-20  Bean  <bean123ch@gmail.com>
2384         * fs/fshelp.c (grub_fshelp_map_block): New function.
2385         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
2386         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
2388         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
2389         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2390         (grub_fshelp_journal): New structure.
2391         (grub_fshelp_map_block): New function prototype.
2392         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2393         (grub_fshelp_map_block): Likewise.
2395         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2396         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2397         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2398         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2399         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2400         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2401         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2402         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2403         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2404         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2405         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2406         (grub_ext2_sblock): New members for journal support.
2407         (grub_ext3_journal_header): New structure.
2408         (grub_ext3_journal_revoke_header): Likewise.
2409         (grub_ext3_journal_block_tag): Likewise.
2410         (grub_ext3_journal_sblock): Likewise.
2411         (grub_fshelp_node): New members logfile and journal.
2412         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2413         grub_fshelp_map_block to get real block number.
2414         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2415         number.
2416         (grub_ext2_read_inode): Likewise.
2417         (grub_ext3_get_journal): New function.
2418         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2419         (grub_ext2_close): Release memory used by journal.
2421         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2422         (REISERFS_MAGIC_DESC_BLOCK): New macro.
2423         (grub_reiserfs_transaction_header): Renamed to
2424         grub_reiserfs_description_block, replace field data with real_blocks.
2425         (grub_reiserfs_commit_block): New structure.
2426         (grub_reiserfs_data): New member journal.
2427         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2428         number.
2429         (grub_reiserfs_read_symlink): Likewise.
2430         (grub_reiserfs_iterate_dir): Likewise.
2431         (grub_reiserfs_open): Likewise.
2432         (grub_reiserfs_read): Likewise.
2433         (grub_reiserfs_get_journal): New function.
2434         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2435         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2436         using grub_reiserfs_get_journal.
2437         (grub_reiserfs_close): Release memory used by journal.
2439         * fs/affs.c (grub_affs_read_block): Change block type to
2440         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2442         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2444         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2446         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2448         * fs/udf.c (grub_udf_read_block): Change block type to
2449         grub_disk_addr_t. Use type cast to avoid warning.
2451         * fs/xfs.c (grub_xfs_read_block): Likewise.
2453 2008-05-16  Christian Franke  <franke@computer.org>
2455         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2456         to ensure that break with ESC will always work.
2457         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2458         Remove ESC from keyboard queue.
2460 2008-05-16  Christian Franke  <franke@computer.org>
2462         * util/biosdisk.c: [__CYGWIN__] Add includes.
2463         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
2464         (get_os_disk): Move variable declarations to OS specific
2465         parts to avoid warning.
2466         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
2467         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
2468         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
2469         Cygwin.
2470         * util/getroot.c: [__CYGWIN__] Add includes.
2471         (strip_extra_slashes): Fix "/" case.
2472         [__CYGWIN__] (get_win32_path): New function.
2473         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
2474         [__CYGWIN__] (find_root_device): Disable.
2475         [__CYGWIN__] (get_bootsec_serial): New function.
2476         [__CYGWIN__] (find_cygwin_root_device): Likewise.
2477         [__linux__] (grub_guess_root_device): Add early returns to simplify
2478         structure.
2479         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
2480         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
2481         check for Linux only.
2483 2008-05-15  Bean  <bean123ch@gmail.com>
2485         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
2486         keyboard hang problem in apple's intel mac.
2488 2008-05-09  Robert Millan  <rmh@aybabtu.com>
2490         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
2491         devices.
2492         * util/grub-mkdevicemap.c (get_virtio_disk_name)
2493         (make_device_map): Likewise.
2494         Reported by Aurelien Jarno <aurel32@debian.org>
2496 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
2498         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
2499         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
2500         (make_device_map): Output entries for xvd type disks.
2502 2008-05-07  Robert Millan  <rmh@aybabtu.com>
2504         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
2505         devices.
2506         * util/grub-mkdevicemap.c (get_cciss_disk_name)
2507         (make_device_map): Likewise.
2508         Reported by Roland Dreier <rdreier@cisco.com>
2510 2008-05-07  Robert Millan  <rmh@aybabtu.com>
2512         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
2513         grub_strstr() call.  Correct a few mistakes in failure path handling.
2515 2008-05-06  Robert Millan  <rmh@aybabtu.com>
2517         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2518         Do not print a trailing slash (therefore, the root directory is an
2519         empty string).
2520         (convert_system_path_to_grub_path): Do not remove trailing slash
2521         from make_system_path_relative_to_its_root() output.
2523         * util/i386/pc/grub-install.in: Add trailing slash to output from
2524         make_system_path_relative_to_its_root().
2526 2008-05-06  Robert Millan  <rmh@aybabtu.com>
2528         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
2529         ensures that output lines aren't intermangled with those sent to
2530         stderr (via grub_util_info()).
2531         * util/grub-probe.c (grub_refresh): Likewise.
2532         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
2534 2008-05-05  Christian Franke  <franke@computer.org>
2536         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
2537         Add Cygwin device names.
2538         (get_ide_disk_name) [__CYGWIN__]: Likewise.
2539         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
2540         (check_device): Return error instead of success on empty name.
2541         (make_device_map): Move label inside linux specific code to
2542         prevent compiler warning.
2544 2008-04-30  Robert Millan  <rmh@aybabtu.com>
2546         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
2547         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
2548         first boot option.
2549         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
2551 2008-04-29  Robert Millan  <rmh@aybabtu.com>
2553         * docs/grub.cfg: New file (example GRUB configuration).
2555 2008-04-26  Robert Millan  <rmh@aybabtu.com>
2557         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
2558         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
2559         and `disk/ieee1275/nand.c'.
2561 2008-04-25  Bean  <bean123ch@gmail.com>
2563         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
2564         i386-linuxbios.
2566         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
2567         change the buffer size to 4096 for cdrom device.
2569         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
2570         and nand.mod.
2571         (_linux_mod_SOURCES): New variable.
2572         (_linux_mod_CFLAGS): Likewise.
2573         (_linux_mod_LDFLAGS): Likewise.
2574         (linux_mod_SOURCES): Likewise.
2575         (linux_mod_CFLAGS): Likewise.
2576         (linux_mod_LDFLAGS): Likewise.
2577         (nand_mod_SOURCES): Likewise.
2578         (nand_mod_CFLAGS): Likewise.
2579         (nand_mod_LDFLAGS): Likewise.
2581         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
2582         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
2583         type property. (nand device in olpc don't have this property)
2585         * include/grub/disk.h (grub_disk_dev_id): New macro
2586         GRUB_DISK_DEVICE_NAND_ID.
2588         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
2589         function prototype.
2590         (grub_rescue_cmd_initrd): Likewise.
2592         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
2593         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
2594         ofw_cif_handler and ofw_idt, adjust padding number.
2596         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
2597         GRUB_MACHINE_IEEE1275 is defined.
2599         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
2600         Use NESTED_FUNC_ATTR attribute on the hook parameter.
2602         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
2603         on nested function heap_init.
2604         (grub_upper_mem): New variable for i386-ieee1275.
2605         (grub_get_extended_memory): New function for i386-ieee1275.
2606         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
2608         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
2609         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
2610         property.
2612         * loader/i386/ieee1275/linux.c: New file.
2614         * loader/i386/ieee1275/linux_normal.c: New file.
2616         * disk/ieee1275/nand.c: New file.
2618 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
2620         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
2621         value.
2622         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
2624 2008-04-18  Robert Millan  <rmh@aybabtu.com>
2626         Restructures early code path on ieee1275 to unify grub_main() as
2627         the first C function that is executed in every platform.
2629         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
2630         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
2631         cmain().
2632         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
2633         * kern/ieee1275/cmain.c (cmain): Rename to ...
2634         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
2635         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
2636         at the beginning.
2638 2008-04-18  Robert Millan  <rmh@aybabtu.com>
2640         * util/update-grub.in: Fix syntax error when setting
2641         `GRUB_PRELOAD_MODULES'.
2642         Reported by Stephane Chazelas <stephane@artesyncp.com>
2644 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
2646         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
2647         section into account, newer toolchains generate unique build ids
2648         * configure.ac: remove the test for --build-id=none acceptance,
2649         we want build ids to be preserved
2650         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
2651         far from other sections don't cause the raw binary images grow
2652         size
2654 2008-04-15  Robert Millan  <rmh@aybabtu.com>
2656         * disk/lvm.c: Update copyright year.
2657         * kern/misc.c: Likewise.
2659 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
2661         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
2662         there is no memory left for physical volume name.
2664 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
2666         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
2667         volume name mapping to support bigger than 9 character names properly.
2669 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2671         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
2672         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
2674 2008-04-13  Christian Franke  <franke@computer.org>
2676         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
2677         to create a floppy emulation boot CD when non emulation mode
2678         does not work.
2679         Enable Joliet CD filesystem extension.
2681 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2683         * kern/misc.c (grub_strncat): Fix off-by-one error.
2684         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
2686         * kern/env.c (grub_env_context_close): Clear current context, not
2687         previous one.
2688         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
2690         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
2692 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2694         Improve robustness when handling LVM.
2696         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
2697         (and leave `*p' unmodified).
2698         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
2699         through it.
2700         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
2701         iterating through it.
2702         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
2703         through it.
2704         (grub_lvm_scan_device): Check the return value (and fail gracefully
2705         when due) on each grub_lvm_getvalue() or grub_strstr() call.
2706         Don't assume `vg->pvs != NULL' when iterating through it.
2708 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2710         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
2711         * genmk.rb (partmap): New variable.
2712         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
2713         (#{partmap}): New target rule.
2714         * genpartmaplist.sh: New file.
2715         * Makefile.in (pkglib_DATA): Add partmap.lst.
2716         (partmap.lst): New target rule.
2717         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
2718         modules (including all partition maps), instead of preloading them.
2720 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
2722         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
2723         `linux-boot-prober' (if installed) to detect other operating
2724         systems which are installed on the computer and add them to
2725         the boot menu.
2726         * conf/common.rmk: Build and install 30_os-prober.
2728 2008-04-12  Robert Millan  <rmh@aybabtu.com>
2730         * kern/powerpc/ieee1275/init.c: Move from here ...
2731         * kern/ieee1275/init.c: ... to here.  Update all users.
2733         * kern/powerpc/ieee1275/cmain.c: Move from here ...
2734         * kern/ieee1275/cmain.c: ... to here.  Update all users.
2736         * kern/powerpc/ieee1275/openfw.c: Move from here ...
2737         * kern/ieee1275/openfw.c: ... to here.  Update all users.
2739         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
2740         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
2742 2008-04-10  Pavel Roskin  <proski@gnu.org>
2744         * configure.ac: Always use "_cv_" in cache variables for
2745         compatibility with Autoconf 2.62.
2747 2008-04-07  Robert Millan  <rmh@aybabtu.com>
2749         Revert grub/machine/init.h addition by Pavel (since it breaks on
2750         i386-ieee1275 and others):
2751         * util/i386/pc/misc.c: Remove grub/machine/init.h.
2752         * util/powerpc/ieee1275/misc.c: Likewise.
2754 2008-04-07  Robert Millan  <rmh@aybabtu.com>
2756         * util/grub-probe.c (probe): Improve error message.
2758 2008-04-07  Robert Millan  <rmh@aybabtu.com>
2760         * util/biosdisk.c (read_device_map): Skip devices that don't exist
2761         (this prevents the presence of a bogus entry from ruining the whole
2762         thing).
2764 2008-04-06  Pavel Roskin  <proski@gnu.org>
2766         * util/biosdisk.c: Include grub/util/biosdisk.h.
2767         * util/grub-fstest.c (execute_command): Make static.
2768         * util/grub-mkdevicemap.c (check_device): Likewise.
2769         * util/i386/pc/misc.c: Include grub/machine/init.h.
2770         * util/powerpc/ieee1275/misc.c: Likewise.
2771         * util/lvm.c: Include grub/util/lvm.h.
2772         * util/misc.c: Include grub/kernel.h, grub/misc.h and
2773         grub/cache.h.
2774         * util/raid.c: Include grub/util/raid.h.
2775         (grub_util_getdiskname): Make static.
2777         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
2778         grub_hostfs_fini(), as they are called from grub_init_all() and
2779         grub_fini_all() respectively.  This fixes an infinite loop in
2780         grub-fstest due to double registration of hostfs.
2781         Reported by Christian Franke <Christian.Franke@t-online.de>
2783 2008-04-05  Pavel Roskin  <proski@gnu.org>
2785         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
2786         all 8 functions.  Otherwise, probe function 0 only.
2788 2008-04-04  Pavel Roskin  <proski@gnu.org>
2790         * commands/lspci.c (grub_lspci_iter): Print the bus number
2791         correctly.
2793         * commands/lspci.c (grub_pci_classes): Fix typos.
2794         (grub_lspci_iter): Don't print func twice.  Print vendor ID
2795         before device ID, as it's normally done.
2797         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
2798         Fix signedness warnings.
2799         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
2800         Likewise.
2801         * util/ieee1275/get_disk_name.c: Include config.h so that
2802         _GNU_SOURCE is defined and getline() is declared.  Mark an
2803         unused argument as such.  Fix a signedness warning.
2805 2008-04-02  Pavel Roskin  <proski@gnu.org>
2807         * genkernsyms.sh.in: Use more robust assignments for CC and
2808         srcdir.  Quote srcdir.
2809         * gensymlist.sh.in: Likewise.  Assert at the compile time that
2810         the symbol table is not empty.
2812         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
2813         * fs/cpio.c (grub_cpio_read): Likewise.
2815 2008-04-01  Pavel Roskin  <proski@gnu.org>
2817         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
2818         * disk/host.c (grub_host_open): Likewise.
2819         * disk/loopback.c (grub_loopback_open): Likewise.
2820         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
2821         disk->id as in disk/host.c, not a multi-character constant.
2823         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
2824         later is obsolete, potentially dangerous and sets a bad example.
2825         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
2826         * util/misc.c (grub_util_get_image_size): Likewise.
2828         * disk/loopback.c (options): Improve help for "--partitions".
2830         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
2831         options to align them with the short options, e.g. "echo -e".
2833 2008-03-31  Bean  <bean123ch@gmail.com>
2835         * video/reader/png.c (grub_png_data): New member is_16bit and
2836         image_data.
2837         (grub_png_decode_image_header): Detect 16 bit png image.
2838         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
2839         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
2840         (grub_video_reader_png): Release memory occupied by image_data.
2842         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
2843         4096 bytes.
2844         (grub_nfs_mount): Skip the test for sector per cluster.
2846         * include/grub/ntfs.h (MAX_SPC): Removed.
2848 2008-03-31  Bean  <bean123ch@gmail.com>
2850         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
2851         (grub_probe_SOURCES): Add fs/afs.c.
2852         (grub_fstest_SOURCES): Likewise.
2853         (afs_mod_SOURCES): New variable.
2854         (afs_mod_CFLAGS): Likewise.
2855         (afs_mod_LDFLAGS): Likewise.
2857         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
2858         (grub_emu_SOURCES): Likewise.
2860         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2862         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2864         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2866         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2868         * fs/afs.c: New file.
2870 2008-03-30  Pavel Roskin  <proski@gnu.org>
2872         * disk/host.c: Include grub/misc.h to fix a warning.
2873         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
2874         warnings about implicit declarations.
2876         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
2877         variable.
2878         * include/grub/i386/loader.h: Change declaration of
2879         grub_linux_boot() to match what grub_loader_set() expects.
2880         * util/getroot.c (grub_guess_root_device): Return const char* to
2881         fix a warning.
2882         * util/grub-probe.c (probe): Fix a warning about uninitialized
2883         abstraction_name variable.
2884         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
2885         second argument as unused to fix a warning.
2887         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
2888         missing grub_error() call.
2890         * util/update-grub_lib.in: Define datarootdir, since Autoconf
2891         2.60 and newer uses it to define datadir.
2893         * commands/sleep.c: Fix warning about implicit declaration.
2894         * disk/memdisk.c: Likewise.
2895         * loader/aout.c: Likewise.
2896         * loader/i386/bsd_normal.c: Likewise.
2897         * util/grub-probe.c: Likewise.
2899         * commands/i386/cpuid.c (has_longmode): Make static.
2900         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
2901         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
2903         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
2904         GDT.  This is more robust, as %ds can change.
2905         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
2906         calling real_to_prot().
2907         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
2909 2008-03-28  Pavel Roskin  <proski@gnu.org>
2911         * kern/i386/pc/startup.S: Assert that uncompressed functions
2912         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
2913         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
2914         code, as they push parts of the code (error handlers) beyond
2915         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
2916         code as correctness and size.
2918 2008-03-28  Pavel Roskin  <proski@gnu.org>
2920         * kern/i386/pc/startup.S
2921         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
2922         data block address to the real mode, keep offset minimal.  This
2923         works around a bug in AWARD BIOS on old Athlon systems, which
2924         makes CD detection hang.
2926 2008-03-26  Pavel Roskin  <proski@gnu.org>
2928         * normal/color.c (grub_parse_color_name_pair): Make `name' a
2929         const.
2930         * include/grub/normal.h: Add grub_parse_color_name_pair()
2931         declaration.
2933 2008-03-24  Bean  <bean123ch@gmail.com>
2935         * disk/i386/pc/biosdisk.c (cd_start): Removed.
2936         (cd_count): Removed.
2937         (cd_drive): New variable.
2938         (grub_biosdisk_get_drive): Don't check for (cdN) device.
2939         (grub_biosdisk_call_hook): Likewise.
2940         (grub_biosdisk_iterate): Change cdrom detection method.
2941         (grub_biosdisk_open): Replace cd_start with cd_drive.
2942         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
2943         detect cdrom device.
2945         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
2946         Removed.
2947         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
2948         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
2949         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
2950         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
2951         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
2952         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
2953         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
2954         (grub_biosdisk_cdrp): New structure.
2955         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
2957         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
2959         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
2960         device.
2962         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
2963         New function.
2965 2008-03-20  Robert Millan  <rmh@aybabtu.com>
2967         Remove 2 TiB limit in ata.mod.
2968         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
2969         (grub_ata_dumpinfo): Print sector count with 0x%llx.
2970         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
2971         grub_uint64_t instead of grub_uint32_t.
2973 2008-03-05  Bean  <bean123ch@gmail.com>
2975         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
2976         (grub_multiboot): Set boot device.
2978         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
2980 2008-03-02  Bean  <bean123ch@gmail.com>
2982         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
2983         symlink_buffer.
2985 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
2987         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
2988         texinfo.tex.
2990         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
2991         modified.
2993         * docs/fdl.texi: New file.
2995         * docs/mdate-sh: New file. Copied from gnulib.
2996         * docs/texinfo.tex: Likewise.
2998         * config.guess: Updated from gnulib.
2999         * install-sh: Likewise.
3001 2008-02-28  Robert Millan  <rmh@aybabtu.com>
3003         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3004         (aout_mod_SOURCES): New variable.
3005         (aout_mod_CFLAGS): Likewise.
3006         (aout_mod_LDFLAGS): Likewise.
3008         * conf/i386-ieee1275.rmk: Likewise.
3010 2008-02-28  Robert Millan  <rmh@aybabtu.com>
3012         * util/update-grub.in: Reorganise terminal validity check.  Accept
3013         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3014         Based on suggestion by Franklin PIAT.
3016 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
3018         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3019         function.
3020         * util/getroot.c (grub_util_check_block_device): New function that
3021         returns the given argument if it is a block device and returns NULL else.
3022         * util/grub-probe.c (argument_is_device): New variable.
3023         (probe): Promote device_name from a variable to an argument. Receive
3024         device_name from grub_util_check_block_device() if path is NULL and from
3025         grub_guess_root_device() else. Do not free() device_name anymore.
3026         (options): Introduce new parameter '-d, --device'.
3027         (main): Add description of the new parameter to the help screen.
3028         Rename path variable to argument. Set argument_is_device if the '-d'
3029         option is given. Pass argument to probe() depending on
3030         argument_is_device.
3032 2008-02-24  Bean  <bean123ch@gmail.com>
3034         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3035         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3036         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3037         (GRUB_ISO9660_VOLDESC_PART): Likewise.
3038         (GRUB_ISO9660_VOLDESC_END): Likewise.
3039         (grub_iso9660_primary_voldesc): New member escape.
3040         (grub_iso9660_data): New member joliet.
3041         (grub_iso9660_convert_string): New function.
3042         (grub_iso9660_mount): Detect joliet extension.
3043         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3044         (grub_iso9660_iso9660_label): Likewise.
3046         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3047         (grub_setup_SOURCES): Add fs/udf.c.
3048         (grub_fstest_SOURCES): Likewise.
3049         (udf_mod_SOURCES): New variable.
3050         (udf_mod_CFLAGS): Likewise.
3051         (udf_mod_LDFLAGS): Likewise.
3053         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3054         (grub_emu_SOURCES): Likewise.
3056         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3058         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3060         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3062         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3064         * fs/udf.c: New file.
3066 2008-02-24  Robert Millan  <rmh@aybabtu.com>
3068         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3069         (normal/lexer.c_DEPENDENCIES): New variables.
3070         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3071         (normal/lexer.c_DEPENDENCIES): Likewise.
3072         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3073         (normal/lexer.c_DEPENDENCIES): Likewise.
3074         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3075         (normal/lexer.c_DEPENDENCIES): Likewise.
3076         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3077         (normal/lexer.c_DEPENDENCIES): Likewise.
3078         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3079         (normal/lexer.c_DEPENDENCIES): Likewise.
3081 2008-02-23  Robert Millan  <rmh@aybabtu.com>
3083         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3084         since they were intended to be in hex.  This didn't break previously
3085         because of a bug in gpt_partition_map_iterate() (see below).
3087         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3088         when checking the validity of GPT header.
3089         Remove `partno', since it always provides the same information as `i'.
3091 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
3093         * include/grub/efi/time.h: Fix a wrong comment.
3095 2008-02-19  Pavel Roskin  <proski@gnu.org>
3097         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3098         message.
3100 2008-02-19  Bean  <bean123ch@gmail.com>
3102         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3103         (aout_mod_SOURCES): New variable.
3104         (aout_mod_CFLAGS): Likewise.
3105         (aout_mod_LDFLAGS): Likewise.
3106         (_bsd_mod_SOURCES): New variable.
3107         (_bsd_mod_CFLAGS): Likewise.
3108         (_bsd_mod_LDFLAGS): Likewise.
3109         (bsd_mod_SOURCES): New variable.
3110         (bsd_mod_CFLAGS): Likewise.
3111         (bsd_mod_LDFLAGS): Likewise.
3113         * include/grub/aout.h: New file.
3115         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3117         * include/grub/i386/bsd.h: New file.
3119         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3120         to make it public.
3122         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3123         function is called, so that it's possible to change it inside the hook.
3124         (grub_elf64_load): Likewise.
3125         (grub_elf_file): Don't close the file if elf header is not found.
3126         (grub_elf_close): Close the file if grub_elf_file fails (The new
3127         grub_elf_file won't close it).
3128         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3129         (grub_elf64_size): Likewise.
3131         * kern/i386/loader.S (grub_unix_real_boot): New function.
3133         * loader/aout.c: New file.
3135         * loader/i386/bsd.c: New file.
3137         * loader/i386/bsd_normal.c: New file.
3139         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3141         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3142         can test other formats.
3144 2008-02-19  Robert Millan  <rmh@aybabtu.com>
3146         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3147         (grub_gpt_partition_type_empty): Redefine with macro from
3148         `<grub/gpt_partition.h>'.
3149         (gpt_partition_map_iterate): Adjust partition type comparison.
3151         Export `entry' as partmap-specific `part.data' struct.
3152         (grub_gpt_header, grub_gpt_partentry): Move from here ...
3154         * include/grub/gpt_partition.h (grub_gpt_header)
3155         (grub_gpt_partentry): ... to here (new file).
3157         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3159         (grub_gpt_partition_type_bios_boot): New const variable, defined
3160         with macro from `<grub/gpt_partition.h>'.
3162         (setup): Replace `first_start' with `embed_region', which keeps
3163         track of the embed region (and is partmap-agnostic).
3165         Replace find_first_partition_start() with find_usable_region(),
3166         which finds a usable region for embedding using partmap-specific
3167         knowledge (supports PC/MSDOS and GPT).
3169         Fix all assumptions that the embed region start at sector 1, using
3170         `embed_region.start' from now on.  Similarly, use `embed_region.end'
3171         rather than `first_start' to calculate available size.
3173         In grub_util_info() message, replace "into after the MBR" with an
3174         indication of the specific sector our embed region starts at.
3176 2008-02-19  Robert Millan  <rmh@aybabtu.com>
3178         * DISTLIST: Replace `commands/ieee1275/halt.c' and
3179         `commands/ieee1275/reboot.c' with `commands/halt.c' and
3180         `commands/reboot.c'.
3181         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3182         (halt_mod_SOURCES): Likewise.
3183         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3184         (halt_mod_SOURCES): Likewise.
3186 2008-02-17  Christian Franke  <franke@computer.org>
3188         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3190 2008-02-17  Robert Millan  <rmh@aybabtu.com>
3192         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3193         set `first_start' to 0 for non-PC/MSDOS partition maps.
3195 2008-02-16  Robert Millan  <rmh@aybabtu.com>
3197         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3198         do not assume partition map is PC/MSDOS before performing checks that
3199         are specific to that layout.
3201 2008-02-13  Robert Millan  <rmh@aybabtu.com>
3203         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3204         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3205         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3207 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
3209         * configure.ac: Only a cosmetic change on the handling of
3210         -fno-stack-protector.
3212 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
3214         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3215         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3216         reboot.c.
3217         (grub_install_SOURCES): Add halt.mod and reboot.mod.
3218         (halt_mod_SOURCES): New variable.
3219         (halt_mod_CFLAGS): Likewise.
3220         (halt_mod_LDFLAGS): Likewise.
3221         (reboot_mod_SOURCES): Likewise.
3222         (reboot_mod_CFLAGS): Likewise.
3223         (reboot_mod_LDFLAGS): Likewise.
3225         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3226         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3227         reboot.c.
3228         (halt_mod_SOURCES): Likewise.
3229         (reboot_mod_SOURCES): Likewise.
3231         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3232         commands/i386/pc/reboot.c by commands/reboot.c.
3233         (reboot_mod_SOURCES): Likewise.
3235         * commands/i386/pc/reboot.c: merge this file ...
3237         * commands/ieee1275/reboot.c: ... and this file ...
3239         * commands/reboot.c: ... to this file.
3240         Add some precompiler directive to include the correct header for
3241         each machine.
3243         * commands/ieee1275/halt.c: move this file ...
3245         * commands/halt.c: ... to here.
3246         Add some precompiler directive to include the correct header for
3247         each machine.
3249         * include/grub/efi/efi.h (grub_reboot): New function declaration.
3250         (grub_halt): Likewise.
3252         * kern/efi/efi.c (grub_reboot): New function.
3253         (grub_halt): Likewise.
3255 2008-02-12  Robert Millan  <rmh@aybabtu.com>
3257         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3258         /dev (like it is done for /dev/mapper).  This doesn't provide support
3259         for EVMS, but at least it is now easy to identify the problem when it
3260         arises.
3262 2008-02-11  Robert Millan  <rmh@aybabtu.com>
3264         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3265         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3266         comparing it with -1, not 0.
3268 2008-02-10  Robert Millan  <rmh@aybabtu.com>
3270         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3271         `disk/lvm.c'.
3272         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3273         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3275         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3276         `disk/lvm.c' to the end of the list.
3277         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3278         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3280 2008-02-10  Robert Millan  <rmh@aybabtu.com>
3282         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
3283         grub_print_error() instead.  This will let user know why we're entering
3284         rescue mode.
3285         Based on suggestions from Sam Morris.
3287 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
3289         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3290         on remaining N args, instead of "--" arg N times.
3292 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
3294         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3295         (fill_with_default_glyph): Changed to use unknown_glyph for fill
3296         pattern for unknown glyphs.
3298 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3300         * configure.ac: Probe for `help2man'.
3301         * Makefile.in (builddir): New variable.
3302         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
3303         or otherwise add a few flags/options to it.
3304         (install-local): For every executable utility or script that is
3305         installed, invoke $(HELP2MAN) to install a manpage based on --help
3306         output.
3308         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3309         that it doesn't prevent --help from working in build tree.
3311         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3312         with `bug-grub@gnu.org'.
3313         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3314         * util/update-grub.in (usage): New function.
3315         Implement proper argument check, with support for --help and --version
3316         (as well as existing -y).
3318 2008-02-09  Christian Franke  <franke@computer.org>
3320         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
3321         avoid overwriting previous output.
3322         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
3324 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3326         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
3327         drawing the menu.
3329 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3331         * commands/sleep.c: New file.
3332         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
3333         (sleep_mod_SOURCES): New variable.
3334         (sleep_mod_CFLAGS): Likewise.
3335         (sleep_mod_LDFLAGS): Likewise.
3337 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3339         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
3340         situations in which we can deduce the RAID size and the superblock
3341         doesn't match it.
3343 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3345         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
3346         and return a grub_diskmemberlist_t composed of LVM physical volumes.
3347         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
3349         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
3350         and return a grub_diskmemberlist_t composed of physical array members.
3351         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
3353         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
3354         prototype.
3355         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
3356         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
3357         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
3359         * util/grub-probe.c (probe): Move partmap probing code from here ...
3360         (probe_partmap): ... to here.
3361         (probe): Use probe_partmap() once for the disk we're probing, and
3362         additionally, when such disk contains a memberlist() struct member,
3363         once for each disk that is contained in the structure returned by
3364         memberlist().
3366 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3368         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
3369         environment variable to 'all' in order to obtain debug output from
3370         non-util/ code.
3371         * util/i386/pc/grub-setup.c (main): Likewise.
3373 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3375         * disk/raid.c (grub_raid_scan_device): Check for
3376         `array->device[sb.this_disk.number]' rather than for
3377         `array->device[sb.this_disk.number]->name', since the latter is not
3378         guaranteed to be accessible.
3380 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3382         * disk/raid.c: Update copyright.
3383         * fs/cpio.c: Likewise.
3384         * include/grub/raid.h: Likewise.
3385         * loader/i386/pc/multiboot.c: Likewise.
3386         * util/hostfs.c: Likewise.
3388 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3390         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3391         to a grub_disk_t array.
3392         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3393         `device[x]'.
3394         (grub_raid_scan_device): Replace `device[x].name' accesses with
3395         `device[x]->name'.  Simplify initialization of `array->device[x]'.
3397 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3399         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3400         grub_dprintf() calls.
3401         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3402         error message.
3404 2008-02-07  Christian Franke  <franke@computer.org>
3406         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3407         instead of fseek and ftell to support large files.
3408         (grub_hostfs_read): Likewise.
3410 2008-02-07  Robert Millan  <rmh@aybabtu.com>
3412         Patch from Jeroen Dekkers.
3413         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3414         failure, since successfully reading all array members might not be
3415         required.
3417 2008-02-06  Robert Millan  <rmh@aybabtu.com>
3419         * util/grub-probe.c (probe): Simplify partmap probing (with the
3420         assumption that the first word up to the underscore equals to
3421         the module name).
3423 2008-02-06  Christian Franke  <franke@computer.org>
3425         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3426         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3427         last block of a cpio or tar stream.
3428         Check for "TRAILER!!!" instead of any empty data
3429         block to detect last block of a cpio stream.
3430         (grub_cpio_dir): Fix constness of variable np.
3431         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3432         cpio or tar trailer is detected.  This fixes a crash
3433         on open of a non existing file.
3435 2008-02-05  Bean  <bean123ch@gmail.com>
3437         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3438         address of entry.
3439         (grub_multiboot_load_elf64): Likewise.
3440         (grub_multiboot): Initialize mbi structure.
3442         * util/grub-fstest.c: Don't include unused header file script.h.
3444         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3445         of file.
3446         (grub_fstest_SOURCES): Likewise.
3448 2008-02-05  Robert Millan  <rmh@aybabtu.com>
3450         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3451         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3452         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3453         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3455         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3456         (translation_table): Replace hardcoded values with macros
3457         provided by `<grub/term.h>'.
3459         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3460         (keyboard_map): Correct/add a few values, with macros provided
3461         by `<grub/term.h>'.
3462         (keyboard_map_shift): Zero values that don't differ from their
3463         `keyboard_map' equivalents.
3464         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
3465         Discard the second scan code that is always sent by Caps lock.
3466         Only use `keyboard_map_shift' when it provides a non-zero value,
3467         otherwise fallback to `keyboard_map'.
3469 2008-02-04  Bean  <bean123ch@gmail.com>
3471         * Makefile.in (enable_grub_fstest): New variable.
3473         * conf/common.rmk (grub_fstest_init.lst): New rule.
3474         (grub_fstest_init.h): Likewise.
3475         (grub_fstest_init.c): Likewise.
3476         (util/grub-fstest.c_DEPENDENCIES): New variable.
3477         (grub_fstest_SOURCES): Likewise.
3479         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
3481         * util/grub-fstest.c: New file.
3483 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
3485         Make grub-setup handle a separate root device.
3487         * util/i386/pc/grub-setup.c (setup): Always open the root device,
3488         so that the root device can be compared with the destination
3489         device.
3490         When embedding the core image, if the root and destination devices
3491         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
3492         0xFF.
3493         When not embedding, set ROOT_DRIVE to 0xFF.
3495 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
3497         Add support for having a grub directory in a different drive. This
3498         is still only the data handling part.
3500         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
3501         (codestart): Save %dh in GRUB_ROOT_DRIVE.
3502         (grub_root_drive): New variable.
3504         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
3505         instead of GRUB_BOOT_DRIVE to construct a device name. Set
3506         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
3507         as it was.
3509         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
3511         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
3512         macro.
3513         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
3515         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
3516         is bogus, because PXE booting does not specify any drive
3517         correctly.
3519         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
3520         am not sure if this is really correct.
3522         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
3523         is always identical to the boot drive when booting from a CD.
3525         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
3526         longer.
3527         (root_drive): New variable.
3528         (real_start): Unconditionally set %dh to ROOT_DRIVE.
3529         (setup_sectors): Push %dx right after popping it, because %dh will
3530         be modified later.
3531         (copy_buffer): Restore %dx.
3533 2008-02-03  Robert Millan  <rmh@aybabtu.com>
3535         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
3536         use `cdboot.img' for cdrom images.
3538 2008-02-03  Robert Millan  <rmh@aybabtu.com>
3540         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
3541         only setup gfxterm when `font' command has succeeded.
3543 2008-02-03  Robert Millan  <rmh@aybabtu.com>
3545         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
3546         (grub_rescue_cmd_multiboot_loader)
3547         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
3549 2008-02-03  Pavel Roskin  <proski@gnu.org>
3551         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
3552         %edx and %esi from stack only after grub_gate_a20() is called.
3553         grub_gate_a20() clobbers %edx.
3555 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
3557         * configure.ac (AC_INIT): Bumped to 1.96.
3559         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
3560         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
3561         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
3562         video/readers/png.c.
3564 2008-02-03  Bean  <bean123ch@gmail.com>
3566         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
3567         (cdboot_img_SOURCES): New variable.
3568         (cdboot_img_ASFLAGS): New variable.
3569         (cdboot_img_LDFLAGS): New variable.
3571         * boot/i386/pc/cdboot.S: New file.
3573         * disk/i386/pc/biosdisk.c (cd_start): New variable.
3574         (cd_count): Likewise.
3575         (grub_biosdisk_get_drive): Add support for cd device.
3576         (grub_biosdisk_call_hook): Likewise.
3577         (grub_biosdisk_iterate): Likewise.
3578         (grub_biosdisk_open): Likewise.
3579         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
3580         (grub_biosdisk_rw): Support reading from cd device.
3581         (GRUB_MOD_INIT): Iterate cd devices.
3583         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
3584         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
3585         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
3587         * kern/i386/pc/init.c (make_install_device): Check for cd device.
3589 2008-02-02  Robert Millan  <rmh@aybabtu.com>
3591         * commands/read.c: New file.
3592         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
3593         (read_mod_SOURCES): New variable.
3594         (read_mod_CFLAGS): Likewise.
3595         (read_mod_LDFLAGS): Likewise.
3597 2008-02-02  Robert Millan  <rmh@aybabtu.com>
3599         * normal/main.c (grub_normal_execute): Check for `menu->size' when
3600         determining whether menu has to be displayed.
3602 2008-02-02  Marco Gerards  <marco@gnu.org>
3604         * bus/pci.c: New file.
3606         * include/grub/pci.h: Likewise.
3608         * include/grub/i386/pc/pci.h: Likewise.
3610         * commands/lspci.c: Likewise.
3612         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
3613         `lspci.mod'.
3614         (pci_mod_SOURCES): New variable.
3615         (pci_mod_CFLAGS): Likewise.
3616         (pci_mod_LDFLAGS): Likewise.
3617         (lspci_mod_SOURCES): Likewise.
3618         (lspci_mod_CFLAGS): Likewise.
3619         (lspci_mod_LDFLAGS): Likewise.
3621 2008-02-02  Bean  <bean123ch@gmail.com>
3623         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
3624         (grub_ufs_get_file_block): Fix indirect block calculation problem.
3626         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
3627         (grub_xfs_btree_node): New structure.
3628         (grub_xfs_btree_root): New structure.
3629         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
3630         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
3631         (GRUB_XFS_EXTENT_BLOCK): Likewise.
3632         (GRUB_XFS_EXTENT_SIZE): Likewise.
3633         (grub_xfs_read_block): Support btree format type.
3634         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
3635         Use directory block as basic unit.
3637         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
3639         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
3640         __attribute__ ((__regparm__ (1))).
3642 2008-02-01  Robert Millan  <rmh@aybabtu.com>
3644         Correct a mistake in previous commit.
3646         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
3647         top.
3648         (normal/command.c_DEPENDENCIES): New variable.
3650 2008-02-01  Robert Millan  <rmh@aybabtu.com>
3652         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
3653         top.
3654         (normal/command.c_DEPENDENCIES): New variable.
3655         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
3656         * conf/i386-ieee1275.rmk: Likewise.
3657         * conf/i386-linuxbios.rmk: Likewise.
3658         * conf/i386-pc.rmk: Likewise.
3659         * conf/sparc64-ieee1275.rmk: Likewise.
3660         * conf/powerpc-ieee1275.rmk: Likewise.
3661         (grub_emu_SOURCES): Add `fs/fshelp.c'.
3663         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
3665 2008-02-01  Robert Millan  <rmh@aybabtu.com>
3667         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
3668         call at beginning of function.
3670 2008-01-31  Pavel Roskin  <proski@gnu.org>
3672         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
3673         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
3674         (grub_mkrescue_SOURCES): Likewise.
3675         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
3677 2008-01-30  Robert Millan  <rmh@aybabtu.com>
3679         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
3680         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
3681         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
3682         (grub_probe_SOURCES): ... to here.
3684         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
3685         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
3686         * conf/i386-ieee1275.rmk: Likewise.
3687         * conf/i386-linuxbios.rmk: Likewise.
3688         * conf/powerpc-ieee1275.rmk: Likewise.
3690 2008-01-30  Tristan Gingold  <gingold@free.fr>
3692         * kern/rescue.c: Silently accept empty lines.
3694 2008-01-29  Bean  <bean123ch@gmail.com>
3696         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
3697         (real_code_2): Code cleanup and change comment style.
3698         (move_memory): Avoid using 32-bit address mode.
3700 2008-01-29  Bean  <bean123ch@gmail.com>
3702         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
3703         (png_mod_SOURCES): New variable.
3704         (png_mod_CFLAGS): Likewise.
3705         (png_mod_LDFLAGS): Likewise.
3707         * video/readers/png.c: New file.
3709 2008-01-28  Robert Millan  <rmh@aybabtu.com>
3711         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
3712         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
3713         `ifndef GRUB_MOD_GAP' hack.
3714         * util/elf/grub-mkimage.c (add_segments): Likewise.
3716 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3718         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
3719         `GRUB_MOD_GAP' for platforms in which it's not defined.
3720         * util/elf/grub-mkimage.c (add_segments): Likewise.
3722 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3724         Get grub-emu to build again (including parallel builds).
3726         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
3727         Split into ...
3728         (util/grub-emu.c_DEPENDENCIES): ... this, ...
3729         (normal/execute.c_DEPENDENCIES): ... this, ...
3730         (grub-emu_DEPENDENCIES): ... and this.
3732         * conf/i386-efi.rmk: Likewise.
3733         * conf/i386-linuxbios.rmk: Likewise.
3734         * conf/i386-ieee1275.rmk: Likewise.
3735         * conf/powerpc-ieee1275.rmk: Likewise.
3736         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
3738 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3740         * NEWS: Add a few items.
3742 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3744         Fix parallel builds with grub-emu.  Based on earlier commit for
3745         grub-probe and grub-setup.
3747         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3748         (util/grub-emu.c_DEPENDENCIES): ... this.
3749         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3750         (util/grub-emu.c_DEPENDENCIES): ... this.
3751         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3752         (util/grub-emu.c_DEPENDENCIES): ... this.
3753         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3754         (util/grub-emu.c_DEPENDENCIES): ... this.
3755         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3756         (util/grub-emu.c_DEPENDENCIES): ... this.
3758 2008-01-27  Pavel Roskin  <proski@gnu.org>
3760         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
3761         to create a gap between _end and the modules added to the image
3762         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
3763         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
3764         * util/elf/grub-mkimage.c (add_segments): Likewise.
3766 2008-01-26  Pavel Roskin  <proski@gnu.org>
3768         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
3769         just return an error.
3771 2008-01-26  Bean  <bean123ch@gmail.com>
3773         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
3774         (grub_reiserfs_get_item): Save offset of the next item.
3775         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
3777 2008-01-25  Robert Millan  <rmh@aybabtu.com>
3779         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
3780         make all filesystem sources appear together (possibly fixing omissions
3781         while at it).
3782         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3783         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3784         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3785         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3787         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
3788         add `kern/file.c'.
3789         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
3790         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
3791         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
3792         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
3794         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
3795         (probe): Add a sanity check to make sure of our ability to read
3796         requested files when probing for filesystem type.
3798         * genmk.rb: Update copyright year (2007).
3800         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
3801         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
3802         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
3803         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
3804         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
3805         : Remove function prototypes.
3807 2008-01-25  Robert Millan  <rmh@aybabtu.com>
3809         Revert my previous commits (based on wrong assumption of how grub_errno
3810         works).
3812         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
3813         * kern/file.c (grub_file_open): Likewise.
3815 2008-01-24  Pavel Roskin  <proski@gnu.org>
3817         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
3818         that hang if GRUB tries to setup colors.
3819         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
3820         colors for firmwares that don't support it.
3821         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
3822         Recognize Open Hack'Ware, set flags to work around its
3823         limitations.
3825 2008-01-24  Robert Millan  <rmh@aybabtu.com>
3827         * kern/file.c (grub_file_open): Do not account previous failures of
3828         unrelated functions when grub_errno is checked for.
3829         Reported by Oleg Strikov.
3831 2008-01-24  Bean  <bean123ch@gmail.com>
3833         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
3834         (grub_ufs_sblock): New member volume name.
3835         (grub_ufs_find_file): Fix string copy bug.
3836         (grub_ufs_label): Implement this function properly.
3838         * fs/hfs.c (grub_hfs_cnid_type): New enum.
3839         (grub_hfs_iterate_records): Use the correct file number for extents
3840         and catalog file. Fix problem in next index calculation.
3841         (grub_hfs_find_node): Replace recursive function call with loop.
3842         (grub_hfs_iterate_dir): Replace recursive function call with loop.
3844 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3846         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
3847         `<grub/symbol.h>' and `<grub/multiboot.h>'.
3848         (grub_multiboot2_real_boot): New function prototype.
3850         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
3851         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
3853         * kern/i386/ieee1275/init.c (grub_os_area_addr)
3854         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
3856 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3858         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
3859         #ifdef'ed out grub_printf().
3861 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3863         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
3864         grub_dprintf calls, since they make "debug=all" mode unusable.
3865         (grub_console_checkkey): Likewise.
3867 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3869         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3870         `term/i386/pc/at_keyboard.c'.
3871         (pkglib_MODULES): Add `serial.mod'.
3872         (serial_mod_SOURCES): New variable.
3873         (serial_mod_CFLAGS): Likewise.
3874         (serial_mod_LDFLAGS): Likewise.
3876         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
3877         `<grub/powerpc/ieee1275/console.h>'.
3878         (grub_keyboard_controller_init): New function prototype.
3879         (grub_console_checkkey): Likewise.
3880         (grub_console_getkey): Likewise.
3882         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
3883         keyboard on i386.
3885         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
3886         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
3888 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3890         * kern/i386/pc/init.c (make_install_device): When memdisk image is
3891         present, "(memdisk)/boot/grub" becomes the default prefix.
3893         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
3894         a memdisk tarball with all the modules.  Add --overlay=DIR option that
3895         allows users to overlay additional files into the image.
3897 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3899         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
3900         and `machine/memory.h'.
3901         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
3902         (_multiboot_mod_SOURCES): New variable.
3903         (_multiboot_mod_CFLAGS): Likewise.
3904         (_multiboot_mod_LDFLAGS): Likewise.
3905         (multiboot_mod_SOURCES): Likewise.
3906         (multiboot_mod_CFLAGS): Likewise.
3907         (multiboot_mod_LDFLAGS): Likewise.
3909         * include/grub/i386/ieee1275/loader.h: New file.
3911         * include/grub/i386/ieee1275/machine.h: Likewise.
3913         * include/grub/i386/ieee1275/memory.h: Likewise.
3915         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
3916         variable declaration.
3917         (grub_os_area_size): Likewise.
3919         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
3920         (grub_lower_mem, grub_upper_mem): New variables.
3921         (grub_stop_floppy): New function (just to make
3922         grub_multiboot2_real_boot() happy).
3924         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
3925         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
3926         (grub_stop): New function.
3927         Include `"../realmode.S"' and `"../loader.S"'.
3929         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
3930         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
3932         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
3933         rely on grub_multiboot2_real_boot() for final boot.
3935 2008-01-22  Robert Millan  <rmh@aybabtu.com>
3937         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
3938         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
3939         device that doesn't look like an SD card.
3940         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
3941         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
3942         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
3943         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
3944         found.
3946 2008-01-22  Robert Millan  <rmh@aybabtu.com>
3948         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
3949         avoid claiming over our own code.
3951 2008-01-22  Bean  <bean123ch@gmail.com>
3953         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
3954         (jpeg_mod_SOURCES): New variable.
3955         (jpeg_mod_CFLAGS): Likewise.
3956         (jpeg_mod_LDFLAGS): Likewise.
3958         * video/readers/jpeg.c : New file.
3960 2008-01-22  Bean  <bean123ch@gmail.com>
3962         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
3963         there are no more items.
3965 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3967         * kern/mm.c (grub_mm_init_region): Improve debug message.
3969 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3971         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
3972         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
3973         address.
3974         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
3975         a C macro.
3976         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
3977         Indicates start of upper memory.
3978         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
3979         (generate_image): Abort when image size is big enough to corrupt
3980         upper memory.
3982         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
3983         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
3984         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3985         instead of hardcoding 0xA0000.
3986         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
3987         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3988         instead of hardcoding 0xA0000.
3990 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3992         * disk/memdisk.c (memdisk_size): New variable.
3993         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
3994         `memdisk_size'.
3995         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
3996         image to dynamic memory.
3997         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
3998         `memdisk_size'.  Free memdisk block.
4000 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4002         Fix detection of very small filesystems (like tar).
4004         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4005         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4006         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4007         a problem with this disk).
4009 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4011         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4012         on grub_biosdisk_rw_standard() error.
4014 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4016         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4017         recent changes.
4018         * kern/elf.c: Likewise.
4019         * kern/ieee1275/ieee1275.c: Likewise.
4020         * kern/powerpc/ieee1275/openfw.c: Likewise.
4021         * term/ieee1275/ofconsole.c: Likewise.
4023 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4025         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4027         * include/grub/kernel.h (grub_arch_memdisk_addr)
4028         (grub_arch_memdisk_size): Moved from here ...
4030         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4031         (grub_arch_memdisk_size): ... to here.
4033 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4035         Mostly based on bugfix from Bean.
4037         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4038         attribute with hook() parameter.
4039         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4040         declaration.
4041         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4042         attribute with hook() parameter.
4043         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4044         declaration.
4046 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4048         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4049         (pkglib_MODULES): Add `memdisk.mod'.
4050         (memdisk_mod_SOURCES): New variable.
4051         (memdisk_mod_CFLAGS): Likewise.
4052         (memdisk_mod_LDFLAGS): Likewise.
4054         * disk/memdisk.c: New file.
4056         * include/grub/disk.h (grub_disk_dev_id): Add
4057         `GRUB_DISK_DEVICE_MEMDISK_ID'.
4059         * include/grub/i386/pc/kernel.h
4060         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4061         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4062         (grub_kernel_image_size): New variable declaration.
4063         (grub_total_module_size): Likewise.
4064         (grub_memdisk_image_size): Likewise.
4066         * include/grub/i386/pc/memory.h
4067         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4069         * include/grub/kernel.h: Include `<grub/symbol.h>'.
4070         (grub_arch_memdisk_addr): New variable declaration.
4071         (grub_arch_memdisk_size): Likewise.
4073         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4074         (grub_arch_memdisk_size): Likewise.
4076         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4077         (codestart): Replace hardcoded `0x100000' with
4078         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4080         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4081         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
4082         not NULL, append the contents of the file it refers to, at the end of
4083         the compressed kernel image.  Initialize `grub_memdisk_image_size'
4084         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4085         (options): Add "memdisk"|'m' option.
4086         (main): Parse --memdisk|-m option, and pass user-provided path as
4087         parameter to generate_image().
4089 2008-01-20  Robert Millan  <rmh@aybabtu.com>
4091         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4092         grub_dprintf() calls from here ...
4093         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4095 2008-01-20  Robert Millan  <rmh@aybabtu.com>
4097         Fix detection of "real mode" when /options/real-mode? doesn't exist.
4099         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4100         declaration.
4101         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4102         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4103         `GRUB_IEEE1275_FLAG_REAL_MODE'.
4104         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4105         property).
4106         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4107         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4109 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4111         Get rid of confusing function (superseded by
4112         `grub_ieee1275_get_integer_property')
4113         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4114         prototype.
4115         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4116         function.
4117         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4118         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4119         in native endianness from grub_ieee1275_get_integer_property().
4121 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4123         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4124         command after "shut-down", since implementations differ on which
4125         the command for halt is.
4127 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4129         * include/grub/i386/linuxbios/console.h: Add header protection.
4130         (grub_keyboard_controller_init): New function prototype.
4131         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4132         (KEYBOARD_COMMAND_READ): Likewise.
4133         (KEYBOARD_COMMAND_WRITE): Likewise.
4134         (KEYBOARD_SCANCODE_SET1): Likewise.
4135         (grub_keyboard_controller_write): New function.
4136         (grub_keyboard_controller_read): Likewise.
4137         (grub_keyboard_controller_init): Likewise.
4139         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4140         (grub_console_init): On coreboot/LinuxBIOS, call
4141         grub_keyboard_controller_init().
4143 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4145         PowerPC changes provided by Pavel Roskin.
4147         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4148         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4149         don't rely on cmain() doing it.
4150         * kern/i386/ieee1275/startup.S (_start): Store %eax in
4151         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4153 2008-01-16  Robert Millan  <rmh@aybabtu.com>
4155         * include/grub/i386/linuxbios/memory.h
4156         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4157         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4158         receive `table_header' as argument.  Instead, probe for it in the
4159         known memory ranges where it can be present.
4160         (grub_available_iterate): Do not pass a fixed `table_header' address
4161         to grub_linuxbios_table_iterate().
4163 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4165         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4166         * conf/i386-ieee1275.rmk: New file.
4167         * include/grub/i386/ieee1275/console.h: Likewise.
4168         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4169         * include/grub/i386/ieee1275/kernel.h: Likewise.
4170         * include/grub/i386/ieee1275/time.h: Likewise.
4171         * kern/i386/ieee1275/init.c: Likewise.
4172         * kern/i386/ieee1275/startup.S: Likewise.
4174 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4176         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4177         when pointers are 32-bit (but still do set it to one when they are
4178         64-bit).
4180 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4182         * include/grub/ieee1275/ieee1275.h
4183         (grub_ieee1275_get_integer_property): New function prototype.
4185         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4186         (grub_ieee1275_get_integer_property): New function.  Wraps around
4187         grub_ieee1275_get_property() to handle endianness.
4189         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4190         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4191         where appropriate.
4192         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4193         (grub_map): Likewise.
4194         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4196 2008-01-15  Bean  <bean123ch@gmail.com>
4198         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4199         (grub_script_execute_cmdline): Reset grub_errno.
4201         * normal/main.c (read_config_file): Reset grub_errno.
4203         * normal/parse.y (script_init): New.
4204         (script): Move function and menuentry here.
4205         (delimiter): New.
4206         (command): Add delimiter at the end of command.
4207         (commands): Adjust to match the new command.
4208         (commandblock): Remove grub_script_lexer_record_start.
4209         (menuentry): Add grub_script_lexer_record_start, use the new commands.
4210         (if): Use the new commands.
4212         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4214 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4216         * normal/menu.c (run_menu): Move timeout message from here ...
4217         (print_timeout): ... to here.
4218         (run_menu): Use print_timeout() once during initial draw to print
4219         the whole message, and again in every clock tick to update only
4220         the number of seconds.
4222 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4224         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4225         actual size of `available' from grub_ieee1275_get_property(), and
4226         restrict parsing to that bound.
4228 2008-01-15  Christian Franke  <franke@computer.org>
4230         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4231         (argp_program_version): Remove variable.
4232         (argp_program_bug_address): Likewise.
4233         (options): Convert from struct argp_option to struct option.
4234         (struct arguments): Remove.
4235         (parse_opt): Remove.
4236         (usage): New function.
4237         (main): Replace struct args members by simple variables.
4238         Replace argp_parse() by getopt_long().
4239         Add switch to evaluate options.
4240         Add missing "(...)" around root_dev in prefix string.
4242 2008-01-14  Robert Millan  <rmh@aybabtu.com>
4244         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4245         for grub_ieee1275_exit(), in order to improve portability.
4247 2008-01-14  Robert Millan  <rmh@aybabtu.com>
4249         * util/grub.d/10_linux.in (prefix): Define.
4250         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
4252 2008-01-13  Pavel Roskin  <proski@gnu.org>
4254         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4255         grub_errno if no errors have been detected.
4257 2008-01-12  Robert Millan  <rmh@aybabtu.com>
4259         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4260         (grub_util_get_dev_abstraction): New function prototype.
4262         * util/getroot.c: Include `<grub/util/getroot.h>'
4263         (grub_util_get_grub_dev): Move detection of abstraction type to ...
4264         (grub_util_get_dev_abstraction): ... here (new function).
4266         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
4267         `PRINT_ABSTRACTION'.
4268         (probe): Probe for abstraction type when requested.
4269         (main): Understand `--target=abstraction'.
4271         * util/i386/efi/grub-install.in: Add abstraction module to core
4272         image when it is found to be necessary.
4273         * util/i386/pc/grub-install.in: Likewise.
4274         * util/powerpc/ieee1275/grub-install.in: Likewise.
4276         * util/update-grub_lib.in (font_path): Return system path without
4277         converting to GRUB path.
4278         * util/update-grub.in: Convert system path returned by font_path()
4279         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
4280         abstraction module is needed for loading fonts (if any).  Export
4281         that as `GRUB_PRELOAD_MODULES'.
4282         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4283         insmod commands).
4285 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
4287         Remove some unused code from reiserfs.
4289         * fs/reiserfs.c (struct grub_reiserfs_key)
4290         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4291         (struct grub_reiserfs_node_body): Removed.
4292         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4293         Likewise.
4294         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4295         Likewise.
4296         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4297         Likewise.
4298         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4299         Likewise.
4300         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4301         Likewise.
4302         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4303         Likewise.
4304         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4305         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4306         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4308 2008-01-10  Robert Millan  <rmh@aybabtu.com>
4310         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4311         Determines if a file is garbage left by packaging systems, etc.
4312         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4313         for processing /etc/grub.d scripts.
4314         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4315         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
4316         as a condition for processing Linux images.
4318 2008-01-10  Pavel Roskin  <proski@gnu.org>
4320         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
4321         to compile reiserfs.c on PowerPC.
4323 2008-01-10  Robert Millan  <rmh@aybabtu.com>
4325         * kern/device.c (grub_device_iterate): Do not abort device iteration
4326         when one of the devices cannot be opened.
4327         * kern/disk.c (grub_disk_open): Do not account previous failures of
4328         unrelated functions when grub_errno is checked for.
4330 2008-01-08  Robert Millan  <rmh@aybabtu.com>
4332         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4333         `! grub_linux_is_bzimage', change order of address comparison to make
4334         it more intuitive, and improve "too big zImage" error message.
4336 2008-01-08  Robert Millan  <rmh@aybabtu.com>
4338         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
4339         `$(update-grub_DATA)'.
4340         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
4341         targets.
4343 2008-01-07  Robert Millan  <rmh@aybabtu.com>
4345         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
4346         which instruction is modified by grub-setup during installation
4347         (since it wasn't obvious by only looking at this file).
4349 2008-01-07  Robert Millan  <rmh@aybabtu.com>
4351         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
4352         listing actual TODO items.
4354 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4356         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
4357         correctly.
4358         (grub_reiserfs_get_key_offset): Likewise.
4359         (grub_reiserfs_set_key_offset): Likewise.
4360         (grub_reiserfs_set_key_type): Likewise.
4361         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
4363         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
4364         better to remove the bitfield version completely.
4366 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4368         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
4369         allocated from the heap, due to the fshelp implementation.
4370         (grub_reiserfs_dir): Free NODE, due to the same reason.
4372 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4374         Mostly from Vincent Pelletier:
4376         * fs/reiserfs.c: New file.
4378         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
4379         (reiserfs_mod_SOURCES): New variable.
4380         (reiserfs_mod_CFLAGS): Likewise.
4381         (reiserfs_mod_LDFLAGS): Likewise.
4383         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
4384         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
4385         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
4386         normal/color.c.
4388 2008-01-06  Robert Millan  <rmh@aybabtu.com>
4390         * normal/color.c: Remove `<grub/env.h>'.
4392 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
4394         * include/grub/normal.h: Include <grub/env.h>.
4396 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4398         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4399         usage example with `(hd0,1)'.
4400         Reported by Samuel Thibault.
4402 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4404         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4405         (grub_linux_boot_zimage): Rename to ...
4406         (grub_linux_boot): ... this.
4407         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4408         (grub_linux_boot_zimage): Conditionalize zImage copy.
4410         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4411         (grub_linux_boot_bzimage): Remove prototype.
4412         (grub_linux_boot_zimage): Rename to ...
4413         (grub_linux_boot): ... this.
4415         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4416         (grub_linux_boot): Remove function.
4418 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4420         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4421         (grub_env_write_color_highlight): Likewise.
4422         (grub_wait_after_message): Likewise.
4424         * normal/color.c: New file.
4426         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4427         (normal_mod_DEPENDENCIES): Likewise.
4429         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4430         (normal_mod_DEPENDENCIES): Likewise.
4432         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4433         (normal_mod_DEPENDENCIES): Likewise.
4435         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4436         (normal_mod_DEPENDENCIES): Likewise.
4438         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4439         for waiting after a message is printed.
4440         * normal/main.c (read_config_file): Likewise.
4441         (grub_normal_init): Register grub_env_write_color_normal() and
4442         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
4443         `color_highlight' variables as global.
4445         * normal/menu.c (grub_wait_after_message): New function.
4446         (grub_color_menu_normal): New variable.  Replaces ...
4447         (GRUB_COLOR_MENU_NORMAL): ... this macro.
4448         (grub_color_menu_highlight): New variable.  Replaces ...
4449         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4450         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4451         `GRUB_TERM_COLOR_STANDARD'.
4452         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
4453         `normal_code' and `highlight_code' to `old_color_normal' and
4454         `old_color_highlight', respectively.
4455         (grub_menu_init_page): Update colors when drawing the menu, based on
4456         `menu_color_normal' and `menu_color_highlight' variables.
4457         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4458         a message is printed.
4460 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4462         * kern/env.c (grub_env_context_open): Propagate hooks for global
4463         variables to new context.
4465         * kern/main.c (grub_set_root_dev): Export `root' variable.
4467 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4469         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
4470         discs unconditionally, since udev and others have options to provide
4471         them.
4473 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4475         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
4477 2008-01-04  Christian Franke  <franke@computer.org>
4479         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
4480         of eisa_mmap.
4482 2008-01-03  Pavel Roskin  <proski@gnu.org>
4484         * kern/i386/linuxbios/init.c: Put "void" to all function
4485         declarations with no arguments.
4486         * kern/powerpc/ieee1275/init.c: Likewise.
4487         * term/i386/pc/at_keyboard.c: Likewise.
4488         * term/i386/pc/vga_text.c: Likewise.
4489         * util/grub-mkdevicemap.c: Likewise.
4491 2008-01-02  Robert Millan  <rmh@aybabtu.com>
4493         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
4494         message when loaded image is out of bounds.
4495         (grub_multiboot_load_elf64): Likewise.
4497 2008-01-02  Pavel Roskin  <proski@gnu.org>
4499         * util/grub.d/10_linux.in: Try version without ".old" when
4500         looking for initrd.  It's better to use initrd from the newer
4501         kernel of the same version than no initrd at all.
4503 2008-01-01  Robert Millan  <rmh@aybabtu.com>
4505         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
4507 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
4509         * include/grub/video.h: Added grub_video_unmap_color and
4510         grub_video_get_active_render_target.
4511         (grub_video_adapter): Added unmap_color and get_active_render_target.
4513         * video/video.c: Added grub_video_unmap_color and
4514         grub_video_get_active_render_target.
4515         (grub_video_get_info): Changed method to accept NULL pointer as an
4516         argument to allow detection of active video adapter.
4518         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
4519         grub_video_vbe_unmap_color_int.
4520         Added grub_video_vbe_unmap_color and
4521         grub_video_vbe_get_active_render_target.
4522         (grub_video_vbe_adapter): Added unmap_color and
4523         get_active_render_target.
4525         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
4526         with grub_video_vbe_unmap_color_int.
4528         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
4529         (DEFAULT_NORMAL_COLOR): Likewise.
4530         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
4531         (DEFAULT_FG_COLOR): Removed.
4532         (DEFAULT_BG_COLOR): Likewise.
4533         (DEFAULT_CURSOR_COLOR): Changed value.
4534         (grub_virtual_screen): Added standard_color_setting,
4535         normal_color_setting, highlight_color_setting and term_color.
4536         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
4537         (bitmap_width): Added.
4538         (bitmap_height): Likewise.
4539         (bitmap): Likewise.
4540         (set_term_color): Likewise.
4541         (grub_virtual_screen_setup): Changed to use new terminal coloring
4542         settings.
4543         (grub_gfxterm_init): Added init for bitmap.
4544         (grub_gfxterm_fini): Added destroy for bitmap.
4545         (redraw_screen_rect): Updated to use background bitmap and new
4546         terminal coloring.
4547         (scroll_up): Added optimization for case when there is no bitmap.
4548         (grub_gfxterm_cls): Fixed to use correct background color.
4549         (grub_virtual_screen_setcolorstate): Changed to use new terminal
4550         coloring.
4551         (grub_virtual_screen_setcolor): Likewise.
4552         (grub_virtual_screen_getcolor): Added.
4553         (grub_gfxterm_background_image_cmd): Likewise.
4554         (grub_video_term): Added setcolor and getcolor.
4555         (MOD_INIT): Added registration of background_image command.
4556         (MOD_TERM): Added unregistration for background_image command.
4558 2007-12-30  Pavel Roskin  <proski@gnu.org>
4560         * loader/multiboot_loader.c: Fix multiboot command
4561         unregistration.  Fix all typos in the word "multiboot".
4563 2007-12-29  Pavel Roskin  <proski@gnu.org>
4565         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
4566         support for initrd names used in Fedora.
4568 2007-12-26  Bean  <bean123ch@gmail.com>
4570         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
4571         (cpio_mod_SOURCES): New variable.
4572         (cpio_mod_CFLAGS): Likewise.
4573         (cpio_mod_LDFLAGS): Likewise.
4575         * fs/cpio.c: New file.
4577         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
4579         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4581         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4583         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4585 2007-12-25  Robert Millan  <rmh@aybabtu.com>
4587         * include/grub/term.h (struct grub_term): Add `getcolor' function.
4588         (grub_getcolor): New function.
4590         * kern/term.c (grub_getcolor): New function.
4591         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
4592         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
4593         (print_entry): Set normal and highlight colors to
4594         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
4595         respectively, before printing and restore them to old
4596         values afterwards.
4597         (grub_menu_init_page): Likewise.  Fill an additional colored space
4598         that would otherwise be left blank.
4600         * term/efi/console.c (grub_console_getcolor): New function.
4601         (struct grub_console_term.getcolor): New variable.
4602         * term/i386/pc/console.c (grub_console_getcolor): New function.
4603         (struct grub_console_term.getcolor): New variable.
4604         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
4605         (struct grub_console_term.getcolor): New variable.
4607         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
4608         (struct grub_console_term.setcolor): Remove variable.
4609         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
4610         (struct grub_console_term.setcolor): Remove variable.
4611         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
4612         (struct grub_console_term.setcolor): Remove variable.
4613         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
4614         (struct grub_console_term.setcolor): Remove variable.
4616 2007-12-25  Robert Millan  <rmh@aybabtu.com>
4618         * configure.ac: Search for possible unifont.hex locations, and
4619         define UNIFONT_HEX if found.
4621         * Makefile.in (UNIFONT_HEX): Define variable.
4622         (DATA): Rename to ...
4623         (PKGLIB): ... this.  Update all users.
4624         (PKGDATA): New variable.
4625         (pkgdata_IMAGES): Rename to ...
4626         (pkglib_IMAGES): ... this. Update all users.
4627         (pkgdata_MODULES): Rename to ...
4628         (pkglib_MODULES): ... this. Update all users.
4629         (pkgdata_PROGRAMS): Rename to ...
4630         (pkglib_PROGRAMS): ... this. Update all users.
4631         (pkgdata_DATA): Rename to ...
4632         (pkglib_DATA): ... this. Update all users.
4633         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
4634         (unicode.pff, ascii.pff): New rules.
4635         (all-local): Add `$(PKGDATA)' dependency.
4636         (install-local): Process `$(PKGDATA)'.
4638         * util/update-grub_lib.in (font_path): Search for *.pff files in
4639         a few more locations, including `${pkgdata}'.
4641 2007-12-23  Robert Millan  <rmh@aybabtu.com>
4643         Patch from Bean  <bean123ch@gmail.com>:
4644         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
4645         `size'.
4647 2007-12-21  Bean  <bean123ch@gmail.com>
4649         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
4650         (ntfscomp_mod_SOURCES): New variable.
4651         (ntfscomp_mod_CFLAGS): Likewise.
4652         (ntfscomp_mod_LDFLAGS): Likewise.
4654         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
4655         (grub_probe_SOURCES): Likewise.
4656         (grub_emu_SOURCES): Likewise.
4658         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4659         (grub_emu_SOURCES): Likewise.
4661         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4662         (grub_emu_SOURCES): Likewise.
4664         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4665         (grub_emu_SOURCES): Likewise.
4667         * fs/ntfs.c (grub_ntfscomp_func): New variable.
4668         (read_run_list): Renamed to grub_ntfs_read_run_list.
4669         (decomp_nextvcn): Moved to ntfscomp.c.
4670         (decomp_getch): Likewise.
4671         (decomp_get16): Likewise.
4672         (decomp_block): Likewise.
4673         (read_block): Likewise.
4674         (read_data): Partially moved to ntfscomp.c.
4675         (fixup): Change unsigned to grub_uint16_t.
4676         (read_mft): Change unsigned long to grub_uint32_t.
4677         (read_attr): Likewise.
4678         (read_data): Likewise.
4679         (read_run_data): Likewise.
4680         (read_run_list): Likewise.
4681         (read_mft): Likewise.
4683         * fs/ntfscomp.c: New file.
4685         * include/grub/ntfs.h: New file.
4687 2007-12-16  Robert Millan  <rmh@aybabtu.com>
4689         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
4690         IDE disk check, since Linux is known to support 20 IDE disks.
4691         Reported by Colin Watson.
4693 2007-12-15  Bean  <bean123ch@gmail.com>
4695         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
4696         (lnxboot_img_SOURCES): New variable.
4697         (lnxboot_img_ASFLAGS): Likewise.
4698         (lnxboot_img_LDFLAGS): Likewise.
4700         * boot/i386/pc/lnxboot.S: New file.
4702 2007-11-24  Pavel Roskin  <proski@gnu.org>
4704         * configure.ac: Test if '--build-id=none' is supported by the
4705         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
4706         objcopy to generate incorrect binary files (binutils
4707         2.17.50.0.18-1 as shipped by Fedora 8).
4708         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
4709         linking, so that build ID doesn't break the test.
4711 2007-11-24  Pavel Roskin  <proski@gnu.org>
4713         * include/grub/i386/time.h: use "void" in the argument list
4714         of grub_cpu_idle().
4715         * include/grub/powerpc/time.h: Likewise.
4716         * include/grub/sparc64/time.h: Likewise.
4718 2007-11-18  Christian Franke  <franke@computer.org>
4720         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
4721         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
4722         This fixes the problem that function keys did not work in grub-emu.
4724 2007-11-18  Christian Franke  <franke@computer.org>
4726         * disk/host.c (grub_host_open): Remove attribute unused from
4727         name parameter. Add check for "host". This fixes the problem
4728         that grub-emu does not find partitions.
4730 2007-11-18  Christian Franke  <franke@computer.org>
4732         * util/hostfs.c (is_dir): New function.
4733         (grub_hostfs_dir):  Handle missing dirent.d_type case.
4734         (grub_hostfs_read): Add missing fseek().
4735         (grub_hostfs_label): Clear label pointer.  This fixes a crash
4736         of grub-emu on "ls (host)".
4738 2007-11-18  Christian Franke  <franke@computer.org>
4740         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
4741         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
4742         to 64 bit boundary by default.
4744 2007-11-18  Bean  <bean123ch@gmail.com>
4746         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
4747         (hexdump_mod_SOURCES): New variable.
4748         (hexdump_mod_CFLAGS): Likewise.
4749         (hexdump_mod_LDFLAGS): Likewise.
4751         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4753         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4755         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4757         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4759         * include/grub/hexdump.h: New file.
4761         * commands/hexdump.c: New file.
4763 2007-11-10  Robert Millan  <rmh@aybabtu.com>
4765         * commands/i386/pc/play.c (beep_off): Switch order of arguments
4766         in grub_outb() calls.
4767         (beep_on): Likewise.
4769 2007-11-10  Christian Franke  <franke@computer.org>
4771         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
4772         (grub_menu_run): Likewise.
4774 2007-11-10  Robert Millan  <rmh@aybabtu.com>
4776         * include/grub/i386/efi/machine.h: New file.
4777         * include/grub/i386/linuxbios/machine.h: Likewise.
4778         * include/grub/i386/pc/machine.h: Likewise.
4779         * include/grub/powerpc/ieee1275/machine.h: Likewise.
4780         * include/grub/sparc64/ieee1275/machine.h: Likewise.
4782         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
4783         (serial_hw_io_addr): New variable.
4784         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
4785         instead of `(unsigned short *) 0x400'.
4787 2007-11-10  Bean  <bean123ch@gmail.com>
4789         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
4791 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
4793         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
4794         (vga_mod_SOURCES): Added.
4795         (vga_mod_CFLAGS): Likewise.
4796         (vga_mod_LDFLAGS): Likewise.
4798         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
4799         grub_outb() calls.
4800         (set_map_mask): Likewise.
4801         (set_read_map): Likewise.
4802         (set_read_address): Likewise.
4803         (vga_font): Removed variable.
4804         (get_vga_glyph): Removed function.
4805         (invalidate_char): Likewise.
4806         (write_char): Changed to use grub_font_get_glyph() for font
4807         information.
4808         (grub_vga_putchar): Likewise.
4809         (grub_vga_getcharwidth): Likewise.
4811 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
4813         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
4814         flags.
4815         (pxeboot_img_LDFLAGS): Likewise.
4816         (diskboot_img_LDFLAGS): Likewise.
4817         (kernel_img_LDFLAGS): Likewise.
4819 2007-11-06  Robert Millan  <rmh@aybabtu.com>
4821         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
4822         in grub_outb() calls.
4823         (serial_hw_init): Likewise.
4825 2007-11-05  Robert Millan  <rmh@aybabtu.com>
4827         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
4828         spaces.  Skip non-regular files.
4830 2007-11-05  Robert Millan  <rmh@aybabtu.com>
4832         * kern/disk.c (grub_disk_firmware_fini)
4833         (grub_disk_firmware_is_tainted): New variables.
4835         * include/grub/disk.h (grub_disk_firmware_fini)
4836         (grub_disk_firmware_is_tainted): Likewise.
4838         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
4839         (grub_disk_biosdisk_fini): ... to here.
4840         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
4841         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
4842         is set.  Register grub_disk_biosdisk_fini() in
4843         `grub_disk_firmware_fini'.
4845         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
4846         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
4847         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
4848         to finish existing firmware disk interface.
4850         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
4851         (ata_mod_SOURCES): New variable.
4852         (ata_mod_CFLAGS): Likewise.
4853         (ata_mod_LDFLAGS): Likewise.
4855 2007-11-05  Robert Millan  <rmh@aybabtu.com>
4857         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
4858         (grub_ata_wait): Reimplement using grub_millisleep().
4860         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
4861         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
4863 2007-11-03  Marco Gerards  <marco@gnu.org>
4865         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
4866         (CRTC_ADDR_PORT): New macro.
4867         (CRTC_DATA_PORT): Likewise.
4868         (CRTC_CURSOR): Likewise.
4869         (CRTC_CURSOR_ADDR_HIGH): Likewise.
4870         (CRTC_CURSOR_ADDR_LOW): Likewise.
4871         (update_cursor): New function.
4872         (grub_console_real_putchar): Call `update_cursor'.
4873         (grub_console_gotoxy): Likewise.
4874         (grub_console_cls): Set the default color when clearing the
4875         screen.
4876         (grub_console_setcursor): Implemented.
4878 2007-11-03  Marco Gerards  <marco@gnu.org>
4880         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
4881         become activate.
4882         (grub_ata_pio_write): Likewise.
4884         (grub_atapi_identify): Wait after issuing an ATA command.
4885         (grub_atapi_packet): Likewise.
4886         (grub_ata_identify): Likewise.
4887         (grub_ata_readwrite): Likewise.
4889 2007-11-03  Marco Gerards  <marco@gnu.org>
4891         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
4892         (grub_ata_pio_write): Likewise.
4893         (grub_ata_readwrite): Use `grub_error', instead of
4894         returning `grub_errno'.
4896 2007-11-03  Marco Gerards  <marco@gnu.org>
4898         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
4899         grub_ata_pio_write once for every single sector, instead of for
4900         multiple sectors.
4902 2007-10-31  Robert Millan  <rmh@aybabtu.com>
4904         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
4906         * conf/i386-linuxbios.rmk: New file.
4908         * kern/i386/pc/hardware.c: Likewise.
4909         * term/i386/pc/at_keyboard.c: Likewise.
4910         * term/i386/pc/vga_text.c: Likewise.
4912         * include/grub/i386/linuxbios/boot.h: Likewise.
4913         * include/grub/i386/linuxbios/console.h: Likewise.
4914         * include/grub/i386/linuxbios/init.h: Likewise.
4915         * include/grub/i386/linuxbios/kernel.h: Likewise.
4916         * include/grub/i386/linuxbios/loader.h: Likewise.
4917         * include/grub/i386/linuxbios/memory.h: Likewise.
4918         * include/grub/i386/linuxbios/serial.h: Likewise.
4919         * include/grub/i386/linuxbios/time.h: Likewise.
4921         * kern/i386/linuxbios/init.c: Likewise.
4922         * kern/i386/linuxbios/startup.S: Likewise.
4923         * kern/i386/linuxbios/table.c: Likewise.
4925 2007-10-31  Marco Gerards  <marco@gnu.org>
4927         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
4928         (ata_mod_SOURCES): New variable.
4929         (ata_mod_CFLAGS): Likewise.
4930         (ata_mod_LDFLAGS): Likewise.
4932         * disk/ata.c: New file.
4934         * include/grub/disk.h (grub_disk_dev_id): Add
4935         `GRUB_DISK_DEV_ATA_ID'.
4937 2007-10-31  Robert Millan  <rmh@aybabtu.com>
4939         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
4940         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
4942         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
4943         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
4945         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
4946         `<grub/types.h>'.
4948         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
4950 2007-10-27  Robert Millan  <rmh@aybabtu.com>
4952         * include/grub/types.h (ULONG_MAX): Define macro.
4954 2007-10-22  Robert Millan  <rmh@aybabtu.com>
4956         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
4957         `"../realmode.S"'.
4958         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
4960 2007-10-22  Robert Millan  <rmh@aybabtu.com>
4962         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
4963         (pkgdata_MODULES): Add `biosdisk.mod'.
4964         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
4965         variables.
4967         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
4968         (grub_biosdisk_init): Replace with ...
4969         (GRUB_MOD_INIT(biosdisk)): ... this.
4970         (grub_biosdisk_fini): Replace with ...
4971         (GRUB_MOD_FINI(biosdisk)): ... this.
4973         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
4974         (grub_machine_init): Remove call to grub_biosdisk_init().
4975         (grub_machine_fini): Remove call to grub_machine_fini().
4977         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
4979 2007-10-22  Robert Millan  <rmh@aybabtu.com>
4981         * include/grub/time.h: New file.
4982         * include/grub/i386/time.h: Likewise.
4983         * include/grub/powerpc/time.h: Likewise.
4984         * include/grub/sparc64/time.h: Likewise.
4986         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
4987         instances to ...
4988         (KERNEL_MACHINE_TIME_HEADER): ... this.
4989         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4990         instances to ...
4991         (KERNEL_MACHINE_TIME_HEADER): ... this.
4992         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4993         instances to ...
4994         (KERNEL_MACHINE_TIME_HEADER): ... this.
4996         * kern/i386/efi/init.c: Include `<grub/time.h>'.
4997         (grub_millisleep): New function.
4998         * kern/i386/pc/init.c: Include `<grub/time.h>'.
4999         (grub_millisleep): New function.
5000         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5001         Remove `grub/machine/time.h' include.
5002         (grub_millisleep): New function.
5003         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5004         Remove `grub/machine/time.h' include.
5005         (grub_millisleep): New function.
5007         * include/grub/misc.h (grub_div_roundup): New function.
5009         * kern/misc.c: Include `<grub/time.h>'.
5010         (grub_millisleep_generic): New function.
5012         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5013         Add `time.h'.
5014         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5015         Add `time.h'.
5016         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5017         `machine/time.h'.  Add `time.h'.
5018         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5020 2007-10-21  Robert Millan  <rmh@aybabtu.com>
5022         * include/grub/misc.h (grub_max): New function.
5024 2007-10-21  Robert Millan  <rmh@aybabtu.com>
5026         * util/misc.c (grub_util_info): Call fflush() before returning.
5028 2007-10-20  Robert Millan  <rmh@aybabtu.com>
5030         * genmk.rb (Image): Copy `extra_flags' from here ...
5031         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
5033         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5034         to `argc' and `args' arguments.
5036 2007-10-17  Robert Millan  <rmh@aybabtu.com>
5038         * kern/i386/loader.S: New file.
5040         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5041         * kern/i386/loader.S (grub_linux_prot_size)... to here.
5042         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5043         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5044         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5045         * kern/i386/loader.S (grub_linux_real_addr)... to here.
5046         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5047         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5048         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5049         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5050         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5051         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5052         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5053         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5055         * kern/i386/realmode.S: New file.
5057         * kern/i386/pc/startup.S (protstack): Moved from here ...
5058         * kern/i386/realmode.S (protstack)... to here.
5059         * kern/i386/pc/startup.S (gdt): Moved from here ...
5060         * kern/i386/realmode.S (gdt)... to here.
5061         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5062         * kern/i386/realmode.S (prot_to_real)... to here.
5064         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5065         `kern/i386/realmode.S'.
5067 2007-10-17  Robert Millan  <rmh@aybabtu.com>
5069         * include/grub/i386/loader.h: New file.
5071         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5072         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5073         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5074         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5075         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5076         * include/grub/i386/loader.h (grub_linux_prot_size)
5077         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5078         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5079         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5080         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5082         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5084 2007-10-15  Robert Millan  <rmh@aybabtu.com>
5086         * normal/misc.c (grub_normal_print_device_info): Do not probe for
5087         filesystem when dev->disk is unset.
5088         Do probe for filesystem even when dev->disk->has_partitions is set.
5089         In case a filesystem is found, always report it.
5090         In case it isn't, if dev->disk->has_partitions is set, report that
5091         a partition table was found instead of reporting that no filesystem
5092         could be identified.
5094 2007-10-12  Robert Millan  <rmh@aybabtu.com>
5096         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5097         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5099         * include/grub/types.h (grub_host_to_target16): New macro.
5100         (grub_host_to_target32): Likewise.
5101         (grub_host_to_target64): Likewise.
5102         (grub_target_to_host16): Likewise.
5103         (grub_target_to_host32): Likewise.
5104         (grub_target_to_host64): Likewise.
5106         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5107         Renamed from to ...
5108         (GRUB_MOD_ALIGN): ...this.  Update all users.
5110         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5111         grub_host_to_target32.
5112         Replace grub_be_to_cpu32 with grub_target_to_host32.
5113         (load_modules): Likewise.
5114         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5115         Replace grub_be_to_cpu32 with grub_target_to_host32.
5116         Replace grub_cpu_to_be16 with grub_host_to_target16.
5117         Replace grub_cpu_to_be32 grub_host_to_target32.
5119 2007-10-12  Robert Millan  <rmh@aybabtu.com>
5121         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5122         * util/elf/grub-mkimage.c: ... here.
5124         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
5125         `util/powerpc/ieee1275/grub-mkimage.c'.
5127 2007-10-07  Robert Millan  <rmh@aybabtu.com>
5129         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5130         and make it easier to figure out.
5131         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5132         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5133         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5134         leave us with less than HEAP_MIN_SIZE total heap.
5135         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5137 2007-10-03  Robert Millan  <rmh@aybabtu.com>
5139         * include/grub/i386/io.h: New file.
5140         * commands/i386/pc/play.c (inb): Removed.
5141         (outb): Removed.
5142         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5143         with grub_outb().
5144         * term/i386/pc/serial.c  (inb): Removed.
5145         (outb): Removed.
5146         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5147         with grub_outb().
5148         * term/i386/pc/vga.c  (inb): Removed.
5149         (outb): Removed.
5150         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5151         with grub_outb().
5153 2007-10-02  Robert Millan  <rmh@aybabtu.com>
5155         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5156         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5157         Reported by Marcin Kurek.
5159 2007-09-07  Robert Millan  <rmh@aybabtu.com>
5161         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5162         SmartFirmware version updates (as released by Sven Luther), and avoid
5163         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5164         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5165         known broken.
5167 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5169         From Hitoshi Ozeki:
5170         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5171         when merging two regions.
5173 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5175         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5176         * normal/completion.c (grub_normal_do_completion): Likewise.
5177         Reported by Hitoshi Ozeki.
5179 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5181         Do not use devices at boot in chainloading.
5183         * loader/i386/pc/chainloader.c (boot_drive): New variable.
5184         (boot_part_addr): Likewise.
5185         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5186         with BOOT_DRIVE and BOOT_PART_ADDR.
5187         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5188         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5190 2007-08-29  Robert Millan  <rmh@aybabtu.com>
5192         Patch from Simon Peter <dn.tlp@gmx.net>:
5193         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5194         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5195         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
5196         util/i386/pc/grub-setup.c_DEPENDENCIES.
5197         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5198         util/grub-probe.c_DEPENDENCIES.
5199         * conf/powerpc-ieee1275.rmk: Likewise.
5201 2007-08-28  Robert Millan  <rmh@aybabtu.com>
5203         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
5204         to tell grub-mkdevicemap how to name devices.
5205         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5206         feature).
5208         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5209         util/i386/get_disk_name.c.
5210         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5211         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5212         util/ieee1275/get_disk_name.c.
5214         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5216         * DISTLIST: Add util/i386/get_disk_name.c and
5217         util/ieee1275/get_disk_name.c.
5219         * util/grub-mkdevicemap.c: Replace device naming logic with
5220         grub_util_get_disk_name() calls.
5222 2007-08-20  Robert Millan  <rmh@aybabtu.com>
5224         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5225         (so that it works for both plural and singular quantities).
5227 2007-08-05  Robert Millan  <rmh@aybabtu.com>
5229         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5230         so that [xz] isn't taken into account when determining order.
5232 2007-08-02  Marco Gerards  <marco@gnu.org>
5234         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5235         `include/multiboot2.h', `include/grub/elfload.h',
5236         `include/multiboot.h', `include/grub/multiboot.h',
5237         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5238         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5239         `kern/elf.c', `loader/multiboot_loader.c',
5240         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5241         `loader/i386/pc/multiboot2.c',
5242         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5243         `util/i386/pc/grub-mkrescue.in'.  Remove
5244         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5245         `include/grub/i386/pc/util/biosdisk.h' and
5246         `include/grub/powerpc/ieee1275/multiboot.h'.
5248 2007-08-02  Bean  <bean123ch@gmail.com>
5250         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5251         (ntfs_mod_SOURCES): New variable.
5252         (ntfs_mod_CFLAGS): Likewise.
5253         (ntfs_mod_LDFLAGS): Likewise.
5255         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5256         (grub_probe_SOURCES): Likewise.
5257         (grub_emu_SOURCES): Likewise.
5259         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5260         (grub_emu_SOURCES): Likewise.
5262         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5263         (grub_emu_SOURCES): Likewise.
5265         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5267         * fs/ntfs.c: New file.
5269 2007-08-02  Bean  <bean123ch@gmail.com>
5271         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5273         * file.h (grub_file): Likewise.
5275         * fshelp.h (grub_fshelp_read_file): Likewise.
5277         * util/i386/pc/grub-setup.c (setup): Likewise.
5278         (save_first_sector): Likewise.
5279         (save_blocklists): Likewise.
5281         * fs/affs.c (grub_affs_read_file): Likewise.
5283         * fs/ext2.c (grub_ext2_read_file): Likewise.
5285         * fs/fat.c (grub_fat_read_data): Likewise.
5287         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5289         * fs/hfs.c (grub_hfs_read_file): Likewise.
5291         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5293         * fs/jfs.c (grub_jfs_read_file): Likewise.
5295         * fs/minix.c (grub_minix_read_file): Likewise.
5297         * fs/sfs.c (grub_sfs_read_file): Likewise.
5299         * fs/ufs.c (grub_ufs_read_file): Likewise.
5301         * fs/xfs.c (grub_xfs_read_file): Likewise.
5303         * command/blocklist.c (read_blocklist): Likewise.
5304         (print_blocklist): Likewise.
5306 2007-08-02  Marco Gerards  <marco@gnu.org>
5308         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5309         `util/hostfs.c'.
5311         * disk/host.c: New file.
5313         * util/hostfs.c: Likewise.
5315         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5316         return `GRUB_ERR_BAD_FS'.
5317         * fs/sfs.c (grub_sfs_mount): Likewise.
5318         * fs/xfs.c (grub_xfs_mount): Likewise.
5320         * include/grub/disk.h (enum grub_disk_dev_id): Add
5321         `GRUB_DISK_DEVICE_HOST_ID'.
5323         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
5325 2007-07-24  Jerone Young  <jerone@gmail.com>
5327         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
5328         modules for compilation.
5329         * conf/powerpc-ieee1275.rmk: Likewise.
5331         * include/multiboot.h: Move multiboot definitions to one file. Rename
5332         many definitions to not get grub specific.
5333         * include/multiboot2.h: Create header with multiboot 2 definitions.
5334         * include/grub/multiboot.h: Header for grub specific function
5335         prototypes and definitions.
5336         * include/grub/multiboot2.h: Likewise.
5337         * include/grub/multiboot_loader.h: Likewise.
5338         * include/grub/i386/pc/multiboot.h: Removed.
5339         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
5341         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
5342         and 2 to allow for one multiboot and module commands.
5343         * loader/multiboot2.c: Add multiboot2 functionality.
5344         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
5345         and definition names.
5346         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
5347         2 functions.
5348         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
5349         ieee1275 specific multiboot2 code.
5351         * kern/i386/pc/startup.S: Change headers and definition names for
5352         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
5354 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5356         * geninitheader.sh: Process file specified in first parameter rather
5357         than hardcoding grub_modules_init.lst.
5358         * geninit.sh: Likewise.  Also, construct header name dynamically rather
5359         than hardcoding grub_modules_init.h.
5361         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
5362         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
5363         grub_probe_init.[ch] and grub_setup_init.[ch].
5365         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
5366         grub_modules_init.h with grub_emu_init.h.
5367         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
5368         grub_probe_init.[ch] files.
5369         * conf/i386-efi.rmk: Likewise.
5370         * conf/i386-pc.rmk: Likewise.
5371         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
5372         grub_setup_init.[ch] files.
5374         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
5375         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
5376         to initialize modules rather than a list of hardcoded functions.
5377         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
5378         grub_init_all() to initialize modules rather than a list of hardcoded
5379         functions.
5381 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5383         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
5384         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
5386 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5388         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5389         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5390         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5391         flag when running on SmartFirmware.
5392         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5393         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5394         was set.
5396         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5397         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5398         rather than decreasing it.
5400         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5401         there's not enough space to do it, fail in the same way as when it
5402         can't be done because there are no partitions.
5404         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5405         when nvsetenv failed.
5407 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
5409         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5410         because this rule is automatically generated.
5411         (grub-mkrescue): Removed for the same reason as above.
5413 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
5415         Migrate to GNU General Public License Version 3.
5417         * COPYING: Replaced with the plain text version of GPLv3.
5419         * config.guess: Updated from gnulib.
5420         * config.sub: Likewise.
5422         * geninit.sh: Output a GPLv3 copyright notice.
5423         * geninitheader.sh: Likewise.
5424         * genmodsrc.sh: Likewise.
5425         * gensymlist.sh.in: Likewise.
5427         * boot/i386/pc/boot.S: Upgraded to GPLv3.
5428         * boot/i386/pc/diskboot.S: Likewise.
5429         * boot/i386/pc/pxeboot.S: Likewise.
5430         * commands/blocklist.c: Likewise.
5431         * commands/boot.c: Likewise.
5432         * commands/cat.c: Likewise.
5433         * commands/cmp.c: Likewise.
5434         * commands/configfile.c: Likewise.
5435         * commands/echo.c: Likewise.
5436         * commands/help.c: Likewise.
5437         * commands/ls.c: Likewise.
5438         * commands/search.c: Likewise.
5439         * commands/terminal.c: Likewise.
5440         * commands/test.c: Likewise.
5441         * commands/videotest.c: Likewise.
5442         * commands/i386/cpuid.c: Likewise.
5443         * commands/i386/pc/halt.c: Likewise.
5444         * commands/i386/pc/play.c: Likewise.
5445         * commands/i386/pc/reboot.c: Likewise.
5446         * commands/i386/pc/vbeinfo.c: Likewise.
5447         * commands/i386/pc/vbetest.c: Likewise.
5448         * commands/ieee1275/halt.c: Likewise.
5449         * commands/ieee1275/reboot.c: Likewise.
5450         * commands/ieee1275/suspend.c: Likewise.
5451         * disk/loopback.c: Likewise.
5452         * disk/lvm.c: Likewise.
5453         * disk/raid.c: Likewise.
5454         * disk/efi/efidisk.c: Likewise.
5455         * disk/i386/pc/biosdisk.c: Likewise.
5456         * disk/ieee1275/ofdisk.c: Likewise.
5457         * font/manager.c: Likewise.
5458         * fs/affs.c: Likewise.
5459         * fs/ext2.c: Likewise.
5460         * fs/fat.c: Likewise.
5461         * fs/fshelp.c: Likewise.
5462         * fs/hfs.c: Likewise.
5463         * fs/hfsplus.c: Likewise.
5464         * fs/iso9660.c: Likewise.
5465         * fs/jfs.c: Likewise.
5466         * fs/minix.c: Likewise.
5467         * fs/sfs.c: Likewise.
5468         * fs/ufs.c: Likewise.
5469         * fs/xfs.c: Likewise.
5470         * hello/hello.c: Likewise.
5471         * include/grub/acorn_filecore.h: Likewise.
5472         * include/grub/arg.h: Likewise.
5473         * include/grub/bitmap.h: Likewise.
5474         * include/grub/boot.h: Likewise.
5475         * include/grub/cache.h: Likewise.
5476         * include/grub/device.h: Likewise.
5477         * include/grub/disk.h: Likewise.
5478         * include/grub/dl.h: Likewise.
5479         * include/grub/elfload.h: Likewise.
5480         * include/grub/env.h: Likewise.
5481         * include/grub/err.h: Likewise.
5482         * include/grub/file.h: Likewise.
5483         * include/grub/font.h: Likewise.
5484         * include/grub/fs.h: Likewise.
5485         * include/grub/fshelp.h: Likewise.
5486         * include/grub/gzio.h: Likewise.
5487         * include/grub/hfs.h: Likewise.
5488         * include/grub/kernel.h: Likewise.
5489         * include/grub/loader.h: Likewise.
5490         * include/grub/lvm.h: Likewise.
5491         * include/grub/misc.h: Likewise.
5492         * include/grub/mm.h: Likewise.
5493         * include/grub/net.h: Likewise.
5494         * include/grub/normal.h: Likewise.
5495         * include/grub/parser.h: Likewise.
5496         * include/grub/partition.h: Likewise.
5497         * include/grub/pc_partition.h: Likewise.
5498         * include/grub/raid.h: Likewise.
5499         * include/grub/rescue.h: Likewise.
5500         * include/grub/script.h: Likewise.
5501         * include/grub/setjmp.h: Likewise.
5502         * include/grub/symbol.h: Likewise.
5503         * include/grub/term.h: Likewise.
5504         * include/grub/terminfo.h: Likewise.
5505         * include/grub/tparm.h: Likewise.
5506         * include/grub/types.h: Likewise.
5507         * include/grub/video.h: Likewise.
5508         * include/grub/efi/api.h: Likewise.
5509         * include/grub/efi/chainloader.h: Likewise.
5510         * include/grub/efi/console.h: Likewise.
5511         * include/grub/efi/console_control.h: Likewise.
5512         * include/grub/efi/disk.h: Likewise.
5513         * include/grub/efi/efi.h: Likewise.
5514         * include/grub/efi/pe32.h: Likewise.
5515         * include/grub/efi/time.h: Likewise.
5516         * include/grub/i386/linux.h: Likewise.
5517         * include/grub/i386/setjmp.h: Likewise.
5518         * include/grub/i386/types.h: Likewise.
5519         * include/grub/i386/efi/kernel.h: Likewise.
5520         * include/grub/i386/efi/loader.h: Likewise.
5521         * include/grub/i386/efi/time.h: Likewise.
5522         * include/grub/i386/pc/biosdisk.h: Likewise.
5523         * include/grub/i386/pc/boot.h: Likewise.
5524         * include/grub/i386/pc/chainloader.h: Likewise.
5525         * include/grub/i386/pc/console.h: Likewise.
5526         * include/grub/i386/pc/init.h: Likewise.
5527         * include/grub/i386/pc/kernel.h: Likewise.
5528         * include/grub/i386/pc/loader.h: Likewise.
5529         * include/grub/i386/pc/memory.h: Likewise.
5530         * include/grub/i386/pc/multiboot.h: Likewise.
5531         * include/grub/i386/pc/serial.h: Likewise.
5532         * include/grub/i386/pc/time.h: Likewise.
5533         * include/grub/i386/pc/vbe.h: Likewise.
5534         * include/grub/i386/pc/vbeblit.h: Likewise.
5535         * include/grub/i386/pc/vbefill.h: Likewise.
5536         * include/grub/i386/pc/vbeutil.h: Likewise.
5537         * include/grub/i386/pc/vga.h: Likewise.
5538         * include/grub/ieee1275/ieee1275.h: Likewise.
5539         * include/grub/ieee1275/ofdisk.h: Likewise.
5540         * include/grub/powerpc/libgcc.h: Likewise.
5541         * include/grub/powerpc/setjmp.h: Likewise.
5542         * include/grub/powerpc/types.h: Likewise.
5543         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
5544         * include/grub/powerpc/ieee1275/console.h: Likewise.
5545         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
5546         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
5547         * include/grub/powerpc/ieee1275/loader.h: Likewise.
5548         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
5549         * include/grub/powerpc/ieee1275/time.h: Likewise.
5550         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
5551         * include/grub/sparc64/libgcc.h: Likewise.
5552         * include/grub/sparc64/setjmp.h: Likewise.
5553         * include/grub/sparc64/types.h: Likewise.
5554         * include/grub/sparc64/ieee1275/console.h: Likewise.
5555         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5556         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5557         * include/grub/sparc64/ieee1275/time.h: Likewise.
5558         * include/grub/util/biosdisk.h: Likewise.
5559         * include/grub/util/getroot.h: Likewise.
5560         * include/grub/util/lvm.h: Likewise.
5561         * include/grub/util/misc.h: Likewise.
5562         * include/grub/util/raid.h: Likewise.
5563         * include/grub/util/resolve.h: Likewise.
5564         * io/gzio.c: Likewise.
5565         * kern/device.c: Likewise.
5566         * kern/disk.c: Likewise.
5567         * kern/dl.c: Likewise.
5568         * kern/elf.c: Likewise.
5569         * kern/env.c: Likewise.
5570         * kern/err.c: Likewise.
5571         * kern/file.c: Likewise.
5572         * kern/fs.c: Likewise.
5573         * kern/loader.c: Likewise.
5574         * kern/main.c: Likewise.
5575         * kern/misc.c: Likewise.
5576         * kern/mm.c: Likewise.
5577         * kern/parser.c: Likewise.
5578         * kern/partition.c: Likewise.
5579         * kern/rescue.c: Likewise.
5580         * kern/term.c: Likewise.
5581         * kern/efi/efi.c: Likewise.
5582         * kern/efi/init.c: Likewise.
5583         * kern/efi/mm.c: Likewise.
5584         * kern/i386/dl.c: Likewise.
5585         * kern/i386/efi/init.c: Likewise.
5586         * kern/i386/efi/startup.S: Likewise.
5587         * kern/i386/pc/init.c: Likewise.
5588         * kern/i386/pc/lzo1x.S: Likewise.
5589         * kern/i386/pc/startup.S: Likewise.
5590         * kern/ieee1275/ieee1275.c: Likewise.
5591         * kern/powerpc/cache.S: Likewise.
5592         * kern/powerpc/dl.c: Likewise.
5593         * kern/powerpc/ieee1275/cmain.c: Likewise.
5594         * kern/powerpc/ieee1275/crt0.S: Likewise.
5595         * kern/powerpc/ieee1275/init.c: Likewise.
5596         * kern/powerpc/ieee1275/openfw.c: Likewise.
5597         * kern/sparc64/cache.S: Likewise.
5598         * kern/sparc64/dl.c: Likewise.
5599         * kern/sparc64/ieee1275/init.c: Likewise.
5600         * kern/sparc64/ieee1275/openfw.c: Likewise.
5601         * loader/efi/chainloader.c: Likewise.
5602         * loader/efi/chainloader_normal.c: Likewise.
5603         * loader/i386/efi/linux.c: Likewise.
5604         * loader/i386/efi/linux_normal.c: Likewise.
5605         * loader/i386/pc/chainloader.c: Likewise.
5606         * loader/i386/pc/chainloader_normal.c: Likewise.
5607         * loader/i386/pc/linux.c: Likewise.
5608         * loader/i386/pc/linux_normal.c: Likewise.
5609         * loader/i386/pc/multiboot.c: Likewise.
5610         * loader/i386/pc/multiboot_normal.c: Likewise.
5611         * loader/powerpc/ieee1275/linux.c: Likewise.
5612         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5613         * normal/arg.c: Likewise.
5614         * normal/cmdline.c: Likewise.
5615         * normal/command.c: Likewise.
5616         * normal/completion.c: Likewise.
5617         * normal/execute.c: Likewise.
5618         * normal/function.c: Likewise.
5619         * normal/lexer.c: Likewise.
5620         * normal/main.c: Likewise.
5621         * normal/menu.c: Likewise.
5622         * normal/menu_entry.c: Likewise.
5623         * normal/misc.c: Likewise.
5624         * normal/parser.y: Likewise.
5625         * normal/script.c: Likewise.
5626         * normal/i386/setjmp.S: Likewise.
5627         * normal/powerpc/setjmp.S: Likewise.
5628         * normal/sparc64/setjmp.S: Likewise.
5629         * partmap/acorn.c: Likewise.
5630         * partmap/amiga.c: Likewise.
5631         * partmap/apple.c: Likewise.
5632         * partmap/gpt.c: Likewise.
5633         * partmap/pc.c: Likewise.
5634         * partmap/sun.c: Likewise.
5635         * term/gfxterm.c: Likewise.
5636         * term/terminfo.c: Likewise.
5637         * term/efi/console.c: Likewise.
5638         * term/i386/pc/console.c: Likewise.
5639         * term/i386/pc/serial.c: Likewise.
5640         * term/i386/pc/vesafb.c: Likewise.
5641         * term/i386/pc/vga.c: Likewise.
5642         * term/ieee1275/ofconsole.c: Likewise.
5643         * util/biosdisk.c: Likewise.
5644         * util/console.c: Likewise.
5645         * util/genmoddep.c: Likewise.
5646         * util/getroot.c: Likewise.
5647         * util/grub-emu.c: Likewise.
5648         * util/grub-mkdevicemap.c: Likewise.
5649         * util/grub-probe.c: Likewise.
5650         * util/lvm.c: Likewise.
5651         * util/misc.c: Likewise.
5652         * util/raid.c: Likewise.
5653         * util/resolve.c: Likewise.
5654         * util/update-grub.in: Likewise.
5655         * util/update-grub_lib.in: Likewise.
5656         * util/grub.d/00_header.in: Likewise.
5657         * util/grub.d/10_hurd.in: Likewise.
5658         * util/grub.d/10_linux.in: Likewise.
5659         * util/i386/efi/grub-install.in: Likewise.
5660         * util/i386/efi/grub-mkimage.c: Likewise.
5661         * util/i386/pc/grub-install.in: Likewise.
5662         * util/i386/pc/grub-mkimage.c: Likewise.
5663         * util/i386/pc/grub-mkrescue.in: Likewise.
5664         * util/i386/pc/grub-setup.c: Likewise.
5665         * util/i386/pc/misc.c: Likewise.
5666         * util/powerpc/ieee1275/grub-install.in: Likewise.
5667         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
5668         * util/powerpc/ieee1275/misc.c: Likewise.
5669         * video/bitmap.c: Likewise.
5670         * video/video.c: Likewise.
5671         * video/i386/pc/vbe.c: Likewise.
5672         * video/i386/pc/vbeblit.c: Likewise.
5673         * video/i386/pc/vbefill.c: Likewise.
5674         * video/i386/pc/vbeutil.c: Likewise.
5675         * video/readers/tga.c: Likewise.
5677 2007-07-02  Robert Millan  <rmh@aybabtu.com>
5679         * conf/i386-efi.rmk: Replace obsolete reference to
5680         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
5681         with util/getroot.c.
5682         * conf/powerpc-ieee1275.rmk: Likewise.
5683         * conf/sparc64-ieee1275.rmk: Likewise.
5685         * util/grub-emu.c (main): Fix unchecked pointer handling.
5687 2007-07-02  Robert Millan  <rmh@aybabtu.com>
5689         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
5690         invocation to fail, in order to support partition-less media.
5692         * util/i386/pc/grub-install.in: Likewise.
5694         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
5695         which fs or partmap modules are needed (akin to its sister scripts).
5697         Also use grub-probe to get rid of unportable /proc/mounts check.
5699         Print the same informational message that the other scripts do, before
5700         exiting.
5702 2007-06-23  Robert Millan  <rmh@aybabtu.com>
5704         * util/update-grub_lib.in (font_path): New function.  Determine whether
5705         a font file can be found and, if so, echo the GRUB path to it.
5707         * util/update-grub.in: Handle multiple terminals depending on user
5708         input, platform availability and font file presence.  Propagate
5709         variables of our findings to /etc/grub.d/ children.
5711         * util/grub.d/00_header.in: Handle multiple terminals, based on
5712         environment setup by update-grub.
5714 2007-06-23  Robert Millan  <rmh@aybabtu.com>
5716         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
5718 2007-06-21  Robert Millan  <rmh@aybabtu.com>
5720         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
5721         indicate end of data section in kernel image.
5722         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
5723         GRUB_KERNEL_MACHINE_DATA_END.
5725         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
5726         space for it.
5727         * kern/i386/efi/startup.S: Likewise.
5729         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
5730         during image generation.  Implement --prefix option to override this
5731         patch.
5732         * util/i386/efi/grub-mkimage.c: Likewise.
5734         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
5735         code to make path relative to its root into a separate function.
5737         * util/i386/pc/grub-install.in: Use newly provided
5738         make_system_path_relative_to_its_root() to convert ${grubdir}, then
5739         pass the result to grub-install --prefix.
5741 2007-06-13  Robert Millan  <rmh@aybabtu.com>
5743         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
5744         DEFAULT_DEVICE_MAP.
5745         * util/grub-emu.c: Use above definitions from misc.h instead of
5746         defining them.
5747         * util/grub-mkdevicemap.c: Likewise.
5748         * util/i386/pc/grub-setup.c: Likewise.
5749         * util/grub-probe.c: Likewise.
5750         (probe): Abort with grub_util_error() when either
5751         grub_guess_root_device or grub_util_get_grub_dev fails.
5753 2007-06-12  Robert Millan  <rmh@aybabtu.com>
5755         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
5756         "pager" assignment.
5757         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
5758         "pcdata".
5759         * util/grub-probe.c (probe): Likewise for "drive_name".
5761 2007-06-11  Robert Millan  <rmh@aybabtu.com>
5763         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
5764         not just the cdrom one.
5766 2007-06-11  Robert Millan  <rmh@aybabtu.com>
5768         * util/i386/pc/grub-mkrescue.in: Add "set -e".
5769         Add --pkglibdir=DIR option to override pkglibdir.
5770         Mention --image-type=TYPE in help output.
5771         Fix --grub-mkimage (it was a no-op).
5772         Abort gracefully when no parameter is given.
5774 2007-06-11  Robert Millan  <rmh@aybabtu.com>
5776         * util/i386/pc/grub-mkrescue.in: New file.
5777         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
5778         * Makefile.in: Handle bin_SCRIPTS.
5780 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
5782         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
5783         list of video modes.
5785 2007-06-06  Robert Millan  <rmh@aybabtu.com>
5787         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
5788         file doesn't exist, or if it is in a filesystem grub can't read.
5790         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
5791         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
5792         header comment to fit in 80 columns when the variables are resolved.
5794         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
5795         could be identified by update-grub.  Remove redundant check for
5796         unifont.pff existence (since convert_system_path_to_grub_path now
5797         handles that).
5799 2007-06-04  Robert Millan  <rmh@aybabtu.com>
5801         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
5803         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
5805         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
5807 2007-06-04  Robert Millan  <rmh@aybabtu.com>
5809         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
5811         * include/grub/partition.h: Declare grub_apple_partition_map_init and
5812         grub_apple_partition_map_fini.
5814         * util/biosdisk.c
5815         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
5816         to access >2 TiB disks).
5818         Print disk->total_sectors with %llu instead of %lu, since this
5819         variable is always 64-bit (prevents wrong disk size from being displayed
5820         on either >2 TiB disk or big-endian CPU).
5822         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
5823         into a generic case that supports all (sane) partition maps.
5825         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
5826         breaks big-endian.
5828         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
5829         and grub_apple_partition_map_fini() after that.
5831 2007-06-01  Robert Millan  <rmh@aybabtu.com>
5833         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
5835         * util/grub.d/00_header.in: Only enable gfxterm when
5836         convert_system_path_to_grub_path() succeeds.
5838 2007-05-20  Robert Millan  <rmh@aybabtu.com>
5840         * util/update-grub_lib.in: New file.
5841         * DISTLIST: Add update-grub_lib.in.
5842         * conf/common.rmk: Generate update-grub_lib and install it in
5843         $(lib_DATA).
5844         * Makefile.in: Add install routine for $(lib_DATA).
5846         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
5847         function provided by update-grub_lib to support arbitrary paths of
5848         unifont.pff.
5849         * util/update-grub.in: Use convert_system_path_to_grub_path() to
5850         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
5852 2007-05-19  Robert Millan  <rmh@aybabtu.com>
5854         * commands/i386/cpuid.c: New module.
5855         * DISTLIST: Add it.
5856         * conf/i386-efi.rmk: Enable cpuid.mod.
5857         * conf/i386-pc.rmk: Likewise.
5859 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
5861         * kern/disk.c (grub_disk_read): Check return value of
5862         grub_realloc().
5864 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
5866         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
5867         arrays.
5868         * disk/raid.c (grub_raid_open): Likewise.
5870 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
5872         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
5873         stack instead of on the heap.
5875         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
5876         before doing a read on it.
5878         * configure.ac: Only use -fno-stack-protector for the target
5879         environment.
5881 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
5883         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
5884         __attribute_ ((unused)) to mode_type argument.
5886         * util/getroot.c (grub_guess_root_device): Fix #endif.
5888         * kern/misc.c (memcmp): Fix prototype.
5890         * include/grub/partition.h [GRUB_UTIL]
5891         (grub_gpt_partition_map_init): Add prototype.
5892         (grub_gpt_partition_map_fini): Likewise.
5894         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
5895         at the right place.
5897         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
5898         (grub_fat_read_data): Likewise.
5899         (grub_fat_find_dir): Likewise.
5901         * font/manager.c (find_glyph): Make table a const.
5902         (grub_font_get_glyph): Remove bitmap from if statement.
5904 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
5906         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
5907         code, first search for device in /dev/mapper, then in /dev.
5908         (grub_util_get_grub_dev): New function.
5909         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
5910         prototype.
5911         * util/grub-probe.c (probe): Remove check for RAID, call
5912         grub_util_get_grub_dev() instead of
5913         grub_util_biosdisk_get_grub_dev().
5914         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
5915         grub_util_biosdisk_get_grub_dev().
5916         * util/i386/pc/grub-setup.c (main): Likewise.
5918 2007-05-16  Robert Millan  <rmh@aybabtu.com>
5920         * DISTLIST: Update for the latest changes.
5921         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
5922         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
5923         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
5924         grub/util/biosdisk.h.
5925         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
5926         grub/util/biosdisk.h.
5928 2007-05-16  Robert Millan  <rmh@aybabtu.com>
5930         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
5932 2007-05-16  Robert Millan  <rmh@aybabtu.com>
5934         * util/i386/efi/grub-install.in: New.
5935         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
5936         newly added grub-install.
5937         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
5938         include.
5939         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
5940         grub/util/biosdisk.h.
5941         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
5942         grub/util/biosdisk.h.
5944 2007-05-16  Robert Millan  <rmh@aybabtu.com>
5946         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
5947         * include/grub/util/biosdisk.h: ... here.
5948         * util/i386/pc/biosdisk.c: Moved to ...
5949         * util/biosdisk.c: ... here.
5950         * util/i386/pc/getroot.c: Moved to ...
5951         * util/getroot.c: ... here.
5952         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
5953         * util/grub-mkdevicemap.c: ... here.
5954         * util/i386/pc/grub-probe.c: Moved to ...
5955         * util/grub-probe.c: ... here.
5957 2007-05-15  Robert Millan  <rmh@aybabtu.com>
5959         * util/update-grub.in: Remove duplicated line in grub.cfg header
5960         message.
5962 2007-05-13  Robert Millan  <rmh@aybabtu.com>
5964         * util/update-grub.in: Fix a few assumptions about the devices holding
5965         /, /boot and /boot/grub being the same.
5966         * util/grub.d/00_header.in: Likewise.
5967         * util/grub.d/10_hurd.in: Likewise.
5968         * util/grub.d/10_linux.in: Likewise.
5970         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
5971         patterns.  Use that to define the `.old' suffix as older than `'.
5973         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
5975         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
5976         the grub.cfg header message.
5978 2007-05-11  Robert Millan  <rmh@aybabtu.com>
5980         * util/update-grub.in: Create device.map if it doesn't already exist,
5981         before attempting to run grub-probe.
5982         Check for grub-probe and grub-mkdevicemap with the same code
5983         grub-install is using.
5984         Remove test mode.
5986 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
5988         * Makefile.in: Add the datarootdir autoconf variable.
5990 2007-05-09  Robert Millan  <rmh@aybabtu.com>
5992         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
5993         fail gracefully if dev->disk->partition == NULL.
5995 2007-05-07  Robert Millan  <rmh@aybabtu.com>
5997         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
5998         determine partition map module.
5999         * util/i386/pc/grub-install.in: Use this feature to decide which
6000         partition module to load, instead of hardcoding pc and gpt.
6002 2007-05-07  Robert Millan  <rmh@aybabtu.com>
6004         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6005         source directory differs from build directory.
6007 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6009         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6010         initialisation.
6012 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6014         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6016 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6018         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6019         command-line arguments via ${GRUB_CMDLINE_LINUX}.
6021 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6023         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6024         (grub_probe_SOURCES): Likewise.
6025         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6026         GPT and initialize dos_part and bsd_part accordingly.
6027         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6028         install_bsd_part.
6029         (main): Activate gpt module for use during partition identification,
6030         and deactivate it afterwards.
6031         * util/i386/pc/grub-install.in: Add gpt module to core.img.
6032         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6033         partition identification, and deactivate it afterwards.
6035 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6037         * term/i386/pc/console.c (grub_console_fini): Call
6038         grub_term_set_current() before grub_term_unregister().
6040 2007-05-04  Robert Millan  <rmh@aybabtu.com>
6042         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6043         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6044         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
6045         and update-grub_DATA.
6046         * conf/common.rmk: Build and install update-grub components.
6047         * conf/common.mk: Regenerate.
6048         * util/update-grub.in: New.  Core of update-grub.
6049         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
6050         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
6051         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
6052         * util/grub.d/README: New.  Document grub.d directory layout.
6054 2007-05-01  Robert Millan  <rmh@aybabtu.com>
6056         * util/grub-emu.c: Move initialization functions
6057         grub_util_biosdisk_init() and grub_init_all() before
6058         grub_util_biosdisk_get_grub_dev(), which relies on them.
6060 2007-04-19  Robert Millan  <rmh@aybabtu.com>
6062         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6063         it is used later.
6065 2007-04-18  Jerone Young  <jerone@gmail.com>
6067         * kernel/elf.c: Add missing parenthesis for conditional statement
6068         stanza.
6070 2007-04-10  Jerone Young  <jerone@gmail.com>
6072         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6073         continue on and look for device node with real device name.
6075 2007-04-10  Jerone Young  <jerone@gmail.com>
6077         * configure.ac: Add argument for autoconf to use transformation
6078         ability.
6079         * Makefile.in: Add autoconf package transformation code.
6080         * util/i386/pc/grub-install.in: Likewise.
6081         * util/powerpc/ieee1275/grub-install.in: Likewise.
6083 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
6085         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6086         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6087         (EXT2_REVISION): Likewise.
6088         (EXT2_INODE_SIZE): Likewise.
6089         (struct grub_ext2_block_group): Added a missing member
6090         "used_dirs".
6091         (grub_ext2_read_inode): Divide by the inode size in a superblock
6092         instead of 128 to obtain INODES_PER_BLOCK.
6093         Use the macro EXT2_INODE_SIZE instead of directly using
6094         SBLOCK->INODE_SIZE.
6096 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
6098         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6099         superblock instead of the structure size to compute an
6100         offset. This fixes the problem that GRUB could not read a
6101         filesystem when inode size is different from 128-byte.
6103 2007-03-05  Marco Gerards  <marco@gnu.org>
6105         * normal/main.c (read_config_file): When "menu" is not set, create
6106         an initial context.
6108 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
6110         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6111         (HEAP_LIMIT): New macro.
6112         (grub_claim_heap): Claim memory up to `heaplimit'.
6114 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
6116         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6117         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6118         (_start): Likewise.
6119         (grub_arch_modules_addr): Return address after `_end'.
6120         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6121         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6122         (add_segments): Calculate `_end' from phdr size and location.
6123         (ALIGN_UP): Moved to ...
6124         * include/grub/misc.h: here.
6125         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6126         New macro.
6127         (GRUB_IEEE1275_MODULE_BASE): Removed.
6129 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6131         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6132         loop boundary.
6134 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6136         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6137         All users updated.
6138         (grub_elf64_load_hook_t): Likewise.
6139         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6140         debug output.
6142 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6144         * kern/mm.c: Update copyright.
6145         (grub_mm_debug): Correct syntax error.
6146         (grub_mm_dump_free): New function.
6147         (grub_debug_free): Call `grub_free'.
6148         * include/grub/mm.h: Update copyright.
6149         (grub_mm_dump_free): Add declaration.
6151 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
6153         * include/grub/ieee1275/ieee1275.h: Update copyright.
6154         * kern/powerpc/ieee1275/init.c: Likewise.
6155         * kern/powerpc/ieee1275/openfw.c: Likewise.
6157         * loader/powerpc/ieee1275/linux.c: Likewise.
6158         * include/grub/elfload.h: Likewise.
6159         * kern/elf.c: Likewise.
6160         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
6161         callers.
6162         (grub_elf64_load): Likewise.
6163         (grub_elf32_load_segment): Move to a nested function.
6164         (grub_elf64_load_segment): Likewise.
6166 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
6168         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6169         prototype.
6170         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6171         (grub_heap_len): Likewise.
6172         (HEAP_SIZE): New macro.
6173         (grub_claim_heap): New function.
6174         (grub_machine_init): Don't claim heap directly.  Call
6175         `grub_claim_heap'.
6176         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6177         (grub_available_iterate): New function.
6179 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
6181         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6182         * configure.ac: Use it for testing the HOST and TARGET compilers.
6184 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
6186         * Makefile.in (enable_grub_emu): New variable.
6187         * configure.ac (--enable-grub-emu): New option.
6188         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6189         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6190         * conf/i386-pc.rmk: Likewise.
6191         * conf/powerpc-ieee1275.rmk: Likewise.
6192         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6194 2006-12-12  Marco Gerards  <marco@gnu.org>
6196         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6198         * kern/env.c (grub_env_unset): Don't free the member `value' when
6199         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6200         pointer.
6202         * normal/main.c (current_menu): Removed.
6203         (free_menu): Unset the `menu' environment variable.
6204         (grub_normal_menu_addentry): Make use of the environment variable
6205         `menu', instead of using the global `current_menu'.  Allocate
6206         memory for the sourcecode of this entry.
6207         (read_config_file): New argument `nested', changed all callers.
6208         Only in the case of a new context, initialize a new menu.  Set the
6209         `menu' environment variable.
6210         (grub_normal_execute): Don't set and unset the environment
6211         variable `menu' here anymore.  Only free the menu when leaving the
6212         context.
6214         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6215         leak.
6217 2006-12-11  Marco Gerards  <marco@gnu.org>
6219         * normal/menu_entry.c (run): Fix off by one bug so the last line
6220         is executed.  Move the loader check to outside the loop.
6222 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
6224         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6226 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
6228         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6229         the number of sectors.  Reported by Andrey Shuvikov
6230         <mr_hyro@yahoo.com>.
6232 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
6234         * kern/disk.c (grub_disk_read): When there is a read error, always
6235         try to read only the necessary data.
6237         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6238         disk/raid.c.
6239         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6240         prototype.
6241         [GRUB_UTIL] (grub_raid_fini): Likewise.
6242         [GRUB_UTIL] (grub_lvm_init): Likewise.
6243         [GRUB_UTIL] (grub_lvm_fini): Likewise.
6244         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6245         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6246         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6247         and grub_raid_fini().
6249 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
6251         * include/grub/types.h (__unused): Rename to UNUSED.
6252         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6253         (grub_elf64_size): Likewise.
6255 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6257         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6258         grub_error_push and grub_error_pop in the error-handling path.
6259         (grub_elf32_load_segment): Only call grub_file_read with non-zero
6260         length.
6262 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6264         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6265         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6266         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6267         (kernel_elf_SOURCES): Likewise.
6268         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6269         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6270         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6271         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6272         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6273         (elf_mod_SOURCES): New variable.
6274         (elf_mod_CFLAGS): Likewise.
6275         (elf_mod_LDFLAGS): Likewise.
6276         * include/grub/types.h (__unused): New macro.
6277         * include/grub/elfload.h: New file.
6278         * kern/elf.c: Likewise.
6279         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6280         (ELF32_LOADMASK): New macro.
6281         (ELF64_LOADMASK): Likewise.
6282         (vmlinux): Removed.
6283         (grub_linux_load32): New function.
6284         (grub_linux_load64): Likewise.
6285         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6286         Use grub_elf_t instead of grub_file_t.
6288 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
6290         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6291         `catch_result' to struct set_color_args.
6293 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
6295         * normal/menu.c: Include grub/script.h.
6296         * normal/menu_entry.c: Likewise.
6297         * include/grub/normal.h: Do not include grub/script.h.
6299 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6301         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6303 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6305         * kern/disk.c (grub_disk_open): Print debug messages when opening a
6306         disk.
6307         (grub_disk_close): Print debug messages when closing a disk.
6308         (grub_disk_read): Print debug messages when disk read fails.
6309         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6310         filesystem type.
6311         * kern/partition.c: Include misc.h.
6312         (grub_partition_iterate): Print debug messages when detecting
6313         partition type.
6315 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6317         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
6318         is negative.
6319         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
6321 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
6323         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6324         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
6326 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
6328         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
6329         instead of sizeof(lv). Patch by Michael Guntsche.
6331 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6333         * disk/lvm.c: Rename VGS to VG_LIST.
6334         (grub_lvm_iterate): Change VGS->LV to VG-LV.
6335         (grub_lvm_open): Likewise.
6336         Thanks to Michael Guntsche for finding this bug.
6338 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
6340         * configure.ac (AC_INIT): Bumped to 1.95.
6342 2006-10-14  Robert Millan  <rmh@aybabtu.com>
6344         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
6345         with "/dev/.static/dev/md".
6347 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
6349         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
6350         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
6351         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
6352         DRIVE_NAME are always freed.
6354         * util/i386/pc/biosdisk.c (make_device_name): Add one into
6355         DOS_PART, as a DOS partition is counted from one instead of zero
6356         now. Reported by Robert Millan.
6358 2006-10-14  Robert Millan  <rmh@aybabtu.com>
6360         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
6361         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
6362         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
6363         string returned by grub_guess_root_device.
6364         * util/i386/pc/grub-setup.c: Likewise.
6365         * util/i386/pc/grub-probefs.c: Likewise.
6367         * util/i386/pc/grub-probefs.c: Rename to ...
6368         * util/i386/pc/grub-probe.c: ... this.
6369         * DISTLIST: Remove grub-probefs, add grub-probe.
6370         * conf/i386-efi.rmk: Likewise.
6371         * conf/i386-pc.rmk: Likewise.
6372         * util/i386/pc/grub-install.in: Likewise.
6374         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
6375         choose which information we want to print.
6377 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
6379         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
6380         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
6381         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
6382         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
6383         video/readers/tga.c and video/i386/pc/vbeutil.c.
6385 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
6387         Added support for RAID and LVM.
6389         * disk/lvm.c: New file.
6390         * disk/raid.c: Likewise.
6391         * include/grub/lvm.h: Likewise.
6392         * include/grub/raid.h: Likewise.
6393         * include/grub/util/lvm.h: Likewise.
6394         * include/grub/util/raid.h: Likewise.
6395         * util/lvm.c: Likewise.
6396         * util/raid.c: Likewise.
6398         * include/grub/disk.h (grub_disk_dev_id): Add
6399         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6400         (grub_disk_get_size): New prototype.
6401         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6402         returns a partition.
6403         (grub_disk_get_size): New function.
6405         * kern/i386/pc/init.c (make_install_device): Copy the prefix
6406         verbatim if grub_install_dos_part is -2.
6408         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6409         and LVM devices.
6411         * util/i386/pc/grub-setup.c (setup): New argument
6412         MUST_EMBED. Force embedding of GRUB when the argument is
6413         true. Close FILE before returning.
6414         (main): Add support for RAID and LVM.
6416         * conf/common.rmk: Add RAID and LVM modules.
6417         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6418         util/lvm.c.
6419         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6421         * kern/misc.c (grub_strstr): New function.
6422         * include/grub/misc.h (grub_strstr): New prototype.
6424 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
6426         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6428 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
6430         * kern/misc.c (grub_strtoull): Guess the base only if not
6431         specified.
6433 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6435         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6436         PowerMac support.
6438 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6440         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6442         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6443         Remove `flags' argument.  All callers changed.
6444         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6445         (IEEE1275_IHANDLE_INVALID): New variable.
6446         (IEEE1275_CELL_INVALID): New variable.
6447         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6448         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6449         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6450         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6451         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6452         codes from Open Firmware.  All callers updated.
6453         (grub_ieee1275_next_property): Directly return Open Firmware return
6454         code.
6455         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6456         Standardize error checking from `grub_ieee1275_get_property'.
6457         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6458         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
6460 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6462         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
6463         `instance_to_package_args' to `instance_to_path_args'.
6465         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
6466         `grub_ieee1275_chosen'.
6468         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
6469         `grub_ieee1275_interpret'.
6471 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
6473         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
6475 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
6477         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
6478         (__cmpdi): Likewise.
6480         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
6481         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
6482         `grub_ssize_t'.
6484         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
6486         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
6487         to type `grub_ssize_t'.
6488         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
6490 2006-09-22  Marco Gerards  <marco@gnu.org>
6492         * normal/script.c (grub_script_create_cmdmenu): Skip leading
6493         newlines.
6495 2006-09-22  Marco Gerards  <marco@gnu.org>
6497         * commands/echo.c: New file.
6499         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
6501         * conf/common.rmk (echo_mod_SOURCES): New variable.
6502         (echo_mod_CFLAGS): Likewise.
6503         (echo_mod_LDFLAGS): Likewise.
6505 2006-09-22  Marco Gerards  <marco@gnu.org>
6507         * normal/main.c (get_line): Malloc memory instead of using
6508         preallocated memory.  Removed the arguments `cmdline' and
6509         `max_len'.  Updated all callers.
6511 2006-09-22  Marco Gerards  <marco@gnu.org>
6513         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
6514         (normal_mod_DEPENDENCIES): Likewise.
6516         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
6517         (normal_mod_DEPENDENCIES): Likewise.
6519         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
6521 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
6523         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
6524         programs.
6525         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
6526         (normal_mod_DEPENDENCIES): Likewise.
6527         * conf/i386-pc.mk: Regenerate.
6528         * conf/i386-efi.mk: Likewise
6529         * conf/common.mk: Likewise.
6530         * conf/powerpc-ieee1275.mk: Likewise.
6531         * conf/sparc64-ieee1275.mk: Likewise.
6533 2006-09-22  Robert Millan  <rmh@aybabtu.com>
6535         Sync with i386 version.
6536         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
6537         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
6539 2006-09-21  Robert Millan  <rmh@aybabtu.com>
6541         Import from GRUB Legacy (lib/device.c):
6542         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
6543         (init_device_map) [__linux__]: Add support for I2O devices.
6545 2006-09-14  Marco Gerards  <marco@gnu.org>
6547         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
6548         `-melf_i386'.
6550 2006-09-14  Robert Millan  <rmh@aybabtu.com>
6552         * util/i386/pc/grub-install.in: Skip menu.lst when removing
6553         /boot/grub/*.lst.
6555         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6557         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
6558         before adding it to device.map.
6560 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
6562         * genmk.rb: Let GCC generate dependencies the first time it
6563         compiles a file; using the -MD option.
6564         * conf/common.mk: Regenerate.
6565         * conf/i386-pc.mk: Likewise.
6566         * conf/i386-efi.mk: Likewise.
6567         * conf/powerpc-ieee1275.mk: Likewise.
6568         * conf/sparc64-ieee1275.mk: Likewise.
6570 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
6572         Move the prototypes of grub_setjmp and grub_longjmp to
6573         cpu/setjmp.h, so that each architecture may specify different
6574         attributes.
6576         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
6577         (grub_longjmp): Likewise.
6578         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
6579         (grub_longjmp): Likewise.
6580         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
6581         (grub_longjmp): Likewise.
6583         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
6584         [!GRUB_UTIL] (grub_longjmp): Removed.
6586 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
6588         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
6589         "color!" method does not return any value.
6591 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
6593         * include/grub/bitmap.h: New file.
6595         * include/grub/i386/pc/vbeutil.h: Likewise.
6597         * video/bitmap.c: Likewise.
6599         * video/readers/tga.c: Likewise.
6601         * video/i386/pc/vbeutil.c: Likewise.
6603         * commands/videotest.c: Code cleanup and updated to reflect to new
6604         video API.
6606         * term/gfxterm.c: Likewise.
6608         * video/video.c: Likewise.
6610         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
6611         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
6612         (bitmap_mod_SOURCES): New entry.
6613         (bitmap_mod_CFLAGS): Likewise.
6614         (bitmap_mod_LDFLAGS): Likewise.
6615         (tga_mod_SOURCES): Likewise.
6616         (tga_mod_CFLAGS): Likewise.
6617         (tga_mod_LDFLAGS): Likewise.
6619         * include/grub/video.h (grub_video_blit_operators): New enum type.
6620         (grub_video_render_target): Changed as forward declaration and moved
6621         actual definition to be video driver specific.
6622         (grub_video_adapter.blit_bitmap): Added blitting operator.
6623         (grub_video_adapter.blit_render_target): Likewise.
6624         (grub_video_blit_bitmap): Likewise.
6625         (grub_video_blit_render_target): Likewise.
6627         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
6628         driver specific render target definition.
6629         (grub_video_vbe_map_rgba): Added driver internal helper.
6630         (grub_video_vbe_unmap_color): Updated to use
6631         grub_video_i386_vbeblit_info.
6632         (grub_video_vbe_get_video_ptr): Likewise.
6634         * include/grub/i386/pc/vbeblit.h
6635         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
6636         grub_video_i386_vbeblit_info.
6637         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6638         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6639         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6640         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6641         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6642         (grub_video_i386_vbeblit_index_index): Likewise.
6643         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
6644         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6645         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6646         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
6647         operator.
6648         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
6649         operator.
6651         * video/i386/pc/vbeblit.c: Updated to reflect changes on
6652         include/grub/i386/pc/vbeblit.h.
6654         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
6655         Updated to use grub_video_i386_vbeblit_info.
6656         (grub_video_i386_vbefill_R8G8B8): Likewise.
6657         (grub_video_i386_vbefill_index): Likewise.
6658         (grub_video_i386_vbefill): Added generic filler.
6660         * video/i386/pc/vbefill.c: Updated to reflect changes on
6661         include/grub/i386/pc/vbefill.h.
6663         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
6664         grub_video_i386_vbeblit_info.
6665         (grub_video_vbe_unmap_color): Likewise.
6666         (grub_video_vbe_blit_glyph): Likewise.
6667         (grub_video_vbe_scroll): Likewise.
6668         (grub_video_vbe_draw_pixel): Removed function.
6669         (grub_video_vbe_get_pixel): Likewise.
6670         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
6671         updated code to use it.
6672         (common_blitter): Added common blitter for render target and bitmap.
6673         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
6674         (grub_video_vbe_blit_render_target): Likewise.
6676 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
6678         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
6679         is in text mode if there is no console control protocol instance
6680         available.
6682 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
6684         * include/grub/video.h: Code cleanup.
6686         * include/grub/i386/pc/vbe.h: Likewise.
6688         * video/i386/pc/vbe.c: Likewise.
6690         * video/i386/pc/vbeblit.c: Likewise.
6692         * video/i386/pc/vbefill.c: Likewise.
6694         * video/video.c: Likewise.  Also added more comments.
6696 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
6698         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
6699         (struct grub_biosdisk_dap): Likewise.
6701         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
6702         linkage settings for all functions.
6704 2006-07-12  Marco Gerards  <marco@gnu.org>
6706         * configure.ac (--enable-mm-debug): Fix typo.
6708         * genkernsyms.sh.in: Use proper quoting for `CC'.
6710 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
6712         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
6713         (normal_mod_ASFLAGS): Remove "-m32".
6715 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
6717         * util/misc.c: Include config.h.
6718         [!HAVE_MEMALIGN]: Do not include malloc.h.
6719         (grub_memalign): Use posix_memalign, if present. Then, use
6720         memalign, if present. Otherwise, emit an error.
6722         * util/grub-emu.c: Do not include malloc.h.
6724         * include/grub/util/misc.h: Include unistd.h. This is required for
6725         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
6726         D. Eades III <hde@foobar-qux.org>.
6728         * configure.ac (AC_GNU_SOURCE): Added.
6729         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
6730         type.
6732 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
6734         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
6735         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
6737 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
6739         * include/grub/types.h (grub_host_addr_t): Rename to
6740         grub_target_addr_t.
6741         (grub_host_off_t): Rename to grub_target_off_t.
6742         (grub_host_size_t): Rename to grub_target_size_t.
6743         (grub_host_ssize_t): Rename to grub_target_ssize_t.
6744         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
6746         * include/grub/kernel.h (struct grub_module_header): Change type
6747         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
6748         (grub_module_info): Likewise.
6750 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
6752         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
6753         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
6754         Velazquez <jesus.velazquez@gmail.com>.
6756 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
6758         Count partitions from 1 instead of 0 in the string representation
6759         of partitions. Still use 0-based internally.
6761         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
6762         (sun_partition_map_iterate): Use grub_partition_t instead of
6763         struct grub_partition *. Cast DESC->START_CYLINDER to
6764         grub_uint64_t after converting the endian.
6765         (sun_partition_map_probe): Subtract 1 for PARTNUM.
6766         (sun_partition_map_get_name): Add 1 to P->INDEX.
6768         * partmap/pc.c (grub_partition_parse): Subtract 1 for
6769         PCDATA->DOS_PART.
6770         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
6772         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
6773         zero instead of one.
6774         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
6775         (gpt_partition_map_get_name): Add 1 into P->INDEX.
6777         * partmap/apple.c (apple_partition_map_iterate): Change the type
6778         of POS to unsigned.
6779         (apple_partition_map_probe): Subtract 1 for PARTNUM.
6780         (apple_partition_map_get_name): Add 1 into P->INDEX.
6782         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
6783         of POS to unsigned.
6784         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
6785         calculate the offset of a partition.
6786         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
6787         (amiga_partition_map_get_name): Add 1 into P->INDEX.
6789         * partmap/acorn.c (acorn_partition_map_find): Change the type of
6790         SECTOR to grub_disk_addr_t.
6791         (acorn_partition_map_iterate): Likewise.
6792         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
6793         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
6794         top.
6795         (acorn_partition_map_get_name): Add 1 into P->INDEX.
6797         * kern/i386/pc/init.c (make_install_device): Add 1 into
6798         GRUB_INSTALL_DOS_PART.
6800         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
6801         conditional.
6803 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
6805         Clean up the code to support 64-bit addressing in disks and
6806         files. This change is not enough for filesystems yet.
6808         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
6809         type of "start" to grub_uint64_t.
6810         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
6811         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
6812         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
6813         convert addresses.
6815         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
6816         to grub_disk_addr_t.
6818         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
6819         string.
6821         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6823         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
6824         to char *.
6826         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
6828         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
6830         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
6832         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
6833         to grub_off_t, to detect an error from grub_file_seek.
6834         (grub_multiboot_load_elf32): Likewise.
6836         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
6837         maximum unsigned long value when an overflow is detected.
6838         (grub_strtoull): New function.
6839         (grub_divmod64): Likewise.
6840         (grub_lltoa): use grub_divmod64.
6842         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
6843         grub_disk_addr_t.
6844         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
6845         the pointer to next character. Use grub_strtoull instead of
6846         grub_strtoul.
6847         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
6848         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
6849         respectively.
6851         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
6852         return value is signed.
6853         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
6854         test if OFFSET is less than zero, as OFFSET is unsigned now.
6856         * kern/disk.c (struct grub_disk_cache): Change the type of
6857         "sector" to grub_disk_addr_t.
6858         (grub_disk_cache_get_index): Change the type of SECTOR to
6859         grub_disk_addr_t. Calculate the hash with SECTOR casted to
6860         unsigned after shifting.
6861         (grub_disk_cache_invalidate): Change the type of SECTOR to
6862         grub_disk_addr_t.
6863         (grub_disk_cache_unlock): Likewise.
6864         (grub_disk_cache_store): Likewise.
6865         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
6866         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
6867         grub_disk_addr_t and grub_uint64_t, respectively.
6868         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
6869         body, as the value of OFFSET is tweaked by
6870         grub_disk_check_range. Change the types of START_SECTOR, LEN and
6871         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
6872         respectively.
6873         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
6874         body, as the value of OFFSET is tweaked by
6875         grub_disk_check_range. Change the types of LEN and N to
6876         grub_size_t.
6878         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
6879         and "saved_offset" to grub_off_t.
6880         (test_header): Cast BUF to char *.
6881         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
6882         to char *.
6883         (grub_gzio_read): Change the types of OFFSET and SIZE to
6884         grub_off_t and grub_size_t, respectively.
6886         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
6887         Removed.
6888         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
6889         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
6890         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
6891         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
6892         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
6894         * include/grub/types.h (grub_off_t): Unconditionally set to
6895         grub_uint64_t.
6896         (grub_disk_addr_t): Changed to grub_uint64_t.
6898         * include/grub/partition.h (struct grub_partition): Change the
6899         types of "start", "len" and "offset" to grub_disk_addr_t,
6900         grub_uint64_t and grub_disk_addr_t, respectively.
6901         (grub_partition_get_start): Return grub_disk_addr_t.
6902         (grub_partition_get_len): Return grub_uint64_t.
6904         * include/grub/misc.h (grub_strtoull): New prototype.
6905         (grub_divmod64): Likewise.
6907         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
6908         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
6909         grub_off_t, respectively.
6910         All callers and references changed.
6912         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
6913         grub_size_t in "read".
6914         All callers and references changed.
6916         * include/grub/file.h (struct grub_file): Change the types of
6917         "offset" and "size" to grub_off_t and grub_off_t,
6918         respectively. Change the type of SECTOR to grub_disk_addr_t in
6919         "read_hook".
6920         (grub_file_read): Change the type of LEN to grub_size_t.
6921         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
6922         grub_off_t.
6923         (grub_file_size): Return grub_off_t.
6924         (grub_file_tell): Likewise.
6925         All callers and references changed.
6927         * include/grub/disk.h (struct grub_disk_dev): Change the types of
6928         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
6929         "write".
6930         (struct grub_disk): Change the type of "total_sectors" to
6931         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
6932         "read_hook".
6933         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
6934         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
6935         (grub_disk_write): Likewise.
6936         All callers and references changed.
6938         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
6939         char * for grub_strncmp to silence gcc.
6940         (grub_iso9660_mount): Likewise.
6941         (grub_iso9660_mount): Likewise.
6942         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
6943         return statement.
6944         (grub_iso9660_iterate_dir): Likewise.
6945         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
6947         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
6948         LEN to grub_disk_addr_t and grub_size_t, respectively.
6950         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6952         * fs/jfs.c (grub_jfs_read_file): Likewise.
6954         * fs/minix.c (grub_jfs_read_file): Likewise.
6956         * fs/sfs.c (grub_jfs_read_file): Likewise.
6958         * fs/ufs.c (grub_jfs_read_file): Likewise.
6960         * fs/xfs.c (grub_jfs_read_file): Likewise.
6962         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
6963         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
6964         respectively.
6966         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
6967         BLKNR to -1 instead of returning GRUB_ERRNO.
6968         (grub_ext2_read_file): Change the types of SECTOR and
6969         LEN to grub_disk_addr_t and grub_size_t, respectively.
6971         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
6972         LEN to grub_disk_addr_t and grub_size_t, respectively.
6974         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
6975         grub_file_read.
6977         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
6978         string. Do not cast SECTOR explicitly.
6980         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
6981         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
6982         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
6983         grub_disk_addr_t and grub_size_t, respectively. If the sector is
6984         over 2TB and LBA mode is not supported, raise an error.
6985         (get_safe_sectors): New function.
6986         (grub_biosdisk_read): Use get_safe_sectors.
6987         (grub_biosdisk_write): Likewise.
6989         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
6990         (grub_efidisk_write): Likewise.
6992         * disk/loopback.c (delete_loopback): Cosmetic changes.
6993         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
6994         correctly.
6995         (grub_loopback_open): Likewise.
6996         (grub_loopback_read): Likewise. Also, change the type of POS to
6997         grub_off_t, and fix the usage of grub_memset.
6999         * commands/i386/pc/play.c: Include grub/machine/time.h.
7001         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7002         print FILE->SIZE.
7004         * commands/configfile.c: Include grub/env.h.
7006         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7007         GRUB_ERRNO directly instead. Change the type of POS to
7008         grub_off_t. Follow the coding standard.
7010         * commands/blocklist.c: Include grub/partition.h.
7011         (grub_cmd_blocklist): Return an error if the underlying device is
7012         not a disk. Take the starting sector of a partition into account,
7013         if a partition is used.
7015         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7016         a length field.
7017         (lba_mode): Support 64-bit addresses.
7018         (chs_mode): Likewise.
7019         (copy_buffer): Adapted to the new offsets of a length field and a
7020         segment field.
7021         (blocklist_default_start): Allocate 64-bit space.
7023         * boot/i386/pc/boot.S (force_lba): Removed.
7024         (boot_drive): Moved to under KERNEL_SECTOR.
7025         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7026         space.
7027         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7028         is useless.
7029         (lba_mode): Refactored to support a 64-bit address. More size
7030         optimization.
7031         (setup_sectors): Likewise.
7033 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
7035         * DISTLIST: Added include/grub/i386/linux.h. Removed
7036         include/grub/i386/pc/linux.h
7038         * configure.ac (AC_INIT): Bumped to 1.94.
7040         * config.guess: Updated from gnulib.
7041         * config.sub: Likewise.
7042         * install-sh: Likewise.
7043         * mkinstalldirs: Likewise.
7045 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
7047         * conf/common.rmk (grub_modules_init.lst): Depended on
7048         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7049         MODSRCFILES.
7051         * genmk.rb (PModule::rule): Reverted the previous change.
7053 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
7055         * conf/common.rmk (grub_modules_init.lst): Depends on
7056         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7057         that the target does not exist before producing.
7058         (grub_modules_init.h): Remove the target before generating.
7059         (grub_emu_init.c): Likewise.
7061         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7063 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
7065         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7066         for the target-specific tests. Make sure that we also have the
7067         up-to-date target variables for those tests.
7069 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
7071         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7072         (PModule::rule): Likewise.
7074 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
7076         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7077         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7078         target-specific flags should be prefixed.
7079         (PModule::rule): Likewise.
7081 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
7083         * configure.ac (CMP): Check if cmp is available explicitly.
7085 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
7087         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7088         (target_cpu): New variable.
7089         (pkglibdir): Use target_cpu instead of host_cpu.
7091         * util/i386/pc/grub-install.in (host_cpu): Removed.
7092         (target_cpu): New variable.
7093         (pkglibdir): Use target_cpu instead of host_cpu.
7095         * util/genmoddep.c: Removed.
7097         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7098         instead of GRUB_HOST_SIZEOF_VOID_P.
7099         * kern/dl.c: Likewise.
7101         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7102         ...
7103         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7104         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7105         (GRUB_TARGET_SIZEOF_LONG): ... this.
7106         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7107         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7108         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7109         to ...
7110         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7111         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7112         (GRUB_TARGET_SIZEOF_LONG): ... this.
7113         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7114         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7115         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7116         to ...
7117         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7118         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7119         (GRUB_TARGET_SIZEOF_LONG): ... this.
7120         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7121         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7123         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7124         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7125         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7126         instead of GRUB_HOST_SIZEOF_LONG.
7127         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7128         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7129         GRUB_CPU_WORDS_BIGENDIAN.
7130         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7131         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7132         grub_host_ssize_t.
7134         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7135         (genmoddep_SOURCES): Likewise.
7136         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7137         (genmoddep_SOURCES): Likewise.
7138         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7139         (genmoddep_SOURCES): Likewise.
7140         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7141         Likewise.
7142         (genmoddep_SOURCES): Likewise.
7144         * genmoddep.awk: New file.
7146         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7147         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7148         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7149         (PModule::rule): Likewise.
7150         (Program::rule): Likewise.
7151         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7152         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7153         respectively.
7155         * configure.ac: Rewritten intensively to use host and target
7156         instead of build and host, respectively.
7158         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7159         (host_cpu): Removed.
7160         (target_cpu): New variable.
7161         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7162         (BUILD_CC): Removed.
7163         (BUILD_CFLAGS): Likewise.
7164         (BUILD_CPPFLAGS): Likewise.
7165         (TARGET_CC): New variable.
7166         (TARGET_CFLAGS): Likewise.
7167         (TARGET_CPPFLAGS): Likewise.
7168         (TARGET_LDFLAGS): Likewise.
7169         (AWK): Likewise.
7170         (include): Use target_cpu instead of host_cpu.
7171         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7173         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7175 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
7177         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7178         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
7179         field 'false' to 'exec_on_false'.
7180         (grub_script_create_cmdif): Renamed argument names to reflect above
7181         changes.
7183         * normal/execute.c (grub_script_execute_cmdif): Likewise.
7185         * normal/script.c (grub_script_create_cmdif): Likewise.
7187 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
7189         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7190         top.
7191         (grub_hfsplus_btree_recptr): Likewise.
7192         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7193         FILEBLOCK both to pass a block number and store next block
7194         number.
7195         (grub_hfsplus_read_block): Rewritten heavily to support an extent
7196         overflow file correctly. Specify errors appropriately, because
7197         fshelp expects that GRUB_ERRNO is set when fails. Reuse
7198         grub_hfsplus_btree_recptr to get the pointer to a found key.
7199         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7200         is found.
7202         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7203         linux.mod.
7204         (_linux_mod_SOURCES): New variable.
7205         (_linux_mod_CFLAGS): Likewise.
7206         (_linux_mod_LDFLAGS): Likewise.
7207         (linux_mod_SOURCES): Likewise.
7208         (linux_mod_CFLAGS): Likewise.
7209         (linux_mod_LDFLAGS): Likewise.
7211         * DISTLIST: Added loader/i386/efi/linux.c,
7212         loader/i386/efi/linux_normal.c and
7213         include/grub/i386/efi/loader.h.
7215         * loader/i386/efi/linux.c: New file.
7216         * loader/i386/efi/linux_normal.c: Likewise.
7217         * include/grub/i386/efi/loader.h: Likewise.
7219 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
7221         * commands/blocklist.c: New file.
7223         * DISTLIST: Added commands/blocklist.c.
7225         * term/efi/console.c (grub_console_highlight_color): Use a lighter
7226         color for the background, and a darker color for the foreground.
7227         (grub_console_checkkey): Return READ_KEY.
7228         (grub_console_cls): Set the background to
7229         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7231         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7233         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7234         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7236         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7237         prototype.
7239         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7240         BG. The spec is wrong again.
7242         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7243         prototype.
7244         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7246         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7247         commands/blocklist.c.
7248         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7250         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7251         (blocklist_mod_SOURCES): New variable.
7252         (blocklist_mod_CFLAGS): Likewise.
7253         (blocklist_mod_LDFLAGS): Likewise.
7255 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
7257         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7258         duplication.
7259         (lba_mode): Use %eax more intensively to reduce the code size.
7261 2006-05-20  Marco Gerards  <marco@gnu.org>
7263         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7265         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
7266         for `menuentry'.
7267         (script): Accept leading newlines.
7268         (newlines): New rule to describe 0 or more newlines.
7269         (commands): Accept `command' with trailing newline.  Fixed the
7270         order in which arguments were passed to `grub_script_add_cmd'.
7271         Accept commands separated by newlines.
7272         (function): Changed to accept newlines.
7273         (menuentry) Rewritten.
7275         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7276         front of the list, instead of to the end.
7278 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
7280         * util/i386/pc/grub-install.in (bindir): New variable.
7281         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7282         Shaver <lbgwjl@gmail.com>.
7284 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
7286         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7287         grub/machine/linux.h
7288         * loader/i386/pc/linux.c: Likewise.
7290         * include/grub/i386/pc/linux.h: Moved to ...
7291         * include/grub/i386/linux.h: ... here.
7293         * include/grub/i386/linux.h (struct linux_kernel_params): New
7294         struct.
7296 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
7298         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7299         checking.
7300         (grub_video_vbe_blit_glyph): Likewise.
7301         (grub_video_vbe_blit_bitmap): Likewise.
7302         (grub_video_vbe_blit_render_target): Likewise.
7304 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
7306         * configure.ac (--with-platform): Properly quote the square
7307         brackets.
7309 2006-05-08  Marco Gerards  <marco@gnu.org>
7311         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7312         this...
7313         (kernel_elf_HEADERS): ...to this.  Updated all users.
7314         (grubof_symlist.c): Renamed from this...
7315         (kernel_elf_symlist.c): ...to this.  Updated all users.
7316         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7317         (grubof_SOURCES): Renamed from this...
7318         (kernel_elf_SOURCES): ...to this.
7319         (grubof_HEADERS): Renamed from this...
7320         (kernel_elf_HEADERS): ...to this.
7321         (grubof_CFLAGS): Renamed from this...
7322         (kernel_elf_CFLAGS): ...to this.
7323         (grubof_ASFLAGS): Renamed from this...
7324         (kernel_elf_ASFLAGS): ...to this.
7325         (grubof_LDFLAGS): Renamed from this...
7326         (kernel_elf_LDFLAGS): ...to this.
7328         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
7329         this...
7330         (kernel_elf_HEADERS): ...to this.  Updated all users.
7331         (grubof_symlist.c): Renamed from this...
7332         (kernel_elf_symlist.c): ...to this.  Updated all users.
7333         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7334         (grubof_SOURCES): Renamed from this...
7335         (kernel_elf_SOURCES): ...to this.
7336         (grubof_HEADERS): Renamed from this...
7337         (kernel_elf_HEADERS): ...to this.
7338         (grubof_CFLAGS): Renamed from this...
7339         (kernel_elf_CFLAGS): ...to this.
7340         (grubof_ASFLAGS): Renamed from this...
7341         (kernel_elf_ASFLAGS): ...to this.
7342         (grubof_LDFLAGS): Renamed from this...
7343         (kernel_elf_LDFLAGS): ...to this.
7345         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
7346         `kernel.elf' instead of `grubof'.
7348 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
7350         Add --with-platform to configure. Use pkglibdir instead of
7351         pkgdatadir. This is reported by Roger Leigh.
7353         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
7354         (host_vendor): Likewise.
7355         (host_os): Likewise.
7356         (pkgdatadir): Likewise.
7357         (platform): New variable.
7358         (pkglibdir): Likewise.
7359         Use PKGLIBDIR instead of PKGDATADIR.
7361         * util/i386/pc/grub-install.in (datadir): Removed.
7362         (host_vendor): Likewise.
7363         (host_os): Likewise.
7364         (pkgdatadir): Likewise.
7365         (platform): New variable.
7366         (pkglibdir): Likewise.
7367         Use PKGLIBDIR instead of PKGDATADIR.
7369         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
7370         instead of GRUB_DATADIR.
7371         (main): Likewise.
7372         * util/i386/pc/grub-mkimage.c (usage): Likewise.
7373         (main): Likewise.
7374         * util/i386/efi/grub-mkimage.c (usage): Likewise.
7375         (main): Likewise.
7377         * configure.ac (--with-platform): New option.
7378         Use PLATFORM instead of HOST_VENDOR to specify a platform.
7380         * Makefile.in: Include a makefile based on PLATFORM instead of
7381         HOST_VENDOR.
7382         (pkgdatadir): Not appended by the machine type.
7383         (pkglibdir): Appended by the machine type.
7384         (host_vendor): Removed.
7385         (platform): New variable.
7386         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
7387         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
7388         (uninstall): Likewise.
7390 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
7392         Use the environment context in the menu. Remove the commands
7393         "default" and "timeout", and use variables instead.
7395         * normal/menu.c: Include grub/env.h.
7396         (print_entry): Cast TITLE to silence gcc.
7397         (get_timeout): New function.
7398         (set_timeout): Likewise.
7399         (get_entry_number): Likewise.
7400         (run_menu): Use a default entry, a fallback entry and a timeout
7401         in the environment variables "default", "fallback" and
7402         "timeout". Also, tweak the default entry if it is not within the
7403         current menu entries.
7404         (grub_menu_run): Use a fallback entry in the environment variable
7405         "fallback".
7407         * normal/main.c (read_config_file): Do not initialize
7408         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7409         NEWMENU->TIMEOUT.
7410         (grub_normal_execute): Use a data slot to store the menu.
7412         * include/grub/normal.h (struct grub_menu): Removed default_entry,
7413         fallback_entry and timeout.
7414         (struct grub_menu_list): Removed.
7415         (grub_menu_list_t): Likewise.
7416         (struct grub_context): Likewise.
7417         (grub_context_t): Likewise.
7418         (grub_context_get): Likewise.
7419         (grub_context_get_current_menu): Likewise.
7420         (grub_context_push_menu): Likewise.
7421         (grub_context_pop_menu): Likewise.
7422         (grub_default_init): Likewise.
7423         (grub_default_fini): Likewise.
7424         (grub_timeout_init): Likewise.
7425         (grub_timeout_fini): Likewise.
7427         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7428         and timeout.mod.
7429         (normal_mod_SOURCES): Removed normal/context.c.
7431         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7432         commands/default.c, commands/timeout.c and normal/context.c.
7433         (normal_mod_SOURCES): Removed normal/context.c.
7435         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7436         commands/timeout.c and normal/context.c.
7437         (normal_mod_SOURCES): Removed normal/context.c.
7439         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7440         commands/default.c, commands/timeout.c and normal/context.c.
7441         (normal_mod_SOURCES): Removed normal/context.c.
7443         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7444         timeout.mod.
7445         (default_mod_SOURCES): Removed.
7446         (default_mod_CFLAGS): Likewise.
7447         (default_mod_LDFLAGS): Likewise.
7448         (timeout_mod_SOURCES): Removed.
7449         (timeout_mod_CFLAGS): Likewise.
7450         (timeout_mod_LDFLAGS): Likewise.
7452         * DISTLIST: Removed commands/default.c, commands/timeout.c and
7453         normal/context.c.
7455         * commands/default.c: Removed.
7456         * commands/timeout.c: Likewise.
7457         * normal/context.c: Likewise.
7459 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
7461         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
7463 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
7465         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
7466         "next" to "prev" for readability.
7467         (struct grub_env_sorted_var): New struct.
7468         (grub_env_context): Renamed to ...
7469         (initial_context): ... this.
7470         (grub_env_var_context): Renamed to ...
7471         (current_context): ... this.
7472         (grub_env_find): Look only at CURRENT_CONTEXT.
7473         (grub_env_context_open): Rewritten to copy exported variables from
7474         previous context.
7475         (grub_env_context_close): Rewritten according to the new
7476         scheme. Also, add an assertion to prevent the initial context from
7477         removed.
7478         (grub_env_insert): Removed the code for the sorted list.
7479         (grub_env_remove): Likewise.
7480         (grub_env_export): Simply mark the variable with
7481         GRUB_ENV_VAR_GLOBAL.
7482         (grub_env_set): A cosmetic change for naming consistency.
7483         (grub_env_get): Likewise.
7484         (grub_env_unset): Likewise.
7485         (grub_env_iterate): Rewritten to sort variables within this
7486         function.
7487         (grub_register_variable_hook): Fixed for naming consistency. Call
7488         grub_env_find again, only if NAME is not found at the first time.
7489         (mangle_data_slot_name): New function.
7490         (grub_env_set_data_slot): Likewise.
7491         (grub_env_get_data_slot): Likewise.
7492         (grub_env_unset_data_slot): Likewise.
7494         * include/grub/env.h (grub_env_var_type): New enum.
7495         (GRUB_ENV_VAR_LOCAL): New constant.
7496         (GRUB_ENV_VAR_GLOBAL): Likewise.
7497         (GRUB_ENV_VAR_DATA): Likewise.
7498         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
7499         "type".
7500         (grub_env_set): Replace VAR with NAME for consistency.
7501         (grub_register_variable_hook): Likewise.
7502         (grub_env_export): Specify the name of the argument.
7503         (grub_env_set_data_slot): New prototype.
7504         (grub_env_get_data_slot): Likewise.
7505         (grub_env_unset_data_slot): Likewise.
7507 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
7509         Extend the loader so that GRUB can accept a loader which comes
7510         back to GRUB when a loaded image exits. Also, this change adds
7511         support for a chainloader on EFI.
7513         * term/efi/console.c: Include grub/misc.h.
7514         (grub_console_checkkey): Display a scan code on the top for
7515         debugging. This will be removed once the EFI port gets stable.
7516         Correct the scan code mapping.
7518         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
7519         allocate memory from larger regions, in order to reduce the number
7520         of allocated regions. Otherwise, the MacOSX loader panics.
7521         (filter_memory_map): Avoid less than 1MB for compatibility with
7522         other loaders.
7523         (add_memory_regions): Allocate from the tail of a region, if
7524         possible, to avoid allocating a region near to 1MB, for the MacOSX
7525         loader.
7527         * kern/efi/init.c (grub_efi_set_prefix): Specify
7528         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
7530         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
7531         argument IMAGE_HANDLE and specify it to get a loaded image.
7532         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
7533         grub_efi_get_loaded_image.
7534         (grub_efi_get_filename): Divide the length by the size of
7535         grub_efi_char16_t.
7536         (grub_efi_get_device_path): New function.
7537         (grub_efi_print_device_path): Print End Device Path nodes. Divide
7538         the length by the size of grub_efi_char16_t for a file path device
7539         path node.
7541         * kern/loader.c (grub_loader_noreturn): New variable.
7542         (grub_loader_set): Accept a new argument NORETURN. Set
7543         GRUB_LOADER_NORETURN to NORETURN.
7544         All callers changed.
7545         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
7546         grub_machine_fini.
7548         * include/grub/efi/efi.h (grub_efi_get_device_path): New
7549         prototype.
7550         (grub_efi_get_loaded_image): Take an argument to specify an image
7551         handle.
7553         * include/grub/loader.h (grub_loader_set): Added one more argument
7554         NORETURN.
7556         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
7557         instead of grub_efi_open_protocol.
7558         (grub_efidisk_get_device_name): Likewise.
7559         (grub_efidisk_close): Print a newline.
7560         (grub_efidisk_get_device_handle): Fixed to use
7561         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
7562         GRUB_EFI_DEVICE_PATH_TYPE.
7564         * disk/efi/efidisk.c (device_path_guid): Moved to ...
7565         * kern/efi/efi.c (device_path_guid): ... here.
7567         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
7568         chain.mod.
7569         (kernel_mod_HEADERS): Added efi/disk.h.
7570         (_chain_mod_SOURCES): New variable.
7571         (_chain_mod_CFLAGS): Likewise.
7572         (_chain_mod_LDFLAGS): Likewise.
7573         (chain_mod_SOURCES): Likewise.
7574         (chain_mod_CFLAGS): Likewise.
7575         (chain_mod_LDFLAGS): Likewise.
7577         * DISTLIST: Added include/grub/efi/chainloader.h,
7578         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
7580         * include/grub/efi/chainloader.h: New file.
7581         * loader/efi/chainloader.c: Likewise.
7582         * loader/efi/chainloader_normal.c: Likewise.
7584 2006-04-30  Marco Gerards  <marco@gnu.org>
7586         * commands/configfile.c (grub_cmd_source): New function.
7587         (GRUB_MOD_INIT): Register the commands `source' and `.'.
7588         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
7590 2006-04-30  Marco Gerards  <marco@gnu.org>
7592         * normal/execute.c (grub_script_execute_cmd): Change the return
7593         type to `grub_err_t'.  Correctly return the error.
7594         (grub_script_execute_cmdline): In case a command line is not a
7595         command or a function, try to interpret it as an assignment.
7597 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
7599         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
7600         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
7601         skip a node whose name is obviously invalid as UTF-16,
7602         i.e. contains a NUL character. Stop the iteration when the last
7603         directory entry is found. Instead of using the return value of
7604         grub_hfsplus_btree_iterate_node, store the value in RET and use
7605         it, because the iterator can be stopped by the last directory
7606         entry.
7608 2006-04-30  Marco Gerards  <marco@gnu.org>
7610         * include/grub/env.h (grub_env_export): New prototype.  Reported
7611         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
7613 2006-04-30  Marco Gerards  <marco@gnu.org>
7615         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
7616         size of the extents in a catalog file record.
7618 2006-04-29  Marco Gerards  <marco@gnu.org>
7620         * commands/configfile.c (grub_cmd_configfile): Execute the
7621         configfile within its own context.
7623         * include/grub/env.h (grub_env_context_open): New prototype.
7624         (grub_env_context_close): Likewise.
7626         * kern/env.c (grub_env): Removed.
7627         (grub_env_sorted): Likewise.
7628         (grub_env_context): New variable.
7629         (grub_env_var_context): Likewise.
7630         (grub_env_find): Search both the active context and the global
7631         context.
7632         (grub_env_context_open): New function.
7633         (grub_env_context_close): Likewise.
7634         (grub_env_insert): Likewise.
7635         (grub_env_remove): Likewise.
7636         (grub_env_export): Likewise.
7637         (grub_env_set): Changed to use helper functions to avoid code
7638         duplication.
7639         (grub_env_iterate): Rewritten so both the current context and the
7640         global context are being used.
7642         * normal/command.c (export_command): New function.
7643         (grub_command_init): Register the `export' function.
7645 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
7647         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
7648         explicitly to suppress gcc's warnings.
7649         * fs/fat.c (grub_fat_find_dir): Likewise.
7650         (grub_fat_label): Likewise.
7651         * fs/xfs.c (grub_xfs_read_inode): Likewise.
7652         (grub_xfs_mount): Likewise.
7653         (grub_xfs_label): Likewise.
7654         * fs/affs.c (grub_affs_mount): Likewise.
7655         (grub_affs_label): Likewise.
7656         (grub_affs_iterate_dir): Likewise.
7657         * fs/sfs.c (grub_sfs_mount): Likewise.
7658         (grub_sfs_iterate_dir): Likewise.
7659         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
7660         * fs/hfs.c (grub_hfs_mount): Likewise.
7661         (grub_hfs_cmp_catkeys): Likewise.
7662         (grub_hfs_find_dir): Likewise.
7663         (grub_hfs_dir): Likewise.
7664         (grub_hfs_label): Likewise.
7665         * fs/jfs.c (grub_jfs_mount): Likewise.
7666         (grub_jfs_opendir): Likewise.
7667         (grub_jfs_getent): Likewise.
7668         (grub_jfs_lookup_symlink): Likewise.
7669         (grub_jfs_label): Likewise.
7670         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
7671         (grub_hfsplus_iterate_dir): Likewise.
7672         (grub_hfsplus_btree_iterate_node): Made static.
7674         * util/grub-emu.c (prefix): New variable.
7675         (grub_machine_set_prefix): New function.
7676         (main): Do not set the environment variable "prefix" here. Only
7677         set PREFIX, which is used later by grub_machine_set_prefix.
7679         * include/grub/video.h: Do not include grub/symbol.h.
7680         (grub_video_register): Not exported. This symbol is not defined in
7681         the kernel.
7682         (grub_video_unregister): Likewise.
7683         (grub_video_iterate): Likewise.
7684         (grub_video_setup): Likewise.
7685         (grub_video_restore): Likewise.
7686         (grub_video_get_info): Likewise.
7687         (grub_video_get_blit_format): Likewise.
7688         (grub_video_set_palette): Likewise.
7689         (grub_video_get_palette): Likewise.
7690         (grub_video_set_viewport): Likewise.
7691         (grub_video_get_viewport): Likewise.
7692         (grub_video_map_color): Likewise.
7693         (grub_video_map_rgb): Likewise.
7694         (grub_video_map_rgba): Likewise.
7695         (grub_video_fill_rect): Likewise.
7696         (grub_video_blit_glyph): Likewise.
7697         (grub_video_blit_bitmap): Likewise.
7698         (grub_video_blit_render_target): Likewise.
7699         (grub_video_scroll): Likewise.
7700         (grub_video_swap_buffers): Likewise.
7701         (grub_video_create_render_target): Likewise.
7702         (grub_video_delete_render_target): Likewise.
7703         (grub_video_set_active_render_target): Likewise.
7705         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
7706         Undefined.
7707         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
7709         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
7710         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7711         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7712         instead of $(srcdir)/genkernsyms.sh.
7714         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
7715         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7716         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7717         instead of $(srcdir)/genkernsyms.sh.
7719         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
7720         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7721         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7722         instead of $(srcdir)/genkernsyms.sh.
7724         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
7725         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7726         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7727         instead of $(srcdir)/genkernsyms.sh.
7729         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
7730         genkernsyms.sh.
7732         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
7733         genkernsyms.sh.
7734         (gensymlist.sh): New target.
7735         (genkernsyms.sh): Likewise.
7737         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
7738         genkernsyms.sh.in and gensymlist.sh.in.
7740         * genkernsyms.sh: Removed.
7741         * gensymlist.sh: Likewise.
7743         * genkernsyms.sh.in: New file.
7744         * gensymlist.sh.in: Likewise.
7746 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
7748         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
7749         clobber "prefix", since we may have already set it manually.
7751 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
7753         * kern/misc.c (abort): New alias for grub_abort.
7755 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
7757         A new machine-specific function "grub_machine_set_prefix" is
7758         defined. This is called after loading modules, so that a prefix
7759         initialization can use modules. Also, this change adds an
7760         intensive debugging feature for the memory manager via the
7761         configure option "--enable-mm-debug".
7763         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
7764         PART.LEN.
7766         * kern/sparc64/ieee1275/init.c (abort): Removed.
7767         (grub_stop): Likewise.
7768         (grub_exit): New function.
7769         (grub_set_prefix): Renamed to ...
7770         (grub_machine_set_prefix): ... this.
7771         (grub_machine_init): Do not call grub_set_prefix.
7773         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
7774         (grub_machine_set_prefix): ... this.
7775         (grub_machine_init): Do not call grub_set_prefix.
7777         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
7778         (grub_machine_init): Do not set the prefix here.
7780         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
7782         * kern/efi/init.c: Include grub/mm.h.
7783         (grub_efi_set_prefix): New function.
7785         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
7786         (grub_efi_get_filename): New function.
7787         (grub_print_device_path): Renamed to ...
7788         (grub_efi_print_device_path): ... this.
7790         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
7791         [MM_DEBUG] (grub_realloc): Likewise.
7792         [MM_DEBUG] (grub_free): Likewise.
7793         [MM_DEBUG] (grub_memalign): Likewise.
7794         [MM_DEBUG] (grub_mm_debug): New variable.
7795         [MM_DEBUG] (grub_debug_malloc): New function.
7796         [MM_DEBUG] (grub_debug_free): New function.
7797         [MM_DEBUG] (grub_debug_realloc): New function.
7798         [MM_DEBUG] (grub_debug_memalign): New function.
7800         * kern/misc.c (grub_abort): Print a newline to distinguish
7801         the message.
7803         * kern/main.c (grub_main): Call grub_machine_set_prefix and
7804         grub_set_root_dev after loading modules. This is necessary when
7805         setting a prefix depends on modules.
7807         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
7808         (grub_efi_print_device_path): ... this.
7809         (grub_efi_get_filename): New prototype.
7810         (grub_efi_set_prefix): Likewise.
7812         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
7813         and grub/disk.h.
7814         (grub_efidisk_get_device_handle): New prototype.
7815         (grub_efidisk_get_device_name): Likewise.
7817         * include/grub/mm.h: Include config.h.
7818         (MM_DEBUG): Removed.
7819         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
7820         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
7821         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
7822         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
7823         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
7824         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
7825         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
7826         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
7827         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
7829         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
7831         * disk/efi/efidisk.c: Include grub/partition.h.
7832         (iterate_child_devices): New function.
7833         (add_device): First, compare only last device path nodes, so that
7834         devices are sorted by the types.
7835         (grub_efidisk_get_device_handle): New function.
7836         (grub_efidisk_get_device_name): Likewise.
7838         * configure.ac (--enable-mm-debug): New option to enable the
7839         memory manager debugging feature. This makes the binary much
7840         bigger, so is disabled by default.
7842 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
7844         Use grub_abort instead of grub_stop, and grub_exit must be
7845         define in each architecture now. Also, this change adds support
7846         for EFI disks.
7848         * util/i386/pc/grub-probefs.c: Include grub/term.h.
7849         (grub_getkey): New function.
7850         (grub_term_get_current): Likewise.
7852         * util/i386/pc/grub-setup.c: Include grub/term.h.
7853         (grub_getkey): New function.
7854         (grub_term_get_current): Likewise.
7856         * util/misc.c (grub_stop): Renamed to ...
7857         (grub_exit): ... this.
7859         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
7860         (grub_exit): ... this.
7861         (grub_machine_init): Use grub_abort instead of abort.
7862         (grub_stop): Removed.
7864         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
7865         abort.
7867         * kern/i386/pc/startup.S (grub_exit): New function.
7868         (cold_reboot): New label.
7870         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
7871         (grub_efi_init): Call grub_efidisk_init.
7872         (grub_efi_fini): Call grub_efidisk_fini.
7874         * kern/efi/efi.c: Include grub/mm.h.
7875         (grub_efi_console_control_guid): Renamed to ...
7876         (console_control_guid): ... this.
7877         (grub_efi_loaded_image_guid): Renamed to ...
7878         (loaded_image_guid): ... this.
7879         (grub_efi_locate_handle): New function.
7880         (grub_efi_open_protocol): Likewise.
7881         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
7882         GRUB_EFI_CONSOLE_CONTROL_GUID.
7883         (grub_efi_exit): Removed.
7884         (grub_stop): Likewise.
7885         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
7886         (grub_exit): New function.
7887         (grub_print_device_path): Likewise.
7889         * kern/rescue.c (grub_rescue_cmd_exit): New function.
7890         (grub_enter_rescue_mode): Register "exit".
7892         * kern/misc.c (grub_real_dprintf): A cosmetic change.
7893         (grub_abort): New function.
7895         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
7897         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
7899         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
7901         * include/grub/efi/efi.h (grub_efi_exit): Removed.
7902         (grub_print_device_path): New prototype.
7903         (grub_efi_locate_handle): Likewise.
7904         (grub_efi_open_protocol): Likewise.
7906         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
7907         * disk/efi/efidisk.c: Likewise.
7909         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
7911         * include/grub/efi/console_control.h
7912         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
7914         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
7915         last 8 bytes as an array.
7916         (GRUB_EFI_DISK_IO_GUID): New macro.
7917         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
7918         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
7919         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
7920         grub_uint8_t.
7921         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
7922         (struct grub_efi_device_path): Rename the member "sub_type" to
7923         "subtype".
7924         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
7925         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
7926         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
7927         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
7928         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
7929         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
7930         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
7931         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
7932         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
7933         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
7934         (struct grub_efi_pci_device_path): New structure.
7935         (grub_efi_pci_device_path_t): New type.
7936         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
7937         (struct grub_efi_pccard_device_path): New structure.
7938         (grub_efi_pccard_device_path_t): New type.
7939         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
7940         (struct grub_efi_memory_mapped_device_path): New structure.
7941         (grub_efi_memory_mapped_device_path_t): New type.
7942         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
7943         (struct grub_efi_vendor_device_path): New structure.
7944         (grub_efi_vendor_device_path_t): New type.
7945         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
7946         (struct grub_efi_controller_device_path): New structure.
7947         (grub_efi_controller_device_path_t): New type.
7948         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
7949         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
7950         (struct grub_efi_acpi_device_path): New structure.
7951         (grub_efi_acpi_device_path_t): New type.
7952         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
7953         (struct grub_efi_expanded_acpi_device_path): New structure.
7954         (grub_efi_expanded_acpi_device_path_t): New type.
7955         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
7956         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
7957         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
7958         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
7959         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
7960         (struct grub_efi_atapi_device_path): New structure.
7961         (grub_efi_atapi_device_path_t): New type.
7962         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
7963         (struct grub_efi_fibre_channel_device_path): New structure.
7964         (grub_efi_fibre_channel_device_path_t): New type.
7965         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
7966         (struct grub_efi_1394_device_path): New structure.
7967         (grub_efi_1394_device_path_t): New type.
7968         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
7969         (struct grub_efi_usb_device_path): New structure.
7970         (grub_efi_usb_device_path_t): New type.
7971         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
7972         (struct grub_efi_usb_class_device_path): New structure.
7973         (grub_efi_usb_class_device_path_t): New type.
7974         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
7975         (struct grub_efi_i2o_device_path): New structure.
7976         (grub_efi_i2o_device_path_t): New type.
7977         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
7978         (struct grub_efi_mac_address_device_path): New structure.
7979         (grub_efi_mac_address_device_path_t): New type.
7980         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
7981         (struct grub_efi_ipv4_device_path): New structure.
7982         (grub_efi_ipv4_device_path_t): New type.
7983         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
7984         (struct grub_efi_ipv6_device_path): New structure.
7985         (grub_efi_ipv6_device_path_t): New type.
7986         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
7987         (struct grub_efi_infiniband_device_path): New structure.
7988         (grub_efi_infiniband_device_path_t): New type.
7989         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
7990         (struct grub_efi_uart_device_path): New structure.
7991         (grub_efi_uart_device_path_t): New type.
7992         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
7993         (struct grub_efi_vendor_messaging_device_path): New structure.
7994         (grub_efi_vendor_messaging_device_path_t): New type.
7995         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
7996         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
7997         (struct grub_efi_hard_drive_device_path): New structure.
7998         (grub_efi_hard_drive_device_path_t): New type.
7999         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8000         (struct grub_efi_cdrom_device_path): New structure.
8001         (grub_efi_cdrom_device_path_t): New type.
8002         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8003         (struct grub_efi_vendor_media_device_path): New structure.
8004         (grub_efi_vendor_media_device_path_t): New type.
8005         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8006         (struct grub_efi_file_path_device_path): New structure.
8007         (grub_efi_file_path_device_path_t): New type.
8008         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8009         (struct grub_efi_protocol_device_path): New structure.
8010         (grub_efi_protocol_device_path_t): New type.
8011         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8012         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8013         (struct grub_efi_bios_device_path): New structure.
8014         (grub_efi_bios_device_path_t): New type.
8015         (struct grub_efi_disk_io): New structure.
8016         (grub_efi_disk_io_t): New type.
8017         (struct grub_efi_block_io_media): New structure.
8018         (grub_efi_block_io_media_t): New type.
8019         (struct grub_efi_block_io): New structure.
8020         (grub_efi_block_io_t): New type.
8022         * include/grub/misc.h (grub_stop): Removed.
8023         (grub_exit): New prototype.
8024         (grub_abort): Likewise.
8026         * include/grub/disk.h (enum grub_disk_dev_id): Added
8027         GRUB_DISK_DEVICE_EFIDISK_ID.
8029         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8030         disk/efi/efidisk.c.
8031         (kernel_syms.lst): Remove the target if an error occurs.
8033 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
8035         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8036         as it was simply too buggy.
8038 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
8040         * kern/misc.c (grub_lltoa): New function.
8041         (grub_vsprintf): Added support for the long long suffix,
8042         i.e. "ll".
8044 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
8046         * Makefile.in (LDFLAGS): Add variable.
8047         (LD): Remove variable.
8048         * configure.ac: Add -m32 to LDFLAGS.
8049         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8050         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8051         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8052         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8053         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8054         variables.
8055         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8056         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8057         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8059 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
8061         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8062         length for unknown glyph.
8064 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
8066         Add support for pre-loaded modules into the EFI port.
8068         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8069         completely. Accept one more argument DIR. The caller has changed.
8071         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8073         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8074         (grub_efi_loaded_image_guid): New variable.
8075         (grub_efi_get_loaded_image): New function.
8076         (grub_arch_modules_addr): Likewise.
8078         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8079         prototype.
8081         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8082         (struct grub_efi_loaded_image): New structure.
8083         (grub_efi_loaded_image_t): New type.
8085 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
8087         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8088         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8089         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8091 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
8093         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8095 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
8097         * DISTLIST: Added include/grub/efi/console.h,
8098         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8099         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8101         * include/grub/efi/console.h: New file.
8102         * include/grub/efi/time.h: Likewise.
8103         * include/grub/i386/efi/kernel.h: Likewise.
8104         * kern/efi/init.c: Likewise.
8105         * kern/efi/mm.c: Likewise.
8106         * term/efi/console.c: Likewise.
8108         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8109         (grub_stop): Removed.
8110         (grub_get_rtc): Likewise.
8111         (grub_machine_init): Simply call grub_efi_init.
8112         (grub_machine_fini): Call grub_efi_fini.
8114         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8115         (grub_efi_output_string): Removed.
8116         (grub_efi_stall): New function.
8117         (grub_stop): Likewise.
8118         (grub_get_rtc): Likewise.
8120         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8121         (grub_efi_stall): New prototype.
8122         (grub_efi_allocate_pages): Likewise.
8123         (grub_efi_free_pages): Likewise.
8124         (grub_efi_get_memory_map): Likewise.
8125         (grub_efi_mm_init): Likewise.
8126         (grub_efi_mm_fini): Likewise.
8127         (grub_efi_init): Likewise.
8128         (grub_efi_fini): Likewise.
8130         * include/grub/i386/efi/time.h: Do not include
8131         grub/symbol.h. Include grub/efi/time.h.
8132         (GRUB_TICKS_PER_SECOND): Removed.
8133         (grub_get_rtc): Likewise.
8135         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8136         Added padding. The EFI spec is buggy.
8137         (GRUB_EFI_BLACK): New macro.
8138         (GRUB_EFI_BLUE): Likewise.
8139         (GRUB_EFI_GREEN): Likewise.
8140         (GRUB_EFI_CYAN): Likewise.
8141         (GRUB_EFI_RED): Likewise.
8142         (GRUB_EFI_MAGENTA): Likewise.
8143         (GRUB_EFI_BROWN): Likewise.
8144         (GRUB_EFI_LIGHTGRAY): Likewise.
8145         (GRUB_EFI_BRIGHT): Likewise.
8146         (GRUB_EFI_DARKGRAY): Likewise.
8147         (GRUB_EFI_LIGHTBLUE): Likewise.
8148         (GRUB_EFI_LIGHTGREEN): Likewise.
8149         (GRUB_EFI_LIGHTCYAN): Likewise.
8150         (GRUB_EFI_LIGHTRED): Likewise.
8151         (GRUB_EFI_LIGHTMAGENTA): Likewise.
8152         (GRUB_EFI_YELLOW): Likewise.
8153         (GRUB_EFI_WHITE): Likewise.
8154         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8155         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8156         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8157         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8158         (GRUB_EFI_BACKGROUND_RED): Likewise.
8159         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8160         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8161         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8162         (GRUB_EFI_TEXT_ATTR): Likewise.
8164         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8165         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8166         (kernel_mod_HEADERS): Added efi/time.h.
8168 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
8170         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8171         include/grub/efi/api.h, include/grub/efi/console_control.h,
8172         include/grub/efi/efi.h, include/grub/efi/pe32.h,
8173         include/grub/i386/efi/time.h, kern/efi/efi.c,
8174         kern/i386/efi/init.c, kern/i386/efi/startup.S,
8175         and util/i386/efi/grub-mkimage.c.
8177         * Makefile.in (RMKFILES): Added i386-efi.rmk.
8179         * genmk.rb (PModule#rule): Do not export symbols if
8180         #{prefix}_EXPORTS is set to "no".
8182         * conf/i386-efi.mk: New file.
8183         * conf/i386-efi.rmk: Likewise.
8184         * include/grub/efi/api.h: Likewise.
8185         * include/grub/efi/console_control.h: Likewise.
8186         * include/grub/efi/efi.h: Likewise.
8187         * include/grub/efi/pe32.h: Likewise.
8188         * include/grub/i386/efi/time.h: Likewise.
8189         * kern/efi/efi.c: Likewise.
8190         * kern/i386/efi/init.c: Likewise.
8191         * kern/i386/efi/startup.S: Likewise.
8192         * util/i386/efi/grub-mkimage.c: Likewise.
8194 2006-04-17  Marco Gerards  <marco@gnu.org>
8196         * include/grub/script.h: Include <grub/parser.h> and
8197         "grub_script.tab.h".
8198         (struct grub_lexer_param): New struct.
8199         (struct grub_parser_param): Likewise.
8200         (grub_script_create_arglist): Pass the state in an argument.
8201         (grub_script_add_arglist): Likewise.
8202         (grub_script_create_cmdline): Likewise.
8203         (grub_script_create_cmdblock): Likewise.
8204         (grub_script_create_cmdif): Likewise.
8205         (grub_script_create_cmdmenu): Likewise.
8206         (grub_script_add_cmd): Likewise.
8207         (grub_script_arg_add): Likewise.
8208         (grub_script_lexer_ref): Likewise.
8209         (grub_script_lexer_deref): Likewise.
8210         (grub_script_lexer_record_start): Likewise.
8211         (grub_script_lexer_record_stop): Likewise.
8212         (grub_script_mem_record): Likewise.
8213         (grub_script_mem_record_stop): Likewise.
8214         (grub_script_malloc): Likewise.
8215         (grub_script_yylex): Likewise.
8216         (grub_script_yyparse): Likewise.
8217         (grub_script_yyerror): Likewise.
8218         (grub_script_yylex): Likewise.
8219         (grub_script_lexer_init): Return the state.
8221         * normal/lexer.c (grub_script_lexer_state): Removed variable.
8222         (grub_script_lexer_done): Likewise.
8223         (grub_script_lexer_getline): Likewise.
8224         (grub_script_lexer_refs): Likewise.
8225         (script): Likewise.
8226         (newscript): Likewise.
8227         (record): Likewise.
8228         (recording): Likewise.
8229         (recordpos): Likewise.
8230         (recordlen): Likewise.
8231         (grub_script_lexer_init): Return the state instead of setting
8232         global variables.
8233         (grub_script_lexer_ref): Use the newly added argument for state
8234         instead of globals.
8235         (grub_script_lexer_deref): Likewise.
8236         (grub_script_lexer_record_start): Likewise.
8237         (grub_script_lexer_record_stop): Likewise.
8238         (recordchar): Likewise.
8239         (nextchar): Likewise.
8240         (grub_script_yylex2): Likewise.
8241         (grub_script_yylex): Likewise.
8242         (grub_script_yyerror): Likewise.
8244         * normal/parser.y (func_mem): Removed variable.
8245         (menu_entry): Likewise.
8246         (err): Likewise.
8247         (%lex-param): New parser option.
8248         (%parse-param): Likewise.
8249         (script): Always return the AST.
8250         (argument): Pass the state around.
8251         (arguments): Likewise.
8252         (grubcmd): Likewise.
8253         (commands): Likewise.
8254         (function): Likewise.
8255         (menuentry): Likewise.
8256         (if_statement): Likewise.
8257         (if): Likewise.
8259         * normal/script.c (grub_script_memused): Removed variable.
8260         (grub_script_parsed): Likewise.
8261         (grub_script_malloc): Added a state argument.  Use that instead of
8262         global variables.
8263         (grub_script_mem_record): Likewise.
8264         (grub_script_mem_record_stop): Likewise.
8265         (grub_script_arg_add): Likewise.
8266         (grub_script_add_arglist): Likewise.
8267         (grub_script_create_cmdline): Likewise.
8268         (grub_script_create_cmdif): Likewise.
8269         (grub_script_create_cmdmenu): Likewise.
8270         (grub_script_add_cmd): Likewise.
8271         (grub_script_parse): Setup the state before calling the parser.
8273 2006-04-16  Marco Gerards  <marco@gnu.org>
8275         * normal/command.c (grub_command_init): Remove the title command.
8277         * normal/lexer.c (grub_script_yylex): Renamed from this...
8278         (grub_script_yylex2): ... to this.
8279         (grub_script_yylex): New function.  Temporary
8280         introduced to filter some tokens.
8281         (grub_script_yyerror): Print a newline.
8283         * normal/main.c (read_config_file): Output information about the
8284         lines that contain errors.  Wait for a key after all lines have
8285         been processed.  Don't return an empty menu.
8287         * normal/parser.y (func_mem): Don't initialize.
8288         (menu_entry): Likewise.
8289         (err): New variable.
8290         (script): Don't return anything when an error was encountered.
8291         (ws, returns): Removed rules.
8292         (argument): Disabled concatenated variable support.
8293         (arguments): Remove explicit separators.
8294         (grubcmd): Likewise.
8295         (function): Likewise.
8296         (menuentry): Likewise.
8297         (if): Likewise.
8298         (commands): Likewise.  Add error handling.
8300         * normal/script.c (grub_script_create_cmdline): If
8301         `grub_script_parsed' is 0, assume the parser encountered an error.
8303 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
8305         * configure.ac: Add support for EFI. Fix the typo
8306         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8308 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
8310         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
8311         foreign multibyte characters should be shown correctly.
8313 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
8315         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8316         calculation.
8317         (read_config_file): Made it to close file before returning.
8319 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
8321         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
8322         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
8323         video/i386/pc/vbefill.c.
8325         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
8326         video/i386/pc/vbefill.c.
8328         * include/grub/video.h (grub_video_blit_format): New enum.
8329         (grub_video_mode_info): Added new member blit_format.
8330         (grub_video_get_blit_format): New function prototype.
8332         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
8333         function prototype.
8334         (grub_video_vbe_map_rgb): Likewise.
8335         (grub_video_vbe_unmap_color): Likewise.
8337         * include/grub/i386/pc/vbeblit.h: New file.
8339         * include/grub/i386/pc/vbefill.h: New file.
8341         * video/video.c (grub_video_get_blit_format): New function.
8342         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
8343         (grub_video_vbe_map_rgb): Likewise.
8344         (grub_video_vbe_unmap_color): Likewise.
8346         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
8347         optimized fills.
8348         (grub_video_vbe_blit_render_target): Changed to use more optimized
8349         blits.
8350         (grub_video_vbe_setup): Added detection for optimized settings.
8351         (grub_video_vbe_create_render_target): Likewise.
8353         * video/i386/pc/vbeblit.c: New file.
8355         * video/i386/pc/vbefill.c: New file.
8357 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
8359         * font/manager.c (grub_font_get_glyph): Removed font fixup from
8360         here...
8362         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
8363         parsing to support both hex and dec ranges.  If filename was missing
8364         show usage information.
8366 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
8368         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
8369         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
8371         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
8372         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
8373         (video_mod_SOURCES): Added.
8374         (video_mod_CFLAGS): Likewise.
8375         (video_mod_LDFLAGS): Likewise.
8376         (gfxterm_mod_SOURCES): Likewise.
8377         (gfxterm_mod_CFLAGS): Likewise.
8378         (gfxterm_mod_LDFLAGS): Likewise.
8379         (videotest_mod_SOURCES): Likewise.
8380         (videotest_mod_CFLAGS): Likewise.
8381         (videotest_mod_LDFLAGS): Likewise.
8382         (vesafb_mod_SOURCES): Removed.
8383         (vesafb_mod_CFLAGS): Likewise.
8384         (vesafb_mod_LDFLAGS): Likewise.
8385         (vga_mod_SOURCES): Likewise.
8386         (vga_mod_CFLAGS): Likewise.
8387         (vga_mod_LDFLAGS): Likewise.
8389         * commands/videotest.c: New file.
8391         * font/manager.c (fill_with_default_glyph): Modified to use
8392         grub_font_glyph.
8393         (grub_font_get_glyph): Likewise.
8394         (fontmanager): Renamed from this...
8395         (font_manager): ... to this.
8397         * include/grub/font.h (grub_font_glyph): Added new structure.
8398         (grub_font_get_glyph): Modified to use grub_font_glyph.
8400         * include/grub/misc.h (grub_abs): Added as inline function.
8402         * include/grub/video.h: New file.
8404         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8405         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8406         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8407         (grub_vbe_get_controller_info): Renamed from this...
8408         (grub_vbe_bios_get_controller_info): ... to this.
8409         (grub_vbe_get_mode_info): Renamed from this...
8410         (grub_vbe_bios_get_mode_info): ... to this.
8411         (grub_vbe_set_mode): Renamed from this...
8412         (grub_vbe_bios_set_mode): ... to this.
8413         (grub_vbe_get_mode): Renamed from this...
8414         (grub_vbe_bios_get_mode): ... to this.
8415         (grub_vbe_set_memory_window): Renamed from this...
8416         (grub_vbe_bios_set_memory_window): ... to this.
8417         (grub_vbe_get_memory_window): Renamed from this...
8418         (grub_vbe_bios_get_memory_window): ... to this.
8419         (grub_vbe_set_scanline_length): Renamed from this...
8420         (grub_vbe_set_scanline_length): ... to this.
8421         (grub_vbe_get_scanline_length): Renamed from this...
8422         (grub_vbe_bios_get_scanline_length): ... to this.
8423         (grub_vbe_set_display_start): Renamed from this...
8424         (grub_vbe_bios_set_display_start): ... to this.
8425         (grub_vbe_get_display_start): Renamed from this...
8426         (grub_vbe_bios_get_display_start): ... to this.
8427         (grub_vbe_set_palette_data): Renamed from this...
8428         (grub_vbe_bios_set_palette_data): ... to this.
8429         (grub_vbe_set_pixel_rgb): Removed.
8430         (grub_vbe_set_pixel_index): Likewise.
8432         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8433         from this...
8434         (grub_vbe_bios_get_controller_info): ... to this.
8435         (grub_vbe_get_mode_info): Renamed from this...
8436         (grub_vbe_bios_get_mode_info): ... to this.
8437         (grub_vbe_set_mode): Renamed from this...
8438         (grub_vbe_bios_set_mode): ... to this.
8439         (grub_vbe_get_mode): Renamed from this...
8440         (grub_vbe_bios_get_mode): ... to this.
8441         (grub_vbe_set_memory_window): Renamed from this...
8442         (grub_vbe_bios_set_memory_window): ... to this.
8443         (grub_vbe_get_memory_window): Renamed from this...
8444         (grub_vbe_bios_get_memory_window): ... to this.
8445         (grub_vbe_set_scanline_length): Renamed from this...
8446         (grub_vbe_set_scanline_length): ... to this.
8447         (grub_vbe_get_scanline_length): Renamed from this...
8448         (grub_vbe_bios_get_scanline_length): ... to this.
8449         (grub_vbe_set_display_start): Renamed from this...
8450         (grub_vbe_bios_set_display_start): ... to this.
8451         (grub_vbe_get_display_start): Renamed from this...
8452         (grub_vbe_bios_get_display_start): ... to this.
8453         (grub_vbe_set_palette_data): Renamed from this...
8454         (grub_vbe_bios_set_palette_data): ... to this.
8455         (grub_vbe_bios_get_controller_info): Fixed problem with registers
8456         getting corrupted after calling it.  Added more pushes and pops.
8457         (grub_vbe_bios_set_mode): Likewise.
8458         (grub_vbe_bios_get_mode): Likewise.
8459         (grub_vbe_bios_get_memory_window): Likewise.
8460         (grub_vbe_bios_set_scanline_length): Likewise.
8461         (grub_vbe_bios_get_scanline_length): Likewise.
8462         (grub_vbe_bios_get_display_start): Likewise.
8463         (grub_vbe_bios_set_palette_data): Likewise.
8465         * normal/cmdline.c (cl_set_pos): Refresh the screen.
8466         (cl_insert): Likewise.
8467         (cl_delete): Likewise.
8469         * term/gfxterm.c: New file.
8471         * term/i386/pc/vesafb.c: Removed file.
8473         * video/video.c: New file.
8475         * video/i386/pc/vbe.c (real2pm): Added new function.
8476         (grub_video_vbe_draw_pixel): Likewise.
8477         (grub_video_vbe_get_video_ptr): Likewise.
8478         (grub_video_vbe_get_pixel): Likewise
8479         (grub_video_vbe_init): Likewise.
8480         (grub_video_vbe_fini): Likewise.
8481         (grub_video_vbe_setup): Likewise.
8482         (grub_video_vbe_get_info): Likewise.
8483         (grub_video_vbe_set_palette): Likewise.
8484         (grub_video_vbe_get_palette): Likewise.
8485         (grub_video_vbe_set_viewport): Likewise.
8486         (grub_video_vbe_get_viewport): Likewise.
8487         (grub_video_vbe_map_color): Likewise.
8488         (grub_video_vbe_map_rgb): Likewise.
8489         (grub_video_vbe_map_rgba): Likewise.
8490         (grub_video_vbe_unmap_color): Likewise.
8491         (grub_video_vbe_fill_rect): Likewise.
8492         (grub_video_vbe_blit_glyph): Likewise.
8493         (grub_video_vbe_blit_bitmap): Likewise.
8494         (grub_video_vbe_blit_render_target): Likewise.
8495         (grub_video_vbe_scroll): Likewise.
8496         (grub_video_vbe_swap_buffers): Likewise.
8497         (grub_video_vbe_create_render_target): Likewise.
8498         (grub_video_vbe_delete_render_target): Likewise.
8499         (grub_video_vbe_set_active_render_target): Likewise.
8500         (grub_vbe_set_pixel_rgb): Remove function.
8501         (grub_vbe_set_pixel_index): Likewise.
8502         (index_color_mode): Remove static variable.
8503         (active_mode): Likewise.
8504         (framebuffer): Likewise.
8505         (bytes_per_scan_line): Likewise.
8506         (grub_video_vbe_adapter): Added new static variable.
8507         (framebuffer): Likewise.
8508         (render_target): Likewise.
8509         (initial_mode): Likewise.
8510         (mode_in_use): Likewise.
8511         (mode_list): Likewise.
8513 2006-03-10  Marco Gerards  <marco@gnu.org>
8515         * configure.ac (AC_INIT): Bumped to 1.93.
8517         * DISTLIST: Added `include/grub/hfs.h'.
8519 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
8521         * boot/i386/pc/boot.S (general_error): Before looping, try INT
8522         18H, which might help the BIOS falling back to next boot media.
8524 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
8526         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
8527         Poe Chen <poe.poechen@gmail.com>.
8529 2006-01-17  Marco Gerards  <marco@gnu.org>
8531         * include/grub/normal.h: Include <grub/script.h>.
8532         (grub_command_list): Removed struct.
8533         (grub_command_list_t): Removed type.
8534         (grub_menu_entry): Remove members `num' and `command_list'.  Add
8535         members `commands' and `sourcecode'.
8536         * include/grub/script.h: Add inclusion guards.
8537         (grub_script_cmd_menuentry): New struct.
8538         (grub_script_execute_menuentry): New prototype.
8539         (grub_script_lexer_record_start): Likewise.
8540         (grub_script_lexer_record_stop): Likewise.
8541         * normal/execute.c (grub_script_execute_menuentry): New function.
8542         * normal/lexer.c (record, recording, recordpos, recordlen): New
8543         variables.
8544         (grub_script_lexer_record_start): New function.
8545         (grub_script_lexer_record_stop): Likewise.
8546         (recordchar): Likewise.
8547         (nextchar): Likewise.
8548         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
8549         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
8550         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
8551         (current_menu): New variable.
8552         (free_menu): Mainly rewritten.
8553         (grub_normal_menu_addentry): New function.
8554         (read_config_file): Rewritten.
8555         * normal/menu.c (run_menu_entry): Mainly rewritten.
8556         * normal/menu_entry.c (make_screen): Rewritten the code to insert
8557         the menu entry.
8558         (run): Mainly rewritten.
8559         * normal/parser.y (menu_entry): New variable.
8560         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
8561         (menuentry): New rule.
8562         (command): Add `menuentry'.
8563         (if_statement): Allow additional returns before `fi'.
8564         * normal/script.c (grub_script_create_cmdmenu): New function.
8566 2006-01-03  Marco Gerards  <marco@gnu.org>
8568         * INSTALL: GNU Bison is required.
8569         * configure.ac: Rewritten the test to detect Bison.
8570         * Makefile.in (YACC): New variable.  Reported by Xun Sun
8571         <xun.sun.cn@gmail.com>.
8573 2006-01-03  Marco Gerards  <marco@gnu.org>
8575         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
8576         the HFS+ filesystem to filesystem blocks.
8577         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
8578         GCC warning is silenced.
8580 2006-01-03  Marco Gerards  <marco@gnu.org>
8582         * partmap/apple.c (apple_partition_map_iterate): Convert the data
8583         read from disk from big endian to host byte order.
8585 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
8587         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
8588         documentation.
8589         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
8590         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
8591         embedded HFS+ filesystem.
8592         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
8593         (grub_hfs_sblock): Move from here...
8594         * include/grub/hfs.h: To here...  New file.
8595         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
8596         documentation.
8597         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
8598         New macros.
8599         (grub_hfsplus_volheader): Change type of member `magic' to
8600         `grub_uint16_t'.
8601         (grub_hfsplus_data): Add new member `embedded_offset'.
8602         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
8603         returned block.
8604         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
8605         Calculate the offset.
8607 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
8609         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
8610         Removed.
8611         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
8613 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
8615         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
8616         ENV->NAME is NULL after allocating ENV->VALUE.
8618 2005-12-25  Marco Gerards  <marco@gnu.org>
8620         * kern/env.c (grub_env_set): Rewritten the error handling code.
8622 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
8624         * geninit.sh: Made more robust, and more portable.
8626 2005-12-25  Marco Gerards  <marco@gnu.org>
8628         Add support for Apple HFS+ filesystems.
8630         * fs/hfsplus.c: New file.
8632         * DISTLIST: Added `fs/hfsplus.c'.
8634         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
8635         (hfsplus_mod_SOURCES): New variable.
8636         (hfsplus_mod_CFLAGS): Likewise.
8637         (hfsplus_mod_LDFLAGS): Likewise.
8638         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
8639         (grub_setup_SOURCES): Likewise.
8640         (grub_mkdevicemap_SOURCES): Likewise.
8641         (grub_emu_SOURCES): Likewise.
8642         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8644         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
8646         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
8648 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
8650         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
8651         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
8652         include/grub/parser.h, include/grub/script.h, kern/parser.c,
8653         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
8654         normal/lexer.c, normal/parser.y, normal/script.c, and
8655         partmap/gpt.c.
8656         Removed kern/sparc64/cache.c.
8658         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
8659         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
8660         grub_emu_init.c.
8662         * configure.ac (AC_INIT): Bumped to 1.92.
8664 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
8666         * kern/err.c (grub_error_push): Added new function to support error
8667         stacks.
8668         (grub_error_pop): Likewise.
8669         (grub_error_stack_items): New local variable to support error stacks.
8670         (grub_error_stack_pos): Likewise.
8671         (grub_error_stack_assert): Likewise.
8672         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
8673         stack depth.
8674         (grub_print_error): Added support to print errors from error stack.
8676         * include/grub/err.h (grub_error_push): Added function prototype.
8677         (grub_error_pop): Likewise.
8679 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
8681         * configure.ac: Accept `powerpc64' as host_cpu.
8682         (amd64): Rename to `biarch32'.
8684         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
8685         non-cacheline-aligned addresses.
8687         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
8688         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
8689         if `size' is non-zero.
8691 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
8693         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
8694         and `cd' to make sure the filename is not prefixed with a
8695         directory name.
8696         (pkgdata_MODULES): Add `gpt.mod'.
8697         (gpt_mod_SOURCES): New variable.
8698         (gpt_mod_CFLAGS): Likewise.
8699         (gpt_mod_LDFLAGS): Likewise.
8701         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
8703         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
8704         New macro.
8706         * partmap/gpt.c: New file.
8708         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
8709         GPT partition map is detected.
8711 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
8713         * commands/i386/pc/play.c: New file.
8714         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
8715         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
8716         macros.
8718 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
8720         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
8721         ((unused))' to silence gcc warning.
8723 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
8725         * configure.ac: Correct `AC_PROG_YACC' test.
8727 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8729         * util/powerpc/ieee1275/grub-install.in: Run the mount point
8730         check before installing files.
8732 2005-11-22  Mike Small  <smallm@panix.com>
8734         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
8735         number regex so multidigit numbers are recognized correctly.
8737 2005-11-22  Mike Small  <smallm@panix.com>
8739         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
8740         debugging message before attempting to claim memory.
8741         (grub_rescue_cmd_initrd): Add a claim debugging message and try
8742         multiple addresses in case of failure.
8744 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8746         * term/tparm.c (get_space): Remove empty `if' statement.
8748         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
8750         * kern/parser.c (check_varstate): Rename `state' to 's'.
8752 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8754         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
8755         variable definitions to the beginning of each function.  Sort stack
8756         variables by size.
8757         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
8758         `buf' argument to `char *'.
8760 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8762         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
8763         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
8764         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
8765         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
8766         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
8767         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
8768         configfile.mod, search.mod, gzio.mod and test.mod.
8769         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
8770         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
8771         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
8772         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
8773         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
8774         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
8775         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
8776         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
8777         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
8778         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
8779         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8780         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8781         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
8782         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
8783         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
8784         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
8785         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8786         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
8787         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
8788         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
8789         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
8790         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
8791         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
8793         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
8794         `grep --include'.
8795         (pkgdata_MODULES): Add test.mod.
8797 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
8799         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
8800         appending to variables with "+=".
8801         (PModule): Use full pathname to generate *.lst filenames.
8803         * Makefile.in: Fixed list rules moved from genmk.rb.
8804         (.DELETE_ON_ERROR): New special target.
8805         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
8807         * conf/i386-pc.rmk: Include conf/common.mk.
8808         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
8809         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
8810         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
8811         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
8812         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
8813         configfile.mod, search.mod, gzio.mod and test.mod.
8814         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
8815         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
8816         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
8817         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
8818         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
8819         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
8820         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
8821         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
8822         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
8823         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
8824         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8825         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8826         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
8827         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
8828         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
8829         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
8830         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8831         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
8832         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
8833         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
8834         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
8835         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
8836         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
8837         here...
8838         * conf/common.rmk: ... to here.  New file.
8840         * conf/common.mk: New file.
8842 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
8844         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
8845         (grub_script.tab.c): ... here.
8847         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
8848         (grub_script.tab.c): ... here.
8850         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
8851         (grub_script.tab.c): ... here.
8853         * normal/command.c (grub_command_find): Fixed a memory leak of
8854         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
8856 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
8858         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
8859         "@" which marks the start of a comment on ARM.
8860         (VARIABLE): Likewise.
8862 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
8864         Add support for Linux/ADFS partition tables.
8866         * partmap/acorn.c: New file.
8868         * include/grub/acorn_filecore.h: Likewise.
8870         * DISTLIST: Added `partmap/acorn.c' and
8871         `include/grub/acorn_filecore.h'.
8873         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8874         `partmap/acorn.c'.
8875         (pkgdata_MODULES): Add `acorn.mod'.
8876         (acorn_mod_SOURCES): New variable.
8877         (acorn_mod_CFLAGS): Likewise.
8879         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
8880         `partmap/acorn.c'.
8881         (pkgdata_MODULES): Add `acorn.mod'.
8882         (acorn_mod_SOURCES): New variable.
8883         (acorn_mod_CFLAGS): Likewise.
8885         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
8886         (pkgdata_MODULES): Add `acorn.mod'.
8887         (acorn_mod_SOURCES): New variable.
8888         (acorn_mod_CFLAGS): Likewise.
8889         (acorn_mod_LDFLAGS): Likewise.
8891         * include/types.h (grub_disk_addr_t): New typedef.
8893 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
8895         * geninit.sh: New file.
8897         * geninitheader.sh: Likewise.
8899         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
8900         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
8901         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
8902         * commands/configfile.c (grub_configfile_init)
8903         (grub_configfile_fini): Likewise.
8904         * commands/default.c (grub_default_init, grub_default_fini):
8905         Likewise.
8906         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
8907         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
8908         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
8909         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
8910         Likewise.
8911         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
8912         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
8913         Likewise.
8914         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
8915         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
8916         Likewise.
8917         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
8918         Likewise.
8919         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
8920         Likewise.
8921         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
8922         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
8923         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
8924         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
8925         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
8926         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
8927         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
8928         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
8929         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
8930         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
8931         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
8932         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
8933         * partmap/amiga.c (grub_amiga_partition_map_init)
8934         (grub_amiga_partition_map_fini): Likewise.
8935         * partmap/apple.c (grub_apple_partition_map_init)
8936         (grub_apple_partition_map_fini): Likewise.
8937         * partmap/pc.c (grub_pc_partition_map_init)
8938         (grub_pc_partition_map_fini): Likewise.
8939         * partmap/sun.c (grub_sun_partition_map_init,
8940         grub_sun_partition_map_fini): Likewise.
8941         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
8942         Likewise.
8944         * util/grub-emu.c: Include <grub_modules_init.h>.
8945         (main): Don't initialize and de-initialize any modules directly,
8946         use `grub_init_all' and `grub_fini_all' instead.
8948         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
8949         `grub_vesafb_mod_init'.
8950         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
8951         all users.
8952         * term/i386/pc/vga.c (grub_vga_init): Renamed to
8953         `grub_vga_mod_init'.  Updated all users.
8954         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
8956         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
8957         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
8958         rules.
8960         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
8961         Generate a function to initialize the module in utilities.
8962         Updated all callers.
8963         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
8964         initialize the module in utilities.  Updated all callers.
8966 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
8968         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
8969         escape sequence and a literal ^L to clear the screen.
8971         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
8972         when returning from Open Firmware.
8974 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
8976         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
8977         (grub_ofconsole_height): Likewise.
8978         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
8979         manually insert a '\n'.
8980         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
8981         `grub_ofconsole_height'.  Return early if these are already set.
8983 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
8985         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
8986         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
8987         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
8988         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
8989         and `normal/script.c'.
8990         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8991         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8992         (test_mod_SOURCES): New variable.
8993         (test_mod_CFLAGS): Likewise.
8994         (test_mod_LDFLAGS): Likewise.
8995         (pkgdata_MODULES): Add `test.mod'.
8996         (grub_script.tab.c): New rule.
8997         (grub_script.tab.h): Likewise.
8999 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
9001         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9002         `commands/test.c', `normal/execute.c', `normal/lexer.c',
9003         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9004         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9005         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9006         (test_mod_SOURCES): New variable.
9007         (test_mod_CFLAGS): Likewise.
9008         (pkgdata_MODULES): Add `test.mod'.
9009         (grub_script.tab.c): New rule.
9010         (grub_script.tab.h): Likewise.
9012 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
9014         Add initial scripting support.
9016         * commands/test.c: New file.
9017         * include/grub/script.h: Likewise.
9018         * normal/execute.c: Likewise.
9019         * normal/function.c: Likewise.
9020         * normal/lexer.c: Likewise.
9021         * normal/parser.y: Likewise.
9022         * normal/script.c: Likewise.
9024         * configure.ac: Add `AC_PROG_YACC' test.
9026         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9027         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9028         `normal/function.c' and `normal/script.c'.
9029         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9030         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9031         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9032         variables.
9033         (pkgdata_MODULES): Add `test.mod'.
9034         (grub_script.tab.c): New rule.
9035         (grub_script.tab.h): Likewise.
9037         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9039         * include/grub/normal.h (grub_test_init): New prototype.
9040         (grub_test_fini): Likewise.
9042         * normal/command.c: Include <grub/script.h>.
9043         (grub_command_execute): Rewritten.
9045         * util/grub-emu.c (main): Call `grub_test_init' and
9046         `grub_test_fini'.
9048 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9050         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9051         to 0.
9052         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9053         there are no pending characters.
9055 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9057         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9058         `grub_strndup' to drop device arguments. Replace unnecessary
9059         `grub_strndup' with `grub_strdup'.
9061 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9063         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9064         `debug' environment variable has been set.
9066 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
9068         * Makefile.in (install-local): Use $(DATA).
9069         (uninstall): Likewise.
9070         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9071         (sbin_UTILITIES): ... to here.
9072         (sbin_SCRIPTS): New variable.
9073         (grub_install_SOURCES): New variable.
9074         * util/powerpc/ieee1275/grub-install.in: New file.
9075         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9076         variable.
9077         (add_segments): Call `grub_util_get_path'.
9079 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
9081         From Timothy Baldwin:
9082         * commands/ls.c (grub_ls_list_files): Close FILE with
9083         grub_file_close.
9084         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9086 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
9088         * include/grub/parser.h: New file.
9090         * kern/parser.c: Likewise.
9092         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9093         (grub_setup_SOURCES): Likewise.
9094         (grub_probefs_SOURCES): Likewise.
9095         (grub_emu_SOURCES): Likewise.
9096         (kernel_img_HEADERS): Add `parser.h'.
9098         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9099         (grub_emu_SOURCES): Add `kern/parser.c'.
9100         (grubof_SOURCES): Likewise.
9102         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9103         (grubof_SOURCES): Add `kern/parser.c'.
9105         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9107         * kern/misc.c (grub_split_cmdline): Removed function.
9109         * kern/rescue.c: Include <grub/parser.h>.
9110         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9111         of `grub_split_cmdline'.
9113         * normal/command.c: Include <grub/parser.h>.
9114         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
9115         of `grub_split_cmdline'.
9117         * normal/completion.c: Include <grub/parser.h>.
9118         (cmdline_state): New variable.
9119         (iterate_dir): End the filename with a quote depending on the
9120         command line state.
9121         (get_state): new function.
9122         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9123         split the arguments and determine the current argument.  When the
9124         argument string is not quoted, escape all spaces.
9126 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9128         * normal/sparc64/setjmp.S: New file.
9130 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9132         * include/grub/sparc64/libgcc.h: New file.
9133         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9134         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9135         normal/sparc64/setjmp.c.
9137 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9139         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9140         * kern/sparc64/cache.S: New file.
9141         * kern/sparc64/cache.c: Removed.
9142         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9143         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
9144         -mtune=ultrasparc.
9145         (COMMON_LDFLAGS): Add -melf64_sparc.
9146         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9147         (grubof_SOURCES): Use cache.S instead of cache.c.
9148         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
9149         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9150         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9151         commented though.
9152         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9153         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9154         (linux_mod_CFLAGS): Commented out.
9155         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9156         out because module isn't built.
9157         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9158         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9159         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9160         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9161         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9162         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9163         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9164         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9165         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9166         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9167         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9168         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9169         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9170         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9172 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
9174         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9175         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9176         longer, because HFS should not be used on PC.
9178 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9180         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9181         consistently within the loop.
9183 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
9185         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9186         directory can not be read.
9188 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9190         * configure.ac (AC_INIT): Increase the version number to 1.91.
9192         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9193         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9194         term/i386/pc/serial.c.
9196 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9198         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9199         file size must be permitted.
9201         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9202         between %ah and %al.
9204 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9206         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9207         grub_uint64_t.
9208         Call the hook with a NUL-terminated filename.
9209         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9210         grub_cpu_to_be32.
9212         * kern/term.c (cursor_state): New variable.
9213         (grub_term_set_current): Reset the cursor state on a new
9214         terminal.
9215         (grub_setcursor): Rewritten to use CURSOR_STATE.
9216         (grub_getcursor): New function.
9218         * include/grub/term.h (grub_getcursor): New prototype.
9220         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9221         integers on ARM. Reported by Timothy Baldwin
9222         <T.E.Baldwin99@members.leeds.ac.uk>.
9224 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
9226         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9227         allocated.
9228         (grub_sfs_dir): Likewise.
9230 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
9232         Add support for the SFS filesystem.
9234         * fs/sfs.c: New file.
9236         * DISTLIST: Added `fs/sfs.c'.
9238         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9239         (grub_probefs_SOURCES): Likewise.
9240         (grub_emu_SOURCES): Likewise.
9241         (pkgdata_MODULES): Add `sfs.mod'.
9242         (sfs_mod_SOURCES): New variable.
9243         (sfs_mod_CFLAGS): Likewise.
9244         (sfs_mod_LDFLAGS): Likewise.
9246         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9247         (pkgdata_MODULES): Add `sfs.mod'.
9248         (sfs_mod_SOURCES): New variable.
9249         (sfs_mod_CFLAGS): Likewise.
9251         * util/grub-emu.c (main): Call `grub_sfs_init' and
9252         `grub_sfs_fini'.
9254         * include/grub/fs.h (grub_sfs_init): New prototype.
9255         (grub_sfs_fini): Likewise.
9257 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
9259         Add support for the AFFS filesystem.
9261         * fs/affs.c: New file.
9263         * DISTLIST: Added `fs/affs.c'.
9265         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9266         (grub_probefs_SOURCES): Likewise.
9267         (grub_emu_SOURCES): Likewise.
9268         (pkgdata_MODULES): Add `affs.mod'.
9269         (affs_mod_SOURCES): New variable.
9270         (affs_mod_CFLAGS): Likewise.
9271         (affs_mod_LDFLAGS): Likewise.
9273         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9274         (pkgdata_MODULES): Add `affs.mod'.
9275         (affs_mod_SOURCES): New variable.
9276         (affs_mod_CFLAGS): Likewise.
9278         * util/grub-emu.c (main): Call `grub_affs_init' and
9279         `grub_affs_fini'.
9281         * include/grub/fs.h (grub_affs_init): New prototype.
9282         (grub_affs_fini): Likewise.
9284 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
9286         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9288 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
9290         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
9291         `-m32' to CFLAGS.
9293         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9294         linking.
9296         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9297         (COMMON_LDFLAGS): New variable.
9298         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9299         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9300         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9301         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9302         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9303         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9304         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9305         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9306         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9307         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9308         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9309         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9310         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9311         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9312         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9313         variables.
9314         (normal_mod_ASFLAGS): Add `-m32'.
9316         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9317         (grub_host_size_t, grub_host_ssize_t): New types.
9318         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
9319         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
9320         `GRUB_HOST_SIZEOF_VOID_P'.
9322         * include/grub/kernel.h (struct grub_module_header): Type of
9323         member offset changed to `grub_host_off_t'.  Type of member size
9324         changed to `grub_host_size_t'.
9325         (struct grub_module_info): Type of member offset changed to
9326         `grub_host_off_t'.  Type of member size changed to
9327         `grub_host_size_t'.
9329 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
9331         Make GRUB's kernel compliant to Multiboot Specification.
9333         * kern/i386/pc/startup.S (multiboot_header): New label.
9334         (multiboot_entry): Likewise.
9335         (multiboot_trampoline): Likewise.
9337         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9338         Increased to 0x4A0.
9340         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
9341         put parentheses after a question mark.
9342         [!GRUB_UTIL] (my_mod): New variable.
9344         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
9346 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
9348         Adds support for the XFS filesystem.  Btrees are not supported
9349         yet.
9351         * fs/xfs.c: New file.
9353         * DISTLIST: Added `fs/xfs.c'.
9355         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
9356         (grub_probefs_SOURCES): Likewise.
9357         (grub_emu_SOURCES): Likewise.
9358         (pkgdata_MODULES): Add `xfs.mod'.
9359         (xfs_mod_SOURCES): New variable.
9360         (xfs_mod_CFLAGS): Likewise.
9362         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
9363         (pkgdata_MODULES): Add `xfs.mod'.
9364         (xfs_mod_SOURCES): New variable.
9365         (xfs_mod_CFLAGS): Likewise.
9367         * util/grub-emu.c (main): Call `grub_xfs_init' and
9368         `grub_xfs_fini'.
9370         * include/grub/fs.h (grub_xfs_init): New prototype.
9371         (grub_xfs_fini): Likewise.
9374 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
9376         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
9377         color modes, allow greater than 16 colors to be configured as
9378         a default palette.
9380 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9382         * normal/completion.c (complete_arguments): Add the qualifier
9383         const into OPTIONS.
9385         From Omniflux <omniflux+lists@omniflux.com>:
9386         * include/grub/terminfo.h: New file.
9387         * include/grub/tparm.h: Likewise.
9388         * include/grub/i386/pc/serial.h: Likewise.
9389         * term/terminfo.c: Likewise.
9390         * term/tparm.c: Likewise.
9391         * term/i386/pc/serial.c: Likewise.
9392         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9393         serial.mod.
9394         (terminfo_mod_SOURCES): New variable.
9395         (terminfo_mod_CFLAGS): Likewise.
9396         (serial_mod_SOURCES): Likewise.
9397         (serial_mod_CFLAGS): Likewise.
9399 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
9401         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9402         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9403         and kern/powerpc/ieee1275/cmain.c, respectively.
9405         * boot/powerpc/ieee1275/crt0.S: Moved to ...
9406         * kern/powerpc/ieee1275/crt0.S: ... here.
9408         * boot/powerpc/ieee1275/cmain.c: Moved to ...
9409         * kern/powerpc/ieee1275/cmain.c: ... here.
9411         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9412         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9413         instead of boot/powerpc/ieee1275/crt0.S and
9414         boot/powerpc/ieee1275/cmain.c, respectively.
9416         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9417         sectors. It was not used anyway.
9419 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
9421         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9422         `unused parameter' warning.
9424 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
9426         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9427         function.
9428         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9429         getcharwidth.
9431 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
9433         * include/grub/normal.h (enum grub_completion_type): Added
9434         `GRUB_COMPLETION_TYPE_ARGUMENT'.
9436         * normal/cmdline.c (print_completion): Handle
9437         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9438         * normal/menu_entry.c (store_completion): Likewise.
9440         * normal/completion.c (complete_arguments): New function.
9441         (grub_normal_do_completion): Call `complete_arguments' when the
9442         current words start with a dash.
9444 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
9446         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9447         `gzio.mod' instead of `io.mod').
9449 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
9451         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9452         (DISTDIRS): Added io and video.
9453         Rewrite the search routine to make an output consistently.
9455         * DISTLIST: Added conf/sparc64-ieee1275.mk,
9456         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9457         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9458         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9459         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9460         util/powerpc/ieee1275/misc.c.
9462         * include/grub/gzio.h: New file.
9463         * io/gzio.c: Likewise.
9465         * kern/file.c (grub_file_close): Call grub_device_close only if
9466         FILE->DEVICE is not NULL.
9468         * include/grub/mm.h [!NULL] (NULL): New macro.
9470         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
9472         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
9473         (pkgdata_MODULES): Added gzio.mod.
9474         (gzio_mod_SOURCES): New variable.
9475         (gzio_mod_CFLAGS): Likewise.
9477         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
9478         (pkgdata_MODULES): Added gzio.mod.
9479         (gzio_mod_SOURCES): New variable.
9480         (gzio_mod_CFLAGS): Likewise.
9482         * commands/cat.c: Include grub/gzio.h.
9483         (grub_cmd_cat): Use grub_gzfile_open instead of
9484         grub_file_open.
9486         * commands/cmp.c: Include grub/gzio.h.
9487         (grub_cmd_cmp): Use grub_gzfile_open instead of
9488         grub_file_open.
9490         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
9491         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
9492         grub_file_open.
9493         (grub_rescue_cmd_module): Likewise.
9495 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
9497         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
9498         kern/sparc64/ieee1275/init.c because it contains _start.
9499         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
9501 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
9503         * configure.ac: Add support for sparc64 host with ieee1275
9504         firmware.
9505         * configure: Generated from configure.ac.
9506         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
9507         instead of int.
9508         (grub_ofdisk_read): Likewise.
9509         (grub_ofdisk_open): Use %p to print pointer values, and cast the
9510         pointers as (void *) to remove a warning.
9511         (grub_ofdisk_close): Likewise.
9512         (grub_ofdisk_read): Likewise.
9513         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
9514         returns, so make it return void to remove a warning.
9515         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
9516         Corresponding prototype change.
9517         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
9518         values, and cast the pointers as (void *) to remove a warning.
9519         (grub_mm_dump): Likewise.
9520         * conf/sparc64-ieee1275.mk: New file.
9521         * conf/sparc64-ieee1275.rmk: Likewise.
9522         * include/grub/sparc64/setjmp.h: Likewise.
9523         * include/grub/sparc64/types.h: Likewise.
9524         * include/grub/sparc64/ieee1275/console.h: Likewise.
9525         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9526         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9527         * include/grub/sparc64/ieee1275/time.h: Likewise.
9528         * kern/sparc64/cache.c: Likewise.
9529         * kern/sparc64/dl.c: Likewise.
9530         * kern/sparc64/ieee1275/init.c: Likewise.
9531         * kern/sparc64/ieee1275/openfw.c: Likewise.
9533 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
9535         * util/console.c (grub_ncurses_putchar): If C is greater than
9536         0x7f, set C to a question mark.
9537         (grub_ncurses_getcharwidth): New function.
9538         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
9539         getcharwidth.
9541         * normal/menu.c (print_entry): Made aware of Unicode. First,
9542         convert TITLE to UCS-4, and predict the cursor position by
9543         grub_getcharwidth.
9545         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
9546         const to SRC.
9547         * kern/misc.c (grub_utf16_to_utf8): Likewise.
9549 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
9551         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
9552         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9553         grub_strcat.
9555         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
9556         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9557         grub_strcpy and grub_strlen. Take it into account that a space
9558         character is inserted as a delimiter.
9560 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
9562         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
9563         invalid magic in the error.
9565         * commands/search.c: New file.
9567         * util/grub-emu.c (main): Call grub_search_init and
9568         grub_search_fini.
9570         * kern/rescue.c (grub_rescue_print_disks): Removed.
9571         (grub_rescue_print_devices): New function.
9572         (grub_rescue_cmd_ls): Use grub_device_iterate with
9573         grub_rescue_print_devices instead of grub_disk_dev_iterate with
9574         grub_rescue_print_disks.
9576         * kern/partition.c (grub_partition_iterate): Return the result of
9577         PARTMAP->ITERATE instead of GRUB_ERRNO.
9579         * kern/device.c: Include grub/partition.h.
9580         (grub_device_iterate): New function.
9582         * include/grub/partition.h (grub_partition_iterate): Return int
9583         instead of grub_err_t.
9585         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
9586         prototype.
9587         [GRUB_UTIL] (grub_search_fini): Likewise.
9589         * include/grub/device.h (grub_device_iterate): New prototype.
9591         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9592         commands/search.c.
9593         (pkgdata_MODULES): Added search.mod.
9594         (search_mod_SOURCES): New variable.
9595         (search_mod_CFLAGS): Likewise.
9597         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
9598         (pkgdata_MODULES): Added search.mod.
9599         (search_mod_SOURCES): New variable.
9600         (search_mod_CFLAGS): Likewise.
9602         * commands/ls.c (grub_ls_list_disks): Renamed to ...
9603         (grub_ls_list_devices): ... this, and use grub_device_iterate.
9604         All callers changed.
9606         * DISTLIST: Added commands/search.c.
9608 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
9610         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
9611         conversion.
9612         (grub_getcharwidth): New function.
9614         * kern/misc.c (grub_utf8_to_ucs4): New function.
9616         * include/grub/term.h (struct grub_term): Added a new member
9617         "getcharwidth".
9618         (grub_getcharwidth): New prototype.
9620         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
9622         * term/i386/pc/console.c (map_char): New function. Segregated from
9623         grub_console_putchar.
9624         (grub_console_putchar): Use map_char.
9625         (grub_console_getcharwidth): New function.
9626         (grub_console_term): Specified grub_console_getcharwidth as
9627         getcharwidth.
9629         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
9630         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
9632         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
9633         GRUB_ERRNO.
9634         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
9635         on grub_strtoul completely.
9636         (write_char): Declare local variables in the beginning of the
9637         function.
9638         (grub_vesafb_getcharwidth): New function.
9639         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
9640         getcharwidth.
9642 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
9644         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
9645         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
9646         commands/i386/pc/vbetest.c.
9648         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
9649         call grub_vbe_get_controller_info again, because the returned
9650         information is volatile.
9651         (grub_vbe_set_video_mode): Mostly rewritten.
9652         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
9653         grub_vbe_status_t correctly.
9654         (grub_vbe_get_video_mode_info): Likewise.
9655         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
9656         several if statements.
9658         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
9659         * commands/i386/pc/vbeinfo.c: ... this.
9661         * commands/i386/pc/vbe_test.c: Renamed to ...
9662         * commands/i386/pc/vbetest.c: ... this.
9664         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
9665         ...
9666         (grub_cmd_vbeinfo): ... this. Save video modes before
9667         iterating. Skip a video mode, if it is not available, not enough
9668         information is given or it is monochrome. Show the memory
9669         model. Leave the interpretation of MODEVAR to grub_strtoul
9670         completely.
9671         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
9672         (GRUB_MOD_FINI): Likewise.
9674         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
9675         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
9676         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
9677         duplicated grub_env_get. Leave the interpretation of MODEVAR to
9678         grub_strtoul completely.
9679         (real2pm): Removed.
9680         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
9681         (GRUB_MOD_FINI): Likewise.
9683         * normal/misc.c: Include grub/mm.h.
9685         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
9686         vbe_list_modes with vbetest.mod and vbeinfo.mod.
9687         (vbe_list_modes_mod_SOURCES): Removed.
9688         (vbe_list_modes_mod_CFLAGS): Likewise.
9689         (vbe_test_mod_SOURCES): Likewise.
9690         (vbe_test_mod_CFLAGS): Likewise.
9691         (vbeinfo_mod_SOURCES): New variable.
9692         (vbeinfo_mod_CFLAGS): Likewise.
9693         (vbetest_mod_SOURCES): Likewise.
9694         (vbetest_mod_CFLAGS): Likewise.
9696 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
9698         * normal/misc.c: New file.
9700         * DISTLIST: Added normal/misc.c.
9702         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
9703         DISK to HOOK. Call HOOK with DISK.
9704         * partmap/apple.c (apple_partition_map_iterate): Likewise.
9705         * partmap/pc.c (pc_partition_map_iterate): Likewise.
9706         * partmap/sun.c (sun_partition_map_iterate): Likewise.
9708         * normal/menu_entry.c (struct screen): Added a new member
9709         "completion_shown".
9710         (completion_buffer): New global variable.
9711         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
9712         (store_completion): New function.
9713         (complete): Likewise.
9714         (clear_completions): Likewise.
9715         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
9716         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
9717         a tab, call complete.
9719         * normal/completion.c (disk_dev): Removed.
9720         (print_simple_completion): Likewise.
9721         (print_partition_completion): Likewise.
9722         (print_func): New global variable.
9723         (add_completion): Do not take the arguments WHAT or PRINT any
9724         longer. Added a new argument TYPE. Instead of printing directly,
9725         call PRINT_FUNC if not NULL.
9726         All callers changed.
9727         (complete_device): Use a local variable DEV instead of
9728         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
9729         (grub_normal_do_completion): Take a new argument HOOK. Do not
9730         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
9731         empty string, return NULL instead.
9732         All callers changed.
9734         * normal/cmdline.c (print_completion): New function.
9736         * kern/partition.c (grub_partition_iterate): Add an argument DISK
9737         to HOOK.
9738         All callers changed.
9740         * kern/disk.c (grub_print_partinfo): Removed.
9742         * include/grub/partition.h (struct grub_partition_map): Add a new
9743         argument DISK into HOOK of ITERATE.
9744         (grub_partition_iterate): Add a new argument DISK to HOOK.
9746         * include/grub/normal.h (enum grub_completion_type): New enum.
9747         (grub_completion_type_t): New type.
9748         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
9749         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
9750         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
9751         (GRUB_COMPLETION_TYPE_FILE): Likewise.
9752         (grub_normal_do_completion): Added a new argument HOOK.
9753         (grub_normal_print_device_info): New prototype.
9755         * include/grub/disk.h (grub_print_partinfo): Removed.
9757         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
9758         (normal_mod_SOURCES): Likewise.
9759         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9760         (normal_mod_SOURCES): Likewise.
9762         * commands/ls.c (grub_ls_list_disks): Use
9763         grub_normal_print_device_info instead of grub_print_partinfo. Free
9764         PNAME.
9765         (grub_ls_list_files): Use grub_normal_print_device_info instead of
9766         duplicating the code.
9768 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
9770         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
9771         follow GCS more precisely.
9772         * commands/i386/pc/vbe_test.c: Likewise.
9773         * include/grub/i386/pc/vbe.h: Likewise.
9774         * term/i386/pc/vesafb.c: Likewise.
9775         * video/i386/pc/vbe.c: Likewise.
9777 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
9779         * DISTLIST: Added term/i386/pc/vesafb.c
9780         DISTLIST: Added video/i386/pc/vbe.c
9781         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
9782         DISTLIST: Added commands/i386/pc/vbe_test.c.
9783         * commands/i386/pc/vbe_list_modes.c: New file.
9784         * commands/i386/pc/vbe_test.c: Likewise.
9785         * term/i386/pc/vesafb.c: Likewise.
9786         * video/i386/pc/vbe.c: Likewise.
9787         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
9788         (grub_vbe_probe) Added prototype.
9789         (grub_vbe_set_video_mode) Likewise.
9790         (grub_vbe_get_video_mode) Likewise.
9791         (grub_vbe_get_video_mode_info) Likewise.
9792         (grub_vbe_set_pixel_rgb) Likewise.
9793         (grub_vbe_set_pixel_index) Likewise.
9794         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
9795         (pkgdata_MODULES): Added vesafb.mod.
9796         (pkgdata_MODULES): Added vbe_list_modes.mod.
9797         (pkgdata_MODULES): Added vbe_test.mod.
9798         (vbe_mod_SOURCES): Added.
9799         (vbe_mod_CFLAGS): Likewise.
9800         (vesafb_mod_SOURCES): Likewise.
9801         (vesafb_mod_CFLAGS): Likewise.
9802         (vbe_list_modes_mod_SOURCES): Likewise.
9803         (vbe_list_modes_mod_CFLAGS): Likewise.
9804         (vbe_test_mod_SOURCES): Likewise.
9805         (vbe_test_mod_CFLAGS): Likewise.
9807 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
9809         * normal/command.c (grub_command_execute): If INTERACTIVE is
9810         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
9811         CMDLINE. Disable the pager if INTERACTIVE is true.
9812         All callers are changed.
9814         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
9815         before reading a config file.
9816         * normal/main.c (read_config_file): Even if a command is not
9817         found, register it if it is within an entry.
9819         * util/grub-emu.c: Include sys/types.h and unistd.h.
9820         (options): Added --hold.
9821         (struct arguments): Added a new member "hold".
9822         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
9823         missing.
9824         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
9825         cleared by a debugger, if it is not zero.
9827         * include/grub/normal.h (grub_command_execute): Add an argument
9828         INTERACTIVE.
9830 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
9832         * DISTLIST: Added include/grub/i386/pc/vbe.h.
9834 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
9836         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
9837         program with another one, because the old one didn't detect a bug
9838         in gcc-3.4. Always use regparm 2, because the new test is still
9839         not enough for gcc-4.0. Someone must investigate a simple test
9840         case which detects a bug in gcc-4.0.
9842 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
9844         * DISTLIST: Added normal/completion.c.
9846         * normal/completion.c: New file.
9848         * term/i386/pc/console.c (grub_console_getwh): New function.
9849         (grub_console_term): Assign grub_console_getwh to getwh.
9851         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
9852         function is defined in normal/completion.c as
9853         grub_normal_do_completion.
9854         (grub_cmdline_get): Use grub_normal_do_completion instead of
9855         grub_tab_complete.
9857         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
9858         returns non-zero, otherwise return 0.
9859         (grub_partition_iterate): First, probe the partition map. Then,
9860         call ITERATE only for this partition map.
9862         * kern/misc.c (grub_strncmp): Rewritten.
9864         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
9865         returns non-zero. Otherwise return 0.
9867         * include/grub/partition.h (grub_partition_map_iterate): Return
9868         int instead of void.
9870         * include/grub/normal.h (grub_normal_do_completion): New prototype.
9872         * include/grub/misc.h (grub_strncmp): Change the type of N to
9873         grub_size_t.
9875         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
9876         of void.
9878         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
9879         unsigned explicitly before comparing it with I.
9881         * kern/main.c (grub_env_write_root): Add the attribute unused into
9882         VAR.
9884         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9885         normal/completion.c.
9886         (normal_mod_SOURCES): Likewise.
9887         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9888         (normal_mod_SOURCES): Likewise.
9890         * normal/command.c (grub_iterate_commands): If ITERATE returns
9891         non-zero, return one immediately.
9893 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
9895         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
9896         * kern/i386/pc/startup.S: Updated Global Descriptor table's
9897         descriptions.
9898         (grub_vbe_get_controller_info): New function.
9899         (grub_vbe_get_mode_info): Likewise.
9900         (grub_vbe_set_mode): Likewise.
9901         (grub_vbe_get_mode): Likewise.
9902         (grub_vbe_set_memory_window): Likewise.
9903         (grub_vbe_get_memory_window): Likewise.
9904         (grub_vbe_set_scanline_length): Likewise.
9905         (grub_vbe_get_scanline_length): Likewise.
9906         (grub_vbe_set_display_start): Likewise.
9907         (grub_vbe_get_display_start): Likewise.
9908         (grub_vbe_set_palette_data): Likewise.
9909         * include/grub/i386/pc/vbe.h: New file.
9911 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
9913         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9914         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
9915         * DISTLIST: Likewise.
9916         * kern/ieee1275/of.c: Moved to ...
9917         * kern/ieee1275/ieee1275.c: ... here.
9919 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
9921         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
9922         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
9923         Pass 0 as `end' parameter to grub_strtoul().
9925 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
9927         * include/grub/powerpc/ieee1275/console.h: Do not include
9928         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
9929         ifdef.
9930         (grub_console_cur_color): Remove i386-specific prototype.
9931         (grub_console_real_putchar): Likewise.
9932         (grub_console_checkkey): Likewise.
9933         (grub_console_getkey): Likewise.
9934         (grub_console_getxy): Likewise.
9935         (grub_console_gotoxy): Likewise.
9936         (grub_console_cls): Likewise.
9937         (grub_console_setcursor): Likewise.
9938         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
9939         Include <grub/machine/console.h>.
9940         * term/ieee1275/ofconsole.c: Likewise.
9942 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
9944         * Makefile.in (LIBLZO): New variable.
9946         * configure.ac: Check for LZO version 2.
9948         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
9949         lzo/lzo1x.h instead of lzo1x.h.
9951         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
9952         of -llzo.
9954         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
9955         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
9957         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
9958         copying the data from PARTITION to P.
9960 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
9962         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
9963         negative, unload the module.
9965         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
9966         map is "pc_partition_map" but not "pc".
9967         (usage): Fix the description. The options are --boot-image and
9968         --core-image but not --boot-file or --core-file.
9969         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
9970         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
9971         DEFAULT_DIRECTORY.
9973         * util/i386/pc/grub-install.in: Do not specify --boot-file or
9974         --core-file. Specify INSTALL_DEVICE as an argument.
9976         * util/console.c: Include config.h.
9977         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
9978         [HAVE_NCURSES_H]: Include ncurses.h.
9979         [HAVE_CURSES_H]: Include curses.h.
9980         [!A_NORMAL] (A_NORMAL): Defined as zero.
9981         [!A_STANDOUT] (A_STANDOUT): Likewise.
9983         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
9984         -lncurses.
9985         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
9987         * configure.ac: Check for curses libraries and headers.
9989         * Makefile.in (LIBCURSES): New variable.
9991         * genmk.rb (Script::rule): Set the executable bits.
9993         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
9994         name of the PC partition map is "pc_partition_map" but not "pc".
9996 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
9998         * util/i386/pc/grub-install.in (grub_probefs): New variable.
9999         (modules): Likewise.
10000         (usage): Added descriptions for --modules and --grub-probefs.
10001         Handle --modules and --grub-probefs. Save the arguments in MODULES
10002         and GRUB_PROBEFS, respectively.
10003         Auto-detect a filesystem module against GRUBDIR. If the result is
10004         empty and modules are not specified explicitly, abort the
10005         installation. Add the result to MODULES.
10007         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10008         disk/powerpc/ieee1275/ofdisk.c,
10009         include/grub/powerpc/ieee1275/init.h and
10010         term/powerpc/ieee1275/ofconsole.c.
10011         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10012         term/ieee1275/ofconsole.c.
10014         * include/grub/powerpc/ieee1275/console.h: Resurrected.
10016         * COPYING: Upgraded to the latest version. Only the address of the
10017         FSF office has changed.
10019 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10021         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10022         kern/ieee1275.c with kern/ieee1275/of.c.
10024         * kern/ieee1275.c: Moved to ...
10025         * kern/ieee1275/of.c: ... here.
10027 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
10029         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10030         readability.
10032         * config.guess: Updated to the latest version from gnulib.
10033         * config.sub: Likewise.
10034         * install.sh: Likewise.
10035         * mkinstalldirs: Likewise.
10037         * include/grub/console.h: Removed. This file is arch-specific. Do
10038         not put this in include/grub.
10040         * include/grub/i386/pc/console.h: Resurrected.
10042         * util/console.c: Include grub/machine/console.h instead of
10043         grub/console.h.
10044         * util/grub-emu.c: Likewise.
10046 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
10048         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10049         hardcoded value.
10051         From Vincent Pelletier  <subdino2004@yahoo.fr>
10052         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10053         Redefined to use grub_getwh.
10054         (grub_term): New member named getwh.
10055         (grub_getwh): New prototype.
10056         * kern/term.c (grub_getwh): New function.
10057         * term/i386/pc/console.c (grub_console_getwh): New function.
10058         (grub_console_term): New member `getwh'.
10059         * term/i386/pc/vga.c (grub_vga_getwh): New function.
10060         (grub_vga_term): New member `getwh'.
10061         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10062         grub_ssize_t.
10063         (grub_ofconsole_getw): New function.
10064         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10065         (grub_ofconsole_term): New field named getwh and new initial
10066         value.
10068 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
10070         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10071         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
10072         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10073         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10074         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10075         of <grub/machine/ieee1275.h>.
10076         * commands/ieee1275/reboot.c: Likewise.
10077         * boot/powerpc/ieee1275/ieee1275.c: Move ...
10078         * kern/ieee1275.c: ... to here.  All users updated.  Change all
10079         parameter structs to use new type `grub_ieee1275_cell_t'.
10080         * term/powerpc/ieee1275/ofconsole.c: Move ...
10081         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
10082         * disk/powerpc/ieee1275/ofdisk.c: Move ...
10083         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
10084         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10085         to return int.
10086         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10087         Remove unused prototypes.  All users updated.
10088         * include/grub/powerpc/ieee1275/console.h: Removed.
10089         * include/grub/powerpc/ieee1275/ieee1275.h: Define
10090         `grub_ieee1275_cell_t'.
10091         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10092         Cast comparisons with -1 to the correct type.
10093         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10094         type to match `grub_ieee1275_entry_fn'.
10096 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
10098         * DISTLIST: Added util/i386/pc/grub-probefs.c.
10100         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10101         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10102         partmap/sun.c.
10103         (grub_probefs_SOURCES): New variable.
10105         * util/i386/pc/grub-probefs.c: New file.
10107         * util/i386/pc/grub-setup.c (main): Call
10108         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10109         grub_hfs_init and grub_jfs_init to initialize the system. Call
10110         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10111         grub_pc_partition_map_fini to finish the system.
10113 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
10115         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10116         function.
10117         (grub_multiboot_load_elf32): Likewise.
10118         (grub_multiboot_is_elf64): Likewise.
10119         (grub_multiboot_load_elf64): Likewise.
10120         (grub_multiboot_load_elf): Likewise.
10121         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10122         an ELF32 or ELF64 file.
10123         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10125         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10126         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10127         NULL before calling FS->LABEL.
10128         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10129         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10130         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10131         before calling FS->LABEL.
10133 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
10135         * util/i386/pc/grub-install.in (datadir): New variable.
10136         (libdir): Removed.
10137         (pkgdatadir): New variable.
10138         (pkglibdir): Removed.
10140 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
10142         * DISTLIST: Added util/i386/pc/grub-install.in.
10144         * util/i386/pc/grub-install.in: New file.
10146         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10147         (grub_install_SOURCES): Likewise.
10149         * genmk.rb: Added support for scripts.
10150         (Script): New class.
10151         (scripts): New variable.
10153         * Makefile.in (install-local): Install sbin_SCRIPTS by
10154         INSTALL_SCRIPT.
10155         (uninstall): Remove sbin_SCRIPTS.
10157         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10158         device, try to get a GRUB device by
10159         grub_util_biosdisk_get_grub_dev.
10160         Free DEST_DEV.
10162         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10163         description for --device-map.
10165 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
10167         Change the semantics of variable hooks. They now return strings
10168         instead of error values.
10170         * util/i386/pc/grub-setup.c: Include grub/env.h.
10171         (setup): Use grub_device_set_root instead of grub_env_set.
10173         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10174         grub_env_get instead of grub_device_set_root and
10175         grub_device_get_root, respectively.
10177         * kern/main.c (grub_env_write_root): New function.
10178         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10179         grub_env_set instead of grub_device_set_root.
10181         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10182         many variables.
10183         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10184         rather than calling ENV->WRITE_HOOK afterwards.
10185         (grub_env_get): Return the result of ENV->READ_HOOK rather than
10186         passing a pointer of a pointer.
10187         (grub_register_variable_hook): Change the types of "read_hook" and
10188         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10189         respectively.
10190         Allocate the default empty string on the heap, because this string
10191         may be freed later.
10193         * kern/device.c: Include grub/env.h.
10194         (grub_device_set_root): Removed.
10195         (grub_device_get_root): Likewise.
10196         (grub_device_open): Use grub_env_get instead of
10197         grub_device_get_root.
10199         * include/grub/env.h (grub_env_read_hook_t): New type.
10200         (grub_env_write_hook_t): Likewise.
10201         (grub_env_var): Change the types of "read_hook" and "write_hook"
10202         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10203         (grub_register_variable_hook): Likewise.
10205         * include/grub/device.h (grub_device_set_root): Removed.
10206         (grub_device_set_root): Likewise.
10208         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10209         make sure that DIRNAME terminates with '/', so that
10210         grub_fat_find_dir will fail if PATH is not a directory.
10212         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10213         from DIRNAME.
10214         Use the qualifier auto for print_files and print_files_long.
10215         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10216         as a regular file.
10217         Put a newline only if there is no error.
10218         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10219         used.
10221 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
10223         * kern/partition.c (grub_partition_probe): Initialize PART to
10224         NULL. Otherwise, when no partition map is registered, this returns
10225         a garbage.
10227 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
10229         * partmap/apple.c (apple_partition_map_iterate): Check if POS
10230         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10231         valid.
10233 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
10235         * commands/ls.c (grub_ls_list_disks): Print the filesystem
10236         information on each device, if it does not have partitions. Print
10237         "Device" instead of "Disk", because this function is not specific
10238         to disk devices.
10240         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10241         static to ensure that it is put on the memory rather than a
10242         register.
10244 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10246         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10247         (grub_cat_init): Likewise.
10248         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10249         (options): Likewise.
10250         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10251         (grub_configfile_init): Likewise.
10252         * font/manager.c (GRUB_MOD_INIT): Likewise.
10253         * commands/help.c (GRUB_MOD_INIT): Likewise.
10254         (grub_help_init): Likewise.
10255         * normal/command.c (grub_command_init): Likewise.
10256         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10257         * disk/loopback.c (grub_loop_init): Likewise.
10258         (GRUB_MOD_INIT): Likewise.
10259         * commands/ls.c (grub_ls_init): Likewise.
10260         (GRUB_MOD_INIT): Likewise.
10261         (options): Likewise.
10262         * commands/boot.c (grub_boot_init): Likewise.
10263         (GRUB_MOD_INIT): Likewise.
10264         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10265         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10266         (GRUB_MOD_INIT): Likewise.
10267         * commands/cmp.c (grub_cmp_init): Likewise.
10268         (GRUB_MOD_INIT): Likewise.
10270         * normal/arg.c: Use <> instead of "" to include header files.
10271         (SHORT_ARG_HELP): New macro.
10272         (SHORT_ARG_USAGE): Likewise.
10273         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10274         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10275         descriptions.
10276         (find_short): Check if C is 'h' or 'u' explicitly.
10277         (grub_arg_show_help): Use space characters instead of tabs. Treat
10278         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10279         are shown with --help and --usage only if they are not used for
10280         the command itself.
10281         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10282         'h' and 'u'.
10284         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10285         const into "longarg". Change the type of "shortarg" to int.
10287 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10289         * boot/i386/pc/boot.S (boot_drive_check): New label.
10291         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10292         macro.
10294         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10295         which do not pass a boot drive correctly. Copied from GRUB Legacy.
10297 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10299         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10300         When turning off Gate A20, skip the check and return immediately,
10301         because this is not fatal usually.
10303 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10305         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10306         be 0x7C00 instead of 0x8000.
10308         * boot/i386/pc/pxeboot.S: Rewritten.
10310         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10311         EXT_C.
10312         (gate_a20_check_state): Read a byte from 0x108000. Invert the
10313         result.
10315 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
10317         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
10318         robustness. This routine now supports a BIOS call and System
10319         Control Port A to modify the gate A20.
10321         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10322         Increased to 0x440.
10324 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
10326         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
10327         device path and resulting ihandle.
10328         (grub_ofdisk_close): dprintf the ihandle being closed.
10329         (grub_ofdisk_read): dprintf function parameters.
10330         * kern/mm.c (grub_mm_init_region): Likewise.
10331         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
10332         (grub_linux_boot): dprintf the Linux entry point, initrd address and
10333         size, and boot arguments.
10334         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
10335         before loading into memory.
10336         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
10337         before loading into memory.
10339 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
10341         * kern/mm.c: Added much documentation.
10342         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
10343         8, set to 5 instead of 8.
10345 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
10347         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
10349         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
10350         (grub_mkdevicemap_SOURCES): New variable.
10352         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
10353         lib/device.c of GRUB Legacy.
10355 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
10357         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
10358         instead of PATH is NULL.
10360 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
10362         * commands/cmp.c (BUFFER_SIZE): New macro.
10363         (grub_cmd_cmp): Close the right file at the right time.  Compare
10364         only data just read.  Don't report files of different  size as
10365         identical.  Dynamically allocate buffers.  Move variable
10366         declarations at the beginning of function.
10368 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
10370         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
10371         reverse.
10373 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
10375         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
10376         when backspace is pressed at beginning of line.
10378 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
10380         * DISTLIST: Added genfslist.sh.
10382         * normal/main.c (fs_module_list): New variable.
10383         (autoload_fs_module): New function.
10384         (read_fs_list): Likewise.
10385         (grub_normal_execute): Call read_fs_list.
10387         * kern/fs.c (grub_fs_autoload_hook): New variable.
10388         (grub_fs_probe): Added support for auto-loading.
10390         * include/grub/normal.h (struct grub_fs_module_list): New struct.
10391         (grub_fs_module_list_t): New type.
10393         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10394         (grub_fs_autoload_hook): New prototype.
10396         * genfslist.sh: New file.
10398         * genmk.rb: Added a rule to generate a filesystem list.
10400 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
10402         * configure.ac: Fix the test for cross-compiling.
10404         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
10405         define GRUB_UTIL anymore.
10407         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10408         so this function works on other systems than just big endian.
10409         (load_modules): Likewise.
10410         (add_segments): Likewise.
10412 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
10414         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
10415         contains `l' modifier, get a long from va_arg().
10417 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
10419         * kern/mm.c (grub_free): If the next free block which is being
10420         merged is the first free block, set the first block to the block
10421         being freed.
10422         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10424 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
10426         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10427         `grub_ieee1275_chosen'.
10429 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
10431         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10432         (grub_ieee1275_chosen): New variable.
10433         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10434         `chosen'.
10435         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10436         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10437         Rename first argument to `phandle' for consistency.
10438         (grub_ieee1275_get_property_length): Likewise.
10439         (grub_ieee1275_next_property): Likewise.  Change type of first argument
10440         to grub_ieee1275_phandle_t.
10441         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10442         Move export next to declaration.
10443         (grub_ieee1275_chosen): New variable.
10444         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10445         Correct cosmetic typo.
10446         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10447         `grub_ieee1275_chosen'.
10448         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10449         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10450         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10451         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10452         `grub_ieee1275_chosen'.
10454 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
10456         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10457         /chosen/bootargs.
10458         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10459         /chosen/bootargs as "variable=value" pairs.
10461 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
10463         * include/grub/misc.h (grub_dprintf): New macro.
10464         (grub_real_dprintf): New prototype.
10465         (grub_strword): Likewise.
10466         (grub_iswordseparator): Likewise.
10467         * kern/misc.c (grub_real_dprintf): New function.
10468         (grub_strword): Likewise.
10469         (grub_iswordseparator): Likewise.
10471 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
10473         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
10474         (roundup): Remove macro.
10475         (grub_ieee1275_flags): Make static.
10476         (grub_ieee1275_realmode): Remove.
10477         (grub_ieee1275_test_flag): New function.
10478         (grub_ieee1275_set_flag): Likewise.
10479         (find_options): Rename to `grub_ieee1275_find_options'; update
10480         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
10481         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
10482         (cmain): New prototype.
10483         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
10484         `grub_ieee1275_flags' directly.
10485         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
10486         machine/biosdisk.h.
10487         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
10488         Don't include grub/machine/init.h.
10489         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
10490         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10491         Remove prototype.
10492         (grub_ieee1275_realmode): Likewise.
10493         (grub_ieee1275_flag): New enum.
10494         (grub_ieee1275_test_flag): New prototype.
10495         (grub_ieee1275_set_flag): New prototype.
10496         * include/grub/powerpc/ieee1275/init.h: Remove file.
10497         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
10498         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
10499         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
10500         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
10501         comment.
10502         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
10503         `grub_ieee1275_test_flag'.
10504         (grub_ieee1275_encode_devname): Likewise.
10506 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
10508         * include/grub/powerpc/ieee1275/ieee1275.h
10509         (grub_ieee1275_encode_devname): New prototype.
10510         (grub_ieee1275_get_filename): Likewise.
10511         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
10512         function.
10513         (grub_set_prefix): Likewise.
10514         (grub_machine_init): Call grub_set_prefix.
10515         * kern/powerpc/ieee1275/openfw.c: Fix typos.
10516         (grub_parse_type): New enum.
10517         (grub_ieee1275_get_devargs): New function.
10518         (grub_ieee1275_get_devname): Likewise.
10519         (grub_ieee1275_parse_args): Likewise.
10520         (grub_ieee1275_get_filename): Likewise.
10521         (grub_ieee1275_encode_devname): Likewise.
10523 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
10525         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
10526         `grub_loader_unset'.
10528 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
10530         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
10531         instead of grub_ieee1275_interpret.
10532         (grub_halt_init): New function.
10533         (grub_halt_fini): Likewise.
10534         (GRUB_MOD_INIT): Correct message grammar.
10535         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
10536         instead of grub_ieee1275_interpret.
10537         (grub_reboot_init): New function.
10538         (grub_reboot_fini): Likewise.
10539         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
10540         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
10541         util/i386/pc/misc.c with commands/ieee1275/halt.c,
10542         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
10543         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
10544         function.
10545         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
10546         Add prototype.
10547         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
10548         prototype.
10549         (grub_halt): Likewise.
10550         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
10551         (cmain): Remove __attribute__((unused)).
10552         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
10553         (grub_heap_len): Likewise.
10554         (grub_machine_fini): New function.
10555         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
10556         (grub_halt): Likewise.
10557         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
10558         function.
10559         * util/powerpc/ieee1275/misc.c: New file.
10561 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10563         * DISTLIST: New file.
10564         * gendistlist.sh: Likewise.
10566         * Makefile.in (COMMON_DISTFILES): Removed.
10567         (BOOT_DISTFILES): Likewise.
10568         (CONF_DISTFILES): Likewise.
10569         (DISK_DISTFILES): Likewise.
10570         (FS_DISTFILES): Likewise.
10571         (INCLUDE_DISTFILES): Likewise.
10572         (KERN_DISTFILES): Likewise.
10573         (LOADER_DISTFILES): Likewise.
10574         (TERM_DISTFILES): Likewise.
10575         (UTIL_DISTFILES): Likewise.
10576         (DISTFILES): Likewise.
10577         (uninstall): Uninstall files in $(pkgdata_DATA).
10578         (DISTLIST): New target.
10579         (distdir): Use the contents of the file DISTLIST to get a list of
10580         distributed files.
10582 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10584         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
10585         descriptor. This is ported from GRUB Legacy.
10587         * gencmdlist.sh: Added an extra semicolon to make it work with
10588         old sed versions. Reported by Robert Bihlmeyer
10589         <robbe@orcus.priv.at>.
10591 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
10593         Automatic loading of commands is supported.
10595         * normal/main.c (read_command_list): New function.
10596         (grub_normal_execute): Call read_command_list.
10598         * normal/command.c (grub_register_command): Return zero or CMD.
10599         Allocate CMD->NAME from the heap.
10600         Initialize CMD->MODULE_NAME to zero.
10601         Find the same name as well. If the same command is found and it is
10602         a dummy command, overwrite members. If it is not a dummy command,
10603         return zero.
10604         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
10605         (grub_command_find): If a dummy command is found, load a module
10606         and retry to find a command only once.
10608         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
10609         make sure that each command is loaded.
10611         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
10612         macro.
10613         (struct grub_command): Remove const from the member `name'.
10614         Add a new member `module_name'.
10615         (grub_register_command): Return grub_command_t.
10617         * commands/help.c (grub_cmd_help): Call grub_command_find to make
10618         sure that each command is loaded.
10620         * genmk.rb (PModule::rule): Specify a module name without the
10621         suffix ".mod" to gencmdlist.sh.
10623 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
10625         * gencmdlist.sh: New file.
10627         * genmk.rb (PModule::rule): Generate a rule for a command list.
10628         Clean command.lst.
10629         Generate command.lst from $(COMMANDFILES).
10631         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
10632         (DATA): Added $(pkgdata_DATA).
10633         (install-local): Install files in $(pkgdata_DATA).
10635 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
10637         * term/i386/pc/vga.c (debug_command): Removed.
10638         (GRUB_MOD_INIT): Do not register the command "debug".
10640         From Hollis Blanchard:
10641         * commands/configfile.c: New file.
10642         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10643         commands/configfile.c.
10644         (pkgdata_MODULES): Added configfile.mod.
10645         (configfile_mod_SOURCES): New variable.
10646         (configfile_mod_CFLAGS): Likewise.
10647         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10648         commands/configfile.c.
10649         (pkgdata_MODULES): Added configfile.mod.
10650         (configfile_mod_SOURCES): New variable.
10651         (configfile_mod_CFLAGS): Likewise.
10652         * util/grub-emu.c (main): Call grub_configfile_init and
10653         grub_configfile_fini.
10654         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
10655         prototype.
10656         [GRUB_UTIL] (grub_configfile_fini): Likewise.
10658 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
10660         * normal/arg.c (grub_arg_show_help): Do not show the bug report
10661         address.
10663         * commands/help.c (grub_cmd_help): Do not print newlines after
10664         the last command in print_command_help.
10666 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
10668         * commands/default.h: New file.
10669         * commands/timeout.h: Likewise.
10670         * normal/context.c: Likewise.
10672         * util/misc.c: Do not include sys/times.h.
10673         Include sys/time.h and grub/machine/time.h.
10674         (grub_get_rtc): Rewritten with gettimeofday.
10676         * util/grub-emu.c (main): Call grub_default_init and
10677         grub_timeout_init before grub_normal_init, and call
10678         grub_timeout_fini and grub_default_fini after grub_main.
10680         * util/console.c (grub_ncurses_checkkey): Return the read
10681         character or -1.
10683         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
10684         timeouts.
10686         * normal/main.c (read_config_file): Push MENU. If this fails,
10687         print an error and wait for a user input.
10688         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
10689         If a menu is empty or an error occurs, pop MENU.
10690         (grub_normal_execute): Pop and free MENU after grub_menu_run
10691         returns.
10693         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
10695         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
10696         include time.h.
10697         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10698         without GRUB_UTIL.
10699         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
10700         time.h.
10701         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10702         without GRUB_UTIL.
10704         * include/grub/normal.h (struct grub_menu_list): New struct.
10705         (grub_menu_list_t): New type.
10706         (struct grub_context): New struct.
10707         (grub_context_t): New type.
10708         (grub_register_command): Got rid of EXPORT_FUNC.
10709         (grub_unregister_command): Likewise.
10710         (grub_context_get): New prototype.
10711         (grub_context_get_current_menu): Likewise.
10712         (grub_context_push_menu): Likewise.
10713         (grub_context_pop_menu): Likewise.
10714         [GRUB_UTIL] (grub_default_init): Likewise.
10715         [GRUB_UTIL] (grub_default_fini): Likewise.
10716         [GRUB_UTIL] (grub_timeout_init): Likewise.
10717         [GRUB_UTIL] (grub_timeout_fini): Likewise.
10719         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
10720         commands/timeout.c and normal/context.c.
10721         (pkgdata_MODULES): Added default.mod and timeout.mod.
10722         (normal_mod_SOURCES): Added normal/context.c.
10723         (default_mod_SOURCES): New variable.
10724         (default_mod_CFLAGS): Likewise.
10725         (timeout_mod_SOURCES): Likewise.
10726         (timeout_mod_CFLAGS): Likewise.
10727         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
10728         conf/i386-pc.rmk.
10729         (pkgdata_MODULES): Added default.mod and timeout.mod.
10730         (normal_mod_SOURCES): Added normal/context.c.
10731         (default_mod_SOURCES): New variable.
10732         (default_mod_CFLAGS): Likewise.
10733         (timeout_mod_SOURCES): Likewise.
10734         (timeout_mod_CFLAGS): Likewise.
10736         * Makefile.in (all-local): Added $(MKFILES).
10738 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
10740         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
10741         (grub_emu_SOURCES): Likewise.
10742         (pkgdata_MODULES): Add `sun.mod'.
10743         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
10744         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10745         `partmap/sun.c'.
10746         (pkgdata_MODULES): Add `sun.mod'.
10747         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
10748         * include/grub/partition.h (grub_sun_partition_map_init): New
10749         prototype.
10750         (grub_sun_partition_map_fini): Likewise.
10751         * partmap/sun.c: New file.
10752         * util/grub-emu.c (main): Initialize and de-initialize the sun
10753         partitionmap support.
10755 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
10757         This implements an Emacs-like menu entry editor.
10759         * normal/menu_entry.c: New file.
10761         * util/console.c (grub_ncurses_putchar): Translate some Unicode
10762         characters to ASCII.
10763         (saved_char): New variable.
10764         (grub_ncurses_checkkey): Rewritten completely.
10765         (grub_ncurses_getkey): Likewise.
10766         (grub_ncurses_init): Call raw instead of cbreak.
10768         * normal/menu.c (print_entry): Do not put a space.
10769         (init_page): Renamed to ...
10770         (grub_menu_init_page): ... this. All callers changed.
10771         (edit_menu_entry): Removed.
10772         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
10774         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
10776         * kern/misc.c (grub_vprintf): Call grub_refresh.
10778         * normal/menu.c (DISP_LEFT): Renamed to ...
10779         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
10780         * normal/menu.c (DISP_UP): Renamed to ...
10781         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
10782         * normal/menu.c (DISP_RIGHT): Renamed to ...
10783         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
10784         * normal/menu.c (DISP_DOWN): Renamed to ...
10785         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
10786         * normal/menu.c (DISP_HLINE): Renamed to ...
10787         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
10788         * normal/menu.c (DISP_VLINE): Renamed to ...
10789         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
10790         * normal/menu.c (DISP_UL): Renamed to ...
10791         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
10792         * normal/menu.c (DISP_UR): Renamed to ...
10793         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
10794         * normal/menu.c (DISP_LL): Renamed to ...
10795         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
10796         * normal/menu.c (DISP_LR): Renamed to ...
10797         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
10798         * normal/menu.c (TERM_WIDTH): Renamed to ...
10799         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
10800         * normal/menu.c (TERM_HEIGHT): Renamed to ...
10801         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
10802         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
10803         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
10804         * normal/menu.c (TERM_MARGIN): Renamed to ...
10805         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
10806         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
10807         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
10808         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
10809         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
10810         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
10811         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
10812         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
10813         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
10814         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
10815         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
10816         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
10817         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
10818         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
10819         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
10820         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
10821         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
10822         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
10823         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
10824         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
10825         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
10826         All callers changed.
10828         * include/grub/normal.h: New prototype.
10830         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10831         normal/menu_entry.c.
10832         (normal_mod_SOURCES): Likewise.
10833         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10834         (normal_mod_SOURCES): Likewise.
10836 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
10838         * include/grub/normal.h (grub_halt_init): New prototype.
10839         (grub_halt_fini): Likewise.
10840         (grub_reboot_init): Likewise.
10841         (grub_reboot_fini): Likewise.
10843         * util/grub-emu.c: Include signal.h.
10844         (main_env): New global variable.
10845         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
10846         catch C-c.
10847         (grub_machine_fini): New function.
10848         (main): Call grub_halt_init and grub_reboot_init before
10849         grub_main, and grub_reboot_fini and grub_halt_fini after it.
10850         Call setjmp with MAIN_ENV to go back afterwards.
10851         Call grub_machine_fini right before return.
10853         * include/grub/util/misc.h: Include setjmp.h.
10854         (main_env): New prototype.
10856         * include/grub/kernel.h (grub_machine_fini): New prototype.
10857         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
10858         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
10860         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
10861         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
10862         * term/i386/pc/console.c (grub_console_fini): Likewise.
10864         * util/i386/pc/misc.c: New file.
10866         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10867         util/i386/pc/misc.c, commands/i386/pc/halt.c and
10868         commands/i386/pc/reboot.c.
10870 2005-02-14  Guillem Jover  <guillem@hadrons.org>
10872         * include/grub/dl.h (grub_dl_check_header): New prototype.
10873         (grub_arch_dl_check_header): Change return type to grub_err_t,
10874         remove size parameter and export function.  Update all callers.
10875         * kern/dl.c (grub_dl_check_header): New function.
10876         (grub_dl_load_core): Use `grub_dl_check_header' instead of
10877         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
10878         are inside the core.
10879         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
10880         independent ELF header checks.
10881         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
10882         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
10883         `grub_dl_check_header' instead of explicit checks.  Check for the
10884         ELF type.
10885         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
10886         `grub_dl_check_header' instead of explicit checks.  Remove arch
10887         specific ELF header checks.
10889         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
10890         argument SIZE.
10892 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
10894         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
10895         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
10897 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10899         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
10900         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
10901         (part_map_iterate): Clear `grub_errno' and return 0 if
10902         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
10903         * partmap/amiga.c (amiga_partition_map_iterate): Return
10904         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
10905         * partmap/apple.c (apple_partition_map_iterate): Likewise.
10907 2005-02-01  Guillem Jover  <guillem@hadrons.org>
10909         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
10910         help info.
10912 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
10914         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
10915         Removed prototype.
10916         (grub_rescue_cmd_linux): New prototype.
10917         (grub_rescue_cmd_initrd): Likewise.
10918         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
10919         `bi_rec'.
10920         (grub_linux_release_mem): Release the memory for the initrd.
10921         (grub_load_linux): Renamed from this...
10922         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
10923         Changed `entry' not to be static.  Loop over memory regions to
10924         find another one when the default fails.
10925         (grub_rescue_cmd_initrd): New function.
10926         (grub_linux_init): Remove function.
10927         (grub_linux_fini): Likewise.
10928         (GRUB_MOD_INIT): Register `initrd'.
10929         (GRUB_MOD_FINI): Unregister `initrd'.
10930         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
10931         Function removed.
10932         (grub_linux_normal_fini): Likewise.
10933         (GRUB_MOD_INIT): Register `initrd'.
10934         (GRUB_MOD_FINI): Unregister `initrd'.
10936 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
10938         * commands/help.c: New file.
10939         * normal/arg.c (show_help): Renamed to...
10940         (grub_arg_show_help): ... this.
10941         * commands/i386/pc/halt.c: New file.
10942         * commands/i386/pc/reboot.c: Likewise.
10943         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
10944         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
10945         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
10946         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
10947         variables.
10948         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10949         `commands/help.c'.
10950         (pkgdata_MODULES): Add `help.mod'.
10951         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
10952         * grub/i386/pc/init.h (grub_reboot): New prototype.
10953         (grub_halt): Likewise.
10954         * include/grub/normal.h (grub_arg_show_help): New prototype.
10955         (grub_help_init): Likewise.
10956         (grub_help_fini): Likewise.
10957         * util/grub-emu.c (main): Initialize and deinitialize the help
10958         command.
10960         * normal/cmdline.c (grub_cmdline_get): Doc fix.
10962         * normal/command.c (grub_command_init): Fixed the description of
10963         the `set' and `unset' commands.
10965 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
10967         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
10968         function.
10969         * commands/ieee1275/halt.c: New file.
10970         * commands/ieee1275/reboot.c: Likewise.
10971         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
10972         `__attribute__ ((unused))'.  Some GCS related fixed.
10973         (grub_suspend_init) [GRUB_UTIL]: Function removed.
10974         (grub_suspend_fini): Likewise.
10975         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
10976         and `halt.mod'.
10977         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
10978         (halt_mod_CFLAGS): New variables.
10979         * include/grub/powerpc/ieee1275/ieee1275.h
10980         (grub_ieee1275_interpret): New prototype.
10982 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
10984         * include/grub/misc.h (memmove): New prototype.
10985         (memcpy): Likewise.
10987 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
10989         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
10990         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
10992 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
10994         * kern/misc.c (grub_strndup): Function rewritten.
10996 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
10998         * normal/menu.c (TERM_WIDTH): Macro redefined.
10999         (TERM_TOP_BORDER_Y): Likewise.
11000         (draw_border): Replaced while-loop by a for-loop.  Make the number
11001         of lines consistent with the number of lines displayed in
11002         print_entries.  Added a margin below the rectangle.
11003         (print_entry): Make the entry fit in the rectangle.
11004         (print_entries): Display the scroll arrows next to the right
11005         border.
11007 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
11009         * fs/minix.c (grub_minix_find_file): Reserve more space for
11010         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
11011         `grub_strncpy' to copy `path' into it.
11013 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
11015         Add the loopback device, a device via which files can be accessed
11016         as devices.
11018         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11019         (pkgdata_MODULES): Add loopback.mod.
11020         (loopback_mod_SOURCES): New variable.
11021         (loopback_mod_CFLAGS): Likewise.
11022         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11023         `disk/loopback.c'.
11024         (pkgdata_MODULES): Add loopback.mod.
11025         (loopback_mod_SOURCES): New variable.
11026         (loopback_mod_CFLAGS): Likewise.
11027         * disk/loopback.c: new file.
11028         * include/grub/normal.h (grub_loop_init): New prototype.
11029         (grub_loop_fini): New prototype.
11030         * util/grub-emu.c (main): Initialize and de-initialize loopback
11031         support.
11032         * include/grub/disk.h (grub_disk_dev_id): Add
11033         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11035 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
11037         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11038         function.
11039         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11040         (suspend_mod_SOURCES): New variable.
11041         (suspend_mod_CFLAGS): Likewise.
11042         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11043         New prototype.
11044         * commands/ieee1275/suspend.c: New file.
11046 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
11048         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11049         ((unused))' to `__attribute__ ((used))'.
11050         (GRUB_MOD_FINI): Likewise.
11051         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11052         * genmk.rb (PModule): Assign space to common symbols when linking
11053         modules.
11055 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
11057         * include/grub/mm.h (grub_mm_init_region): Change the type of the
11058         `unsigned' arguments to `grub_size_t'.
11059         (grub_malloc): Likewise.
11060         (grub_realloc): Likewise.
11061         (grub_memalign): Likewise.
11062         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11063         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11064         * util/misc.c (grub_malloc): Likewise.
11065         (grub_realloc): Likewise.
11066         * kern/mm.c (get_header_from_pointer): Change the casts to
11067         `unsigned' into a cast to `grub_size_t'.
11069         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11070         point to `currnode' when `currnode' is changed.
11072         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
11073         Schottelius <nico-linux@schottelius.org>.
11075 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
11077         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11078         (note_path): Remove variable.
11079         (GRUB_IEEE1275_NOTE_NAME): New macro.
11080         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11081         (grub_ieee1275_note_hdr): New structure.
11082         (grub_ieee1275_note_desc): Likewise.
11083         (grub_ieee1275_note): Likewise.
11084         (load_note): Remove `dir' argument.  All callers updated.  Remove
11085         `note_img' and `path'.  Do not load a file from `note_path'.
11086         Initialize a struct grub_ieee1275_note and write that to `out'.
11087         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11089 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
11091         * util/misc.c (grub_util_read_image): Revert last change.  It
11092         called `grub_util_read_at', which seeks from the beginning of the
11093         file.
11095 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
11097         * TODO: Add note about endianness in grub-mkimage.
11098         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11099         section.
11100         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11101         (grub_mkimage_SOURCES): New target.
11102         * include/grub/kernel.h (grub_start_addr): Remove variable.
11103         (grub_end_addr): Likewise.
11104         (grub_total_module_size): Likewise.
11105         (grub_kernel_image_size): Likewise.
11106         (GRUB_MODULE_MAGIC): New constant.
11107         (grub_module_info): New structure.
11108         (grub_arch_modules_addr): New prototype.
11109         (grub_get_end_addr): Remove prototype.
11110         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11111         * include/grub/powerpc/ieee1275/kernel.h: New file.
11112         * include/grub/util/misc.h (grub_util_get_fp_size): New
11113         prototype.
11114         (grub_util_read_at): Likewise.
11115         (grub_util_write_image_at): Likewise.
11116         * kern/main.c (grub_get_end_addr): Remove function.
11117         (grub_load_modules): Call grub_arch_modules_addr instead of using
11118         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
11119         the grub_module_info fields instead of calling grub_get_end_addr
11120         as loop conditions.  Move grub_add_unused_region code here.
11121         (grub_add_unused_region): Remove function.
11122         * kern/i386/pc/init.c: Include grub/cache.h.
11123         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
11124         one call to add_mem_region.
11125         (grub_arch_modules_addr): New function.
11126         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11127         (grub_total_module_size): Likewise.
11128         Include grub/machine/kernel.h.
11129         (grub_arch_modules_addr): New function.
11130         * util/grub-emu.c (grub_end_addr): Remove variable.
11131         (grub_total_module_size): Likewise.
11132         (grub_arch_modules_addr): New function.
11133         * util/misc.c: Include unistd.h.
11134         (grub_util_get_fp_size): New function.
11135         (grub_util_read_at): Likewise.
11136         (grub_util_write_image_at): Likewise.
11137         (grub_util_read_image): Call grub_util_read_at.
11138         (grub_util_write_image): Call grub_util_write_image_at.
11139         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11140         additional memory in kernel_img for a struct grub_module_info.
11141         Fill in that grub_module_info.
11142         * util/powerpc/ieee1275/grub-mkimage.c: New file.
11144 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11146         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11147         New function.
11148         * include/grub/powerpc/ieee1275/ieee1275.h
11149         (grub_ieee1275_milliseconds): New prototype.
11150         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11151         Change to 1000.
11152         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11153         grub_ieee1275_milliseconds.
11155 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11157         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11158         variable.
11159         (find_options): New function.
11160         (cmain): Call find_options.
11161         * include/grub/powerpc/ieee1275/ieee1275.h
11162         (grub_ieee1275_realmode): New extern variable.
11163         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11164         grub_map if grub_ieee1275_realmode is false.
11166 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
11168         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11169         lines are inserted and make it work like readline.  Reported by
11170         Vincent Pelletier <subdino2004@yahoo.fr>.
11172 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
11174         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11176         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11177         `kern/powerpc/cache.S'.
11179 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
11181         * genmk.rb: Handle the `Program' class in the main loop.  Written
11182         by Johan Rydberg <jrydberg@gnu.org>.
11183         (Program): New class.
11184         (programs): New variable.
11185         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11186         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
11187         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
11188         (help_arch): Function removed.
11189         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11190         `powerpc/libgcc.h' and `loader.h'.
11191         (pkgdata_PROGRAMS): New variable.
11192         (sbin_UTILITIES): Variable removed.
11193         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11194         (grubof_SOURCES): Variable re-defined so it only includes the
11195         core functionality.
11196         (grubof_CFLAGS): Remove `-DGRUBOF'.
11197         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11198         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11199         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11200         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11201         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11202         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11203         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11204         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11205         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11206         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11207         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11208         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11209         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11210         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11211         (pc_mod_CFLAGS): New variables.
11212         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11213         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11214         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11215         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11216         Moved from here...
11217         * include/grub/i386/pc/init.h (grub_os_area_addr)
11218         (rub_os_area_size): ... to here.
11219         * include/grub/powerpc/ieee1275/ieee1275.h
11220         (grub_ieee1275_entry_fn): Export symbol.
11221         * include/grub/powerpc/ieee1275/init.h: New file.
11222         * include/grub/powerpc/libgcc.h: Likewise.
11223         * include/grub/cache.h: Likewise.
11224         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
11225         <hollis@penguinppc.org>.
11226         * kern/dl.c: Include <grub/cache.h>.
11227         (grub_dl_flush_cache): New function.
11228         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11229         for this module.
11230         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11231         (grub_console_init): Removed prototypes.
11232         (grub_machine_init): Don't initialize the modules anymore.
11233         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11234         static.
11235         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11236         Macro undef removed.
11237         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11238         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11239         relocation `R_PPC_REL32'.  Return an error when the relocation is
11240         unknown.
11241         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11242         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11243         * util/misc.c (grub_arch_sync_caches): Likewise.
11245 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
11247         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11248         `symlist.c', add `grubof_symlist.c'.
11249         (symlist.c): Variable removed.
11250         (grubof_HEADERS): Variable added.
11251         (grubof_symlist.c): New target.
11252         (kernel_syms.lst): Use `grubof_HEADERS' instead of
11253         `kernel_img_HEADERS'.
11254         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11255         * kern/powerpc/dl.c: New file.
11256         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11257         Function removed.
11258         (grub_arch_dl_relocate_symbols): Likewise.
11259         (grub_register_exported_symbols): Likewise.
11261 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
11263         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11264         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
11265         to fail instead.  Reported by Vincent Pelletier
11266         <subdino2004@yahoo.fr>.
11268         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11269         it is not allocated.  Reported by Vincent Pelletier
11270         <subdino2004@yahoo.fr>.
11272         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11273         output so the output looks better.
11275 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
11277         Modulize the partition map support and add support for the amiga
11278         partition map.
11280         * commands/ls.c: Include <grub/partition.h> instead of
11281         <grub/machine/partition.h>.
11282         * kern/disk.c: Likewise.
11283         * kern/rescue.c: Likewise.
11284         * loader/i386/pc/chainloader.c: Likewise.
11285         * normal/cmdline.c: Likewise.
11286         * kern/powerpc/ieee1275/init.c: Likewise.
11287         (grub_machine_init): Call `grub_pc_partition_map_init',
11288         `grub_amiga_partition_map_init' and
11289         `grub_apple_partition_map_init'.
11290         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11291         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
11292         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
11293         `partition.h' and `pc_partition.h'.
11294         (grub_setup_SOURCES): Remove
11295         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
11296         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11297         (grub_emu_SOURCES): Likewise.
11298         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11299         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11300         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11301         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11302         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
11303         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11304         (grubof_SOURCES): Likewise.
11305         * disk/i386/pc/partition.c: File removed.
11306         * disk/powerpc/ieee1275/partition.c: Likewise.
11307         * include/grub/powerpc/ieee1275/partition.h: Likewise.
11308         * include/grub/i386/pc/partition.h: Likewise.
11309         * kern/partition.c: New file.
11310         * partmap/amiga.c: Likewise.
11311         * partmap/apple.c: Likewise.
11312         * partmap/pc.c: Likewise.
11313         * include/grub/partition.h: Likewise..
11314         * include/grub/pc_partition.h: Likewise.
11315         * util/grub-emu.c: Include <grub/partition.h> instead of
11316         <grub/machine/partition.h>.
11317         (main): Call `grub_pc_partition_map_init',
11318         `grub_amiga_partition_map_init' and
11319         `grub_apple_partition_map_init' and deinitialize afterwards.
11320         * util/i386/pc/biosdisk.c: Include `#include
11321         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11322         `<grub/machine/partition.h>'.
11323         * util/i386/pc/grub-setup.c: Likewise.
11324         * util/i386/pc/biosdisk.c: Likewise.
11325         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
11326         partition information in case of a PC partition.
11327         * util/i386/pc/grub-setup.c: Include `#include
11328         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11329         `<grub/machine/partition.h>'.
11330         (setup): Only access the PC specific partition information in case
11331         of a PC partition.
11333 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
11335         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
11336         (grub_longjmp): Likewise.
11337         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
11338         20.
11339         * normal/powerpc/setjmp.S: New file.
11340         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11341         `normal/powerpc/setjmp.S'.
11342         (grubof_CFLAGS): Add `-DGRUBOF'.
11343         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
11344         [GRUB_UTIL && !GRUBOF].
11346 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
11348         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
11349         property named `name'.  Correctly handle the error returned by
11350         `grub_ieee1275_finddevice' if a device can not be opened.
11352 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11354         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
11355         `actual' for negativity.
11356         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11357         kern/fshelp.c.
11359 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
11361         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
11362         (PAGE_OFFSET): New macro.
11363         (CRTC_ADDR_PORT): Likewise.
11364         (CRTC_DATA_PORT): Likewise.
11365         (START_ADDR_HIGH_REGISTER): Likewise.
11366         (START_ADDR_LOW_REGISTER): Likewise.
11367         (GRAPHICS_ADDR_PORT): Likewise.
11368         (GRAPHICS_DATA_PORT): Likewise.
11369         (READ_MAP_REGISTER): Likewise.
11370         (INPUT_STATUS1_REGISTER): Likewise.
11371         (INPUT_STATUS1_VERTR_BIT): Likewise.
11372         (page): New variable.
11373         (wait_vretrace): New function.
11374         (set_read_map): Likewise.
11375         (set_start_address): Likewise.
11376         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
11377         the right page.
11378         (check_vga_mem): Take the page into account.
11379         (write_char): Likewise.
11380         (write_cursor): Likewise.
11381         (scroll_up): Likewise.  Copy the page to the page that is not
11382         shown and switch between both pages.
11383         (grub_vga_putchar): Fix off by one error.
11384         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
11385         account.
11387 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
11389         Add support for iso9660 (including rockridge).
11391         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11392         (iso9660_mod_SOURCES): New variable.
11393         (iso9660_mod_CFLAGS): Likewise.
11394         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11395         * include/grub/fs.h (grub_iso9660_init): New prototype.
11396         * util/grub-emu.c (main): Call `grub_iso9660_init'.
11397         * fs/iso9660.c: New file.
11399         * include/grub/misc.h (grub_strncat): New prototype.
11400         * kern/misc.c (grub_strncat): New function.
11402         * fs/hfs.c (grub_hfs_mount): Translate the error
11403         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11404         * fs/jfs.c (grub_jfs_mount): Likewise.
11405         * fs/ufs.c (grub_ufs_mount): Likewise.
11407 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
11409         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11410         which initialized BAT registers.
11411         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11412         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11413         Move from here...
11414         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11415         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11416         ... to here.
11417         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11418         (grub_mapclaim): Likewise.
11419         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11420         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
11421         hand.
11423 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
11425         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11426         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11427         -ffreestanding and -msoft-float.
11429 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
11431         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11432         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11433         set in grub_ieee1275_flags.
11435 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
11437         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11438         prototype.
11439         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11440         grub_console_init first.
11441         Change the memory range used for grub_ieee1275_claim and
11442         grub_mm_init_region.
11443         Print an error message if the claim fails.
11444         Include <grub/misc.h>.
11446 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
11448         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11449         Call grub_children_iterate for device nodes of type `scsi',
11450         `ide', or `ata'.
11451         (grub_ofdisk_open): Remove manual device alias resolution.
11452         Fix memory leak when device cannot be opened.
11453         * include/grub/powerpc/ieee1275/ieee1275.h
11454         (grub_children_iterate): New prototype.
11455         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11456         New function.
11457         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11458         Return -1 if args.size was -1.
11460 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
11462         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
11463         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
11464         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
11465         Open Firmware's memory for it; claim memory from _start to _end.
11466         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
11467         (_end): New extern.
11468         (_start): Zero BSS from __bss_start to _end.
11469         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11470         New extern.
11471         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
11473 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
11475         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
11476         -1 if args.base was -1.
11478 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
11480         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
11481         escape sequence instead of a literal ^L. Also call
11482         grub_ofconsole_gotoxy.
11484 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
11486         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
11487         void *  arguments to grub_addr_t.  All callers updated.  Also make
11488         the `result' argument optional.
11489         (grub_ieee1275_release): change void * arguments to grub_addr_t.
11490         All callers updated.
11492 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
11494         * commands/ls.c (grub_ls_list_files): Use the string following the
11495         initial ')', if present, as the filesystem path.
11496         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
11498         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
11500 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
11502         Make the source code of the menu interface more readable.
11504         * normal/menu.c: Include grub/mm.h.
11505         (TERM_WIDTH): New macro.
11506         (TERM_HEIGHT): Likewise.
11507         (TERM_INFO_HEIGHT): Likewise.
11508         (TERM_MARGIN): Likewise.
11509         (TERM_SCROLL_WIDTH): Likewise.
11510         (TERM_TOP_BORDER_Y): Likewise.
11511         (TERM_LEFT_BORDER_X): Likewise.
11512         (TERM_BORDER_WIDTH): Likewise.
11513         (TERM_MESSAGE_HEIGHT): Likewise.
11514         (TERM_BORDER_HEIGHT): Likewise.
11515         (TERM_NUM_ENTRIES): Likewise.
11516         (TERM_FIRST_ENTRY_Y): Likewise.
11517         (TERM_ENTRY_WIDTH): Likewise.
11518         (TERM_CURSOR_X): Likewise.
11519         (draw_border): Use macros instead of magic numbers.
11520         (print_entry): Likewise.
11521         (print_entries): Likewise.
11522         (run_menu): Likewise. Also, handle the key 'e'.
11523         (run_menu_entry): Ignore empty command lines.
11524         (print_message): Added a new argument EDIT. If EDIT is true,
11525         print a different message.
11526         (init_page): Likewise.
11527         (edit_menu_entry): New function. Not implemented yet.
11529 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
11531         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
11532         can be loaded from normal mode.
11534         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
11535         `multiboot.mod'.
11536         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
11537         (multiboot_mod_CFLAGS): New variables.
11538         * loader/i386/pc/linux_normal.c: New file.
11539         * loader/i386/pc/multiboot_normal.c: Likewise.
11541         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
11542         attribute `unused'.
11544         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
11545         `fdiro' to read the mode information from instead of `diro'.
11547         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
11548         looking up a symlink.
11550         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
11551         macro.
11552         * normal/command.c (grub_command_execute): Don't parse the
11553         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
11554         flags of the command.
11556         * normal/menu.c (grub_menu_run): Fix typo.
11558 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
11560         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
11562         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
11563         `y + 1' instead of `y - 1'.
11565         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
11567 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
11569         From Hollis Blanchard <hollis@penguinppc.org>:
11570         * kern/misc.c (memmove): New alias for grub_memmove.
11571         (memcmp): New alias for grub_memcmp.
11572         (memset): New alias for grub_memset.
11573         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11574         Change "int handle" to "grub_ieee1275_phandle_t handle".
11575         * include/grub/powerpc/ieee1275/ieee1275.h
11576         (grub_ieee1275_get_property): Likewise.
11578 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
11580         Added normal mode command `chainloader' as module chain.mod, which
11581         depends on normal.mod and _chain.mod.
11583         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
11584         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
11585         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
11586         Deleted prototype.
11587         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
11588         but arguments parsing moved to ...
11589         (grub_chainloader_cmd): ... here.  New function.
11590         * include/grub/i386/pc/chainloader.h: New file.
11591         * loader/i386/pc/chainloader_normal.c: Likewise.
11593 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
11595         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
11596         (grub_mkimage_LDFLAGS): Likewise.
11597         (grub_emu_SOURCES): Likewise.
11598         (kernel_img_HEADERS): Added fshelp.h.
11599         * fs/ext2.c: Include <grub/fshelp.h>.
11600         (FILETYPE_REG): New macro.
11601         (FILETYPE_INO_REG): Likewise.
11602         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
11603         Changed all users.
11604         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
11605         all users.
11606         (grub_fshelp_node): New struct.
11607         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
11608         to a pointer.
11609         (grub_ext2_get_file_block): Removed function.
11610         (grub_ext2_read_block): New function.
11611         (grub_ext2_read_file): Replaced parameter `data' by `node'.
11612         This function was written.
11613         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
11614         (grub_ext2_find_file): Removed function.
11615         (grub_ext2_read_symlink): New function.
11616         (grub_ext2_iterate_dir): Likewise.
11617         (grub_ext2_open): Rewritten.
11618         (grub_ext2_dir): Rewritten.
11619         * include/grub/fshelp.h: New file.
11620         * fs/fshelp.c: Likewise.
11622 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
11624         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
11625         (print_message): Add a missing newline.
11626         (run_menu): Added timeout support.
11627         (run_menu_entry): New local function.
11628         (grub_menu_run): Added support for booting.
11630         * kern/loader.c (grub_loader_is_loaded): New function.
11632         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
11633         (grub_get_rtc): Exported.
11635         * include/grub/i386/pc/time.h: Include grub/symbol.h.
11636         (grub_get_rtc): Exported.
11638         * include/grub/normal.h (struct grub_command_list): Remove
11639         constant from the member `command'.
11641         * include/grub/loader.h (grub_loader_is_loaded): Declared.
11643         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
11645         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
11647 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
11649         Add support for the JFS filesystem.
11651         * fs/jfs.c: New file.
11652         * include/grub/fs.h (grub_jfs_init): New prototype.
11653         (grub_jfs_fini): New prototype.
11654         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
11655         (grub_emu_SOURCES): Likewise.
11656         (pkgdata_MODULES): Add jfs.mod.
11657         (jfs_mod_SOURCES): New variable.
11658         (jfs_mod_CFLAGS): Likewise.
11659         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
11660         (grubof_SOURCES): Likewise.
11661         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
11663         * fs/fat.c (grub_fat_find_dir): Convert the filename little
11664         endian to the host endian.
11665         (grub_fat_utf16_to_utf8): Move function from there...
11666         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
11667         the endianness of the source string anymore.
11668         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
11670 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
11672         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
11673         (grub_boot_fini) [GRUB_UTIL]: Likewise.
11674         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
11675         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
11677         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
11678         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
11679         for `node_found' and `it_dir'.
11680         (grub_hfs_dir): Add prototype for `dir_hook'.
11682         * fs/minix.c (grub_minix_get_file_block): Add prototype for
11683         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
11684         and `indir32' to silence a gcc warning.
11686         * include/grub/fs.h (grub_hfs_init): New prototype.
11687         (grub_hfs_fini): Likewise.
11690 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
11692         Each disk device has its own id now. This is useful to make use
11693         of multiple disk devices.
11695         * include/grub/disk.h (grub_disk_dev_id): New enum.
11696         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
11697         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
11699         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
11700         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11702         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
11703         GRUB_DISK_DEVICE_OFDISK_ID as an id.
11705         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
11706         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11708         * include/grub/disk.h (struct grub_disk_dev): Added a new member
11709         "id" which is used by the cache manager.
11711         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
11712         of just "GRUB".
11714 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
11716         * fs/hfs.c: New file.
11717         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
11718         (grub_emu_SOURCES): Likewise.
11719         (pkgdata_MODULES): Add hfs.mod.
11720         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
11721         (grubof_SOURCES): Likewise.
11722         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
11724         * include/grub/misc.h (grub_strncasecmp): Add prototype.
11725         * kern/misc.c (grub_strncasecmp): Add function.
11727 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
11729         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
11730         with parentheses.
11732         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
11733         (grub_ext2_dir): In case the directory entry type is unknown, read
11734         it from the inode.
11736 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
11738         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
11739         grub_load_linux instead of grub_rescue_cmd_linux as second
11740         argument of grub_rescue_register_command.
11742         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
11744 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
11746         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
11747         function.
11748         * commands/boot.c: Remove the check for `GRUB_UTIL'.
11749         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11750         `loader/powerpc/ieee1275/linux.c',
11751         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
11752         * include/grub/powerpc/ieee1275/ieee1275.h
11753         (grub_ieee1275_release): New prototype.
11754         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
11755         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
11756         normal, boot, linux and linux_normal.
11757         * loader/powerpc/ieee1275/linux.c: New file.
11758         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11760 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
11762         * normal/arg.c (grub_arg_parse): Correct error handling after
11763         reallocating the argumentlist (check if `argl' is not null instead
11764         of checking if `args' is not null).
11765         * kern/mm.c (grub_realloc): Return the same pointer when using the
11766         same region, instead of returning the header address.
11768 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
11770         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
11771         one block instead of two when looking for the initial partition.
11772         (grub_partition_probe): Initialize the local variable `p' with 0.
11773         Use base 10 for the grub_strtoul call.
11774         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
11775         need for one local variable.
11776         (grub_strtoul): Don't add the new value to `num', instead of that
11777         just assign it.
11779 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
11781         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
11782         (pxeboot_img_SOURCES): New variable.
11783         (pxeboot_img_ASFLAGS): Likewise.
11784         (pxeboot_img_LDFLAGS): Likewise.
11785         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
11786         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
11787         <lode_leroy@hotmail.com>.
11789 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
11791         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
11792         there was no input.
11794 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
11796         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
11797         the history buffer logic.
11799 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
11801         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
11802         (FILETYPE_INO_SYMLINK): New macros.
11803         (grub_ext2_find_file): Check if the node is a directory using the
11804         inode stat information instead of using the filetype in the
11805         dirent.  Exclude the first character of an absolute symlink.
11806         (grub_ext2_dir): Mask out the filetype part of the mode member of
11807         the inode.
11809 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
11811         Add support for UFS version 1 and 2.  Add support for the minix
11812         filesystem version 1 and 2, both the variants with 14 and 30 long
11813         filenames.
11815         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
11816         fs/minix.c.
11817         (grub_emu_SOURCES): Likewise.
11818         (pkgdata_MODULES): Add ufs.mod and minix.mod.
11819         (ufs_mod_SOURCES): New variable.
11820         (ufs_mod_CFLAGS): Likewise.
11821         (minix_mod_SOURCES): Likewise.
11822         (minix_mod_CFLAGS): Likewise.
11823         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
11824         fs/minix.c.
11825         (grubof_SOURCES): Likewise.
11826         * fs/ufs.c: New file.
11827         * fs/minix.c: New file.
11828         * include/grub/fs.h (grub_ufs_init): New prototype.
11829         (grub_ufs_fini): Likewise.
11830         (grub_minix_init): Likewise.
11831         (grub_minix_fini): Likewise.
11832         * util/grub-emu.c (main): Initialize and deinitialize UFS and
11833         minix fs.
11835 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
11837         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
11838         commands/ls.c, commands/terminal.c, commands/boot.c,
11839         commands/cmp.c and commands/cat.c.
11840         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
11842         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
11843         "env.h"
11845 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
11847         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
11848         and grub_, respectively. Because the conversion is trivial and
11849         mechanical, I omit the details here. Please refer to the CVS
11850         if you need more information.
11852 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
11854         * include/pupa: Renamed to ...
11855         * include/grub: ... this.
11856         * util/i386/pc/pupa-mkimage.c: Renamed to ...
11857         * util/i386/pc/grub-mkimage.c: ... this.
11858         * util/i386/pc/pupa-setup.c: Renamed to ...
11859         * util/i386/pc/grub-setup.c: ... this.
11860         * util/pupa-emu.c: Renamed to ...
11861         * util/grub-emu.c: ... this.
11863 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
11865         Add support for the newworld apple macintosh (PPC).  This has been
11866         tested on the powerbook 2000 only.  It only adds support for
11867         generic ieee1275 functions, console and disk support.  This should
11868         be easy to port to other architectures with support for Open
11869         Firmware.
11871         * configure.ac: Accept the powerpc as host_cpu.  In the case of
11872         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
11873         specific tests are only executed while building for the i386.
11874         Inverse test for crosscompile.
11875         * genmk.rb (Utility): Allow assembler files.
11876         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
11877         * conf/powerpc-ieee1275.rmk: New file.
11878         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
11879         * disk/powerpc/ieee1275/partition.c: Likewise.
11880         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
11881         * include/pupa/powerpc/ieee1275/console.h: Likewise.
11882         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
11883         * include/pupa/powerpc/ieee1275/time.h: Likewise.
11884         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
11885         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
11886         * include/pupa/powerpc/ieee1275/loader.h
11887         * include/pupa/powerpc/setjmp.h: Likewise.
11888         * include/pupa/powerpc/types.h: Likewise.
11889         * kern/powerpc/ieee1275/init.c: Likewise.
11890         * kern/powerpc/ieee1275/openfw.c: Likewise.
11891         * term/powerpc/ieee1275/ofconsole.c: Likewise.
11893         These files were written by Johan Rydberg
11894         (jrydberg@night.trouble.net) and I only modified them slightly.
11896         * boot/powerpc/ieee1275/cmain.c: New file.
11897         * boot/powerpc/ieee1275/crt0.S: Likewise.
11898         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
11899         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
11901 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11903         * Makefile.in: Update copyright.
11904         * genmodsrc.sh: Likewise.
11905         * gensymlist.sh: Likewise.
11906         * term/i386/pc/vga.c: Indent correctly.
11908         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
11909         bugreporting address.
11910         * util/i386/pc/pupa-setup.c (usage): Likewise,
11911         (main): Call pupa_ext2_init and pupa_ext2_fini.
11913         * fs/fat.c (log2): Renamed to ...
11914         (fat_log2): ... this.
11915         All callers changed.
11916         * kern/misc.c (memcpy): Alias to pupa_memmove.
11917         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
11918         lvalue cast.
11919         * util/console.c (pupa_ncurses_fini): Return 0.
11921         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
11922         Move fail label here.
11923         [__GNU__]: Don't warn when using stat.
11924         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
11925         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
11926         long int. Use strtol instead of strtoul.
11928 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
11930         * commands/boot.c: New file.
11931         * commands/cat.c: Likewise.
11932         * commands/cmp.c: Likewise.
11933         * commands/ls.c: Likewise.
11934         * commands/terminal.c: Likewise.
11935         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
11936         (pupa_register_command): Changed interface to match the new
11937         argument parser.
11938         (pupa_command_execute): Changed (almost rewritten) so it uses
11939         pupa_split_command.  Added support for setting variables using the
11940         syntax `foo=bar'.
11941         (rescue_command): Changed to work with the new argument parser.
11942         (terminal_command): Moved from here to commands/terminal.c.
11943         (set_command): New function.
11944         (unset_command): New function.
11945         (insmod_command): New function.
11946         (rmmod_command): New function.
11947         (lsmod_command): New function.
11948         (pupa_command_init): Don't initialize the command terminal
11949         anymore.  Initialize the commands set, unset, insmod, rmmod and
11950         lsmod.
11951         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
11952         (kernel_img_HEADERS): Add arg.h and env.h.
11953         (pupa_mkimage_LDFLAGS): Add kern/env.c.
11954         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
11955         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
11956         normal/arg.c.
11957         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
11958         terminal.mod.
11959         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
11960         (boot_mod_SOURCES): New variable.
11961         (terminal_mod_SOURCES): Likewise.
11962         (ls_mod_SOURCES): Likewise.
11963         (cmp_mod_SOURCES): Likewise.
11964         (cat_mod_SOURCES): Likewise.
11966         * normal/arg.c: New file.
11967         * kern/env.c: Likewise.
11968         * include/pupa/arg.h: Likewise.
11969         * include/pupa/env.h: Likewise.
11970         * font/manager.c (font_command): Changed to match argument parsing
11971         interface changes.
11972         (PUPA_MOD_INIT): Likewise.
11973         * hello/hello.c (pupa_cmd_hello): Likewise.
11974         (PUPA_MOD_INIT): Likewise.
11975         * include/pupa/disk.h: Include <pupa/device.h>.
11976         (pupa_print_partinfo): New prototype.
11977         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
11978         (pupa_dl_get_prefix): Likewise.
11979         * include/pupa/misc.h: Include <pupa/err.h>.
11980         (pupa_isgraph): New prototype.
11981         (pupa_isdigit): Likewise.
11982         (pupa_split_cmdline): Likewise.
11983         * include/pupa/normal.h: Include <pupa/arg.h>.
11984         (pupa_command): Changed the prototype of the member `func' to
11985         match the argument parsing interface.  Added member `options'.
11986         (pupa_register_command): Updated to match function.
11987         (pupa_arg_parse): New prototype.
11988         (pupa_hello_init) [PUPA_UTIL]: New prototype.
11989         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
11990         (pupa_ls_init) [PUPA_UTIL]: Likewise.
11991         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
11992         (pupa_cat_init) [PUPA_UTIL]: Likewise.
11993         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
11994         (pupa_boot_init) [PUPA_UTIL]: Likewise.
11995         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
11996         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
11997         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
11998         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
11999         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12000         * kern/disk.c: Include <pupa/file.h>.
12001         (pupa_print_partinfo): New function.
12002         * kern/dl.c: Include <pupa/env.h>.
12003         (pupa_dl_dir): Variable removed.
12004         (pupa_dl_load): Use the environment variable `prefix' instead of
12005         the variable pupa_dl_dir.
12006         (pupa_dl_set_prefix): Function removed.
12007         (pupa_dl_get_prefix): Likewise.
12008         * kern/i386/pc/init.c: Include <pupa/env.h>.
12009         (pupa_machine_init): Use the environment variable `prefix' instead of
12010         using pupa_dl_set_prefix to set the prefix.
12011         * kern/main.c: Include <pupa/env.h>.
12012         (pupa_set_root_dev): Use the environment variable `prefix' instead of
12013         using pupa_dl_get_prefix to get the prefix.
12014         * kern/misc.c: Include <pupa/env.h>.
12015         (pupa_isdigit): New function.
12016         (pupa_isgraph): Likewise.
12017         (pupa_ftoa): Likewise.
12018         (pupa_vsprintf): Added support for printing values of the type
12019         `double'.  Make it possible to format variable output when using
12020         formatting like `%1.2%f'.
12021         (pupa_split_cmdline): New function.
12022         * kern/rescue.c: Include <pupa/env.h>.
12023         (next_word): Removed function.
12024         (pupa_rescue_cmd_prefix): Likewise.
12025         (pupa_rescue_cmd_set): New function.
12026         (pupa_rescue_cmd_unset): New function.
12027         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12028         split the command line instead of splitting it here.  Added
12029         support for setting variables using the syntax `foo=bar'.  Don't
12030         initialize the prefix command anymore.  Initialized the set and
12031         unset commands.
12032         * normal/cmdline.c: Include <pupa/env.h>.
12033         (pupa_tab_complete): Added prototypes for print_simple_completion,
12034         print_partition_completion, add_completion, iterate_commands,
12035         iterate_dev, iterate_part and iterate_dir. Moved code to print
12036         partition information from here to kern/disk.c.
12037         (pupa_cmdline_run): Don't check if the function exists anymore.
12038         * normal/main.c: Include <pupa/env.h>.
12039         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12040         instead of using pupa_dl_get_prefix to get the prefix.
12041         * term/i386/pc/vga.c: Include <pupa/arg.h>.
12042         (check_vga_mem): Cast pointers to `void *' to silence a gcc
12043         warning.
12044         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12045         (pupa_vga_setcolor): Declare unused variables with `__attribute__
12046         ((unused))' to silence a gcc warning.
12047         (pupa_vga_setcolor): Likewise.
12048         (debug_command): Changed to match argument parsing
12049         interface changes.
12050         * util/pupa-emu.c: Include <pupa/env.h>.
12051         (options): Added 0's for unused fields to silence a gcc warning.
12052         (argp): Likewise.
12053         (main): Use the environment variable `prefix' instead of using
12054         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
12055         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
12056         and terminal.
12058         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12059         * util/misc.c: Include <malloc.h>.
12060         (pupa_malloc): Rewritten so errors are correctly reported.
12061         (pupa_realloc): Likewise.
12062         (pupa_memalign): Likewise.
12063         (pupa_mm_init_region): Declare unused variables with
12064         `__attribute__ ((unused))' to silence a gcc warning.
12065         * normal/i386/setjmp.S: Remove tab at the end of the file to
12066         silence a gcc warning.
12067         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12068         variables with `__attribute__ ((unused))' to silence a gcc
12069         warning.
12070         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12071         local variable i unsigned to silence a gcc warning.
12073         * kern/term.c: Include <pupa/misc.h>.
12074         (pupa_more_lines): New variable.
12075         (pupa_more): Likewise.
12076         (pupa_putcode): When the pager is active pause at the end of every
12077         screen.
12078         (pupa_set_more): New function.
12079         * include/pupa/term.h (pupa_set_more): New prototype.
12082 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
12084         Now this project is GRUB 2 rather than PUPA. The location of
12085         the CVS repository was moved to GRUB's.
12087         * configure.ac: Use bug-grub as the reporting address.
12088         Use GRUB instead of PUPA.
12089         Change the version number to 1.90.
12091 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
12093         * genkernsyms.sh: Updated copyright information.
12094         * genmk.rb: Likewise.
12095         * genmodsrc.sh: Likewise.
12096         * gensymlist.sh: Likewise.
12097         * boot/i386/pc/boot.S: Likewise.
12098         * boot/i386/pc/diskboot.S: Likewise.
12099         * disk/i386/pc/biosdisk.c: Likewise.
12100         * disk/i386/pc/partition.c: Likewise.
12101         * font/manager.c: Likewise.
12102         * fs/ext2.c: Likewise.
12103         * fs/fat.c: Likewise.
12104         * include/pupa/boot.h: Likewise.
12105         * include/pupa/device.h: Likewise.
12106         * include/pupa/disk.h: Likewise.
12107         * include/pupa/dl.h: Likewise.
12108         * include/pupa/elf.h: Likewise.
12109         * include/pupa/err.h: Likewise.
12110         * include/pupa/file.h: Likewise.
12111         * include/pupa/font.h: Likewise.
12112         * include/pupa/fs.h: Likewise.
12113         * include/pupa/kernel.h: Likewise.
12114         * include/pupa/loader.h: Likewise.
12115         * include/pupa/misc.h: Likewise.
12116         * include/pupa/mm.h: Likewise.
12117         * include/pupa/net.h: Likewise.
12118         * include/pupa/normal.h: Likewise.
12119         * include/pupa/rescue.h: Likewise.
12120         * include/pupa/setjmp.h: Likewise.
12121         * include/pupa/symbol.h: Likewise.
12122         * include/pupa/term.h: Likewise.
12123         * include/pupa/types.h: Likewise.
12124         * include/pupa/i386/setjmp.h: Likewise.
12125         * include/pupa/i386/types.h: Likewise.
12126         * include/pupa/i386/pc/biosdisk.h: Likewise.
12127         * include/pupa/i386/pc/boot.h: Likewise.
12128         * include/pupa/i386/pc/console.h: Likewise.
12129         * include/pupa/i386/pc/init.h: Likewise.
12130         * include/pupa/i386/pc/kernel.h: Likewise.
12131         * include/pupa/i386/pc/linux.h: Likewise.
12132         * include/pupa/i386/pc/loader.h: Likewise.
12133         * include/pupa/i386/pc/memory.h: Likewise.
12134         * include/pupa/i386/pc/multiboot.h: Likewise.
12135         * include/pupa/i386/pc/partition.h: Likewise.
12136         * include/pupa/i386/pc/time.h: Likewise.
12137         * include/pupa/i386/pc/vga.h: Likewise.
12138         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12139         * include/pupa/util/getroot.h: Likewise.
12140         * include/pupa/util/misc.h: Likewise.
12141         * include/pupa/util/resolve.h: Likewise.
12142         * kern/device.c: Likewise.
12143         * kern/disk.c: Likewise.
12144         * kern/dl.c: Likewise.
12145         * kern/err.c: Likewise.
12146         * kern/file.c: Likewise.
12147         * kern/fs.c: Likewise.
12148         * kern/loader.c: Likewise.
12149         * kern/main.c: Likewise.
12150         * kern/misc.c: Likewise.
12151         * kern/mm.c: Likewise.
12152         * kern/rescue.c: Likewise.
12153         * kern/term.c: Likewise.
12154         * kern/i386/dl.c: Likewise.
12155         * kern/i386/pc/init.c: Likewise.
12156         * kern/i386/pc/lzo1x.S: Likewise.
12157         * kern/i386/pc/startup.S: Likewise.
12158         * loader/i386/pc/chainloader.c: Likewise.
12159         * loader/i386/pc/linux.c: Likewise.
12160         * loader/i386/pc/multiboot.c: Likewise.
12161         * normal/cmdline.c: Likewise.
12162         * normal/command.c: Likewise.
12163         * normal/main.c: Likewise.
12164         * normal/menu.c: Likewise.
12165         * normal/i386/setjmp.S: Likewise.
12166         * term/i386/pc/console.c: Likewise.
12167         * term/i386/pc/vga.c: Likewise.
12168         * util/console.c: Likewise.
12169         * util/genmoddep.c: Likewise.
12170         * util/misc.c: Likewise.
12171         * util/pupa-emu.c: Likewise.
12172         * util/resolve.c: Likewise.
12173         * util/unifont2pff.rb: Likewise.
12174         * util/i386/pc/biosdisk.c: Likewise.
12175         * util/i386/pc/getroot.c: Likewise.
12176         * util/i386/pc/pupa-mkimage.c: Likewise.
12177         * util/i386/pc/pupa-setup.c: Likewise.
12179 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
12181         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12182         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
12183         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
12184         reading and reset it after reading.
12185         (pupa_ext2_close): Return PUPA_ERR_NONE.
12187         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12188         Correct value.
12189         (struct linux_kernel_header): Add kernel_version and
12190         initrd_addr_max.
12191         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12192         pupa_file_read succeeds.
12193         (pupa_rescue_cmd_initrd): Implement.
12195 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
12197         * fs/ext2.c (pupa_ext2_label): New function.
12198         (pupa_ext2_fs): Added label.
12199         * fs/fat.c (pupa_fat_label): New function.
12200         (pupa_fat_fs): Added label.
12201         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12203         * kern/misc.c (pupa_strndup): New function.
12204         * include/pupa/misc.h (pupa_strndup): New prototype.
12206         * include/pupa/normal.h: Include <pupa/err.h>.
12207         (pupa_set_history): New prototype.
12208         (pupa_iterate_commands): New prototype.
12209         * normal/cmdline.c: Include <pupa/machine/partition.h>,
12210         <pupa/disk.h>, <pupa/file.h>.
12211         (hist_size): New variable.
12212         (hist_lines): Likewise.
12213         (hist_end): Likewise.
12214         (hist_used): Likewise.
12215         (pupa_set_history): New function.
12216         (pupa_history_get): Likewise.
12217         (pupa_history_add): Likewise.
12218         (pupa_history_replace): Likewise.
12219         (pupa_tab_complete): Likewise.
12220         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
12221         completion shows partitionnames while completing partitions, this
12222         feature was suggested by Jeff Bailey.
12223         * normal/command.c (pupa_iterate_commands): New function.
12224         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12225         (pupa_normal_init): Initialize history buffer.
12226         (PUPA_MOD_INIT): Likewise.
12227         (pupa_normal_fini): Free the history buffer.
12228         (PUPA_MOD_FINI): Likewise.
12230         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12231         key.
12233         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12234         * configure.ac [i386]: Check for regparam bug.
12235         (NESTED_FUNC_ATTR) [! i386]: Defined.
12237 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
12239         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12240         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12241         (pupa_emu_SOURCES): New variable.
12242         (pupa_emu_LDFLAGS): Likewise.
12243         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12244         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12245         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12246         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12247         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12248         (pupa_jmp_buf): New typedef.
12249         (pupa_setjmp) [PUPA_UTIL]: New macro.
12250         (pupa_longjmp) [PUPA_UTIL]: Likewise.
12251         * include/pupa/term.h (struct pupa_term): New member `refresh'.
12252         (pupa_refresh): New prototype.
12253         * include/pupa/util/getroot.h: New file.
12254         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12255         it.
12256         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12257         (pupa_rescue_cmd_cat): Likewise.
12258         (pupa_rescue_cmd_ls): Likewise.
12259         (pupa_rescue_cmd_testload): Likewise.
12260         (pupa_rescue_cmd_lsmod): Likewise.
12261         * normal/cmdline.c (pupa_cmdline_get): Likewise.
12262         * normal/menu.c (run_menu): Likewise.
12263         * kern/term.c (pupa_cls): Likewise.
12264         (pupa_refresh): New function.
12265         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12266         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12267         * util/console.c: New file.
12269         * util/i386/pc/getroot.c: New file.
12270         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12271         (pupa_putchar): New function.
12272         (pupa_refresh): Likewise.
12273         (xgetcwd): Function moved to ...
12274         (strip_extra_slashes): Likewise.
12275         (get_prefix): Likewise.
12276         * util/i386/pc/getroot.c: ... here.
12277         (find_root_device): Function moved and renamed to...
12278         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12279         Changed all callers.
12280         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12281         and renamed to...
12282         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12283         Changed all callers.
12284         * util/misc.c (pupa_memalign): New function.
12285         (pupa_mm_init_region): Likewise.
12286         (pupa_register_exported_symbols): Likewise.
12287         (pupa_putchar): Function removed.
12288         * util/pupa-emu.c: New file.
12290 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
12292         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12293         (_multiboot_mod_SOURCES): New variable.
12294         (_multiboot_mod_CFLAGS): Likewise.
12295         * loader/i386/pc/multiboot.c: New file.
12296         * include/pupa/i386/pc/multiboot.h: Likewise.
12297         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12298         (pupa_multiboot_real_boot): New function.
12299         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12300         (pupa_multiboot_real_boot): New prototype.
12301         (pupa_rescue_cmd_multiboot): Likewise
12302         (pupa_rescue_cmd_module): Likewise.
12304         * kern/loader.c (pupa_loader_set): Continue when
12305         pupa_loader_unload_func() fails.
12306         (pupa_loader_unset): New function.
12307         * include/pupa/loader.h (pupa_loader_unset): New prototype.
12309         * kern/misc.c (pupa_stpcpy): New function.
12310         * include/pupa/misc.h (pupa_stpcpy): New prototype.
12312 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
12314         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12315         for available extensions.
12317         * include/pupa/i386/pc/time.h: New file.
12318         * kern/disk.c: Include <pupa/machine/time.h>.
12319         (PUPA_CACHE_TIMEOUT): New macro.
12320         (pupa_last_time): New variable.
12321         (pupa_disk_open): Flush the cache when there was a timeout.
12322         (pupa_disk_close): Reset the timer.
12323         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
12324         pupa_currticks.
12325         * util/misc.c: Include <sys/times.h>
12326         (pupa_get_rtc): New function.
12328 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
12330         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
12331         as blocks.
12332         (pupa_ext2_get_file_block): Use blocks member.
12334         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
12335         first block. Return -1 instead of pupa_errno on error.
12337 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
12339         * README: In the pupa-mkimage example use _chain instead of chain
12340         and ext2 instead of fat.
12341         * TODO: Replace ext2fs with jfs as an example.  Add an item for
12342         adding journal playback for ext2fs.
12343         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
12344         (pkgdata_MODULES): Added ext2.mod.
12345         (ext2_mod_SOURCES): New variable.
12346         (ext2_mod_CFLAGS): Likewise.
12347         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
12348         * include/pupa/misc.h (pupa_strncpy): New prototype.
12349         (pupa_strcat): Likewise.
12350         (pupa_strncmp): Likewise.
12351         * kern/misc.c (pupa_strcat): Enable function.
12352         (pupa_strncpy): New function.
12353         (pupa_strncmp): Likewise.
12354         * fs/ext2.c: New file.
12356         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
12357         when the read failed before retrying.
12358         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
12359         (_FILE_OFFSET_BITS): Likewise.
12360         * configure.ac: Added AC_SYS_LARGEFILE.
12362 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
12364         * genmk.rb (PModule#rule): Make sure to get only symbol names
12365         from the output of nm.
12366         Reported by Robert Millan <zeratul2@wanadoo.es>.
12368 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
12370         I forgot to check in these changes for a long time. This adds
12371         incomplete support for VGA console, and this is still very
12372         buggy. Also, a lot of consideration is required for I18N,
12373         UNICODE, and VGA font issues. Therefore, assume that this is
12374         such that "better than nothing".
12376         * font/manager.c: New file.
12377         * include/pupa/font.h: Likewise.
12378         * include/pupa/i386/pc/vga.h: Likewise.
12379         * term/i386/pc/vga.c: Likewise.
12380         * util/unifont2pff.rb: Likewise.
12382         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
12383         (pkgdata_MODULES): Added vga.mod and font.mod.
12384         (vga_mod_SOURCES): New variables.
12385         (vga_mod_CFLAGS): Likewise.
12386         (font_mod_SOURCES): Likewise.
12387         (font_mod_CFLAGS): Likewise.
12389         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12391         * include/pupa/term.h: Include pupa/err.h.
12392         (struct pupa_term): Added init and fini.
12393         Changed the argument of putchar to pupa_uint32_t.
12395         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12396         (pupa_console_real_putchar): New prototype.
12397         (pupa_console_putchar): Removed.
12398         (pupa_console_checkkey): Exported.
12399         (pupa_console_getkey): Likewise.
12401         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12402         characters.
12404         * kern/term.c (pupa_term_set_current): Rewritten.
12405         (pupa_putchar): Likewise.
12406         (pupa_putcode): New function.
12408         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12409         (pupa_console_real_putchar): ... this.
12410         (pupa_vga_set_mode): New function.
12411         (pupa_vga_get_font): Likewise.
12413         * normal/command.c: Include pupa/term.h.
12414         (terminal_command): New function.
12415         (pupa_command_init): Register the command "terminal".
12417         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12418         (DISP_UP): Likewise.
12419         (DISP_RIGHT): Likewise.
12420         (DISP_DOWN): Likewise.
12421         (DISP_HLINE): Likewise.
12422         (DISP_VLINE): Likewise.
12423         (DISP_UL): Likewise.
12424         (DISP_UR): Likewise.
12425         (DISP_LL): Likewise.
12426         (DISP_LR): Likewise.
12428         * term/i386/pc/console.c (pupa_console_putchar): New function.
12430 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
12432         * util/resolve.c (pupa_util_resolve_dependencies): BUG
12433         FIX. Reverse the path_list.
12435         * include/pupa/normal.h: Export pupa_register_command and
12436         pupa_unregister_command.
12438         * hello/hello.c (pupa_cmd_hello): New module.
12439         * conf/i386-pc.rmk: Added hello.mod.
12441 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
12443         * kern/i386/pc/lzo1x.S: New file.
12445         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12446         (compress_kernel): New variable.
12447         (generate_image): Heavily modified to support compressing a
12448         large part of the core image.
12450         * util/misc.c (pupa_util_read_image): Fix a file descriptor
12451         leak.
12452         (pupa_util_load_image): New function.
12454         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12455         (pupa_compressed_size): New variable.
12456         (codestart): Enable Gate A20 here.
12457         Decompress the compressed part of the core image.
12458         Rearrange the code to put functions and variables which are
12459         required for initialization in the non-compressed part.
12460         Include lzo1x.S.
12462         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
12463         here.
12465         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
12467         * include/pupa/i386/pc/kernel.h
12468         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
12469         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
12470         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12471         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12472         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
12474         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
12476         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
12477         (Utility#rule): Likewise.
12479         * configure.ac: Check if LZO is available.
12481 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
12483         * include/pupa/normal.h: New file.
12484         * include/pupa/setjmp.h: Likewise.
12485         * include/pupa/i386/setjmp.h: Likewise.
12486         * normal/cmdline.c: Likewise.
12487         * normal/command.c: Likewise.
12488         * normal/main.c: Likewise.
12489         * normal/menu.c: Likewise.
12490         * normal/i386/setjmp.S: Likewise.
12492         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
12493         (pupa_rescue_cmd_initrd): Likewise.
12495         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
12496         Likewise.
12498         * kern/i386/pc/startup.S (translation_table): New variable.
12499         (translate_keycode): New function.
12500         (pupa_console_getkey): Call translate_keycode.
12502         * kern/rescue.c (attempt_normal_mode): New function.
12503         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
12504         it failed, print a message.
12506         * kern/mm.c (pupa_real_malloc): Print more information when a
12507         free magic is broken.
12508         (pupa_free): If the first free header is not free actually, set
12509         it to P.
12511         * kern/main.c (pupa_load_normal_mode): Just load the module
12512         "normal".
12513         (pupa_main): Don't print the message
12514         "Entering into rescue mode..." here.
12516         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
12517         Declared.
12518         (pupa_rescue_cmd_initrd): Likewise.
12519         (pupa_rescue_cmd_initrd): Likewise.
12521         * include/pupa/symbol.h (FUNCTION): Specify the type.
12522         (VARIABLE): Likewise.
12524         * include/pupa/err.h (pupa_err_t): Added
12525         PUPA_ERR_UNKNOWN_COMMAND.
12527         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
12528         (pupa_dl_get_prefix): Likewise.
12530         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
12531         Added _chain.mod and _linux.mod instead of chain.mod and
12532         linux.mod.
12533         (chain_mod_SOURCES): Renamed to ...
12534         (_chain_mod_SOURCES): ... this.
12535         (chain_mod_CFLAGS): Renamed to ...
12536         (_chain_mod_CFLAGS): ... this.
12537         (linux_mod_SOURCES): Renamed to ...
12538         (_linux_mod_SOURCES): ... this.
12539         (linux_mod_CFLAGS): Renamed to ...
12540         (_linux_mod_CFLAGS): ... this.
12541         (normal_mod_SOURCES): New variable.
12542         (normal_mod_CFLAGS): Likewise.
12543         (normal_mod_ASFLAGS): Likewise.
12545 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
12547         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
12548         possible.
12550         * kern/dl.c (pupa_dl_ref): Refer depending modules
12551         recursively.
12552         (pupa_dl_unref): Unrefer depending modules recursively.
12553         Don't call pupa_dl_unload implicitly, because PUPA can crash if
12554         a module is unloaded before one depending on that module is
12555         unloaded.
12556         (pupa_dl_unload): Unload depending modules explicitly,
12557         if possible.
12559 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
12561         * include/pupa/i386/pc/linux.h: New file.
12562         * loader/i386/pc/linux.c: Likewise.
12564         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
12565         Removed.
12566         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
12567         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
12568         of PUPA_CHAINLOADER_BOOT_SECTOR.
12570         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
12571         (pupa_linux_prot_size): New variable.
12572         (pupa_linux_tmp_addr): Likewise.
12573         (pupa_linux_real_addr): Likewise.
12574         (pupa_linux_boot_zimage): New function.
12575         (pupa_linux_boot_bzimage): Likewise.
12577         * kern/i386/pc/init.c (struct mem_region): New structure.
12578         (MAX_REGIONS): New macro.
12579         (mem_regions): New variable.
12580         (num_regions): Likewise.
12581         (pupa_os_area_addr): Likewise.
12582         (pupa_os_area_size): Likewise.
12583         (pupa_lower_mem): Likewise.
12584         (pupa_upper_mem): Likewise.
12585         (add_mem_region): New function.
12586         (compact_mem_regions): Likewise.
12587         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
12588         the size of the conventional memory and that of so-called upper
12589         memory (before the first memory hole).
12590         Instead of adding each found region to free memory, use
12591         add_mem_region and add them after removing overlaps.
12592         Also, add only 1/4 of the upper memory to free memory. The rest
12593         is used for loading OS images. Maybe this is ad hoc, but this
12594         makes it much easier to relocate OS images when booting.
12596         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
12597         (pupa_enter_rescue_mode): Don't register initrd and module.
12599         * kern/mm.c: Include pupa/dl.h.
12601         * kern/main.c: Include pupa/file.h and pupa/device.h.
12603         * kern/loader.c (pupa_loader_load_module_func): Removed.
12604         (pupa_loader_load_module): Likewise.
12606         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
12607         ``.o''.
12609         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
12610         (pupa_linux_tmp_addr): Likewise.
12611         (pupa_linux_real_addr): Likewise.
12612         (pupa_linux_boot_zimage): Likewise.
12613         (pupa_linux_boot_bzimage): Likewise.
12615         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
12616         (pupa_upper_mem): Likewise.
12617         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
12618         module is too dangerous.
12620         * include/pupa/loader.h (pupa_os_area_addr): Declared.
12621         (pupa_os_area_size): Likewise.
12622         (pupa_loader_set): Remove the first argument. Loader doesn't
12623         manage modules or initrd any longer.
12624         (pupa_loader_load_module): Removed.
12626         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
12627         (linux_mod_SOURCES): New variable.
12628         (linux_mod_CFLAGS): Likewise.
12630 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
12632         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
12633         the length of a blocklist correctly.
12635         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
12636         Use ioctl only if the OS file is a block device.
12637         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
12638         not very useful for normal files.
12640         * kern/main.c (pupa_set_root_dev): New function.
12641         (pupa_load_normal_mode): Likewise.
12642         (pupa_main): Call those above.
12644         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
12645         pupa_uint16_t.
12647         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
12649 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
12651         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
12652         (setup): Configure the installed partition information and the
12653         dl prefix.
12655         * loader/i386/pc/chainloader.c (my_mod): New variable.
12656         (pupa_chainloader_unload): New function.
12657         (pupa_rescue_cmd_chainloader): Refer itself.
12658         (PUPA_MOD_INIT): Save its own module in MY_MOD.
12660         * kern/i386/pc/startup.S (install_partition): Removed.
12661         (version_string): Likewise.
12662         (config_file): Likewise.
12663         (pupa_install_dos_part): New variable.
12664         (pupa_install_bsd_part): Likewise.
12665         (pupa_prefix): Likewise.
12666         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
12668         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
12669         and pupa/misc.h.
12670         (make_install_device): New function.
12671         (pupa_machine_init): Set the dl prefix.
12673         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
12674         (buf): Renamed to ...
12675         (linebuf): ... this.
12676         (pupa_rescue_cmd_prefix): New function.
12677         (pupa_rescue_cmd_insmod): Likewise.
12678         (pupa_rescue_cmd_rmmod): Likewise.
12679         (pupa_rescue_cmd_lsmod): Likewise.
12680         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
12681         rmmod and lsmod.
12683         * kern/mm.c (pupa_memalign): If failed even after invalidating
12684         disk caches, unload unneeded modules and retry.
12686         * kern/misc.c (pupa_memmove): New function.
12687         (pupa_memcpy): Removed.
12688         (pupa_strcpy): New function.
12689         (pupa_itoa): Made static.
12691         * kern/dl.c (pupa_dl_iterate): New function.
12692         (pupa_dl_ref): Likewise.
12693         (pupa_dl_unref): Likewise.
12694         (pupa_dl_unload): Return if succeeded or not.
12695         (pupa_dl_unload_unneeded): New function.
12696         (pupa_dl_unload_all): Likewise.
12697         (pupa_dl_init): Renamed to ...
12698         (pupa_dl_set_prefix): ... this.
12699         (pupa_dl_get_prefix): New function.
12701         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
12702         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
12703         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12704         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12705         (pupa_install_dos_part): Declared.
12706         (pupa_install_bsd_part): Likewise.
12707         (pupa_prefix): Likewise.
12708         (pupa_boot_drive): Likewise.
12710         * include/pupa/types.h: Fix a typo.
12712         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
12713         pupa_memmove.
12714         (pupa_memmove): Declared.
12715         (pupa_strcpy): Likewise.
12717         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
12718         pupa_mod_init takes one argument, its own module.
12719         (pupa_dl_unload_unneeded): Declared.
12720         (pupa_dl_unload_all): Likewise.
12721         (pupa_dl_ref): Likewise.
12722         (pupa_dl_unref): Likewise.
12723         (pupa_dl_iterate): Likewise.
12724         (pupa_dl_init): Renamed to ...
12725         (pupa_dl_set_prefix): ... this.
12726         (pupa_dl_get_prefix): Declared.
12728         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
12729         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
12730         unloaded.
12731         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
12732         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
12734         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
12735         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
12737 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
12739         * util/i386/pc/pupa-setup.c (setup): Define the internal
12740         function find_first_partition_start at the top level, because GCC
12741         3.0.x cannot compile internal functions in deeper scopes
12742         correctly.
12743         (find_root_device): Use lstat instead of stat.
12744         Don't follow symbolic links.
12745         Fix the path-constructing code.
12747         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
12748         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
12749         by a BLKGETSIZE ioctl first, because block devices don't fill
12750         the member st_mode of the structure stat on Linux.
12751         [__linux__] (linux_find_partition): Use a temporary buffer
12752         REAL_DEV for the working space. Copy it to DEV before returning.
12753         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
12754         buffer cache consistent.
12755         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
12756         strncmp. The previous value was merely wrong.
12757         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
12759         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
12760         FAT size is 12. The previous value was merely wrong.
12762         * kern/main.c (pupa_main): Don't split the starting message from
12763         newlines.
12765         * kern/term.c (pupa_putchar): Put CR after LF instead of before
12766         LF, because BIOS goes crazy about character attributes in this
12767         case.
12769 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
12771         * include/i386/pc/util/biosdisk.h: New file.
12772         * util/i386/pc/biosdisk.c: Likewise.
12773         * util/i386/pc/pupa-setup.c: Likewise.
12775         * Makefile.in (INCLUDE_DISTFILES): Added
12776         include/pupa/i386/pc/util/biosdisk.h.
12777         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
12778         directory util/i386/pc.
12779         (install-local): Added a rule for sbin_UTILITIES.
12780         (uninstall): Likewise.
12782         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
12784         * util/misc.c (xrealloc): New function.
12785         (pupa_malloc): Likewise.
12786         (pupa_free): Likewise.
12787         (pupa_realloc): Likewise.
12788         (pupa_stop): Likewise.
12789         (pupa_putchar): Likewise.
12791         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
12793         * include/pupa/util/misc.h (xrealloc): Declared.
12795         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
12796         macro.
12797         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
12798         (PUPA_BOOT_MACHINE_BPB_END): ... this.
12800         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
12801         [PUPA_UTIL] (pupa_fat_fini): Likewise.
12803         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
12804         way should be implemented.
12805         [PUPA_UTIL] (pupa_fat_fini): Likewise.
12807         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
12808         the size of NAME for safety.
12809         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
12810         0x88.
12812         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
12813         (pupa_setup_SOURCES): Likewise.
12815         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
12817 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
12819         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
12820         bunch of pushl's from pusha, because this destroys the return
12821         value.
12823 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
12825         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
12826         This means that any missing prototypes could be fatal. Also, you
12827         must take care when writing assembly code. See the comments at
12828         the beginning of startup.S, for more details.
12830         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
12831         compilation mechanism.
12832         (pupa_chainloader_real_boot): Likewise.
12833         (pupa_biosdisk_rw_int13_extensions): Likewise.
12834         (pupa_biosdisk_rw_standard): Likewise.
12835         (pupa_biosdisk_check_int13_extensions): Likewise.
12836         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
12837         (pupa_biosdisk_get_diskinfo_standard): Likewise.
12838         (pupa_get_memsize): Likewise.
12839         (pupa_get_mmap_entry): Likewise.
12840         (pupa_console_putchar): Likewise.
12841         (pupa_console_setcursor): Likewise.
12842         (pupa_getrtsecs): Use pushl instead of push.
12844         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
12845         memory instead of the stack for a mmap entry, because some
12846         BIOSes may ignore the maximum size and overflow.
12848         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
12850         * genmk.rb (PModule#rule): Compile automatically generated
12851         sources with module-specific CFLAGS as well as other sources.
12853 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
12855         * configure.ac: Check ld.
12856         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
12857         respectively, before checking endianness and sizes.
12859         * Makefile.in (LD): New variable.
12861 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
12863         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
12865 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
12867         * Changelog: New file.