Merging with trunk

This commit is contained in:
Carles Pina i Estany 2009-11-23 20:34:42 +00:00
commit b58fc33c4f
53 changed files with 842 additions and 749 deletions

View file

@ -13,6 +13,7 @@ config.log
config.status
configure
conf/*.mk
conf/gcry.rmk
*.d
DISTLIST
docs/*.info
@ -44,6 +45,7 @@ grub_setup_init.h
*.img
include/grub/cpu
include/grub/machine
lib/libgcrypt-grub
*.lst
Makefile
*.mod

View file

@ -1,3 +1,100 @@
2009-11-23 Robert Millan <rmh.grub@aybabtu.com>
* script/sh/execute.c: Move from here ...
* script/execute.c: ... to here. Update all users.
* script/sh/function.c: Move from here ...
* script/function.c: ... to here. Update all users.
* script/sh/lexer.c: Move from here ...
* script/lexer.c: ... to here. Update all users.
* script/sh/main.c: Move from here ...
* script/main.c: ... to here. Update all users.
* script/sh/parser.y: Move from here ...
* script/parser.y: ... to here. Update all users.
* script/sh/script.c: Move from here ...
* script/script.c: ... to here. Update all users.
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 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/parser.h (grub_parser_register): Document need
of `name' parameter.
* normal/main.c (grub_normal_read_line): Simplify prompt string.
* script/sh/main.c (grub_sh_parser, GRUB_MOD_INIT(sh)): Rename
"sh" to "grub".
2009-11-23 Robert Millan <rmh.grub@aybabtu.com>
* Makefile.in ($(srcdir)/po/$(PACKAGE).pot): Pass --keyword=N_ to
`$(XGETTEXT)'.
* include/grub/i18n.h (N_): New macro.
* util/mkisofs/mkisofs.h: Likewise.
* util/mkisofs/mkisofs.c (ld_options): Wrap all translatable strings
around N_().
(usage): Use gettext() to translate help strings when printing them.
2009-11-23 Robert Millan <rmh.grub@aybabtu.com>
Based on patch from Bean
(http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00384.html)
* video/efi_fb.c: New file.
* conf/i386-efi.rmk (pkglib_MODULES): Add `efi_fb.mod'.
(efi_fb_mod_SOURCES, efi_fb_mod_CFLAGS, efi_fb_mod_LDFLAGS): New
variables.
* conf/x86_64-efi.rmk: Likewise.
2009-11-22 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-mkimage.c: Ungettextize grub_util_info() strings.

View file

@ -111,7 +111,6 @@ YACC = @YACC@
FONT_SOURCE = @FONT_SOURCE@
# Options.
enable_grub_emu = @enable_grub_emu@
enable_grub_emu_usb = @enable_grub_emu_usb@
enable_grub_fstest = @enable_grub_fstest@
enable_grub_pe2elf = @enable_grub_pe2elf@
@ -153,7 +152,11 @@ $(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
$(RUBY) $(srcdir)/genmk.rb < $< > $@; \
fi
ifeq ($(platform), emu)
include $(srcdir)/conf/any-emu.mk
else
include $(srcdir)/conf/$(target_cpu)-$(platform).mk
endif
# For external modules.
-include $(wildcard $(GRUB_CONTRIB)/*/conf/common.mk)
@ -473,7 +476,7 @@ genkernsyms.sh: genkernsyms.sh.in config.status
$(SHELL) ./config.status
$(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell
cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f $< --keyword=_
cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f $< --keyword=_ --keyword=N_
cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f po/POTFILES-shell -j --language=Shell
$(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): po/$(PACKAGE).pot

View file

@ -26,7 +26,6 @@
#include <grub/gzio.h>
#include <grub/acpi.h>
#include <grub/mm.h>
#include <grub/machine/machine.h>
#include <grub/machine/memory.h>
#include <grub/memory.h>

View file

@ -18,7 +18,6 @@
*/
#include <grub/dl.h>
#include <grub/machine/machine.h>
#include <grub/command.h>
#if defined(GRUB_MACHINE_IEEE1275)

View file

@ -18,7 +18,6 @@
*/
#include <grub/dl.h>
#include <grub/machine/machine.h>
#include <grub/command.h>
#if defined(GRUB_MACHINE_IEEE1275)

89
conf/any-emu.rmk Normal file
View file

@ -0,0 +1,89 @@
# -*- makefile -*-
# Used by various components. These rules need to precede them.
script/lexer.c_DEPENDENCIES = grub_script.tab.h
sbin_UTILITIES += grub-emu
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/configfile.c commands/echo.c commands/help.c \
commands/handler.c commands/ls.c commands/test.c \
commands/search.c commands/blocklist.c commands/hexdump.c \
lib/hexdump.c commands/halt.c commands/reboot.c \
lib/envblk.c commands/loadenv.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/password.c commands/keystatus.c \
disk/host.c disk/loopback.c disk/scsi.c \
fs/fshelp.c \
\
io/gzio.c \
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
kern/err.c kern/list.c kern/handler.c \
kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c \
kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
kern/partition.c kern/reader.c kern/term.c \
kern/rescue_reader.c kern/rescue_parser.c \
lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c \
normal/handler.c normal/auth.c normal/autofs.c \
normal/completion.c normal/main.c normal/color.c \
normal/menu.c normal/menu_entry.c normal/menu_viewer.c \
normal/menu_text.c \
script/main.c script/execute.c script/function.c \
script/lexer.c script/script.c grub_script.tab.c \
partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
partmap/acorn.c partmap/gpt.c \
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.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 \
\
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
util/hostdisk.c util/getroot.c \
\
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
commands/parttool.c parttool/msdospart.c \
grub_emu_init.c
ifeq ($(target_cpu), i386)
grub_emu_SOURCES += commands/i386/cpuid.c
endif
grub_emu_LDFLAGS = $(LIBCURSES)
ifeq ($(enable_grub_emu_usb), yes)
grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c \
commands/usbtest.c
grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB)
endif
grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES))
rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
DISTCLEANFILES += grub_emu_init.lst
grub_emu_init.h: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninitheader.sh
rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
DISTCLEANFILES += grub_emu_init.h
grub_emu_init.c: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninit.sh grub_emu_init.h
rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
DISTCLEANFILES += grub_emu_init.c
# FIXME: this could be shared with common.rmk
# For grub-mkfont.
ifeq ($(enable_grub_mkfont), yes)
bin_UTILITIES += grub-mkfont
grub_mkfont_SOURCES = util/grub-mkfont.c util/misc.c
grub_mkfont_CFLAGS = $(freetype_cflags)
grub_mkfont_LDFLAGS = $(freetype_libs)
endif
grub_script.tab.c grub_script.tab.h: script/parser.y
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/parser.y
DISTCLEANFILES += grub_script.tab.c grub_script.tab.h

View file

@ -72,23 +72,10 @@ grub_mkfont_LDFLAGS = $(freetype_libs)
endif
# For the parser.
grub_script.tab.c grub_script.tab.h: script/sh/parser.y
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/sh/parser.y
grub_script.tab.c grub_script.tab.h: script/parser.y
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/parser.y
DISTCLEANFILES += grub_script.tab.c grub_script.tab.h
# For grub-emu.
grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES))
rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
DISTCLEANFILES += grub_emu_init.lst
grub_emu_init.h: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninitheader.sh
rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
DISTCLEANFILES += grub_emu_init.h
grub_emu_init.c: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninit.sh grub_emu_init.h
rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
DISTCLEANFILES += grub_emu_init.c
# For grub-probe.
grub_probe_init.lst: geninit.sh $(filter-out grub_probe_init.c,$(grub_probe_SOURCES))
rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
@ -544,8 +531,8 @@ normal_mod_CFLAGS = $(COMMON_CFLAGS)
normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
# For sh.mod.
sh_mod_SOURCES = script/sh/main.c script/sh/script.c script/sh/execute.c \
script/sh/function.c script/sh/lexer.c grub_script.tab.c
sh_mod_SOURCES = script/main.c script/script.c script/execute.c \
script/function.c script/lexer.c grub_script.tab.c
sh_mod_CFLAGS = $(COMMON_CFLAGS)
sh_mod_LDFLAGS = $(COMMON_LDFLAGS)

View file

@ -5,7 +5,7 @@ COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
COMMON_LDFLAGS = -m32 -nostdlib
# Used by various components. These rules need to precede them.
script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
script/lexer.c_DEPENDENCIES = grub_script.tab.h
# Images.
@ -95,60 +95,11 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
# Utilities.
sbin_UTILITIES = grub-mkdevicemap
ifeq ($(enable_grub_emu), yes)
sbin_UTILITIES += grub-emu
endif
# For grub-mkdevicemap.
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
util/devicemap.c util/misc.c
# For grub-emu.
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/configfile.c commands/echo.c commands/help.c \
commands/handler.c commands/ls.c commands/test.c \
commands/search.c commands/blocklist.c commands/hexdump.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/password.c commands/keystatus.c \
lib/hexdump.c commands/i386/cpuid.c \
lib/envblk.c commands/loadenv.c \
disk/host.c disk/loopback.c \
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.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 \
\
fs/fshelp.c \
io/gzio.c \
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
kern/err.c kern/list.c kern/handler.c \
kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c \
kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
kern/partition.c kern/reader.c kern/term.c \
kern/rescue_reader.c kern/rescue_parser.c \
lib/arg.c normal/cmdline.c normal/misc.c \
normal/handler.c normal/auth.c normal/autofs.c \
normal/completion.c normal/datetime.c normal/main.c \
normal/menu_text.c \
normal/menu.c normal/menu_entry.c normal/menu_viewer.c \
normal/color.c \
script/sh/main.c script/sh/execute.c script/sh/function.c \
script/sh/lexer.c script/sh/script.c grub_script.tab.c \
partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
partmap/acorn.c partmap/gpt.c \
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
util/hostdisk.c util/getroot.c \
\
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
commands/parttool.c parttool/msdospart.c \
grub_emu_init.c
grub_emu_LDFLAGS = $(LIBCURSES)
sbin_SCRIPTS += grub-install
grub_install_SOURCES = util/grub-install.in

View file

@ -5,14 +5,11 @@ COMMON_CFLAGS = -fno-builtin -m32
COMMON_LDFLAGS = -melf_i386 -nostdlib
# Used by various components. These rules need to precede them.
script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
script/lexer.c_DEPENDENCIES = grub_script.tab.h
# Utilities.
bin_UTILITIES = grub-mkimage
sbin_UTILITIES = grub-mkdevicemap
#ifeq ($(enable_grub_emu), yes)
#sbin_UTILITIES += grub-emu
#endif
# For grub-mkimage.
grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
@ -31,51 +28,6 @@ util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
util/devicemap.c util/misc.c
# For grub-emu.
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/configfile.c commands/help.c \
commands/handler.c commands/ls.c commands/test.c \
commands/search.c commands/hexdump.c lib/hexdump.c \
commands/halt.c commands/reboot.c commands/keystatus.c \
commands/i386/cpuid.c \
commands/password.c \
lib/envblk.c commands/loadenv.c \
disk/loopback.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/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 \
\
io/gzio.c \
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
kern/err.c kern/list.c kern/handler.c \
kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c \
kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
kern/partition.c kern/reader.c kern/term.c \
kern/rescue_reader.c kern/rescue_parser.c \
lib/arg.c normal/cmdline.c normal/command.c normal/datetime.c \
normal/auth.c normal/autofs.c \
normal/completion.c normal/context.c normal/main.c \
normal/menu.c normal/menu_entry.c normal/menu_viewer.c \
normal/menu_text.c \
normal/color.c \
script/sh/main.c script/sh/execute.c script/sh/function.c \
script/sh/lexer.c script/sh/script.c grub_script.tab.c \
partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
partmap/acorn.c partmap/gpt.c \
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
util/hostdisk.c util/getroot.c \
\
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
commands/parttool.c parttool/msdospart.c \
grub_emu_init.c
grub_emu_LDFLAGS = $(LIBCURSES)
# Scripts.
sbin_SCRIPTS = grub-install
@ -196,6 +148,11 @@ fixvideo_mod_SOURCES = commands/efi/fixvideo.c
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
pkglib_MODULES += efi_fb.mod
efi_fb_mod_SOURCES = video/efi_fb.c
efi_fb_mod_CFLAGS = $(COMMON_CFLAGS)
efi_fb_mod_LDFLAGS = $(COMMON_LDFLAGS)
pkglib_MODULES += xnu.mod
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c\
loader/macho.c loader/xnu.c loader/i386/xnu_helper.S

View file

@ -5,7 +5,7 @@ COMMON_CFLAGS = -ffreestanding -mrtd -mregparm=3
COMMON_LDFLAGS = -nostdlib
# Used by various components. These rules need to precede them.
script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
script/lexer.c_DEPENDENCIES = grub_script.tab.h
# Images.
pkglib_PROGRAMS = kernel.img
@ -49,59 +49,11 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
# Utilities.
sbin_UTILITIES = grub-mkdevicemap
ifeq ($(enable_grub_emu), yes)
sbin_UTILITIES += grub-emu
endif
# For grub-mkdevicemap.
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
util/devicemap.c util/misc.c
# For grub-emu.
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/configfile.c commands/echo.c commands/help.c \
commands/handler.c commands/ls.c commands/test.c \
commands/search.c commands/blocklist.c commands/hexdump.c \
lib/hexdump.c commands/halt.c commands/reboot.c \
lib/envblk.c commands/loadenv.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/i386/cpuid.c \
commands/password.c commands/keystatus.c \
disk/host.c disk/loopback.c \
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.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 \
\
fs/fshelp.c \
io/gzio.c \
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
kern/err.c kern/list.c kern/handler.c \
kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c \
kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
kern/partition.c kern/reader.c kern/term.c \
kern/rescue_reader.c kern/rescue_parser.c \
lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c \
normal/handler.c normal/auth.c normal/autofs.c \
normal/completion.c normal/main.c normal/menu_text.c \
normal/menu.c normal/menu_entry.c normal/menu_viewer.c \
normal/color.c \
script/sh/main.c script/sh/execute.c script/sh/function.c \
script/sh/lexer.c script/sh/script.c grub_script.tab.c \
partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
partmap/acorn.c partmap/gpt.c \
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
util/hostdisk.c util/getroot.c \
\
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
grub_emu_init.c
grub_emu_LDFLAGS = $(LIBCURSES)
# Scripts.
sbin_SCRIPTS = grub-install

View file

@ -7,7 +7,7 @@ COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
COMMON_LDFLAGS = -m32 -nostdlib
# Used by various components. These rules need to precede them.
script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
script/lexer.c_DEPENDENCIES = grub_script.tab.h
# Images.
pkglib_IMAGES = boot.img cdboot.img diskboot.img kernel.img lnxboot.img \
@ -82,9 +82,6 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
# Utilities.
bin_UTILITIES = grub-mkimage
sbin_UTILITIES = grub-setup grub-mkdevicemap
ifeq ($(enable_grub_emu), yes)
sbin_UTILITIES += grub-emu
endif
# For grub-mkimage.
grub_mkimage_SOURCES = gnulib/progname.c util/i386/pc/grub-mkimage.c util/misc.c \
@ -116,59 +113,6 @@ grub_setup_SOURCES = gnulib/progname.c \
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
util/devicemap.c util/misc.c
# For grub-emu.
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/configfile.c commands/echo.c commands/help.c \
commands/handler.c commands/ls.c commands/test.c \
commands/search.c commands/blocklist.c commands/hexdump.c \
lib/hexdump.c commands/i386/pc/halt.c commands/reboot.c \
lib/envblk.c commands/loadenv.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/i386/cpuid.c \
commands/password.c commands/keystatus.c \
disk/host.c disk/loopback.c disk/scsi.c \
fs/fshelp.c \
\
io/gzio.c \
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
kern/err.c kern/list.c kern/handler.c \
kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c \
kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
kern/partition.c kern/reader.c kern/term.c \
kern/rescue_reader.c kern/rescue_parser.c \
lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c \
normal/handler.c normal/auth.c normal/autofs.c \
normal/completion.c normal/main.c normal/color.c \
normal/menu.c normal/menu_entry.c normal/menu_viewer.c \
normal/menu_text.c \
script/sh/main.c script/sh/execute.c script/sh/function.c \
script/sh/lexer.c script/sh/script.c grub_script.tab.c \
partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
partmap/acorn.c partmap/gpt.c \
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.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 \
\
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
util/hostdisk.c util/getroot.c \
\
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
commands/parttool.c parttool/msdospart.c \
grub_emu_init.c
grub_emu_LDFLAGS = $(LIBCURSES)
ifeq ($(enable_grub_emu_usb), yes)
grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c \
commands/usbtest.c
grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB)
endif
sbin_SCRIPTS += grub-install
grub_install_SOURCES = util/grub-install.in

View file

@ -6,7 +6,7 @@ COMMON_CFLAGS = -ffreestanding
COMMON_LDFLAGS += -nostdlib
# Used by various components. These rules need to precede them.
script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
script/lexer.c_DEPENDENCIES = grub_script.tab.h
# Images.
@ -30,60 +30,11 @@ pkglib_PROGRAMS = kernel.img
# Utilities.
sbin_UTILITIES = grub-mkdevicemap
ifeq ($(enable_grub_emu), yes)
sbin_UTILITIES += grub-emu
endif
# For grub-mkdevicemap.
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
util/devicemap.c util/misc.c
# For grub-emu
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/configfile.c commands/help.c \
commands/search.c commands/handler.c commands/test.c \
commands/ls.c commands/blocklist.c commands/hexdump.c \
lib/hexdump.c commands/halt.c commands/reboot.c \
lib/envblk.c commands/loadenv.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/password.c commands/keystatus.c \
disk/loopback.c \
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.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 \
\
io/gzio.c \
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
kern/err.c kern/file.c kern/fs.c commands/boot.c kern/main.c \
kern/misc.c kern/parser.c kern/partition.c kern/reader.c \
kern/rescue_reader.c kern/rescue_parser.c \
kern/term.c kern/list.c kern/handler.c fs/fshelp.c \
kern/command.c kern/corecmd.c commands/extcmd.c \
lib/arg.c normal/cmdline.c normal/datetime.c \
normal/completion.c normal/misc.c \
normal/handler.c normal/auth.c normal/autofs.c normal/main.c \
normal/menu.c \
normal/menu_text.c \
normal/menu_entry.c normal/menu_viewer.c \
normal/color.c \
script/sh/main.c script/sh/execute.c script/sh/function.c \
script/sh/lexer.c script/sh/script.c \
partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
partmap/acorn.c \
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
util/hostdisk.c util/getroot.c \
\
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
commands/parttool.c parttool/msdospart.c \
grub_script.tab.c grub_emu_init.c
grub_emu_LDFLAGS = $(LIBCURSES)
kernel_img_SOURCES = kern/powerpc/ieee1275/startup.S kern/ieee1275/cmain.c \
kern/ieee1275/ieee1275.c kern/main.c kern/device.c \
kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c \

View file

@ -6,7 +6,7 @@ COMMON_CFLAGS = -ffreestanding -m64 -mno-app-regs
COMMON_LDFLAGS = -melf64_sparc -nostdlib -mno-relax
# Used by various components. These rules need to precede them.
script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
script/lexer.c_DEPENDENCIES = grub_script.tab.h
# Images.
pkglib_IMAGES = boot.img diskboot.img kernel.img
@ -60,9 +60,6 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
# Utilities.
bin_UTILITIES = grub-mkimage
sbin_UTILITIES = grub-setup grub-mkdevicemap grub-ofpathname
ifeq ($(enable_grub_emu), yes)
sbin_UTILITIES += grub-emu
endif
# For grub-mkimage.
grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
@ -96,52 +93,6 @@ grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
grub_ofpathname_SOURCES = util/sparc64/ieee1275/grub-ofpathname.c \
util/ieee1275/ofpath.c util/misc.c
# For grub-emu
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/configfile.c commands/help.c \
commands/search.c commands/handler.c commands/test.c \
commands/ls.c commands/blocklist.c commands/hexdump.c \
lib/hexdump.c commands/halt.c commands/reboot.c \
lib/envblk.c commands/loadenv.c \
commands/gptsync.c commands/probe.c commands/xnu_uuid.c \
commands/password.c commands/keystatus.c \
disk/loopback.c \
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.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 \
\
io/gzio.c \
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
kern/err.c kern/file.c kern/fs.c commands/boot.c kern/main.c \
kern/misc.c kern/parser.c kern/partition.c kern/reader.c \
kern/rescue_reader.c kern/rescue_parser.c \
kern/term.c kern/list.c kern/handler.c fs/fshelp.c \
kern/command.c kern/corecmd.c commands/extcmd.c \
lib/arg.c normal/cmdline.c normal/datetime.c \
normal/completion.c normal/misc.c \
normal/handler.c normal/auth.c normal/autofs.c normal/main.c \
normal/menu.c \
normal/menu_text.c \
normal/menu_entry.c normal/menu_viewer.c \
normal/color.c \
script/sh/main.c script/sh/execute.c script/sh/function.c \
script/sh/lexer.c script/sh/script.c \
partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
partmap/acorn.c \
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
util/hostdisk.c util/getroot.c \
\
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
commands/parttool.c parttool/msdospart.c \
grub_script.tab.c grub_emu_init.c
grub_emu_LDFLAGS = $(LIBCURSES)
# Scripts.
sbin_SCRIPTS = grub-install

View file

@ -5,14 +5,11 @@ COMMON_CFLAGS = -fno-builtin -m64
COMMON_LDFLAGS = -melf_x86_64 -nostdlib
# Used by various components. These rules need to precede them.
script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
script/lexer.c_DEPENDENCIES = grub_script.tab.h
# Utilities.
bin_UTILITIES = grub-mkimage
sbin_UTILITIES = grub-mkdevicemap
#ifeq ($(enable_grub_emu), yes)
#sbin_UTILITIES += grub-emu
#endif
# For grub-mkimage.
grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
@ -30,50 +27,6 @@ grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
util/devicemap.c util/misc.c
# For grub-emu.
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
commands/configfile.c commands/help.c \
commands/handler.c commands/ls.c commands/test.c \
commands/search.c commands/hexdump.c lib/hexdump.c \
commands/halt.c commands/reboot.c \
commands/i386/cpuid.c \
commands/password.c commands/keystatus.c \
lib/envblk.c commands/loadenv.c \
disk/loopback.c \
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.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 \
\
io/gzio.c \
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
kern/err.c kern/list.c kern/handler.c \
kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c \
kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
kern/partition.c kern/readerescue.c kern/term.c \
lib/arg.c normal/cmdline.c normal/misc.c normal/auth.c \
normal/autofs.c \
normal/completion.c normal/datetime.c normal/context.c \
normal/main.c \
normal/menu.c normal/menu_entry.c normal/menu_viewer.c \
normal/menu_text.c \
normal/color.c \
script/sh/main.c script/sh/execute.c script/sh/function.c \
script/sh/lexer.c script/sh/script.c grub_script.tab.c \
partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \
partmap/acorn.c partmap/gpt.c \
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
util/hostdisk.c util/getroot.c \
\
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
commands/parttool.c parttool/msdospart.c \
grub_emu_init.c
grub_emu_LDFLAGS = $(LIBCURSES)
# Scripts.
sbin_SCRIPTS = grub-install
@ -201,6 +154,11 @@ fixvideo_mod_SOURCES = commands/efi/fixvideo.c
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
pkglib_MODULES += efi_fb.mod
efi_fb_mod_SOURCES = video/efi_fb.c
efi_fb_mod_CFLAGS = $(COMMON_CFLAGS)
efi_fb_mod_LDFLAGS = $(COMMON_LDFLAGS)
pkglib_MODULES += xnu.mod
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c\
loader/macho.c loader/xnu.c loader/i386/xnu_helper.S

View file

@ -91,6 +91,7 @@ case "$target_cpu"-"$platform" in
i386-qemu) ;;
powerpc-ieee1275) ;;
sparc64-ieee1275) ;;
*-emu) ;;
*) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
esac
@ -113,6 +114,17 @@ case "$host_os" in
cygwin) host_kernel=windows ;;
esac
case "$platform" in
coreboot) machine_CFLAGS="-DGRUB_MACHINE_COREBOOT=1" ;;
efi) machine_CFLAGS="-DGRUB_MACHINE_EFI=1" ;;
ieee1275) machine_CFLAGS="-DGRUB_MACHINE_IEEE1275=1" ;;
qemu) machine_CFLAGS="-DGRUB_MACHINE_QEMU=1" ;;
pc) machine_CFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;;
emu) machine_CFLAGS="-DGRUB_MACHINE_EMU=1" ;;
esac
CFLAGS="$CFLAGS $machine_CFLAGS"
TARGET_CFLAGS="$TARGET_CFLAGS $machine_CFLAGS"
AC_SUBST(host_cpu)
AC_SUBST(host_os)
AC_SUBST(host_kernel)
@ -509,40 +521,28 @@ AC_ARG_ENABLE([mm-debug],
[AC_DEFINE([MM_DEBUG], [1],
[Define to 1 if you enable memory manager debugging.])])
AC_ARG_ENABLE([grub-emu],
[AS_HELP_STRING([--enable-grub-emu],
[build and install the `grub-emu' debugging utility (default=guessed)])])
AC_ARG_ENABLE([grub-emu-usb],
[AS_HELP_STRING([--enable-grub-emu-usb],
[build and install the `grub-emu' debugging utility with USB support (default=guessed)])])
if test x"$enable_grub_emu" = xno ; then
grub_emu_excuse="explicitly disabled"
fi
[# Check for curses libraries.]
[if [ x"$grub_emu_excuse" = x ]; then ]
if test "$platform" = emu; then
missing_ncurses=
[# Check for curses libraries.]
AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"],
[AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"],
[grub_emu_excuse=["need (n)curses libraries"]])])
[missing_ncurses=[true]])])
AC_SUBST([LIBCURSES])
[fi]
[if [ x"$grub_emu_excuse" = x ]; then ]
[if [ x"$missing_ncurses" = x ]; then ]
[# Check for headers.]
AC_CHECK_HEADERS([ncurses/curses.h], [],
[AC_CHECK_HEADERS([ncurses.h], [],
[AC_CHECK_HEADERS([curses.h], [],
[grub_emu_excuse=["need (n)curses headers"]])])])
[missing_ncurses=[true]])])])
[fi]
if test x"$missing_ncurses" = xtrue ; then
AC_MSG_ERROR([grub-emu can't be compiled without ncurses])
fi
if test x"$enable_grub_emu" = xyes && test x"$grub_emu_excuse" != x ; then
AC_MSG_ERROR([grub-emu was explicitly requested but can't be compiled])
fi
if test x"$grub_emu_excuse" = x ; then
enable_grub_emu=yes
else
enable_grub_emu=no
grub_emu_usb_excuse="grub-emu isn't built"
fi
if test x"$enable_grub_emu_usb" = xno ; then
grub_emu_usb_excuse="explicitly disabled"
fi
@ -565,9 +565,8 @@ enable_grub_emu_usb=yes
else
enable_grub_emu_usb=no
fi
AC_SUBST([enable_grub_emu])
AC_SUBST([enable_grub_emu_usb])
fi
AC_ARG_ENABLE([grub-fstest],
[AS_HELP_STRING([--enable-grub-fstest],
@ -615,14 +614,18 @@ AC_SUBST(ASFLAGS)
# Output files.
grub_CHECK_LINK_DIR
if test x"$link_dir" = xyes ; then
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu
include/grub/machine:include/grub/$target_cpu/$platform])
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu])
if test "$platform" != emu ; then
AC_CONFIG_LINKS([include/grub/machine:include/grub/$target_cpu/$platform])
fi
else
mkdir -p include/grub 2>/dev/null
rm -rf include/grub/cpu
cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null
rm -rf include/grub/machine
cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
if test "$platform" != emu ; then
rm -rf include/grub/machine
cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
fi
fi
AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh])
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
@ -631,16 +634,13 @@ AC_OUTPUT
echo "*******************************************************"
echo GRUB2 will be compiled with following components:
echo Platform: "$target_cpu"-"$platform"
if [ x"$grub_emu_excuse" = x ]; then
echo grub-emu: Yes
else
echo grub-emu: No "($grub_emu_excuse)"
fi
if [ x"$platform" = xemu ]; then
if [ x"$grub_emu_usb_excuse" = x ]; then
echo USB support for grub-emu: Yes
else
echo USB support for grub-emu: No "($grub_emu_usb_excuse)"
fi
fi
if [ x"$enable_mm_debug" = xyes ]; then
echo With memory debugging: Yes
else

View file

@ -19,7 +19,7 @@
u=
grep "^#define HAVE_ASM_USCORE" config.h >/dev/null 2>&1 && u="_"
$CC -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I"$srcdir/include" $* \
$CC @TARGET_CFLAGS@ -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I"$srcdir/include" $* \
| grep -v '^#' \
| sed -n \
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \

View file

@ -59,7 +59,7 @@ cat <<EOF
{
EOF
$CC -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I"$srcdir/include" $* \
$CC @TARGET_CFLAGS@ -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I"$srcdir/include" $* \
| grep -v '^#' \
| sed -n \
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/ {"\1", \1},/;p;}' \

View file

@ -21,7 +21,6 @@
#ifndef GRUB_AUTOEFI_HEADER
#define GRUB_AUTOEFI_HEADER 1
#include <grub/machine/machine.h>
#ifdef GRUB_MACHINE_EFI
# include <grub/efi/efi.h>

View file

@ -27,4 +27,6 @@
# define _(str) grub_gettext(str)
#endif
#define N_(str) str
#endif /* GRUB_I18N_H */

View file

@ -19,7 +19,6 @@
#ifndef GRUB_CPU_AT_KEYBOARD_HEADER
#define GRUB_CPU_AT_KEYBOARD_HEADER 1
#include <grub/machine/machine.h>
#define SHIFT_L 0x2a
#define SHIFT_R 0x36

View file

@ -1,24 +0,0 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_MACHINE_MACHINE_HEADER
#define GRUB_MACHINE_MACHINE_HEADER 1
#define GRUB_MACHINE_COREBOOT 1
#endif /* ! GRUB_MACHINE_MACHINE_HEADER */

View file

@ -1,24 +0,0 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_MACHINE_MACHINE_HEADER
#define GRUB_MACHINE_MACHINE_HEADER 1
#define GRUB_MACHINE_EFI 1
#endif /* ! GRUB_MACHINE_MACHINE_HEADER */

View file

@ -1,24 +0,0 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2008 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_MACHINE_MACHINE_HEADER
#define GRUB_MACHINE_MACHINE_HEADER 1
#define GRUB_MACHINE_IEEE1275 1
#endif /* ! GRUB_MACHINE_MACHINE_HEADER */

View file

@ -19,7 +19,6 @@
#ifndef GRUB_KERNEL_CPU_HEADER
#define GRUB_KERNEL_CPU_HEADER 1
#include <grub/machine/machine.h>
#ifdef GRUB_MACHINE_IEEE1275
#define GRUB_MOD_ALIGN 0x1000

View file

@ -22,7 +22,6 @@
#include <grub/types.h>
#include <grub/err.h>
#include <grub/symbol.h>
#include <grub/machine/machine.h>
extern grub_addr_t EXPORT_VAR(grub_os_area_addr);
extern grub_size_t EXPORT_VAR(grub_os_area_size);

View file

@ -1,24 +0,0 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_MACHINE_MACHINE_HEADER
#define GRUB_MACHINE_MACHINE_HEADER 1
#define GRUB_MACHINE_PCBIOS 1
#endif /* ! GRUB_MACHINE_MACHINE_HEADER */

View file

@ -21,7 +21,6 @@
#define GRUB_MEMORY_MACHINE_HEADER 1
#include <grub/symbol.h>
#include <grub/machine/machine.h>
#ifndef ASM_FILE
#include <grub/types.h>
#include <grub/err.h>

View file

@ -1,24 +0,0 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2009 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_MACHINE_MACHINE_HEADER
#define GRUB_MACHINE_MACHINE_HEADER 1
#define GRUB_MACHINE_QEMU 1
#endif /* ! GRUB_MACHINE_MACHINE_HEADER */

View file

@ -88,6 +88,7 @@ grub_err_t EXPORT_FUNC(grub_parser_execute) (char *source);
static inline void
grub_parser_register (const char *name __attribute__ ((unused)),
/* `name' is ignored here, but used by genhandlerlist.sh. */
grub_parser_t parser)
{
grub_handler_register (&grub_parser_class, GRUB_AS_HANDLER (parser));

View file

@ -1,24 +0,0 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_MACHINE_MACHINE_HEADER
#define GRUB_MACHINE_MACHINE_HEADER 1
#define GRUB_MACHINE_IEEE1275 1
#endif /* ! GRUB_MACHINE_MACHINE_HEADER */

View file

@ -1,24 +0,0 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_MACHINE_MACHINE_HEADER
#define GRUB_MACHINE_MACHINE_HEADER 1
#define GRUB_MACHINE_IEEE1275 1
#endif /* ! GRUB_MACHINE_MACHINE_HEADER */

View file

@ -21,9 +21,14 @@
#include <grub/types.h>
#include <grub/symbol.h>
#include <grub/machine/time.h>
#include <grub/cpu/time.h>
#ifdef GRUB_MACHINE_EMU
#define GRUB_TICKS_PER_SECOND 100000
#else
#include <grub/machine/time.h>
#endif
void EXPORT_FUNC(grub_millisleep) (grub_uint32_t ms);
grub_uint64_t EXPORT_FUNC(grub_get_time_ms) (void);

View file

@ -1,24 +0,0 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_MACHINE_MACHINE_HEADER
#define GRUB_MACHINE_MACHINE_HEADER 1
#define GRUB_MACHINE_EFI 1
#endif /* ! GRUB_MACHINE_MACHINE_HEADER */

View file

@ -31,7 +31,6 @@
#include <grub/file.h>
#include <grub/env.h>
#include <grub/cache.h>
#include <grub/machine/machine.h>
/* Platforms where modules are in a readonly area of memory. */
#if defined(GRUB_MACHINE_QEMU)

View file

@ -23,7 +23,6 @@
#include <grub/machine/memory.h>
#include <grub/machine/console.h>
#include <grub/machine/kernel.h>
#include <grub/machine/machine.h>
#include <grub/types.h>
#include <grub/err.h>
#include <grub/dl.h>

View file

@ -23,7 +23,6 @@
#include <grub/machine/init.h>
#include <grub/machine/memory.h>
#include <grub/memory.h>
#include <grub/machine/machine.h>
#include <grub/file.h>
#include <grub/err.h>
#include <grub/dl.h>

View file

@ -17,7 +17,6 @@
*/
#include <grub/loader.h>
#include <grub/machine/machine.h>
#include <grub/machine/memory.h>
#include <grub/machine/loader.h>
#include <grub/normal.h>

View file

@ -17,7 +17,6 @@
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <grub/machine/machine.h>
#include <grub/multiboot.h>
#include <grub/multiboot2.h>
#include <multiboot2.h>

View file

@ -524,9 +524,9 @@ static grub_err_t
grub_normal_read_line (char **line, int cont)
{
grub_parser_t parser = grub_parser_get_current ();
char prompt[8 + grub_strlen (parser->name)];
char prompt[sizeof("> ") - 1 + grub_strlen (parser->name)];
grub_sprintf (prompt, "%s:%s> ", parser->name, (cont) ? "" : "grub");
grub_sprintf (prompt, "%s> ", parser->name);
while (1)
{

272
po/ca.po
View file

@ -22,30 +22,10 @@ msgstr ""
msgid "cannot compress the kernel image"
msgstr ""
#: util/i386/pc/grub-mkimage.c:117
#, c-format
msgid "the size of memory disk is 0x%x"
msgstr ""
#: util/i386/pc/grub-mkimage.c:124
#, c-format
msgid "the size of config file is 0x%x"
msgstr ""
#: util/i386/pc/grub-mkimage.c:132
#, c-format
msgid "the total module size is 0x%x"
msgstr ""
#: util/i386/pc/grub-mkimage.c:138
msgid "prefix is too long"
msgstr ""
#: util/i386/pc/grub-mkimage.c:199
#, c-format
msgid "the core size is 0x%x"
msgstr ""
#: util/i386/pc/grub-mkimage.c:206
msgid "the core image is too big"
msgstr ""
@ -89,20 +69,10 @@ msgstr ""
msgid "cannot open %s"
msgstr ""
#: util/i386/pc/grub-setup.c:162
#, c-format
msgid "the first sector is <%llu,%u,%u>"
msgstr ""
#: util/i386/pc/grub-setup.c:166
msgid "The first sector of the core file is not sector-aligned"
msgstr ""
#: util/i386/pc/grub-setup.c:176
#, c-format
msgid "saving <%llu,%u,%u> with the segment 0x%x"
msgstr ""
#: util/i386/pc/grub-setup.c:180
msgid "Non-sector-aligned data is found in the core file"
msgstr ""
@ -126,11 +96,6 @@ msgstr ""
msgid "The size of `%s' is too large"
msgstr ""
#: util/i386/pc/grub-setup.c:247
#, c-format
msgid "setting the root device to `%s'"
msgstr ""
#: util/i386/pc/grub-setup.c:261
#, c-format
msgid "Unable to identify a filesystem in %s; safety check can't be performed"
@ -149,11 +114,6 @@ msgstr ""
msgid "No DOS-style partitions found"
msgstr ""
#: util/i386/pc/grub-setup.c:325
#, c-format
msgid "dos partition is %d, bsd partition is %d"
msgstr ""
#: util/i386/pc/grub-setup.c:330 util/i386/pc/grub-setup.c:355
msgid ""
"Attempting to install GRUB to a partitionless disk. This is a BAD idea."
@ -185,11 +145,6 @@ msgstr ""
msgid "Your embedding area is unusually small. core.img won't fit in it."
msgstr ""
#: util/i386/pc/grub-setup.c:381
#, c-format
msgid "the core image will be embedded at sector 0x%llx"
msgstr ""
#: util/i386/pc/grub-setup.c:418
msgid ""
"Embedding is not possible, but this is required when the root device is on a "
@ -217,30 +172,6 @@ msgstr ""
msgid "attempting to read the core image `%s' from GRUB again"
msgstr ""
#: util/i386/pc/grub-setup.c:449
#, c-format
msgid ""
"succeeded in opening the core image but the size is different (%d != %d)"
msgstr ""
#: util/i386/pc/grub-setup.c:453
#, c-format
msgid "succeeded in opening the core image but cannot read %d bytes"
msgstr ""
#: util/i386/pc/grub-setup.c:476
msgid "succeeded in opening the core image but the data is different"
msgstr ""
#: util/i386/pc/grub-setup.c:487
msgid "couldn't open the core image"
msgstr ""
#: util/i386/pc/grub-setup.c:490
#, c-format
msgid "error message = %s"
msgstr ""
#: util/i386/pc/grub-setup.c:498
#, c-format
msgid "Cannot read `%s' correctly"
@ -258,11 +189,6 @@ msgstr ""
msgid "Failed to read the rest sectors of the core image"
msgstr ""
#: util/i386/pc/grub-setup.c:544
#, c-format
msgid "opening the core image `%s'"
msgstr ""
#: util/i386/pc/grub-setup.c:547
#, c-format
msgid "Cannot open `%s'"
@ -310,11 +236,6 @@ msgstr ""
msgid "Invalid root device `%s'"
msgstr ""
#: util/i386/pc/grub-setup.c:766
#, c-format
msgid "guessing the root device failed, because of `%s'"
msgstr ""
#: util/i386/pc/grub-setup.c:768
msgid "Cannot guess the root device. Specify the option ``--root-device''."
msgstr ""
@ -451,6 +372,199 @@ msgstr ""
msgid "Unexpected joliet directory length %d %d %s\n"
msgstr ""
#: util/mkisofs/mkisofs.c:203
msgid "Process all files (don't skip backup files)"
msgstr ""
#: util/mkisofs/mkisofs.c:205
msgid "Set Abstract filename"
msgstr ""
#: util/mkisofs/mkisofs.c:207
msgid "Set Application ID"
msgstr ""
#: util/mkisofs/mkisofs.c:209
msgid "Set Bibliographic filename"
msgstr ""
#: util/mkisofs/mkisofs.c:211
msgid "Set Copyright filename"
msgstr ""
#: util/mkisofs/mkisofs.c:213
msgid "Set El Torito boot image name"
msgstr ""
#: util/mkisofs/mkisofs.c:215
msgid "Set El Torito boot catalog name"
msgstr ""
#: util/mkisofs/mkisofs.c:217
msgid "Patch Boot Info Table in El Torito boot image"
msgstr ""
#: util/mkisofs/mkisofs.c:219
msgid "Dummy option for backward compatibility"
msgstr ""
#: util/mkisofs/mkisofs.c:221
msgid "Enable floppy drive emulation for El Torito"
msgstr ""
#: util/mkisofs/mkisofs.c:223
msgid "Magic parameters from cdrecord"
msgstr ""
#: util/mkisofs/mkisofs.c:225
msgid "Omit trailing periods from filenames"
msgstr ""
#: util/mkisofs/mkisofs.c:227
msgid "Disable deep directory relocation"
msgstr ""
#: util/mkisofs/mkisofs.c:229
msgid "Follow symbolic links"
msgstr ""
#: util/mkisofs/mkisofs.c:231 util/mkisofs/mkisofs.c:233
msgid "Print option help"
msgstr ""
#: util/mkisofs/mkisofs.c:235
msgid "Print version information and exit"
msgstr ""
#: util/mkisofs/mkisofs.c:237
msgid "Hide ISO9660/RR file"
msgstr ""
#: util/mkisofs/mkisofs.c:239
msgid "Hide Joliet file"
msgstr ""
#: util/mkisofs/mkisofs.c:241
msgid "No longer supported"
msgstr ""
#: util/mkisofs/mkisofs.c:243
msgid "Generate Joliet directory information"
msgstr ""
#: util/mkisofs/mkisofs.c:245
msgid "Allow full 32 character filenames for iso9660 names"
msgstr ""
#: util/mkisofs/mkisofs.c:247
msgid "Allow iso9660 filenames to start with '.'"
msgstr ""
#: util/mkisofs/mkisofs.c:249
msgid "Re-direct messages to LOG_FILE"
msgstr ""
#: util/mkisofs/mkisofs.c:251
msgid "Exclude file name"
msgstr ""
#: util/mkisofs/mkisofs.c:253
msgid "Set path to previous session to merge"
msgstr ""
#: util/mkisofs/mkisofs.c:255
msgid "Omit version number from iso9660 filename"
msgstr ""
#: util/mkisofs/mkisofs.c:257
msgid "Inhibit splitting symlink components"
msgstr ""
#: util/mkisofs/mkisofs.c:259
msgid "Inhibit splitting symlink fields"
msgstr ""
#: util/mkisofs/mkisofs.c:261
msgid "Set output file name"
msgstr ""
#: util/mkisofs/mkisofs.c:263
msgid "Set Volume preparer"
msgstr ""
#: util/mkisofs/mkisofs.c:265
msgid "Print estimated filesystem size and exit"
msgstr ""
#: util/mkisofs/mkisofs.c:267
msgid "Set Volume publisher"
msgstr ""
#: util/mkisofs/mkisofs.c:269
msgid "Run quietly"
msgstr ""
#: util/mkisofs/mkisofs.c:271
msgid "Generate rationalized Rock Ridge directory information"
msgstr ""
#: util/mkisofs/mkisofs.c:273
msgid "Generate Rock Ridge directory information"
msgstr ""
#: util/mkisofs/mkisofs.c:275
msgid "Split output into files of approx. 1GB size"
msgstr ""
#: util/mkisofs/mkisofs.c:277
msgid "Set System ID"
msgstr ""
#: util/mkisofs/mkisofs.c:279
msgid ""
"Generate translation tables for systems that don't understand long filenames"
msgstr ""
#: util/mkisofs/mkisofs.c:281
msgid "Verbose"
msgstr ""
#: util/mkisofs/mkisofs.c:283
msgid "Set Volume ID"
msgstr ""
#: util/mkisofs/mkisofs.c:285
msgid "Set Volume set ID"
msgstr ""
#: util/mkisofs/mkisofs.c:287
msgid "Set Volume set size"
msgstr ""
#: util/mkisofs/mkisofs.c:289
msgid "Set Volume set sequence number"
msgstr ""
#: util/mkisofs/mkisofs.c:291
msgid "Exclude file name (deprecated)"
msgstr ""
#: util/mkisofs/mkisofs.c:297
msgid "Override creation date"
msgstr ""
#: util/mkisofs/mkisofs.c:299
msgid "Override modification date"
msgstr ""
#: util/mkisofs/mkisofs.c:301
msgid "Override expiration date"
msgstr ""
#: util/mkisofs/mkisofs.c:303
msgid "Override effective date"
msgstr ""
#: util/mkisofs/mkisofs.c:373
#, c-format
msgid "Using \"%s\"\n"

View file

@ -42,13 +42,13 @@ grub_normal_parse_line (char *line, grub_reader_getline_t getline)
static struct grub_parser grub_sh_parser =
{
.name = "sh",
.name = "grub",
.parse_line = grub_normal_parse_line
};
GRUB_MOD_INIT(sh)
{
grub_parser_register ("sh", &grub_sh_parser);
grub_parser_register ("grub", &grub_sh_parser);
}
GRUB_MOD_FINI(sh)

View file

@ -16,7 +16,6 @@
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <grub/machine/machine.h>
#include <grub/machine/memory.h>
#include <grub/machine/serial.h>
#include <grub/machine/console.h>

View file

@ -18,7 +18,6 @@
*/
#include <grub/term.h>
#include <grub/machine/machine.h>
#include <grub/machine/console.h>
#include <grub/time.h>
#include <grub/cpu/io.h>

View file

@ -36,8 +36,6 @@
#include <grub/mm.h>
#include <grub/term.h>
#include <grub/time.h>
#include <grub/machine/time.h>
#include <grub/machine/machine.h>
/* Include malloc.h, only if memalign is available. It is known that
memalign is declared in malloc.h in all systems, if present. */

View file

@ -200,107 +200,107 @@ struct ld_option
static const struct ld_option ld_options[] =
{
{ {"all-files", no_argument, NULL, 'a'},
'a', NULL, "Process all files (don't skip backup files)", ONE_DASH },
'a', NULL, N_("Process all files (don't skip backup files)"), ONE_DASH },
{ {"abstract", required_argument, NULL, OPTION_ABSTRACT},
'\0', "FILE", "Set Abstract filename" , ONE_DASH },
'\0', "FILE", N_("Set Abstract filename"), ONE_DASH },
{ {"appid", required_argument, NULL, 'A'},
'A', "ID", "Set Application ID" , ONE_DASH },
'A', "ID", N_("Set Application ID"), ONE_DASH },
{ {"biblio", required_argument, NULL, OPTION_BIBLIO},
'\0', "FILE", "Set Bibliographic filename" , ONE_DASH },
'\0', "FILE", N_("Set Bibliographic filename"), ONE_DASH },
{ {"copyright", required_argument, NULL, OPTION_COPYRIGHT},
'\0', "FILE", "Set Copyright filename" , ONE_DASH },
'\0', "FILE", N_("Set Copyright filename"), ONE_DASH },
{ {"eltorito-boot", required_argument, NULL, 'b'},
'b', "FILE", "Set El Torito boot image name" , ONE_DASH },
'b', "FILE", N_("Set El Torito boot image name"), ONE_DASH },
{ {"eltorito-catalog", required_argument, NULL, 'c'},
'c', "FILE", "Set El Torito boot catalog name" , ONE_DASH },
'c', "FILE", N_("Set El Torito boot catalog name"), ONE_DASH },
{ {"boot-info-table", no_argument, NULL, OPTION_BOOT_INFO_TABLE },
'\0', NULL, "Patch Boot Info Table in El Torito boot image" , ONE_DASH },
'\0', NULL, N_("Patch Boot Info Table in El Torito boot image"), ONE_DASH },
{ {"no-emul-boot", no_argument, NULL, OPTION_NO_EMUL_BOOT },
'\0', NULL, "Dummy option for backward compatibility" , ONE_DASH },
'\0', NULL, N_("Dummy option for backward compatibility"), ONE_DASH },
{ {"eltorito-emul-floppy", no_argument, NULL, OPTION_ELTORITO_EMUL_FLOPPY },
'\0', NULL, "Enable floppy drive emulation for El Torito" , TWO_DASHES },
'\0', NULL, N_("Enable floppy drive emulation for El Torito"), TWO_DASHES },
{ {"cdwrite-params", required_argument, NULL, 'C'},
'C', "PARAMS", "Magic parameters from cdrecord" , ONE_DASH },
'C', "PARAMS", N_("Magic parameters from cdrecord"), ONE_DASH },
{ {"omit-period", no_argument, NULL, 'd'},
'd', NULL, "Omit trailing periods from filenames", ONE_DASH },
'd', NULL, N_("Omit trailing periods from filenames"), ONE_DASH },
{ {"disable-deep-relocation", no_argument, NULL, 'D'},
'D', NULL, "Disable deep directory relocation", ONE_DASH },
'D', NULL, N_("Disable deep directory relocation"), ONE_DASH },
{ {"follow-links", no_argument, NULL, 'f'},
'f', NULL, "Follow symbolic links", ONE_DASH },
'f', NULL, N_("Follow symbolic links"), ONE_DASH },
{ {"help", no_argument, NULL, OPTION_HELP},
'\0', NULL, "Print option help", ONE_DASH },
'\0', NULL, N_("Print option help"), ONE_DASH },
{ {"help", no_argument, NULL, OPTION_HELP},
'\0', NULL, "Print option help", TWO_DASHES },
'\0', NULL, N_("Print option help"), TWO_DASHES },
{ {"version", no_argument, NULL, OPTION_VERSION},
'\0', NULL, "Print version information and exit", TWO_DASHES },
'\0', NULL, N_("Print version information and exit"), TWO_DASHES },
{ {"hide", required_argument, NULL, OPTION_I_HIDE},
'\0', "GLOBFILE", "Hide ISO9660/RR file" , ONE_DASH },
'\0', "GLOBFILE", N_("Hide ISO9660/RR file"), ONE_DASH },
{ {"hide-joliet", required_argument, NULL, OPTION_J_HIDE},
'\0', "GLOBFILE", "Hide Joliet file" , ONE_DASH },
'\0', "GLOBFILE", N_("Hide Joliet file"), ONE_DASH },
{ {NULL, required_argument, NULL, 'i'},
'i', "ADD_FILES", "No longer supported" , TWO_DASHES },
'i', "ADD_FILES", N_("No longer supported"), TWO_DASHES },
{ {"joliet", no_argument, NULL, 'J'},
'J', NULL, "Generate Joliet directory information", ONE_DASH },
'J', NULL, N_("Generate Joliet directory information"), ONE_DASH },
{ {"full-iso9660-filenames", no_argument, NULL, 'l'},
'l', NULL, "Allow full 32 character filenames for iso9660 names", ONE_DASH },
'l', NULL, N_("Allow full 32 character filenames for iso9660 names"), ONE_DASH },
{ {"allow-leading-dots", no_argument, NULL, 'L'},
'L', NULL, "Allow iso9660 filenames to start with '.'", ONE_DASH },
'L', NULL, N_("Allow iso9660 filenames to start with '.'"), ONE_DASH },
{ {"log-file", required_argument, NULL, OPTION_LOG_FILE},
'\0', "LOG_FILE", "Re-direct messages to LOG_FILE", ONE_DASH },
'\0', "LOG_FILE", N_("Re-direct messages to LOG_FILE"), ONE_DASH },
{ {"exclude", required_argument, NULL, 'm'},
'm', "GLOBFILE", "Exclude file name" , ONE_DASH },
'm', "GLOBFILE", N_("Exclude file name"), ONE_DASH },
{ {"prev-session", required_argument, NULL, 'M'},
'M', "FILE", "Set path to previous session to merge" , ONE_DASH },
'M', "FILE", N_("Set path to previous session to merge"), ONE_DASH },
{ {"omit-version-number", no_argument, NULL, 'N'},
'N', NULL, "Omit version number from iso9660 filename", ONE_DASH },
'N', NULL, N_("Omit version number from iso9660 filename"), ONE_DASH },
{ {"no-split-symlink-components", no_argument, NULL, 0},
0, NULL, "Inhibit splitting symlink components" , ONE_DASH },
0, NULL, N_("Inhibit splitting symlink components"), ONE_DASH },
{ {"no-split-symlink-fields", no_argument, NULL, 0},
0, NULL, "Inhibit splitting symlink fields" , ONE_DASH },
0, NULL, N_("Inhibit splitting symlink fields"), ONE_DASH },
{ {"output", required_argument, NULL, 'o'},
'o', "FILE", "Set output file name" , ONE_DASH },
'o', "FILE", N_("Set output file name"), ONE_DASH },
{ {"preparer", required_argument, NULL, 'p'},
'p', "PREP", "Set Volume preparer" , ONE_DASH },
'p', "PREP", N_("Set Volume preparer"), ONE_DASH },
{ {"print-size", no_argument, NULL, OPTION_PRINT_SIZE},
'\0', NULL, "Print estimated filesystem size and exit", ONE_DASH },
'\0', NULL, N_("Print estimated filesystem size and exit"), ONE_DASH },
{ {"publisher", required_argument, NULL, 'P'},
'P', "PUB", "Set Volume publisher" , ONE_DASH },
'P', "PUB", N_("Set Volume publisher"), ONE_DASH },
{ {"quiet", no_argument, NULL, OPTION_QUIET},
'\0', NULL, "Run quietly", ONE_DASH },
'\0', NULL, N_("Run quietly"), ONE_DASH },
{ {"rational-rock", no_argument, NULL, 'r'},
'r', NULL, "Generate rationalized Rock Ridge directory information", ONE_DASH },
'r', NULL, N_("Generate rationalized Rock Ridge directory information"), ONE_DASH },
{ {"rock", no_argument, NULL, 'R'},
'R', NULL, "Generate Rock Ridge directory information", ONE_DASH },
'R', NULL, N_("Generate Rock Ridge directory information"), ONE_DASH },
{ {"split-output", no_argument, NULL, OPTION_SPLIT_OUTPUT},
'\0', NULL, "Split output into files of approx. 1GB size", ONE_DASH },
'\0', NULL, N_("Split output into files of approx. 1GB size"), ONE_DASH },
{ {"sysid", required_argument, NULL, OPTION_SYSID},
'\0', "ID", "Set System ID" , ONE_DASH },
'\0', "ID", N_("Set System ID"), ONE_DASH },
{ {"translation-table", no_argument, NULL, 'T'},
'T', NULL, "Generate translation tables for systems that don't understand long filenames", ONE_DASH },
'T', NULL, N_("Generate translation tables for systems that don't understand long filenames"), ONE_DASH },
{ {"verbose", no_argument, NULL, 'v'},
'v', NULL, "Verbose", ONE_DASH },
'v', NULL, N_("Verbose"), ONE_DASH },
{ {"volid", required_argument, NULL, 'V'},
'V', "ID", "Set Volume ID" , ONE_DASH },
'V', "ID", N_("Set Volume ID"), ONE_DASH },
{ {"volset", required_argument, NULL, OPTION_VOLSET},
'\0', "ID", "Set Volume set ID" , ONE_DASH },
'\0', "ID", N_("Set Volume set ID"), ONE_DASH },
{ {"volset-size", required_argument, NULL, OPTION_VOLSET_SIZE},
'\0', "#", "Set Volume set size" , ONE_DASH },
'\0', "#", N_("Set Volume set size"), ONE_DASH },
{ {"volset-seqno", required_argument, NULL, OPTION_VOLSET_SEQ_NUM},
'\0', "#", "Set Volume set sequence number" , ONE_DASH },
'\0', "#", N_("Set Volume set sequence number"), ONE_DASH },
{ {"old-exclude", required_argument, NULL, 'x'},
'x', "FILE", "Exclude file name(depreciated)" , ONE_DASH },
'x', "FILE", N_("Exclude file name (deprecated)"), ONE_DASH },
#ifdef ERIC_neverdef
{ {"transparent-compression", no_argument, NULL, 'z'},
'z', NULL, "Enable transparent compression of files", ONE_DASH },
#endif
{ {"creation-date", required_argument, NULL, OPTION_CREAT_DATE },
'\0', NULL, "Override creation date", TWO_DASHES },
'\0', NULL, N_("Override creation date"), TWO_DASHES },
{ {"modification-date", required_argument, NULL, OPTION_MODIF_DATE },
'\0', NULL, "Override modification date", TWO_DASHES },
'\0', NULL, N_("Override modification date"), TWO_DASHES },
{ {"expiration-date", required_argument, NULL, OPTION_EXPIR_DATE },
'\0', NULL, "Override expiration date", TWO_DASHES },
'\0', NULL, N_("Override expiration date"), TWO_DASHES },
{ {"effective-date", required_argument, NULL, OPTION_EFFEC_DATE },
'\0', NULL, "Override effective date", TWO_DASHES },
'\0', NULL, N_("Override effective date"), TWO_DASHES },
};
#define OPTION_COUNT (sizeof ld_options / sizeof ld_options[0])
@ -545,7 +545,7 @@ void usage(){
for (; len < 30; len++)
putchar (' ');
printf ("%s\n", ld_options[i].doc);
printf ("%s\n", gettext (ld_options[i].doc));
}
}
exit(1);

View file

@ -33,6 +33,7 @@
#include <locale.h>
#include <libintl.h>
#define _(str) gettext(str)
#define N_(str) str
/* This symbol is used to indicate that we do not have things like
symlinks, devices, and so forth available. Just files and dirs */

337
video/efi_fb.c Normal file
View file

@ -0,0 +1,337 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#define grub_video_render_target grub_video_fbrender_target
#include <grub/err.h>
#include <grub/types.h>
#include <grub/dl.h>
#include <grub/misc.h>
#include <grub/mm.h>
#include <grub/video.h>
#include <grub/video_fb.h>
#include <grub/efi/api.h>
#include <grub/efi/efi.h>
#include <grub/efi/uga_draw.h>
#include <grub/pci.h>
static grub_efi_guid_t uga_draw_guid = GRUB_EFI_UGA_DRAW_GUID;
static struct grub_efi_uga_draw_protocol *uga;
static grub_uint32_t uga_fb;
static grub_uint32_t uga_pitch;
static struct
{
struct grub_video_mode_info mode_info;
struct grub_video_render_target *render_target;
grub_uint8_t *ptr;
} framebuffer;
#define RGB_MASK 0xffffff
#define RGB_MAGIC 0x121314
#define LINE_MIN 800
#define LINE_MAX 4096
#define FBTEST_STEP (0x10000 >> 2)
#define FBTEST_COUNT 8
static int
find_line_len (grub_uint32_t *fb_base, grub_uint32_t *line_len)
{
grub_uint32_t *base = (grub_uint32_t *) (grub_target_addr_t) *fb_base;
int i;
for (i = 0; i < FBTEST_COUNT; i++, base += FBTEST_STEP)
{
if ((*base & RGB_MASK) == RGB_MAGIC)
{
int j;
for (j = LINE_MIN; j <= LINE_MAX; j++)
{
if ((base[j] & RGB_MASK) == RGB_MAGIC)
{
*fb_base = (grub_uint32_t) (grub_target_addr_t) base;
*line_len = j << 2;
return 1;
}
}
break;
}
}
return 0;
}
static int
find_framebuf (grub_uint32_t *fb_base, grub_uint32_t *line_len)
{
int found = 0;
auto int NESTED_FUNC_ATTR find_card (int bus, int dev, int func,
grub_pci_id_t pciid);
int NESTED_FUNC_ATTR find_card (int bus, int dev, int func,
grub_pci_id_t pciid)
{
grub_pci_address_t addr;
addr = grub_pci_make_address (bus, dev, func, 2);
if (grub_pci_read (addr) >> 24 == 0x3)
{
int i;
grub_dprintf ("fb", "Display controller: %d:%d.%d\nDevice id: %x\n",
bus, dev, func, pciid);
addr += 8;
for (i = 0; i < 6; i++, addr += 4)
{
grub_uint32_t old_bar1, old_bar2, type;
grub_uint64_t base64;
old_bar1 = grub_pci_read (addr);
if ((! old_bar1) || (old_bar1 & GRUB_PCI_ADDR_SPACE_IO))
continue;
type = old_bar1 & GRUB_PCI_ADDR_MEM_TYPE_MASK;
if (type == GRUB_PCI_ADDR_MEM_TYPE_64)
{
if (i == 5)
break;
old_bar2 = grub_pci_read (addr + 4);
}
else
old_bar2 = 0;
base64 = old_bar2;
base64 <<= 32;
base64 |= (old_bar1 & GRUB_PCI_ADDR_MEM_MASK);
grub_dprintf ("fb", "%s(%d): 0x%llx\n",
((old_bar1 & GRUB_PCI_ADDR_MEM_PREFETCH) ?
"VMEM" : "MMIO"), i,
(unsigned long long) base64);
if ((old_bar1 & GRUB_PCI_ADDR_MEM_PREFETCH) && (! found))
{
*fb_base = base64;
if (find_line_len (fb_base, line_len))
found++;
}
if (type == GRUB_PCI_ADDR_MEM_TYPE_64)
{
i++;
addr += 4;
}
}
}
return found;
}
grub_pci_iterate (find_card);
return found;
}
static int
check_protocol (void)
{
grub_efi_uga_draw_protocol_t *c;
c = grub_efi_locate_protocol (&uga_draw_guid, 0);
if (c)
{
grub_uint32_t width, height, depth, rate, pixel;
int ret;
if (efi_call_5 (c->get_mode, c, &width, &height, &depth, &rate))
return 0;
grub_efi_set_text_mode (0);
pixel = RGB_MAGIC;
efi_call_10 (c->blt, c, (struct grub_efi_uga_pixel *) &pixel,
GRUB_EFI_UGA_VIDEO_FILL, 0, 0, 0, 0, 1, height, 0);
ret = find_framebuf (&uga_fb, &uga_pitch);
grub_efi_set_text_mode (1);
if (ret)
{
uga = c;
return 1;
}
}
return 0;
}
static grub_err_t
grub_video_efi_init (void)
{
grub_memset (&framebuffer, 0, sizeof(framebuffer));
return grub_video_fb_init ();
}
static grub_err_t
grub_video_efi_fini (void)
{
return grub_video_fb_fini ();
}
static grub_err_t
grub_video_efi_setup (unsigned int width, unsigned int height,
unsigned int mode_type)
{
unsigned int depth;
int found = 0;
depth = (mode_type & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
>> GRUB_VIDEO_MODE_TYPE_DEPTH_POS;
{
grub_uint32_t w;
grub_uint32_t h;
grub_uint32_t d;
grub_uint32_t r;
if ((! efi_call_5 (uga->get_mode, uga, &w, &h, &d, &r)) &&
((! width) || (width == w)) &&
((! height) || (height == h)) &&
((! depth) || (depth == d)))
{
framebuffer.mode_info.width = w;
framebuffer.mode_info.height = h;
framebuffer.mode_info.pitch = uga_pitch;
framebuffer.ptr = (grub_uint8_t *) (grub_target_addr_t) uga_fb;
found = 1;
}
}
if (found)
{
grub_err_t err;
framebuffer.mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_RGB;
framebuffer.mode_info.bpp = 32;
framebuffer.mode_info.bytes_per_pixel = 4;
framebuffer.mode_info.number_of_colors = 256; /* TODO: fix me. */
framebuffer.mode_info.red_mask_size = 8;
framebuffer.mode_info.red_field_pos = 16;
framebuffer.mode_info.green_mask_size = 8;
framebuffer.mode_info.green_field_pos = 8;
framebuffer.mode_info.blue_mask_size = 8;
framebuffer.mode_info.blue_field_pos = 0;
framebuffer.mode_info.reserved_mask_size = 8;
framebuffer.mode_info.reserved_field_pos = 24;
framebuffer.mode_info.blit_format =
grub_video_get_blit_format (&framebuffer.mode_info);
err = grub_video_fb_create_render_target_from_pointer
(&framebuffer.render_target,
&framebuffer.mode_info,
framebuffer.ptr);
if (err)
return err;
err = grub_video_fb_set_active_render_target
(framebuffer.render_target);
if (err)
return err;
err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
grub_video_fbstd_colors);
return err;
}
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found.");
}
static grub_err_t
grub_video_efi_swap_buffers (void)
{
/* TODO: Implement buffer swapping. */
return GRUB_ERR_NONE;
}
static grub_err_t
grub_video_efi_set_active_render_target (struct grub_video_render_target *target)
{
if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY)
target = framebuffer.render_target;
return grub_video_fb_set_active_render_target (target);
}
static grub_err_t
grub_video_efi_get_info_and_fini (struct grub_video_mode_info *mode_info,
void **framebuf)
{
grub_memcpy (mode_info, &(framebuffer.mode_info), sizeof (*mode_info));
*framebuf = (char *) framebuffer.ptr;
grub_video_fb_fini ();
return GRUB_ERR_NONE;
}
static struct grub_video_adapter grub_video_efi_adapter =
{
.name = "EFI frame buffer driver",
.init = grub_video_efi_init,
.fini = grub_video_efi_fini,
.setup = grub_video_efi_setup,
.get_info = grub_video_fb_get_info,
.get_info_and_fini = grub_video_efi_get_info_and_fini,
.set_palette = grub_video_fb_set_palette,
.get_palette = grub_video_fb_get_palette,
.set_viewport = grub_video_fb_set_viewport,
.get_viewport = grub_video_fb_get_viewport,
.map_color = grub_video_fb_map_color,
.map_rgb = grub_video_fb_map_rgb,
.map_rgba = grub_video_fb_map_rgba,
.unmap_color = grub_video_fb_unmap_color,
.fill_rect = grub_video_fb_fill_rect,
.blit_bitmap = grub_video_fb_blit_bitmap,
.blit_render_target = grub_video_fb_blit_render_target,
.scroll = grub_video_fb_scroll,
.swap_buffers = grub_video_efi_swap_buffers,
.create_render_target = grub_video_fb_create_render_target,
.delete_render_target = grub_video_fb_delete_render_target,
.set_active_render_target = grub_video_efi_set_active_render_target,
.get_active_render_target = grub_video_fb_get_active_render_target,
};
GRUB_MOD_INIT(efi_fb)
{
if (check_protocol ())
grub_video_register (&grub_video_efi_adapter);
}
GRUB_MOD_FINI(efi_fb)
{
if (uga)
grub_video_unregister (&grub_video_efi_adapter);
}