Commit graph

406 commits

Author SHA1 Message Date
hollisb
02bb8accd5 2005-09-25 Hollis Blanchard <hollis@penguinppc.org>
* util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
2006-09-26 04:24:38 +00:00
hollisb
663b72f0fa 2005-09-25 Hollis Blanchard <hollis@penguinppc.org>
* include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
	(__cmpdi): Likewise.

	* kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
	`flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
	`grub_ssize_t'.

	* kern/powerpc/ieee1275/cmain.c: include grub/misc.h.

	* loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
	to type `grub_ssize_t'.
	(grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
2006-09-26 03:49:41 +00:00
marco_g
7f9a85316a 2006-09-22 Marco Gerards <marco@gnu.org>
* normal/script.c (grub_script_create_cmdmenu): Skip leading
	newlines.
2006-09-22 21:32:48 +00:00
marco_g
b5ef11025a 2006-09-22 Marco Gerards <marco@gnu.org>
* commands/echo.c: New file.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.

	* conf/common.rmk (echo_mod_SOURCES): New variable.
	(echo_mod_CFLAGS): Likewise.
	(echo_mod_LDFLAGS): Likewise.
2006-09-22 21:09:14 +00:00
marco_g
2cff3677bb 2006-09-22 Marco Gerards <marco@gnu.org>
* normal/main.c (get_line): Malloc memory instead of using
	preallocated memory.  Removed the arguments `cmdline' and
	`max_len'.  Updated all callers.
2006-09-22 20:23:00 +00:00
marco_g
6ba4688b23 2006-09-22 Marco Gerards <marco@gnu.org>
* conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
	(normal_mod_DEPENDENCIES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
	(normal_mod_DEPENDENCIES): Likewise.

	* conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
2006-09-22 19:36:32 +00:00
jrydberg
e02ac02c5f 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
* genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
        programs.
        * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
        (normal_mod_DEPENDENCIES): Likewise.
        * conf/i386-pc.mk: Regenerate.
        * conf/i386-efi.mk: Likewise
        * conf/common.mk: Likewise.
        * conf/powerpc-ieee1275.mk: Likewise.
        * conf/sparc64-ieee1275.mk: Likewise.
2006-09-22 00:27:38 +00:00
robertmh
8d252e442c 2006-09-22 Robert Millan <rmh@aybabtu.com>
Sync with i386 version.
	* conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
	* conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
2006-09-21 22:24:05 +00:00
robertmh
209bf7ac33 2006-09-21 Robert Millan <rmh@aybabtu.com>
Import from GRUB Legacy (lib/device.c):
	* util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
	(init_device_map) [__linux__]: Add support for I2O devices.
2006-09-21 17:39:14 +00:00
robertmh
78fa179013 Minor fix in my changelog entry. 2006-09-21 17:08:19 +00:00
marco_g
6b14609040 2006-09-14 Marco Gerards <marco@gnu.org>
* conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
	`-melf_i386'.
2006-09-14 19:04:18 +00:00
robertmh
e38600a8ac Oops. Fix wrong ChangeLog date. 2006-09-14 18:53:24 +00:00
robertmh
2952da5dda 2006-08-19 Robert Millan <rmh@aybabtu.com>
* util/i386/pc/grub-install.in: Skip menu.lst when removing
	/boot/grub/*.lst.
	* util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
	* util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
	before adding it to device.map.
2006-09-14 18:52:50 +00:00
jrydberg
01b82a64e2 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
* genmk.rb: Let GCC generate dependenceies the first time it
        compiles a file; using the -MD option.
        * conf/common.mk: Regenerate.
        * conf/i386-pc.mk: Likewise.
        * conf/i386-efi.mk: Likewise.
        * conf/powerpc-ieee1275.mk: Likewise.
        * conf/sparc64-ieee1275.mk: Likewise.
2006-08-15 12:29:08 +00:00
okuji
1064790dc6 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
Move the prototypes of grub_setjmp and grub_longjmp to
        cpu/setjmp.h, so that each architecture may specify different
        attributes.

        * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
        (grub_longjmp): Likewise.
        * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
        (grub_longjmp): Likewise.
        * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
        (grub_longjmp): Likewise.

        * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
        [!GRUB_UTIL] (grub_longjmp): Removed.
2006-08-04 19:23:28 +00:00
subdino
29dda3ed74 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
* kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
        "color!" method does not return any value.
2006-08-01 21:45:34 +00:00
chaac
ad2a06edba 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
* include/grub/bitmap.h: New file.

	* include/grub/i386/pc/vbeutil.h: Likewise.

	* video/bitmap.c: Likewise.

	* video/readers/tga.c: Likewise.

	* video/i386/pc/vbeutil.c: Likewise.

	* commands/videotest.c: Code cleanup and updated to reflect to new
	video API.

	* term/gfxterm.c: Likewise.

	* video/video.c: Likewise.

	* conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
	(vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
	(bitmap_mod_SOURCES): New entry.
	(bitmap_mod_CFLAGS): Likewise.
	(bitmap_mod_LDFLAGS): Likewise.
	(tga_mod_SOURCES): Likewise.
	(tga_mod_CFLAGS): Likewise.
	(tga_mod_LDFLAGS): Likewise.

	* include/grub/video.h (grub_video_blit_operators): New enum type.
	(grub_video_render_target): Changed as forward declaration and moved
	actual definition to be video driver specific.
	(grub_video_adapter.blit_bitmap): Added blitting operator.
	(grub_video_adapter.blit_render_target): Likewise.
	(grub_video_blit_bitmap): Likewise.
	(grub_video_blit_render_target): Likewise.

	* include/grub/i386/pc/vbe.h (grub_video_render_target): Added
	driver specific render target definition.
	(grub_video_vbe_map_rgba): Added driver internal helper.
	(grub_video_vbe_unmap_color): Updated to use
	grub_video_i386_vbeblit_info.
	(grub_video_vbe_get_video_ptr): Likewise.

	* include/grub/i386/pc/vbeblit.h
	(grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
	grub_video_i386_vbeblit_info.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_index_index): Likewise.
	(grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
	(grub_video_i386_vbeblit_blend): Added generic blitter for blend
	operator.
	(grub_video_i386_vbeblit_replace): Added generic blitter for replace
	operator.

	* video/i386/pc/vbeblit.c: Updated to reflect changes on
	include/grub/i386/pc/vbeblit.h.

	* include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
	Updated to use grub_video_i386_vbeblit_info.
	(grub_video_i386_vbefill_R8G8B8): Likewise.
	(grub_video_i386_vbefill_index): Likewise.
	(grub_video_i386_vbefill): Added generic filler.

	* video/i386/pc/vbefill.c: Updated to reflect changes on
	include/grub/i386/pc/vbefill.h.

	* video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
	grub_video_i386_vbeblit_info.
	(grub_video_vbe_unmap_color): Likewise.
	(grub_video_vbe_blit_glyph): Likewise.
	(grub_video_vbe_scroll): Likewise.
	(grub_video_vbe_draw_pixel): Removed function.
	(grub_video_vbe_get_pixel): Likewise.
	(grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
	updated code to use it.
	(common_blitter): Added common blitter for render target and bitmap.
	(grub_video_vbe_blit_bitmap): Updated to use common_blitter.
	(grub_video_vbe_blit_render_target): Likewise.
2006-07-31 14:21:36 +00:00
jrydberg
bc8c036d11 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
* kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
        is in text mode if there is no console control protocol instance
        available.
2006-07-30 12:20:48 +00:00
chaac
684a8eff89 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
* include/grub/video.h: Code cleanup.

        * include/grub/i386/pc/vbe.h: Likewise.

        * video/i386/pc/vbe.c: Likewise.

        * video/i386/pc/vbeblit.c: Likewise.

        * video/i386/pc/vbefill.c: Likewise.

        * video/video.c: Likewise.  Also added more comments.
2006-07-29 11:22:52 +00:00
chaac
5915059b61 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
* disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
        (struct grub_biosdisk_dap): Likewise.

        * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
        linkage settings for all functions.
2006-07-29 10:11:01 +00:00
marco_g
90ce5d5630 2006-07-12 Marco Gerards <marco@gnu.org>
* configure.ac (--enable-mm-debug): Fix typo.

	* genkernsyms.sh.in: Use proper quoting for `CC'.
2006-07-12 20:42:52 +00:00
jeroen
43e7f879ae 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
* conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
	(normal_mod_ASFLAGS): Remove "-m32".
2006-07-02 15:30:43 +00:00
okuji
4889bdeca3 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
* util/misc.c: Include config.h.
        [!HAVE_MEMALIGN]: Do not include malloc.h.
        (grub_memalign): Use posix_memalign, if present. Then, use
        memalign, if present. Otherwise, emit an error.

        * util/grub-emu.c: Do not include malloc.h.

        * include/grub/util/misc.h: Include unistd.h. This is required for
        FreeBSD, because off_t is defined in unistd.h. Reported by Harley
        D. Eades III <hde@foobar-qux.org>.

        * configure.ac (AC_GNU_SOURCE): Added.
        (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
        type.
2006-06-13 22:50:01 +00:00
okuji
fd39d4da42 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
* loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
        ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
2006-06-08 22:30:25 +00:00
jeroen
b786f3b5c3 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
* include/grub/types.h (grub_host_addr_t): Rename to
	grub_target_addr_t.
	(grub_host_off_t): Rename to grub_target_off_t.
	(grub_host_size_t): Rename to grub_target_size_t.
	(grub_host_ssize_t): Rename to grub_target_ssize_t.
	Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.

	* include/grub/kernel.h (struct grub_module_header): Change type
	of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
	(grub_module_info): Likewise.
2006-06-08 12:38:44 +00:00
okuji
051988bb87 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
* loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
        of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
        Velazquez <jesus.velazquez@gmail.com>.
2006-06-05 19:59:33 +00:00
okuji
deae281bfe 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
Count partitions from 1 instead of 0 in the string representation
        of partitions. Still use 0-based internally.

        * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
        (sun_partition_map_iterate): Use grub_partition_t instead of
        struct grub_partition *. Cast DESC->START_CYLINDER to
        grub_uint64_t after converting the endian.
        (sun_partition_map_probe): Subtract 1 for PARTNUM.
        (sun_partition_map_get_name): Add 1 to P->INDEX.

        * partmap/pc.c (grub_partition_parse): Subtract 1 for
        PCDATA->DOS_PART.
        (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.

        * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
        zero instead of one.
        (gpt_partition_map_probe): Subtract 1 for PARTNUM.
        (gpt_partition_map_get_name): Add 1 into P->INDEX.

        * partmap/apple.c (apple_partition_map_iterate): Change the type
        of POS to unsigned.
        (apple_partition_map_probe): Subtract 1 for PARTNUM.
        (apple_partition_map_get_name): Add 1 into P->INDEX.

        * partmap/amiga.c (amiga_partition_map_iterate): Change the type
        of POS to unsigned.
        (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
        calculate the offset of a partition.
        (amiga_partition_map_probe): Subtract 1 for PARTNUM.
        (amiga_partition_map_get_name): Add 1 into P->INDEX.

        * partmap/acorn.c (acorn_partition_map_find): Change the type of
        SECTOR to grub_disk_addr_t.
        (acorn_partition_map_iterate): Likewise.
        (acorn_partition_map_probe): Subtract 1 for PARTNUM.
        Change the type of SECTOR to grub_disk_addr_t. Declare P on the
        top.
        (acorn_partition_map_get_name): Add 1 into P->INDEX.

        * kern/i386/pc/init.c (make_install_device): Add 1 into
        GRUB_INSTALL_DOS_PART.

        * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
        conditional.
2006-06-05 17:18:31 +00:00
okuji
524a1e6a40 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
Clean up the code to support 64-bit addressing in disks and
        files. This change is not enough for filesystems yet.

        * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
        type of "start" to grub_uint64_t.
        (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
        grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
        save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
        convert addresses.

        * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
        to grub_disk_addr_t.

        * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
        string.

        * partmap/pc.c (pc_partition_map_iterate): Likewise.

        * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
        to char *.

        * normal/script.c (grub_script_parse): Remove unused MEMFREE.

        * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.

        * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.

        * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
        to grub_off_t, to detect an error from grub_file_seek.
        (grub_multiboot_load_elf32): Likewise.

        * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
        maximum unsigned long value when an overflow is detected.
        (grub_strtoull): New function.
        (grub_divmod64): Likewise.
        (grub_lltoa): use grub_divmod64.

        * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
        grub_disk_addr_t.
        (grub_fs_blocklist_open): Increase P if P is not NULL to advance
        the pointer to next character. Use grub_strtoull instead of
        grub_strtoul.
        (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
        SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
        respectively.

        * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
        return value is signed.
        (grub_file_seek): Change the type of OLD to grub_off_t. Do not
        test if OFFSET is less than zero, as OFFSET is unsigned now.

        * kern/disk.c (struct grub_disk_cache): Change the type of
        "sector" to grub_disk_addr_t.
        (grub_disk_cache_get_index): Change the type of SECTOR to
        grub_disk_addr_t. Calculate the hash with SECTOR casted to
        unsigned after shifting.
        (grub_disk_cache_invalidate): Change the type of SECTOR to
        grub_disk_addr_t.
        (grub_disk_cache_unlock): Likewise.
        (grub_disk_cache_store): Likewise.
        (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
        START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
        grub_disk_addr_t and grub_uint64_t, respectively.
        (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
        body, as the value of OFFSET is tweaked by
        grub_disk_check_range. Change the types of START_SECTOR, LEN and
        POS to grub_disk_addr_t, grub_size_t and grub_size_t,
        respectively.
        (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
        body, as the value of OFFSET is tweaked by
        grub_disk_check_range. Change the types of LEN and N to
        grub_size_t.

        * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
        and "saved_offset" to grub_off_t.
        (test_header): Cast BUF to char *.
        (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
        to char *.
        (grub_gzio_read): Change the types of OFFSET and SIZE to
        grub_off_t and grub_size_t, respectively.

        * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
        Removed.
        (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
        (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
        (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
        (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
        (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.

        * include/grub/types.h (grub_off_t): Unconditionally set to
        grub_uint64_t.
        (grub_disk_addr_t): Changed to grub_uint64_t.

        * include/grub/partition.h (struct grub_partition): Change the
        types of "start", "len" and "offset" to grub_disk_addr_t,
        grub_uint64_t and grub_disk_addr_t, respectively.
        (grub_partition_get_start): Return grub_disk_addr_t.
        (grub_partition_get_len): Return grub_uint64_t.

        * include/grub/misc.h (grub_strtoull): New prototype.
        (grub_divmod64): Likewise.

        * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
        of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
        grub_off_t, respectively.
        All callers and references changed.

        * include/grub/fs.h (struct grub_fs): Change the type of LEN to
        grub_size_t in "read".
        All callers and references changed.

        * include/grub/file.h (struct grub_file): Change the types of
        "offset" and "size" to grub_off_t and grub_off_t,
        respectively. Change the type of SECTOR to grub_disk_addr_t in
        "read_hook".
        (grub_file_read): Change the type of LEN to grub_size_t.
        (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
        grub_off_t.
        (grub_file_size): Return grub_off_t.
        (grub_file_tell): Likewise.
        All callers and references changed.

        * include/grub/disk.h (struct grub_disk_dev): Change the types of
        SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
        "write".
        (struct grub_disk): Change the type of "total_sectors" to
        grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
        "read_hook".
        (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
        grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
        (grub_disk_write): Likewise.
        All callers and references changed.

        * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
        char * for grub_strncmp to silence gcc.
        (grub_iso9660_mount): Likewise.
        (grub_iso9660_mount): Likewise.
        (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
        return statement.
        (grub_iso9660_iterate_dir): Likewise.
        (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.

        * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
        LEN to grub_disk_addr_t and grub_size_t, respectively.

        * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.

        * fs/jfs.c (grub_jfs_read_file): Likewise.

        * fs/minix.c (grub_jfs_read_file): Likewise.

        * fs/sfs.c (grub_jfs_read_file): Likewise.

        * fs/ufs.c (grub_jfs_read_file): Likewise.

        * fs/xfs.c (grub_jfs_read_file): Likewise.

        * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
        and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
        respectively.

        * fs/ext2.c (grub_ext2_read_block): When an error happens, set
        BLKNR to -1 instead of returning GRUB_ERRNO.
        (grub_ext2_read_file): Change the types of SECTOR and
        LEN to grub_disk_addr_t and grub_size_t, respectively.

        * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
        LEN to grub_disk_addr_t and grub_size_t, respectively.

        * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
        grub_file_read.

        * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
        string. Do not cast SECTOR explicitly.

        * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
        TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
        (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
        grub_disk_addr_t and grub_size_t, respectively. If the sector is
        over 2TB and LBA mode is not supported, raise an error.
        (get_safe_sectors): New function.
        (grub_biosdisk_read): Use get_safe_sectors.
        (grub_biosdisk_write): Likewise.

        * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
        (grub_efidisk_write): Likewise.

        * disk/loopback.c (delete_loopback): Cosmetic changes.
        (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
        correctly.
        (grub_loopback_open): Likewise.
        (grub_loopback_read): Likewise. Also, change the type of POS to
        grub_off_t, and fix the usage of grub_memset.

        * commands/i386/pc/play.c: Include grub/machine/time.h.

        * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
        print FILE->SIZE.

        * commands/configfile.c: Include grub/env.h.

        * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
        GRUB_ERRNO directly instead. Change the type of POS to
        grub_off_t. Follow the coding standard.

        * commands/blocklist.c: Include grub/partition.h.
        (grub_cmd_blocklist): Return an error if the underlying device is
        not a disk. Take the starting sector of a partition into account,
        if a partition is used.

        * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
        a length field.
        (lba_mode): Support 64-bit addresses.
        (chs_mode): Likewise.
        (copy_buffer): Adapted to the new offsets of a length field and a
        segment field.
        (blocklist_default_start): Allocate 64-bit space.

        * boot/i386/pc/boot.S (force_lba): Removed.
        (boot_drive): Moved to under KERNEL_SECTOR.
        (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
        space.
        (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
        is useless.
        (lba_mode): Refactored to support a 64-bit address. More size
        optimization.
        (setup_sectors): Likewise.
2006-06-04 15:56:55 +00:00
okuji
53af98ad17 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added include/grub/i386/linux.h. Removed
        include/grub/i386/pc/linux.h

        * configure.ac (AC_INIT): Bumped to 1.94.

        * config.guess: Updated from gnulib.
        * config.sub: Likewise.
        * install-sh: Likewise.
        * mkinstalldirs: Likewise.
2006-06-04 12:59:19 +00:00
okuji
b4c1940a25 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
* conf/common.rmk (grub_modules_init.lst): Depended on
        grub_emu_SOURCES, excluding grub_emu_init.c, instead of
        MODSRCFILES.

        * genmk.rb (PModule::rule): Reverted the previous change.
2006-06-02 19:33:58 +00:00
okuji
cfca1cfd8e 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
* conf/common.rmk (grub_modules_init.lst): Depends on
        $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
        that the target does not exist before producing.
        (grub_modules_init.h): Remove the target before generating.
        (grub_emu_init.c): Likewise.

        * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
2006-06-02 19:23:08 +00:00
jeroen
aa6d782629 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
* configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
	for the target-specific tests. Make sure that we also have the
	up-to-date target variables for those tests.
2006-06-01 15:51:51 +00:00
okuji
26c607b932 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
* genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
        (PModule::rule): Likewise.
2006-05-31 00:46:37 +00:00
okuji
0162321a93 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
* genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
        TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
        target-specific flags should be prefixed.
        (PModule::rule): Likewise.
2006-05-31 00:28:03 +00:00
okuji
6c82634884 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
* configure.ac (CMP): Check if cmp is available explicitly.
2006-05-30 00:32:29 +00:00
okuji
b977bf01b3 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
        (target_cpu): New variable.
        (pkglibdir): Use target_cpu instead of host_cpu.

        * util/i386/pc/grub-install.in (host_cpu): Removed.
        (target_cpu): New variable.
        (pkglibdir): Use target_cpu instead of host_cpu.

        * util/genmoddep.c: Removed.

        * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
        instead of GRUB_HOST_SIZEOF_VOID_P.
        * kern/dl.c: Likewise.

        * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
        ...
        (GRUB_TARGET_SIZEOF_VOID_P): ... this.
        (GRUB_HOST_SIZEOF_LONG): Renamed to ...
        (GRUB_TARGET_SIZEOF_LONG): ... this.
        (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
        (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
        * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
        to ...
        (GRUB_TARGET_SIZEOF_VOID_P): ... this.
        (GRUB_HOST_SIZEOF_LONG): Renamed to ...
        (GRUB_TARGET_SIZEOF_LONG): ... this.
        (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
        (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
        * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
        to ...
        (GRUB_TARGET_SIZEOF_VOID_P): ... this.
        (GRUB_HOST_SIZEOF_LONG): Renamed to ...
        (GRUB_TARGET_SIZEOF_LONG): ... this.
        (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
        (GRUB_TARGET_WORDS_BIGENDIAN): ... this.

        * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
        GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
        [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
        instead of GRUB_HOST_SIZEOF_LONG.
        [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
        GRUB_HOST_WORDS_BIGENDIAN to define or undefine
        GRUB_CPU_WORDS_BIGENDIAN.
        Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
        define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
        grub_host_ssize_t.

        * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
        (genmoddep_SOURCES): Likewise.
        * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
        (genmoddep_SOURCES): Likewise.
        * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
        (genmoddep_SOURCES): Likewise.
        * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
        Likewise.
        (genmoddep_SOURCES): Likewise.

        * genmoddep.awk: New file.

        * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
        TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
        CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
        (PModule::rule): Likewise.
        (Program::rule): Likewise.
        (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
        BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
        respectively.

        * configure.ac: Rewritten intensively to use host and target
        instead of build and host, respectively.

        * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
        (host_cpu): Removed.
        (target_cpu): New variable.
        (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
        (BUILD_CC): Removed.
        (BUILD_CFLAGS): Likewise.
        (BUILD_CPPFLAGS): Likewise.
        (TARGET_CC): New variable.
        (TARGET_CFLAGS): Likewise.
        (TARGET_CPPFLAGS): Likewise.
        (TARGET_LDFLAGS): Likewise.
        (AWK): Likewise.
        (include): Use target_cpu instead of host_cpu.
        (moddep.lst:): Use genmoddep.awk instead of genmoddep.

        * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
chaac
f09771a102 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
* include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
        'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
        field 'false' to 'exec_on_false'.
        (grub_script_create_cmdif): Renamed argument names to reflect above
        changes.

        * normal/execute.c (grub_script_execute_cmdif): Likewise.

        * normal/script.c (grub_script_create_cmdif): Likewise.
2006-05-28 21:58:35 +00:00
okuji
118f4fb31e 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
* fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
        top.
        (grub_hfsplus_btree_recptr): Likewise.
        (grub_hfsplus_find_block): Do not take RETRY any longer. Use
        FILEBLOCK both to pass a block number and store next block
        number.
        (grub_hfsplus_read_block): Rewritten heavily to support an extent
        overflow file correctly. Specify errors appropriately, because
        fshelp expects that GRUB_ERRNO is set when fails. Reuse
        grub_hfsplus_btree_recptr to get the pointer to a found key.
        (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
        is found.

        * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
        linux.mod.
        (_linux_mod_SOURCES): New variable.
        (_linux_mod_CFLAGS): Likewise.
        (_linux_mod_LDFLAGS): Likewise.
        (linux_mod_SOURCES): Likewise.
        (linux_mod_CFLAGS): Likewise.
        (linux_mod_LDFLAGS): Likewise.

        * DISTLIST: Added loader/i386/efi/linux.c,
        loader/i386/efi/linux_normal.c and
        include/grub/i386/efi/loader.h.

        * loader/i386/efi/linux.c: New file.
        * loader/i386/efi/linux_normal.c: Likewise.
        * include/grub/i386/efi/loader.h: Likewise.
2006-05-28 03:20:18 +00:00
okuji
43b553ada7 Fix a typo. 2006-05-27 21:32:36 +00:00
okuji
89a7d726f9 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
* commands/blocklist.c: New file.

        * DISTLIST: Added commands/blocklist.c.

        * term/efi/console.c (grub_console_highlight_color): Use a lighter
        color for the background, and a daker color for the foreground.
        (grub_console_checkkey): Return READ_KEY.
        (grub_console_cls): Set the background to
        GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.

        * kern/efi/efi.c (grub_efi_exit_boot_services): New function.

        * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
        the size of "padding5", "hd0_drive_info" and "hd1_drive_info".

        * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
        prototype.

        * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
        BG. The spec is wrong again.

        * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
        prototype.
        [GRUB_UTIL] (grub_blocklist_fini): Likewise.

        * conf/i386-pc.rmk (grub_emu_SOURCES): Added
        commands/blocklist.c.
        * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

        * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
        (blocklist_mod_SOURCES): New variable.
        (blocklist_mod_CFLAGS): Likewise.
        (blocklist_mod_LDFLAGS): Likewise.
2006-05-27 21:09:25 +00:00
okuji
75c8f25836 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
* boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
        duplication.
        (lba_mode): Use %eax more intensively to reduce the code size.
2006-05-20 14:54:45 +00:00
marco_g
da2eb1812e *** empty log message *** 2006-05-20 14:44:59 +00:00
okuji
577b405042 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
* util/i386/pc/grub-install.in (bindir): New variable.
        (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
        Shaver <lbgwjl@gmail.com>.
2006-05-19 11:22:47 +00:00
okuji
0d6e118925 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
* kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
        grub/machine/linux.h
        * loader/i386/pc/linux.c: Likewise.

        * include/grub/i386/pc/linux.h: Moved to ...
        * include/grub/i386/linux.h: ... here.

        * include/grub/i386/linux.h (struct linux_kernel_params): New
        struct.
2006-05-14 21:16:20 +00:00
chaac
31b86e9f3b 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
* video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
        checking.
        (grub_video_vbe_blit_glyph): Likewise.
        (grub_video_vbe_blit_bitmap): Likewise.
        (grub_video_vbe_blit_render_target): Likewise.
2006-05-09 20:11:11 +00:00
okuji
83b984def6 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
* configure.ac (--with-platform): Properly quote the square
        brackets.
2006-05-09 00:05:49 +00:00
marco_g
5f0413bd2a 2006-05-08 Marco Gerards <marco@gnu.org>
* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
	this...
	(kernel_elf_HEADERS): ...to this.  Updated all users.
	(grubof_symlist.c): Renamed from this...
	(kernel_elf_symlist.c): ...to this.  Updated all users.
	(pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
	(grubof_SOURCES): Renamed from this...
	(kernel_elf_SOURCES): ...to this.
	(grubof_HEADERS): Renamed from this...
	(kernel_elf_HEADERS): ...to this.
	(grubof_CFLAGS): Renamed from this...
	(kernel_elf_CFLAGS): ...to this.
	(grubof_ASFLAGS): Renamed from this...
	(kernel_elf_ASFLAGS): ...to this.
	(grubof_LDFLAGS): Renamed from this...
	(kernel_elf_LDFLAGS): ...to this.

	* conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
	this...
	(kernel_elf_HEADERS): ...to this.  Updated all users.
	(grubof_symlist.c): Renamed from this...
	(kernel_elf_symlist.c): ...to this.  Updated all users.
	(pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
	(grubof_SOURCES): Renamed from this...
	(kernel_elf_SOURCES): ...to this.
	(grubof_HEADERS): Renamed from this...
	(kernel_elf_HEADERS): ...to this.
	(grubof_CFLAGS): Renamed from this...
	(kernel_elf_CFLAGS): ...to this.
	(grubof_ASFLAGS): Renamed from this...
	(kernel_elf_ASFLAGS): ...to this.
	(grubof_LDFLAGS): Renamed from this...
	(kernel_elf_LDFLAGS): ...to this.

	* util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
	`kernel.elf' instead of `grubof'.
2006-05-08 21:47:20 +00:00
okuji
05568c2e85 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
Add --with-platform to configure. Use pkglibdir instead of
        pkgdatadir. This is reported by Roger Leigh.

        * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
        (host_vendor): Likewise.
        (host_os): Likewise.
        (pkgdatadir): Likewise.
        (platform): New variable.
        (pkglibdir): Likewise.
        Use PKGLIBDIR instead of PKGDATADIR.

        * util/i386/pc/grub-install.in (datadir): Removed.
        (host_vendor): Likewise.
        (host_os): Likewise.
        (pkgdatadir): Likewise.
        (platform): New variable.
        (pkglibdir): Likewise.
        Use PKGLIBDIR instead of PKGDATADIR.

        * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
        instead of GRUB_DATADIR.
        (main): Likewise.
        * util/i386/pc/grub-mkimage.c (usage): Likewise.
        (main): Likewise.
        * util/i386/efi/grub-mkimage.c (usage): Likewise.
        (main): Likewise.

        * configure.ac (--with-platform): New option.
        Use PLATFORM instead of HOST_VENDOR to specify a platform.

        * Makefile.in: Include a makefile based on PLATFORM instead of
        HOST_VENDOR.
        (pkgdatadir): Not appended by the machine type.
        (pkglibdir): Appended by the machine type.
        (host_vendor): Removed.
        (platform): New variable.
        (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
        (install-local): Use PKGLIBDIR instead of PKGDATADIR.
        (uninstall): Likewise.
2006-05-08 19:29:10 +00:00
okuji
4e93851c0f 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
Use the environment context in the menu. Remove the commands
        "default" and "timeout", and use variables instead.

        * normal/menu.c: Include grub/env.h.
        (print_entry): Cast TITLE to silence gcc.
        (get_timeout): New function.
        (set_timeout): Likewise.
        (get_entry_number): Likewise.
        (run_menu): Use a default entry, a fallback entry and a timeout
        in the environment variables "default", "fallback" and
        "timeout". Also, tweak the default entry if it is not within the
        current menu entries.
        (grub_menu_run): Use a fallback entry in the environment variable
        "fallback".

        * normal/main.c (read_config_file): Do not initialize
        NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
        NEWMENU->TIMEOUT.
        (grub_normal_execute): Use a data slot to store the menu.

        * include/grub/normal.h (struct grub_menu): Removed default_entry,
        fallback_entry and timeout.
        (struct grub_menu_list): Removed.
        (grub_menu_list_t): Likewise.
        (struct grub_context): Likewise.
        (grub_context_t): Likewise.
        (grub_context_get): Likewise.
        (grub_context_get_current_menu): Likewise.
        (grub_context_push_menu): Likewise.
        (grub_context_pop_menu): Likewise.
        (grub_default_init): Likewise.
        (grub_default_fini): Likewise.
        (grub_timeout_init): Likewise.
        (grub_timeout_fini): Likewise.

        * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
        and timeout.mod.
        (normal_mod_SOURCES): Removed normal/context.c.

        * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
        commands/default.c, commands/timeout.c and normal/context.c.
        (normal_mod_SOURCES): Removed normal/context.c.

        * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
        commands/timeout.c and normal/context.c.
        (normal_mod_SOURCES): Removed normal/context.c.

        * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
        commands/default.c, commands/timeout.c and normal/context.c.
        (normal_mod_SOURCES): Removed normal/context.c.

        * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
        timeout.mod.
        (default_mod_SOURCES): Removed.
        (default_mod_CFLAGS): Likewise.
        (default_mod_LDFLAGS): Likewise.
        (timeout_mod_SOURCES): Removed.
        (timeout_mod_CFLAGS): Likewise.
        (timeout_mod_LDFLAGS): Likewise.

        * DISTLIST: Removed commands/default.c, commands/timeout.c and
        normal/context.c.

        * commands/default.c: Removed.
        * commands/timeout.c: Likewise.
        * normal/context.c: Likewise.
2006-05-07 18:28:24 +00:00
chaac
1eb9cc1da4 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
* kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
2006-05-06 22:33:51 +00:00
okuji
385bd9c12e 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
* kern/env.c (struct grub_env_context): Removed "sorted". Renamed
        "next" to "prev" for readability.
        (struct grub_env_sorted_var): New struct.
        (grub_env_context): Renamed to ...
        (initial_context): ... this.
        (grub_env_var_context): Renamed to ...
        (current_context): ... this.
        (grub_env_find): Look only at CURRENT_CONTEXT.
        (grub_env_context_open): Rewritten to copy exported variables from
        previous context.
        (grub_env_context_close): Rewritten according to the new
        scheme. Also, add an assertion to prevent the initial context from
        removed.
        (grub_env_insert): Removed the code for the sorted list.
        (grub_env_remove): Likewise.
        (grub_env_export): Simply mark the variable with
        GRUB_ENV_VAR_GLOBAL.
        (grub_env_set): A cosmetic change for naming consistency.
        (grub_env_get): Likewise.
        (grub_env_unset): Likewise.
        (grub_env_iterate): Rewritten to sort variables within this
        function.
        (grub_register_variable_hook): Fixed for naming consistency. Call
        grub_env_find again, only if NAME is not found at the first time.
        (mangle_data_slot_name): New function.
        (grub_env_set_data_slot): Likewise.
        (grub_env_get_data_slot): Likewise.
        (grub_env_unset_data_slot): Likewise.

        * include/grub/env.h (grub_env_var_type): New enum.
        (GRUB_ENV_VAR_LOCAL): New constant.
        (GRUB_ENV_VAR_GLOBAL): Likewise.
        (GRUB_ENV_VAR_DATA): Likewise.
        (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
        "type".
        (grub_env_set): Replace VAR with NAME for consistency.
        (grub_register_variable_hook): Likewise.
        (grub_env_export): Specify the name of the argument.
        (grub_env_set_data_slot): New prototype.
        (grub_env_get_data_slot): Likewise.
        (grub_env_unset_data_slot): Likewise.
2006-05-01 23:30:51 +00:00
okuji
7f362539b7 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
Extend the loader so that GRUB can accept a loader which comes
        back to GRUB when a loaded image exits. Also, this change adds
        support for a chainloader on EFI.

        * term/efi/console.c: Include grub/misc.h.
        (grub_console_checkkey): Display a scan code on the top for
        debugging. This will be removed once the EFI port gets stable.
        Correct the scan code mapping.

        * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
        allocate memory from larger regions, in order to reduce the number
        of allocated regions. Otherwise, the MacOSX loader panics.
        (filter_memory_map): Avoid less than 1MB for compatibility with
        other loaders.
        (add_memory_regions): Allocate from the tail of a region, if
        possible, to avoid allocating a region near to 1MB, for the MacOSX
        loader.

        * kern/efi/init.c (grub_efi_set_prefix): Specify
        GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.

        * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
        argument IMAGE_HANDLE and specify it to get a loaded image.
        (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
        grub_efi_get_loaded_image.
        (grub_efi_get_filename): Divide the legnth by the size of
        grub_efi_char16_t.
        (grub_efi_get_device_path): New function.
        (grub_efi_print_device_path): Print End Device Path nodes. Divide
        the length by the size of grub_efi_char16_t for a file path device
        path node.

        * kern/loader.c (grub_loader_noreturn): New variable.
        (grub_loader_set): Accept a new argument NORETURN. Set
        GRUB_LOADER_NORETURN to NORETURN.
        All callers changed.
        (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
        grub_machine_fini.

        * include/grub/efi/efi.h (grub_efi_get_device_path): New
        prototype.
        (grub_efi_get_loaded_image): Take an argument to specify an image
        handle.

        * include/grub/loader.h (grub_loader_set): Added one more argument
        NORETURN.

        * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
        instead of grub_efi_open_protocol.
        (grub_efidisk_get_device_name): Likewise.
        (grub_efidisk_close): Print a newline.
        (grub_efidisk_get_device_handle): Fixed to use
        GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
        GRUB_EFI_DEVICE_PATH_TYPE.

        * disk/efi/efidisk.c (device_path_guid): Moved to ...
        * kern/efi/efi.c (device_path_guid): ... here.

        * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
        chain.mod.
        (kernel_mod_HEADERS): Added efi/disk.h.
        (_chain_mod_SOURCES): New variable.
        (_chain_mod_CFLAGS): Likewise.
        (_chain_mod_LDFLAGS): Likewise.
        (chain_mod_SOURCES): Likewise.
        (chain_mod_CFLAGS): Likewise.
        (chain_mod_LDFLAGS): Likewise.

        * DISTLIST: Added include/grub/efi/chainloader.h,
        loader/efi/chainloader.c and loader/efi/chainloader_normal.c.

        * include/grub/efi/chainloader.h: New file.
        * loader/efi/chainloader.c: Likewise.
        * loader/efi/chainloader_normal.c: Likewise.
2006-04-30 21:09:37 +00:00
marco_g
c0111d6e92 2006-04-30 Marco Gerards <marco@gnu.org>
* commands/configfile.c (grub_cmd_source): New function.
	(GRUB_MOD_INIT): Register the commands `source' and `.'.
	(GRUB_MOD_FINI): De-register the commands `source' and `.'.
2006-04-30 20:48:05 +00:00
marco_g
df5341da9e 2006-04-30 Marco Gerards <marco@gnu.org>
* normal/execute.c (grub_script_execute_cmd): Change the return
	type to `grub_err_t'.  Correctly return the error.
	(grub_script_execute_cmdline): In case a command line is not a
	command or a function, try to interpret it as an assignment.
2006-04-30 20:29:51 +00:00
okuji
f85934bd9b 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
* fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
        (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
        skip a node whose name is obviously invalid as UTF-16,
        i.e. contains a NUL character. Stop the iteration when the last
        directory entry is found. Instead of using the return value of
        grub_hfsplus_btree_iterate_node, store the value in RET and use
        it, because the iterator can be stopped by the last directory
        entry.
2006-04-30 17:30:12 +00:00
marco_g
8f8a2cf8e2 2006-04-30 Marco Gerards <marco@gnu.org>
* include/grub/env.h (grub_env_export): New prototype.  Reported
	by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
2006-04-30 14:05:50 +00:00
marco_g
a27e84ce7b 2006-04-30 Marco Gerards <marco@gnu.org>
* fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
	size of the extents in a catalog file record.
2006-04-30 13:57:19 +00:00
marco_g
eaef05533f 2006-04-29 Marco Gerards <marco@gnu.org>
* commands/configfile.c (grub_cmd_configfile): Execute the
	configfile within its own context.

	* include/grub/env.h (grub_env_context_open): New prototype.
	(grub_env_context_close): Likewise.

	* kern/env.c (grub_env): Removed.
	(grub_env_sorted): Likewise.
	(grub_env_context): New variable.
	(grub_env_var_context): Likewise.
	(grub_env_find): Search both the active context and the global
	context.
	(grub_env_context_open): New function.
	(grub_env_context_close): Likewise.
	(grub_env_insert): Likewise.
	(grub_env_remove): Likewise.
	(grub_env_export): Likewise.
	(grub_env_set): Changed to use helper functions to avoid code
	duplication.
	(grub_env_iterate): Rewritten so both the current context and the
	global context are being used.

	* normal/command.c (export_command): New function.
	(grub_command_init): Register the `export' function.
2006-04-29 20:29:42 +00:00
okuji
7b455f4dd3 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
* util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
        explicitly to suppress gcc's warnings.
        * fs/fat.c (grub_fat_find_dir): Likewise.
        (grub_fat_label): Likewise.
        * fs/xfs.c (grub_xfs_read_inode): Likewise.
        (grub_xfs_mount): Likewise.
        (grub_xfs_label): Likewise.
        * fs/affs.c (grub_affs_mount): Likewise.
        (grub_affs_label): Likewise.
        (grub_affs_iterate_dir): Likewise.
        * fs/sfs.c (grub_sfs_mount): Likewise.
        (grub_sfs_iterate_dir): Likewise.
        * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
        * fs/hfs.c (grub_hfs_mount): Likewise.
        (grub_hfs_cmp_catkeys): Likewise.
        (grub_hfs_find_dir): Likewise.
        (grub_hfs_dir): Likewise.
        (grub_hfs_label): Likewise.
        * fs/jfs.c (grub_jfs_mount): Likewise.
        (grub_jfs_opendir): Likewise.
        (grub_jfs_getent): Likewise.
        (grub_jfs_lookup_symlink): Likewise.
        (grub_jfs_label): Likewise.
        * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
        (grub_hfsplus_iterate_dir): Likewise.
        (grub_hfsplus_btree_iterate_node): Made static.

        * util/grub-emu.c (prefix): New variable.
        (grub_machine_set_prefix): New function.
        (main): Do not set the environment variable "prefix" here. Only
        set PREFIX, which is used later by grub_machine_set_prefix.

        * include/grub/video.h: Do not include grub/symbol.h.
        (grub_video_register): Not exported. This symbol is not defined in
        the kernel.
        (grub_video_unregister): Likewise.
        (grub_video_iterate): Likewise.
        (grub_video_setup): Likewise.
        (grub_video_restore): Likewise.
        (grub_video_get_info): Likewise.
        (grub_video_get_blit_format): Likewise.
        (grub_video_set_palette): Likewise.
        (grub_video_get_palette): Likewise.
        (grub_video_set_viewport): Likewise.
        (grub_video_get_viewport): Likewise.
        (grub_video_map_color): Likewise.
        (grub_video_map_rgb): Likewise.
        (grub_video_map_rgba): Likewise.
        (grub_video_fill_rect): Likewise.
        (grub_video_blit_glyph): Likewise.
        (grub_video_blit_bitmap): Likewise.
        (grub_video_blit_render_target): Likewise.
        (grub_video_scroll): Likewise.
        (grub_video_swap_buffers): Likewise.
        (grub_video_create_render_target): Likewise.
        (grub_video_delete_render_target): Likewise.
        (grub_video_set_active_render_target): Likewise.

        * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
        Undefined.
        [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.

        * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
        config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
        (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
        instead of $(srcdir)/genkernsyms.sh.

        * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
        config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
        (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
        instead of $(srcdir)/genkernsyms.sh.

        * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
        gensymlist.sh instead of $(srcdir)/gensymlist.sh.
        (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
        instead of $(srcdir)/genkernsyms.sh.

        * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
        gensymlist.sh instead of $(srcdir)/gensymlist.sh.
        (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
        instead of $(srcdir)/genkernsyms.sh.

        * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
        genkernsyms.sh.

        * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
        genkernsyms.sh.
        (gensymlist.sh): New target.
        (genkernsyms.sh): Likewise.

        * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
        genkernsyms.sh.in and gensymlist.sh.in.

        * genkernsyms.sh: Removed.
        * gensymlist.sh: Likewise.

        * genkernsyms.sh.in: New file.
        * gensymlist.sh.in: Likewise.
2006-04-26 21:58:36 +00:00
hollisb
1885bb2790 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
* kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
	clobber "prefix", since we may have already set it manually.
2006-04-26 02:20:13 +00:00
hollisb
71538dff79 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
* kern/misc.c (abort): New alias for grub_abort.
2006-04-25 23:47:48 +00:00
okuji
2965c7cc2d 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
A new machine-specific function "grub_machine_set_prefix" is
        defined. This is called after loading modules, so that a prefix
        initialization can use modules. Also, this change adds an
        intensive debugging feature for the memory manager via the
        configure option "--enable-mm-debug".

        * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
        PART.LEN.

        * kern/sparc64/ieee1275/init.c (abort): Removed.
        (grub_stop): Likewise.
        (grub_exit): New function.
        (grub_set_prefix): Renamed to ...
        (grub_machine_set_prefix): ... this.
        (grub_machine_init): Do not call grub_set_prefix.

        * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
        (grub_machine_set_prefix): ... this.
        (grub_machine_init): Do not call grub_set_prefix.

        * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
        (grub_machine_init): Do not set the prefix here.

        * kern/i386/efi/init.c (grub_machine_set_prefix): New function.

        * kern/efi/init.c: Include grub/mm.h.
        (grub_efi_set_prefix): New function.

        * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
        (grub_efi_get_filename): New function.
        (grub_print_device_path): Renamed to ...
        (grub_efi_print_device_path): ... this.

        * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
        [MM_DEBUG] (grub_realloc): Likewise.
        [MM_DEBUG] (grub_free): Likewise.
        [MM_DEBUG] (grub_memalign): Likewise.
        [MM_DEBUG] (grub_mm_debug): New variable.
        [MM_DEBUG] (grub_debug_malloc): New function.
        [MM_DEBUG] (grub_debug_free): New function.
        [MM_DEBUG] (grub_debug_realloc): New function.
        [MM_DEBUG] (grub_debug_memalign): New function.

        * kern/misc.c (grub_abort): Print a newline to distinguish
        the message.

        * kern/main.c (grub_main): Call grub_machine_set_prefix and
        grub_set_root_dev after loading modules. This is necessary when
        setting a prefix depends on modules.

        * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
        (grub_efi_print_device_path): ... this.
        (grub_efi_get_filename): New prototype.
        (grub_efi_set_prefix): Likewise.

        * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
        and grub/disk.h.
        (grub_efidisk_get_device_handle): New prototype.
        (grub_efidisk_get_device_name): Likewise.

        * include/grub/mm.h: Include config.h.
        (MM_DEBUG): Removed.
        [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
        [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
        [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
        [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
        [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
        [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
        [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
        [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
        [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.

        * include/grub/kernel.h (grub_machine_set_prefix): New prototype.

        * disk/efi/efidisk.c: Include grub/partition.h.
        (iterate_child_devices): New function.
        (add_device): First, compare only last device path nodes, so that
        devices are sorted by the types.
        (grub_efidisk_get_device_handle): New function.
        (grub_efidisk_get_device_name): Likewise.

        * configure.ac (--enable-mm-debug): New option to enable the
        memory manager debugging feature. This makes the binary much
        bigger, so is disabled by default.
2006-04-25 20:08:31 +00:00
okuji
9cacaa174c 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
Use grub_abort instead of grub_stop, and grub_exit must be
        define in each architecture now. Also, this change adds support
        for EFI disks.

        * util/i386/pc/grub-probefs.c: Include grub/term.h.
        (grub_getkey): New function.
        (grub_term_get_current): Likewise.

        * util/i386/pc/grub-setup.c: Include grub/term.h.
        (grub_getkey): New function.
        (grub_term_get_current): Likewise.

        * util/misc.c (grub_stop): Renamed to ...
        (grub_exit): ... this.

        * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
        (grub_exit): ... this.
        (grub_machine_init): Use grub_abort instead of abort.
        (grub_stop): Removed.

        * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
        abort.

        * kern/i386/pc/startup.S (grub_exit): New function.
        (cold_reboot): New label.

        * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
        (grub_efi_init): Call grub_efidisk_init.
        (grub_efi_fini): Call grub_efidisk_fini.

        * kern/efi/efi.c: Include grub/mm.h.
        (grub_efi_console_control_guid): Renamed to ...
        (console_control_guid): ... this.
        (grub_efi_loaded_image_guid): Renamed to ...
        (loaded_image_guid): ... this.
        (grub_efi_locate_handle): New function.
        (grub_efi_open_protocol): Likewise.
        (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
        GRUB_EFI_CONSOLE_CONTROL_GUID.
        (grub_efi_exit): Removed.
        (grub_stop): Likewise.
        (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
        (grub_exit): New function.
        (grub_print_device_path): Likewise.

        * kern/rescue.c (grub_rescue_cmd_exit): New function.
        (grub_enter_rescue_mode): Register "exit".

        * kern/misc.c (grub_real_dprintf): A cosmetic change.
        (grub_abort): New function.

        * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.

        * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.

        * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.

        * include/grub/efi/efi.h (grub_efi_exit): Removed.
        (grub_print_device_path): New prototype.
        (grub_efi_locate_handle): Likewise.
        (grub_efi_open_protocol): Likewise.

        * include/grub/efi/disk.h (grub_efidisk_fini): New file.
        * disk/efi/efidisk.c: Likewise.

        * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.

        * include/grub/efi/console_control.h
        (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.

        * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
        last 8 bytes as an array.
        (GRUB_EFI_DISK_IO_GUID): New macro.
        (GRUB_EFI_BLOCK_IO_GUID): Likewise.
        (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
        (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
        grub_uint8_t.
        (struct grub_efi_guid): Use an array to specify the last 8 bytes.
        (struct grub_efi_device_path): Rename the member "sub_type" to
        "subtype".
        (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
        (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
        (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
        (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
        (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
        (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
        (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
        (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
        (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
        (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
        (struct grub_efi_pci_device_path): New structure.
        (grub_efi_pci_device_path_t): New type.
        (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_pccard_device_path): New structure.
        (grub_efi_pccard_device_path_t): New type.
        (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_memory_mapped_device_path): New structure.
        (grub_efi_memory_mapped_device_path_t): New type.
        (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_vendor_device_path): New structure.
        (grub_efi_vendor_device_path_t): New type.
        (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_controller_device_path): New structure.
        (grub_efi_controller_device_path_t): New type.
        (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
        (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
        (struct grub_efi_acpi_device_path): New structure.
        (grub_efi_acpi_device_path_t): New type.
        (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_expanded_acpi_device_path): New structure.
        (grub_efi_expanded_acpi_device_path_t): New type.
        (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
        (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
        (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
        (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
        (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
        (struct grub_efi_atapi_device_path): New structure.
        (grub_efi_atapi_device_path_t): New type.
        (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_fibre_channel_device_path): New structure.
        (grub_efi_fibre_channel_device_path_t): New type.
        (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_1394_device_path): New structure.
        (grub_efi_1394_device_path_t): New type.
        (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_usb_device_path): New structure.
        (grub_efi_usb_device_path_t): New type.
        (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_usb_class_device_path): New structure.
        (grub_efi_usb_class_device_path_t): New type.
        (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_i2o_device_path): New structure.
        (grub_efi_i2o_device_path_t): New type.
        (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_mac_address_device_path): New structure.
        (grub_efi_mac_address_device_path_t): New type.
        (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_ipv4_device_path): New structure.
        (grub_efi_ipv4_device_path_t): New type.
        (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_ipv6_device_path): New structure.
        (grub_efi_ipv6_device_path_t): New type.
        (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_infiniband_device_path): New structure.
        (grub_efi_infiniband_device_path_t): New type.
        (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_uart_device_path): New structure.
        (grub_efi_uart_device_path_t): New type.
        (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_vendor_messaging_device_path): New structure.
        (grub_efi_vendor_messaging_device_path_t): New type.
        (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
        (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
        (struct grub_efi_hard_drive_device_path): New structure.
        (grub_efi_hard_drive_device_path_t): New type.
        (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_cdrom_device_path): New structure.
        (grub_efi_cdrom_device_path_t): New type.
        (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_vendor_media_device_path): New structure.
        (grub_efi_vendor_media_device_path_t): New type.
        (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_file_path_device_path): New structure.
        (grub_efi_file_path_device_path_t): New type.
        (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_protocol_device_path): New structure.
        (grub_efi_protocol_device_path_t): New type.
        (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
        (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
        (struct grub_efi_bios_device_path): New structure.
        (grub_efi_bios_device_path_t): New type.
        (struct grub_efi_disk_io): New structure.
        (grub_efi_disk_io_t): New type.
        (struct grub_efi_block_io_media): New structure.
        (grub_efi_block_io_media_t): New type.
        (struct grub_efi_block_io): New structure.
        (grub_efi_block_io_t): New type.

        * include/grub/misc.h (grub_stop): Removed.
        (grub_exit): New prototype.
        (grub_abort): Likewise.

        * include/grub/disk.h (enum grub_disk_dev_id): Added
        GRUB_DISK_DEVICE_EFIDISK_ID.

        * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
        disk/efi/efidisk.c.
        (kernel_syms.lst): Remove the target if an error occurs.
2006-04-23 13:37:36 +00:00
okuji
49986a9f99 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
* kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
        as it was simply too buggy.
2006-04-22 09:20:44 +00:00
okuji
970d3b8ab0 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
* kern/misc.c (grub_lltoa): New function.
        (grub_vsprintf): Added support for the long long suffix,
        i.e. "ll".
2006-04-21 16:35:23 +00:00
hollisb
ff04ec24e9 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
* Makefile.in (LDFLAGS): Add variable.
	(LD): Remove variable.
	* configure.ac: Add -m32 to LDFLAGS.
	* genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
	* conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
	(grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
	(_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
	suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
	variables.
	* conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
	* conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
	* conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
2006-04-21 00:47:11 +00:00
chaac
37e5e1a4da 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
* term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
        length for unknown glyph.
2006-04-20 15:19:01 +00:00
okuji
2eab1c0dad 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
Add support for pre-loaded modules into the EFI port.

        * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
        completely. Accept one more argument DIR. The caller has changed.

        * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.

        * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
        (grub_efi_loaded_image_guid): New variable.
        (grub_efi_get_loaded_image): New function.
        (grub_arch_modules_addr): Likewise.

        * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
        prototype.

        * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
        (struct grub_efi_loaded_image): New structure.
        (grub_efi_loaded_image_t): New type.
2006-04-20 04:29:17 +00:00
okuji
c352d8dd0b 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
* loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
        size with GRUB_OS_AREA_SIZE as grub_size_t instead of
        grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
2006-04-20 02:33:44 +00:00
marco_g
6d01d6b4a6 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
* DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
2006-04-19 17:24:21 +00:00
okuji
976a4ea036 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added include/grub/efi/console.h,
        include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
        kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.

        * include/grub/efi/console.h: New file.
        * include/grub/efi/time.h: Likewise.
        * include/grub/i386/efi/kernel.h: Likewise.
        * kern/efi/init.c: Likewise.
        * kern/efi/mm.c: Likewise.
        * term/efi/console.c: Likewise.

        * kern/i386/efi/init.c: Do not include grub/machine/time.h.
        (grub_stop): Removed.
        (grub_get_rtc): Likewise.
        (grub_machine_init): Simply call grub_efi_init.
        (grub_machine_fini): Call grub_efi_fini.

        * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
        (grub_efi_output_string): Removed.
        (grub_efi_stall): New function.
        (grub_stop): Likewise.
        (grub_get_rtc): Likewise.

        * include/grub/efi/efi.h (grub_efi_output_string): Removed.
        (grub_efi_stall): New prototype.
        (grub_efi_allocate_pages): Likewise.
        (grub_efi_free_pages): Likewise.
        (grub_efi_get_memory_map): Likewise.
        (grub_efi_mm_init): Likewise.
        (grub_efi_mm_fini): Likewise.
        (grub_efi_init): Likewise.
        (grub_efi_fini): Likewise.

        * include/grub/i386/efi/time.h: Do not include
        grub/symbol.h. Include grub/efi/time.h.
        (GRUB_TICKS_PER_SECOND): Removed.
        (grub_get_rtc): Likewise.

        * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
        Added padding. The EFI spec is buggy.
        (GRUB_EFI_BLACK): New macro.
        (GRUB_EFI_BLUE): Likewise.
        (GRUB_EFI_GREEN): Likewise.
        (GRUB_EFI_CYAN): Likewise.
        (GRUB_EFI_RED): Likewise.
        (GRUB_EFI_MAGENTA): Likewise.
        (GRUB_EFI_BROWN): Likewise.
        (GRUB_EFI_LIGHTGRAY): Likewise.
        (GRUB_EFI_BRIGHT): Likewise.
        (GRUB_EFI_DARKGRAY): Likewise.
        (GRUB_EFI_LIGHTBLUE): Likewise.
        (GRUB_EFI_LIGHTGREEN): Likewise.
        (GRUB_EFI_LIGHTCYAN): Likewise.
        (GRUB_EFI_LIGHTRED): Likewise.
        (GRUB_EFI_LIGHTMAGENTA): Likewise.
        (GRUB_EFI_YELLOW): Likewise.
        (GRUB_EFI_WHITE): Likewise.
        (GRUB_EFI_BACKGROUND_BLACK): Likewise.
        (GRUB_EFI_BACKGROUND_BLUE): Likewise.
        (GRUB_EFI_BACKGROUND_GREEN): Likewise.
        (GRUB_EFI_BACKGROUND_CYAN): Likewise.
        (GRUB_EFI_BACKGROUND_RED): Likewise.
        (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
        (GRUB_EFI_BACKGROUND_BROWN): Likewise.
        (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
        (GRUB_EFI_TEXT_ATTR): Likewise.

        * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
        kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
        (kernel_mod_HEADERS): Added efi/time.h.
2006-04-19 08:59:44 +00:00
okuji
e2a8c90448 Correct another strange date. 2006-04-18 06:34:04 +00:00
okuji
837091258d 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
        include/grub/efi/api.h, include/grub/efi/console_control.h,
        include/grub/efi/efi.h, include/grub/efi/pe32.h,
        include/grub/i386/efi/time.h, kern/efi/efi.c,
        kern/i386/efi/init.c, kern/i386/efi/startup.S,
        and util/i386/efi/grub-mkimage.c.

        * Makefile.in (RMKFILES): Added i386-efi.rmk.

        * genmk.rb (PModule#rule): Do not export symbols if
        #{prefix}_EXPORTS is set to "no".

        * conf/i386-efi.mk: New file.
        * conf/i386-efi.rmk: Likewise.
        * include/grub/efi/api.h: Likewise.
        * include/grub/efi/console_control.h: Likewise.
        * include/grub/efi/efi.h: Likewise.
        * include/grub/efi/pe32.h: Likewise.
        * include/grub/i386/efi/time.h: Likewise.
        * kern/efi/efi.c: Likewise.
        * kern/i386/efi/init.c: Likewise.
        * kern/i386/efi/startup.S: Likewise.
        * util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
marco_g
bfa2bd9efb 2006-17-04 Marco Gerards <marco@gnu.org>
* include/grub/script.h: Include <grub/parser.h> and
	"grub_script.tab.h".
	(struct grub_lexer_param): New struct.
	(struct grub_parser_param): Likewise.
	(grub_script_create_arglist): Pass the state in an argument.
	(grub_script_add_arglist): Likewise.
	(grub_script_create_cmdline): Likewise.
	(grub_script_create_cmdblock): Likewise.
	(grub_script_create_cmdif): Likewise.
	(grub_script_create_cmdmenu): Likewise.
	(grub_script_add_cmd): Likewise.
	(grub_script_arg_add): Likewise.
	(grub_script_lexer_ref): Likewise.
	(grub_script_lexer_deref): Likewise.
	(grub_script_lexer_record_start): Likewise.
	(grub_script_lexer_record_stop): Likewise.
	(grub_script_mem_record): Likewise.
	(grub_script_mem_record_stop): Likewise.
	(grub_script_malloc): Likewise.
	(grub_script_yylex): Likewise.
	(grub_script_yyparse): Likewise.
	(grub_script_yyerror): Likewise.
	(grub_script_yylex): Likewise.
	(grub_script_lexer_init): Return the state.

	* normal/lexer.c (grub_script_lexer_state): Removed variable.
	(grub_script_lexer_done): Likewise.
	(grub_script_lexer_getline): Likewise.
	(grub_script_lexer_refs): Likewise.
	(script): Likewise.
	(newscript): Likewise.
	(record): Likewise.
	(recording): Likewise.
	(recordpos): Likewise.
	(recordlen): Likewise.
	(grub_script_lexer_init): Return the state instead of setting
	global variables.
	(grub_script_lexer_ref): Use the newly added argument for state
	instead of globals.
	(grub_script_lexer_deref): Likewise.
	(grub_script_lexer_record_start): Likewise.
	(grub_script_lexer_record_stop): Likewise.
	(recordchar): Likewise.
	(nextchar): Likewise.
	(grub_script_yylex2): Likewise.
	(grub_script_yylex): Likewise.
	(grub_script_yyerror): Likewise.

	* normal/parser.y (func_mem): Removed variable.
	(menu_entry): Likewise.
	(err): Likewise.
	(%lex-param): New parser option.
	(%parse-param): Likewise.
	(script): Always return the AST.
	(argument): Pass the state around.
	(arguments): Likewise.
	(grubcmd): Likewise.
	(commands): Likewise.
	(function): Likewise.
	(menuentry): Likewise.
	(if_statement): Likewise.
	(if): Likewise.

	* normal/script.c (grub_script_memused): Removed variable.
	(grub_script_parsed): Likewise.
	(grub_script_malloc): Added a state argument.  Use that instead of
	global variables.
	(grub_script_mem_record): Likewise.
	(grub_script_mem_record_stop): Likewise.
	(grub_script_arg_add): Likewise.
	(grub_script_add_arglist): Likewise.
	(grub_script_create_cmdline): Likewise.
	(grub_script_create_cmdif): Likewise.
	(grub_script_create_cmdmenu): Likewise.
	(grub_script_add_cmd): Likewise.
	(grub_script_parse): Setup the state before calling the parser.
2006-04-17 13:01:20 +00:00
marco_g
6de2ee9903 2006-16-04 Marco Gerards <marco@gnu.org>
* normal/command.c (grub_command_init): Remove the title command.

	* normal/lexer.c (grub_script_yylex): Renamed from this...
	(grub_script_yylex2): ... to this.
	(grub_script_yylex): New function.  Temporary
	introduced to filter some tokens.
	(grub_script_yyerror): Print a newline.

	* normal/main.c (read_config_file): Output information about the
	lines that contain errors.  Wait for a key after all lines have
	been processed.  Don't return an empty menu.

	* normal/parser.y (func_mem): Don't initialize.
	(menu_entry): Likewise.
	(err): New variable.
	(script): Don't return anything when an error was encountered.
	(ws, returns): Removed rules.
	(argument): Disabled concatenated variable support.
	(arguments): Remove explicit separators.
	(grubcmd): Likewise.
	(function): Likewise.
	(menuentry): Likewise.
	(if): Likewise.
	(commands): Likewise.  Add error handling.

	* normal/script.c (grub_script_create_cmdline): If
	`grub_script_parsed' is 0, assume the parser encountered an error.
2006-04-16 18:02:42 +00:00
okuji
c9a8619201 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
* configure.ac: Add support for EFI. Fix the typo
        BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
2006-04-02 08:53:31 +00:00
chaac
70f3b2433a 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
* util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
        foreign multibyte characters should be shown correctly.
2006-04-01 19:23:01 +00:00
chaac
65f201ad2a 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
* normal/main.c (grub_normal_menu_addentry): Fixed menu size
        calculation.
        (read_config_file): Made it to close file before returning.
2006-04-01 14:41:34 +00:00
chaac
b4b9367408 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
* DISTLIST: Added include/grub/i386/pc/vbeblit.h,
        include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
        video/i386/pc/vbefill.c.

        * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
        video/i386/pc/vbefill.c.

        * include/grub/video.h (grub_video_blit_format): New enum.
        (grub_video_mode_info): Added new member blit_format.
        (grub_video_get_blit_format): New function prototype.

        * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
        function prototype.
        (grub_video_vbe_map_rgb): Likewise.
        (grub_video_vbe_unmap_color): Likewise.

        * include/grub/i386/pc/vbeblit.h: New file.

        * include/grub/i386/pc/vbefill.h: New file.

        * video/video.c (grub_video_get_blit_format): New function.
        (grub_video_vbe_get_video_ptr): Re-declared as non-static.
        (grub_video_vbe_map_rgb): Likewise.
        (grub_video_vbe_unmap_color): Likewise.

        * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
        optimized fills.
        (grub_video_vbe_blit_render_target): Changed to use more optimized
        blits.
        (grub_video_vbe_setup): Added detection for optimized settings.
        (grub_video_vbe_create_render_target): Likewise.

        * video/i386/pc/vbeblit.c: New file.

        * video/i386/pc/vbefill.c: New file.
2006-03-31 14:26:34 +00:00
chaac
c2379b9c31 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
* font/manager.c (grub_font_get_glyph): Removed font fixup from
        here...

        * util/unifont2pff.rb: ... and moved it to here.  Improved argument
        parsing to support both hex and dec ranges.  If filename was missing
        show usage information.
2006-03-31 13:32:52 +00:00
chaac
bd0d7896cf 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
* DISTLIST: Added include/grub/video.h, term/gfxterm.c,
        video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.

        * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
        gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
        (video_mod_SOURCES): Added.
        (video_mod_CFLAGS): Likewise.
        (video_mod_LDFLAGS): Likewise.
        (gfxterm_mod_SOURCES): Likewise.
        (gfxterm_mod_CFLAGS): Likewise.
        (gfxterm_mod_LDFLAGS): Likewise.
        (videotest_mod_SOURCES): Likewise.
        (videotest_mod_CFLAGS): Likewise.
        (videotest_mod_LDFLAGS): Likewise.
        (vesafb_mod_SOURCES): Removed.
        (vesafb_mod_CFLAGS): Likewise.
        (vesafb_mod_LDFLAGS): Likewise.
        (vga_mod_SOURCES): Likewise.
        (vga_mod_CFLAGS): Likewise.
        (vga_mod_LDFLAGS): Likewise.

        * commands/videotest.c: New file.

        * font/manager.c (fill_with_default_glyph): Modified to use
        grub_font_glyph.
        (grub_font_get_glyph): Likewise.
        (fontmanager): Renamed from this...
        (font_manager): ... to this.

        * include/grub/font.h (grub_font_glyph): Added new structure.
        (grub_font_get_glyph): Modified to use grub_font_glyph.

        * include/grub/misc.h (grub_abs): Added as inline function.

        * include/grub/video.h: New file.

        * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
        (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
        (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
        (grub_vbe_get_controller_info): Renamed from this...
        (grub_vbe_bios_get_controller_info): ... to this.
        (grub_vbe_get_mode_info): Renamed from this...
        (grub_vbe_bios_get_mode_info): ... to this.
        (grub_vbe_set_mode): Renamed from this...
        (grub_vbe_bios_set_mode): ... to this.
        (grub_vbe_get_mode): Renamed from this...
        (grub_vbe_bios_get_mode): ... to this.
        (grub_vbe_set_memory_window): Renamed from this...
        (grub_vbe_bios_set_memory_window): ... to this.
        (grub_vbe_get_memory_window): Renamed from this...
        (grub_vbe_bios_get_memory_window): ... to this.
        (grub_vbe_set_scanline_length): Renamed from this...
        (grub_vbe_set_scanline_length): ... to this.
        (grub_vbe_get_scanline_length): Renamed from this...
        (grub_vbe_bios_get_scanline_length): ... to this.
        (grub_vbe_set_display_start): Renamed from this...
        (grub_vbe_bios_set_display_start): ... to this.
        (grub_vbe_get_display_start): Renamed from this...
        (grub_vbe_bios_get_display_start): ... to this.
        (grub_vbe_set_palette_data): Renamed from this...
        (grub_vbe_bios_set_palette_data): ... to this.
        (grub_vbe_set_pixel_rgb): Removed.
        (grub_vbe_set_pixel_index): Likewise.

        * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
        from this...
        (grub_vbe_bios_get_controller_info): ... to this.
        (grub_vbe_get_mode_info): Renamed from this...
        (grub_vbe_bios_get_mode_info): ... to this.
        (grub_vbe_set_mode): Renamed from this...
        (grub_vbe_bios_set_mode): ... to this.
        (grub_vbe_get_mode): Renamed from this...
        (grub_vbe_bios_get_mode): ... to this.
        (grub_vbe_set_memory_window): Renamed from this...
        (grub_vbe_bios_set_memory_window): ... to this.
        (grub_vbe_get_memory_window): Renamed from this...
        (grub_vbe_bios_get_memory_window): ... to this.
        (grub_vbe_set_scanline_length): Renamed from this...
        (grub_vbe_set_scanline_length): ... to this.
        (grub_vbe_get_scanline_length): Renamed from this...
        (grub_vbe_bios_get_scanline_length): ... to this.
        (grub_vbe_set_display_start): Renamed from this...
        (grub_vbe_bios_set_display_start): ... to this.
        (grub_vbe_get_display_start): Renamed from this...
        (grub_vbe_bios_get_display_start): ... to this.
        (grub_vbe_set_palette_data): Renamed from this...
        (grub_vbe_bios_set_palette_data): ... to this.
        (grub_vbe_bios_get_controller_info): Fixed problem with registers
        getting corrupted after calling it.  Added more pushes and pops.
        (grub_vbe_bios_set_mode): Likewise.
        (grub_vbe_bios_get_mode): Likewise.
        (grub_vbe_bios_get_memory_window): Likewise.
        (grub_vbe_bios_set_scanline_length): Likewise.
        (grub_vbe_bios_get_scanline_length): Likewise.
        (grub_vbe_bios_get_display_start): Likewise.
        (grub_vbe_bios_set_palette_data): Likewise.

        * normal/cmdline.c (cl_set_pos): Refresh the screen.
        (cl_insert): Likewise.
        (cl_delete): Likewise.

        * term/gfxterm.c: New file.

        * term/i386/pc/vesafb.c: Removed file.

        * video/video.c: New file.

        * video/i386/pc/vbe.c (real2pm): Added new function.
        (grub_video_vbe_draw_pixel): Likewise.
        (grub_video_vbe_get_video_ptr): Likewise.
        (grub_video_vbe_get_pixel): Likewise
        (grub_video_vbe_init): Likewise.
        (grub_video_vbe_fini): Likewise.
        (grub_video_vbe_setup): Likewise.
        (grub_video_vbe_get_info): Likewise.
        (grub_video_vbe_set_palette): Likewise.
        (grub_video_vbe_get_palette): Likewise.
        (grub_video_vbe_set_viewport): Likewise.
        (grub_video_vbe_get_viewport): Likewise.
        (grub_video_vbe_map_color): Likewise.
        (grub_video_vbe_map_rgb): Likewise.
        (grub_video_vbe_map_rgba): Likewise.
        (grub_video_vbe_unmap_color): Likewise.
        (grub_video_vbe_fill_rect): Likewise.
        (grub_video_vbe_blit_glyph): Likewise.
        (grub_video_vbe_blit_bitmap): Likewise.
        (grub_video_vbe_blit_render_target): Likewise.
        (grub_video_vbe_scroll): Likewise.
        (grub_video_vbe_swap_buffers): Likewise.
        (grub_video_vbe_create_render_target): Likewise.
        (grub_video_vbe_delete_render_target): Likewise.
        (grub_video_vbe_set_active_render_target): Likewise.
        (grub_vbe_set_pixel_rgb): Remove function.
        (grub_vbe_set_pixel_index): Likewise.
        (index_color_mode): Remove static variable.
        (active_mode): Likewise.
        (framebuffer): Likewise.
        (bytes_per_scan_line): Likewise.
        (grub_video_vbe_adapter): Added new static variable.
        (framebuffer): Likewise.
        (render_target): Likewise.
        (initial_mode): Likewise.
        (mode_in_use): Likewise.
        (mode_list): Likewise.
2006-03-14 19:08:34 +00:00
marco_g
5f97350bc7 2006-03-10 Marco Gerards <marco@gnu.org>
* configure.ac (AC_INIT): Bumped to 1.93.

	* DISTLIST: Added `include/grub/hfs.h'.
2006-03-10 22:27:24 +00:00
okuji
a3c5c6f8f6 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
* boot/i386/pc/boot.S (general_error): Before looping, try INT
        18H, which might help the BIOS falling back to next boot media.
2006-02-01 06:12:58 +00:00
okuji
6de53d26a2 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
* util/i386/pc/grub-install.in: Escape a backslash. Reported by
        Poe Chen <poe.poechen@gmail.com>.
2006-01-25 00:11:36 +00:00
marco_g
77c4a3939d 2006-01-17 Marco Gerards <marco@gnu.org>
* include/grub/normal.h: Include <grub/script.h>.
	(grub_command_list): Removed struct.
	(grub_command_list_t): Removed type.
	(grub_menu_entry): Remove members `num' and `command_list'.  Add
	members `commands' and `sourcecode'.
	* include/grub/script.h: Add inclusion guards.
	(grub_script_cmd_menuentry): New struct.
	(grub_script_execute_menuentry): New prototype.
	(grub_script_lexer_record_start): Likewise.
	(grub_script_lexer_record_stop): Likewise.
	* normal/execute.c (grub_script_execute_menuentry): New function.
	* normal/lexer.c (record, recording, recordpos, recordlen): New
	variables.
	(grub_script_lexer_record_start): New function.
	(grub_script_lexer_record_stop): Likewise.
	(recordchar): Likewise.
	(nextchar): Likewise.
	(grub_script_yylex): Use `nextchar' to fetch new characters.  Use
	2048 as the buffer size.  Add the tokens `menuentry' and `@'.
	* normal/main.c: Include <grub/parser.h> and <grub/script.h>
	(current_menu): New variable.
	(free_menu): Mainly rewritten.
	(grub_normal_menu_addentry): New function.
	(read_config_file): Rewritten.
	* normal/menu.c (run_menu_entry): Mainly rewritten.
	* normal/menu_entry.c (make_screen): Rewritten te code to insert
	the menu entry.
	(run): Mainly rewritten.
	* normal/parser.y (menu_entry): New variable.
	(GRUB_PARSER_TOKEN_MENUENTRY): New token.
	(menuentry): New rule.
	(command): Add `menuentry'.
	(if_statement): Allow additional returns before `fi'.
	* normal/script.c (grub_script_create_cmdmenu): New function.
2006-01-17 09:50:47 +00:00
marco_g
144f1f986f 2006-01-03 Marco Gerards <marco@gnu.org>
* INSTALL: GNU Bison is required.
	* configure.ac: Rewritten the test to detect Bison.
	* Makefile.in (YACC): New variable.  Reported by Xun Sun
	<xun.sun.cn@gmail.com>.
2006-01-03 17:58:02 +00:00
marco_g
af4b2d89a0 2006-01-03 Marco Gerards <marco@gnu.org>
* fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
	the HFS+ filesystem to filesystem blocks.
	(grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
	GCC warning is silenced.
2006-01-03 16:27:31 +00:00
marco_g
15643b71c0 2006-01-03 Marco Gerards <marco@gnu.org>
* partmap/apple.c (apple_partition_map_iterate): Convert the data
	read from disk from big	endian to host byte order.
2006-01-03 16:02:18 +00:00
marco_g
0090587997 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
* fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
	documentation.
	(GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
	(grub_hfs_mount): Grammar fix in error. Make sure this is not an
	embedded HFS+ filesystem.
	(GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
	(grub_hfs_sblock): Move from here...
	* include/grub/hfs.h: To here...  New file.
	* fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
	documentation.
	(GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
	New macros.
	(grub_hfsplus_volheader): Change type of member `magic' to
	`grub_uint16_t'.
	(grub_hfsplus_data): Add new member `embedded_offset'.
	(grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
	returned block.
	(grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
	Calculate the offset.
2006-01-03 14:30:57 +00:00
okuji
8899bc3e58 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
        Removed.
        (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
2005-12-25 19:40:31 +00:00
okuji
ae8c027758 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
* kern/env.c (grub_env_set): Check if ENV->VALUE instead of
        ENV->NAME is NULL after allocating ENV->VALUE.
2005-12-25 17:21:52 +00:00
marco_g
0708445662 2005-12-25 Marco Gerards <marco@gnu.org>
* kern/env.c (grub_env_set): Rewritten the error handling code.
2005-12-25 17:19:24 +00:00
okuji
4750f5f13d 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
* geninit.sh: Made more robust, and more portable.
2005-12-25 17:04:32 +00:00
marco_g
502141992c 2005-12-25 Marco Gerards <marco@gnu.org>
Add support for Apple HFS+ filesystems.

	* fs/hfsplus.c: New file.

	* DISTLIST: Added `fs/hfsplus.c'.

	* conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
	(hfsplus_mod_SOURCES): New variable.
	(hfsplus_mod_CFLAGS): Likewise.
	(hfsplus_mod_LDFLAGS): Likewise.
	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
	(grub_setup_SOURCES): Likewise.
	(grub_mkdevicemap_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* fs/fshelp.c (grub_fshelp_log2blksize): New function.

	* include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
2005-12-25 15:59:50 +00:00
okuji
befaed6ce7 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
        commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
        include/grub/parser.h, include/grub/script.h, kern/parser.c,
        kern/sparc64/cache.S, normal/execute.c, normal/function.c,
        normal/lexer.c, normal/parser.y, normal/script.c, and
        partmap/gpt.c.
        Removed kern/sparc64/cache.c.

        * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
        grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
        grub_emu_init.c.

        * configure.ac (AC_INIT): Bumped to 1.92.
2005-12-25 15:22:55 +00:00
chaac
6a12410384 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
* kern/err.c (grub_error_push): Added new function to support error
stacks.
(grub_error_pop): Likewise.
(grub_error_stack_items): New local variable to support error stacks.
(grub_error_stack_pos): Likewise.
(grub_error_stack_assert): Likewise.
(GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
stack depth.
(grub_print_error): Added support to print errors from error stack.

* include/grub/err.h (grub_error_push): Added function prototype.
(grub_error_pop): Likewise.
2005-12-23 22:59:12 +00:00
hollisb
be973c1ba6 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
* configure.ac: Accept `powerpc64' as host_cpu.
	(amd64): Rename to `biarch32'.

	* kern/powerpc/cache.S (grub_arch_sync_caches): Handle
	non-cacheline-aligned addresses.

	* kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
	(grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
	if `size' is non-zero.
2005-12-10 05:24:59 +00:00
marco_g
b04216abba 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
* conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
	and `cd' to make sure the filename is not prefixed with a
	directory name.
	(pkgdata_MODULES): Add `gpt.mod'.
	(gpt_mod_SOURCES): New variable.
	(gpt_mod_CFLAGS): Likewise.
	(gpt_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.

	* include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
	New macro.

	* partmap/gpt.c: New file.

	* partmap/pc.c (pc_partition_map_iterate): Don't continue when a
	GPT partition map is detected.
2005-12-03 17:54:55 +00:00
subdino
41730ed990 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
* commands/i386/pc/play.c: New file.
        * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
        (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
        macros.
2005-12-03 16:18:27 +00:00
marco_g
95dc3643d6 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
* include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
	((unused))' to silence gcc warning.
2005-11-27 12:21:12 +00:00
hollisb
1569ec5199 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
* configure.ac: Correct `AC_PROG_YACC' test.
2005-11-26 23:40:24 +00:00
hollisb
9abde152f5 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
* util/powerpc/ieee1275/grub-install.in: Run the mount point
	check before installing files.
2005-11-23 05:25:38 +00:00
hollisb
44b83271e6 2005-11-22 Mike Small <smallm@panix.com>
* util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
	number regex so multidigit numbers are recognized correctly.

	* loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
	debugging message before attempting to claim memory.
	(grub_rescue_cmd_initrd): Add a claim debugging message and try
	multiple addresses in case of failure.
2005-11-23 04:25:16 +00:00
hollisb
9c12956b84 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
* term/tparm.c (get_space): Remove empty `if' statement.

	* fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.

	* kern/parser.c (check_varstate): Rename `state' to 's'.
2005-11-23 03:36:25 +00:00
hollisb
aeaf81d9a3 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
* partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
	variable definitions to the beginning of each function.  Sort stack
	variables by size.
	(find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
	`buf' argument to `char *'.
2005-11-23 02:44:34 +00:00
hollisb
79bbb63f6b 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
* conf/powerpc-ieee1275.rmk: Include conf/common.mk.
	(pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
	minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
	hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
	help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
	sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
	configfile.mod, search.mod, gzio.mod and test.mod.
	(symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
	(grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
	(fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
	(fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
	(ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
	(ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
	(minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
	(hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
	(jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
	(iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
	(xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
	(affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
	(sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
	(hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
	(boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
	(terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
	(ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
	(cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
	(help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
	(font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
	(terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
	(amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
	(apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.

	* conf/common.rmk (grub_modules_init.lst): Use `find' instead of
	`grep --include'.
	(pkgdata_MODULES): Add test.mod.
2005-11-23 02:23:08 +00:00
marco_g
233b16284c 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
* genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
	appending to variables with "+=".
	(PModule): Use full pathname to generate *.lst filenames.

	* Makefile.in: Fixed list rules moved from genmk.rb.
	(.DELETE_ON_ERROR): New special target.
	(RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.

	* conf/i386-pc.rmk: Include conf/common.mk.
	(pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
	minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
	hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
	help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
	sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
	configfile.mod, search.mod, gzio.mod and test.mod.
	(symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
	(grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
	(fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
	(fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
	(ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
	(ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
	(minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
	(hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
	(jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
	(iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
	(xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
	(affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
	(sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
	(hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
	(boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
	(terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
	(ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
	(cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
	(help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
	(font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
	(terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
	(amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
	(apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
	here...
	* conf/common.rmk: ... to here.  New file.

	* conf/common.mk: New file.
2005-11-18 14:56:55 +00:00
okuji
16f820c8c5 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
* conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
        (grub_script.tab.c): ... here.

        * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
        (grub_script.tab.c): ... here.

        * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
        (grub_script.tab.c): ... here.

        * normal/command.c (grub_command_find): Fixed a memory leak of
        MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
2005-11-18 10:51:00 +00:00
marco_g
63ba155474 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
* include/grub/symbol.h: (FUNCTION): Use double quotes instead of
	"@" which marks the start of a comment on ARM.
	(VARIABLE): Likewise.
2005-11-13 21:37:16 +00:00
marco_g
7f67dc13e5 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Add support for Linux/ADFS partition tables.

	* partmap/acorn.c: New file.

	* include/grub/acorn_filecore.h: Likewise.

	* DISTLIST: Added `partmap/acorn.c' and
	`include/grub/acorn_filecore.h'.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
	`partmap/acorn.c'.
	(pkgdata_MODULES): Add `acorn.mod'.
	(acorn_mod_SOURCES): New variable.
	(acorn_mod_CFLAGS): Likewise.

	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
	`partmap/acorn.c'.
	(pkgdata_MODULES): Add `acorn.mod'.
	(acorn_mod_SOURCES): New variable.
	(acorn_mod_CFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
	(pkgdata_MODULES): Add `acorn.mod'.
	(acorn_mod_SOURCES): New variable.
	(acorn_mod_CFLAGS): Likewise.
	(acorn_mod_LDFLAGS): Likewise.

	* include/types.h (grub_disk_addr_t): New typedef.
2005-11-13 19:45:12 +00:00
marco_g
6d099807fa 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
* geninit.sh: New file.

	* geninitheader.sh: Likewise.

	* commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
	* commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
	* commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
	* commands/configfile.c (grub_configfile_init)
	(grub_configfile_fini): Likewise.
	* commands/default.c (grub_default_init, grub_default_fini):
	Likewise.
	* commands/help.c (grub_help_init, grub_help_fini): Likewise.
	* commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
	* commands/search.c (grub_search_init, grub_search_fini): Likewise.
	* commands/terminal.c (grub_terminal_init, grub_terminal_fini):
	Likewise.
	* commands/test.c (grub_test_init, grub_test_fini): Likewise.
	* commands/timeout.c (grub_timeout_init, grub_timeout_fini):
	Likewise.
	* commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
	* commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
	Likewise.
	* commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
	Likewise.
	* commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
	Likewise.
	* disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
	* fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
	* fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
	* fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
	* fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
	* fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
	* fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
	* fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
	* fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
	* fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
	* fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
	* normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
	* partmap/amiga.c (grub_amiga_partition_map_init)
	(grub_amiga_partition_map_fini): Likewise.
	* partmap/apple.c (grub_apple_partition_map_init)
	(grub_apple_partition_map_fini): Likewise.
	* partmap/pc.c (grub_pc_partition_map_init)
	(grub_pc_partition_map_fini): Likewise.
	* partmap/sun.c (grub_sun_partition_map_init,
	grub_sun_partition_map_fini): Likewise.
	* term/terminfo.c (grub_terminal_init, grub_terminal_fini):
	Likewise.

	* util/grub-emu.c: Include <grub_modules_init.h>.
	(main): Don't initialize and de-initialize any modules directly,
	use `grub_init_all' and `grub_fini_all' instead.

	* term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
	`grub_vesafb_mod_init'.
	(grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
	all users.
	* term/i386/pc/vga.c (grub_vga_init): Renamed to
	`grub_vga_mod_init'.  Updated all users.
	(grub_vga_fini): Renamed to `grub_vga_mod_fini'.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
	(grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
	rules.

	* include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
	Generate a function to initialize the module in utilities.
	Updated all callers.
	(GRUB_MOD_FINI): Add argument `name'.  Generate a function to
	initialize the module in utilities.  Updated all callers.
2005-11-13 15:47:09 +00:00
hollisb
9046bcf0e6 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
* term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
	escape sequence and a literal ^L to clear the screen.

	* commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
	when returning from Open Firmware.
2005-11-10 01:57:52 +00:00
hollisb
d13ea639a8 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
* term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
	(grub_ofconsole_height): Likewise.
	(grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
	manually insert a '\n'.
	(grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
	`grub_ofconsole_height'.  Return early if these are already set.
2005-11-09 06:07:54 +00:00
subdino
a8fcf2065b 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
        `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
        `normal/execute.c', `normal/lexer.c', `io/gzio.c',
        `kern/parser.c', `grub_script.tab.c', `normal/function.c'
        and `normal/script.c'.
        (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
        `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
        (test_mod_SOURCES): New variable.
        (test_mod_CFLAGS): Likewise.
        (test_mod_LDFLAGS): Likewise.
        (pkgdata_MODULES): Add `test.mod'.
        (grub_script.tab.c): New rule.
        (grub_script.tab.h): Likewise.
2005-11-07 22:28:57 +00:00
marco_g
b6b327459c 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
	`commands/test.c', `normal/execute.c', `normal/lexer.c',
	`grub_script.tab.c', `normal/function.c' and `normal/script.c'.
	(normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
	`grub_script.tab.c', `normal/function.c' and `normal/script.c'.
	(test_mod_SOURCES): New variable.
	(test_mod_CFLAGS): Likewise.
	(pkgdata_MODULES): Add `test.mod'.
	(grub_script.tab.c): New rule.
	(grub_script.tab.h): Likewise.
2005-11-07 20:27:46 +00:00
marco_g
daac212ae3 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
Add initial scripting support.

	* commands/test.c: New file.
	* include/grub/script.h: Likewise.
	* normal/execute.c: Likewise.
	* normal/function.c: Likewise.
	* normal/lexer.c: Likewise.
	* normal/parser.y: Likewise.
	* normal/script.c: Likewise.

	* configure.ac: Add `AC_PROG_YACC' test.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
	`normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
	`normal/function.c' and `normal/script.c'.
	(normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
	`grub_script.tab.c', `normal/function.c' and `normal/script.c'.
	(test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New variables.
	(pkgdata_MODULES): Add `test.mod'.
	(grub_script.tab.c): New rule.
	(grub_script.tab.h): Likewise.

	* include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.

	* include/grub/normal.h (grub_test_init): New prototype.
	(grub_test_fini): Likewise.

	* normal/command.c: Include <grub/script.h>.
	(grub_command_execute): Rewritten.

	* util/grub-emu.c (main): Call `grub_test_init' and
	`grub_test_fini'.
2005-11-06 22:19:59 +00:00
hollisb
77500b2bf0 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
* kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
	to 0.
	* term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
	there are no pending characters.
2005-11-04 04:50:14 +00:00
hollisb
e45deb9e1e 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
* kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
	`grub_strndup' to drop device arguments. Replace unnecessary
	`grub_strndup' with `grub_strdup'.
2005-11-04 03:18:12 +00:00
hollisb
4ce3261934 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
* kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
	`debug' environment variable has been set.
2005-11-04 03:00:59 +00:00
okuji
25fe6f0349 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
From Timothy Baldwin:
        * commands/ls.c (grub_ls_list_files): Close FILE with
        grub_file_close.
        * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
2005-10-28 03:14:33 +00:00
marco_g
04ccf3ec6f 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
* include/grub/parser.h: New file.

	* kern/parser.c: Likewise.

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
	(grub_setup_SOURCES): Likewise.
	(grub_probefs_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	(kernel_img_HEADERS): Add `parser.h'.

	* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
	(grub_emu_SOURCES): Add `kern/parser.c'.
	(grubof_SOURCES): Likewise.

	* conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
	(grubof_SOURCES): Add `kern/parser.c'.

	* include/grub/misc.h (grub_split_cmdline): Removed prototype.

	* kern/misc.c (grub_split_cmdline): Removed function.

	* kern/rescue.c: Include <grub/parser.h>.
	(grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
	of `grub_split_cmdline'.

	* normal/command.c: Include <grub/parser.h>.
	(grub_command_execute):  Use `grub_parser_split_cmdline' instead
	of `grub_split_cmdline'.

	* normal/completion.c: Include <grub/parser.h>.
	(cmdline_state): New variable.
	(iterate_dir): End the filename with a quote depending on the
	command line state.
	(get_state): new function.
	(grub_normal_do_completion): Use `grub_parser_split_cmdline' to
	split the arguments and determine the current argument.  When the
	argument string is not quoted, escape all spaces.
2005-10-24 10:23:46 +00:00
subdino
6d8f4b0e60 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
* normal/sparc64/setjmp.S: New file.
2005-10-23 21:38:12 +00:00
subdino
15cf03edaf 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
* include/grub/sparc64/libgcc.h: New file.
        * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
        (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
        normal/sparc64/setjmp.c.
2005-10-23 21:01:19 +00:00
subdino
03e8661a56 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
* kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
        * kern/sparc64/cache.S: New file.
        * kern/sparc64/cache.c: Removed.
        * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
        (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
        -mtune=ultrasparc.
        (COMMON_LDFLAGS): Add -melf64_sparc.
        (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
        (grubof_SOURCES): Use cache.S instead of cache.c.
        (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
        --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
        (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
        commented though.
        (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
        (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
        (linux_mod_CFLAGS): Commented out.
        (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
        out because module isn't built.
        (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
        (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
        (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
        (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
        (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
        (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
        (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
        (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
        (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
        (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
        (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
        (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
        (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
        (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
2005-10-23 19:28:28 +00:00
okuji
34eeec8a53 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
* util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
        grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
        longer, because HFS should not be used on PC.
2005-10-19 23:17:09 +00:00
okuji
708367a39f 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
* io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
        consistently within the loop.
2005-10-19 23:16:03 +00:00
marco_g
6fa1251a91 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
* fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
	directory can not be read.
2005-10-15 21:33:38 +00:00
okuji
4801580bfa 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
* configure.ac (AC_INIT): Increase the version number to 1.91.

        * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
        include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
        term/i386/pc/serial.c.
2005-10-15 18:10:37 +00:00
okuji
219ad4262c 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
* kern/file.c (grub_file_seek): Seeking to an offset equal to a
        file size must be permitted.

        * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
        between %ah and %al.
2005-10-15 17:28:36 +00:00
okuji
688e5699e6 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
* fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
        grub_uint64_t.
        Call the hook with a NUL-terminated filename.
        (grub_xfs_mount): Use grub_be_to_cpu32 instead of
        grub_cpu_to_be32.

        * kern/term.c (cursor_state): New variable.
        (grub_term_set_current): Reset the cursor state on a new
        terminal.
        (grub_setcursor): Rewritten to use CURSOR_STATE.
        (grub_getcursor): New function.

        * include/grub/term.h (grub_getcursor): New prototype.

        * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
        integers on ARM. Reported by Timothy Baldwin
        <T.E.Baldwin99@members.leeds.ac.uk>.
2005-10-15 09:22:32 +00:00
marco_g
bb34586ca6 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
* fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
	allocated.
	(grub_sfs_dir): Likewise.
2005-10-11 16:42:32 +00:00
marco_g
9a90987706 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
Add support for the SFS filesystem.

	* fs/sfs.c: New file.

	* DISTLIST: Added `fs/sfs.c'.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
	(grub_probefs_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add `sfs.mod'.
	(sfs_mod_SOURCES): New variable.
	(sfs_mod_CFLAGS): Likewise.
	(sfs_mod_LDFLAGS): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
	(pkgdata_MODULES): Add `sfs.mod'.
	(sfs_mod_SOURCES): New variable.
	(sfs_mod_CFLAGS): Likewise.

	* util/grub-emu.c (main): Call `grub_sfs_init' and
	`grub_sfs_fini'.

	* include/grub/fs.h (grub_sfs_init): New prototype.
	(grub_sfs_fini): Likewise.
2005-10-09 13:03:53 +00:00
marco_g
57bdbde34e 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
Add support for the AFFS filesystem.

	* fs/affs.c: New file.

	* DISTLIST: Added `fs/affs.c'.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
	(grub_probefs_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add `affs.mod'.
	(affs_mod_SOURCES): New variable.
	(affs_mod_CFLAGS): Likewise.
	(affs_mod_LDFLAGS): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
	(pkgdata_MODULES): Add `affs.mod'.
	(affs_mod_SOURCES): New variable.
	(affs_mod_CFLAGS): Likewise.

	* util/grub-emu.c (main): Call `grub_affs_init' and
	`grub_affs_fini'.

	* include/grub/fs.h (grub_affs_init): New prototype.
	(grub_affs_fini): Likewise.
2005-10-07 19:25:46 +00:00
marco_g
047b67e0c5 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
* fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
2005-10-01 20:41:53 +00:00
marco_g
59b8208ace 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
* configure.ac: Accept `x86_64' as host_cpu.  In that case add
	`-m32' to CFLAGS.

	* genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
	linking.

	* conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
	(COMMON_LDFLAGS): New variable.
	(kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
	(_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
	(ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
	(hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
	(xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
	(normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
	(terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
	(cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
	(halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
	(terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
	(multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
	(pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
	(default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
	(vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
	(vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
	variables.
	(normal_mod_ASFLAGS): Add `-m32'.

	* include/grub/types.h (grub_host_addr_t, grub_host_off_t)
	(grub_host_size_t, grub_host_ssize_t): New types.
	(grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
	dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
	`GRUB_HOST_SIZEOF_VOID_P'.

	* include/grub/kernel.h (struct grub_module_header): Type of
	member offset changed to `grub_host_off_t'.  Type of member size
	changed to `grub_host_size_t'.
	(struct grub_module_info): Type of member offset changed to
	`grub_host_off_t'.  Type of member size changed to
	`grub_host_size_t'.
2005-10-01 19:49:55 +00:00
okuji
b4093103f8 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
Make GRUB's kernel compliant to Multiboot Specification.

        * kern/i386/pc/startup.S (multiboot_header): New label.
        (multiboot_entry): Likewise.
        (multiboot_trampoline): Likewise.

        * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
        Increased to 0x4A0.

        * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
        put parentheses after a question mark.
        [!GRUB_UTIL] (my_mod): New variable.

        * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
2005-09-28 23:04:26 +00:00
marco_g
b2499b29cd 2005-09-28 Marco Gerards <metgerards@student.han.nl>
Adds support for the XFS filesystem.  Btrees are not supported
	yet.

	* fs/xfs.c: New file.

	* DISTLIST: Added `fs/xfs.c'.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
	(grub_probefs_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add `xfs.mod'.
	(xfs_mod_SOURCES): New variable.
	(xfs_mod_CFLAGS): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
	(pkgdata_MODULES): Add `xfs.mod'.
	(xfs_mod_SOURCES): New variable.
	(xfs_mod_CFLAGS): Likewise.

	* util/grub-emu.c (main): Call `grub_xfs_init' and
	`grub_xfs_fini'.

	* include/grub/fs.h (grub_xfs_init): New prototype.
	(grub_xfs_fini): Likewise.
2005-09-28 10:07:22 +00:00
chaac
83d37a627e 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
* video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
        color modes, allow greater than 16 colors to be configured as
        a default palette.
2005-09-18 21:04:41 +00:00
okuji
47d2d65e33 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
* normal/completion.c (complete_arguments): Add the qualifier
        const into OPTIONS.

        From Omniflux <omniflux+lists@omniflux.com>:
        * include/grub/terminfo.h: New file.
        * include/grub/tparm.h: Likewise.
        * include/grub/i386/pc/serial.h: Likewise.
        * term/terminfo.c: Likewise.
        * term/tparm.c: Likewise.
        * term/i386/pc/serial.c: Likewise.
        * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
        serial.mod.
        (terminfo_mod_SOURCES): New variable.
        (terminfo_mod_CFLAGS): Likewise.
        (serial_mod_SOURCES): Likewise.
        (serial_mod_CFLAGS): Likewise.
2005-09-03 16:54:27 +00:00
okuji
48b671ff70 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
        boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
        and kern/powerpc/ieee1275/cmain.c, respectively.

        * boot/powerpc/ieee1275/crt0.S: Moved to ...
        * kern/powerpc/ieee1275/crt0.S: ... here.

        * boot/powerpc/ieee1275/cmain.c: Moved to ...
        * kern/powerpc/ieee1275/cmain.c: ... here.

        * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
        kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
        instead of boot/powerpc/ieee1275/crt0.S and
        boot/powerpc/ieee1275/cmain.c, respectively.

        * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
        sectors. It was not used anyway.
2005-08-31 16:51:15 +00:00
hollisb
09fc77a7a3 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
* term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
	`unused parameter' warning.
2005-08-31 01:26:34 +00:00
hollisb
003789c77c 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
* term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
	function.
	(grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
	getcharwidth.
2005-08-31 01:02:05 +00:00
marco_g
67f44c8687 2005-08-28 Marco Gerards <metgerards@student.han.nl>
* include/grub/normal.h (enum grub_completion_type): Added
	`GRUB_COMPLETION_TYPE_ARGUMENT'.

	* normal/cmdline.c (print_completion): Handle
	the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
	* normal/menu_entry.c (store_completion): Likewise.

	* normal/completion.c (complete_arguments): New function.
	(grub_normal_do_completion): Call `complete_arguments' when the
	current words start with a dash.
2005-08-28 17:01:16 +00:00
marco_g
0b5abe0251 2005-08-27 Marco Gerards <metgerards@student.han.nl>
* conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
	`gzio.mod' instead of `io.mod').
2005-08-27 18:51:15 +00:00
okuji
d9864ee11a 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
* gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
        (DISTDIRS): Added io and video.
        Rewrite the search routine to make an output consistently.

        * DISTLIST: Added conf/sparc64-ieee1275.mk,
        conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
        include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
        io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
        kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
        util/powerpc/ieee1275/misc.c.

        * include/grub/gzio.h: New file.
        * io/gzio.c: Likewise.

        * kern/file.c (grub_file_close): Call grub_device_close only if
        FILE->DEVICE is not NULL.

        * include/grub/mm.h [!NULL] (NULL): New macro.

        * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.

        * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
        (pkgdata_MODULES): Added gzio.mod.
        (gzio_mod_SOURCES): New variable.
        (gzio_mod_CFLAGS): Likewise.

        * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
        (pkgdata_MODULES): Added gzio.mod.
        (gzio_mod_SOURCES): New variable.
        (gzio_mod_CFLAGS): Likewise.

        * commands/cat.c: Include grub/gzio.h.
        (grub_cmd_cat): Use grub_gzfile_open instead of
        grub_file_open.

        * commands/cmp.c: Include grub/gzio.h.
        (grub_cmd_cmp): Use grub_gzfile_open instead of
        grub_file_open.

        * loader/i386/pc/multiboot.c: Include grub/gzio.h.
        (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
        grub_file_open.
        (grub_rescue_cmd_module): Likewise.
2005-08-22 17:28:59 +00:00
subdino
fa46f4b5b6 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
* conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
        kern/sparc64/ieee1275/init.c because it contains _start.
        * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
2005-08-21 19:33:14 +00:00
subdino
e9211b5d32 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
* configure.ac: Add support for sparc64 host with ieee1275
        firmware.
        * configure: Generated from configure.ac.
        * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
        instead of int.
        (grub_ofdisk_read): Likewise.
        (grub_ofdisk_open): Use %p to print pointer values, and cast the
        pointers as (void *) to remove a warning.
        (grub_ofdisk_close): Likewise.
        (grub_ofdisk_read): Likewise.
        * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
        returns, so make it return void to remove a warning.
        * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
        Corresponding prototype change.
        * kern/mm.c (grub_mm_init_region): Use %p to print pointer
        values, and cast the pointers as (void *) to remove a warning.
        (grub_mm_dump): Likewise.
        * conf/sparc64-ieee1275.mk: New file.
        * conf/sparc64-ieee1275.rmk: Likewise.
        * include/grub/sparc64/setjmp.h: Likewise.
        * include/grub/sparc64/types.h: Likewise.
        * include/grub/sparc64/ieee1275/console.h: Likewise.
        * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
        * include/grub/sparc64/ieee1275/kernel.h: Likewise.
        * include/grub/sparc64/ieee1275/time.h: Likewise.
        * kern/sparc64/cache.c: Likewise.
        * kern/sparc64/dl.c: Likewise.
        * kern/sparc64/ieee1275/init.c: Likewise.
        * kern/sparc64/ieee1275/openfw.c: Likewise.
2005-08-21 18:42:55 +00:00
okuji
385c6a92a3 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
* util/console.c (grub_ncurses_putchar): If C is greater than
        0x7f, set C to a question mark.
        (grub_ncurses_getcharwidth): New function.
        (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
        getcharwidth.

        * normal/menu.c (print_entry): Made aware of Unicode. First,
        convert TITLE to UCS-4, and predict the cursor position by
        grub_getcharwidth.

        * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
        const to SRC.
        * kern/misc.c (grub_utf16_to_utf8): Likewise.
2005-08-21 07:22:51 +00:00
okuji
16ccb8b138 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
* loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
        the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
        grub_strcat.

        * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
        file by the option BOOT_IMAGE. Use grub_stpcpy instead of
        grub_strcpy and grub_strlen. Take it into account that a space
        character is inserted as a delimiter.
2005-08-20 08:25:51 +00:00
okuji
6a85ce7953 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
* partmap/pc.c (pc_partition_map_iterate): Include the value of an
        invalid magic in thre error.

        * commands/search.c: New file.

        * util/grub-emu.c (main): Call grub_search_init and
        grub_search_fini.

        * kern/rescue.c (grub_rescue_print_disks): Removed.
        (grub_rescue_print_devices): New function.
        (grub_rescue_cmd_ls): Use grub_device_iterate with
        grub_rescue_print_devices instead of grub_disk_dev_iterate with
        grub_rescue_print_disks.

        * kern/partition.c (grub_partition_iterate): Return the result of
        PARTMAP->ITERATE instead of GRUB_ERRNO.

        * kern/device.c: Include grub/partition.h.
        (grub_device_iterate): New function.

        * include/grub/partition.h (grub_partition_iterate): Return int
        instead of grub_err_t.

        * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
        prototype.
        [GRUB_UTIL] (grub_search_fini): Likewise.

        * include/grub/device.h (grub_device_iterate): New prototype.

        * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
        commands/search.c.
        (pkgdata_MODULES): Added search.mod.
        (search_mod_SOURCES): New variable.
        (search_mod_CFLAGS): Likewise.

        * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
        (pkgdata_MODULES): Added search.mod.
        (search_mod_SOURCES): New variable.
        (search_mod_CFLAGS): Likewise.

        * commands/ls.c (grub_ls_list_disks): Renamed to ...
        (grub_ls_list_devices): ... this, and use grub_device_iterate.
        All callers changed.

        * DISTLIST: Added commands/search.c.
2005-08-20 07:49:02 +00:00