008-09-21 Felix Zielcke <fzielcke@z-51.de>
[grub2/phcoder.git] / ChangeLog
blob734616b697455dc790adc6a8116b80b40cc56c9c
1 008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4         (AC_PREREQ): Bumped to 2.59.
5         (AC_TRY_COMPILE): Replace obsolete macro with ...
6         (AC_COMPILE_IFELSE): ... this.
7         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
8         (AC_LINK_IFELSE): ... this.
10 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
12         * autogen.sh: Add a call to `gendistlist.sh'.
14 2008-09-19  Christian Franke  <franke@computer.org>
16         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
17         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
18         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
19         Export __enable_execute_stack() to modules.
20         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
21         New function.
23 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
25         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
26         Sort the list.
28 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
30         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
31         #include <grub/util/hostdisk.h>.
33 2008-09-08  Robert Millan  <rmh@aybabtu.com>
35         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
36         segments when their filesz is zero (grub_file_read() interprets
37         zero-size as "read untill EOF", which results in memory corruption).
38         Use `lowest_segment' rather than 0 for calculating the current
39         segment load address.
41 2008-09-08  Robert Millan  <rmh@aybabtu.com>
43         * util/hostdisk.c (open_device): Replace a grub_util_info() call
44         with grub_dprintf("hostdisk", ...), as it was so verbose that it
45         clobbered useful information.
47 2008-09-08  Robert Millan  <rmh@aybabtu.com>
49         * include/grub/util/biosdisk.h: Move to ...
50         * include/grub/util/hostdisk.h: ... here.  Update all users.
51         * util/biosdisk.c: Move to ...
52         * util/hostdisk.c: ... here.  Update all users.
54 2008-09-07  Robert Millan  <rmh@aybabtu.com>
56         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
57         variables.
58         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
59         and length can be stored directly in the `mbi->mmap_addr' and
60         `mbi->mmap_length' struct fields.
62 2008-09-07  Robert Millan  <rmh@aybabtu.com>
64         * conf/i386.rmk: New file.  Provides declaration for building
65         `cpuid.mod'.
66         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
67         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
68         variables.
69         Include `conf/i386.mk'.
70         * conf/i386-efi.rmk: Likewise.
71         * conf/x86_64-efi.rmk: Likewise.
72         * conf/i386-coreboot.rmk: Likewise.
73         * conf/i386-ieee1275.rmk: Likewise.
75 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
77         Based on patch created by Colin D Bennett <colin@gibibit.com>.
78         Adds optimization support for BGR based modes.
80         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
81         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
82         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
83         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
84         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
85         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
86         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
87         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
88         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
89         (grub_video_i386_vbeblit_index_index): Likewise.
90         (grub_video_i386_vbeblit_replace_directN): Added.
91         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
92         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
93         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
94         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
95         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
96         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
97         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.     
98         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
99         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
100         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
101         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
102         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
103         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
105         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
106         (grub_video_i386_vbefill_R8G8B8): Likewise.
107         (grub_video_i386_vbefill_index): Likewise.
108         (grub_video_i386_vbefill_direct32): Added.
109         (grub_video_i386_vbefill_direct24): Likewise.
110         (grub_video_i386_vbefill_direct16): Likewise.
111         (grub_video_i386_vbefill_direct8): Likewise.
113         * include/grub/video.h (grub_video_blit_format): Removed 
114         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
115         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
116         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
117         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
118         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
119         
120         * video/video.c (grub_video_get_blit_format): Updated to use new
121         blit formats.  Added handling for 16 bit color modes.
122         
123         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new 
124         fillers.
125         (common_blitter): Updated to use new blitters.
127         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
128         Removed.
129         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
130         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
131         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
132         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
133         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
134         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
135         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
136         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
137         (grub_video_i386_vbeblit_index_index): Likewise.
138         (grub_video_i386_vbeblit_replace_directN): Added.
139         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
140         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
141         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
142         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
143         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
144         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
145         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
146         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
147         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
148         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
149         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
150         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
151         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
152         
153         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
154         (grub_video_i386_vbefill_R8G8B8): Likewise.
155         (grub_video_i386_vbefill_index): Likewise.
156         (grub_video_i386_vbefill_direct32): Added.
157         (grub_video_i386_vbefill_direct24): Likewise.
158         (grub_video_i386_vbefill_direct16): Likewise.
159         (grub_video_i386_vbefill_direct8): Likewise.
160         
161         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
162         types.
163         
164         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
165         types.
166         
167         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
168         blitter types.
169         
170         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
171         types.
173 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
175         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
176         RAID level 1.
178 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
180         * fs/iso9660.c (grub_iso9660_date): New structure.
181         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
182         (grub_iso9660_uuid): New function.
184 2008-09-05  Bean  <bean123ch@gmail.com>
186         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
188         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
189         insensitive bit for names in Win32 and Win32 & DOS namespace.
191         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
193         * include/grub/types.h (LONG_MAX): Likewise.
195 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
197         * util/getroot.c: Include <config.h>.
198         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
199         add support for /dev/md/N devices and handle LVM double dash escaping.
201 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
203         * config.guess: Update to latest version from config git.
204         * config.sub: Likewise.
206 2008-09-03  Robert Millan  <rmh@aybabtu.com>
208         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
209         `disk->total_sectors'.
211 2008-09-01  Colin D Bennett <colin@gibibit.com>
213         * include/grub/normal.h: Fixed incorrect comment for
214         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
216 2008-09-01  Colin D Bennett <colin@gibibit.com>
218         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
219         values with defines.
221         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
222         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
223         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
224         (GRUB_VBE_MODEATTR_COLOR): Likewise.
225         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
226         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
227         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
228         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
229         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
230         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
231         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
232         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
233         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
234         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
235         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
236         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
237         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
238         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
239         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
241 2008-08-31  Robert Millan  <rmh@aybabtu.com>
243         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
244         declaration.
245         (grub_multiboot): Fix a few warnings.
247 2008-08-31  Robert Millan  <rmh@aybabtu.com>
249         * loader/i386/pc/multiboot.c: Update comment not to say that
250         boot_device support is unimplemented.
252 2008-08-31  Robert Millan  <rmh@aybabtu.com>
254         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
255         or memory map support are unimplemented.
257 2008-08-31  Colin D Bennett <colin@gibibit.com>
259         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
261 2008-08-31  Colin D Bennett <colin@gibibit.com>
263         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
264         total video memory in 'vbeinfo' output; show color format details for
265         each video mode.
267 2008-08-30  Pavel Roskin  <proski@gnu.org>
269         * util/genmoddep.c: Remove for real this time.
270         * DISTLIST: Remove util/genmoddep.c.
272 2008-08-30  Robert Millan  <rmh@aybabtu.com>
274         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
275         as required by Multiboot spec (it was already 4-byte aligned, but
276         only by chance).
278 2008-08-29  Pavel Roskin  <proski@gnu.org>
280         * kern/powerpc/ieee1275/crt0.S: Rename to ...
281         * kern/powerpc/ieee1275/startup.S: ... this.
282         * conf/powerpc-ieee1275.rmk: Adjust for the above.
283         * DISTLIST: Likewise.
285         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
286         grub/cpu/kernel.h.  Add start label for consistency with other
287         platforms.  Add grub_prefix immediately after start.  Add jump
288         to the code after grub_prefix.
289         * include/grub/powerpc/kernel.h: Provide valid values for
290         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
292 2008-08-29  Bean  <bean123ch@gmail.com>
294         * configure.ac: Change host_os to cygwin for mingw.
295         (asprintf): New check for function.
297         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
298         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
300         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
301         declear asprintf if HAVE_ASPRINTF is not set, declear fseeko, ftello,
302         sync, sleep and grub_util_get_disk_size for mingw.
304         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
305         to get size in mingw.
306         (open_device): Use flag O_BINARY if it's defined.
307         (find_root_device): Add dummy code for mingw.
309         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
310         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
311         (get_scsi_disk_name): Return 0 for mingw.
313         * util/hostfs.c: #include <grub/util/misc.h>.
314         (grub_hostfs_open): Use "rb" flag to open file, use
315         grub_util_get_disk_size to get disk size for mingw.
317         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
318         (asprintf): New function if HAVE_ASPRINTF is not set.
319         (sync): New function for mingw.
320         (sleep): Likewise.
321         (grub_util_get_disk_size): Likewise.
323 2008-08-28  Pavel Roskin  <proski@gnu.org>
325         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
326         kern/time.c.
328 2008-08-28  Robert Millan  <rmh@aybabtu.com>
330         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
332 2008-08-28  Robert Millan  <rmh@aybabtu.com>
334         Change find_grub_drive() syntax so it doesn't prevent it from
335         detecting NULL names as errors.
337         * util/biosdisk.c (find_grub_drive): Move free slot search code
338         from here ...
339         (find_free_slot): ... to here.
340         (read_device_map): Use find_free_slot() to search for free slots.
342 2008-08-27  Marco Gerards  <marco@gnu.org>
344         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
345         (scsi_mod_SOURCES): New variable.
346         (scsi_mod_CFLAGS): Likewise
347         (scsi_mod_LDFLAGS): Likewise.
349         * disk/scsi.c: New file.
351         * include/grub/scsi.h: Likewise.
353         * include/grub/scsicmd.h: Likewise.
355         * disk/ata.c: Include <grub/scsi.h>.
356         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
357         instead.
358         (grub_ata_iterate): Skip ATAPI devices.
359         (grub_ata_open): Only handle ATAPI devices.
360         (struct grub_atapi_read): Removed.
361         (grub_atapi_readsector): Likewise.
362         (grub_ata_read): No longer handle ATAPI devices.
363         (grub_ata_write): Likewise.
364         (grub_atapi_iterate): New function.
365         (grub_atapi_read): Likewise.
366         (grub_atapi_write): Likewise.
367         (grub_atapi_open): Likewise.
368         (grub_atapi_close): Likewise.
369         (grub_atapi_dev): New variable.
370         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
371         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
373         * include/grub/disk.h (enum grub_disk_dev_id): Add
374         `GRUB_DISK_DEVICE_SCSI_ID'.
376 2008-08-26  Robert Millan  <rmh@aybabtu.com>
378         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
379         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
380         descriptive.
382 2008-08-23  Bean  <bean123ch@gmail.com>
384         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
385         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
386         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
387         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
388         dm_nv.mod.
389         (raid5rec_mod_SOURCES): New macro.
390         (raid5rec_mod_CFLAGS): Likewise.
391         (raid5rec_mod_LDFLAGS): Likewise.
392         (raid6rec_mod_SOURCES): Likewise.
393         (raid6rec_mod_CFLAGS): Likewise.
394         (raid6rec_mod_LDFLAGS): Likewise.
395         (mdraid_mod_SOURCES): Likewise.
396         (mdraid_mod_CFLAGS): Likewise.
397         (mdraid_mod_LDFLAGS): Likewise.
398         (dm_nv_mod_SOURCES): Likewise.
399         (dm_nv_mod_CFLAGS): Likewise.
400         (dm_nv_mod_LDFLAGS): Likewise.
402         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
403         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
404         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
406         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
407         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
409         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
411         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
413         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
415         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
417         * disk/raid5_recover.c: New file.
419         * disk/raid6_recover.c: Likewise.
421         * disk/mdraid_linux.c: Likewise.
423         * disk/dmraid_nvidia.c: Likewise.
425         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
426         ULONG_MAX.
428         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
429         calculate the size of raid device.
430         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
431         different layout of raid5.
432         (grub_raid_scan_device): Remove code specific to mdraid.
433         (grub_raid_list): New variable.
434         (free_array): New function.
435         (grub_raid_register): Likewise.
436         (grub_raid_unregister): Likewise.
437         (grub_raid_rescan): Likewise.
438         (GRUB_MOD_INIT): Don't iterate device here.
439         (GRUB_MOD_FINI): Use free_array to release resource.
441         * include/grub/raid.h: Remove macro and structure specific to mdraid.
442         (grub_raid5_recover_func_t): New function variable type.
443         (grub_raid6_recover_func_t): Likewise.
444         (grub_raid5_recover_func): New variable.
445         (grub_raid6_recover_func): Likewise.
446         (grub_raid_register): New function.
447         (grub_raid_unregister): Likewise.
448         (grub_raid_rescan): Likewise.
449         (grub_raid_block_xor): Likewise.
451         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
452         (CMD_CRC): New macro.
453         (part): Removed.
454         (read_file): Handle device as well as file.
455         (cmd_crc): New function.
456         (fstest): Handle multiple disks.
457         (options): Remove part, raw and long, add root and diskcount.
458         (usage): Add crc, remove -p, -r, -l, add -r and -c.
459         (main): Find the first non option entry and ignore subsequence options,
460         add handling for the new options, support multiple disks.
462         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
464 2008-08-23  Bean  <bean123ch@gmail.com>
466         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
468         * genfslist.sh: Ignore kernel.mod.
470         * genpartmaplist.sh: Likewise.
472 2008-08-23  Robert Millan  <rmh@aybabtu.com>
474         * util/getroot.c (find_root_device): Skip anything that starts with
475         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
477 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
478          
479         * util/update-grub.in (GRUB_GFXMODE): Export variable.
480         * util/grub.d/00_header.in: Allow the administrator to change default
481         gfxmode via ${GRUB_GFXMODE}.
483 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
485         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
487 2008-08-21  Robert Millan  <rmh@aybabtu.com>
489         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
490         loader.
491         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
492         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
494 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
496         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
497         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
499 2008-08-19  Robert Millan  <rmh@aybabtu.com>
501         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
502         (struct grub_virtual_screen): Remove `cursor_color'.
503         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
504         initialization.
505         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
507 2008-08-18  Robert Millan  <rmh@aybabtu.com>
509         Unify (identical) linux_normal.c files.
510         * loader/i386/efi/linux_normal.c: Move from here ...
511         * loader/linux_normal.c: ... to here.  Update all users.
512         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
513         * loader/i386/ieee1275/linux_normal.c: Likewise.
515 2008-08-18  Robert Millan  <rmh@aybabtu.com>
517         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
518         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
519         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
520         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
521         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
522         New macros.
523         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
524         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
525         (GRUB_LINUX_CL_END_OFFSET): ... to here.
526         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
527         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
528         (GRUB_EFI_CL_END_OFFSET): Rename to ...
529         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
530         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
531         Initialize `params->video_cursor_x' and `params->video_cursor_y'
532         portably using grub_getxy().
533         Replace `-EFI' with `-bzImage' in boot message.
535 2008-08-17  Robert Millan  <rmh@aybabtu.com>
537         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
539 2008-08-17  Robert Millan  <rmh@aybabtu.com>
541         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
543         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
544         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
545         (grub_machine_mmap_iterate): New function declaration.
546         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
547         structure.
548         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
549         macros.
551         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
552         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
553         Move e820 parsing from here ...
554         * kern/i386/pc/mmap.c: New file.
555         (grub_machine_mmap_iterate): ... to here.
557         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
558         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
559         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
560         (grub_available_iterate): Redeclare to return `void', and redeclare
561         its hook to use grub_uint64_t as addr and size parameters, and rename
562         to ...
563         (grub_machine_mmap_iterate): ... this.  Update all users.
565         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
566         to make it more readable.  Rename to ...
567         (grub_machine_mmap_iterate): ... this.
569         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
570         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
571         (grub_multiboot): Allocate an extra region after the payload, and fill
572         it with a Multiboot memory map.  Adjust a.out loader to calculate size
573         with the extra space.
574         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
575         with the extra space.
577 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
579         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
581 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
583         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
584         mdate-sh to the list `find' searches for.
585         * DISTLIST: Regenerated.
587 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
589         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
590         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
591         genmoddep.awk, gensymlist.sh.in.
592         (DISTDIRS): Add bus, docs, hook, lib.
593         * DISTLIST: Regenerated.
594         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
596 2008-08-16  Robert Millan  <rmh@aybabtu.com>
598         * disk/raid.c (grub_raid_init): Handle/report errors set by
599         grub_device_iterate().
600         * disk/lvm.c (grub_lvm_init): Likewise.
602 2008-08-15  Bean  <bean123ch@gmail.com>
604         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
605         and datehook.mod.
606         (datetime_mod_SOURCES): New macro.
607         (datetime_mod_CFLAGS): Likewise.
608         (datetime_mod_LDFLAGS): Likewise.
609         (date_mod_SOURCES): Likewise.
610         (date_mod_CFLAGS): Likewise.
611         (date_mod_LDFLAGS): Likewise.
612         (datehook_mod_SOURCES): Likewise.
613         (datehook_mod_CFLAGS): Likewise.
614         (datehook_mod_LDFLAGS): Likewise.
616         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
617         and datehook.mod.
618         (datetime_mod_SOURCES): New macro.
619         (datetime_mod_CFLAGS): Likewise.
620         (datetime_mod_LDFLAGS): Likewise.
621         (date_mod_SOURCES): Likewise.
622         (date_mod_CFLAGS): Likewise.
623         (date_mod_LDFLAGS): Likewise.
624         (datehook_mod_SOURCES): Likewise.
625         (datehook_mod_CFLAGS): Likewise.
626         (datehook_mod_LDFLAGS): Likewise.
628         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
629         and datehook.mod.
630         (datetime_mod_SOURCES): New macro.
631         (datetime_mod_CFLAGS): Likewise.
632         (datetime_mod_LDFLAGS): Likewise.
633         (date_mod_SOURCES): Likewise.
634         (date_mod_CFLAGS): Likewise.
635         (date_mod_LDFLAGS): Likewise.
636         (datehook_mod_SOURCES): Likewise.
637         (datehook_mod_CFLAGS): Likewise.
638         (datehook_mod_LDFLAGS): Likewise.
640         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
641         and datehook.mod.
642         (datetime_mod_SOURCES): New macro.
643         (datetime_mod_CFLAGS): Likewise.
644         (datetime_mod_LDFLAGS): Likewise.
645         (date_mod_SOURCES): Likewise.
646         (date_mod_CFLAGS): Likewise.
647         (date_mod_LDFLAGS): Likewise.
648         (datehook_mod_SOURCES): Likewise.
649         (datehook_mod_CFLAGS): Likewise.
650         (datehook_mod_LDFLAGS): Likewise.
652         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
653         and datehook.mod.
654         (datetime_mod_SOURCES): New macro.
655         (datetime_mod_CFLAGS): Likewise.
656         (datetime_mod_LDFLAGS): Likewise.
657         (date_mod_SOURCES): Likewise.
658         (date_mod_CFLAGS): Likewise.
659         (date_mod_LDFLAGS): Likewise.
660         (datehook_mod_SOURCES): Likewise.
661         (datehook_mod_CFLAGS): Likewise.
662         (datehook_mod_LDFLAGS): Likewise.
664         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
666         * commands/date.c: New file.
668         * hook/datehook.c: Likewise.
670         * include/grub/lib/datetime.h: Likewise.
672         * include/grub/i386/cmos.h: Likewise.
674         * lib/datetime.c: Likewise.
676         * lib/i386/datetime.c: Likewise.
678         * lib/efi/datetime.c: Likewise.
680 2008-08-14  Robert Millan  <rmh@aybabtu.com>
682         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
683         (grub_mkelfimage_SOURCES): New variable.
684         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
686         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
687         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
688         * conf/powerpc-ieee1275.rmk: Likewise.
689         * conf/i386-ieee1275.rmk: Likewise.
691         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
692         * kern/i386/coreboot/init.c: Likewise.
694         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
695         with `<grub/cpu/kernel.h>'.
696         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
697         to ...
698         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
699         * kern/i386/coreboot/startup.S: Likewise.
701         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
702         (GRUB_MOD_GAP): Remove.
703         * include/grub/powerpc/kernel.h: New file.
704         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
705         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
706         * include/grub/i386/kernel.h: New file.
707         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
708         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
709         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
711         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
712         `grub-mkelfimage'.
713         Use --directory when invoking grub_mkimage.
715         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
716         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
717         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
718         and GRUB_KERNEL_CPU_PREFIX.
720 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
722         * include/grub/err.h (grub_err_printf): New function prototype.
723         * util/misc.c (grub_err_printf): New function.
724         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
725         grub_printf.
726         * kern/err.c (grub_print_error): Use grub_err_printf.
728 2008-08-13  Robert Millan  <rmh@aybabtu.com>
730         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
732 2008-08-13  Robert Millan  <rmh@aybabtu.com>
734         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
735         boot entry.
737 2008-08-12  Robert Millan  <rmh@aybabtu.com>
739         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
740         of the relocation code from here ...
741         (grub_multiboot): ... to here.
742         (forward_relocator, backward_relocator): Move from here ...
743         * kern/i386/loader.S (grub_multiboot_forward_relocator)
744         (grub_multiboot_backward_relocator): ... to here.
745         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
746         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
747         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
748         (grub_multiboot_forward_relocator_end)
749         (grub_multiboot_backward_relocator)
750         (grub_multiboot_backward_relocator_end): New variables.
752 2008-08-12  Bean  <bean123ch@gmail.com>
754         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
756 2008-08-11  Robert Millan  <rmh@aybabtu.com>
758         * kern/i386/linuxbios/startup.S: Move from here ...
759         * kern/i386/coreboot/startup.S: ... to here.
761         * kern/i386/linuxbios/init.c: Move from here ...
762         * kern/i386/coreboot/init.c: ... to here.
764         * kern/i386/linuxbios/table.c: Move from here ...
765         * kern/i386/coreboot/mmap.c: ... to here.
767         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
769 2008-08-11  Robert Millan  <rmh@aybabtu.com>
771         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
772         errors.  Leave it to the upper layer to handle them.
774 2008-08-09  Christian Franke  <franke@computer.org>
776         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
777         * conf/common.rmk: Install `grub-pe2elf' only if requested.
778         Install `grub.d/10_windows' only on Cygwin.
779         * configure.ac: Add subst of `target_os'.
780         Check `target_os' also before setting TARGET_OBJ2ELF.
781         Add `--enable-grub-pe2elf'.
783 2008-08-08  Robert Millan  <rmh@aybabtu.com>
785         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
786         (grub_last_time): Change type to grub_uint64_t.
787         (grub_disk_open): Migrate code from to using grub_get_time_ms().
788         (grub_disk_close): Likewise.
790         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
791         (run_menu): Migrate code from to using grub_get_time_ms().
793         * util/misc.c (grub_get_time_ms): New function.
795 2008-08-08  Marco Gerards  <marco@gnu.org>
797         * disk/ata.c (grub_ata_regget): Change return type to
798         `grub_uint8_t'.
799         (grub_ata_regget2): Likewise.
800         (grub_ata_wait_status): New function.
801         (grub_ata_wait_busy): Removed function, updated all users to use
802         `grub_ata_wait_status'.
803         (grub_ata_wait_drq): Likewise.
804         (grub_ata_cmd): New function.
805         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
806         error handling.
807         (grub_ata_pio_write): Add error handling.
808         (grub_atapi_identify): Likewise.
809         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
810         handling.
811         (grub_ata_identify): Use `grub_ata_cmd' and improve error
812         handling.  Actually use the detected registers.  Reorder the
813         detection logic such that it is easier to read.
814         (grub_ata_pciinit): Do not assign the same ID to each controller.
815         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
816         handling.
817         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
819         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
821 2008-08-08  Marco Gerards  <marco@gnu.org>
823         * NEWS: Update.
825 2008-08-07  Bean  <bean123ch@gmail.com>
827         * include/grub/x86_64/pci.h: New file.
829 2008-08-07  Christian Franke  <franke@computer.org>
831         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
832         (TIMER2_GATE): Likewise.
833         (grub_pit_wait): Add enable/disable of the timer2 gate
834         bit of port 0x61.  This fixes a possible infinite loop.
836 2008-08-07  Bean  <bean123ch@gmail.com>
838         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
839         kern/i386/tsc.c and kern/i386/pit.c.
841         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
842         x86_64 platform.
844         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
845         <grub/i386/tsc.h>.
847         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
849 2008-08-07  Bean  <bean123ch@gmail.com>
851         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
853         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
855         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
856         multiple inclusion. Add #include <grub/types.h>.
858 2008-08-06  Christian Franke  <franke@computer.org>
860         * conf/common.rmk: Build and install `10_windows'.
861         * util/grub.d/10_windows.in: New script.
863 2008-08-06  Pavel Roskin  <proski@gnu.org>
865         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
867 2008-08-06  Robert Millan  <rmh@aybabtu.com>
869         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
870         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
872 2008-08-06  Bean  <bean123ch@gmail.com>
874         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
875         (grub_pxefs_fs_int): Remove dummy definition.
876         (grub_pxefs_open): Use data->block_size to store the current block
877         size setting.
878         (grub_pxefs_read): Use block size stored in data->block_size. As the
879         value of grub_pxe_blksize can be changed after the file is opened.
881 2008-08-06  Bean  <bean123ch@gmail.com>
883         * fs/i386/pc/pxe.c (curr_file): new variable.
884         (grub_pxefs_open): Simply the handling of pxe file system. Don't
885         require the dummy internal file system anymore.
886         (grub_pxefs_read): Removed.
887         (grub_pxefs_close): Likewise.
888         (grub_pxefs_fs_int): Likewise.
889         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
890         connection when we switch file.
891         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
893 2008-08-06  Robert Millan  <rmh@aybabtu.com>
895         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
896         `halt.mod'.
897         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
898         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
900         * kern/i386/halt.c: New file.
901         * kern/i386/reboot.c: Likewise.
902         * include/grub/i386/reboot.h: Likewise.
903         * include/grub/i386/halt.h: Likewise.
905         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
906         Include `<grub/cpu/halt.h>'.
907         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
908         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
910         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
911         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
912         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
913         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
914         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
915         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
916         from here ...
917         * include/grub/i386/at_keyboard.h: ... to here.
919 2008-08-05  Robert Millan  <rmh@aybabtu.com>
921         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
922         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
923         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
924         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
925         `kern/generic/millisleep.c'.
927         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
928         instead of grub_get_rtc().
929         (grub_tsc_init): Initialize `tsc_boot_time'.
931         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
932         (grub_machine_init): Use grub_tsc_init() rather than
933         installing an RTC-based handler via grub_install_get_time_ms().
935         * kern/i386/pit.c: New file.
936         * include/grub/i386/pit.h: Likewise.
938 2008-08-05  Bean  <bean123ch@gmail.com>
940         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
942         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
943         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
944         (pxe_mod_SOURCES): New macro.
945         (pxe_mod_CFLAGS): Likewise.
946         (pxe_mod_LDFLAGS): Likewise.
947         (pxecmd_mod_SOURCES): Likewise.
948         (pxecmd_mod_CFLAGS): Likewise.
949         (pxecmd_mod_LDFLAGS): Likewise.
951         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
952         (grub_pxe_call): Likewise.
954         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
956         * commands/i386/pc/pxecmd.c: New file.
958         * fs/i386/pc/pxe.c: Likewise.
960         * include/grub/i386/pc/pxe.h: Likewise.
962 2008-08-05  Bean  <bean123ch@gmail.com>
964         * util/console.c (grub_console_cur_color): New variable.
965         (grub_console_standard_color): Likewise.
966         (grub_console_normal_color): Likewise.
967         (grub_console_highlight_color): Likewise.
968         (color_map): Likewise.
969         (use_color): Likewise.
970         (NUM_COLORS): New macro.
971         (grub_ncurses_setcolorstate): Handle color properly.
972         (grub_ncurses_setcolor): Don't change color here, just remember the
973         settings, color will be set in grub_ncurses_setcolorstate.
974         (grub_ncurses_getcolor): New function.
975         (grub_ncurses_init): Initialize color pairs.
976         (grub_ncurses_term): New member grub_ncurses_getcolor.
978 2008-08-05  Colin D Bennett  <colin@gibibit.com>
980         High resolution timer support.  Implemented for x86 CPUs using TSC.
981         Extracted generic grub_millisleep() so it's linked in only as needed.
982         This requires a Pentium compatible CPU; if the RDTSC instruction is
983         not supported, then it falls back on the generic grub_get_time_ms()
984         implementation that uses the machine's RTC.
986         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
987         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
988         `kern/generic/millisleep.c'.
990         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
991         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
993         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
994         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
996         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
998         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
999         `kern/generic/millisleep.c'.
1001         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1003         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1005         * kern/generic/rtc_get_time_ms.c: New file.
1007         * kern/generic/millisleep.c: New file.
1009         * kern/misc.c: Don't include
1010         <kern/time.h> anymore.
1011         (grub_millisleep_generic): Removed.
1013         * commands/sleep.c (grub_interruptible_millisleep): Uses
1014         grub_get_time_ms() instead of grub_get_rtc().
1016         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
1017         function.
1018         (grub_cpu_is_cpuid_supported): New inline function.
1019         (grub_cpu_is_tsc_supported): New inline function.
1020         (grub_tsc_init): New function prototype.
1021         (grub_tsc_get_time_ms): New function prototype.
1023         * kern/i386/tsc.c (grub_get_time_ms): New file.
1025         * include/grub/time.h: Include <grub/types.h.
1026         (grub_millisleep_generic): Removed.
1027         (grub_get_time_ms): New prototype.
1028         (grub_install_get_time_ms): New prototype.
1029         (grub_rtc_get_time_ms): New prototype.
1031         * kern/time.c (grub_get_time_ms): New function.
1032         (grub_install_get_time_ms): New function.
1034         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
1035         <grub/time.h> anymore.
1036         (grub_millisleep): Removed.
1037         (grub_machine_init): Call grub_tsc_init.
1039         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1040         get_time_ms() implementation.
1042         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1043         (ieee1275_get_time_ms): New function.
1044         (grub_machine_init): Install get_time_ms() implementation.
1046         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1047         (grub_machine_init): Call grub_tsc_init().
1048         (grub_millisleep): Removed.
1050         * kern/ieee1275/init.c (grub_millisleep): Removed.
1051         (grub_machine_init): Install ieee1275_get_time_ms()
1052         implementation.
1053         (ieee1275_get_time_ms): New function.
1054         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1055         real work.
1057 2008-08-05  Marco Gerards  <marco@gnu.org>
1059         * disk/ata.c: Include <grub/pci.h>.
1060         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1061         (grub_ata_initialize): Rewritten.
1062         (grub_ata_device_initialize): New function.
1064 2008-08-04  Pavel Roskin  <proski@gnu.org>
1066         * kern/main.c: Include grub/mm.h.
1068 2008-08-04  Robert Millan  <rmh@aybabtu.com>
1070         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1071         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1072         corruption problem).
1074 2008-08-04  Robert Millan  <rmh@aybabtu.com>
1076         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1077         warnings introduced in my last commit.
1079 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1081         Make PCI available on all i386 architectures.
1083         * include/grub/i386/pc/pci.h: Move from here ...
1084         * include/grub/i386/pci.h: ... to here.
1086         * include/grub/i386/pc/pci.h: Remove.
1087         * include/grub/i386/efi/pci.h: Remove.
1088         * include/grub/x86_64/efi/pci.h: Remove.
1090         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1091         `<grub/cpu/pci.h>'.
1093         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1094         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1095         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1097         * conf/i386-ieee1275.rmk: Likewise.
1099 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1101         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1102         (grub_console_setcursor): Make it possible to set cursor off.
1104 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1106         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
1107         of modules instead of assuming which platform provides what.
1108         * util/update-grub.in: Likewise.
1110 2008-08-03  Robert Millan  <rmh@aybabtu.com>
1112         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1113         instead of `grub_install_dos_part' to determine whether a drive needs
1114         to be prepended to prefix (`grub_install_dos_part' is not reliable,
1115         because it can be overridden when loading GRUB via Multiboot).
1117 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1119         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1121 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1123         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1124         of informational grub_dprintf() calls.
1126 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1128         * disk/memdisk.c (memdisk_size): Don't initialize.
1129         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1131         * include/grub/i386/pc/kernel.h
1132         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1133         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1134         (grub_memdisk_image_size, grub_arch_memdisk_addr)
1135         (grub_arch_memdisk_size): Remove.
1137         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1138         field (was only used to transfer a constant).  Add `type' field to
1139         support multiple module types.
1140         (grub_module_iterate): New function.
1142         * kern/device.c (grub_device_open): Do not hide error messages
1143         when grub_disk_open() fails.  Use grub_print_error() instead.
1145         * kern/i386/pc/init.c (grub_arch_modules_addr)
1146         (grub_arch_memdisk_size): Remove functions.
1147         (grub_arch_modules_addr): Return the module address in high memory
1148         (now that it isn't copied anymore).
1150         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1151         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1152         decompression routine (grub_total_module_size already includes that
1153         now).  Don't copy modules back to low memory.
1155         * kern/main.c: Include `<grub/mm.h>'.
1156         (grub_load_modules): Split out (and use) ...
1157         (grub_module_iterate): ... this function, which iterates through
1158         module objects and runs a hook.
1159         Comment out grub_mm_init_region() call, as it would cause non-ELF
1160         modules to be overwritten.
1162         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1163         the memdisk image in its own region, make it part of the module list.
1164         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1165         (main): Parse --memdisk|-m option, and pass user-provided path as
1166         parameter to generate_image().
1167         (add_segments): Pass `memdisk_path' down to load_modules().
1168         (load_modules): Embed memdisk image in module section when requested.
1169         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1170         `header.type' instead of `header.offset'.
1172         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1173         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1174         (memdisk_mod_LDFLAGS): New variables.
1175         * conf/i386-coreboot.rmk: Likewise.
1176         * conf/i386-ieee1275.rmk: Likewise.
1178 2008-08-02  Robert Millan  <rmh@aybabtu.com>
1180         * loader/i386/pc/multiboot.c (playground, forward_relocator)
1181         (backward_relocator): New variables.  Used to allocate and relocate
1182         the payload, respectively.
1183         (grub_multiboot_load_elf32): Load into heap instead of requested
1184         address, install the appropriate relocator code in each bound of
1185         the payload, and set the entry point such that
1186         grub_multiboot_real_boot() will jump to one of them.
1188         * kern/i386/loader.S (grub_multiboot_payload_size)
1189         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1190         (grub_multiboot_payload_entry_offset): New variables.
1191         (grub_multiboot_real_boot): Set cpu context to what the relocator
1192         expects, and jump to the relocator instead of the payload.
1194         * include/grub/i386/loader.h (grub_multiboot_payload_size)
1195         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1196         (grub_multiboot_payload_entry_offset): Export.
1198 2008-08-01  Bean  <bean123ch@gmail.com>
1200         * normal/menu_entry.c (editor_getline): Don't return the original
1201         string as result, as it will be released by lexer once it has done
1202         using it.
1204 2008-08-01  Robert Millan  <rmh@aybabtu.com>
1206         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1207         within menuentries, not before them.
1208         util/grub.d/10_hurd.in: Likewise.
1210 2008-08-01  Bean  <bean123ch@gmail.com>
1212         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1213         (bufio_mod_SOURCES): New macro.
1214         (bufio_mod_CFLAGS): Likewise.
1215         (bufio_mod_LDFLAGS): Likewise.
1217         * include/grub/bufio.h: New file.
1219         * io/bufio.c: Likewise.
1221         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1222         (grub_video_reader_png): Use grub_buffile_open to open file.
1224         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1225         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1227         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1228         (grub_video_reader_tga): Use grub_buffile_open to open file.
1230         * font/manager.c: Include <grub/bufio.h>.
1231         (add_font): Use grub_buffile_open to open file.
1233 2008-07-31  Robert Millan  <rmh@aybabtu.com>
1235         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1236         ELF segments, use a macro for arbitrarily accessing any of them instead
1237         of preparing a pointer that allows access to one at a time.
1238         (grub_multiboot_load_elf64): Likewise.
1240 2008-07-31  Bean  <bean123ch@gmail.com>
1242         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1243         GRUB_KERNEL_MACHINE_DATA_END.
1245 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1247         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1248         Increase from 0x50 to 0x60.
1249         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1250         use UUIDs to identify the root drive for them.  If that's not
1251         possible, abort.
1252         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1253         check, for cross-disk installs.
1255 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1257         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1258         is non-empty, use it to set the `prefix' environment variable instead
1259         of the usual approach.
1260         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1261         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1262         environment variable instead of dummy make_install_device().
1264         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1265         (start): Insert a data section, with `grub_prefix' variable.
1266         * kern/i386/linuxbios/startup.S: Likewise.
1268         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1269         New variable reference.
1270         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1271         New macro.  Defines offset of `grub_prefix' within startup.S (relative
1272         to `start').
1273         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
1274         section within startup.S (relative to `start').
1275         * include/grub/i386/coreboot/kernel.h: Likewise.
1277         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1278         Overwrite grub_prefix with its contents, at the beginning of the
1279         first segment.
1280         (main): Understand -p|--prefix.
1282 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1284         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1286 2008-07-30  Robert Millan  <rmh@aybabtu.com>
1288         * term/i386/pc/vga_text.c (grub_console_cls): Use
1289         grub_console_gotoxy() to go back to beginning of the screen.
1290         Found by Patrick Georgi <patrick.georgi@coresystems.de>
1292 2008-07-29  Christian Franke  <franke@computer.org>
1294         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1295         Add conversion of emulated mount points on Cygwin.
1297 2008-07-29  Christian Franke  <franke@computer.org>
1299         * util/update-grub.in: Add a check for admin
1300         group on Cygwin.
1301         Remove old `grub.cfg.new' before creation.
1302         Add `-f' to `mv' to handle the different filesystem
1303         semantics of Windows.
1305 2008-07-29  Bean  <bean123ch@gmail.com>
1307         * normal/main.c (get_line): Fix buffer overflow bug.
1309 2008-07-28  Robert Millan  <rmh@aybabtu.com>
1311         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1312         (struct grub_apple_header): New struct.  Describes the layout of
1313         the partmap header.
1314         (apple_partition_map_iterate): Check the header magic as well as the
1315         partition magic (which was already being checked).
1317 2008-07-28  Pavel Roskin  <proski@gnu.org>
1319         * genmk.rb: Add a warning to the beginning of the output that
1320         it's a generated file and should not be edited.
1322 2008-07-28  Robert Millan  <rmh@aybabtu.com>
1324         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1325         with the same number are found, just use issue a warning with
1326         grub_dprintf(), as this error has been reported to be non-fatal.
1328 2008-07-27  Robert Millan  <rmh@aybabtu.com>
1330         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1331         information.
1333 2008-07-27  Bean  <bean123ch@gmail.com>
1335         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1336         (grub_fat_find_dir): Ignore case when comparing filename.
1338 2008-07-27  Bean  <bean123ch@gmail.com>
1340         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1341         smallino, as it's more descriptive, and i8count can be confused with
1342         the other field count.
1343         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1344         inode type.
1346 2008-07-27  Bean  <bean123ch@gmail.com>
1348         * commands/crc.c: New file.
1350         * lib/crc.c: Likewise.
1352         * include/grub/lib/crc.h: Likewise.
1354         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1356         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1357         (hexdump): Move this function to ...
1359         * lib/hexdump.c: ... here.
1361         * include/grub/hexdump.h: Renamed to ...
1363         * include/grub/lib/hexdump.h: ... this.
1365         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1367         * util/grub-editenv.c: Likewise.
1369         * include/envblk.h: Renamed to ...
1371         * include/lib/envblk.h: ... this.
1373         * util/envblk.c: Renamed to ...
1375         * lib/envblk.c: ... this.
1377         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1378         lib/hexdump.c.
1379         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1380         (pkglib_MODULES): Add crc.mod.
1381         (hexdump_mod_SOURCES): Add lib/hexdump.c.
1382         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1383         (crc_mod_SOURCES): New macro.
1384         (crc_mod_CFLAGS): Likewise.
1385         (crc_mod_LDFLAGS): Likewise.
1387         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1389         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1391         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1393         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1395         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1397 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
1399         * commands/help.c: Include <grub/term.h>.
1400         (TERM_WIDTH): Removed.  Updated all users.
1402 2008-07-27  Pavel Roskin  <proski@gnu.org>
1404         * util/getroot.c (find_root_device): Rephrase a comment to avoid
1405         spurious warnings about a comment within a comment.
1407 2008-07-25  Robert Millan  <rmh@aybabtu.com>
1409         * util/getroot.c (find_root_device): Skip devices that match
1410         /dev/dm-[0-9].  This lets the real device be found for any type of
1411         abstraction (LVM, EVMS, RAID..).
1412         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1413         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
1414         device is found first, find_root_device() will now skip it.
1416 2008-07-24  Pavel Roskin  <proski@gnu.org>
1418         * include/grub/types.h: Use __builtin_bswap32() and
1419         __builtin_bswap64() with gcc 4.3 and newer.
1421 2008-07-24  Christian Franke  <franke@computer.org>
1423         * util/i386/pc/grub-install.in: If `--debug' is specified,
1424         pass `--verbose' to grub-setup.
1425         Abort script if make_system_path_relative_to_its_root() fails.
1427 2008-07-24  Bean  <bean123ch@gmail.com>
1429         * configure.ac: Fixed a bug caused by the previous cygwin patch,
1430         variable `target_platform' should be `platform'.
1432 2008-07-24  Bean  <bean123ch@gmail.com>
1434         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1435         (grub_png_init_fixed_block): New function.
1436         (grub_png_decode_image_data): Handle fixed huffman code compression.
1438 2008-07-24  Bean  <bean123ch@gmail.com>
1440         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1441         (grub_pe2elf_SOURCES): New macro.
1442         (CLEANFILES): Add grub-pe2elf.
1444         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1445         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1446         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1447         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1448         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1449         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1450         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1451         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1452         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1453         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1454         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1455         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1456         (GRUB_PE32_DT_FUNCTION): Likewise.
1457         (GRUB_PE32_REL_I386_DIR32): Likewise.
1458         (GRUB_PE32_REL_I386_REL32): Likewise.
1459         (grub_pe32_symbol): New structure.
1460         (grub_pe32_reloc): Likewise.
1462         * util/grub-pe2elf.c: New file.
1464         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1465         start symbol in non pc platform.
1467         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1469         The following patches are from Christian Franke.
1471         * include/grub/dl.h: Remove .previous, gas supports this only
1472         for ELF format.
1474         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1475         Remove .type, gas supports this only for ELF format.
1477         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1478         nullbytes in symbol table. This fixes an infinite loop if table is
1479         zero filled.
1481         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1482         TARGET_IMG_LDFLAGS and EXEEXT.
1484         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1485         TARGET_IMG_LDFLAGS_AC.
1486         (grub_CHECK_STACK_ARG_PROBE): New function.
1488         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1490         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1492         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1493         to set TARGET_IMG_LD* accordingly.
1494         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1495         Add call to grub_CHECK_STACK_ARG_PROBE.
1496         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1498         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1500         * genmk.rb: Add EXEEXT to CLEANFILES.
1502 2008-07-23  Robert Millan  <rmh@aybabtu.com>
1504         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1505         define the codes for arrows and lines used for the menu).
1506         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1507         as well.
1509         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1510         fonts, because the latter are too slow.
1512 2008-07-21  Bean  <bean123ch@gmail.com>
1514         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1515         a20. Run keyboard test last, as it will cause macbook to halt.
1517 2008-07-18  Pavel Roskin  <proski@gnu.org>
1519         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
1520         load foreign architecture modules correctly anyway.  Keep
1521         support for loading host architecture modules, whether we
1522         compile them or not.
1524 2008-07-17  Pavel Roskin  <proski@gnu.org>
1526         * configure.ac: Use -m32 or -m64 regardless of whether we had to
1527         change target_cpu.  The compiler default can mismatch target_cpu
1528         in any case.
1530         * disk/efi/efidisk.c: Fix format warnings on x86_64.
1531         * kern/efi/efi.c: Likewise.
1533         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
1534         target compiler is functional.
1535         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
1536         are set up.
1538         * configure.ac: Default to efi platform for x86_64-apple.  Allow
1539         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
1540         adjustments from the rest, only do them if target is not
1541         explicitly given.  Merge other adjustments with the final sanity
1542         check.  Remove an extraneous check for supported CPU.  Be
1543         specific which CPU and which platform is not supported.
1545         * configure.ac: Default to pc platform for x86_64.
1547 2008-07-17  Robert Millan  <rmh@aybabtu.com>
1549         Partial LinuxBIOS -> Coreboot rename.
1551         * conf/i386-linuxbios.rmk: Renamed to ...
1552         * conf/i386-coreboot.rmk: ... this.
1553         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
1554         * configure.ac: Accept "coreboot" as input platform (but maintain
1555         compatibility with "linuxbios").
1556         * include/grub/i386/linuxbios: Renamed to ...
1557         * include/grub/i386/coreboot: ... this.
1559 2008-07-17  Bean  <bean123ch@gmail.com>
1561         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
1562         (appleldr_mod_SOURCE): New variable.
1563         (appleldr_mod_CFLAGS): Likewise.
1564         (appleldr_mod_LDFLAGS): Likewise.
1565         (pci_mod_SOURCES): Likewise.
1566         (pci_mod_CFLAGS): Likewise.
1567         (pci_mod_LDFLAGS): Likewise.
1568         (lspci_mod_SOURCES): Likewise.
1569         (lspci_mod_CFLAGS): Likewise.
1570         (lspci_mod_LDFLAGS): Likewise.
1572         * conf/x86_64-efi.rmk: New file.
1574         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
1575         macro.
1576         (grub_efidisk_write): Likewise.
1578         * include/efi/api.h (efi_call_0): New macro.
1579         (efi_call_1): Likewise.
1580         (efi_call_2): Likewise.
1581         (efi_call_3): Likewise.
1582         (efi_call_4): Likewise.
1583         (efi_call_5): Likewise.
1584         (efi_call_6): Likewise.
1586         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
1587         grub_rescue_cmd_chainloader.
1589         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
1590         (grub_pe32_optional_header): Change some fields based on i386 or
1591         x86_64 platform.
1592         (GRUB_PE32_PE32_MAGIC): Likewise.
1594         * include/grub/efi/uga_draw.h: New file.
1596         * include/grub/elf.h (STN_ABS): New constant.
1597         (R_X86_64_NONE): Relocation constant for x86_64.
1598         (R_X86_64_64): Likewise.
1599         (R_X86_64_PC32): Likewise.
1600         (R_X86_64_GOT32): Likewise.
1601         (R_X86_64_PLT32): Likewise.
1602         (R_X86_64_COPY): Likewise.
1603         (R_X86_64_GLOB_DAT): Likewise.
1604         (R_X86_64_JUMP_SLOT): Likewise.
1605         (R_X86_64_RELATIVE): Likewise.
1606         (R_X86_64_GOTPCREL): Likewise.
1607         (R_X86_64_32): Likewise.
1608         (R_X86_64_32S): Likewise.
1609         (R_X86_64_16): Likewise.
1610         (R_X86_64_PC16): Likewise.
1611         (R_X86_64_8): Likewise.
1612         (R_X86_64_PC8): Likewise.
1614         * include/grub/i386/efi/pci.h: New file.
1616         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1617         Change it value based on platform.
1618         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1619         (GRUB_E820_RAM): Likewise.
1620         (GRUB_E820_RESERVED): Likewise.
1621         (GRUB_E820_ACPI): Likewise.
1622         (GRUB_E820_NVS): Likewise.
1623         (GRUB_E820_EXEC_CODE): Likewise.
1624         (GRUB_E820_MAX_ENTRY): Likewise.
1625         (grub_e820_mmap): New structure.
1626         (linux_kernel_header): Change the efi field according to different
1627         kernel version, also field from linux_kernel_header.
1629         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1631         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1632         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1633         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1634         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1635         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1636         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1637         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1638         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1639         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1640         (GRUB_PCI_ADDR_IO_MASK): Likewise.
1642         * include/grub/x86_64/efi/kernel.h: New file.
1644         * include/grub/x86_64/efi/loader.h: Likewise.
1646         * include/grub/x86_64/efi/machine.h: Likewise.
1648         * include/grub/x86_64/efi/pci.h: Likewise.
1650         * include/grub/x86_64/efi/time.h: Likewise.
1652         * include/grub/x86_64/linux.h: Likewise.
1654         * include/grub/x86_64/setjmp.h: Likewise.
1656         * include/grub/x86_64/time.h: Likewise.
1658         * include/grub/x86_64/types.h: Likewise.
1660         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1661          GRUB_TARGET_SIZEOF_VOID_P.
1663         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1664         (grub_efi_locate_handle): Likewise.
1665         (grub_efi_open_protocol): Likewise.
1666         (grub_efi_set_text_mode): Likewise.
1667         (grub_efi_stall): Likewise.
1668         (grub_exit): Likewise.
1669         (grub_reboot): Likewise.
1670         (grub_halt): Likewise.
1671         (grub_efi_exit_boot_services): Likewise.
1672         (grub_get_rtc): Likewise.
1674         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
1675         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
1676         (grub_efi_allocate_pages): Wrap efi calls.
1677         (grub_efi_free_pages): Wrap efi calls.
1678         (grub_efi_get_memory_map): Wrap efi calls.
1680         * kern/x86_64/dl.c: New file.
1682         * kern/x86_64/efi/callwrap.S: Likewise.
1684         * kern/x86_64/efi/startup.S: Likewise.
1686         * loader/efi/appleloader.c: Likewise.
1688         * loader/efi/chainloader.c (cmdline): New variable.
1689         (grub_chainloader_unload): Wrap efi calls.
1690         (grub_chainloader_boot): Likewise.
1691         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
1692         command line.
1694         * loader/efi/chainloader_normal.c (chainloader_command):
1695         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
1696         command line.
1698         * loader/i386/efi/linux.c (allocate_pages): Change allocation
1699         method.
1700         (grub_e820_add_region): New function.
1701         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
1702         booting.
1703         (grub_find_video_card): New function.
1704         (grub_linux_setup_video): New function.
1705         (grub_rescue_cmd_linux): Probe for video information.
1707         * normal/x86_64/setjmp.S: New file.
1709         * term/efi/console.c (map_char): New function.
1710         (grub_console_putchar): Map unicode char.
1711         (grub_console_checkkey): Wrap efi calls.
1712         (grub_console_getkey): Likewise.
1713         (grub_console_getwh): Likewise.
1714         (grub_console_gotoxy): Likewise.
1715         (grub_console_cls): Likewise.
1716         (grub_console_setcolorstate): Likewise.
1717         (grub_console_setcursor): Likewise.
1719         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
1721 2008-07-16  Pavel Roskin  <proski@gnu.org>
1723         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
1724         format strings.
1726         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
1727         pointer, not an integer.  This fixes a warning and prevents
1728         precision loss on 64-bit systems.
1729         (relocate_addresses): Remove unneeded cast.
1731 2008-07-15  Pavel Roskin  <proski@gnu.org>
1733         * kern/i386/ieee1275/init.c: Include grub/cache.h.
1735         * term/ieee1275/ofconsole.c: Disable code unused on i386.
1737         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
1738         Fix comparison between signed and unsigned.
1740         * include/grub/i386/ieee1275/console.h: Declare
1741         grub_console_init() and grub_console_fini().
1743         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
1744         It's empty and unused.
1746         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
1747         beginning to avoid warnings with some compilers.
1749         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
1750         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
1752 2008-07-14  Pavel Roskin  <proski@gnu.org>
1754         * kern/env.c (grub_register_variable_hook): Don't copy empty
1755         string, it leaks memory.  Pass "" to grub_env_set(), it should
1756         handle constant strings.
1758         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
1759         * commands/cmp.c (grub_cmd_cmp): Likewise.
1760         * kern/dl.c (grub_dl_flush_cache): Likewise.
1761         (grub_dl_load_core): Likewise.
1762         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
1763         (grub_elf64_load_phdrs): Likewise.
1765 2008-07-13  Pavel Roskin  <proski@gnu.org>
1767         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
1768         between signed and unsigned.
1769         (LzmaEnc_Finish): Fix warning about an unused parameter.
1771 2008-07-13  Bean  <bean123ch@gmail.com>
1773         * Makefile.in (enable_lzo): New rule.
1775         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
1777         * configure.ac (ENABLE_LZO): New option --enable-lzo.
1779         * boot/i386/pc/lnxboot.S: #include <config.h>.
1781         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
1782         its value according to the compression algorithm used, lzo or lzma.
1784         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
1785         compression algorithm according to configure macro.
1787         * kern/i386/pc/startup.S (codestart): Likewise.
1789         * kern/i386/pc/lzma_decode.S: New file.
1791         * include/grub/lib/LzFind.h: Likewise.
1793         * include/grub/lib/LzHash.h: Likewise.
1795         * include/grub/lib/LzmaDec.h: Likewise.
1797         * include/grub/lib/LzmaEnc.h: Likewise.
1799         * include/grub/lib/LzmaTypes.h: Likewise.
1801         * lib/LzFind.c: Likewise.
1803         * lib/LzmaDec.c: Likewise.
1805         * lib/LzmaEnc.c: Likewise.
1807 2008-07-13  Bean  <bean123ch@gmail.com>
1809         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
1810         (grub_ext4_extent_header): New structure.
1811         (grub_ext4_extent): Likewise.
1812         (grub_ext4_extent_idx): Likewise.
1813         (grub_ext4_find_leaf): New function.
1814         (grub_ext2_read_block): Handle extents.
1816 2008-07-12  Robert Millan  <rmh@aybabtu.com>
1818         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
1820 2008-07-11  Robert Millan  <rmh@aybabtu.com>
1822         * util/grub.d/40_custom.in: New file. Example on how to add custom
1823         entries to /etc/grub.d.
1824         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
1825         40_custom (implicitly, by merging all the grub.d rules).
1827 2008-07-11  Pavel Roskin  <proski@gnu.org>
1829         * commands/read.c (grub_getline): Fix invalid memory access.
1830         Don't add newline to the variable value.
1832         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
1833         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
1834         (serial_hw_get_port): Check validity of the port number.
1835         (grub_cmd_serial): Check return value of serial_hw_get_port().
1837 2008-07-07  Pavel Roskin  <proski@gnu.org>
1839         * boot/i386/pc/diskboot.S (notification_string): Replace
1840         "Loading kernel" with just "loading".  This is shorter, less
1841         confusing and saves a few bytes for possible future changes.
1843 2008-07-05  Pavel Roskin  <proski@gnu.org>
1845         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
1846         size for ATAPI devices, they are undefined.  Output sector
1847         number in decimal form.
1849         * disk/ata.c: Use named constants for status bits.
1851 2008-07-04  Pavel Roskin  <proski@gnu.org>
1853         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
1854         grub_addr_t before casting it to the void pointer to fix a
1855         warning.  Non-addressable regions are discarded earlier.
1856         (grub_arch_modules_addr): Cast _end to grub_addr_t.
1857         * kern/i386/linuxbios/table.c: Include grub/misc.h.
1858         (check_signature): Don't shadow table_header.
1859         (grub_linuxbios_table_iterate): Cast numeric constants to
1860         grub_linuxbios_table_header_t.
1861         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
1862         grub_stop().
1864         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
1865         prevent warnings.
1867         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
1868         pointer, which can cause warnings.  Support 64-bit addresses.
1870         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
1871         of sizeof(long).  This fixes PowerPC image generation on x86_64.
1873 2008-07-04  Robert Millan  <rmh@aybabtu.com>
1875         This fixes a performance issue when pc & gpt partmap iterators
1876         didn't abort iteration even after our hook found what it was
1877         looking for (often causing expensive probes of non-existent drives).
1879         Some callers relied on previous buggy behaviour, since they would
1880         rise an error when their own hooks caused early abortion of its
1881         iteration.
1883         * kern/device.c (grub_device_open): Improve error message.
1884         * disk/lvm.c (grub_lvm_open): Likewise.
1885         * disk/raid.c (grub_raid_open): Likewise.
1887         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
1888         when hook requests it, independently of grub_errno.
1889         (pc_partition_map_probe): Do not fail when find_func() caused
1890         early abortion of pc_partition_map_iterate().
1892         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
1893         when hook requests it, independently of grub_errno.
1894         (gpt_partition_map_probe): Do not fail when find_func() caused
1895         early abortion of gpt_partition_map_iterate().
1897         * kern/partition.c (grub_partition_iterate): Abort parent iteration
1898         when hook requests it, independently of grub_errno.  Do not fail when
1899         part_map_iterate_hook() caused early abortion of p->iterate().
1901         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
1902         when grub_partition_iterate() returned with non-zero.
1904 2008-07-03  Pavel Roskin  <proski@gnu.org>
1906         * disk/ata.c (grub_ata_pio_write): Check status before writing,
1907         like we do in grub_ata_pio_read().
1908         (grub_ata_readwrite): Always write individual sectors.  Fix the
1909         sector count for the remainder.
1910         (grub_ata_write): Enable writing to ATA devices.  Correctly
1911         report error for ATAPI devices.
1913 2008-07-02  Pavel Roskin  <proski@gnu.org>
1915         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
1916         warning.
1918         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
1919         for every read sector, we already increment it for the whole
1920         batch.  This fixes reading more than 256 sectors at once.
1922         * util/grub-editenv.c (cmd_info): Cast argument to long
1923         explicitly.  ptrdiff_t reduces to int on i386.
1925         * util/grub-editenv.c (main): Be specific which parameter is
1926         missing.
1928         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
1929         (memdisk): Make memdisk_orig_addr a pointer.
1931         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
1932         for file offsets, use grub_off_t instead.  Fix printf format
1933         warnings.
1935         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
1936         there.  Real unexpected warnings should not drown in the noise
1937         about known problems.
1939         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
1940         grub_disk_addr_t for memory addresses.
1942         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
1943         explicitly to fix a warning.
1945         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
1947         * Makefile.in (MODULE_LDFLAGS): New variable.
1948         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
1949         the linker accepts --build-id=none.
1950         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
1951         MODULE_LDFLAGS.
1952         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
1954         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
1955         those in Linux XFS code.  Provide a way to access 64-bit parent
1956         inode.
1957         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
1958         the end of struct grub_xfs_dir_header.
1960 2008-07-02  Bean  <bean123ch@gmail.com>
1962         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
1963         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
1964         and GRUB_IEEE1275_FLAG_NO_ANSI.
1966         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
1967         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
1968         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
1970         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
1971         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
1973         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
1974         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
1976         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
1977         esc sequence on non ANSI terminal.
1978         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
1980         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
1981         beginning of file.
1983 2008-07-02  Bean  <bean123ch@gmail.com>
1985         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
1986         (grub_editenv_SOURCES): New variable.
1987         (pkglib_MODULES): Add loadenv.mod.
1988         (loadenv_mod_SOURCES): New variable.
1989         (loadenv_mod_CFLAGS): Likewise.
1990         (loadenv_mod_LDFLAGS): Likewise.
1992         * include/grub/envblk.h: New file.
1994         * util/envblk.c: New file.
1996         * util/grub-editenv.c: New file.
1998         * commands/loadenv.c: New file.
2000 2008-07-01  Pavel Roskin  <proski@gnu.org>
2002         * include/multiboot2.h (struct multiboot_tag_module): Use char,
2003         not unsigned char.  This fixes warnings and is consistent with
2004         other tags.
2006         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2008         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2010         * term/tparm.c (analyze): Always set *popcount.
2012         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2013         cast to fix a warning.
2015         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2016         cast to suppress a warning.
2018         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2019         grub_fshelp_read_file() expects.
2021         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
2022         write uuid as a 32-bit value in CPU byte order, so declare and
2023         use it as such.
2025         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2026         long if the format specifier expects it.
2027         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2028         * partmap/pc.c (pc_partition_map_iterate): Likewise.
2029         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2030         long to fix a warning.
2031         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2032         grub_dprintf() arguments to fix warnings.
2034 2008-06-30  Pavel Roskin  <proski@gnu.org>
2036         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2037         install_bsd_part immediately before core.img is embedded or
2038         modified on disk.  This fixes core.img verification if core.img
2039         cannot be embedded.
2041         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2042         core_path to calculate the blocklist.
2043         Patch from Javier Martín <lordhabbit@gmail.com>
2045 2008-06-29  Robert Millan  <rmh@aybabtu.com>
2047         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
2048         block to disk block.
2049         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2050         Patch from Niels Böhm <bitbucket@arcor.de>
2052 2008-06-29  Robert Millan  <rmh@aybabtu.com>
2054         * util/update-grub_lib.in (font_path): Search for fonts in
2055         /boot/grub first, which is more likely to be readable (we aren't
2056         deciding where fonts live, just looking for them).
2058 2008-06-26  Pavel Roskin  <proski@gnu.org>
2060         * util/biosdisk.c (read_device_map): Don't leave dead map
2061         entries for devices failing stat() check.
2063         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2064         core_path_dev for the core.img path on the target device.
2066 2008-06-26  Robert Millan  <rmh@aybabtu.com>
2068         * disk/fs_uuid.c: New file.
2069         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2070         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2071         (fs_uuid_mod_LDFLAGS): New variables.
2072         * include/grub/disk.h (grub_disk_dev_id): Add
2073         `GRUB_DISK_DEVICE_UUID_ID'.
2074         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2075         implement iterate().
2077 2008-06-26  Robert Millan  <rmh@aybabtu.com>
2079         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2080         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2081         Linux image includes no initrd.
2083 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
2085         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2086         call to resolve the core image location that effectively appended the
2087         name twice.
2089 2008-06-21  Robert Millan  <rmh@aybabtu.com>
2091         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2092         call from here ...
2094         * util/grub.d/10_hurd.in: ... to here ...
2095         * util/grub.d/10_linux.in: ... and here.
2097 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2099         * kern/main.c (grub_main): Export `prefix' variable immediately
2100         after it has been set by grub_machine_set_prefix().
2102 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2104         * commands/search.c (search_label, search_fs_uuid, search_file): Print
2105         search result when not saving to variable, not the other way around.
2106         When saving to variable, abort iteration as soon as a match is found.
2108 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2110         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2111         check for partition that provides /boot/grub.  Its logic is flawed,
2112         as it prevents prepare_grub_to_access_device() from being called
2113         multiple times.
2115 2008-06-19  Robert Millan  <rmh@aybabtu.com>
2117         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2118         "insmod" command directly when abstraction modules are needed,
2119         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2120         since it had already been processed).
2122 2008-06-19  Pavel Roskin  <proski@gnu.org>
2124         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2125         changed.  This is needed in case GRUB_LIBDIR changes.
2126         * conf/i386-ieee1275.rmk: Likewise.
2127         * conf/i386-linuxbios.rmk: Likewise.
2128         * conf/i386-pc.rmk: Likewise.
2129         * conf/powerpc-ieee1275.rmk: Likewise.
2131 2008-06-18  Pavel Roskin  <proski@gnu.org>
2133         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2134         kernel_elf_symlist.c to symlist.c for consistency with other
2135         architectures.  Update all users.
2136         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2138 2008-06-18  Robert Millan  <rmh@aybabtu.com>
2140         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2141         it in prefix.
2143         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
2144         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
2145         a RAID device, run setup() for all members independently on whether
2146         LVM abstraction is being used.
2147         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2148         If grub-mkimage has set `*install_dos_part == -2', don't override this
2149         value.
2150         Perform *install_dos_part adjustments independently on whether
2151         we're embedding or not.
2152         Clarify error message when image is too big for embedding.
2153         Remove duplicate *install_dos_part stanza.
2155 2008-06-17  Robert Millan  <rmh@aybabtu.com>
2157         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2158         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2159         variables.
2160         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2161         values in grub_ofconsole_normal_color and
2162         grub_ofconsole_highlight_color (they're not directly related to
2163         background and foreground).
2164         (grub_ofconsole_setcolorstate): Extract background and foreground
2165         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2167 2008-06-17  Robert Millan  <rmh@aybabtu.com>
2169         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2170         /boot/grub for the check in last commit, not /boot (they could be
2171         different partitions).
2173 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2175         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2176         asked to setup access for the same partition that provides /boot,
2177         don't bother using UUIDs since our root already has the value we
2178         want.
2180 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2182         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2183         I2O devices.
2184         Patch from Sven Mueller <sven@debian.org>.
2186 2008-06-16  Robert Millan  <rmh@aybabtu.com>
2188         * util/update-grub.in: Check for $EUID instead of $UID.
2189         Reported by Vincent Zweije.
2191 2008-06-16  Bean  <bean123ch@gmail.com>
2193         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2194         (grub_ext2_read_block): Likewise.
2195         (grub_ext2_read_inode): Likewise.
2196         (grub_ext2_mount): Likewise.
2197         (grub_ext2_close): Likewise.
2198         (grub_ext3_get_journal): Removed.
2200         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2201         (grub_reiserfs_read_symlink): Likewise.
2202         (grub_reiserfs_mount): Likewise.
2203         (grub_reiserfs_open): Likewise.
2204         (grub_reiserfs_read): Likewise.
2205         (grub_reiserfs_close): Likewise.
2206         (grub_reiserfs_get_journal): Removed.
2208         * fs/fshelp.c (grub_fshelp_read): Removed.
2209         (grub_fshelp_map_block): Likewise.
2211         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2212         (grub_fshelp_journal): Likewise.
2213         (grub_fshelp_read): Likewise.
2214         (grub_fshelp_map_block): Likewise.
2216 2008-06-16  Pavel Roskin  <proski@gnu.org>
2218         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2219         floating point anymore.
2220         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2222 2008-06-15  Pavel Roskin  <proski@gnu.org>
2224         * commands/ls.c (grub_ls_list_files): Use integer calculations
2225         for human readable format, avoid floating point use.
2226         * kern/misc.c (grub_ftoa): Remove.
2227         (grub_vsprintf): Remove floating point support.
2229 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2231         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2232         devices.
2233         Reported by Max Vozeler.
2235 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2237         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2238         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2239         skipped later.
2240         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2241         the beginning of the prefix.
2243         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2244         It is assumed that if we have a memdisk, grub-mkimage has set
2245         grub_prefix to include the "(memdisk)" drive in it.
2247 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2249         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2250         Initialize keyboard controller after registering the terminal, so that
2251         grub_printf() can be called from grub_keyboard_controller_init().
2253 2008-06-15  Robert Millan  <rmh@aybabtu.com>
2255         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2256         extent-btree which is written as big endian on disk.
2257         Reported by Alain Greppin  <al@chilibi.org>.
2259 2008-06-14  Robert Millan  <rmh@aybabtu.com>
2261         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2262         * util/i386/pc/grub-install.in (modules): Likewise.
2264 2008-06-13  Pavel Roskin  <proski@gnu.org>
2266         * commands/ls.c (grub_ls_list_files): Fix format warnings.
2268 2008-06-13  Bean  <bean123ch@gmail.com>
2270         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2272         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2274         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2275         to indicate sparse block.
2277 2008-06-12  Pavel Roskin  <proski@gnu.org>
2279         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2280         number, grub_fshelp_read() does it for us.
2282         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
2283         linear disk read with journal translation.
2284         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2285         * include/grub/fshelp.h: Declare grub_fshelp_read().
2287 2008-06-09  Pavel Roskin  <proski@gnu.org>
2289         * fs/minix.c (grub_minix_mount): Handle error reading
2290         superblock.
2292 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2294         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2295         don't append the RAID prefix afterwards.
2296         Reported by Clint Adams.
2298 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2300         Based on description from Pavel:
2301         * kern/disk.c (grub_disk_check_range): Rename to ...
2302         (grub_disk_adjust_range): ... this.  Add a comment explaining the
2303         tasks performed by this function.
2305 2008-06-08  Robert Millan  <rmh@aybabtu.com>
2307         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2308         `num_serial' (for consistency with other variables).
2309         (struct grub_ntfs_data): Add `uuid' member.
2310         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2311         (grub_ntfs_uuid): New function.
2312         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2314 2008-06-07  Pavel Roskin  <proski@gnu.org>
2316         * util/biosdisk.c (open_device): Revert last change to the
2317         function, it broke installation.  The sector needs to be
2318         different dependent on which device is opened.
2320 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2322         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2323         rest of GRUB, and breakage doesn't happen if its value were modified.
2325         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2326         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2327         a constant (same value).
2328         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2329         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2331 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2333         * util/biosdisk.c (open_device): Do not modify sector offset when
2334         accessing a partition.  kern/disk.c already handles this for us.
2336 2008-06-06  Robert Millan  <rmh@aybabtu.com>
2338         * util/grub-emu.c (grub_machine_init): Move code in this function from
2339         here ...
2340         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2341         segfault in case grub_printf() is called).
2343         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2344         grub_probe.  Update all users not to explicitly add it again.
2345         (grub_device): New variable; contains corresponding device for grubdir.
2346         (fs_module, partmap_module, devabstraction_module): Pass
2347         `--device ${grub_device}' to grub_probe to avoid traversing /dev
2348         every time.
2350 2008-06-05  Robert Millan  <rmh@aybabtu.com>
2352         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2353         is found, print it (same layout as with labels).
2355 2008-06-04  Robert Millan  <rmh@aybabtu.com>
2357         * util/biosdisk.c (get_drive): Rename to ...
2358         (find_grub_drive): ... this.  Update all users.
2360         (get_os_disk): Rename to ...
2361         (convert_system_partition_to_system_disk): ... this.  Update all users.
2363         (find_drive): Rename to ...
2364         (find_system_device): ... this.  Update all users.
2366 2008-06-04  Robert Millan  <rmh@aybabtu.com>
2368         * util/biosdisk.c (get_os_disk): Handle IDA devices.
2369         * util/grub-mkdevicemap.c (get_mmc_disk_name)
2370         (make_device_map): Likewise.
2372 2008-06-01  Robert Millan  <rmh@aybabtu.com>
2374         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2375         before dereferencing it.
2377         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2378         union with fat12/fat16-specific ones.  Add some new fields, including
2379         `num_serial' for both versions.
2380         (struct grub_fat_data): Add `uuid' member.
2381         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2382         names.  Initialize `data->uuid' using `num_serial'.
2383         (grub_fat_uuid): New function.
2384         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2386         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2387         (grub_reiserfs_uuid): New function.
2388         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2389         member.
2391         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2392         (grub_xfs_uuid): New function.
2393         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2395 2008-06-01  Robert Millan  <rmh@aybabtu.com>
2397         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2398         code that is backward compatible with pre-uuid search command.
2400 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2402         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2403         floppies after everything else, to ensure floppy drive isn't accessed
2404         unnecessarily (patch from Bean).
2406 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2408         * commands/search.c (search_label, search_fs_uuid, search_file): Do
2409         not print device names when we were asked to set a variable.
2411 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2413         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2414         using "cursor-on" and "cursor-off" commands (understood at least by
2415         the Open Firmware flavour on OLPC).
2417 2008-05-31  Michael Gorven  <michael@gorven.za.net>
2419         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2420         on and off sequences.
2422 2008-05-31  Robert Millan  <rmh@aybabtu.com>
2424         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2425         * util/update-grub.in: Likewise.
2427 2008-05-30  Pavel Roskin  <proski@gnu.org>
2429         * util/biosdisk.c (linux_find_partition): Simplify logic and
2430         make the code more universal.  Keep special processing for
2431         devfs, but use a simple rule for all other devices.  If the
2432         device ends with a number, append 'p' and the partition number.
2433         Otherwise, append only the partition number.
2435 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2437         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2438         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2439         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2440         the `root' parameter to Linux.
2442 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2444         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2445         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2446         --fs_uuid with --fs-uuid.
2447         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2448         all filesystems support them).
2450 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2452         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2453         grub_printf() flags, since we're printing in units of 2 bytes.
2455 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2457         * util/grub.d/00_header.in: Remove obsolete comment referencing
2458         convert_system_path_to_grub_path().
2459         * util/update-grub.in: Likewise.
2460         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2461         (convert_system_path_to_grub_path): Add a warning message explaining
2462         that this function is deprecated.  Rely on is_path_readable_by_grub()
2463         for the readability checks.
2464         (font_path): Use is_path_readable_by_grub() for the readability
2465         check rather than convert_system_path_to_grub_path().
2467 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2469         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2470         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2471         converting it first.
2472         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2473         grub.cfg for access to font file, and afterwards call it again to set
2474         the root device.
2476 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2478         * commands/search.c (options): Add --fs_uuid option.
2479         (search_fs_uuid): New function.
2480         (grub_cmd_search): Fix --set argument passing.
2481         Use search_fs_uuid() when requested via --fs_uuid.
2482         (grub_search_init): Update help message.
2483         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2484         and redeclare it as an array of 16-bit words.
2485         (grub_ext2_uuid): New function.
2486         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2487         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2488         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2489         (GRUB_DEVICE_BOOT_UUID): New variables.
2490         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2491         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2492         whenever possible.
2493         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
2494         just assume `root' variable has the right value.
2495         * util/grub.d/10_linux.in: Likewise.
2496         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2497         via PRINT_FS_UUID.
2498         (main): Recognise `-t fs_uuid' argument.
2500 2008-05-30  Robert Millan  <rmh@aybabtu.com>
2502         * util/biosdisk.c (map): Redefine structure to hold information
2503         about GRUB drive name.
2504         (get_drive): Reimplement without assuming (and verifying) BIOS-like
2505         drive names.
2506         (call_hook): Remove.
2507         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2508         member.  Assume drive has partitions.
2509         (grub_util_biosdisk_open): Access device names via `.device' struct
2510         member.
2511         (open_device): Likewise.
2512         (find_drive): Likewise.
2513         (read_device_map): Adjust map[] usage to match the new struct
2514         definition.  Don't check for duplicates (still possible, but not cheap
2515         anymore).
2516         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2517         (make_device_name): Remove assumption of BIOS-like drive names.
2519 2008-05-30  Pavel Roskin  <proski@gnu.org>
2521         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2522         compiling execute.c doesn't need grub_script.tab.h anymore.
2523         (normal/command.c_DEPENDENCIES): Likewise.
2524         (normal/function.c_DEPENDENCIES): Likewise.
2525         * conf/i386-ieee1275.rmk: Likewise.
2526         * conf/i386-linuxbios.rmk: Likewise.
2527         * conf/i386-pc.rmk: Likewise.
2528         * conf/powerpc-ieee1275.rmk: Likewise.
2529         * conf/sparc64-ieee1275.rmk: Likewise.
2531 2008-05-29  Pavel Roskin  <proski@gnu.org>
2533         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
2534         when scanning metadata for volume group name.
2536         * include/grub/script.h: Don't include grub_script.tab.h.  It's
2537         a generated file, which may only be included from the files with
2538         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
2539         use union YYSTYPE, as the later allows forward declaration.
2540         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
2542 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2544         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
2545         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
2546         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
2547         (grub_console_checkkey): Add grub_dprintf() call to report unknown
2548         scan codes.
2550 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2552         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
2553         control key combinations.
2555 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2557         * util/powerpc/ieee1275/grub-install.in: Move from here ...
2558         * util/ieee1275/grub-install.in: ... to here.
2559         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
2560         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
2561         (grub_install_SOURCES): Likewise.
2563 2008-05-29  Robert Millan  <rmh@aybabtu.com>
2565         * fs/affs.c: Update copyright year.
2566         * fs/ext2.c: Likewise.
2567         * fs/fshelp.c: Likewise.
2568         * fs/hfsplus.c: Likewise.
2569         * fs/ntfs.c: Likewise.
2570         * fs/xfs.c: Likewise.
2571         * include/grub/fshelp.h: Likewise.
2572         * util/grub-mkdevicemap.c: Likewise.
2574 2008-05-28  Robert Millan  <rmh@aybabtu.com>
2576         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
2577         might need to be fatfs to support some firmware implementations
2578         (e.g. OFW or EFI).
2580 2008-05-28  Robert Millan  <rmh@aybabtu.com>
2582         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
2583         devices.
2584         * util/grub-mkdevicemap.c (get_mmc_disk_name)
2585         (make_device_map): Likewise.
2587 2008-05-20  Bean  <bean123ch@gmail.com>
2589         * fs/fshelp.c (grub_fshelp_map_block): New function.
2590         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
2591         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
2593         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
2594         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2595         (grub_fshelp_journal): New structure.
2596         (grub_fshelp_map_block): New function prototype.
2597         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2598         (grub_fshelp_map_block): Likewise.
2600         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2601         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2602         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2603         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2604         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2605         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2606         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2607         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2608         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2609         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2610         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2611         (grub_ext2_sblock): New members for journal support.
2612         (grub_ext3_journal_header): New structure.
2613         (grub_ext3_journal_revoke_header): Likewise.
2614         (grub_ext3_journal_block_tag): Likewise.
2615         (grub_ext3_journal_sblock): Likewise.
2616         (grub_fshelp_node): New members logfile and journal.
2617         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2618         grub_fshelp_map_block to get real block number.
2619         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2620         number.
2621         (grub_ext2_read_inode): Likewise.
2622         (grub_ext3_get_journal): New function.
2623         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2624         (grub_ext2_close): Release memory used by journal.
2626         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2627         (REISERFS_MAGIC_DESC_BLOCK): New macro.
2628         (grub_reiserfs_transaction_header): Renamed to
2629         grub_reiserfs_description_block, replace field data with real_blocks.
2630         (grub_reiserfs_commit_block): New structure.
2631         (grub_reiserfs_data): New member journal.
2632         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2633         number.
2634         (grub_reiserfs_read_symlink): Likewise.
2635         (grub_reiserfs_iterate_dir): Likewise.
2636         (grub_reiserfs_open): Likewise.
2637         (grub_reiserfs_read): Likewise.
2638         (grub_reiserfs_get_journal): New function.
2639         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2640         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2641         using grub_reiserfs_get_journal.
2642         (grub_reiserfs_close): Release memory used by journal.
2644         * fs/affs.c (grub_affs_read_block): Change block type to
2645         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2647         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2649         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2651         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2653         * fs/udf.c (grub_udf_read_block): Change block type to
2654         grub_disk_addr_t. Use type cast to avoid warning.
2656         * fs/xfs.c (grub_xfs_read_block): Likewise.
2658 2008-05-16  Christian Franke  <franke@computer.org>
2660         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2661         to ensure that break with ESC will always work.
2662         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2663         Remove ESC from keyboard queue.
2665 2008-05-16  Christian Franke  <franke@computer.org>
2667         * util/biosdisk.c: [__CYGWIN__] Add includes.
2668         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
2669         (get_os_disk): Move variable declarations to OS specific
2670         parts to avoid warning.
2671         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
2672         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
2673         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
2674         Cygwin.
2675         * util/getroot.c: [__CYGWIN__] Add includes.
2676         (strip_extra_slashes): Fix "/" case.
2677         [__CYGWIN__] (get_win32_path): New function.
2678         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
2679         [__CYGWIN__] (find_root_device): Disable.
2680         [__CYGWIN__] (get_bootsec_serial): New function.
2681         [__CYGWIN__] (find_cygwin_root_device): Likewise.
2682         [__linux__] (grub_guess_root_device): Add early returns to simplify
2683         structure.
2684         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
2685         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
2686         check for Linux only.
2688 2008-05-15  Bean  <bean123ch@gmail.com>
2690         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
2691         keyboard hang problem in apple's intel mac.
2693 2008-05-09  Robert Millan  <rmh@aybabtu.com>
2695         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
2696         devices.
2697         * util/grub-mkdevicemap.c (get_virtio_disk_name)
2698         (make_device_map): Likewise.
2699         Reported by Aurelien Jarno <aurel32@debian.org>
2701 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
2703         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
2704         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
2705         (make_device_map): Output entries for xvd type disks.
2707 2008-05-07  Robert Millan  <rmh@aybabtu.com>
2709         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
2710         devices.
2711         * util/grub-mkdevicemap.c (get_cciss_disk_name)
2712         (make_device_map): Likewise.
2713         Reported by Roland Dreier <rdreier@cisco.com>
2715 2008-05-07  Robert Millan  <rmh@aybabtu.com>
2717         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
2718         grub_strstr() call.  Correct a few mistakes in failure path handling.
2720 2008-05-06  Robert Millan  <rmh@aybabtu.com>
2722         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2723         Do not print a trailing slash (therefore, the root directory is an
2724         empty string).
2725         (convert_system_path_to_grub_path): Do not remove trailing slash
2726         from make_system_path_relative_to_its_root() output.
2728         * util/i386/pc/grub-install.in: Add trailing slash to output from
2729         make_system_path_relative_to_its_root().
2731 2008-05-06  Robert Millan  <rmh@aybabtu.com>
2733         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
2734         ensures that output lines aren't intermangled with those sent to
2735         stderr (via grub_util_info()).
2736         * util/grub-probe.c (grub_refresh): Likewise.
2737         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
2739 2008-05-05  Christian Franke  <franke@computer.org>
2741         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
2742         Add Cygwin device names.
2743         (get_ide_disk_name) [__CYGWIN__]: Likewise.
2744         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
2745         (check_device): Return error instead of success on empty name.
2746         (make_device_map): Move label inside linux specific code to
2747         prevent compiler warning.
2749 2008-04-30  Robert Millan  <rmh@aybabtu.com>
2751         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
2752         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
2753         first boot option.
2754         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
2756 2008-04-29  Robert Millan  <rmh@aybabtu.com>
2758         * docs/grub.cfg: New file (example GRUB configuration).
2760 2008-04-26  Robert Millan  <rmh@aybabtu.com>
2762         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
2763         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
2764         and `disk/ieee1275/nand.c'.
2766 2008-04-25  Bean  <bean123ch@gmail.com>
2768         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
2769         i386-linuxbios.
2771         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
2772         change the buffer size to 4096 for cdrom device.
2774         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
2775         and nand.mod.
2776         (_linux_mod_SOURCES): New variable.
2777         (_linux_mod_CFLAGS): Likewise.
2778         (_linux_mod_LDFLAGS): Likewise.
2779         (linux_mod_SOURCES): Likewise.
2780         (linux_mod_CFLAGS): Likewise.
2781         (linux_mod_LDFLAGS): Likewise.
2782         (nand_mod_SOURCES): Likewise.
2783         (nand_mod_CFLAGS): Likewise.
2784         (nand_mod_LDFLAGS): Likewise.
2786         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
2787         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
2788         type property. (nand device in olpc don't have this property)
2790         * include/grub/disk.h (grub_disk_dev_id): New macro
2791         GRUB_DISK_DEVICE_NAND_ID.
2793         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
2794         function prototype.
2795         (grub_rescue_cmd_initrd): Likewise.
2797         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
2798         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
2799         ofw_cif_handler and ofw_idt, adjust padding number.
2801         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
2802         GRUB_MACHINE_IEEE1275 is defined.
2804         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
2805         Use NESTED_FUNC_ATTR attribute on the hook parameter.
2807         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
2808         on nested function heap_init.
2809         (grub_upper_mem): New variable for i386-ieee1275.
2810         (grub_get_extended_memory): New function for i386-ieee1275.
2811         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
2813         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
2814         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
2815         property.
2817         * loader/i386/ieee1275/linux.c: New file.
2819         * loader/i386/ieee1275/linux_normal.c: New file.
2821         * disk/ieee1275/nand.c: New file.
2823 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
2825         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
2826         value.
2827         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
2829 2008-04-18  Robert Millan  <rmh@aybabtu.com>
2831         Restructures early code path on ieee1275 to unify grub_main() as
2832         the first C function that is executed in every platform.
2834         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
2835         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
2836         cmain().
2837         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
2838         * kern/ieee1275/cmain.c (cmain): Rename to ...
2839         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
2840         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
2841         at the beginning.
2843 2008-04-18  Robert Millan  <rmh@aybabtu.com>
2845         * util/update-grub.in: Fix syntax error when setting
2846         `GRUB_PRELOAD_MODULES'.
2847         Reported by Stephane Chazelas <stephane@artesyncp.com>
2849 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
2851         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
2852         section into account, newer toolchains generate unique build ids
2853         * configure.ac: remove the test for --build-id=none acceptance,
2854         we want build ids to be preserved
2855         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
2856         far from other sections don't cause the raw binary images grow
2857         size
2859 2008-04-15  Robert Millan  <rmh@aybabtu.com>
2861         * disk/lvm.c: Update copyright year.
2862         * kern/misc.c: Likewise.
2864 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
2866         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
2867         there is no memory left for physical volume name.
2869 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
2871         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
2872         volume name mapping to support bigger than 9 character names properly.
2874 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2876         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
2877         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
2879 2008-04-13  Christian Franke  <franke@computer.org>
2881         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
2882         to create a floppy emulation boot CD when non emulation mode
2883         does not work.
2884         Enable Joliet CD filesystem extension.
2886 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2888         * kern/misc.c (grub_strncat): Fix off-by-one error.
2889         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
2891         * kern/env.c (grub_env_context_close): Clear current context, not
2892         previous one.
2893         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
2895         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
2897 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2899         Improve robustness when handling LVM.
2901         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
2902         (and leave `*p' unmodified).
2903         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
2904         through it.
2905         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
2906         iterating through it.
2907         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
2908         through it.
2909         (grub_lvm_scan_device): Check the return value (and fail gracefully
2910         when due) on each grub_lvm_getvalue() or grub_strstr() call.
2911         Don't assume `vg->pvs != NULL' when iterating through it.
2913 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2915         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
2916         * genmk.rb (partmap): New variable.
2917         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
2918         (#{partmap}): New target rule.
2919         * genpartmaplist.sh: New file.
2920         * Makefile.in (pkglib_DATA): Add partmap.lst.
2921         (partmap.lst): New target rule.
2922         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
2923         modules (including all partition maps), instead of preloading them.
2925 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
2927         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
2928         `linux-boot-prober' (if installed) to detect other operating
2929         systems which are installed on the computer and add them to
2930         the boot menu.
2931         * conf/common.rmk: Build and install 30_os-prober.
2933 2008-04-12  Robert Millan  <rmh@aybabtu.com>
2935         * kern/powerpc/ieee1275/init.c: Move from here ...
2936         * kern/ieee1275/init.c: ... to here.  Update all users.
2938         * kern/powerpc/ieee1275/cmain.c: Move from here ...
2939         * kern/ieee1275/cmain.c: ... to here.  Update all users.
2941         * kern/powerpc/ieee1275/openfw.c: Move from here ...
2942         * kern/ieee1275/openfw.c: ... to here.  Update all users.
2944         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
2945         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
2947 2008-04-10  Pavel Roskin  <proski@gnu.org>
2949         * configure.ac: Always use "_cv_" in cache variables for
2950         compatibility with Autoconf 2.62.
2952 2008-04-07  Robert Millan  <rmh@aybabtu.com>
2954         Revert grub/machine/init.h addition by Pavel (since it breaks on
2955         i386-ieee1275 and others):
2956         * util/i386/pc/misc.c: Remove grub/machine/init.h.
2957         * util/powerpc/ieee1275/misc.c: Likewise.
2959 2008-04-07  Robert Millan  <rmh@aybabtu.com>
2961         * util/grub-probe.c (probe): Improve error message.
2963 2008-04-07  Robert Millan  <rmh@aybabtu.com>
2965         * util/biosdisk.c (read_device_map): Skip devices that don't exist
2966         (this prevents the presence of a bogus entry from ruining the whole
2967         thing).
2969 2008-04-06  Pavel Roskin  <proski@gnu.org>
2971         * util/biosdisk.c: Include grub/util/biosdisk.h.
2972         * util/grub-fstest.c (execute_command): Make static.
2973         * util/grub-mkdevicemap.c (check_device): Likewise.
2974         * util/i386/pc/misc.c: Include grub/machine/init.h.
2975         * util/powerpc/ieee1275/misc.c: Likewise.
2976         * util/lvm.c: Include grub/util/lvm.h.
2977         * util/misc.c: Include grub/kernel.h, grub/misc.h and
2978         grub/cache.h.
2979         * util/raid.c: Include grub/util/raid.h.
2980         (grub_util_getdiskname): Make static.
2982         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
2983         grub_hostfs_fini(), as they are called from grub_init_all() and
2984         grub_fini_all() respectively.  This fixes an infinite loop in
2985         grub-fstest due to double registration of hostfs.
2986         Reported by Christian Franke <Christian.Franke@t-online.de>
2988 2008-04-05  Pavel Roskin  <proski@gnu.org>
2990         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
2991         all 8 functions.  Otherwise, probe function 0 only.
2993 2008-04-04  Pavel Roskin  <proski@gnu.org>
2995         * commands/lspci.c (grub_lspci_iter): Print the bus number
2996         correctly.
2998         * commands/lspci.c (grub_pci_classes): Fix typos.
2999         (grub_lspci_iter): Don't print func twice.  Print vendor ID
3000         before device ID, as it's normally done.
3002         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3003         Fix signedness warnings.
3004         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3005         Likewise.
3006         * util/ieee1275/get_disk_name.c: Include config.h so that
3007         _GNU_SOURCE is defined and getline() is declared.  Mark an
3008         unused argument as such.  Fix a signedness warning.
3010 2008-04-02  Pavel Roskin  <proski@gnu.org>
3012         * genkernsyms.sh.in: Use more robust assignments for CC and
3013         srcdir.  Quote srcdir.
3014         * gensymlist.sh.in: Likewise.  Assert at the compile time that
3015         the symbol table is not empty.
3017         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3018         * fs/cpio.c (grub_cpio_read): Likewise.
3020 2008-04-01  Pavel Roskin  <proski@gnu.org>
3022         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3023         * disk/host.c (grub_host_open): Likewise.
3024         * disk/loopback.c (grub_loopback_open): Likewise.
3025         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3026         disk->id as in disk/host.c, not a multi-character constant.
3028         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
3029         later is obsolete, potentially dangerous and sets a bad example.
3030         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3031         * util/misc.c (grub_util_get_image_size): Likewise.
3033         * disk/loopback.c (options): Improve help for "--partitions".
3035         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3036         options to align them with the short options, e.g. "echo -e".
3038 2008-03-31  Bean  <bean123ch@gmail.com>
3040         * video/reader/png.c (grub_png_data): New member is_16bit and
3041         image_data.
3042         (grub_png_decode_image_header): Detect 16 bit png image.
3043         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3044         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3045         (grub_video_reader_png): Release memory occupied by image_data.
3047         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3048         4096 bytes.
3049         (grub_nfs_mount): Skip the test for sector per cluster.
3051         * include/grub/ntfs.h (MAX_SPC): Removed.
3053 2008-03-31  Bean  <bean123ch@gmail.com>
3055         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3056         (grub_probe_SOURCES): Add fs/afs.c.
3057         (grub_fstest_SOURCES): Likewise.
3058         (afs_mod_SOURCES): New variable.
3059         (afs_mod_CFLAGS): Likewise.
3060         (afs_mod_LDFLAGS): Likewise.
3062         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3063         (grub_emu_SOURCES): Likewise.
3065         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3067         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3069         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3071         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3073         * fs/afs.c: New file.
3075 2008-03-30  Pavel Roskin  <proski@gnu.org>
3077         * disk/host.c: Include grub/misc.h to fix a warning.
3078         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3079         warnings about implicit declarations.
3081         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3082         variable.
3083         * include/grub/i386/loader.h: Change declaration of
3084         grub_linux_boot() to match what grub_loader_set() expects.
3085         * util/getroot.c (grub_guess_root_device): Return const char* to
3086         fix a warning.
3087         * util/grub-probe.c (probe): Fix a warning about uninitialized
3088         abstraction_name variable.
3089         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3090         second argument as unused to fix a warning.
3092         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3093         missing grub_error() call.
3095         * util/update-grub_lib.in: Define datarootdir, since Autoconf
3096         2.60 and newer uses it to define datadir.
3098         * commands/sleep.c: Fix warning about implicit declaration.
3099         * disk/memdisk.c: Likewise.
3100         * loader/aout.c: Likewise.
3101         * loader/i386/bsd_normal.c: Likewise.
3102         * util/grub-probe.c: Likewise.
3104         * commands/i386/cpuid.c (has_longmode): Make static.
3105         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3106         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3108         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3109         GDT.  This is more robust, as %ds can change.
3110         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3111         calling real_to_prot().
3112         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3114 2008-03-28  Pavel Roskin  <proski@gnu.org>
3116         * kern/i386/pc/startup.S: Assert that uncompressed functions
3117         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3118         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3119         code, as they push parts of the code (error handlers) beyond
3120         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
3121         code as correctness and size.
3123 2008-03-28  Pavel Roskin  <proski@gnu.org>
3125         * kern/i386/pc/startup.S
3126         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3127         data block address to the real mode, keep offset minimal.  This
3128         works around a bug in AWARD BIOS on old Athlon systems, which
3129         makes CD detection hang.
3131 2008-03-26  Pavel Roskin  <proski@gnu.org>
3133         * normal/color.c (grub_parse_color_name_pair): Make `name' a
3134         const.
3135         * include/grub/normal.h: Add grub_parse_color_name_pair()
3136         declaration.
3138 2008-03-24  Bean  <bean123ch@gmail.com>
3140         * disk/i386/pc/biosdisk.c (cd_start): Removed.
3141         (cd_count): Removed.
3142         (cd_drive): New variable.
3143         (grub_biosdisk_get_drive): Don't check for (cdN) device.
3144         (grub_biosdisk_call_hook): Likewise.
3145         (grub_biosdisk_iterate): Change cdrom detection method.
3146         (grub_biosdisk_open): Replace cd_start with cd_drive.
3147         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3148         detect cdrom device.
3150         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3151         Removed.
3152         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3153         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3154         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3155         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3156         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3157         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3158         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3159         (grub_biosdisk_cdrp): New structure.
3160         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3162         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3164         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3165         device.
3167         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3168         New function.
3170 2008-03-20  Robert Millan  <rmh@aybabtu.com>
3172         Remove 2 TiB limit in ata.mod.
3173         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3174         (grub_ata_dumpinfo): Print sector count with 0x%llx.
3175         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3176         grub_uint64_t instead of grub_uint32_t.
3178 2008-03-05  Bean  <bean123ch@gmail.com>
3180         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3181         (grub_multiboot): Set boot device.
3183         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3185 2008-03-02  Bean  <bean123ch@gmail.com>
3187         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3188         symlink_buffer.
3190 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
3192         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3193         texinfo.tex.
3195         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3196         modified.
3198         * docs/fdl.texi: New file.
3200         * docs/mdate-sh: New file. Copied from gnulib.
3201         * docs/texinfo.tex: Likewise.
3203         * config.guess: Updated from gnulib.
3204         * install-sh: Likewise.
3206 2008-02-28  Robert Millan  <rmh@aybabtu.com>
3208         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3209         (aout_mod_SOURCES): New variable.
3210         (aout_mod_CFLAGS): Likewise.
3211         (aout_mod_LDFLAGS): Likewise.
3213         * conf/i386-ieee1275.rmk: Likewise.
3215 2008-02-28  Robert Millan  <rmh@aybabtu.com>
3217         * util/update-grub.in: Reorganise terminal validity check.  Accept
3218         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3219         Based on suggestion by Franklin PIAT.
3221 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
3223         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3224         function.
3225         * util/getroot.c (grub_util_check_block_device): New function that
3226         returns the given argument if it is a block device and returns NULL else.
3227         * util/grub-probe.c (argument_is_device): New variable.
3228         (probe): Promote device_name from a variable to an argument. Receive
3229         device_name from grub_util_check_block_device() if path is NULL and from
3230         grub_guess_root_device() else. Do not free() device_name anymore.
3231         (options): Introduce new parameter '-d, --device'.
3232         (main): Add description of the new parameter to the help screen.
3233         Rename path variable to argument. Set argument_is_device if the '-d'
3234         option is given. Pass argument to probe() depending on
3235         argument_is_device.
3237 2008-02-24  Bean  <bean123ch@gmail.com>
3239         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3240         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3241         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3242         (GRUB_ISO9660_VOLDESC_PART): Likewise.
3243         (GRUB_ISO9660_VOLDESC_END): Likewise.
3244         (grub_iso9660_primary_voldesc): New member escape.
3245         (grub_iso9660_data): New member joliet.
3246         (grub_iso9660_convert_string): New function.
3247         (grub_iso9660_mount): Detect joliet extension.
3248         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3249         (grub_iso9660_iso9660_label): Likewise.
3251         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3252         (grub_setup_SOURCES): Add fs/udf.c.
3253         (grub_fstest_SOURCES): Likewise.
3254         (udf_mod_SOURCES): New variable.
3255         (udf_mod_CFLAGS): Likewise.
3256         (udf_mod_LDFLAGS): Likewise.
3258         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3259         (grub_emu_SOURCES): Likewise.
3261         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3263         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3265         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3267         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3269         * fs/udf.c: New file.
3271 2008-02-24  Robert Millan  <rmh@aybabtu.com>
3273         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3274         (normal/lexer.c_DEPENDENCIES): New variables.
3275         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3276         (normal/lexer.c_DEPENDENCIES): Likewise.
3277         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3278         (normal/lexer.c_DEPENDENCIES): Likewise.
3279         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3280         (normal/lexer.c_DEPENDENCIES): Likewise.
3281         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3282         (normal/lexer.c_DEPENDENCIES): Likewise.
3283         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3284         (normal/lexer.c_DEPENDENCIES): Likewise.
3286 2008-02-23  Robert Millan  <rmh@aybabtu.com>
3288         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3289         since they were intended to be in hex.  This didn't break previously
3290         because of a bug in gpt_partition_map_iterate() (see below).
3292         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3293         when checking the validity of GPT header.
3294         Remove `partno', since it always provides the same information as `i'.
3296 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
3298         * include/grub/efi/time.h: Fix a wrong comment.
3300 2008-02-19  Pavel Roskin  <proski@gnu.org>
3302         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3303         message.
3305 2008-02-19  Bean  <bean123ch@gmail.com>
3307         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3308         (aout_mod_SOURCES): New variable.
3309         (aout_mod_CFLAGS): Likewise.
3310         (aout_mod_LDFLAGS): Likewise.
3311         (_bsd_mod_SOURCES): New variable.
3312         (_bsd_mod_CFLAGS): Likewise.
3313         (_bsd_mod_LDFLAGS): Likewise.
3314         (bsd_mod_SOURCES): New variable.
3315         (bsd_mod_CFLAGS): Likewise.
3316         (bsd_mod_LDFLAGS): Likewise.
3318         * include/grub/aout.h: New file.
3320         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3322         * include/grub/i386/bsd.h: New file.
3324         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3325         to make it public.
3327         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3328         function is called, so that it's possible to change it inside the hook.
3329         (grub_elf64_load): Likewise.
3330         (grub_elf_file): Don't close the file if elf header is not found.
3331         (grub_elf_close): Close the file if grub_elf_file fails (The new
3332         grub_elf_file won't close it).
3333         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3334         (grub_elf64_size): Likewise.
3336         * kern/i386/loader.S (grub_unix_real_boot): New function.
3338         * loader/aout.c: New file.
3340         * loader/i386/bsd.c: New file.
3342         * loader/i386/bsd_normal.c: New file.
3344         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3346         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3347         can test other formats.
3349 2008-02-19  Robert Millan  <rmh@aybabtu.com>
3351         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3352         (grub_gpt_partition_type_empty): Redefine with macro from
3353         `<grub/gpt_partition.h>'.
3354         (gpt_partition_map_iterate): Adjust partition type comparison.
3356         Export `entry' as partmap-specific `part.data' struct.
3357         (grub_gpt_header, grub_gpt_partentry): Move from here ...
3359         * include/grub/gpt_partition.h (grub_gpt_header)
3360         (grub_gpt_partentry): ... to here (new file).
3362         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3364         (grub_gpt_partition_type_bios_boot): New const variable, defined
3365         with macro from `<grub/gpt_partition.h>'.
3367         (setup): Replace `first_start' with `embed_region', which keeps
3368         track of the embed region (and is partmap-agnostic).
3370         Replace find_first_partition_start() with find_usable_region(),
3371         which finds a usable region for embedding using partmap-specific
3372         knowledge (supports PC/MSDOS and GPT).
3374         Fix all assumptions that the embed region start at sector 1, using
3375         `embed_region.start' from now on.  Similarly, use `embed_region.end'
3376         rather than `first_start' to calculate available size.
3378         In grub_util_info() message, replace "into after the MBR" with an
3379         indication of the specific sector our embed region starts at.
3381 2008-02-19  Robert Millan  <rmh@aybabtu.com>
3383         * DISTLIST: Replace `commands/ieee1275/halt.c' and
3384         `commands/ieee1275/reboot.c' with `commands/halt.c' and
3385         `commands/reboot.c'.
3386         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3387         (halt_mod_SOURCES): Likewise.
3388         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3389         (halt_mod_SOURCES): Likewise.
3391 2008-02-17  Christian Franke  <franke@computer.org>
3393         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3395 2008-02-17  Robert Millan  <rmh@aybabtu.com>
3397         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3398         set `first_start' to 0 for non-PC/MSDOS partition maps.
3400 2008-02-16  Robert Millan  <rmh@aybabtu.com>
3402         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3403         do not assume partition map is PC/MSDOS before performing checks that
3404         are specific to that layout.
3406 2008-02-13  Robert Millan  <rmh@aybabtu.com>
3408         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3409         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3410         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3412 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
3414         * configure.ac: Only a cosmetic change on the handling of
3415         -fno-stack-protector.
3417 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
3419         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3420         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3421         reboot.c.
3422         (grub_install_SOURCES): Add halt.mod and reboot.mod.
3423         (halt_mod_SOURCES): New variable.
3424         (halt_mod_CFLAGS): Likewise.
3425         (halt_mod_LDFLAGS): Likewise.
3426         (reboot_mod_SOURCES): Likewise.
3427         (reboot_mod_CFLAGS): Likewise.
3428         (reboot_mod_LDFLAGS): Likewise.
3430         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3431         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3432         reboot.c.
3433         (halt_mod_SOURCES): Likewise.
3434         (reboot_mod_SOURCES): Likewise.
3436         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3437         commands/i386/pc/reboot.c by commands/reboot.c.
3438         (reboot_mod_SOURCES): Likewise.
3440         * commands/i386/pc/reboot.c: merge this file ...
3442         * commands/ieee1275/reboot.c: ... and this file ...
3444         * commands/reboot.c: ... to this file.
3445         Add some precompiler directive to include the correct header for
3446         each machine.
3448         * commands/ieee1275/halt.c: move this file ...
3450         * commands/halt.c: ... to here.
3451         Add some precompiler directive to include the correct header for
3452         each machine.
3454         * include/grub/efi/efi.h (grub_reboot): New function declaration.
3455         (grub_halt): Likewise.
3457         * kern/efi/efi.c (grub_reboot): New function.
3458         (grub_halt): Likewise.
3460 2008-02-12  Robert Millan  <rmh@aybabtu.com>
3462         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3463         /dev (like it is done for /dev/mapper).  This doesn't provide support
3464         for EVMS, but at least it is now easy to identify the problem when it
3465         arises.
3467 2008-02-11  Robert Millan  <rmh@aybabtu.com>
3469         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3470         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3471         comparing it with -1, not 0.
3473 2008-02-10  Robert Millan  <rmh@aybabtu.com>
3475         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3476         `disk/lvm.c'.
3477         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3478         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3480         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3481         `disk/lvm.c' to the end of the list.
3482         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3483         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3485 2008-02-10  Robert Millan  <rmh@aybabtu.com>
3487         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
3488         grub_print_error() instead.  This will let user know why we're entering
3489         rescue mode.
3490         Based on suggestions from Sam Morris.
3492 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
3494         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3495         on remaining N args, instead of "--" arg N times.
3497 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
3499         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3500         (fill_with_default_glyph): Changed to use unknown_glyph for fill
3501         pattern for unknown glyphs.
3503 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3505         * configure.ac: Probe for `help2man'.
3506         * Makefile.in (builddir): New variable.
3507         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
3508         or otherwise add a few flags/options to it.
3509         (install-local): For every executable utility or script that is
3510         installed, invoke $(HELP2MAN) to install a manpage based on --help
3511         output.
3513         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3514         that it doesn't prevent --help from working in build tree.
3516         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3517         with `bug-grub@gnu.org'.
3518         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3519         * util/update-grub.in (usage): New function.
3520         Implement proper argument check, with support for --help and --version
3521         (as well as existing -y).
3523 2008-02-09  Christian Franke  <franke@computer.org>
3525         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
3526         avoid overwriting previous output.
3527         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
3529 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3531         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
3532         drawing the menu.
3534 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3536         * commands/sleep.c: New file.
3537         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
3538         (sleep_mod_SOURCES): New variable.
3539         (sleep_mod_CFLAGS): Likewise.
3540         (sleep_mod_LDFLAGS): Likewise.
3542 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3544         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
3545         situations in which we can deduce the RAID size and the superblock
3546         doesn't match it.
3548 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3550         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
3551         and return a grub_diskmemberlist_t composed of LVM physical volumes.
3552         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
3554         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
3555         and return a grub_diskmemberlist_t composed of physical array members.
3556         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
3558         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
3559         prototype.
3560         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
3561         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
3562         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
3564         * util/grub-probe.c (probe): Move partmap probing code from here ...
3565         (probe_partmap): ... to here.
3566         (probe): Use probe_partmap() once for the disk we're probing, and
3567         additionally, when such disk contains a memberlist() struct member,
3568         once for each disk that is contained in the structure returned by
3569         memberlist().
3571 2008-02-09  Robert Millan  <rmh@aybabtu.com>
3573         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
3574         environment variable to 'all' in order to obtain debug output from
3575         non-util/ code.
3576         * util/i386/pc/grub-setup.c (main): Likewise.
3578 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3580         * disk/raid.c (grub_raid_scan_device): Check for
3581         `array->device[sb.this_disk.number]' rather than for
3582         `array->device[sb.this_disk.number]->name', since the latter is not
3583         guaranteed to be accessible.
3585 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3587         * disk/raid.c: Update copyright.
3588         * fs/cpio.c: Likewise.
3589         * include/grub/raid.h: Likewise.
3590         * loader/i386/pc/multiboot.c: Likewise.
3591         * util/hostfs.c: Likewise.
3593 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3595         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3596         to a grub_disk_t array.
3597         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3598         `device[x]'.
3599         (grub_raid_scan_device): Replace `device[x].name' accesses with
3600         `device[x]->name'.  Simplify initialization of `array->device[x]'.
3602 2008-02-08  Robert Millan  <rmh@aybabtu.com>
3604         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3605         grub_dprintf() calls.
3606         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3607         error message.
3609 2008-02-07  Christian Franke  <franke@computer.org>
3611         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3612         instead of fseek and ftell to support large files.
3613         (grub_hostfs_read): Likewise.
3615 2008-02-07  Robert Millan  <rmh@aybabtu.com>
3617         Patch from Jeroen Dekkers.
3618         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3619         failure, since successfully reading all array members might not be
3620         required.
3622 2008-02-06  Robert Millan  <rmh@aybabtu.com>
3624         * util/grub-probe.c (probe): Simplify partmap probing (with the
3625         assumption that the first word up to the underscore equals to
3626         the module name).
3628 2008-02-06  Christian Franke  <franke@computer.org>
3630         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3631         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3632         last block of a cpio or tar stream.
3633         Check for "TRAILER!!!" instead of any empty data
3634         block to detect last block of a cpio stream.
3635         (grub_cpio_dir): Fix constness of variable np.
3636         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3637         cpio or tar trailer is detected.  This fixes a crash
3638         on open of a non existing file.
3640 2008-02-05  Bean  <bean123ch@gmail.com>
3642         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3643         address of entry.
3644         (grub_multiboot_load_elf64): Likewise.
3645         (grub_multiboot): Initialize mbi structure.
3647         * util/grub-fstest.c: Don't include unused header file script.h.
3649         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3650         of file.
3651         (grub_fstest_SOURCES): Likewise.
3653 2008-02-05  Robert Millan  <rmh@aybabtu.com>
3655         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3656         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3657         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3658         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3660         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3661         (translation_table): Replace hardcoded values with macros
3662         provided by `<grub/term.h>'.
3664         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3665         (keyboard_map): Correct/add a few values, with macros provided
3666         by `<grub/term.h>'.
3667         (keyboard_map_shift): Zero values that don't differ from their
3668         `keyboard_map' equivalents.
3669         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
3670         Discard the second scan code that is always sent by Caps lock.
3671         Only use `keyboard_map_shift' when it provides a non-zero value,
3672         otherwise fallback to `keyboard_map'.
3674 2008-02-04  Bean  <bean123ch@gmail.com>
3676         * Makefile.in (enable_grub_fstest): New variable.
3678         * conf/common.rmk (grub_fstest_init.lst): New rule.
3679         (grub_fstest_init.h): Likewise.
3680         (grub_fstest_init.c): Likewise.
3681         (util/grub-fstest.c_DEPENDENCIES): New variable.
3682         (grub_fstest_SOURCES): Likewise.
3684         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
3686         * util/grub-fstest.c: New file.
3688 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
3690         Make grub-setup handle a separate root device.
3692         * util/i386/pc/grub-setup.c (setup): Always open the root device,
3693         so that the root device can be compared with the destination
3694         device.
3695         When embedding the core image, if the root and destination devices
3696         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
3697         0xFF.
3698         When not embedding, set ROOT_DRIVE to 0xFF.
3700 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
3702         Add support for having a grub directory in a different drive. This
3703         is still only the data handling part.
3705         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
3706         (codestart): Save %dh in GRUB_ROOT_DRIVE.
3707         (grub_root_drive): New variable.
3709         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
3710         instead of GRUB_BOOT_DRIVE to construct a device name. Set
3711         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
3712         as it was.
3714         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
3716         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
3717         macro.
3718         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
3720         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
3721         is bogus, because PXE booting does not specify any drive
3722         correctly.
3724         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
3725         am not sure if this is really correct.
3727         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
3728         is always identical to the boot drive when booting from a CD.
3730         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
3731         longer.
3732         (root_drive): New variable.
3733         (real_start): Unconditionally set %dh to ROOT_DRIVE.
3734         (setup_sectors): Push %dx right after popping it, because %dh will
3735         be modified later.
3736         (copy_buffer): Restore %dx.
3738 2008-02-03  Robert Millan  <rmh@aybabtu.com>
3740         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
3741         use `cdboot.img' for cdrom images.
3743 2008-02-03  Robert Millan  <rmh@aybabtu.com>
3745         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
3746         only setup gfxterm when `font' command has succeeded.
3748 2008-02-03  Robert Millan  <rmh@aybabtu.com>
3750         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
3751         (grub_rescue_cmd_multiboot_loader)
3752         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
3754 2008-02-03  Pavel Roskin  <proski@gnu.org>
3756         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
3757         %edx and %esi from stack only after grub_gate_a20() is called.
3758         grub_gate_a20() clobbers %edx.
3760 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
3762         * configure.ac (AC_INIT): Bumped to 1.96.
3764         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
3765         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
3766         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
3767         video/readers/png.c.
3769 2008-02-03  Bean  <bean123ch@gmail.com>
3771         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
3772         (cdboot_img_SOURCES): New variable.
3773         (cdboot_img_ASFLAGS): New variable.
3774         (cdboot_img_LDFLAGS): New variable.
3776         * boot/i386/pc/cdboot.S: New file.
3778         * disk/i386/pc/biosdisk.c (cd_start): New variable.
3779         (cd_count): Likewise.
3780         (grub_biosdisk_get_drive): Add support for cd device.
3781         (grub_biosdisk_call_hook): Likewise.
3782         (grub_biosdisk_iterate): Likewise.
3783         (grub_biosdisk_open): Likewise.
3784         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
3785         (grub_biosdisk_rw): Support reading from cd device.
3786         (GRUB_MOD_INIT): Iterate cd devices.
3788         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
3789         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
3790         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
3792         * kern/i386/pc/init.c (make_install_device): Check for cd device.
3794 2008-02-02  Robert Millan  <rmh@aybabtu.com>
3796         * commands/read.c: New file.
3797         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
3798         (read_mod_SOURCES): New variable.
3799         (read_mod_CFLAGS): Likewise.
3800         (read_mod_LDFLAGS): Likewise.
3802 2008-02-02  Robert Millan  <rmh@aybabtu.com>
3804         * normal/main.c (grub_normal_execute): Check for `menu->size' when
3805         determining whether menu has to be displayed.
3807 2008-02-02  Marco Gerards  <marco@gnu.org>
3809         * bus/pci.c: New file.
3811         * include/grub/pci.h: Likewise.
3813         * include/grub/i386/pc/pci.h: Likewise.
3815         * commands/lspci.c: Likewise.
3817         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
3818         `lspci.mod'.
3819         (pci_mod_SOURCES): New variable.
3820         (pci_mod_CFLAGS): Likewise.
3821         (pci_mod_LDFLAGS): Likewise.
3822         (lspci_mod_SOURCES): Likewise.
3823         (lspci_mod_CFLAGS): Likewise.
3824         (lspci_mod_LDFLAGS): Likewise.
3826 2008-02-02  Bean  <bean123ch@gmail.com>
3828         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
3829         (grub_ufs_get_file_block): Fix indirect block calculation problem.
3831         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
3832         (grub_xfs_btree_node): New structure.
3833         (grub_xfs_btree_root): New structure.
3834         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
3835         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
3836         (GRUB_XFS_EXTENT_BLOCK): Likewise.
3837         (GRUB_XFS_EXTENT_SIZE): Likewise.
3838         (grub_xfs_read_block): Support btree format type.
3839         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
3840         Use directory block as basic unit.
3842         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
3844         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
3845         __attribute__ ((__regparm__ (1))).
3847 2008-02-01  Robert Millan  <rmh@aybabtu.com>
3849         Correct a mistake in previous commit.
3851         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
3852         top.
3853         (normal/command.c_DEPENDENCIES): New variable.
3855 2008-02-01  Robert Millan  <rmh@aybabtu.com>
3857         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
3858         top.
3859         (normal/command.c_DEPENDENCIES): New variable.
3860         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
3861         * conf/i386-ieee1275.rmk: Likewise.
3862         * conf/i386-linuxbios.rmk: Likewise.
3863         * conf/i386-pc.rmk: Likewise.
3864         * conf/sparc64-ieee1275.rmk: Likewise.
3865         * conf/powerpc-ieee1275.rmk: Likewise.
3866         (grub_emu_SOURCES): Add `fs/fshelp.c'.
3868         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
3870 2008-02-01  Robert Millan  <rmh@aybabtu.com>
3872         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
3873         call at beginning of function.
3875 2008-01-31  Pavel Roskin  <proski@gnu.org>
3877         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
3878         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
3879         (grub_mkrescue_SOURCES): Likewise.
3880         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
3882 2008-01-30  Robert Millan  <rmh@aybabtu.com>
3884         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
3885         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
3886         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
3887         (grub_probe_SOURCES): ... to here.
3889         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
3890         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
3891         * conf/i386-ieee1275.rmk: Likewise.
3892         * conf/i386-linuxbios.rmk: Likewise.
3893         * conf/powerpc-ieee1275.rmk: Likewise.
3895 2008-01-30  Tristan Gingold  <gingold@free.fr>
3897         * kern/rescue.c: Silently accept empty lines.
3899 2008-01-29  Bean  <bean123ch@gmail.com>
3901         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
3902         (real_code_2): Code cleanup and change comment style.
3903         (move_memory): Avoid using 32-bit address mode.
3905 2008-01-29  Bean  <bean123ch@gmail.com>
3907         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
3908         (png_mod_SOURCES): New variable.
3909         (png_mod_CFLAGS): Likewise.
3910         (png_mod_LDFLAGS): Likewise.
3912         * video/readers/png.c: New file.
3914 2008-01-28  Robert Millan  <rmh@aybabtu.com>
3916         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
3917         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
3918         `ifndef GRUB_MOD_GAP' hack.
3919         * util/elf/grub-mkimage.c (add_segments): Likewise.
3921 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3923         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
3924         `GRUB_MOD_GAP' for platforms in which it's not defined.
3925         * util/elf/grub-mkimage.c (add_segments): Likewise.
3927 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3929         Get grub-emu to build again (including parallel builds).
3931         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
3932         Split into ...
3933         (util/grub-emu.c_DEPENDENCIES): ... this, ...
3934         (normal/execute.c_DEPENDENCIES): ... this, ...
3935         (grub-emu_DEPENDENCIES): ... and this.
3937         * conf/i386-efi.rmk: Likewise.
3938         * conf/i386-linuxbios.rmk: Likewise.
3939         * conf/i386-ieee1275.rmk: Likewise.
3940         * conf/powerpc-ieee1275.rmk: Likewise.
3941         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
3943 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3945         * NEWS: Add a few items.
3947 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3949         Fix parallel builds with grub-emu.  Based on earlier commit for
3950         grub-probe and grub-setup.
3952         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3953         (util/grub-emu.c_DEPENDENCIES): ... this.
3954         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3955         (util/grub-emu.c_DEPENDENCIES): ... this.
3956         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3957         (util/grub-emu.c_DEPENDENCIES): ... this.
3958         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3959         (util/grub-emu.c_DEPENDENCIES): ... this.
3960         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3961         (util/grub-emu.c_DEPENDENCIES): ... this.
3963 2008-01-27  Pavel Roskin  <proski@gnu.org>
3965         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
3966         to create a gap between _end and the modules added to the image
3967         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
3968         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
3969         * util/elf/grub-mkimage.c (add_segments): Likewise.
3971 2008-01-26  Pavel Roskin  <proski@gnu.org>
3973         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
3974         just return an error.
3976 2008-01-26  Bean  <bean123ch@gmail.com>
3978         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
3979         (grub_reiserfs_get_item): Save offset of the next item.
3980         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
3982 2008-01-25  Robert Millan  <rmh@aybabtu.com>
3984         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
3985         make all filesystem sources appear together (possibly fixing omissions
3986         while at it).
3987         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3988         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3989         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3990         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3992         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
3993         add `kern/file.c'.
3994         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
3995         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
3996         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
3997         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
3999         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4000         (probe): Add a sanity check to make sure of our ability to read
4001         requested files when probing for filesystem type.
4003         * genmk.rb: Update copyright year (2007).
4005         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4006         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4007         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4008         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4009         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4010         : Remove function prototypes.
4012 2008-01-25  Robert Millan  <rmh@aybabtu.com>
4014         Revert my previous commits (based on wrong assumption of how grub_errno
4015         works).
4017         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4018         * kern/file.c (grub_file_open): Likewise.
4020 2008-01-24  Pavel Roskin  <proski@gnu.org>
4022         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4023         that hang if GRUB tries to setup colors.
4024         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4025         colors for firmwares that don't support it.
4026         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4027         Recognize Open Hack'Ware, set flags to work around its
4028         limitations.
4030 2008-01-24  Robert Millan  <rmh@aybabtu.com>
4032         * kern/file.c (grub_file_open): Do not account previous failures of
4033         unrelated functions when grub_errno is checked for.
4034         Reported by Oleg Strikov.
4036 2008-01-24  Bean  <bean123ch@gmail.com>
4038         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4039         (grub_ufs_sblock): New member volume name.
4040         (grub_ufs_find_file): Fix string copy bug.
4041         (grub_ufs_label): Implement this function properly.
4043         * fs/hfs.c (grub_hfs_cnid_type): New enum.
4044         (grub_hfs_iterate_records): Use the correct file number for extents
4045         and catalog file. Fix problem in next index calculation.
4046         (grub_hfs_find_node): Replace recursive function call with loop.
4047         (grub_hfs_iterate_dir): Replace recursive function call with loop.
4049 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4051         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4052         `<grub/symbol.h>' and `<grub/multiboot.h>'.
4053         (grub_multiboot2_real_boot): New function prototype.
4055         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4056         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4058         * kern/i386/ieee1275/init.c (grub_os_area_addr)
4059         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4061 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4063         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4064         #ifdef'ed out grub_printf().
4066 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4068         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4069         grub_dprintf calls, since they make "debug=all" mode unusable.
4070         (grub_console_checkkey): Likewise.
4072 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4074         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4075         `term/i386/pc/at_keyboard.c'.
4076         (pkglib_MODULES): Add `serial.mod'.
4077         (serial_mod_SOURCES): New variable.
4078         (serial_mod_CFLAGS): Likewise.
4079         (serial_mod_LDFLAGS): Likewise.
4081         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
4082         `<grub/powerpc/ieee1275/console.h>'.
4083         (grub_keyboard_controller_init): New function prototype.
4084         (grub_console_checkkey): Likewise.
4085         (grub_console_getkey): Likewise.
4087         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4088         keyboard on i386.
4090         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4091         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4093 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4095         * kern/i386/pc/init.c (make_install_device): When memdisk image is
4096         present, "(memdisk)/boot/grub" becomes the default prefix.
4098         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4099         a memdisk tarball with all the modules.  Add --overlay=DIR option that
4100         allows users to overlay additional files into the image.
4102 2008-01-23  Robert Millan  <rmh@aybabtu.com>
4104         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4105         and `machine/memory.h'.
4106         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4107         (_multiboot_mod_SOURCES): New variable.
4108         (_multiboot_mod_CFLAGS): Likewise.
4109         (_multiboot_mod_LDFLAGS): Likewise.
4110         (multiboot_mod_SOURCES): Likewise.
4111         (multiboot_mod_CFLAGS): Likewise.
4112         (multiboot_mod_LDFLAGS): Likewise.
4114         * include/grub/i386/ieee1275/loader.h: New file.
4116         * include/grub/i386/ieee1275/machine.h: Likewise.
4118         * include/grub/i386/ieee1275/memory.h: Likewise.
4120         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4121         variable declaration.
4122         (grub_os_area_size): Likewise.
4124         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4125         (grub_lower_mem, grub_upper_mem): New variables.
4126         (grub_stop_floppy): New function (just to make
4127         grub_multiboot2_real_boot() happy).
4129         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4130         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4131         (grub_stop): New function.
4132         Include `"../realmode.S"' and `"../loader.S"'.
4134         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4135         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4137         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4138         rely on grub_multiboot2_real_boot() for final boot.
4140 2008-01-22  Robert Millan  <rmh@aybabtu.com>
4142         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4143         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4144         device that doesn't look like an SD card.
4145         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4146         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4147         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4148         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4149         found.
4151 2008-01-22  Robert Millan  <rmh@aybabtu.com>
4153         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4154         avoid claiming over our own code.
4156 2008-01-22  Bean  <bean123ch@gmail.com>
4158         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4159         (jpeg_mod_SOURCES): New variable.
4160         (jpeg_mod_CFLAGS): Likewise.
4161         (jpeg_mod_LDFLAGS): Likewise.
4163         * video/readers/jpeg.c : New file.
4165 2008-01-22  Bean  <bean123ch@gmail.com>
4167         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4168         there are no more items.
4170 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4172         * kern/mm.c (grub_mm_init_region): Improve debug message.
4174 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4176         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4177         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4178         address.
4179         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4180         a C macro.
4181         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4182         Indicates start of upper memory.
4183         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4184         (generate_image): Abort when image size is big enough to corrupt
4185         upper memory.
4187         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4188         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4189         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4190         instead of hardcoding 0xA0000.
4191         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4192         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4193         instead of hardcoding 0xA0000.
4195 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4197         * disk/memdisk.c (memdisk_size): New variable.
4198         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4199         `memdisk_size'.
4200         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
4201         image to dynamic memory.
4202         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4203         `memdisk_size'.  Free memdisk block.
4205 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4207         Fix detection of very small filesystems (like tar).
4209         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4210         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4211         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4212         a problem with this disk).
4214 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4216         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4217         on grub_biosdisk_rw_standard() error.
4219 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4221         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4222         recent changes.
4223         * kern/elf.c: Likewise.
4224         * kern/ieee1275/ieee1275.c: Likewise.
4225         * kern/powerpc/ieee1275/openfw.c: Likewise.
4226         * term/ieee1275/ofconsole.c: Likewise.
4228 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4230         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4232         * include/grub/kernel.h (grub_arch_memdisk_addr)
4233         (grub_arch_memdisk_size): Moved from here ...
4235         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4236         (grub_arch_memdisk_size): ... to here.
4238 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4240         Mostly based on bugfix from Bean.
4242         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4243         attribute with hook() parameter.
4244         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4245         declaration.
4246         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4247         attribute with hook() parameter.
4248         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4249         declaration.
4251 2008-01-21  Robert Millan  <rmh@aybabtu.com>
4253         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4254         (pkglib_MODULES): Add `memdisk.mod'.
4255         (memdisk_mod_SOURCES): New variable.
4256         (memdisk_mod_CFLAGS): Likewise.
4257         (memdisk_mod_LDFLAGS): Likewise.
4259         * disk/memdisk.c: New file.
4261         * include/grub/disk.h (grub_disk_dev_id): Add
4262         `GRUB_DISK_DEVICE_MEMDISK_ID'.
4264         * include/grub/i386/pc/kernel.h
4265         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4266         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4267         (grub_kernel_image_size): New variable declaration.
4268         (grub_total_module_size): Likewise.
4269         (grub_memdisk_image_size): Likewise.
4271         * include/grub/i386/pc/memory.h
4272         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4274         * include/grub/kernel.h: Include `<grub/symbol.h>'.
4275         (grub_arch_memdisk_addr): New variable declaration.
4276         (grub_arch_memdisk_size): Likewise.
4278         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4279         (grub_arch_memdisk_size): Likewise.
4281         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4282         (codestart): Replace hardcoded `0x100000' with
4283         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4285         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4286         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
4287         not NULL, append the contents of the file it refers to, at the end of
4288         the compressed kernel image.  Initialize `grub_memdisk_image_size'
4289         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4290         (options): Add "memdisk"|'m' option.
4291         (main): Parse --memdisk|-m option, and pass user-provided path as
4292         parameter to generate_image().
4294 2008-01-20  Robert Millan  <rmh@aybabtu.com>
4296         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4297         grub_dprintf() calls from here ...
4298         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4300 2008-01-20  Robert Millan  <rmh@aybabtu.com>
4302         Fix detection of "real mode" when /options/real-mode? doesn't exist.
4304         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4305         declaration.
4306         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4307         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4308         `GRUB_IEEE1275_FLAG_REAL_MODE'.
4309         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4310         property).
4311         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4312         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4314 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4316         Get rid of confusing function (superseded by
4317         `grub_ieee1275_get_integer_property')
4318         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4319         prototype.
4320         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4321         function.
4322         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4323         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4324         in native endianness from grub_ieee1275_get_integer_property().
4326 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4328         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4329         command after "shut-down", since implementations differ on which
4330         the command for halt is.
4332 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4334         * include/grub/i386/linuxbios/console.h: Add header protection.
4335         (grub_keyboard_controller_init): New function prototype.
4336         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4337         (KEYBOARD_COMMAND_READ): Likewise.
4338         (KEYBOARD_COMMAND_WRITE): Likewise.
4339         (KEYBOARD_SCANCODE_SET1): Likewise.
4340         (grub_keyboard_controller_write): New function.
4341         (grub_keyboard_controller_read): Likewise.
4342         (grub_keyboard_controller_init): Likewise.
4344         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4345         (grub_console_init): On coreboot/LinuxBIOS, call
4346         grub_keyboard_controller_init().
4348 2008-01-19  Robert Millan  <rmh@aybabtu.com>
4350         PowerPC changes provided by Pavel Roskin.
4352         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4353         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4354         don't rely on cmain() doing it.
4355         * kern/i386/ieee1275/startup.S (_start): Store %eax in
4356         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4358 2008-01-16  Robert Millan  <rmh@aybabtu.com>
4360         * include/grub/i386/linuxbios/memory.h
4361         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4362         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4363         receive `table_header' as argument.  Instead, probe for it in the
4364         known memory ranges where it can be present.
4365         (grub_available_iterate): Do not pass a fixed `table_header' address
4366         to grub_linuxbios_table_iterate().
4368 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4370         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4371         * conf/i386-ieee1275.rmk: New file.
4372         * include/grub/i386/ieee1275/console.h: Likewise.
4373         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4374         * include/grub/i386/ieee1275/kernel.h: Likewise.
4375         * include/grub/i386/ieee1275/time.h: Likewise.
4376         * kern/i386/ieee1275/init.c: Likewise.
4377         * kern/i386/ieee1275/startup.S: Likewise.
4379 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4381         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4382         when pointers are 32-bit (but still do set it to one when they are
4383         64-bit).
4385 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4387         * include/grub/ieee1275/ieee1275.h
4388         (grub_ieee1275_get_integer_property): New function prototype.
4390         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4391         (grub_ieee1275_get_integer_property): New function.  Wraps around
4392         grub_ieee1275_get_property() to handle endianness.
4394         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4395         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4396         where appropriate.
4397         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4398         (grub_map): Likewise.
4399         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4401 2008-01-15  Bean  <bean123ch@gmail.com>
4403         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4404         (grub_script_execute_cmdline): Reset grub_errno.
4406         * normal/main.c (read_config_file): Reset grub_errno.
4408         * normal/parse.y (script_init): New.
4409         (script): Move function and menuentry here.
4410         (delimiter): New.
4411         (command): Add delimiter at the end of command.
4412         (commands): Adjust to match the new command.
4413         (commandblock): Remove grub_script_lexer_record_start.
4414         (menuentry): Add grub_script_lexer_record_start, use the new commands.
4415         (if): Use the new commands.
4417         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4419 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4421         * normal/menu.c (run_menu): Move timeout message from here ...
4422         (print_timeout): ... to here.
4423         (run_menu): Use print_timeout() once during initial draw to print
4424         the whole message, and again in every clock tick to update only
4425         the number of seconds.
4427 2008-01-15  Robert Millan  <rmh@aybabtu.com>
4429         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4430         actual size of `available' from grub_ieee1275_get_property(), and
4431         restrict parsing to that bound.
4433 2008-01-15  Christian Franke  <franke@computer.org>
4435         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4436         (argp_program_version): Remove variable.
4437         (argp_program_bug_address): Likewise.
4438         (options): Convert from struct argp_option to struct option.
4439         (struct arguments): Remove.
4440         (parse_opt): Remove.
4441         (usage): New function.
4442         (main): Replace struct args members by simple variables.
4443         Replace argp_parse() by getopt_long().
4444         Add switch to evaluate options.
4445         Add missing "(...)" around root_dev in prefix string.
4447 2008-01-14  Robert Millan  <rmh@aybabtu.com>
4449         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4450         for grub_ieee1275_exit(), in order to improve portability.
4452 2008-01-14  Robert Millan  <rmh@aybabtu.com>
4454         * util/grub.d/10_linux.in (prefix): Define.
4455         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
4457 2008-01-13  Pavel Roskin  <proski@gnu.org>
4459         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4460         grub_errno if no errors have been detected.
4462 2008-01-12  Robert Millan  <rmh@aybabtu.com>
4464         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4465         (grub_util_get_dev_abstraction): New function prototype.
4467         * util/getroot.c: Include `<grub/util/getroot.h>'
4468         (grub_util_get_grub_dev): Move detection of abstraction type to ...
4469         (grub_util_get_dev_abstraction): ... here (new function).
4471         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
4472         `PRINT_ABSTRACTION'.
4473         (probe): Probe for abstraction type when requested.
4474         (main): Understand `--target=abstraction'.
4476         * util/i386/efi/grub-install.in: Add abstraction module to core
4477         image when it is found to be necessary.
4478         * util/i386/pc/grub-install.in: Likewise.
4479         * util/powerpc/ieee1275/grub-install.in: Likewise.
4481         * util/update-grub_lib.in (font_path): Return system path without
4482         converting to GRUB path.
4483         * util/update-grub.in: Convert system path returned by font_path()
4484         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
4485         abstraction module is needed for loading fonts (if any).  Export
4486         that as `GRUB_PRELOAD_MODULES'.
4487         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4488         insmod commands).
4490 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
4492         Remove some unused code from reiserfs.
4494         * fs/reiserfs.c (struct grub_reiserfs_key)
4495         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4496         (struct grub_reiserfs_node_body): Removed.
4497         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4498         Likewise.
4499         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4500         Likewise.
4501         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4502         Likewise.
4503         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4504         Likewise.
4505         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4506         Likewise.
4507         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4508         Likewise.
4509         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4510         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4511         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4513 2008-01-10  Robert Millan  <rmh@aybabtu.com>
4515         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4516         Determines if a file is garbage left by packaging systems, etc.
4517         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4518         for processing /etc/grub.d scripts.
4519         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4520         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
4521         as a condition for processing Linux images.
4523 2008-01-10  Pavel Roskin  <proski@gnu.org>
4525         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
4526         to compile reiserfs.c on PowerPC.
4528 2008-01-10  Robert Millan  <rmh@aybabtu.com>
4530         * kern/device.c (grub_device_iterate): Do not abort device iteration
4531         when one of the devices cannot be opened.
4532         * kern/disk.c (grub_disk_open): Do not account previous failures of
4533         unrelated functions when grub_errno is checked for.
4535 2008-01-08  Robert Millan  <rmh@aybabtu.com>
4537         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4538         `! grub_linux_is_bzimage', change order of address comparison to make
4539         it more intuitive, and improve "too big zImage" error message.
4541 2008-01-08  Robert Millan  <rmh@aybabtu.com>
4543         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
4544         `$(update-grub_DATA)'.
4545         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
4546         targets.
4548 2008-01-07  Robert Millan  <rmh@aybabtu.com>
4550         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
4551         which instruction is modified by grub-setup during installation
4552         (since it wasn't obvious by only looking at this file).
4554 2008-01-07  Robert Millan  <rmh@aybabtu.com>
4556         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
4557         listing actual TODO items.
4559 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4561         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
4562         correctly.
4563         (grub_reiserfs_get_key_offset): Likewise.
4564         (grub_reiserfs_set_key_offset): Likewise.
4565         (grub_reiserfs_set_key_type): Likewise.
4566         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
4568         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
4569         better to remove the bitfield version completely.
4571 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4573         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
4574         allocated from the heap, due to the fshelp implementation.
4575         (grub_reiserfs_dir): Free NODE, due to the same reason.
4577 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
4579         Mostly from Vincent Pelletier:
4581         * fs/reiserfs.c: New file.
4583         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
4584         (reiserfs_mod_SOURCES): New variable.
4585         (reiserfs_mod_CFLAGS): Likewise.
4586         (reiserfs_mod_LDFLAGS): Likewise.
4588         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
4589         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
4590         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
4591         normal/color.c.
4593 2008-01-06  Robert Millan  <rmh@aybabtu.com>
4595         * normal/color.c: Remove `<grub/env.h>'.
4597 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
4599         * include/grub/normal.h: Include <grub/env.h>.
4601 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4603         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4604         usage example with `(hd0,1)'.
4605         Reported by Samuel Thibault.
4607 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4609         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4610         (grub_linux_boot_zimage): Rename to ...
4611         (grub_linux_boot): ... this.
4612         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4613         (grub_linux_boot_zimage): Conditionalize zImage copy.
4615         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4616         (grub_linux_boot_bzimage): Remove prototype.
4617         (grub_linux_boot_zimage): Rename to ...
4618         (grub_linux_boot): ... this.
4620         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4621         (grub_linux_boot): Remove function.
4623 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4625         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4626         (grub_env_write_color_highlight): Likewise.
4627         (grub_wait_after_message): Likewise.
4629         * normal/color.c: New file.
4631         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4632         (normal_mod_DEPENDENCIES): Likewise.
4634         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4635         (normal_mod_DEPENDENCIES): Likewise.
4637         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4638         (normal_mod_DEPENDENCIES): Likewise.
4640         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4641         (normal_mod_DEPENDENCIES): Likewise.
4643         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4644         for waiting after a message is printed.
4645         * normal/main.c (read_config_file): Likewise.
4646         (grub_normal_init): Register grub_env_write_color_normal() and
4647         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
4648         `color_highlight' variables as global.
4650         * normal/menu.c (grub_wait_after_message): New function.
4651         (grub_color_menu_normal): New variable.  Replaces ...
4652         (GRUB_COLOR_MENU_NORMAL): ... this macro.
4653         (grub_color_menu_highlight): New variable.  Replaces ...
4654         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4655         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4656         `GRUB_TERM_COLOR_STANDARD'.
4657         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
4658         `normal_code' and `highlight_code' to `old_color_normal' and
4659         `old_color_highlight', respectively.
4660         (grub_menu_init_page): Update colors when drawing the menu, based on
4661         `menu_color_normal' and `menu_color_highlight' variables.
4662         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4663         a message is printed.
4665 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4667         * kern/env.c (grub_env_context_open): Propagate hooks for global
4668         variables to new context.
4670         * kern/main.c (grub_set_root_dev): Export `root' variable.
4672 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4674         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
4675         discs unconditionally, since udev and others have options to provide
4676         them.
4678 2008-01-05  Robert Millan  <rmh@aybabtu.com>
4680         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
4682 2008-01-04  Christian Franke  <franke@computer.org>
4684         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
4685         of eisa_mmap.
4687 2008-01-03  Pavel Roskin  <proski@gnu.org>
4689         * kern/i386/linuxbios/init.c: Put "void" to all function
4690         declarations with no arguments.
4691         * kern/powerpc/ieee1275/init.c: Likewise.
4692         * term/i386/pc/at_keyboard.c: Likewise.
4693         * term/i386/pc/vga_text.c: Likewise.
4694         * util/grub-mkdevicemap.c: Likewise.
4696 2008-01-02  Robert Millan  <rmh@aybabtu.com>
4698         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
4699         message when loaded image is out of bounds.
4700         (grub_multiboot_load_elf64): Likewise.
4702 2008-01-02  Pavel Roskin  <proski@gnu.org>
4704         * util/grub.d/10_linux.in: Try version without ".old" when
4705         looking for initrd.  It's better to use initrd from the newer
4706         kernel of the same version than no initrd at all.
4708 2008-01-01  Robert Millan  <rmh@aybabtu.com>
4710         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
4712 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
4714         * include/grub/video.h: Added grub_video_unmap_color and
4715         grub_video_get_active_render_target.
4716         (grub_video_adapter): Added unmap_color and get_active_render_target.
4718         * video/video.c: Added grub_video_unmap_color and
4719         grub_video_get_active_render_target.
4720         (grub_video_get_info): Changed method to accept NULL pointer as an
4721         argument to allow detection of active video adapter.
4723         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
4724         grub_video_vbe_unmap_color_int.
4725         Added grub_video_vbe_unmap_color and
4726         grub_video_vbe_get_active_render_target.
4727         (grub_video_vbe_adapter): Added unmap_color and
4728         get_active_render_target.
4730         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
4731         with grub_video_vbe_unmap_color_int.
4733         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
4734         (DEFAULT_NORMAL_COLOR): Likewise.
4735         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
4736         (DEFAULT_FG_COLOR): Removed.
4737         (DEFAULT_BG_COLOR): Likewise.
4738         (DEFAULT_CURSOR_COLOR): Changed value.
4739         (grub_virtual_screen): Added standard_color_setting,
4740         normal_color_setting, highlight_color_setting and term_color.
4741         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
4742         (bitmap_width): Added.
4743         (bitmap_height): Likewise.
4744         (bitmap): Likewise.
4745         (set_term_color): Likewise.
4746         (grub_virtual_screen_setup): Changed to use new terminal coloring
4747         settings.
4748         (grub_gfxterm_init): Added init for bitmap.
4749         (grub_gfxterm_fini): Added destroy for bitmap.
4750         (redraw_screen_rect): Updated to use background bitmap and new
4751         terminal coloring.
4752         (scroll_up): Added optimization for case when there is no bitmap.
4753         (grub_gfxterm_cls): Fixed to use correct background color.
4754         (grub_virtual_screen_setcolorstate): Changed to use new terminal
4755         coloring.
4756         (grub_virtual_screen_setcolor): Likewise.
4757         (grub_virtual_screen_getcolor): Added.
4758         (grub_gfxterm_background_image_cmd): Likewise.
4759         (grub_video_term): Added setcolor and getcolor.
4760         (MOD_INIT): Added registration of background_image command.
4761         (MOD_TERM): Added unregistration for background_image command.
4763 2007-12-30  Pavel Roskin  <proski@gnu.org>
4765         * loader/multiboot_loader.c: Fix multiboot command
4766         unregistration.  Fix all typos in the word "multiboot".
4768 2007-12-29  Pavel Roskin  <proski@gnu.org>
4770         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
4771         support for initrd names used in Fedora.
4773 2007-12-26  Bean  <bean123ch@gmail.com>
4775         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
4776         (cpio_mod_SOURCES): New variable.
4777         (cpio_mod_CFLAGS): Likewise.
4778         (cpio_mod_LDFLAGS): Likewise.
4780         * fs/cpio.c: New file.
4782         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
4784         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4786         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4788         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4790 2007-12-25  Robert Millan  <rmh@aybabtu.com>
4792         * include/grub/term.h (struct grub_term): Add `getcolor' function.
4793         (grub_getcolor): New function.
4795         * kern/term.c (grub_getcolor): New function.
4796         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
4797         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
4798         (print_entry): Set normal and highlight colors to
4799         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
4800         respectively, before printing and restore them to old
4801         values afterwards.
4802         (grub_menu_init_page): Likewise.  Fill an additional colored space
4803         that would otherwise be left blank.
4805         * term/efi/console.c (grub_console_getcolor): New function.
4806         (struct grub_console_term.getcolor): New variable.
4807         * term/i386/pc/console.c (grub_console_getcolor): New function.
4808         (struct grub_console_term.getcolor): New variable.
4809         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
4810         (struct grub_console_term.getcolor): New variable.
4812         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
4813         (struct grub_console_term.setcolor): Remove variable.
4814         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
4815         (struct grub_console_term.setcolor): Remove variable.
4816         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
4817         (struct grub_console_term.setcolor): Remove variable.
4818         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
4819         (struct grub_console_term.setcolor): Remove variable.
4821 2007-12-25  Robert Millan  <rmh@aybabtu.com>
4823         * configure.ac: Search for possible unifont.hex locations, and
4824         define UNIFONT_HEX if found.
4826         * Makefile.in (UNIFONT_HEX): Define variable.
4827         (DATA): Rename to ...
4828         (PKGLIB): ... this.  Update all users.
4829         (PKGDATA): New variable.
4830         (pkgdata_IMAGES): Rename to ...
4831         (pkglib_IMAGES): ... this. Update all users.
4832         (pkgdata_MODULES): Rename to ...
4833         (pkglib_MODULES): ... this. Update all users.
4834         (pkgdata_PROGRAMS): Rename to ...
4835         (pkglib_PROGRAMS): ... this. Update all users.
4836         (pkgdata_DATA): Rename to ...
4837         (pkglib_DATA): ... this. Update all users.
4838         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
4839         (unicode.pff, ascii.pff): New rules.
4840         (all-local): Add `$(PKGDATA)' dependency.
4841         (install-local): Process `$(PKGDATA)'.
4843         * util/update-grub_lib.in (font_path): Search for *.pff files in
4844         a few more locations, including `${pkgdata}'.
4846 2007-12-23  Robert Millan  <rmh@aybabtu.com>
4848         Patch from Bean  <bean123ch@gmail.com>:
4849         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
4850         `size'.
4852 2007-12-21  Bean  <bean123ch@gmail.com>
4854         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
4855         (ntfscomp_mod_SOURCES): New variable.
4856         (ntfscomp_mod_CFLAGS): Likewise.
4857         (ntfscomp_mod_LDFLAGS): Likewise.
4859         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
4860         (grub_probe_SOURCES): Likewise.
4861         (grub_emu_SOURCES): Likewise.
4863         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4864         (grub_emu_SOURCES): Likewise.
4866         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4867         (grub_emu_SOURCES): Likewise.
4869         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4870         (grub_emu_SOURCES): Likewise.
4872         * fs/ntfs.c (grub_ntfscomp_func): New variable.
4873         (read_run_list): Renamed to grub_ntfs_read_run_list.
4874         (decomp_nextvcn): Moved to ntfscomp.c.
4875         (decomp_getch): Likewise.
4876         (decomp_get16): Likewise.
4877         (decomp_block): Likewise.
4878         (read_block): Likewise.
4879         (read_data): Partially moved to ntfscomp.c.
4880         (fixup): Change unsigned to grub_uint16_t.
4881         (read_mft): Change unsigned long to grub_uint32_t.
4882         (read_attr): Likewise.
4883         (read_data): Likewise.
4884         (read_run_data): Likewise.
4885         (read_run_list): Likewise.
4886         (read_mft): Likewise.
4888         * fs/ntfscomp.c: New file.
4890         * include/grub/ntfs.h: New file.
4892 2007-12-16  Robert Millan  <rmh@aybabtu.com>
4894         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
4895         IDE disk check, since Linux is known to support 20 IDE disks.
4896         Reported by Colin Watson.
4898 2007-12-15  Bean  <bean123ch@gmail.com>
4900         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
4901         (lnxboot_img_SOURCES): New variable.
4902         (lnxboot_img_ASFLAGS): Likewise.
4903         (lnxboot_img_LDFLAGS): Likewise.
4905         * boot/i386/pc/lnxboot.S: New file.
4907 2007-11-24  Pavel Roskin  <proski@gnu.org>
4909         * configure.ac: Test if '--build-id=none' is supported by the
4910         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
4911         objcopy to generate incorrect binary files (binutils
4912         2.17.50.0.18-1 as shipped by Fedora 8).
4913         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
4914         linking, so that build ID doesn't break the test.
4916 2007-11-24  Pavel Roskin  <proski@gnu.org>
4918         * include/grub/i386/time.h: use "void" in the argument list
4919         of grub_cpu_idle().
4920         * include/grub/powerpc/time.h: Likewise.
4921         * include/grub/sparc64/time.h: Likewise.
4923 2007-11-18  Christian Franke  <franke@computer.org>
4925         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
4926         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
4927         This fixes the problem that function keys did not work in grub-emu.
4929 2007-11-18  Christian Franke  <franke@computer.org>
4931         * disk/host.c (grub_host_open): Remove attribute unused from
4932         name parameter. Add check for "host". This fixes the problem
4933         that grub-emu does not find partitions.
4935 2007-11-18  Christian Franke  <franke@computer.org>
4937         * util/hostfs.c (is_dir): New function.
4938         (grub_hostfs_dir):  Handle missing dirent.d_type case.
4939         (grub_hostfs_read): Add missing fseek().
4940         (grub_hostfs_label): Clear label pointer.  This fixes a crash
4941         of grub-emu on "ls (host)".
4943 2007-11-18  Christian Franke  <franke@computer.org>
4945         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
4946         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
4947         to 64 bit boundary by default.
4949 2007-11-18  Bean  <bean123ch@gmail.com>
4951         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
4952         (hexdump_mod_SOURCES): New variable.
4953         (hexdump_mod_CFLAGS): Likewise.
4954         (hexdump_mod_LDFLAGS): Likewise.
4956         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4958         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4960         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4962         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4964         * include/grub/hexdump.h: New file.
4966         * commands/hexdump.c: New file.
4968 2007-11-10  Robert Millan  <rmh@aybabtu.com>
4970         * commands/i386/pc/play.c (beep_off): Switch order of arguments
4971         in grub_outb() calls.
4972         (beep_on): Likewise.
4974 2007-11-10  Christian Franke  <franke@computer.org>
4976         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
4977         (grub_menu_run): Likewise.
4979 2007-11-10  Robert Millan  <rmh@aybabtu.com>
4981         * include/grub/i386/efi/machine.h: New file.
4982         * include/grub/i386/linuxbios/machine.h: Likewise.
4983         * include/grub/i386/pc/machine.h: Likewise.
4984         * include/grub/powerpc/ieee1275/machine.h: Likewise.
4985         * include/grub/sparc64/ieee1275/machine.h: Likewise.
4987         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
4988         (serial_hw_io_addr): New variable.
4989         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
4990         instead of `(unsigned short *) 0x400'.
4992 2007-11-10  Bean  <bean123ch@gmail.com>
4994         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
4996 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
4998         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
4999         (vga_mod_SOURCES): Added.
5000         (vga_mod_CFLAGS): Likewise.
5001         (vga_mod_LDFLAGS): Likewise.
5003         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5004         grub_outb() calls.
5005         (set_map_mask): Likewise.
5006         (set_read_map): Likewise.
5007         (set_read_address): Likewise.
5008         (vga_font): Removed variable.
5009         (get_vga_glyph): Removed function.
5010         (invalidate_char): Likewise.
5011         (write_char): Changed to use grub_font_get_glyph() for font
5012         information.
5013         (grub_vga_putchar): Likewise.
5014         (grub_vga_getcharwidth): Likewise.
5016 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
5018         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5019         flags.
5020         (pxeboot_img_LDFLAGS): Likewise.
5021         (diskboot_img_LDFLAGS): Likewise.
5022         (kernel_img_LDFLAGS): Likewise.
5024 2007-11-06  Robert Millan  <rmh@aybabtu.com>
5026         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5027         in grub_outb() calls.
5028         (serial_hw_init): Likewise.
5030 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5032         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5033         spaces.  Skip non-regular files.
5035 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5037         * kern/disk.c (grub_disk_firmware_fini)
5038         (grub_disk_firmware_is_tainted): New variables.
5040         * include/grub/disk.h (grub_disk_firmware_fini)
5041         (grub_disk_firmware_is_tainted): Likewise.
5043         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5044         (grub_disk_biosdisk_fini): ... to here.
5045         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5046         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5047         is set.  Register grub_disk_biosdisk_fini() in
5048         `grub_disk_firmware_fini'.
5050         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5051         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5052         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5053         to finish existing firmware disk interface.
5055         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5056         (ata_mod_SOURCES): New variable.
5057         (ata_mod_CFLAGS): Likewise.
5058         (ata_mod_LDFLAGS): Likewise.
5060 2007-11-05  Robert Millan  <rmh@aybabtu.com>
5062         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
5063         (grub_ata_wait): Reimplement using grub_millisleep().
5065         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5066         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5068 2007-11-03  Marco Gerards  <marco@gnu.org>
5070         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5071         (CRTC_ADDR_PORT): New macro.
5072         (CRTC_DATA_PORT): Likewise.
5073         (CRTC_CURSOR): Likewise.
5074         (CRTC_CURSOR_ADDR_HIGH): Likewise.
5075         (CRTC_CURSOR_ADDR_LOW): Likewise.
5076         (update_cursor): New function.
5077         (grub_console_real_putchar): Call `update_cursor'.
5078         (grub_console_gotoxy): Likewise.
5079         (grub_console_cls): Set the default color when clearing the
5080         screen.
5081         (grub_console_setcursor): Implemented.
5083 2007-11-03  Marco Gerards  <marco@gnu.org>
5085         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5086         become activate.
5087         (grub_ata_pio_write): Likewise.
5089         (grub_atapi_identify): Wait after issuing an ATA command.
5090         (grub_atapi_packet): Likewise.
5091         (grub_ata_identify): Likewise.
5092         (grub_ata_readwrite): Likewise.
5094 2007-11-03  Marco Gerards  <marco@gnu.org>
5096         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5097         (grub_ata_pio_write): Likewise.
5098         (grub_ata_readwrite): Use `grub_error', instead of
5099         returning `grub_errno'.
5101 2007-11-03  Marco Gerards  <marco@gnu.org>
5103         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5104         grub_ata_pio_write once for every single sector, instead of for
5105         multiple sectors.
5107 2007-10-31  Robert Millan  <rmh@aybabtu.com>
5109         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5111         * conf/i386-linuxbios.rmk: New file.
5113         * kern/i386/pc/hardware.c: Likewise.
5114         * term/i386/pc/at_keyboard.c: Likewise.
5115         * term/i386/pc/vga_text.c: Likewise.
5117         * include/grub/i386/linuxbios/boot.h: Likewise.
5118         * include/grub/i386/linuxbios/console.h: Likewise.
5119         * include/grub/i386/linuxbios/init.h: Likewise.
5120         * include/grub/i386/linuxbios/kernel.h: Likewise.
5121         * include/grub/i386/linuxbios/loader.h: Likewise.
5122         * include/grub/i386/linuxbios/memory.h: Likewise.
5123         * include/grub/i386/linuxbios/serial.h: Likewise.
5124         * include/grub/i386/linuxbios/time.h: Likewise.
5126         * kern/i386/linuxbios/init.c: Likewise.
5127         * kern/i386/linuxbios/startup.S: Likewise.
5128         * kern/i386/linuxbios/table.c: Likewise.
5130 2007-10-31  Marco Gerards  <marco@gnu.org>
5132         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5133         (ata_mod_SOURCES): New variable.
5134         (ata_mod_CFLAGS): Likewise.
5135         (ata_mod_LDFLAGS): Likewise.
5137         * disk/ata.c: New file.
5139         * include/grub/disk.h (grub_disk_dev_id): Add
5140         `GRUB_DISK_DEV_ATA_ID'.
5142 2007-10-31  Robert Millan  <rmh@aybabtu.com>
5144         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5145         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5147         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5148         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5150         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5151         `<grub/types.h>'.
5153         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5155 2007-10-27  Robert Millan  <rmh@aybabtu.com>
5157         * include/grub/types.h (ULONG_MAX): Define macro.
5159 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5161         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
5162         `"../realmode.S"'.
5163         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
5165 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5167         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5168         (pkgdata_MODULES): Add `biosdisk.mod'.
5169         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5170         variables.
5172         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5173         (grub_biosdisk_init): Replace with ...
5174         (GRUB_MOD_INIT(biosdisk)): ... this.
5175         (grub_biosdisk_fini): Replace with ...
5176         (GRUB_MOD_FINI(biosdisk)): ... this.
5178         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5179         (grub_machine_init): Remove call to grub_biosdisk_init().
5180         (grub_machine_fini): Remove call to grub_machine_fini().
5182         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5184 2007-10-22  Robert Millan  <rmh@aybabtu.com>
5186         * include/grub/time.h: New file.
5187         * include/grub/i386/time.h: Likewise.
5188         * include/grub/powerpc/time.h: Likewise.
5189         * include/grub/sparc64/time.h: Likewise.
5191         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5192         instances to ...
5193         (KERNEL_MACHINE_TIME_HEADER): ... this.
5194         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5195         instances to ...
5196         (KERNEL_MACHINE_TIME_HEADER): ... this.
5197         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5198         instances to ...
5199         (KERNEL_MACHINE_TIME_HEADER): ... this.
5201         * kern/i386/efi/init.c: Include `<grub/time.h>'.
5202         (grub_millisleep): New function.
5203         * kern/i386/pc/init.c: Include `<grub/time.h>'.
5204         (grub_millisleep): New function.
5205         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5206         Remove `grub/machine/time.h' include.
5207         (grub_millisleep): New function.
5208         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5209         Remove `grub/machine/time.h' include.
5210         (grub_millisleep): New function.
5212         * include/grub/misc.h (grub_div_roundup): New function.
5214         * kern/misc.c: Include `<grub/time.h>'.
5215         (grub_millisleep_generic): New function.
5217         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5218         Add `time.h'.
5219         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5220         Add `time.h'.
5221         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5222         `machine/time.h'.  Add `time.h'.
5223         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5225 2007-10-21  Robert Millan  <rmh@aybabtu.com>
5227         * include/grub/misc.h (grub_max): New function.
5229 2007-10-21  Robert Millan  <rmh@aybabtu.com>
5231         * util/misc.c (grub_util_info): Call fflush() before returning.
5233 2007-10-20  Robert Millan  <rmh@aybabtu.com>
5235         * genmk.rb (Image): Copy `extra_flags' from here ...
5236         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
5238         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5239         to `argc' and `args' arguments.
5241 2007-10-17  Robert Millan  <rmh@aybabtu.com>
5243         * kern/i386/loader.S: New file.
5245         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5246         * kern/i386/loader.S (grub_linux_prot_size)... to here.
5247         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5248         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5249         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5250         * kern/i386/loader.S (grub_linux_real_addr)... to here.
5251         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5252         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5253         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5254         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5255         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5256         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5257         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5258         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5260         * kern/i386/realmode.S: New file.
5262         * kern/i386/pc/startup.S (protstack): Moved from here ...
5263         * kern/i386/realmode.S (protstack)... to here.
5264         * kern/i386/pc/startup.S (gdt): Moved from here ...
5265         * kern/i386/realmode.S (gdt)... to here.
5266         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5267         * kern/i386/realmode.S (prot_to_real)... to here.
5269         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5270         `kern/i386/realmode.S'.
5272 2007-10-17  Robert Millan  <rmh@aybabtu.com>
5274         * include/grub/i386/loader.h: New file.
5276         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5277         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5278         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5279         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5280         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5281         * include/grub/i386/loader.h (grub_linux_prot_size)
5282         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5283         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5284         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5285         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5287         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5289 2007-10-15  Robert Millan  <rmh@aybabtu.com>
5291         * normal/misc.c (grub_normal_print_device_info): Do not probe for
5292         filesystem when dev->disk is unset.
5293         Do probe for filesystem even when dev->disk->has_partitions is set.
5294         In case a filesystem is found, always report it.
5295         In case it isn't, if dev->disk->has_partitions is set, report that
5296         a partition table was found instead of reporting that no filesystem
5297         could be identified.
5299 2007-10-12  Robert Millan  <rmh@aybabtu.com>
5301         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5302         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5304         * include/grub/types.h (grub_host_to_target16): New macro.
5305         (grub_host_to_target32): Likewise.
5306         (grub_host_to_target64): Likewise.
5307         (grub_target_to_host16): Likewise.
5308         (grub_target_to_host32): Likewise.
5309         (grub_target_to_host64): Likewise.
5311         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5312         Renamed from to ...
5313         (GRUB_MOD_ALIGN): ...this.  Update all users.
5315         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5316         grub_host_to_target32.
5317         Replace grub_be_to_cpu32 with grub_target_to_host32.
5318         (load_modules): Likewise.
5319         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5320         Replace grub_be_to_cpu32 with grub_target_to_host32.
5321         Replace grub_cpu_to_be16 with grub_host_to_target16.
5322         Replace grub_cpu_to_be32 grub_host_to_target32.
5324 2007-10-12  Robert Millan  <rmh@aybabtu.com>
5326         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5327         * util/elf/grub-mkimage.c: ... here.
5329         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
5330         `util/powerpc/ieee1275/grub-mkimage.c'.
5332 2007-10-07  Robert Millan  <rmh@aybabtu.com>
5334         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5335         and make it easier to figure out.
5336         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5337         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5338         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5339         leave us with less than HEAP_MIN_SIZE total heap.
5340         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5342 2007-10-03  Robert Millan  <rmh@aybabtu.com>
5344         * include/grub/i386/io.h: New file.
5345         * commands/i386/pc/play.c (inb): Removed.
5346         (outb): Removed.
5347         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5348         with grub_outb().
5349         * term/i386/pc/serial.c  (inb): Removed.
5350         (outb): Removed.
5351         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5352         with grub_outb().
5353         * term/i386/pc/vga.c  (inb): Removed.
5354         (outb): Removed.
5355         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
5356         with grub_outb().
5358 2007-10-02  Robert Millan  <rmh@aybabtu.com>
5360         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5361         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5362         Reported by Marcin Kurek.
5364 2007-09-07  Robert Millan  <rmh@aybabtu.com>
5366         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5367         SmartFirmware version updates (as released by Sven Luther), and avoid
5368         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5369         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5370         known broken.
5372 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5374         From Hitoshi Ozeki:
5375         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5376         when merging two regions.
5378 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5380         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5381         * normal/completion.c (grub_normal_do_completion): Likewise.
5382         Reported by Hitoshi Ozeki.
5384 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
5386         Do not use devices at boot in chainloading.
5388         * loader/i386/pc/chainloader.c (boot_drive): New variable.
5389         (boot_part_addr): Likewise.
5390         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5391         with BOOT_DRIVE and BOOT_PART_ADDR.
5392         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5393         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5395 2007-08-29  Robert Millan  <rmh@aybabtu.com>
5397         Patch from Simon Peter <dn.tlp@gmx.net>:
5398         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5399         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5400         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
5401         util/i386/pc/grub-setup.c_DEPENDENCIES.
5402         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5403         util/grub-probe.c_DEPENDENCIES.
5404         * conf/powerpc-ieee1275.rmk: Likewise.
5406 2007-08-28  Robert Millan  <rmh@aybabtu.com>
5408         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
5409         to tell grub-mkdevicemap how to name devices.
5410         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5411         feature).
5413         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5414         util/i386/get_disk_name.c.
5415         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5416         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5417         util/ieee1275/get_disk_name.c.
5419         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5421         * DISTLIST: Add util/i386/get_disk_name.c and
5422         util/ieee1275/get_disk_name.c.
5424         * util/grub-mkdevicemap.c: Replace device naming logic with
5425         grub_util_get_disk_name() calls.
5427 2007-08-20  Robert Millan  <rmh@aybabtu.com>
5429         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5430         (so that it works for both plural and singular quantities).
5432 2007-08-05  Robert Millan  <rmh@aybabtu.com>
5434         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5435         so that [xz] isn't taken into account when determining order.
5437 2007-08-02  Marco Gerards  <marco@gnu.org>
5439         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5440         `include/multiboot2.h', `include/grub/elfload.h',
5441         `include/multiboot.h', `include/grub/multiboot.h',
5442         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5443         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5444         `kern/elf.c', `loader/multiboot_loader.c',
5445         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5446         `loader/i386/pc/multiboot2.c',
5447         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5448         `util/i386/pc/grub-mkrescue.in'.  Remove
5449         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5450         `include/grub/i386/pc/util/biosdisk.h' and
5451         `include/grub/powerpc/ieee1275/multiboot.h'.
5453 2007-08-02  Bean  <bean123ch@gmail.com>
5455         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5456         (ntfs_mod_SOURCES): New variable.
5457         (ntfs_mod_CFLAGS): Likewise.
5458         (ntfs_mod_LDFLAGS): Likewise.
5460         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5461         (grub_probe_SOURCES): Likewise.
5462         (grub_emu_SOURCES): Likewise.
5464         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5465         (grub_emu_SOURCES): Likewise.
5467         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5468         (grub_emu_SOURCES): Likewise.
5470         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5472         * fs/ntfs.c: New file.
5474 2007-08-02  Bean  <bean123ch@gmail.com>
5476         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5478         * file.h (grub_file): Likewise.
5480         * fshelp.h (grub_fshelp_read_file): Likewise.
5482         * util/i386/pc/grub-setup.c (setup): Likewise.
5483         (save_first_sector): Likewise.
5484         (save_blocklists): Likewise.
5486         * fs/affs.c (grub_affs_read_file): Likewise.
5488         * fs/ext2.c (grub_ext2_read_file): Likewise.
5490         * fs/fat.c (grub_fat_read_data): Likewise.
5492         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5494         * fs/hfs.c (grub_hfs_read_file): Likewise.
5496         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5498         * fs/jfs.c (grub_jfs_read_file): Likewise.
5500         * fs/minix.c (grub_minix_read_file): Likewise.
5502         * fs/sfs.c (grub_sfs_read_file): Likewise.
5504         * fs/ufs.c (grub_ufs_read_file): Likewise.
5506         * fs/xfs.c (grub_xfs_read_file): Likewise.
5508         * command/blocklist.c (read_blocklist): Likewise.
5509         (print_blocklist): Likewise.
5511 2007-08-02  Marco Gerards  <marco@gnu.org>
5513         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5514         `util/hostfs.c'.
5516         * disk/host.c: New file.
5518         * util/hostfs.c: Likewise.
5520         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5521         return `GRUB_ERR_BAD_FS'.
5522         * fs/sfs.c (grub_sfs_mount): Likewise.
5523         * fs/xfs.c (grub_xfs_mount): Likewise.
5525         * include/grub/disk.h (enum grub_disk_dev_id): Add
5526         `GRUB_DISK_DEVICE_HOST_ID'.
5528         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
5530 2007-07-24  Jerone Young  <jerone@gmail.com>
5532         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
5533         modules for compilation.
5534         * conf/powerpc-ieee1275.rmk: Likewise.
5536         * include/multiboot.h: Move multiboot definitions to one file. Rename
5537         many definitions to not get grub specific.
5538         * include/multiboot2.h: Create header with multiboot 2 definitions.
5539         * include/grub/multiboot.h: Header for grub specific function
5540         prototypes and definitions.
5541         * include/grub/multiboot2.h: Likewise.
5542         * include/grub/multiboot_loader.h: Likewise.
5543         * include/grub/i386/pc/multiboot.h: Removed.
5544         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
5546         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
5547         and 2 to allow for one multiboot and module commands.
5548         * loader/multiboot2.c: Add multiboot2 functionality.
5549         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
5550         and definition names.
5551         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
5552         2 functions.
5553         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
5554         ieee1275 specific multiboot2 code.
5556         * kern/i386/pc/startup.S: Change headers and definition names for
5557         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
5559 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5561         * geninitheader.sh: Process file specified in first parameter rather
5562         than hardcoding grub_modules_init.lst.
5563         * geninit.sh: Likewise.  Also, construct header name dynamically rather
5564         than hardcoding grub_modules_init.h.
5566         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
5567         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
5568         grub_probe_init.[ch] and grub_setup_init.[ch].
5570         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
5571         grub_modules_init.h with grub_emu_init.h.
5572         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
5573         grub_probe_init.[ch] files.
5574         * conf/i386-efi.rmk: Likewise.
5575         * conf/i386-pc.rmk: Likewise.
5576         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
5577         grub_setup_init.[ch] files.
5579         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
5580         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
5581         to initialize modules rather than a list of hardcoded functions.
5582         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
5583         grub_init_all() to initialize modules rather than a list of hardcoded
5584         functions.
5586 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5588         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
5589         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
5591 2007-07-22  Robert Millan  <rmh@aybabtu.com>
5593         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5594         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5595         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5596         flag when running on SmartFirmware.
5597         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5598         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5599         was set.
5601         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5602         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5603         rather than decreasing it.
5605         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5606         there's not enough space to do it, fail in the same way as when it
5607         can't be done because there are no partitions.
5609         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5610         when nvsetenv failed.
5612 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
5614         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5615         because this rule is automatically generated.
5616         (grub-mkrescue): Removed for the same reason as above.
5618 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
5620         Migrate to GNU General Public License Version 3.
5622         * COPYING: Replaced with the plain text version of GPLv3.
5624         * config.guess: Updated from gnulib.
5625         * config.sub: Likewise.
5627         * geninit.sh: Output a GPLv3 copyright notice.
5628         * geninitheader.sh: Likewise.
5629         * genmodsrc.sh: Likewise.
5630         * gensymlist.sh.in: Likewise.
5632         * boot/i386/pc/boot.S: Upgraded to GPLv3.
5633         * boot/i386/pc/diskboot.S: Likewise.
5634         * boot/i386/pc/pxeboot.S: Likewise.
5635         * commands/blocklist.c: Likewise.
5636         * commands/boot.c: Likewise.
5637         * commands/cat.c: Likewise.
5638         * commands/cmp.c: Likewise.
5639         * commands/configfile.c: Likewise.
5640         * commands/echo.c: Likewise.
5641         * commands/help.c: Likewise.
5642         * commands/ls.c: Likewise.
5643         * commands/search.c: Likewise.
5644         * commands/terminal.c: Likewise.
5645         * commands/test.c: Likewise.
5646         * commands/videotest.c: Likewise.
5647         * commands/i386/cpuid.c: Likewise.
5648         * commands/i386/pc/halt.c: Likewise.
5649         * commands/i386/pc/play.c: Likewise.
5650         * commands/i386/pc/reboot.c: Likewise.
5651         * commands/i386/pc/vbeinfo.c: Likewise.
5652         * commands/i386/pc/vbetest.c: Likewise.
5653         * commands/ieee1275/halt.c: Likewise.
5654         * commands/ieee1275/reboot.c: Likewise.
5655         * commands/ieee1275/suspend.c: Likewise.
5656         * disk/loopback.c: Likewise.
5657         * disk/lvm.c: Likewise.
5658         * disk/raid.c: Likewise.
5659         * disk/efi/efidisk.c: Likewise.
5660         * disk/i386/pc/biosdisk.c: Likewise.
5661         * disk/ieee1275/ofdisk.c: Likewise.
5662         * font/manager.c: Likewise.
5663         * fs/affs.c: Likewise.
5664         * fs/ext2.c: Likewise.
5665         * fs/fat.c: Likewise.
5666         * fs/fshelp.c: Likewise.
5667         * fs/hfs.c: Likewise.
5668         * fs/hfsplus.c: Likewise.
5669         * fs/iso9660.c: Likewise.
5670         * fs/jfs.c: Likewise.
5671         * fs/minix.c: Likewise.
5672         * fs/sfs.c: Likewise.
5673         * fs/ufs.c: Likewise.
5674         * fs/xfs.c: Likewise.
5675         * hello/hello.c: Likewise.
5676         * include/grub/acorn_filecore.h: Likewise.
5677         * include/grub/arg.h: Likewise.
5678         * include/grub/bitmap.h: Likewise.
5679         * include/grub/boot.h: Likewise.
5680         * include/grub/cache.h: Likewise.
5681         * include/grub/device.h: Likewise.
5682         * include/grub/disk.h: Likewise.
5683         * include/grub/dl.h: Likewise.
5684         * include/grub/elfload.h: Likewise.
5685         * include/grub/env.h: Likewise.
5686         * include/grub/err.h: Likewise.
5687         * include/grub/file.h: Likewise.
5688         * include/grub/font.h: Likewise.
5689         * include/grub/fs.h: Likewise.
5690         * include/grub/fshelp.h: Likewise.
5691         * include/grub/gzio.h: Likewise.
5692         * include/grub/hfs.h: Likewise.
5693         * include/grub/kernel.h: Likewise.
5694         * include/grub/loader.h: Likewise.
5695         * include/grub/lvm.h: Likewise.
5696         * include/grub/misc.h: Likewise.
5697         * include/grub/mm.h: Likewise.
5698         * include/grub/net.h: Likewise.
5699         * include/grub/normal.h: Likewise.
5700         * include/grub/parser.h: Likewise.
5701         * include/grub/partition.h: Likewise.
5702         * include/grub/pc_partition.h: Likewise.
5703         * include/grub/raid.h: Likewise.
5704         * include/grub/rescue.h: Likewise.
5705         * include/grub/script.h: Likewise.
5706         * include/grub/setjmp.h: Likewise.
5707         * include/grub/symbol.h: Likewise.
5708         * include/grub/term.h: Likewise.
5709         * include/grub/terminfo.h: Likewise.
5710         * include/grub/tparm.h: Likewise.
5711         * include/grub/types.h: Likewise.
5712         * include/grub/video.h: Likewise.
5713         * include/grub/efi/api.h: Likewise.
5714         * include/grub/efi/chainloader.h: Likewise.
5715         * include/grub/efi/console.h: Likewise.
5716         * include/grub/efi/console_control.h: Likewise.
5717         * include/grub/efi/disk.h: Likewise.
5718         * include/grub/efi/efi.h: Likewise.
5719         * include/grub/efi/pe32.h: Likewise.
5720         * include/grub/efi/time.h: Likewise.
5721         * include/grub/i386/linux.h: Likewise.
5722         * include/grub/i386/setjmp.h: Likewise.
5723         * include/grub/i386/types.h: Likewise.
5724         * include/grub/i386/efi/kernel.h: Likewise.
5725         * include/grub/i386/efi/loader.h: Likewise.
5726         * include/grub/i386/efi/time.h: Likewise.
5727         * include/grub/i386/pc/biosdisk.h: Likewise.
5728         * include/grub/i386/pc/boot.h: Likewise.
5729         * include/grub/i386/pc/chainloader.h: Likewise.
5730         * include/grub/i386/pc/console.h: Likewise.
5731         * include/grub/i386/pc/init.h: Likewise.
5732         * include/grub/i386/pc/kernel.h: Likewise.
5733         * include/grub/i386/pc/loader.h: Likewise.
5734         * include/grub/i386/pc/memory.h: Likewise.
5735         * include/grub/i386/pc/multiboot.h: Likewise.
5736         * include/grub/i386/pc/serial.h: Likewise.
5737         * include/grub/i386/pc/time.h: Likewise.
5738         * include/grub/i386/pc/vbe.h: Likewise.
5739         * include/grub/i386/pc/vbeblit.h: Likewise.
5740         * include/grub/i386/pc/vbefill.h: Likewise.
5741         * include/grub/i386/pc/vbeutil.h: Likewise.
5742         * include/grub/i386/pc/vga.h: Likewise.
5743         * include/grub/ieee1275/ieee1275.h: Likewise.
5744         * include/grub/ieee1275/ofdisk.h: Likewise.
5745         * include/grub/powerpc/libgcc.h: Likewise.
5746         * include/grub/powerpc/setjmp.h: Likewise.
5747         * include/grub/powerpc/types.h: Likewise.
5748         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
5749         * include/grub/powerpc/ieee1275/console.h: Likewise.
5750         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
5751         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
5752         * include/grub/powerpc/ieee1275/loader.h: Likewise.
5753         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
5754         * include/grub/powerpc/ieee1275/time.h: Likewise.
5755         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
5756         * include/grub/sparc64/libgcc.h: Likewise.
5757         * include/grub/sparc64/setjmp.h: Likewise.
5758         * include/grub/sparc64/types.h: Likewise.
5759         * include/grub/sparc64/ieee1275/console.h: Likewise.
5760         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5761         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5762         * include/grub/sparc64/ieee1275/time.h: Likewise.
5763         * include/grub/util/biosdisk.h: Likewise.
5764         * include/grub/util/getroot.h: Likewise.
5765         * include/grub/util/lvm.h: Likewise.
5766         * include/grub/util/misc.h: Likewise.
5767         * include/grub/util/raid.h: Likewise.
5768         * include/grub/util/resolve.h: Likewise.
5769         * io/gzio.c: Likewise.
5770         * kern/device.c: Likewise.
5771         * kern/disk.c: Likewise.
5772         * kern/dl.c: Likewise.
5773         * kern/elf.c: Likewise.
5774         * kern/env.c: Likewise.
5775         * kern/err.c: Likewise.
5776         * kern/file.c: Likewise.
5777         * kern/fs.c: Likewise.
5778         * kern/loader.c: Likewise.
5779         * kern/main.c: Likewise.
5780         * kern/misc.c: Likewise.
5781         * kern/mm.c: Likewise.
5782         * kern/parser.c: Likewise.
5783         * kern/partition.c: Likewise.
5784         * kern/rescue.c: Likewise.
5785         * kern/term.c: Likewise.
5786         * kern/efi/efi.c: Likewise.
5787         * kern/efi/init.c: Likewise.
5788         * kern/efi/mm.c: Likewise.
5789         * kern/i386/dl.c: Likewise.
5790         * kern/i386/efi/init.c: Likewise.
5791         * kern/i386/efi/startup.S: Likewise.
5792         * kern/i386/pc/init.c: Likewise.
5793         * kern/i386/pc/lzo1x.S: Likewise.
5794         * kern/i386/pc/startup.S: Likewise.
5795         * kern/ieee1275/ieee1275.c: Likewise.
5796         * kern/powerpc/cache.S: Likewise.
5797         * kern/powerpc/dl.c: Likewise.
5798         * kern/powerpc/ieee1275/cmain.c: Likewise.
5799         * kern/powerpc/ieee1275/crt0.S: Likewise.
5800         * kern/powerpc/ieee1275/init.c: Likewise.
5801         * kern/powerpc/ieee1275/openfw.c: Likewise.
5802         * kern/sparc64/cache.S: Likewise.
5803         * kern/sparc64/dl.c: Likewise.
5804         * kern/sparc64/ieee1275/init.c: Likewise.
5805         * kern/sparc64/ieee1275/openfw.c: Likewise.
5806         * loader/efi/chainloader.c: Likewise.
5807         * loader/efi/chainloader_normal.c: Likewise.
5808         * loader/i386/efi/linux.c: Likewise.
5809         * loader/i386/efi/linux_normal.c: Likewise.
5810         * loader/i386/pc/chainloader.c: Likewise.
5811         * loader/i386/pc/chainloader_normal.c: Likewise.
5812         * loader/i386/pc/linux.c: Likewise.
5813         * loader/i386/pc/linux_normal.c: Likewise.
5814         * loader/i386/pc/multiboot.c: Likewise.
5815         * loader/i386/pc/multiboot_normal.c: Likewise.
5816         * loader/powerpc/ieee1275/linux.c: Likewise.
5817         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5818         * normal/arg.c: Likewise.
5819         * normal/cmdline.c: Likewise.
5820         * normal/command.c: Likewise.
5821         * normal/completion.c: Likewise.
5822         * normal/execute.c: Likewise.
5823         * normal/function.c: Likewise.
5824         * normal/lexer.c: Likewise.
5825         * normal/main.c: Likewise.
5826         * normal/menu.c: Likewise.
5827         * normal/menu_entry.c: Likewise.
5828         * normal/misc.c: Likewise.
5829         * normal/parser.y: Likewise.
5830         * normal/script.c: Likewise.
5831         * normal/i386/setjmp.S: Likewise.
5832         * normal/powerpc/setjmp.S: Likewise.
5833         * normal/sparc64/setjmp.S: Likewise.
5834         * partmap/acorn.c: Likewise.
5835         * partmap/amiga.c: Likewise.
5836         * partmap/apple.c: Likewise.
5837         * partmap/gpt.c: Likewise.
5838         * partmap/pc.c: Likewise.
5839         * partmap/sun.c: Likewise.
5840         * term/gfxterm.c: Likewise.
5841         * term/terminfo.c: Likewise.
5842         * term/efi/console.c: Likewise.
5843         * term/i386/pc/console.c: Likewise.
5844         * term/i386/pc/serial.c: Likewise.
5845         * term/i386/pc/vesafb.c: Likewise.
5846         * term/i386/pc/vga.c: Likewise.
5847         * term/ieee1275/ofconsole.c: Likewise.
5848         * util/biosdisk.c: Likewise.
5849         * util/console.c: Likewise.
5850         * util/genmoddep.c: Likewise.
5851         * util/getroot.c: Likewise.
5852         * util/grub-emu.c: Likewise.
5853         * util/grub-mkdevicemap.c: Likewise.
5854         * util/grub-probe.c: Likewise.
5855         * util/lvm.c: Likewise.
5856         * util/misc.c: Likewise.
5857         * util/raid.c: Likewise.
5858         * util/resolve.c: Likewise.
5859         * util/update-grub.in: Likewise.
5860         * util/update-grub_lib.in: Likewise.
5861         * util/grub.d/00_header.in: Likewise.
5862         * util/grub.d/10_hurd.in: Likewise.
5863         * util/grub.d/10_linux.in: Likewise.
5864         * util/i386/efi/grub-install.in: Likewise.
5865         * util/i386/efi/grub-mkimage.c: Likewise.
5866         * util/i386/pc/grub-install.in: Likewise.
5867         * util/i386/pc/grub-mkimage.c: Likewise.
5868         * util/i386/pc/grub-mkrescue.in: Likewise.
5869         * util/i386/pc/grub-setup.c: Likewise.
5870         * util/i386/pc/misc.c: Likewise.
5871         * util/powerpc/ieee1275/grub-install.in: Likewise.
5872         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
5873         * util/powerpc/ieee1275/misc.c: Likewise.
5874         * video/bitmap.c: Likewise.
5875         * video/video.c: Likewise.
5876         * video/i386/pc/vbe.c: Likewise.
5877         * video/i386/pc/vbeblit.c: Likewise.
5878         * video/i386/pc/vbefill.c: Likewise.
5879         * video/i386/pc/vbeutil.c: Likewise.
5880         * video/readers/tga.c: Likewise.
5882 2007-07-02  Robert Millan  <rmh@aybabtu.com>
5884         * conf/i386-efi.rmk: Replace obsolete reference to
5885         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
5886         with util/getroot.c.
5887         * conf/powerpc-ieee1275.rmk: Likewise.
5888         * conf/sparc64-ieee1275.rmk: Likewise.
5890         * util/grub-emu.c (main): Fix unchecked pointer handling.
5892 2007-07-02  Robert Millan  <rmh@aybabtu.com>
5894         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
5895         invocation to fail, in order to support partition-less media.
5897         * util/i386/pc/grub-install.in: Likewise.
5899         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
5900         which fs or partmap modules are needed (akin to its sister scripts).
5902         Also use grub-probe to get rid of unportable /proc/mounts check.
5904         Print the same informational message that the other scripts do, before
5905         exiting.
5907 2007-06-23  Robert Millan  <rmh@aybabtu.com>
5909         * util/update-grub_lib.in (font_path): New function.  Determine whether
5910         a font file can be found and, if so, echo the GRUB path to it.
5912         * util/update-grub.in: Handle multiple terminals depending on user
5913         input, platform availability and font file presence.  Propagate
5914         variables of our findings to /etc/grub.d/ children.
5916         * util/grub.d/00_header.in: Handle multiple terminals, based on
5917         environment setup by update-grub.
5919 2007-06-23  Robert Millan  <rmh@aybabtu.com>
5921         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
5923 2007-06-21  Robert Millan  <rmh@aybabtu.com>
5925         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
5926         indicate end of data section in kernel image.
5927         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
5928         GRUB_KERNEL_MACHINE_DATA_END.
5930         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
5931         space for it.
5932         * kern/i386/efi/startup.S: Likewise.
5934         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
5935         during image generation.  Implement --prefix option to override this
5936         patch.
5937         * util/i386/efi/grub-mkimage.c: Likewise.
5939         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
5940         code to make path relative to its root into a separate function.
5942         * util/i386/pc/grub-install.in: Use newly provided
5943         make_system_path_relative_to_its_root() to convert ${grubdir}, then
5944         pass the result to grub-install --prefix.
5946 2007-06-13  Robert Millan  <rmh@aybabtu.com>
5948         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
5949         DEFAULT_DEVICE_MAP.
5950         * util/grub-emu.c: Use above definitions from misc.h instead of
5951         defining them.
5952         * util/grub-mkdevicemap.c: Likewise.
5953         * util/i386/pc/grub-setup.c: Likewise.
5954         * util/grub-probe.c: Likewise.
5955         (probe): Abort with grub_util_error() when either
5956         grub_guess_root_device or grub_util_get_grub_dev fails.
5958 2007-06-12  Robert Millan  <rmh@aybabtu.com>
5960         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
5961         "pager" assignment.
5962         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
5963         "pcdata".
5964         * util/grub-probe.c (probe): Likewise for "drive_name".
5966 2007-06-11  Robert Millan  <rmh@aybabtu.com>
5968         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
5969         not just the cdrom one.
5971 2007-06-11  Robert Millan  <rmh@aybabtu.com>
5973         * util/i386/pc/grub-mkrescue.in: Add "set -e".
5974         Add --pkglibdir=DIR option to override pkglibdir.
5975         Mention --image-type=TYPE in help output.
5976         Fix --grub-mkimage (it was a no-op).
5977         Abort gracefully when no parameter is given.
5979 2007-06-11  Robert Millan  <rmh@aybabtu.com>
5981         * util/i386/pc/grub-mkrescue.in: New file.
5982         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
5983         * Makefile.in: Handle bin_SCRIPTS.
5985 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
5987         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
5988         list of video modes.
5990 2007-06-06  Robert Millan  <rmh@aybabtu.com>
5992         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
5993         file doesn't exist, or if it is in a filesystem grub can't read.
5995         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
5996         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
5997         header comment to fit in 80 columns when the variables are resolved.
5999         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6000         could be identified by update-grub.  Remove redundant check for
6001         unifont.pff existence (since convert_system_path_to_grub_path now
6002         handles that).
6004 2007-06-04  Robert Millan  <rmh@aybabtu.com>
6006         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6008         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6010         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6012 2007-06-04  Robert Millan  <rmh@aybabtu.com>
6014         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6016         * include/grub/partition.h: Declare grub_apple_partition_map_init and
6017         grub_apple_partition_map_fini.
6019         * util/biosdisk.c
6020         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6021         to access >2 TiB disks).
6023         Print disk->total_sectors with %llu instead of %lu, since this
6024         variable is always 64-bit (prevents wrong disk size from being displayed
6025         on either >2 TiB disk or big-endian CPU).
6027         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6028         into a generic case that supports all (sane) partition maps.
6030         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6031         breaks big-endian.
6033         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6034         and grub_apple_partition_map_fini() after that.
6036 2007-06-01  Robert Millan  <rmh@aybabtu.com>
6038         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6040         * util/grub.d/00_header.in: Only enable gfxterm when
6041         convert_system_path_to_grub_path() succeeds.
6043 2007-05-20  Robert Millan  <rmh@aybabtu.com>
6045         * util/update-grub_lib.in: New file.
6046         * DISTLIST: Add update-grub_lib.in.
6047         * conf/common.rmk: Generate update-grub_lib and install it in
6048         $(lib_DATA).
6049         * Makefile.in: Add install routine for $(lib_DATA).
6051         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6052         function provided by update-grub_lib to support arbitrary paths of
6053         unifont.pff.
6054         * util/update-grub.in: Use convert_system_path_to_grub_path() to
6055         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6057 2007-05-19  Robert Millan  <rmh@aybabtu.com>
6059         * commands/i386/cpuid.c: New module.
6060         * DISTLIST: Add it.
6061         * conf/i386-efi.rmk: Enable cpuid.mod.
6062         * conf/i386-pc.rmk: Likewise.
6064 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6066         * kern/disk.c (grub_disk_read): Check return value of
6067         grub_realloc().
6069 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6071         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6072         arrays.
6073         * disk/raid.c (grub_raid_open): Likewise.
6075 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
6077         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6078         stack instead of on the heap.
6080         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6081         before doing a read on it.
6083         * configure.ac: Only use -fno-stack-protector for the target
6084         environment.
6086 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
6088         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6089         __attribute_ ((unused)) to mode_type argument.
6091         * util/getroot.c (grub_guess_root_device): Fix #endif.
6093         * kern/misc.c (memcmp): Fix prototype.
6095         * include/grub/partition.h [GRUB_UTIL]
6096         (grub_gpt_partition_map_init): Add prototype.
6097         (grub_gpt_partition_map_fini): Likewise.
6099         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6100         at the right place.
6102         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6103         (grub_fat_read_data): Likewise.
6104         (grub_fat_find_dir): Likewise.
6106         * font/manager.c (find_glyph): Make table a const.
6107         (grub_font_get_glyph): Remove bitmap from if statement.
6109 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
6111         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6112         code, first search for device in /dev/mapper, then in /dev.
6113         (grub_util_get_grub_dev): New function.
6114         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6115         prototype.
6116         * util/grub-probe.c (probe): Remove check for RAID, call
6117         grub_util_get_grub_dev() instead of
6118         grub_util_biosdisk_get_grub_dev().
6119         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6120         grub_util_biosdisk_get_grub_dev().
6121         * util/i386/pc/grub-setup.c (main): Likewise.
6123 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6125         * DISTLIST: Update for the latest changes.
6126         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6127         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6128         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6129         grub/util/biosdisk.h.
6130         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6131         grub/util/biosdisk.h.
6133 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6135         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6137 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6139         * util/i386/efi/grub-install.in: New.
6140         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6141         newly added grub-install.
6142         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6143         include.
6144         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6145         grub/util/biosdisk.h.
6146         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6147         grub/util/biosdisk.h.
6149 2007-05-16  Robert Millan  <rmh@aybabtu.com>
6151         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6152         * include/grub/util/biosdisk.h: ... here.
6153         * util/i386/pc/biosdisk.c: Moved to ...
6154         * util/biosdisk.c: ... here.
6155         * util/i386/pc/getroot.c: Moved to ...
6156         * util/getroot.c: ... here.
6157         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6158         * util/grub-mkdevicemap.c: ... here.
6159         * util/i386/pc/grub-probe.c: Moved to ...
6160         * util/grub-probe.c: ... here.
6162 2007-05-15  Robert Millan  <rmh@aybabtu.com>
6164         * util/update-grub.in: Remove duplicated line in grub.cfg header
6165         message.
6167 2007-05-13  Robert Millan  <rmh@aybabtu.com>
6169         * util/update-grub.in: Fix a few assumptions about the devices holding
6170         /, /boot and /boot/grub being the same.
6171         * util/grub.d/00_header.in: Likewise.
6172         * util/grub.d/10_hurd.in: Likewise.
6173         * util/grub.d/10_linux.in: Likewise.
6175         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6176         patterns.  Use that to define the `.old' suffix as older than `'.
6178         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6180         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6181         the grub.cfg header message.
6183 2007-05-11  Robert Millan  <rmh@aybabtu.com>
6185         * util/update-grub.in: Create device.map if it doesn't already exist,
6186         before attempting to run grub-probe.
6187         Check for grub-probe and grub-mkdevicemap with the same code
6188         grub-install is using.
6189         Remove test mode.
6191 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
6193         * Makefile.in: Add the datarootdir autoconf variable.
6195 2007-05-09  Robert Millan  <rmh@aybabtu.com>
6197         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6198         fail gracefully if dev->disk->partition == NULL.
6200 2007-05-07  Robert Millan  <rmh@aybabtu.com>
6202         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6203         determine partition map module.
6204         * util/i386/pc/grub-install.in: Use this feature to decide which
6205         partition module to load, instead of hardcoding pc and gpt.
6207 2007-05-07  Robert Millan  <rmh@aybabtu.com>
6209         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6210         source directory differs from build directory.
6212 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6214         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6215         initialisation.
6217 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6219         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6221 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6223         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6224         command-line arguments via ${GRUB_CMDLINE_LINUX}.
6226 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6228         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6229         (grub_probe_SOURCES): Likewise.
6230         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6231         GPT and initialize dos_part and bsd_part accordingly.
6232         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6233         install_bsd_part.
6234         (main): Activate gpt module for use during partition identification,
6235         and deactivate it afterwards.
6236         * util/i386/pc/grub-install.in: Add gpt module to core.img.
6237         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6238         partition identification, and deactivate it afterwards.
6240 2007-05-05  Robert Millan  <rmh@aybabtu.com>
6242         * term/i386/pc/console.c (grub_console_fini): Call
6243         grub_term_set_current() before grub_term_unregister().
6245 2007-05-04  Robert Millan  <rmh@aybabtu.com>
6247         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6248         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6249         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
6250         and update-grub_DATA.
6251         * conf/common.rmk: Build and install update-grub components.
6252         * conf/common.mk: Regenerate.
6253         * util/update-grub.in: New.  Core of update-grub.
6254         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
6255         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
6256         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
6257         * util/grub.d/README: New.  Document grub.d directory layout.
6259 2007-05-01  Robert Millan  <rmh@aybabtu.com>
6261         * util/grub-emu.c: Move initialization functions
6262         grub_util_biosdisk_init() and grub_init_all() before
6263         grub_util_biosdisk_get_grub_dev(), which relies on them.
6265 2007-04-19  Robert Millan  <rmh@aybabtu.com>
6267         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6268         it is used later.
6270 2007-04-18  Jerone Young  <jerone@gmail.com>
6272         * kernel/elf.c: Add missing parenthesis for conditional statement
6273         stanza.
6275 2007-04-10  Jerone Young  <jerone@gmail.com>
6277         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6278         continue on and look for device node with real device name.
6280 2007-04-10  Jerone Young  <jerone@gmail.com>
6282         * configure.ac: Add argument for autoconf to use transformation
6283         ability.
6284         * Makefile.in: Add autoconf package transformation code.
6285         * util/i386/pc/grub-install.in: Likewise.
6286         * util/powerpc/ieee1275/grub-install.in: Likewise.
6288 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
6290         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6291         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6292         (EXT2_REVISION): Likewise.
6293         (EXT2_INODE_SIZE): Likewise.
6294         (struct grub_ext2_block_group): Added a missing member
6295         "used_dirs".
6296         (grub_ext2_read_inode): Divide by the inode size in a superblock
6297         instead of 128 to obtain INODES_PER_BLOCK.
6298         Use the macro EXT2_INODE_SIZE instead of directly using
6299         SBLOCK->INODE_SIZE.
6301 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
6303         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6304         superblock instead of the structure size to compute an
6305         offset. This fixes the problem that GRUB could not read a
6306         filesystem when inode size is different from 128-byte.
6308 2007-03-05  Marco Gerards  <marco@gnu.org>
6310         * normal/main.c (read_config_file): When "menu" is not set, create
6311         an initial context.
6313 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
6315         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6316         (HEAP_LIMIT): New macro.
6317         (grub_claim_heap): Claim memory up to `heaplimit'.
6319 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
6321         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6322         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6323         (_start): Likewise.
6324         (grub_arch_modules_addr): Return address after `_end'.
6325         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6326         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6327         (add_segments): Calculate `_end' from phdr size and location.
6328         (ALIGN_UP): Moved to ...
6329         * include/grub/misc.h: here.
6330         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6331         New macro.
6332         (GRUB_IEEE1275_MODULE_BASE): Removed.
6334 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6336         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6337         loop boundary.
6339 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6341         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6342         All users updated.
6343         (grub_elf64_load_hook_t): Likewise.
6344         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6345         debug output.
6347 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
6349         * kern/mm.c: Update copyright.
6350         (grub_mm_debug): Correct syntax error.
6351         (grub_mm_dump_free): New function.
6352         (grub_debug_free): Call `grub_free'.
6353         * include/grub/mm.h: Update copyright.
6354         (grub_mm_dump_free): Add declaration.
6356 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
6358         * include/grub/ieee1275/ieee1275.h: Update copyright.
6359         * kern/powerpc/ieee1275/init.c: Likewise.
6360         * kern/powerpc/ieee1275/openfw.c: Likewise.
6362         * loader/powerpc/ieee1275/linux.c: Likewise.
6363         * include/grub/elfload.h: Likewise.
6364         * kern/elf.c: Likewise.
6365         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
6366         callers.
6367         (grub_elf64_load): Likewise.
6368         (grub_elf32_load_segment): Move to a nested function.
6369         (grub_elf64_load_segment): Likewise.
6371 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
6373         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6374         prototype.
6375         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6376         (grub_heap_len): Likewise.
6377         (HEAP_SIZE): New macro.
6378         (grub_claim_heap): New function.
6379         (grub_machine_init): Don't claim heap directly.  Call
6380         `grub_claim_heap'.
6381         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6382         (grub_available_iterate): New function.
6384 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
6386         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6387         * configure.ac: Use it for testing the HOST and TARGET compilers.
6389 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
6391         * Makefile.in (enable_grub_emu): New variable.
6392         * configure.ac (--enable-grub-emu): New option.
6393         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6394         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6395         * conf/i386-pc.rmk: Likewise.
6396         * conf/powerpc-ieee1275.rmk: Likewise.
6397         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6399 2006-12-12  Marco Gerards  <marco@gnu.org>
6401         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6403         * kern/env.c (grub_env_unset): Don't free the member `value' when
6404         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6405         pointer.
6407         * normal/main.c (current_menu): Removed.
6408         (free_menu): Unset the `menu' environment variable.
6409         (grub_normal_menu_addentry): Make use of the environment variable
6410         `menu', instead of using the global `current_menu'.  Allocate
6411         memory for the sourcecode of this entry.
6412         (read_config_file): New argument `nested', changed all callers.
6413         Only in the case of a new context, initialize a new menu.  Set the
6414         `menu' environment variable.
6415         (grub_normal_execute): Don't set and unset the environment
6416         variable `menu' here anymore.  Only free the menu when leaving the
6417         context.
6419         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6420         leak.
6422 2006-12-11  Marco Gerards  <marco@gnu.org>
6424         * normal/menu_entry.c (run): Fix off by one bug so the last line
6425         is executed.  Move the loader check to outside the loop.
6427 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
6429         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6431 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
6433         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6434         the number of sectors.  Reported by Andrey Shuvikov
6435         <mr_hyro@yahoo.com>.
6437 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
6439         * kern/disk.c (grub_disk_read): When there is a read error, always
6440         try to read only the necessary data.
6442         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6443         disk/raid.c.
6444         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6445         prototype.
6446         [GRUB_UTIL] (grub_raid_fini): Likewise.
6447         [GRUB_UTIL] (grub_lvm_init): Likewise.
6448         [GRUB_UTIL] (grub_lvm_fini): Likewise.
6449         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6450         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6451         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6452         and grub_raid_fini().
6454 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
6456         * include/grub/types.h (__unused): Rename to UNUSED.
6457         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6458         (grub_elf64_size): Likewise.
6460 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6462         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6463         grub_error_push and grub_error_pop in the error-handling path.
6464         (grub_elf32_load_segment): Only call grub_file_read with non-zero
6465         length.
6467 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6469         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6470         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6471         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6472         (kernel_elf_SOURCES): Likewise.
6473         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6474         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6475         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6476         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6477         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6478         (elf_mod_SOURCES): New variable.
6479         (elf_mod_CFLAGS): Likewise.
6480         (elf_mod_LDFLAGS): Likewise.
6481         * include/grub/types.h (__unused): New macro.
6482         * include/grub/elfload.h: New file.
6483         * kern/elf.c: Likewise.
6484         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6485         (ELF32_LOADMASK): New macro.
6486         (ELF64_LOADMASK): Likewise.
6487         (vmlinux): Removed.
6488         (grub_linux_load32): New function.
6489         (grub_linux_load64): Likewise.
6490         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6491         Use grub_elf_t instead of grub_file_t.
6493 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
6495         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6496         `catch_result' to struct set_color_args.
6498 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
6500         * normal/menu.c: Include grub/script.h.
6501         * normal/menu_entry.c: Likewise.
6502         * include/grub/normal.h: Do not include grub/script.h.
6504 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6506         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6508 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6510         * kern/disk.c (grub_disk_open): Print debug messages when opening a
6511         disk.
6512         (grub_disk_close): Print debug messages when closing a disk.
6513         (grub_disk_read): Print debug messages when disk read fails.
6514         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6515         filesystem type.
6516         * kern/partition.c: Include misc.h.
6517         (grub_partition_iterate): Print debug messages when detecting
6518         partition type.
6520 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
6522         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
6523         is negative.
6524         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
6526 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
6528         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6529         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
6531 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
6533         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
6534         instead of sizeof(lv). Patch by Michael Guntsche.
6536 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
6538         * disk/lvm.c: Rename VGS to VG_LIST.
6539         (grub_lvm_iterate): Change VGS->LV to VG-LV.
6540         (grub_lvm_open): Likewise.
6541         Thanks to Michael Guntsche for finding this bug.
6543 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
6545         * configure.ac (AC_INIT): Bumped to 1.95.
6547 2006-10-14  Robert Millan  <rmh@aybabtu.com>
6549         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
6550         with "/dev/.static/dev/md".
6552 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
6554         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
6555         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
6556         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
6557         DRIVE_NAME are always freed.
6559         * util/i386/pc/biosdisk.c (make_device_name): Add one into
6560         DOS_PART, as a DOS partition is counted from one instead of zero
6561         now. Reported by Robert Millan.
6563 2006-10-14  Robert Millan  <rmh@aybabtu.com>
6565         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
6566         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
6567         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
6568         string returned by grub_guess_root_device.
6569         * util/i386/pc/grub-setup.c: Likewise.
6570         * util/i386/pc/grub-probefs.c: Likewise.
6572         * util/i386/pc/grub-probefs.c: Rename to ...
6573         * util/i386/pc/grub-probe.c: ... this.
6574         * DISTLIST: Remove grub-probefs, add grub-probe.
6575         * conf/i386-efi.rmk: Likewise.
6576         * conf/i386-pc.rmk: Likewise.
6577         * util/i386/pc/grub-install.in: Likewise.
6579         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
6580         choose which information we want to print.
6582 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
6584         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
6585         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
6586         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
6587         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
6588         video/readers/tga.c and video/i386/pc/vbeutil.c.
6590 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
6592         Added support for RAID and LVM.
6594         * disk/lvm.c: New file.
6595         * disk/raid.c: Likewise.
6596         * include/grub/lvm.h: Likewise.
6597         * include/grub/raid.h: Likewise.
6598         * include/grub/util/lvm.h: Likewise.
6599         * include/grub/util/raid.h: Likewise.
6600         * util/lvm.c: Likewise.
6601         * util/raid.c: Likewise.
6603         * include/grub/disk.h (grub_disk_dev_id): Add
6604         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6605         (grub_disk_get_size): New prototype.
6606         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6607         returns a partition.
6608         (grub_disk_get_size): New function.
6610         * kern/i386/pc/init.c (make_install_device): Copy the prefix
6611         verbatim if grub_install_dos_part is -2.
6613         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6614         and LVM devices.
6616         * util/i386/pc/grub-setup.c (setup): New argument
6617         MUST_EMBED. Force embedding of GRUB when the argument is
6618         true. Close FILE before returning.
6619         (main): Add support for RAID and LVM.
6621         * conf/common.rmk: Add RAID and LVM modules.
6622         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6623         util/lvm.c.
6624         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6626         * kern/misc.c (grub_strstr): New function.
6627         * include/grub/misc.h (grub_strstr): New prototype.
6629 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
6631         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6633 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
6635         * kern/misc.c (grub_strtoull): Guess the base only if not
6636         specified.
6638 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6640         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6641         PowerMac support.
6643 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6645         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6647         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6648         Remove `flags' argument.  All callers changed.
6649         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6650         (IEEE1275_IHANDLE_INVALID): New variable.
6651         (IEEE1275_CELL_INVALID): New variable.
6652         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6653         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6654         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6655         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6656         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6657         codes from Open Firmware.  All callers updated.
6658         (grub_ieee1275_next_property): Directly return Open Firmware return
6659         code.
6660         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6661         Standardize error checking from `grub_ieee1275_get_property'.
6662         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6663         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
6665 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
6667         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
6668         `instance_to_package_args' to `instance_to_path_args'.
6670         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
6671         `grub_ieee1275_chosen'.
6673         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
6674         `grub_ieee1275_interpret'.
6676 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
6678         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
6680 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
6682         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
6683         (__cmpdi): Likewise.
6685         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
6686         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
6687         `grub_ssize_t'.
6689         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
6691         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
6692         to type `grub_ssize_t'.
6693         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
6695 2006-09-22  Marco Gerards  <marco@gnu.org>
6697         * normal/script.c (grub_script_create_cmdmenu): Skip leading
6698         newlines.
6700 2006-09-22  Marco Gerards  <marco@gnu.org>
6702         * commands/echo.c: New file.
6704         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
6706         * conf/common.rmk (echo_mod_SOURCES): New variable.
6707         (echo_mod_CFLAGS): Likewise.
6708         (echo_mod_LDFLAGS): Likewise.
6710 2006-09-22  Marco Gerards  <marco@gnu.org>
6712         * normal/main.c (get_line): Malloc memory instead of using
6713         preallocated memory.  Removed the arguments `cmdline' and
6714         `max_len'.  Updated all callers.
6716 2006-09-22  Marco Gerards  <marco@gnu.org>
6718         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
6719         (normal_mod_DEPENDENCIES): Likewise.
6721         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
6722         (normal_mod_DEPENDENCIES): Likewise.
6724         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
6726 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
6728         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
6729         programs.
6730         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
6731         (normal_mod_DEPENDENCIES): Likewise.
6732         * conf/i386-pc.mk: Regenerate.
6733         * conf/i386-efi.mk: Likewise
6734         * conf/common.mk: Likewise.
6735         * conf/powerpc-ieee1275.mk: Likewise.
6736         * conf/sparc64-ieee1275.mk: Likewise.
6738 2006-09-22  Robert Millan  <rmh@aybabtu.com>
6740         Sync with i386 version.
6741         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
6742         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
6744 2006-09-21  Robert Millan  <rmh@aybabtu.com>
6746         Import from GRUB Legacy (lib/device.c):
6747         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
6748         (init_device_map) [__linux__]: Add support for I2O devices.
6750 2006-09-14  Marco Gerards  <marco@gnu.org>
6752         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
6753         `-melf_i386'.
6755 2006-09-14  Robert Millan  <rmh@aybabtu.com>
6757         * util/i386/pc/grub-install.in: Skip menu.lst when removing
6758         /boot/grub/*.lst.
6760         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6762         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
6763         before adding it to device.map.
6765 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
6767         * genmk.rb: Let GCC generate dependencies the first time it
6768         compiles a file; using the -MD option.
6769         * conf/common.mk: Regenerate.
6770         * conf/i386-pc.mk: Likewise.
6771         * conf/i386-efi.mk: Likewise.
6772         * conf/powerpc-ieee1275.mk: Likewise.
6773         * conf/sparc64-ieee1275.mk: Likewise.
6775 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
6777         Move the prototypes of grub_setjmp and grub_longjmp to
6778         cpu/setjmp.h, so that each architecture may specify different
6779         attributes.
6781         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
6782         (grub_longjmp): Likewise.
6783         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
6784         (grub_longjmp): Likewise.
6785         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
6786         (grub_longjmp): Likewise.
6788         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
6789         [!GRUB_UTIL] (grub_longjmp): Removed.
6791 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
6793         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
6794         "color!" method does not return any value.
6796 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
6798         * include/grub/bitmap.h: New file.
6800         * include/grub/i386/pc/vbeutil.h: Likewise.
6802         * video/bitmap.c: Likewise.
6804         * video/readers/tga.c: Likewise.
6806         * video/i386/pc/vbeutil.c: Likewise.
6808         * commands/videotest.c: Code cleanup and updated to reflect to new
6809         video API.
6811         * term/gfxterm.c: Likewise.
6813         * video/video.c: Likewise.
6815         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
6816         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
6817         (bitmap_mod_SOURCES): New entry.
6818         (bitmap_mod_CFLAGS): Likewise.
6819         (bitmap_mod_LDFLAGS): Likewise.
6820         (tga_mod_SOURCES): Likewise.
6821         (tga_mod_CFLAGS): Likewise.
6822         (tga_mod_LDFLAGS): Likewise.
6824         * include/grub/video.h (grub_video_blit_operators): New enum type.
6825         (grub_video_render_target): Changed as forward declaration and moved
6826         actual definition to be video driver specific.
6827         (grub_video_adapter.blit_bitmap): Added blitting operator.
6828         (grub_video_adapter.blit_render_target): Likewise.
6829         (grub_video_blit_bitmap): Likewise.
6830         (grub_video_blit_render_target): Likewise.
6832         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
6833         driver specific render target definition.
6834         (grub_video_vbe_map_rgba): Added driver internal helper.
6835         (grub_video_vbe_unmap_color): Updated to use
6836         grub_video_i386_vbeblit_info.
6837         (grub_video_vbe_get_video_ptr): Likewise.
6839         * include/grub/i386/pc/vbeblit.h
6840         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
6841         grub_video_i386_vbeblit_info.
6842         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6843         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6844         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6845         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6846         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6847         (grub_video_i386_vbeblit_index_index): Likewise.
6848         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
6849         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6850         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6851         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
6852         operator.
6853         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
6854         operator.
6856         * video/i386/pc/vbeblit.c: Updated to reflect changes on
6857         include/grub/i386/pc/vbeblit.h.
6859         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
6860         Updated to use grub_video_i386_vbeblit_info.
6861         (grub_video_i386_vbefill_R8G8B8): Likewise.
6862         (grub_video_i386_vbefill_index): Likewise.
6863         (grub_video_i386_vbefill): Added generic filler.
6865         * video/i386/pc/vbefill.c: Updated to reflect changes on
6866         include/grub/i386/pc/vbefill.h.
6868         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
6869         grub_video_i386_vbeblit_info.
6870         (grub_video_vbe_unmap_color): Likewise.
6871         (grub_video_vbe_blit_glyph): Likewise.
6872         (grub_video_vbe_scroll): Likewise.
6873         (grub_video_vbe_draw_pixel): Removed function.
6874         (grub_video_vbe_get_pixel): Likewise.
6875         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
6876         updated code to use it.
6877         (common_blitter): Added common blitter for render target and bitmap.
6878         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
6879         (grub_video_vbe_blit_render_target): Likewise.
6881 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
6883         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
6884         is in text mode if there is no console control protocol instance
6885         available.
6887 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
6889         * include/grub/video.h: Code cleanup.
6891         * include/grub/i386/pc/vbe.h: Likewise.
6893         * video/i386/pc/vbe.c: Likewise.
6895         * video/i386/pc/vbeblit.c: Likewise.
6897         * video/i386/pc/vbefill.c: Likewise.
6899         * video/video.c: Likewise.  Also added more comments.
6901 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
6903         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
6904         (struct grub_biosdisk_dap): Likewise.
6906         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
6907         linkage settings for all functions.
6909 2006-07-12  Marco Gerards  <marco@gnu.org>
6911         * configure.ac (--enable-mm-debug): Fix typo.
6913         * genkernsyms.sh.in: Use proper quoting for `CC'.
6915 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
6917         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
6918         (normal_mod_ASFLAGS): Remove "-m32".
6920 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
6922         * util/misc.c: Include config.h.
6923         [!HAVE_MEMALIGN]: Do not include malloc.h.
6924         (grub_memalign): Use posix_memalign, if present. Then, use
6925         memalign, if present. Otherwise, emit an error.
6927         * util/grub-emu.c: Do not include malloc.h.
6929         * include/grub/util/misc.h: Include unistd.h. This is required for
6930         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
6931         D. Eades III <hde@foobar-qux.org>.
6933         * configure.ac (AC_GNU_SOURCE): Added.
6934         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
6935         type.
6937 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
6939         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
6940         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
6942 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
6944         * include/grub/types.h (grub_host_addr_t): Rename to
6945         grub_target_addr_t.
6946         (grub_host_off_t): Rename to grub_target_off_t.
6947         (grub_host_size_t): Rename to grub_target_size_t.
6948         (grub_host_ssize_t): Rename to grub_target_ssize_t.
6949         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
6951         * include/grub/kernel.h (struct grub_module_header): Change type
6952         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
6953         (grub_module_info): Likewise.
6955 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
6957         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
6958         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
6959         Velazquez <jesus.velazquez@gmail.com>.
6961 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
6963         Count partitions from 1 instead of 0 in the string representation
6964         of partitions. Still use 0-based internally.
6966         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
6967         (sun_partition_map_iterate): Use grub_partition_t instead of
6968         struct grub_partition *. Cast DESC->START_CYLINDER to
6969         grub_uint64_t after converting the endian.
6970         (sun_partition_map_probe): Subtract 1 for PARTNUM.
6971         (sun_partition_map_get_name): Add 1 to P->INDEX.
6973         * partmap/pc.c (grub_partition_parse): Subtract 1 for
6974         PCDATA->DOS_PART.
6975         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
6977         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
6978         zero instead of one.
6979         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
6980         (gpt_partition_map_get_name): Add 1 into P->INDEX.
6982         * partmap/apple.c (apple_partition_map_iterate): Change the type
6983         of POS to unsigned.
6984         (apple_partition_map_probe): Subtract 1 for PARTNUM.
6985         (apple_partition_map_get_name): Add 1 into P->INDEX.
6987         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
6988         of POS to unsigned.
6989         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
6990         calculate the offset of a partition.
6991         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
6992         (amiga_partition_map_get_name): Add 1 into P->INDEX.
6994         * partmap/acorn.c (acorn_partition_map_find): Change the type of
6995         SECTOR to grub_disk_addr_t.
6996         (acorn_partition_map_iterate): Likewise.
6997         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
6998         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
6999         top.
7000         (acorn_partition_map_get_name): Add 1 into P->INDEX.
7002         * kern/i386/pc/init.c (make_install_device): Add 1 into
7003         GRUB_INSTALL_DOS_PART.
7005         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7006         conditional.
7008 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
7010         Clean up the code to support 64-bit addressing in disks and
7011         files. This change is not enough for filesystems yet.
7013         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7014         type of "start" to grub_uint64_t.
7015         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7016         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7017         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7018         convert addresses.
7020         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7021         to grub_disk_addr_t.
7023         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7024         string.
7026         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7028         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7029         to char *.
7031         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7033         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7035         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7037         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7038         to grub_off_t, to detect an error from grub_file_seek.
7039         (grub_multiboot_load_elf32): Likewise.
7041         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7042         maximum unsigned long value when an overflow is detected.
7043         (grub_strtoull): New function.
7044         (grub_divmod64): Likewise.
7045         (grub_lltoa): use grub_divmod64.
7047         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7048         grub_disk_addr_t.
7049         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7050         the pointer to next character. Use grub_strtoull instead of
7051         grub_strtoul.
7052         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7053         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7054         respectively.
7056         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7057         return value is signed.
7058         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7059         test if OFFSET is less than zero, as OFFSET is unsigned now.
7061         * kern/disk.c (struct grub_disk_cache): Change the type of
7062         "sector" to grub_disk_addr_t.
7063         (grub_disk_cache_get_index): Change the type of SECTOR to
7064         grub_disk_addr_t. Calculate the hash with SECTOR casted to
7065         unsigned after shifting.
7066         (grub_disk_cache_invalidate): Change the type of SECTOR to
7067         grub_disk_addr_t.
7068         (grub_disk_cache_unlock): Likewise.
7069         (grub_disk_cache_store): Likewise.
7070         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7071         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7072         grub_disk_addr_t and grub_uint64_t, respectively.
7073         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7074         body, as the value of OFFSET is tweaked by
7075         grub_disk_check_range. Change the types of START_SECTOR, LEN and
7076         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7077         respectively.
7078         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7079         body, as the value of OFFSET is tweaked by
7080         grub_disk_check_range. Change the types of LEN and N to
7081         grub_size_t.
7083         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7084         and "saved_offset" to grub_off_t.
7085         (test_header): Cast BUF to char *.
7086         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7087         to char *.
7088         (grub_gzio_read): Change the types of OFFSET and SIZE to
7089         grub_off_t and grub_size_t, respectively.
7091         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7092         Removed.
7093         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7094         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7095         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7096         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7097         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7099         * include/grub/types.h (grub_off_t): Unconditionally set to
7100         grub_uint64_t.
7101         (grub_disk_addr_t): Changed to grub_uint64_t.
7103         * include/grub/partition.h (struct grub_partition): Change the
7104         types of "start", "len" and "offset" to grub_disk_addr_t,
7105         grub_uint64_t and grub_disk_addr_t, respectively.
7106         (grub_partition_get_start): Return grub_disk_addr_t.
7107         (grub_partition_get_len): Return grub_uint64_t.
7109         * include/grub/misc.h (grub_strtoull): New prototype.
7110         (grub_divmod64): Likewise.
7112         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7113         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7114         grub_off_t, respectively.
7115         All callers and references changed.
7117         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7118         grub_size_t in "read".
7119         All callers and references changed.
7121         * include/grub/file.h (struct grub_file): Change the types of
7122         "offset" and "size" to grub_off_t and grub_off_t,
7123         respectively. Change the type of SECTOR to grub_disk_addr_t in
7124         "read_hook".
7125         (grub_file_read): Change the type of LEN to grub_size_t.
7126         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7127         grub_off_t.
7128         (grub_file_size): Return grub_off_t.
7129         (grub_file_tell): Likewise.
7130         All callers and references changed.
7132         * include/grub/disk.h (struct grub_disk_dev): Change the types of
7133         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7134         "write".
7135         (struct grub_disk): Change the type of "total_sectors" to
7136         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7137         "read_hook".
7138         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7139         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7140         (grub_disk_write): Likewise.
7141         All callers and references changed.
7143         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7144         char * for grub_strncmp to silence gcc.
7145         (grub_iso9660_mount): Likewise.
7146         (grub_iso9660_mount): Likewise.
7147         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7148         return statement.
7149         (grub_iso9660_iterate_dir): Likewise.
7150         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7152         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7153         LEN to grub_disk_addr_t and grub_size_t, respectively.
7155         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7157         * fs/jfs.c (grub_jfs_read_file): Likewise.
7159         * fs/minix.c (grub_jfs_read_file): Likewise.
7161         * fs/sfs.c (grub_jfs_read_file): Likewise.
7163         * fs/ufs.c (grub_jfs_read_file): Likewise.
7165         * fs/xfs.c (grub_jfs_read_file): Likewise.
7167         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7168         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7169         respectively.
7171         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7172         BLKNR to -1 instead of returning GRUB_ERRNO.
7173         (grub_ext2_read_file): Change the types of SECTOR and
7174         LEN to grub_disk_addr_t and grub_size_t, respectively.
7176         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7177         LEN to grub_disk_addr_t and grub_size_t, respectively.
7179         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7180         grub_file_read.
7182         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7183         string. Do not cast SECTOR explicitly.
7185         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7186         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7187         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7188         grub_disk_addr_t and grub_size_t, respectively. If the sector is
7189         over 2TB and LBA mode is not supported, raise an error.
7190         (get_safe_sectors): New function.
7191         (grub_biosdisk_read): Use get_safe_sectors.
7192         (grub_biosdisk_write): Likewise.
7194         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7195         (grub_efidisk_write): Likewise.
7197         * disk/loopback.c (delete_loopback): Cosmetic changes.
7198         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7199         correctly.
7200         (grub_loopback_open): Likewise.
7201         (grub_loopback_read): Likewise. Also, change the type of POS to
7202         grub_off_t, and fix the usage of grub_memset.
7204         * commands/i386/pc/play.c: Include grub/machine/time.h.
7206         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7207         print FILE->SIZE.
7209         * commands/configfile.c: Include grub/env.h.
7211         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7212         GRUB_ERRNO directly instead. Change the type of POS to
7213         grub_off_t. Follow the coding standard.
7215         * commands/blocklist.c: Include grub/partition.h.
7216         (grub_cmd_blocklist): Return an error if the underlying device is
7217         not a disk. Take the starting sector of a partition into account,
7218         if a partition is used.
7220         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7221         a length field.
7222         (lba_mode): Support 64-bit addresses.
7223         (chs_mode): Likewise.
7224         (copy_buffer): Adapted to the new offsets of a length field and a
7225         segment field.
7226         (blocklist_default_start): Allocate 64-bit space.
7228         * boot/i386/pc/boot.S (force_lba): Removed.
7229         (boot_drive): Moved to under KERNEL_SECTOR.
7230         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7231         space.
7232         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7233         is useless.
7234         (lba_mode): Refactored to support a 64-bit address. More size
7235         optimization.
7236         (setup_sectors): Likewise.
7238 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
7240         * DISTLIST: Added include/grub/i386/linux.h. Removed
7241         include/grub/i386/pc/linux.h
7243         * configure.ac (AC_INIT): Bumped to 1.94.
7245         * config.guess: Updated from gnulib.
7246         * config.sub: Likewise.
7247         * install-sh: Likewise.
7248         * mkinstalldirs: Likewise.
7250 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
7252         * conf/common.rmk (grub_modules_init.lst): Depended on
7253         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7254         MODSRCFILES.
7256         * genmk.rb (PModule::rule): Reverted the previous change.
7258 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
7260         * conf/common.rmk (grub_modules_init.lst): Depends on
7261         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7262         that the target does not exist before producing.
7263         (grub_modules_init.h): Remove the target before generating.
7264         (grub_emu_init.c): Likewise.
7266         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7268 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
7270         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7271         for the target-specific tests. Make sure that we also have the
7272         up-to-date target variables for those tests.
7274 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
7276         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7277         (PModule::rule): Likewise.
7279 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
7281         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7282         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7283         target-specific flags should be prefixed.
7284         (PModule::rule): Likewise.
7286 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
7288         * configure.ac (CMP): Check if cmp is available explicitly.
7290 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
7292         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7293         (target_cpu): New variable.
7294         (pkglibdir): Use target_cpu instead of host_cpu.
7296         * util/i386/pc/grub-install.in (host_cpu): Removed.
7297         (target_cpu): New variable.
7298         (pkglibdir): Use target_cpu instead of host_cpu.
7300         * util/genmoddep.c: Removed.
7302         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7303         instead of GRUB_HOST_SIZEOF_VOID_P.
7304         * kern/dl.c: Likewise.
7306         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7307         ...
7308         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7309         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7310         (GRUB_TARGET_SIZEOF_LONG): ... this.
7311         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7312         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7313         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7314         to ...
7315         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7316         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7317         (GRUB_TARGET_SIZEOF_LONG): ... this.
7318         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7319         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7320         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7321         to ...
7322         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7323         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7324         (GRUB_TARGET_SIZEOF_LONG): ... this.
7325         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7326         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7328         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7329         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7330         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7331         instead of GRUB_HOST_SIZEOF_LONG.
7332         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7333         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7334         GRUB_CPU_WORDS_BIGENDIAN.
7335         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7336         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7337         grub_host_ssize_t.
7339         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7340         (genmoddep_SOURCES): Likewise.
7341         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7342         (genmoddep_SOURCES): Likewise.
7343         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7344         (genmoddep_SOURCES): Likewise.
7345         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7346         Likewise.
7347         (genmoddep_SOURCES): Likewise.
7349         * genmoddep.awk: New file.
7351         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7352         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7353         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7354         (PModule::rule): Likewise.
7355         (Program::rule): Likewise.
7356         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7357         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7358         respectively.
7360         * configure.ac: Rewritten intensively to use host and target
7361         instead of build and host, respectively.
7363         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7364         (host_cpu): Removed.
7365         (target_cpu): New variable.
7366         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7367         (BUILD_CC): Removed.
7368         (BUILD_CFLAGS): Likewise.
7369         (BUILD_CPPFLAGS): Likewise.
7370         (TARGET_CC): New variable.
7371         (TARGET_CFLAGS): Likewise.
7372         (TARGET_CPPFLAGS): Likewise.
7373         (TARGET_LDFLAGS): Likewise.
7374         (AWK): Likewise.
7375         (include): Use target_cpu instead of host_cpu.
7376         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7378         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7380 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
7382         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7383         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
7384         field 'false' to 'exec_on_false'.
7385         (grub_script_create_cmdif): Renamed argument names to reflect above
7386         changes.
7388         * normal/execute.c (grub_script_execute_cmdif): Likewise.
7390         * normal/script.c (grub_script_create_cmdif): Likewise.
7392 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
7394         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7395         top.
7396         (grub_hfsplus_btree_recptr): Likewise.
7397         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7398         FILEBLOCK both to pass a block number and store next block
7399         number.
7400         (grub_hfsplus_read_block): Rewritten heavily to support an extent
7401         overflow file correctly. Specify errors appropriately, because
7402         fshelp expects that GRUB_ERRNO is set when fails. Reuse
7403         grub_hfsplus_btree_recptr to get the pointer to a found key.
7404         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7405         is found.
7407         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7408         linux.mod.
7409         (_linux_mod_SOURCES): New variable.
7410         (_linux_mod_CFLAGS): Likewise.
7411         (_linux_mod_LDFLAGS): Likewise.
7412         (linux_mod_SOURCES): Likewise.
7413         (linux_mod_CFLAGS): Likewise.
7414         (linux_mod_LDFLAGS): Likewise.
7416         * DISTLIST: Added loader/i386/efi/linux.c,
7417         loader/i386/efi/linux_normal.c and
7418         include/grub/i386/efi/loader.h.
7420         * loader/i386/efi/linux.c: New file.
7421         * loader/i386/efi/linux_normal.c: Likewise.
7422         * include/grub/i386/efi/loader.h: Likewise.
7424 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
7426         * commands/blocklist.c: New file.
7428         * DISTLIST: Added commands/blocklist.c.
7430         * term/efi/console.c (grub_console_highlight_color): Use a lighter
7431         color for the background, and a darker color for the foreground.
7432         (grub_console_checkkey): Return READ_KEY.
7433         (grub_console_cls): Set the background to
7434         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7436         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7438         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7439         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7441         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7442         prototype.
7444         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7445         BG. The spec is wrong again.
7447         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7448         prototype.
7449         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7451         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7452         commands/blocklist.c.
7453         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7455         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7456         (blocklist_mod_SOURCES): New variable.
7457         (blocklist_mod_CFLAGS): Likewise.
7458         (blocklist_mod_LDFLAGS): Likewise.
7460 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
7462         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7463         duplication.
7464         (lba_mode): Use %eax more intensively to reduce the code size.
7466 2006-05-20  Marco Gerards  <marco@gnu.org>
7468         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7470         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
7471         for `menuentry'.
7472         (script): Accept leading newlines.
7473         (newlines): New rule to describe 0 or more newlines.
7474         (commands): Accept `command' with trailing newline.  Fixed the
7475         order in which arguments were passed to `grub_script_add_cmd'.
7476         Accept commands separated by newlines.
7477         (function): Changed to accept newlines.
7478         (menuentry) Rewritten.
7480         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7481         front of the list, instead of to the end.
7483 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
7485         * util/i386/pc/grub-install.in (bindir): New variable.
7486         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7487         Shaver <lbgwjl@gmail.com>.
7489 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
7491         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7492         grub/machine/linux.h
7493         * loader/i386/pc/linux.c: Likewise.
7495         * include/grub/i386/pc/linux.h: Moved to ...
7496         * include/grub/i386/linux.h: ... here.
7498         * include/grub/i386/linux.h (struct linux_kernel_params): New
7499         struct.
7501 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
7503         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7504         checking.
7505         (grub_video_vbe_blit_glyph): Likewise.
7506         (grub_video_vbe_blit_bitmap): Likewise.
7507         (grub_video_vbe_blit_render_target): Likewise.
7509 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
7511         * configure.ac (--with-platform): Properly quote the square
7512         brackets.
7514 2006-05-08  Marco Gerards  <marco@gnu.org>
7516         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7517         this...
7518         (kernel_elf_HEADERS): ...to this.  Updated all users.
7519         (grubof_symlist.c): Renamed from this...
7520         (kernel_elf_symlist.c): ...to this.  Updated all users.
7521         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7522         (grubof_SOURCES): Renamed from this...
7523         (kernel_elf_SOURCES): ...to this.
7524         (grubof_HEADERS): Renamed from this...
7525         (kernel_elf_HEADERS): ...to this.
7526         (grubof_CFLAGS): Renamed from this...
7527         (kernel_elf_CFLAGS): ...to this.
7528         (grubof_ASFLAGS): Renamed from this...
7529         (kernel_elf_ASFLAGS): ...to this.
7530         (grubof_LDFLAGS): Renamed from this...
7531         (kernel_elf_LDFLAGS): ...to this.
7533         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
7534         this...
7535         (kernel_elf_HEADERS): ...to this.  Updated all users.
7536         (grubof_symlist.c): Renamed from this...
7537         (kernel_elf_symlist.c): ...to this.  Updated all users.
7538         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7539         (grubof_SOURCES): Renamed from this...
7540         (kernel_elf_SOURCES): ...to this.
7541         (grubof_HEADERS): Renamed from this...
7542         (kernel_elf_HEADERS): ...to this.
7543         (grubof_CFLAGS): Renamed from this...
7544         (kernel_elf_CFLAGS): ...to this.
7545         (grubof_ASFLAGS): Renamed from this...
7546         (kernel_elf_ASFLAGS): ...to this.
7547         (grubof_LDFLAGS): Renamed from this...
7548         (kernel_elf_LDFLAGS): ...to this.
7550         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
7551         `kernel.elf' instead of `grubof'.
7553 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
7555         Add --with-platform to configure. Use pkglibdir instead of
7556         pkgdatadir. This is reported by Roger Leigh.
7558         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
7559         (host_vendor): Likewise.
7560         (host_os): Likewise.
7561         (pkgdatadir): Likewise.
7562         (platform): New variable.
7563         (pkglibdir): Likewise.
7564         Use PKGLIBDIR instead of PKGDATADIR.
7566         * util/i386/pc/grub-install.in (datadir): Removed.
7567         (host_vendor): Likewise.
7568         (host_os): Likewise.
7569         (pkgdatadir): Likewise.
7570         (platform): New variable.
7571         (pkglibdir): Likewise.
7572         Use PKGLIBDIR instead of PKGDATADIR.
7574         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
7575         instead of GRUB_DATADIR.
7576         (main): Likewise.
7577         * util/i386/pc/grub-mkimage.c (usage): Likewise.
7578         (main): Likewise.
7579         * util/i386/efi/grub-mkimage.c (usage): Likewise.
7580         (main): Likewise.
7582         * configure.ac (--with-platform): New option.
7583         Use PLATFORM instead of HOST_VENDOR to specify a platform.
7585         * Makefile.in: Include a makefile based on PLATFORM instead of
7586         HOST_VENDOR.
7587         (pkgdatadir): Not appended by the machine type.
7588         (pkglibdir): Appended by the machine type.
7589         (host_vendor): Removed.
7590         (platform): New variable.
7591         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
7592         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
7593         (uninstall): Likewise.
7595 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
7597         Use the environment context in the menu. Remove the commands
7598         "default" and "timeout", and use variables instead.
7600         * normal/menu.c: Include grub/env.h.
7601         (print_entry): Cast TITLE to silence gcc.
7602         (get_timeout): New function.
7603         (set_timeout): Likewise.
7604         (get_entry_number): Likewise.
7605         (run_menu): Use a default entry, a fallback entry and a timeout
7606         in the environment variables "default", "fallback" and
7607         "timeout". Also, tweak the default entry if it is not within the
7608         current menu entries.
7609         (grub_menu_run): Use a fallback entry in the environment variable
7610         "fallback".
7612         * normal/main.c (read_config_file): Do not initialize
7613         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7614         NEWMENU->TIMEOUT.
7615         (grub_normal_execute): Use a data slot to store the menu.
7617         * include/grub/normal.h (struct grub_menu): Removed default_entry,
7618         fallback_entry and timeout.
7619         (struct grub_menu_list): Removed.
7620         (grub_menu_list_t): Likewise.
7621         (struct grub_context): Likewise.
7622         (grub_context_t): Likewise.
7623         (grub_context_get): Likewise.
7624         (grub_context_get_current_menu): Likewise.
7625         (grub_context_push_menu): Likewise.
7626         (grub_context_pop_menu): Likewise.
7627         (grub_default_init): Likewise.
7628         (grub_default_fini): Likewise.
7629         (grub_timeout_init): Likewise.
7630         (grub_timeout_fini): Likewise.
7632         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7633         and timeout.mod.
7634         (normal_mod_SOURCES): Removed normal/context.c.
7636         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7637         commands/default.c, commands/timeout.c and normal/context.c.
7638         (normal_mod_SOURCES): Removed normal/context.c.
7640         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7641         commands/timeout.c and normal/context.c.
7642         (normal_mod_SOURCES): Removed normal/context.c.
7644         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7645         commands/default.c, commands/timeout.c and normal/context.c.
7646         (normal_mod_SOURCES): Removed normal/context.c.
7648         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7649         timeout.mod.
7650         (default_mod_SOURCES): Removed.
7651         (default_mod_CFLAGS): Likewise.
7652         (default_mod_LDFLAGS): Likewise.
7653         (timeout_mod_SOURCES): Removed.
7654         (timeout_mod_CFLAGS): Likewise.
7655         (timeout_mod_LDFLAGS): Likewise.
7657         * DISTLIST: Removed commands/default.c, commands/timeout.c and
7658         normal/context.c.
7660         * commands/default.c: Removed.
7661         * commands/timeout.c: Likewise.
7662         * normal/context.c: Likewise.
7664 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
7666         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
7668 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
7670         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
7671         "next" to "prev" for readability.
7672         (struct grub_env_sorted_var): New struct.
7673         (grub_env_context): Renamed to ...
7674         (initial_context): ... this.
7675         (grub_env_var_context): Renamed to ...
7676         (current_context): ... this.
7677         (grub_env_find): Look only at CURRENT_CONTEXT.
7678         (grub_env_context_open): Rewritten to copy exported variables from
7679         previous context.
7680         (grub_env_context_close): Rewritten according to the new
7681         scheme. Also, add an assertion to prevent the initial context from
7682         removed.
7683         (grub_env_insert): Removed the code for the sorted list.
7684         (grub_env_remove): Likewise.
7685         (grub_env_export): Simply mark the variable with
7686         GRUB_ENV_VAR_GLOBAL.
7687         (grub_env_set): A cosmetic change for naming consistency.
7688         (grub_env_get): Likewise.
7689         (grub_env_unset): Likewise.
7690         (grub_env_iterate): Rewritten to sort variables within this
7691         function.
7692         (grub_register_variable_hook): Fixed for naming consistency. Call
7693         grub_env_find again, only if NAME is not found at the first time.
7694         (mangle_data_slot_name): New function.
7695         (grub_env_set_data_slot): Likewise.
7696         (grub_env_get_data_slot): Likewise.
7697         (grub_env_unset_data_slot): Likewise.
7699         * include/grub/env.h (grub_env_var_type): New enum.
7700         (GRUB_ENV_VAR_LOCAL): New constant.
7701         (GRUB_ENV_VAR_GLOBAL): Likewise.
7702         (GRUB_ENV_VAR_DATA): Likewise.
7703         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
7704         "type".
7705         (grub_env_set): Replace VAR with NAME for consistency.
7706         (grub_register_variable_hook): Likewise.
7707         (grub_env_export): Specify the name of the argument.
7708         (grub_env_set_data_slot): New prototype.
7709         (grub_env_get_data_slot): Likewise.
7710         (grub_env_unset_data_slot): Likewise.
7712 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
7714         Extend the loader so that GRUB can accept a loader which comes
7715         back to GRUB when a loaded image exits. Also, this change adds
7716         support for a chainloader on EFI.
7718         * term/efi/console.c: Include grub/misc.h.
7719         (grub_console_checkkey): Display a scan code on the top for
7720         debugging. This will be removed once the EFI port gets stable.
7721         Correct the scan code mapping.
7723         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
7724         allocate memory from larger regions, in order to reduce the number
7725         of allocated regions. Otherwise, the MacOSX loader panics.
7726         (filter_memory_map): Avoid less than 1MB for compatibility with
7727         other loaders.
7728         (add_memory_regions): Allocate from the tail of a region, if
7729         possible, to avoid allocating a region near to 1MB, for the MacOSX
7730         loader.
7732         * kern/efi/init.c (grub_efi_set_prefix): Specify
7733         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
7735         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
7736         argument IMAGE_HANDLE and specify it to get a loaded image.
7737         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
7738         grub_efi_get_loaded_image.
7739         (grub_efi_get_filename): Divide the length by the size of
7740         grub_efi_char16_t.
7741         (grub_efi_get_device_path): New function.
7742         (grub_efi_print_device_path): Print End Device Path nodes. Divide
7743         the length by the size of grub_efi_char16_t for a file path device
7744         path node.
7746         * kern/loader.c (grub_loader_noreturn): New variable.
7747         (grub_loader_set): Accept a new argument NORETURN. Set
7748         GRUB_LOADER_NORETURN to NORETURN.
7749         All callers changed.
7750         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
7751         grub_machine_fini.
7753         * include/grub/efi/efi.h (grub_efi_get_device_path): New
7754         prototype.
7755         (grub_efi_get_loaded_image): Take an argument to specify an image
7756         handle.
7758         * include/grub/loader.h (grub_loader_set): Added one more argument
7759         NORETURN.
7761         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
7762         instead of grub_efi_open_protocol.
7763         (grub_efidisk_get_device_name): Likewise.
7764         (grub_efidisk_close): Print a newline.
7765         (grub_efidisk_get_device_handle): Fixed to use
7766         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
7767         GRUB_EFI_DEVICE_PATH_TYPE.
7769         * disk/efi/efidisk.c (device_path_guid): Moved to ...
7770         * kern/efi/efi.c (device_path_guid): ... here.
7772         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
7773         chain.mod.
7774         (kernel_mod_HEADERS): Added efi/disk.h.
7775         (_chain_mod_SOURCES): New variable.
7776         (_chain_mod_CFLAGS): Likewise.
7777         (_chain_mod_LDFLAGS): Likewise.
7778         (chain_mod_SOURCES): Likewise.
7779         (chain_mod_CFLAGS): Likewise.
7780         (chain_mod_LDFLAGS): Likewise.
7782         * DISTLIST: Added include/grub/efi/chainloader.h,
7783         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
7785         * include/grub/efi/chainloader.h: New file.
7786         * loader/efi/chainloader.c: Likewise.
7787         * loader/efi/chainloader_normal.c: Likewise.
7789 2006-04-30  Marco Gerards  <marco@gnu.org>
7791         * commands/configfile.c (grub_cmd_source): New function.
7792         (GRUB_MOD_INIT): Register the commands `source' and `.'.
7793         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
7795 2006-04-30  Marco Gerards  <marco@gnu.org>
7797         * normal/execute.c (grub_script_execute_cmd): Change the return
7798         type to `grub_err_t'.  Correctly return the error.
7799         (grub_script_execute_cmdline): In case a command line is not a
7800         command or a function, try to interpret it as an assignment.
7802 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
7804         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
7805         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
7806         skip a node whose name is obviously invalid as UTF-16,
7807         i.e. contains a NUL character. Stop the iteration when the last
7808         directory entry is found. Instead of using the return value of
7809         grub_hfsplus_btree_iterate_node, store the value in RET and use
7810         it, because the iterator can be stopped by the last directory
7811         entry.
7813 2006-04-30  Marco Gerards  <marco@gnu.org>
7815         * include/grub/env.h (grub_env_export): New prototype.  Reported
7816         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
7818 2006-04-30  Marco Gerards  <marco@gnu.org>
7820         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
7821         size of the extents in a catalog file record.
7823 2006-04-29  Marco Gerards  <marco@gnu.org>
7825         * commands/configfile.c (grub_cmd_configfile): Execute the
7826         configfile within its own context.
7828         * include/grub/env.h (grub_env_context_open): New prototype.
7829         (grub_env_context_close): Likewise.
7831         * kern/env.c (grub_env): Removed.
7832         (grub_env_sorted): Likewise.
7833         (grub_env_context): New variable.
7834         (grub_env_var_context): Likewise.
7835         (grub_env_find): Search both the active context and the global
7836         context.
7837         (grub_env_context_open): New function.
7838         (grub_env_context_close): Likewise.
7839         (grub_env_insert): Likewise.
7840         (grub_env_remove): Likewise.
7841         (grub_env_export): Likewise.
7842         (grub_env_set): Changed to use helper functions to avoid code
7843         duplication.
7844         (grub_env_iterate): Rewritten so both the current context and the
7845         global context are being used.
7847         * normal/command.c (export_command): New function.
7848         (grub_command_init): Register the `export' function.
7850 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
7852         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
7853         explicitly to suppress gcc's warnings.
7854         * fs/fat.c (grub_fat_find_dir): Likewise.
7855         (grub_fat_label): Likewise.
7856         * fs/xfs.c (grub_xfs_read_inode): Likewise.
7857         (grub_xfs_mount): Likewise.
7858         (grub_xfs_label): Likewise.
7859         * fs/affs.c (grub_affs_mount): Likewise.
7860         (grub_affs_label): Likewise.
7861         (grub_affs_iterate_dir): Likewise.
7862         * fs/sfs.c (grub_sfs_mount): Likewise.
7863         (grub_sfs_iterate_dir): Likewise.
7864         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
7865         * fs/hfs.c (grub_hfs_mount): Likewise.
7866         (grub_hfs_cmp_catkeys): Likewise.
7867         (grub_hfs_find_dir): Likewise.
7868         (grub_hfs_dir): Likewise.
7869         (grub_hfs_label): Likewise.
7870         * fs/jfs.c (grub_jfs_mount): Likewise.
7871         (grub_jfs_opendir): Likewise.
7872         (grub_jfs_getent): Likewise.
7873         (grub_jfs_lookup_symlink): Likewise.
7874         (grub_jfs_label): Likewise.
7875         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
7876         (grub_hfsplus_iterate_dir): Likewise.
7877         (grub_hfsplus_btree_iterate_node): Made static.
7879         * util/grub-emu.c (prefix): New variable.
7880         (grub_machine_set_prefix): New function.
7881         (main): Do not set the environment variable "prefix" here. Only
7882         set PREFIX, which is used later by grub_machine_set_prefix.
7884         * include/grub/video.h: Do not include grub/symbol.h.
7885         (grub_video_register): Not exported. This symbol is not defined in
7886         the kernel.
7887         (grub_video_unregister): Likewise.
7888         (grub_video_iterate): Likewise.
7889         (grub_video_setup): Likewise.
7890         (grub_video_restore): Likewise.
7891         (grub_video_get_info): Likewise.
7892         (grub_video_get_blit_format): Likewise.
7893         (grub_video_set_palette): Likewise.
7894         (grub_video_get_palette): Likewise.
7895         (grub_video_set_viewport): Likewise.
7896         (grub_video_get_viewport): Likewise.
7897         (grub_video_map_color): Likewise.
7898         (grub_video_map_rgb): Likewise.
7899         (grub_video_map_rgba): Likewise.
7900         (grub_video_fill_rect): Likewise.
7901         (grub_video_blit_glyph): Likewise.
7902         (grub_video_blit_bitmap): Likewise.
7903         (grub_video_blit_render_target): Likewise.
7904         (grub_video_scroll): Likewise.
7905         (grub_video_swap_buffers): Likewise.
7906         (grub_video_create_render_target): Likewise.
7907         (grub_video_delete_render_target): Likewise.
7908         (grub_video_set_active_render_target): Likewise.
7910         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
7911         Undefined.
7912         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
7914         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
7915         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7916         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7917         instead of $(srcdir)/genkernsyms.sh.
7919         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
7920         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7921         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7922         instead of $(srcdir)/genkernsyms.sh.
7924         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
7925         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7926         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7927         instead of $(srcdir)/genkernsyms.sh.
7929         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
7930         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7931         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7932         instead of $(srcdir)/genkernsyms.sh.
7934         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
7935         genkernsyms.sh.
7937         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
7938         genkernsyms.sh.
7939         (gensymlist.sh): New target.
7940         (genkernsyms.sh): Likewise.
7942         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
7943         genkernsyms.sh.in and gensymlist.sh.in.
7945         * genkernsyms.sh: Removed.
7946         * gensymlist.sh: Likewise.
7948         * genkernsyms.sh.in: New file.
7949         * gensymlist.sh.in: Likewise.
7951 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
7953         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
7954         clobber "prefix", since we may have already set it manually.
7956 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
7958         * kern/misc.c (abort): New alias for grub_abort.
7960 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
7962         A new machine-specific function "grub_machine_set_prefix" is
7963         defined. This is called after loading modules, so that a prefix
7964         initialization can use modules. Also, this change adds an
7965         intensive debugging feature for the memory manager via the
7966         configure option "--enable-mm-debug".
7968         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
7969         PART.LEN.
7971         * kern/sparc64/ieee1275/init.c (abort): Removed.
7972         (grub_stop): Likewise.
7973         (grub_exit): New function.
7974         (grub_set_prefix): Renamed to ...
7975         (grub_machine_set_prefix): ... this.
7976         (grub_machine_init): Do not call grub_set_prefix.
7978         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
7979         (grub_machine_set_prefix): ... this.
7980         (grub_machine_init): Do not call grub_set_prefix.
7982         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
7983         (grub_machine_init): Do not set the prefix here.
7985         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
7987         * kern/efi/init.c: Include grub/mm.h.
7988         (grub_efi_set_prefix): New function.
7990         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
7991         (grub_efi_get_filename): New function.
7992         (grub_print_device_path): Renamed to ...
7993         (grub_efi_print_device_path): ... this.
7995         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
7996         [MM_DEBUG] (grub_realloc): Likewise.
7997         [MM_DEBUG] (grub_free): Likewise.
7998         [MM_DEBUG] (grub_memalign): Likewise.
7999         [MM_DEBUG] (grub_mm_debug): New variable.
8000         [MM_DEBUG] (grub_debug_malloc): New function.
8001         [MM_DEBUG] (grub_debug_free): New function.
8002         [MM_DEBUG] (grub_debug_realloc): New function.
8003         [MM_DEBUG] (grub_debug_memalign): New function.
8005         * kern/misc.c (grub_abort): Print a newline to distinguish
8006         the message.
8008         * kern/main.c (grub_main): Call grub_machine_set_prefix and
8009         grub_set_root_dev after loading modules. This is necessary when
8010         setting a prefix depends on modules.
8012         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8013         (grub_efi_print_device_path): ... this.
8014         (grub_efi_get_filename): New prototype.
8015         (grub_efi_set_prefix): Likewise.
8017         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8018         and grub/disk.h.
8019         (grub_efidisk_get_device_handle): New prototype.
8020         (grub_efidisk_get_device_name): Likewise.
8022         * include/grub/mm.h: Include config.h.
8023         (MM_DEBUG): Removed.
8024         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8025         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8026         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8027         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8028         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8029         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8030         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8031         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8032         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8034         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8036         * disk/efi/efidisk.c: Include grub/partition.h.
8037         (iterate_child_devices): New function.
8038         (add_device): First, compare only last device path nodes, so that
8039         devices are sorted by the types.
8040         (grub_efidisk_get_device_handle): New function.
8041         (grub_efidisk_get_device_name): Likewise.
8043         * configure.ac (--enable-mm-debug): New option to enable the
8044         memory manager debugging feature. This makes the binary much
8045         bigger, so is disabled by default.
8047 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
8049         Use grub_abort instead of grub_stop, and grub_exit must be
8050         define in each architecture now. Also, this change adds support
8051         for EFI disks.
8053         * util/i386/pc/grub-probefs.c: Include grub/term.h.
8054         (grub_getkey): New function.
8055         (grub_term_get_current): Likewise.
8057         * util/i386/pc/grub-setup.c: Include grub/term.h.
8058         (grub_getkey): New function.
8059         (grub_term_get_current): Likewise.
8061         * util/misc.c (grub_stop): Renamed to ...
8062         (grub_exit): ... this.
8064         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8065         (grub_exit): ... this.
8066         (grub_machine_init): Use grub_abort instead of abort.
8067         (grub_stop): Removed.
8069         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8070         abort.
8072         * kern/i386/pc/startup.S (grub_exit): New function.
8073         (cold_reboot): New label.
8075         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8076         (grub_efi_init): Call grub_efidisk_init.
8077         (grub_efi_fini): Call grub_efidisk_fini.
8079         * kern/efi/efi.c: Include grub/mm.h.
8080         (grub_efi_console_control_guid): Renamed to ...
8081         (console_control_guid): ... this.
8082         (grub_efi_loaded_image_guid): Renamed to ...
8083         (loaded_image_guid): ... this.
8084         (grub_efi_locate_handle): New function.
8085         (grub_efi_open_protocol): Likewise.
8086         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8087         GRUB_EFI_CONSOLE_CONTROL_GUID.
8088         (grub_efi_exit): Removed.
8089         (grub_stop): Likewise.
8090         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8091         (grub_exit): New function.
8092         (grub_print_device_path): Likewise.
8094         * kern/rescue.c (grub_rescue_cmd_exit): New function.
8095         (grub_enter_rescue_mode): Register "exit".
8097         * kern/misc.c (grub_real_dprintf): A cosmetic change.
8098         (grub_abort): New function.
8100         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8102         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8104         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8106         * include/grub/efi/efi.h (grub_efi_exit): Removed.
8107         (grub_print_device_path): New prototype.
8108         (grub_efi_locate_handle): Likewise.
8109         (grub_efi_open_protocol): Likewise.
8111         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8112         * disk/efi/efidisk.c: Likewise.
8114         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8116         * include/grub/efi/console_control.h
8117         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8119         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8120         last 8 bytes as an array.
8121         (GRUB_EFI_DISK_IO_GUID): New macro.
8122         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8123         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8124         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8125         grub_uint8_t.
8126         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8127         (struct grub_efi_device_path): Rename the member "sub_type" to
8128         "subtype".
8129         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8130         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8131         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8132         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8133         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8134         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8135         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8136         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8137         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8138         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8139         (struct grub_efi_pci_device_path): New structure.
8140         (grub_efi_pci_device_path_t): New type.
8141         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8142         (struct grub_efi_pccard_device_path): New structure.
8143         (grub_efi_pccard_device_path_t): New type.
8144         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8145         (struct grub_efi_memory_mapped_device_path): New structure.
8146         (grub_efi_memory_mapped_device_path_t): New type.
8147         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8148         (struct grub_efi_vendor_device_path): New structure.
8149         (grub_efi_vendor_device_path_t): New type.
8150         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8151         (struct grub_efi_controller_device_path): New structure.
8152         (grub_efi_controller_device_path_t): New type.
8153         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8154         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8155         (struct grub_efi_acpi_device_path): New structure.
8156         (grub_efi_acpi_device_path_t): New type.
8157         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8158         (struct grub_efi_expanded_acpi_device_path): New structure.
8159         (grub_efi_expanded_acpi_device_path_t): New type.
8160         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8161         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8162         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8163         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8164         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8165         (struct grub_efi_atapi_device_path): New structure.
8166         (grub_efi_atapi_device_path_t): New type.
8167         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8168         (struct grub_efi_fibre_channel_device_path): New structure.
8169         (grub_efi_fibre_channel_device_path_t): New type.
8170         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8171         (struct grub_efi_1394_device_path): New structure.
8172         (grub_efi_1394_device_path_t): New type.
8173         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8174         (struct grub_efi_usb_device_path): New structure.
8175         (grub_efi_usb_device_path_t): New type.
8176         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8177         (struct grub_efi_usb_class_device_path): New structure.
8178         (grub_efi_usb_class_device_path_t): New type.
8179         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8180         (struct grub_efi_i2o_device_path): New structure.
8181         (grub_efi_i2o_device_path_t): New type.
8182         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8183         (struct grub_efi_mac_address_device_path): New structure.
8184         (grub_efi_mac_address_device_path_t): New type.
8185         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8186         (struct grub_efi_ipv4_device_path): New structure.
8187         (grub_efi_ipv4_device_path_t): New type.
8188         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8189         (struct grub_efi_ipv6_device_path): New structure.
8190         (grub_efi_ipv6_device_path_t): New type.
8191         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8192         (struct grub_efi_infiniband_device_path): New structure.
8193         (grub_efi_infiniband_device_path_t): New type.
8194         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8195         (struct grub_efi_uart_device_path): New structure.
8196         (grub_efi_uart_device_path_t): New type.
8197         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8198         (struct grub_efi_vendor_messaging_device_path): New structure.
8199         (grub_efi_vendor_messaging_device_path_t): New type.
8200         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8201         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8202         (struct grub_efi_hard_drive_device_path): New structure.
8203         (grub_efi_hard_drive_device_path_t): New type.
8204         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8205         (struct grub_efi_cdrom_device_path): New structure.
8206         (grub_efi_cdrom_device_path_t): New type.
8207         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8208         (struct grub_efi_vendor_media_device_path): New structure.
8209         (grub_efi_vendor_media_device_path_t): New type.
8210         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8211         (struct grub_efi_file_path_device_path): New structure.
8212         (grub_efi_file_path_device_path_t): New type.
8213         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8214         (struct grub_efi_protocol_device_path): New structure.
8215         (grub_efi_protocol_device_path_t): New type.
8216         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8217         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8218         (struct grub_efi_bios_device_path): New structure.
8219         (grub_efi_bios_device_path_t): New type.
8220         (struct grub_efi_disk_io): New structure.
8221         (grub_efi_disk_io_t): New type.
8222         (struct grub_efi_block_io_media): New structure.
8223         (grub_efi_block_io_media_t): New type.
8224         (struct grub_efi_block_io): New structure.
8225         (grub_efi_block_io_t): New type.
8227         * include/grub/misc.h (grub_stop): Removed.
8228         (grub_exit): New prototype.
8229         (grub_abort): Likewise.
8231         * include/grub/disk.h (enum grub_disk_dev_id): Added
8232         GRUB_DISK_DEVICE_EFIDISK_ID.
8234         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8235         disk/efi/efidisk.c.
8236         (kernel_syms.lst): Remove the target if an error occurs.
8238 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
8240         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8241         as it was simply too buggy.
8243 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
8245         * kern/misc.c (grub_lltoa): New function.
8246         (grub_vsprintf): Added support for the long long suffix,
8247         i.e. "ll".
8249 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
8251         * Makefile.in (LDFLAGS): Add variable.
8252         (LD): Remove variable.
8253         * configure.ac: Add -m32 to LDFLAGS.
8254         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8255         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8256         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8257         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8258         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8259         variables.
8260         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8261         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8262         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8264 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
8266         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8267         length for unknown glyph.
8269 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
8271         Add support for pre-loaded modules into the EFI port.
8273         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8274         completely. Accept one more argument DIR. The caller has changed.
8276         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8278         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8279         (grub_efi_loaded_image_guid): New variable.
8280         (grub_efi_get_loaded_image): New function.
8281         (grub_arch_modules_addr): Likewise.
8283         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8284         prototype.
8286         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8287         (struct grub_efi_loaded_image): New structure.
8288         (grub_efi_loaded_image_t): New type.
8290 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
8292         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8293         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8294         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8296 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
8298         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8300 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
8302         * DISTLIST: Added include/grub/efi/console.h,
8303         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8304         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8306         * include/grub/efi/console.h: New file.
8307         * include/grub/efi/time.h: Likewise.
8308         * include/grub/i386/efi/kernel.h: Likewise.
8309         * kern/efi/init.c: Likewise.
8310         * kern/efi/mm.c: Likewise.
8311         * term/efi/console.c: Likewise.
8313         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8314         (grub_stop): Removed.
8315         (grub_get_rtc): Likewise.
8316         (grub_machine_init): Simply call grub_efi_init.
8317         (grub_machine_fini): Call grub_efi_fini.
8319         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8320         (grub_efi_output_string): Removed.
8321         (grub_efi_stall): New function.
8322         (grub_stop): Likewise.
8323         (grub_get_rtc): Likewise.
8325         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8326         (grub_efi_stall): New prototype.
8327         (grub_efi_allocate_pages): Likewise.
8328         (grub_efi_free_pages): Likewise.
8329         (grub_efi_get_memory_map): Likewise.
8330         (grub_efi_mm_init): Likewise.
8331         (grub_efi_mm_fini): Likewise.
8332         (grub_efi_init): Likewise.
8333         (grub_efi_fini): Likewise.
8335         * include/grub/i386/efi/time.h: Do not include
8336         grub/symbol.h. Include grub/efi/time.h.
8337         (GRUB_TICKS_PER_SECOND): Removed.
8338         (grub_get_rtc): Likewise.
8340         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8341         Added padding. The EFI spec is buggy.
8342         (GRUB_EFI_BLACK): New macro.
8343         (GRUB_EFI_BLUE): Likewise.
8344         (GRUB_EFI_GREEN): Likewise.
8345         (GRUB_EFI_CYAN): Likewise.
8346         (GRUB_EFI_RED): Likewise.
8347         (GRUB_EFI_MAGENTA): Likewise.
8348         (GRUB_EFI_BROWN): Likewise.
8349         (GRUB_EFI_LIGHTGRAY): Likewise.
8350         (GRUB_EFI_BRIGHT): Likewise.
8351         (GRUB_EFI_DARKGRAY): Likewise.
8352         (GRUB_EFI_LIGHTBLUE): Likewise.
8353         (GRUB_EFI_LIGHTGREEN): Likewise.
8354         (GRUB_EFI_LIGHTCYAN): Likewise.
8355         (GRUB_EFI_LIGHTRED): Likewise.
8356         (GRUB_EFI_LIGHTMAGENTA): Likewise.
8357         (GRUB_EFI_YELLOW): Likewise.
8358         (GRUB_EFI_WHITE): Likewise.
8359         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8360         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8361         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8362         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8363         (GRUB_EFI_BACKGROUND_RED): Likewise.
8364         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8365         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8366         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8367         (GRUB_EFI_TEXT_ATTR): Likewise.
8369         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8370         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8371         (kernel_mod_HEADERS): Added efi/time.h.
8373 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
8375         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8376         include/grub/efi/api.h, include/grub/efi/console_control.h,
8377         include/grub/efi/efi.h, include/grub/efi/pe32.h,
8378         include/grub/i386/efi/time.h, kern/efi/efi.c,
8379         kern/i386/efi/init.c, kern/i386/efi/startup.S,
8380         and util/i386/efi/grub-mkimage.c.
8382         * Makefile.in (RMKFILES): Added i386-efi.rmk.
8384         * genmk.rb (PModule#rule): Do not export symbols if
8385         #{prefix}_EXPORTS is set to "no".
8387         * conf/i386-efi.mk: New file.
8388         * conf/i386-efi.rmk: Likewise.
8389         * include/grub/efi/api.h: Likewise.
8390         * include/grub/efi/console_control.h: Likewise.
8391         * include/grub/efi/efi.h: Likewise.
8392         * include/grub/efi/pe32.h: Likewise.
8393         * include/grub/i386/efi/time.h: Likewise.
8394         * kern/efi/efi.c: Likewise.
8395         * kern/i386/efi/init.c: Likewise.
8396         * kern/i386/efi/startup.S: Likewise.
8397         * util/i386/efi/grub-mkimage.c: Likewise.
8399 2006-04-17  Marco Gerards  <marco@gnu.org>
8401         * include/grub/script.h: Include <grub/parser.h> and
8402         "grub_script.tab.h".
8403         (struct grub_lexer_param): New struct.
8404         (struct grub_parser_param): Likewise.
8405         (grub_script_create_arglist): Pass the state in an argument.
8406         (grub_script_add_arglist): Likewise.
8407         (grub_script_create_cmdline): Likewise.
8408         (grub_script_create_cmdblock): Likewise.
8409         (grub_script_create_cmdif): Likewise.
8410         (grub_script_create_cmdmenu): Likewise.
8411         (grub_script_add_cmd): Likewise.
8412         (grub_script_arg_add): Likewise.
8413         (grub_script_lexer_ref): Likewise.
8414         (grub_script_lexer_deref): Likewise.
8415         (grub_script_lexer_record_start): Likewise.
8416         (grub_script_lexer_record_stop): Likewise.
8417         (grub_script_mem_record): Likewise.
8418         (grub_script_mem_record_stop): Likewise.
8419         (grub_script_malloc): Likewise.
8420         (grub_script_yylex): Likewise.
8421         (grub_script_yyparse): Likewise.
8422         (grub_script_yyerror): Likewise.
8423         (grub_script_yylex): Likewise.
8424         (grub_script_lexer_init): Return the state.
8426         * normal/lexer.c (grub_script_lexer_state): Removed variable.
8427         (grub_script_lexer_done): Likewise.
8428         (grub_script_lexer_getline): Likewise.
8429         (grub_script_lexer_refs): Likewise.
8430         (script): Likewise.
8431         (newscript): Likewise.
8432         (record): Likewise.
8433         (recording): Likewise.
8434         (recordpos): Likewise.
8435         (recordlen): Likewise.
8436         (grub_script_lexer_init): Return the state instead of setting
8437         global variables.
8438         (grub_script_lexer_ref): Use the newly added argument for state
8439         instead of globals.
8440         (grub_script_lexer_deref): Likewise.
8441         (grub_script_lexer_record_start): Likewise.
8442         (grub_script_lexer_record_stop): Likewise.
8443         (recordchar): Likewise.
8444         (nextchar): Likewise.
8445         (grub_script_yylex2): Likewise.
8446         (grub_script_yylex): Likewise.
8447         (grub_script_yyerror): Likewise.
8449         * normal/parser.y (func_mem): Removed variable.
8450         (menu_entry): Likewise.
8451         (err): Likewise.
8452         (%lex-param): New parser option.
8453         (%parse-param): Likewise.
8454         (script): Always return the AST.
8455         (argument): Pass the state around.
8456         (arguments): Likewise.
8457         (grubcmd): Likewise.
8458         (commands): Likewise.
8459         (function): Likewise.
8460         (menuentry): Likewise.
8461         (if_statement): Likewise.
8462         (if): Likewise.
8464         * normal/script.c (grub_script_memused): Removed variable.
8465         (grub_script_parsed): Likewise.
8466         (grub_script_malloc): Added a state argument.  Use that instead of
8467         global variables.
8468         (grub_script_mem_record): Likewise.
8469         (grub_script_mem_record_stop): Likewise.
8470         (grub_script_arg_add): Likewise.
8471         (grub_script_add_arglist): Likewise.
8472         (grub_script_create_cmdline): Likewise.
8473         (grub_script_create_cmdif): Likewise.
8474         (grub_script_create_cmdmenu): Likewise.
8475         (grub_script_add_cmd): Likewise.
8476         (grub_script_parse): Setup the state before calling the parser.
8478 2006-04-16  Marco Gerards  <marco@gnu.org>
8480         * normal/command.c (grub_command_init): Remove the title command.
8482         * normal/lexer.c (grub_script_yylex): Renamed from this...
8483         (grub_script_yylex2): ... to this.
8484         (grub_script_yylex): New function.  Temporary
8485         introduced to filter some tokens.
8486         (grub_script_yyerror): Print a newline.
8488         * normal/main.c (read_config_file): Output information about the
8489         lines that contain errors.  Wait for a key after all lines have
8490         been processed.  Don't return an empty menu.
8492         * normal/parser.y (func_mem): Don't initialize.
8493         (menu_entry): Likewise.
8494         (err): New variable.
8495         (script): Don't return anything when an error was encountered.
8496         (ws, returns): Removed rules.
8497         (argument): Disabled concatenated variable support.
8498         (arguments): Remove explicit separators.
8499         (grubcmd): Likewise.
8500         (function): Likewise.
8501         (menuentry): Likewise.
8502         (if): Likewise.
8503         (commands): Likewise.  Add error handling.
8505         * normal/script.c (grub_script_create_cmdline): If
8506         `grub_script_parsed' is 0, assume the parser encountered an error.
8508 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
8510         * configure.ac: Add support for EFI. Fix the typo
8511         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8513 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
8515         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
8516         foreign multibyte characters should be shown correctly.
8518 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
8520         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8521         calculation.
8522         (read_config_file): Made it to close file before returning.
8524 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
8526         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
8527         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
8528         video/i386/pc/vbefill.c.
8530         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
8531         video/i386/pc/vbefill.c.
8533         * include/grub/video.h (grub_video_blit_format): New enum.
8534         (grub_video_mode_info): Added new member blit_format.
8535         (grub_video_get_blit_format): New function prototype.
8537         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
8538         function prototype.
8539         (grub_video_vbe_map_rgb): Likewise.
8540         (grub_video_vbe_unmap_color): Likewise.
8542         * include/grub/i386/pc/vbeblit.h: New file.
8544         * include/grub/i386/pc/vbefill.h: New file.
8546         * video/video.c (grub_video_get_blit_format): New function.
8547         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
8548         (grub_video_vbe_map_rgb): Likewise.
8549         (grub_video_vbe_unmap_color): Likewise.
8551         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
8552         optimized fills.
8553         (grub_video_vbe_blit_render_target): Changed to use more optimized
8554         blits.
8555         (grub_video_vbe_setup): Added detection for optimized settings.
8556         (grub_video_vbe_create_render_target): Likewise.
8558         * video/i386/pc/vbeblit.c: New file.
8560         * video/i386/pc/vbefill.c: New file.
8562 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
8564         * font/manager.c (grub_font_get_glyph): Removed font fixup from
8565         here...
8567         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
8568         parsing to support both hex and dec ranges.  If filename was missing
8569         show usage information.
8571 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
8573         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
8574         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
8576         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
8577         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
8578         (video_mod_SOURCES): Added.
8579         (video_mod_CFLAGS): Likewise.
8580         (video_mod_LDFLAGS): Likewise.
8581         (gfxterm_mod_SOURCES): Likewise.
8582         (gfxterm_mod_CFLAGS): Likewise.
8583         (gfxterm_mod_LDFLAGS): Likewise.
8584         (videotest_mod_SOURCES): Likewise.
8585         (videotest_mod_CFLAGS): Likewise.
8586         (videotest_mod_LDFLAGS): Likewise.
8587         (vesafb_mod_SOURCES): Removed.
8588         (vesafb_mod_CFLAGS): Likewise.
8589         (vesafb_mod_LDFLAGS): Likewise.
8590         (vga_mod_SOURCES): Likewise.
8591         (vga_mod_CFLAGS): Likewise.
8592         (vga_mod_LDFLAGS): Likewise.
8594         * commands/videotest.c: New file.
8596         * font/manager.c (fill_with_default_glyph): Modified to use
8597         grub_font_glyph.
8598         (grub_font_get_glyph): Likewise.
8599         (fontmanager): Renamed from this...
8600         (font_manager): ... to this.
8602         * include/grub/font.h (grub_font_glyph): Added new structure.
8603         (grub_font_get_glyph): Modified to use grub_font_glyph.
8605         * include/grub/misc.h (grub_abs): Added as inline function.
8607         * include/grub/video.h: New file.
8609         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8610         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8611         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8612         (grub_vbe_get_controller_info): Renamed from this...
8613         (grub_vbe_bios_get_controller_info): ... to this.
8614         (grub_vbe_get_mode_info): Renamed from this...
8615         (grub_vbe_bios_get_mode_info): ... to this.
8616         (grub_vbe_set_mode): Renamed from this...
8617         (grub_vbe_bios_set_mode): ... to this.
8618         (grub_vbe_get_mode): Renamed from this...
8619         (grub_vbe_bios_get_mode): ... to this.
8620         (grub_vbe_set_memory_window): Renamed from this...
8621         (grub_vbe_bios_set_memory_window): ... to this.
8622         (grub_vbe_get_memory_window): Renamed from this...
8623         (grub_vbe_bios_get_memory_window): ... to this.
8624         (grub_vbe_set_scanline_length): Renamed from this...
8625         (grub_vbe_set_scanline_length): ... to this.
8626         (grub_vbe_get_scanline_length): Renamed from this...
8627         (grub_vbe_bios_get_scanline_length): ... to this.
8628         (grub_vbe_set_display_start): Renamed from this...
8629         (grub_vbe_bios_set_display_start): ... to this.
8630         (grub_vbe_get_display_start): Renamed from this...
8631         (grub_vbe_bios_get_display_start): ... to this.
8632         (grub_vbe_set_palette_data): Renamed from this...
8633         (grub_vbe_bios_set_palette_data): ... to this.
8634         (grub_vbe_set_pixel_rgb): Removed.
8635         (grub_vbe_set_pixel_index): Likewise.
8637         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8638         from this...
8639         (grub_vbe_bios_get_controller_info): ... to this.
8640         (grub_vbe_get_mode_info): Renamed from this...
8641         (grub_vbe_bios_get_mode_info): ... to this.
8642         (grub_vbe_set_mode): Renamed from this...
8643         (grub_vbe_bios_set_mode): ... to this.
8644         (grub_vbe_get_mode): Renamed from this...
8645         (grub_vbe_bios_get_mode): ... to this.
8646         (grub_vbe_set_memory_window): Renamed from this...
8647         (grub_vbe_bios_set_memory_window): ... to this.
8648         (grub_vbe_get_memory_window): Renamed from this...
8649         (grub_vbe_bios_get_memory_window): ... to this.
8650         (grub_vbe_set_scanline_length): Renamed from this...
8651         (grub_vbe_set_scanline_length): ... to this.
8652         (grub_vbe_get_scanline_length): Renamed from this...
8653         (grub_vbe_bios_get_scanline_length): ... to this.
8654         (grub_vbe_set_display_start): Renamed from this...
8655         (grub_vbe_bios_set_display_start): ... to this.
8656         (grub_vbe_get_display_start): Renamed from this...
8657         (grub_vbe_bios_get_display_start): ... to this.
8658         (grub_vbe_set_palette_data): Renamed from this...
8659         (grub_vbe_bios_set_palette_data): ... to this.
8660         (grub_vbe_bios_get_controller_info): Fixed problem with registers
8661         getting corrupted after calling it.  Added more pushes and pops.
8662         (grub_vbe_bios_set_mode): Likewise.
8663         (grub_vbe_bios_get_mode): Likewise.
8664         (grub_vbe_bios_get_memory_window): Likewise.
8665         (grub_vbe_bios_set_scanline_length): Likewise.
8666         (grub_vbe_bios_get_scanline_length): Likewise.
8667         (grub_vbe_bios_get_display_start): Likewise.
8668         (grub_vbe_bios_set_palette_data): Likewise.
8670         * normal/cmdline.c (cl_set_pos): Refresh the screen.
8671         (cl_insert): Likewise.
8672         (cl_delete): Likewise.
8674         * term/gfxterm.c: New file.
8676         * term/i386/pc/vesafb.c: Removed file.
8678         * video/video.c: New file.
8680         * video/i386/pc/vbe.c (real2pm): Added new function.
8681         (grub_video_vbe_draw_pixel): Likewise.
8682         (grub_video_vbe_get_video_ptr): Likewise.
8683         (grub_video_vbe_get_pixel): Likewise
8684         (grub_video_vbe_init): Likewise.
8685         (grub_video_vbe_fini): Likewise.
8686         (grub_video_vbe_setup): Likewise.
8687         (grub_video_vbe_get_info): Likewise.
8688         (grub_video_vbe_set_palette): Likewise.
8689         (grub_video_vbe_get_palette): Likewise.
8690         (grub_video_vbe_set_viewport): Likewise.
8691         (grub_video_vbe_get_viewport): Likewise.
8692         (grub_video_vbe_map_color): Likewise.
8693         (grub_video_vbe_map_rgb): Likewise.
8694         (grub_video_vbe_map_rgba): Likewise.
8695         (grub_video_vbe_unmap_color): Likewise.
8696         (grub_video_vbe_fill_rect): Likewise.
8697         (grub_video_vbe_blit_glyph): Likewise.
8698         (grub_video_vbe_blit_bitmap): Likewise.
8699         (grub_video_vbe_blit_render_target): Likewise.
8700         (grub_video_vbe_scroll): Likewise.
8701         (grub_video_vbe_swap_buffers): Likewise.
8702         (grub_video_vbe_create_render_target): Likewise.
8703         (grub_video_vbe_delete_render_target): Likewise.
8704         (grub_video_vbe_set_active_render_target): Likewise.
8705         (grub_vbe_set_pixel_rgb): Remove function.
8706         (grub_vbe_set_pixel_index): Likewise.
8707         (index_color_mode): Remove static variable.
8708         (active_mode): Likewise.
8709         (framebuffer): Likewise.
8710         (bytes_per_scan_line): Likewise.
8711         (grub_video_vbe_adapter): Added new static variable.
8712         (framebuffer): Likewise.
8713         (render_target): Likewise.
8714         (initial_mode): Likewise.
8715         (mode_in_use): Likewise.
8716         (mode_list): Likewise.
8718 2006-03-10  Marco Gerards  <marco@gnu.org>
8720         * configure.ac (AC_INIT): Bumped to 1.93.
8722         * DISTLIST: Added `include/grub/hfs.h'.
8724 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
8726         * boot/i386/pc/boot.S (general_error): Before looping, try INT
8727         18H, which might help the BIOS falling back to next boot media.
8729 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
8731         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
8732         Poe Chen <poe.poechen@gmail.com>.
8734 2006-01-17  Marco Gerards  <marco@gnu.org>
8736         * include/grub/normal.h: Include <grub/script.h>.
8737         (grub_command_list): Removed struct.
8738         (grub_command_list_t): Removed type.
8739         (grub_menu_entry): Remove members `num' and `command_list'.  Add
8740         members `commands' and `sourcecode'.
8741         * include/grub/script.h: Add inclusion guards.
8742         (grub_script_cmd_menuentry): New struct.
8743         (grub_script_execute_menuentry): New prototype.
8744         (grub_script_lexer_record_start): Likewise.
8745         (grub_script_lexer_record_stop): Likewise.
8746         * normal/execute.c (grub_script_execute_menuentry): New function.
8747         * normal/lexer.c (record, recording, recordpos, recordlen): New
8748         variables.
8749         (grub_script_lexer_record_start): New function.
8750         (grub_script_lexer_record_stop): Likewise.
8751         (recordchar): Likewise.
8752         (nextchar): Likewise.
8753         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
8754         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
8755         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
8756         (current_menu): New variable.
8757         (free_menu): Mainly rewritten.
8758         (grub_normal_menu_addentry): New function.
8759         (read_config_file): Rewritten.
8760         * normal/menu.c (run_menu_entry): Mainly rewritten.
8761         * normal/menu_entry.c (make_screen): Rewritten the code to insert
8762         the menu entry.
8763         (run): Mainly rewritten.
8764         * normal/parser.y (menu_entry): New variable.
8765         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
8766         (menuentry): New rule.
8767         (command): Add `menuentry'.
8768         (if_statement): Allow additional returns before `fi'.
8769         * normal/script.c (grub_script_create_cmdmenu): New function.
8771 2006-01-03  Marco Gerards  <marco@gnu.org>
8773         * INSTALL: GNU Bison is required.
8774         * configure.ac: Rewritten the test to detect Bison.
8775         * Makefile.in (YACC): New variable.  Reported by Xun Sun
8776         <xun.sun.cn@gmail.com>.
8778 2006-01-03  Marco Gerards  <marco@gnu.org>
8780         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
8781         the HFS+ filesystem to filesystem blocks.
8782         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
8783         GCC warning is silenced.
8785 2006-01-03  Marco Gerards  <marco@gnu.org>
8787         * partmap/apple.c (apple_partition_map_iterate): Convert the data
8788         read from disk from big endian to host byte order.
8790 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
8792         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
8793         documentation.
8794         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
8795         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
8796         embedded HFS+ filesystem.
8797         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
8798         (grub_hfs_sblock): Move from here...
8799         * include/grub/hfs.h: To here...  New file.
8800         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
8801         documentation.
8802         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
8803         New macros.
8804         (grub_hfsplus_volheader): Change type of member `magic' to
8805         `grub_uint16_t'.
8806         (grub_hfsplus_data): Add new member `embedded_offset'.
8807         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
8808         returned block.
8809         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
8810         Calculate the offset.
8812 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
8814         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
8815         Removed.
8816         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
8818 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
8820         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
8821         ENV->NAME is NULL after allocating ENV->VALUE.
8823 2005-12-25  Marco Gerards  <marco@gnu.org>
8825         * kern/env.c (grub_env_set): Rewritten the error handling code.
8827 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
8829         * geninit.sh: Made more robust, and more portable.
8831 2005-12-25  Marco Gerards  <marco@gnu.org>
8833         Add support for Apple HFS+ filesystems.
8835         * fs/hfsplus.c: New file.
8837         * DISTLIST: Added `fs/hfsplus.c'.
8839         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
8840         (hfsplus_mod_SOURCES): New variable.
8841         (hfsplus_mod_CFLAGS): Likewise.
8842         (hfsplus_mod_LDFLAGS): Likewise.
8843         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
8844         (grub_setup_SOURCES): Likewise.
8845         (grub_mkdevicemap_SOURCES): Likewise.
8846         (grub_emu_SOURCES): Likewise.
8847         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8849         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
8851         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
8853 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
8855         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
8856         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
8857         include/grub/parser.h, include/grub/script.h, kern/parser.c,
8858         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
8859         normal/lexer.c, normal/parser.y, normal/script.c, and
8860         partmap/gpt.c.
8861         Removed kern/sparc64/cache.c.
8863         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
8864         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
8865         grub_emu_init.c.
8867         * configure.ac (AC_INIT): Bumped to 1.92.
8869 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
8871         * kern/err.c (grub_error_push): Added new function to support error
8872         stacks.
8873         (grub_error_pop): Likewise.
8874         (grub_error_stack_items): New local variable to support error stacks.
8875         (grub_error_stack_pos): Likewise.
8876         (grub_error_stack_assert): Likewise.
8877         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
8878         stack depth.
8879         (grub_print_error): Added support to print errors from error stack.
8881         * include/grub/err.h (grub_error_push): Added function prototype.
8882         (grub_error_pop): Likewise.
8884 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
8886         * configure.ac: Accept `powerpc64' as host_cpu.
8887         (amd64): Rename to `biarch32'.
8889         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
8890         non-cacheline-aligned addresses.
8892         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
8893         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
8894         if `size' is non-zero.
8896 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
8898         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
8899         and `cd' to make sure the filename is not prefixed with a
8900         directory name.
8901         (pkgdata_MODULES): Add `gpt.mod'.
8902         (gpt_mod_SOURCES): New variable.
8903         (gpt_mod_CFLAGS): Likewise.
8904         (gpt_mod_LDFLAGS): Likewise.
8906         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
8908         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
8909         New macro.
8911         * partmap/gpt.c: New file.
8913         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
8914         GPT partition map is detected.
8916 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
8918         * commands/i386/pc/play.c: New file.
8919         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
8920         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
8921         macros.
8923 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
8925         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
8926         ((unused))' to silence gcc warning.
8928 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
8930         * configure.ac: Correct `AC_PROG_YACC' test.
8932 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8934         * util/powerpc/ieee1275/grub-install.in: Run the mount point
8935         check before installing files.
8937 2005-11-22  Mike Small  <smallm@panix.com>
8939         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
8940         number regex so multidigit numbers are recognized correctly.
8942 2005-11-22  Mike Small  <smallm@panix.com>
8944         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
8945         debugging message before attempting to claim memory.
8946         (grub_rescue_cmd_initrd): Add a claim debugging message and try
8947         multiple addresses in case of failure.
8949 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8951         * term/tparm.c (get_space): Remove empty `if' statement.
8953         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
8955         * kern/parser.c (check_varstate): Rename `state' to 's'.
8957 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8959         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
8960         variable definitions to the beginning of each function.  Sort stack
8961         variables by size.
8962         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
8963         `buf' argument to `char *'.
8965 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8967         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
8968         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
8969         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
8970         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
8971         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
8972         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
8973         configfile.mod, search.mod, gzio.mod and test.mod.
8974         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
8975         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
8976         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
8977         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
8978         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
8979         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
8980         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
8981         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
8982         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
8983         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
8984         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8985         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8986         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
8987         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
8988         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
8989         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
8990         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8991         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
8992         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
8993         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
8994         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
8995         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
8996         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
8998         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
8999         `grep --include'.
9000         (pkgdata_MODULES): Add test.mod.
9002 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9004         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
9005         appending to variables with "+=".
9006         (PModule): Use full pathname to generate *.lst filenames.
9008         * Makefile.in: Fixed list rules moved from genmk.rb.
9009         (.DELETE_ON_ERROR): New special target.
9010         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9012         * conf/i386-pc.rmk: Include conf/common.mk.
9013         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9014         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9015         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9016         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9017         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9018         configfile.mod, search.mod, gzio.mod and test.mod.
9019         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9020         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9021         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9022         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9023         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9024         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9025         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9026         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9027         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9028         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9029         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9030         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9031         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9032         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9033         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9034         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9035         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9036         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9037         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9038         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9039         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9040         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9041         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9042         here...
9043         * conf/common.rmk: ... to here.  New file.
9045         * conf/common.mk: New file.
9047 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
9049         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9050         (grub_script.tab.c): ... here.
9052         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9053         (grub_script.tab.c): ... here.
9055         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9056         (grub_script.tab.c): ... here.
9058         * normal/command.c (grub_command_find): Fixed a memory leak of
9059         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9061 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9063         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9064         "@" which marks the start of a comment on ARM.
9065         (VARIABLE): Likewise.
9067 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9069         Add support for Linux/ADFS partition tables.
9071         * partmap/acorn.c: New file.
9073         * include/grub/acorn_filecore.h: Likewise.
9075         * DISTLIST: Added `partmap/acorn.c' and
9076         `include/grub/acorn_filecore.h'.
9078         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9079         `partmap/acorn.c'.
9080         (pkgdata_MODULES): Add `acorn.mod'.
9081         (acorn_mod_SOURCES): New variable.
9082         (acorn_mod_CFLAGS): Likewise.
9084         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9085         `partmap/acorn.c'.
9086         (pkgdata_MODULES): Add `acorn.mod'.
9087         (acorn_mod_SOURCES): New variable.
9088         (acorn_mod_CFLAGS): Likewise.
9090         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9091         (pkgdata_MODULES): Add `acorn.mod'.
9092         (acorn_mod_SOURCES): New variable.
9093         (acorn_mod_CFLAGS): Likewise.
9094         (acorn_mod_LDFLAGS): Likewise.
9096         * include/types.h (grub_disk_addr_t): New typedef.
9098 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
9100         * geninit.sh: New file.
9102         * geninitheader.sh: Likewise.
9104         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9105         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9106         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9107         * commands/configfile.c (grub_configfile_init)
9108         (grub_configfile_fini): Likewise.
9109         * commands/default.c (grub_default_init, grub_default_fini):
9110         Likewise.
9111         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9112         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9113         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9114         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9115         Likewise.
9116         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9117         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9118         Likewise.
9119         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9120         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9121         Likewise.
9122         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9123         Likewise.
9124         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9125         Likewise.
9126         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9127         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9128         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9129         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9130         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9131         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9132         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9133         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9134         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9135         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9136         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9137         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9138         * partmap/amiga.c (grub_amiga_partition_map_init)
9139         (grub_amiga_partition_map_fini): Likewise.
9140         * partmap/apple.c (grub_apple_partition_map_init)
9141         (grub_apple_partition_map_fini): Likewise.
9142         * partmap/pc.c (grub_pc_partition_map_init)
9143         (grub_pc_partition_map_fini): Likewise.
9144         * partmap/sun.c (grub_sun_partition_map_init,
9145         grub_sun_partition_map_fini): Likewise.
9146         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9147         Likewise.
9149         * util/grub-emu.c: Include <grub_modules_init.h>.
9150         (main): Don't initialize and de-initialize any modules directly,
9151         use `grub_init_all' and `grub_fini_all' instead.
9153         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9154         `grub_vesafb_mod_init'.
9155         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
9156         all users.
9157         * term/i386/pc/vga.c (grub_vga_init): Renamed to
9158         `grub_vga_mod_init'.  Updated all users.
9159         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9161         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9162         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9163         rules.
9165         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9166         Generate a function to initialize the module in utilities.
9167         Updated all callers.
9168         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
9169         initialize the module in utilities.  Updated all callers.
9171 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
9173         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9174         escape sequence and a literal ^L to clear the screen.
9176         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9177         when returning from Open Firmware.
9179 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
9181         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9182         (grub_ofconsole_height): Likewise.
9183         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9184         manually insert a '\n'.
9185         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9186         `grub_ofconsole_height'.  Return early if these are already set.
9188 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
9190         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9191         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9192         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9193         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9194         and `normal/script.c'.
9195         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9196         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9197         (test_mod_SOURCES): New variable.
9198         (test_mod_CFLAGS): Likewise.
9199         (test_mod_LDFLAGS): Likewise.
9200         (pkgdata_MODULES): Add `test.mod'.
9201         (grub_script.tab.c): New rule.
9202         (grub_script.tab.h): Likewise.
9204 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
9206         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9207         `commands/test.c', `normal/execute.c', `normal/lexer.c',
9208         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9209         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9210         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9211         (test_mod_SOURCES): New variable.
9212         (test_mod_CFLAGS): Likewise.
9213         (pkgdata_MODULES): Add `test.mod'.
9214         (grub_script.tab.c): New rule.
9215         (grub_script.tab.h): Likewise.
9217 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
9219         Add initial scripting support.
9221         * commands/test.c: New file.
9222         * include/grub/script.h: Likewise.
9223         * normal/execute.c: Likewise.
9224         * normal/function.c: Likewise.
9225         * normal/lexer.c: Likewise.
9226         * normal/parser.y: Likewise.
9227         * normal/script.c: Likewise.
9229         * configure.ac: Add `AC_PROG_YACC' test.
9231         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9232         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9233         `normal/function.c' and `normal/script.c'.
9234         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9235         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9236         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9237         variables.
9238         (pkgdata_MODULES): Add `test.mod'.
9239         (grub_script.tab.c): New rule.
9240         (grub_script.tab.h): Likewise.
9242         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9244         * include/grub/normal.h (grub_test_init): New prototype.
9245         (grub_test_fini): Likewise.
9247         * normal/command.c: Include <grub/script.h>.
9248         (grub_command_execute): Rewritten.
9250         * util/grub-emu.c (main): Call `grub_test_init' and
9251         `grub_test_fini'.
9253 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9255         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9256         to 0.
9257         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9258         there are no pending characters.
9260 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9262         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9263         `grub_strndup' to drop device arguments. Replace unnecessary
9264         `grub_strndup' with `grub_strdup'.
9266 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9268         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9269         `debug' environment variable has been set.
9271 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
9273         * Makefile.in (install-local): Use $(DATA).
9274         (uninstall): Likewise.
9275         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9276         (sbin_UTILITIES): ... to here.
9277         (sbin_SCRIPTS): New variable.
9278         (grub_install_SOURCES): New variable.
9279         * util/powerpc/ieee1275/grub-install.in: New file.
9280         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9281         variable.
9282         (add_segments): Call `grub_util_get_path'.
9284 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
9286         From Timothy Baldwin:
9287         * commands/ls.c (grub_ls_list_files): Close FILE with
9288         grub_file_close.
9289         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9291 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
9293         * include/grub/parser.h: New file.
9295         * kern/parser.c: Likewise.
9297         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9298         (grub_setup_SOURCES): Likewise.
9299         (grub_probefs_SOURCES): Likewise.
9300         (grub_emu_SOURCES): Likewise.
9301         (kernel_img_HEADERS): Add `parser.h'.
9303         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9304         (grub_emu_SOURCES): Add `kern/parser.c'.
9305         (grubof_SOURCES): Likewise.
9307         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9308         (grubof_SOURCES): Add `kern/parser.c'.
9310         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9312         * kern/misc.c (grub_split_cmdline): Removed function.
9314         * kern/rescue.c: Include <grub/parser.h>.
9315         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9316         of `grub_split_cmdline'.
9318         * normal/command.c: Include <grub/parser.h>.
9319         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
9320         of `grub_split_cmdline'.
9322         * normal/completion.c: Include <grub/parser.h>.
9323         (cmdline_state): New variable.
9324         (iterate_dir): End the filename with a quote depending on the
9325         command line state.
9326         (get_state): new function.
9327         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9328         split the arguments and determine the current argument.  When the
9329         argument string is not quoted, escape all spaces.
9331 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9333         * normal/sparc64/setjmp.S: New file.
9335 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9337         * include/grub/sparc64/libgcc.h: New file.
9338         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9339         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9340         normal/sparc64/setjmp.c.
9342 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
9344         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9345         * kern/sparc64/cache.S: New file.
9346         * kern/sparc64/cache.c: Removed.
9347         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9348         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
9349         -mtune=ultrasparc.
9350         (COMMON_LDFLAGS): Add -melf64_sparc.
9351         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9352         (grubof_SOURCES): Use cache.S instead of cache.c.
9353         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
9354         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9355         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9356         commented though.
9357         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9358         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9359         (linux_mod_CFLAGS): Commented out.
9360         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9361         out because module isn't built.
9362         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9363         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9364         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9365         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9366         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9367         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9368         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9369         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9370         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9371         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9372         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9373         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9374         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9375         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9377 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
9379         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9380         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9381         longer, because HFS should not be used on PC.
9383 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
9385         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9386         consistently within the loop.
9388 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
9390         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9391         directory can not be read.
9393 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9395         * configure.ac (AC_INIT): Increase the version number to 1.91.
9397         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9398         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9399         term/i386/pc/serial.c.
9401 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9403         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9404         file size must be permitted.
9406         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9407         between %ah and %al.
9409 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9411         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9412         grub_uint64_t.
9413         Call the hook with a NUL-terminated filename.
9414         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9415         grub_cpu_to_be32.
9417         * kern/term.c (cursor_state): New variable.
9418         (grub_term_set_current): Reset the cursor state on a new
9419         terminal.
9420         (grub_setcursor): Rewritten to use CURSOR_STATE.
9421         (grub_getcursor): New function.
9423         * include/grub/term.h (grub_getcursor): New prototype.
9425         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9426         integers on ARM. Reported by Timothy Baldwin
9427         <T.E.Baldwin99@members.leeds.ac.uk>.
9429 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
9431         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9432         allocated.
9433         (grub_sfs_dir): Likewise.
9435 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
9437         Add support for the SFS filesystem.
9439         * fs/sfs.c: New file.
9441         * DISTLIST: Added `fs/sfs.c'.
9443         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9444         (grub_probefs_SOURCES): Likewise.
9445         (grub_emu_SOURCES): Likewise.
9446         (pkgdata_MODULES): Add `sfs.mod'.
9447         (sfs_mod_SOURCES): New variable.
9448         (sfs_mod_CFLAGS): Likewise.
9449         (sfs_mod_LDFLAGS): Likewise.
9451         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9452         (pkgdata_MODULES): Add `sfs.mod'.
9453         (sfs_mod_SOURCES): New variable.
9454         (sfs_mod_CFLAGS): Likewise.
9456         * util/grub-emu.c (main): Call `grub_sfs_init' and
9457         `grub_sfs_fini'.
9459         * include/grub/fs.h (grub_sfs_init): New prototype.
9460         (grub_sfs_fini): Likewise.
9462 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
9464         Add support for the AFFS filesystem.
9466         * fs/affs.c: New file.
9468         * DISTLIST: Added `fs/affs.c'.
9470         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9471         (grub_probefs_SOURCES): Likewise.
9472         (grub_emu_SOURCES): Likewise.
9473         (pkgdata_MODULES): Add `affs.mod'.
9474         (affs_mod_SOURCES): New variable.
9475         (affs_mod_CFLAGS): Likewise.
9476         (affs_mod_LDFLAGS): Likewise.
9478         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9479         (pkgdata_MODULES): Add `affs.mod'.
9480         (affs_mod_SOURCES): New variable.
9481         (affs_mod_CFLAGS): Likewise.
9483         * util/grub-emu.c (main): Call `grub_affs_init' and
9484         `grub_affs_fini'.
9486         * include/grub/fs.h (grub_affs_init): New prototype.
9487         (grub_affs_fini): Likewise.
9489 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
9491         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9493 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
9495         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
9496         `-m32' to CFLAGS.
9498         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9499         linking.
9501         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9502         (COMMON_LDFLAGS): New variable.
9503         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9504         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9505         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9506         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9507         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9508         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9509         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9510         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9511         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9512         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9513         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9514         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9515         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9516         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9517         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9518         variables.
9519         (normal_mod_ASFLAGS): Add `-m32'.
9521         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9522         (grub_host_size_t, grub_host_ssize_t): New types.
9523         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
9524         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
9525         `GRUB_HOST_SIZEOF_VOID_P'.
9527         * include/grub/kernel.h (struct grub_module_header): Type of
9528         member offset changed to `grub_host_off_t'.  Type of member size
9529         changed to `grub_host_size_t'.
9530         (struct grub_module_info): Type of member offset changed to
9531         `grub_host_off_t'.  Type of member size changed to
9532         `grub_host_size_t'.
9534 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
9536         Make GRUB's kernel compliant to Multiboot Specification.
9538         * kern/i386/pc/startup.S (multiboot_header): New label.
9539         (multiboot_entry): Likewise.
9540         (multiboot_trampoline): Likewise.
9542         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9543         Increased to 0x4A0.
9545         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
9546         put parentheses after a question mark.
9547         [!GRUB_UTIL] (my_mod): New variable.
9549         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
9551 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
9553         Adds support for the XFS filesystem.  Btrees are not supported
9554         yet.
9556         * fs/xfs.c: New file.
9558         * DISTLIST: Added `fs/xfs.c'.
9560         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
9561         (grub_probefs_SOURCES): Likewise.
9562         (grub_emu_SOURCES): Likewise.
9563         (pkgdata_MODULES): Add `xfs.mod'.
9564         (xfs_mod_SOURCES): New variable.
9565         (xfs_mod_CFLAGS): Likewise.
9567         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
9568         (pkgdata_MODULES): Add `xfs.mod'.
9569         (xfs_mod_SOURCES): New variable.
9570         (xfs_mod_CFLAGS): Likewise.
9572         * util/grub-emu.c (main): Call `grub_xfs_init' and
9573         `grub_xfs_fini'.
9575         * include/grub/fs.h (grub_xfs_init): New prototype.
9576         (grub_xfs_fini): Likewise.
9579 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
9581         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
9582         color modes, allow greater than 16 colors to be configured as
9583         a default palette.
9585 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9587         * normal/completion.c (complete_arguments): Add the qualifier
9588         const into OPTIONS.
9590         From Omniflux <omniflux+lists@omniflux.com>:
9591         * include/grub/terminfo.h: New file.
9592         * include/grub/tparm.h: Likewise.
9593         * include/grub/i386/pc/serial.h: Likewise.
9594         * term/terminfo.c: Likewise.
9595         * term/tparm.c: Likewise.
9596         * term/i386/pc/serial.c: Likewise.
9597         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9598         serial.mod.
9599         (terminfo_mod_SOURCES): New variable.
9600         (terminfo_mod_CFLAGS): Likewise.
9601         (serial_mod_SOURCES): Likewise.
9602         (serial_mod_CFLAGS): Likewise.
9604 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
9606         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9607         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9608         and kern/powerpc/ieee1275/cmain.c, respectively.
9610         * boot/powerpc/ieee1275/crt0.S: Moved to ...
9611         * kern/powerpc/ieee1275/crt0.S: ... here.
9613         * boot/powerpc/ieee1275/cmain.c: Moved to ...
9614         * kern/powerpc/ieee1275/cmain.c: ... here.
9616         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9617         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9618         instead of boot/powerpc/ieee1275/crt0.S and
9619         boot/powerpc/ieee1275/cmain.c, respectively.
9621         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9622         sectors. It was not used anyway.
9624 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
9626         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9627         `unused parameter' warning.
9629 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
9631         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9632         function.
9633         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9634         getcharwidth.
9636 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
9638         * include/grub/normal.h (enum grub_completion_type): Added
9639         `GRUB_COMPLETION_TYPE_ARGUMENT'.
9641         * normal/cmdline.c (print_completion): Handle
9642         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9643         * normal/menu_entry.c (store_completion): Likewise.
9645         * normal/completion.c (complete_arguments): New function.
9646         (grub_normal_do_completion): Call `complete_arguments' when the
9647         current words start with a dash.
9649 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
9651         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9652         `gzio.mod' instead of `io.mod').
9654 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
9656         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9657         (DISTDIRS): Added io and video.
9658         Rewrite the search routine to make an output consistently.
9660         * DISTLIST: Added conf/sparc64-ieee1275.mk,
9661         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9662         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9663         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9664         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9665         util/powerpc/ieee1275/misc.c.
9667         * include/grub/gzio.h: New file.
9668         * io/gzio.c: Likewise.
9670         * kern/file.c (grub_file_close): Call grub_device_close only if
9671         FILE->DEVICE is not NULL.
9673         * include/grub/mm.h [!NULL] (NULL): New macro.
9675         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
9677         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
9678         (pkgdata_MODULES): Added gzio.mod.
9679         (gzio_mod_SOURCES): New variable.
9680         (gzio_mod_CFLAGS): Likewise.
9682         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
9683         (pkgdata_MODULES): Added gzio.mod.
9684         (gzio_mod_SOURCES): New variable.
9685         (gzio_mod_CFLAGS): Likewise.
9687         * commands/cat.c: Include grub/gzio.h.
9688         (grub_cmd_cat): Use grub_gzfile_open instead of
9689         grub_file_open.
9691         * commands/cmp.c: Include grub/gzio.h.
9692         (grub_cmd_cmp): Use grub_gzfile_open instead of
9693         grub_file_open.
9695         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
9696         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
9697         grub_file_open.
9698         (grub_rescue_cmd_module): Likewise.
9700 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
9702         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
9703         kern/sparc64/ieee1275/init.c because it contains _start.
9704         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
9706 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
9708         * configure.ac: Add support for sparc64 host with ieee1275
9709         firmware.
9710         * configure: Generated from configure.ac.
9711         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
9712         instead of int.
9713         (grub_ofdisk_read): Likewise.
9714         (grub_ofdisk_open): Use %p to print pointer values, and cast the
9715         pointers as (void *) to remove a warning.
9716         (grub_ofdisk_close): Likewise.
9717         (grub_ofdisk_read): Likewise.
9718         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
9719         returns, so make it return void to remove a warning.
9720         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
9721         Corresponding prototype change.
9722         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
9723         values, and cast the pointers as (void *) to remove a warning.
9724         (grub_mm_dump): Likewise.
9725         * conf/sparc64-ieee1275.mk: New file.
9726         * conf/sparc64-ieee1275.rmk: Likewise.
9727         * include/grub/sparc64/setjmp.h: Likewise.
9728         * include/grub/sparc64/types.h: Likewise.
9729         * include/grub/sparc64/ieee1275/console.h: Likewise.
9730         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9731         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9732         * include/grub/sparc64/ieee1275/time.h: Likewise.
9733         * kern/sparc64/cache.c: Likewise.
9734         * kern/sparc64/dl.c: Likewise.
9735         * kern/sparc64/ieee1275/init.c: Likewise.
9736         * kern/sparc64/ieee1275/openfw.c: Likewise.
9738 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
9740         * util/console.c (grub_ncurses_putchar): If C is greater than
9741         0x7f, set C to a question mark.
9742         (grub_ncurses_getcharwidth): New function.
9743         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
9744         getcharwidth.
9746         * normal/menu.c (print_entry): Made aware of Unicode. First,
9747         convert TITLE to UCS-4, and predict the cursor position by
9748         grub_getcharwidth.
9750         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
9751         const to SRC.
9752         * kern/misc.c (grub_utf16_to_utf8): Likewise.
9754 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
9756         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
9757         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9758         grub_strcat.
9760         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
9761         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9762         grub_strcpy and grub_strlen. Take it into account that a space
9763         character is inserted as a delimiter.
9765 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
9767         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
9768         invalid magic in the error.
9770         * commands/search.c: New file.
9772         * util/grub-emu.c (main): Call grub_search_init and
9773         grub_search_fini.
9775         * kern/rescue.c (grub_rescue_print_disks): Removed.
9776         (grub_rescue_print_devices): New function.
9777         (grub_rescue_cmd_ls): Use grub_device_iterate with
9778         grub_rescue_print_devices instead of grub_disk_dev_iterate with
9779         grub_rescue_print_disks.
9781         * kern/partition.c (grub_partition_iterate): Return the result of
9782         PARTMAP->ITERATE instead of GRUB_ERRNO.
9784         * kern/device.c: Include grub/partition.h.
9785         (grub_device_iterate): New function.
9787         * include/grub/partition.h (grub_partition_iterate): Return int
9788         instead of grub_err_t.
9790         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
9791         prototype.
9792         [GRUB_UTIL] (grub_search_fini): Likewise.
9794         * include/grub/device.h (grub_device_iterate): New prototype.
9796         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9797         commands/search.c.
9798         (pkgdata_MODULES): Added search.mod.
9799         (search_mod_SOURCES): New variable.
9800         (search_mod_CFLAGS): Likewise.
9802         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
9803         (pkgdata_MODULES): Added search.mod.
9804         (search_mod_SOURCES): New variable.
9805         (search_mod_CFLAGS): Likewise.
9807         * commands/ls.c (grub_ls_list_disks): Renamed to ...
9808         (grub_ls_list_devices): ... this, and use grub_device_iterate.
9809         All callers changed.
9811         * DISTLIST: Added commands/search.c.
9813 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
9815         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
9816         conversion.
9817         (grub_getcharwidth): New function.
9819         * kern/misc.c (grub_utf8_to_ucs4): New function.
9821         * include/grub/term.h (struct grub_term): Added a new member
9822         "getcharwidth".
9823         (grub_getcharwidth): New prototype.
9825         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
9827         * term/i386/pc/console.c (map_char): New function. Segregated from
9828         grub_console_putchar.
9829         (grub_console_putchar): Use map_char.
9830         (grub_console_getcharwidth): New function.
9831         (grub_console_term): Specified grub_console_getcharwidth as
9832         getcharwidth.
9834         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
9835         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
9837         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
9838         GRUB_ERRNO.
9839         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
9840         on grub_strtoul completely.
9841         (write_char): Declare local variables in the beginning of the
9842         function.
9843         (grub_vesafb_getcharwidth): New function.
9844         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
9845         getcharwidth.
9847 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
9849         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
9850         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
9851         commands/i386/pc/vbetest.c.
9853         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
9854         call grub_vbe_get_controller_info again, because the returned
9855         information is volatile.
9856         (grub_vbe_set_video_mode): Mostly rewritten.
9857         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
9858         grub_vbe_status_t correctly.
9859         (grub_vbe_get_video_mode_info): Likewise.
9860         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
9861         several if statements.
9863         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
9864         * commands/i386/pc/vbeinfo.c: ... this.
9866         * commands/i386/pc/vbe_test.c: Renamed to ...
9867         * commands/i386/pc/vbetest.c: ... this.
9869         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
9870         ...
9871         (grub_cmd_vbeinfo): ... this. Save video modes before
9872         iterating. Skip a video mode, if it is not available, not enough
9873         information is given or it is monochrome. Show the memory
9874         model. Leave the interpretation of MODEVAR to grub_strtoul
9875         completely.
9876         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
9877         (GRUB_MOD_FINI): Likewise.
9879         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
9880         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
9881         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
9882         duplicated grub_env_get. Leave the interpretation of MODEVAR to
9883         grub_strtoul completely.
9884         (real2pm): Removed.
9885         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
9886         (GRUB_MOD_FINI): Likewise.
9888         * normal/misc.c: Include grub/mm.h.
9890         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
9891         vbe_list_modes with vbetest.mod and vbeinfo.mod.
9892         (vbe_list_modes_mod_SOURCES): Removed.
9893         (vbe_list_modes_mod_CFLAGS): Likewise.
9894         (vbe_test_mod_SOURCES): Likewise.
9895         (vbe_test_mod_CFLAGS): Likewise.
9896         (vbeinfo_mod_SOURCES): New variable.
9897         (vbeinfo_mod_CFLAGS): Likewise.
9898         (vbetest_mod_SOURCES): Likewise.
9899         (vbetest_mod_CFLAGS): Likewise.
9901 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
9903         * normal/misc.c: New file.
9905         * DISTLIST: Added normal/misc.c.
9907         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
9908         DISK to HOOK. Call HOOK with DISK.
9909         * partmap/apple.c (apple_partition_map_iterate): Likewise.
9910         * partmap/pc.c (pc_partition_map_iterate): Likewise.
9911         * partmap/sun.c (sun_partition_map_iterate): Likewise.
9913         * normal/menu_entry.c (struct screen): Added a new member
9914         "completion_shown".
9915         (completion_buffer): New global variable.
9916         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
9917         (store_completion): New function.
9918         (complete): Likewise.
9919         (clear_completions): Likewise.
9920         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
9921         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
9922         a tab, call complete.
9924         * normal/completion.c (disk_dev): Removed.
9925         (print_simple_completion): Likewise.
9926         (print_partition_completion): Likewise.
9927         (print_func): New global variable.
9928         (add_completion): Do not take the arguments WHAT or PRINT any
9929         longer. Added a new argument TYPE. Instead of printing directly,
9930         call PRINT_FUNC if not NULL.
9931         All callers changed.
9932         (complete_device): Use a local variable DEV instead of
9933         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
9934         (grub_normal_do_completion): Take a new argument HOOK. Do not
9935         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
9936         empty string, return NULL instead.
9937         All callers changed.
9939         * normal/cmdline.c (print_completion): New function.
9941         * kern/partition.c (grub_partition_iterate): Add an argument DISK
9942         to HOOK.
9943         All callers changed.
9945         * kern/disk.c (grub_print_partinfo): Removed.
9947         * include/grub/partition.h (struct grub_partition_map): Add a new
9948         argument DISK into HOOK of ITERATE.
9949         (grub_partition_iterate): Add a new argument DISK to HOOK.
9951         * include/grub/normal.h (enum grub_completion_type): New enum.
9952         (grub_completion_type_t): New type.
9953         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
9954         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
9955         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
9956         (GRUB_COMPLETION_TYPE_FILE): Likewise.
9957         (grub_normal_do_completion): Added a new argument HOOK.
9958         (grub_normal_print_device_info): New prototype.
9960         * include/grub/disk.h (grub_print_partinfo): Removed.
9962         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
9963         (normal_mod_SOURCES): Likewise.
9964         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9965         (normal_mod_SOURCES): Likewise.
9967         * commands/ls.c (grub_ls_list_disks): Use
9968         grub_normal_print_device_info instead of grub_print_partinfo. Free
9969         PNAME.
9970         (grub_ls_list_files): Use grub_normal_print_device_info instead of
9971         duplicating the code.
9973 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
9975         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
9976         follow GCS more precisely.
9977         * commands/i386/pc/vbe_test.c: Likewise.
9978         * include/grub/i386/pc/vbe.h: Likewise.
9979         * term/i386/pc/vesafb.c: Likewise.
9980         * video/i386/pc/vbe.c: Likewise.
9982 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
9984         * DISTLIST: Added term/i386/pc/vesafb.c
9985         DISTLIST: Added video/i386/pc/vbe.c
9986         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
9987         DISTLIST: Added commands/i386/pc/vbe_test.c.
9988         * commands/i386/pc/vbe_list_modes.c: New file.
9989         * commands/i386/pc/vbe_test.c: Likewise.
9990         * term/i386/pc/vesafb.c: Likewise.
9991         * video/i386/pc/vbe.c: Likewise.
9992         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
9993         (grub_vbe_probe) Added prototype.
9994         (grub_vbe_set_video_mode) Likewise.
9995         (grub_vbe_get_video_mode) Likewise.
9996         (grub_vbe_get_video_mode_info) Likewise.
9997         (grub_vbe_set_pixel_rgb) Likewise.
9998         (grub_vbe_set_pixel_index) Likewise.
9999         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10000         (pkgdata_MODULES): Added vesafb.mod.
10001         (pkgdata_MODULES): Added vbe_list_modes.mod.
10002         (pkgdata_MODULES): Added vbe_test.mod.
10003         (vbe_mod_SOURCES): Added.
10004         (vbe_mod_CFLAGS): Likewise.
10005         (vesafb_mod_SOURCES): Likewise.
10006         (vesafb_mod_CFLAGS): Likewise.
10007         (vbe_list_modes_mod_SOURCES): Likewise.
10008         (vbe_list_modes_mod_CFLAGS): Likewise.
10009         (vbe_test_mod_SOURCES): Likewise.
10010         (vbe_test_mod_CFLAGS): Likewise.
10012 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
10014         * normal/command.c (grub_command_execute): If INTERACTIVE is
10015         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10016         CMDLINE. Disable the pager if INTERACTIVE is true.
10017         All callers are changed.
10019         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10020         before reading a config file.
10021         * normal/main.c (read_config_file): Even if a command is not
10022         found, register it if it is within an entry.
10024         * util/grub-emu.c: Include sys/types.h and unistd.h.
10025         (options): Added --hold.
10026         (struct arguments): Added a new member "hold".
10027         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10028         missing.
10029         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10030         cleared by a debugger, if it is not zero.
10032         * include/grub/normal.h (grub_command_execute): Add an argument
10033         INTERACTIVE.
10035 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
10037         * DISTLIST: Added include/grub/i386/pc/vbe.h.
10039 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
10041         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10042         program with another one, because the old one didn't detect a bug
10043         in gcc-3.4. Always use regparm 2, because the new test is still
10044         not enough for gcc-4.0. Someone must investigate a simple test
10045         case which detects a bug in gcc-4.0.
10047 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
10049         * DISTLIST: Added normal/completion.c.
10051         * normal/completion.c: New file.
10053         * term/i386/pc/console.c (grub_console_getwh): New function.
10054         (grub_console_term): Assign grub_console_getwh to getwh.
10056         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10057         function is defined in normal/completion.c as
10058         grub_normal_do_completion.
10059         (grub_cmdline_get): Use grub_normal_do_completion instead of
10060         grub_tab_complete.
10062         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10063         returns non-zero, otherwise return 0.
10064         (grub_partition_iterate): First, probe the partition map. Then,
10065         call ITERATE only for this partition map.
10067         * kern/misc.c (grub_strncmp): Rewritten.
10069         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10070         returns non-zero. Otherwise return 0.
10072         * include/grub/partition.h (grub_partition_map_iterate): Return
10073         int instead of void.
10075         * include/grub/normal.h (grub_normal_do_completion): New prototype.
10077         * include/grub/misc.h (grub_strncmp): Change the type of N to
10078         grub_size_t.
10080         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10081         of void.
10083         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10084         unsigned explicitly before comparing it with I.
10086         * kern/main.c (grub_env_write_root): Add the attribute unused into
10087         VAR.
10089         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10090         normal/completion.c.
10091         (normal_mod_SOURCES): Likewise.
10092         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10093         (normal_mod_SOURCES): Likewise.
10095         * normal/command.c (grub_iterate_commands): If ITERATE returns
10096         non-zero, return one immediately.
10098 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
10100         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10101         * kern/i386/pc/startup.S: Updated Global Descriptor table's
10102         descriptions.
10103         (grub_vbe_get_controller_info): New function.
10104         (grub_vbe_get_mode_info): Likewise.
10105         (grub_vbe_set_mode): Likewise.
10106         (grub_vbe_get_mode): Likewise.
10107         (grub_vbe_set_memory_window): Likewise.
10108         (grub_vbe_get_memory_window): Likewise.
10109         (grub_vbe_set_scanline_length): Likewise.
10110         (grub_vbe_get_scanline_length): Likewise.
10111         (grub_vbe_set_display_start): Likewise.
10112         (grub_vbe_get_display_start): Likewise.
10113         (grub_vbe_set_palette_data): Likewise.
10114         * include/grub/i386/pc/vbe.h: New file.
10116 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10118         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10119         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10120         * DISTLIST: Likewise.
10121         * kern/ieee1275/of.c: Moved to ...
10122         * kern/ieee1275/ieee1275.c: ... here.
10124 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10126         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10127         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10128         Pass 0 as `end' parameter to grub_strtoul().
10130 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
10132         * include/grub/powerpc/ieee1275/console.h: Do not include
10133         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
10134         ifdef.
10135         (grub_console_cur_color): Remove i386-specific prototype.
10136         (grub_console_real_putchar): Likewise.
10137         (grub_console_checkkey): Likewise.
10138         (grub_console_getkey): Likewise.
10139         (grub_console_getxy): Likewise.
10140         (grub_console_gotoxy): Likewise.
10141         (grub_console_cls): Likewise.
10142         (grub_console_setcursor): Likewise.
10143         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10144         Include <grub/machine/console.h>.
10145         * term/ieee1275/ofconsole.c: Likewise.
10147 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
10149         * Makefile.in (LIBLZO): New variable.
10151         * configure.ac: Check for LZO version 2.
10153         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10154         lzo/lzo1x.h instead of lzo1x.h.
10156         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10157         of -llzo.
10159         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10160         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10162         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10163         copying the data from PARTITION to P.
10165 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10167         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10168         negative, unload the module.
10170         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10171         map is "pc_partition_map" but not "pc".
10172         (usage): Fix the description. The options are --boot-image and
10173         --core-image but not --boot-file or --core-file.
10174         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10175         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10176         DEFAULT_DIRECTORY.
10178         * util/i386/pc/grub-install.in: Do not specify --boot-file or
10179         --core-file. Specify INSTALL_DEVICE as an argument.
10181         * util/console.c: Include config.h.
10182         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10183         [HAVE_NCURSES_H]: Include ncurses.h.
10184         [HAVE_CURSES_H]: Include curses.h.
10185         [!A_NORMAL] (A_NORMAL): Defined as zero.
10186         [!A_STANDOUT] (A_STANDOUT): Likewise.
10188         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10189         -lncurses.
10190         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10192         * configure.ac: Check for curses libraries and headers.
10194         * Makefile.in (LIBCURSES): New variable.
10196         * genmk.rb (Script::rule): Set the executable bits.
10198         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10199         name of the PC partition map is "pc_partition_map" but not "pc".
10201 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10203         * util/i386/pc/grub-install.in (grub_probefs): New variable.
10204         (modules): Likewise.
10205         (usage): Added descriptions for --modules and --grub-probefs.
10206         Handle --modules and --grub-probefs. Save the arguments in MODULES
10207         and GRUB_PROBEFS, respectively.
10208         Auto-detect a filesystem module against GRUBDIR. If the result is
10209         empty and modules are not specified explicitly, abort the
10210         installation. Add the result to MODULES.
10212         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10213         disk/powerpc/ieee1275/ofdisk.c,
10214         include/grub/powerpc/ieee1275/init.h and
10215         term/powerpc/ieee1275/ofconsole.c.
10216         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10217         term/ieee1275/ofconsole.c.
10219         * include/grub/powerpc/ieee1275/console.h: Resurrected.
10221         * COPYING: Upgraded to the latest version. Only the address of the
10222         FSF office has changed.
10224 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
10226         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10227         kern/ieee1275.c with kern/ieee1275/of.c.
10229         * kern/ieee1275.c: Moved to ...
10230         * kern/ieee1275/of.c: ... here.
10232 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
10234         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10235         readability.
10237         * config.guess: Updated to the latest version from gnulib.
10238         * config.sub: Likewise.
10239         * install.sh: Likewise.
10240         * mkinstalldirs: Likewise.
10242         * include/grub/console.h: Removed. This file is arch-specific. Do
10243         not put this in include/grub.
10245         * include/grub/i386/pc/console.h: Resurrected.
10247         * util/console.c: Include grub/machine/console.h instead of
10248         grub/console.h.
10249         * util/grub-emu.c: Likewise.
10251 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
10253         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10254         hardcoded value.
10256         From Vincent Pelletier  <subdino2004@yahoo.fr>
10257         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10258         Redefined to use grub_getwh.
10259         (grub_term): New member named getwh.
10260         (grub_getwh): New prototype.
10261         * kern/term.c (grub_getwh): New function.
10262         * term/i386/pc/console.c (grub_console_getwh): New function.
10263         (grub_console_term): New member `getwh'.
10264         * term/i386/pc/vga.c (grub_vga_getwh): New function.
10265         (grub_vga_term): New member `getwh'.
10266         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10267         grub_ssize_t.
10268         (grub_ofconsole_getw): New function.
10269         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10270         (grub_ofconsole_term): New field named getwh and new initial
10271         value.
10273 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
10275         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10276         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
10277         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10278         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10279         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10280         of <grub/machine/ieee1275.h>.
10281         * commands/ieee1275/reboot.c: Likewise.
10282         * boot/powerpc/ieee1275/ieee1275.c: Move ...
10283         * kern/ieee1275.c: ... to here.  All users updated.  Change all
10284         parameter structs to use new type `grub_ieee1275_cell_t'.
10285         * term/powerpc/ieee1275/ofconsole.c: Move ...
10286         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
10287         * disk/powerpc/ieee1275/ofdisk.c: Move ...
10288         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
10289         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10290         to return int.
10291         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10292         Remove unused prototypes.  All users updated.
10293         * include/grub/powerpc/ieee1275/console.h: Removed.
10294         * include/grub/powerpc/ieee1275/ieee1275.h: Define
10295         `grub_ieee1275_cell_t'.
10296         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10297         Cast comparisons with -1 to the correct type.
10298         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10299         type to match `grub_ieee1275_entry_fn'.
10301 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
10303         * DISTLIST: Added util/i386/pc/grub-probefs.c.
10305         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10306         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10307         partmap/sun.c.
10308         (grub_probefs_SOURCES): New variable.
10310         * util/i386/pc/grub-probefs.c: New file.
10312         * util/i386/pc/grub-setup.c (main): Call
10313         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10314         grub_hfs_init and grub_jfs_init to initialize the system. Call
10315         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10316         grub_pc_partition_map_fini to finish the system.
10318 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
10320         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10321         function.
10322         (grub_multiboot_load_elf32): Likewise.
10323         (grub_multiboot_is_elf64): Likewise.
10324         (grub_multiboot_load_elf64): Likewise.
10325         (grub_multiboot_load_elf): Likewise.
10326         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10327         an ELF32 or ELF64 file.
10328         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10330         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10331         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10332         NULL before calling FS->LABEL.
10333         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10334         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10335         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10336         before calling FS->LABEL.
10338 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
10340         * util/i386/pc/grub-install.in (datadir): New variable.
10341         (libdir): Removed.
10342         (pkgdatadir): New variable.
10343         (pkglibdir): Removed.
10345 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
10347         * DISTLIST: Added util/i386/pc/grub-install.in.
10349         * util/i386/pc/grub-install.in: New file.
10351         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10352         (grub_install_SOURCES): Likewise.
10354         * genmk.rb: Added support for scripts.
10355         (Script): New class.
10356         (scripts): New variable.
10358         * Makefile.in (install-local): Install sbin_SCRIPTS by
10359         INSTALL_SCRIPT.
10360         (uninstall): Remove sbin_SCRIPTS.
10362         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10363         device, try to get a GRUB device by
10364         grub_util_biosdisk_get_grub_dev.
10365         Free DEST_DEV.
10367         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10368         description for --device-map.
10370 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
10372         Change the semantics of variable hooks. They now return strings
10373         instead of error values.
10375         * util/i386/pc/grub-setup.c: Include grub/env.h.
10376         (setup): Use grub_device_set_root instead of grub_env_set.
10378         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10379         grub_env_get instead of grub_device_set_root and
10380         grub_device_get_root, respectively.
10382         * kern/main.c (grub_env_write_root): New function.
10383         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10384         grub_env_set instead of grub_device_set_root.
10386         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10387         many variables.
10388         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10389         rather than calling ENV->WRITE_HOOK afterwards.
10390         (grub_env_get): Return the result of ENV->READ_HOOK rather than
10391         passing a pointer of a pointer.
10392         (grub_register_variable_hook): Change the types of "read_hook" and
10393         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10394         respectively.
10395         Allocate the default empty string on the heap, because this string
10396         may be freed later.
10398         * kern/device.c: Include grub/env.h.
10399         (grub_device_set_root): Removed.
10400         (grub_device_get_root): Likewise.
10401         (grub_device_open): Use grub_env_get instead of
10402         grub_device_get_root.
10404         * include/grub/env.h (grub_env_read_hook_t): New type.
10405         (grub_env_write_hook_t): Likewise.
10406         (grub_env_var): Change the types of "read_hook" and "write_hook"
10407         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10408         (grub_register_variable_hook): Likewise.
10410         * include/grub/device.h (grub_device_set_root): Removed.
10411         (grub_device_set_root): Likewise.
10413         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10414         make sure that DIRNAME terminates with '/', so that
10415         grub_fat_find_dir will fail if PATH is not a directory.
10417         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10418         from DIRNAME.
10419         Use the qualifier auto for print_files and print_files_long.
10420         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10421         as a regular file.
10422         Put a newline only if there is no error.
10423         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10424         used.
10426 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
10428         * kern/partition.c (grub_partition_probe): Initialize PART to
10429         NULL. Otherwise, when no partition map is registered, this returns
10430         a garbage.
10432 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
10434         * partmap/apple.c (apple_partition_map_iterate): Check if POS
10435         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10436         valid.
10438 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
10440         * commands/ls.c (grub_ls_list_disks): Print the filesystem
10441         information on each device, if it does not have partitions. Print
10442         "Device" instead of "Disk", because this function is not specific
10443         to disk devices.
10445         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10446         static to ensure that it is put on the memory rather than a
10447         register.
10449 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10451         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10452         (grub_cat_init): Likewise.
10453         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10454         (options): Likewise.
10455         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10456         (grub_configfile_init): Likewise.
10457         * font/manager.c (GRUB_MOD_INIT): Likewise.
10458         * commands/help.c (GRUB_MOD_INIT): Likewise.
10459         (grub_help_init): Likewise.
10460         * normal/command.c (grub_command_init): Likewise.
10461         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10462         * disk/loopback.c (grub_loop_init): Likewise.
10463         (GRUB_MOD_INIT): Likewise.
10464         * commands/ls.c (grub_ls_init): Likewise.
10465         (GRUB_MOD_INIT): Likewise.
10466         (options): Likewise.
10467         * commands/boot.c (grub_boot_init): Likewise.
10468         (GRUB_MOD_INIT): Likewise.
10469         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10470         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10471         (GRUB_MOD_INIT): Likewise.
10472         * commands/cmp.c (grub_cmp_init): Likewise.
10473         (GRUB_MOD_INIT): Likewise.
10475         * normal/arg.c: Use <> instead of "" to include header files.
10476         (SHORT_ARG_HELP): New macro.
10477         (SHORT_ARG_USAGE): Likewise.
10478         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10479         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10480         descriptions.
10481         (find_short): Check if C is 'h' or 'u' explicitly.
10482         (grub_arg_show_help): Use space characters instead of tabs. Treat
10483         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10484         are shown with --help and --usage only if they are not used for
10485         the command itself.
10486         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10487         'h' and 'u'.
10489         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10490         const into "longarg". Change the type of "shortarg" to int.
10492 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10494         * boot/i386/pc/boot.S (boot_drive_check): New label.
10496         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10497         macro.
10499         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10500         which do not pass a boot drive correctly. Copied from GRUB Legacy.
10502 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10504         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10505         When turning off Gate A20, skip the check and return immediately,
10506         because this is not fatal usually.
10508 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
10510         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10511         be 0x7C00 instead of 0x8000.
10513         * boot/i386/pc/pxeboot.S: Rewritten.
10515         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10516         EXT_C.
10517         (gate_a20_check_state): Read a byte from 0x108000. Invert the
10518         result.
10520 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
10522         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
10523         robustness. This routine now supports a BIOS call and System
10524         Control Port A to modify the gate A20.
10526         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10527         Increased to 0x440.
10529 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
10531         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
10532         device path and resulting ihandle.
10533         (grub_ofdisk_close): dprintf the ihandle being closed.
10534         (grub_ofdisk_read): dprintf function parameters.
10535         * kern/mm.c (grub_mm_init_region): Likewise.
10536         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
10537         (grub_linux_boot): dprintf the Linux entry point, initrd address and
10538         size, and boot arguments.
10539         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
10540         before loading into memory.
10541         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
10542         before loading into memory.
10544 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
10546         * kern/mm.c: Added much documentation.
10547         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
10548         8, set to 5 instead of 8.
10550 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
10552         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
10554         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
10555         (grub_mkdevicemap_SOURCES): New variable.
10557         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
10558         lib/device.c of GRUB Legacy.
10560 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
10562         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
10563         instead of PATH is NULL.
10565 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
10567         * commands/cmp.c (BUFFER_SIZE): New macro.
10568         (grub_cmd_cmp): Close the right file at the right time.  Compare
10569         only data just read.  Don't report files of different  size as
10570         identical.  Dynamically allocate buffers.  Move variable
10571         declarations at the beginning of function.
10573 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
10575         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
10576         reverse.
10578 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
10580         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
10581         when backspace is pressed at beginning of line.
10583 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
10585         * DISTLIST: Added genfslist.sh.
10587         * normal/main.c (fs_module_list): New variable.
10588         (autoload_fs_module): New function.
10589         (read_fs_list): Likewise.
10590         (grub_normal_execute): Call read_fs_list.
10592         * kern/fs.c (grub_fs_autoload_hook): New variable.
10593         (grub_fs_probe): Added support for auto-loading.
10595         * include/grub/normal.h (struct grub_fs_module_list): New struct.
10596         (grub_fs_module_list_t): New type.
10598         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10599         (grub_fs_autoload_hook): New prototype.
10601         * genfslist.sh: New file.
10603         * genmk.rb: Added a rule to generate a filesystem list.
10605 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
10607         * configure.ac: Fix the test for cross-compiling.
10609         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
10610         define GRUB_UTIL anymore.
10612         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10613         so this function works on other systems than just big endian.
10614         (load_modules): Likewise.
10615         (add_segments): Likewise.
10617 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
10619         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
10620         contains `l' modifier, get a long from va_arg().
10622 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
10624         * kern/mm.c (grub_free): If the next free block which is being
10625         merged is the first free block, set the first block to the block
10626         being freed.
10627         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10629 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
10631         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10632         `grub_ieee1275_chosen'.
10634 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
10636         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10637         (grub_ieee1275_chosen): New variable.
10638         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10639         `chosen'.
10640         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10641         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10642         Rename first argument to `phandle' for consistency.
10643         (grub_ieee1275_get_property_length): Likewise.
10644         (grub_ieee1275_next_property): Likewise.  Change type of first argument
10645         to grub_ieee1275_phandle_t.
10646         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10647         Move export next to declaration.
10648         (grub_ieee1275_chosen): New variable.
10649         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10650         Correct cosmetic typo.
10651         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10652         `grub_ieee1275_chosen'.
10653         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10654         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10655         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10656         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10657         `grub_ieee1275_chosen'.
10659 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
10661         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10662         /chosen/bootargs.
10663         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10664         /chosen/bootargs as "variable=value" pairs.
10666 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
10668         * include/grub/misc.h (grub_dprintf): New macro.
10669         (grub_real_dprintf): New prototype.
10670         (grub_strword): Likewise.
10671         (grub_iswordseparator): Likewise.
10672         * kern/misc.c (grub_real_dprintf): New function.
10673         (grub_strword): Likewise.
10674         (grub_iswordseparator): Likewise.
10676 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
10678         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
10679         (roundup): Remove macro.
10680         (grub_ieee1275_flags): Make static.
10681         (grub_ieee1275_realmode): Remove.
10682         (grub_ieee1275_test_flag): New function.
10683         (grub_ieee1275_set_flag): Likewise.
10684         (find_options): Rename to `grub_ieee1275_find_options'; update
10685         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
10686         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
10687         (cmain): New prototype.
10688         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
10689         `grub_ieee1275_flags' directly.
10690         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
10691         machine/biosdisk.h.
10692         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
10693         Don't include grub/machine/init.h.
10694         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
10695         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10696         Remove prototype.
10697         (grub_ieee1275_realmode): Likewise.
10698         (grub_ieee1275_flag): New enum.
10699         (grub_ieee1275_test_flag): New prototype.
10700         (grub_ieee1275_set_flag): New prototype.
10701         * include/grub/powerpc/ieee1275/init.h: Remove file.
10702         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
10703         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
10704         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
10705         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
10706         comment.
10707         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
10708         `grub_ieee1275_test_flag'.
10709         (grub_ieee1275_encode_devname): Likewise.
10711 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
10713         * include/grub/powerpc/ieee1275/ieee1275.h
10714         (grub_ieee1275_encode_devname): New prototype.
10715         (grub_ieee1275_get_filename): Likewise.
10716         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
10717         function.
10718         (grub_set_prefix): Likewise.
10719         (grub_machine_init): Call grub_set_prefix.
10720         * kern/powerpc/ieee1275/openfw.c: Fix typos.
10721         (grub_parse_type): New enum.
10722         (grub_ieee1275_get_devargs): New function.
10723         (grub_ieee1275_get_devname): Likewise.
10724         (grub_ieee1275_parse_args): Likewise.
10725         (grub_ieee1275_get_filename): Likewise.
10726         (grub_ieee1275_encode_devname): Likewise.
10728 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
10730         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
10731         `grub_loader_unset'.
10733 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
10735         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
10736         instead of grub_ieee1275_interpret.
10737         (grub_halt_init): New function.
10738         (grub_halt_fini): Likewise.
10739         (GRUB_MOD_INIT): Correct message grammar.
10740         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
10741         instead of grub_ieee1275_interpret.
10742         (grub_reboot_init): New function.
10743         (grub_reboot_fini): Likewise.
10744         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
10745         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
10746         util/i386/pc/misc.c with commands/ieee1275/halt.c,
10747         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
10748         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
10749         function.
10750         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
10751         Add prototype.
10752         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
10753         prototype.
10754         (grub_halt): Likewise.
10755         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
10756         (cmain): Remove __attribute__((unused)).
10757         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
10758         (grub_heap_len): Likewise.
10759         (grub_machine_fini): New function.
10760         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
10761         (grub_halt): Likewise.
10762         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
10763         function.
10764         * util/powerpc/ieee1275/misc.c: New file.
10766 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10768         * DISTLIST: New file.
10769         * gendistlist.sh: Likewise.
10771         * Makefile.in (COMMON_DISTFILES): Removed.
10772         (BOOT_DISTFILES): Likewise.
10773         (CONF_DISTFILES): Likewise.
10774         (DISK_DISTFILES): Likewise.
10775         (FS_DISTFILES): Likewise.
10776         (INCLUDE_DISTFILES): Likewise.
10777         (KERN_DISTFILES): Likewise.
10778         (LOADER_DISTFILES): Likewise.
10779         (TERM_DISTFILES): Likewise.
10780         (UTIL_DISTFILES): Likewise.
10781         (DISTFILES): Likewise.
10782         (uninstall): Uninstall files in $(pkgdata_DATA).
10783         (DISTLIST): New target.
10784         (distdir): Use the contents of the file DISTLIST to get a list of
10785         distributed files.
10787 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10789         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
10790         descriptor. This is ported from GRUB Legacy.
10792         * gencmdlist.sh: Added an extra semicolon to make it work with
10793         old sed versions. Reported by Robert Bihlmeyer
10794         <robbe@orcus.priv.at>.
10796 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
10798         Automatic loading of commands is supported.
10800         * normal/main.c (read_command_list): New function.
10801         (grub_normal_execute): Call read_command_list.
10803         * normal/command.c (grub_register_command): Return zero or CMD.
10804         Allocate CMD->NAME from the heap.
10805         Initialize CMD->MODULE_NAME to zero.
10806         Find the same name as well. If the same command is found and it is
10807         a dummy command, overwrite members. If it is not a dummy command,
10808         return zero.
10809         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
10810         (grub_command_find): If a dummy command is found, load a module
10811         and retry to find a command only once.
10813         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
10814         make sure that each command is loaded.
10816         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
10817         macro.
10818         (struct grub_command): Remove const from the member `name'.
10819         Add a new member `module_name'.
10820         (grub_register_command): Return grub_command_t.
10822         * commands/help.c (grub_cmd_help): Call grub_command_find to make
10823         sure that each command is loaded.
10825         * genmk.rb (PModule::rule): Specify a module name without the
10826         suffix ".mod" to gencmdlist.sh.
10828 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
10830         * gencmdlist.sh: New file.
10832         * genmk.rb (PModule::rule): Generate a rule for a command list.
10833         Clean command.lst.
10834         Generate command.lst from $(COMMANDFILES).
10836         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
10837         (DATA): Added $(pkgdata_DATA).
10838         (install-local): Install files in $(pkgdata_DATA).
10840 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
10842         * term/i386/pc/vga.c (debug_command): Removed.
10843         (GRUB_MOD_INIT): Do not register the command "debug".
10845         From Hollis Blanchard:
10846         * commands/configfile.c: New file.
10847         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10848         commands/configfile.c.
10849         (pkgdata_MODULES): Added configfile.mod.
10850         (configfile_mod_SOURCES): New variable.
10851         (configfile_mod_CFLAGS): Likewise.
10852         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10853         commands/configfile.c.
10854         (pkgdata_MODULES): Added configfile.mod.
10855         (configfile_mod_SOURCES): New variable.
10856         (configfile_mod_CFLAGS): Likewise.
10857         * util/grub-emu.c (main): Call grub_configfile_init and
10858         grub_configfile_fini.
10859         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
10860         prototype.
10861         [GRUB_UTIL] (grub_configfile_fini): Likewise.
10863 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
10865         * normal/arg.c (grub_arg_show_help): Do not show the bug report
10866         address.
10868         * commands/help.c (grub_cmd_help): Do not print newlines after
10869         the last command in print_command_help.
10871 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
10873         * commands/default.h: New file.
10874         * commands/timeout.h: Likewise.
10875         * normal/context.c: Likewise.
10877         * util/misc.c: Do not include sys/times.h.
10878         Include sys/time.h and grub/machine/time.h.
10879         (grub_get_rtc): Rewritten with gettimeofday.
10881         * util/grub-emu.c (main): Call grub_default_init and
10882         grub_timeout_init before grub_normal_init, and call
10883         grub_timeout_fini and grub_default_fini after grub_main.
10885         * util/console.c (grub_ncurses_checkkey): Return the read
10886         character or -1.
10888         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
10889         timeouts.
10891         * normal/main.c (read_config_file): Push MENU. If this fails,
10892         print an error and wait for a user input.
10893         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
10894         If a menu is empty or an error occurs, pop MENU.
10895         (grub_normal_execute): Pop and free MENU after grub_menu_run
10896         returns.
10898         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
10900         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
10901         include time.h.
10902         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10903         without GRUB_UTIL.
10904         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
10905         time.h.
10906         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10907         without GRUB_UTIL.
10909         * include/grub/normal.h (struct grub_menu_list): New struct.
10910         (grub_menu_list_t): New type.
10911         (struct grub_context): New struct.
10912         (grub_context_t): New type.
10913         (grub_register_command): Got rid of EXPORT_FUNC.
10914         (grub_unregister_command): Likewise.
10915         (grub_context_get): New prototype.
10916         (grub_context_get_current_menu): Likewise.
10917         (grub_context_push_menu): Likewise.
10918         (grub_context_pop_menu): Likewise.
10919         [GRUB_UTIL] (grub_default_init): Likewise.
10920         [GRUB_UTIL] (grub_default_fini): Likewise.
10921         [GRUB_UTIL] (grub_timeout_init): Likewise.
10922         [GRUB_UTIL] (grub_timeout_fini): Likewise.
10924         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
10925         commands/timeout.c and normal/context.c.
10926         (pkgdata_MODULES): Added default.mod and timeout.mod.
10927         (normal_mod_SOURCES): Added normal/context.c.
10928         (default_mod_SOURCES): New variable.
10929         (default_mod_CFLAGS): Likewise.
10930         (timeout_mod_SOURCES): Likewise.
10931         (timeout_mod_CFLAGS): Likewise.
10932         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
10933         conf/i386-pc.rmk.
10934         (pkgdata_MODULES): Added default.mod and timeout.mod.
10935         (normal_mod_SOURCES): Added normal/context.c.
10936         (default_mod_SOURCES): New variable.
10937         (default_mod_CFLAGS): Likewise.
10938         (timeout_mod_SOURCES): Likewise.
10939         (timeout_mod_CFLAGS): Likewise.
10941         * Makefile.in (all-local): Added $(MKFILES).
10943 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
10945         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
10946         (grub_emu_SOURCES): Likewise.
10947         (pkgdata_MODULES): Add `sun.mod'.
10948         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
10949         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10950         `partmap/sun.c'.
10951         (pkgdata_MODULES): Add `sun.mod'.
10952         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
10953         * include/grub/partition.h (grub_sun_partition_map_init): New
10954         prototype.
10955         (grub_sun_partition_map_fini): Likewise.
10956         * partmap/sun.c: New file.
10957         * util/grub-emu.c (main): Initialize and de-initialize the sun
10958         partitionmap support.
10960 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
10962         This implements an Emacs-like menu entry editor.
10964         * normal/menu_entry.c: New file.
10966         * util/console.c (grub_ncurses_putchar): Translate some Unicode
10967         characters to ASCII.
10968         (saved_char): New variable.
10969         (grub_ncurses_checkkey): Rewritten completely.
10970         (grub_ncurses_getkey): Likewise.
10971         (grub_ncurses_init): Call raw instead of cbreak.
10973         * normal/menu.c (print_entry): Do not put a space.
10974         (init_page): Renamed to ...
10975         (grub_menu_init_page): ... this. All callers changed.
10976         (edit_menu_entry): Removed.
10977         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
10979         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
10981         * kern/misc.c (grub_vprintf): Call grub_refresh.
10983         * normal/menu.c (DISP_LEFT): Renamed to ...
10984         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
10985         * normal/menu.c (DISP_UP): Renamed to ...
10986         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
10987         * normal/menu.c (DISP_RIGHT): Renamed to ...
10988         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
10989         * normal/menu.c (DISP_DOWN): Renamed to ...
10990         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
10991         * normal/menu.c (DISP_HLINE): Renamed to ...
10992         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
10993         * normal/menu.c (DISP_VLINE): Renamed to ...
10994         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
10995         * normal/menu.c (DISP_UL): Renamed to ...
10996         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
10997         * normal/menu.c (DISP_UR): Renamed to ...
10998         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
10999         * normal/menu.c (DISP_LL): Renamed to ...
11000         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11001         * normal/menu.c (DISP_LR): Renamed to ...
11002         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11003         * normal/menu.c (TERM_WIDTH): Renamed to ...
11004         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11005         * normal/menu.c (TERM_HEIGHT): Renamed to ...
11006         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11007         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11008         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11009         * normal/menu.c (TERM_MARGIN): Renamed to ...
11010         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11011         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11012         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11013         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11014         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11015         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11016         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11017         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11018         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11019         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11020         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11021         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11022         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11023         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11024         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11025         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11026         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11027         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11028         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11029         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11030         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11031         All callers changed.
11033         * include/grub/normal.h: New prototype.
11035         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11036         normal/menu_entry.c.
11037         (normal_mod_SOURCES): Likewise.
11038         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11039         (normal_mod_SOURCES): Likewise.
11041 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
11043         * include/grub/normal.h (grub_halt_init): New prototype.
11044         (grub_halt_fini): Likewise.
11045         (grub_reboot_init): Likewise.
11046         (grub_reboot_fini): Likewise.
11048         * util/grub-emu.c: Include signal.h.
11049         (main_env): New global variable.
11050         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11051         catch C-c.
11052         (grub_machine_fini): New function.
11053         (main): Call grub_halt_init and grub_reboot_init before
11054         grub_main, and grub_reboot_fini and grub_halt_fini after it.
11055         Call setjmp with MAIN_ENV to go back afterwards.
11056         Call grub_machine_fini right before return.
11058         * include/grub/util/misc.h: Include setjmp.h.
11059         (main_env): New prototype.
11061         * include/grub/kernel.h (grub_machine_fini): New prototype.
11062         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11063         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11065         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11066         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11067         * term/i386/pc/console.c (grub_console_fini): Likewise.
11069         * util/i386/pc/misc.c: New file.
11071         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11072         util/i386/pc/misc.c, commands/i386/pc/halt.c and
11073         commands/i386/pc/reboot.c.
11075 2005-02-14  Guillem Jover  <guillem@hadrons.org>
11077         * include/grub/dl.h (grub_dl_check_header): New prototype.
11078         (grub_arch_dl_check_header): Change return type to grub_err_t,
11079         remove size parameter and export function.  Update all callers.
11080         * kern/dl.c (grub_dl_check_header): New function.
11081         (grub_dl_load_core): Use `grub_dl_check_header' instead of
11082         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
11083         are inside the core.
11084         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11085         independent ELF header checks.
11086         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11087         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11088         `grub_dl_check_header' instead of explicit checks.  Check for the
11089         ELF type.
11090         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11091         `grub_dl_check_header' instead of explicit checks.  Remove arch
11092         specific ELF header checks.
11094         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11095         argument SIZE.
11097 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
11099         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11100         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11102 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11104         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11105         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11106         (part_map_iterate): Clear `grub_errno' and return 0 if
11107         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11108         * partmap/amiga.c (amiga_partition_map_iterate): Return
11109         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11110         * partmap/apple.c (apple_partition_map_iterate): Likewise.
11112 2005-02-01  Guillem Jover  <guillem@hadrons.org>
11114         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11115         help info.
11117 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11119         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11120         Removed prototype.
11121         (grub_rescue_cmd_linux): New prototype.
11122         (grub_rescue_cmd_initrd): Likewise.
11123         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11124         `bi_rec'.
11125         (grub_linux_release_mem): Release the memory for the initrd.
11126         (grub_load_linux): Renamed from this...
11127         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
11128         Changed `entry' not to be static.  Loop over memory regions to
11129         find another one when the default fails.
11130         (grub_rescue_cmd_initrd): New function.
11131         (grub_linux_init): Remove function.
11132         (grub_linux_fini): Likewise.
11133         (GRUB_MOD_INIT): Register `initrd'.
11134         (GRUB_MOD_FINI): Unregister `initrd'.
11135         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11136         Function removed.
11137         (grub_linux_normal_fini): Likewise.
11138         (GRUB_MOD_INIT): Register `initrd'.
11139         (GRUB_MOD_FINI): Unregister `initrd'.
11141 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11143         * commands/help.c: New file.
11144         * normal/arg.c (show_help): Renamed to...
11145         (grub_arg_show_help): ... this.
11146         * commands/i386/pc/halt.c: New file.
11147         * commands/i386/pc/reboot.c: Likewise.
11148         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11149         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11150         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11151         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11152         variables.
11153         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11154         `commands/help.c'.
11155         (pkgdata_MODULES): Add `help.mod'.
11156         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11157         * grub/i386/pc/init.h (grub_reboot): New prototype.
11158         (grub_halt): Likewise.
11159         * include/grub/normal.h (grub_arg_show_help): New prototype.
11160         (grub_help_init): Likewise.
11161         (grub_help_fini): Likewise.
11162         * util/grub-emu.c (main): Initialize and deinitialize the help
11163         command.
11165         * normal/cmdline.c (grub_cmdline_get): Doc fix.
11167         * normal/command.c (grub_command_init): Fixed the description of
11168         the `set' and `unset' commands.
11170 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
11172         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11173         function.
11174         * commands/ieee1275/halt.c: New file.
11175         * commands/ieee1275/reboot.c: Likewise.
11176         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11177         `__attribute__ ((unused))'.  Some GCS related fixed.
11178         (grub_suspend_init) [GRUB_UTIL]: Function removed.
11179         (grub_suspend_fini): Likewise.
11180         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11181         and `halt.mod'.
11182         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11183         (halt_mod_CFLAGS): New variables.
11184         * include/grub/powerpc/ieee1275/ieee1275.h
11185         (grub_ieee1275_interpret): New prototype.
11187 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
11189         * include/grub/misc.h (memmove): New prototype.
11190         (memcpy): Likewise.
11192 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
11194         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11195         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
11197 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
11199         * kern/misc.c (grub_strndup): Function rewritten.
11201 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
11203         * normal/menu.c (TERM_WIDTH): Macro redefined.
11204         (TERM_TOP_BORDER_Y): Likewise.
11205         (draw_border): Replaced while-loop by a for-loop.  Make the number
11206         of lines consistent with the number of lines displayed in
11207         print_entries.  Added a margin below the rectangle.
11208         (print_entry): Make the entry fit in the rectangle.
11209         (print_entries): Display the scroll arrows next to the right
11210         border.
11212 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
11214         * fs/minix.c (grub_minix_find_file): Reserve more space for
11215         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
11216         `grub_strncpy' to copy `path' into it.
11218 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
11220         Add the loopback device, a device via which files can be accessed
11221         as devices.
11223         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11224         (pkgdata_MODULES): Add loopback.mod.
11225         (loopback_mod_SOURCES): New variable.
11226         (loopback_mod_CFLAGS): Likewise.
11227         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11228         `disk/loopback.c'.
11229         (pkgdata_MODULES): Add loopback.mod.
11230         (loopback_mod_SOURCES): New variable.
11231         (loopback_mod_CFLAGS): Likewise.
11232         * disk/loopback.c: new file.
11233         * include/grub/normal.h (grub_loop_init): New prototype.
11234         (grub_loop_fini): New prototype.
11235         * util/grub-emu.c (main): Initialize and de-initialize loopback
11236         support.
11237         * include/grub/disk.h (grub_disk_dev_id): Add
11238         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11240 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
11242         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11243         function.
11244         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11245         (suspend_mod_SOURCES): New variable.
11246         (suspend_mod_CFLAGS): Likewise.
11247         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11248         New prototype.
11249         * commands/ieee1275/suspend.c: New file.
11251 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
11253         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11254         ((unused))' to `__attribute__ ((used))'.
11255         (GRUB_MOD_FINI): Likewise.
11256         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11257         * genmk.rb (PModule): Assign space to common symbols when linking
11258         modules.
11260 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
11262         * include/grub/mm.h (grub_mm_init_region): Change the type of the
11263         `unsigned' arguments to `grub_size_t'.
11264         (grub_malloc): Likewise.
11265         (grub_realloc): Likewise.
11266         (grub_memalign): Likewise.
11267         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11268         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11269         * util/misc.c (grub_malloc): Likewise.
11270         (grub_realloc): Likewise.
11271         * kern/mm.c (get_header_from_pointer): Change the casts to
11272         `unsigned' into a cast to `grub_size_t'.
11274         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11275         point to `currnode' when `currnode' is changed.
11277         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
11278         Schottelius <nico-linux@schottelius.org>.
11280 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
11282         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11283         (note_path): Remove variable.
11284         (GRUB_IEEE1275_NOTE_NAME): New macro.
11285         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11286         (grub_ieee1275_note_hdr): New structure.
11287         (grub_ieee1275_note_desc): Likewise.
11288         (grub_ieee1275_note): Likewise.
11289         (load_note): Remove `dir' argument.  All callers updated.  Remove
11290         `note_img' and `path'.  Do not load a file from `note_path'.
11291         Initialize a struct grub_ieee1275_note and write that to `out'.
11292         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11294 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
11296         * util/misc.c (grub_util_read_image): Revert last change.  It
11297         called `grub_util_read_at', which seeks from the beginning of the
11298         file.
11300 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
11302         * TODO: Add note about endianness in grub-mkimage.
11303         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11304         section.
11305         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11306         (grub_mkimage_SOURCES): New target.
11307         * include/grub/kernel.h (grub_start_addr): Remove variable.
11308         (grub_end_addr): Likewise.
11309         (grub_total_module_size): Likewise.
11310         (grub_kernel_image_size): Likewise.
11311         (GRUB_MODULE_MAGIC): New constant.
11312         (grub_module_info): New structure.
11313         (grub_arch_modules_addr): New prototype.
11314         (grub_get_end_addr): Remove prototype.
11315         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11316         * include/grub/powerpc/ieee1275/kernel.h: New file.
11317         * include/grub/util/misc.h (grub_util_get_fp_size): New
11318         prototype.
11319         (grub_util_read_at): Likewise.
11320         (grub_util_write_image_at): Likewise.
11321         * kern/main.c (grub_get_end_addr): Remove function.
11322         (grub_load_modules): Call grub_arch_modules_addr instead of using
11323         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
11324         the grub_module_info fields instead of calling grub_get_end_addr
11325         as loop conditions.  Move grub_add_unused_region code here.
11326         (grub_add_unused_region): Remove function.
11327         * kern/i386/pc/init.c: Include grub/cache.h.
11328         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
11329         one call to add_mem_region.
11330         (grub_arch_modules_addr): New function.
11331         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11332         (grub_total_module_size): Likewise.
11333         Include grub/machine/kernel.h.
11334         (grub_arch_modules_addr): New function.
11335         * util/grub-emu.c (grub_end_addr): Remove variable.
11336         (grub_total_module_size): Likewise.
11337         (grub_arch_modules_addr): New function.
11338         * util/misc.c: Include unistd.h.
11339         (grub_util_get_fp_size): New function.
11340         (grub_util_read_at): Likewise.
11341         (grub_util_write_image_at): Likewise.
11342         (grub_util_read_image): Call grub_util_read_at.
11343         (grub_util_write_image): Call grub_util_write_image_at.
11344         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11345         additional memory in kernel_img for a struct grub_module_info.
11346         Fill in that grub_module_info.
11347         * util/powerpc/ieee1275/grub-mkimage.c: New file.
11349 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11351         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11352         New function.
11353         * include/grub/powerpc/ieee1275/ieee1275.h
11354         (grub_ieee1275_milliseconds): New prototype.
11355         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11356         Change to 1000.
11357         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11358         grub_ieee1275_milliseconds.
11360 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11362         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11363         variable.
11364         (find_options): New function.
11365         (cmain): Call find_options.
11366         * include/grub/powerpc/ieee1275/ieee1275.h
11367         (grub_ieee1275_realmode): New extern variable.
11368         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11369         grub_map if grub_ieee1275_realmode is false.
11371 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
11373         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11374         lines are inserted and make it work like readline.  Reported by
11375         Vincent Pelletier <subdino2004@yahoo.fr>.
11377 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
11379         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11381         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11382         `kern/powerpc/cache.S'.
11384 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
11386         * genmk.rb: Handle the `Program' class in the main loop.  Written
11387         by Johan Rydberg <jrydberg@gnu.org>.
11388         (Program): New class.
11389         (programs): New variable.
11390         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11391         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
11392         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
11393         (help_arch): Function removed.
11394         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11395         `powerpc/libgcc.h' and `loader.h'.
11396         (pkgdata_PROGRAMS): New variable.
11397         (sbin_UTILITIES): Variable removed.
11398         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11399         (grubof_SOURCES): Variable re-defined so it only includes the
11400         core functionality.
11401         (grubof_CFLAGS): Remove `-DGRUBOF'.
11402         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11403         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11404         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11405         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11406         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11407         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11408         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11409         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11410         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11411         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11412         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11413         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11414         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11415         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11416         (pc_mod_CFLAGS): New variables.
11417         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11418         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11419         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11420         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11421         Moved from here...
11422         * include/grub/i386/pc/init.h (grub_os_area_addr)
11423         (rub_os_area_size): ... to here.
11424         * include/grub/powerpc/ieee1275/ieee1275.h
11425         (grub_ieee1275_entry_fn): Export symbol.
11426         * include/grub/powerpc/ieee1275/init.h: New file.
11427         * include/grub/powerpc/libgcc.h: Likewise.
11428         * include/grub/cache.h: Likewise.
11429         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
11430         <hollis@penguinppc.org>.
11431         * kern/dl.c: Include <grub/cache.h>.
11432         (grub_dl_flush_cache): New function.
11433         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11434         for this module.
11435         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11436         (grub_console_init): Removed prototypes.
11437         (grub_machine_init): Don't initialize the modules anymore.
11438         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11439         static.
11440         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11441         Macro undef removed.
11442         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11443         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11444         relocation `R_PPC_REL32'.  Return an error when the relocation is
11445         unknown.
11446         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11447         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11448         * util/misc.c (grub_arch_sync_caches): Likewise.
11450 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
11452         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11453         `symlist.c', add `grubof_symlist.c'.
11454         (symlist.c): Variable removed.
11455         (grubof_HEADERS): Variable added.
11456         (grubof_symlist.c): New target.
11457         (kernel_syms.lst): Use `grubof_HEADERS' instead of
11458         `kernel_img_HEADERS'.
11459         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11460         * kern/powerpc/dl.c: New file.
11461         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11462         Function removed.
11463         (grub_arch_dl_relocate_symbols): Likewise.
11464         (grub_register_exported_symbols): Likewise.
11466 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
11468         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11469         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
11470         to fail instead.  Reported by Vincent Pelletier
11471         <subdino2004@yahoo.fr>.
11473         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11474         it is not allocated.  Reported by Vincent Pelletier
11475         <subdino2004@yahoo.fr>.
11477         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11478         output so the output looks better.
11480 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
11482         Modulize the partition map support and add support for the amiga
11483         partition map.
11485         * commands/ls.c: Include <grub/partition.h> instead of
11486         <grub/machine/partition.h>.
11487         * kern/disk.c: Likewise.
11488         * kern/rescue.c: Likewise.
11489         * loader/i386/pc/chainloader.c: Likewise.
11490         * normal/cmdline.c: Likewise.
11491         * kern/powerpc/ieee1275/init.c: Likewise.
11492         (grub_machine_init): Call `grub_pc_partition_map_init',
11493         `grub_amiga_partition_map_init' and
11494         `grub_apple_partition_map_init'.
11495         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11496         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
11497         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
11498         `partition.h' and `pc_partition.h'.
11499         (grub_setup_SOURCES): Remove
11500         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
11501         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11502         (grub_emu_SOURCES): Likewise.
11503         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11504         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11505         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11506         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11507         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
11508         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11509         (grubof_SOURCES): Likewise.
11510         * disk/i386/pc/partition.c: File removed.
11511         * disk/powerpc/ieee1275/partition.c: Likewise.
11512         * include/grub/powerpc/ieee1275/partition.h: Likewise.
11513         * include/grub/i386/pc/partition.h: Likewise.
11514         * kern/partition.c: New file.
11515         * partmap/amiga.c: Likewise.
11516         * partmap/apple.c: Likewise.
11517         * partmap/pc.c: Likewise.
11518         * include/grub/partition.h: Likewise..
11519         * include/grub/pc_partition.h: Likewise.
11520         * util/grub-emu.c: Include <grub/partition.h> instead of
11521         <grub/machine/partition.h>.
11522         (main): Call `grub_pc_partition_map_init',
11523         `grub_amiga_partition_map_init' and
11524         `grub_apple_partition_map_init' and deinitialize afterwards.
11525         * util/i386/pc/biosdisk.c: Include `#include
11526         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11527         `<grub/machine/partition.h>'.
11528         * util/i386/pc/grub-setup.c: Likewise.
11529         * util/i386/pc/biosdisk.c: Likewise.
11530         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
11531         partition information in case of a PC partition.
11532         * util/i386/pc/grub-setup.c: Include `#include
11533         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11534         `<grub/machine/partition.h>'.
11535         (setup): Only access the PC specific partition information in case
11536         of a PC partition.
11538 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
11540         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
11541         (grub_longjmp): Likewise.
11542         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
11543         20.
11544         * normal/powerpc/setjmp.S: New file.
11545         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11546         `normal/powerpc/setjmp.S'.
11547         (grubof_CFLAGS): Add `-DGRUBOF'.
11548         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
11549         [GRUB_UTIL && !GRUBOF].
11551 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
11553         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
11554         property named `name'.  Correctly handle the error returned by
11555         `grub_ieee1275_finddevice' if a device can not be opened.
11557 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11559         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
11560         `actual' for negativity.
11561         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11562         kern/fshelp.c.
11564 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
11566         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
11567         (PAGE_OFFSET): New macro.
11568         (CRTC_ADDR_PORT): Likewise.
11569         (CRTC_DATA_PORT): Likewise.
11570         (START_ADDR_HIGH_REGISTER): Likewise.
11571         (START_ADDR_LOW_REGISTER): Likewise.
11572         (GRAPHICS_ADDR_PORT): Likewise.
11573         (GRAPHICS_DATA_PORT): Likewise.
11574         (READ_MAP_REGISTER): Likewise.
11575         (INPUT_STATUS1_REGISTER): Likewise.
11576         (INPUT_STATUS1_VERTR_BIT): Likewise.
11577         (page): New variable.
11578         (wait_vretrace): New function.
11579         (set_read_map): Likewise.
11580         (set_start_address): Likewise.
11581         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
11582         the right page.
11583         (check_vga_mem): Take the page into account.
11584         (write_char): Likewise.
11585         (write_cursor): Likewise.
11586         (scroll_up): Likewise.  Copy the page to the page that is not
11587         shown and switch between both pages.
11588         (grub_vga_putchar): Fix off by one error.
11589         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
11590         account.
11592 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
11594         Add support for iso9660 (including rockridge).
11596         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11597         (iso9660_mod_SOURCES): New variable.
11598         (iso9660_mod_CFLAGS): Likewise.
11599         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11600         * include/grub/fs.h (grub_iso9660_init): New prototype.
11601         * util/grub-emu.c (main): Call `grub_iso9660_init'.
11602         * fs/iso9660.c: New file.
11604         * include/grub/misc.h (grub_strncat): New prototype.
11605         * kern/misc.c (grub_strncat): New function.
11607         * fs/hfs.c (grub_hfs_mount): Translate the error
11608         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11609         * fs/jfs.c (grub_jfs_mount): Likewise.
11610         * fs/ufs.c (grub_ufs_mount): Likewise.
11612 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
11614         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11615         which initialized BAT registers.
11616         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11617         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11618         Move from here...
11619         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11620         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11621         ... to here.
11622         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11623         (grub_mapclaim): Likewise.
11624         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11625         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
11626         hand.
11628 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
11630         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11631         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11632         -ffreestanding and -msoft-float.
11634 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
11636         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11637         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11638         set in grub_ieee1275_flags.
11640 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
11642         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11643         prototype.
11644         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11645         grub_console_init first.
11646         Change the memory range used for grub_ieee1275_claim and
11647         grub_mm_init_region.
11648         Print an error message if the claim fails.
11649         Include <grub/misc.h>.
11651 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
11653         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11654         Call grub_children_iterate for device nodes of type `scsi',
11655         `ide', or `ata'.
11656         (grub_ofdisk_open): Remove manual device alias resolution.
11657         Fix memory leak when device cannot be opened.
11658         * include/grub/powerpc/ieee1275/ieee1275.h
11659         (grub_children_iterate): New prototype.
11660         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11661         New function.
11662         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11663         Return -1 if args.size was -1.
11665 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
11667         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
11668         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
11669         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
11670         Open Firmware's memory for it; claim memory from _start to _end.
11671         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
11672         (_end): New extern.
11673         (_start): Zero BSS from __bss_start to _end.
11674         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11675         New extern.
11676         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
11678 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
11680         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
11681         -1 if args.base was -1.
11683 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
11685         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
11686         escape sequence instead of a literal ^L. Also call
11687         grub_ofconsole_gotoxy.
11689 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
11691         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
11692         void *  arguments to grub_addr_t.  All callers updated.  Also make
11693         the `result' argument optional.
11694         (grub_ieee1275_release): change void * arguments to grub_addr_t.
11695         All callers updated.
11697 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
11699         * commands/ls.c (grub_ls_list_files): Use the string following the
11700         initial ')', if present, as the filesystem path.
11701         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
11703         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
11705 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
11707         Make the source code of the menu interface more readable.
11709         * normal/menu.c: Include grub/mm.h.
11710         (TERM_WIDTH): New macro.
11711         (TERM_HEIGHT): Likewise.
11712         (TERM_INFO_HEIGHT): Likewise.
11713         (TERM_MARGIN): Likewise.
11714         (TERM_SCROLL_WIDTH): Likewise.
11715         (TERM_TOP_BORDER_Y): Likewise.
11716         (TERM_LEFT_BORDER_X): Likewise.
11717         (TERM_BORDER_WIDTH): Likewise.
11718         (TERM_MESSAGE_HEIGHT): Likewise.
11719         (TERM_BORDER_HEIGHT): Likewise.
11720         (TERM_NUM_ENTRIES): Likewise.
11721         (TERM_FIRST_ENTRY_Y): Likewise.
11722         (TERM_ENTRY_WIDTH): Likewise.
11723         (TERM_CURSOR_X): Likewise.
11724         (draw_border): Use macros instead of magic numbers.
11725         (print_entry): Likewise.
11726         (print_entries): Likewise.
11727         (run_menu): Likewise. Also, handle the key 'e'.
11728         (run_menu_entry): Ignore empty command lines.
11729         (print_message): Added a new argument EDIT. If EDIT is true,
11730         print a different message.
11731         (init_page): Likewise.
11732         (edit_menu_entry): New function. Not implemented yet.
11734 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
11736         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
11737         can be loaded from normal mode.
11739         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
11740         `multiboot.mod'.
11741         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
11742         (multiboot_mod_CFLAGS): New variables.
11743         * loader/i386/pc/linux_normal.c: New file.
11744         * loader/i386/pc/multiboot_normal.c: Likewise.
11746         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
11747         attribute `unused'.
11749         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
11750         `fdiro' to read the mode information from instead of `diro'.
11752         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
11753         looking up a symlink.
11755         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
11756         macro.
11757         * normal/command.c (grub_command_execute): Don't parse the
11758         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
11759         flags of the command.
11761         * normal/menu.c (grub_menu_run): Fix typo.
11763 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
11765         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
11767         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
11768         `y + 1' instead of `y - 1'.
11770         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
11772 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
11774         From Hollis Blanchard <hollis@penguinppc.org>:
11775         * kern/misc.c (memmove): New alias for grub_memmove.
11776         (memcmp): New alias for grub_memcmp.
11777         (memset): New alias for grub_memset.
11778         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11779         Change "int handle" to "grub_ieee1275_phandle_t handle".
11780         * include/grub/powerpc/ieee1275/ieee1275.h
11781         (grub_ieee1275_get_property): Likewise.
11783 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
11785         Added normal mode command `chainloader' as module chain.mod, which
11786         depends on normal.mod and _chain.mod.
11788         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
11789         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
11790         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
11791         Deleted prototype.
11792         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
11793         but arguments parsing moved to ...
11794         (grub_chainloader_cmd): ... here.  New function.
11795         * include/grub/i386/pc/chainloader.h: New file.
11796         * loader/i386/pc/chainloader_normal.c: Likewise.
11798 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
11800         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
11801         (grub_mkimage_LDFLAGS): Likewise.
11802         (grub_emu_SOURCES): Likewise.
11803         (kernel_img_HEADERS): Added fshelp.h.
11804         * fs/ext2.c: Include <grub/fshelp.h>.
11805         (FILETYPE_REG): New macro.
11806         (FILETYPE_INO_REG): Likewise.
11807         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
11808         Changed all users.
11809         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
11810         all users.
11811         (grub_fshelp_node): New struct.
11812         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
11813         to a pointer.
11814         (grub_ext2_get_file_block): Removed function.
11815         (grub_ext2_read_block): New function.
11816         (grub_ext2_read_file): Replaced parameter `data' by `node'.
11817         This function was written.
11818         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
11819         (grub_ext2_find_file): Removed function.
11820         (grub_ext2_read_symlink): New function.
11821         (grub_ext2_iterate_dir): Likewise.
11822         (grub_ext2_open): Rewritten.
11823         (grub_ext2_dir): Rewritten.
11824         * include/grub/fshelp.h: New file.
11825         * fs/fshelp.c: Likewise.
11827 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
11829         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
11830         (print_message): Add a missing newline.
11831         (run_menu): Added timeout support.
11832         (run_menu_entry): New local function.
11833         (grub_menu_run): Added support for booting.
11835         * kern/loader.c (grub_loader_is_loaded): New function.
11837         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
11838         (grub_get_rtc): Exported.
11840         * include/grub/i386/pc/time.h: Include grub/symbol.h.
11841         (grub_get_rtc): Exported.
11843         * include/grub/normal.h (struct grub_command_list): Remove
11844         constant from the member `command'.
11846         * include/grub/loader.h (grub_loader_is_loaded): Declared.
11848         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
11850         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
11852 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
11854         Add support for the JFS filesystem.
11856         * fs/jfs.c: New file.
11857         * include/grub/fs.h (grub_jfs_init): New prototype.
11858         (grub_jfs_fini): New prototype.
11859         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
11860         (grub_emu_SOURCES): Likewise.
11861         (pkgdata_MODULES): Add jfs.mod.
11862         (jfs_mod_SOURCES): New variable.
11863         (jfs_mod_CFLAGS): Likewise.
11864         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
11865         (grubof_SOURCES): Likewise.
11866         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
11868         * fs/fat.c (grub_fat_find_dir): Convert the filename little
11869         endian to the host endian.
11870         (grub_fat_utf16_to_utf8): Move function from there...
11871         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
11872         the endianness of the source string anymore.
11873         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
11875 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
11877         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
11878         (grub_boot_fini) [GRUB_UTIL]: Likewise.
11879         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
11880         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
11882         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
11883         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
11884         for `node_found' and `it_dir'.
11885         (grub_hfs_dir): Add prototype for `dir_hook'.
11887         * fs/minix.c (grub_minix_get_file_block): Add prototype for
11888         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
11889         and `indir32' to silence a gcc warning.
11891         * include/grub/fs.h (grub_hfs_init): New prototype.
11892         (grub_hfs_fini): Likewise.
11895 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
11897         Each disk device has its own id now. This is useful to make use
11898         of multiple disk devices.
11900         * include/grub/disk.h (grub_disk_dev_id): New enum.
11901         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
11902         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
11904         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
11905         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11907         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
11908         GRUB_DISK_DEVICE_OFDISK_ID as an id.
11910         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
11911         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11913         * include/grub/disk.h (struct grub_disk_dev): Added a new member
11914         "id" which is used by the cache manager.
11916         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
11917         of just "GRUB".
11919 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
11921         * fs/hfs.c: New file.
11922         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
11923         (grub_emu_SOURCES): Likewise.
11924         (pkgdata_MODULES): Add hfs.mod.
11925         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
11926         (grubof_SOURCES): Likewise.
11927         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
11929         * include/grub/misc.h (grub_strncasecmp): Add prototype.
11930         * kern/misc.c (grub_strncasecmp): Add function.
11932 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
11934         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
11935         with parentheses.
11937         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
11938         (grub_ext2_dir): In case the directory entry type is unknown, read
11939         it from the inode.
11941 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
11943         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
11944         grub_load_linux instead of grub_rescue_cmd_linux as second
11945         argument of grub_rescue_register_command.
11947         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
11949 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
11951         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
11952         function.
11953         * commands/boot.c: Remove the check for `GRUB_UTIL'.
11954         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11955         `loader/powerpc/ieee1275/linux.c',
11956         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
11957         * include/grub/powerpc/ieee1275/ieee1275.h
11958         (grub_ieee1275_release): New prototype.
11959         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
11960         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
11961         normal, boot, linux and linux_normal.
11962         * loader/powerpc/ieee1275/linux.c: New file.
11963         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11965 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
11967         * normal/arg.c (grub_arg_parse): Correct error handling after
11968         reallocating the argumentlist (check if `argl' is not null instead
11969         of checking if `args' is not null).
11970         * kern/mm.c (grub_realloc): Return the same pointer when using the
11971         same region, instead of returning the header address.
11973 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
11975         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
11976         one block instead of two when looking for the initial partition.
11977         (grub_partition_probe): Initialize the local variable `p' with 0.
11978         Use base 10 for the grub_strtoul call.
11979         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
11980         need for one local variable.
11981         (grub_strtoul): Don't add the new value to `num', instead of that
11982         just assign it.
11984 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
11986         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
11987         (pxeboot_img_SOURCES): New variable.
11988         (pxeboot_img_ASFLAGS): Likewise.
11989         (pxeboot_img_LDFLAGS): Likewise.
11990         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
11991         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
11992         <lode_leroy@hotmail.com>.
11994 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
11996         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
11997         there was no input.
11999 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12001         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
12002         the history buffer logic.
12004 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
12006         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12007         (FILETYPE_INO_SYMLINK): New macros.
12008         (grub_ext2_find_file): Check if the node is a directory using the
12009         inode stat information instead of using the filetype in the
12010         dirent.  Exclude the first character of an absolute symlink.
12011         (grub_ext2_dir): Mask out the filetype part of the mode member of
12012         the inode.
12014 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
12016         Add support for UFS version 1 and 2.  Add support for the minix
12017         filesystem version 1 and 2, both the variants with 14 and 30 long
12018         filenames.
12020         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12021         fs/minix.c.
12022         (grub_emu_SOURCES): Likewise.
12023         (pkgdata_MODULES): Add ufs.mod and minix.mod.
12024         (ufs_mod_SOURCES): New variable.
12025         (ufs_mod_CFLAGS): Likewise.
12026         (minix_mod_SOURCES): Likewise.
12027         (minix_mod_CFLAGS): Likewise.
12028         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12029         fs/minix.c.
12030         (grubof_SOURCES): Likewise.
12031         * fs/ufs.c: New file.
12032         * fs/minix.c: New file.
12033         * include/grub/fs.h (grub_ufs_init): New prototype.
12034         (grub_ufs_fini): Likewise.
12035         (grub_minix_init): Likewise.
12036         (grub_minix_fini): Likewise.
12037         * util/grub-emu.c (main): Initialize and deinitialize UFS and
12038         minix fs.
12040 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
12042         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12043         commands/ls.c, commands/terminal.c, commands/boot.c,
12044         commands/cmp.c and commands/cat.c.
12045         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12047         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12048         "env.h"
12050 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
12052         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12053         and grub_, respectively. Because the conversion is trivial and
12054         mechanical, I omit the details here. Please refer to the CVS
12055         if you need more information.
12057 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
12059         * include/pupa: Renamed to ...
12060         * include/grub: ... this.
12061         * util/i386/pc/pupa-mkimage.c: Renamed to ...
12062         * util/i386/pc/grub-mkimage.c: ... this.
12063         * util/i386/pc/pupa-setup.c: Renamed to ...
12064         * util/i386/pc/grub-setup.c: ... this.
12065         * util/pupa-emu.c: Renamed to ...
12066         * util/grub-emu.c: ... this.
12068 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
12070         Add support for the newworld apple macintosh (PPC).  This has been
12071         tested on the powerbook 2000 only.  It only adds support for
12072         generic ieee1275 functions, console and disk support.  This should
12073         be easy to port to other architectures with support for Open
12074         Firmware.
12076         * configure.ac: Accept the powerpc as host_cpu.  In the case of
12077         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
12078         specific tests are only executed while building for the i386.
12079         Inverse test for crosscompile.
12080         * genmk.rb (Utility): Allow assembler files.
12081         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12082         * conf/powerpc-ieee1275.rmk: New file.
12083         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12084         * disk/powerpc/ieee1275/partition.c: Likewise.
12085         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12086         * include/pupa/powerpc/ieee1275/console.h: Likewise.
12087         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12088         * include/pupa/powerpc/ieee1275/time.h: Likewise.
12089         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12090         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12091         * include/pupa/powerpc/ieee1275/loader.h
12092         * include/pupa/powerpc/setjmp.h: Likewise.
12093         * include/pupa/powerpc/types.h: Likewise.
12094         * kern/powerpc/ieee1275/init.c: Likewise.
12095         * kern/powerpc/ieee1275/openfw.c: Likewise.
12096         * term/powerpc/ieee1275/ofconsole.c: Likewise.
12098         These files were written by Johan Rydberg
12099         (jrydberg@night.trouble.net) and I only modified them slightly.
12101         * boot/powerpc/ieee1275/cmain.c: New file.
12102         * boot/powerpc/ieee1275/crt0.S: Likewise.
12103         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12104         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12106 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
12108         * Makefile.in: Update copyright.
12109         * genmodsrc.sh: Likewise.
12110         * gensymlist.sh: Likewise.
12111         * term/i386/pc/vga.c: Indent correctly.
12113         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12114         bugreporting address.
12115         * util/i386/pc/pupa-setup.c (usage): Likewise,
12116         (main): Call pupa_ext2_init and pupa_ext2_fini.
12118         * fs/fat.c (log2): Renamed to ...
12119         (fat_log2): ... this.
12120         All callers changed.
12121         * kern/misc.c (memcpy): Alias to pupa_memmove.
12122         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12123         lvalue cast.
12124         * util/console.c (pupa_ncurses_fini): Return 0.
12126         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12127         Move fail label here.
12128         [__GNU__]: Don't warn when using stat.
12129         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12130         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12131         long int. Use strtol instead of strtoul.
12133 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
12135         * commands/boot.c: New file.
12136         * commands/cat.c: Likewise.
12137         * commands/cmp.c: Likewise.
12138         * commands/ls.c: Likewise.
12139         * commands/terminal.c: Likewise.
12140         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12141         (pupa_register_command): Changed interface to match the new
12142         argument parser.
12143         (pupa_command_execute): Changed (almost rewritten) so it uses
12144         pupa_split_command.  Added support for setting variables using the
12145         syntax `foo=bar'.
12146         (rescue_command): Changed to work with the new argument parser.
12147         (terminal_command): Moved from here to commands/terminal.c.
12148         (set_command): New function.
12149         (unset_command): New function.
12150         (insmod_command): New function.
12151         (rmmod_command): New function.
12152         (lsmod_command): New function.
12153         (pupa_command_init): Don't initialize the command terminal
12154         anymore.  Initialize the commands set, unset, insmod, rmmod and
12155         lsmod.
12156         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12157         (kernel_img_HEADERS): Add arg.h and env.h.
12158         (pupa_mkimage_LDFLAGS): Add kern/env.c.
12159         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12160         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12161         normal/arg.c.
12162         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12163         terminal.mod.
12164         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12165         (boot_mod_SOURCES): New variable.
12166         (terminal_mod_SOURCES): Likewise.
12167         (ls_mod_SOURCES): Likewise.
12168         (cmp_mod_SOURCES): Likewise.
12169         (cat_mod_SOURCES): Likewise.
12171         * normal/arg.c: New file.
12172         * kern/env.c: Likewise.
12173         * include/pupa/arg.h: Likewise.
12174         * include/pupa/env.h: Likewise.
12175         * font/manager.c (font_command): Changed to match argument parsing
12176         interface changes.
12177         (PUPA_MOD_INIT): Likewise.
12178         * hello/hello.c (pupa_cmd_hello): Likewise.
12179         (PUPA_MOD_INIT): Likewise.
12180         * include/pupa/disk.h: Include <pupa/device.h>.
12181         (pupa_print_partinfo): New prototype.
12182         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12183         (pupa_dl_get_prefix): Likewise.
12184         * include/pupa/misc.h: Include <pupa/err.h>.
12185         (pupa_isgraph): New prototype.
12186         (pupa_isdigit): Likewise.
12187         (pupa_split_cmdline): Likewise.
12188         * include/pupa/normal.h: Include <pupa/arg.h>.
12189         (pupa_command): Changed the prototype of the member `func' to
12190         match the argument parsing interface.  Added member `options'.
12191         (pupa_register_command): Updated to match function.
12192         (pupa_arg_parse): New prototype.
12193         (pupa_hello_init) [PUPA_UTIL]: New prototype.
12194         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12195         (pupa_ls_init) [PUPA_UTIL]: Likewise.
12196         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12197         (pupa_cat_init) [PUPA_UTIL]: Likewise.
12198         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12199         (pupa_boot_init) [PUPA_UTIL]: Likewise.
12200         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12201         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12202         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12203         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12204         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12205         * kern/disk.c: Include <pupa/file.h>.
12206         (pupa_print_partinfo): New function.
12207         * kern/dl.c: Include <pupa/env.h>.
12208         (pupa_dl_dir): Variable removed.
12209         (pupa_dl_load): Use the environment variable `prefix' instead of
12210         the variable pupa_dl_dir.
12211         (pupa_dl_set_prefix): Function removed.
12212         (pupa_dl_get_prefix): Likewise.
12213         * kern/i386/pc/init.c: Include <pupa/env.h>.
12214         (pupa_machine_init): Use the environment variable `prefix' instead of
12215         using pupa_dl_set_prefix to set the prefix.
12216         * kern/main.c: Include <pupa/env.h>.
12217         (pupa_set_root_dev): Use the environment variable `prefix' instead of
12218         using pupa_dl_get_prefix to get the prefix.
12219         * kern/misc.c: Include <pupa/env.h>.
12220         (pupa_isdigit): New function.
12221         (pupa_isgraph): Likewise.
12222         (pupa_ftoa): Likewise.
12223         (pupa_vsprintf): Added support for printing values of the type
12224         `double'.  Make it possible to format variable output when using
12225         formatting like `%1.2%f'.
12226         (pupa_split_cmdline): New function.
12227         * kern/rescue.c: Include <pupa/env.h>.
12228         (next_word): Removed function.
12229         (pupa_rescue_cmd_prefix): Likewise.
12230         (pupa_rescue_cmd_set): New function.
12231         (pupa_rescue_cmd_unset): New function.
12232         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12233         split the command line instead of splitting it here.  Added
12234         support for setting variables using the syntax `foo=bar'.  Don't
12235         initialize the prefix command anymore.  Initialized the set and
12236         unset commands.
12237         * normal/cmdline.c: Include <pupa/env.h>.
12238         (pupa_tab_complete): Added prototypes for print_simple_completion,
12239         print_partition_completion, add_completion, iterate_commands,
12240         iterate_dev, iterate_part and iterate_dir. Moved code to print
12241         partition information from here to kern/disk.c.
12242         (pupa_cmdline_run): Don't check if the function exists anymore.
12243         * normal/main.c: Include <pupa/env.h>.
12244         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12245         instead of using pupa_dl_get_prefix to get the prefix.
12246         * term/i386/pc/vga.c: Include <pupa/arg.h>.
12247         (check_vga_mem): Cast pointers to `void *' to silence a gcc
12248         warning.
12249         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12250         (pupa_vga_setcolor): Declare unused variables with `__attribute__
12251         ((unused))' to silence a gcc warning.
12252         (pupa_vga_setcolor): Likewise.
12253         (debug_command): Changed to match argument parsing
12254         interface changes.
12255         * util/pupa-emu.c: Include <pupa/env.h>.
12256         (options): Added 0's for unused fields to silence a gcc warning.
12257         (argp): Likewise.
12258         (main): Use the environment variable `prefix' instead of using
12259         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
12260         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
12261         and terminal.
12263         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12264         * util/misc.c: Include <malloc.h>.
12265         (pupa_malloc): Rewritten so errors are correctly reported.
12266         (pupa_realloc): Likewise.
12267         (pupa_memalign): Likewise.
12268         (pupa_mm_init_region): Declare unused variables with
12269         `__attribute__ ((unused))' to silence a gcc warning.
12270         * normal/i386/setjmp.S: Remove tab at the end of the file to
12271         silence a gcc warning.
12272         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12273         variables with `__attribute__ ((unused))' to silence a gcc
12274         warning.
12275         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12276         local variable i unsigned to silence a gcc warning.
12278         * kern/term.c: Include <pupa/misc.h>.
12279         (pupa_more_lines): New variable.
12280         (pupa_more): Likewise.
12281         (pupa_putcode): When the pager is active pause at the end of every
12282         screen.
12283         (pupa_set_more): New function.
12284         * include/pupa/term.h (pupa_set_more): New prototype.
12287 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
12289         Now this project is GRUB 2 rather than PUPA. The location of
12290         the CVS repository was moved to GRUB's.
12292         * configure.ac: Use bug-grub as the reporting address.
12293         Use GRUB instead of PUPA.
12294         Change the version number to 1.90.
12296 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
12298         * genkernsyms.sh: Updated copyright information.
12299         * genmk.rb: Likewise.
12300         * genmodsrc.sh: Likewise.
12301         * gensymlist.sh: Likewise.
12302         * boot/i386/pc/boot.S: Likewise.
12303         * boot/i386/pc/diskboot.S: Likewise.
12304         * disk/i386/pc/biosdisk.c: Likewise.
12305         * disk/i386/pc/partition.c: Likewise.
12306         * font/manager.c: Likewise.
12307         * fs/ext2.c: Likewise.
12308         * fs/fat.c: Likewise.
12309         * include/pupa/boot.h: Likewise.
12310         * include/pupa/device.h: Likewise.
12311         * include/pupa/disk.h: Likewise.
12312         * include/pupa/dl.h: Likewise.
12313         * include/pupa/elf.h: Likewise.
12314         * include/pupa/err.h: Likewise.
12315         * include/pupa/file.h: Likewise.
12316         * include/pupa/font.h: Likewise.
12317         * include/pupa/fs.h: Likewise.
12318         * include/pupa/kernel.h: Likewise.
12319         * include/pupa/loader.h: Likewise.
12320         * include/pupa/misc.h: Likewise.
12321         * include/pupa/mm.h: Likewise.
12322         * include/pupa/net.h: Likewise.
12323         * include/pupa/normal.h: Likewise.
12324         * include/pupa/rescue.h: Likewise.
12325         * include/pupa/setjmp.h: Likewise.
12326         * include/pupa/symbol.h: Likewise.
12327         * include/pupa/term.h: Likewise.
12328         * include/pupa/types.h: Likewise.
12329         * include/pupa/i386/setjmp.h: Likewise.
12330         * include/pupa/i386/types.h: Likewise.
12331         * include/pupa/i386/pc/biosdisk.h: Likewise.
12332         * include/pupa/i386/pc/boot.h: Likewise.
12333         * include/pupa/i386/pc/console.h: Likewise.
12334         * include/pupa/i386/pc/init.h: Likewise.
12335         * include/pupa/i386/pc/kernel.h: Likewise.
12336         * include/pupa/i386/pc/linux.h: Likewise.
12337         * include/pupa/i386/pc/loader.h: Likewise.
12338         * include/pupa/i386/pc/memory.h: Likewise.
12339         * include/pupa/i386/pc/multiboot.h: Likewise.
12340         * include/pupa/i386/pc/partition.h: Likewise.
12341         * include/pupa/i386/pc/time.h: Likewise.
12342         * include/pupa/i386/pc/vga.h: Likewise.
12343         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12344         * include/pupa/util/getroot.h: Likewise.
12345         * include/pupa/util/misc.h: Likewise.
12346         * include/pupa/util/resolve.h: Likewise.
12347         * kern/device.c: Likewise.
12348         * kern/disk.c: Likewise.
12349         * kern/dl.c: Likewise.
12350         * kern/err.c: Likewise.
12351         * kern/file.c: Likewise.
12352         * kern/fs.c: Likewise.
12353         * kern/loader.c: Likewise.
12354         * kern/main.c: Likewise.
12355         * kern/misc.c: Likewise.
12356         * kern/mm.c: Likewise.
12357         * kern/rescue.c: Likewise.
12358         * kern/term.c: Likewise.
12359         * kern/i386/dl.c: Likewise.
12360         * kern/i386/pc/init.c: Likewise.
12361         * kern/i386/pc/lzo1x.S: Likewise.
12362         * kern/i386/pc/startup.S: Likewise.
12363         * loader/i386/pc/chainloader.c: Likewise.
12364         * loader/i386/pc/linux.c: Likewise.
12365         * loader/i386/pc/multiboot.c: Likewise.
12366         * normal/cmdline.c: Likewise.
12367         * normal/command.c: Likewise.
12368         * normal/main.c: Likewise.
12369         * normal/menu.c: Likewise.
12370         * normal/i386/setjmp.S: Likewise.
12371         * term/i386/pc/console.c: Likewise.
12372         * term/i386/pc/vga.c: Likewise.
12373         * util/console.c: Likewise.
12374         * util/genmoddep.c: Likewise.
12375         * util/misc.c: Likewise.
12376         * util/pupa-emu.c: Likewise.
12377         * util/resolve.c: Likewise.
12378         * util/unifont2pff.rb: Likewise.
12379         * util/i386/pc/biosdisk.c: Likewise.
12380         * util/i386/pc/getroot.c: Likewise.
12381         * util/i386/pc/pupa-mkimage.c: Likewise.
12382         * util/i386/pc/pupa-setup.c: Likewise.
12384 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
12386         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12387         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
12388         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
12389         reading and reset it after reading.
12390         (pupa_ext2_close): Return PUPA_ERR_NONE.
12392         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12393         Correct value.
12394         (struct linux_kernel_header): Add kernel_version and
12395         initrd_addr_max.
12396         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12397         pupa_file_read succeeds.
12398         (pupa_rescue_cmd_initrd): Implement.
12400 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
12402         * fs/ext2.c (pupa_ext2_label): New function.
12403         (pupa_ext2_fs): Added label.
12404         * fs/fat.c (pupa_fat_label): New function.
12405         (pupa_fat_fs): Added label.
12406         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12408         * kern/misc.c (pupa_strndup): New function.
12409         * include/pupa/misc.h (pupa_strndup): New prototype.
12411         * include/pupa/normal.h: Include <pupa/err.h>.
12412         (pupa_set_history): New prototype.
12413         (pupa_iterate_commands): New prototype.
12414         * normal/cmdline.c: Include <pupa/machine/partition.h>,
12415         <pupa/disk.h>, <pupa/file.h>.
12416         (hist_size): New variable.
12417         (hist_lines): Likewise.
12418         (hist_end): Likewise.
12419         (hist_used): Likewise.
12420         (pupa_set_history): New function.
12421         (pupa_history_get): Likewise.
12422         (pupa_history_add): Likewise.
12423         (pupa_history_replace): Likewise.
12424         (pupa_tab_complete): Likewise.
12425         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
12426         completion shows partitionnames while completing partitions, this
12427         feature was suggested by Jeff Bailey.
12428         * normal/command.c (pupa_iterate_commands): New function.
12429         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12430         (pupa_normal_init): Initialize history buffer.
12431         (PUPA_MOD_INIT): Likewise.
12432         (pupa_normal_fini): Free the history buffer.
12433         (PUPA_MOD_FINI): Likewise.
12435         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12436         key.
12438         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12439         * configure.ac [i386]: Check for regparam bug.
12440         (NESTED_FUNC_ATTR) [! i386]: Defined.
12442 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
12444         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12445         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12446         (pupa_emu_SOURCES): New variable.
12447         (pupa_emu_LDFLAGS): Likewise.
12448         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12449         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12450         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12451         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12452         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12453         (pupa_jmp_buf): New typedef.
12454         (pupa_setjmp) [PUPA_UTIL]: New macro.
12455         (pupa_longjmp) [PUPA_UTIL]: Likewise.
12456         * include/pupa/term.h (struct pupa_term): New member `refresh'.
12457         (pupa_refresh): New prototype.
12458         * include/pupa/util/getroot.h: New file.
12459         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12460         it.
12461         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12462         (pupa_rescue_cmd_cat): Likewise.
12463         (pupa_rescue_cmd_ls): Likewise.
12464         (pupa_rescue_cmd_testload): Likewise.
12465         (pupa_rescue_cmd_lsmod): Likewise.
12466         * normal/cmdline.c (pupa_cmdline_get): Likewise.
12467         * normal/menu.c (run_menu): Likewise.
12468         * kern/term.c (pupa_cls): Likewise.
12469         (pupa_refresh): New function.
12470         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12471         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12472         * util/console.c: New file.
12474         * util/i386/pc/getroot.c: New file.
12475         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12476         (pupa_putchar): New function.
12477         (pupa_refresh): Likewise.
12478         (xgetcwd): Function moved to ...
12479         (strip_extra_slashes): Likewise.
12480         (get_prefix): Likewise.
12481         * util/i386/pc/getroot.c: ... here.
12482         (find_root_device): Function moved and renamed to...
12483         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12484         Changed all callers.
12485         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12486         and renamed to...
12487         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12488         Changed all callers.
12489         * util/misc.c (pupa_memalign): New function.
12490         (pupa_mm_init_region): Likewise.
12491         (pupa_register_exported_symbols): Likewise.
12492         (pupa_putchar): Function removed.
12493         * util/pupa-emu.c: New file.
12495 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
12497         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12498         (_multiboot_mod_SOURCES): New variable.
12499         (_multiboot_mod_CFLAGS): Likewise.
12500         * loader/i386/pc/multiboot.c: New file.
12501         * include/pupa/i386/pc/multiboot.h: Likewise.
12502         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12503         (pupa_multiboot_real_boot): New function.
12504         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12505         (pupa_multiboot_real_boot): New prototype.
12506         (pupa_rescue_cmd_multiboot): Likewise
12507         (pupa_rescue_cmd_module): Likewise.
12509         * kern/loader.c (pupa_loader_set): Continue when
12510         pupa_loader_unload_func() fails.
12511         (pupa_loader_unset): New function.
12512         * include/pupa/loader.h (pupa_loader_unset): New prototype.
12514         * kern/misc.c (pupa_stpcpy): New function.
12515         * include/pupa/misc.h (pupa_stpcpy): New prototype.
12517 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
12519         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12520         for available extensions.
12522         * include/pupa/i386/pc/time.h: New file.
12523         * kern/disk.c: Include <pupa/machine/time.h>.
12524         (PUPA_CACHE_TIMEOUT): New macro.
12525         (pupa_last_time): New variable.
12526         (pupa_disk_open): Flush the cache when there was a timeout.
12527         (pupa_disk_close): Reset the timer.
12528         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
12529         pupa_currticks.
12530         * util/misc.c: Include <sys/times.h>
12531         (pupa_get_rtc): New function.
12533 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
12535         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
12536         as blocks.
12537         (pupa_ext2_get_file_block): Use blocks member.
12539         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
12540         first block. Return -1 instead of pupa_errno on error.
12542 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
12544         * README: In the pupa-mkimage example use _chain instead of chain
12545         and ext2 instead of fat.
12546         * TODO: Replace ext2fs with jfs as an example.  Add an item for
12547         adding journal playback for ext2fs.
12548         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
12549         (pkgdata_MODULES): Added ext2.mod.
12550         (ext2_mod_SOURCES): New variable.
12551         (ext2_mod_CFLAGS): Likewise.
12552         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
12553         * include/pupa/misc.h (pupa_strncpy): New prototype.
12554         (pupa_strcat): Likewise.
12555         (pupa_strncmp): Likewise.
12556         * kern/misc.c (pupa_strcat): Enable function.
12557         (pupa_strncpy): New function.
12558         (pupa_strncmp): Likewise.
12559         * fs/ext2.c: New file.
12561         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
12562         when the read failed before retrying.
12563         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
12564         (_FILE_OFFSET_BITS): Likewise.
12565         * configure.ac: Added AC_SYS_LARGEFILE.
12567 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
12569         * genmk.rb (PModule#rule): Make sure to get only symbol names
12570         from the output of nm.
12571         Reported by Robert Millan <zeratul2@wanadoo.es>.
12573 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
12575         I forgot to check in these changes for a long time. This adds
12576         incomplete support for VGA console, and this is still very
12577         buggy. Also, a lot of consideration is required for I18N,
12578         UNICODE, and VGA font issues. Therefore, assume that this is
12579         such that "better than nothing".
12581         * font/manager.c: New file.
12582         * include/pupa/font.h: Likewise.
12583         * include/pupa/i386/pc/vga.h: Likewise.
12584         * term/i386/pc/vga.c: Likewise.
12585         * util/unifont2pff.rb: Likewise.
12587         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
12588         (pkgdata_MODULES): Added vga.mod and font.mod.
12589         (vga_mod_SOURCES): New variables.
12590         (vga_mod_CFLAGS): Likewise.
12591         (font_mod_SOURCES): Likewise.
12592         (font_mod_CFLAGS): Likewise.
12594         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12596         * include/pupa/term.h: Include pupa/err.h.
12597         (struct pupa_term): Added init and fini.
12598         Changed the argument of putchar to pupa_uint32_t.
12600         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12601         (pupa_console_real_putchar): New prototype.
12602         (pupa_console_putchar): Removed.
12603         (pupa_console_checkkey): Exported.
12604         (pupa_console_getkey): Likewise.
12606         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12607         characters.
12609         * kern/term.c (pupa_term_set_current): Rewritten.
12610         (pupa_putchar): Likewise.
12611         (pupa_putcode): New function.
12613         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12614         (pupa_console_real_putchar): ... this.
12615         (pupa_vga_set_mode): New function.
12616         (pupa_vga_get_font): Likewise.
12618         * normal/command.c: Include pupa/term.h.
12619         (terminal_command): New function.
12620         (pupa_command_init): Register the command "terminal".
12622         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12623         (DISP_UP): Likewise.
12624         (DISP_RIGHT): Likewise.
12625         (DISP_DOWN): Likewise.
12626         (DISP_HLINE): Likewise.
12627         (DISP_VLINE): Likewise.
12628         (DISP_UL): Likewise.
12629         (DISP_UR): Likewise.
12630         (DISP_LL): Likewise.
12631         (DISP_LR): Likewise.
12633         * term/i386/pc/console.c (pupa_console_putchar): New function.
12635 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
12637         * util/resolve.c (pupa_util_resolve_dependencies): BUG
12638         FIX. Reverse the path_list.
12640         * include/pupa/normal.h: Export pupa_register_command and
12641         pupa_unregister_command.
12643         * hello/hello.c (pupa_cmd_hello): New module.
12644         * conf/i386-pc.rmk: Added hello.mod.
12646 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
12648         * kern/i386/pc/lzo1x.S: New file.
12650         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12651         (compress_kernel): New variable.
12652         (generate_image): Heavily modified to support compressing a
12653         large part of the core image.
12655         * util/misc.c (pupa_util_read_image): Fix a file descriptor
12656         leak.
12657         (pupa_util_load_image): New function.
12659         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12660         (pupa_compressed_size): New variable.
12661         (codestart): Enable Gate A20 here.
12662         Decompress the compressed part of the core image.
12663         Rearrange the code to put functions and variables which are
12664         required for initialization in the non-compressed part.
12665         Include lzo1x.S.
12667         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
12668         here.
12670         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
12672         * include/pupa/i386/pc/kernel.h
12673         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
12674         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
12675         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12676         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12677         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
12679         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
12681         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
12682         (Utility#rule): Likewise.
12684         * configure.ac: Check if LZO is available.
12686 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
12688         * include/pupa/normal.h: New file.
12689         * include/pupa/setjmp.h: Likewise.
12690         * include/pupa/i386/setjmp.h: Likewise.
12691         * normal/cmdline.c: Likewise.
12692         * normal/command.c: Likewise.
12693         * normal/main.c: Likewise.
12694         * normal/menu.c: Likewise.
12695         * normal/i386/setjmp.S: Likewise.
12697         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
12698         (pupa_rescue_cmd_initrd): Likewise.
12700         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
12701         Likewise.
12703         * kern/i386/pc/startup.S (translation_table): New variable.
12704         (translate_keycode): New function.
12705         (pupa_console_getkey): Call translate_keycode.
12707         * kern/rescue.c (attempt_normal_mode): New function.
12708         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
12709         it failed, print a message.
12711         * kern/mm.c (pupa_real_malloc): Print more information when a
12712         free magic is broken.
12713         (pupa_free): If the first free header is not free actually, set
12714         it to P.
12716         * kern/main.c (pupa_load_normal_mode): Just load the module
12717         "normal".
12718         (pupa_main): Don't print the message
12719         "Entering into rescue mode..." here.
12721         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
12722         Declared.
12723         (pupa_rescue_cmd_initrd): Likewise.
12724         (pupa_rescue_cmd_initrd): Likewise.
12726         * include/pupa/symbol.h (FUNCTION): Specify the type.
12727         (VARIABLE): Likewise.
12729         * include/pupa/err.h (pupa_err_t): Added
12730         PUPA_ERR_UNKNOWN_COMMAND.
12732         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
12733         (pupa_dl_get_prefix): Likewise.
12735         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
12736         Added _chain.mod and _linux.mod instead of chain.mod and
12737         linux.mod.
12738         (chain_mod_SOURCES): Renamed to ...
12739         (_chain_mod_SOURCES): ... this.
12740         (chain_mod_CFLAGS): Renamed to ...
12741         (_chain_mod_CFLAGS): ... this.
12742         (linux_mod_SOURCES): Renamed to ...
12743         (_linux_mod_SOURCES): ... this.
12744         (linux_mod_CFLAGS): Renamed to ...
12745         (_linux_mod_CFLAGS): ... this.
12746         (normal_mod_SOURCES): New variable.
12747         (normal_mod_CFLAGS): Likewise.
12748         (normal_mod_ASFLAGS): Likewise.
12750 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
12752         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
12753         possible.
12755         * kern/dl.c (pupa_dl_ref): Refer depending modules
12756         recursively.
12757         (pupa_dl_unref): Unrefer depending modules recursively.
12758         Don't call pupa_dl_unload implicitly, because PUPA can crash if
12759         a module is unloaded before one depending on that module is
12760         unloaded.
12761         (pupa_dl_unload): Unload depending modules explicitly,
12762         if possible.
12764 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
12766         * include/pupa/i386/pc/linux.h: New file.
12767         * loader/i386/pc/linux.c: Likewise.
12769         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
12770         Removed.
12771         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
12772         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
12773         of PUPA_CHAINLOADER_BOOT_SECTOR.
12775         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
12776         (pupa_linux_prot_size): New variable.
12777         (pupa_linux_tmp_addr): Likewise.
12778         (pupa_linux_real_addr): Likewise.
12779         (pupa_linux_boot_zimage): New function.
12780         (pupa_linux_boot_bzimage): Likewise.
12782         * kern/i386/pc/init.c (struct mem_region): New structure.
12783         (MAX_REGIONS): New macro.
12784         (mem_regions): New variable.
12785         (num_regions): Likewise.
12786         (pupa_os_area_addr): Likewise.
12787         (pupa_os_area_size): Likewise.
12788         (pupa_lower_mem): Likewise.
12789         (pupa_upper_mem): Likewise.
12790         (add_mem_region): New function.
12791         (compact_mem_regions): Likewise.
12792         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
12793         the size of the conventional memory and that of so-called upper
12794         memory (before the first memory hole).
12795         Instead of adding each found region to free memory, use
12796         add_mem_region and add them after removing overlaps.
12797         Also, add only 1/4 of the upper memory to free memory. The rest
12798         is used for loading OS images. Maybe this is ad hoc, but this
12799         makes it much easier to relocate OS images when booting.
12801         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
12802         (pupa_enter_rescue_mode): Don't register initrd and module.
12804         * kern/mm.c: Include pupa/dl.h.
12806         * kern/main.c: Include pupa/file.h and pupa/device.h.
12808         * kern/loader.c (pupa_loader_load_module_func): Removed.
12809         (pupa_loader_load_module): Likewise.
12811         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
12812         ``.o''.
12814         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
12815         (pupa_linux_tmp_addr): Likewise.
12816         (pupa_linux_real_addr): Likewise.
12817         (pupa_linux_boot_zimage): Likewise.
12818         (pupa_linux_boot_bzimage): Likewise.
12820         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
12821         (pupa_upper_mem): Likewise.
12822         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
12823         module is too dangerous.
12825         * include/pupa/loader.h (pupa_os_area_addr): Declared.
12826         (pupa_os_area_size): Likewise.
12827         (pupa_loader_set): Remove the first argument. Loader doesn't
12828         manage modules or initrd any longer.
12829         (pupa_loader_load_module): Removed.
12831         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
12832         (linux_mod_SOURCES): New variable.
12833         (linux_mod_CFLAGS): Likewise.
12835 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
12837         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
12838         the length of a blocklist correctly.
12840         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
12841         Use ioctl only if the OS file is a block device.
12842         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
12843         not very useful for normal files.
12845         * kern/main.c (pupa_set_root_dev): New function.
12846         (pupa_load_normal_mode): Likewise.
12847         (pupa_main): Call those above.
12849         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
12850         pupa_uint16_t.
12852         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
12854 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
12856         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
12857         (setup): Configure the installed partition information and the
12858         dl prefix.
12860         * loader/i386/pc/chainloader.c (my_mod): New variable.
12861         (pupa_chainloader_unload): New function.
12862         (pupa_rescue_cmd_chainloader): Refer itself.
12863         (PUPA_MOD_INIT): Save its own module in MY_MOD.
12865         * kern/i386/pc/startup.S (install_partition): Removed.
12866         (version_string): Likewise.
12867         (config_file): Likewise.
12868         (pupa_install_dos_part): New variable.
12869         (pupa_install_bsd_part): Likewise.
12870         (pupa_prefix): Likewise.
12871         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
12873         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
12874         and pupa/misc.h.
12875         (make_install_device): New function.
12876         (pupa_machine_init): Set the dl prefix.
12878         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
12879         (buf): Renamed to ...
12880         (linebuf): ... this.
12881         (pupa_rescue_cmd_prefix): New function.
12882         (pupa_rescue_cmd_insmod): Likewise.
12883         (pupa_rescue_cmd_rmmod): Likewise.
12884         (pupa_rescue_cmd_lsmod): Likewise.
12885         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
12886         rmmod and lsmod.
12888         * kern/mm.c (pupa_memalign): If failed even after invalidating
12889         disk caches, unload unneeded modules and retry.
12891         * kern/misc.c (pupa_memmove): New function.
12892         (pupa_memcpy): Removed.
12893         (pupa_strcpy): New function.
12894         (pupa_itoa): Made static.
12896         * kern/dl.c (pupa_dl_iterate): New function.
12897         (pupa_dl_ref): Likewise.
12898         (pupa_dl_unref): Likewise.
12899         (pupa_dl_unload): Return if succeeded or not.
12900         (pupa_dl_unload_unneeded): New function.
12901         (pupa_dl_unload_all): Likewise.
12902         (pupa_dl_init): Renamed to ...
12903         (pupa_dl_set_prefix): ... this.
12904         (pupa_dl_get_prefix): New function.
12906         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
12907         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
12908         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12909         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12910         (pupa_install_dos_part): Declared.
12911         (pupa_install_bsd_part): Likewise.
12912         (pupa_prefix): Likewise.
12913         (pupa_boot_drive): Likewise.
12915         * include/pupa/types.h: Fix a typo.
12917         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
12918         pupa_memmove.
12919         (pupa_memmove): Declared.
12920         (pupa_strcpy): Likewise.
12922         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
12923         pupa_mod_init takes one argument, its own module.
12924         (pupa_dl_unload_unneeded): Declared.
12925         (pupa_dl_unload_all): Likewise.
12926         (pupa_dl_ref): Likewise.
12927         (pupa_dl_unref): Likewise.
12928         (pupa_dl_iterate): Likewise.
12929         (pupa_dl_init): Renamed to ...
12930         (pupa_dl_set_prefix): ... this.
12931         (pupa_dl_get_prefix): Declared.
12933         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
12934         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
12935         unloaded.
12936         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
12937         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
12939         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
12940         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
12942 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
12944         * util/i386/pc/pupa-setup.c (setup): Define the internal
12945         function find_first_partition_start at the top level, because GCC
12946         3.0.x cannot compile internal functions in deeper scopes
12947         correctly.
12948         (find_root_device): Use lstat instead of stat.
12949         Don't follow symbolic links.
12950         Fix the path-constructing code.
12952         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
12953         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
12954         by a BLKGETSIZE ioctl first, because block devices don't fill
12955         the member st_mode of the structure stat on Linux.
12956         [__linux__] (linux_find_partition): Use a temporary buffer
12957         REAL_DEV for the working space. Copy it to DEV before returning.
12958         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
12959         buffer cache consistent.
12960         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
12961         strncmp. The previous value was merely wrong.
12962         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
12964         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
12965         FAT size is 12. The previous value was merely wrong.
12967         * kern/main.c (pupa_main): Don't split the starting message from
12968         newlines.
12970         * kern/term.c (pupa_putchar): Put CR after LF instead of before
12971         LF, because BIOS goes crazy about character attributes in this
12972         case.
12974 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
12976         * include/i386/pc/util/biosdisk.h: New file.
12977         * util/i386/pc/biosdisk.c: Likewise.
12978         * util/i386/pc/pupa-setup.c: Likewise.
12980         * Makefile.in (INCLUDE_DISTFILES): Added
12981         include/pupa/i386/pc/util/biosdisk.h.
12982         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
12983         directory util/i386/pc.
12984         (install-local): Added a rule for sbin_UTILITIES.
12985         (uninstall): Likewise.
12987         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
12989         * util/misc.c (xrealloc): New function.
12990         (pupa_malloc): Likewise.
12991         (pupa_free): Likewise.
12992         (pupa_realloc): Likewise.
12993         (pupa_stop): Likewise.
12994         (pupa_putchar): Likewise.
12996         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
12998         * include/pupa/util/misc.h (xrealloc): Declared.
13000         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13001         macro.
13002         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13003         (PUPA_BOOT_MACHINE_BPB_END): ... this.
13005         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13006         [PUPA_UTIL] (pupa_fat_fini): Likewise.
13008         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13009         way should be implemented.
13010         [PUPA_UTIL] (pupa_fat_fini): Likewise.
13012         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13013         the size of NAME for safety.
13014         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13015         0x88.
13017         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13018         (pupa_setup_SOURCES): Likewise.
13020         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13022 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
13024         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13025         bunch of pushl's from pusha, because this destroys the return
13026         value.
13028 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
13030         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13031         This means that any missing prototypes could be fatal. Also, you
13032         must take care when writing assembly code. See the comments at
13033         the beginning of startup.S, for more details.
13035         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13036         compilation mechanism.
13037         (pupa_chainloader_real_boot): Likewise.
13038         (pupa_biosdisk_rw_int13_extensions): Likewise.
13039         (pupa_biosdisk_rw_standard): Likewise.
13040         (pupa_biosdisk_check_int13_extensions): Likewise.
13041         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13042         (pupa_biosdisk_get_diskinfo_standard): Likewise.
13043         (pupa_get_memsize): Likewise.
13044         (pupa_get_mmap_entry): Likewise.
13045         (pupa_console_putchar): Likewise.
13046         (pupa_console_setcursor): Likewise.
13047         (pupa_getrtsecs): Use pushl instead of push.
13049         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13050         memory instead of the stack for a mmap entry, because some
13051         BIOSes may ignore the maximum size and overflow.
13053         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13055         * genmk.rb (PModule#rule): Compile automatically generated
13056         sources with module-specific CFLAGS as well as other sources.
13058 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13060         * configure.ac: Check ld.
13061         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13062         respectively, before checking endianness and sizes.
13064         * Makefile.in (LD): New variable.
13066 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13068         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13070 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
13072         * Changelog: New file.