merged mainstream into gfxmenu
This commit is contained in:
commit
3dcf83ba7d
69 changed files with 2657 additions and 857 deletions
|
@ -13,6 +13,7 @@ config.log
|
||||||
config.status
|
config.status
|
||||||
configure
|
configure
|
||||||
conf/*.mk
|
conf/*.mk
|
||||||
|
conf/gcry.rmk
|
||||||
*.d
|
*.d
|
||||||
DISTLIST
|
DISTLIST
|
||||||
docs/*.info
|
docs/*.info
|
||||||
|
@ -44,6 +45,7 @@ grub_setup_init.h
|
||||||
*.img
|
*.img
|
||||||
include/grub/cpu
|
include/grub/cpu
|
||||||
include/grub/machine
|
include/grub/machine
|
||||||
|
lib/libgcrypt-grub
|
||||||
*.lst
|
*.lst
|
||||||
Makefile
|
Makefile
|
||||||
*.mod
|
*.mod
|
||||||
|
|
196
ChangeLog
196
ChangeLog
|
@ -1,3 +1,199 @@
|
||||||
|
2009-11-23 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* po/id.po: New file.
|
||||||
|
* LINGUAS: Add `id'.
|
||||||
|
|
||||||
|
2009-11-23 Carles Pina i Estany <carles@pina.cat>
|
||||||
|
|
||||||
|
* conf/common.rmk: Add grub-gettext_lib target and updates
|
||||||
|
lib_DATA and CLEANFILES. Adds gettext.mod SOURCES, CFLAGS,
|
||||||
|
LDFLAGS.
|
||||||
|
* gettext/gettext.c: New file. (Reads mo files).
|
||||||
|
* include/grub/file.h (grub_file_pread): New prototype.
|
||||||
|
* include/grub/i18n.h (_): New prototype.
|
||||||
|
* include/grub/misc.h (grub_gettext_dummy, grub_gettext): New
|
||||||
|
prototypes.
|
||||||
|
* kern/misc.c (grub_gettext_dummy): New function.
|
||||||
|
* normal/menu_text.c: Include <grub/i18n.h>.
|
||||||
|
* normal/menu_text.c (print_timeout): Gettexttize string.
|
||||||
|
* normal/menu_text.c (print_message): Gettexttize string.
|
||||||
|
* po/POTFILES: Add `normal/menu_text.c'.
|
||||||
|
* po/ca.po: Add new translations.
|
||||||
|
* util/grub.d/00_header.in: Define locale_dir and lang. insmod
|
||||||
|
gettext module and defines locale_dir and lang in grub.cfg.
|
||||||
|
* NEWS: Add gettext support.
|
||||||
|
|
||||||
|
2009-11-23 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* util/hostdisk.c: Include `<grub/i18n.h>'.
|
||||||
|
(find_grub_drive): Use ARRAY_SIZE for map size calculation.
|
||||||
|
(make_device_name): Rewrite using asprintf.
|
||||||
|
(convert_system_partition_to_system_disk): Replace 0 with NULL.
|
||||||
|
(find_system_device): If a device is not found, generate one just
|
||||||
|
by reusing the OS path name.
|
||||||
|
(read_device_map): Make it permissible for device.map not to exist.
|
||||||
|
|
||||||
|
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.
|
||||||
|
* util/i386/pc/grub-setup.c: Likewise.
|
||||||
|
|
||||||
|
2009-11-21 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
|
* util/getroot.c [__GNU__]: Include <hurd.h>, <hurd/lookup.h>, and
|
||||||
|
<hurd/fs.h>
|
||||||
|
[__GNU__] (grub_guess_root_device): Call file_name_lookup and
|
||||||
|
file_get_storage_info to implement grub_guess_root_device.
|
||||||
|
|
||||||
|
2009-11-21 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* Makefile.in (target): Use make's builtin $(shell) function
|
||||||
|
instead of calling directly $(SHELL) to create the locale directories,
|
||||||
|
inside the $(foreach) function.
|
||||||
|
|
||||||
|
2009-11-21 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Print an error and usage if output option
|
||||||
|
has not been given.
|
||||||
|
|
||||||
|
2009-11-21 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
Patch from Loïc Minier <loic.minier@ubuntu.com>.
|
||||||
|
* util/grub.d/30_os-prober.in: Cope with Linux entries where
|
||||||
|
root and /boot are on different devices.
|
||||||
|
|
||||||
|
2009-11-21 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Fix build for srcdir != objdir.
|
||||||
|
|
||||||
|
* Makefile.in (po/$(PACKAGE).pot): Rename to ...
|
||||||
|
($(srcdir)/po/$(PACKAGE).pot): ... this. Run $(XGETTEXT) from
|
||||||
|
$(srcdir).
|
||||||
|
($(foreach lang, $(LINGUAS), po/$(lang).po)): Rename to ...
|
||||||
|
($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): ... this. Use $^
|
||||||
|
reference for input.
|
||||||
|
|
||||||
|
2009-11-21 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Use source directory direcly (without copiing
|
||||||
|
or hardlinking it). Remove -J option, Joliet is not compatible with
|
||||||
|
multiple source directories.
|
||||||
|
|
||||||
|
2009-11-21 Carles Pina i Estany <carles@pina.cat>
|
||||||
|
2009-11-21 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Recognize `--override-directory' option.
|
||||||
|
(process_input_dir): New function. Process an arbitrary input
|
||||||
|
directory.
|
||||||
|
Misc adjustments to support both "override mode" and system-wide mode.
|
||||||
|
|
||||||
|
2009-11-20 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* configure.ac (UNIFONT_BDF): Rename to ...
|
||||||
|
(FONT_SOURCE): ... this. Update all users.
|
||||||
|
|
||||||
|
2009-11-20 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* configure.ac: Add `/usr/share/fonts/X11/misc/unifont.pcf.gz'
|
||||||
|
to the list of unifont files to look for.
|
||||||
|
|
||||||
2009-11-19 Robert Millan <rmh.grub@aybabtu.com>
|
2009-11-19 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
Patch from Joe Auricchio <jauricchio@gmail.com>
|
Patch from Joe Auricchio <jauricchio@gmail.com>
|
||||||
|
|
29
Makefile.in
29
Makefile.in
|
@ -109,10 +109,9 @@ LIBCURSES = @LIBCURSES@
|
||||||
LIBUSB = @LIBUSB@
|
LIBUSB = @LIBUSB@
|
||||||
LIBSDL = @LIBSDL@
|
LIBSDL = @LIBSDL@
|
||||||
YACC = @YACC@
|
YACC = @YACC@
|
||||||
UNIFONT_BDF = @UNIFONT_BDF@
|
FONT_SOURCE = @FONT_SOURCE@
|
||||||
|
|
||||||
# Options.
|
# Options.
|
||||||
enable_grub_emu = @enable_grub_emu@
|
|
||||||
enable_grub_emu_usb = @enable_grub_emu_usb@
|
enable_grub_emu_usb = @enable_grub_emu_usb@
|
||||||
enable_grub_emu_sdl = @enable_grub_emu_sdl@
|
enable_grub_emu_sdl = @enable_grub_emu_sdl@
|
||||||
enable_grub_fstest = @enable_grub_fstest@
|
enable_grub_fstest = @enable_grub_fstest@
|
||||||
|
@ -155,7 +154,11 @@ $(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
|
||||||
$(RUBY) $(srcdir)/genmk.rb < $< > $@; \
|
$(RUBY) $(srcdir)/genmk.rb < $< > $@; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ifeq ($(platform), emu)
|
||||||
|
include $(srcdir)/conf/any-emu.mk
|
||||||
|
else
|
||||||
include $(srcdir)/conf/$(target_cpu)-$(platform).mk
|
include $(srcdir)/conf/$(target_cpu)-$(platform).mk
|
||||||
|
endif
|
||||||
|
|
||||||
# For external modules.
|
# For external modules.
|
||||||
-include $(wildcard $(GRUB_CONTRIB)/*/conf/common.mk)
|
-include $(wildcard $(GRUB_CONTRIB)/*/conf/common.mk)
|
||||||
|
@ -209,7 +212,7 @@ docs/grub.info: docs/grub.texi docs/version.texi docs/fdl.texi
|
||||||
$(MKDIR_P) docs
|
$(MKDIR_P) docs
|
||||||
-$(MAKEINFO) -P $(builddir)/docs --no-split --force $< -o $@
|
-$(MAKEINFO) -P $(builddir)/docs --no-split --force $< -o $@
|
||||||
|
|
||||||
ifeq (, $(UNIFONT_BDF))
|
ifeq (, $(FONT_SOURCE))
|
||||||
else
|
else
|
||||||
|
|
||||||
ifeq ($(enable_grub_mkfont),yes)
|
ifeq ($(enable_grub_mkfont),yes)
|
||||||
|
@ -220,11 +223,11 @@ pkgdata_DATA += unicode.pf2 ascii.pf2
|
||||||
UNICODE_ARROWS=0x2190-0x2193
|
UNICODE_ARROWS=0x2190-0x2193
|
||||||
UNICODE_LINES=0x2501-0x251B
|
UNICODE_LINES=0x2501-0x251B
|
||||||
|
|
||||||
unicode.pf2: $(UNIFONT_BDF) grub-mkfont
|
unicode.pf2: $(FONT_SOURCE) grub-mkfont
|
||||||
$(builddir)/grub-mkfont -o $@ $(UNIFONT_BDF)
|
$(builddir)/grub-mkfont -o $@ $(FONT_SOURCE)
|
||||||
|
|
||||||
ascii.pf2: $(UNIFONT_BDF) grub-mkfont
|
ascii.pf2: $(FONT_SOURCE) grub-mkfont
|
||||||
$(builddir)/grub-mkfont -o $@ $(UNIFONT_BDF) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES)
|
$(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -311,7 +314,7 @@ install-local: all
|
||||||
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
|
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
|
||||||
done
|
done
|
||||||
$(foreach lang, $(LINGUAS), \
|
$(foreach lang, $(LINGUAS), \
|
||||||
$(SHELL) $(mkinstalldirs) $(DESTDIR)/$(datadir)/locale/$(lang)/LC_MESSAGES \
|
$(shell $(mkinstalldirs) $(DESTDIR)/$(datadir)/locale/$(lang)/LC_MESSAGES) \
|
||||||
@list='po/$(lang).mo'; \
|
@list='po/$(lang).mo'; \
|
||||||
for file in $$list; do \
|
for file in $$list; do \
|
||||||
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
|
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
|
||||||
|
@ -474,12 +477,12 @@ gensymlist.sh: gensymlist.sh.in config.status
|
||||||
genkernsyms.sh: genkernsyms.sh.in config.status
|
genkernsyms.sh: genkernsyms.sh.in config.status
|
||||||
$(SHELL) ./config.status
|
$(SHELL) ./config.status
|
||||||
|
|
||||||
po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell
|
$(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell
|
||||||
$(XGETTEXT) --from-code=utf-8 -o $@ -f $< --keyword=_
|
cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f $< --keyword=_ --keyword=N_
|
||||||
$(XGETTEXT) --from-code=utf-8 -o $@ -f po/POTFILES-shell -j --language=Shell
|
cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f po/POTFILES-shell -j --language=Shell
|
||||||
|
|
||||||
$(foreach lang, $(LINGUAS), po/$(lang).po): po/$(PACKAGE).pot
|
$(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): po/$(PACKAGE).pot
|
||||||
$(MSGMERGE) -U $@ po/$(PACKAGE).pot
|
$(MSGMERGE) -U $@ $^
|
||||||
|
|
||||||
po/%.mo: po/%.po
|
po/%.mo: po/%.po
|
||||||
$(MKDIR_P) $$(dirname $@)
|
$(MKDIR_P) $$(dirname $@)
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -1,5 +1,7 @@
|
||||||
New in 1.97 - :
|
New in 1.97 - :
|
||||||
|
|
||||||
|
* Add support for gettext.
|
||||||
|
|
||||||
* Add support for loading XNU (MacOS X kernel).
|
* Add support for loading XNU (MacOS X kernel).
|
||||||
|
|
||||||
* ACPI override support.
|
* ACPI override support.
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include <grub/gzio.h>
|
#include <grub/gzio.h>
|
||||||
#include <grub/acpi.h>
|
#include <grub/acpi.h>
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
#include <grub/machine/memory.h>
|
#include <grub/machine/memory.h>
|
||||||
#include <grub/memory.h>
|
#include <grub/memory.h>
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
|
|
||||||
#if defined(GRUB_MACHINE_IEEE1275)
|
#if defined(GRUB_MACHINE_IEEE1275)
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
|
|
||||||
#if defined(GRUB_MACHINE_IEEE1275)
|
#if defined(GRUB_MACHINE_IEEE1275)
|
||||||
|
|
100
conf/any-emu.rmk
Normal file
100
conf/any-emu.rmk
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
# -*- 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 \
|
||||||
|
\
|
||||||
|
video/video.c video/fb/video_fb.c video/fb/fbblit.c \
|
||||||
|
video/fb/fbfill.c video/fb/fbutil.c commands/videotest.c \
|
||||||
|
video/bitmap.c video/bitmap_scale.c video/readers/tga.c \
|
||||||
|
video/readers/jpeg.c video/readers/png.c font/font_cmd.c \
|
||||||
|
font/font.c term/gfxterm.c io/bufio.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
|
||||||
|
|
||||||
|
ifeq ($(enable_grub_emu_sdl), yes)
|
||||||
|
grub_emu_SOURCES += util/sdl.c
|
||||||
|
grub_emu_LDFLAGS += $(LIBSDL)
|
||||||
|
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
|
|
@ -72,23 +72,10 @@ grub_mkfont_LDFLAGS = $(freetype_libs)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# For the parser.
|
# For the parser.
|
||||||
grub_script.tab.c grub_script.tab.h: 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/sh/parser.y
|
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/parser.y
|
||||||
DISTCLEANFILES += grub_script.tab.c grub_script.tab.h
|
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.
|
# For grub-probe.
|
||||||
grub_probe_init.lst: geninit.sh $(filter-out grub_probe_init.c,$(grub_probe_SOURCES))
|
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 > $@
|
rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
|
||||||
|
@ -163,6 +150,12 @@ update-grub_lib: util/update-grub_lib.in config.status
|
||||||
lib_SCRIPTS += update-grub_lib
|
lib_SCRIPTS += update-grub_lib
|
||||||
CLEANFILES += update-grub_lib
|
CLEANFILES += update-grub_lib
|
||||||
|
|
||||||
|
grub-gettext_lib: util/grub-gettext_lib.in config.status
|
||||||
|
./config.status --file=$@:$<
|
||||||
|
chmod +x $@
|
||||||
|
lib_DATA += grub-gettext_lib
|
||||||
|
CLEANFILES += grub-gettext_lib
|
||||||
|
|
||||||
%: util/grub.d/%.in config.status
|
%: util/grub.d/%.in config.status
|
||||||
./config.status --file=$@:$<
|
./config.status --file=$@:$<
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
@ -574,8 +567,8 @@ normal_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For sh.mod.
|
# For sh.mod.
|
||||||
sh_mod_SOURCES = script/sh/main.c script/sh/script.c script/sh/execute.c \
|
sh_mod_SOURCES = script/main.c script/script.c script/execute.c \
|
||||||
script/sh/function.c script/sh/lexer.c grub_script.tab.c
|
script/function.c script/lexer.c grub_script.tab.c
|
||||||
sh_mod_CFLAGS = $(COMMON_CFLAGS)
|
sh_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
sh_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
sh_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
@ -652,6 +645,12 @@ bufio_mod_SOURCES = io/bufio.c
|
||||||
bufio_mod_CFLAGS = $(COMMON_CFLAGS)
|
bufio_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
bufio_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
bufio_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For gettext.mod.
|
||||||
|
pkglib_MODULES += gettext.mod
|
||||||
|
gettext_mod_SOURCES = gettext/gettext.c
|
||||||
|
gettext_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
gettext_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# Misc.
|
# Misc.
|
||||||
pkglib_MODULES += xnu_uuid.mod
|
pkglib_MODULES += xnu_uuid.mod
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
|
||||||
COMMON_LDFLAGS = -m32 -nostdlib
|
COMMON_LDFLAGS = -m32 -nostdlib
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
# 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.
|
# Images.
|
||||||
|
|
||||||
|
@ -95,60 +95,11 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
|
||||||
|
|
||||||
# Utilities.
|
# Utilities.
|
||||||
sbin_UTILITIES = grub-mkdevicemap
|
sbin_UTILITIES = grub-mkdevicemap
|
||||||
ifeq ($(enable_grub_emu), yes)
|
|
||||||
sbin_UTILITIES += grub-emu
|
|
||||||
endif
|
|
||||||
|
|
||||||
# For grub-mkdevicemap.
|
# For grub-mkdevicemap.
|
||||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
||||||
util/devicemap.c util/misc.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
|
sbin_SCRIPTS += grub-install
|
||||||
grub_install_SOURCES = util/grub-install.in
|
grub_install_SOURCES = util/grub-install.in
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,11 @@ COMMON_CFLAGS = -fno-builtin -m32
|
||||||
COMMON_LDFLAGS = -melf_i386 -nostdlib
|
COMMON_LDFLAGS = -melf_i386 -nostdlib
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
# 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.
|
# Utilities.
|
||||||
bin_UTILITIES = grub-mkimage
|
bin_UTILITIES = grub-mkimage
|
||||||
sbin_UTILITIES = grub-mkdevicemap
|
sbin_UTILITIES = grub-mkdevicemap
|
||||||
#ifeq ($(enable_grub_emu), yes)
|
|
||||||
#sbin_UTILITIES += grub-emu
|
|
||||||
#endif
|
|
||||||
|
|
||||||
# For grub-mkimage.
|
# For grub-mkimage.
|
||||||
grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
|
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 \
|
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
||||||
util/devicemap.c util/misc.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.
|
# Scripts.
|
||||||
sbin_SCRIPTS = grub-install
|
sbin_SCRIPTS = grub-install
|
||||||
|
|
||||||
|
@ -196,6 +148,11 @@ fixvideo_mod_SOURCES = commands/efi/fixvideo.c
|
||||||
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
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
|
pkglib_MODULES += xnu.mod
|
||||||
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c\
|
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
|
loader/macho.c loader/xnu.c loader/i386/xnu_helper.S
|
||||||
|
|
|
@ -5,7 +5,7 @@ COMMON_CFLAGS = -ffreestanding -mrtd -mregparm=3
|
||||||
COMMON_LDFLAGS = -nostdlib
|
COMMON_LDFLAGS = -nostdlib
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
# 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.
|
# Images.
|
||||||
pkglib_PROGRAMS = kernel.img
|
pkglib_PROGRAMS = kernel.img
|
||||||
|
@ -49,59 +49,11 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
|
||||||
|
|
||||||
# Utilities.
|
# Utilities.
|
||||||
sbin_UTILITIES = grub-mkdevicemap
|
sbin_UTILITIES = grub-mkdevicemap
|
||||||
ifeq ($(enable_grub_emu), yes)
|
|
||||||
sbin_UTILITIES += grub-emu
|
|
||||||
endif
|
|
||||||
|
|
||||||
# For grub-mkdevicemap.
|
# For grub-mkdevicemap.
|
||||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
||||||
util/devicemap.c util/misc.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.
|
# Scripts.
|
||||||
sbin_SCRIPTS = grub-install
|
sbin_SCRIPTS = grub-install
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
|
||||||
COMMON_LDFLAGS = -m32 -nostdlib
|
COMMON_LDFLAGS = -m32 -nostdlib
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
# 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.
|
# Images.
|
||||||
pkglib_IMAGES = boot.img cdboot.img diskboot.img kernel.img lnxboot.img \
|
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.
|
# Utilities.
|
||||||
bin_UTILITIES = grub-mkimage
|
bin_UTILITIES = grub-mkimage
|
||||||
sbin_UTILITIES = grub-setup grub-mkdevicemap
|
sbin_UTILITIES = grub-setup grub-mkdevicemap
|
||||||
ifeq ($(enable_grub_emu), yes)
|
|
||||||
sbin_UTILITIES += grub-emu
|
|
||||||
endif
|
|
||||||
|
|
||||||
# For grub-mkimage.
|
# For grub-mkimage.
|
||||||
grub_mkimage_SOURCES = gnulib/progname.c util/i386/pc/grub-mkimage.c util/misc.c \
|
grub_mkimage_SOURCES = gnulib/progname.c util/i386/pc/grub-mkimage.c util/misc.c \
|
||||||
|
@ -116,70 +113,6 @@ grub_setup_SOURCES = gnulib/progname.c \
|
||||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
||||||
util/devicemap.c util/misc.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 \
|
|
||||||
\
|
|
||||||
video/video.c video/fb/video_fb.c video/fb/fbblit.c \
|
|
||||||
video/fb/fbfill.c video/fb/fbutil.c commands/videotest.c \
|
|
||||||
video/bitmap.c video/bitmap_scale.c video/readers/tga.c video/readers/jpeg.c \
|
|
||||||
video/readers/png.c font/font_cmd.c font/font.c term/gfxterm.c \
|
|
||||||
io/bufio.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
|
|
||||||
|
|
||||||
ifeq ($(enable_grub_emu_sdl), yes)
|
|
||||||
grub_emu_SOURCES += util/sdl.c
|
|
||||||
grub_emu_LDFLAGS += $(LIBSDL)
|
|
||||||
endif
|
|
||||||
|
|
||||||
sbin_SCRIPTS += grub-install
|
sbin_SCRIPTS += grub-install
|
||||||
grub_install_SOURCES = util/grub-install.in
|
grub_install_SOURCES = util/grub-install.in
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ COMMON_CFLAGS = -ffreestanding
|
||||||
COMMON_LDFLAGS += -nostdlib
|
COMMON_LDFLAGS += -nostdlib
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
# 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.
|
# Images.
|
||||||
|
|
||||||
|
@ -30,60 +30,11 @@ pkglib_PROGRAMS = kernel.img
|
||||||
|
|
||||||
# Utilities.
|
# Utilities.
|
||||||
sbin_UTILITIES = grub-mkdevicemap
|
sbin_UTILITIES = grub-mkdevicemap
|
||||||
ifeq ($(enable_grub_emu), yes)
|
|
||||||
sbin_UTILITIES += grub-emu
|
|
||||||
endif
|
|
||||||
|
|
||||||
# For grub-mkdevicemap.
|
# For grub-mkdevicemap.
|
||||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
||||||
util/devicemap.c util/misc.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 \
|
kernel_img_SOURCES = kern/powerpc/ieee1275/startup.S kern/ieee1275/cmain.c \
|
||||||
kern/ieee1275/ieee1275.c kern/main.c kern/device.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 \
|
kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c \
|
||||||
|
|
|
@ -6,7 +6,7 @@ COMMON_CFLAGS = -ffreestanding -m64 -mno-app-regs
|
||||||
COMMON_LDFLAGS = -melf64_sparc -nostdlib -mno-relax
|
COMMON_LDFLAGS = -melf64_sparc -nostdlib -mno-relax
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
# 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.
|
# Images.
|
||||||
pkglib_IMAGES = boot.img diskboot.img kernel.img
|
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.
|
# Utilities.
|
||||||
bin_UTILITIES = grub-mkimage
|
bin_UTILITIES = grub-mkimage
|
||||||
sbin_UTILITIES = grub-setup grub-mkdevicemap grub-ofpathname
|
sbin_UTILITIES = grub-setup grub-mkdevicemap grub-ofpathname
|
||||||
ifeq ($(enable_grub_emu), yes)
|
|
||||||
sbin_UTILITIES += grub-emu
|
|
||||||
endif
|
|
||||||
|
|
||||||
# For grub-mkimage.
|
# For grub-mkimage.
|
||||||
grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
|
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 \
|
grub_ofpathname_SOURCES = util/sparc64/ieee1275/grub-ofpathname.c \
|
||||||
util/ieee1275/ofpath.c util/misc.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.
|
# Scripts.
|
||||||
sbin_SCRIPTS = grub-install
|
sbin_SCRIPTS = grub-install
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,11 @@ COMMON_CFLAGS = -fno-builtin -m64
|
||||||
COMMON_LDFLAGS = -melf_x86_64 -nostdlib
|
COMMON_LDFLAGS = -melf_x86_64 -nostdlib
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
# 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.
|
# Utilities.
|
||||||
bin_UTILITIES = grub-mkimage
|
bin_UTILITIES = grub-mkimage
|
||||||
sbin_UTILITIES = grub-mkdevicemap
|
sbin_UTILITIES = grub-mkdevicemap
|
||||||
#ifeq ($(enable_grub_emu), yes)
|
|
||||||
#sbin_UTILITIES += grub-emu
|
|
||||||
#endif
|
|
||||||
|
|
||||||
# For grub-mkimage.
|
# For grub-mkimage.
|
||||||
grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
|
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 \
|
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
||||||
util/devicemap.c util/misc.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.
|
# Scripts.
|
||||||
sbin_SCRIPTS = grub-install
|
sbin_SCRIPTS = grub-install
|
||||||
|
|
||||||
|
@ -201,6 +154,11 @@ fixvideo_mod_SOURCES = commands/efi/fixvideo.c
|
||||||
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
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
|
pkglib_MODULES += xnu.mod
|
||||||
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c\
|
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
|
loader/macho.c loader/xnu.c loader/i386/xnu_helper.S
|
||||||
|
|
62
configure.ac
62
configure.ac
|
@ -91,6 +91,7 @@ case "$target_cpu"-"$platform" in
|
||||||
i386-qemu) ;;
|
i386-qemu) ;;
|
||||||
powerpc-ieee1275) ;;
|
powerpc-ieee1275) ;;
|
||||||
sparc64-ieee1275) ;;
|
sparc64-ieee1275) ;;
|
||||||
|
*-emu) ;;
|
||||||
*) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
|
*) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -113,6 +114,17 @@ case "$host_os" in
|
||||||
cygwin) host_kernel=windows ;;
|
cygwin) host_kernel=windows ;;
|
||||||
esac
|
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_cpu)
|
||||||
AC_SUBST(host_os)
|
AC_SUBST(host_os)
|
||||||
AC_SUBST(host_kernel)
|
AC_SUBST(host_kernel)
|
||||||
|
@ -136,9 +148,9 @@ if test "x$YACC" = x; then
|
||||||
AC_MSG_ERROR([bison is not found])
|
AC_MSG_ERROR([bison is not found])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for file in /usr/src/unifont.bdf ; do
|
for file in /usr/src/unifont.bdf /usr/share/fonts/X11/misc/unifont.pcf.gz ; do
|
||||||
if test -e $file ; then
|
if test -e $file ; then
|
||||||
AC_SUBST([UNIFONT_BDF], [$file])
|
AC_SUBST([FONT_SOURCE], [$file])
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -509,44 +521,32 @@ AC_ARG_ENABLE([mm-debug],
|
||||||
[AC_DEFINE([MM_DEBUG], [1],
|
[AC_DEFINE([MM_DEBUG], [1],
|
||||||
[Define to 1 if you enable memory manager debugging.])])
|
[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],
|
AC_ARG_ENABLE([grub-emu-usb],
|
||||||
[AS_HELP_STRING([--enable-grub-emu-usb],
|
[AS_HELP_STRING([--enable-grub-emu-usb],
|
||||||
[build and install the `grub-emu' debugging utility with USB support (default=guessed)])])
|
[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
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([grub-emu-sdl],
|
AC_ARG_ENABLE([grub-emu-sdl],
|
||||||
[AS_HELP_STRING([--enable-grub-emu-sdl],
|
[AS_HELP_STRING([--enable-grub-emu-sdl],
|
||||||
[build and install the `grub-emu' debugging utility with SDL support (default=guessed)])])
|
[build and install the `grub-emu' debugging utility with SDL support (default=guessed)])])
|
||||||
|
|
||||||
|
if test "$platform" = emu; then
|
||||||
|
missing_ncurses=
|
||||||
[# Check for curses libraries.]
|
[# Check for curses libraries.]
|
||||||
[if [ x"$grub_emu_excuse" = x ]; then ]
|
|
||||||
AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"],
|
AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"],
|
||||||
[AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"],
|
[AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"],
|
||||||
[grub_emu_excuse=["need (n)curses libraries"]])])
|
[missing_ncurses=[true]])])
|
||||||
AC_SUBST([LIBCURSES])
|
AC_SUBST([LIBCURSES])
|
||||||
[fi]
|
[if [ x"$missing_ncurses" = x ]; then ]
|
||||||
[if [ x"$grub_emu_excuse" = x ]; then ]
|
|
||||||
[# Check for headers.]
|
[# Check for headers.]
|
||||||
AC_CHECK_HEADERS([ncurses/curses.h], [],
|
AC_CHECK_HEADERS([ncurses/curses.h], [],
|
||||||
[AC_CHECK_HEADERS([ncurses.h], [],
|
[AC_CHECK_HEADERS([ncurses.h], [],
|
||||||
[AC_CHECK_HEADERS([curses.h], [],
|
[AC_CHECK_HEADERS([curses.h], [],
|
||||||
[grub_emu_excuse=["need (n)curses headers"]])])])
|
[missing_ncurses=[true]])])])
|
||||||
[fi]
|
[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
|
if test x"$enable_grub_emu_usb" = xno ; then
|
||||||
grub_emu_usb_excuse="explicitly disabled"
|
grub_emu_usb_excuse="explicitly disabled"
|
||||||
fi
|
fi
|
||||||
|
@ -570,8 +570,6 @@ else
|
||||||
enable_grub_emu_usb=no
|
enable_grub_emu_usb=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST([enable_grub_emu])
|
|
||||||
|
|
||||||
if test x"$enable_grub_emu_sdl" = xno ; then
|
if test x"$enable_grub_emu_sdl" = xno ; then
|
||||||
grub_emu_sdl_excuse="explicitely disabled"
|
grub_emu_sdl_excuse="explicitely disabled"
|
||||||
fi
|
fi
|
||||||
|
@ -597,6 +595,7 @@ fi
|
||||||
|
|
||||||
AC_SUBST([enable_grub_emu_sdl])
|
AC_SUBST([enable_grub_emu_sdl])
|
||||||
AC_SUBST([enable_grub_emu_usb])
|
AC_SUBST([enable_grub_emu_usb])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE([grub-fstest],
|
AC_ARG_ENABLE([grub-fstest],
|
||||||
[AS_HELP_STRING([--enable-grub-fstest],
|
[AS_HELP_STRING([--enable-grub-fstest],
|
||||||
|
@ -644,15 +643,19 @@ AC_SUBST(ASFLAGS)
|
||||||
# Output files.
|
# Output files.
|
||||||
grub_CHECK_LINK_DIR
|
grub_CHECK_LINK_DIR
|
||||||
if test x"$link_dir" = xyes ; then
|
if test x"$link_dir" = xyes ; then
|
||||||
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu
|
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu])
|
||||||
include/grub/machine:include/grub/$target_cpu/$platform])
|
if test "$platform" != emu ; then
|
||||||
|
AC_CONFIG_LINKS([include/grub/machine:include/grub/$target_cpu/$platform])
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
mkdir -p include/grub 2>/dev/null
|
mkdir -p include/grub 2>/dev/null
|
||||||
rm -rf include/grub/cpu
|
rm -rf include/grub/cpu
|
||||||
cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null
|
cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null
|
||||||
|
if test "$platform" != emu ; then
|
||||||
rm -rf include/grub/machine
|
rm -rf include/grub/machine
|
||||||
cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
|
cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh])
|
AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh])
|
||||||
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
@ -660,11 +663,7 @@ AC_OUTPUT
|
||||||
echo "*******************************************************"
|
echo "*******************************************************"
|
||||||
echo GRUB2 will be compiled with following components:
|
echo GRUB2 will be compiled with following components:
|
||||||
echo Platform: "$target_cpu"-"$platform"
|
echo Platform: "$target_cpu"-"$platform"
|
||||||
if [ x"$grub_emu_excuse" = x ]; then
|
if [ x"$platform" = xemu ]; then
|
||||||
echo grub-emu: Yes
|
|
||||||
else
|
|
||||||
echo grub-emu: No "($grub_emu_excuse)"
|
|
||||||
fi
|
|
||||||
if [ x"$grub_emu_usb_excuse" = x ]; then
|
if [ x"$grub_emu_usb_excuse" = x ]; then
|
||||||
echo USB support for grub-emu: Yes
|
echo USB support for grub-emu: Yes
|
||||||
else
|
else
|
||||||
|
@ -675,6 +674,7 @@ echo SDL support for grub-emu: Yes
|
||||||
else
|
else
|
||||||
echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)"
|
echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
if [ x"$enable_mm_debug" = xyes ]; then
|
if [ x"$enable_mm_debug" = xyes ]; then
|
||||||
echo With memory debugging: Yes
|
echo With memory debugging: Yes
|
||||||
else
|
else
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
u=
|
u=
|
||||||
grep "^#define HAVE_ASM_USCORE" config.h >/dev/null 2>&1 && 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 '^#' \
|
| grep -v '^#' \
|
||||||
| sed -n \
|
| sed -n \
|
||||||
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \
|
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \
|
||||||
|
|
|
@ -59,7 +59,7 @@ cat <<EOF
|
||||||
{
|
{
|
||||||
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 '^#' \
|
| grep -v '^#' \
|
||||||
| sed -n \
|
| sed -n \
|
||||||
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/ {"\1", \1},/;p;}' \
|
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/ {"\1", \1},/;p;}' \
|
||||||
|
|
310
gettext/gettext.c
Normal file
310
gettext/gettext.c
Normal file
|
@ -0,0 +1,310 @@
|
||||||
|
/* gettext.c - gettext module */
|
||||||
|
/*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <grub/types.h>
|
||||||
|
#include <grub/misc.h>
|
||||||
|
#include <grub/mm.h>
|
||||||
|
#include <grub/err.h>
|
||||||
|
#include <grub/dl.h>
|
||||||
|
#include <grub/normal.h>
|
||||||
|
#include <grub/file.h>
|
||||||
|
#include <grub/kernel.h>
|
||||||
|
#include <grub/gzio.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
.mo file information from:
|
||||||
|
http://www.gnu.org/software/autoconf/manual/gettext/MO-Files.html .
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
static grub_file_t fd_mo;
|
||||||
|
|
||||||
|
static int grub_gettext_offsetoriginal;
|
||||||
|
static int grub_gettext_max;
|
||||||
|
|
||||||
|
static const char *(*grub_gettext_original) (const char *s);
|
||||||
|
|
||||||
|
#define GETTEXT_MAGIC_NUMBER 0
|
||||||
|
#define GETTEXT_FILE_FORMAT 4
|
||||||
|
#define GETTEXT_NUMBER_OF_STRINGS 8
|
||||||
|
#define GETTEXT_OFFSET_ORIGINAL 12
|
||||||
|
#define GETTEXT_OFFSET_TRANSLATION 16
|
||||||
|
|
||||||
|
#define MO_MAGIC_NUMBER 0x950412de
|
||||||
|
|
||||||
|
static grub_ssize_t
|
||||||
|
grub_gettext_pread (grub_file_t file, void *buf, grub_size_t len,
|
||||||
|
grub_off_t offset)
|
||||||
|
{
|
||||||
|
if (grub_file_seek (file, offset) == (grub_off_t) - 1)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return grub_file_read (file, buf, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
static grub_uint32_t
|
||||||
|
grub_gettext_get_info (int offset)
|
||||||
|
{
|
||||||
|
grub_uint32_t value;
|
||||||
|
|
||||||
|
grub_gettext_pread (fd_mo, (char *) &value, 4, offset);
|
||||||
|
|
||||||
|
value = grub_cpu_to_le32 (value);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
grub_gettext_getstring_from_offset (grub_uint32_t offset,
|
||||||
|
grub_uint32_t length, char *translation)
|
||||||
|
{
|
||||||
|
grub_gettext_pread (fd_mo, translation, length, offset);
|
||||||
|
translation[length] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *
|
||||||
|
grub_gettext_gettranslation_from_position (int position)
|
||||||
|
{
|
||||||
|
int offsettranslation;
|
||||||
|
int internal_position;
|
||||||
|
grub_uint32_t length, offset;
|
||||||
|
char *translation;
|
||||||
|
|
||||||
|
offsettranslation = grub_gettext_get_info (GETTEXT_OFFSET_TRANSLATION);
|
||||||
|
|
||||||
|
internal_position = offsettranslation + position * 8;
|
||||||
|
|
||||||
|
grub_gettext_pread (fd_mo, (char *) &length, 4, internal_position);
|
||||||
|
length = grub_cpu_to_le32 (length);
|
||||||
|
|
||||||
|
grub_gettext_pread (fd_mo, (char *) &offset, 4, internal_position + 4);
|
||||||
|
offset = grub_cpu_to_le32 (offset);
|
||||||
|
|
||||||
|
translation = grub_malloc (length + 1);
|
||||||
|
grub_gettext_getstring_from_offset (offset, length, translation);
|
||||||
|
|
||||||
|
return translation;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *
|
||||||
|
grub_gettext_getstring_from_position (int position)
|
||||||
|
{
|
||||||
|
int internal_position;
|
||||||
|
int length, offset;
|
||||||
|
char *original;
|
||||||
|
|
||||||
|
/* Get position for string i. */
|
||||||
|
internal_position = grub_gettext_offsetoriginal + (position * 8);
|
||||||
|
|
||||||
|
/* Get the length of the string i. */
|
||||||
|
grub_gettext_pread (fd_mo, (char *) &length, 4, internal_position);
|
||||||
|
|
||||||
|
/* Get the offset of the string i. */
|
||||||
|
grub_gettext_pread (fd_mo, (char *) &offset, 4, internal_position + 4);
|
||||||
|
|
||||||
|
/* Get the string i. */
|
||||||
|
original = grub_malloc (length + 1);
|
||||||
|
grub_gettext_getstring_from_offset (offset, length, original);
|
||||||
|
|
||||||
|
return original;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
grub_gettext_translate (const char *orig)
|
||||||
|
{
|
||||||
|
char *current_string;
|
||||||
|
char *ret;
|
||||||
|
|
||||||
|
int min, max, current;
|
||||||
|
|
||||||
|
if (fd_mo == 0)
|
||||||
|
return orig;
|
||||||
|
|
||||||
|
min = 0;
|
||||||
|
max = grub_gettext_max;
|
||||||
|
|
||||||
|
current = (max + min) / 2;
|
||||||
|
|
||||||
|
while (current != min && current != max)
|
||||||
|
{
|
||||||
|
current_string = grub_gettext_getstring_from_position (current);
|
||||||
|
|
||||||
|
/* Search by bisection. */
|
||||||
|
if (grub_strcmp (current_string, orig) < 0)
|
||||||
|
{
|
||||||
|
grub_free (current_string);
|
||||||
|
min = current;
|
||||||
|
}
|
||||||
|
else if (grub_strcmp (current_string, orig) > 0)
|
||||||
|
{
|
||||||
|
grub_free (current_string);
|
||||||
|
max = current;
|
||||||
|
}
|
||||||
|
else if (grub_strcmp (current_string, orig) == 0)
|
||||||
|
{
|
||||||
|
grub_free (current_string);
|
||||||
|
return grub_gettext_gettranslation_from_position (current);
|
||||||
|
}
|
||||||
|
current = (max + min) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = grub_malloc (grub_strlen (orig) + 1);
|
||||||
|
grub_strcpy (ret, orig);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is similar to grub_gzfile_open. */
|
||||||
|
static grub_file_t
|
||||||
|
grub_mofile_open (const char *filename)
|
||||||
|
{
|
||||||
|
int unsigned magic;
|
||||||
|
int version;
|
||||||
|
|
||||||
|
/* Using fd_mo and not another variable because
|
||||||
|
it's needed for grub_gettext_get_info. */
|
||||||
|
|
||||||
|
fd_mo = grub_gzfile_open (filename, 1);
|
||||||
|
grub_errno = GRUB_ERR_NONE;
|
||||||
|
|
||||||
|
if (!fd_mo)
|
||||||
|
{
|
||||||
|
grub_dprintf ("gettext", "Cannot read %s\n", filename);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
magic = grub_gettext_get_info (GETTEXT_MAGIC_NUMBER);
|
||||||
|
|
||||||
|
if (magic != MO_MAGIC_NUMBER)
|
||||||
|
{
|
||||||
|
grub_error (GRUB_ERR_BAD_FILE_TYPE, "mo: invalid mo file: %s",
|
||||||
|
filename);
|
||||||
|
grub_file_close (fd_mo);
|
||||||
|
fd_mo = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
version = grub_gettext_get_info (GETTEXT_FILE_FORMAT);
|
||||||
|
|
||||||
|
if (version != 0)
|
||||||
|
{
|
||||||
|
grub_error (GRUB_ERR_BAD_FILE_TYPE,
|
||||||
|
"mo: invalid mo version in file: %s\n", filename);
|
||||||
|
fd_mo = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return fd_mo;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
grub_gettext_init_ext (const char *lang)
|
||||||
|
{
|
||||||
|
char *mo_file;
|
||||||
|
char *locale_dir;
|
||||||
|
|
||||||
|
locale_dir = grub_env_get ("locale_dir");
|
||||||
|
if (locale_dir == NULL)
|
||||||
|
{
|
||||||
|
grub_printf ("locale_dir variable is not set up.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fd_mo = NULL;
|
||||||
|
|
||||||
|
/* mo_file e.g.: /boot/grub/locale/ca.mo */
|
||||||
|
|
||||||
|
mo_file =
|
||||||
|
grub_malloc (grub_strlen (locale_dir) + grub_strlen ("/") +
|
||||||
|
grub_strlen (lang) + grub_strlen (".mo") + 1);
|
||||||
|
|
||||||
|
/* Warning: if changing some paths in the below line, change the grub_malloc
|
||||||
|
contents below. */
|
||||||
|
|
||||||
|
grub_sprintf (mo_file, "%s/%s.mo", locale_dir, lang);
|
||||||
|
|
||||||
|
fd_mo = grub_mofile_open (mo_file);
|
||||||
|
|
||||||
|
/* Will try adding .gz as well. */
|
||||||
|
if (fd_mo == NULL)
|
||||||
|
{
|
||||||
|
grub_sprintf (mo_file, "%s.gz", mo_file);
|
||||||
|
fd_mo = grub_mofile_open (mo_file);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fd_mo)
|
||||||
|
{
|
||||||
|
grub_gettext_offsetoriginal =
|
||||||
|
grub_gettext_get_info (GETTEXT_OFFSET_ORIGINAL);
|
||||||
|
grub_gettext_max = grub_gettext_get_info (GETTEXT_NUMBER_OF_STRINGS);
|
||||||
|
|
||||||
|
grub_gettext_original = grub_gettext;
|
||||||
|
grub_gettext = grub_gettext_translate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *
|
||||||
|
grub_gettext_env_write_lang (struct grub_env_var *var
|
||||||
|
__attribute__ ((unused)), const char *val)
|
||||||
|
{
|
||||||
|
grub_gettext_init_ext (val);
|
||||||
|
|
||||||
|
return grub_strdup (val);
|
||||||
|
}
|
||||||
|
|
||||||
|
static grub_err_t
|
||||||
|
grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
|
||||||
|
int argc, char **args)
|
||||||
|
{
|
||||||
|
if (argc != 1)
|
||||||
|
return grub_error (GRUB_ERR_BAD_ARGUMENT, "text to translate required");
|
||||||
|
|
||||||
|
const char *translation;
|
||||||
|
translation = grub_gettext_translate (args[0]);
|
||||||
|
grub_printf ("%s\n", translation);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
GRUB_MOD_INIT (gettext)
|
||||||
|
{
|
||||||
|
(void) mod; /* To stop warning. */
|
||||||
|
|
||||||
|
const char *lang;
|
||||||
|
|
||||||
|
lang = grub_env_get ("lang");
|
||||||
|
|
||||||
|
grub_gettext_init_ext (lang);
|
||||||
|
|
||||||
|
grub_register_command_p1 ("gettext", grub_cmd_translate,
|
||||||
|
"gettext STRING",
|
||||||
|
"Translates the string with the current settings.");
|
||||||
|
|
||||||
|
/* Reload .mo file information if lang changes. */
|
||||||
|
grub_register_variable_hook ("lang", NULL, grub_gettext_env_write_lang);
|
||||||
|
|
||||||
|
/* Preserve hooks after context changes. */
|
||||||
|
grub_env_export ("lang");
|
||||||
|
}
|
||||||
|
|
||||||
|
GRUB_MOD_FINI (gettext)
|
||||||
|
{
|
||||||
|
if (fd_mo != 0)
|
||||||
|
grub_file_close (fd_mo);
|
||||||
|
|
||||||
|
grub_gettext = grub_gettext_original;
|
||||||
|
}
|
|
@ -21,7 +21,6 @@
|
||||||
#ifndef GRUB_AUTOEFI_HEADER
|
#ifndef GRUB_AUTOEFI_HEADER
|
||||||
#define GRUB_AUTOEFI_HEADER 1
|
#define GRUB_AUTOEFI_HEADER 1
|
||||||
|
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
|
|
||||||
#ifdef GRUB_MACHINE_EFI
|
#ifdef GRUB_MACHINE_EFI
|
||||||
# include <grub/efi/efi.h>
|
# include <grub/efi/efi.h>
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
# define _(str) gettext(str)
|
# define _(str) gettext(str)
|
||||||
#else
|
#else
|
||||||
# define _(str) str
|
# define _(str) grub_gettext(str)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define N_(str) str
|
||||||
|
|
||||||
#endif /* GRUB_I18N_H */
|
#endif /* GRUB_I18N_H */
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#ifndef GRUB_CPU_AT_KEYBOARD_HEADER
|
#ifndef GRUB_CPU_AT_KEYBOARD_HEADER
|
||||||
#define GRUB_CPU_AT_KEYBOARD_HEADER 1
|
#define GRUB_CPU_AT_KEYBOARD_HEADER 1
|
||||||
|
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
|
|
||||||
#define SHIFT_L 0x2a
|
#define SHIFT_L 0x2a
|
||||||
#define SHIFT_R 0x36
|
#define SHIFT_R 0x36
|
||||||
|
|
|
@ -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 */
|
|
|
@ -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 */
|
|
|
@ -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 */
|
|
|
@ -19,7 +19,6 @@
|
||||||
#ifndef GRUB_KERNEL_CPU_HEADER
|
#ifndef GRUB_KERNEL_CPU_HEADER
|
||||||
#define GRUB_KERNEL_CPU_HEADER 1
|
#define GRUB_KERNEL_CPU_HEADER 1
|
||||||
|
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
|
|
||||||
#ifdef GRUB_MACHINE_IEEE1275
|
#ifdef GRUB_MACHINE_IEEE1275
|
||||||
#define GRUB_MOD_ALIGN 0x1000
|
#define GRUB_MOD_ALIGN 0x1000
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/err.h>
|
#include <grub/err.h>
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
|
|
||||||
extern grub_addr_t EXPORT_VAR(grub_os_area_addr);
|
extern grub_addr_t EXPORT_VAR(grub_os_area_addr);
|
||||||
extern grub_size_t EXPORT_VAR(grub_os_area_size);
|
extern grub_size_t EXPORT_VAR(grub_os_area_size);
|
||||||
|
|
|
@ -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 */
|
|
|
@ -21,7 +21,6 @@
|
||||||
#define GRUB_MEMORY_MACHINE_HEADER 1
|
#define GRUB_MEMORY_MACHINE_HEADER 1
|
||||||
|
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
#ifndef ASM_FILE
|
#ifndef ASM_FILE
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/err.h>
|
#include <grub/err.h>
|
||||||
|
|
|
@ -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 */
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* misc.h - prototypes for misc functions */
|
/* misc.h - prototypes for misc functions */
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2002,2003,2005,2006,2007,2008,2009,2008 Free Software Foundation, Inc.
|
* Copyright (C) 2002,2003,2005,2006,2007,2008,2009,2008,2009 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -240,6 +240,9 @@ grub_ssize_t EXPORT_FUNC(grub_utf8_to_ucs4) (grub_uint32_t *dest,
|
||||||
grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
|
grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
|
||||||
grub_uint32_t d, grub_uint32_t *r);
|
grub_uint32_t d, grub_uint32_t *r);
|
||||||
|
|
||||||
|
const char *EXPORT_FUNC(grub_gettext_dummy) (const char *s);
|
||||||
|
extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
|
||||||
|
|
||||||
#ifdef NEED_ENABLE_EXECUTE_STACK
|
#ifdef NEED_ENABLE_EXECUTE_STACK
|
||||||
void EXPORT_FUNC(__enable_execute_stack) (void *addr);
|
void EXPORT_FUNC(__enable_execute_stack) (void *addr);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -88,6 +88,7 @@ grub_err_t EXPORT_FUNC(grub_parser_execute) (char *source);
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
grub_parser_register (const char *name __attribute__ ((unused)),
|
grub_parser_register (const char *name __attribute__ ((unused)),
|
||||||
|
/* `name' is ignored here, but used by genhandlerlist.sh. */
|
||||||
grub_parser_t parser)
|
grub_parser_t parser)
|
||||||
{
|
{
|
||||||
grub_handler_register (&grub_parser_class, GRUB_AS_HANDLER (parser));
|
grub_handler_register (&grub_parser_class, GRUB_AS_HANDLER (parser));
|
||||||
|
|
|
@ -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 */
|
|
|
@ -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 */
|
|
|
@ -21,9 +21,14 @@
|
||||||
|
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
#include <grub/machine/time.h>
|
|
||||||
#include <grub/cpu/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);
|
void EXPORT_FUNC(grub_millisleep) (grub_uint32_t ms);
|
||||||
grub_uint64_t EXPORT_FUNC(grub_get_time_ms) (void);
|
grub_uint64_t EXPORT_FUNC(grub_get_time_ms) (void);
|
||||||
|
|
||||||
|
|
|
@ -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 */
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include <grub/file.h>
|
#include <grub/file.h>
|
||||||
#include <grub/env.h>
|
#include <grub/env.h>
|
||||||
#include <grub/cache.h>
|
#include <grub/cache.h>
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
|
|
||||||
/* Platforms where modules are in a readonly area of memory. */
|
/* Platforms where modules are in a readonly area of memory. */
|
||||||
#if defined(GRUB_MACHINE_QEMU)
|
#if defined(GRUB_MACHINE_QEMU)
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include <grub/machine/memory.h>
|
#include <grub/machine/memory.h>
|
||||||
#include <grub/machine/console.h>
|
#include <grub/machine/console.h>
|
||||||
#include <grub/machine/kernel.h>
|
#include <grub/machine/kernel.h>
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/err.h>
|
#include <grub/err.h>
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
|
|
|
@ -30,6 +30,8 @@ grub_iswordseparator (int c)
|
||||||
return (grub_isspace (c) || c == ',' || c == ';' || c == '|' || c == '&');
|
return (grub_isspace (c) || c == ',' || c == ';' || c == '|' || c == '&');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* (*grub_gettext) (const char *s) = grub_gettext_dummy;
|
||||||
|
|
||||||
void *
|
void *
|
||||||
grub_memmove (void *dest, const void *src, grub_size_t n)
|
grub_memmove (void *dest, const void *src, grub_size_t n)
|
||||||
{
|
{
|
||||||
|
@ -980,6 +982,13 @@ grub_utf8_to_ucs4 (grub_uint32_t *dest, grub_size_t destsize,
|
||||||
return p - dest;
|
return p - dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* grub_gettext_dummy is not translating anything. */
|
||||||
|
const char *
|
||||||
|
grub_gettext_dummy (const char *s)
|
||||||
|
{
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
/* Abort GRUB. This function does not return. */
|
/* Abort GRUB. This function does not return. */
|
||||||
void
|
void
|
||||||
grub_abort (void)
|
grub_abort (void)
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include <grub/machine/init.h>
|
#include <grub/machine/init.h>
|
||||||
#include <grub/machine/memory.h>
|
#include <grub/machine/memory.h>
|
||||||
#include <grub/memory.h>
|
#include <grub/memory.h>
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
#include <grub/file.h>
|
#include <grub/file.h>
|
||||||
#include <grub/err.h>
|
#include <grub/err.h>
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/loader.h>
|
#include <grub/loader.h>
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
#include <grub/machine/memory.h>
|
#include <grub/machine/memory.h>
|
||||||
#include <grub/machine/loader.h>
|
#include <grub/machine/loader.h>
|
||||||
#include <grub/normal.h>
|
#include <grub/normal.h>
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
#include <grub/multiboot.h>
|
#include <grub/multiboot.h>
|
||||||
#include <grub/multiboot2.h>
|
#include <grub/multiboot2.h>
|
||||||
#include <multiboot2.h>
|
#include <multiboot2.h>
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include <grub/reader.h>
|
#include <grub/reader.h>
|
||||||
#include <grub/menu_viewer.h>
|
#include <grub/menu_viewer.h>
|
||||||
#include <grub/auth.h>
|
#include <grub/auth.h>
|
||||||
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
#define GRUB_DEFAULT_HISTORY_SIZE 50
|
#define GRUB_DEFAULT_HISTORY_SIZE 50
|
||||||
|
|
||||||
|
@ -508,10 +509,10 @@ grub_normal_reader_init (void)
|
||||||
grub_normal_init_page ();
|
grub_normal_init_page ();
|
||||||
grub_setcursor (1);
|
grub_setcursor (1);
|
||||||
|
|
||||||
grub_printf ("\
|
grub_printf (_("\
|
||||||
[ Minimal BASH-like line editing is supported. For the first word, TAB\n\
|
[ Minimal BASH-like line editing is supported. For the first word, TAB\n\
|
||||||
lists possible command completions. Anywhere else TAB lists possible\n\
|
lists possible command completions. Anywhere else TAB lists possible\n\
|
||||||
device/file completions.%s ]\n\n",
|
device/file completions.%s ]\n\n"),
|
||||||
reader_nested ? " ESC at any time exits." : "");
|
reader_nested ? " ESC at any time exits." : "");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -523,9 +524,9 @@ static grub_err_t
|
||||||
grub_normal_read_line (char **line, int cont)
|
grub_normal_read_line (char **line, int cont)
|
||||||
{
|
{
|
||||||
grub_parser_t parser = grub_parser_get_current ();
|
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)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/parser.h>
|
#include <grub/parser.h>
|
||||||
#include <grub/auth.h>
|
#include <grub/auth.h>
|
||||||
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
enum update_mode
|
enum update_mode
|
||||||
{
|
{
|
||||||
|
@ -996,7 +997,7 @@ run (struct screen *screen)
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_cls ();
|
grub_cls ();
|
||||||
grub_printf (" Booting a command list\n\n");
|
grub_printf (_(" Booting a command list\n\n"));
|
||||||
|
|
||||||
|
|
||||||
/* Execute the script, line for line. */
|
/* Execute the script, line for line. */
|
||||||
|
@ -1176,6 +1177,6 @@ grub_menu_entry_run (grub_menu_entry_t entry)
|
||||||
grub_cls ();
|
grub_cls ();
|
||||||
grub_print_error ();
|
grub_print_error ();
|
||||||
grub_errno = GRUB_ERR_NONE;
|
grub_errno = GRUB_ERR_NONE;
|
||||||
grub_printf ("\nPress any key to continue...");
|
grub_printf (_("\nPress any key to continue..."));
|
||||||
(void) grub_getkey ();
|
(void) grub_getkey ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <grub/time.h>
|
#include <grub/time.h>
|
||||||
#include <grub/env.h>
|
#include <grub/env.h>
|
||||||
#include <grub/menu_viewer.h>
|
#include <grub/menu_viewer.h>
|
||||||
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
/* Time to delay after displaying an error message about a default/fallback
|
/* Time to delay after displaying an error message about a default/fallback
|
||||||
entry failing to boot. */
|
entry failing to boot. */
|
||||||
|
@ -93,8 +94,8 @@ print_message (int nested, int edit)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
grub_printf ("\n\
|
grub_printf (_("\n\
|
||||||
Use the %C and %C keys to select which entry is highlighted.\n",
|
Use the %C and %C keys to select which entry is highlighted.\n"),
|
||||||
(grub_uint32_t) GRUB_TERM_DISP_UP, (grub_uint32_t) GRUB_TERM_DISP_DOWN);
|
(grub_uint32_t) GRUB_TERM_DISP_UP, (grub_uint32_t) GRUB_TERM_DISP_DOWN);
|
||||||
grub_printf ("\
|
grub_printf ("\
|
||||||
Press enter to boot the selected OS, \'e\' to edit the\n\
|
Press enter to boot the selected OS, \'e\' to edit the\n\
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
ca
|
ca
|
||||||
|
id
|
||||||
|
|
|
@ -10,3 +10,5 @@ util/mkisofs/multi.c
|
||||||
util/mkisofs/rock.c
|
util/mkisofs/rock.c
|
||||||
util/mkisofs/tree.c
|
util/mkisofs/tree.c
|
||||||
util/mkisofs/write.c
|
util/mkisofs/write.c
|
||||||
|
|
||||||
|
normal/menu_text.c
|
||||||
|
|
283
po/ca.po
283
po/ca.po
|
@ -6,7 +6,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: GNU GRUB\n"
|
"Project-Id-Version: GNU GRUB\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2009-11-19 00:16+0100\n"
|
"POT-Creation-Date: 2009-11-22 11:45+0000\n"
|
||||||
"PO-Revision-Date: 2009-11-17 12:26+0100\n"
|
"PO-Revision-Date: 2009-11-17 12:26+0100\n"
|
||||||
"Last-Translator: Robert Millan <rmh.grub@aybabtu.com>\n"
|
"Last-Translator: Robert Millan <rmh.grub@aybabtu.com>\n"
|
||||||
"Language-Team: None <no-team-yet@li.org>\n"
|
"Language-Team: None <no-team-yet@li.org>\n"
|
||||||
|
@ -22,30 +22,10 @@ msgstr ""
|
||||||
msgid "cannot compress the kernel image"
|
msgid "cannot compress the kernel image"
|
||||||
msgstr ""
|
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
|
#: util/i386/pc/grub-mkimage.c:138
|
||||||
msgid "prefix is too long"
|
msgid "prefix is too long"
|
||||||
msgstr ""
|
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
|
#: util/i386/pc/grub-mkimage.c:206
|
||||||
msgid "the core image is too big"
|
msgid "the core image is too big"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -89,20 +69,10 @@ msgstr ""
|
||||||
msgid "cannot open %s"
|
msgid "cannot open %s"
|
||||||
msgstr ""
|
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
|
#: util/i386/pc/grub-setup.c:166
|
||||||
msgid "The first sector of the core file is not sector-aligned"
|
msgid "The first sector of the core file is not sector-aligned"
|
||||||
msgstr ""
|
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
|
#: util/i386/pc/grub-setup.c:180
|
||||||
msgid "Non-sector-aligned data is found in the core file"
|
msgid "Non-sector-aligned data is found in the core file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -126,11 +96,6 @@ msgstr ""
|
||||||
msgid "The size of `%s' is too large"
|
msgid "The size of `%s' is too large"
|
||||||
msgstr ""
|
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
|
#: util/i386/pc/grub-setup.c:261
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unable to identify a filesystem in %s; safety check can't be performed"
|
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"
|
msgid "No DOS-style partitions found"
|
||||||
msgstr ""
|
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
|
#: util/i386/pc/grub-setup.c:330 util/i386/pc/grub-setup.c:355
|
||||||
msgid ""
|
msgid ""
|
||||||
"Attempting to install GRUB to a partitionless disk. This is a BAD idea."
|
"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."
|
msgid "Your embedding area is unusually small. core.img won't fit in it."
|
||||||
msgstr ""
|
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
|
#: util/i386/pc/grub-setup.c:418
|
||||||
msgid ""
|
msgid ""
|
||||||
"Embedding is not possible, but this is required when the root device is on a "
|
"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"
|
msgid "attempting to read the core image `%s' from GRUB again"
|
||||||
msgstr ""
|
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
|
#: util/i386/pc/grub-setup.c:498
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Cannot read `%s' correctly"
|
msgid "Cannot read `%s' correctly"
|
||||||
|
@ -258,11 +189,6 @@ msgstr ""
|
||||||
msgid "Failed to read the rest sectors of the core image"
|
msgid "Failed to read the rest sectors of the core image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: util/i386/pc/grub-setup.c:544
|
|
||||||
#, c-format
|
|
||||||
msgid "opening the core image `%s'"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: util/i386/pc/grub-setup.c:547
|
#: util/i386/pc/grub-setup.c:547
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Cannot open `%s'"
|
msgid "Cannot open `%s'"
|
||||||
|
@ -310,11 +236,6 @@ msgstr ""
|
||||||
msgid "Invalid root device `%s'"
|
msgid "Invalid root device `%s'"
|
||||||
msgstr ""
|
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
|
#: util/i386/pc/grub-setup.c:768
|
||||||
msgid "Cannot guess the root device. Specify the option ``--root-device''."
|
msgid "Cannot guess the root device. Specify the option ``--root-device''."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -451,6 +372,199 @@ msgstr ""
|
||||||
msgid "Unexpected joliet directory length %d %d %s\n"
|
msgid "Unexpected joliet directory length %d %d %s\n"
|
||||||
msgstr ""
|
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
|
#: util/mkisofs/mkisofs.c:373
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Using \"%s\"\n"
|
msgid "Using \"%s\"\n"
|
||||||
|
@ -882,6 +996,15 @@ msgstr ""
|
||||||
msgid "Path table size(bytes): %d\n"
|
msgid "Path table size(bytes): %d\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: normal/menu_text.c:97
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"\n"
|
||||||
|
" Use the %C and %C keys to select which entry is highlighted.\n"
|
||||||
|
msgstr ""
|
||||||
|
"\n"
|
||||||
|
" Utilitzeu les tecles %C i %C per a seleccionar l'entrada ressaltada.\n"
|
||||||
|
|
||||||
#: util/grub.d/10_kfreebsd.in:40
|
#: util/grub.d/10_kfreebsd.in:40
|
||||||
msgid "%s, with kFreeBSD %s"
|
msgid "%s, with kFreeBSD %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -42,13 +42,13 @@ grub_normal_parse_line (char *line, grub_reader_getline_t getline)
|
||||||
|
|
||||||
static struct grub_parser grub_sh_parser =
|
static struct grub_parser grub_sh_parser =
|
||||||
{
|
{
|
||||||
.name = "sh",
|
.name = "grub",
|
||||||
.parse_line = grub_normal_parse_line
|
.parse_line = grub_normal_parse_line
|
||||||
};
|
};
|
||||||
|
|
||||||
GRUB_MOD_INIT(sh)
|
GRUB_MOD_INIT(sh)
|
||||||
{
|
{
|
||||||
grub_parser_register ("sh", &grub_sh_parser);
|
grub_parser_register ("grub", &grub_sh_parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
GRUB_MOD_FINI(sh)
|
GRUB_MOD_FINI(sh)
|
|
@ -16,7 +16,6 @@
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
#include <grub/machine/memory.h>
|
#include <grub/machine/memory.h>
|
||||||
#include <grub/machine/serial.h>
|
#include <grub/machine/serial.h>
|
||||||
#include <grub/machine/console.h>
|
#include <grub/machine/console.h>
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/term.h>
|
#include <grub/term.h>
|
||||||
#include <grub/machine/machine.h>
|
|
||||||
#include <grub/machine/console.h>
|
#include <grub/machine/console.h>
|
||||||
#include <grub/time.h>
|
#include <grub/time.h>
|
||||||
#include <grub/cpu/io.h>
|
#include <grub/cpu/io.h>
|
||||||
|
|
|
@ -30,6 +30,12 @@
|
||||||
# define DEV_CYGDRIVE_MAJOR 98
|
# define DEV_CYGDRIVE_MAJOR 98
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNU__
|
||||||
|
#include <hurd.h>
|
||||||
|
#include <hurd/lookup.h>
|
||||||
|
#include <hurd/fs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <grub/util/misc.h>
|
#include <grub/util/misc.h>
|
||||||
#include <grub/util/hostdisk.h>
|
#include <grub/util/hostdisk.h>
|
||||||
#include <grub/util/getroot.h>
|
#include <grub/util/getroot.h>
|
||||||
|
@ -378,8 +384,65 @@ find_cygwin_root_device (const char *path, dev_t dev)
|
||||||
char *
|
char *
|
||||||
grub_guess_root_device (const char *dir)
|
grub_guess_root_device (const char *dir)
|
||||||
{
|
{
|
||||||
struct stat st;
|
|
||||||
char *os_dev;
|
char *os_dev;
|
||||||
|
#ifdef __GNU__
|
||||||
|
file_t file;
|
||||||
|
mach_port_t *ports;
|
||||||
|
int *ints;
|
||||||
|
loff_t *offsets;
|
||||||
|
char *data;
|
||||||
|
error_t err;
|
||||||
|
mach_msg_type_number_t num_ports = 0, num_ints = 0, num_offsets = 0, data_len = 0;
|
||||||
|
size_t name_len;
|
||||||
|
|
||||||
|
file = file_name_lookup (dir, 0, 0);
|
||||||
|
if (file == MACH_PORT_NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err = file_get_storage_info (file,
|
||||||
|
&ports, &num_ports,
|
||||||
|
&ints, &num_ints,
|
||||||
|
&offsets, &num_offsets,
|
||||||
|
&data, &data_len);
|
||||||
|
|
||||||
|
if (num_ints < 1)
|
||||||
|
grub_util_error ("Storage info for `%s' does not include type", dir);
|
||||||
|
if (ints[0] != STORAGE_DEVICE)
|
||||||
|
grub_util_error ("Filesystem of `%s' is not stored on local disk", dir);
|
||||||
|
|
||||||
|
if (num_ints < 5)
|
||||||
|
grub_util_error ("Storage info for `%s' does not include name", dir);
|
||||||
|
name_len = ints[4];
|
||||||
|
if (name_len < data_len)
|
||||||
|
grub_util_error ("Bogus name length for storage info for `%s'", dir);
|
||||||
|
if (data[name_len - 1] != '\0')
|
||||||
|
grub_util_error ("Storage name for `%s' not NUL-terminated", dir);
|
||||||
|
|
||||||
|
os_dev = xmalloc (strlen ("/dev/") + data_len);
|
||||||
|
memcpy (os_dev, "/dev/", strlen ("/dev/"));
|
||||||
|
memcpy (os_dev + strlen ("/dev/"), data, data_len);
|
||||||
|
|
||||||
|
if (ports && num_ports > 0)
|
||||||
|
{
|
||||||
|
mach_msg_type_number_t i;
|
||||||
|
for (i = 0; i < num_ports; i++)
|
||||||
|
{
|
||||||
|
mach_port_t port = ports[i];
|
||||||
|
if (port != MACH_PORT_NULL)
|
||||||
|
mach_port_deallocate (mach_task_self(), port);
|
||||||
|
}
|
||||||
|
munmap ((caddr_t) ports, num_ports * sizeof (*ports));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ints && num_ints > 0)
|
||||||
|
munmap ((caddr_t) ints, num_ints * sizeof (*ints));
|
||||||
|
if (offsets && num_offsets > 0)
|
||||||
|
munmap ((caddr_t) offsets, num_offsets * sizeof (*offsets));
|
||||||
|
if (data && data_len > 0)
|
||||||
|
munmap (data, data_len);
|
||||||
|
mach_port_deallocate (mach_task_self (), file);
|
||||||
|
#else /* !__GNU__ */
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
if (stat (dir, &st) < 0)
|
if (stat (dir, &st) < 0)
|
||||||
grub_util_error ("Cannot stat `%s'", dir);
|
grub_util_error ("Cannot stat `%s'", dir);
|
||||||
|
@ -393,6 +456,7 @@ grub_guess_root_device (const char *dir)
|
||||||
/* This might be truly slow, but is there any better way? */
|
/* This might be truly slow, but is there any better way? */
|
||||||
os_dev = find_root_device ("/dev", st.st_dev);
|
os_dev = find_root_device ("/dev", st.st_dev);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* !__GNU__ */
|
||||||
|
|
||||||
return os_dev;
|
return os_dev;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,10 @@ PACKAGE_NAME=@PACKAGE_NAME@
|
||||||
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
||||||
PACKAGE_VERSION=@PACKAGE_VERSION@
|
PACKAGE_VERSION=@PACKAGE_VERSION@
|
||||||
target_cpu=@target_cpu@
|
target_cpu=@target_cpu@
|
||||||
|
native_platform=@platform@
|
||||||
|
|
||||||
coreboot_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-coreboot
|
coreboot_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-coreboot
|
||||||
pc_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-pc
|
pc_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-pc
|
||||||
grub_mkisofs="grub-mkisofs"
|
|
||||||
|
|
||||||
# Usage: usage
|
# Usage: usage
|
||||||
# Print the usage.
|
# Print the usage.
|
||||||
|
@ -42,7 +42,7 @@ Make GRUB rescue image.
|
||||||
-h, --help print this message and exit
|
-h, --help print this message and exit
|
||||||
-v, --version print the version information and exit
|
-v, --version print the version information and exit
|
||||||
--modules=MODULES pre-load specified modules MODULES
|
--modules=MODULES pre-load specified modules MODULES
|
||||||
--output=FILE save output in FILE
|
--output=FILE save output in FILE [required]
|
||||||
|
|
||||||
$0 generates a bootable rescue image with specified source files or directories.
|
$0 generates a bootable rescue image with specified source files or directories.
|
||||||
|
|
||||||
|
@ -63,6 +63,12 @@ for option in "$@"; do
|
||||||
modules=`echo "$option" | sed 's/--modules=//'` ;;
|
modules=`echo "$option" | sed 's/--modules=//'` ;;
|
||||||
--output=*)
|
--output=*)
|
||||||
output_image=`echo "$option" | sed 's/--output=//'` ;;
|
output_image=`echo "$option" | sed 's/--output=//'` ;;
|
||||||
|
# Intentionally undocumented
|
||||||
|
--override-directory=*)
|
||||||
|
override_dir=`echo "${option}/" | sed 's/--override-directory=//'`
|
||||||
|
PATH=${override_dir}:$PATH
|
||||||
|
export PATH
|
||||||
|
;;
|
||||||
-*)
|
-*)
|
||||||
echo "Unrecognized option \`$option'" 1>&2
|
echo "Unrecognized option \`$option'" 1>&2
|
||||||
usage
|
usage
|
||||||
|
@ -73,12 +79,19 @@ for option in "$@"; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "x${output_image}" = x ] ; then
|
||||||
|
echo "output file must be given" >&2
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
iso9660_dir=`mktemp -d`
|
iso9660_dir=`mktemp -d`
|
||||||
mkdir -p ${iso9660_dir}/boot/grub
|
mkdir -p ${iso9660_dir}/boot/grub
|
||||||
|
|
||||||
for platform in pc coreboot ; do
|
process_input_dir ()
|
||||||
input_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-${platform}
|
{
|
||||||
if test -e ${input_dir} ; then
|
input_dir="$1"
|
||||||
|
platform="$2"
|
||||||
mkdir -p ${iso9660_dir}/boot/grub/${target_cpu}-${platform}
|
mkdir -p ${iso9660_dir}/boot/grub/${target_cpu}-${platform}
|
||||||
for file in ${input_dir}/*.mod ${input_dir}/efiemu??.o \
|
for file in ${input_dir}/*.mod ${input_dir}/efiemu??.o \
|
||||||
${input_dir}/command.lst ${input_dir}/moddep.lst ${input_dir}/fs.lst \
|
${input_dir}/command.lst ${input_dir}/moddep.lst ${input_dir}/fs.lst \
|
||||||
|
@ -87,11 +100,28 @@ for platform in pc coreboot ; do
|
||||||
cp -f "$file" ${iso9660_dir}/boot/grub/${target_cpu}-${platform}/
|
cp -f "$file" ${iso9660_dir}/boot/grub/${target_cpu}-${platform}/
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "${override_dir}" = "" ] ; then
|
||||||
|
if test -e "${coreboot_dir}" ; then
|
||||||
|
process_input_dir ${coreboot_dir} coreboot
|
||||||
|
fi
|
||||||
|
if test -e "${pc_dir}" ; then
|
||||||
|
process_input_dir ${pc_dir} pc
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
process_input_dir ${override_dir} ${native_platform}
|
||||||
|
coreboot_dir=
|
||||||
|
pc_dir=
|
||||||
|
case "${native_platform}" in
|
||||||
|
coreboot) coreboot_dir=${override_dir} ;;
|
||||||
|
pc) pc_dir=${override_dir} ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
|
||||||
# build coreboot core.img
|
# build coreboot core.img
|
||||||
if test -e ${coreboot_dir} ; then
|
if test -e "${coreboot_dir}" ; then
|
||||||
|
echo "Generates coreboot"
|
||||||
memdisk_img=`mktemp`
|
memdisk_img=`mktemp`
|
||||||
memdisk_dir=`mktemp -d`
|
memdisk_dir=`mktemp -d`
|
||||||
mkdir -p ${memdisk_dir}/boot/grub
|
mkdir -p ${memdisk_dir}/boot/grub
|
||||||
|
@ -115,18 +145,12 @@ EOF
|
||||||
memdisk tar search iso9660 configfile sh \
|
memdisk tar search iso9660 configfile sh \
|
||||||
ata at_keyboard
|
ata at_keyboard
|
||||||
rm -f ${memdisk_img}
|
rm -f ${memdisk_img}
|
||||||
grub_mkisofs="${grub_mkisofs} --modification-date=$(echo ${iso_uuid} | sed -e s/-//g)"
|
grub_mkisofs_arguments="${grub_mkisofs_arguments} --modification-date=$(echo ${iso_uuid} | sed -e s/-//g)"
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${source}" != "" ] ; then
|
|
||||||
for d in ${source}; do
|
|
||||||
echo "Processing $d"
|
|
||||||
cp -dpRl "${d}" ${iso9660_dir}/
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build eltorito core.img
|
# build eltorito core.img
|
||||||
if test -e ${pc_dir} ; then
|
if test -e "${pc_dir}" ; then
|
||||||
|
echo "Generates eltorito"
|
||||||
core_img=`mktemp`
|
core_img=`mktemp`
|
||||||
grub-mkimage -d ${pc_dir}/ -o ${core_img} --prefix=/boot/grub/i386-pc \
|
grub-mkimage -d ${pc_dir}/ -o ${core_img} --prefix=/boot/grub/i386-pc \
|
||||||
memdisk tar search iso9660 configfile sh \
|
memdisk tar search iso9660 configfile sh \
|
||||||
|
@ -141,11 +165,11 @@ if test -e ${pc_dir} ; then
|
||||||
echo "source /boot/grub/grub.cfg") \
|
echo "source /boot/grub/grub.cfg") \
|
||||||
> ${iso9660_dir}/boot/grub/i386-pc/grub.cfg
|
> ${iso9660_dir}/boot/grub/i386-pc/grub.cfg
|
||||||
|
|
||||||
grub_mkisofs="${grub_mkisofs} -b boot/grub/i386-pc/eltorito.img -boot-info-table"
|
grub_mkisofs_arguments="${grub_mkisofs_arguments} -b boot/grub/i386-pc/eltorito.img -boot-info-table"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build iso image
|
# build iso image
|
||||||
${grub_mkisofs} -o ${output_image} -r -J ${iso9660_dir}
|
grub-mkisofs ${grub_mkisofs_arguments} -o ${output_image} -r ${iso9660_dir} ${source}
|
||||||
rm -rf ${iso9660_dir}
|
rm -rf ${iso9660_dir}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -22,6 +22,8 @@ prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
grub_prefix=`echo /boot/grub | sed ${transform}`
|
grub_prefix=`echo /boot/grub | sed ${transform}`
|
||||||
|
locale_dir=`echo /boot/grub/locale | sed ${transform}`
|
||||||
|
grub_lang=`echo $LANG | cut -d _ -f 1`
|
||||||
|
|
||||||
. ${libdir}/grub/grub-mkconfig_lib
|
. ${libdir}/grub/grub-mkconfig_lib
|
||||||
|
|
||||||
|
@ -108,6 +110,15 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Gettext variables and module
|
||||||
|
if [ "x${LANG}" != "xC" ] ; then
|
||||||
|
cat << EOF
|
||||||
|
set locale_dir=${locale_dir}
|
||||||
|
set lang=${grub_lang}
|
||||||
|
insmod gettext
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
|
if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
|
||||||
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
|
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
|
||||||
verbose=
|
verbose=
|
||||||
|
|
|
@ -89,11 +89,16 @@ EOF
|
||||||
LLABEL="${LONGNAME}"
|
LLABEL="${LONGNAME}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${LROOT}" != "${LBOOT}" ]; then
|
||||||
|
LKERNEL="${LKERNEL#/boot}"
|
||||||
|
LINITRD="${LINITRD#/boot}"
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
menuentry "${LLABEL} (on ${DEVICE})" {
|
menuentry "${LLABEL} (on ${DEVICE})" {
|
||||||
EOF
|
EOF
|
||||||
if [ -z "${prepare_boot_cache}" ]; then
|
if [ -z "${prepare_boot_cache}" ]; then
|
||||||
prepare_boot_cache="$(prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/")"
|
prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
|
||||||
fi
|
fi
|
||||||
printf '%s\n' "${prepare_boot_cache}"
|
printf '%s\n' "${prepare_boot_cache}"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <grub/util/misc.h>
|
#include <grub/util/misc.h>
|
||||||
#include <grub/util/hostdisk.h>
|
#include <grub/util/hostdisk.h>
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -127,7 +128,7 @@ find_grub_drive (const char *name)
|
||||||
|
|
||||||
if (name)
|
if (name)
|
||||||
{
|
{
|
||||||
for (i = 0; i < sizeof (map) / sizeof (map[0]); i++)
|
for (i = 0; i < ARRAY_SIZE (map); i++)
|
||||||
if (map[i].drive && ! strcmp (map[i].drive, name))
|
if (map[i].drive && ! strcmp (map[i].drive, name))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
@ -565,7 +566,10 @@ read_device_map (const char *dev_map)
|
||||||
|
|
||||||
fp = fopen (dev_map, "r");
|
fp = fopen (dev_map, "r");
|
||||||
if (! fp)
|
if (! fp)
|
||||||
grub_util_error ("Cannot open `%s'", dev_map);
|
{
|
||||||
|
grub_util_info (_("Cannot open `%s'"), dev_map);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while (fgets (buf, sizeof (buf), fp))
|
while (fgets (buf, sizeof (buf), fp))
|
||||||
{
|
{
|
||||||
|
@ -670,34 +674,27 @@ grub_util_biosdisk_fini (void)
|
||||||
static char *
|
static char *
|
||||||
make_device_name (int drive, int dos_part, int bsd_part)
|
make_device_name (int drive, int dos_part, int bsd_part)
|
||||||
{
|
{
|
||||||
int len = strlen(map[drive].drive);
|
char *ret;
|
||||||
char *p;
|
char *dos_part_str = NULL;
|
||||||
|
char *bsd_part_str = NULL;
|
||||||
|
|
||||||
if (dos_part >= 0)
|
if (dos_part >= 0)
|
||||||
{
|
asprintf (&dos_part_str, ",%d", dos_part + 1);
|
||||||
/* Add in char length of dos_part+1 */
|
|
||||||
int tmp = dos_part + 1;
|
|
||||||
len++;
|
|
||||||
while ((tmp /= 10) != 0)
|
|
||||||
len++;
|
|
||||||
}
|
|
||||||
if (bsd_part >= 0)
|
|
||||||
len += 2;
|
|
||||||
|
|
||||||
/* Length to alloc is: char length of map[drive].drive, plus
|
|
||||||
* char length of (dos_part+1) or of bsd_part, plus
|
|
||||||
* 2 for the comma and a null/end of string (\0)
|
|
||||||
*/
|
|
||||||
p = xmalloc (len + 2);
|
|
||||||
sprintf (p, "%s", map[drive].drive);
|
|
||||||
|
|
||||||
if (dos_part >= 0)
|
|
||||||
sprintf (p + strlen (p), ",%d", dos_part + 1);
|
|
||||||
|
|
||||||
if (bsd_part >= 0)
|
if (bsd_part >= 0)
|
||||||
sprintf (p + strlen (p), ",%c", bsd_part + 'a');
|
asprintf (&bsd_part_str, ",%c", dos_part + 'a');
|
||||||
|
|
||||||
return p;
|
asprintf (&ret, "%s%s%s", map[drive].drive,
|
||||||
|
dos_part_str ? : "",
|
||||||
|
bsd_part_str ? : "");
|
||||||
|
|
||||||
|
if (dos_part_str)
|
||||||
|
free (dos_part_str);
|
||||||
|
|
||||||
|
if (bsd_part_str)
|
||||||
|
free (bsd_part_str);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
@ -706,7 +703,7 @@ convert_system_partition_to_system_disk (const char *os_dev)
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
char *path = xmalloc (PATH_MAX);
|
char *path = xmalloc (PATH_MAX);
|
||||||
if (! realpath (os_dev, path))
|
if (! realpath (os_dev, path))
|
||||||
return 0;
|
return NULL;
|
||||||
|
|
||||||
if (strncmp ("/dev/", path, 5) == 0)
|
if (strncmp ("/dev/", path, 5) == 0)
|
||||||
{
|
{
|
||||||
|
@ -876,22 +873,29 @@ device_is_wholedisk (const char *os_dev)
|
||||||
static int
|
static int
|
||||||
find_system_device (const char *os_dev)
|
find_system_device (const char *os_dev)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
char *os_disk;
|
char *os_disk;
|
||||||
|
|
||||||
os_disk = convert_system_partition_to_system_disk (os_dev);
|
os_disk = convert_system_partition_to_system_disk (os_dev);
|
||||||
if (! os_disk)
|
if (! os_disk)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for (i = 0; i < (int) (sizeof (map) / sizeof (map[0])); i++)
|
for (i = 0; i < ARRAY_SIZE (map); i++)
|
||||||
if (map[i].device && strcmp (map[i].device, os_disk) == 0)
|
if (! map[i].device)
|
||||||
|
break;
|
||||||
|
else if (strcmp (map[i].device, os_disk) == 0)
|
||||||
{
|
{
|
||||||
free (os_disk);
|
free (os_disk);
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
free (os_disk);
|
if (i == ARRAY_SIZE (map))
|
||||||
return -1;
|
grub_util_error (_("device count exceeds limit"));
|
||||||
|
|
||||||
|
map[i].device = os_disk;
|
||||||
|
map[i].drive = xstrdup (os_disk);
|
||||||
|
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|
|
@ -114,14 +114,14 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
|
||||||
if (memdisk_path)
|
if (memdisk_path)
|
||||||
{
|
{
|
||||||
memdisk_size = ALIGN_UP(grub_util_get_image_size (memdisk_path), 512);
|
memdisk_size = ALIGN_UP(grub_util_get_image_size (memdisk_path), 512);
|
||||||
grub_util_info (_("the size of memory disk is 0x%x"), memdisk_size);
|
grub_util_info ("the size of memory disk is 0x%x", memdisk_size);
|
||||||
total_module_size += memdisk_size + sizeof (struct grub_module_header);
|
total_module_size += memdisk_size + sizeof (struct grub_module_header);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_path)
|
if (config_path)
|
||||||
{
|
{
|
||||||
config_size = grub_util_get_image_size (config_path) + 1;
|
config_size = grub_util_get_image_size (config_path) + 1;
|
||||||
grub_util_info (_("the size of config file is 0x%x"), config_size);
|
grub_util_info ("the size of config file is 0x%x", config_size);
|
||||||
total_module_size += config_size + sizeof (struct grub_module_header);
|
total_module_size += config_size + sizeof (struct grub_module_header);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
|
||||||
total_module_size += (grub_util_get_image_size (p->name)
|
total_module_size += (grub_util_get_image_size (p->name)
|
||||||
+ sizeof (struct grub_module_header));
|
+ sizeof (struct grub_module_header));
|
||||||
|
|
||||||
grub_util_info (_("the total module size is 0x%x"), total_module_size);
|
grub_util_info ("the total module size is 0x%x", total_module_size);
|
||||||
|
|
||||||
kernel_img = xmalloc (kernel_size + total_module_size);
|
kernel_img = xmalloc (kernel_size + total_module_size);
|
||||||
grub_util_load_image (kernel_path, kernel_img);
|
grub_util_load_image (kernel_path, kernel_img);
|
||||||
|
@ -196,7 +196,7 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
|
||||||
compress_kernel (kernel_img, kernel_size + total_module_size,
|
compress_kernel (kernel_img, kernel_size + total_module_size,
|
||||||
&core_img, &core_size);
|
&core_img, &core_size);
|
||||||
|
|
||||||
grub_util_info (_("the core size is 0x%x"), core_size);
|
grub_util_info ("the core size is 0x%x", core_size);
|
||||||
|
|
||||||
#if defined(GRUB_MACHINE_PCBIOS)
|
#if defined(GRUB_MACHINE_PCBIOS)
|
||||||
{
|
{
|
||||||
|
|
|
@ -159,7 +159,7 @@ setup (const char *dir,
|
||||||
void NESTED_FUNC_ATTR save_first_sector (grub_disk_addr_t sector, unsigned offset,
|
void NESTED_FUNC_ATTR save_first_sector (grub_disk_addr_t sector, unsigned offset,
|
||||||
unsigned length)
|
unsigned length)
|
||||||
{
|
{
|
||||||
grub_util_info (_("the first sector is <%llu,%u,%u>"),
|
grub_util_info ("the first sector is <%llu,%u,%u>",
|
||||||
sector, offset, length);
|
sector, offset, length);
|
||||||
|
|
||||||
if (offset != 0 || length != GRUB_DISK_SECTOR_SIZE)
|
if (offset != 0 || length != GRUB_DISK_SECTOR_SIZE)
|
||||||
|
@ -173,7 +173,7 @@ setup (const char *dir,
|
||||||
{
|
{
|
||||||
struct boot_blocklist *prev = block + 1;
|
struct boot_blocklist *prev = block + 1;
|
||||||
|
|
||||||
grub_util_info (_("saving <%llu,%u,%u> with the segment 0x%x"),
|
grub_util_info ("saving <%llu,%u,%u> with the segment 0x%x",
|
||||||
sector, offset, length, (unsigned) current_segment);
|
sector, offset, length, (unsigned) current_segment);
|
||||||
|
|
||||||
if (offset != 0 || last_length != GRUB_DISK_SECTOR_SIZE)
|
if (offset != 0 || last_length != GRUB_DISK_SECTOR_SIZE)
|
||||||
|
@ -244,7 +244,7 @@ setup (const char *dir,
|
||||||
if (! dest_dev)
|
if (! dest_dev)
|
||||||
grub_util_error ("%s", grub_errmsg);
|
grub_util_error ("%s", grub_errmsg);
|
||||||
|
|
||||||
grub_util_info (_("setting the root device to `%s'"), root);
|
grub_util_info ("setting the root device to `%s'", root);
|
||||||
if (grub_env_set ("root", root) != GRUB_ERR_NONE)
|
if (grub_env_set ("root", root) != GRUB_ERR_NONE)
|
||||||
grub_util_error ("%s", grub_errmsg);
|
grub_util_error ("%s", grub_errmsg);
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ setup (const char *dir,
|
||||||
bsd_part = grub_le_to_cpu32 (*install_bsd_part);
|
bsd_part = grub_le_to_cpu32 (*install_bsd_part);
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_util_info (_("dos partition is %d, bsd partition is %d"),
|
grub_util_info ("dos partition is %d, bsd partition is %d",
|
||||||
dos_part, bsd_part);
|
dos_part, bsd_part);
|
||||||
|
|
||||||
if (! dest_dev->disk->has_partitions)
|
if (! dest_dev->disk->has_partitions)
|
||||||
|
@ -378,7 +378,7 @@ setup (const char *dir,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
grub_util_info (_("the core image will be embedded at sector 0x%llx"), embed_region.start);
|
grub_util_info ("the core image will be embedded at sector 0x%llx", embed_region.start);
|
||||||
|
|
||||||
*install_dos_part = grub_cpu_to_le32 (dos_part);
|
*install_dos_part = grub_cpu_to_le32 (dos_part);
|
||||||
*install_bsd_part = grub_cpu_to_le32 (bsd_part);
|
*install_bsd_part = grub_cpu_to_le32 (bsd_part);
|
||||||
|
@ -446,11 +446,11 @@ unable_to_embed:
|
||||||
if (file)
|
if (file)
|
||||||
{
|
{
|
||||||
if (grub_file_size (file) != core_size)
|
if (grub_file_size (file) != core_size)
|
||||||
grub_util_info (_("succeeded in opening the core image but the size is different (%d != %d)"),
|
grub_util_info ("succeeded in opening the core image but the size is different (%d != %d)",
|
||||||
(int) grub_file_size (file), (int) core_size);
|
(int) grub_file_size (file), (int) core_size);
|
||||||
else if (grub_file_read (file, tmp_img, core_size)
|
else if (grub_file_read (file, tmp_img, core_size)
|
||||||
!= (grub_ssize_t) core_size)
|
!= (grub_ssize_t) core_size)
|
||||||
grub_util_info (_("succeeded in opening the core image but cannot read %d bytes"),
|
grub_util_info ("succeeded in opening the core image but cannot read %d bytes",
|
||||||
(int) core_size);
|
(int) core_size);
|
||||||
else if (memcmp (core_img, tmp_img, core_size) != 0)
|
else if (memcmp (core_img, tmp_img, core_size) != 0)
|
||||||
{
|
{
|
||||||
|
@ -473,7 +473,7 @@ unable_to_embed:
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
grub_util_info (_("succeeded in opening the core image but the data is different"));
|
grub_util_info ("succeeded in opening the core image but the data is different");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -484,10 +484,10 @@ unable_to_embed:
|
||||||
grub_file_close (file);
|
grub_file_close (file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
grub_util_info (_("couldn't open the core image"));
|
grub_util_info ("couldn't open the core image");
|
||||||
|
|
||||||
if (grub_errno)
|
if (grub_errno)
|
||||||
grub_util_info (_("error message = %s"), grub_errmsg);
|
grub_util_info ("error message = %s", grub_errmsg);
|
||||||
|
|
||||||
grub_errno = GRUB_ERR_NONE;
|
grub_errno = GRUB_ERR_NONE;
|
||||||
sync ();
|
sync ();
|
||||||
|
@ -541,7 +541,7 @@ unable_to_embed:
|
||||||
*install_bsd_part = grub_cpu_to_le32 (bsd_part);
|
*install_bsd_part = grub_cpu_to_le32 (bsd_part);
|
||||||
|
|
||||||
/* Write the first two sectors of the core image onto the disk. */
|
/* Write the first two sectors of the core image onto the disk. */
|
||||||
grub_util_info (_("opening the core image `%s'"), core_path);
|
grub_util_info ("opening the core image `%s'", core_path);
|
||||||
fp = fopen (core_path, "r+b");
|
fp = fopen (core_path, "r+b");
|
||||||
if (! fp)
|
if (! fp)
|
||||||
grub_util_error (_("Cannot open `%s'"), core_path);
|
grub_util_error (_("Cannot open `%s'"), core_path);
|
||||||
|
@ -763,7 +763,7 @@ main (int argc, char *argv[])
|
||||||
root_dev = grub_util_get_grub_dev (grub_guess_root_device (dir ? : DEFAULT_DIRECTORY));
|
root_dev = grub_util_get_grub_dev (grub_guess_root_device (dir ? : DEFAULT_DIRECTORY));
|
||||||
if (! root_dev)
|
if (! root_dev)
|
||||||
{
|
{
|
||||||
grub_util_info (_("guessing the root device failed, because of `%s'"),
|
grub_util_info ("guessing the root device failed, because of `%s'",
|
||||||
grub_errmsg);
|
grub_errmsg);
|
||||||
grub_util_error (_("Cannot guess the root device. Specify the option ``--root-device''."));
|
grub_util_error (_("Cannot guess the root device. Specify the option ``--root-device''."));
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,8 +36,6 @@
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
#include <grub/term.h>
|
#include <grub/term.h>
|
||||||
#include <grub/time.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
|
/* Include malloc.h, only if memalign is available. It is known that
|
||||||
memalign is declared in malloc.h in all systems, if present. */
|
memalign is declared in malloc.h in all systems, if present. */
|
||||||
|
|
|
@ -200,107 +200,107 @@ struct ld_option
|
||||||
static const struct ld_option ld_options[] =
|
static const struct ld_option ld_options[] =
|
||||||
{
|
{
|
||||||
{ {"all-files", no_argument, NULL, 'a'},
|
{ {"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},
|
{ {"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'},
|
{ {"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},
|
{ {"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},
|
{ {"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'},
|
{ {"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'},
|
{ {"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 },
|
{ {"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 },
|
{ {"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 },
|
{ {"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'},
|
{ {"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'},
|
{ {"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'},
|
{ {"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'},
|
{ {"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},
|
{ {"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},
|
{ {"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},
|
{ {"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},
|
{ {"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},
|
{ {"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'},
|
{ {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'},
|
{ {"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'},
|
{ {"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'},
|
{ {"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},
|
{ {"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'},
|
{ {"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'},
|
{ {"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'},
|
{ {"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},
|
{ {"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},
|
{ {"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'},
|
{ {"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'},
|
{ {"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},
|
{ {"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'},
|
{ {"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},
|
{ {"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'},
|
{ {"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'},
|
{ {"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},
|
{ {"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},
|
{ {"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'},
|
{ {"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'},
|
{ {"verbose", no_argument, NULL, 'v'},
|
||||||
'v', NULL, "Verbose", ONE_DASH },
|
'v', NULL, N_("Verbose"), ONE_DASH },
|
||||||
{ {"volid", required_argument, NULL, 'V'},
|
{ {"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},
|
{ {"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},
|
{ {"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},
|
{ {"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'},
|
{ {"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
|
#ifdef ERIC_neverdef
|
||||||
{ {"transparent-compression", no_argument, NULL, 'z'},
|
{ {"transparent-compression", no_argument, NULL, 'z'},
|
||||||
'z', NULL, "Enable transparent compression of files", ONE_DASH },
|
'z', NULL, "Enable transparent compression of files", ONE_DASH },
|
||||||
#endif
|
#endif
|
||||||
{ {"creation-date", required_argument, NULL, OPTION_CREAT_DATE },
|
{ {"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 },
|
{ {"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 },
|
{ {"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 },
|
{ {"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])
|
#define OPTION_COUNT (sizeof ld_options / sizeof ld_options[0])
|
||||||
|
@ -545,7 +545,7 @@ void usage(){
|
||||||
for (; len < 30; len++)
|
for (; len < 30; len++)
|
||||||
putchar (' ');
|
putchar (' ');
|
||||||
|
|
||||||
printf ("%s\n", ld_options[i].doc);
|
printf ("%s\n", gettext (ld_options[i].doc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
#define _(str) gettext(str)
|
#define _(str) gettext(str)
|
||||||
|
#define N_(str) str
|
||||||
|
|
||||||
/* This symbol is used to indicate that we do not have things like
|
/* This symbol is used to indicate that we do not have things like
|
||||||
symlinks, devices, and so forth available. Just files and dirs */
|
symlinks, devices, and so forth available. Just files and dirs */
|
||||||
|
|
337
video/efi_fb.c
Normal file
337
video/efi_fb.c
Normal 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);
|
||||||
|
}
|
Loading…
Reference in a new issue