Commit graph

60 commits

Author SHA1 Message Date
Robert Millan
f84b481b35 Cheery-pick grub-emu split from experimental (rev 1361)
2009-11-23  Robert Millan  <rmh.grub@aybabtu.com>

        * configure.ac: Detect all `emu' platforms.  Define
        GRUB_MACHINE_* macros in TARGET_CFLAGS.  Remove
        --enable-grub-emu logic.  Disable include/grub/machine
        symlink on `emu' platforms.

        * genkernsyms.sh.in: Use @TARGET_CFLAGS@ during symbol generation.
        * gensymlist.sh.in: Likewise.

        * include/grub/i386/coreboot/machine.h: Remove file.
        * include/grub/i386/efi/machine.h: Likewise.
        * include/grub/i386/ieee1275/machine.h: Likewise.
        * include/grub/i386/pc/machine.h: Likewise.
        * include/grub/i386/qemu/machine.h: Likewise.
        * include/grub/powerpc/ieee1275/machine.h: Likewise.
        * include/grub/sparc64/ieee1275/machine.h: Likewise.
        * include/grub/x86_64/efi/machine.h: Likewise.

        * commands/acpi.c: Remove `<grub/machine/machine.h>'.
        * commands/halt.c: Likewise.
        * commands/reboot.c: Likewise.
        * include/grub/autoefi.h: Likewise.
        * include/grub/i386/at_keyboard.h: Likewise.
        * include/grub/i386/kernel.h: Likewise.
        * include/grub/i386/loader.h: Likewise.
        * include/grub/i386/pc/memory.h: Likewise.
        * kern/dl.c: Likewise.
        * kern/i386/coreboot/init.c: Likewise.
        * loader/i386/bsd.c: Likewise.
        * loader/i386/linux.c: Likewise.
        * loader/multiboot_loader.c: Likewise.
        * term/i386/pc/serial.c: Likewise.
        * term/usb_keyboard.c: Likewise.

        * include/grub/time.h [!GRUB_MACHINE_EMU]: Remove
        `<grub/machine/machine.h>'
        [!GRUB_MACHINE_EMU] (GRUB_TICKS_PER_SECOND): New macro.
        * util/misc.c: Remove `<grub/machine/machine.h>' and
        `<grub/machine/time.h>'.

        * Makefile.in (enable_grub_emu): Remove variable.
        Include $(srcdir)/conf/any-emu.mk for the `emu' platform.

        * conf/any-emu.rmk: New file.
        * conf/common.rmk (grub_emu_init.lst, grub_emu_init.h)
        (grub_emu_init.c): Move from here ...
        * conf/any-emu.rmk: ... to here.

        * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-emu'.
        (grub_emu_SOURCES, grub_emu_LDFLAGS): Move from here ...
        * conf/any-emu.rmk: ... to here.
2009-11-23 15:31:54 +00:00
robertmh
fa6e945f50 2009-10-29 Robert Millan <rmh.grub@aybabtu.com>
Revert SVN r2660.

        * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): Moved from here ...
        * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
        * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): ... and here.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/i386-pc.rmk: Likewise.
        * conf/powerpc-ieee1275.rmk: Likewise.
        * conf/sparc64-ieee1275.rmk: Likewise.
        * conf/x86_64-efi.rmk: Likewise.
2009-10-29 10:03:13 +00:00
robertmh
94180ff6c7 2009-10-26 Robert Millan <rmh.grub@aybabtu.com>
* conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): Moved
        from here ...
        * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
        * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): Remove.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/i386-pc.rmk: Likewise.
        * conf/powerpc-ieee1275.rmk: Likewise.
        * conf/sparc64-ieee1275.rmk: Likewise.
        * conf/x86_64-efi.rmk: Likewise.
2009-10-26 18:02:19 +00:00
blusseau
f79572cdd6 2009-09-02 Yves BLUSSEAU <blusseau@zetam.org>
Embedding loadenv module into grub-emu

    * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
    commands/loadenv.c
    * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
    * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
    * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
    * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
    * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
    * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
2009-09-03 17:07:08 +00:00
cjwatson
4cbe67e509 2009-08-28 Colin Watson <cjwatson@ubuntu.com>
2009-08-28  Robert Millan  <rmh.grub@aybabtu.com>

	Add `getkeystatus' terminal method.  Add a new `keystatus' command
	to query it.

	* include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
	GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
	modifier key bitmasks.
	(struct grub_term_input): Add `getkeystatus' member.
	(grub_getkeystatus): Add prototype.
	* kern/term.c (grub_getkeystatus): New function.

	* include/grub/i386/pc/memory.h
	(GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
	(struct grub_machine_bios_data_area): Define necessary parts of BIOS
	Data Area layout.
	* term/i386/pc/console.c (grub_console_getkeystatus): New function.
	(grub_console_term_input): Set `getkeystatus' member.
	* term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
	constants.
	(grub_usb_keyboard_getreport): Likewise.
	(grub_usb_keyboard_checkkey): Likewise.
	(grub_usb_keyboard_getkeystatus): New function.
	(grub_usb_keyboard_term): Set `getkeystatus' member.

	* commands/keystatus.c: New file.
	* conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
	(keystatus_mod_SOURCES): New variable.
	(keystatus_mod_CFLAGS): Likewise.
	(keystatus_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
	commands/keystatus.c.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* DISTLIST: Add commands/keystatus.c.
2009-08-28 13:20:34 +00:00
phcoder
6e2a90859a 2009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
Split befs.mod and afs.mod into *_be.mod and *.mod

	* conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
	(grub_fstest_SOURCES): Likewise.
	(pkglib_MODULES): Add afs_be.mod and befs_be.mod.
	(afs_be_mod_SOURCES): New variable.
	(afs_be_mod_CFLAGS): Likewise.
	(afs_be_mod_LDFLAGS): Likewise.
	(befs_be_mod_SOURCES): Likewise.
	(befs_be_mod_CFLAGS): Likewise.
	(befs_be_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* fs/afs_be.c: New file.
	* fs/befs_be.c: New file.
	* fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
	(GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
	(U16): Replaced with ...
	(grub_afs_to_cpu16): ...this. All users updated.
	(U32): Replaced with ...
	(grub_afs_to_cpu32): ...this. All users updated.
	(U64): Replaced with ...
	(grub_afs_to_cpu64): ...this. All users updated.
	(GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
	(GRUB_AFS_BO_BIG_ENDIAN): Likewise.
	(grub_afs_validate_sblock): Check only one endiannness.
	(GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
	(GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
	(GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
	(GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
	(GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
	(GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
	(GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
	(GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
2009-08-28 13:01:26 +00:00
phcoder
e7e1f93ff6 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
Authentication support.

	* commands/password.c: New file.
	* conf/common.rmk (pkglib_MODULES): Add password.mod.
	(password_mod_SOURCES): New variable.
	(password_mod_CFLAGS): Likewise.
	(password_mod_LDFLAGS): Likewise.
	(normal_mod_SOURCES): Add normal/auth.c.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
	normal/auth.c.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* include/grub/auth.h: New file.
	* include/grub/err.h (grub_err_t): New enum value
	GRUB_ERR_ACCESS_DENIED.
	* include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
	'users'.
	* include/grub/normal.h (grub_cmdline_get): New argument 'history'.
	* normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
	users updated.
	* normal/auth.c: New file.
	* normal/main.c (grub_normal_add_menu_entry): Handle --users option.
	(grub_cmdline_run): Don't allow to go to command line without
	authentication.
	* normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
	* normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
	menuentry without superuser rights.
	* normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
	user isn't a superuser.
2009-08-24 23:55:06 +00:00
robertmh
71acf5e54b 2009-08-23 Robert Millan <rmh.grub@aybabtu.com>
* partmap/pc.c: Rename to ...
        * partmap/msdos.c: ... this.  Update all users.
        (grub_pc_partition_map): Rename to ...
        (grub_msdos_partition_map): ... this.  Update all users.

        * parttool/pcpart.c: Rename to ...
        * parttool/msdospart.c: ... this.  Update all users.

        * include/grub/pc_partition.h: Rename to ...
        * include/grub/msdos_partition.h: ... this.  Update all users.
        (grub_pc_partition_bsd_entry): Rename to ...
        (grub_msdos_partition_bsd_entry): ... this.  Update all users.
        (grub_pc_partition_disk_label): Rename to ...
        (grub_msdos_partition_disk_label): ... this.  Update all users.
        (grub_pc_partition_entry): Rename to ...
        (grub_msdos_partition_entry): ... this.  Update all users.
        (grub_pc_partition_mbr): Rename to ...
        (grub_msdos_partition_mbr): ... this.  Update all users.
        (grub_pc_partition): Rename to ...
        (grub_msdos_partition): ... this.  Update all users.
        (grub_pc_partition_is_empty): Rename to ...
        (grub_msdos_partition_is_empty): ... this.  Update all users.
        (grub_pc_partition_is_extended): Rename to ...
        (grub_msdos_partition_is_extended): ... this.  Update all users.
        (grub_pc_partition_is_bsd): Rename to ...
        (grub_msdos_partition_is_bsd): ... this.  Update all users.

        * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
        (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
        (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
        (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
        (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
        (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
        (gpt_mod_LDFLAGS): Rename to ...
        (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
        (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
        (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
        (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
        (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
        (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
        (part_gpt_mod_LDFLAGS): ... this.
        (pkglib_MODULES): Prefix partition modules with `part_'.  Rename
        `pcpart.mod' to `msdospart.mod'.
        (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
        to ...
        (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
        (msdospart_mod_LDFLAGS): ... this.
2009-08-23 12:00:57 +00:00
phcoder
c0d8b5d42a 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
Split ufs.mod into ufs1.mod and ufs2.mod.

	* conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
	(grub_fstest_SOURCES): Likewise.
	(pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
	(ufs_mod_SOURCES): Remove.
	(ufs_mod_CFLAGS): Likewise.
	(ufs_mod_LDFLAGS): Likewise.
	(ufs1_mod_SOURCES): New variable.
	(ufs1_mod_CFLAGS): Likewise.
	(ufs1_mod_LDFLAGS): Likewise.
	(ufs2_mod_SOURCES): New variable.
	(ufs2_mod_CFLAGS): Likewise.
	(ufs2_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
	* conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
	Likewise.
	(grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	(grub_setup_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
	(grub_setup_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
	Likewise.
	* fs/ufs2.c: New file.
	* fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
2009-08-14 13:31:09 +00:00
phcoder
1ef44b802b 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
Add BFS support

	* conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
	(grub_fstest_SOURCES): Likewise.
	(pkglib_MODULES): Add befs.mod.
	(befs_mod_SOURCES): New variable.
	(befs_mod_CFLAGS): Likewise.
	(befs_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	(grub_setup_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(grub_setup_SOURCES): Likewise.
	* fs/befs.c: New file.
	* fs/afs.c (GRUB_AFS_FSNAME): New declaration.
	(GRUB_AFS_SBLOCK_SECTOR): Likewise.
	(GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
	(GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
	(B_KEY_INDEX_ALIGN): New declaration.
	(B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
	(grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
	(grub_afs_btree) [MODE_BFS]: New conditional declaration.
	(grub_afs_sblock) [MODE_BFS]: Remove link_count.
	(grub_afs_validate_sblock) [MODE_BFS]: Support BFS
	(grub_afs_mount) [MODE_BFS]: Likewise.
	(grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
	(grub_afs_fs): Use GRUB_AFS_FSNAME
	(GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
	(GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
	(GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
	(GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
2009-07-20 21:18:59 +00:00
robertmh
3f7f0cd003 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
Fix grub-emu build on sparc64-ieee1275.

        * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
        * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
2009-07-01 13:04:38 +00:00
robertmh
211d06b54b 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
* util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
        (grub_reboot, grub_halt): New functions.

        * util/i386/pc/misc.c: Delete.  Update all users.
        * util/sparc64/ieee1275/misc.c: Likewise.
        * util/powerpc/ieee1275/misc.c: Likewise.
2009-07-01 13:01:33 +00:00
robertmh
aaf53e3ce3 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
* conf/i386.rmk (setjmp_mod_SOURCES)
        (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
        * conf/common.rmk (setjmp_mod_SOURCES)
        (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
        to use $(target_cpu).
        * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
        (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
        * conf/powerpc-ieee1275.rmk: Likewise.
        * conf/sparc64-ieee1275.rmk: Likewise.

        * conf/i386-pc.rmk (kernel_img_SOURCES): Use
        $(target_cpu) for kern/$(target_cpu)/dl.c.
        * conf/i386-efi.rmk: Likewise.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/x86_64-efi.rmk: Likewise.
        * conf/i386-coreboot.rmk: Likewise.
        * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
        $(target_cpu) for kern/$(target_cpu)/dl.c and for
        kern/$(target_cpu)/cache.S.
        * conf/sparc64-ieee1275.rmk: Likewise.
2009-07-01 12:59:47 +00:00
phcoder
693fe63766 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
xnu_uuid command

	* commands/xnu_uuid.c: new file
	* conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
	(xnu_uuid_mod_SOURCES): new variable
	(xnu_uuid_mod_CFLAGS): likewise
	(xnu_uuid_mod_LDFLAGS): likewise
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise
	* util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
2009-06-15 22:57:39 +00:00
phcoder
9c6f459688 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
Probe command

	* commands/probe.c: new file
	* conf/common.rmk (pkglib_MODULES): add probe.mod
	(probe_mod_SOURCES): new variable
	(probe_mod_CFLAGS): likewise
	(probe_mod_LDFLAGS): likewise
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise
2009-06-15 22:41:42 +00:00
phcoder
63963d17d0 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
Drivemap fixes

	* commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
	new function
	(grub_get_root_biosnumber_saved): new variable
	(GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
	(GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
	* commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore 
	%dx after the call if necessary
	* conf/common.rmk (pkglib_MODULES): remove boot.mod
	(boot_mod_SOURCES): remove
	(boot_mod_CFLAGS): remove
	(boot_mod_LDFLAGS): remove
	* conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
	(boot_mod_SOURCES): new variable
	(boot_mod_CFLAGS): likewise
	(boot_mod_LDFLAGS): likewise
	* conf/i386-efi.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise
	* conf/x86_64-efi.rmk: likewise
	* include/grub/i386/pc/biosnum.h: new file
	* lib/i386/pc/biosnum.c: likewise
	* loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
	* loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
	* loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
2009-06-11 16:13:39 +00:00
fzielcke
b39f9d20a9 remove all trailing whitespace 2009-06-10 21:04:23 +00:00
fzielcke
7dd10fceb4 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
(setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
	* conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
	(setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
	* conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
	(setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2009-05-16 17:32:32 +00:00
bean
9d87a1ba36 2009-05-16 Bean <bean123ch@gmail.com>
* conf/common.rmk (pkglib_MODULES): Add lua.mod.
	(lua_mod_SOURCES): New variable.
	(lua_mod_CFLAGS): Likewise.
	(lua_mod_LDFLAGS): Likewise.

	* conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
	(setjmp_mod_SOURCES): New variable.
	(setjmp_mod_CFLAGS): Likewise.
	(setjmp_LDFLAGS): Likewise.

	* conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
	(setjmp_mod_SOURCES): New variable.
	(setjmp_mod_CFLAGS): Likewise.
	(setjmp_LDFLAGS): Likewise.

	* conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
	(setjmp_mod_SOURCES): New variable.
	(setjmp_mod_CFLAGS): Likewise.
	(setjmp_LDFLAGS): Likewise.

	* conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
	(setjmp_mod_SOURCES): New variable.
	(setjmp_mod_CFLAGS): Likewise.
	(setjmp_LDFLAGS): Likewise.

	* normal/i386/setjmp.S: Moved from here ...
	* lib/i386/setjmp.S: ... Moved here
	* normal/x86_64/setjmp.S: Moved from here ...
	* lib/x86_64/setjmp.S: ... Moved here
	* normal/powerpc/setjmp.S: Moved from here ...
	* lib/powerpc/setjmp.S: ... Moved here
	* normal/sparc64/setjmp.S: Moved from here ...
	* lib/sparc64/setjmp.S: ... Moved here

	* include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
	returns_twice in mingw.

	* script/lua/grub_lib.c: New file.
	* script/lua/grub_lib.h: Likewise.
	* script/lua/grub_lua.h: Likewise.
	* script/lua/grub_main.c: Likewise.
	* script/lua/lapi.c: Likewise.
	* script/lua/lapi.h: Likewise.
	* script/lua/lauxlib.c: Likewise.
	* script/lua/lauxlib.h: Likewise.
	* script/lua/lbaselib.c: Likewise.
	* script/lua/lcode.c: Likewise.
	* script/lua/lcode.h: Likewise.
	* script/lua/ldblib.c: Likewise.
	* script/lua/ldebug.c: Likewise.
	* script/lua/ldebug.h: Likewise.
	* script/lua/ldo.c: Likewise.
	* script/lua/ldo.h: Likewise.
	* script/lua/ldump.c: Likewise.
	* script/lua/lfunc.c: Likewise.
	* script/lua/lfunc.h: Likewise.
	* script/lua/lgc.c: Likewise.
	* script/lua/lgc.h: Likewise.
	* script/lua/linit.c: Likewise.
	* script/lua/liolib.c: Likewise.
	* script/lua/llex.c: Likewise.
	* script/lua/llex.h: Likewise.
	* script/lua/llimits.h: Likewise.
	* script/lua/lmathlib.c: Likewise.
	* script/lua/lmem.c: Likewise.
	* script/lua/lmem.h: Likewise.
	* script/lua/loadlib.c: Likewise.
	* script/lua/lobject.c: Likewise.
	* script/lua/lobject.h: Likewise.
	* script/lua/lopcodes.c: Likewise.
	* script/lua/lopcodes.h: Likewise.
	* script/lua/loslib.c: Likewise.
	* script/lua/lparser.c: Likewise.
	* script/lua/lparser.h: Likewise.
	* script/lua/lstate.c: Likewise.
	* script/lua/lstate.h: Likewise.
	* script/lua/lstring.c: Likewise.
	* script/lua/lstring.h: Likewise.
	* script/lua/lstrlib.c: Likewise.
	* script/lua/ltable.c: Likewise.
	* script/lua/ltable.h: Likewise.
	* script/lua/ltablib.c: Likewise.
	* script/lua/ltm.c: Likewise.
	* script/lua/ltm.h: Likewise.
	* script/lua/lua.h: Likewise.
	* script/lua/luaconf.h: Likewise.
	* script/lua/lualib.h: Likewise.
	* script/lua/lundump.c: Likewise.
	* script/lua/lundump.h: Likewise.
	* script/lua/lvm.c: Likewise.
	* script/lua/lvm.h: Likewise.
	* script/lua/lzio.c: Likewise.
	* script/lua/lzio.h: Likewise.
2009-05-16 12:46:24 +00:00
davem
8aadec43ee * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'. 2009-05-04 22:53:23 +00:00
fzielcke
afd5c11527 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
* conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
	`normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
	and `normal/script.c'.  Add `kern/rescue_reader.c',
	`kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c', 
	`script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
	`grub_script.tab.c'.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2009-05-04 17:49:57 +00:00
bean
d558e6b5ac 2009-05-02 Bean <bean123ch@gmail.com>
* conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
	script/sh/parser.y.
	(pkglib_MODULES): Add normal.mod and sh.mod.
	(normal_SOURCES): New variable.
	(normal_mod_CFLAGS): Likewise.
	(normal_mod_LDFLAGS): Likewise.
	(sh_mod_SOURCES): Likewise.
	(sh_mod_CFLAGS): Likewise.
	(sh_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
	script/sh/lexer.c_DEPENDENCIES.
	(kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
	kern/rescue_reader.c and kern/rescue_parser.c.
	(kernel_img_HEADERS): Remove rescue.h, add reader.h.
	(grub_emu_SOURCES): Change source files.
	(pkglib_MODULES): Remove normal.mod.
	(normal_SOURCES): Removed.
	(normal_mod_CFLAGS): Likewise.
	(normal_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1276.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.

	* include/grub/command.h (grub_command_execute): New inline function.

	* include/grub/menu.h (grub_menu_entry): Removed commands field.

	* include/grub/normal.h: Remove <grub/setjmp.h>.
	(grub_fs_module_list): Moved to normal/autofs.c.
	(grub_exit_env): Removed.
	(grub_command_execute): Likewise.
	(grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
	parameter script.
	(read_command_list): New function declaration.
	(read_fs_list): Likewise.

	* include/parser.h: Include <grub/reader.h>.
	(grub_parser_split_cmdline): Change type of getline parameter.
	(grub_parser): New structure.
	(grub_parser_class): New variable.
	(grub_parser_execute): New function declaration.
	(grub_register_rescue_parser): Likewise.
	(grub_parser_register): New inline function.
	(grub_parser_unregister): Likewise.
	(grub_parser_get_current): Likewise.
	(grub_parser_set_current): Likewise.

	* include/grub/reader.h: New file.
	* kern/reader.c: Likewise.
	* kern/rescue_parser.c: Likewise.
	* kern/rescue_reader.c: Likewise.
	* normal/autofs.c: Likewise.
	* normal/dyncmd.c: Likewise.

	* include/grub/rescue.h: Removed.
	* normal/command.h: Likewise.

	* include/grub/script.h: Moved to ...
	* include/grub/script_sh.h: ... Moved here.
	* normal/execute.c: Moved to ...
	* script/sh/execute.c: ... Moved here.
	* normal/function.c: Moved to ...
	* script/sh/function.c: ... Moved here.
	* normal/lexer.c: Moved to ...
	* script/sh/lexer.c: ... Moved here.
	* normal/parser.y: Moved to ...
	* script/sh/parser.y: ... Moved here.
	* normal/script.c: Moved to ...
	* script/sh/script.c: ... Moved here.

	* normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
	<grub/reader.h>.
	(grub_exit_env): Removed.
	(fs_module_list): Moved to normal/autofs.c.
	(grub_file_getline): Don't handle comment here.
	(free_menu): Skip removed field entry->commands.
	(grub_normal_menu_addentry): Removed as grub_menu_entry, removed
	script parameter.
	(read_config_file): Removed nested parameter, change getline function.
	(grub_enter_normal_mode): Removed.
	(grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
	(read_command_list): Likewise.
	(autoload_fs_module): Moved to normal/autofs.c.
	(read_fs_list): Likewise.
	(reader_nested): New variable.
	(grub_normal_execute): Run parser.sh to switch to sh parser.
	(grub_cmd_rescue): Removed.
	(cmd_normal): Removed.
	(grub_cmd_normal): Unregister itself at the beginning. Don't register
	rescue command.
	(grub_cmdline_run): New function.
	(grub_normal_reader_init): Likewise.
	(grub_normal_read_line): Likewise.
	(grub_env_write_pager): Likewise.
	(cmdline): New variable.
	(grub_normal_reader): Likewise.
	(GRUB_MOD_INIT): Register normal reader and set as current, register
	pager hook, register normal command with grub_register_command_prio,
	so that it won't show up in command.lst.
	(GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
	grub_fs_autoload_hook.

	* normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
	(grub_menu_execute_entry): Replace grub_script_execute with
	grub_parser_execute, change parameter to grub_command_execute.

	* normal/menu_text.c: Remove <grub/script.h>.

	* normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
	and <grub/parser.h>.
	(run): Change editor_getline to use new parser interface. Change
	parameter to grub_command_execute.

	* kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
	<grub/reader.h> and <grub/parser.h>.
	(grub_load_normal_mode): Execute normal command.
	(grub_main): Call grub_register_core_commands,
	grub_register_rescue_parser and grub_register_rescue_reader, use
	grub_reader_loop to enter input loop.

	* kern/parser.c (grub_parser_spli_cmdline): Change type of getline
	parameter.
	(grub_parser_class): New variable.
	(grub_parser_execute): New function.

	* loader/i386/multiboot.c: Remove <grub/rescue.h>.
	* loader/multiboot2.c: Likewise.
	* loader/sparc64/ieee1275/linux.c: Likewise.

	* util/grub-emu.c (read_command_list): New dummy function.
2009-05-02 19:49:34 +00:00
davem
a1447506fe * util/sparc64/ieee1275/misc.c: New file.
* util/sparc64/ieee1275/grub-setup.c: New file.
	* util/sparc64/ieee1275/grub-ofpathname.c: New file.
	* util/sparc64/ieee1275/grub-mkimage.c: New file.
	* util/sparc64/ieee1275/grub-install.in: New file.
	* util/ieee1275/ofpath.c: New file.
	* util/ieee1275/devicemap.c: New file.
	* util/devicemap.c: New file.
	* util/deviceiter.c: New file.
	* kern/sparc64/ieee1275/init.c: New file.
	* include/grub/util/ofpath.h: New file.
	* include/grub/util/deviceiter.h: New file.
	* util/grub-mkdevicemap.c: Include deviceiter.h.
	Implement using grub_util_emit_devicemap_entry and
	grub_util_iterate_devices.
	* conf/i386-corebook.rmk: Build util/deviceiter.c and
	util/devicemap.c into grub-mkdevicemap
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Add rules to build boot block
	images and installation utilities.  Build kernel as image
	instead of as elf binary.  Use common rules as much as possible.
2009-04-22 09:57:39 +00:00
phcoder
0d5d565326 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
Move loader out of the kernel

	* kern/loader.c: moved to ...
	* commands/boot.c: ... moved here
	* commands/minicmd.c (grub_mini_cmd_boot): moved to ...
	* commands/boot.c (grub_cmd_boot): moved here. All users updated
	* include/grub/kernel.h (grub_machine_fini): export
	* include/grub/loader.h (grub_loader_is_loaded): update declaration
	(grub_loader_set): likewise
	(grub_loader_unset): likewise
	(grub_loader_boot): likewise
	* conf/common.rmk: new module boot.mod
	(pkglib_MODULES): add boot.mod
	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
	(grub_emu_SOURCES): likewise
	* conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/sparcs64-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise   
	* conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
2009-04-15 12:45:50 +00:00
bean
d05f0df3eb 2009-04-14 Bean <bean123ch@gmail.com>
* Makefile.in (pkglib_DATA): Add handler.lst.
	(handler.lst): New rule.

	* conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.

	* genhandlerlist.sh: New file.

	* genmk.rb: Add rules to generate handler.lst.

	* include/grub/normal.h (grub_file_getline): New function definition.
	(read_handler_list): Likewise.
	(free_handler_list): Likewise.

	* include/grub/term.h (grub_term_register_input): Add name parameter
	for auto generation of handler.lst.
	(grub_term_register_output): Likewise.

	* normal/handler.c: New file.

	* normal/main.c (get_line): Renamed to grub_file_getline.
	(read_config_file): Use the newly renamed grub_file_getline.
	(read_command_list): Likewise.
	(read_fs_list): Likewise.
	(grub_normal_execute): Call read_handler_list to parse handler.lst.
	(GRUB_MOD_FINI): Call free_handler_list to free handler list.

	* term/efi/console.c (grub_console_init): Add name parameter for auto
	generation of handler.lst.
	* term/gfxterm.c: Likewise.
	* term/i386/pc/at_keyboard.c: Likewise.
	* term/i386/pc/console.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* term/i386/pc/vga_text.c: Likewise.
	* term/ieee1275/ofconsole.c: Likewise.
	* term/usb_keyboard.c: Likewise.
2009-04-14 18:12:14 +00:00
davem
a3f7515a6e * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
static libgcc.
	* configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
	* include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
	function, if present.
	(__bswapdi2): Likewise.
2009-04-11 08:24:49 +00:00
phcoder
ea761d4014 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
Parttool

	* parttool/pcpart.c: new file
	* commands/parttool.c: likewise
	* conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
	(parttool_mod_SOURCES): new variable
	(parttool_mod_CFLAGS): likewise
	(parttool_mod_LDFLAGS): likewise
	(pcpart_mod_SOURCES): likewise
	(pcpart_mod_CFLAGS): likewise
	(pcpart_mod_LDFLAGS): likewise
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c 
	and parttool/pcpart.c
	* conf/i386-efi.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise
	* conf/x86_64-ieee1275.rmk: likewise
2009-04-06 09:51:01 +00:00
phcoder
05aaebfb7b 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
Support for mtime and further expandability of dir command

	* include/grub/lib/datetime.h: moved to ...
	* include/grub/datetime.h: ... moved here and added 
	declaration of grub_unixtime2datetime. All users updated
	* include/grub/fs.h: new syntax for dir and mtime functionin 
	struct grub_fs 
	* include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
	and GRUB_FSHELP_FLAGS_MASK
	* commands/ls.c (grub_ls_list_files): Write mtime in long format
	* fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
	(grub_ext2_mtime): new function
	* fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
	(grub_hfsplus_mtime): new function
	* fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
	(GRUB_UFS_ATTR_FILE): likewise
	(GRUB_UFS_ATTR_LNK): likewise
	(struct grub_ufs_sblock): new fields mtime
	(grub_ufs_read_inode): new parameter to read inode to a separate buffer
	all users updated
	(grub_ufs_dir): mtime support
	(grub_ufs_mtime): new function
	* fs/affs.c (grub_affs_dir): use new dir syntax
	* fs/afs.c (grub_afs_dir): likewise
	* fs/cpio.c (grub_cpio_dir): likewise
	* fs/fat.c (grub_fat_find_dir): likewise
	* fs/hfs.c (grub_hfs_dir): likewise
	* fs/iso9660.c (grub_iso9660_dir): likewise
	* fs/jfs.c (grub_jfs_dir): likewise
	* fs/minix.c (grub_minix_dir): likewise
	* fs/ntfs.c (grub_ntfs_dir): likewise
	* fs/reiserfs.c (grub_reiserfs_dir): likewise
	* fs/sfs.c (grub_sfs_dir): likewise
	* fs/xfs.c (grub_xfs_dir): likewise
	* util/hostfs.c (grub_hostfs_dir): likewise
	* lib/datetime.c: moved to ...
	* normal/datetime.c: ... moved here
	(grub_unixtime2datetime): new function
	* kern/rescue.c (grub_rescue_print_files): use new dir syntax
	* normal/completition.c (iterate_dir): use new dir syntax
	* normal/misc.c (grub_normal_print_device_info): tell the 
	last modification time of a volume
	* kern/fs.c (grub_fs_probe): updated dummy function to use new syntax 
	* conf/common.rmk: added lib/datetime.c to ls.mod
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c  
	(normal_mod_SOURCES): likewise
	(datetime_mod_SOURCES): Removed lib/datetime.c
	* conf/i386-efi.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise	
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise	
	* conf/x86_64-efi.rmk: likewise
2009-04-05 20:19:05 +00:00
fzielcke
2ba60b6286 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
* conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
	`kern/handler.c'.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2009-03-04 14:08:05 +00:00
cbennett
772e23dad2 2009-02-13 Colin D Bennett <colin@gibibit.com>
Support multiple fallback entries, and provide an API to support
	executing default+fallback menu entries.  Renamed the `terminal' menu
	viewer to `text'.

	* include/grub/normal.h (grub_normal_text_menu_viewer): New global
	variable declaration.
	(grub_menu_execute_callback): New structure declaration.
	(grub_menu_execute_callback_t): New typedef.
	(grub_menu_execute_with_fallback): New function declaration.
	(grub_menu_get_entry): Likewise.
	(grub_menu_get_timeout): Likewise.
	(grub_menu_set_timeout): Likewise.

	* normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.

	* normal/menu.c (grub_wait_after_message): Moved to
	`normal/menu_text.c'.
	(draw_border): Likewise.
	(print_message): Likewise.
	(print_entry): Likewise.
	(print_entries): Likewise.
	(grub_menu_init_page): Likewise.
	(get_entry_number): Likewise.
	(print_timeout): Likewise.
	(run_menu): Likewise.
	(grub_menu_execute_entry): Likewise.
	(show_text_menu): Likewise.
	(get_and_remove_first_entry_number): New function.
	(grub_menu_execute_with_fallback): Likewise.
	(get_entry): Renamed to ...
	(grub_menu_get_entry): .. this and made it global.
	(get_timeout): Renamed to ...
	(grub_menu_get_timeout): ... this and made it global.
	(set_timeout): Renamed to ...
	(grub_menu_set_timeout): ... this and made it global.
	(grub_normal_terminal_menu_viewer): Renamed to ...
	(grub_normal_text_menu_viewer): ... this.

	* normal/menu_text.c: New file.  Extracted text-menu-specific code
	from normal/menu.c.

	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
	(normal_mod_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.
2009-02-13 20:06:27 +00:00
fzielcke
96da94074c 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
* conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
	to avoid false posivites with FAT.
	(grub_fstest_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2009-02-09 18:00:36 +00:00
fzielcke
e507a2c14f 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
	`#'.
2009-02-03 13:34:52 +00:00
fzielcke
d2c2b4cdb9 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
* conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2009-02-03 13:22:26 +00:00
chaac
6fa42fa65a 2009-01-31 Colin D Bennett <colin@gibibit.com>
* normal/main.c: Add include to grub/menu_viewer.h. 
	(free_menu_entry_classes): Added.
	(grub_normal_menu_addentry): Added class property handling.
	(grub_normal_execute): Changed to use new menu viewer for menu viewing.
	(GRUB_MOD_INIT(normal)): Added register for text based menu viewer.

	* normal/menu_viewer.c: New file.

	* normal/menu.c (run_menu_entry): Renamed to ...
	(grub_menu_execute_entry): ... this and	made it as global.
	(grub_menu_run): Renamed to ...
	(show_text_menu): ... this and made it local.
	(show_text_menu): Adapt to new function names.
	(grub_normal_terminal_menu_viewer): New global variable.

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

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

	* include/grub/normal.h: Added include to grub/menu.h.
	(grub_menu_entry): Moved to include/grub/menu.h.
	(grub_menu_entry_t): Likewise.
	(grub_menu): Likewise.
	(grub_menu_t): Likewise.
	(grub_normal_terminal_menu_viewer): Added.
	(grub_menu_execute_entry): Likewise.
	(grub_menu_run): Removed.

	* DISTLIST: Added include/grub/menu.h.
	Added include/grub/menu_viewer.h.
	Added normal/menu_viewer.c.

2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>

	* normal/execute.c (grub_script_execute_menuentry): Changed to use
	arglist for menutitle arguments.

	* normal/main.c (grub_normal_menu_addentry): Likewise.

	* normal/parser.y (menuentry): Likewise.

	* normal/script.c (grub_script_create_cmdmenu): Likewise.

	* include/grub/script.h (grub_script_cmd_menuentry): Likewise.
	(grub_script_create_cmdmenu): Likewise.

	* include/grub/normal.h (grub_normal_menu_addentry): Likewise.

	* conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
	changes.

	* conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.

	* conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.

	* conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.

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

	* conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2009-01-31 09:15:43 +00:00
robertmh
ddbf5556a7 2008-09-08 Robert Millan <rmh@aybabtu.com>
* include/grub/util/biosdisk.h: Move to ...
        * include/grub/util/hostdisk.h: ... here.  Update all users.
        * util/biosdisk.c: Move to ...
        * util/hostdisk.c: ... here.  Update all users.
2008-09-08 13:52:30 +00:00
marco_g
9c2ff3eefe 2008-08-05 Colin D Bennett <colin@gibibit.com>
High resolution timer support.  Implemented for x86 CPUs using TSC.
	Extracted generic grub_millisleep() so it's linked in only as needed.
	This requires a Pentium compatible CPU; if the RDTSC instruction is
	not supported, then it falls back on the generic grub_get_time_ms()
	implementation that uses the machine's RTC.

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
	`kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
	`kern/generic/millisleep.c'.

	* conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
	`kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.

	* conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
	`kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.

	* conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
	`kern/generic/millisleep.c'.

	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.

	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.

	* kern/generic/rtc_get_time_ms.c: New file.

	* kern/generic/millisleep.c: New file.
 	
	* kern/misc.c: Don't include
	<kern/time.h> anymore.
	(grub_millisleep_generic): Removed.

	* commands/sleep.c (grub_interruptible_millisleep): Uses
	grub_get_time_ms() instead of grub_get_rtc().

	* include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
	function.
	(grub_cpu_is_cpuid_supported): New inline function.
	(grub_cpu_is_tsc_supported): New inline function.
	(grub_tsc_init): New function prototype.
	(grub_tsc_get_time_ms): New function prototype.

	* kern/i386/tsc.c (grub_get_time_ms): New file.

	* include/grub/time.h: Include <grub/types.h.
	(grub_millisleep_generic): Removed.
	(grub_get_time_ms): New prototype.
	(grub_install_get_time_ms): New prototype.
	(grub_rtc_get_time_ms): New prototype.

	* kern/time.c (grub_get_time_ms): New function.
	(grub_install_get_time_ms): New function.

	* kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
	<grub/time.h> anymore.
	(grub_millisleep): Removed.
	(grub_machine_init): Call grub_tsc_init.

	* kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
	get_time_ms() implementation.

	* kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
	(ieee1275_get_time_ms): New function.
	(grub_machine_init): Install get_time_ms() implementation.

	* kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
	(grub_machine_init): Call grub_tsc_init().
	(grub_millisleep): Removed.
 
	* kern/ieee1275/init.c (grub_millisleep): Removed.
	(grub_machine_init): Install ieee1275_get_time_ms()
	implementation.
	(ieee1275_get_time_ms): New function.
	(grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
	real work.
2008-08-05 11:54:37 +00:00
proski
a145ac2d9a 2008-06-18 Pavel Roskin <proski@gnu.org>
* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
	kernel_elf_symlist.c to symlist.c for consistency with other
	architectures.  Update all users.
	* conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2008-06-19 01:04:59 +00:00
proski
22f16596ae 2008-05-30 Pavel Roskin <proski@gnu.org>
* conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
	compiling execute.c doesn't need grub_script.tab.h anymore.
	(normal/command.c_DEPENDENCIES): Likewise.
	(normal/function.c_DEPENDENCIES): Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-linuxbios.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
2008-05-30 04:20:48 +00:00
robertmh
8a594a17c7 2008-02-24 Robert Millan <rmh@aybabtu.com>
* conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): New variables.
        * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): Likewise.
        * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): Likewise.
        * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): Likewise.
        * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): Likewise.
        * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): Likewise.
2008-02-24 15:06:30 +00:00
robertmh
66cb40f6c1 2008-02-19 Robert Millan <rmh@aybabtu.com>
* DISTLIST: Replace `commands/ieee1275/halt.c' and
        `commands/ieee1275/reboot.c' with `commands/halt.c' and
        `commands/reboot.c'.
        * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
        (halt_mod_SOURCES): Likewise.
        * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
        (halt_mod_SOURCES): Likewise.
2008-02-19 07:33:41 +00:00
robertmh
7d31f41fc6 2008-02-01 Robert Millan <rmh@aybabtu.com>
* conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
        top.
        (normal/command.c_DEPENDENCIES): New variable.
        (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/i386-linuxbios.rmk: Likewise.
        * conf/i386-pc.rmk: Likewise.
        * conf/sparc64-ieee1275.rmk: Likewise.
        * conf/powerpc-ieee1275.rmk: Likewise.
        (grub_emu_SOURCES): Add `fs/fshelp.c'.

        * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
2008-02-01 15:45:17 +00:00
robertmh
4931827fe4 2007-12-25 Robert Millan <rmh@aybabtu.com>
* configure.ac: Search for possible unifont.hex locations, and
	define UNIFONT_HEX if found.

	* Makefile.in (UNIFONT_HEX): Define variable.
	(DATA): Rename to ...
	(PKGLIB): ... this.  Update all users.
	(PKGDATA): New variable.
	(pkgdata_IMAGES): Rename to ...
	(pkglib_IMAGES): ... this. Update all users.
	(pkgdata_MODULES): Rename to ...
	(pkglib_MODULES): ... this. Update all users.
	(pkgdata_PROGRAMS): Rename to ...
	(pkglib_PROGRAMS): ... this. Update all users.
	(pkgdata_DATA): Rename to ...
	(pkglib_DATA): ... this. Update all users.
	(CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
	(unicode.pff, ascii.pff): New rules.
	(all-local): Add `$(PKGDATA)' dependency.
	(install-local): Process `$(PKGDATA)'.

	* util/update-grub_lib.in (font_path): Search for *.pff files in
	a few more locations, including `${pkgdata}'.
2007-12-25 09:09:43 +00:00
robertmh
3381d27403 2007-10-22 Robert Millan <rmh@aybabtu.com>
* include/grub/time.h: New file.
	* include/grub/i386/time.h: Likewise.
	* include/grub/powerpc/time.h: Likewise.
	* include/grub/sparc64/time.h: Likewise.

	* include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.
	* include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.
	* include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.

	* kern/i386/efi/init.c: Include `<grub/time.h>'.
	(grub_millisleep): New function.
	* kern/i386/pc/init.c: Include `<grub/time.h>'.
	(grub_millisleep): New function.
	* kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
	Remove `grub/machine/time.h' include.
	(grub_millisleep): New function.
	* kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
	Remove `grub/machine/time.h' include.
	(grub_millisleep): New function.

	* include/grub/misc.h (grub_div_roundup): New function.

	* kern/misc.c: Include `<grub/time.h>'.
	(grub_millisleep_generic): New function.

	* conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
	Add `time.h'.
	* conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
	Add `time.h'.
	* conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
	`machine/time.h'.  Add `time.h'.
	* conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2007-10-22 19:59:33 +00:00
robertmh
3572d015fd 2007-07-02 Robert Millan <rmh@aybabtu.com>
* conf/i386-efi.rmk: Replace obsolete reference to
	util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
	with util/getroot.c.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.

	* util/grub-emu.c (main): Fix unchecked pointer handling.
2007-07-02 20:38:01 +00:00
tschwinge
4fe9862ebb 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
* Makefile.in (enable_grub_emu): New variable.
	* configure.ac (--enable-grub-emu): New option.
	Do the checks for (n)curses only if `--enable-grub-emu' is requested.
	* conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
2006-12-13 22:30:19 +00:00
hollisb
2166cc8349 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
* conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(kernel_elf_SOURCES): Likewise.
	* conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
	* conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
	* conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
	* conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
	* conf/common.rmk (pkgdata_MODULES): Add elf.mod.
	(elf_mod_SOURCES): New variable.
	(elf_mod_CFLAGS): Likewise.
	(elf_mod_LDFLAGS): Likewise.
	* include/grub/types.h (__unused): New macro.
	* include/grub/elfload.h: New file.
	* kern/elf.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Include elfload.h.
	(ELF32_LOADMASK): New macro.
	(ELF64_LOADMASK): Likewise.
	(vmlinux): Removed.
	(grub_linux_load32): New function.
	(grub_linux_load64): Likewise.
	(grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
	Use grub_elf_t instead of grub_file_t.
2006-11-03 20:28:04 +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
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
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
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