2002-12-27 08:53:07 +00:00
|
|
|
# -*- makefile -*-
|
|
|
|
|
2010-02-10 00:39:23 +00:00
|
|
|
COMMON_CFLAGS = -mrtd -mregparm=3
|
2008-02-01 18:54:52 +00:00
|
|
|
|
2002-12-27 08:53:07 +00:00
|
|
|
# Images.
|
2010-04-24 23:54:46 +00:00
|
|
|
pkglib_IMAGES = boot.img cdboot.img diskboot.img lnxboot.img pxeboot.img
|
2002-12-27 08:53:07 +00:00
|
|
|
|
|
|
|
# For boot.img.
|
|
|
|
boot_img_SOURCES = boot/i386/pc/boot.S
|
|
|
|
boot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
2009-11-07 21:06:30 +00:00
|
|
|
boot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)0x7C00
|
2009-04-13 06:37:50 +00:00
|
|
|
boot_img_FORMAT = binary
|
2002-12-27 08:53:07 +00:00
|
|
|
|
2004-07-11 13:44:23 +00:00
|
|
|
# For pxeboot.img
|
|
|
|
pxeboot_img_SOURCES = boot/i386/pc/pxeboot.S
|
|
|
|
pxeboot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
2009-11-07 21:06:30 +00:00
|
|
|
pxeboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)0x7C00
|
2009-04-13 06:37:50 +00:00
|
|
|
pxeboot_img_FORMAT = binary
|
2004-07-11 13:44:23 +00:00
|
|
|
|
2002-12-27 08:53:07 +00:00
|
|
|
# For diskboot.img.
|
|
|
|
diskboot_img_SOURCES = boot/i386/pc/diskboot.S
|
|
|
|
diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
2009-11-07 21:06:30 +00:00
|
|
|
diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)0x8000
|
2009-04-13 06:37:50 +00:00
|
|
|
diskboot_img_FORMAT = binary
|
2002-12-27 08:53:07 +00:00
|
|
|
|
2007-12-15 10:42:17 +00:00
|
|
|
# For lnxboot.img.
|
|
|
|
lnxboot_img_SOURCES = boot/i386/pc/lnxboot.S
|
|
|
|
lnxboot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
2009-11-07 21:06:30 +00:00
|
|
|
lnxboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)0x6000
|
2009-04-13 06:37:50 +00:00
|
|
|
lnxboot_img_FORMAT = binary
|
2007-12-15 10:42:17 +00:00
|
|
|
|
2008-02-03 08:27:15 +00:00
|
|
|
# For cdboot.img.
|
|
|
|
cdboot_img_SOURCES = boot/i386/pc/cdboot.S
|
|
|
|
cdboot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
2009-11-07 21:06:30 +00:00
|
|
|
cdboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)0x7C00
|
2009-04-13 06:37:50 +00:00
|
|
|
cdboot_img_FORMAT = binary
|
2008-02-03 08:27:15 +00:00
|
|
|
|
2002-12-27 08:53:07 +00:00
|
|
|
# For kernel.img.
|
2010-04-24 23:54:46 +00:00
|
|
|
pkglib_PROGRAMS = kernel.img
|
2009-06-22 18:04:37 +00:00
|
|
|
kernel_img_SOURCES = kern/i386/pc/startup.S \
|
|
|
|
kern/i386/misc.S \
|
|
|
|
kern/main.c kern/device.c \
|
2002-12-27 08:53:07 +00:00
|
|
|
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
2010-01-07 21:18:59 +00:00
|
|
|
kern/misc.c kern/mm.c kern/term.c \
|
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
|
|
|
kern/rescue_parser.c kern/rescue_reader.c \
|
2010-03-26 23:19:42 +00:00
|
|
|
kern/time.c kern/list.c kern/command.c kern/corecmd.c \
|
2009-07-01 12:59:47 +00:00
|
|
|
kern/$(target_cpu)/dl.c kern/i386/pc/init.c kern/i386/pc/mmap.c \
|
2008-08-17 16:32:18 +00:00
|
|
|
kern/parser.c kern/partition.c \
|
2008-08-05 20:24:00 +00:00
|
|
|
kern/i386/tsc.c kern/i386/pit.c \
|
2008-08-05 11:54:37 +00:00
|
|
|
kern/generic/rtc_get_time_ms.c \
|
|
|
|
kern/generic/millisleep.c \
|
2007-10-22 20:05:27 +00:00
|
|
|
kern/env.c \
|
2008-11-12 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
* conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
(vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
variables.
* conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
`term/i386/pc/console.c' with `term/i386/vga_common.c'.
* kern/i386/coreboot/init.c (grub_machine_init): Replace call to
grub_console_init() with call to grub_vga_text_init().
(grub_machine_fini): Replace call to
grub_console_fini() with call to grub_vga_text_fini() and
grub_at_keyboard_fini().
* include/grub/i386/pc/console.h: Include `<grub/term.h>'.
(grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
(grub_console_setcolorstate, grub_console_setcolor)
(grub_console_getcolor): New function prototypes.
* term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
(grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
(grub_vga_text_setcursor): Static-ize.
(grub_vga_text_term): New structure.
(GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
* term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
(grub_console_cur_color, grub_console_standard_color)
(grub_console_normal_color, grub_console_highlight_color)
(map_char, grub_console_putchar, grub_console_getcharwidth)
(grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
(grub_console_getcolor): Move from here ...
* term/i386/vga_common.c: ... to here (same function names).
2008-11-12 15:02:17 +00:00
|
|
|
term/i386/pc/console.c term/i386/vga_common.c \
|
2002-12-27 08:53:07 +00:00
|
|
|
symlist.c
|
2010-02-10 00:05:40 +00:00
|
|
|
kernel_img_HEADERS += machine/biosdisk.h machine/vga.h machine/vbe.h \
|
2010-04-26 19:11:16 +00:00
|
|
|
machine/pxe.h i386/pit.h machine/kernel.h
|
2009-06-04 19:53:52 +00:00
|
|
|
kernel_img_CFLAGS = $(COMMON_CFLAGS) $(TARGET_IMG_CFLAGS)
|
2002-12-27 08:53:07 +00:00
|
|
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
2010-04-26 11:11:43 +00:00
|
|
|
kernel_img_LDFLAGS += $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)0x8200 $(COMMON_CFLAGS)
|
2002-12-27 08:53:07 +00:00
|
|
|
|
|
|
|
# Utilities.
|
2009-11-25 23:10:02 +00:00
|
|
|
sbin_UTILITIES = grub-setup
|
2002-12-27 08:53:07 +00:00
|
|
|
|
2004-04-04 13:46:03 +00:00
|
|
|
# For grub-setup.
|
2007-08-29 10:39:42 +00:00
|
|
|
util/i386/pc/grub-setup.c_DEPENDENCIES = grub_setup_init.h
|
2010-05-06 04:03:45 +00:00
|
|
|
grub_setup_SOURCES = gnulib/progname.c util/i386/pc/grub-setup.c \
|
|
|
|
util/misc.c kern/emu/misc.c kern/emu/getroot.c \
|
|
|
|
kern/emu/hostdisk.c kern/device.c kern/disk.c kern/err.c \
|
2010-06-11 20:31:16 +00:00
|
|
|
kern/misc.c kern/partition.c kern/file.c \
|
2010-05-06 04:03:45 +00:00
|
|
|
kern/emu/mm.c kern/fs.c kern/env.c kern/list.c fs/fshelp.c \
|
|
|
|
\
|
|
|
|
fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
|
|
|
|
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
|
|
|
|
fs/nilfs2.c fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c \
|
|
|
|
fs/sfs.c fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c \
|
|
|
|
fs/afs_be.c fs/befs.c fs/befs_be.c fs/tar.c \
|
|
|
|
\
|
|
|
|
partmap/msdos.c partmap/bsdlabel.c partmap/sunpc.c \
|
|
|
|
partmap/gpt.c \
|
|
|
|
\
|
2010-07-06 18:27:55 +00:00
|
|
|
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
|
|
|
disk/mdraid_linux.c disk/lvm.c \
|
2010-05-06 04:03:45 +00:00
|
|
|
util/raid.c util/lvm.c \
|
2008-02-10 20:00:37 +00:00
|
|
|
grub_setup_init.c
|
2003-11-17 18:07:09 +00:00
|
|
|
|
2009-11-14 18:38:11 +00:00
|
|
|
sbin_SCRIPTS += grub-install
|
2009-11-12 12:23:11 +00:00
|
|
|
grub_install_SOURCES = util/grub-install.in
|
2005-07-24 18:16:26 +00:00
|
|
|
|
2009-11-14 18:38:11 +00:00
|
|
|
bin_SCRIPTS += grub-mkrescue
|
|
|
|
grub_mkrescue_SOURCES = util/grub-mkrescue.in
|
|
|
|
|
2009-11-16 15:01:15 +00:00
|
|
|
pkglib_MODULES = biosdisk.mod chain.mod \
|
2010-02-07 22:49:49 +00:00
|
|
|
halt.mod \
|
|
|
|
vbe.mod vbetest.mod vbeinfo.mod \
|
|
|
|
vga.mod \
|
|
|
|
aout.mod bsd.mod pxe.mod pxecmd.mod datetime.mod \
|
|
|
|
ata_pthru.mod hdparm.mod \
|
2009-05-02 21:46:34 +00:00
|
|
|
usb.mod uhci.mod ohci.mod usbtest.mod usbms.mod usb_keyboard.mod \
|
2009-05-14 01:23:49 +00:00
|
|
|
efiemu.mod mmap.mod acpi.mod drivemap.mod
|
|
|
|
|
|
|
|
# For drivemap.mod.
|
|
|
|
drivemap_mod_SOURCES = commands/i386/pc/drivemap.c \
|
|
|
|
commands/i386/pc/drivemap_int13h.S
|
|
|
|
drivemap_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
drivemap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
drivemap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2009-05-02 22:40:21 +00:00
|
|
|
|
|
|
|
# For efiemu.mod.
|
|
|
|
efiemu_mod_SOURCES = efiemu/main.c efiemu/i386/loadcore32.c \
|
|
|
|
efiemu/i386/loadcore64.c efiemu/i386/pc/cfgtables.c \
|
|
|
|
efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c \
|
|
|
|
efiemu/loadcore32.c efiemu/loadcore64.c \
|
|
|
|
efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c \
|
|
|
|
efiemu/i386/coredetect.c
|
2009-06-05 01:28:18 +00:00
|
|
|
efiemu_mod_CFLAGS = $(COMMON_CFLAGS)
|
2009-05-02 22:40:21 +00:00
|
|
|
efiemu_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2009-05-02 22:31:29 +00:00
|
|
|
|
|
|
|
# For acpi.mod.
|
|
|
|
acpi_mod_SOURCES = commands/acpi.c commands/i386/pc/acpi.c
|
|
|
|
acpi_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
acpi_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2009-05-02 21:46:34 +00:00
|
|
|
|
|
|
|
# For mmap.mod.
|
|
|
|
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c \
|
|
|
|
mmap/i386/pc/mmap.c mmap/i386/pc/mmap_helper.S
|
|
|
|
mmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
mmap_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
2002-12-27 08:53:07 +00:00
|
|
|
|
2007-10-22 20:05:27 +00:00
|
|
|
# For biosdisk.mod.
|
|
|
|
biosdisk_mod_SOURCES = disk/i386/pc/biosdisk.c
|
|
|
|
biosdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
biosdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2004-09-12 12:20:52 +00:00
|
|
|
# For chain.mod.
|
2009-03-21 Bean <bean123ch@gmail.com>
* commands/blocklist.c: Add include file <grub/command.h>, remove
<grub/normal.h> and <grub/arg.h>.
(grub_cmd_blocklist): Use the new command interface.
(GRUB_MOD_INIT): Likewise.
(GRUB_MOD_FINI): Likewise.
* commands/boot.c: Likewise.
* commands/cat.c: Likewise.
* commands/cmp.c: Likewise.
* commands/configfile.c: Likewise.
* commands/crc.c: Likewise.
* commands/echo.c: Likewise.
* commands/halt.c: Likewise.
* commands/handler.c: Likewise.
* commands/hdparm.c: Likewise.
* commands/help.c: Likewise.
* commands/hexdump.c: Likewise.
* commands/loadenv.c: Likewise.
* commands/ls.c: Likewise.
* commands/lsmmap.c: Likewise.
* commands/lspci.c: Likewise.
* commands/loadenv.c: Likewise.
* commands/read.c: Likewise.
* commands/reboot.c: Likewise.
* commands/search.c: Likewise.
* commands/sleep.c: Likewise.
* commands/test.c: Likewise.
* commands/usbtest.c: Likewise.
* commands/videotest.c: Likewise.
* commands/i386/cpuid.c: Likewise.
* commands/i386/pc/halt.c: Likewise.
* commands/i386/pc/play.c: Likewise.
* commands/i386/pc/pxecmd.c: Likewise.
* commands/i386/pc/vbeinfo.c: Likewise.
* commands/i386/pc/vbetest.c: Likewise.
* commands/ieee1275/suspend.c: Likewise.
* disk/loopback.c: Likewise.
* font/font_cmd.c: Likewise.
* hello/hello.c: Likewise.
* loader/efi/appleloader.c: Likewise.
* loader/efi/chainloader.c: Likewise.
* loader/i386/bsd.c: Likewise.
* loader/i386/efi/linux.c: Likewise.
* loader/i386/ieee1275/linux.c: Likewise.
* loader/i386/linux.c: Likewise.
* loader/i386/pc/chainloader.c: Likewise.
* loader/i386/pc/linux.c: Likewise.
* loader/powerpc/ieee1275/linux.c: Likewise.
* loader/multiboot_loader.c: Likewise.
* term/gfxterm.c: Likewise.
* term/i386/pc/serial.c: Likewise.
* term/terminfo.c: Likewise.
* term/i386/pc/vesafb.c: Removed <grub/arg.h>.
* term/i386/pc/vga.c: Likewise.
* video/readers/jpeg.c: Likewise.
* video/readers/png.c: Likewise.
* video/readers/tga.c: Likewise.
* util/grub-fstest (cmd_loopback): Removed.
(cmd_blocklist): Likewise.
(cmd_ls): Likewise.
(grub_register_command): Likewise.
(grub_unregister_command): Likewise.
(execute_command): Use grub_command_find to locate command and execute
it.
* include/grub/efi/chainloader.h: Removed.
* loader/efi/chainloader_normal.c: Likewise.
* loader/i386/bsd_normal.c: Likewise.
* loader/i386/pc/chainloader_normal.c: Likewise.
* loader/i386/pc/multiboot_normal.c: Likewise.
* loader/linux_normal.c: Likewise.
* loader/multiboot_loader_normal.c: Likewise.
* loader/powerpc/ieee1275/linux_normal.c: Likewise.
* gencmdlist.sh: Scan new registration command grub_register_extcmd
and grub_register_command_p1.
* conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
kern/command.c, lib/arg.c and commands/extcmd.c.
(pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
(minicmd_mod_SOURCES): New variable.
(minicmd_mod_CFLAGS): Likewise.
(minicmd_mod_LDFLAGS): Likewise.
(extcmd_mod_SOURCES): Likewise.
(extcmd_mod_CFLAGS): Likewise.
(extcmd_mod_LDFLAGS): Likewise.
(boot_mod_SOURCES): Removed.
(boot_mod_CFLAGS): Likewise.
(boot_mod_LDFLAGS): Likewise.
* conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
kern/corecmd.c.
(kernel_img_HEADERS): Add command.h.
(grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
and lib/arg.c.
(pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
_multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
remove the corresponding normal mode command.
(normal_mod_SOURCES): Remove normal/arg.c.
* conf/i386-coreboot.rmk: Likewise.
* conf/i386-efi.rmk: Likewise.
* conf/i386-ieee1275.rmk: Likewise.
* conf/powerpc-ieee1275.rmk: Likewise.
* conf/x86_64-efi.rmk: Likewise.
* include/grub/arg.h: Move from here ...
* include/grub/lib/arg.h: ... to here.
* normal/arg.c: Move from here ...
* lib/arg.c: ... to here.
* commands/extcmd.c: New file.
* commands/minicmd.c: Likewise.
* include/grub/command.h: Likewise.
* include/grub/extcmd.h: Likewise.
* kern/command.c: Likewise.
* kern/corecmd.c: Likewise.
* kern/list.c (grub_list_iterate): Return int instead of void.
(grub_list_insert): New function.
(grub_prio_list_insert): Likewise.
* kern/rescue.c (grub_rescue_command): Removed.
(grub_rescue_command_list): Likewise.
(grub_rescue_register_command): Likewise.
(grub_rescue_unregister_command): Likewise.
(grub_rescue_cmd_boot): Move to minicmd.c
(grub_rescue_cmd_help): Likewise.
(grub_rescue_cmd_info): Likewise.
(grub_rescue_cmd_boot): Likewise.
(grub_rescue_cmd_testload): Likewise.
(grub_rescue_cmd_dump): Likewise.
(grub_rescue_cmd_rmmod): Likewise.
(grub_rescue_cmd_lsmod): Likewise.
(grub_rescue_cmd_exit): Likewise.
(grub_rescue_print_devices): Moved to corecmd.c.
(grub_rescue_print_files): Likewise.
(grub_rescue_cmd_ls): Likewise.
(grub_rescue_cmd_insmod): Likewise.
(grub_rescue_cmd_set): Likewise.
(grub_rescue_cmd_unset): Likewise.
(attemp_normal_mode): Use grub_command_find to get normal module.
(grub_enter_rescue_mode): Use grub_register_core_commands to register
commands, remove grub_rescue_regiter_command calls.
* normal/command.c (grub_regiser_command): Removed.
(grub_unregister_command): Likewise.
(grub_command_find): Likewise.
(grub_iterate_commands): Likewise.
(rescue_command): Likewise.
(export_command): Moved to corecmd.c.
(set_command): Removed.
(unset_command): Likewise.
(insmod_command): Likewise.
(rmmod_command): Likewise.
(lsmod_command): Likewise.
(grub_command_init): Likewise.
* normal/completion.c (iterate_command): Use cmd->prio to check for
active command.
(complete_arguments): Use grub_extcmd_t structure to find options.
(grub_normal_do_completion): Change function grub_iterate_commands to
grub_command_iterate.
* normal/execute.c (grub_script_execute_cmd): No need to parse
argument here.
* normal/main.c (grub_dyncmd_dispatcher): New function.
(read_command_list): Register unload commands as dyncmd.
(grub_cmd_normal): Use new command interface, register rescue,
unregister normal at entry, register normal, unregister rescue at exit.
* include/grub/list.h (grub_list_test_t): New type.
(grub_list_iterate): Return int instead of void.
(grub_list_insert): New function.
(GRUB_AS_NAMED_LIST_P): New macro.
(GRUB_AS_PRIO_LIST): Likewise.
(GRUB_AS_PRIO_LIST_P): Likewise.
(GRUB_PRIO_LIST_PRIO_MASK): New constant.
(GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
(grub_prio_list): New structure.
(grub_prio_list_insert): New function.
(grub_prio_list_remove): New inline function.
* include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
(GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
(GRUB_COMMAND_FLAG_MENU): Likewise.
(GRUB_COMMAND_FLAG_BOTH): Likewise.
(GRUB_COMMAND_FLAG_TITLE): Likewise.
(GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
(GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
(GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
(grub_command): Likewise.
(grub_register_command): Likewise.
(grub_command_find): Likewise.
(grub_iterate_commands): Likewise.
(grub_command_init): Likewise.
(grub_arg_parse): Likewise.
(grub_arg_show_help): Likewise.
* include/grub/rescue.h (grub_rescue_register_command): Removed.
(grub_rescue_unregister_command): Likewise.
* include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
* include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
grub_rescue_cmd_initrd.
* include/grub/i386/loader.h: Likewise.
* include/grub/x86_64/loader.h: Likewise.
* include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
|
|
|
chain_mod_SOURCES = loader/i386/pc/chainloader.c
|
2004-09-12 12:20:52 +00:00
|
|
|
chain_mod_CFLAGS = $(COMMON_CFLAGS)
|
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
|
|
|
chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2004-09-12 12:20:52 +00:00
|
|
|
|
2009-03-28 12:53:16 +00:00
|
|
|
pkglib_MODULES += linux16.mod
|
|
|
|
linux16_mod_SOURCES = loader/i386/pc/linux.c
|
|
|
|
linux16_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
linux16_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
pkglib_MODULES += linux.mod
|
|
|
|
linux_mod_SOURCES = loader/i386/linux.c
|
2004-09-17 09:36:52 +00:00
|
|
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
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
|
|
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2003-01-20 04:13:46 +00:00
|
|
|
|
2009-05-02 23:19:20 +00:00
|
|
|
pkglib_MODULES += xnu.mod
|
2009-12-16 18:04:58 +00:00
|
|
|
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c \
|
2009-12-18 02:57:32 +00:00
|
|
|
loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c
|
2009-05-17 11:33:20 +00:00
|
|
|
xnu_mod_CFLAGS = $(COMMON_CFLAGS)
|
2009-05-02 23:19:20 +00:00
|
|
|
xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
|
2005-01-31 21:40:25 +00:00
|
|
|
# For halt.mod.
|
|
|
|
halt_mod_SOURCES = commands/i386/pc/halt.c
|
|
|
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
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
|
|
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2005-01-31 21:40:25 +00:00
|
|
|
|
2005-08-15 21:25:41 +00:00
|
|
|
# For vbe.mod.
|
2009-08-14 12:41:58 +00:00
|
|
|
vbe_mod_SOURCES = video/i386/pc/vbe.c
|
2005-08-15 21:25:41 +00:00
|
|
|
vbe_mod_CFLAGS = $(COMMON_CFLAGS)
|
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
|
|
|
vbe_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2005-08-15 21:25:41 +00:00
|
|
|
|
2005-08-19 00:32:01 +00:00
|
|
|
# For vbeinfo.mod.
|
|
|
|
vbeinfo_mod_SOURCES = commands/i386/pc/vbeinfo.c
|
|
|
|
vbeinfo_mod_CFLAGS = $(COMMON_CFLAGS)
|
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
|
|
|
vbeinfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2005-08-15 21:25:41 +00:00
|
|
|
|
2005-08-19 00:32:01 +00:00
|
|
|
# For vbetest.mod.
|
|
|
|
vbetest_mod_SOURCES = commands/i386/pc/vbetest.c
|
|
|
|
vbetest_mod_CFLAGS = $(COMMON_CFLAGS)
|
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
|
|
|
vbetest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2005-08-20 07:49:02 +00:00
|
|
|
|
2007-11-10 18:34:48 +00:00
|
|
|
# For vga.mod.
|
2010-05-09 09:00:21 +00:00
|
|
|
vga_mod_SOURCES = video/i386/pc/vga.c
|
2007-11-10 18:34:48 +00:00
|
|
|
vga_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
vga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2008-02-19 16:40:45 +00:00
|
|
|
# For aout.mod
|
|
|
|
aout_mod_SOURCES = loader/aout.c
|
|
|
|
aout_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
aout_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For bsd.mod
|
2009-06-21 15:48:10 +00:00
|
|
|
bsd_mod_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c loader/i386/bsd_helper.S loader/i386/bsd_trampoline.S
|
2008-02-19 16:40:45 +00:00
|
|
|
bsd_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
bsd_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2009-05-03 09:03:31 +00:00
|
|
|
bsd_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
2008-02-19 16:40:45 +00:00
|
|
|
|
2009-02-08 Marco Gerards <marco@gnu.org>
* Makefile.in (enable_grub_emu_usb): New variable.
* conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
(grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
`util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
(grub_emu_LDFLAGS): Add `$(LIBUSB)'.
(pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
`usbtest.mod' and `usbms.mod'.
(usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
(usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
(uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
(ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
(usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
variables.
* disk/usbms.c: New file.
* include/grub/usb.h: Likewise.
* include/grub/usbtrans.h: Likewise.
* include/grub/usbdesc.h: Likewise.
* bus/usb/usbtrans.c: Likewise.
* bus/usb/ohci.c: Likewise.
* bus/usb/uhci.c: Likewise.
* bus/usb/usbhub.c: Likewise.
* bus/usb/usb.c: Likewise.
* commands/usbtest.c: Likewise.
* util/usb.c: Likewise.
* include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
* configure.ac: Test for libusb presence.
* util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2009-02-08 17:58:32 +00:00
|
|
|
# For usb.mod
|
|
|
|
usb_mod_SOURCES = bus/usb/usb.c bus/usb/usbtrans.c bus/usb/usbhub.c
|
|
|
|
usb_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
usb_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For usbtest.mod
|
|
|
|
usbtest_mod_SOURCES = commands/usbtest.c
|
|
|
|
usbtest_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
usbtest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For uhci.mod
|
|
|
|
uhci_mod_SOURCES = bus/usb/uhci.c
|
|
|
|
uhci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
uhci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For ohci.mod
|
|
|
|
ohci_mod_SOURCES = bus/usb/ohci.c
|
|
|
|
ohci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
ohci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For usbms.mod
|
|
|
|
usbms_mod_SOURCES = disk/usbms.c
|
|
|
|
usbms_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
usbms_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2009-02-21 14:55:06 +00:00
|
|
|
# For usb_keyboard.mod
|
|
|
|
usb_keyboard_mod_SOURCES = term/usb_keyboard.c
|
|
|
|
usb_keyboard_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
usb_keyboard_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2008-08-05 15:15:59 +00:00
|
|
|
# For pxe.mod
|
|
|
|
pxe_mod_SOURCES = fs/i386/pc/pxe.c
|
|
|
|
pxe_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
pxe_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For pxecmd.mod
|
|
|
|
pxecmd_mod_SOURCES = commands/i386/pc/pxecmd.c
|
|
|
|
pxecmd_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
pxecmd_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2008-08-15 15:39:02 +00:00
|
|
|
# For datetime.mod
|
2009-12-11 21:14:09 +00:00
|
|
|
datetime_mod_SOURCES = lib/cmos_datetime.c
|
2008-08-15 15:39:02 +00:00
|
|
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2009-02-14 12:57:55 +00:00
|
|
|
# For ata_pthru.mod.
|
|
|
|
ata_pthru_mod_SOURCES = disk/ata_pthru.c
|
|
|
|
ata_pthru_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
ata_pthru_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For hdparm.mod.
|
|
|
|
hdparm_mod_SOURCES = commands/hdparm.c lib/hexdump.c
|
|
|
|
hdparm_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
hdparm_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2009-12-11 20:28:27 +00:00
|
|
|
# For cmostest.mod
|
|
|
|
pkglib_MODULES += cmostest.mod
|
|
|
|
cmostest_mod_SOURCES = commands/i386/cmostest.c
|
|
|
|
cmostest_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
cmostest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2009-05-03 06:39:37 +00:00
|
|
|
ifeq ($(enable_efiemu), yes)
|
|
|
|
|
2009-06-04 20:54:14 +00:00
|
|
|
efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
|
|
|
|
-rm -f $@
|
|
|
|
ifeq ($(TARGET_APPLE_CC), 1)
|
|
|
|
-rm -f $@.bin
|
|
|
|
$(TARGET_CC) -c -m32 -DELF32 -DAPPLE_CC -o $@.bin -Wall -Werror $< -nostdlib -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
|
|
|
|
$(OBJCONV) -felf32 -nu -nd $@.bin $@
|
|
|
|
-rm -f $@.bin
|
|
|
|
else
|
|
|
|
$(TARGET_CC) -c -m32 -DELF32 -o $@ -Wall -Werror $< -nostdlib -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
|
|
|
|
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
|
|
|
endif
|
|
|
|
|
2009-05-02 22:40:21 +00:00
|
|
|
efiemu64_c.o: efiemu/runtime/efiemu.c
|
2009-06-04 20:54:14 +00:00
|
|
|
ifeq ($(TARGET_APPLE_CC), 1)
|
|
|
|
$(TARGET_CC) -c -m64 -DAPPLE_CC=1 -DELF64 -o $@ -Wall -Werror $< -nostdlib -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
|
|
|
|
else
|
|
|
|
$(TARGET_CC) -c -m64 -DELF64 -o $@ -Wall -Werror $< -nostdlib -mcmodel=large -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
|
|
|
|
endif
|
2009-05-02 22:40:21 +00:00
|
|
|
|
|
|
|
efiemu64_s.o: efiemu/runtime/efiemu.S
|
2009-06-04 20:54:14 +00:00
|
|
|
-rm -f $@
|
|
|
|
ifeq ($(TARGET_APPLE_CC), 1)
|
|
|
|
$(TARGET_CC) -c -m64 -DAPPLE_CC=1 -DELF64 -o $@ -Wall -Werror $< -nostdlib -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
|
|
|
|
else
|
|
|
|
$(TARGET_CC) -c -m64 -DELF64 -o $@ -Wall -Werror $< -nostdlib -mcmodel=large -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
|
|
|
|
endif
|
2009-05-02 22:40:21 +00:00
|
|
|
|
2009-06-04 20:54:14 +00:00
|
|
|
efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELF)
|
|
|
|
-rm -f $@
|
|
|
|
ifeq ($(TARGET_APPLE_CC), 1)
|
|
|
|
-rm -f $@.bin
|
|
|
|
$(TARGET_CC) -m64 -o $@.bin -Wl,-r $^ -nostdlib
|
|
|
|
$(OBJCONV) -felf64 -nu -nd $@.bin $@
|
|
|
|
-rm -f $@.bin
|
|
|
|
else
|
|
|
|
$(TARGET_CC) -m64 -o $@ -Wl,-r $^ -nostdlib
|
|
|
|
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
|
|
|
endif
|
2009-05-02 22:40:21 +00:00
|
|
|
|
|
|
|
CLEANFILES += efiemu32.o efiemu64.o efiemu64_c.o efiemu64_s.o
|
2009-05-04 19:38:12 +00:00
|
|
|
pkglib_DATA += efiemu32.o efiemu64.o
|
2009-05-02 22:40:21 +00:00
|
|
|
|
2009-05-03 06:39:37 +00:00
|
|
|
endif
|
|
|
|
|
2008-09-07 16:09:21 +00:00
|
|
|
include $(srcdir)/conf/i386.mk
|
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
|
|
|
include $(srcdir)/conf/common.mk
|