merge mainline into nestpart
This commit is contained in:
commit
c9ea504d25
170 changed files with 4270 additions and 3366 deletions
|
@ -25,6 +25,8 @@ docs/version.texi
|
||||||
*.exec
|
*.exec
|
||||||
genkernsyms.sh
|
genkernsyms.sh
|
||||||
gensymlist.sh
|
gensymlist.sh
|
||||||
|
gentrigtables
|
||||||
|
grub-bin2h
|
||||||
grub-dumpbios
|
grub-dumpbios
|
||||||
grub-editenv
|
grub-editenv
|
||||||
grub-emu
|
grub-emu
|
||||||
|
@ -40,8 +42,13 @@ grub-pe2elf
|
||||||
grub-probe
|
grub-probe
|
||||||
grub_probe_init.c
|
grub_probe_init.c
|
||||||
grub_probe_init.h
|
grub_probe_init.h
|
||||||
|
grub-reboot
|
||||||
|
grub-script-check
|
||||||
|
grub_script_check_init.c
|
||||||
|
grub_script_check_init.h
|
||||||
grub_script.tab.c
|
grub_script.tab.c
|
||||||
grub_script.tab.h
|
grub_script.tab.h
|
||||||
|
grub-set-default
|
||||||
grub-setup
|
grub-setup
|
||||||
grub_setup_init.c
|
grub_setup_init.c
|
||||||
grub_setup_init.h
|
grub_setup_init.h
|
||||||
|
@ -62,4 +69,5 @@ stamp-h
|
||||||
stamp-h1
|
stamp-h1
|
||||||
stamp-h.in
|
stamp-h.in
|
||||||
symlist.c
|
symlist.c
|
||||||
|
trigtables.c
|
||||||
update-grub_lib
|
update-grub_lib
|
||||||
|
|
846
ChangeLog
846
ChangeLog
|
@ -1,3 +1,849 @@
|
||||||
|
2010-03-24 Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
|
||||||
|
|
||||||
|
* kern/dl.c (grub_dl_resolve_symbols): Improve error message
|
||||||
|
grammar.
|
||||||
|
|
||||||
|
2010-03-24 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* .bzrignore: Add grub-bin2h, grub-reboot, and grub-set-default.
|
||||||
|
|
||||||
|
2010-03-21 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* util/grub-install.in: Copy .mo files from @datadir@/locale, to
|
||||||
|
match where 'make install' puts them.
|
||||||
|
* util/i386/efi/grub-install.in: Likewise.
|
||||||
|
|
||||||
|
2010-03-19 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* .bzrignore: Add gentrigtables, grub-script-check,
|
||||||
|
grub_script_check_init.c, grub_script_check_init.h, and
|
||||||
|
trigtables.c.
|
||||||
|
|
||||||
|
2010-03-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* kern/parser.c: Indented.
|
||||||
|
|
||||||
|
2010-03-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* term/i386/pc/vesafb.c: Removed (orphaned, deprecated and broken).
|
||||||
|
|
||||||
|
2010-03-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* video/fb/fbblit.c (grub_video_fbblit_blend_XXXA8888_1bit): Handle
|
||||||
|
alpha_mask_size == 0 case.
|
||||||
|
|
||||||
|
2010-03-14 BVK Chaitanya <bvk.groups@gmail.com>
|
||||||
|
|
||||||
|
GRUB shell lexer and parser improvements.
|
||||||
|
|
||||||
|
* conf/any-emu.rmk: Build rule updates.
|
||||||
|
* conf/common.rmk: Likewise.
|
||||||
|
* conf/i386-coreboot.rmk: Likewise.
|
||||||
|
* conf/i386-efi.rmk: Likewise.
|
||||||
|
* conf/i386-ieee1275.rmk: Likewise.
|
||||||
|
* conf/i386-pc.rmk: Likewise.
|
||||||
|
* conf/powerpc-ieee1275.rmk: Likewise.
|
||||||
|
* conf/x86_64-efi.rmk: Likewise.
|
||||||
|
|
||||||
|
* configure.ac: Configure check for flex.
|
||||||
|
|
||||||
|
* include/grub/script_sh.h (grub_script_arg_type_t): More argument
|
||||||
|
types.
|
||||||
|
(grub_lexer_param): Struct member updates.
|
||||||
|
(grub_parser_param): Likewise.
|
||||||
|
(GRUB_LEXER_TOKEN_MAX): Maximum token size.
|
||||||
|
(GRUB_LEXER_RECORD_INCREMENT): Memory increments' size.
|
||||||
|
(grub_script_lexer_init): Prototype update.
|
||||||
|
(grub_script_lexer_record_start): Likewise.
|
||||||
|
(grub_script_lexer_record_stop): Likewise.
|
||||||
|
(grub_script_lexer_yywrap): New function prototype.
|
||||||
|
(grub_script_lexer_fini): Likewise.
|
||||||
|
(grub_script_execute_argument_to_string): Removed by...
|
||||||
|
(grub_script_execute_argument_to_argv): ...better version.
|
||||||
|
|
||||||
|
* script/execute.c (ROUND_UPTO): New macro.
|
||||||
|
(grub_script_execute_cmdline): Out of memory fixes.
|
||||||
|
(grub_script_execute_menuentry): Likewise.
|
||||||
|
(grub_script_execute_argument_to_string): Removed. Update all
|
||||||
|
users by...
|
||||||
|
(grub_script_execute_argument_to_argv): ...better version.
|
||||||
|
* script/function.c (grub_script_function_create): Use
|
||||||
|
grub_script_execute_argument_to_argv instead of
|
||||||
|
grub_script_execute_argument_to_string.
|
||||||
|
|
||||||
|
* script/lexer.c (check_varstate): Removed.
|
||||||
|
(check_textstate): Removed.
|
||||||
|
(grub_script_lexer_record_start): Likewise.
|
||||||
|
(grub_script_lexer_record_stop): Likewise.
|
||||||
|
(recordchar): Replaced with...
|
||||||
|
(grub_script_lexer_record): ...new function.
|
||||||
|
(nextchar): Removed.
|
||||||
|
(grub_script_lexer_init): Rewritten.
|
||||||
|
(grub_script_yylex): Rewritten.
|
||||||
|
(append_newline): New function.
|
||||||
|
(grub_script_lexer_yywrap): New function.
|
||||||
|
(grub_script_lexer_fini): New function.
|
||||||
|
(grub_script_yyerror): Sets error flag.
|
||||||
|
|
||||||
|
* script/yylex.l: New file.
|
||||||
|
(grub_lexer_yyfree): Wrapper for flex yyffre.
|
||||||
|
(grub_lexer_yyalloc): Likewise.
|
||||||
|
(grub_lexer_yyrealloc): Likewise.
|
||||||
|
* script/parser.y: Refactored.
|
||||||
|
|
||||||
|
* script/script.c (grub_script_arg_add): Out of memory fixes.
|
||||||
|
(grub_script_add_arglist): Likewise.
|
||||||
|
(grub_script_create_cmdline): Likewise.
|
||||||
|
(grub_script_create_cmdmenu): Likewise.
|
||||||
|
(grub_script_add_cmd): Likewise.
|
||||||
|
(grub_script_parse): Use grub_script_lexer_fini to deallocated.
|
||||||
|
* util/grub-script-check.c (grub_script_execute_menuentry): Remove
|
||||||
|
unnecessary code.
|
||||||
|
|
||||||
|
* tests/grub_script_echo1.in: New testcase.
|
||||||
|
* tests/grub_script_vars1.in: New testcase.
|
||||||
|
* tests/grub_script_echo_keywords.in: New testcase.
|
||||||
|
|
||||||
|
2010-03-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Remove some redundancy in build system.
|
||||||
|
|
||||||
|
* Makefile.in (TARGET_CFLAGS): Add -ffreestanding.
|
||||||
|
(TARGET_ASFLAGS): Add -nostdinc -fno-builtin.
|
||||||
|
(TARGET_LDFLAGS): Add -nostdlib.
|
||||||
|
(TARGET_IMG_LDFLAGS): Likewise.
|
||||||
|
* commands/lsmmap.c (grub_cmd_lsmmap) [GRUB_MACHINE_EMU]: Don't do
|
||||||
|
anything since mmap isn't available.
|
||||||
|
* conf/any-emu.rmk (kernel_img_SOURCES): Remove commands/boot.c.
|
||||||
|
Add util/time.c.
|
||||||
|
(pkglib_MODULES): Remove reboot.mod.
|
||||||
|
(reboot_mod_SOURCES): Removed.
|
||||||
|
(reboot_mod_CFLAGS): Likewise.
|
||||||
|
(reboot_mod_LDFLAGS): Likewise.
|
||||||
|
* conf/common.rmk (script/lexer.c_DEPENDENCIES): New variable.
|
||||||
|
(MOSTLYCLEANFILES): Add symlist.c kernel_syms.lst.
|
||||||
|
(DEFSYMFILES): Add kernel_syms.lst.
|
||||||
|
(kernel_img_HEADERS): Add common headers.
|
||||||
|
(symlist.c): New target.
|
||||||
|
(kernel_syms.lst): Likewise.
|
||||||
|
(pkglib_MODULES): Add memdisk.mod.
|
||||||
|
(memdisk_mod_SOURCES): New variable.
|
||||||
|
(memdisk_mod_CFLAGS): Likewise.
|
||||||
|
(memdisk_mod_LDFLAGS): Likewise.
|
||||||
|
(pkglib_MODULES): Add reboot.mod.
|
||||||
|
(reboot_mod_SOURCES): New variable.
|
||||||
|
(reboot_mod_CFLAGS): Likewise.
|
||||||
|
(reboot_mod_LDFLAGS): Likewise.
|
||||||
|
(pkglib_MODULES): Add date.mod.
|
||||||
|
(date_mod_SOURCES): New variable.
|
||||||
|
(date_mod_CFLAGS): Likewise.
|
||||||
|
(date_mod_LDFLAGS): Likewise.
|
||||||
|
(pkglib_MODULES): Add datehook.mod.
|
||||||
|
(datehook_mod_SOURCES): New variable.
|
||||||
|
(datehook_mod_CFLAGS): Likewise.
|
||||||
|
(datehook_mod_LDFLAGS): Likewise.
|
||||||
|
(pkglib_MODULES): Add lsmmap.mod.
|
||||||
|
(lsmmap_mod_SOURCES): New variable.
|
||||||
|
(lsmmap_mod_CFLAGS): Likewise.
|
||||||
|
(lsmmap_mod_LDFLAGS): Likewise.
|
||||||
|
(pkglib_MODULES): Add boot.mod.
|
||||||
|
(boot_mod_SOURCES): New variable.
|
||||||
|
(boot_mod_CFLAGS): Likewise.
|
||||||
|
(boot_mod_LDFLAGS): Likewise.
|
||||||
|
* conf/i386-coreboot.rmk: Removed redundant parts.
|
||||||
|
* conf/i386-ieee1275.rmk: Likewise.
|
||||||
|
* conf/i386-pc.rmk: Likewise.
|
||||||
|
* conf/mips-yeeloong.rmk: Likewise.
|
||||||
|
* conf/mips.rmk: Likewise.
|
||||||
|
* conf/powerpc-ieee1275.rmk: Likewise.
|
||||||
|
* conf/sparc64-ieee1275.rmk: Likewise.
|
||||||
|
* conf/x86_64-efi.rmk: Likewise.
|
||||||
|
* conf/i386-coreboot.rmk: Moved qemu parts ..
|
||||||
|
* conf/i386-qemu.rmk: ... here
|
||||||
|
* conf/i386-efi.rmk: Moved common parts to...
|
||||||
|
* conf/x86-efi.rmk: ... here.
|
||||||
|
* conf/i386.rmk: Added modules common to all x86 variants.
|
||||||
|
* configure.ac: Add -m32/-m64 to TARGET_ASFLAGS.
|
||||||
|
* disk/memdisk.c: Remove grub/machine/kernel.h.
|
||||||
|
* gensymlist.sh.in: Include symbol.h.
|
||||||
|
* hook/datehook.c: Correct module name.
|
||||||
|
* include/grub/datetime.h (grub_get_datetime) [GRUB_MACHINE_EMU]: Export.
|
||||||
|
(grub_set_datetime) [GRUB_MACHINE_EMU]: Likewise.
|
||||||
|
* include/grub/i386/efi/serial.h: New file.
|
||||||
|
* include/grub/x86_64/efi/serial.h: Likewise.
|
||||||
|
* util/time.c: Likewise.
|
||||||
|
* video/ieee1275.c (grub_video_ieee1275_setup): Handle 64-bit void *.
|
||||||
|
|
||||||
|
2010-03-14 Colin King <colin.king@ubuntu.com>
|
||||||
|
2010-03-14 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
Shrink the pre-partition-table part of boot.img by eight bytes.
|
||||||
|
|
||||||
|
* boot/i386/pc/boot.S (ERR): New macro.
|
||||||
|
(chs_mode): Use ERR.
|
||||||
|
(geometry_error): Likewise.
|
||||||
|
(hd_probe_error): Remove. This is only used once, so we wrwite
|
||||||
|
it inline instead.
|
||||||
|
(read_error): Instead of printing read_error_string, just set up
|
||||||
|
%si and fall through to ...
|
||||||
|
(error_message): ... this new function, also used by ERR.
|
||||||
|
|
||||||
|
2010-03-14 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
Speed up consecutive hostdisk operations on the same device.
|
||||||
|
|
||||||
|
* util/hostdisk.c (struct grub_util_biosdisk_data): New structure.
|
||||||
|
(grub_util_biosdisk_open): Initialise disk->data.
|
||||||
|
(struct linux_partition_cache): New structure.
|
||||||
|
(linux_find_partition): Cache partition start positions; these are
|
||||||
|
expensive to compute on every read and write.
|
||||||
|
(open_device): Cache open file descriptor in disk->data, so that we
|
||||||
|
don't have to reopen it and flush the buffer cache for consecutive
|
||||||
|
operations on the same device.
|
||||||
|
(grub_util_biosdisk_close): New function.
|
||||||
|
(grub_util_biosdisk_dev): Set `close' member.
|
||||||
|
|
||||||
|
* conf/common.rmk (grub_probe_SOURCES): Add kern/list.c.
|
||||||
|
* conf/i386-efi.rmk (grub_setup_SOURCES): Likewise.
|
||||||
|
* conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
|
||||||
|
* conf/sparc64-ieee1275.rmk (grub_setup_SOURCES): Likewise.
|
||||||
|
* conf/x86_64-efi.rmk (grub_setup_SOURCES): Likewise.
|
||||||
|
|
||||||
|
2010-03-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Compile parts of grub-emu as modules.
|
||||||
|
|
||||||
|
* Makefile.in (TARGET_CPPFLAGS) [emu]: Remove -nostdinc -isystem.
|
||||||
|
(pkglib_DATA) [emu]: Remove moddep.lst command.lst fs.lst
|
||||||
|
partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst.
|
||||||
|
(all-local): Add $(GRUB_EMU).
|
||||||
|
(install-local): Install $(GRUB_EMU).
|
||||||
|
(uninstall): Uninstall $(GRUB_EMU).
|
||||||
|
* commands/parttool.c: Replace GRUB_UTIL with GRUB_NO_MODULES.
|
||||||
|
* kern/dl.c: Likewise.
|
||||||
|
* commands/sleep.c: Not include machine/time.h.
|
||||||
|
* conf/any-emu.rmk (COMMON_LDFLAGS): New variable.
|
||||||
|
(COMMON_CFLAGS): Likewise.
|
||||||
|
(sbin_UTILITIES): Remove grub-emu.
|
||||||
|
(grub_emu_SOURCES): Removed.
|
||||||
|
(kernel_img_RELOCATABLE): New variable.
|
||||||
|
(pkglib_PROGRAMS): Add kernel.img.
|
||||||
|
(kernel_img_SOURCES): New variable
|
||||||
|
(kernel_img_CFLAGS): Likewise.
|
||||||
|
(kernel_img_LDFLAGS): Likewise.
|
||||||
|
(TARGET_NO_STRIP): Likewise.
|
||||||
|
(TARGET_NO_DYNAMIC_MODULES): Likewise.
|
||||||
|
(pkglib_MODULES): Add progname.mod, hostfs.mod, host.mod, reboot.mod,
|
||||||
|
halt.mod, cpuid.mod, usb.mod, sdl.mod and pci.mod.
|
||||||
|
(grub-emu): New target.
|
||||||
|
(GRUB_EMU): New variable.
|
||||||
|
* configure.ac: Whitelist -emu as possible x86_64 architecture.
|
||||||
|
* efiemu/main.c: Replace GRUB_UTIL with GRUB_MACHINE_EMU.
|
||||||
|
* loader/xnu.c: Likewise.
|
||||||
|
* include/grub/pci.h: Likewise.
|
||||||
|
* genemuinit.sh: New file.
|
||||||
|
* genemuinitheader.sh: Likewise.
|
||||||
|
* genmk.rb: Don't strip if TARGET_NO_STRIP is yes.
|
||||||
|
Support TARGET_NO_DYNAMIC_MODULES.
|
||||||
|
* include/grub/dl.h (GRUB_NO_MODULES): New variable.
|
||||||
|
* commands/search.c: Fix GRUB_MOD_INIT and GRUB_MOD_FINI arguments.
|
||||||
|
* disk/loopback.c: Likewise.
|
||||||
|
* font/font_cmd.c: Likewise.
|
||||||
|
* partmap/acorn.c: Likewise.
|
||||||
|
* partmap/amiga.c: Likewise.
|
||||||
|
* partmap/apple.c: Likewise.
|
||||||
|
* partmap/gpt.c: Likewise.
|
||||||
|
* partmap/msdos.c: Likewise.
|
||||||
|
* partmap/sun.c: Likewise.
|
||||||
|
* parttool/msdospart.c: Likewise.
|
||||||
|
* term/gfxterm.c: Likewise.
|
||||||
|
* video/bitmap.c: Likewise.
|
||||||
|
* video/readers/jpeg.c: Likewise.
|
||||||
|
* video/readers/png.c: Likewise.
|
||||||
|
* video/readers/tga.c: Likewise.
|
||||||
|
* video/video.c: Likewise.
|
||||||
|
* util/grub-emu.c (read_command_list): Removed.
|
||||||
|
(main): Don't call util_init_nls.
|
||||||
|
* util/misc.c (grub_err_printf) [!GRUB_UTIL]: Removed.
|
||||||
|
(grub_util_init_nls) [!GRUB_UTIL]: Likewise.
|
||||||
|
|
||||||
|
2010-03-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add datetime.mod,
|
||||||
|
date.mod, datehook.mod.
|
||||||
|
(datetime_mod_SOURCES): New variable.
|
||||||
|
(datetime_mod_CFLAGS): Likewise.
|
||||||
|
(datetime_mod_LDFLAGS): Likewise.
|
||||||
|
(date_mod_SOURCES): Likewise.
|
||||||
|
(date_mod_CFLAGS): Likewise.
|
||||||
|
(date_mod_LDFLAGS): Likewise.
|
||||||
|
(datehook_mod_SOURCES): Likewise.
|
||||||
|
(datehook_mod_CFLAGS): Likewise.
|
||||||
|
(datehook_mod_LDFLAGS): Likewise.
|
||||||
|
* conf/sparc64-ieee1275.rmk: Likewise.
|
||||||
|
* lib/ieee1275/datetime.c: New file.
|
||||||
|
|
||||||
|
2010-03-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add ieee1275_fb.mod.
|
||||||
|
(ieee1275_fb_mod_SOURCES): New variable.
|
||||||
|
(ieee1275_fb_mod_CFLAGS): Likewise.
|
||||||
|
(ieee1275_fb_mod_LDFLAGS): Likewise.
|
||||||
|
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_devices_iterate):
|
||||||
|
New proto.
|
||||||
|
* kern/ieee1275/init.c (HEAP_MAX_SIZE): Increased.
|
||||||
|
(HEAP_MAX_ADDR): Likewise.
|
||||||
|
* kern/ieee1275/openfw.c (grub_children_iterate): Don't skip empty
|
||||||
|
type.
|
||||||
|
Correct stop condition.
|
||||||
|
(grub_ieee1275_devices_iterate): New function.
|
||||||
|
* video/ieee1275.c: New file.
|
||||||
|
|
||||||
|
2010-03-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Merge sparc grub-mkimage into generic grub-mkimage and a.out support.
|
||||||
|
|
||||||
|
* boot/sparc64/ieee1275/boot.S (boot_continue): Use SCRATCH_PAD_BOOT
|
||||||
|
as scratch.
|
||||||
|
* boot/sparc64/ieee1275/diskboot.S (after_info_block): Use
|
||||||
|
SCRATCH_PAD_DISKBOOT as scratch.
|
||||||
|
(bootit): Pass Openfirmware pointer in %o4.
|
||||||
|
* conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link at 0x4400 instead
|
||||||
|
of 0x200000.
|
||||||
|
(grub_mkimage_SOURCES): Replace util/sparc64/ieee1275/grub-mkimage.c
|
||||||
|
with util/grub-mkrawimage.c.
|
||||||
|
* configure.ac: Handle GRUB_MACHINE_SPARC64 and GRUB_MACHINE_MIPS.
|
||||||
|
* include/grub/aout.h (AOUT_MID_SUN): New definition.
|
||||||
|
(grub_aout_get_type) [GRUB_UTIL]: Removed.
|
||||||
|
(grub_aout_load) [GRUB_UTIL]: Likewise.
|
||||||
|
* include/grub/kernel.h (grub_modules_get_end): New proto.
|
||||||
|
* include/grub/sparc64/ieee1275/boot.h (SCRATCH_PAD): Removed.
|
||||||
|
(SCRATCH_PAD_BOOT): New definition.
|
||||||
|
(SCRATCH_PAD_DISKBOOT): Likewise.
|
||||||
|
(GRUB_BOOT_MACHINE_IMAGE_ADDRESS): Set to 0x4400.
|
||||||
|
* include/grub/sparc64/ieee1275/ieee1275.h
|
||||||
|
(grub_ieee1275_original_stack): New variable
|
||||||
|
* include/grub/sparc64/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
|
||||||
|
New definition
|
||||||
|
(GRUB_KERNEL_MACHINE_STACK_SIZE): Likewise.
|
||||||
|
(GRUB_PLATFORM_IMAGE_FORMATS): Likewise.
|
||||||
|
(GRUB_PLATFORM_IMAGE_DEFAULT_FORMAT): Likewise.
|
||||||
|
(GRUB_PLATFORM_IMAGE_DEFAULT): Likewise.
|
||||||
|
(GRUB_PLATFORM_IMAGE_RAW): Likewise.
|
||||||
|
(GRUB_PLATFORM_IMAGE_AOUT): Likewise.
|
||||||
|
(grub_platform_image_format_t): New type.
|
||||||
|
* kern/mips/yeeloong/init.c (grub_modules_get_end): Move from here ...
|
||||||
|
* kern/main.c (grub_modules_get_end)
|
||||||
|
[GRUB_MACHINE_MIPS_YEELOONG || GRUB_MACHINE_SPARC64]: ... here.
|
||||||
|
* kern/sparc64/ieee1275/crt0.S: Store firmware entry point in %o0.
|
||||||
|
(codestart): Switch stacks.
|
||||||
|
* kern/sparc64/ieee1275/init.c (grub_ieee1275_original_stack): New
|
||||||
|
variable.
|
||||||
|
(grub_heap_init): Use grub_modules_get_end.
|
||||||
|
* loader/sparc64/ieee1275/linux.c (grub_linux_boot): Restore original
|
||||||
|
stack.
|
||||||
|
* util/grub-mkrawimage.c (generate_image): Support sparc64.
|
||||||
|
(main): Likewise.
|
||||||
|
* util/sparc64/ieee1275/grub-mkimage.c: Removed.
|
||||||
|
|
||||||
|
2010-03-14 Thorsten Glaser <tg@mirbsd.org>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Base ISO UUID on UTC.
|
||||||
|
|
||||||
|
2010-03-08 Matt Kraai <kraai@ftbfs.org>
|
||||||
|
|
||||||
|
* util/i386/pc/grub-setup.c (setup): Fix a grammatical error (Debian
|
||||||
|
bug #559005).
|
||||||
|
|
||||||
|
2010-03-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* genmoddep.awk: Output all missing symbols and not only first.
|
||||||
|
|
||||||
|
2010-03-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* NEWS: Put the date of 1.98 release.
|
||||||
|
|
||||||
|
2010-03-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* configure.ac: Update CPPFLAGS and not CFLAGS when checking for
|
||||||
|
ft2build.h.
|
||||||
|
|
||||||
|
2010-03-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* normal/cmdline.c (grub_cmdline_get): Fix gabled line after
|
||||||
|
completition in the middle of string.
|
||||||
|
|
||||||
|
2010-03-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Use mktemp with explicit template.
|
||||||
|
|
||||||
|
2010-03-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* loader/i386/bsd.c (grub_bsd_get_device): Fix a memory leak.
|
||||||
|
|
||||||
|
2010-03-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* loader/i386/multiboot_mbi.c (grub_multiboot_set_bootdev): Free the
|
||||||
|
right pointer.
|
||||||
|
|
||||||
|
2010-03-05 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Fix FreeBSD compilation.
|
||||||
|
|
||||||
|
* Makefile.in (TARGET_CPPFLAGS): Remove -nostdinc -isystem.
|
||||||
|
* configure.ac: Add -nostdinc -isystem to TARGET_CPPFLAGS if it works.
|
||||||
|
|
||||||
|
2010-03-05 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/import_gcry.py: Add autogenerated files to MAINTAINER_CLEANFILES.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* gettext/gettext.c (grub_gettext_init_ext): Fix a memory leak.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* disk/scsi.c (grub_scsi_iterate): Fix a memory leak.
|
||||||
|
|
||||||
|
2010-03-04 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Support relative image path in theme file.
|
||||||
|
|
||||||
|
* gfxmenu/gui_image.c (grub_gui_image): New member theme_dir.
|
||||||
|
(image_set_property): Handle theme_dir and relative path.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* configure.ac: Alias amd64 to x86_64.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* NEWS: mention multiboot on EFI.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* kern/main.c (grub_load_modules): Handle errors from init functions of
|
||||||
|
embeded modules.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* normal/autofs.c (autoload_fs_module): Handle errors.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Disable linux.mod on qemu-mips since it's not functional and leads
|
||||||
|
to compilation failure.
|
||||||
|
|
||||||
|
* conf/mips.rmk (pkglib_MODULES): Remove linux.mod.
|
||||||
|
* conf/mips-yeeloong.rmk (pkglib_MODULES): Add linux.mod.
|
||||||
|
* conf/mips.rmk (linux_mod_SOURCES): Move from here ...
|
||||||
|
* conf/mips-yeeloong.rmk (linux_mod_SOURCES): ... here
|
||||||
|
* conf/mips.rmk (linux_mod_CFLAGS): Move from here ...
|
||||||
|
* conf/mips-yeeloong.rmk (linux_mod_CFLAGS): ... here
|
||||||
|
* conf/mips.rmk (linux_mod_ASFLAGS): Move from here ...
|
||||||
|
* conf/mips-yeeloong.rmk (linux_mod_ASFLAGS): ... here
|
||||||
|
* conf/mips.rmk (linux_mod_LDFLAGS): Move from here ...
|
||||||
|
* conf/mips-yeeloong.rmk (linux_mod_LDFLAGS): ... here
|
||||||
|
Reported by: BVK Chaitanya
|
||||||
|
|
||||||
|
2010-03-04 Jordan Uggla <jordan.uggla@gmail.com>
|
||||||
|
|
||||||
|
* INSTALL: Add gettext as a dependency and add qemu to a new section
|
||||||
|
"Prerequisites for make-check".
|
||||||
|
|
||||||
|
2010-03-04 Christian Franke <franke@computer.org>
|
||||||
|
|
||||||
|
* util/grub-pe2elf.c: Add missing include "progname.h".
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* normal/crypto.c (read_crypto_list): Fix a typo.
|
||||||
|
Reported by: Seth Goldberg.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* Makefile.in (DISTCLEANFILES): Add stamp-h1.
|
||||||
|
Reported by: Seth Goldberg.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* Makefile.in (CLEANFILES) [FONT_SOURCE && grub_mkfont]: Add
|
||||||
|
ascii.bitmaps.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* genmk.rb: Remove terminal*.lst in make clean.
|
||||||
|
Reported by: Seth Goldberg.
|
||||||
|
|
||||||
|
2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/i386/efi/grub-install.in: Copy gettext files.
|
||||||
|
|
||||||
|
2010-03-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* fs/ext2.c (grub_ext2_read_block): Fix an integer overflow.
|
||||||
|
|
||||||
|
2010-03-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Wait for user entry basing on presence of output rather than on errors.
|
||||||
|
|
||||||
|
* include/grub/normal.h (grub_normal_get_line_counter): New proto.
|
||||||
|
(grub_install_newline_hook): Likewise.
|
||||||
|
* normal/main.c (GRUB_MOD_INIT): Call grub_install_newline_hook.
|
||||||
|
* normal/menu.c (show_menu): Check line_counter to determine presence
|
||||||
|
of output.
|
||||||
|
* normal/term.c (grub_normal_line_counter): New variable.
|
||||||
|
(grub_normal_get_line_counter): New function.
|
||||||
|
(grub_install_newline_hook): Likewise.
|
||||||
|
|
||||||
|
2010-03-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* commands/cat.c (grub_cmd_cat): Propagate grub_gzfile_open error.
|
||||||
|
|
||||||
|
2010-03-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* configure.ac: Update version to 1.98.
|
||||||
|
|
||||||
|
2010-02-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub.d/10_linux.in (linux_entry): Don't default to
|
||||||
|
gfxpayload=keep if Linux doesn't support video handover.
|
||||||
|
|
||||||
|
2010-02-25 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Don't compile video modules on yeeloong since video subsystem is part
|
||||||
|
of kernel.
|
||||||
|
|
||||||
|
* conf/common.rmk (pkglib_MODULES) [yeeloong]: Remove video.mod,
|
||||||
|
video_fb.mod, bitmap.mod, font.mod, gfxterm.mod and bufio.mod
|
||||||
|
* conf/mips-yeeloong.rmk (kernel_img_HEADERS): Add bitmap.h,
|
||||||
|
video.h, gfxterm.h, font.h, bitmap_scale.h and bufio.h.
|
||||||
|
* conf/mips.rmk (kernel_img_HEADERS): Add values instead of overwriting.
|
||||||
|
* include/grub/bitmap.h: Add EXPORT_FUNC and EXPORT_VAR.
|
||||||
|
* include/grub/bitmap_scale.h: Likewise.
|
||||||
|
* include/grub/bufio.h: Likewise.
|
||||||
|
* include/grub/font.h: Likewise.
|
||||||
|
* include/grub/gfxterm.h: Likewise.
|
||||||
|
* include/grub/video.h: Likewise.
|
||||||
|
* include/grub/vbe.h: Don't include video_fb.h.
|
||||||
|
* video/i386/pc/vbe.c: Include video_fb.h.
|
||||||
|
* commands/i386/pc/vbetest.c: Include video.h.
|
||||||
|
|
||||||
|
2010-02-25 Jordan Uggla <jordan.uggla@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-mkconfig.in (GRUB_SAVEDEFAULT): Export new variable.
|
||||||
|
* util/grub-mkconfig_lib.in (save_default_entry): Only save a new
|
||||||
|
default entry if GRUB_SAVEDEFAULT=true. This allows using
|
||||||
|
GRUB_DEFAULT=saved on its own to let grub-reboot work, without
|
||||||
|
saving a new default on every boot.
|
||||||
|
|
||||||
|
2010-02-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* normal/crypto.c (read_crypto_list): Fix a memory leak.
|
||||||
|
* normal/term.c (read_terminal_list): Likewise.
|
||||||
|
* normal/main.c (grub_normal_init_page): Likewise.
|
||||||
|
(grub_normal_read_line_real): Likewise.
|
||||||
|
|
||||||
|
2010-02-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* loader/i386/multiboot_mbi.c (grub_multiboot_set_bootdev): Fix a
|
||||||
|
memory leak.
|
||||||
|
Reported by: Seth Goldberg.
|
||||||
|
|
||||||
|
2010-02-24 Joey Korkames <joey+lists@kidfixit.com>
|
||||||
|
|
||||||
|
* term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Remove
|
||||||
|
duplicate declaration of `start'.
|
||||||
|
|
||||||
|
2010-02-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* fs/iso9660.c (grub_iso9660_iterate_dir): Strip version from joliet
|
||||||
|
filename.
|
||||||
|
Reported by: Georgy Buranov
|
||||||
|
|
||||||
|
2010-02-20 Carles Pina i Estany <carles@pina.cat>
|
||||||
|
|
||||||
|
* util/grub-mkrawimage.c (usage): Change string formatting to
|
||||||
|
improve gettext.
|
||||||
|
|
||||||
|
2010-02-20 Manoel Rebelo Abranches <mrabran@br.ibm.com>
|
||||||
|
|
||||||
|
* term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Add delete and
|
||||||
|
backspace keys.
|
||||||
|
|
||||||
|
2010-02-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* video/fb/video_fb.c (grub_video_fb_scroll): Fix a pixel size bug.
|
||||||
|
Reported by: Michael Suchanek.
|
||||||
|
|
||||||
|
2010-02-18 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
|
* util/grub-mkconfig.in: Export GRUB_INIT_TUNE.
|
||||||
|
* util/grub.d/00_header.in: Handle GRUB_INIT_TUNE.
|
||||||
|
|
||||||
|
2010-02-16 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Remove any reference to non-free fonts.
|
||||||
|
|
||||||
|
* commands/videotest.c (grub_cmd_videotest): Use unifont by default.
|
||||||
|
* docs/gfxmenu-theme-example.txt: Removed. It's both outdated and
|
||||||
|
uses non-free components.
|
||||||
|
* font/font.c (grub_font_get_name): Remove example name.
|
||||||
|
* gfxmenu/gui_label.c (grub_gui_label_new): Use unifont by default.
|
||||||
|
* gfxmenu/gui_list.c (grub_gui_list_new): Likewise.
|
||||||
|
* gfxmenu/gui_progress_bar.c (grub_gui_progress_bar_new): Likewise.
|
||||||
|
* gfxmenu/view.c (grub_gfxmenu_view_new): Likewise.
|
||||||
|
|
||||||
|
2010-02-16 Georgy Buranov <gburanov@gmail.com>
|
||||||
|
|
||||||
|
* disk/efi/efidisk.c (grub_efidisk_get_device_name): Fix a typo.
|
||||||
|
|
||||||
|
2010-02-15 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* term/serial.c (serial_get_divisor) [GRUB_MACHINE_MIPS_YEELOONG]:
|
||||||
|
Double divisor.
|
||||||
|
(serial_hw_init) [GRUB_MACHINE_MIPS_YEELOONG]: Don't enable advanced
|
||||||
|
features.
|
||||||
|
(GRUB_MOD_INIT) [GRUB_MACHINE_MIPS_YEELOONG]: Default to 115200.
|
||||||
|
|
||||||
|
2010-02-15 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* gensymlist.sh.in: Use TARGET_CC instead of CC.
|
||||||
|
|
||||||
|
2010-02-14 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
|
* commands/i386/pc/play.c (GRUB_MOD_INIT(play)): Fix help.
|
||||||
|
* docs/grub.texi (Command-line and menu entry commands): Document play
|
||||||
|
command.
|
||||||
|
|
||||||
|
2010-02-14 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
|
* commands/i386/pc/play.c (grub_cmd_play): If grub_file_open fails,
|
||||||
|
parse arguments as inline tempo and notes. Move code for playing notes
|
||||||
|
to...
|
||||||
|
(play): ... new function.
|
||||||
|
|
||||||
|
2010-02-14 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
|
* commands/i386/pc/play.c (T_REST, T_FINE, struct note, beep_on): Use
|
||||||
|
grub_uint16_t instead of short.
|
||||||
|
(grub_cmd_play): Use grub_uint32_t instead of int, convert data from
|
||||||
|
disk from little endian to cpu endianness.
|
||||||
|
|
||||||
|
2010-02-07 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
|
* commands/i386/pc/play.c (BASE_TEMPO): Set to 60 *
|
||||||
|
GRUB_TICKS_PER_SECOND instead of 120.
|
||||||
|
|
||||||
|
2010-02-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Wait for possible
|
||||||
|
escape sequence after \e.
|
||||||
|
|
||||||
|
2010-02-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* term/ieee1275/ofconsole.c (grub_ofconsole_putchar): Don't output
|
||||||
|
non-ASCII characters.
|
||||||
|
|
||||||
|
2010-02-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Enclose
|
||||||
|
set root in single quotes to prevent \, from being unescaped.
|
||||||
|
|
||||||
|
2010-02-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Prevent unknown commands from stopping menuentry execution.
|
||||||
|
|
||||||
|
* script/execute.c (grub_script_execute_cmdline): Print error after
|
||||||
|
unknown command.
|
||||||
|
|
||||||
|
2010-02-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* fs/i386/pc/pxe.c (GRUB_MOD_INIT): Fix typo.
|
||||||
|
Reported by: Pavel Pisa.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* io/gzio.c (grub_gzio_open): Use grub_zalloc.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Merge grub_ieee1275_map_physical into grub_map and rename to
|
||||||
|
grub_ieee1275_map
|
||||||
|
|
||||||
|
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_map): New proto.
|
||||||
|
* include/grub/sparc64/ieee1275/ieee1275.h (grub_ieee1275_map_physical):
|
||||||
|
Remove.
|
||||||
|
* kern/ieee1275/openfw.c (grub_map): Rename to ...
|
||||||
|
(grub_ieee1275_map): ... this. All users updated. Add phys_lo when
|
||||||
|
necessary.
|
||||||
|
* kern/sparc64/ieee1275/ieee1275.c (grub_ieee1275_map_physical): Remove.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* disk/ieee1275/ofdisk.c (grub_ofdisk_open): Check device type before
|
||||||
|
opening and not after.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Macroify
|
||||||
|
constants.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* loader/sparc64/ieee1275/linux.c (align_addr): Remove.
|
||||||
|
(alloc_phys): Use ALIGN_UP instead of align_addr.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* loader/sparc64/ieee1275/linux.c (alloc_phys): Correct bounds checking.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* kern/sparc64/ieee1275/crt0.S (codestart): Move modules backwards.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* disk/ieee1275/ofdisk.c (grub_ofdisk_read): Remove excessively
|
||||||
|
verbose dprintf.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Fix over-4GiB seek on sparc64.
|
||||||
|
|
||||||
|
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_seek):
|
||||||
|
Replace pos_i and pos_lo with pos. All users updated.
|
||||||
|
* include/grub/powerpc/ieee1275/ieee1275.h (GRUB_IEEE1275_CELL_SIZEOF):
|
||||||
|
New constant.
|
||||||
|
* include/grub/sparc64/ieee1275/ieee1275.h (GRUB_IEEE1275_CELL_SIZEOF):
|
||||||
|
Likewise.
|
||||||
|
* kern/ieee1275/ieee1275.c (grub_ieee1275_seek): Split pos into pos_hi
|
||||||
|
and pos_lo.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-mkrawimage.c (main): Call set_program_name.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Properly align 64-bit targets.
|
||||||
|
|
||||||
|
* util/grub-mkrawimage.c (ALIGN_ADDR): New macro.
|
||||||
|
(generate_image): Use ALIGN_ADDR.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Properly create cross-endian images.
|
||||||
|
|
||||||
|
* include/grub/types.h (grub_host_to_target_addr): New macro
|
||||||
|
* util/grub-mkrawimage.c (generate_image): Add missing host_to_target.
|
||||||
|
|
||||||
|
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-mkrawimage.c (generate_image): Add forgotten ALIGN_UP.
|
||||||
|
|
||||||
|
2010-02-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Pass SIMPLE framebuffer size in bytes and not 64K blocks.
|
||||||
|
|
||||||
|
* loader/i386/efi/linux.c (grub_linux_setup_video): Don't divide by 64K.
|
||||||
|
* loader/i386/linux.c (grub_linux_setup_video): Likewise.
|
||||||
|
(grub_linux_boot): Divide by 64K when on VESA.
|
||||||
|
|
||||||
|
2010-02-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Support GRUB_GFXPAYLOAD_LINUX.
|
||||||
|
|
||||||
|
* util/grub-mkconfig.in: Export GRUB_GFXPAYLOAD_LINUX.
|
||||||
|
* util/grub.d/10_linux.in (linux_entry): Handle GRUB_GFXPAYLOAD_LINUX.
|
||||||
|
|
||||||
|
2010-02-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* script/execute.c (grub_script_execute_cmdline): Use grub_print_error
|
||||||
|
to show messages instead of discarding them.
|
||||||
|
Process errors after executing command and not before. Keep old method
|
||||||
|
too as precaution.
|
||||||
|
|
||||||
|
2010-02-09 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* configure.ac: Check for ft2build.h.
|
||||||
|
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* kern/ieee1275/openfw.c (grub_halt): Try executing "poweroff".
|
||||||
|
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* genkernsyms.sh.in: Use TARGET_CC.
|
||||||
|
|
||||||
|
2010-02-07 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* NEWS: Update.
|
||||||
|
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* include/grub/multiboot2.h: Remove leftover file.
|
||||||
|
* include/grub/normal.h [GRUB_UTIL]: Remove leftover declarations.
|
||||||
|
* include/grub/partition.h [GRUB_UTIL]: Likewise.
|
||||||
|
|
||||||
|
2010-02-07 Yves Blusseau <blusseau@zetam.org>
|
||||||
|
|
||||||
|
* gnulib/getdelim.c: add missing header (type ssize_t must be defined).
|
||||||
|
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Fix warnings in grub-emu when compiling with maximum warning options.
|
||||||
|
|
||||||
|
* util/grub-emu.c (ENABLE_RELOCATABLE): New definition.
|
||||||
|
(grub_arch_modules_addr): Return 0 and not NULL.
|
||||||
|
* util/misc.c (ENABLE_RELOCATABLE): New definition.
|
||||||
|
(xstrdup): Use newstr instead of dup.
|
||||||
|
* util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Rename one instance
|
||||||
|
of disk to dsk to avoid shadowing.
|
||||||
|
(find_free_slot): Fix prototype.
|
||||||
|
* util/getroot.c (grub_util_is_dmraid): Make static.
|
||||||
|
* include/grub/time.h (grub_get_rtc) [GRUB_MACHINE_EMU || GRUB_UTIL]:
|
||||||
|
Add missing prototype.
|
||||||
|
* util/sdl.c (grub_video_sdl_set_viewport): Remove.
|
||||||
|
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* loader/i386/linux.c (grub_linux_setup_video): Handle error
|
||||||
|
appropriately.
|
||||||
|
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* fs/reiserfs.c (grub_reiserfs_read): Use #if 0 instead of commenting
|
||||||
|
code out.
|
||||||
|
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* include/grub/cache.h (grub_arch_sync_caches) [i386 || x86_64]: Inline.
|
||||||
|
* kern/i386/coreboot/init.c (grub_arch_sync_caches): Remove.
|
||||||
|
* kern/i386/efi/init.c (grub_arch_sync_caches): Likewise.
|
||||||
|
* kern/i386/ieee1275/init.c (grub_arch_sync_caches): Likewise.
|
||||||
|
* kern/i386/pc/init.c (grub_arch_sync_caches): Likewise.
|
||||||
|
* util/misc.c (grub_arch_sync_caches) [i386 || x86_64]: Likewise.
|
||||||
|
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* include/grub/err.h (grub_err_printf): Don't export.
|
||||||
|
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* include/grub/dl.h (grub_dl_register_symbol): Don't export.
|
||||||
|
|
||||||
|
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* include/grub/i18n.h (grub_gettext_dummy): Removed.
|
||||||
|
* kern/misc.c (grub_gettext_dummy): Make static.
|
||||||
|
|
||||||
|
2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* kern/misc.c (grub_utf8_to_ucs4): Don't eat valid characters preceeded
|
||||||
|
by non-valid ones.
|
||||||
|
* kern/term.c (grub_putchar): Likewise.
|
||||||
|
|
||||||
2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* partmap/sun.c (sun_partition_map_iterate): Restructure flow to fix
|
* partmap/sun.c (sun_partition_map_iterate): Restructure flow to fix
|
||||||
|
|
5
INSTALL
5
INSTALL
|
@ -14,6 +14,7 @@ configuring the GRUB.
|
||||||
* GCC 4.1.3 or later
|
* GCC 4.1.3 or later
|
||||||
* GNU Make
|
* GNU Make
|
||||||
* GNU Bison 2.3 or later
|
* GNU Bison 2.3 or later
|
||||||
|
* GNU gettext 0.17 or later
|
||||||
* GNU binutils 2.9.1.0.23 or later
|
* GNU binutils 2.9.1.0.23 or later
|
||||||
* Other standard GNU/Unix tools
|
* Other standard GNU/Unix tools
|
||||||
|
|
||||||
|
@ -25,6 +26,10 @@ need the following.
|
||||||
* Autoconf 2.60 or later
|
* Autoconf 2.60 or later
|
||||||
* Automake 1.10.1 or later
|
* Automake 1.10.1 or later
|
||||||
|
|
||||||
|
Prerequisites for make-check:
|
||||||
|
|
||||||
|
* qemu, specifically the binary 'qemu-system-i386'
|
||||||
|
|
||||||
Configuring the GRUB
|
Configuring the GRUB
|
||||||
====================
|
====================
|
||||||
|
|
||||||
|
|
21
Makefile.in
21
Makefile.in
|
@ -84,16 +84,16 @@ LDFLAGS = @LDFLAGS@ $(LIBS)
|
||||||
CPPFLAGS = @CPPFLAGS@ -I$(builddir) -I$(builddir)/include -I$(srcdir)/gnulib -I$(srcdir)/include -Wall -W \
|
CPPFLAGS = @CPPFLAGS@ -I$(builddir) -I$(builddir)/include -I$(srcdir)/gnulib -I$(srcdir)/include -Wall -W \
|
||||||
-DGRUB_LIBDIR=\"$(pkglibdir)\" -DLOCALEDIR=\"$(localedir)\"
|
-DGRUB_LIBDIR=\"$(pkglibdir)\" -DLOCALEDIR=\"$(localedir)\"
|
||||||
TARGET_CC = @TARGET_CC@
|
TARGET_CC = @TARGET_CC@
|
||||||
TARGET_CFLAGS = @TARGET_CFLAGS@
|
TARGET_CFLAGS = -ffreestanding @TARGET_CFLAGS@
|
||||||
TARGET_ASFLAGS = @TARGET_ASFLAGS@
|
TARGET_ASFLAGS = -nostdinc -fno-builtin @TARGET_ASFLAGS@
|
||||||
TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
|
TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
|
||||||
TARGET_APPLE_CC = @TARGET_APPLE_CC@
|
TARGET_APPLE_CC = @TARGET_APPLE_CC@
|
||||||
OBJCONV = @OBJCONV@
|
OBJCONV = @OBJCONV@
|
||||||
TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include) -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \
|
TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \
|
||||||
-Wall -W
|
-Wall -W
|
||||||
TARGET_LDFLAGS = @TARGET_LDFLAGS@
|
TARGET_LDFLAGS = -nostdlib @TARGET_LDFLAGS@
|
||||||
TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
|
TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
|
||||||
TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@
|
TARGET_IMG_LDFLAGS = -nostdlib @TARGET_IMG_LDFLAGS@
|
||||||
TARGET_IMG_CFLAGS = @TARGET_IMG_CFLAGS@
|
TARGET_IMG_CFLAGS = @TARGET_IMG_CFLAGS@
|
||||||
TARGET_OBJ2ELF = @TARGET_OBJ2ELF@
|
TARGET_OBJ2ELF = @TARGET_OBJ2ELF@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
@ -147,7 +147,7 @@ INFOS = $(info_INFOS)
|
||||||
CLEANFILES =
|
CLEANFILES =
|
||||||
MOSTLYCLEANFILES =
|
MOSTLYCLEANFILES =
|
||||||
DISTCLEANFILES = config.status config.cache config.log config.h \
|
DISTCLEANFILES = config.status config.cache config.log config.h \
|
||||||
Makefile stamp-h include/grub/cpu include/grub/machine \
|
Makefile stamp-h stamp-h1 include/grub/cpu include/grub/machine \
|
||||||
gensymlist.sh genkernsyms.sh build_env.mk \
|
gensymlist.sh genkernsyms.sh build_env.mk \
|
||||||
docs/grub.info docs/version.texi docs/stamp-vti
|
docs/grub.info docs/version.texi docs/stamp-vti
|
||||||
|
|
||||||
|
@ -178,7 +178,9 @@ endif
|
||||||
### General targets.
|
### General targets.
|
||||||
|
|
||||||
CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA) po/*.mo
|
CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA) po/*.mo
|
||||||
|
ifneq ($(platform), emu)
|
||||||
pkglib_DATA += moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst
|
pkglib_DATA += moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst
|
||||||
|
endif
|
||||||
moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk
|
moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk
|
||||||
cat $(DEFSYMFILES) /dev/null \
|
cat $(DEFSYMFILES) /dev/null \
|
||||||
| $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \
|
| $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \
|
||||||
|
@ -239,6 +241,7 @@ else
|
||||||
ifeq ($(enable_grub_mkfont),yes)
|
ifeq ($(enable_grub_mkfont),yes)
|
||||||
|
|
||||||
pkgdata_DATA += unicode.pf2 ascii.pf2 ascii.h
|
pkgdata_DATA += unicode.pf2 ascii.pf2 ascii.h
|
||||||
|
CLEANFILES += ascii.bitmaps
|
||||||
|
|
||||||
# Arrows and lines are needed to draw the menu, so we always include them
|
# Arrows and lines are needed to draw the menu, so we always include them
|
||||||
UNICODE_ARROWS=0x2190-0x2193
|
UNICODE_ARROWS=0x2190-0x2193
|
||||||
|
@ -278,7 +281,7 @@ build_env.mk: Makefile
|
||||||
) > $@
|
) > $@
|
||||||
pkglib_BUILDDIR += config.h grub_script.tab.h
|
pkglib_BUILDDIR += config.h grub_script.tab.h
|
||||||
|
|
||||||
all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(INFOS) $(MKFILES) $(foreach lang, $(LINGUAS), po/$(lang).mo)
|
all-local: $(PROGRAMS) $(GRUB_EMU) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(INFOS) $(MKFILES) $(foreach lang, $(LINGUAS), po/$(lang).mo)
|
||||||
|
|
||||||
install: install-local
|
install: install-local
|
||||||
|
|
||||||
|
@ -299,7 +302,7 @@ install-local: all
|
||||||
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
|
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
|
||||||
done
|
done
|
||||||
$(SHELL) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
|
$(SHELL) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
|
||||||
@list='$(bin_UTILITIES)'; for file in $$list; do \
|
@list='$(bin_UTILITIES) $(GRUB_EMU)'; 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; \
|
||||||
dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
|
dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
|
||||||
$(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
|
$(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
|
||||||
|
@ -375,7 +378,7 @@ uninstall:
|
||||||
dest="`echo $$file | sed 's,.*/,,'`"; \
|
dest="`echo $$file | sed 's,.*/,,'`"; \
|
||||||
rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
|
rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
|
||||||
done
|
done
|
||||||
@list='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in $$list; do \
|
@list='$(bin_UTILITIES) $(bin_SCRIPTS) $(GRUB_EMU)'; for file in $$list; do \
|
||||||
dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
|
dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
|
||||||
rm -f $(DESTDIR)$(bindir)/$$dest; \
|
rm -f $(DESTDIR)$(bindir)/$$dest; \
|
||||||
rm -f $(DESTDIR)$(mandir)/man1/$$dest.1; \
|
rm -f $(DESTDIR)$(mandir)/man1/$$dest.1; \
|
||||||
|
|
19
NEWS
19
NEWS
|
@ -1,4 +1,21 @@
|
||||||
New in 1.98:
|
New in 1.98 - 2010-03-06:
|
||||||
|
|
||||||
|
* Multiboot on EFI support.
|
||||||
|
|
||||||
|
* Graphical menu support.
|
||||||
|
|
||||||
|
* MIPS support.
|
||||||
|
|
||||||
|
* Saved default menu entry support, with new utilities `grub-reboot' and
|
||||||
|
`grub-set-default'.
|
||||||
|
|
||||||
|
* Unit testing framework.
|
||||||
|
|
||||||
|
* Support for multiple terminals.
|
||||||
|
|
||||||
|
* Encrypted password support, with a new utility `grub-mkpasswd-pbkdf2'.
|
||||||
|
|
||||||
|
* `grub-mkfloppy' removed; use `grub-mkrescue' to create floppy images.
|
||||||
|
|
||||||
* Add grub-probe support for GNU/Hurd.
|
* Add grub-probe support for GNU/Hurd.
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
/* Print message string */
|
/* Print message string */
|
||||||
#define MSG(x) movw $x, %si; call LOCAL(message)
|
#define MSG(x) movw $x, %si; call LOCAL(message)
|
||||||
|
#define ERR(x) movw $x, %si; jmp LOCAL(error_message)
|
||||||
|
|
||||||
.file "boot.S"
|
.file "boot.S"
|
||||||
|
|
||||||
|
@ -233,7 +234,7 @@ LOCAL(chs_mode):
|
||||||
jz LOCAL(floppy_probe)
|
jz LOCAL(floppy_probe)
|
||||||
|
|
||||||
/* Nope, we definitely have a hard disk, and we're screwed. */
|
/* Nope, we definitely have a hard disk, and we're screwed. */
|
||||||
jmp LOCAL(hd_probe_error)
|
ERR(hd_probe_error_string)
|
||||||
|
|
||||||
LOCAL(final_init):
|
LOCAL(final_init):
|
||||||
/* set the mode to zero */
|
/* set the mode to zero */
|
||||||
|
@ -360,22 +361,15 @@ LOCAL(copy_buffer):
|
||||||
* BIOS Geometry translation error (past the end of the disk geometry!).
|
* BIOS Geometry translation error (past the end of the disk geometry!).
|
||||||
*/
|
*/
|
||||||
LOCAL(geometry_error):
|
LOCAL(geometry_error):
|
||||||
MSG(geometry_error_string)
|
ERR(geometry_error_string)
|
||||||
jmp LOCAL(general_error)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Disk probe failure.
|
|
||||||
*/
|
|
||||||
LOCAL(hd_probe_error):
|
|
||||||
MSG(hd_probe_error_string)
|
|
||||||
jmp LOCAL(general_error)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read error on the disk.
|
* Read error on the disk.
|
||||||
*/
|
*/
|
||||||
LOCAL(read_error):
|
LOCAL(read_error):
|
||||||
MSG(read_error_string)
|
movw $read_error_string, %si
|
||||||
|
LOCAL(error_message):
|
||||||
|
call LOCAL(message)
|
||||||
LOCAL(general_error):
|
LOCAL(general_error):
|
||||||
MSG(general_error_string)
|
MSG(general_error_string)
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ prom_call:
|
||||||
|
|
||||||
boot_continue:
|
boot_continue:
|
||||||
mov %o7, PIC_REG /* PIC base */
|
mov %o7, PIC_REG /* PIC base */
|
||||||
sethi %hi(SCRATCH_PAD), %l1 /* OF argument slots */
|
sethi %hi(SCRATCH_PAD_BOOT), %l1 /* OF argument slots */
|
||||||
|
|
||||||
/* Find the /chosen node so we can fetch the stdout handle,
|
/* Find the /chosen node so we can fetch the stdout handle,
|
||||||
* and thus perform console output.
|
* and thus perform console output.
|
||||||
|
|
|
@ -81,7 +81,7 @@ prom_call:
|
||||||
|
|
||||||
|
|
||||||
after_info_block:
|
after_info_block:
|
||||||
sethi %hi(SCRATCH_PAD), %l1 /* OF argument slots */
|
sethi %hi(SCRATCH_PAD_DISKBOOT), %l1 /* OF argument slots */
|
||||||
|
|
||||||
GET_ABS(notification_string, %o2)
|
GET_ABS(notification_string, %o2)
|
||||||
call console_write
|
call console_write
|
||||||
|
@ -129,7 +129,7 @@ bootit:
|
||||||
mov NOTIFICATION_DONE_LEN, %o3
|
mov NOTIFICATION_DONE_LEN, %o3
|
||||||
sethi %hi(GRUB_BOOT_MACHINE_IMAGE_ADDRESS), %o2
|
sethi %hi(GRUB_BOOT_MACHINE_IMAGE_ADDRESS), %o2
|
||||||
jmpl %o2 + %lo(GRUB_BOOT_MACHINE_IMAGE_ADDRESS), %o7
|
jmpl %o2 + %lo(GRUB_BOOT_MACHINE_IMAGE_ADDRESS), %o7
|
||||||
mov CIF_REG, %o0
|
mov CIF_REG, %o4
|
||||||
1: ba,a 1b
|
1: ba,a 1b
|
||||||
|
|
||||||
lastlist:
|
lastlist:
|
||||||
|
|
|
@ -41,7 +41,7 @@ grub_cmd_cat (grub_command_t cmd __attribute__ ((unused)),
|
||||||
|
|
||||||
file = grub_gzfile_open (args[0], 1);
|
file = grub_gzfile_open (args[0], 1);
|
||||||
if (! file)
|
if (! file)
|
||||||
return 0;
|
return grub_errno;
|
||||||
|
|
||||||
while ((size = grub_file_read (file, buf, sizeof (buf))) > 0
|
while ((size = grub_file_read (file, buf, sizeof (buf))) > 0
|
||||||
&& key != GRUB_TERM_ESC)
|
&& key != GRUB_TERM_ESC)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
#define BASE_TEMPO 120
|
#define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND)
|
||||||
|
|
||||||
/* The speaker port. */
|
/* The speaker port. */
|
||||||
#define SPEAKER 0x61
|
#define SPEAKER 0x61
|
||||||
|
@ -101,13 +101,13 @@
|
||||||
#define PIT_CTRL_COUNT_BINARY 0x00 /* 16-bit binary counter. */
|
#define PIT_CTRL_COUNT_BINARY 0x00 /* 16-bit binary counter. */
|
||||||
#define PIT_CTRL_COUNT_BCD 0x01 /* 4-decade BCD counter. */
|
#define PIT_CTRL_COUNT_BCD 0x01 /* 4-decade BCD counter. */
|
||||||
|
|
||||||
#define T_REST ((short) 0)
|
#define T_REST ((grub_uint16_t) 0)
|
||||||
#define T_FINE ((short) -1)
|
#define T_FINE ((grub_uint16_t) -1)
|
||||||
|
|
||||||
struct note
|
struct note
|
||||||
{
|
{
|
||||||
short pitch;
|
grub_uint16_t pitch;
|
||||||
short duration;
|
grub_uint16_t duration;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -120,7 +120,7 @@ beep_off (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
beep_on (short pitch)
|
beep_on (grub_uint16_t pitch)
|
||||||
{
|
{
|
||||||
unsigned char status;
|
unsigned char status;
|
||||||
unsigned int counter;
|
unsigned int counter;
|
||||||
|
@ -143,21 +143,50 @@ beep_on (short pitch)
|
||||||
grub_outb (status | SPEAKER_TMR2 | SPEAKER_DATA, SPEAKER);
|
grub_outb (status | SPEAKER_TMR2 | SPEAKER_DATA, SPEAKER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Returns whether playing should continue. */
|
||||||
|
static int
|
||||||
|
play (unsigned tempo, struct note *note)
|
||||||
|
{
|
||||||
|
unsigned int to;
|
||||||
|
|
||||||
|
if (note->pitch == T_FINE || grub_checkkey () >= 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
grub_dprintf ("play", "pitch = %d, duration = %d\n", note->pitch,
|
||||||
|
note->duration);
|
||||||
|
|
||||||
|
switch (note->pitch)
|
||||||
|
{
|
||||||
|
case T_REST:
|
||||||
|
beep_off ();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
beep_on (note->pitch);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
to = grub_get_rtc () + BASE_TEMPO * note->duration / tempo;
|
||||||
|
while (((unsigned int) grub_get_rtc () <= to) && (grub_checkkey () < 0))
|
||||||
|
;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_cmd_play (grub_command_t cmd __attribute__ ((unused)),
|
grub_cmd_play (grub_command_t cmd __attribute__ ((unused)),
|
||||||
int argc, char **args)
|
int argc, char **args)
|
||||||
{
|
{
|
||||||
grub_file_t file;
|
grub_file_t file;
|
||||||
struct note buf;
|
|
||||||
int tempo;
|
|
||||||
unsigned int to;
|
|
||||||
|
|
||||||
if (argc != 1)
|
if (argc < 1)
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
|
return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name or tempo and notes required");
|
||||||
|
|
||||||
file = grub_file_open (args[0]);
|
file = grub_file_open (args[0]);
|
||||||
if (! file)
|
if (file)
|
||||||
return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
{
|
||||||
|
struct note buf;
|
||||||
|
grub_uint32_t tempo;
|
||||||
|
|
||||||
if (grub_file_read (file, &tempo, sizeof (tempo)) != sizeof (tempo))
|
if (grub_file_read (file, &tempo, sizeof (tempo)) != sizeof (tempo))
|
||||||
{
|
{
|
||||||
|
@ -166,36 +195,58 @@ grub_cmd_play (grub_command_t cmd __attribute__ ((unused)),
|
||||||
"file doesn't even contains a full tempo record");
|
"file doesn't even contains a full tempo record");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tempo = grub_le_to_cpu32 (tempo);
|
||||||
grub_dprintf ("play","tempo = %d\n", tempo);
|
grub_dprintf ("play","tempo = %d\n", tempo);
|
||||||
|
|
||||||
while (grub_file_read (file, &buf,
|
while (grub_file_read (file, &buf,
|
||||||
sizeof (struct note)) == sizeof (struct note)
|
sizeof (struct note)) == sizeof (struct note))
|
||||||
&& buf.pitch != T_FINE && grub_checkkey () < 0)
|
|
||||||
{
|
{
|
||||||
|
buf.pitch = grub_le_to_cpu16 (buf.pitch);
|
||||||
|
buf.duration = grub_le_to_cpu16 (buf.duration);
|
||||||
|
|
||||||
grub_dprintf ("play", "pitch = %d, duration = %d\n", buf.pitch,
|
if (play (tempo, &buf))
|
||||||
buf.duration);
|
|
||||||
|
|
||||||
switch (buf.pitch)
|
|
||||||
{
|
|
||||||
case T_REST:
|
|
||||||
beep_off ();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
beep_on (buf.pitch);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
to = grub_get_rtc () + BASE_TEMPO * buf.duration / tempo;
|
|
||||||
while (((unsigned int) grub_get_rtc () <= to) && (grub_checkkey () < 0))
|
|
||||||
;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
beep_off ();
|
|
||||||
|
|
||||||
grub_file_close (file);
|
grub_file_close (file);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char *end;
|
||||||
|
unsigned tempo;
|
||||||
|
struct note note;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
tempo = grub_strtoul (args[0], &end, 0);
|
||||||
|
|
||||||
|
if (*end)
|
||||||
|
/* Was not a number either, assume it was supposed to be a file name. */
|
||||||
|
return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
||||||
|
|
||||||
|
grub_dprintf ("play","tempo = %d\n", tempo);
|
||||||
|
|
||||||
|
for (i = 1; i + 1 < argc; i += 2)
|
||||||
|
{
|
||||||
|
note.pitch = grub_strtoul (args[i], &end, 0);
|
||||||
|
if (*end)
|
||||||
|
{
|
||||||
|
grub_error (GRUB_ERR_BAD_NUMBER, "bogus pitch number");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
note.duration = grub_strtoul (args[i + 1], &end, 0);
|
||||||
|
if (*end)
|
||||||
|
{
|
||||||
|
grub_error (GRUB_ERR_BAD_NUMBER, "bogus duration number");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (play (tempo, ¬e))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
beep_off ();
|
||||||
|
|
||||||
while (grub_checkkey () > 0)
|
while (grub_checkkey () > 0)
|
||||||
grub_getkey ();
|
grub_getkey ();
|
||||||
|
@ -208,7 +259,8 @@ static grub_command_t cmd;
|
||||||
GRUB_MOD_INIT(play)
|
GRUB_MOD_INIT(play)
|
||||||
{
|
{
|
||||||
cmd = grub_register_command ("play", grub_cmd_play,
|
cmd = grub_register_command ("play", grub_cmd_play,
|
||||||
N_("FILE"), N_("Play a tune."));
|
N_("FILE | TEMPO [PITCH1 DURATION1] [PITCH2 DURATION2] ... "),
|
||||||
|
N_("Play a tune."));
|
||||||
}
|
}
|
||||||
|
|
||||||
GRUB_MOD_FINI(play)
|
GRUB_MOD_FINI(play)
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <grub/term.h>
|
#include <grub/term.h>
|
||||||
#include <grub/machine/init.h>
|
#include <grub/machine/init.h>
|
||||||
#include <grub/machine/vbe.h>
|
#include <grub/machine/vbe.h>
|
||||||
|
#include <grub/video.h>
|
||||||
#include <grub/err.h>
|
#include <grub/err.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef GRUB_MACHINE_EMU
|
||||||
#include <grub/machine/memory.h>
|
#include <grub/machine/memory.h>
|
||||||
|
#endif
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/command.h>
|
#include <grub/command.h>
|
||||||
|
@ -34,7 +36,9 @@ grub_cmd_lsmmap (grub_command_t cmd __attribute__ ((unused)),
|
||||||
(long long) addr, (long long) size, type);
|
(long long) addr, (long long) size, type);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#ifndef GRUB_MACHINE_EMU
|
||||||
grub_machine_mmap_iterate (hook);
|
grub_machine_mmap_iterate (hook);
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,7 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)),
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load modules. */
|
/* Load modules. */
|
||||||
#ifndef GRUB_UTIL
|
#if GRUB_NO_MODULES
|
||||||
{
|
{
|
||||||
const char *prefix;
|
const char *prefix;
|
||||||
prefix = grub_env_get ("prefix");
|
prefix = grub_env_get ("prefix");
|
||||||
|
|
|
@ -149,11 +149,11 @@ grub_cmd_do_search (grub_command_t cmd __attribute__ ((unused)), int argc,
|
||||||
static grub_command_t cmd;
|
static grub_command_t cmd;
|
||||||
|
|
||||||
#ifdef DO_SEARCH_FILE
|
#ifdef DO_SEARCH_FILE
|
||||||
GRUB_MOD_INIT(search_file)
|
GRUB_MOD_INIT(search_fs_file)
|
||||||
#elif defined (DO_SEARCH_FS_UUID)
|
#elif defined (DO_SEARCH_FS_UUID)
|
||||||
GRUB_MOD_INIT(search_fs_uuid)
|
GRUB_MOD_INIT(search_fs_uuid)
|
||||||
#else
|
#else
|
||||||
GRUB_MOD_INIT(search_fs_label)
|
GRUB_MOD_INIT(search_label)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
cmd =
|
cmd =
|
||||||
|
@ -163,11 +163,11 @@ GRUB_MOD_INIT(search_fs_label)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DO_SEARCH_FILE
|
#ifdef DO_SEARCH_FILE
|
||||||
GRUB_MOD_FINI(search_file)
|
GRUB_MOD_FINI(search_fs_file)
|
||||||
#elif defined (DO_SEARCH_FS_UUID)
|
#elif defined (DO_SEARCH_FS_UUID)
|
||||||
GRUB_MOD_FINI(search_fs_uuid)
|
GRUB_MOD_FINI(search_fs_uuid)
|
||||||
#else
|
#else
|
||||||
GRUB_MOD_FINI(search_fs_label)
|
GRUB_MOD_FINI(search_label)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
grub_unregister_command (cmd);
|
grub_unregister_command (cmd);
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#include <grub/time.h>
|
#include <grub/time.h>
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/machine/time.h>
|
|
||||||
#include <grub/extcmd.h>
|
#include <grub/extcmd.h>
|
||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,9 @@ grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
|
||||||
color = grub_video_map_rgb (0, 255, 255);
|
color = grub_video_map_rgb (0, 255, 255);
|
||||||
grub_video_fill_rect (color, 100, 100, 100, 100);
|
grub_video_fill_rect (color, 100, 100, 100, 100);
|
||||||
|
|
||||||
sansbig = grub_font_get ("Helvetica Bold 24");
|
sansbig = grub_font_get ("Unknown Regular 16");
|
||||||
sans = grub_font_get ("Helvetica Bold 14");
|
sans = grub_font_get ("Unknown Regular 16");
|
||||||
sanssmall = grub_font_get ("Helvetica 8");
|
sanssmall = grub_font_get ("Unknown Regular 16");
|
||||||
fixed = grub_font_get ("Fixed 20");
|
fixed = grub_font_get ("Fixed 20");
|
||||||
if (! sansbig || ! sans || ! sanssmall || ! fixed)
|
if (! sansbig || ! sans || ! sanssmall || ! fixed)
|
||||||
return grub_error (GRUB_ERR_BAD_FONT, "no font loaded");
|
return grub_error (GRUB_ERR_BAD_FONT, "no font loaded");
|
||||||
|
@ -126,11 +126,6 @@ grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
|
||||||
grub_font_draw_string (str, fixed, color, 16, texty);
|
grub_font_draw_string (str, fixed, color, 16, texty);
|
||||||
texty += grub_font_get_descent (fixed) + grub_font_get_leading (fixed);
|
texty += grub_font_get_descent (fixed) + grub_font_get_leading (fixed);
|
||||||
|
|
||||||
/* Some character don't exist in the Helvetica font, so the font engine
|
|
||||||
will fall back to using glyphs from another font that does contain them.
|
|
||||||
TODO The font engine should be smart about selecting a replacement font
|
|
||||||
and prioritize fonts with similar sizes. */
|
|
||||||
|
|
||||||
texty += grub_font_get_ascent(sansbig);
|
texty += grub_font_get_ascent(sansbig);
|
||||||
grub_font_draw_string (str, sansbig, color, 16, texty);
|
grub_font_draw_string (str, sansbig, color, 16, texty);
|
||||||
texty += grub_font_get_descent (sansbig) + grub_font_get_leading (sansbig);
|
texty += grub_font_get_descent (sansbig) + grub_font_get_leading (sansbig);
|
||||||
|
|
162
conf/any-emu.rmk
162
conf/any-emu.rmk
|
@ -1,129 +1,95 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
COMMON_LDFLAGS += -nostdlib
|
||||||
script/lexer.c_DEPENDENCIES = grub_script.tab.h
|
COMMON_CFLAGS += -nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include) -fno-builtin
|
||||||
|
|
||||||
sbin_UTILITIES += grub-emu
|
|
||||||
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
|
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
|
||||||
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
|
kernel_img_RELOCATABLE = yes
|
||||||
commands/configfile.c commands/echo.c commands/help.c \
|
pkglib_PROGRAMS = kernel.img
|
||||||
commands/handler.c commands/ls.c commands/test.c \
|
kernel_img_SOURCES = kern/device.c kern/disk.c kern/dl.c kern/env.c \
|
||||||
commands/search_wrap.c commands/search_file.c \
|
kern/err.c kern/list.c kern/handler.c kern/command.c \
|
||||||
commands/search_label.c commands/search_uuid.c \
|
kern/corecmd.c kern/file.c kern/fs.c kern/main.c kern/misc.c \
|
||||||
commands/blocklist.c commands/hexdump.c \
|
kern/parser.c kern/partition.c kern/term.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/term.c \
|
|
||||||
kern/rescue_reader.c kern/rescue_parser.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 lib/crypto.c normal/autofs.c \
|
|
||||||
normal/completion.c normal/main.c normal/color.c \
|
|
||||||
normal/menu.c normal/menu_entry.c \
|
|
||||||
normal/menu_text.c normal/crypto.c normal/term.c \
|
|
||||||
commands/terminal.c normal/context.c lib/charset.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 partmap/bsdlabel.c \
|
|
||||||
\
|
\
|
||||||
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
|
util/console.c util/grub-emu.c util/misc.c util/hostdisk.c \
|
||||||
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
|
util/getroot.c util/time.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 \
|
grub_emu_init.c gnulib/progname.c util/hostfs.c disk/host.c
|
||||||
video/fb/fbfill.c video/fb/fbutil.c commands/videotest.c \
|
kernel_img_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-undef -I$(srcdir)/gnulib
|
||||||
video/bitmap.c video/bitmap_scale.c video/readers/tga.c \
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
video/readers/jpeg.c video/readers/png.c font/font_cmd.c \
|
TARGET_NO_STRIP = yes
|
||||||
font/font.c term/gfxterm.c io/bufio.c \
|
TARGET_NO_DYNAMIC_MODULES = yes
|
||||||
\
|
|
||||||
gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c \
|
|
||||||
gfxmenu/icon_manager.c gfxmenu/theme_loader.c \
|
|
||||||
gfxmenu/widget-box.c gfxmenu/gui_canvas.c \
|
|
||||||
gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c \
|
|
||||||
gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c \
|
|
||||||
gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c \
|
|
||||||
gfxmenu/gui_string_util.c gfxmenu/named_colors.c trigtables.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 \
|
|
||||||
lib/libgcrypt-grub/cipher/md5.c \
|
|
||||||
grub_emu_init.c gnulib/progname.c
|
|
||||||
grub_emu_CFLAGS += -Wno-missing-field-initializers -Wno-error -I$(srcdir)/lib/libgcrypt_wrap
|
|
||||||
|
|
||||||
|
# For halt.mod.
|
||||||
|
pkglib_MODULES += halt.mod
|
||||||
|
halt_mod_SOURCES = commands/halt.c
|
||||||
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
ifeq ($(target_cpu), i386)
|
ifeq ($(target_cpu), i386)
|
||||||
grub_emu_SOURCES += commands/i386/cpuid.c
|
pkglib_MODULES += cpuid.mod
|
||||||
|
cpuid_mod_SOURCES = commands/i386/cpuid.c
|
||||||
|
cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
grub_emu_LDFLAGS = $(LIBCURSES)
|
grub_emu_LDFLAGS = $(LIBCURSES)
|
||||||
|
|
||||||
ifeq ($(enable_grub_emu_usb), yes)
|
ifeq ($(enable_grub_emu_usb), yes)
|
||||||
grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c \
|
pkglib_MODULES += libusb.mod
|
||||||
commands/usbtest.c
|
libusb_mod_SOURCES = util/usb.c
|
||||||
grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB)
|
libusb_mod_CFLAGS =
|
||||||
|
libusb_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For usb.mod
|
||||||
|
pkglib_MODULES += usb.mod
|
||||||
|
usb_mod_SOURCES = bus/usb/usb.c
|
||||||
|
usb_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
usb_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For usbtest.mod
|
||||||
|
pkglib_MODULES += usbtest.mod
|
||||||
|
usbtest_mod_SOURCES = commands/usbtest.c
|
||||||
|
usbtest_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
usbtest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For usbms.mod
|
||||||
|
pkglib_MODULES += usbms.mod
|
||||||
|
usbms_mod_SOURCES = disk/usbms.c
|
||||||
|
usbms_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
usbms_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
grub_emu_LDFLAGS += $(LIBUSB)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(enable_grub_emu_sdl), yes)
|
ifeq ($(enable_grub_emu_sdl), yes)
|
||||||
grub_emu_SOURCES += util/sdl.c
|
pkglib_MODULES += sdl.mod
|
||||||
|
sdl_mod_SOURCES = util/sdl.c
|
||||||
|
sdl_mod_CFLAGS =
|
||||||
|
sdl_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
grub_emu_LDFLAGS += $(LIBSDL)
|
grub_emu_LDFLAGS += $(LIBSDL)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(enable_grub_emu_pci), yes)
|
ifeq ($(enable_grub_emu_pci), yes)
|
||||||
grub_emu_SOURCES += util/pci.c commands/lspci.c
|
pkglib_MODULES += pci.mod
|
||||||
|
pci_mod_SOURCES = util/pci.c commands/lspci.c
|
||||||
|
pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
grub_emu_LDFLAGS += $(LIBPCIACCESS)
|
grub_emu_LDFLAGS += $(LIBPCIACCESS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES))
|
include $(srcdir)/conf/common.mk
|
||||||
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
|
grub_emu_init.h: genemuinitheader.sh $(pkglib_MODULES)
|
||||||
rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
|
rm -f $@; echo $(pkglib_MODULES) | sh $(srcdir)/genemuinitheader.sh $(NM) > $@
|
||||||
DISTCLEANFILES += grub_emu_init.h
|
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
|
grub_emu_init.c: genemuinit.sh $(pkglib_MODULES)
|
||||||
rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
|
rm -f $@; echo $(pkglib_MODULES) | sh $(srcdir)/genemuinit.sh $(NM) > $@
|
||||||
DISTCLEANFILES += grub_emu_init.c
|
DISTCLEANFILES += grub_emu_init.c
|
||||||
|
|
||||||
|
CLEANFILES += grub-emu
|
||||||
|
grub-emu: $(pkglib_MODULES) $(pkglib_PROGRAMS)
|
||||||
|
$(CC) -o $@ $(pkglib_MODULES) $(pkglib_PROGRAMS) $(grub_emu_LDFLAGS) $(LDFLAGS)
|
||||||
|
GRUB_EMU=grub-emu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# FIXME: this could be shared with common.rmk
|
|
||||||
|
|
||||||
trigtables.c: gentrigtables
|
|
||||||
./gentrigtables > $@
|
|
||||||
DISTCLEANFILES += trigtables.c
|
|
||||||
gentrigtables: gentrigtables.c
|
|
||||||
$(CC) -o $@ $^ $(CPPFLAGS) -lm
|
|
||||||
DISTCLEANFILES += gentrigtables
|
|
||||||
|
|
||||||
# For grub-mkfont.
|
|
||||||
ifeq ($(enable_grub_mkfont), yes)
|
|
||||||
bin_UTILITIES += grub-mkfont
|
|
||||||
grub_mkfont_SOURCES = gnulib/progname.c 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
|
|
||||||
|
|
||||||
bin_UTILITIES += grub-bin2h
|
|
||||||
grub_bin2h_SOURCES = gnulib/progname.c util/bin2h.c
|
|
||||||
|
|
134
conf/common.rmk
134
conf/common.rmk
|
@ -1,5 +1,8 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
|
# Used by various components. These rules need to precede them.
|
||||||
|
script/lexer.c_DEPENDENCIES = grub_script.tab.h
|
||||||
|
|
||||||
sbin_UTILITIES += grub-mkdevicemap
|
sbin_UTILITIES += grub-mkdevicemap
|
||||||
grub_mkdevicemap_SOURCES = gnulib/progname.c util/grub-mkdevicemap.c \
|
grub_mkdevicemap_SOURCES = gnulib/progname.c util/grub-mkdevicemap.c \
|
||||||
util/deviceiter.c \
|
util/deviceiter.c \
|
||||||
|
@ -92,6 +95,13 @@ grub_mkrelpath_SOURCES = gnulib/progname.c util/grub-mkrelpath.c util/misc.c
|
||||||
bin_UTILITIES += grub-bin2h
|
bin_UTILITIES += grub-bin2h
|
||||||
grub_bin2h_SOURCES = gnulib/progname.c util/bin2h.c
|
grub_bin2h_SOURCES = gnulib/progname.c util/bin2h.c
|
||||||
|
|
||||||
|
# For the lexer.
|
||||||
|
grub_script.yy.c grub_script.yy.h: script/yylex.l
|
||||||
|
$(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $(srcdir)/script/yylex.l
|
||||||
|
sed -i 's/^#include.*\(<stdio\.h>\|<string\.h>\|<errno\.h>\|<stdlib\.h>\|<unistd\.h>\)//g' grub_script.yy.h
|
||||||
|
sed -i 's/^#include.*\(<stdio\.h>\|<string\.h>\|<errno\.h>\|<stdlib\.h>\|<unistd\.h>\)//g' grub_script.yy.c
|
||||||
|
DISTCLEANFILES += grub_script.yy.c grub_script.yy.h
|
||||||
|
|
||||||
# For grub-script-check.
|
# For grub-script-check.
|
||||||
bin_UTILITIES += grub-script-check
|
bin_UTILITIES += grub-script-check
|
||||||
util/grub-script-check.c_DEPENDENCIES = grub_script_check_init.h
|
util/grub-script-check.c_DEPENDENCIES = grub_script_check_init.h
|
||||||
|
@ -99,7 +109,23 @@ grub_script_check_SOURCES = gnulib/progname.c gnulib/getdelim.c gnulib/getline.c
|
||||||
util/grub-script-check.c util/misc.c \
|
util/grub-script-check.c util/misc.c \
|
||||||
script/main.c script/script.c script/function.c script/lexer.c \
|
script/main.c script/script.c script/function.c script/lexer.c \
|
||||||
kern/handler.c kern/err.c kern/parser.c kern/list.c \
|
kern/handler.c kern/err.c kern/parser.c kern/list.c \
|
||||||
kern/misc.c kern/env.c grub_script_check_init.c grub_script.tab.c
|
kern/misc.c kern/env.c grub_script_check_init.c grub_script.tab.c \
|
||||||
|
grub_script.yy.c
|
||||||
|
|
||||||
|
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
||||||
|
DEFSYMFILES += kernel_syms.lst
|
||||||
|
|
||||||
|
kernel_img_HEADERS += boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
|
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||||
|
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||||
|
machine/memory.h machine/loader.h machine/kernel.h \
|
||||||
|
list.h handler.h command.h i18n.h env_private.h
|
||||||
|
|
||||||
|
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
||||||
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
|
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
||||||
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# For the parser.
|
# For the parser.
|
||||||
grub_script.tab.c grub_script.tab.h: script/parser.y
|
grub_script.tab.c grub_script.tab.h: script/parser.y
|
||||||
|
@ -623,30 +649,32 @@ normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For sh.mod.
|
# For sh.mod.
|
||||||
sh_mod_SOURCES = script/main.c script/script.c script/execute.c \
|
sh_mod_SOURCES = script/main.c script/script.c script/execute.c \
|
||||||
script/function.c script/lexer.c grub_script.tab.c
|
script/function.c script/lexer.c grub_script.tab.c grub_script.yy.c
|
||||||
sh_mod_CFLAGS = $(COMMON_CFLAGS)
|
sh_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
sh_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
sh_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
ifneq (, $(FONT_SOURCE))
|
||||||
|
font/font.c_DEPENDENCIES = ascii.h
|
||||||
|
endif
|
||||||
|
|
||||||
# Common Video Subsystem specific modules.
|
# Common Video Subsystem specific modules.
|
||||||
pkglib_MODULES += video.mod videotest.mod bitmap.mod tga.mod jpeg.mod \
|
# On Yeeloong it's part of kernel
|
||||||
png.mod gfxterm.mod video_fb.mod
|
ifneq ($(platform), yeeloong)
|
||||||
|
|
||||||
# For video.mod.
|
# For video.mod.
|
||||||
|
pkglib_MODULES += video.mod
|
||||||
video_mod_SOURCES = video/video.c
|
video_mod_SOURCES = video/video.c
|
||||||
video_mod_CFLAGS = $(COMMON_CFLAGS)
|
video_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
video_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
video_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
pkglib_MODULES += video_fb.mod
|
||||||
video_fb_mod_SOURCES = video/fb/video_fb.c video/fb/fbblit.c \
|
video_fb_mod_SOURCES = video/fb/video_fb.c video/fb/fbblit.c \
|
||||||
video/fb/fbfill.c video/fb/fbutil.c
|
video/fb/fbfill.c video/fb/fbutil.c
|
||||||
video_fb_mod_CFLAGS = $(COMMON_CFLAGS)
|
video_fb_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
video_fb_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
video_fb_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For videotest.mod.
|
|
||||||
videotest_mod_SOURCES = commands/videotest.c
|
|
||||||
videotest_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
videotest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For bitmap.mod
|
# For bitmap.mod
|
||||||
|
pkglib_MODULES += bitmap.mod
|
||||||
bitmap_mod_SOURCES = video/bitmap.c
|
bitmap_mod_SOURCES = video/bitmap.c
|
||||||
bitmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
bitmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
bitmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
bitmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
@ -657,36 +685,46 @@ bitmap_scale_mod_SOURCES = video/bitmap_scale.c
|
||||||
bitmap_scale_mod_CFLAGS = $(COMMON_CFLAGS)
|
bitmap_scale_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
bitmap_scale_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
bitmap_scale_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For tga.mod
|
|
||||||
tga_mod_SOURCES = video/readers/tga.c
|
|
||||||
tga_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
tga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For jpeg.mod.
|
|
||||||
jpeg_mod_SOURCES = video/readers/jpeg.c
|
|
||||||
jpeg_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
jpeg_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For png.mod.
|
|
||||||
png_mod_SOURCES = video/readers/png.c
|
|
||||||
png_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
png_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
pkglib_MODULES += font.mod
|
pkglib_MODULES += font.mod
|
||||||
ifneq (, $(FONT_SOURCE))
|
|
||||||
font/font.c_DEPENDENCIES = ascii.h
|
|
||||||
endif
|
|
||||||
font_mod_SOURCES = font/font_cmd.c font/font.c
|
font_mod_SOURCES = font/font_cmd.c font/font.c
|
||||||
font_mod_CFLAGS = $(COMMON_CFLAGS)
|
font_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
font_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
font_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For gfxterm.mod.
|
# For gfxterm.mod.
|
||||||
|
pkglib_MODULES += gfxterm.mod
|
||||||
gfxterm_mod_SOURCES = term/gfxterm.c
|
gfxterm_mod_SOURCES = term/gfxterm.c
|
||||||
gfxterm_mod_CFLAGS = $(COMMON_CFLAGS)
|
gfxterm_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
gfxterm_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
gfxterm_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
# For videotest.mod.
|
||||||
|
pkglib_MODULES += videotest.mod
|
||||||
|
videotest_mod_SOURCES = commands/videotest.c
|
||||||
|
videotest_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
videotest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For tga.mod
|
||||||
|
pkglib_MODULES += tga.mod
|
||||||
|
tga_mod_SOURCES = video/readers/tga.c
|
||||||
|
tga_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
tga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For jpeg.mod.
|
||||||
|
pkglib_MODULES += jpeg.mod
|
||||||
|
jpeg_mod_SOURCES = video/readers/jpeg.c
|
||||||
|
jpeg_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
jpeg_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For png.mod.
|
||||||
|
pkglib_MODULES += png.mod
|
||||||
|
png_mod_SOURCES = video/readers/png.c
|
||||||
|
png_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
png_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# Misc.
|
# Misc.
|
||||||
pkglib_MODULES += gzio.mod bufio.mod elf.mod
|
pkglib_MODULES += gzio.mod elf.mod
|
||||||
|
|
||||||
# For elf.mod.
|
# For elf.mod.
|
||||||
elf_mod_SOURCES = kern/elf.c
|
elf_mod_SOURCES = kern/elf.c
|
||||||
|
@ -698,10 +736,14 @@ gzio_mod_SOURCES = io/gzio.c
|
||||||
gzio_mod_CFLAGS = $(COMMON_CFLAGS)
|
gzio_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
gzio_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
gzio_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# On Yeeloong it's part of kernel
|
||||||
|
ifneq ($(platform), yeeloong)
|
||||||
# For bufio.mod.
|
# For bufio.mod.
|
||||||
|
pkglib_MODULES += bufio.mod
|
||||||
bufio_mod_SOURCES = io/bufio.c
|
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)
|
||||||
|
endif
|
||||||
|
|
||||||
# For gettext.mod.
|
# For gettext.mod.
|
||||||
pkglib_MODULES += gettext.mod
|
pkglib_MODULES += gettext.mod
|
||||||
|
@ -765,6 +807,42 @@ password_pbkdf2_mod_SOURCES = commands/password_pbkdf2.c
|
||||||
password_pbkdf2_mod_CFLAGS = $(COMMON_CFLAGS)
|
password_pbkdf2_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
password_pbkdf2_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
password_pbkdf2_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For memdisk.mod.
|
||||||
|
pkglib_MODULES += memdisk.mod
|
||||||
|
memdisk_mod_SOURCES = disk/memdisk.c
|
||||||
|
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For reboot.mod.
|
||||||
|
pkglib_MODULES += reboot.mod
|
||||||
|
reboot_mod_SOURCES = commands/reboot.c
|
||||||
|
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For date.mod
|
||||||
|
pkglib_MODULES += date.mod
|
||||||
|
date_mod_SOURCES = commands/date.c
|
||||||
|
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For datehook.mod
|
||||||
|
pkglib_MODULES += datehook.mod
|
||||||
|
datehook_mod_SOURCES = hook/datehook.c
|
||||||
|
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For lsmmap.mod
|
||||||
|
pkglib_MODULES += lsmmap.mod
|
||||||
|
lsmmap_mod_SOURCES = commands/lsmmap.c
|
||||||
|
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For boot.mod.
|
||||||
|
pkglib_MODULES += boot.mod
|
||||||
|
boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
|
||||||
|
boot_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
bin_UTILITIES += grub-mkpasswd-pbkdf2
|
bin_UTILITIES += grub-mkpasswd-pbkdf2
|
||||||
grub_mkpasswd_pbkdf2_SOURCES = gnulib/progname.c gnulib/getdelim.c gnulib/getline.c util/grub-mkpasswd-pbkdf2.c lib/crypto.c lib/libgcrypt-grub/cipher/sha512.c lib/pbkdf2.c util/misc.c kern/err.c
|
grub_mkpasswd_pbkdf2_SOURCES = gnulib/progname.c gnulib/getdelim.c gnulib/getline.c util/grub-mkpasswd-pbkdf2.c lib/crypto.c lib/libgcrypt-grub/cipher/sha512.c lib/pbkdf2.c util/misc.c kern/err.c
|
||||||
grub_mkpasswd_pbkdf2_CFLAGS += -Wno-missing-field-initializers -Wno-error -I$(srcdir)/lib/libgcrypt_wrap -DGRUB_MKPASSWD=1
|
grub_mkpasswd_pbkdf2_CFLAGS += -Wno-missing-field-initializers -Wno-error -I$(srcdir)/lib/libgcrypt_wrap -DGRUB_MKPASSWD=1
|
||||||
|
|
|
@ -1,18 +1,11 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
|
COMMON_CFLAGS = -mrtd -mregparm=3
|
||||||
COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
|
|
||||||
COMMON_LDFLAGS = -m32 -nostdlib
|
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
|
||||||
script/lexer.c_DEPENDENCIES = grub_script.tab.h
|
|
||||||
|
|
||||||
# Images.
|
# Images.
|
||||||
|
|
||||||
GRUB_KERNEL_MACHINE_LINK_ADDR = 0x8200
|
GRUB_KERNEL_MACHINE_LINK_ADDR = 0x8200
|
||||||
|
|
||||||
ifeq ($(platform), coreboot)
|
|
||||||
|
|
||||||
pkglib_PROGRAMS += kernel.img
|
pkglib_PROGRAMS += kernel.img
|
||||||
kernel_img_SOURCES = kern/i386/coreboot/startup.S \
|
kernel_img_SOURCES = kern/i386/coreboot/startup.S \
|
||||||
kern/i386/misc.S \
|
kern/i386/misc.S \
|
||||||
|
@ -31,74 +24,10 @@ kernel_img_SOURCES = kern/i386/coreboot/startup.S \
|
||||||
kern/env.c \
|
kern/env.c \
|
||||||
term/i386/pc/vga_text.c term/i386/vga_common.c \
|
term/i386/pc/vga_text.c term/i386/vga_common.c \
|
||||||
symlist.c
|
symlist.c
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
|
||||||
machine/boot.h machine/console.h machine/init.h \
|
|
||||||
machine/memory.h machine/loader.h list.h handler.h command.h i18n.h \
|
|
||||||
env_private.h
|
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR),-Bstatic
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR),-Bstatic
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(platform), qemu)
|
|
||||||
|
|
||||||
GRUB_BOOT_MACHINE_LINK_ADDR = 0xffe00
|
|
||||||
|
|
||||||
pkglib_IMAGES += boot.img
|
|
||||||
boot_img_SOURCES = boot/i386/qemu/boot.S
|
|
||||||
boot_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
|
||||||
boot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
|
||||||
boot_img_FORMAT = binary
|
|
||||||
|
|
||||||
bin_UTILITIES += grub-mkimage
|
|
||||||
grub_mkimage_SOURCES = util/grub-mkrawimage.c util/misc.c \
|
|
||||||
util/resolve.c gnulib/progname.c
|
|
||||||
grub_mkimage_CFLAGS = -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
|
||||||
util/grub-mkrawimage.c_DEPENDENCIES = Makefile
|
|
||||||
|
|
||||||
|
|
||||||
pkglib_IMAGES += kernel.img
|
|
||||||
kernel_img_SOURCES = kern/i386/qemu/startup.S \
|
|
||||||
kern/i386/misc.S \
|
|
||||||
kern/i386/coreboot/init.c \
|
|
||||||
kern/i386/qemu/mmap.c \
|
|
||||||
kern/i386/halt.c \
|
|
||||||
kern/main.c kern/device.c \
|
|
||||||
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
|
||||||
kern/misc.c kern/mm.c kern/term.c \
|
|
||||||
kern/rescue_parser.c kern/rescue_reader.c \
|
|
||||||
kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
|
|
||||||
kern/$(target_cpu)/dl.c kern/parser.c kern/partition.c \
|
|
||||||
kern/i386/tsc.c kern/i386/pit.c \
|
|
||||||
kern/generic/rtc_get_time_ms.c \
|
|
||||||
kern/generic/millisleep.c \
|
|
||||||
kern/env.c \
|
|
||||||
term/i386/pc/vga_text.c term/i386/vga_common.c \
|
|
||||||
symlist.c
|
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
|
||||||
machine/boot.h machine/console.h machine/init.h \
|
|
||||||
machine/memory.h machine/loader.h list.h handler.h command.h i18n.h \
|
|
||||||
env_private.h
|
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
|
||||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
|
||||||
kernel_img_FORMAT = binary
|
|
||||||
endif
|
|
||||||
|
|
||||||
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
||||||
DEFSYMFILES += kernel_syms.lst
|
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
|
||||||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
sbin_SCRIPTS += grub-install
|
sbin_SCRIPTS += grub-install
|
||||||
grub_install_SOURCES = util/grub-install.in
|
grub_install_SOURCES = util/grub-install.in
|
||||||
|
|
||||||
|
@ -106,17 +35,7 @@ bin_SCRIPTS += grub-mkrescue
|
||||||
grub_mkrescue_SOURCES = util/grub-mkrescue.in
|
grub_mkrescue_SOURCES = util/grub-mkrescue.in
|
||||||
|
|
||||||
# Modules.
|
# Modules.
|
||||||
pkglib_MODULES = linux.mod \
|
pkglib_MODULES = linux.mod aout.mod halt.mod datetime.mod mmap.mod
|
||||||
aout.mod play.mod serial.mod \
|
|
||||||
memdisk.mod pci.mod lspci.mod reboot.mod \
|
|
||||||
halt.mod datetime.mod date.mod datehook.mod \
|
|
||||||
lsmmap.mod mmap.mod
|
|
||||||
|
|
||||||
# For boot.mod.
|
|
||||||
pkglib_MODULES += boot.mod
|
|
||||||
boot_mod_SOURCES = commands/boot.c
|
|
||||||
boot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For mmap.mod.
|
# For mmap.mod.
|
||||||
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c
|
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c
|
||||||
|
@ -129,21 +48,11 @@ linux_mod_SOURCES = loader/i386/linux.c
|
||||||
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For reboot.mod.
|
|
||||||
reboot_mod_SOURCES = commands/reboot.c
|
|
||||||
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For halt.mod.
|
# For halt.mod.
|
||||||
halt_mod_SOURCES = commands/halt.c
|
halt_mod_SOURCES = commands/halt.c
|
||||||
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For serial.mod.
|
|
||||||
serial_mod_SOURCES = term/serial.c
|
|
||||||
serial_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For aout.mod.
|
# For aout.mod.
|
||||||
aout_mod_SOURCES = loader/aout.c
|
aout_mod_SOURCES = loader/aout.c
|
||||||
aout_mod_CFLAGS = $(COMMON_CFLAGS)
|
aout_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
@ -156,45 +65,10 @@ bsd_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
bsd_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
bsd_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
bsd_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
bsd_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
|
|
||||||
# For play.mod.
|
|
||||||
play_mod_SOURCES = commands/i386/pc/play.c
|
|
||||||
play_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
play_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For memdisk.mod.
|
|
||||||
memdisk_mod_SOURCES = disk/memdisk.c
|
|
||||||
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For pci.mod
|
|
||||||
pci_mod_SOURCES = bus/pci.c
|
|
||||||
pci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For lspci.mod
|
|
||||||
lspci_mod_SOURCES = commands/lspci.c
|
|
||||||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For datetime.mod
|
# For datetime.mod
|
||||||
datetime_mod_SOURCES = lib/cmos_datetime.c
|
datetime_mod_SOURCES = lib/cmos_datetime.c
|
||||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For date.mod
|
|
||||||
date_mod_SOURCES = commands/date.c
|
|
||||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For datehook.mod
|
|
||||||
datehook_mod_SOURCES = hook/datehook.c
|
|
||||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For lsmmap.mod
|
|
||||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
|
||||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
include $(srcdir)/conf/i386.mk
|
include $(srcdir)/conf/i386.mk
|
||||||
include $(srcdir)/conf/common.mk
|
include $(srcdir)/conf/common.mk
|
||||||
|
|
|
@ -1,166 +1,5 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
|
COMMON_LDFLAGS = -melf_i386
|
||||||
COMMON_CFLAGS = -fno-builtin -m32
|
|
||||||
COMMON_LDFLAGS = -melf_i386 -nostdlib
|
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
include $(srcdir)/conf/x86-efi.mk
|
||||||
script/lexer.c_DEPENDENCIES = grub_script.tab.h
|
|
||||||
|
|
||||||
# Utilities.
|
|
||||||
bin_UTILITIES = grub-mkimage
|
|
||||||
|
|
||||||
# For grub-mkimage.
|
|
||||||
grub_mkimage_SOURCES = gnulib/progname.c util/i386/efi/grub-mkimage.c \
|
|
||||||
util/misc.c util/resolve.c
|
|
||||||
util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
|
|
||||||
|
|
||||||
# For grub-setup.
|
|
||||||
#grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \
|
|
||||||
# util/misc.c util/getroot.c kern/device.c kern/disk.c \
|
|
||||||
# kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \
|
|
||||||
# fs/sfs.c kern/parser.c kern/partition.c partmap/msdos.c \
|
|
||||||
# fs/ufs.c fs/ufs2.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \
|
|
||||||
# kern/fs.c kern/env.c fs/fshelp.c
|
|
||||||
|
|
||||||
# Scripts.
|
|
||||||
sbin_SCRIPTS = grub-install
|
|
||||||
|
|
||||||
# For grub-install.
|
|
||||||
grub_install_SOURCES = util/i386/efi/grub-install.in
|
|
||||||
|
|
||||||
# Modules.
|
|
||||||
pkglib_PROGRAMS = kernel.img
|
|
||||||
pkglib_MODULES = chain.mod appleldr.mod \
|
|
||||||
linux.mod halt.mod reboot.mod pci.mod lspci.mod \
|
|
||||||
datetime.mod date.mod datehook.mod loadbios.mod \
|
|
||||||
fixvideo.mod mmap.mod acpi.mod
|
|
||||||
|
|
||||||
# For kernel.img.
|
|
||||||
kernel_img_RELOCATABLE = yes
|
|
||||||
kernel_img_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
|
|
||||||
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
|
||||||
kern/misc.c kern/mm.c kern/term.c \
|
|
||||||
kern/rescue_parser.c kern/rescue_reader.c \
|
|
||||||
kern/$(target_cpu)/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
|
|
||||||
kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
|
|
||||||
term/efi/console.c disk/efi/efidisk.c \
|
|
||||||
kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
|
|
||||||
kern/i386/tsc.c kern/i386/pit.c \
|
|
||||||
kern/generic/rtc_get_time_ms.c \
|
|
||||||
kern/generic/millisleep.c
|
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
|
||||||
efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h \
|
|
||||||
i18n.h env_private.h
|
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
|
||||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
MOSTLYCLEANFILES += symlist.c
|
|
||||||
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
||||||
DEFSYMFILES += kernel_syms.lst
|
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
|
||||||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
# For boot.mod.
|
|
||||||
pkglib_MODULES += boot.mod
|
|
||||||
boot_mod_SOURCES = commands/boot.c
|
|
||||||
boot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For acpi.mod.
|
|
||||||
acpi_mod_SOURCES = commands/acpi.c commands/efi/acpi.c
|
|
||||||
acpi_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
acpi_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For mmap.mod.
|
|
||||||
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c \
|
|
||||||
mmap/efi/mmap.c
|
|
||||||
mmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For chain.mod.
|
|
||||||
chain_mod_SOURCES = loader/efi/chainloader.c
|
|
||||||
chain_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For appleldr.mod.
|
|
||||||
appleldr_mod_SOURCES = loader/efi/appleloader.c
|
|
||||||
appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For linux.mod.
|
|
||||||
linux_mod_SOURCES = loader/i386/efi/linux.c
|
|
||||||
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For halt.mod.
|
|
||||||
halt_mod_SOURCES = commands/halt.c
|
|
||||||
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For reboot.mod.
|
|
||||||
reboot_mod_SOURCES = commands/reboot.c
|
|
||||||
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For pci.mod
|
|
||||||
pci_mod_SOURCES = bus/pci.c
|
|
||||||
pci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For lspci.mod
|
|
||||||
lspci_mod_SOURCES = commands/lspci.c
|
|
||||||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For datetime.mod
|
|
||||||
datetime_mod_SOURCES = lib/efi/datetime.c
|
|
||||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For date.mod
|
|
||||||
date_mod_SOURCES = commands/date.c
|
|
||||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For datehook.mod
|
|
||||||
datehook_mod_SOURCES = hook/datehook.c
|
|
||||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For loadbios.mod
|
|
||||||
loadbios_mod_SOURCES = commands/efi/loadbios.c
|
|
||||||
loadbios_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
loadbios_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For fixvideo.mod
|
|
||||||
fixvideo_mod_SOURCES = commands/efi/fixvideo.c
|
|
||||||
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
pkglib_MODULES += efi_uga.mod
|
|
||||||
efi_uga_mod_SOURCES = video/efi_uga.c
|
|
||||||
efi_uga_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
efi_uga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
pkglib_MODULES += efi_gop.mod
|
|
||||||
efi_gop_mod_SOURCES = video/efi_gop.c
|
|
||||||
efi_gop_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
efi_gop_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
pkglib_MODULES += xnu.mod
|
|
||||||
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c \
|
|
||||||
loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c
|
|
||||||
xnu_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
||||||
|
|
||||||
include $(srcdir)/conf/i386.mk
|
|
||||||
include $(srcdir)/conf/common.mk
|
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
COMMON_ASFLAGS = -m32 -nostdinc -fno-builtin
|
COMMON_CFLAGS = -mrtd -mregparm=3
|
||||||
COMMON_CFLAGS = -ffreestanding -mrtd -mregparm=3
|
|
||||||
COMMON_LDFLAGS = -nostdlib
|
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
|
||||||
script/lexer.c_DEPENDENCIES = grub_script.tab.h
|
|
||||||
|
|
||||||
# Images.
|
# Images.
|
||||||
pkglib_PROGRAMS = kernel.img
|
pkglib_PROGRAMS = kernel.img
|
||||||
|
@ -29,24 +24,11 @@ kernel_img_SOURCES = kern/i386/ieee1275/startup.S \
|
||||||
term/ieee1275/ofconsole.c \
|
term/ieee1275/ofconsole.c \
|
||||||
disk/ieee1275/ofdisk.c \
|
disk/ieee1275/ofdisk.c \
|
||||||
symlist.c
|
symlist.c
|
||||||
kernel_img_HEADERS = cache.h device.h disk.h dl.h elf.h elfload.h \
|
kernel_img_HEADERS += ieee1275/ieee1275.h
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
|
||||||
ieee1275/ieee1275.h machine/kernel.h machine/loader.h machine/memory.h \
|
|
||||||
list.h handler.h command.h i18n.h env_private.h
|
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,0x10000,-Bstatic
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,0x10000,-Bstatic
|
||||||
|
|
||||||
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
||||||
DEFSYMFILES += kernel_syms.lst
|
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
|
||||||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
# Scripts.
|
# Scripts.
|
||||||
sbin_SCRIPTS = grub-install
|
sbin_SCRIPTS = grub-install
|
||||||
|
|
||||||
|
@ -54,16 +36,10 @@ sbin_SCRIPTS = grub-install
|
||||||
grub_install_SOURCES = util/ieee1275/grub-install.in
|
grub_install_SOURCES = util/ieee1275/grub-install.in
|
||||||
|
|
||||||
# Modules.
|
# Modules.
|
||||||
pkglib_MODULES = halt.mod reboot.mod suspend.mod \
|
pkglib_MODULES = halt.mod suspend.mod \
|
||||||
aout.mod serial.mod linux.mod \
|
aout.mod linux.mod \
|
||||||
nand.mod memdisk.mod pci.mod lspci.mod datetime.mod \
|
nand.mod datetime.mod \
|
||||||
date.mod datehook.mod lsmmap.mod mmap.mod
|
mmap.mod
|
||||||
|
|
||||||
# For boot.mod.
|
|
||||||
pkglib_MODULES += boot.mod
|
|
||||||
boot_mod_SOURCES = commands/boot.c
|
|
||||||
boot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For mmap.mod.
|
# For mmap.mod.
|
||||||
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c
|
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c
|
||||||
|
@ -81,21 +57,11 @@ suspend_mod_SOURCES = commands/ieee1275/suspend.c
|
||||||
suspend_mod_CFLAGS = $(COMMON_CFLAGS)
|
suspend_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
suspend_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
suspend_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For reboot.mod
|
|
||||||
reboot_mod_SOURCES = commands/reboot.c
|
|
||||||
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For halt.mod
|
# For halt.mod
|
||||||
halt_mod_SOURCES = commands/halt.c
|
halt_mod_SOURCES = commands/halt.c
|
||||||
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For serial.mod.
|
|
||||||
serial_mod_SOURCES = term/serial.c
|
|
||||||
serial_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For linux.mod.
|
# For linux.mod.
|
||||||
linux_mod_SOURCES = loader/i386/ieee1275/linux.c
|
linux_mod_SOURCES = loader/i386/ieee1275/linux.c
|
||||||
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
@ -106,40 +72,10 @@ nand_mod_SOURCES = disk/ieee1275/nand.c
|
||||||
nand_mod_CFLAGS = $(COMMON_CFLAGS)
|
nand_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
nand_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
nand_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For memdisk.mod.
|
|
||||||
memdisk_mod_SOURCES = disk/memdisk.c
|
|
||||||
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For pci.mod
|
|
||||||
pci_mod_SOURCES = bus/pci.c
|
|
||||||
pci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For lspci.mod
|
|
||||||
lspci_mod_SOURCES = commands/lspci.c
|
|
||||||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For datetime.mod
|
# For datetime.mod
|
||||||
datetime_mod_SOURCES = lib/cmos_datetime.c
|
datetime_mod_SOURCES = lib/cmos_datetime.c
|
||||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For date.mod
|
|
||||||
date_mod_SOURCES = commands/date.c
|
|
||||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For datehook.mod
|
|
||||||
datehook_mod_SOURCES = hook/datehook.c
|
|
||||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For lsmmap.mod
|
|
||||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
|
||||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
include $(srcdir)/conf/i386.mk
|
include $(srcdir)/conf/i386.mk
|
||||||
include $(srcdir)/conf/common.mk
|
include $(srcdir)/conf/common.mk
|
||||||
|
|
|
@ -2,12 +2,7 @@
|
||||||
|
|
||||||
GRUB_KERNEL_MACHINE_LINK_ADDR = 0x8200
|
GRUB_KERNEL_MACHINE_LINK_ADDR = 0x8200
|
||||||
|
|
||||||
COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
|
COMMON_CFLAGS = -mrtd -mregparm=3
|
||||||
COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
|
|
||||||
COMMON_LDFLAGS = -m32 -nostdlib
|
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
|
||||||
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 \
|
||||||
|
@ -59,27 +54,13 @@ kernel_img_SOURCES = kern/i386/pc/startup.S \
|
||||||
kern/env.c \
|
kern/env.c \
|
||||||
term/i386/pc/console.c term/i386/vga_common.c \
|
term/i386/pc/console.c term/i386/vga_common.c \
|
||||||
symlist.c
|
symlist.c
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
kernel_img_HEADERS += machine/biosdisk.h machine/vga.h machine/vbe.h \
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
machine/pxe.h i386/pit.h machine/init.h
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
|
||||||
machine/biosdisk.h machine/boot.h machine/console.h machine/init.h \
|
|
||||||
machine/memory.h machine/loader.h machine/vga.h machine/vbe.h \
|
|
||||||
machine/kernel.h machine/pxe.h i386/pit.h list.h handler.h command.h \
|
|
||||||
i18n.h env_private.h
|
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS) $(TARGET_IMG_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS) $(TARGET_IMG_CFLAGS)
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR) $(COMMON_CFLAGS)
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR) $(COMMON_CFLAGS)
|
||||||
kernel_img_FORMAT = binary
|
kernel_img_FORMAT = binary
|
||||||
|
|
||||||
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
||||||
DEFSYMFILES += kernel_syms.lst
|
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
|
||||||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
# Utilities.
|
# Utilities.
|
||||||
bin_UTILITIES = grub-mkimage
|
bin_UTILITIES = grub-mkimage
|
||||||
sbin_UTILITIES = grub-setup
|
sbin_UTILITIES = grub-setup
|
||||||
|
@ -96,7 +77,8 @@ grub_setup_SOURCES = gnulib/progname.c \
|
||||||
util/i386/pc/grub-setup.c util/hostdisk.c \
|
util/i386/pc/grub-setup.c util/hostdisk.c \
|
||||||
util/misc.c util/getroot.c kern/device.c kern/disk.c \
|
util/misc.c util/getroot.c kern/device.c kern/disk.c \
|
||||||
kern/err.c kern/misc.c kern/parser.c kern/partition.c \
|
kern/err.c kern/misc.c kern/parser.c kern/partition.c \
|
||||||
kern/file.c kern/list.c kern/fs.c kern/env.c fs/fshelp.c \
|
kern/file.c kern/fs.c kern/env.c kern/list.c \
|
||||||
|
fs/fshelp.c \
|
||||||
\
|
\
|
||||||
fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
|
fs/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/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
|
||||||
|
@ -117,20 +99,14 @@ bin_SCRIPTS += grub-mkrescue
|
||||||
grub_mkrescue_SOURCES = util/grub-mkrescue.in
|
grub_mkrescue_SOURCES = util/grub-mkrescue.in
|
||||||
|
|
||||||
pkglib_MODULES = biosdisk.mod chain.mod \
|
pkglib_MODULES = biosdisk.mod chain.mod \
|
||||||
reboot.mod halt.mod \
|
halt.mod \
|
||||||
vbe.mod vbetest.mod vbeinfo.mod play.mod serial.mod \
|
vbe.mod vbetest.mod vbeinfo.mod \
|
||||||
vga.mod memdisk.mod pci.mod lspci.mod \
|
vga.mod \
|
||||||
aout.mod bsd.mod pxe.mod pxecmd.mod datetime.mod date.mod \
|
aout.mod bsd.mod pxe.mod pxecmd.mod datetime.mod \
|
||||||
datehook.mod lsmmap.mod ata_pthru.mod hdparm.mod \
|
ata_pthru.mod hdparm.mod \
|
||||||
usb.mod uhci.mod ohci.mod usbtest.mod usbms.mod usb_keyboard.mod \
|
usb.mod uhci.mod ohci.mod usbtest.mod usbms.mod usb_keyboard.mod \
|
||||||
efiemu.mod mmap.mod acpi.mod drivemap.mod
|
efiemu.mod mmap.mod acpi.mod drivemap.mod
|
||||||
|
|
||||||
# For boot.mod.
|
|
||||||
pkglib_MODULES += boot.mod
|
|
||||||
boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
|
|
||||||
boot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For drivemap.mod.
|
# For drivemap.mod.
|
||||||
drivemap_mod_SOURCES = commands/i386/pc/drivemap.c \
|
drivemap_mod_SOURCES = commands/i386/pc/drivemap.c \
|
||||||
commands/i386/pc/drivemap_int13h.S
|
commands/i386/pc/drivemap_int13h.S
|
||||||
|
@ -187,21 +163,11 @@ xnu_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
|
|
||||||
# For reboot.mod.
|
|
||||||
reboot_mod_SOURCES = commands/reboot.c
|
|
||||||
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For halt.mod.
|
# For halt.mod.
|
||||||
halt_mod_SOURCES = commands/i386/pc/halt.c
|
halt_mod_SOURCES = commands/i386/pc/halt.c
|
||||||
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For serial.mod.
|
|
||||||
serial_mod_SOURCES = term/serial.c
|
|
||||||
serial_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For vbe.mod.
|
# For vbe.mod.
|
||||||
vbe_mod_SOURCES = video/i386/pc/vbe.c
|
vbe_mod_SOURCES = video/i386/pc/vbe.c
|
||||||
vbe_mod_CFLAGS = $(COMMON_CFLAGS)
|
vbe_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
@ -217,31 +183,11 @@ vbetest_mod_SOURCES = commands/i386/pc/vbetest.c
|
||||||
vbetest_mod_CFLAGS = $(COMMON_CFLAGS)
|
vbetest_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
vbetest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
vbetest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For play.mod.
|
|
||||||
play_mod_SOURCES = commands/i386/pc/play.c
|
|
||||||
play_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
play_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For vga.mod.
|
# For vga.mod.
|
||||||
vga_mod_SOURCES = term/i386/pc/vga.c
|
vga_mod_SOURCES = term/i386/pc/vga.c
|
||||||
vga_mod_CFLAGS = $(COMMON_CFLAGS)
|
vga_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
vga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
vga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For memdisk.mod.
|
|
||||||
memdisk_mod_SOURCES = disk/memdisk.c
|
|
||||||
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For pci.mod
|
|
||||||
pci_mod_SOURCES = bus/pci.c
|
|
||||||
pci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For lspci.mod
|
|
||||||
lspci_mod_SOURCES = commands/lspci.c
|
|
||||||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For aout.mod
|
# For aout.mod
|
||||||
aout_mod_SOURCES = loader/aout.c
|
aout_mod_SOURCES = loader/aout.c
|
||||||
aout_mod_CFLAGS = $(COMMON_CFLAGS)
|
aout_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
@ -298,21 +244,6 @@ datetime_mod_SOURCES = lib/cmos_datetime.c
|
||||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For date.mod
|
|
||||||
date_mod_SOURCES = commands/date.c
|
|
||||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For datehook.mod
|
|
||||||
datehook_mod_SOURCES = hook/datehook.c
|
|
||||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For lsmmap.mod
|
|
||||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
|
||||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For ata_pthru.mod.
|
# For ata_pthru.mod.
|
||||||
ata_pthru_mod_SOURCES = disk/ata_pthru.c
|
ata_pthru_mod_SOURCES = disk/ata_pthru.c
|
||||||
ata_pthru_mod_CFLAGS = $(COMMON_CFLAGS)
|
ata_pthru_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
|
|
@ -1,2 +1,88 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
include $(srcdir)/conf/i386-coreboot.mk
|
|
||||||
|
COMMON_CFLAGS = -mrtd -mregparm=3
|
||||||
|
|
||||||
|
# Images.
|
||||||
|
|
||||||
|
GRUB_KERNEL_MACHINE_LINK_ADDR = 0x8200
|
||||||
|
GRUB_BOOT_MACHINE_LINK_ADDR = 0xffe00
|
||||||
|
|
||||||
|
pkglib_IMAGES += boot.img
|
||||||
|
boot_img_SOURCES = boot/i386/qemu/boot.S
|
||||||
|
boot_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
||||||
|
boot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
||||||
|
boot_img_FORMAT = binary
|
||||||
|
|
||||||
|
bin_UTILITIES += grub-mkimage
|
||||||
|
grub_mkimage_SOURCES = util/grub-mkrawimage.c util/misc.c \
|
||||||
|
util/resolve.c gnulib/progname.c
|
||||||
|
grub_mkimage_CFLAGS = -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
||||||
|
util/grub-mkrawimage.c_DEPENDENCIES = Makefile
|
||||||
|
|
||||||
|
pkglib_IMAGES += kernel.img
|
||||||
|
kernel_img_SOURCES = kern/i386/qemu/startup.S \
|
||||||
|
kern/i386/misc.S \
|
||||||
|
kern/i386/coreboot/init.c \
|
||||||
|
kern/i386/qemu/mmap.c \
|
||||||
|
kern/i386/halt.c \
|
||||||
|
kern/main.c kern/device.c \
|
||||||
|
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
||||||
|
kern/misc.c kern/mm.c kern/term.c \
|
||||||
|
kern/rescue_parser.c kern/rescue_reader.c \
|
||||||
|
kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
|
||||||
|
kern/$(target_cpu)/dl.c kern/parser.c kern/partition.c \
|
||||||
|
kern/i386/tsc.c kern/i386/pit.c \
|
||||||
|
kern/generic/rtc_get_time_ms.c \
|
||||||
|
kern/generic/millisleep.c \
|
||||||
|
kern/env.c \
|
||||||
|
term/i386/pc/vga_text.c term/i386/vga_common.c \
|
||||||
|
symlist.c
|
||||||
|
kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
||||||
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
||||||
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
||||||
|
kernel_img_FORMAT = binary
|
||||||
|
|
||||||
|
sbin_SCRIPTS += grub-install
|
||||||
|
grub_install_SOURCES = util/grub-install.in
|
||||||
|
|
||||||
|
bin_SCRIPTS += grub-mkrescue
|
||||||
|
grub_mkrescue_SOURCES = util/grub-mkrescue.in
|
||||||
|
|
||||||
|
# Modules.
|
||||||
|
pkglib_MODULES = linux.mod aout.mod halt.mod datetime.mod mmap.mod
|
||||||
|
|
||||||
|
# For mmap.mod.
|
||||||
|
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c
|
||||||
|
mmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
mmap_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
|
|
||||||
|
# For linux.mod.
|
||||||
|
linux_mod_SOURCES = loader/i386/linux.c
|
||||||
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For halt.mod.
|
||||||
|
halt_mod_SOURCES = commands/halt.c
|
||||||
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For aout.mod.
|
||||||
|
aout_mod_SOURCES = loader/aout.c
|
||||||
|
aout_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
aout_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For bsd.mod
|
||||||
|
pkglib_MODULES += bsd.mod
|
||||||
|
bsd_mod_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c loader/i386/bsd_helper.S loader/i386/bsd_trampoline.S
|
||||||
|
bsd_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
bsd_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
bsd_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
|
|
||||||
|
# For datetime.mod
|
||||||
|
datetime_mod_SOURCES = lib/cmos_datetime.c
|
||||||
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
include $(srcdir)/conf/i386.mk
|
||||||
|
include $(srcdir)/conf/common.mk
|
||||||
|
|
|
@ -47,3 +47,28 @@ multiboot2_mod_SOURCES = loader/i386/multiboot.c \
|
||||||
multiboot2_mod_CFLAGS = $(COMMON_CFLAGS) -DGRUB_USE_MULTIBOOT2
|
multiboot2_mod_CFLAGS = $(COMMON_CFLAGS) -DGRUB_USE_MULTIBOOT2
|
||||||
multiboot2_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
multiboot2_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
multiboot2_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
multiboot2_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
|
|
||||||
|
# For serial.mod.
|
||||||
|
pkglib_MODULES += serial.mod
|
||||||
|
serial_mod_SOURCES = term/serial.c
|
||||||
|
serial_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For pci.mod
|
||||||
|
pkglib_MODULES += pci.mod
|
||||||
|
pci_mod_SOURCES = bus/pci.c
|
||||||
|
pci_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For lspci.mod
|
||||||
|
pkglib_MODULES += lspci.mod
|
||||||
|
lspci_mod_SOURCES = commands/lspci.c
|
||||||
|
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For play.mod.
|
||||||
|
pkglib_MODULES += play.mod
|
||||||
|
play_mod_SOURCES = commands/i386/pc/play.c
|
||||||
|
play_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
play_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,9 @@ LINK_BASE = 0x80200000
|
||||||
target_machine=yeeloong
|
target_machine=yeeloong
|
||||||
COMMON_CFLAGS += -march=mips3
|
COMMON_CFLAGS += -march=mips3
|
||||||
COMMON_ASFLAGS += -march=mips3
|
COMMON_ASFLAGS += -march=mips3
|
||||||
|
|
||||||
|
kernel_img_HEADERS += pci.h bitmap.h video.h gfxterm.h font.h bitmap_scale.h bufio.h
|
||||||
|
|
||||||
include $(srcdir)/conf/mips.mk
|
include $(srcdir)/conf/mips.mk
|
||||||
|
|
||||||
pkglib_IMAGES = kernel.img
|
pkglib_IMAGES = kernel.img
|
||||||
|
@ -61,19 +64,11 @@ datetime_mod_SOURCES = lib/cmos_datetime.c
|
||||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For date.mod
|
pkglib_MODULES += linux.mod
|
||||||
pkglib_MODULES += date.mod
|
linux_mod_SOURCES = loader/$(target_cpu)/linux.c
|
||||||
date_mod_SOURCES = commands/date.c
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
linux_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For datehook.mod
|
|
||||||
pkglib_MODULES += datehook.mod
|
|
||||||
datehook_mod_SOURCES = hook/datehook.c
|
|
||||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
sbin_SCRIPTS += grub-install
|
sbin_SCRIPTS += grub-install
|
||||||
grub_install_SOURCES = util/grub-install.in
|
grub_install_SOURCES = util/grub-install.in
|
||||||
|
|
||||||
|
|
|
@ -1,33 +1,10 @@
|
||||||
|
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
COMMON_ASFLAGS += -nostdinc
|
COMMON_CFLAGS += -mexplicit-relocs -mflush-func=grub_cpu_flush_cache
|
||||||
COMMON_CFLAGS += -ffreestanding -mexplicit-relocs -mflush-func=grub_cpu_flush_cache
|
|
||||||
COMMON_LDFLAGS += -nostdlib
|
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
|
||||||
script/lexer.c_DEPENDENCIES = grub_script.tab.h
|
|
||||||
|
|
||||||
# Images.
|
# Images.
|
||||||
|
kernel_img_HEADERS += cpu/libgcc.h cpu/cache.h
|
||||||
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
||||||
DEFSYMFILES += kernel_syms.lst
|
|
||||||
|
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
|
||||||
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h reader.h \
|
|
||||||
symbol.h term.h time.h types.h loader.h partition.h \
|
|
||||||
msdos_partition.h machine/kernel.h handler.h list.h \
|
|
||||||
command.h machine/memory.h cpu/libgcc.h cpu/cache.h i18n.h env_private.h
|
|
||||||
|
|
||||||
ifeq ($(platform), yeeloong)
|
|
||||||
kernel_img_HEADERS += pci.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
|
||||||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
# Scripts.
|
# Scripts.
|
||||||
sbin_SCRIPTS =
|
sbin_SCRIPTS =
|
||||||
|
@ -40,26 +17,6 @@ grub_mkimage_SOURCES = gnulib/progname.c util/grub-mkrawimage.c util/misc.c \
|
||||||
grub_mkimage_CFLAGS = -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(LINK_BASE)
|
grub_mkimage_CFLAGS = -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(LINK_BASE)
|
||||||
util/grub-mkrawimage.c_DEPENDENCIES = Makefile
|
util/grub-mkrawimage.c_DEPENDENCIES = Makefile
|
||||||
|
|
||||||
# Modules.
|
|
||||||
pkglib_MODULES = memdisk.mod \
|
|
||||||
lsmmap.mod
|
|
||||||
|
|
||||||
# For boot.mod.
|
|
||||||
pkglib_MODULES += boot.mod
|
|
||||||
boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
|
|
||||||
boot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For memdisk.mod.
|
|
||||||
memdisk_mod_SOURCES = disk/memdisk.c
|
|
||||||
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For lsmmap.mod
|
|
||||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
|
||||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For serial.mod.
|
# For serial.mod.
|
||||||
pkglib_MODULES += serial.mod
|
pkglib_MODULES += serial.mod
|
||||||
serial_mod_SOURCES = term/serial.c
|
serial_mod_SOURCES = term/serial.c
|
||||||
|
@ -73,10 +30,4 @@ relocator_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
relocator_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
relocator_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
relocator_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
relocator_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
pkglib_MODULES += linux.mod
|
|
||||||
linux_mod_SOURCES = loader/$(target_cpu)/linux.c
|
|
||||||
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
linux_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
||||||
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
include $(srcdir)/conf/common.mk
|
include $(srcdir)/conf/common.mk
|
||||||
|
|
|
@ -1,29 +1,9 @@
|
||||||
|
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
COMMON_ASFLAGS = -nostdinc -D__ASSEMBLY__
|
|
||||||
COMMON_CFLAGS = -ffreestanding
|
|
||||||
COMMON_LDFLAGS += -nostdlib
|
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
|
||||||
script/lexer.c_DEPENDENCIES = grub_script.tab.h
|
|
||||||
|
|
||||||
# Images.
|
# Images.
|
||||||
|
|
||||||
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
kernel_img_HEADERS += cpu/libgcc.h ieee1275/ieee1275.h
|
||||||
DEFSYMFILES += kernel_syms.lst
|
|
||||||
|
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
|
||||||
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h reader.h \
|
|
||||||
symbol.h term.h time.h types.h powerpc/libgcc.h loader.h partition.h \
|
|
||||||
msdos_partition.h ieee1275/ieee1275.h machine/kernel.h handler.h list.h \
|
|
||||||
command.h i18n.h env_private.h
|
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
|
||||||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
pkglib_PROGRAMS = kernel.img
|
pkglib_PROGRAMS = kernel.img
|
||||||
|
@ -57,47 +37,33 @@ grub_install_SOURCES = util/ieee1275/grub-install.in
|
||||||
grub_mkrescue_SOURCES = util/powerpc/ieee1275/grub-mkrescue.in
|
grub_mkrescue_SOURCES = util/powerpc/ieee1275/grub-mkrescue.in
|
||||||
|
|
||||||
# Modules.
|
# Modules.
|
||||||
pkglib_MODULES = halt.mod \
|
pkglib_MODULES += ieee1275_fb.mod
|
||||||
linux.mod \
|
ieee1275_fb_mod_SOURCES = video/ieee1275.c
|
||||||
reboot.mod \
|
ieee1275_fb_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
suspend.mod \
|
ieee1275_fb_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
memdisk.mod \
|
|
||||||
lsmmap.mod
|
|
||||||
|
|
||||||
# For boot.mod.
|
|
||||||
pkglib_MODULES += boot.mod
|
|
||||||
boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
|
|
||||||
boot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For linux.mod.
|
# For linux.mod.
|
||||||
|
pkglib_MODULES += linux.mod
|
||||||
linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
|
linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
|
||||||
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For suspend.mod
|
# For suspend.mod
|
||||||
|
pkglib_MODULES += suspend.mod
|
||||||
suspend_mod_SOURCES = commands/ieee1275/suspend.c
|
suspend_mod_SOURCES = commands/ieee1275/suspend.c
|
||||||
suspend_mod_CFLAGS = $(COMMON_CFLAGS)
|
suspend_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
suspend_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
suspend_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For reboot.mod
|
|
||||||
reboot_mod_SOURCES = commands/reboot.c
|
|
||||||
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For halt.mod
|
# For halt.mod
|
||||||
|
pkglib_MODULES += halt.mod
|
||||||
halt_mod_SOURCES = commands/halt.c
|
halt_mod_SOURCES = commands/halt.c
|
||||||
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For memdisk.mod.
|
# For datetime.mod
|
||||||
memdisk_mod_SOURCES = disk/memdisk.c
|
pkglib_MODULES += datetime.mod
|
||||||
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
datetime_mod_SOURCES = lib/ieee1275/datetime.c
|
||||||
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
# For lsmmap.mod
|
|
||||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
|
||||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
include $(srcdir)/conf/common.mk
|
include $(srcdir)/conf/common.mk
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
|
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
COMMON_ASFLAGS = -nostdinc -m64
|
COMMON_CFLAGS = -mno-app-regs
|
||||||
COMMON_CFLAGS = -ffreestanding -m64 -mno-app-regs
|
COMMON_LDFLAGS = -melf64_sparc -mno-relax
|
||||||
COMMON_LDFLAGS = -melf64_sparc -nostdlib -mno-relax
|
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
|
||||||
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
|
||||||
|
@ -23,15 +19,7 @@ diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,0x4200
|
diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,0x4200
|
||||||
diskboot_img_FORMAT = binary
|
diskboot_img_FORMAT = binary
|
||||||
|
|
||||||
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
kernel_img_HEADERS += cpu/libgcc.h ieee1275/ieee1275.h cpu/ieee1275/ieee1275.h
|
||||||
DEFSYMFILES += kernel_syms.lst
|
|
||||||
|
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
|
||||||
list.h handler.h command.h i18n.h \
|
|
||||||
sparc64/libgcc.h ieee1275/ieee1275.h machine/kernel.h \
|
|
||||||
sparc64/ieee1275/ieee1275.h env_private.h
|
|
||||||
kernel_img_SOURCES = kern/sparc64/ieee1275/crt0.S kern/ieee1275/cmain.c \
|
kernel_img_SOURCES = kern/sparc64/ieee1275/crt0.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 \
|
||||||
|
@ -48,21 +36,15 @@ kernel_img_SOURCES = kern/sparc64/ieee1275/crt0.S kern/ieee1275/cmain.c \
|
||||||
symlist.c kern/$(target_cpu)/cache.S
|
symlist.c kern/$(target_cpu)/cache.S
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,0x200000,-Bstatic,-melf64_sparc -static-libgcc -lgcc
|
kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,0x4400,-Bstatic,-melf64_sparc -static-libgcc -lgcc
|
||||||
kernel_img_FORMAT = binary
|
kernel_img_FORMAT = binary
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
|
||||||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
# Utilities.
|
# Utilities.
|
||||||
bin_UTILITIES = grub-mkimage
|
bin_UTILITIES = grub-mkimage
|
||||||
sbin_UTILITIES = grub-setup grub-ofpathname
|
sbin_UTILITIES = grub-setup grub-ofpathname
|
||||||
|
|
||||||
# For grub-mkimage.
|
# For grub-mkimage.
|
||||||
grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
|
grub_mkimage_SOURCES = util/grub-mkrawimage.c util/misc.c \
|
||||||
util/resolve.c gnulib/progname.c
|
util/resolve.c gnulib/progname.c
|
||||||
|
|
||||||
# For grub-setup.
|
# For grub-setup.
|
||||||
|
@ -70,7 +52,8 @@ util/sparc64/ieee1275/grub-setup.c_DEPENDENCIES = grub_setup_init.h
|
||||||
grub_setup_SOURCES = util/sparc64/ieee1275/grub-setup.c util/hostdisk.c \
|
grub_setup_SOURCES = util/sparc64/ieee1275/grub-setup.c util/hostdisk.c \
|
||||||
util/misc.c util/getroot.c kern/device.c kern/disk.c \
|
util/misc.c util/getroot.c kern/device.c kern/disk.c \
|
||||||
kern/err.c kern/misc.c kern/parser.c kern/partition.c \
|
kern/err.c kern/misc.c kern/parser.c kern/partition.c \
|
||||||
kern/file.c kern/fs.c kern/env.c kern/list.c fs/fshelp.c \
|
kern/file.c kern/fs.c kern/env.c kern/list.c \
|
||||||
|
fs/fshelp.c \
|
||||||
\
|
\
|
||||||
fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
|
fs/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/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
|
||||||
|
@ -96,41 +79,27 @@ sbin_SCRIPTS = grub-install
|
||||||
grub_install_SOURCES = util/grub-install.in
|
grub_install_SOURCES = util/grub-install.in
|
||||||
|
|
||||||
# Modules.
|
# Modules.
|
||||||
pkglib_MODULES = halt.mod \
|
pkglib_MODULES += ieee1275_fb.mod
|
||||||
linux.mod \
|
ieee1275_fb_mod_SOURCES = video/ieee1275.c
|
||||||
reboot.mod \
|
ieee1275_fb_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
memdisk.mod \
|
ieee1275_fb_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
lsmmap.mod
|
|
||||||
|
|
||||||
# For boot.mod.
|
|
||||||
pkglib_MODULES += boot.mod
|
|
||||||
boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
|
|
||||||
boot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For linux.mod.
|
# For linux.mod.
|
||||||
|
pkglib_MODULES += linux.mod
|
||||||
linux_mod_SOURCES = loader/sparc64/ieee1275/linux.c
|
linux_mod_SOURCES = loader/sparc64/ieee1275/linux.c
|
||||||
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For reboot.mod.
|
|
||||||
reboot_mod_SOURCES = commands/reboot.c
|
|
||||||
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For halt.mod.
|
# For halt.mod.
|
||||||
|
pkglib_MODULES += halt.mod
|
||||||
halt_mod_SOURCES = commands/halt.c
|
halt_mod_SOURCES = commands/halt.c
|
||||||
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For memdisk.mod.
|
# For datetime.mod
|
||||||
memdisk_mod_SOURCES = disk/memdisk.c
|
pkglib_MODULES += datetime.mod
|
||||||
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
datetime_mod_SOURCES = lib/ieee1275/datetime.c
|
||||||
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
# For lsmmap.mod
|
|
||||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
|
||||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
include $(srcdir)/conf/common.mk
|
include $(srcdir)/conf/common.mk
|
||||||
|
|
|
@ -37,12 +37,28 @@ example_scripted_test_SOURCES = tests/example_scripted_test.in
|
||||||
check_SCRIPTS += example_grub_script_test
|
check_SCRIPTS += example_grub_script_test
|
||||||
example_grub_script_test_SOURCES = tests/example_grub_script_test.in
|
example_grub_script_test_SOURCES = tests/example_grub_script_test.in
|
||||||
|
|
||||||
|
#
|
||||||
|
# Rules for real tests
|
||||||
|
#
|
||||||
|
|
||||||
|
check_SCRIPTS += grub_script_echo1
|
||||||
|
grub_script_echo1_SOURCES = tests/grub_script_echo1.in
|
||||||
|
|
||||||
|
check_SCRIPTS += grub_script_echo_keywords
|
||||||
|
grub_script_echo_keywords_SOURCES = tests/grub_script_echo_keywords.in
|
||||||
|
|
||||||
|
check_SCRIPTS += grub_script_vars1
|
||||||
|
grub_script_vars1_SOURCES = tests/grub_script_vars1.in
|
||||||
|
|
||||||
# List of tests to execute on "make check"
|
# List of tests to execute on "make check"
|
||||||
SCRIPTED_TESTS = example_scripted_test
|
# SCRIPTED_TESTS = example_scripted_test
|
||||||
SCRIPTED_TESTS += example_grub_script_test
|
# SCRIPTED_TESTS += example_grub_script_test
|
||||||
UNIT_TESTS = example_unit_test
|
# UNIT_TESTS = example_unit_test
|
||||||
FUNCTIONAL_TESTS = example_functional_test.mod
|
# FUNCTIONAL_TESTS = example_functional_test.mod
|
||||||
|
|
||||||
|
SCRIPTED_TESTS = grub_script_echo1
|
||||||
|
SCRIPTED_TESTS += grub_script_echo_keywords
|
||||||
|
SCRIPTED_TESTS += grub_script_vars1
|
||||||
|
|
||||||
# dependencies between tests and testing-tools
|
# dependencies between tests and testing-tools
|
||||||
$(SCRIPTED_TESTS): grub-shell grub-shell-tester
|
$(SCRIPTED_TESTS): grub-shell grub-shell-tester
|
||||||
|
|
113
conf/x86-efi.rmk
Normal file
113
conf/x86-efi.rmk
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
# -*- makefile -*-
|
||||||
|
|
||||||
|
# Utilities.
|
||||||
|
bin_UTILITIES = grub-mkimage
|
||||||
|
|
||||||
|
# For grub-mkimage.
|
||||||
|
grub_mkimage_SOURCES = gnulib/progname.c util/i386/efi/grub-mkimage.c \
|
||||||
|
util/misc.c util/resolve.c
|
||||||
|
util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
|
||||||
|
|
||||||
|
# Scripts.
|
||||||
|
sbin_SCRIPTS = grub-install
|
||||||
|
|
||||||
|
# For grub-install.
|
||||||
|
grub_install_SOURCES = util/i386/efi/grub-install.in
|
||||||
|
|
||||||
|
# Modules.
|
||||||
|
pkglib_PROGRAMS = kernel.img
|
||||||
|
pkglib_MODULES = chain.mod appleldr.mod \
|
||||||
|
linux.mod halt.mod \
|
||||||
|
datetime.mod loadbios.mod \
|
||||||
|
fixvideo.mod mmap.mod acpi.mod
|
||||||
|
|
||||||
|
# For kernel.img.
|
||||||
|
kernel_img_RELOCATABLE = yes
|
||||||
|
kernel_img_SOURCES = kern/$(target_cpu)/efi/startup.S kern/main.c kern/device.c \
|
||||||
|
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
||||||
|
kern/misc.c kern/mm.c kern/term.c \
|
||||||
|
kern/rescue_parser.c kern/rescue_reader.c \
|
||||||
|
kern/$(target_cpu)/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
|
||||||
|
kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
|
||||||
|
term/efi/console.c disk/efi/efidisk.c \
|
||||||
|
kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
|
||||||
|
kern/i386/tsc.c kern/i386/pit.c \
|
||||||
|
kern/generic/rtc_get_time_ms.c \
|
||||||
|
kern/generic/millisleep.c
|
||||||
|
ifeq ($(target_cpu),x86_64)
|
||||||
|
kernel_img_SOURCES += kern/x86_64/efi/callwrap.S
|
||||||
|
endif
|
||||||
|
kernel_img_HEADERS += efi/efi.h efi/time.h efi/disk.h i386/pit.h
|
||||||
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For acpi.mod.
|
||||||
|
acpi_mod_SOURCES = commands/acpi.c commands/efi/acpi.c
|
||||||
|
acpi_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
acpi_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For mmap.mod.
|
||||||
|
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c \
|
||||||
|
mmap/efi/mmap.c
|
||||||
|
mmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For chain.mod.
|
||||||
|
chain_mod_SOURCES = loader/efi/chainloader.c
|
||||||
|
chain_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For appleldr.mod.
|
||||||
|
appleldr_mod_SOURCES = loader/efi/appleloader.c
|
||||||
|
appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For linux.mod.
|
||||||
|
linux_mod_SOURCES = loader/i386/efi/linux.c
|
||||||
|
ifeq ($(target_cpu), x86_64)
|
||||||
|
linux_mod_SOURCES += loader/i386/linux_trampoline.S
|
||||||
|
endif
|
||||||
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
linux_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For halt.mod.
|
||||||
|
halt_mod_SOURCES = commands/halt.c
|
||||||
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For datetime.mod
|
||||||
|
datetime_mod_SOURCES = lib/efi/datetime.c
|
||||||
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For loadbios.mod
|
||||||
|
loadbios_mod_SOURCES = commands/efi/loadbios.c
|
||||||
|
loadbios_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
loadbios_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
# For fixvideo.mod
|
||||||
|
fixvideo_mod_SOURCES = commands/efi/fixvideo.c
|
||||||
|
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
pkglib_MODULES += efi_uga.mod
|
||||||
|
efi_uga_mod_SOURCES = video/efi_uga.c
|
||||||
|
efi_uga_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
efi_uga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
pkglib_MODULES += efi_gop.mod
|
||||||
|
efi_gop_mod_SOURCES = video/efi_gop.c
|
||||||
|
efi_gop_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
efi_gop_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
|
pkglib_MODULES += xnu.mod
|
||||||
|
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c \
|
||||||
|
loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c
|
||||||
|
xnu_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
|
|
||||||
|
include $(srcdir)/conf/i386.mk
|
||||||
|
include $(srcdir)/conf/common.mk
|
|
@ -1,166 +1,5 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
COMMON_ASFLAGS = -nostdinc -fno-builtin -m64
|
COMMON_LDFLAGS = -melf_x86_64
|
||||||
COMMON_CFLAGS = -fno-builtin -m64
|
|
||||||
COMMON_LDFLAGS = -melf_x86_64 -nostdlib
|
|
||||||
|
|
||||||
# Used by various components. These rules need to precede them.
|
include $(srcdir)/conf/x86-efi.mk
|
||||||
script/lexer.c_DEPENDENCIES = grub_script.tab.h
|
|
||||||
|
|
||||||
# Utilities.
|
|
||||||
bin_UTILITIES = grub-mkimage
|
|
||||||
|
|
||||||
# For grub-mkimage.
|
|
||||||
grub_mkimage_SOURCES = gnulib/progname.c util/i386/efi/grub-mkimage.c \
|
|
||||||
util/misc.c util/resolve.c
|
|
||||||
|
|
||||||
# For grub-setup.
|
|
||||||
#grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \
|
|
||||||
# util/misc.c util/getroot.c kern/device.c kern/disk.c \
|
|
||||||
# kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \
|
|
||||||
# fs/sfs.c kern/parser.c kern/partition.c partmap/msdos.c \
|
|
||||||
# fs/ufs.c fs/ufs2.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \
|
|
||||||
# kern/fs.c kern/env.c fs/fshelp.c
|
|
||||||
|
|
||||||
# Scripts.
|
|
||||||
sbin_SCRIPTS = grub-install
|
|
||||||
|
|
||||||
# For grub-install.
|
|
||||||
grub_install_SOURCES = util/i386/efi/grub-install.in
|
|
||||||
|
|
||||||
# Modules.
|
|
||||||
pkglib_PROGRAMS = kernel.img
|
|
||||||
pkglib_MODULES = chain.mod appleldr.mod \
|
|
||||||
halt.mod reboot.mod linux.mod pci.mod lspci.mod \
|
|
||||||
datetime.mod date.mod datehook.mod loadbios.mod \
|
|
||||||
fixvideo.mod mmap.mod acpi.mod
|
|
||||||
|
|
||||||
# For kernel.img.
|
|
||||||
kernel_img_RELOCATABLE = yes
|
|
||||||
kernel_img_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \
|
|
||||||
kern/main.c kern/device.c \
|
|
||||||
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
|
||||||
kern/misc.c kern/mm.c kern/term.c \
|
|
||||||
kern/rescue_parser.c kern/rescue_reader.c \
|
|
||||||
kern/$(target_cpu)/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
|
|
||||||
kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
|
|
||||||
kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
|
|
||||||
kern/i386/tsc.c kern/i386/pit.c \
|
|
||||||
kern/generic/millisleep.c kern/generic/rtc_get_time_ms.c \
|
|
||||||
term/efi/console.c disk/efi/efidisk.c
|
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
|
||||||
efi/efi.h efi/time.h efi/disk.h machine/loader.h i386/pit.h list.h \
|
|
||||||
handler.h command.h i18n.h env_private.h
|
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
|
||||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
MOSTLYCLEANFILES += symlist.c
|
|
||||||
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
||||||
DEFSYMFILES += kernel_syms.lst
|
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
|
||||||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
||||||
|
|
||||||
# For boot.mod.
|
|
||||||
pkglib_MODULES += boot.mod
|
|
||||||
boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
|
|
||||||
boot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For acpi.mod.
|
|
||||||
acpi_mod_SOURCES = commands/acpi.c commands/efi/acpi.c
|
|
||||||
acpi_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
acpi_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For mmap.mod.
|
|
||||||
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c \
|
|
||||||
mmap/efi/mmap.c
|
|
||||||
mmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For chain.mod.
|
|
||||||
chain_mod_SOURCES = loader/efi/chainloader.c
|
|
||||||
chain_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For appleldr.mod.
|
|
||||||
appleldr_mod_SOURCES = loader/efi/appleloader.c
|
|
||||||
appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For linux.mod.
|
|
||||||
linux_mod_SOURCES = loader/i386/efi/linux.c loader/i386/linux_trampoline.S
|
|
||||||
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
linux_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
||||||
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For halt.mod.
|
|
||||||
halt_mod_SOURCES = commands/halt.c
|
|
||||||
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For reboot.mod.
|
|
||||||
reboot_mod_SOURCES = commands/reboot.c
|
|
||||||
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For pci.mod
|
|
||||||
pci_mod_SOURCES = bus/pci.c
|
|
||||||
pci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For lspci.mod
|
|
||||||
lspci_mod_SOURCES = commands/lspci.c
|
|
||||||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For datetime.mod
|
|
||||||
datetime_mod_SOURCES = lib/efi/datetime.c
|
|
||||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For date.mod
|
|
||||||
date_mod_SOURCES = commands/date.c
|
|
||||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For datehook.mod
|
|
||||||
datehook_mod_SOURCES = hook/datehook.c
|
|
||||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For loadbios.mod
|
|
||||||
loadbios_mod_SOURCES = commands/efi/loadbios.c
|
|
||||||
loadbios_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
loadbios_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
# For fixvideo.mod
|
|
||||||
fixvideo_mod_SOURCES = commands/efi/fixvideo.c
|
|
||||||
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
pkglib_MODULES += efi_uga.mod
|
|
||||||
efi_uga_mod_SOURCES = video/efi_uga.c
|
|
||||||
efi_uga_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
efi_uga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
pkglib_MODULES += efi_gop.mod
|
|
||||||
efi_gop_mod_SOURCES = video/efi_gop.c
|
|
||||||
efi_gop_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
efi_gop_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
|
|
||||||
pkglib_MODULES += xnu.mod
|
|
||||||
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c \
|
|
||||||
loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c
|
|
||||||
xnu_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
||||||
xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
||||||
xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
||||||
|
|
||||||
include $(srcdir)/conf/i386.mk
|
|
||||||
include $(srcdir)/conf/common.mk
|
|
||||||
|
|
45
configure.ac
45
configure.ac
|
@ -31,7 +31,7 @@ dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
|
||||||
dnl type.
|
dnl type.
|
||||||
|
|
||||||
|
|
||||||
AC_INIT([GRUB],[1.97],[bug-grub@gnu.org])
|
AC_INIT([GRUB],[1.98],[bug-grub@gnu.org])
|
||||||
AM_INIT_AUTOMAKE()
|
AM_INIT_AUTOMAKE()
|
||||||
AC_PREREQ(2.60)
|
AC_PREREQ(2.60)
|
||||||
AC_CONFIG_SRCDIR([include/grub/dl.h])
|
AC_CONFIG_SRCDIR([include/grub/dl.h])
|
||||||
|
@ -51,6 +51,7 @@ fi
|
||||||
|
|
||||||
case "$target_cpu" in
|
case "$target_cpu" in
|
||||||
i[[3456]]86) target_cpu=i386 ;;
|
i[[3456]]86) target_cpu=i386 ;;
|
||||||
|
amd64) target_cpu=x86_64 ;;
|
||||||
sparc) target_cpu=sparc64 ;;
|
sparc) target_cpu=sparc64 ;;
|
||||||
mipsel|mips64el)
|
mipsel|mips64el)
|
||||||
target_cpu=mips;
|
target_cpu=mips;
|
||||||
|
@ -90,6 +91,7 @@ fi
|
||||||
if test -z "$target_alias"; then
|
if test -z "$target_alias"; then
|
||||||
case "$target_cpu"-"$platform" in
|
case "$target_cpu"-"$platform" in
|
||||||
x86_64-efi) ;;
|
x86_64-efi) ;;
|
||||||
|
x86_64-emu) ;;
|
||||||
x86_64-*) target_cpu=i386 ;;
|
x86_64-*) target_cpu=i386 ;;
|
||||||
powerpc64-ieee1275) target_cpu=powerpc ;;
|
powerpc64-ieee1275) target_cpu=powerpc ;;
|
||||||
esac
|
esac
|
||||||
|
@ -138,9 +140,14 @@ case "$platform" in
|
||||||
qemu) machine_CFLAGS="-DGRUB_MACHINE_QEMU=1" ;;
|
qemu) machine_CFLAGS="-DGRUB_MACHINE_QEMU=1" ;;
|
||||||
pc) machine_CFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;;
|
pc) machine_CFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;;
|
||||||
emu) machine_CFLAGS="-DGRUB_MACHINE_EMU=1" ;;
|
emu) machine_CFLAGS="-DGRUB_MACHINE_EMU=1" ;;
|
||||||
yeeloong) machine_CFLAGS="-DGRUB_MACHINE_MIPS_YEELOONG=1 -DGRUB_MACHINE_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
yeeloong) machine_CFLAGS="-DGRUB_MACHINE_MIPS_YEELOONG=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||||
qemu-mips) machine_CFLAGS="-DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
qemu-mips) machine_CFLAGS="-DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||||
esac
|
esac
|
||||||
|
case "$target_cpu" in
|
||||||
|
mips) machine_CFLAGS="$machine_CFLAGS -DGRUB_MACHINE_MIPS=1" ;;
|
||||||
|
sparc64) machine_CFLAGS="$machine_CFLAGS -DGRUB_MACHINE_SPARC64=1" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
CFLAGS="$CFLAGS $machine_CFLAGS"
|
CFLAGS="$CFLAGS $machine_CFLAGS"
|
||||||
TARGET_ASFLAGS="$TARGET_ASFLAGS $machine_CFLAGS"
|
TARGET_ASFLAGS="$TARGET_ASFLAGS $machine_CFLAGS"
|
||||||
TARGET_CFLAGS="$TARGET_CFLAGS $machine_CFLAGS"
|
TARGET_CFLAGS="$TARGET_CFLAGS $machine_CFLAGS"
|
||||||
|
@ -163,6 +170,11 @@ if test "x$CMP" = x; then
|
||||||
AC_MSG_ERROR([cmp is not found])
|
AC_MSG_ERROR([cmp is not found])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_PROGS([LEX], [flex])
|
||||||
|
if test "x$LEX" = x; then
|
||||||
|
AC_MSG_ERROR([flex is not found])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CHECK_PROGS([YACC], [bison])
|
AC_CHECK_PROGS([YACC], [bison])
|
||||||
if test "x$YACC" = x; then
|
if test "x$YACC" = x; then
|
||||||
AC_MSG_ERROR([bison is not found])
|
AC_MSG_ERROR([bison is not found])
|
||||||
|
@ -352,6 +364,7 @@ AC_MSG_RESULT([$TARGET_OBJ2ELF])
|
||||||
if test "x$target_m32" = x1; then
|
if test "x$target_m32" = x1; then
|
||||||
# Force 32-bit mode.
|
# Force 32-bit mode.
|
||||||
TARGET_CFLAGS="$TARGET_CFLAGS -m32"
|
TARGET_CFLAGS="$TARGET_CFLAGS -m32"
|
||||||
|
TARGET_ASFLAGS="$TARGET_CFLAGS -m32"
|
||||||
TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
|
TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
|
||||||
TARGET_MODULE_FORMAT="elf32"
|
TARGET_MODULE_FORMAT="elf32"
|
||||||
fi
|
fi
|
||||||
|
@ -359,6 +372,7 @@ fi
|
||||||
if test "x$target_m64" = x1; then
|
if test "x$target_m64" = x1; then
|
||||||
# Force 64-bit mode.
|
# Force 64-bit mode.
|
||||||
TARGET_CFLAGS="$TARGET_CFLAGS -m64"
|
TARGET_CFLAGS="$TARGET_CFLAGS -m64"
|
||||||
|
TARGET_ASFLAGS="$TARGET_ASFLAGS -m64"
|
||||||
TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
|
TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
|
||||||
TARGET_MODULE_FORMAT="elf64"
|
TARGET_MODULE_FORMAT="elf64"
|
||||||
fi
|
fi
|
||||||
|
@ -516,6 +530,21 @@ enable_efiemu=no
|
||||||
fi
|
fi
|
||||||
AC_SUBST([enable_efiemu])
|
AC_SUBST([enable_efiemu])
|
||||||
|
|
||||||
|
if test "$platform" != emu; then
|
||||||
|
AC_CACHE_CHECK([whether -nostdinc -isystem works], [grub_cv_cc_isystem], [
|
||||||
|
SAVED_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
|
||||||
|
int va_arg_func (int fixed, va_list args);]], [[]])],
|
||||||
|
[grub_cv_cc_isystem=yes],
|
||||||
|
[grub_cv_cc_isystem=no])
|
||||||
|
CPPFLAGS="$SAVED_CPPFLAGS"
|
||||||
|
])
|
||||||
|
|
||||||
|
if test x"$grub_cv_cc_isystem" = xyes ; then
|
||||||
|
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Restore the flags.
|
# Restore the flags.
|
||||||
CC="$tmp_CC"
|
CC="$tmp_CC"
|
||||||
|
@ -679,6 +708,16 @@ if test x"$grub_mkfont_excuse" = x ; then
|
||||||
freetype_cflags=`freetype-config --cflags`
|
freetype_cflags=`freetype-config --cflags`
|
||||||
freetype_libs=`freetype-config --libs`
|
freetype_libs=`freetype-config --libs`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x"$grub_mkfont_excuse" = x ; then
|
||||||
|
# Check for freetype libraries.
|
||||||
|
SAVED_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $freetype_cflags"
|
||||||
|
AC_CHECK_HEADERS([ft2build.h], [],
|
||||||
|
[grub_mkfont_excuse=["need freetype2 headers"]])
|
||||||
|
CPPFLAGS="$SAVED_CPPFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
|
if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
|
||||||
AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled])
|
AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled])
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -825,7 +825,7 @@ grub_efidisk_get_device_name (grub_efi_handle_t *handle)
|
||||||
if (! disk)
|
if (! disk)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (disk->id == GRUB_DISK_DEVICE_EFIDISK_ID)
|
if (disk->dev->id == GRUB_DISK_DEVICE_EFIDISK_ID)
|
||||||
{
|
{
|
||||||
struct grub_efidisk_data *d;
|
struct grub_efidisk_data *d;
|
||||||
|
|
||||||
|
|
|
@ -172,16 +172,6 @@ grub_ofdisk_open (const char *name, grub_disk_t disk)
|
||||||
|
|
||||||
grub_dprintf ("disk", "Opening `%s'.\n", op->devpath);
|
grub_dprintf ("disk", "Opening `%s'.\n", op->devpath);
|
||||||
|
|
||||||
grub_ieee1275_open (op->devpath, &dev_ihandle);
|
|
||||||
if (! dev_ihandle)
|
|
||||||
{
|
|
||||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't open device");
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
grub_dprintf ("disk", "Opened `%s' as handle %p.\n", op->devpath,
|
|
||||||
(void *) (unsigned long) dev_ihandle);
|
|
||||||
|
|
||||||
if (grub_ieee1275_finddevice (op->devpath, &dev))
|
if (grub_ieee1275_finddevice (op->devpath, &dev))
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't read device properties");
|
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't read device properties");
|
||||||
|
@ -201,6 +191,16 @@ grub_ofdisk_open (const char *name, grub_disk_t disk)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grub_ieee1275_open (op->devpath, &dev_ihandle);
|
||||||
|
if (! dev_ihandle)
|
||||||
|
{
|
||||||
|
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't open device");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
grub_dprintf ("disk", "Opened `%s' as handle %p.\n", op->devpath,
|
||||||
|
(void *) (unsigned long) dev_ihandle);
|
||||||
|
|
||||||
/* XXX: There is no property to read the number of blocks. There
|
/* XXX: There is no property to read the number of blocks. There
|
||||||
should be a property `#blocks', but it is not there. Perhaps it
|
should be a property `#blocks', but it is not there. Perhaps it
|
||||||
is possible to use seek for this. */
|
is possible to use seek for this. */
|
||||||
|
@ -234,14 +234,10 @@ grub_ofdisk_read (grub_disk_t disk, grub_disk_addr_t sector,
|
||||||
grub_ssize_t status, actual;
|
grub_ssize_t status, actual;
|
||||||
unsigned long long pos;
|
unsigned long long pos;
|
||||||
|
|
||||||
grub_dprintf ("disk",
|
|
||||||
"Reading handle %p: sector 0x%llx, size 0x%lx, buf %p.\n",
|
|
||||||
(void *) disk->data, (long long) sector, (long) size, buf);
|
|
||||||
|
|
||||||
pos = sector * 512UL;
|
pos = sector * 512UL;
|
||||||
|
|
||||||
grub_ieee1275_seek ((grub_ieee1275_ihandle_t) (unsigned long) disk->data,
|
grub_ieee1275_seek ((grub_ieee1275_ihandle_t) (unsigned long) disk->data,
|
||||||
(int) (pos >> 32), (int) pos & 0xFFFFFFFFUL, &status);
|
pos, &status);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
return grub_error (GRUB_ERR_READ_ERROR,
|
return grub_error (GRUB_ERR_READ_ERROR,
|
||||||
"seek error, can't seek block %llu",
|
"seek error, can't seek block %llu",
|
||||||
|
|
|
@ -242,7 +242,7 @@ static struct grub_disk_dev grub_loopback_dev =
|
||||||
|
|
||||||
static grub_extcmd_t cmd;
|
static grub_extcmd_t cmd;
|
||||||
|
|
||||||
GRUB_MOD_INIT(loop)
|
GRUB_MOD_INIT(loopback)
|
||||||
{
|
{
|
||||||
cmd = grub_register_extcmd ("loopback", grub_cmd_loopback,
|
cmd = grub_register_extcmd ("loopback", grub_cmd_loopback,
|
||||||
GRUB_COMMAND_FLAG_BOTH,
|
GRUB_COMMAND_FLAG_BOTH,
|
||||||
|
@ -251,7 +251,7 @@ GRUB_MOD_INIT(loop)
|
||||||
grub_disk_dev_register (&grub_loopback_dev);
|
grub_disk_dev_register (&grub_loopback_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
GRUB_MOD_FINI(loop)
|
GRUB_MOD_FINI(loopback)
|
||||||
{
|
{
|
||||||
grub_unregister_extcmd (cmd);
|
grub_unregister_extcmd (cmd);
|
||||||
grub_disk_dev_unregister (&grub_loopback_dev);
|
grub_disk_dev_unregister (&grub_loopback_dev);
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/machine/kernel.h>
|
|
||||||
|
|
||||||
static char *memdisk_addr;
|
static char *memdisk_addr;
|
||||||
static grub_off_t memdisk_size = 0;
|
static grub_off_t memdisk_size = 0;
|
||||||
|
|
|
@ -208,12 +208,14 @@ grub_scsi_iterate (int (*hook) (const char *name))
|
||||||
for (i = 0; i < luns; i++)
|
for (i = 0; i < luns; i++)
|
||||||
{
|
{
|
||||||
char *sname;
|
char *sname;
|
||||||
|
int ret;
|
||||||
sname = grub_xasprintf ("%s%c", name, 'a' + i);
|
sname = grub_xasprintf ("%s%c", name, 'a' + i);
|
||||||
if (!sname)
|
if (!sname)
|
||||||
return 1;
|
return 1;
|
||||||
if (hook (sname))
|
ret = hook (sname);
|
||||||
return 1;
|
|
||||||
grub_free (sname);
|
grub_free (sname);
|
||||||
|
if (ret)
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
# GRUB gfxmenu theme "winter".
|
|
||||||
# Uses background image from:
|
|
||||||
# http://www.cyberpunkcafe.com/e107_plugins/autogallery/autogallery.php?show=1.Open%20Source%20Wallpaper
|
|
||||||
# "without-leaves.png" was called "Without Leafs in Winter.png"
|
|
||||||
|
|
||||||
lua-script: "winter.lua"
|
|
||||||
title-text: ""
|
|
||||||
title-font: "Helvetica Bold 18"
|
|
||||||
status-font: "Helvetica 8"
|
|
||||||
terminal-font: "Fixed 9"
|
|
||||||
title-color: "40, 40, 40"
|
|
||||||
status-color: "#FFF"
|
|
||||||
status-bg-color: "0, 166, 183, 128"
|
|
||||||
desktop-image: "without-leaves.png"
|
|
||||||
desktop-color: "0, 154, 183"
|
|
||||||
terminal-box: "terminal_*.png"
|
|
||||||
|
|
||||||
+ boot_menu {
|
|
||||||
position = (120, 60)
|
|
||||||
preferred_size = (400, -1)
|
|
||||||
item_font = "Helvetica Bold 14"
|
|
||||||
selected_item_font = "Helvetica Bold 14"
|
|
||||||
item_color = "0, 0, 0"
|
|
||||||
selected_item_color = "203, 251, 255"
|
|
||||||
menu_pixmap_style = "menu_*.png"
|
|
||||||
selected_item_pixmap_style = "select_*.png"
|
|
||||||
icon_width = 44
|
|
||||||
icon_height = 44
|
|
||||||
item_height = 32
|
|
||||||
item_padding = 0
|
|
||||||
item_icon_space = 3
|
|
||||||
item_spacing = 11
|
|
||||||
}
|
|
||||||
|
|
||||||
# You can add text at arbitrary locations on the screen.
|
|
||||||
# The specification within the "+label {...}" block is free-form,
|
|
||||||
# so you can use as much or as little white space as you like.
|
|
||||||
|
|
||||||
+ label {
|
|
||||||
position = (170, 50)
|
|
||||||
font = "smoothansi 13"
|
|
||||||
color = "0,0,128"
|
|
||||||
text = "This is the Winter theme ... brought to you by GRUB!"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Show the text alignment supported by labels.
|
|
||||||
+ vbox {
|
|
||||||
position = (220, 347)
|
|
||||||
preferred_size = (200, -1) # A preferred size of -1 means automatic.
|
|
||||||
+ label { text="Text alignment demo" align="center" font="aqui 11" }
|
|
||||||
+ label { text="Left" align="left" font="cure 11" }
|
|
||||||
+ label { text="Center" align="center" font="cure 11" }
|
|
||||||
+ label { text="Right" align="right" font="cure 11" }
|
|
||||||
}
|
|
||||||
|
|
||||||
+ vbox {
|
|
||||||
position = (580, 10)
|
|
||||||
+ label { text="GNU" font="gelly 11" color="0, 0, 0" }
|
|
||||||
+ label { text="GRUB" font="aqui 11" color="0, 0, 0" }
|
|
||||||
+ label { text="boot loader" font="cure 11" color="0, 0, 0" }
|
|
||||||
}
|
|
||||||
|
|
||||||
+ hbox {
|
|
||||||
position = (80, 10)
|
|
||||||
+ label { text="GNU" font="gelly 11" color="0, 0, 0" }
|
|
||||||
+ label { text="GRUB" font="aqui 11" color="0, 0, 0" }
|
|
||||||
+ label { text="boot loader" font="cure 11" color="0, 0, 0" }
|
|
||||||
}
|
|
||||||
|
|
||||||
# Demonstration of a compound layout: boxes within boxes.
|
|
||||||
+ hbox
|
|
||||||
{
|
|
||||||
position = (480, 3)
|
|
||||||
|
|
||||||
+ vbox
|
|
||||||
{
|
|
||||||
# Note: We can't just use 'size' to set the image's size,
|
|
||||||
# since the vbox will resize the component according to its
|
|
||||||
# preferred size, which for images is the native image size.
|
|
||||||
|
|
||||||
+ image { file="/boot/grub/themes/icons/ubuntu.png"
|
|
||||||
preferred_size = (20, 20) }
|
|
||||||
+ image { file="/boot/grub/themes/icons/gentoo.png"
|
|
||||||
preferred_size = (20, 20) }
|
|
||||||
}
|
|
||||||
|
|
||||||
+ vbox
|
|
||||||
{
|
|
||||||
+ label { text="GRand" font="cure 11" color=#99F }
|
|
||||||
+ label { text="Unified" font="cure 11" color=#BBF }
|
|
||||||
+ label { text="Bootloader" font="cure 11" color=#DDF }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# By defining a 'progress_bar' type component with an ID of '__timeout__',
|
|
||||||
# the progress bar will be used to display the time remaining before an
|
|
||||||
# the default entry is automatically booted.
|
|
||||||
+ progress_bar
|
|
||||||
{
|
|
||||||
id = "__timeout__"
|
|
||||||
position = (80, 393)
|
|
||||||
preferred_size = (500, 24)
|
|
||||||
font = "cure 11"
|
|
||||||
text_color = #000
|
|
||||||
fg_color = #CCF
|
|
||||||
bg_color = #66B
|
|
||||||
border_color = #006
|
|
||||||
show_text = false
|
|
||||||
}
|
|
||||||
|
|
||||||
# Although the progress_bar component is normally used to indicate the
|
|
||||||
# time remaining, it's also possible to create other components with an ID
|
|
||||||
# of '__timeout__'. All components with and ID of 'timeout_bar' will have
|
|
||||||
# the following properties set based on the timeout value:
|
|
||||||
# text, value, start, end, visible.
|
|
||||||
# In this case, we have set 'show_text=false' on the progress bar, and use
|
|
||||||
# the following label's 'text' property to display the message.
|
|
||||||
+ label
|
|
||||||
{
|
|
||||||
id = "__timeout__"
|
|
||||||
position = (80, 420)
|
|
||||||
preferred_size = (500, 24)
|
|
||||||
font = "lime 11"
|
|
||||||
color = #117
|
|
||||||
align = "center"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1126,6 +1126,7 @@ you forget a command, you can run the command @command{help}
|
||||||
* insmod:: Insert a module
|
* insmod:: Insert a module
|
||||||
* keystatus:: Check key modifier status
|
* keystatus:: Check key modifier status
|
||||||
* ls:: List devices or files
|
* ls:: List devices or files
|
||||||
|
* play:: Play a tune
|
||||||
* reboot:: Reboot your computer
|
* reboot:: Reboot your computer
|
||||||
* set:: Set an environment variable
|
* set:: Set an environment variable
|
||||||
* unset:: Unset an environment variable
|
* unset:: Unset an environment variable
|
||||||
|
@ -1364,6 +1365,24 @@ name syntax}), then list the contents of that directory.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
|
||||||
|
@node play
|
||||||
|
@subsection play
|
||||||
|
|
||||||
|
@deffn Command play file | tempo [pitch1 duration1] [pitch2 duration2] ...
|
||||||
|
Plays a tune
|
||||||
|
|
||||||
|
If the argument is a file name (@pxref{File name syntax}), play the tune
|
||||||
|
recorded in it. The file format is first the tempo as an unsigned 32bit
|
||||||
|
little-endian number, then pairs of unsigned 16bit little-endian numbers for
|
||||||
|
pitch and duration pairs.
|
||||||
|
|
||||||
|
If the arguments are a series of numbers, play the inline tune.
|
||||||
|
|
||||||
|
The tempo is the base for all note durations. 60 gives a 1-second base, 120
|
||||||
|
gives a half-second base, etc. Pitches are Hz.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
|
||||||
@node reboot
|
@node reboot
|
||||||
@subsection reboot
|
@subsection reboot
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,7 @@ grub_efiemu_autocore (void)
|
||||||
grub_free (filename);
|
grub_free (filename);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
#ifndef GRUB_UTIL
|
#ifndef GRUB_MACHINE_EMU
|
||||||
err = grub_machine_efiemu_init_tables ();
|
err = grub_machine_efiemu_init_tables ();
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
@ -313,7 +313,7 @@ grub_cmd_efiemu_load (grub_command_t cmd __attribute__ ((unused)),
|
||||||
err = grub_efiemu_load_file (args[0]);
|
err = grub_efiemu_load_file (args[0]);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
#ifndef GRUB_UTIL
|
#ifndef GRUB_MACHINE_EMU
|
||||||
err = grub_machine_efiemu_init_tables ();
|
err = grub_machine_efiemu_init_tables ();
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -281,7 +281,7 @@ grub_efiemu_mmap_init (void)
|
||||||
// the place for memory used by efiemu itself
|
// the place for memory used by efiemu itself
|
||||||
mmap_reserved_size = GRUB_EFI_MAX_MEMORY_TYPE + 1;
|
mmap_reserved_size = GRUB_EFI_MAX_MEMORY_TYPE + 1;
|
||||||
|
|
||||||
#ifndef GRUB_UTIL
|
#ifndef GRUB_MACHINE_EMU
|
||||||
grub_machine_mmap_iterate (bounds_hook);
|
grub_machine_mmap_iterate (bounds_hook);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ grub_efiemu_mmap_fill (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef GRUB_UTIL
|
#ifndef GRUB_MACHINE_EMU
|
||||||
grub_machine_mmap_iterate (fill_hook);
|
grub_machine_mmap_iterate (fill_hook);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -862,7 +862,7 @@ grub_font_get (const char *font_name)
|
||||||
return &null_font;
|
return &null_font;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the full name of the font. For instance, "Helvetica Bold 12". */
|
/* Get the full name of the font. */
|
||||||
const char *
|
const char *
|
||||||
grub_font_get_name (grub_font_t font)
|
grub_font_get_name (grub_font_t font)
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,7 +56,7 @@ lsfonts_command (grub_command_t cmd __attribute__ ((unused)),
|
||||||
|
|
||||||
static grub_command_t cmd_loadfont, cmd_lsfonts;
|
static grub_command_t cmd_loadfont, cmd_lsfonts;
|
||||||
|
|
||||||
GRUB_MOD_INIT(font_manager)
|
GRUB_MOD_INIT(font)
|
||||||
{
|
{
|
||||||
grub_font_loader_init ();
|
grub_font_loader_init ();
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ GRUB_MOD_INIT(font_manager)
|
||||||
0, "List the loaded fonts.");
|
0, "List the loaded fonts.");
|
||||||
}
|
}
|
||||||
|
|
||||||
GRUB_MOD_FINI(font_manager)
|
GRUB_MOD_FINI(font)
|
||||||
{
|
{
|
||||||
/* TODO: Determine way to free allocated resources.
|
/* TODO: Determine way to free allocated resources.
|
||||||
Warning: possible pointer references could be in use. */
|
Warning: possible pointer references could be in use. */
|
||||||
|
|
|
@ -436,7 +436,8 @@ grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
|
||||||
grub_uint32_t indir[blksz / 4];
|
grub_uint32_t indir[blksz / 4];
|
||||||
|
|
||||||
if (grub_disk_read (data->disk,
|
if (grub_disk_read (data->disk,
|
||||||
grub_le_to_cpu32 (inode->blocks.indir_block)
|
((grub_disk_addr_t)
|
||||||
|
grub_le_to_cpu32 (inode->blocks.indir_block))
|
||||||
<< log2_blksz,
|
<< log2_blksz,
|
||||||
0, blksz, indir))
|
0, blksz, indir))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
@ -452,13 +453,15 @@ grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
|
||||||
grub_uint32_t indir[blksz / 4];
|
grub_uint32_t indir[blksz / 4];
|
||||||
|
|
||||||
if (grub_disk_read (data->disk,
|
if (grub_disk_read (data->disk,
|
||||||
grub_le_to_cpu32 (inode->blocks.double_indir_block)
|
((grub_disk_addr_t)
|
||||||
|
grub_le_to_cpu32 (inode->blocks.double_indir_block))
|
||||||
<< log2_blksz,
|
<< log2_blksz,
|
||||||
0, blksz, indir))
|
0, blksz, indir))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
if (grub_disk_read (data->disk,
|
if (grub_disk_read (data->disk,
|
||||||
grub_le_to_cpu32 (indir[rblock / perblock])
|
((grub_disk_addr_t)
|
||||||
|
grub_le_to_cpu32 (indir[rblock / perblock]))
|
||||||
<< log2_blksz,
|
<< log2_blksz,
|
||||||
0, blksz, indir))
|
0, blksz, indir))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
|
@ -568,21 +568,21 @@ GRUB_MOD_INIT(pxe)
|
||||||
|
|
||||||
buf = grub_xasprintf ("%d", grub_pxe_blksize);
|
buf = grub_xasprintf ("%d", grub_pxe_blksize);
|
||||||
if (buf)
|
if (buf)
|
||||||
grub_env_set ("net_pxe_blksize", buf);
|
grub_env_set ("pxe_blksize", buf);
|
||||||
grub_free (buf);
|
grub_free (buf);
|
||||||
|
|
||||||
set_ip_env ("pxe_default_server", grub_pxe_default_server_ip);
|
set_ip_env ("pxe_default_server", grub_pxe_default_server_ip);
|
||||||
set_ip_env ("pxe_default_gateway", grub_pxe_default_gateway_ip);
|
set_ip_env ("pxe_default_gateway", grub_pxe_default_gateway_ip);
|
||||||
set_ip_env ("net_pxe_ip", grub_pxe_your_ip);
|
set_ip_env ("net_pxe_ip", grub_pxe_your_ip);
|
||||||
grub_register_variable_hook ("net_pxe_default_server", 0,
|
grub_register_variable_hook ("pxe_default_server", 0,
|
||||||
grub_env_write_pxe_default_server);
|
grub_env_write_pxe_default_server);
|
||||||
grub_register_variable_hook ("net_pxe_default_gateway", 0,
|
grub_register_variable_hook ("pxe_default_gateway", 0,
|
||||||
grub_env_write_pxe_default_gateway);
|
grub_env_write_pxe_default_gateway);
|
||||||
|
|
||||||
/* XXX: Is it possible to change IP in PXE? */
|
/* XXX: Is it possible to change IP in PXE? */
|
||||||
grub_register_variable_hook ("net_pxe_ip", 0,
|
grub_register_variable_hook ("net_pxe_ip", 0,
|
||||||
grub_env_write_readonly);
|
grub_env_write_readonly);
|
||||||
grub_register_variable_hook ("net_pxe_blksize", 0,
|
grub_register_variable_hook ("pxe_blksize", 0,
|
||||||
grub_env_write_pxe_blocksize);
|
grub_env_write_pxe_blocksize);
|
||||||
grub_disk_dev_register (&grub_pxe_dev);
|
grub_disk_dev_register (&grub_pxe_dev);
|
||||||
grub_fs_register (&grub_pxefs_fs);
|
grub_fs_register (&grub_pxefs_fs);
|
||||||
|
|
|
@ -629,12 +629,16 @@ grub_iso9660_iterate_dir (grub_fshelp_node_t dir,
|
||||||
|
|
||||||
if (dir->data->joliet)
|
if (dir->data->joliet)
|
||||||
{
|
{
|
||||||
char *oldname;
|
char *oldname, *semicolon;
|
||||||
|
|
||||||
oldname = filename;
|
oldname = filename;
|
||||||
filename = grub_iso9660_convert_string
|
filename = grub_iso9660_convert_string
|
||||||
((grub_uint16_t *) oldname, dirent.namelen >> 1);
|
((grub_uint16_t *) oldname, dirent.namelen >> 1);
|
||||||
|
|
||||||
|
semicolon = grub_strrchr (filename, ';');
|
||||||
|
if (semicolon)
|
||||||
|
*semicolon = '\0';
|
||||||
|
|
||||||
if (filename_alloc)
|
if (filename_alloc)
|
||||||
grub_free (oldname);
|
grub_free (oldname);
|
||||||
|
|
||||||
|
|
|
@ -1189,7 +1189,8 @@ grub_reiserfs_read (grub_file_t file, char *buf, grub_size_t len)
|
||||||
(unsigned long long) (current_position - initial_position),
|
(unsigned long long) (current_position - initial_position),
|
||||||
(unsigned long) len);
|
(unsigned long) len);
|
||||||
return current_position - initial_position;
|
return current_position - initial_position;
|
||||||
/*
|
|
||||||
|
#if 0
|
||||||
switch (found.type)
|
switch (found.type)
|
||||||
{
|
{
|
||||||
case GRUB_REISERFS_DIRECT:
|
case GRUB_REISERFS_DIRECT:
|
||||||
|
@ -1232,7 +1233,8 @@ grub_reiserfs_read (grub_file_t file, char *buf, grub_size_t len)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
return read_length;*/
|
return read_length;
|
||||||
|
#endif
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
grub_free (indirect_block_ptr);
|
grub_free (indirect_block_ptr);
|
||||||
|
|
72
genemuinit.sh
Normal file
72
genemuinit.sh
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This gensymlist.sh is free software; the author
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
nm="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
/* This file is automatically generated by geninit.sh. DO NOT EDIT! */
|
||||||
|
/*
|
||||||
|
* GRUB -- GRand Unified Bootloader
|
||||||
|
* Copyright (C) 2002,2005,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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "grub_emu_init.h"
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
void
|
||||||
|
grub_init_all (void)
|
||||||
|
{
|
||||||
|
EOF
|
||||||
|
|
||||||
|
read mods
|
||||||
|
for line in $mods; do
|
||||||
|
if ${nm} --defined-only -P -p ${line} | grep grub_mod_init > /dev/null; then
|
||||||
|
echo "grub_${line}_init ();" | sed 's,\.mod,,g;'
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
void
|
||||||
|
grub_fini_all (void)
|
||||||
|
{
|
||||||
|
EOF
|
||||||
|
|
||||||
|
for line in $mods; do
|
||||||
|
if ${nm} --defined-only -P -p ${line} | grep grub_mod_fini > /dev/null; then
|
||||||
|
echo "grub_${line}_fini ();" | sed 's,\.mod,,g;'
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
}
|
||||||
|
EOF
|
52
genemuinitheader.sh
Normal file
52
genemuinitheader.sh
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2005,2007 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This gensymlist.sh is free software; the author
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
nm="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
/* This file is automatically generated by gensymlist.sh. DO NOT EDIT! */
|
||||||
|
/*
|
||||||
|
* GRUB -- GRand Unified Bootloader
|
||||||
|
* Copyright (C) 2005,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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
void grub_init_all (void);
|
||||||
|
void grub_fini_all (void);
|
||||||
|
EOF
|
||||||
|
|
||||||
|
read mods
|
||||||
|
for line in $mods; do
|
||||||
|
if ${nm} --defined-only -P -p ${line} | grep grub_mod_init > /dev/null; then
|
||||||
|
echo "void grub_${line}_init (void);" | sed 's,\.mod,,g;'
|
||||||
|
fi
|
||||||
|
if ${nm} --defined-only -P -p ${line} | grep grub_mod_fini > /dev/null; then
|
||||||
|
echo "void grub_${line}_fini (void);" | sed 's,\.mod,,g;'
|
||||||
|
fi
|
||||||
|
done
|
|
@ -14,7 +14,7 @@
|
||||||
### The configure script will replace these variables.
|
### The configure script will replace these variables.
|
||||||
|
|
||||||
: ${srcdir=@srcdir@}
|
: ${srcdir=@srcdir@}
|
||||||
: ${CC=@CC@}
|
: ${CC=@TARGET_CC@}
|
||||||
|
|
||||||
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="_"
|
||||||
|
|
16
genmk.rb
16
genmk.rb
|
@ -143,12 +143,19 @@ mostlyclean-module-#{@name}.#{@rule_count}:
|
||||||
MOSTLYCLEAN_MODULE_TARGETS += mostlyclean-module-#{@name}.#{@rule_count}
|
MOSTLYCLEAN_MODULE_TARGETS += mostlyclean-module-#{@name}.#{@rule_count}
|
||||||
UNDSYMFILES += #{undsym}
|
UNDSYMFILES += #{undsym}
|
||||||
|
|
||||||
|
ifeq ($(TARGET_NO_DYNAMIC_MODULES), yes)
|
||||||
|
#{@name}: #{pre_obj} $(TARGET_OBJ2ELF)
|
||||||
|
-rm -f $@
|
||||||
|
$(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ #{pre_obj}
|
||||||
|
if test ! -z \"$(TARGET_OBJ2ELF)\"; then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||||
|
if test x$(TARGET_NO_STRIP) != xyes ; then $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@; fi
|
||||||
|
else
|
||||||
ifneq ($(TARGET_APPLE_CC),1)
|
ifneq ($(TARGET_APPLE_CC),1)
|
||||||
#{@name}: #{pre_obj} #{mod_obj} $(TARGET_OBJ2ELF)
|
#{@name}: #{pre_obj} #{mod_obj} $(TARGET_OBJ2ELF)
|
||||||
-rm -f $@
|
-rm -f $@
|
||||||
$(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ #{pre_obj} #{mod_obj}
|
$(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ #{pre_obj} #{mod_obj}
|
||||||
if test ! -z \"$(TARGET_OBJ2ELF)\"; then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
if test ! -z \"$(TARGET_OBJ2ELF)\"; then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
if test x$(TARGET_NO_STRIP) != xyes ; then $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@; fi
|
||||||
else
|
else
|
||||||
#{@name}: #{pre_obj} #{mod_obj} $(TARGET_OBJ2ELF)
|
#{@name}: #{pre_obj} #{mod_obj} $(TARGET_OBJ2ELF)
|
||||||
-rm -f $@
|
-rm -f $@
|
||||||
|
@ -157,6 +164,7 @@ else
|
||||||
$(OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -wd1106 -nu -nd $@.bin $@
|
$(OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -wd1106 -nu -nd $@.bin $@
|
||||||
-rm -f $@.bin
|
-rm -f $@.bin
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
#{pre_obj}: $(#{prefix}_DEPENDENCIES) #{objs_str}
|
#{pre_obj}: $(#{prefix}_DEPENDENCIES) #{objs_str}
|
||||||
-rm -f $@
|
-rm -f $@
|
||||||
|
@ -201,7 +209,7 @@ endif
|
||||||
-include #{dep}
|
-include #{dep}
|
||||||
|
|
||||||
clean-module-#{extra_target}.#{@rule_count}:
|
clean-module-#{extra_target}.#{@rule_count}:
|
||||||
rm -f #{command} #{fs} #{partmap} #{handler} #{parttool} #{video}
|
rm -f #{command} #{fs} #{partmap} #{handler} #{parttool} #{video} #{terminal}
|
||||||
|
|
||||||
CLEAN_MODULE_TARGETS += clean-module-#{extra_target}.#{@rule_count}
|
CLEAN_MODULE_TARGETS += clean-module-#{extra_target}.#{@rule_count}
|
||||||
|
|
||||||
|
@ -330,11 +338,11 @@ MOSTLYCLEANFILES += #{deps_str}
|
||||||
ifeq ($(#{prefix}_RELOCATABLE),yes)
|
ifeq ($(#{prefix}_RELOCATABLE),yes)
|
||||||
#{@name}: $(#{prefix}_DEPENDENCIES) #{objs_str}
|
#{@name}: $(#{prefix}_DEPENDENCIES) #{objs_str}
|
||||||
$(TARGET_CC) -Wl,-r,-d -o $@ #{objs_str} $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS)
|
$(TARGET_CC) -Wl,-r,-d -o $@ #{objs_str} $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS)
|
||||||
$(STRIP) --strip-unneeded -K start -R .note -R .comment $@
|
if test x$(TARGET_NO_STRIP) != xyes ; then $(STRIP) --strip-unneeded -K start -R .note -R .comment $@; fi
|
||||||
else
|
else
|
||||||
#{@name}: $(#{prefix}_DEPENDENCIES) #{objs_str}
|
#{@name}: $(#{prefix}_DEPENDENCIES) #{objs_str}
|
||||||
$(TARGET_CC) -o $@ #{objs_str} $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS)
|
$(TARGET_CC) -o $@ #{objs_str} $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS)
|
||||||
$(STRIP) -R .rel.dyn -R .reginfo -R .note -R .comment $@
|
if test x$(TARGET_NO_STRIP) != xyes ; then $(STRIP) -R .rel.dyn -R .reginfo -R .note -R .comment $@; fi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" + objs.collect_with_index do |obj, i|
|
" + objs.collect_with_index do |obj, i|
|
||||||
|
|
|
@ -32,13 +32,12 @@ FNR == 1 {
|
||||||
else if ($1 != "__gnu_local_gp") {
|
else if ($1 != "__gnu_local_gp") {
|
||||||
printf "%s in %s is not defined\n", $1, module >"/dev/stderr";
|
printf "%s in %s is not defined\n", $1, module >"/dev/stderr";
|
||||||
error++;
|
error++;
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Output the result.
|
# Output the result.
|
||||||
END {
|
END {
|
||||||
if (error == 1)
|
if (error >= 1)
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|
||||||
for (mod in modtab) {
|
for (mod in modtab) {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
### The configure script will replace these variables.
|
### The configure script will replace these variables.
|
||||||
|
|
||||||
: ${srcdir=@srcdir@}
|
: ${srcdir=@srcdir@}
|
||||||
: ${CC=@CC@}
|
: ${CC=@TARGET_CC@}
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
@ -37,6 +37,7 @@ cat <<EOF
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <grub/symbol.h>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
for i in $*; do
|
for i in $*; do
|
||||||
|
|
|
@ -279,13 +279,6 @@ grub_gettext_init_ext (const char *lang)
|
||||||
|
|
||||||
/* mo_file e.g.: /boot/grub/locale/ca.mo */
|
/* 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. */
|
|
||||||
|
|
||||||
mo_file = grub_xasprintf ("%s/%s.mo", locale_dir, lang);
|
mo_file = grub_xasprintf ("%s/%s.mo", locale_dir, lang);
|
||||||
if (!mo_file)
|
if (!mo_file)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -31,6 +31,7 @@ struct grub_gui_image
|
||||||
grub_gui_container_t parent;
|
grub_gui_container_t parent;
|
||||||
grub_video_rect_t bounds;
|
grub_video_rect_t bounds;
|
||||||
char *id;
|
char *id;
|
||||||
|
char *theme_dir;
|
||||||
struct grub_video_bitmap *raw_bitmap;
|
struct grub_video_bitmap *raw_bitmap;
|
||||||
struct grub_video_bitmap *bitmap;
|
struct grub_video_bitmap *bitmap;
|
||||||
};
|
};
|
||||||
|
@ -208,8 +209,28 @@ static grub_err_t
|
||||||
image_set_property (void *vself, const char *name, const char *value)
|
image_set_property (void *vself, const char *name, const char *value)
|
||||||
{
|
{
|
||||||
grub_gui_image_t self = vself;
|
grub_gui_image_t self = vself;
|
||||||
if (grub_strcmp (name, "file") == 0)
|
if (grub_strcmp (name, "theme_dir") == 0)
|
||||||
return load_image (self, value);
|
{
|
||||||
|
grub_free (self->theme_dir);
|
||||||
|
self->theme_dir = grub_strdup (value);
|
||||||
|
}
|
||||||
|
else if (grub_strcmp (name, "file") == 0)
|
||||||
|
{
|
||||||
|
char *absvalue;
|
||||||
|
grub_err_t err;
|
||||||
|
|
||||||
|
/* Resolve to an absolute path. */
|
||||||
|
if (! self->theme_dir)
|
||||||
|
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unspecified theme_dir");
|
||||||
|
absvalue = grub_resolve_relative_path (self->theme_dir, value);
|
||||||
|
if (! absvalue)
|
||||||
|
return grub_errno;
|
||||||
|
|
||||||
|
err = load_image (self, absvalue);
|
||||||
|
grub_free (absvalue);
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
else if (grub_strcmp (name, "id") == 0)
|
else if (grub_strcmp (name, "id") == 0)
|
||||||
{
|
{
|
||||||
grub_free (self->id);
|
grub_free (self->id);
|
||||||
|
|
|
@ -216,7 +216,7 @@ grub_gui_label_new (void)
|
||||||
label->comp.ops = &label_ops;
|
label->comp.ops = &label_ops;
|
||||||
label->visible = 1;
|
label->visible = 1;
|
||||||
label->text = grub_strdup ("");
|
label->text = grub_strdup ("");
|
||||||
label->font = grub_font_get ("Helvetica 10");
|
label->font = grub_font_get ("Unknown Regular 16");
|
||||||
label->color.red = 0;
|
label->color.red = 0;
|
||||||
label->color.green = 0;
|
label->color.green = 0;
|
||||||
label->color.blue = 0;
|
label->color.blue = 0;
|
||||||
|
|
|
@ -566,7 +566,7 @@ grub_gui_list_new (void)
|
||||||
|
|
||||||
self->visible = 1;
|
self->visible = 1;
|
||||||
|
|
||||||
default_font = grub_font_get ("Helvetica 12");
|
default_font = grub_font_get ("Unknown Regular 16");
|
||||||
default_fg_color = grub_gui_color_rgb (0, 0, 0);
|
default_fg_color = grub_gui_color_rgb (0, 0, 0);
|
||||||
default_bg_color = grub_gui_color_rgb (255, 255, 255);
|
default_bg_color = grub_gui_color_rgb (255, 255, 255);
|
||||||
|
|
||||||
|
|
|
@ -371,7 +371,7 @@ grub_gui_progress_bar_new (void)
|
||||||
self->progress.ops = &progress_bar_pb_ops;
|
self->progress.ops = &progress_bar_pb_ops;
|
||||||
self->progress.component.ops = &progress_bar_ops;
|
self->progress.component.ops = &progress_bar_ops;
|
||||||
self->visible = 1;
|
self->visible = 1;
|
||||||
self->font = grub_font_get ("Helvetica 10");
|
self->font = grub_font_get ("Unknown Regular 16");
|
||||||
grub_gui_color_t black = { .red = 0, .green = 0, .blue = 0, .alpha = 255 };
|
grub_gui_color_t black = { .red = 0, .green = 0, .blue = 0, .alpha = 255 };
|
||||||
grub_gui_color_t gray = { .red = 128, .green = 128, .blue = 128, .alpha = 255 };
|
grub_gui_color_t gray = { .red = 128, .green = 128, .blue = 128, .alpha = 255 };
|
||||||
grub_gui_color_t lightgray = { .red = 200, .green = 200, .blue = 200, .alpha = 255 };
|
grub_gui_color_t lightgray = { .red = 200, .green = 200, .blue = 200, .alpha = 255 };
|
||||||
|
|
|
@ -66,7 +66,7 @@ grub_gfxmenu_view_new (const char *theme_path,
|
||||||
view->screen.width = width;
|
view->screen.width = width;
|
||||||
view->screen.height = height;
|
view->screen.height = height;
|
||||||
|
|
||||||
default_font = grub_font_get ("Helvetica 12");
|
default_font = grub_font_get ("Unknown Regular 16");
|
||||||
default_fg_color = grub_gui_color_rgb (0, 0, 0);
|
default_fg_color = grub_gui_color_rgb (0, 0, 0);
|
||||||
default_bg_color = grub_gui_color_rgb (255, 255, 255);
|
default_bg_color = grub_gui_color_rgb (255, 255, 255);
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifndef SSIZE_MAX
|
#ifndef SSIZE_MAX
|
||||||
# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
|
# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
|
||||||
|
|
|
@ -84,7 +84,7 @@ grub_read_hook_datetime (struct grub_env_var *var,
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
GRUB_MOD_INIT(datetime)
|
GRUB_MOD_INIT(datehook)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ GRUB_MOD_INIT(datetime)
|
||||||
grub_read_hook_datetime, 0);
|
grub_read_hook_datetime, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
GRUB_MOD_FINI(datetime)
|
GRUB_MOD_FINI(datehook)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,7 @@ union grub_aout_header
|
||||||
#define AOUT_MID_I386 134 /* i386 BSD binary */
|
#define AOUT_MID_I386 134 /* i386 BSD binary */
|
||||||
#define AOUT_MID_SPARC 138 /* sparc */
|
#define AOUT_MID_SPARC 138 /* sparc */
|
||||||
#define AOUT_MID_HP200 200 /* hp200 (68010) BSD binary */
|
#define AOUT_MID_HP200 200 /* hp200 (68010) BSD binary */
|
||||||
|
#define AOUT_MID_SUN 0x103
|
||||||
#define AOUT_MID_HP300 300 /* hp300 (68020+68881) BSD binary */
|
#define AOUT_MID_HP300 300 /* hp300 (68020+68881) BSD binary */
|
||||||
#define AOUT_MID_HPUX 0x20C /* hp200/300 HP-UX binary */
|
#define AOUT_MID_HPUX 0x20C /* hp200/300 HP-UX binary */
|
||||||
#define AOUT_MID_HPUX800 0x20B /* hp800 HP-UX binary */
|
#define AOUT_MID_HPUX800 0x20B /* hp800 HP-UX binary */
|
||||||
|
@ -114,10 +115,14 @@ union grub_aout_header
|
||||||
#define AOUT_GETMID(header) ((header).a_midmag >> 16) & 0x03ff)
|
#define AOUT_GETMID(header) ((header).a_midmag >> 16) & 0x03ff)
|
||||||
#define AOUT_GETFLAG(header) ((header).a_midmag >> 26) & 0x3f)
|
#define AOUT_GETFLAG(header) ((header).a_midmag >> 26) & 0x3f)
|
||||||
|
|
||||||
|
#ifndef GRUB_UTIL
|
||||||
|
|
||||||
int EXPORT_FUNC(grub_aout_get_type) (union grub_aout_header *header);
|
int EXPORT_FUNC(grub_aout_get_type) (union grub_aout_header *header);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_aout_load) (grub_file_t file, int offset,
|
grub_err_t EXPORT_FUNC(grub_aout_load) (grub_file_t file, int offset,
|
||||||
grub_addr_t load_addr, int load_size,
|
grub_addr_t load_addr, int load_size,
|
||||||
grub_addr_t bss_end_addr);
|
grub_addr_t bss_end_addr);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ! GRUB_AOUT_HEADER */
|
#endif /* ! GRUB_AOUT_HEADER */
|
||||||
|
|
|
@ -47,24 +47,24 @@ struct grub_video_bitmap_reader
|
||||||
};
|
};
|
||||||
typedef struct grub_video_bitmap_reader *grub_video_bitmap_reader_t;
|
typedef struct grub_video_bitmap_reader *grub_video_bitmap_reader_t;
|
||||||
|
|
||||||
void grub_video_bitmap_reader_register (grub_video_bitmap_reader_t reader);
|
void EXPORT_FUNC (grub_video_bitmap_reader_register) (grub_video_bitmap_reader_t reader);
|
||||||
void grub_video_bitmap_reader_unregister (grub_video_bitmap_reader_t reader);
|
void EXPORT_FUNC (grub_video_bitmap_reader_unregister) (grub_video_bitmap_reader_t reader);
|
||||||
|
|
||||||
grub_err_t grub_video_bitmap_create (struct grub_video_bitmap **bitmap,
|
grub_err_t EXPORT_FUNC (grub_video_bitmap_create) (struct grub_video_bitmap **bitmap,
|
||||||
unsigned int width, unsigned int height,
|
unsigned int width, unsigned int height,
|
||||||
enum grub_video_blit_format blit_format);
|
enum grub_video_blit_format blit_format);
|
||||||
|
|
||||||
grub_err_t grub_video_bitmap_destroy (struct grub_video_bitmap *bitmap);
|
grub_err_t EXPORT_FUNC (grub_video_bitmap_destroy) (struct grub_video_bitmap *bitmap);
|
||||||
|
|
||||||
grub_err_t grub_video_bitmap_load (struct grub_video_bitmap **bitmap,
|
grub_err_t EXPORT_FUNC (grub_video_bitmap_load) (struct grub_video_bitmap **bitmap,
|
||||||
const char *filename);
|
const char *filename);
|
||||||
|
|
||||||
unsigned int grub_video_bitmap_get_width (struct grub_video_bitmap *bitmap);
|
unsigned int EXPORT_FUNC (grub_video_bitmap_get_width) (struct grub_video_bitmap *bitmap);
|
||||||
unsigned int grub_video_bitmap_get_height (struct grub_video_bitmap *bitmap);
|
unsigned int EXPORT_FUNC (grub_video_bitmap_get_height) (struct grub_video_bitmap *bitmap);
|
||||||
|
|
||||||
void grub_video_bitmap_get_mode_info (struct grub_video_bitmap *bitmap,
|
void EXPORT_FUNC (grub_video_bitmap_get_mode_info) (struct grub_video_bitmap *bitmap,
|
||||||
struct grub_video_mode_info *mode_info);
|
struct grub_video_mode_info *mode_info);
|
||||||
|
|
||||||
void *grub_video_bitmap_get_data (struct grub_video_bitmap *bitmap);
|
void *EXPORT_FUNC (grub_video_bitmap_get_data) (struct grub_video_bitmap *bitmap);
|
||||||
|
|
||||||
#endif /* ! GRUB_BITMAP_HEADER */
|
#endif /* ! GRUB_BITMAP_HEADER */
|
||||||
|
|
|
@ -39,10 +39,11 @@ enum grub_video_bitmap_scale_method
|
||||||
};
|
};
|
||||||
|
|
||||||
grub_err_t
|
grub_err_t
|
||||||
grub_video_bitmap_create_scaled (struct grub_video_bitmap **dst,
|
EXPORT_FUNC (grub_video_bitmap_create_scaled) (struct grub_video_bitmap **dst,
|
||||||
int dst_width, int dst_height,
|
int dst_width, int dst_height,
|
||||||
struct grub_video_bitmap *src,
|
struct grub_video_bitmap *src,
|
||||||
enum
|
enum
|
||||||
grub_video_bitmap_scale_method scale_method);
|
grub_video_bitmap_scale_method
|
||||||
|
scale_method);
|
||||||
|
|
||||||
#endif /* ! GRUB_BITMAP_SCALE_HEADER */
|
#endif /* ! GRUB_BITMAP_SCALE_HEADER */
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <grub/file.h>
|
#include <grub/file.h>
|
||||||
|
|
||||||
grub_file_t grub_bufio_open (grub_file_t io, int size);
|
grub_file_t EXPORT_FUNC (grub_bufio_open) (grub_file_t io, int size);
|
||||||
grub_file_t grub_buffile_open (const char *name, int size);
|
grub_file_t EXPORT_FUNC (grub_buffile_open) (const char *name, int size);
|
||||||
|
|
||||||
#endif /* ! GRUB_BUFIO_H */
|
#endif /* ! GRUB_BUFIO_H */
|
||||||
|
|
|
@ -23,6 +23,14 @@
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
|
|
||||||
|
#if defined (__i386__) || defined (__x86_64__)
|
||||||
|
static inline void
|
||||||
|
grub_arch_sync_caches (void *address __attribute__ ((unused)),
|
||||||
|
grub_size_t len __attribute__ ((unused)))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#else
|
||||||
void EXPORT_FUNC(grub_arch_sync_caches) (void *address, grub_size_t len);
|
void EXPORT_FUNC(grub_arch_sync_caches) (void *address, grub_size_t len);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ! GRUB_CACHE_HEADER */
|
#endif /* ! GRUB_CACHE_HEADER */
|
||||||
|
|
|
@ -33,10 +33,17 @@ struct grub_datetime
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Return date and time. */
|
/* Return date and time. */
|
||||||
|
#ifdef GRUB_MACHINE_EMU
|
||||||
|
grub_err_t EXPORT_FUNC(grub_get_datetime) (struct grub_datetime *datetime);
|
||||||
|
|
||||||
|
/* Set date and time. */
|
||||||
|
grub_err_t EXPORT_FUNC(grub_set_datetime) (struct grub_datetime *datetime);
|
||||||
|
#else
|
||||||
grub_err_t grub_get_datetime (struct grub_datetime *datetime);
|
grub_err_t grub_get_datetime (struct grub_datetime *datetime);
|
||||||
|
|
||||||
/* Set date and time. */
|
/* Set date and time. */
|
||||||
grub_err_t grub_set_datetime (struct grub_datetime *datetime);
|
grub_err_t grub_set_datetime (struct grub_datetime *datetime);
|
||||||
|
#endif
|
||||||
|
|
||||||
int grub_get_weekday (struct grub_datetime *datetime);
|
int grub_get_weekday (struct grub_datetime *datetime);
|
||||||
char *grub_get_weekday_name (struct grub_datetime *datetime);
|
char *grub_get_weekday_name (struct grub_datetime *datetime);
|
||||||
|
|
|
@ -91,7 +91,12 @@ grub_dl_t grub_dl_load_core (void *addr, grub_size_t size);
|
||||||
int EXPORT_FUNC(grub_dl_unload) (grub_dl_t mod);
|
int EXPORT_FUNC(grub_dl_unload) (grub_dl_t mod);
|
||||||
void grub_dl_unload_unneeded (void);
|
void grub_dl_unload_unneeded (void);
|
||||||
void grub_dl_unload_all (void);
|
void grub_dl_unload_all (void);
|
||||||
#ifdef GRUB_UTIL
|
#if defined (GRUB_MACHINE_EMU) || defined (GRUB_UTIL)
|
||||||
|
#define GRUB_NO_MODULES 1
|
||||||
|
#else
|
||||||
|
#define GRUB_NO_MODULES 0
|
||||||
|
#endif
|
||||||
|
#if GRUB_NO_MODULES
|
||||||
static inline int
|
static inline int
|
||||||
grub_dl_ref (grub_dl_t mod)
|
grub_dl_ref (grub_dl_t mod)
|
||||||
{
|
{
|
||||||
|
@ -110,13 +115,13 @@ int EXPORT_FUNC(grub_dl_unref) (grub_dl_t mod);
|
||||||
#endif
|
#endif
|
||||||
void EXPORT_FUNC(grub_dl_iterate) (int (*hook) (grub_dl_t mod));
|
void EXPORT_FUNC(grub_dl_iterate) (int (*hook) (grub_dl_t mod));
|
||||||
grub_dl_t EXPORT_FUNC(grub_dl_get) (const char *name);
|
grub_dl_t EXPORT_FUNC(grub_dl_get) (const char *name);
|
||||||
grub_err_t EXPORT_FUNC(grub_dl_register_symbol) (const char *name, void *addr,
|
grub_err_t grub_dl_register_symbol (const char *name, void *addr,
|
||||||
grub_dl_t mod);
|
grub_dl_t mod);
|
||||||
|
|
||||||
grub_err_t grub_arch_dl_check_header (void *ehdr);
|
grub_err_t grub_arch_dl_check_header (void *ehdr);
|
||||||
grub_err_t grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr);
|
grub_err_t grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr);
|
||||||
|
|
||||||
#if defined (_mips) && ! defined (GRUB_UTIL)
|
#if defined (_mips) && ! defined (GRUB_UTIL) && !defined (GRUB_MACHINE_EMU)
|
||||||
#define GRUB_LINKER_HAVE_INIT 1
|
#define GRUB_LINKER_HAVE_INIT 1
|
||||||
void grub_arch_dl_init_linker (void);
|
void grub_arch_dl_init_linker (void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -66,7 +66,7 @@ void EXPORT_FUNC(grub_fatal) (const char *fmt, ...) __attribute__ ((noreturn));
|
||||||
void EXPORT_FUNC(grub_error_push) (void);
|
void EXPORT_FUNC(grub_error_push) (void);
|
||||||
int EXPORT_FUNC(grub_error_pop) (void);
|
int EXPORT_FUNC(grub_error_pop) (void);
|
||||||
void EXPORT_FUNC(grub_print_error) (void);
|
void EXPORT_FUNC(grub_print_error) (void);
|
||||||
int EXPORT_FUNC(grub_err_printf) (const char *fmt, ...)
|
int grub_err_printf (const char *fmt, ...)
|
||||||
__attribute__ ((format (printf, 1, 2)));
|
__attribute__ ((format (printf, 1, 2)));
|
||||||
|
|
||||||
#endif /* ! GRUB_ERR_HEADER */
|
#endif /* ! GRUB_ERR_HEADER */
|
||||||
|
|
|
@ -81,35 +81,37 @@ int grub_font_load (const char *filename);
|
||||||
"Family Name Bold Italic 14", where Bold and Italic are optional.
|
"Family Name Bold Italic 14", where Bold and Italic are optional.
|
||||||
If no font matches the name specified, the most recently loaded font
|
If no font matches the name specified, the most recently loaded font
|
||||||
is returned as a fallback. */
|
is returned as a fallback. */
|
||||||
grub_font_t grub_font_get (const char *font_name);
|
grub_font_t EXPORT_FUNC (grub_font_get) (const char *font_name);
|
||||||
|
|
||||||
const char *grub_font_get_name (grub_font_t font);
|
const char *EXPORT_FUNC (grub_font_get_name) (grub_font_t font);
|
||||||
|
|
||||||
int grub_font_get_max_char_width (grub_font_t font);
|
int EXPORT_FUNC (grub_font_get_max_char_width) (grub_font_t font);
|
||||||
|
|
||||||
int grub_font_get_max_char_height (grub_font_t font);
|
int EXPORT_FUNC (grub_font_get_max_char_height) (grub_font_t font);
|
||||||
|
|
||||||
int grub_font_get_ascent (grub_font_t font);
|
int EXPORT_FUNC (grub_font_get_ascent) (grub_font_t font);
|
||||||
|
|
||||||
int grub_font_get_descent (grub_font_t font);
|
int EXPORT_FUNC (grub_font_get_descent) (grub_font_t font);
|
||||||
|
|
||||||
int grub_font_get_leading (grub_font_t font);
|
int EXPORT_FUNC (grub_font_get_leading) (grub_font_t font);
|
||||||
|
|
||||||
int grub_font_get_height (grub_font_t font);
|
int EXPORT_FUNC (grub_font_get_height) (grub_font_t font);
|
||||||
|
|
||||||
int grub_font_get_string_width (grub_font_t font, const char *str);
|
int EXPORT_FUNC (grub_font_get_string_width) (grub_font_t font,
|
||||||
|
const char *str);
|
||||||
|
|
||||||
struct grub_font_glyph *grub_font_get_glyph (grub_font_t font,
|
struct grub_font_glyph *EXPORT_FUNC (grub_font_get_glyph) (grub_font_t font,
|
||||||
grub_uint32_t code);
|
grub_uint32_t code);
|
||||||
|
|
||||||
struct grub_font_glyph *grub_font_get_glyph_with_fallback (grub_font_t font,
|
struct grub_font_glyph *EXPORT_FUNC (grub_font_get_glyph_with_fallback) (grub_font_t font,
|
||||||
grub_uint32_t code);
|
grub_uint32_t code);
|
||||||
|
|
||||||
grub_err_t grub_font_draw_glyph (struct grub_font_glyph *glyph,
|
grub_err_t EXPORT_FUNC (grub_font_draw_glyph) (struct grub_font_glyph *glyph,
|
||||||
grub_video_color_t color,
|
grub_video_color_t color,
|
||||||
int left_x, int baseline_y);
|
int left_x, int baseline_y);
|
||||||
|
|
||||||
grub_err_t grub_font_draw_string (const char *str, grub_font_t font,
|
grub_err_t EXPORT_FUNC (grub_font_draw_string) (const char *str,
|
||||||
|
grub_font_t font,
|
||||||
grub_video_color_t color,
|
grub_video_color_t color,
|
||||||
int left_x, int baseline_y);
|
int left_x, int baseline_y);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <grub/video.h>
|
#include <grub/video.h>
|
||||||
|
|
||||||
grub_err_t
|
grub_err_t
|
||||||
grub_gfxterm_set_window (struct grub_video_render_target *target,
|
EXPORT_FUNC (grub_gfxterm_set_window) (struct grub_video_render_target *target,
|
||||||
int x, int y, int width, int height,
|
int x, int y, int width, int height,
|
||||||
int double_repaint,
|
int double_repaint,
|
||||||
const char *font_name, int border_width);
|
const char *font_name, int border_width);
|
||||||
|
@ -35,10 +35,10 @@ typedef void (*grub_gfxterm_repaint_callback_t)(int x, int y,
|
||||||
|
|
||||||
void grub_gfxterm_set_repaint_callback (grub_gfxterm_repaint_callback_t func);
|
void grub_gfxterm_set_repaint_callback (grub_gfxterm_repaint_callback_t func);
|
||||||
|
|
||||||
void grub_gfxterm_schedule_repaint (void);
|
void EXPORT_FUNC (grub_gfxterm_schedule_repaint) (void);
|
||||||
|
|
||||||
grub_err_t grub_gfxterm_fullscreen (void);
|
grub_err_t EXPORT_FUNC (grub_gfxterm_fullscreen) (void);
|
||||||
|
|
||||||
extern void (*grub_gfxterm_decorator_hook) (void);
|
extern void (*EXPORT_VAR (grub_gfxterm_decorator_hook)) (void);
|
||||||
|
|
||||||
#endif /* ! GRUB_GFXTERM_HEADER */
|
#endif /* ! GRUB_GFXTERM_HEADER */
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
|
|
||||||
const char *EXPORT_FUNC(grub_gettext_dummy) (const char *s);
|
|
||||||
extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
|
extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
|
||||||
|
|
||||||
/* NLS can be disabled through the configure --disable-nls option. */
|
/* NLS can be disabled through the configure --disable-nls option. */
|
||||||
|
|
1
include/grub/i386/efi/serial.h
Normal file
1
include/grub/i386/efi/serial.h
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#include <grub/i386/coreboot/serial.h>
|
|
@ -19,8 +19,6 @@
|
||||||
#ifndef GRUB_VBE_MACHINE_HEADER
|
#ifndef GRUB_VBE_MACHINE_HEADER
|
||||||
#define GRUB_VBE_MACHINE_HEADER 1
|
#define GRUB_VBE_MACHINE_HEADER 1
|
||||||
|
|
||||||
#include <grub/video_fb.h>
|
|
||||||
|
|
||||||
/* Default video mode to be used. */
|
/* Default video mode to be used. */
|
||||||
#define GRUB_VBE_DEFAULT_VIDEO_MODE 0x101
|
#define GRUB_VBE_DEFAULT_VIDEO_MODE 0x101
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ int EXPORT_FUNC(grub_ieee1275_read) (grub_ieee1275_ihandle_t ihandle,
|
||||||
void *buffer, grub_size_t len,
|
void *buffer, grub_size_t len,
|
||||||
grub_ssize_t *actualp);
|
grub_ssize_t *actualp);
|
||||||
int EXPORT_FUNC(grub_ieee1275_seek) (grub_ieee1275_ihandle_t ihandle,
|
int EXPORT_FUNC(grub_ieee1275_seek) (grub_ieee1275_ihandle_t ihandle,
|
||||||
int pos_hi, int pos_lo,
|
grub_disk_addr_t pos,
|
||||||
grub_ssize_t *result);
|
grub_ssize_t *result);
|
||||||
int EXPORT_FUNC(grub_ieee1275_peer) (grub_ieee1275_phandle_t node,
|
int EXPORT_FUNC(grub_ieee1275_peer) (grub_ieee1275_phandle_t node,
|
||||||
grub_ieee1275_phandle_t *result);
|
grub_ieee1275_phandle_t *result);
|
||||||
|
@ -173,7 +173,15 @@ grub_err_t EXPORT_FUNC(grub_machine_mmap_iterate)
|
||||||
(int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, grub_uint64_t, grub_uint32_t));
|
(int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, grub_uint64_t, grub_uint32_t));
|
||||||
int EXPORT_FUNC(grub_claimmap) (grub_addr_t addr, grub_size_t size);
|
int EXPORT_FUNC(grub_claimmap) (grub_addr_t addr, grub_size_t size);
|
||||||
|
|
||||||
|
int
|
||||||
|
EXPORT_FUNC(grub_ieee1275_map) (grub_addr_t phys, grub_addr_t virt,
|
||||||
|
grub_size_t size, grub_uint32_t mode);
|
||||||
|
|
||||||
char *EXPORT_FUNC(grub_ieee1275_encode_devname) (const char *path);
|
char *EXPORT_FUNC(grub_ieee1275_encode_devname) (const char *path);
|
||||||
char *EXPORT_FUNC(grub_ieee1275_get_filename) (const char *path);
|
char *EXPORT_FUNC(grub_ieee1275_get_filename) (const char *path);
|
||||||
|
|
||||||
|
int EXPORT_FUNC(grub_ieee1275_devices_iterate) (int (*hook)
|
||||||
|
(struct grub_ieee1275_devalias *
|
||||||
|
alias));
|
||||||
|
|
||||||
#endif /* ! GRUB_IEEE1275_HEADER */
|
#endif /* ! GRUB_IEEE1275_HEADER */
|
||||||
|
|
|
@ -59,6 +59,8 @@ extern grub_addr_t grub_arch_modules_addr (void);
|
||||||
|
|
||||||
extern void EXPORT_FUNC(grub_module_iterate) (int (*hook) (struct grub_module_header *));
|
extern void EXPORT_FUNC(grub_module_iterate) (int (*hook) (struct grub_module_header *));
|
||||||
|
|
||||||
|
grub_addr_t grub_modules_get_end (void);
|
||||||
|
|
||||||
/* The start point of the C code. */
|
/* The start point of the C code. */
|
||||||
void grub_main (void);
|
void grub_main (void);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ void *EXPORT_FUNC(grub_realloc) (void *ptr, grub_size_t size);
|
||||||
void *EXPORT_FUNC(grub_memalign) (grub_size_t align, grub_size_t size);
|
void *EXPORT_FUNC(grub_memalign) (grub_size_t align, grub_size_t size);
|
||||||
|
|
||||||
/* For debugging. */
|
/* For debugging. */
|
||||||
#if defined(MM_DEBUG) && !defined(GRUB_UTIL)
|
#if defined(MM_DEBUG) && !defined(GRUB_UTIL) && !defined (GRUB_MACHINE_EMU)
|
||||||
/* Set this variable to 1 when you want to trace all memory function calls. */
|
/* Set this variable to 1 when you want to trace all memory function calls. */
|
||||||
extern int EXPORT_VAR(grub_mm_debug);
|
extern int EXPORT_VAR(grub_mm_debug);
|
||||||
|
|
||||||
|
|
|
@ -1,70 +0,0 @@
|
||||||
/* multiboot2.h - multiboot2 header file with grub definitions. */
|
|
||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 2005,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_MULTIBOOT2_HEADER
|
|
||||||
#define GRUB_MULTIBOOT2_HEADER 1
|
|
||||||
|
|
||||||
#include <grub/types.h>
|
|
||||||
#include <grub/err.h>
|
|
||||||
#include <grub/elf.h>
|
|
||||||
|
|
||||||
#ifndef GRUB_UTIL
|
|
||||||
typedef grub_uint32_t uint32_t;
|
|
||||||
typedef grub_uint64_t uint64_t;
|
|
||||||
#define __WORDSIZE GRUB_TARGET_WORDSIZE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct multiboot2_tag_header;
|
|
||||||
|
|
||||||
grub_err_t
|
|
||||||
grub_mb2_tag_alloc (grub_addr_t *addr, int key, grub_size_t len);
|
|
||||||
|
|
||||||
grub_err_t
|
|
||||||
grub_mb2_tags_arch_create (void);
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_mb2_arch_boot (grub_addr_t entry, void *tags);
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_mb2_arch_unload (struct multiboot2_tag_header *tags);
|
|
||||||
|
|
||||||
grub_err_t
|
|
||||||
grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr, grub_addr_t *addr, int *do_load);
|
|
||||||
|
|
||||||
grub_err_t
|
|
||||||
grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr, grub_addr_t *addr, int *do_load);
|
|
||||||
|
|
||||||
grub_err_t
|
|
||||||
grub_mb2_arch_module_alloc (grub_size_t size, grub_addr_t *addr);
|
|
||||||
|
|
||||||
grub_err_t
|
|
||||||
grub_mb2_arch_module_free (grub_addr_t addr, grub_size_t size);
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_multiboot2 (int argc, char *argv[]);
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_module2 (int argc, char *argv[]);
|
|
||||||
|
|
||||||
#define for_each_tag(tag, tags) \
|
|
||||||
for (tag = tags; \
|
|
||||||
tag && tag->key != MULTIBOOT2_TAG_END; \
|
|
||||||
tag = (struct multiboot2_tag_header *)((char *)tag + tag->len))
|
|
||||||
|
|
||||||
#endif /* ! GRUB_MULTIBOOT2_HEADER */
|
|
|
@ -110,37 +110,7 @@ void read_terminal_list (void);
|
||||||
|
|
||||||
void grub_set_more (int onoff);
|
void grub_set_more (int onoff);
|
||||||
|
|
||||||
#ifdef GRUB_UTIL
|
int grub_normal_get_line_counter (void);
|
||||||
void grub_normal_init (void);
|
void grub_install_newline_hook (void);
|
||||||
void grub_normal_fini (void);
|
|
||||||
void grub_hello_init (void);
|
|
||||||
void grub_hello_fini (void);
|
|
||||||
void grub_ls_init (void);
|
|
||||||
void grub_ls_fini (void);
|
|
||||||
void grub_cat_init (void);
|
|
||||||
void grub_cat_fini (void);
|
|
||||||
void grub_boot_init (void);
|
|
||||||
void grub_boot_fini (void);
|
|
||||||
void grub_cmp_init (void);
|
|
||||||
void grub_cmp_fini (void);
|
|
||||||
void grub_terminal_init (void);
|
|
||||||
void grub_terminal_fini (void);
|
|
||||||
void grub_loop_init (void);
|
|
||||||
void grub_loop_fini (void);
|
|
||||||
void grub_help_init (void);
|
|
||||||
void grub_help_fini (void);
|
|
||||||
void grub_halt_init (void);
|
|
||||||
void grub_halt_fini (void);
|
|
||||||
void grub_reboot_init (void);
|
|
||||||
void grub_reboot_fini (void);
|
|
||||||
void grub_configfile_init (void);
|
|
||||||
void grub_configfile_fini (void);
|
|
||||||
void grub_search_init (void);
|
|
||||||
void grub_search_fini (void);
|
|
||||||
void grub_test_init (void);
|
|
||||||
void grub_test_fini (void);
|
|
||||||
void grub_blocklist_init (void);
|
|
||||||
void grub_blocklist_fini (void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* ! GRUB_NORMAL_HEADER */
|
#endif /* ! GRUB_NORMAL_HEADER */
|
||||||
|
|
|
@ -93,20 +93,6 @@ grub_partition_map_unregister (grub_partition_map_t partmap)
|
||||||
|
|
||||||
#define FOR_PARTITION_MAPS(var) for (var = grub_partition_map_list; var; var = var->next)
|
#define FOR_PARTITION_MAPS(var) for (var = grub_partition_map_list; var; var = var->next)
|
||||||
|
|
||||||
#ifdef GRUB_UTIL
|
|
||||||
void grub_msdos_partition_map_init (void);
|
|
||||||
void grub_msdos_partition_map_fini (void);
|
|
||||||
void grub_amiga_partition_map_init (void);
|
|
||||||
void grub_amiga_partition_map_fini (void);
|
|
||||||
void grub_apple_partition_map_init (void);
|
|
||||||
void grub_apple_partition_map_fini (void);
|
|
||||||
void grub_sun_partition_map_init (void);
|
|
||||||
void grub_sun_partition_map_fini (void);
|
|
||||||
void grub_gpt_partition_map_init (void);
|
|
||||||
void grub_gpt_partition_map_fini (void);
|
|
||||||
void grub_apple_partition_map_init (void);
|
|
||||||
void grub_apple_partition_map_fini (void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline grub_disk_addr_t
|
static inline grub_disk_addr_t
|
||||||
grub_partition_get_start (const grub_partition_t p)
|
grub_partition_get_start (const grub_partition_t p)
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
typedef grub_uint32_t grub_pci_id_t;
|
typedef grub_uint32_t grub_pci_id_t;
|
||||||
|
|
||||||
#ifdef GRUB_UTIL
|
#ifdef GRUB_MACHINE_EMU
|
||||||
#include <grub/pciutils.h>
|
#include <grub/pciutils.h>
|
||||||
#else
|
#else
|
||||||
typedef grub_uint32_t grub_pci_address_t;
|
typedef grub_uint32_t grub_pci_address_t;
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
|
|
||||||
|
#define GRUB_IEEE1275_CELL_SIZEOF 4
|
||||||
typedef grub_uint32_t grub_ieee1275_cell_t;
|
typedef grub_uint32_t grub_ieee1275_cell_t;
|
||||||
|
|
||||||
#endif /* ! GRUB_IEEE1275_MACHINE_HEADER */
|
#endif /* ! GRUB_IEEE1275_MACHINE_HEADER */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* normal_parser.h */
|
/* normal_parser.h */
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2005,2007,2009 Free Software Foundation, Inc.
|
* Copyright (C) 2005,2007,2009,2010 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
|
||||||
|
@ -45,8 +45,11 @@ struct grub_script
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GRUB_SCRIPT_ARG_TYPE_STR,
|
GRUB_SCRIPT_ARG_TYPE_VAR,
|
||||||
GRUB_SCRIPT_ARG_TYPE_VAR
|
GRUB_SCRIPT_ARG_TYPE_TEXT,
|
||||||
|
GRUB_SCRIPT_ARG_TYPE_DQVAR,
|
||||||
|
GRUB_SCRIPT_ARG_TYPE_DQSTR,
|
||||||
|
GRUB_SCRIPT_ARG_TYPE_SQSTR
|
||||||
} grub_script_arg_type_t;
|
} grub_script_arg_type_t;
|
||||||
|
|
||||||
/* A part of an argument. */
|
/* A part of an argument. */
|
||||||
|
@ -121,12 +124,6 @@ struct grub_script_cmd_menuentry
|
||||||
/* State of the lexer as passed to the lexer. */
|
/* State of the lexer as passed to the lexer. */
|
||||||
struct grub_lexer_param
|
struct grub_lexer_param
|
||||||
{
|
{
|
||||||
/* Set to 0 when the lexer is done. */
|
|
||||||
int done;
|
|
||||||
|
|
||||||
/* State of the state machine. */
|
|
||||||
grub_parser_state_t state;
|
|
||||||
|
|
||||||
/* Function used by the lexer to get a new line when more input is
|
/* Function used by the lexer to get a new line when more input is
|
||||||
expected, but not available. */
|
expected, but not available. */
|
||||||
grub_reader_getline_t getline;
|
grub_reader_getline_t getline;
|
||||||
|
@ -137,10 +134,6 @@ struct grub_lexer_param
|
||||||
depleted. */
|
depleted. */
|
||||||
int refs;
|
int refs;
|
||||||
|
|
||||||
/* The character stream that has to be parsed. */
|
|
||||||
char *script;
|
|
||||||
char *newscript; /* XXX */
|
|
||||||
|
|
||||||
/* While walking through the databuffer, `record' the characters to
|
/* While walking through the databuffer, `record' the characters to
|
||||||
this other buffer. It can be used to edit the menu entry at a
|
this other buffer. It can be used to edit the menu entry at a
|
||||||
later moment. */
|
later moment. */
|
||||||
|
@ -157,13 +150,31 @@ struct grub_lexer_param
|
||||||
/* Size of RECORDING. */
|
/* Size of RECORDING. */
|
||||||
int recordlen;
|
int recordlen;
|
||||||
|
|
||||||
/* The token that is already parsed but not yet returned. */
|
/* End of file reached. */
|
||||||
int tokenonhold;
|
int eof;
|
||||||
|
|
||||||
/* Was the last token a newline? */
|
/* Merge multiple word tokens. */
|
||||||
int was_newline;
|
int merge_start;
|
||||||
|
int merge_end;
|
||||||
|
|
||||||
|
/* Part of a multi-part token. */
|
||||||
|
char *text;
|
||||||
|
unsigned used;
|
||||||
|
unsigned size;
|
||||||
|
|
||||||
|
/* Type of text. */
|
||||||
|
grub_script_arg_type_t type;
|
||||||
|
|
||||||
|
/* Flex scanner. */
|
||||||
|
void *yyscanner;
|
||||||
|
|
||||||
|
/* Flex scanner buffer. */
|
||||||
|
void *buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define GRUB_LEXER_INITIAL_TEXT_SIZE 32
|
||||||
|
#define GRUB_LEXER_INITIAL_RECORD_SIZE 256
|
||||||
|
|
||||||
/* State of the parser as passes to the parser. */
|
/* State of the parser as passes to the parser. */
|
||||||
struct grub_parser_param
|
struct grub_parser_param
|
||||||
{
|
{
|
||||||
|
@ -223,12 +234,16 @@ void grub_script_free (struct grub_script *script);
|
||||||
struct grub_script *grub_script_create (struct grub_script_cmd *cmd,
|
struct grub_script *grub_script_create (struct grub_script_cmd *cmd,
|
||||||
struct grub_script_mem *mem);
|
struct grub_script_mem *mem);
|
||||||
|
|
||||||
struct grub_lexer_param *grub_script_lexer_init (char *s,
|
struct grub_lexer_param *grub_script_lexer_init (struct grub_parser_param *parser,
|
||||||
|
char *script,
|
||||||
grub_reader_getline_t getline);
|
grub_reader_getline_t getline);
|
||||||
|
void grub_script_lexer_fini (struct grub_lexer_param *);
|
||||||
void grub_script_lexer_ref (struct grub_lexer_param *);
|
void grub_script_lexer_ref (struct grub_lexer_param *);
|
||||||
void grub_script_lexer_deref (struct grub_lexer_param *);
|
void grub_script_lexer_deref (struct grub_lexer_param *);
|
||||||
void grub_script_lexer_record_start (struct grub_lexer_param *);
|
void grub_script_lexer_record_start (struct grub_parser_param *);
|
||||||
char *grub_script_lexer_record_stop (struct grub_lexer_param *);
|
char *grub_script_lexer_record_stop (struct grub_parser_param *);
|
||||||
|
int grub_script_lexer_yywrap (struct grub_parser_param *);
|
||||||
|
void grub_script_lexer_record (struct grub_parser_param *, char *);
|
||||||
|
|
||||||
/* Functions to track allocated memory. */
|
/* Functions to track allocated memory. */
|
||||||
struct grub_script_mem *grub_script_mem_record (struct grub_parser_param *state);
|
struct grub_script_mem *grub_script_mem_record (struct grub_parser_param *state);
|
||||||
|
@ -284,7 +299,7 @@ int grub_script_function_iterate (int (*iterate) (grub_script_function_t));
|
||||||
int grub_script_function_call (grub_script_function_t func,
|
int grub_script_function_call (grub_script_function_t func,
|
||||||
int argc, char **args);
|
int argc, char **args);
|
||||||
|
|
||||||
char *
|
char **
|
||||||
grub_script_execute_argument_to_string (struct grub_script_arg *arg);
|
grub_script_execute_arglist_to_argv (struct grub_script_arglist *arglist, int *count);
|
||||||
|
|
||||||
#endif /* ! GRUB_NORMAL_PARSER_HEADER */
|
#endif /* ! GRUB_NORMAL_PARSER_HEADER */
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
#define BOOTDEV_REG %l6
|
#define BOOTDEV_REG %l6
|
||||||
#define PIC_REG %l7
|
#define PIC_REG %l7
|
||||||
|
|
||||||
#define SCRATCH_PAD 0x10000
|
#define SCRATCH_PAD_BOOT 0x5000
|
||||||
|
#define SCRATCH_PAD_DISKBOOT 0x4000
|
||||||
|
|
||||||
#define GET_ABS(symbol, reg) \
|
#define GET_ABS(symbol, reg) \
|
||||||
add PIC_REG, (symbol - pic_base), reg
|
add PIC_REG, (symbol - pic_base), reg
|
||||||
|
@ -51,7 +52,7 @@
|
||||||
|
|
||||||
#define GRUB_BOOT_MACHINE_LIST_SIZE 12
|
#define GRUB_BOOT_MACHINE_LIST_SIZE 12
|
||||||
|
|
||||||
#define GRUB_BOOT_MACHINE_IMAGE_ADDRESS 0x200000
|
#define GRUB_BOOT_MACHINE_IMAGE_ADDRESS 0x4400
|
||||||
|
|
||||||
#define GRUB_BOOT_MACHINE_KERNEL_ADDR 0x4200
|
#define GRUB_BOOT_MACHINE_KERNEL_ADDR 0x4200
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
|
|
||||||
|
#define GRUB_IEEE1275_CELL_SIZEOF 8
|
||||||
typedef grub_uint64_t grub_ieee1275_cell_t;
|
typedef grub_uint64_t grub_ieee1275_cell_t;
|
||||||
|
|
||||||
/* Encoding of 'mode' argument to grub_ieee1275_map_physical() */
|
/* Encoding of 'mode' argument to grub_ieee1275_map_physical() */
|
||||||
|
@ -36,14 +37,12 @@ typedef grub_uint64_t grub_ieee1275_cell_t;
|
||||||
#define IEEE1275_MAP_DEFAULT (IEEE1275_MAP_WRITE | IEEE1275_MAP_READ | \
|
#define IEEE1275_MAP_DEFAULT (IEEE1275_MAP_WRITE | IEEE1275_MAP_READ | \
|
||||||
IEEE1275_MAP_EXEC | IEEE1275_MAP_CACHED)
|
IEEE1275_MAP_EXEC | IEEE1275_MAP_CACHED)
|
||||||
|
|
||||||
extern int EXPORT_FUNC(grub_ieee1275_map_physical) (grub_addr_t paddr,
|
|
||||||
grub_addr_t vaddr,
|
|
||||||
grub_size_t size,
|
|
||||||
grub_uint32_t mode);
|
|
||||||
extern int EXPORT_FUNC(grub_ieee1275_claim_vaddr) (grub_addr_t vaddr,
|
extern int EXPORT_FUNC(grub_ieee1275_claim_vaddr) (grub_addr_t vaddr,
|
||||||
grub_size_t size);
|
grub_size_t size);
|
||||||
extern int EXPORT_FUNC(grub_ieee1275_alloc_physmem) (grub_addr_t *paddr,
|
extern int EXPORT_FUNC(grub_ieee1275_alloc_physmem) (grub_addr_t *paddr,
|
||||||
grub_size_t size,
|
grub_size_t size,
|
||||||
grub_uint32_t align);
|
grub_uint32_t align);
|
||||||
|
|
||||||
|
extern grub_addr_t EXPORT_VAR (grub_ieee1275_original_stack);
|
||||||
|
|
||||||
#endif /* ! GRUB_IEEE1275_MACHINE_HEADER */
|
#endif /* ! GRUB_IEEE1275_MACHINE_HEADER */
|
||||||
|
|
|
@ -39,8 +39,24 @@
|
||||||
/* End of the data section. */
|
/* End of the data section. */
|
||||||
#define GRUB_KERNEL_MACHINE_DATA_END 0x114
|
#define GRUB_KERNEL_MACHINE_DATA_END 0x114
|
||||||
|
|
||||||
|
#define GRUB_KERNEL_MACHINE_RAW_SIZE 0
|
||||||
|
#define GRUB_KERNEL_MACHINE_STACK_SIZE 0x40000
|
||||||
|
|
||||||
|
#define GRUB_PLATFORM_IMAGE_FORMATS "raw, aout"
|
||||||
|
#define GRUB_PLATFORM_IMAGE_DEFAULT_FORMAT "raw"
|
||||||
|
|
||||||
|
#define GRUB_PLATFORM_IMAGE_DEFAULT GRUB_PLATFORM_IMAGE_RAW
|
||||||
|
|
||||||
#ifndef ASM_FILE
|
#ifndef ASM_FILE
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
GRUB_PLATFORM_IMAGE_RAW,
|
||||||
|
GRUB_PLATFORM_IMAGE_AOUT
|
||||||
|
}
|
||||||
|
grub_platform_image_format_t;
|
||||||
|
#define GRUB_PLATFORM_IMAGE_RAW GRUB_PLATFORM_IMAGE_RAW
|
||||||
|
#define GRUB_PLATFORM_IMAGE_AOUT GRUB_PLATFORM_IMAGE_AOUT
|
||||||
|
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
#if defined (GRUB_MACHINE_EMU) || defined (GRUB_UTIL)
|
#if defined (GRUB_MACHINE_EMU) || defined (GRUB_UTIL)
|
||||||
#define GRUB_TICKS_PER_SECOND 100000
|
#define GRUB_TICKS_PER_SECOND 100000
|
||||||
|
/* Return the real time in ticks. */
|
||||||
|
grub_uint32_t EXPORT_FUNC (grub_get_rtc) (void);
|
||||||
#else
|
#else
|
||||||
#include <grub/machine/time.h>
|
#include <grub/machine/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -223,4 +223,10 @@ static inline grub_uint64_t grub_swap_bytes64(grub_uint64_t x)
|
||||||
# endif
|
# endif
|
||||||
#endif /* ! WORDS_BIGENDIAN */
|
#endif /* ! WORDS_BIGENDIAN */
|
||||||
|
|
||||||
|
#if GRUB_TARGET_SIZEOF_VOID_P == 8
|
||||||
|
# define grub_host_to_target_addr(x) grub_host_to_target64(x)
|
||||||
|
#else
|
||||||
|
# define grub_host_to_target_addr(x) grub_host_to_target32(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ! GRUB_TYPES_HEADER */
|
#endif /* ! GRUB_TYPES_HEADER */
|
||||||
|
|
|
@ -259,13 +259,13 @@ struct grub_video_adapter
|
||||||
};
|
};
|
||||||
typedef struct grub_video_adapter *grub_video_adapter_t;
|
typedef struct grub_video_adapter *grub_video_adapter_t;
|
||||||
|
|
||||||
void grub_video_register (grub_video_adapter_t adapter);
|
void EXPORT_FUNC (grub_video_register) (grub_video_adapter_t adapter);
|
||||||
void grub_video_unregister (grub_video_adapter_t adapter);
|
void grub_video_unregister (grub_video_adapter_t adapter);
|
||||||
void grub_video_iterate (int (*hook) (grub_video_adapter_t adapter));
|
void grub_video_iterate (int (*hook) (grub_video_adapter_t adapter));
|
||||||
|
|
||||||
grub_err_t grub_video_restore (void);
|
grub_err_t EXPORT_FUNC (grub_video_restore) (void);
|
||||||
|
|
||||||
grub_err_t grub_video_get_info (struct grub_video_mode_info *mode_info);
|
grub_err_t EXPORT_FUNC (grub_video_get_info) (struct grub_video_mode_info *mode_info);
|
||||||
|
|
||||||
/* Framebuffer address may change as a part of normal operation
|
/* Framebuffer address may change as a part of normal operation
|
||||||
(e.g. double buffering). That's why you need to stop video subsystem to be
|
(e.g. double buffering). That's why you need to stop video subsystem to be
|
||||||
|
@ -283,55 +283,69 @@ grub_err_t grub_video_set_palette (unsigned int start, unsigned int count,
|
||||||
grub_err_t grub_video_get_palette (unsigned int start, unsigned int count,
|
grub_err_t grub_video_get_palette (unsigned int start, unsigned int count,
|
||||||
struct grub_video_palette_data *palette_data);
|
struct grub_video_palette_data *palette_data);
|
||||||
|
|
||||||
grub_err_t grub_video_set_viewport (unsigned int x, unsigned int y,
|
grub_err_t EXPORT_FUNC (grub_video_set_viewport) (unsigned int x,
|
||||||
unsigned int width, unsigned int height);
|
unsigned int y,
|
||||||
|
unsigned int width,
|
||||||
|
unsigned int height);
|
||||||
|
|
||||||
grub_err_t grub_video_get_viewport (unsigned int *x, unsigned int *y,
|
grub_err_t EXPORT_FUNC (grub_video_get_viewport) (unsigned int *x,
|
||||||
unsigned int *width, unsigned int *height);
|
unsigned int *y,
|
||||||
|
unsigned int *width,
|
||||||
|
unsigned int *height);
|
||||||
|
|
||||||
grub_video_color_t grub_video_map_color (grub_uint32_t color_name);
|
grub_video_color_t EXPORT_FUNC (grub_video_map_color) (grub_uint32_t color_name);
|
||||||
|
|
||||||
grub_video_color_t grub_video_map_rgb (grub_uint8_t red, grub_uint8_t green,
|
grub_video_color_t EXPORT_FUNC (grub_video_map_rgb) (grub_uint8_t red,
|
||||||
|
grub_uint8_t green,
|
||||||
grub_uint8_t blue);
|
grub_uint8_t blue);
|
||||||
|
|
||||||
grub_video_color_t grub_video_map_rgba (grub_uint8_t red, grub_uint8_t green,
|
grub_video_color_t EXPORT_FUNC (grub_video_map_rgba) (grub_uint8_t red,
|
||||||
grub_uint8_t blue, grub_uint8_t alpha);
|
grub_uint8_t green,
|
||||||
|
grub_uint8_t blue,
|
||||||
|
grub_uint8_t alpha);
|
||||||
|
|
||||||
grub_err_t grub_video_unmap_color (grub_video_color_t color,
|
grub_err_t EXPORT_FUNC (grub_video_unmap_color) (grub_video_color_t color,
|
||||||
grub_uint8_t *red, grub_uint8_t *green,
|
grub_uint8_t *red,
|
||||||
grub_uint8_t *blue, grub_uint8_t *alpha);
|
grub_uint8_t *green,
|
||||||
|
grub_uint8_t *blue,
|
||||||
|
grub_uint8_t *alpha);
|
||||||
|
|
||||||
grub_err_t grub_video_fill_rect (grub_video_color_t color, int x, int y,
|
grub_err_t EXPORT_FUNC (grub_video_fill_rect) (grub_video_color_t color,
|
||||||
unsigned int width, unsigned int height);
|
int x, int y,
|
||||||
|
unsigned int width,
|
||||||
|
unsigned int height);
|
||||||
|
|
||||||
grub_err_t grub_video_blit_bitmap (struct grub_video_bitmap *bitmap,
|
grub_err_t EXPORT_FUNC (grub_video_blit_bitmap) (struct grub_video_bitmap *bitmap,
|
||||||
enum grub_video_blit_operators oper,
|
|
||||||
int x, int y, int offset_x, int offset_y,
|
|
||||||
unsigned int width, unsigned int height);
|
|
||||||
|
|
||||||
grub_err_t grub_video_blit_render_target (struct grub_video_render_target *source,
|
|
||||||
enum grub_video_blit_operators oper,
|
enum grub_video_blit_operators oper,
|
||||||
int x, int y,
|
int x, int y,
|
||||||
int offset_x, int offset_y,
|
int offset_x, int offset_y,
|
||||||
unsigned int width,
|
unsigned int width,
|
||||||
unsigned int height);
|
unsigned int height);
|
||||||
|
|
||||||
|
grub_err_t EXPORT_FUNC (grub_video_blit_render_target) (struct grub_video_render_target *source,
|
||||||
|
enum grub_video_blit_operators oper,
|
||||||
|
int x, int y,
|
||||||
|
int offset_x,
|
||||||
|
int offset_y,
|
||||||
|
unsigned int width,
|
||||||
|
unsigned int height);
|
||||||
|
|
||||||
grub_err_t grub_video_scroll (grub_video_color_t color, int dx, int dy);
|
grub_err_t grub_video_scroll (grub_video_color_t color, int dx, int dy);
|
||||||
|
|
||||||
grub_err_t grub_video_swap_buffers (void);
|
grub_err_t EXPORT_FUNC (grub_video_swap_buffers) (void);
|
||||||
|
|
||||||
grub_err_t grub_video_create_render_target (struct grub_video_render_target **result,
|
grub_err_t EXPORT_FUNC (grub_video_create_render_target) (struct grub_video_render_target **result,
|
||||||
unsigned int width,
|
unsigned int width,
|
||||||
unsigned int height,
|
unsigned int height,
|
||||||
unsigned int mode_type);
|
unsigned int mode_type);
|
||||||
|
|
||||||
grub_err_t grub_video_delete_render_target (struct grub_video_render_target *target);
|
grub_err_t EXPORT_FUNC (grub_video_delete_render_target) (struct grub_video_render_target *target);
|
||||||
|
|
||||||
grub_err_t grub_video_set_active_render_target (struct grub_video_render_target *target);
|
grub_err_t EXPORT_FUNC (grub_video_set_active_render_target) (struct grub_video_render_target *target);
|
||||||
|
|
||||||
grub_err_t grub_video_get_active_render_target (struct grub_video_render_target **target);
|
grub_err_t grub_video_get_active_render_target (struct grub_video_render_target **target);
|
||||||
|
|
||||||
grub_err_t grub_video_set_mode (const char *modestring,
|
grub_err_t EXPORT_FUNC (grub_video_set_mode) (const char *modestring,
|
||||||
unsigned int modemask,
|
unsigned int modemask,
|
||||||
unsigned int modevalue);
|
unsigned int modevalue);
|
||||||
|
|
||||||
|
|
1
include/grub/x86_64/efi/serial.h
Normal file
1
include/grub/x86_64/efi/serial.h
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#include <grub/i386/coreboot/serial.h>
|
|
@ -1121,14 +1121,13 @@ grub_gzio_open (grub_file_t io, int transparent)
|
||||||
if (! file)
|
if (! file)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
gzio = grub_malloc (sizeof (*gzio));
|
gzio = grub_zalloc (sizeof (*gzio));
|
||||||
if (! gzio)
|
if (! gzio)
|
||||||
{
|
{
|
||||||
grub_free (file);
|
grub_free (file);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_memset (gzio, 0, sizeof (*gzio));
|
|
||||||
gzio->file = io;
|
gzio->file = io;
|
||||||
|
|
||||||
file->device = io->device;
|
file->device = io->device;
|
||||||
|
|
|
@ -348,7 +348,7 @@ grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e)
|
||||||
sym->st_value = (Elf_Addr) grub_dl_resolve_symbol (name);
|
sym->st_value = (Elf_Addr) grub_dl_resolve_symbol (name);
|
||||||
if (! sym->st_value)
|
if (! sym->st_value)
|
||||||
return grub_error (GRUB_ERR_BAD_MODULE,
|
return grub_error (GRUB_ERR_BAD_MODULE,
|
||||||
"the symbol `%s' not found", name);
|
"symbol not found: `%s'", name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -469,7 +469,7 @@ grub_dl_resolve_dependencies (grub_dl_t mod, Elf_Ehdr *e)
|
||||||
return GRUB_ERR_NONE;
|
return GRUB_ERR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef GRUB_UTIL
|
#if !GRUB_NO_MODULES
|
||||||
int
|
int
|
||||||
grub_dl_ref (grub_dl_t mod)
|
grub_dl_ref (grub_dl_t mod)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,12 +67,6 @@ grub_exit (void)
|
||||||
grub_cpu_idle ();
|
grub_cpu_idle ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
grub_arch_sync_caches (void *address __attribute__ ((unused)),
|
|
||||||
grub_size_t len __attribute__ ((unused)))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
grub_machine_init (void)
|
grub_machine_init (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,9 +45,3 @@ grub_machine_set_prefix (void)
|
||||||
{
|
{
|
||||||
grub_efi_set_prefix ();
|
grub_efi_set_prefix ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
grub_arch_sync_caches (void *address __attribute__ ((unused)),
|
|
||||||
grub_size_t len __attribute__ ((unused)))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
|
@ -26,9 +26,3 @@ void
|
||||||
grub_stop_floppy (void)
|
grub_stop_floppy (void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
grub_arch_sync_caches (void *address __attribute__ ((unused)),
|
|
||||||
grub_size_t len __attribute__ ((unused)))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
|
@ -47,12 +47,6 @@ static int num_regions;
|
||||||
grub_addr_t grub_os_area_addr;
|
grub_addr_t grub_os_area_addr;
|
||||||
grub_size_t grub_os_area_size;
|
grub_size_t grub_os_area_size;
|
||||||
|
|
||||||
void
|
|
||||||
grub_arch_sync_caches (void *address __attribute__ ((unused)),
|
|
||||||
grub_size_t len __attribute__ ((unused)))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
make_install_device (void)
|
make_install_device (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -284,8 +284,8 @@ grub_ieee1275_read (grub_ieee1275_ihandle_t ihandle, void *buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
grub_ieee1275_seek (grub_ieee1275_ihandle_t ihandle, int pos_hi,
|
grub_ieee1275_seek (grub_ieee1275_ihandle_t ihandle, grub_disk_addr_t pos,
|
||||||
int pos_lo, grub_ssize_t *result)
|
grub_ssize_t *result)
|
||||||
{
|
{
|
||||||
struct write_args
|
struct write_args
|
||||||
{
|
{
|
||||||
|
@ -299,8 +299,15 @@ grub_ieee1275_seek (grub_ieee1275_ihandle_t ihandle, int pos_hi,
|
||||||
|
|
||||||
INIT_IEEE1275_COMMON (&args.common, "seek", 3, 1);
|
INIT_IEEE1275_COMMON (&args.common, "seek", 3, 1);
|
||||||
args.ihandle = ihandle;
|
args.ihandle = ihandle;
|
||||||
args.pos_hi = (grub_ieee1275_cell_t) pos_hi;
|
/* To prevent stupid gcc warning. */
|
||||||
args.pos_lo = (grub_ieee1275_cell_t) pos_lo;
|
#if GRUB_IEEE1275_CELL_SIZEOF >= 8
|
||||||
|
args.pos_hi = 0;
|
||||||
|
args.pos_lo = pos;
|
||||||
|
#else
|
||||||
|
args.pos_hi = (grub_ieee1275_cell_t) (pos >> (8 * GRUB_IEEE1275_CELL_SIZEOF));
|
||||||
|
args.pos_lo = (grub_ieee1275_cell_t)
|
||||||
|
(pos & ((1ULL << (8 * GRUB_IEEE1275_CELL_SIZEOF)) - 1));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
|
if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -38,11 +38,11 @@
|
||||||
#define HEAP_MIN_SIZE (unsigned long) (2 * 1024 * 1024)
|
#define HEAP_MIN_SIZE (unsigned long) (2 * 1024 * 1024)
|
||||||
|
|
||||||
/* The maximum heap size we're going to claim */
|
/* The maximum heap size we're going to claim */
|
||||||
#define HEAP_MAX_SIZE (unsigned long) (4 * 1024 * 1024)
|
#define HEAP_MAX_SIZE (unsigned long) (32 * 1024 * 1024)
|
||||||
|
|
||||||
/* If possible, we will avoid claiming heap above this address, because it
|
/* If possible, we will avoid claiming heap above this address, because it
|
||||||
seems to cause relocation problems with OSes that link at 4 MiB */
|
seems to cause relocation problems with OSes that link at 4 MiB */
|
||||||
#define HEAP_MAX_ADDR (unsigned long) (4 * 1024 * 1024)
|
#define HEAP_MAX_ADDR (unsigned long) (32 * 1024 * 1024)
|
||||||
|
|
||||||
extern char _start[];
|
extern char _start[];
|
||||||
extern char _end[];
|
extern char _end[];
|
||||||
|
|
|
@ -68,11 +68,10 @@ grub_children_iterate (char *devpath,
|
||||||
{
|
{
|
||||||
struct grub_ieee1275_devalias alias;
|
struct grub_ieee1275_devalias alias;
|
||||||
grub_ssize_t actual;
|
grub_ssize_t actual;
|
||||||
char *fullname;
|
|
||||||
|
|
||||||
if (grub_ieee1275_get_property (child, "device_type", childtype,
|
if (grub_ieee1275_get_property (child, "device_type", childtype,
|
||||||
IEEE1275_MAX_PROP_LEN, &actual))
|
IEEE1275_MAX_PROP_LEN, &actual))
|
||||||
continue;
|
childtype[0] = 0;
|
||||||
|
|
||||||
if (grub_ieee1275_package_to_path (child, childpath,
|
if (grub_ieee1275_package_to_path (child, childpath,
|
||||||
IEEE1275_MAX_PATH_LEN, &actual))
|
IEEE1275_MAX_PATH_LEN, &actual))
|
||||||
|
@ -82,24 +81,14 @@ grub_children_iterate (char *devpath,
|
||||||
IEEE1275_MAX_PROP_LEN, &actual))
|
IEEE1275_MAX_PROP_LEN, &actual))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
fullname = grub_xasprintf ("%s/%s", devpath, childname);
|
|
||||||
if (!fullname)
|
|
||||||
{
|
|
||||||
grub_free (childname);
|
|
||||||
grub_free (childpath);
|
|
||||||
grub_free (childtype);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
alias.type = childtype;
|
alias.type = childtype;
|
||||||
alias.path = childpath;
|
alias.path = childpath;
|
||||||
alias.name = fullname;
|
alias.name = childname;
|
||||||
ret = hook (&alias);
|
ret = hook (&alias);
|
||||||
grub_free (fullname);
|
|
||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
while (grub_ieee1275_peer (child, &child));
|
while (grub_ieee1275_peer (child, &child) != -1);
|
||||||
|
|
||||||
grub_free (childname);
|
grub_free (childname);
|
||||||
grub_free (childpath);
|
grub_free (childpath);
|
||||||
|
@ -108,6 +97,20 @@ grub_children_iterate (char *devpath,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
grub_ieee1275_devices_iterate (int (*hook) (struct grub_ieee1275_devalias *alias))
|
||||||
|
{
|
||||||
|
auto int it_through (struct grub_ieee1275_devalias *alias);
|
||||||
|
int it_through (struct grub_ieee1275_devalias *alias)
|
||||||
|
{
|
||||||
|
if (hook (alias))
|
||||||
|
return 1;
|
||||||
|
return grub_children_iterate (alias->path, it_through);
|
||||||
|
}
|
||||||
|
|
||||||
|
return grub_children_iterate ("/", it_through);
|
||||||
|
}
|
||||||
|
|
||||||
/* Iterate through all device aliases. This function can be used to
|
/* Iterate through all device aliases. This function can be used to
|
||||||
find a device of a specific type. */
|
find a device of a specific type. */
|
||||||
int
|
int
|
||||||
|
@ -199,9 +202,9 @@ nextprop:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the "map" method of /chosen/mmu. */
|
/* Call the "map" method of /chosen/mmu. */
|
||||||
static int
|
int
|
||||||
grub_map (grub_addr_t phys, grub_addr_t virt, grub_uint32_t size,
|
grub_ieee1275_map (grub_addr_t phys, grub_addr_t virt, grub_size_t size,
|
||||||
grub_uint8_t mode)
|
grub_uint32_t mode)
|
||||||
{
|
{
|
||||||
struct map_args {
|
struct map_args {
|
||||||
struct grub_ieee1275_common_hdr common;
|
struct grub_ieee1275_common_hdr common;
|
||||||
|
@ -210,17 +213,30 @@ grub_map (grub_addr_t phys, grub_addr_t virt, grub_uint32_t size,
|
||||||
grub_ieee1275_cell_t mode;
|
grub_ieee1275_cell_t mode;
|
||||||
grub_ieee1275_cell_t size;
|
grub_ieee1275_cell_t size;
|
||||||
grub_ieee1275_cell_t virt;
|
grub_ieee1275_cell_t virt;
|
||||||
grub_ieee1275_cell_t phys;
|
#ifdef GRUB_MACHINE_SPARC64
|
||||||
|
grub_ieee1275_cell_t phys_high;
|
||||||
|
#endif
|
||||||
|
grub_ieee1275_cell_t phys_low;
|
||||||
grub_ieee1275_cell_t catch_result;
|
grub_ieee1275_cell_t catch_result;
|
||||||
} args;
|
} args;
|
||||||
|
|
||||||
INIT_IEEE1275_COMMON (&args.common, "call-method", 6, 1);
|
INIT_IEEE1275_COMMON (&args.common, "call-method",
|
||||||
|
#ifdef GRUB_MACHINE_SPARC64
|
||||||
|
7,
|
||||||
|
#else
|
||||||
|
6,
|
||||||
|
#endif
|
||||||
|
1);
|
||||||
args.method = (grub_ieee1275_cell_t) "map";
|
args.method = (grub_ieee1275_cell_t) "map";
|
||||||
args.ihandle = grub_ieee1275_mmu;
|
args.ihandle = grub_ieee1275_mmu;
|
||||||
args.phys = phys;
|
#ifdef GRUB_MACHINE_SPARC64
|
||||||
|
args.phys_high = 0;
|
||||||
|
#endif
|
||||||
|
args.phys_low = phys;
|
||||||
args.virt = virt;
|
args.virt = virt;
|
||||||
args.size = size;
|
args.size = size;
|
||||||
args.mode = mode; /* Format is WIMG0PP. */
|
args.mode = mode; /* Format is WIMG0PP. */
|
||||||
|
args.catch_result = (grub_ieee1275_cell_t) -1;
|
||||||
|
|
||||||
if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
|
if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -235,7 +251,7 @@ grub_claimmap (grub_addr_t addr, grub_size_t size)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_REAL_MODE)
|
if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_REAL_MODE)
|
||||||
&& grub_map (addr, addr, size, 0x00))
|
&& grub_ieee1275_map (addr, addr, size, 0x00))
|
||||||
{
|
{
|
||||||
grub_printf ("map failed: address 0x%llx, size 0x%llx\n",
|
grub_printf ("map failed: address 0x%llx, size 0x%llx\n",
|
||||||
(long long) addr, (long long) size);
|
(long long) addr, (long long) size);
|
||||||
|
@ -405,8 +421,9 @@ grub_reboot (void)
|
||||||
void
|
void
|
||||||
grub_halt (void)
|
grub_halt (void)
|
||||||
{
|
{
|
||||||
/* Not standardized. We try both known commands. */
|
/* Not standardized. We try three known commands. */
|
||||||
|
|
||||||
grub_ieee1275_interpret ("shut-down", 0);
|
grub_ieee1275_interpret ("shut-down", 0);
|
||||||
grub_ieee1275_interpret ("power-off", 0);
|
grub_ieee1275_interpret ("power-off", 0);
|
||||||
|
grub_ieee1275_interpret ("poweroff", 0);
|
||||||
}
|
}
|
||||||
|
|
22
kern/main.c
22
kern/main.c
|
@ -53,6 +53,25 @@ grub_module_iterate (int (*hook) (struct grub_module_header *header))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This is actualy platform-independant but used only on yeeloong and sparc. */
|
||||||
|
#if defined (GRUB_MACHINE_MIPS_YEELOONG) || defined (GRUB_MACHINE_SPARC64)
|
||||||
|
grub_addr_t
|
||||||
|
grub_modules_get_end (void)
|
||||||
|
{
|
||||||
|
struct grub_module_info *modinfo;
|
||||||
|
grub_addr_t modbase;
|
||||||
|
|
||||||
|
modbase = grub_arch_modules_addr ();
|
||||||
|
modinfo = (struct grub_module_info *) modbase;
|
||||||
|
|
||||||
|
/* Check if there are any modules. */
|
||||||
|
if ((modinfo == 0) || modinfo->magic != GRUB_MODULE_MAGIC)
|
||||||
|
return modbase;
|
||||||
|
|
||||||
|
return modbase + modinfo->size;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Load all modules in core. */
|
/* Load all modules in core. */
|
||||||
static void
|
static void
|
||||||
grub_load_modules (void)
|
grub_load_modules (void)
|
||||||
|
@ -68,6 +87,9 @@ grub_load_modules (void)
|
||||||
(header->size - sizeof (struct grub_module_header))))
|
(header->size - sizeof (struct grub_module_header))))
|
||||||
grub_fatal ("%s", grub_errmsg);
|
grub_fatal ("%s", grub_errmsg);
|
||||||
|
|
||||||
|
if (grub_errno)
|
||||||
|
grub_print_error ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue