From 8c411768822a75c8c15108872191a05e84befa6e Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Thu, 6 May 2010 11:34:04 +0530 Subject: [PATCH] automake commit without merge history --- .bzrignore | 6 + ABOUT-NLS | 223 +++ Makefile.am | 87 + Makefile.in | 564 ------ autogen.sh | 39 +- configure.ac | 783 +------- configure.common | 804 +++++++++ docs/Makefile.am | 6 + geninit.sh | 30 +- geninitheader.sh | 45 - genkernsyms.sh.in | 27 - genmk.rb | 475 ----- gentpl.py | 460 +++++ grub-core/Makefile.am | 155 ++ grub-core/Makefile.extra-dist | 53 + grub-core/Makefile.kernel | 192 ++ grub-core/Makefile.vars | 80 + {boot => grub-core/boot}/i386/pc/boot.S | 0 {boot => grub-core/boot}/i386/pc/cdboot.S | 0 {boot => grub-core/boot}/i386/pc/diskboot.S | 0 {boot => grub-core/boot}/i386/pc/lnxboot.S | 0 {boot => grub-core/boot}/i386/pc/pxeboot.S | 0 {boot => grub-core/boot}/i386/qemu/boot.S | 0 .../boot}/sparc64/ieee1275/boot.S | 0 .../boot}/sparc64/ieee1275/diskboot.S | 0 {bus => grub-core/bus}/bonito.c | 0 {util => grub-core/bus/emu}/pci.c | 1 + {bus => grub-core/bus}/pci.c | 0 {util => grub-core/bus/usb/emu}/usb.c | 0 {bus => grub-core/bus}/usb/ohci.c | 0 {bus => grub-core/bus}/usb/uhci.c | 0 {bus => grub-core/bus}/usb/usb.c | 0 {bus => grub-core/bus}/usb/usbhub.c | 0 {bus => grub-core/bus}/usb/usbtrans.c | 0 {commands => grub-core/commands}/acpi.c | 0 {commands => grub-core/commands}/blocklist.c | 0 {commands => grub-core/commands}/boot.c | 0 {commands => grub-core/commands}/cat.c | 0 {commands => grub-core/commands}/cmp.c | 0 {commands => grub-core/commands}/configfile.c | 0 {commands => grub-core/commands}/crc.c | 0 {commands => grub-core/commands}/date.c | 0 {commands => grub-core/commands}/echo.c | 0 {commands => grub-core/commands}/efi/acpi.c | 0 .../commands}/efi/fixvideo.c | 0 .../commands}/efi/loadbios.c | 0 {commands => grub-core/commands}/extcmd.c | 0 {commands => grub-core/commands}/gptsync.c | 0 {commands => grub-core/commands}/halt.c | 0 {commands => grub-core/commands}/handler.c | 0 {commands => grub-core/commands}/hashsum.c | 0 {commands => grub-core/commands}/hdparm.c | 0 {commands => grub-core/commands}/help.c | 0 {commands => grub-core/commands}/hexdump.c | 0 {commands => grub-core/commands}/i386/cpuid.c | 0 .../commands}/i386/pc/acpi.c | 0 .../commands}/i386/pc/drivemap.c | 0 .../commands}/i386/pc/drivemap_int13h.S | 0 .../commands}/i386/pc/halt.c | 0 .../commands}/i386/pc/play.c | 0 .../commands}/i386/pc/pxecmd.c | 0 .../commands}/i386/pc/vbeinfo.c | 0 .../commands}/i386/pc/vbetest.c | 0 .../commands}/ieee1275/suspend.c | 0 {commands => grub-core/commands}/iorw.c | 0 {commands => grub-core/commands}/keystatus.c | 0 {commands => grub-core/commands}/loadenv.c | 0 {commands => grub-core/commands}/ls.c | 0 {commands => grub-core/commands}/lsmmap.c | 0 {commands => grub-core/commands}/lspci.c | 0 {commands => grub-core/commands}/memrw.c | 0 {commands => grub-core/commands}/minicmd.c | 0 {commands => grub-core/commands}/parttool.c | 2 +- {commands => grub-core/commands}/password.c | 0 .../commands}/password_pbkdf2.c | 0 {commands => grub-core/commands}/probe.c | 0 {commands => grub-core/commands}/read.c | 0 {commands => grub-core/commands}/reboot.c | 0 {commands => grub-core/commands}/regexp.c | 0 {commands => grub-core/commands}/search.c | 0 .../commands}/search_file.c | 0 .../commands}/search_label.c | 0 .../commands}/search_uuid.c | 0 .../commands}/search_wrap.c | 0 {commands => grub-core/commands}/setpci.c | 0 {commands => grub-core/commands}/sleep.c | 0 {commands => grub-core/commands}/terminal.c | 0 {commands => grub-core/commands}/test.c | 0 {commands => grub-core/commands}/true.c | 0 {commands => grub-core/commands}/usbtest.c | 0 {commands => grub-core/commands}/videotest.c | 0 {commands => grub-core/commands}/xnu_uuid.c | 0 {conf => grub-core/conf}/any-emu.rmk | 0 {conf => grub-core/conf}/common.rmk | 0 {conf => grub-core/conf}/i386-coreboot.rmk | 0 {conf => grub-core/conf}/i386-efi.rmk | 0 {conf => grub-core/conf}/i386-ieee1275.rmk | 0 {conf => grub-core/conf}/i386-multiboot.rmk | 0 .../conf}/i386-pc-cygwin-img-ld.sc | 0 {conf => grub-core/conf}/i386-pc.rmk | 0 {conf => grub-core/conf}/i386-qemu.rmk | 0 {conf => grub-core/conf}/i386.rmk | 0 {conf => grub-core/conf}/mips-qemu-mips.rmk | 0 {conf => grub-core/conf}/mips-yeeloong.rmk | 0 {conf => grub-core/conf}/mips.rmk | 0 {conf => grub-core/conf}/powerpc-ieee1275.rmk | 0 {conf => grub-core/conf}/sparc64-ieee1275.rmk | 0 {conf => grub-core/conf}/tests.rmk | 0 {conf => grub-core/conf}/x86-efi.rmk | 0 {conf => grub-core/conf}/x86_64-efi.rmk | 0 grub-core/configure.ac | 91 + {disk => grub-core/disk}/ata.c | 0 {disk => grub-core/disk}/ata_pthru.c | 0 {disk => grub-core/disk}/dmraid_nvidia.c | 0 {disk => grub-core/disk}/efi/efidisk.c | 0 {disk => grub-core/disk}/host.c | 0 {disk => grub-core/disk}/i386/pc/biosdisk.c | 0 {disk => grub-core/disk}/ieee1275/nand.c | 0 {disk => grub-core/disk}/ieee1275/ofdisk.c | 0 {disk => grub-core/disk}/loopback.c | 0 {disk => grub-core/disk}/lvm.c | 0 {disk => grub-core/disk}/mdraid_linux.c | 0 {disk => grub-core/disk}/memdisk.c | 0 {disk => grub-core/disk}/raid.c | 0 {disk => grub-core/disk}/raid5_recover.c | 0 {disk => grub-core/disk}/raid6_recover.c | 0 {disk => grub-core/disk}/scsi.c | 0 {disk => grub-core/disk}/usbms.c | 0 .../efiemu}/i386/coredetect.c | 0 .../efiemu}/i386/loadcore32.c | 0 .../efiemu}/i386/loadcore64.c | 0 .../efiemu}/i386/pc/cfgtables.c | 0 {efiemu => grub-core/efiemu}/loadcore.c | 0 {efiemu => grub-core/efiemu}/loadcore32.c | 0 {efiemu => grub-core/efiemu}/loadcore64.c | 0 .../efiemu}/loadcore_common.c | 0 {efiemu => grub-core/efiemu}/main.c | 0 {efiemu => grub-core/efiemu}/mm.c | 0 {efiemu => grub-core/efiemu}/pnvram.c | 0 {efiemu => grub-core/efiemu}/prepare.c | 0 {efiemu => grub-core/efiemu}/prepare32.c | 0 {efiemu => grub-core/efiemu}/prepare64.c | 0 {efiemu => grub-core/efiemu}/runtime/config.h | 0 {efiemu => grub-core/efiemu}/runtime/efiemu.S | 0 {efiemu => grub-core/efiemu}/runtime/efiemu.c | 0 .../efiemu}/runtime/efiemu.sh | 0 {efiemu => grub-core/efiemu}/symbols.c | 0 {font => grub-core/font}/font.c | 0 {font => grub-core/font}/font_cmd.c | 0 {fs => grub-core/fs}/affs.c | 0 {fs => grub-core/fs}/afs.c | 0 {fs => grub-core/fs}/afs_be.c | 0 {fs => grub-core/fs}/befs.c | 0 {fs => grub-core/fs}/befs_be.c | 0 {fs => grub-core/fs}/cpio.c | 0 {fs => grub-core/fs}/ext2.c | 0 {fs => grub-core/fs}/fat.c | 0 {fs => grub-core/fs}/fshelp.c | 0 {fs => grub-core/fs}/hfs.c | 0 {fs => grub-core/fs}/hfsplus.c | 0 {fs => grub-core/fs}/i386/pc/pxe.c | 0 {fs => grub-core/fs}/iso9660.c | 0 {fs => grub-core/fs}/jfs.c | 0 {fs => grub-core/fs}/minix.c | 0 {fs => grub-core/fs}/nilfs2.c | 0 {fs => grub-core/fs}/ntfs.c | 0 {fs => grub-core/fs}/ntfscomp.c | 0 {fs => grub-core/fs}/reiserfs.c | 0 {fs => grub-core/fs}/sfs.c | 0 {fs => grub-core/fs}/tar.c | 0 {fs => grub-core/fs}/udf.c | 0 {fs => grub-core/fs}/ufs.c | 0 {fs => grub-core/fs}/ufs2.c | 0 {fs => grub-core/fs}/xfs.c | 0 gencmdlist.sh => grub-core/gencmdlist.sh | 0 gendistlist.sh => grub-core/gendistlist.sh | 0 genemuinit.sh => grub-core/genemuinit.sh | 0 .../genemuinitheader.sh | 0 genfslist.sh => grub-core/genfslist.sh | 0 .../genhandlerlist.sh | 0 genmoddep.awk => grub-core/genmoddep.awk | 13 +- genmodsrc.sh => grub-core/genmodsrc.sh | 0 .../genpartmaplist.sh | 0 .../genparttoollist.sh | 0 gensymlist.sh.in => grub-core/gensymlist.sh | 13 +- .../genterminallist.sh | 0 gentrigtables.c => grub-core/gentrigtables.c | 3 +- genvideolist.sh => grub-core/genvideolist.sh | 0 {gettext => grub-core/gettext}/gettext.c | 0 {gfxmenu => grub-core/gfxmenu}/gfxmenu.c | 0 {gfxmenu => grub-core/gfxmenu}/gui_box.c | 0 {gfxmenu => grub-core/gfxmenu}/gui_canvas.c | 0 .../gfxmenu}/gui_circular_progress.c | 0 {gfxmenu => grub-core/gfxmenu}/gui_image.c | 0 {gfxmenu => grub-core/gfxmenu}/gui_label.c | 0 {gfxmenu => grub-core/gfxmenu}/gui_list.c | 0 .../gfxmenu}/gui_progress_bar.c | 0 .../gfxmenu}/gui_string_util.c | 0 {gfxmenu => grub-core/gfxmenu}/gui_util.c | 0 {gfxmenu => grub-core/gfxmenu}/icon_manager.c | 0 {gfxmenu => grub-core/gfxmenu}/model.c | 0 {gfxmenu => grub-core/gfxmenu}/named_colors.c | 0 {gfxmenu => grub-core/gfxmenu}/theme_loader.c | 0 {gfxmenu => grub-core/gfxmenu}/view.c | 0 {gfxmenu => grub-core/gfxmenu}/widget-box.c | 0 {gnulib => grub-core/gnulib}/alloca.h | 0 {gnulib => grub-core/gnulib}/argp-ba.c | 0 {gnulib => grub-core/gnulib}/argp-eexst.c | 0 {gnulib => grub-core/gnulib}/argp-fmtstream.c | 0 {gnulib => grub-core/gnulib}/argp-fmtstream.h | 0 {gnulib => grub-core/gnulib}/argp-fs-xinl.c | 0 {gnulib => grub-core/gnulib}/argp-help.c | 0 {gnulib => grub-core/gnulib}/argp-namefrob.h | 0 {gnulib => grub-core/gnulib}/argp-parse.c | 0 {gnulib => grub-core/gnulib}/argp-pin.c | 0 {gnulib => grub-core/gnulib}/argp-pv.c | 0 {gnulib => grub-core/gnulib}/argp-pvh.c | 0 .../gnulib}/argp-version-etc.c | 0 .../gnulib}/argp-version-etc.h | 0 {gnulib => grub-core/gnulib}/argp-xinl.c | 0 {gnulib => grub-core/gnulib}/argp.h | 0 {gnulib => grub-core/gnulib}/error.c | 0 {gnulib => grub-core/gnulib}/error.h | 0 {gnulib => grub-core/gnulib}/fnmatch.c | 0 {gnulib => grub-core/gnulib}/fnmatch.h | 0 {gnulib => grub-core/gnulib}/fnmatch_loop.c | 0 {gnulib => grub-core/gnulib}/getdelim.c | 0 {gnulib => grub-core/gnulib}/getline.c | 0 {gnulib => grub-core/gnulib}/getopt.c | 0 {gnulib => grub-core/gnulib}/getopt.h | 0 {gnulib => grub-core/gnulib}/getopt1.c | 0 {gnulib => grub-core/gnulib}/getopt_int.h | 0 {gnulib => grub-core/gnulib}/gettext.h | 0 {gnulib => grub-core/gnulib}/progname.c | 0 {gnulib => grub-core/gnulib}/progname.h | 0 {gnulib => grub-core/gnulib}/regcomp.c | 0 {gnulib => grub-core/gnulib}/regex.c | 0 {gnulib => grub-core/gnulib}/regex.h | 0 {gnulib => grub-core/gnulib}/regex_internal.c | 0 {gnulib => grub-core/gnulib}/regex_internal.h | 0 {gnulib => grub-core/gnulib}/regexec.c | 0 {hello => grub-core/hello}/hello.c | 0 {hook => grub-core/hook}/datehook.c | 0 {util => grub-core}/import_gcry.py | 0 .../include}/grub/acorn_filecore.h | 0 {include => grub-core/include}/grub/acpi.h | 0 {include => grub-core/include}/grub/aout.h | 0 .../include}/grub/at_keyboard.h | 0 {include => grub-core/include}/grub/ata.h | 0 {include => grub-core/include}/grub/auth.h | 0 {include => grub-core/include}/grub/autoefi.h | 0 {include => grub-core/include}/grub/bitmap.h | 0 .../include}/grub/bitmap_scale.h | 0 {include => grub-core/include}/grub/boot.h | 0 .../include}/grub/bsdlabel.h | 0 {include => grub-core/include}/grub/bufio.h | 0 {include => grub-core/include}/grub/cache.h | 0 {include => grub-core/include}/grub/charset.h | 0 {include => grub-core/include}/grub/cmos.h | 0 {include => grub-core/include}/grub/command.h | 0 {include => grub-core/include}/grub/crypto.h | 0 .../include}/grub/datetime.h | 0 {include => grub-core/include}/grub/device.h | 0 {include => grub-core/include}/grub/disk.h | 0 {include => grub-core/include}/grub/dl.h | 32 +- {include => grub-core/include}/grub/efi/api.h | 0 .../include}/grub/efi/console.h | 0 .../include}/grub/efi/console_control.h | 0 .../include}/grub/efi/disk.h | 0 {include => grub-core/include}/grub/efi/efi.h | 0 .../include}/grub/efi/graphics_output.h | 0 .../include}/grub/efi/memory.h | 0 .../include}/grub/efi/pe32.h | 0 .../include}/grub/efi/time.h | 0 .../include}/grub/efi/uga_draw.h | 0 .../include}/grub/efiemu/efiemu.h | 0 .../include}/grub/efiemu/runtime.h | 0 {include => grub-core/include}/grub/elf.h | 0 {include => grub-core/include}/grub/elfload.h | 0 .../include/grub/emu}/console.h | 0 .../include/grub/emu}/getroot.h | 1 + .../include/grub/emu}/hostdisk.h | 0 grub-core/include/grub/emu/misc.h | 22 + {include => grub-core/include}/grub/env.h | 0 .../include}/grub/env_private.h | 0 {include => grub-core/include}/grub/err.h | 0 {include => grub-core/include}/grub/extcmd.h | 0 {include => grub-core/include}/grub/fbblit.h | 0 {include => grub-core/include}/grub/fbfill.h | 0 {include => grub-core/include}/grub/fbutil.h | 0 {include => grub-core/include}/grub/file.h | 0 {include => grub-core/include}/grub/font.h | 0 .../include}/grub/fontformat.h | 0 {include => grub-core/include}/grub/fs.h | 0 {include => grub-core/include}/grub/fshelp.h | 0 .../include}/grub/gfxmenu_model.h | 0 .../include}/grub/gfxmenu_view.h | 0 {include => grub-core/include}/grub/gfxterm.h | 0 .../include}/grub/gfxwidgets.h | 0 .../include}/grub/gpt_partition.h | 0 {include => grub-core/include}/grub/gui.h | 0 .../include}/grub/gui_string_util.h | 0 {include => grub-core/include}/grub/gzio.h | 0 {include => grub-core/include}/grub/handler.h | 0 {include => grub-core/include}/grub/hfs.h | 0 {include => grub-core/include}/grub/i18n.h | 0 .../include}/grub/i386/at_keyboard.h | 0 .../include}/grub/i386/bsd.h | 0 .../include}/grub/i386/cmos.h | 0 .../include}/grub/i386/coreboot/boot.h | 0 .../include}/grub/i386/coreboot/console.h | 0 .../include}/grub/i386/coreboot/init.h | 0 .../include}/grub/i386/coreboot/kernel.h | 0 .../include}/grub/i386/coreboot/loader.h | 0 .../include}/grub/i386/coreboot/memory.h | 0 .../include}/grub/i386/coreboot/serial.h | 0 .../include}/grub/i386/coreboot/time.h | 0 .../include}/grub/i386/cpuid.h | 0 .../include}/grub/i386/efi/kernel.h | 0 .../include}/grub/i386/efi/loader.h | 0 .../include}/grub/i386/efi/memory.h | 0 .../include}/grub/i386/efi/serial.h | 0 .../include}/grub/i386/efi/time.h | 0 .../include}/grub/i386/efiemu.h | 0 .../include}/grub/i386/freebsd_linker.h | 0 .../include}/grub/i386/freebsd_reboot.h | 0 .../include}/grub/i386/ieee1275/console.h | 0 .../include}/grub/i386/ieee1275/ieee1275.h | 0 .../include}/grub/i386/ieee1275/kernel.h | 0 .../include}/grub/i386/ieee1275/loader.h | 0 .../include}/grub/i386/ieee1275/memory.h | 0 .../include}/grub/i386/ieee1275/serial.h | 0 .../include}/grub/i386/ieee1275/time.h | 0 {include => grub-core/include}/grub/i386/io.h | 0 .../include}/grub/i386/kernel.h | 0 .../include}/grub/i386/linux.h | 0 .../include}/grub/i386/loader.h | 0 .../include}/grub/i386/macho.h | 0 .../include}/grub/i386/memory.h | 0 .../include}/grub/i386/multiboot.h | 0 .../include}/grub/i386/multiboot/boot.h | 0 .../include}/grub/i386/multiboot/console.h | 0 .../include}/grub/i386/multiboot/init.h | 0 .../include}/grub/i386/multiboot/kernel.h | 0 .../include}/grub/i386/multiboot/loader.h | 0 .../include}/grub/i386/multiboot/memory.h | 0 .../include}/grub/i386/multiboot/serial.h | 0 .../include}/grub/i386/multiboot/time.h | 0 .../include}/grub/i386/netbsd_bootinfo.h | 0 .../include}/grub/i386/netbsd_reboot.h | 0 .../include}/grub/i386/openbsd_bootarg.h | 0 .../include}/grub/i386/openbsd_reboot.h | 0 .../include}/grub/i386/pc/biosdisk.h | 0 .../include}/grub/i386/pc/biosnum.h | 0 .../include}/grub/i386/pc/boot.h | 0 .../include}/grub/i386/pc/chainloader.h | 0 .../include}/grub/i386/pc/console.h | 0 .../include}/grub/i386/pc/efiemu.h | 0 .../include}/grub/i386/pc/init.h | 0 .../include}/grub/i386/pc/kernel.h | 0 .../include}/grub/i386/pc/loader.h | 0 .../include}/grub/i386/pc/memory.h | 0 .../include}/grub/i386/pc/pxe.h | 0 .../include}/grub/i386/pc/time.h | 0 .../include}/grub/i386/pc/vbe.h | 0 .../include}/grub/i386/pc/vga.h | 0 .../include}/grub/i386/pci.h | 0 .../include}/grub/i386/pit.h | 0 .../include}/grub/i386/qemu/boot.h | 0 .../include}/grub/i386/qemu/console.h | 0 .../include}/grub/i386/qemu/init.h | 0 .../include}/grub/i386/qemu/kernel.h | 0 .../include}/grub/i386/qemu/loader.h | 0 .../include}/grub/i386/qemu/memory.h | 0 .../include}/grub/i386/qemu/serial.h | 0 .../include}/grub/i386/qemu/time.h | 0 .../include}/grub/i386/relocator.h | 0 .../include}/grub/i386/setjmp.h | 0 .../include}/grub/i386/time.h | 0 .../include}/grub/i386/tsc.h | 0 .../include}/grub/i386/types.h | 0 .../include}/grub/i386/vga_common.h | 0 .../include}/grub/i386/xnu.h | 0 .../include}/grub/icon_manager.h | 0 .../include}/grub/ieee1275/ieee1275.h | 0 .../include}/grub/ieee1275/ofdisk.h | 0 {include => grub-core/include}/grub/kernel.h | 0 .../include}/grub/lib/LzFind.h | 0 .../include}/grub/lib/LzHash.h | 0 .../include}/grub/lib/LzmaDec.h | 0 .../include}/grub/lib/LzmaEnc.h | 0 .../include}/grub/lib/LzmaTypes.h | 0 {include => grub-core/include}/grub/lib/arg.h | 0 {include => grub-core/include}/grub/lib/crc.h | 0 .../include}/grub/lib/envblk.h | 0 .../include}/grub/lib/hexdump.h | 0 {include => grub-core/include}/grub/libgcc.h | 0 .../include}/grub/libpciaccess.h | 0 {include => grub-core/include}/grub/libusb.h | 0 {include => grub-core/include}/grub/list.h | 0 {include => grub-core/include}/grub/loader.h | 0 {include => grub-core/include}/grub/lvm.h | 0 {include => grub-core/include}/grub/macho.h | 0 .../include}/grub/machoload.h | 0 {include => grub-core/include}/grub/memory.h | 0 {include => grub-core/include}/grub/menu.h | 0 .../include}/grub/menu_viewer.h | 0 .../include}/grub/mips/at_keyboard.h | 0 .../include}/grub/mips/cache.h | 0 .../include}/grub/mips/cmos.h | 0 {include => grub-core/include}/grub/mips/io.h | 0 .../include}/grub/mips/kernel.h | 0 .../include}/grub/mips/multiboot.h | 0 .../include}/grub/mips/pci.h | 0 .../include}/grub/mips/qemu-mips/boot.h | 0 .../include}/grub/mips/qemu-mips/kernel.h | 0 .../include}/grub/mips/qemu-mips/loader.h | 0 .../include}/grub/mips/qemu-mips/memory.h | 0 .../include}/grub/mips/qemu-mips/serial.h | 0 .../include}/grub/mips/qemu-mips/time.h | 0 .../include}/grub/mips/relocator.h | 0 .../include}/grub/mips/setjmp.h | 0 .../include}/grub/mips/time.h | 0 .../include}/grub/mips/types.h | 0 .../include}/grub/mips/yeeloong/at_keyboard.h | 0 .../include}/grub/mips/yeeloong/boot.h | 0 .../include}/grub/mips/yeeloong/cmos.h | 0 .../include}/grub/mips/yeeloong/kernel.h | 0 .../include}/grub/mips/yeeloong/loader.h | 0 .../include}/grub/mips/yeeloong/memory.h | 0 .../include}/grub/mips/yeeloong/pci.h | 0 .../include}/grub/mips/yeeloong/serial.h | 0 .../include}/grub/mips/yeeloong/time.h | 0 {include => grub-core/include}/grub/misc.h | 0 {include => grub-core/include}/grub/mm.h | 0 .../include}/grub/msdos_partition.h | 0 .../include}/grub/multiboot.h | 0 .../include}/grub/multiboot_loader.h | 0 {include => grub-core/include}/grub/net.h | 0 {include => grub-core/include}/grub/normal.h | 0 {include => grub-core/include}/grub/ntfs.h | 0 {include => grub-core/include}/grub/parser.h | 0 .../include}/grub/partition.h | 0 .../include}/grub/parttool.h | 0 {include => grub-core/include}/grub/pci.h | 0 .../include}/grub/pciutils.h | 0 .../include}/grub/powerpc/ieee1275/biosdisk.h | 0 .../include}/grub/powerpc/ieee1275/console.h | 0 .../include}/grub/powerpc/ieee1275/ieee1275.h | 0 .../include}/grub/powerpc/ieee1275/kernel.h | 0 .../include}/grub/powerpc/ieee1275/loader.h | 0 .../include}/grub/powerpc/ieee1275/memory.h | 0 .../include}/grub/powerpc/ieee1275/time.h | 0 .../grub/powerpc/ieee1275/util/biosdisk.h | 0 .../include}/grub/powerpc/kernel.h | 0 .../include}/grub/powerpc/setjmp.h | 0 .../include}/grub/powerpc/time.h | 0 .../include}/grub/powerpc/types.h | 0 {include => grub-core/include}/grub/raid.h | 0 {include => grub-core/include}/grub/reader.h | 0 .../include}/grub/script_sh.h | 0 {include => grub-core/include}/grub/scsi.h | 0 {include => grub-core/include}/grub/scsicmd.h | 0 {include => grub-core/include}/grub/sdl.h | 0 {include => grub-core/include}/grub/search.h | 0 {include => grub-core/include}/grub/serial.h | 0 {include => grub-core/include}/grub/setjmp.h | 0 .../include}/grub/sparc64/ieee1275/boot.h | 0 .../include}/grub/sparc64/ieee1275/console.h | 0 .../include}/grub/sparc64/ieee1275/ieee1275.h | 0 .../include}/grub/sparc64/ieee1275/kernel.h | 0 .../include}/grub/sparc64/ieee1275/loader.h | 0 .../include}/grub/sparc64/ieee1275/memory.h | 0 .../include}/grub/sparc64/ieee1275/time.h | 0 .../include}/grub/sparc64/kernel.h | 0 .../include}/grub/sparc64/setjmp.h | 0 .../include}/grub/sparc64/time.h | 0 .../include}/grub/sparc64/types.h | 0 {include => grub-core/include}/grub/symbol.h | 0 {include => grub-core/include}/grub/term.h | 0 .../include}/grub/terminfo.h | 0 {include => grub-core/include}/grub/test.h | 8 +- {include => grub-core/include}/grub/time.h | 0 {include => grub-core/include}/grub/tparm.h | 0 {include => grub-core/include}/grub/trig.h | 0 {include => grub-core/include}/grub/types.h | 0 {include => grub-core/include}/grub/usb.h | 0 {include => grub-core/include}/grub/usbdesc.h | 0 .../include}/grub/usbtrans.h | 0 .../include}/grub/util/deviceiter.h | 0 .../include}/grub/util/lvm.h | 0 .../include}/grub/util/misc.h | 13 - .../include}/grub/util/ofpath.h | 0 .../include}/grub/util/raid.h | 0 .../include}/grub/util/resolve.h | 0 {include => grub-core/include}/grub/video.h | 0 .../include}/grub/video_fb.h | 0 .../include}/grub/x86_64/at_keyboard.h | 0 .../include}/grub/x86_64/efi/kernel.h | 0 .../include}/grub/x86_64/efi/loader.h | 0 .../include}/grub/x86_64/efi/memory.h | 0 .../include}/grub/x86_64/efi/serial.h | 0 .../include}/grub/x86_64/efi/time.h | 0 .../include}/grub/x86_64/io.h | 0 .../include}/grub/x86_64/kernel.h | 0 .../include}/grub/x86_64/linux.h | 0 .../include}/grub/x86_64/macho.h | 0 .../include}/grub/x86_64/multiboot.h | 0 .../include}/grub/x86_64/pci.h | 0 .../include}/grub/x86_64/relocator.h | 0 .../include}/grub/x86_64/setjmp.h | 0 .../include}/grub/x86_64/time.h | 0 .../include}/grub/x86_64/types.h | 0 .../include}/grub/x86_64/xnu.h | 0 {include => grub-core/include}/grub/xnu.h | 0 {include => grub-core/include}/multiboot.h | 0 {include => grub-core/include}/multiboot2.h | 0 {io => grub-core/io}/bufio.c | 0 {io => grub-core/io}/gzio.c | 0 {kern => grub-core/kern}/command.c | 0 {kern => grub-core/kern}/corecmd.c | 0 {kern => grub-core/kern}/device.c | 0 {kern => grub-core/kern}/disk.c | 0 {kern => grub-core/kern}/dl.c | 6 +- {kern => grub-core/kern}/efi/efi.c | 0 {kern => grub-core/kern}/efi/init.c | 0 {kern => grub-core/kern}/efi/mm.c | 0 {kern => grub-core/kern}/elf.c | 0 grub-core/kern/emu/cache.S | 17 + {util => grub-core/kern/emu}/console.c | 2 +- grub-core/kern/emu/dl.c | 19 + grub-core/kern/emu/dummy/dl.c | 51 + grub-core/kern/emu/dummy/symlist.c | 26 + {util => grub-core/kern/emu}/getroot.c | 109 +- {util => grub-core/kern/emu}/hostdisk.c | 4 +- {util => grub-core/kern/emu}/hostfs.c | 0 grub-core/kern/emu/lite.c | 16 + util/grub-emu.c => grub-core/kern/emu/main.c | 67 +- grub-core/kern/emu/misc.c | 199 +++ {util => grub-core/kern/emu}/time.c | 0 {kern => grub-core/kern}/env.c | 0 {kern => grub-core/kern}/err.c | 0 {kern => grub-core/kern}/file.c | 0 {kern => grub-core/kern}/fs.c | 0 {kern => grub-core/kern}/generic/millisleep.c | 0 .../kern}/generic/rtc_get_time_ms.c | 0 {kern => grub-core/kern}/handler.c | 0 {kern => grub-core/kern}/i386/coreboot/init.c | 0 {kern => grub-core/kern}/i386/coreboot/mmap.c | 0 .../kern}/i386/coreboot/startup.S | 0 {kern => grub-core/kern}/i386/dl.c | 0 {kern => grub-core/kern}/i386/efi/init.c | 0 {kern => grub-core/kern}/i386/efi/startup.S | 0 {kern => grub-core/kern}/i386/halt.c | 0 {kern => grub-core/kern}/i386/ieee1275/init.c | 0 .../kern}/i386/ieee1275/startup.S | 0 {kern => grub-core/kern}/i386/loader.S | 0 {kern => grub-core/kern}/i386/misc.S | 0 .../kern}/i386/multiboot_mmap.c | 0 {kern => grub-core/kern}/i386/pc/init.c | 0 .../kern}/i386/pc/lzma_decode.S | 0 {kern => grub-core/kern}/i386/pc/mmap.c | 0 {kern => grub-core/kern}/i386/pc/startup.S | 0 {kern => grub-core/kern}/i386/pit.c | 0 {kern => grub-core/kern}/i386/qemu/mmap.c | 0 {kern => grub-core/kern}/i386/qemu/startup.S | 0 {kern => grub-core/kern}/i386/realmode.S | 0 {kern => grub-core/kern}/i386/tsc.c | 0 {kern => grub-core/kern}/ieee1275/cmain.c | 0 {kern => grub-core/kern}/ieee1275/ieee1275.c | 0 {kern => grub-core/kern}/ieee1275/init.c | 0 {kern => grub-core/kern}/ieee1275/mmap.c | 0 {kern => grub-core/kern}/ieee1275/openfw.c | 0 {kern => grub-core/kern}/list.c | 0 {kern => grub-core/kern}/main.c | 0 {kern => grub-core/kern}/mips/cache.S | 0 {kern => grub-core/kern}/mips/cache_flush.S | 0 {kern => grub-core/kern}/mips/dl.c | 0 {kern => grub-core/kern}/mips/init.c | 0 .../kern}/mips/qemu-mips/init.c | 0 {kern => grub-core/kern}/mips/startup.S | 0 {kern => grub-core/kern}/mips/yeeloong/init.c | 0 {kern => grub-core/kern}/misc.c | 0 {kern => grub-core/kern}/mm.c | 0 {kern => grub-core/kern}/parser.c | 0 {kern => grub-core/kern}/partition.c | 0 {kern => grub-core/kern}/powerpc/cache.S | 0 {kern => grub-core/kern}/powerpc/dl.c | 0 .../kern}/powerpc/ieee1275/startup.S | 0 {kern => grub-core/kern}/rescue_parser.c | 0 {kern => grub-core/kern}/rescue_reader.c | 0 {kern => grub-core/kern}/sparc64/cache.S | 0 {kern => grub-core/kern}/sparc64/dl.c | 0 .../kern}/sparc64/ieee1275/crt0.S | 0 .../kern}/sparc64/ieee1275/ieee1275.c | 0 .../kern}/sparc64/ieee1275/init.c | 0 {kern => grub-core/kern}/term.c | 0 {kern => grub-core/kern}/time.c | 0 {kern => grub-core/kern}/x86_64/dl.c | 0 .../kern}/x86_64/efi/callwrap.S | 0 {kern => grub-core/kern}/x86_64/efi/startup.S | 0 {lib => grub-core/lib}/LzFind.c | 0 {lib => grub-core/lib}/LzmaDec.c | 0 {lib => grub-core/lib}/LzmaEnc.c | 0 {lib => grub-core/lib}/arg.c | 0 {lib => grub-core/lib}/charset.c | 0 {lib => grub-core/lib}/cmos_datetime.c | 0 {lib => grub-core/lib}/crc.c | 0 {lib => grub-core/lib}/crypto.c | 0 {lib => grub-core/lib}/efi/datetime.c | 0 {lib => grub-core/lib}/envblk.c | 0 {lib => grub-core/lib}/hexdump.c | 0 {lib => grub-core/lib}/i386/pc/biosnum.c | 0 {lib => grub-core/lib}/i386/relocator.c | 0 {lib => grub-core/lib}/i386/relocator_asm.S | 0 .../lib}/i386/relocator_backward.S | 0 {lib => grub-core/lib}/i386/setjmp.S | 0 {lib => grub-core/lib}/ieee1275/datetime.c | 0 .../lib}/libgcrypt/cipher/ChangeLog | 0 {lib => grub-core/lib}/libgcrypt/cipher/ac.c | 0 .../lib}/libgcrypt/cipher/arcfour.c | 0 .../lib}/libgcrypt/cipher/bithelp.h | 0 .../lib}/libgcrypt/cipher/blowfish.c | 0 .../lib}/libgcrypt/cipher/camellia-glue.c | 0 .../lib}/libgcrypt/cipher/camellia.c | 0 .../lib}/libgcrypt/cipher/camellia.h | 0 .../lib}/libgcrypt/cipher/cast5.c | 0 .../lib}/libgcrypt/cipher/cipher.c | 0 {lib => grub-core/lib}/libgcrypt/cipher/crc.c | 0 {lib => grub-core/lib}/libgcrypt/cipher/des.c | 0 {lib => grub-core/lib}/libgcrypt/cipher/dsa.c | 0 {lib => grub-core/lib}/libgcrypt/cipher/ecc.c | 0 .../lib}/libgcrypt/cipher/elgamal.c | 0 .../lib}/libgcrypt/cipher/hash-common.c | 0 .../lib}/libgcrypt/cipher/hash-common.h | 0 .../lib}/libgcrypt/cipher/hmac-tests.c | 0 {lib => grub-core/lib}/libgcrypt/cipher/md.c | 0 {lib => grub-core/lib}/libgcrypt/cipher/md4.c | 0 {lib => grub-core/lib}/libgcrypt/cipher/md5.c | 0 .../lib}/libgcrypt/cipher/primegen.c | 0 .../lib}/libgcrypt/cipher/pubkey.c | 0 .../lib}/libgcrypt/cipher/rfc2268.c | 0 .../lib}/libgcrypt/cipher/rijndael-tables.h | 0 .../lib}/libgcrypt/cipher/rijndael.c | 0 {lib => grub-core/lib}/libgcrypt/cipher/rmd.h | 0 .../lib}/libgcrypt/cipher/rmd160.c | 0 {lib => grub-core/lib}/libgcrypt/cipher/rsa.c | 0 .../lib}/libgcrypt/cipher/seed.c | 0 .../lib}/libgcrypt/cipher/serpent.c | 0 .../lib}/libgcrypt/cipher/sha1.c | 0 .../lib}/libgcrypt/cipher/sha256.c | 0 .../lib}/libgcrypt/cipher/sha512.c | 0 .../lib}/libgcrypt/cipher/tiger.c | 0 .../lib}/libgcrypt/cipher/twofish.c | 0 .../lib}/libgcrypt/cipher/whirlpool.c | 0 .../lib}/libgcrypt_wrap/cipher_wrap.h | 0 {lib => grub-core/lib}/mips/relocator.c | 0 {lib => grub-core/lib}/mips/relocator_asm.S | 0 {lib => grub-core/lib}/mips/setjmp.S | 0 {lib => grub-core/lib}/pbkdf2.c | 0 {lib => grub-core/lib}/posix_wrap/assert.h | 0 {lib => grub-core/lib}/posix_wrap/ctype.h | 0 {lib => grub-core/lib}/posix_wrap/errno.h | 0 {lib => grub-core/lib}/posix_wrap/langinfo.h | 0 {lib => grub-core/lib}/posix_wrap/limits.h | 0 .../lib}/posix_wrap/localcharset.h | 0 {lib => grub-core/lib}/posix_wrap/locale.h | 0 {lib => grub-core/lib}/posix_wrap/stdint.h | 0 {lib => grub-core/lib}/posix_wrap/stdio.h | 0 {lib => grub-core/lib}/posix_wrap/stdlib.h | 1 + {lib => grub-core/lib}/posix_wrap/string.h | 2 + {lib => grub-core/lib}/posix_wrap/sys/types.h | 0 {lib => grub-core/lib}/posix_wrap/unistd.h | 0 {lib => grub-core/lib}/posix_wrap/wchar.h | 0 {lib => grub-core/lib}/posix_wrap/wctype.h | 0 {lib => grub-core/lib}/powerpc/setjmp.S | 0 {lib => grub-core/lib}/relocator.c | 0 {lib => grub-core/lib}/sparc64/setjmp.S | 0 {lib => grub-core/lib}/x86_64/setjmp.S | 0 {loader => grub-core/loader}/aout.c | 0 .../loader}/efi/appleloader.c | 0 .../loader}/efi/chainloader.c | 0 {loader => grub-core/loader}/i386/bsd.c | 0 {loader => grub-core/loader}/i386/bsd32.c | 0 {loader => grub-core/loader}/i386/bsd64.c | 0 {loader => grub-core/loader}/i386/bsdXX.c | 0 .../loader}/i386/bsd_helper.S | 0 .../loader}/i386/bsd_pagetable.c | 0 .../loader}/i386/bsd_trampoline.S | 0 {loader => grub-core/loader}/i386/efi/linux.c | 0 {loader => grub-core/loader}/i386/efi/xnu.c | 0 .../loader}/i386/ieee1275/linux.c | 0 {loader => grub-core/loader}/i386/linux.c | 0 .../loader}/i386/linux_trampoline.S | 0 .../loader}/i386/multiboot_mbi.c | 0 .../loader}/i386/pc/chainloader.c | 0 {loader => grub-core/loader}/i386/pc/linux.c | 0 {loader => grub-core/loader}/i386/pc/xnu.c | 0 {loader => grub-core/loader}/i386/xnu.c | 0 {loader => grub-core/loader}/macho.c | 0 {loader => grub-core/loader}/macho32.c | 0 {loader => grub-core/loader}/macho64.c | 0 {loader => grub-core/loader}/machoXX.c | 0 {loader => grub-core/loader}/mips/linux.c | 0 {loader => grub-core/loader}/multiboot.c | 0 .../loader}/multiboot_elfxx.c | 0 {loader => grub-core/loader}/multiboot_mbi2.c | 0 .../loader}/powerpc/ieee1275/linux.c | 0 .../loader}/sparc64/ieee1275/linux.c | 0 {loader => grub-core/loader}/xnu.c | 0 {loader => grub-core/loader}/xnu_resume.c | 0 {mmap => grub-core/mmap}/efi/mmap.c | 0 {mmap => grub-core/mmap}/i386/mmap.c | 0 {mmap => grub-core/mmap}/i386/pc/mmap.c | 0 .../mmap}/i386/pc/mmap_helper.S | 0 {mmap => grub-core/mmap}/i386/uppermem.c | 0 .../mmap}/mips/yeeloong/uppermem.c | 0 {mmap => grub-core/mmap}/mmap.c | 0 grub-core/modules.def | 1592 +++++++++++++++++ {normal => grub-core/normal}/auth.c | 0 {normal => grub-core/normal}/autofs.c | 0 {normal => grub-core/normal}/cmdline.c | 0 {normal => grub-core/normal}/color.c | 0 {normal => grub-core/normal}/completion.c | 0 {normal => grub-core/normal}/context.c | 0 {normal => grub-core/normal}/crypto.c | 0 {normal => grub-core/normal}/datetime.c | 0 {normal => grub-core/normal}/dyncmd.c | 0 {normal => grub-core/normal}/handler.c | 0 {normal => grub-core/normal}/main.c | 0 {normal => grub-core/normal}/menu.c | 0 {normal => grub-core/normal}/menu_entry.c | 0 {normal => grub-core/normal}/menu_text.c | 0 {normal => grub-core/normal}/misc.c | 0 {normal => grub-core/normal}/term.c | 0 {partmap => grub-core/partmap}/acorn.c | 0 {partmap => grub-core/partmap}/amiga.c | 0 {partmap => grub-core/partmap}/apple.c | 0 {partmap => grub-core/partmap}/bsdlabel.c | 0 {partmap => grub-core/partmap}/gpt.c | 0 {partmap => grub-core/partmap}/msdos.c | 0 {partmap => grub-core/partmap}/sun.c | 0 {partmap => grub-core/partmap}/sunpc.c | 0 {parttool => grub-core/parttool}/msdospart.c | 0 grub-core/po/Makefile.am | 0 {po => grub-core/po}/POTFILES | 0 {po => grub-core/po}/POTFILES-shell | 0 {po => grub-core/po}/README | 0 {script => grub-core/script}/execute.c | 0 {script => grub-core/script}/function.c | 0 {script => grub-core/script}/lexer.c | 0 {script => grub-core/script}/main.c | 0 {script => grub-core/script}/parser.y | 0 {script => grub-core/script}/script.c | 0 {script => grub-core/script}/yylex.l | 0 {term => grub-core/term}/at_keyboard.c | 0 {term => grub-core/term}/efi/console.c | 0 {term => grub-core/term}/gfxterm.c | 0 {term => grub-core/term}/i386/pc/console.c | 0 {term => grub-core/term}/i386/pc/vga.c | 0 {term => grub-core/term}/i386/pc/vga_text.c | 0 {term => grub-core/term}/i386/vga_common.c | 0 {term => grub-core/term}/ieee1275/ofconsole.c | 0 {term => grub-core/term}/serial.c | 0 {term => grub-core/term}/terminfo.c | 0 {term => grub-core/term}/tparm.c | 0 {term => grub-core/term}/usb_keyboard.c | 0 .../tests}/example_functional_test.c | 2 +- .../tests}/lib/functional_test.c | 0 {tests => grub-core/tests}/lib/test.c | 0 {video => grub-core/video}/bitmap.c | 0 {video => grub-core/video}/bitmap_scale.c | 0 {video => grub-core/video}/efi_gop.c | 0 {video => grub-core/video}/efi_uga.c | 0 {util => grub-core/video/emu}/sdl.c | 0 {video => grub-core/video}/fb/fbblit.c | 0 {video => grub-core/video}/fb/fbfill.c | 0 {video => grub-core/video}/fb/fbutil.c | 0 {video => grub-core/video}/fb/video_fb.c | 0 {video => grub-core/video}/i386/pc/vbe.c | 0 {video => grub-core/video}/ieee1275.c | 0 {video => grub-core/video}/readers/jpeg.c | 0 {video => grub-core/video}/readers/png.c | 0 {video => grub-core/video}/readers/tga.c | 0 {video => grub-core/video}/sm712.c | 0 {video => grub-core/video}/video.c | 0 modules.def | 497 +++++ po/Makefile.am | 0 tests/example_grub_script_test.in | 2 +- tests/lib/unit_test.c | 3 +- tests/util/grub-shell-tester.in | 2 +- tests/util/grub-shell.in | 10 +- util/elf/grub-mkimage.c | 1 + util/grub-editenv.c | 19 +- util/grub-fstest.c | 24 +- util/grub-mkdevicemap.c | 1 + util/grub-mkfont.c | 2 + util/grub-mkpasswd-pbkdf2.c | 32 +- util/grub-mkrawimage.c | 1 + util/grub-mkrelpath.c | 3 +- util/grub-mkrescue.in | 23 +- util/grub-probe.c | 30 +- util/grub-script-check.c | 74 +- util/i386/efi/grub-mkimage.c | 1 + util/i386/pc/grub-setup.c | 30 +- util/lvm.c | 2 +- util/misc.c | 354 +--- util/raid.c | 1 + util/resolve.c | 3 +- util/sparc64/ieee1275/grub-setup.c | 32 +- 810 files changed, 4980 insertions(+), 2508 deletions(-) create mode 100644 ABOUT-NLS create mode 100644 Makefile.am delete mode 100644 Makefile.in create mode 100644 configure.common create mode 100644 docs/Makefile.am delete mode 100644 geninitheader.sh delete mode 100644 genkernsyms.sh.in delete mode 100644 genmk.rb create mode 100644 gentpl.py create mode 100644 grub-core/Makefile.am create mode 100644 grub-core/Makefile.extra-dist create mode 100644 grub-core/Makefile.kernel create mode 100644 grub-core/Makefile.vars rename {boot => grub-core/boot}/i386/pc/boot.S (100%) rename {boot => grub-core/boot}/i386/pc/cdboot.S (100%) rename {boot => grub-core/boot}/i386/pc/diskboot.S (100%) rename {boot => grub-core/boot}/i386/pc/lnxboot.S (100%) rename {boot => grub-core/boot}/i386/pc/pxeboot.S (100%) rename {boot => grub-core/boot}/i386/qemu/boot.S (100%) rename {boot => grub-core/boot}/sparc64/ieee1275/boot.S (100%) rename {boot => grub-core/boot}/sparc64/ieee1275/diskboot.S (100%) rename {bus => grub-core/bus}/bonito.c (100%) rename {util => grub-core/bus/emu}/pci.c (98%) rename {bus => grub-core/bus}/pci.c (100%) rename {util => grub-core/bus/usb/emu}/usb.c (100%) rename {bus => grub-core/bus}/usb/ohci.c (100%) rename {bus => grub-core/bus}/usb/uhci.c (100%) rename {bus => grub-core/bus}/usb/usb.c (100%) rename {bus => grub-core/bus}/usb/usbhub.c (100%) rename {bus => grub-core/bus}/usb/usbtrans.c (100%) rename {commands => grub-core/commands}/acpi.c (100%) rename {commands => grub-core/commands}/blocklist.c (100%) rename {commands => grub-core/commands}/boot.c (100%) rename {commands => grub-core/commands}/cat.c (100%) rename {commands => grub-core/commands}/cmp.c (100%) rename {commands => grub-core/commands}/configfile.c (100%) rename {commands => grub-core/commands}/crc.c (100%) rename {commands => grub-core/commands}/date.c (100%) rename {commands => grub-core/commands}/echo.c (100%) rename {commands => grub-core/commands}/efi/acpi.c (100%) rename {commands => grub-core/commands}/efi/fixvideo.c (100%) rename {commands => grub-core/commands}/efi/loadbios.c (100%) rename {commands => grub-core/commands}/extcmd.c (100%) rename {commands => grub-core/commands}/gptsync.c (100%) rename {commands => grub-core/commands}/halt.c (100%) rename {commands => grub-core/commands}/handler.c (100%) rename {commands => grub-core/commands}/hashsum.c (100%) rename {commands => grub-core/commands}/hdparm.c (100%) rename {commands => grub-core/commands}/help.c (100%) rename {commands => grub-core/commands}/hexdump.c (100%) rename {commands => grub-core/commands}/i386/cpuid.c (100%) rename {commands => grub-core/commands}/i386/pc/acpi.c (100%) rename {commands => grub-core/commands}/i386/pc/drivemap.c (100%) rename {commands => grub-core/commands}/i386/pc/drivemap_int13h.S (100%) rename {commands => grub-core/commands}/i386/pc/halt.c (100%) rename {commands => grub-core/commands}/i386/pc/play.c (100%) rename {commands => grub-core/commands}/i386/pc/pxecmd.c (100%) rename {commands => grub-core/commands}/i386/pc/vbeinfo.c (100%) rename {commands => grub-core/commands}/i386/pc/vbetest.c (100%) rename {commands => grub-core/commands}/ieee1275/suspend.c (100%) rename {commands => grub-core/commands}/iorw.c (100%) rename {commands => grub-core/commands}/keystatus.c (100%) rename {commands => grub-core/commands}/loadenv.c (100%) rename {commands => grub-core/commands}/ls.c (100%) rename {commands => grub-core/commands}/lsmmap.c (100%) rename {commands => grub-core/commands}/lspci.c (100%) rename {commands => grub-core/commands}/memrw.c (100%) rename {commands => grub-core/commands}/minicmd.c (100%) rename {commands => grub-core/commands}/parttool.c (99%) rename {commands => grub-core/commands}/password.c (100%) rename {commands => grub-core/commands}/password_pbkdf2.c (100%) rename {commands => grub-core/commands}/probe.c (100%) rename {commands => grub-core/commands}/read.c (100%) rename {commands => grub-core/commands}/reboot.c (100%) rename {commands => grub-core/commands}/regexp.c (100%) rename {commands => grub-core/commands}/search.c (100%) rename {commands => grub-core/commands}/search_file.c (100%) rename {commands => grub-core/commands}/search_label.c (100%) rename {commands => grub-core/commands}/search_uuid.c (100%) rename {commands => grub-core/commands}/search_wrap.c (100%) rename {commands => grub-core/commands}/setpci.c (100%) rename {commands => grub-core/commands}/sleep.c (100%) rename {commands => grub-core/commands}/terminal.c (100%) rename {commands => grub-core/commands}/test.c (100%) rename {commands => grub-core/commands}/true.c (100%) rename {commands => grub-core/commands}/usbtest.c (100%) rename {commands => grub-core/commands}/videotest.c (100%) rename {commands => grub-core/commands}/xnu_uuid.c (100%) rename {conf => grub-core/conf}/any-emu.rmk (100%) rename {conf => grub-core/conf}/common.rmk (100%) rename {conf => grub-core/conf}/i386-coreboot.rmk (100%) rename {conf => grub-core/conf}/i386-efi.rmk (100%) rename {conf => grub-core/conf}/i386-ieee1275.rmk (100%) rename {conf => grub-core/conf}/i386-multiboot.rmk (100%) rename {conf => grub-core/conf}/i386-pc-cygwin-img-ld.sc (100%) rename {conf => grub-core/conf}/i386-pc.rmk (100%) rename {conf => grub-core/conf}/i386-qemu.rmk (100%) rename {conf => grub-core/conf}/i386.rmk (100%) rename {conf => grub-core/conf}/mips-qemu-mips.rmk (100%) rename {conf => grub-core/conf}/mips-yeeloong.rmk (100%) rename {conf => grub-core/conf}/mips.rmk (100%) rename {conf => grub-core/conf}/powerpc-ieee1275.rmk (100%) rename {conf => grub-core/conf}/sparc64-ieee1275.rmk (100%) rename {conf => grub-core/conf}/tests.rmk (100%) rename {conf => grub-core/conf}/x86-efi.rmk (100%) rename {conf => grub-core/conf}/x86_64-efi.rmk (100%) create mode 100644 grub-core/configure.ac rename {disk => grub-core/disk}/ata.c (100%) rename {disk => grub-core/disk}/ata_pthru.c (100%) rename {disk => grub-core/disk}/dmraid_nvidia.c (100%) rename {disk => grub-core/disk}/efi/efidisk.c (100%) rename {disk => grub-core/disk}/host.c (100%) rename {disk => grub-core/disk}/i386/pc/biosdisk.c (100%) rename {disk => grub-core/disk}/ieee1275/nand.c (100%) rename {disk => grub-core/disk}/ieee1275/ofdisk.c (100%) rename {disk => grub-core/disk}/loopback.c (100%) rename {disk => grub-core/disk}/lvm.c (100%) rename {disk => grub-core/disk}/mdraid_linux.c (100%) rename {disk => grub-core/disk}/memdisk.c (100%) rename {disk => grub-core/disk}/raid.c (100%) rename {disk => grub-core/disk}/raid5_recover.c (100%) rename {disk => grub-core/disk}/raid6_recover.c (100%) rename {disk => grub-core/disk}/scsi.c (100%) rename {disk => grub-core/disk}/usbms.c (100%) rename {efiemu => grub-core/efiemu}/i386/coredetect.c (100%) rename {efiemu => grub-core/efiemu}/i386/loadcore32.c (100%) rename {efiemu => grub-core/efiemu}/i386/loadcore64.c (100%) rename {efiemu => grub-core/efiemu}/i386/pc/cfgtables.c (100%) rename {efiemu => grub-core/efiemu}/loadcore.c (100%) rename {efiemu => grub-core/efiemu}/loadcore32.c (100%) rename {efiemu => grub-core/efiemu}/loadcore64.c (100%) rename {efiemu => grub-core/efiemu}/loadcore_common.c (100%) rename {efiemu => grub-core/efiemu}/main.c (100%) rename {efiemu => grub-core/efiemu}/mm.c (100%) rename {efiemu => grub-core/efiemu}/pnvram.c (100%) rename {efiemu => grub-core/efiemu}/prepare.c (100%) rename {efiemu => grub-core/efiemu}/prepare32.c (100%) rename {efiemu => grub-core/efiemu}/prepare64.c (100%) rename {efiemu => grub-core/efiemu}/runtime/config.h (100%) rename {efiemu => grub-core/efiemu}/runtime/efiemu.S (100%) rename {efiemu => grub-core/efiemu}/runtime/efiemu.c (100%) rename {efiemu => grub-core/efiemu}/runtime/efiemu.sh (100%) rename {efiemu => grub-core/efiemu}/symbols.c (100%) rename {font => grub-core/font}/font.c (100%) rename {font => grub-core/font}/font_cmd.c (100%) rename {fs => grub-core/fs}/affs.c (100%) rename {fs => grub-core/fs}/afs.c (100%) rename {fs => grub-core/fs}/afs_be.c (100%) rename {fs => grub-core/fs}/befs.c (100%) rename {fs => grub-core/fs}/befs_be.c (100%) rename {fs => grub-core/fs}/cpio.c (100%) rename {fs => grub-core/fs}/ext2.c (100%) rename {fs => grub-core/fs}/fat.c (100%) rename {fs => grub-core/fs}/fshelp.c (100%) rename {fs => grub-core/fs}/hfs.c (100%) rename {fs => grub-core/fs}/hfsplus.c (100%) rename {fs => grub-core/fs}/i386/pc/pxe.c (100%) rename {fs => grub-core/fs}/iso9660.c (100%) rename {fs => grub-core/fs}/jfs.c (100%) rename {fs => grub-core/fs}/minix.c (100%) rename {fs => grub-core/fs}/nilfs2.c (100%) rename {fs => grub-core/fs}/ntfs.c (100%) rename {fs => grub-core/fs}/ntfscomp.c (100%) rename {fs => grub-core/fs}/reiserfs.c (100%) rename {fs => grub-core/fs}/sfs.c (100%) rename {fs => grub-core/fs}/tar.c (100%) rename {fs => grub-core/fs}/udf.c (100%) rename {fs => grub-core/fs}/ufs.c (100%) rename {fs => grub-core/fs}/ufs2.c (100%) rename {fs => grub-core/fs}/xfs.c (100%) rename gencmdlist.sh => grub-core/gencmdlist.sh (100%) rename gendistlist.sh => grub-core/gendistlist.sh (100%) rename genemuinit.sh => grub-core/genemuinit.sh (100%) rename genemuinitheader.sh => grub-core/genemuinitheader.sh (100%) rename genfslist.sh => grub-core/genfslist.sh (100%) rename genhandlerlist.sh => grub-core/genhandlerlist.sh (100%) rename genmoddep.awk => grub-core/genmoddep.awk (93%) rename genmodsrc.sh => grub-core/genmodsrc.sh (100%) rename genpartmaplist.sh => grub-core/genpartmaplist.sh (100%) rename genparttoollist.sh => grub-core/genparttoollist.sh (100%) rename gensymlist.sh.in => grub-core/gensymlist.sh (84%) rename genterminallist.sh => grub-core/genterminallist.sh (100%) rename gentrigtables.c => grub-core/gentrigtables.c (93%) rename genvideolist.sh => grub-core/genvideolist.sh (100%) rename {gettext => grub-core/gettext}/gettext.c (100%) rename {gfxmenu => grub-core/gfxmenu}/gfxmenu.c (100%) rename {gfxmenu => grub-core/gfxmenu}/gui_box.c (100%) rename {gfxmenu => grub-core/gfxmenu}/gui_canvas.c (100%) rename {gfxmenu => grub-core/gfxmenu}/gui_circular_progress.c (100%) rename {gfxmenu => grub-core/gfxmenu}/gui_image.c (100%) rename {gfxmenu => grub-core/gfxmenu}/gui_label.c (100%) rename {gfxmenu => grub-core/gfxmenu}/gui_list.c (100%) rename {gfxmenu => grub-core/gfxmenu}/gui_progress_bar.c (100%) rename {gfxmenu => grub-core/gfxmenu}/gui_string_util.c (100%) rename {gfxmenu => grub-core/gfxmenu}/gui_util.c (100%) rename {gfxmenu => grub-core/gfxmenu}/icon_manager.c (100%) rename {gfxmenu => grub-core/gfxmenu}/model.c (100%) rename {gfxmenu => grub-core/gfxmenu}/named_colors.c (100%) rename {gfxmenu => grub-core/gfxmenu}/theme_loader.c (100%) rename {gfxmenu => grub-core/gfxmenu}/view.c (100%) rename {gfxmenu => grub-core/gfxmenu}/widget-box.c (100%) rename {gnulib => grub-core/gnulib}/alloca.h (100%) rename {gnulib => grub-core/gnulib}/argp-ba.c (100%) rename {gnulib => grub-core/gnulib}/argp-eexst.c (100%) rename {gnulib => grub-core/gnulib}/argp-fmtstream.c (100%) rename {gnulib => grub-core/gnulib}/argp-fmtstream.h (100%) rename {gnulib => grub-core/gnulib}/argp-fs-xinl.c (100%) rename {gnulib => grub-core/gnulib}/argp-help.c (100%) rename {gnulib => grub-core/gnulib}/argp-namefrob.h (100%) rename {gnulib => grub-core/gnulib}/argp-parse.c (100%) rename {gnulib => grub-core/gnulib}/argp-pin.c (100%) rename {gnulib => grub-core/gnulib}/argp-pv.c (100%) rename {gnulib => grub-core/gnulib}/argp-pvh.c (100%) rename {gnulib => grub-core/gnulib}/argp-version-etc.c (100%) rename {gnulib => grub-core/gnulib}/argp-version-etc.h (100%) rename {gnulib => grub-core/gnulib}/argp-xinl.c (100%) rename {gnulib => grub-core/gnulib}/argp.h (100%) rename {gnulib => grub-core/gnulib}/error.c (100%) rename {gnulib => grub-core/gnulib}/error.h (100%) rename {gnulib => grub-core/gnulib}/fnmatch.c (100%) rename {gnulib => grub-core/gnulib}/fnmatch.h (100%) rename {gnulib => grub-core/gnulib}/fnmatch_loop.c (100%) rename {gnulib => grub-core/gnulib}/getdelim.c (100%) rename {gnulib => grub-core/gnulib}/getline.c (100%) rename {gnulib => grub-core/gnulib}/getopt.c (100%) rename {gnulib => grub-core/gnulib}/getopt.h (100%) rename {gnulib => grub-core/gnulib}/getopt1.c (100%) rename {gnulib => grub-core/gnulib}/getopt_int.h (100%) rename {gnulib => grub-core/gnulib}/gettext.h (100%) rename {gnulib => grub-core/gnulib}/progname.c (100%) rename {gnulib => grub-core/gnulib}/progname.h (100%) rename {gnulib => grub-core/gnulib}/regcomp.c (100%) rename {gnulib => grub-core/gnulib}/regex.c (100%) rename {gnulib => grub-core/gnulib}/regex.h (100%) rename {gnulib => grub-core/gnulib}/regex_internal.c (100%) rename {gnulib => grub-core/gnulib}/regex_internal.h (100%) rename {gnulib => grub-core/gnulib}/regexec.c (100%) rename {hello => grub-core/hello}/hello.c (100%) rename {hook => grub-core/hook}/datehook.c (100%) rename {util => grub-core}/import_gcry.py (100%) rename {include => grub-core/include}/grub/acorn_filecore.h (100%) rename {include => grub-core/include}/grub/acpi.h (100%) rename {include => grub-core/include}/grub/aout.h (100%) rename {include => grub-core/include}/grub/at_keyboard.h (100%) rename {include => grub-core/include}/grub/ata.h (100%) rename {include => grub-core/include}/grub/auth.h (100%) rename {include => grub-core/include}/grub/autoefi.h (100%) rename {include => grub-core/include}/grub/bitmap.h (100%) rename {include => grub-core/include}/grub/bitmap_scale.h (100%) rename {include => grub-core/include}/grub/boot.h (100%) rename {include => grub-core/include}/grub/bsdlabel.h (100%) rename {include => grub-core/include}/grub/bufio.h (100%) rename {include => grub-core/include}/grub/cache.h (100%) rename {include => grub-core/include}/grub/charset.h (100%) rename {include => grub-core/include}/grub/cmos.h (100%) rename {include => grub-core/include}/grub/command.h (100%) rename {include => grub-core/include}/grub/crypto.h (100%) rename {include => grub-core/include}/grub/datetime.h (100%) rename {include => grub-core/include}/grub/device.h (100%) rename {include => grub-core/include}/grub/disk.h (100%) rename {include => grub-core/include}/grub/dl.h (90%) rename {include => grub-core/include}/grub/efi/api.h (100%) rename {include => grub-core/include}/grub/efi/console.h (100%) rename {include => grub-core/include}/grub/efi/console_control.h (100%) rename {include => grub-core/include}/grub/efi/disk.h (100%) rename {include => grub-core/include}/grub/efi/efi.h (100%) rename {include => grub-core/include}/grub/efi/graphics_output.h (100%) rename {include => grub-core/include}/grub/efi/memory.h (100%) rename {include => grub-core/include}/grub/efi/pe32.h (100%) rename {include => grub-core/include}/grub/efi/time.h (100%) rename {include => grub-core/include}/grub/efi/uga_draw.h (100%) rename {include => grub-core/include}/grub/efiemu/efiemu.h (100%) rename {include => grub-core/include}/grub/efiemu/runtime.h (100%) rename {include => grub-core/include}/grub/elf.h (100%) rename {include => grub-core/include}/grub/elfload.h (100%) rename {include/grub/util => grub-core/include/grub/emu}/console.h (100%) rename {include/grub/util => grub-core/include/grub/emu}/getroot.h (94%) rename {include/grub/util => grub-core/include/grub/emu}/hostdisk.h (100%) create mode 100644 grub-core/include/grub/emu/misc.h rename {include => grub-core/include}/grub/env.h (100%) rename {include => grub-core/include}/grub/env_private.h (100%) rename {include => grub-core/include}/grub/err.h (100%) rename {include => grub-core/include}/grub/extcmd.h (100%) rename {include => grub-core/include}/grub/fbblit.h (100%) rename {include => grub-core/include}/grub/fbfill.h (100%) rename {include => grub-core/include}/grub/fbutil.h (100%) rename {include => grub-core/include}/grub/file.h (100%) rename {include => grub-core/include}/grub/font.h (100%) rename {include => grub-core/include}/grub/fontformat.h (100%) rename {include => grub-core/include}/grub/fs.h (100%) rename {include => grub-core/include}/grub/fshelp.h (100%) rename {include => grub-core/include}/grub/gfxmenu_model.h (100%) rename {include => grub-core/include}/grub/gfxmenu_view.h (100%) rename {include => grub-core/include}/grub/gfxterm.h (100%) rename {include => grub-core/include}/grub/gfxwidgets.h (100%) rename {include => grub-core/include}/grub/gpt_partition.h (100%) rename {include => grub-core/include}/grub/gui.h (100%) rename {include => grub-core/include}/grub/gui_string_util.h (100%) rename {include => grub-core/include}/grub/gzio.h (100%) rename {include => grub-core/include}/grub/handler.h (100%) rename {include => grub-core/include}/grub/hfs.h (100%) rename {include => grub-core/include}/grub/i18n.h (100%) rename {include => grub-core/include}/grub/i386/at_keyboard.h (100%) rename {include => grub-core/include}/grub/i386/bsd.h (100%) rename {include => grub-core/include}/grub/i386/cmos.h (100%) rename {include => grub-core/include}/grub/i386/coreboot/boot.h (100%) rename {include => grub-core/include}/grub/i386/coreboot/console.h (100%) rename {include => grub-core/include}/grub/i386/coreboot/init.h (100%) rename {include => grub-core/include}/grub/i386/coreboot/kernel.h (100%) rename {include => grub-core/include}/grub/i386/coreboot/loader.h (100%) rename {include => grub-core/include}/grub/i386/coreboot/memory.h (100%) rename {include => grub-core/include}/grub/i386/coreboot/serial.h (100%) rename {include => grub-core/include}/grub/i386/coreboot/time.h (100%) rename {include => grub-core/include}/grub/i386/cpuid.h (100%) rename {include => grub-core/include}/grub/i386/efi/kernel.h (100%) rename {include => grub-core/include}/grub/i386/efi/loader.h (100%) rename {include => grub-core/include}/grub/i386/efi/memory.h (100%) rename {include => grub-core/include}/grub/i386/efi/serial.h (100%) rename {include => grub-core/include}/grub/i386/efi/time.h (100%) rename {include => grub-core/include}/grub/i386/efiemu.h (100%) rename {include => grub-core/include}/grub/i386/freebsd_linker.h (100%) rename {include => grub-core/include}/grub/i386/freebsd_reboot.h (100%) rename {include => grub-core/include}/grub/i386/ieee1275/console.h (100%) rename {include => grub-core/include}/grub/i386/ieee1275/ieee1275.h (100%) rename {include => grub-core/include}/grub/i386/ieee1275/kernel.h (100%) rename {include => grub-core/include}/grub/i386/ieee1275/loader.h (100%) rename {include => grub-core/include}/grub/i386/ieee1275/memory.h (100%) rename {include => grub-core/include}/grub/i386/ieee1275/serial.h (100%) rename {include => grub-core/include}/grub/i386/ieee1275/time.h (100%) rename {include => grub-core/include}/grub/i386/io.h (100%) rename {include => grub-core/include}/grub/i386/kernel.h (100%) rename {include => grub-core/include}/grub/i386/linux.h (100%) rename {include => grub-core/include}/grub/i386/loader.h (100%) rename {include => grub-core/include}/grub/i386/macho.h (100%) rename {include => grub-core/include}/grub/i386/memory.h (100%) rename {include => grub-core/include}/grub/i386/multiboot.h (100%) rename {include => grub-core/include}/grub/i386/multiboot/boot.h (100%) rename {include => grub-core/include}/grub/i386/multiboot/console.h (100%) rename {include => grub-core/include}/grub/i386/multiboot/init.h (100%) rename {include => grub-core/include}/grub/i386/multiboot/kernel.h (100%) rename {include => grub-core/include}/grub/i386/multiboot/loader.h (100%) rename {include => grub-core/include}/grub/i386/multiboot/memory.h (100%) rename {include => grub-core/include}/grub/i386/multiboot/serial.h (100%) rename {include => grub-core/include}/grub/i386/multiboot/time.h (100%) rename {include => grub-core/include}/grub/i386/netbsd_bootinfo.h (100%) rename {include => grub-core/include}/grub/i386/netbsd_reboot.h (100%) rename {include => grub-core/include}/grub/i386/openbsd_bootarg.h (100%) rename {include => grub-core/include}/grub/i386/openbsd_reboot.h (100%) rename {include => grub-core/include}/grub/i386/pc/biosdisk.h (100%) rename {include => grub-core/include}/grub/i386/pc/biosnum.h (100%) rename {include => grub-core/include}/grub/i386/pc/boot.h (100%) rename {include => grub-core/include}/grub/i386/pc/chainloader.h (100%) rename {include => grub-core/include}/grub/i386/pc/console.h (100%) rename {include => grub-core/include}/grub/i386/pc/efiemu.h (100%) rename {include => grub-core/include}/grub/i386/pc/init.h (100%) rename {include => grub-core/include}/grub/i386/pc/kernel.h (100%) rename {include => grub-core/include}/grub/i386/pc/loader.h (100%) rename {include => grub-core/include}/grub/i386/pc/memory.h (100%) rename {include => grub-core/include}/grub/i386/pc/pxe.h (100%) rename {include => grub-core/include}/grub/i386/pc/time.h (100%) rename {include => grub-core/include}/grub/i386/pc/vbe.h (100%) rename {include => grub-core/include}/grub/i386/pc/vga.h (100%) rename {include => grub-core/include}/grub/i386/pci.h (100%) rename {include => grub-core/include}/grub/i386/pit.h (100%) rename {include => grub-core/include}/grub/i386/qemu/boot.h (100%) rename {include => grub-core/include}/grub/i386/qemu/console.h (100%) rename {include => grub-core/include}/grub/i386/qemu/init.h (100%) rename {include => grub-core/include}/grub/i386/qemu/kernel.h (100%) rename {include => grub-core/include}/grub/i386/qemu/loader.h (100%) rename {include => grub-core/include}/grub/i386/qemu/memory.h (100%) rename {include => grub-core/include}/grub/i386/qemu/serial.h (100%) rename {include => grub-core/include}/grub/i386/qemu/time.h (100%) rename {include => grub-core/include}/grub/i386/relocator.h (100%) rename {include => grub-core/include}/grub/i386/setjmp.h (100%) rename {include => grub-core/include}/grub/i386/time.h (100%) rename {include => grub-core/include}/grub/i386/tsc.h (100%) rename {include => grub-core/include}/grub/i386/types.h (100%) rename {include => grub-core/include}/grub/i386/vga_common.h (100%) rename {include => grub-core/include}/grub/i386/xnu.h (100%) rename {include => grub-core/include}/grub/icon_manager.h (100%) rename {include => grub-core/include}/grub/ieee1275/ieee1275.h (100%) rename {include => grub-core/include}/grub/ieee1275/ofdisk.h (100%) rename {include => grub-core/include}/grub/kernel.h (100%) rename {include => grub-core/include}/grub/lib/LzFind.h (100%) rename {include => grub-core/include}/grub/lib/LzHash.h (100%) rename {include => grub-core/include}/grub/lib/LzmaDec.h (100%) rename {include => grub-core/include}/grub/lib/LzmaEnc.h (100%) rename {include => grub-core/include}/grub/lib/LzmaTypes.h (100%) rename {include => grub-core/include}/grub/lib/arg.h (100%) rename {include => grub-core/include}/grub/lib/crc.h (100%) rename {include => grub-core/include}/grub/lib/envblk.h (100%) rename {include => grub-core/include}/grub/lib/hexdump.h (100%) rename {include => grub-core/include}/grub/libgcc.h (100%) rename {include => grub-core/include}/grub/libpciaccess.h (100%) rename {include => grub-core/include}/grub/libusb.h (100%) rename {include => grub-core/include}/grub/list.h (100%) rename {include => grub-core/include}/grub/loader.h (100%) rename {include => grub-core/include}/grub/lvm.h (100%) rename {include => grub-core/include}/grub/macho.h (100%) rename {include => grub-core/include}/grub/machoload.h (100%) rename {include => grub-core/include}/grub/memory.h (100%) rename {include => grub-core/include}/grub/menu.h (100%) rename {include => grub-core/include}/grub/menu_viewer.h (100%) rename {include => grub-core/include}/grub/mips/at_keyboard.h (100%) rename {include => grub-core/include}/grub/mips/cache.h (100%) rename {include => grub-core/include}/grub/mips/cmos.h (100%) rename {include => grub-core/include}/grub/mips/io.h (100%) rename {include => grub-core/include}/grub/mips/kernel.h (100%) rename {include => grub-core/include}/grub/mips/multiboot.h (100%) rename {include => grub-core/include}/grub/mips/pci.h (100%) rename {include => grub-core/include}/grub/mips/qemu-mips/boot.h (100%) rename {include => grub-core/include}/grub/mips/qemu-mips/kernel.h (100%) rename {include => grub-core/include}/grub/mips/qemu-mips/loader.h (100%) rename {include => grub-core/include}/grub/mips/qemu-mips/memory.h (100%) rename {include => grub-core/include}/grub/mips/qemu-mips/serial.h (100%) rename {include => grub-core/include}/grub/mips/qemu-mips/time.h (100%) rename {include => grub-core/include}/grub/mips/relocator.h (100%) rename {include => grub-core/include}/grub/mips/setjmp.h (100%) rename {include => grub-core/include}/grub/mips/time.h (100%) rename {include => grub-core/include}/grub/mips/types.h (100%) rename {include => grub-core/include}/grub/mips/yeeloong/at_keyboard.h (100%) rename {include => grub-core/include}/grub/mips/yeeloong/boot.h (100%) rename {include => grub-core/include}/grub/mips/yeeloong/cmos.h (100%) rename {include => grub-core/include}/grub/mips/yeeloong/kernel.h (100%) rename {include => grub-core/include}/grub/mips/yeeloong/loader.h (100%) rename {include => grub-core/include}/grub/mips/yeeloong/memory.h (100%) rename {include => grub-core/include}/grub/mips/yeeloong/pci.h (100%) rename {include => grub-core/include}/grub/mips/yeeloong/serial.h (100%) rename {include => grub-core/include}/grub/mips/yeeloong/time.h (100%) rename {include => grub-core/include}/grub/misc.h (100%) rename {include => grub-core/include}/grub/mm.h (100%) rename {include => grub-core/include}/grub/msdos_partition.h (100%) rename {include => grub-core/include}/grub/multiboot.h (100%) rename {include => grub-core/include}/grub/multiboot_loader.h (100%) rename {include => grub-core/include}/grub/net.h (100%) rename {include => grub-core/include}/grub/normal.h (100%) rename {include => grub-core/include}/grub/ntfs.h (100%) rename {include => grub-core/include}/grub/parser.h (100%) rename {include => grub-core/include}/grub/partition.h (100%) rename {include => grub-core/include}/grub/parttool.h (100%) rename {include => grub-core/include}/grub/pci.h (100%) rename {include => grub-core/include}/grub/pciutils.h (100%) rename {include => grub-core/include}/grub/powerpc/ieee1275/biosdisk.h (100%) rename {include => grub-core/include}/grub/powerpc/ieee1275/console.h (100%) rename {include => grub-core/include}/grub/powerpc/ieee1275/ieee1275.h (100%) rename {include => grub-core/include}/grub/powerpc/ieee1275/kernel.h (100%) rename {include => grub-core/include}/grub/powerpc/ieee1275/loader.h (100%) rename {include => grub-core/include}/grub/powerpc/ieee1275/memory.h (100%) rename {include => grub-core/include}/grub/powerpc/ieee1275/time.h (100%) rename {include => grub-core/include}/grub/powerpc/ieee1275/util/biosdisk.h (100%) rename {include => grub-core/include}/grub/powerpc/kernel.h (100%) rename {include => grub-core/include}/grub/powerpc/setjmp.h (100%) rename {include => grub-core/include}/grub/powerpc/time.h (100%) rename {include => grub-core/include}/grub/powerpc/types.h (100%) rename {include => grub-core/include}/grub/raid.h (100%) rename {include => grub-core/include}/grub/reader.h (100%) rename {include => grub-core/include}/grub/script_sh.h (100%) rename {include => grub-core/include}/grub/scsi.h (100%) rename {include => grub-core/include}/grub/scsicmd.h (100%) rename {include => grub-core/include}/grub/sdl.h (100%) rename {include => grub-core/include}/grub/search.h (100%) rename {include => grub-core/include}/grub/serial.h (100%) rename {include => grub-core/include}/grub/setjmp.h (100%) rename {include => grub-core/include}/grub/sparc64/ieee1275/boot.h (100%) rename {include => grub-core/include}/grub/sparc64/ieee1275/console.h (100%) rename {include => grub-core/include}/grub/sparc64/ieee1275/ieee1275.h (100%) rename {include => grub-core/include}/grub/sparc64/ieee1275/kernel.h (100%) rename {include => grub-core/include}/grub/sparc64/ieee1275/loader.h (100%) rename {include => grub-core/include}/grub/sparc64/ieee1275/memory.h (100%) rename {include => grub-core/include}/grub/sparc64/ieee1275/time.h (100%) rename {include => grub-core/include}/grub/sparc64/kernel.h (100%) rename {include => grub-core/include}/grub/sparc64/setjmp.h (100%) rename {include => grub-core/include}/grub/sparc64/time.h (100%) rename {include => grub-core/include}/grub/sparc64/types.h (100%) rename {include => grub-core/include}/grub/symbol.h (100%) rename {include => grub-core/include}/grub/term.h (100%) rename {include => grub-core/include}/grub/terminfo.h (100%) rename {include => grub-core/include}/grub/test.h (93%) rename {include => grub-core/include}/grub/time.h (100%) rename {include => grub-core/include}/grub/tparm.h (100%) rename {include => grub-core/include}/grub/trig.h (100%) rename {include => grub-core/include}/grub/types.h (100%) rename {include => grub-core/include}/grub/usb.h (100%) rename {include => grub-core/include}/grub/usbdesc.h (100%) rename {include => grub-core/include}/grub/usbtrans.h (100%) rename {include => grub-core/include}/grub/util/deviceiter.h (100%) rename {include => grub-core/include}/grub/util/lvm.h (100%) rename {include => grub-core/include}/grub/util/misc.h (85%) rename {include => grub-core/include}/grub/util/ofpath.h (100%) rename {include => grub-core/include}/grub/util/raid.h (100%) rename {include => grub-core/include}/grub/util/resolve.h (100%) rename {include => grub-core/include}/grub/video.h (100%) rename {include => grub-core/include}/grub/video_fb.h (100%) rename {include => grub-core/include}/grub/x86_64/at_keyboard.h (100%) rename {include => grub-core/include}/grub/x86_64/efi/kernel.h (100%) rename {include => grub-core/include}/grub/x86_64/efi/loader.h (100%) rename {include => grub-core/include}/grub/x86_64/efi/memory.h (100%) rename {include => grub-core/include}/grub/x86_64/efi/serial.h (100%) rename {include => grub-core/include}/grub/x86_64/efi/time.h (100%) rename {include => grub-core/include}/grub/x86_64/io.h (100%) rename {include => grub-core/include}/grub/x86_64/kernel.h (100%) rename {include => grub-core/include}/grub/x86_64/linux.h (100%) rename {include => grub-core/include}/grub/x86_64/macho.h (100%) rename {include => grub-core/include}/grub/x86_64/multiboot.h (100%) rename {include => grub-core/include}/grub/x86_64/pci.h (100%) rename {include => grub-core/include}/grub/x86_64/relocator.h (100%) rename {include => grub-core/include}/grub/x86_64/setjmp.h (100%) rename {include => grub-core/include}/grub/x86_64/time.h (100%) rename {include => grub-core/include}/grub/x86_64/types.h (100%) rename {include => grub-core/include}/grub/x86_64/xnu.h (100%) rename {include => grub-core/include}/grub/xnu.h (100%) rename {include => grub-core/include}/multiboot.h (100%) rename {include => grub-core/include}/multiboot2.h (100%) rename {io => grub-core/io}/bufio.c (100%) rename {io => grub-core/io}/gzio.c (100%) rename {kern => grub-core/kern}/command.c (100%) rename {kern => grub-core/kern}/corecmd.c (100%) rename {kern => grub-core/kern}/device.c (100%) rename {kern => grub-core/kern}/disk.c (100%) rename {kern => grub-core/kern}/dl.c (99%) rename {kern => grub-core/kern}/efi/efi.c (100%) rename {kern => grub-core/kern}/efi/init.c (100%) rename {kern => grub-core/kern}/efi/mm.c (100%) rename {kern => grub-core/kern}/elf.c (100%) create mode 100644 grub-core/kern/emu/cache.S rename {util => grub-core/kern/emu}/console.c (99%) create mode 100644 grub-core/kern/emu/dl.c create mode 100644 grub-core/kern/emu/dummy/dl.c create mode 100644 grub-core/kern/emu/dummy/symlist.c rename {util => grub-core/kern/emu}/getroot.c (82%) rename {util => grub-core/kern/emu}/hostdisk.c (99%) rename {util => grub-core/kern/emu}/hostfs.c (100%) create mode 100644 grub-core/kern/emu/lite.c rename util/grub-emu.c => grub-core/kern/emu/main.c (90%) create mode 100644 grub-core/kern/emu/misc.c rename {util => grub-core/kern/emu}/time.c (100%) rename {kern => grub-core/kern}/env.c (100%) rename {kern => grub-core/kern}/err.c (100%) rename {kern => grub-core/kern}/file.c (100%) rename {kern => grub-core/kern}/fs.c (100%) rename {kern => grub-core/kern}/generic/millisleep.c (100%) rename {kern => grub-core/kern}/generic/rtc_get_time_ms.c (100%) rename {kern => grub-core/kern}/handler.c (100%) rename {kern => grub-core/kern}/i386/coreboot/init.c (100%) rename {kern => grub-core/kern}/i386/coreboot/mmap.c (100%) rename {kern => grub-core/kern}/i386/coreboot/startup.S (100%) rename {kern => grub-core/kern}/i386/dl.c (100%) rename {kern => grub-core/kern}/i386/efi/init.c (100%) rename {kern => grub-core/kern}/i386/efi/startup.S (100%) rename {kern => grub-core/kern}/i386/halt.c (100%) rename {kern => grub-core/kern}/i386/ieee1275/init.c (100%) rename {kern => grub-core/kern}/i386/ieee1275/startup.S (100%) rename {kern => grub-core/kern}/i386/loader.S (100%) rename {kern => grub-core/kern}/i386/misc.S (100%) rename {kern => grub-core/kern}/i386/multiboot_mmap.c (100%) rename {kern => grub-core/kern}/i386/pc/init.c (100%) rename {kern => grub-core/kern}/i386/pc/lzma_decode.S (100%) rename {kern => grub-core/kern}/i386/pc/mmap.c (100%) rename {kern => grub-core/kern}/i386/pc/startup.S (100%) rename {kern => grub-core/kern}/i386/pit.c (100%) rename {kern => grub-core/kern}/i386/qemu/mmap.c (100%) rename {kern => grub-core/kern}/i386/qemu/startup.S (100%) rename {kern => grub-core/kern}/i386/realmode.S (100%) rename {kern => grub-core/kern}/i386/tsc.c (100%) rename {kern => grub-core/kern}/ieee1275/cmain.c (100%) rename {kern => grub-core/kern}/ieee1275/ieee1275.c (100%) rename {kern => grub-core/kern}/ieee1275/init.c (100%) rename {kern => grub-core/kern}/ieee1275/mmap.c (100%) rename {kern => grub-core/kern}/ieee1275/openfw.c (100%) rename {kern => grub-core/kern}/list.c (100%) rename {kern => grub-core/kern}/main.c (100%) rename {kern => grub-core/kern}/mips/cache.S (100%) rename {kern => grub-core/kern}/mips/cache_flush.S (100%) rename {kern => grub-core/kern}/mips/dl.c (100%) rename {kern => grub-core/kern}/mips/init.c (100%) rename {kern => grub-core/kern}/mips/qemu-mips/init.c (100%) rename {kern => grub-core/kern}/mips/startup.S (100%) rename {kern => grub-core/kern}/mips/yeeloong/init.c (100%) rename {kern => grub-core/kern}/misc.c (100%) rename {kern => grub-core/kern}/mm.c (100%) rename {kern => grub-core/kern}/parser.c (100%) rename {kern => grub-core/kern}/partition.c (100%) rename {kern => grub-core/kern}/powerpc/cache.S (100%) rename {kern => grub-core/kern}/powerpc/dl.c (100%) rename {kern => grub-core/kern}/powerpc/ieee1275/startup.S (100%) rename {kern => grub-core/kern}/rescue_parser.c (100%) rename {kern => grub-core/kern}/rescue_reader.c (100%) rename {kern => grub-core/kern}/sparc64/cache.S (100%) rename {kern => grub-core/kern}/sparc64/dl.c (100%) rename {kern => grub-core/kern}/sparc64/ieee1275/crt0.S (100%) rename {kern => grub-core/kern}/sparc64/ieee1275/ieee1275.c (100%) rename {kern => grub-core/kern}/sparc64/ieee1275/init.c (100%) rename {kern => grub-core/kern}/term.c (100%) rename {kern => grub-core/kern}/time.c (100%) rename {kern => grub-core/kern}/x86_64/dl.c (100%) rename {kern => grub-core/kern}/x86_64/efi/callwrap.S (100%) rename {kern => grub-core/kern}/x86_64/efi/startup.S (100%) rename {lib => grub-core/lib}/LzFind.c (100%) rename {lib => grub-core/lib}/LzmaDec.c (100%) rename {lib => grub-core/lib}/LzmaEnc.c (100%) rename {lib => grub-core/lib}/arg.c (100%) rename {lib => grub-core/lib}/charset.c (100%) rename {lib => grub-core/lib}/cmos_datetime.c (100%) rename {lib => grub-core/lib}/crc.c (100%) rename {lib => grub-core/lib}/crypto.c (100%) rename {lib => grub-core/lib}/efi/datetime.c (100%) rename {lib => grub-core/lib}/envblk.c (100%) rename {lib => grub-core/lib}/hexdump.c (100%) rename {lib => grub-core/lib}/i386/pc/biosnum.c (100%) rename {lib => grub-core/lib}/i386/relocator.c (100%) rename {lib => grub-core/lib}/i386/relocator_asm.S (100%) rename {lib => grub-core/lib}/i386/relocator_backward.S (100%) rename {lib => grub-core/lib}/i386/setjmp.S (100%) rename {lib => grub-core/lib}/ieee1275/datetime.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/ChangeLog (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/ac.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/arcfour.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/bithelp.h (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/blowfish.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/camellia-glue.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/camellia.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/camellia.h (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/cast5.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/cipher.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/crc.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/des.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/dsa.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/ecc.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/elgamal.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/hash-common.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/hash-common.h (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/hmac-tests.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/md.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/md4.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/md5.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/primegen.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/pubkey.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/rfc2268.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/rijndael-tables.h (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/rijndael.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/rmd.h (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/rmd160.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/rsa.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/seed.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/serpent.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/sha1.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/sha256.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/sha512.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/tiger.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/twofish.c (100%) rename {lib => grub-core/lib}/libgcrypt/cipher/whirlpool.c (100%) rename {lib => grub-core/lib}/libgcrypt_wrap/cipher_wrap.h (100%) rename {lib => grub-core/lib}/mips/relocator.c (100%) rename {lib => grub-core/lib}/mips/relocator_asm.S (100%) rename {lib => grub-core/lib}/mips/setjmp.S (100%) rename {lib => grub-core/lib}/pbkdf2.c (100%) rename {lib => grub-core/lib}/posix_wrap/assert.h (100%) rename {lib => grub-core/lib}/posix_wrap/ctype.h (100%) rename {lib => grub-core/lib}/posix_wrap/errno.h (100%) rename {lib => grub-core/lib}/posix_wrap/langinfo.h (100%) rename {lib => grub-core/lib}/posix_wrap/limits.h (100%) rename {lib => grub-core/lib}/posix_wrap/localcharset.h (100%) rename {lib => grub-core/lib}/posix_wrap/locale.h (100%) rename {lib => grub-core/lib}/posix_wrap/stdint.h (100%) rename {lib => grub-core/lib}/posix_wrap/stdio.h (100%) rename {lib => grub-core/lib}/posix_wrap/stdlib.h (98%) rename {lib => grub-core/lib}/posix_wrap/string.h (97%) rename {lib => grub-core/lib}/posix_wrap/sys/types.h (100%) rename {lib => grub-core/lib}/posix_wrap/unistd.h (100%) rename {lib => grub-core/lib}/posix_wrap/wchar.h (100%) rename {lib => grub-core/lib}/posix_wrap/wctype.h (100%) rename {lib => grub-core/lib}/powerpc/setjmp.S (100%) rename {lib => grub-core/lib}/relocator.c (100%) rename {lib => grub-core/lib}/sparc64/setjmp.S (100%) rename {lib => grub-core/lib}/x86_64/setjmp.S (100%) rename {loader => grub-core/loader}/aout.c (100%) rename {loader => grub-core/loader}/efi/appleloader.c (100%) rename {loader => grub-core/loader}/efi/chainloader.c (100%) rename {loader => grub-core/loader}/i386/bsd.c (100%) rename {loader => grub-core/loader}/i386/bsd32.c (100%) rename {loader => grub-core/loader}/i386/bsd64.c (100%) rename {loader => grub-core/loader}/i386/bsdXX.c (100%) rename {loader => grub-core/loader}/i386/bsd_helper.S (100%) rename {loader => grub-core/loader}/i386/bsd_pagetable.c (100%) rename {loader => grub-core/loader}/i386/bsd_trampoline.S (100%) rename {loader => grub-core/loader}/i386/efi/linux.c (100%) rename {loader => grub-core/loader}/i386/efi/xnu.c (100%) rename {loader => grub-core/loader}/i386/ieee1275/linux.c (100%) rename {loader => grub-core/loader}/i386/linux.c (100%) rename {loader => grub-core/loader}/i386/linux_trampoline.S (100%) rename {loader => grub-core/loader}/i386/multiboot_mbi.c (100%) rename {loader => grub-core/loader}/i386/pc/chainloader.c (100%) rename {loader => grub-core/loader}/i386/pc/linux.c (100%) rename {loader => grub-core/loader}/i386/pc/xnu.c (100%) rename {loader => grub-core/loader}/i386/xnu.c (100%) rename {loader => grub-core/loader}/macho.c (100%) rename {loader => grub-core/loader}/macho32.c (100%) rename {loader => grub-core/loader}/macho64.c (100%) rename {loader => grub-core/loader}/machoXX.c (100%) rename {loader => grub-core/loader}/mips/linux.c (100%) rename {loader => grub-core/loader}/multiboot.c (100%) rename {loader => grub-core/loader}/multiboot_elfxx.c (100%) rename {loader => grub-core/loader}/multiboot_mbi2.c (100%) rename {loader => grub-core/loader}/powerpc/ieee1275/linux.c (100%) rename {loader => grub-core/loader}/sparc64/ieee1275/linux.c (100%) rename {loader => grub-core/loader}/xnu.c (100%) rename {loader => grub-core/loader}/xnu_resume.c (100%) rename {mmap => grub-core/mmap}/efi/mmap.c (100%) rename {mmap => grub-core/mmap}/i386/mmap.c (100%) rename {mmap => grub-core/mmap}/i386/pc/mmap.c (100%) rename {mmap => grub-core/mmap}/i386/pc/mmap_helper.S (100%) rename {mmap => grub-core/mmap}/i386/uppermem.c (100%) rename {mmap => grub-core/mmap}/mips/yeeloong/uppermem.c (100%) rename {mmap => grub-core/mmap}/mmap.c (100%) create mode 100644 grub-core/modules.def rename {normal => grub-core/normal}/auth.c (100%) rename {normal => grub-core/normal}/autofs.c (100%) rename {normal => grub-core/normal}/cmdline.c (100%) rename {normal => grub-core/normal}/color.c (100%) rename {normal => grub-core/normal}/completion.c (100%) rename {normal => grub-core/normal}/context.c (100%) rename {normal => grub-core/normal}/crypto.c (100%) rename {normal => grub-core/normal}/datetime.c (100%) rename {normal => grub-core/normal}/dyncmd.c (100%) rename {normal => grub-core/normal}/handler.c (100%) rename {normal => grub-core/normal}/main.c (100%) rename {normal => grub-core/normal}/menu.c (100%) rename {normal => grub-core/normal}/menu_entry.c (100%) rename {normal => grub-core/normal}/menu_text.c (100%) rename {normal => grub-core/normal}/misc.c (100%) rename {normal => grub-core/normal}/term.c (100%) rename {partmap => grub-core/partmap}/acorn.c (100%) rename {partmap => grub-core/partmap}/amiga.c (100%) rename {partmap => grub-core/partmap}/apple.c (100%) rename {partmap => grub-core/partmap}/bsdlabel.c (100%) rename {partmap => grub-core/partmap}/gpt.c (100%) rename {partmap => grub-core/partmap}/msdos.c (100%) rename {partmap => grub-core/partmap}/sun.c (100%) rename {partmap => grub-core/partmap}/sunpc.c (100%) rename {parttool => grub-core/parttool}/msdospart.c (100%) create mode 100644 grub-core/po/Makefile.am rename {po => grub-core/po}/POTFILES (100%) rename {po => grub-core/po}/POTFILES-shell (100%) rename {po => grub-core/po}/README (100%) rename {script => grub-core/script}/execute.c (100%) rename {script => grub-core/script}/function.c (100%) rename {script => grub-core/script}/lexer.c (100%) rename {script => grub-core/script}/main.c (100%) rename {script => grub-core/script}/parser.y (100%) rename {script => grub-core/script}/script.c (100%) rename {script => grub-core/script}/yylex.l (100%) rename {term => grub-core/term}/at_keyboard.c (100%) rename {term => grub-core/term}/efi/console.c (100%) rename {term => grub-core/term}/gfxterm.c (100%) rename {term => grub-core/term}/i386/pc/console.c (100%) rename {term => grub-core/term}/i386/pc/vga.c (100%) rename {term => grub-core/term}/i386/pc/vga_text.c (100%) rename {term => grub-core/term}/i386/vga_common.c (100%) rename {term => grub-core/term}/ieee1275/ofconsole.c (100%) rename {term => grub-core/term}/serial.c (100%) rename {term => grub-core/term}/terminfo.c (100%) rename {term => grub-core/term}/tparm.c (100%) rename {term => grub-core/term}/usb_keyboard.c (100%) rename {tests => grub-core/tests}/example_functional_test.c (95%) rename {tests => grub-core/tests}/lib/functional_test.c (100%) rename {tests => grub-core/tests}/lib/test.c (100%) rename {video => grub-core/video}/bitmap.c (100%) rename {video => grub-core/video}/bitmap_scale.c (100%) rename {video => grub-core/video}/efi_gop.c (100%) rename {video => grub-core/video}/efi_uga.c (100%) rename {util => grub-core/video/emu}/sdl.c (100%) rename {video => grub-core/video}/fb/fbblit.c (100%) rename {video => grub-core/video}/fb/fbfill.c (100%) rename {video => grub-core/video}/fb/fbutil.c (100%) rename {video => grub-core/video}/fb/video_fb.c (100%) rename {video => grub-core/video}/i386/pc/vbe.c (100%) rename {video => grub-core/video}/ieee1275.c (100%) rename {video => grub-core/video}/readers/jpeg.c (100%) rename {video => grub-core/video}/readers/png.c (100%) rename {video => grub-core/video}/readers/tga.c (100%) rename {video => grub-core/video}/sm712.c (100%) rename {video => grub-core/video}/video.c (100%) create mode 100644 modules.def create mode 100644 po/Makefile.am diff --git a/.bzrignore b/.bzrignore index 46e8637b6..f91e72efa 100644 --- a/.bzrignore +++ b/.bzrignore @@ -71,3 +71,9 @@ stamp-h.in symlist.c trigtables.c update-grub_lib +Makefile.in +modules.am +GPATH +GRTAGS +GSYMS +GTAGS \ No newline at end of file diff --git a/ABOUT-NLS b/ABOUT-NLS new file mode 100644 index 000000000..866b904ec --- /dev/null +++ b/ABOUT-NLS @@ -0,0 +1,223 @@ +1 Notes on the Free Translation Project +*************************************** + +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that free software will gradually become able to speak many +languages. A few packages already provide translations for their +messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work on translations can contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +1.1 Quick configuration advice +============================== + +If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +1.2 INSTALL Matters +=================== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the included GNU +`gettext' library will be used. This library is wholly contained +within this package, usually in the `intl/' subdirectory, so prior +installation of the GNU `gettext' package is _not_ required. +Installers may use special options at configuration time for changing +the default behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will, respectively, bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might not be desirable. You should use +the more recent version of the GNU `gettext' library. I.e. if the file +`intl/VERSION' shows that the library which comes with this package is +more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages usually have many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +1.3 Using This Package +====================== + +As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your language by running the +command `locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +1.4 Translating Teams +===================== + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skills are praised more than +programming skills, here. + +1.5 Available Packages +====================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of October +2006. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + +# Matrix here is removed! + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If October 2006 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +1.6 Using `gettext' in new packages +=================================== + +If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 000000000..d962963c1 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,87 @@ +AUTOMAKE_OPTIONS = subdir-objects +DEPDIR = .deps-util + +EXTRA_DIST = autogen.sh gentpl.py Makefile.tpl modules.def \ + \ + geninit.sh \ + \ + gnulib/progname.h gnulib/fnmatch_loop.c gnulib/alloca.h \ + gnulib/error.h gnulib/fnmatch.h gnulib/getopt.h \ + gnulib/getopt_int.h gnulib/gettext.h gnulib/progname.h \ + \ + util/mkisofs/mkisofs.h util/mkisofs/iso9660.h \ + util/mkisofs/include/prototyp.h util/mkisofs/defaults.h \ + util/mkisofs/match.h util/mkisofs/exclude.h \ + util/mkisofs/msdos_partition.h util/mkisofs/include/fctldefs.h \ + util/mkisofs/include/mconfig.h util/mkisofs/include/statdefs.h + +SUBDIRS = . grub-core po docs + +include $(top_srcdir)/grub-core/Makefile.vars + +CFLAGS_PROGRAM = $(HOST_CFLAGS) $(CFLAGS_GNULIB) +LDFLAGS_PROGRAM = $(HOST_LDFLAGS) $(LDFLAGS_GNULIB) $(LIBINTL) +CPPFLAGS_PROGRAM = $(HOST_CPPFLAGS) $(CPPFLAGS_GNULIB) +CCASFLAGS_PROGRAM = $(HOST_CCASFLAGS) $(CCASFLAGS_GNULIB) + +CFLAGS_LIBRARY = $(CFLAGS_PROGRAM) +CPPFLAGS_LIBRARY = $(CPPFLAGS_PROGRAM) +CCASFLAGS_LIBRARY = $(CCASFLAGS_PROGRAM) + +AM_CFLAGS = +AM_LDFLAGS = +AM_CPPFLAGS = $(CPPFLAGS_GRUB) -DGRUB_FILE=\"$(subst $(top_srcdir)/,,$<)\" +AM_CCASFLAGS = -DASM_FILE=1 + +# XXX Use Automake's LEX & YACC support +grub_script.tab.c grub_script.tab.h: $(top_srcdir)/grub-core/script/parser.y + $(YACC) -d -p grub_script_yy -b grub_script $(top_srcdir)/grub-core/script/parser.y +CLEANFILES += grub_script.tab.c grub_script.tab.h + +# For the lexer. +grub_script.yy.c grub_script.yy.h: $(top_srcdir)/grub-core/script/yylex.l + $(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $(top_srcdir)/grub-core/script/yylex.l +CLEANFILES += grub_script.yy.c grub_script.yy.h + +# For libutil.a +libutil_a_init.lst: grub_script.tab.h grub_script.yy.h $(libutil_a_SOURCES) + rm -f $@ + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutil_a_CPPFLAGS) $(CPPFLAGS) \ + -D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ \ + | grep '@MARKER@' | sed 's/@MARKER@\(.*\)@/\1/g' | sort -u > $@ || (rm -f $@; exit 1) +CLEANFILES += libutil_a_init.lst + +libutil_a_init.c: libutil_a_init.lst $(top_srcdir)/geninit.sh + rm -f $@; sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1) +CLEANFILES += libutil_a_init.c + +if COND_GRUB_MKFONT +if COND_HAVE_FONT_SOURCE +pkgdata_DATA = unicode.pf2 ascii.pf2 ascii.h +endif +endif + +unicode.pf2: $(FONT_SOURCE) grub-mkfont + $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) +CLEANFILES += unicode.pf2 + +# Arrows and lines are needed to draw the menu, so always include them +UNICODE_ARROWS=0x2190-0x2193 +UNICODE_LINES=0x2501-0x251B + +ascii.pf2: $(FONT_SOURCE) grub-mkfont + $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES) +CLEANFILES += ascii.pf2 + +ascii.bitmaps: $(FONT_SOURCE) grub-mkfont + $(builddir)/grub-mkfont --ascii-bitmaps -o $@ $(FONT_SOURCE) +CLEANFILES += ascii.bitmaps + +ascii.h: ascii.bitmaps grub-bin2h + $(builddir)/grub-bin2h ascii_bitmaps < $< > $@ + cp $@ $(top_builddir)/grub-core/include +CLEANFILES += ascii.h $(top_builddir)/grub-core/include/ascii.h + +platform_HEADERS = config.h + +include $(srcdir)/modules.am diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 822a08797..000000000 --- a/Makefile.in +++ /dev/null @@ -1,564 +0,0 @@ -# -*- makefile -*- -# -# Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc. -# -# This Makefile.in 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. - -### The configure script will replace these variables. - -SHELL = /bin/sh - -@SET_MAKE@ - -transform = @program_transform_name@ - -srcdir = @srcdir@ -builddir = @builddir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datarootdir = @datarootdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -localedir = @localedir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -pkgdatadir = $(datadir)/`echo @PACKAGE_TARNAME@ | sed '$(transform)'` -pkglibdir = $(libdir)/`echo @PACKAGE_TARNAME@/$(target_cpu)-$(platform) | sed '$(transform)'` - -# Internationalization library. -LIBINTL = @LIBINTL@ -TARGET_NO_MODULES = @TARGET_NO_MODULES@ - -# Util library. -LIBUTIL = @LIBUTIL@ - -XGETTEXT = @XGETTEXT@ -MSGMERGE = @MSGMERGE@ -MSGFMT = @MSGFMT@ - -LINGUAS = $(shell for i in $(srcdir)/po/*.po ; do \ - if test -e $$i ; then echo $$i ; fi ; \ - done | sed -e "s,.*/po/\(.*\)\.po$$,\1,") - -PACKAGE = @PACKAGE@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - -host_os = @host_os@ -host_kernel = @host_kernel@ -host_cpu = @host_cpu@ - -target_cpu = @target_cpu@ -platform = @platform@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -MKDIR_P = @MKDIR_P@ - -mkinstalldirs = $(srcdir)/mkinstalldirs - -LIBS = @LIBS@ $(LIBINTL) $(LIBUTIL) - -CC = @CC@ -CFLAGS = @CFLAGS@ -POSIX_CFLAGS = -I$(srcdir)/lib/posix_wrap -GNULIB_UTIL_CFLAGS = -Wno-undef -Wno-sign-compare -Wno-unused -D_GL_UNUSED="__attribute__ ((unused))" -I$(srcdir)/gnulib -GNULIB_CFLAGS = $(GNULIB_UTIL_CFLAGS) $(POSIX_CFLAGS) -ASFLAGS = @ASFLAGS@ -LDFLAGS = @LDFLAGS@ $(LIBS) -CPPFLAGS = @CPPFLAGS@ -I$(builddir) -I$(builddir)/include -I$(srcdir)/gnulib -I$(srcdir)/include -Wall -W \ - -DGRUB_LIBDIR=\"$(pkglibdir)\" -DLOCALEDIR=\"$(localedir)\" -TARGET_CC = @TARGET_CC@ -TARGET_CFLAGS = -ffreestanding @TARGET_CFLAGS@ -TARGET_ASFLAGS = -nostdinc -fno-builtin @TARGET_ASFLAGS@ -TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@ -TARGET_APPLE_CC = @TARGET_APPLE_CC@ -OBJCONV = @OBJCONV@ -TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \ - -Wall -W -TARGET_LDFLAGS = -nostdlib -static-libgcc @TARGET_LDFLAGS@ -TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@ -TARGET_IMG_LDFLAGS = -nostdlib @TARGET_IMG_LDFLAGS@ -TARGET_IMG_CFLAGS = @TARGET_IMG_CFLAGS@ -TARGET_OBJ2ELF = @TARGET_OBJ2ELF@ -kernel_img_LDFLAGS = -lgcc -EXEEXT = @EXEEXT@ -OBJCOPY = @OBJCOPY@ -STRIP = @STRIP@ -NM = @NM@ -RUBY = @RUBY@ -MAKEINFO = @MAKEINFO@ -ifeq (, $(MAKEINFO)) -MAKEINFO = true -endif -HELP2MAN = @HELP2MAN@ -ifeq (, $(HELP2MAN)) -HELP2MAN = true -else -HELP2MAN := LANG=C $(HELP2MAN) --no-info --source=FSF -endif -AWK = @AWK@ -LIBCURSES = @LIBCURSES@ -LIBUSB = @LIBUSB@ -LIBSDL = @LIBSDL@ -LIBPCIACCESS = @LIBPCIACCESS@ -LEX = @LEX@ -YACC = @YACC@ -FONT_SOURCE = @FONT_SOURCE@ - -# Options. -enable_grub_emu_usb = @enable_grub_emu_usb@ -enable_grub_emu_sdl = @enable_grub_emu_sdl@ -enable_grub_emu_pci = @enable_grub_emu_pci@ -enable_grub_fstest = @enable_grub_fstest@ -enable_grub_pe2elf = @enable_grub_pe2elf@ -enable_grub_mkfont = @enable_grub_mkfont@ -freetype_cflags = @freetype_cflags@ -freetype_libs = @freetype_libs@ -enable_efiemu = @enable_efiemu@ - -### General variables. - -RMKFILES = $(wildcard $(srcdir)/conf/*.rmk) - -MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES)) - -PKGLIB = $(pkglib_IMAGES) $(pkglib_MODULES) $(pkglib_PROGRAMS) \ - $(pkglib_DATA) $(pkglib_BUILDDIR) -PKGDATA = $(pkgdata_DATA) -PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES) -SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(grub-mkconfig_SCRIPTS) \ - $(lib_SCRIPTS) -INFOS = $(info_INFOS) - -CLEANFILES = -MOSTLYCLEANFILES = -DISTCLEANFILES = config.status config.cache config.log config.h \ - Makefile stamp-h stamp-h1 include/grub/cpu include/grub/machine \ - gensymlist.sh genkernsyms.sh build_env.mk \ - docs/grub.info docs/version.texi docs/stamp-vti - -MAINTAINER_CLEANFILES = $(srcdir)/configure $(srcdir)/aclocal.m4 \ - $(MKFILES) $(srcdir)/config.guess \ - $(srcdir)/config.sub $(srcdir)/install-sh $(srcdir)/missing \ - $(srcdir)/DISTLIST $(srcdir)/config.h.in $(srcdir)/stamp-h.in $(INFOS) - -# The default target. -all: all-local - -### Include an arch-specific Makefile. -$(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb - if test "x$(RUBY)" = x; then \ - touch $@; \ - else \ - $(RUBY) $(srcdir)/genmk.rb < $< > $@; \ - fi - -ifeq ($(platform), emu) -include $(srcdir)/conf/any-emu.mk -else -include $(srcdir)/conf/$(target_cpu)-$(platform).mk -# For tests. -include $(srcdir)/conf/tests.mk -# For external modules. --include $(wildcard $(GRUB_CONTRIB)/*/conf/common.mk) -endif - -ifeq ($(TARGET_NO_MODULES), yes) - TARGET_CFLAGS += -DGRUB_TARGET_NO_MODULES=1 - CFLAGS += -DGRUB_TARGET_NO_MODULES=1 -endif - -### General targets. - -CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA) po/*.mo -ifneq ($(TARGET_NO_MODULES), yes) -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 - cat $(DEFSYMFILES) /dev/null \ - | $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \ - || (rm -f $@; exit 1) - -command.lst: $(COMMANDFILES) - cat $^ /dev/null | sort > $@ - -fs.lst: $(FSFILES) - cat $^ /dev/null | sort > $@ - -partmap.lst: $(PARTMAPFILES) - cat $^ /dev/null | sort > $@ - -handler.lst: $(HANDLERFILES) - cat $^ /dev/null | sort > $@ - -terminal.lst: $(TERMINALFILES) - cat $^ /dev/null | sort > $@ - -parttool.lst: $(PARTTOOLFILES) - cat $^ /dev/null | sort | uniq > $@ - -video.lst: $(VIDEOFILES) - cat $^ /dev/null | sort | uniq > $@ - -crypto.lst: lib/libgcrypt-grub/cipher/crypto.lst - cp $^ $@ - -ifneq (true, $(MAKEINFO)) -info_INFOS += docs/grub.info -endif - -MOSTLYCLEANFILES += vti.tmp -MAINTAINER_CLEANFILES += docs/stamp-vti docs/version.texi -docs/version.texi: docs/stamp-vti -docs/stamp-vti: docs/grub.texi configure.ac - $(MKDIR_P) docs - (set `$(SHELL) $(srcdir)/docs/mdate-sh $<`; \ - echo "@set UPDATED $$1 $$2 $$3"; \ - echo "@set UPDATED-MONTH $$2 $$3"; \ - echo "@set EDITION $(PACKAGE_VERSION)"; \ - echo "@set VERSION $(PACKAGE_VERSION)") > vti.tmp - @cmp -s vti.tmp $(builddir)/docs/version.texi \ - || (echo "Updating $(builddir)/docs/version.texi"; \ - cp vti.tmp $(builddir)/docs/version.texi) - -@rm -f vti.tmp - @cp $(builddir)/docs/version.texi $@ - -# Use --force until such time as the documentation is cleaned up. -docs/grub.info: docs/grub.texi docs/version.texi docs/fdl.texi - $(MKDIR_P) docs - -$(MAKEINFO) -P $(builddir)/docs --no-split --force $< -o $@ - -ifeq (, $(FONT_SOURCE)) -else - -ifeq ($(enable_grub_mkfont),yes) - -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 -UNICODE_ARROWS=0x2190-0x2193 -UNICODE_LINES=0x2501-0x251B - -unicode.pf2: $(FONT_SOURCE) grub-mkfont - $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) - -ascii.pf2: $(FONT_SOURCE) grub-mkfont - $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES) - -ascii.bitmaps: $(FONT_SOURCE) grub-mkfont - $(builddir)/grub-mkfont --ascii-bitmaps -o $@ $(FONT_SOURCE) - -ascii.h: ascii.bitmaps grub-bin2h - $(builddir)/grub-bin2h ascii_bitmaps < $< > $@ - -TARGET_CFLAGS += -DUSE_ASCII_FAILBACK=1 -endif -endif - -# Used for building modules externally -pkglib_BUILDDIR += build_env.mk -build_env.mk: Makefile - (\ - echo "TARGET_CC=$(TARGET_CC)" ; \ - echo "TARGET_CFLAGS=$(TARGET_CFLAGS)" ; \ - echo "TARGET_ASFLAGS=$(TARGET_ASFLAGS)" ; \ - echo "TARGET_CPPFLAGS=$(TARGET_CPPFLAGS) -I$(pkglibdir) -I$(includedir)" ; \ - echo "STRIP=$(STRIP)" ; \ - echo "OBJCONV=$(OBJCONV)" ; \ - echo "TARGET_MODULE_FORMAT=$(TARGET_MODULE_FORMAT)" ; \ - echo "TARGET_APPLE_CC=$(TARGET_APPLE_CC)" ; \ - echo "COMMON_ASFLAGS=$(COMMON_ASFLAGS)" ; \ - echo "COMMON_CFLAGS=$(COMMON_CFLAGS)" ; \ - echo "COMMON_LDFLAGS=$(COMMON_LDFLAGS)"\ - ) > $@ -pkglib_BUILDDIR += config.h grub_script.tab.h - -all-local: $(PROGRAMS) $(GRUB_EMU) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(INFOS) $(MKFILES) $(foreach lang, $(LINGUAS), po/$(lang).mo) - -install: install-local - -install-local: all - $(SHELL) $(mkinstalldirs) $(DESTDIR)$(pkglibdir) - rm -f $(DESTDIR)$(pkglibdir)/* - @list='$(PKGLIB)'; \ - for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,'`"; \ - $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkglibdir)/$$dest; \ - done - $(SHELL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) - @list='$(PKGDATA)'; \ - for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,'`"; \ - $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \ - done - $(SHELL) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 - @list='$(bin_UTILITIES) $(GRUB_EMU)'; for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ - $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \ - $(HELP2MAN) --section=1 -o $(DESTDIR)$(mandir)/man1/$$dest.1 $(builddir)/$$file; \ - done - $(SHELL) $(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8 - @list='$(sbin_UTILITIES)'; for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ - $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \ - $(HELP2MAN) --section=8 -o $(DESTDIR)$(mandir)/man8/$$dest.8 $(builddir)/$$file; \ - done - @list='$(bin_SCRIPTS)'; for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \ - $(HELP2MAN) --section=1 -o $(DESTDIR)$(mandir)/man1/$$dest.1 $(builddir)/$$file; \ - done - @list='$(sbin_SCRIPTS)'; for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \ - $(HELP2MAN) --section=8 -o $(DESTDIR)$(mandir)/man8/$$dest.8 $(builddir)/$$file; \ - done - $(SHELL) $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/grub.d - @list='$(grub-mkconfig_SCRIPTS)'; for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \ - done - @list='$(grub-mkconfig_DATA)'; for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ - $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \ - done - $(SHELL) $(mkinstalldirs) $(DESTDIR)$(libdir)/grub - @list='$(lib_SCRIPTS)'; \ - for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,'`"; \ - $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \ - done - @langs='$(LINGUAS)'; \ - for lang in $$langs; do \ - $(SHELL) $(mkinstalldirs) $(DESTDIR)/$(datadir)/locale/$$lang/LC_MESSAGES; \ - file="po/$$lang.mo"; \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - $(INSTALL_DATA) $$dir$$file $(DESTDIR)/$(datadir)/locale/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ - done - $(SHELL) $(mkinstalldirs) $(DESTDIR)$(infodir) - @list='$(info_INFOS)'; \ - for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,'`"; \ - $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(infodir); \ - if (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$dest" || :; \ - fi; \ - done - -install-strip: - $(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" install - -uninstall: - @list='$(PKGLIB)'; \ - for file in $$list; do \ - dest="`echo $$file | sed 's,.*/,,'`"; \ - rm -f $(DESTDIR)$(pkglibdir)/$$dest; \ - done - @list='$(PKGDATA)'; \ - for file in $$list; do \ - dest="`echo $$file | sed 's,.*/,,'`"; \ - rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \ - done - @list='$(bin_UTILITIES) $(bin_SCRIPTS) $(GRUB_EMU)'; for file in $$list; do \ - dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ - rm -f $(DESTDIR)$(bindir)/$$dest; \ - rm -f $(DESTDIR)$(mandir)/man1/$$dest.1; \ - done - @list='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in $$list; do \ - dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ - rm -f $(DESTDIR)$(sbindir)/$$dest; \ - rm -f $(DESTDIR)$(mandir)/man8/$$dest.8; \ - done - @list='$(grub-mkconfig_SCRIPTS) $(grub-mkconfig_DATA)'; for file in $$list; do \ - dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ - rm -f $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \ - done - @list='$(lib_SCRIPTS)'; \ - for file in $$list; do \ - dest="`echo $$file | sed 's,.*/,,'`"; \ - rm -f $(DESTDIR)$(libdir)/grub/$$dest; \ - done - @list='$(info_INFOS)'; \ - for file in $$list; do \ - dest="`echo $$file | sed 's,.*/,,'`"; \ - if (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$dest"; then \ - :; \ - else \ - test ! -f "$(DESTDIR)$(infodir)/$$dest" || exit 1; \ - fi; \ - fi; \ - rm -f $(DESTDIR)$(infodir)/$$dest; \ - done - -clean: $(CLEAN_IMAGE_TARGETS) $(CLEAN_MODULE_TARGETS) $(CLEAN_UTILITY_TARGETS) - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -mostlyclean: clean $(MOSTLYCLEAN_IMAGE_TARGETS) $(MOSTLYCLEAN_MODULE_TARGETS) $(MOSTLYCLEAN_UTILITY_TARGETS) - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -distclean: mostlyclean - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -rm -rf $(srcdir)/autom4te.cache - -maintainer-clean: distclean - -test -z "$(MAINTAINER_CLEANFILES)" || rm -f $(MAINTAINER_CLEANFILES) - -rmdir $(srcdir)/lib/libgcrypt-grub/cipher - -rmdir $(srcdir)/lib/libgcrypt-grub - -info: - -dvi: - -distdir=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) - -DISTLIST: gendistlist.sh - $(SHELL) $(srcdir)/gendistlist.sh > $(srcdir)/DISTLIST - -distdir: DISTLIST - -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) - $(SHELL) $(mkinstalldirs) $(distdir) - for i in `cat $(srcdir)/DISTLIST`; do \ - dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \ - if test -d $(srcdir)/$$dir; then \ - $(SHELL) $(mkinstalldirs) $(distdir)/$$dir; \ - fi; \ - cp -p $(srcdir)/$$i $(distdir)/$$i || exit 1; \ - done - chmod -R a+r $(distdir) - -GZIP_ENV = --best - -dist: distdir - tar chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) - -distcheck: dist - -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) - GZIP=$(GZIP_ENV) gzip -cd $(distdir).tar.gz | tar xf - - chmod -R a-w $(distdir) - chmod a+w $(distdir) - mkdir $(distdir)/=build - mkdir $(distdir)/=inst - chmod a-w $(distdir) - dc_instdir=`CDPATH=: && cd $(distdir)/=inst && pwd` \ - && cd $(distdir)/=build \ - && $(SHELL) ../configure --srcdir=.. --prefix=$$dc_instdir \ - && $(MAKE) all dvi check install && $(MAKE) uninstall \ - && (test `find $$dc_instdir -type f -print | wc -l` -le 1 \ - || (echo "Error: files left after uninstall" 1>&2; \ - exit 1)) \ - && $(MAKE) dist && $(MAKE) distclean \ - && rm -f $(distdir).tar.gz \ - && (test `find . -type f -print | wc -l` -eq 0 \ - || (echo "Error: files left after distclean" 1>&2; \ - exit 1)) - -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) - @echo "$(distdir).tar.gz is ready for distribution" | \ - sed 'h;s/./=/g;p;x;p;x' - -check: all $(UNIT_TESTS) $(FUNCTIONAL_TESTS) $(SCRIPTED_TESTS) - @list="$(UNIT_TESTS)"; \ - set -e; \ - for file in $$list; do \ - $(builddir)/$$file; \ - done - @list="$(FUNCTIONAL_TESTS)"; \ - set -e; \ - for file in $$list; do \ - mod=`basename $$file .mod`; \ - echo "insmod functional_test; insmod $$mod; functional_test" \ - | $(builddir)/grub-shell; \ - done - @list="$(SCRIPTED_TESTS)"; \ - set -e; \ - for file in $$list; do \ - $(builddir)/$$file; \ - done - -.SUFFIX: -.SUFFIX: .c .o .S .d - -# Regenerate configure and Makefile automatically. -$(srcdir)/aclocal.m4: configure.ac acinclude.m4 - cd $(srcdir) && aclocal - -$(srcdir)/configure: configure.ac aclocal.m4 - cd $(srcdir) && autoconf - -$(srcdir)/config.h.in: stamp-h.in -$(srcdir)/stamp-h.in: configure.ac aclocal.m4 - cd $(srcdir) && autoheader - echo timestamp > $(srcdir)/stamp-h.in - -config.h: stamp-h -stamp-h: config.h.in config.status - $(SHELL) ./config.status - -Makefile: Makefile.in config.status - $(SHELL) ./config.status - -config.status: configure - $(SHELL) ./config.status --recheck - -gensymlist.sh: gensymlist.sh.in config.status - $(SHELL) ./config.status - -genkernsyms.sh: genkernsyms.sh.in config.status - $(SHELL) ./config.status - -$(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell - cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o po/$(PACKAGE).pot -f po/POTFILES --keyword=_ --keyword=N_ - cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o po/$(PACKAGE).pot -f po/POTFILES-shell -j --language=Shell - -$(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): po/$(PACKAGE).pot - $(MSGMERGE) -U $@ $^ - -po/%.mo: po/%.po - $(MKDIR_P) $$(dirname $@) - $(MSGFMT) -c --statistics -o $@ $^ - -.PHONY: all install install-strip uninstall clean mostlyclean distclean -.PHONY: maintainer-clean info dvi dist check - -# Prevent an overflow. -.NOEXPORT: - -.DELETE_ON_ERROR: diff --git a/autogen.sh b/autogen.sh index eb251f9f0..5358d45f1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,22 +2,33 @@ set -e -aclocal -autoconf -autoheader +ln -sf ../NEWS grub-core/ +ln -sf ../README grub-core/ +ln -sf ../INSTALL grub-core/ +ln -sf ../AUTHORS grub-core/ +ln -sf ../COPYING grub-core/ +ln -sf ../ABOUT-NLS grub-core/ +ln -sf ../ChangeLog grub-core/ +ln -sf ../aclocal.m4 grub-core/ +ln -sf ../acinclude.m4 grub-core/ +ln -sf ../config.rpath grub-core/ +ln -sf ../gentpl.py grub-core/ +ln -sf ../configure.common grub-core/ -# FIXME: automake doesn't like that there's no Makefile.am -automake -a -c -f || true +ln -sf grub-core/include . +ln -sf grub-core/gnulib . +ln -sf grub-core/lib . + +python gentpl.py | sed -e '/^$/{N;/^\n$/D;}' > Makefile.tpl +autogen -T Makefile.tpl modules.def | sed -e '/^$/{N;/^\n$/D;}' > modules.am + +(cd grub-core && python gentpl.py | sed -e '/^$/{N;/^\n$/D;}' > Makefile.tpl) +(cd grub-core && autogen -T Makefile.tpl modules.def | sed -e '/^$/{N;/^\n$/D;}' > modules.am) + +(cd grub-core && echo timestamp > stamp-h.in) +(cd grub-core && python import_gcry.py lib/libgcrypt/ .) echo timestamp > stamp-h.in - -python util/import_gcry.py lib/libgcrypt/ . - -for rmk in conf/*.rmk ${GRUB_CONTRIB}/*/conf/*.rmk; do - if test -e $rmk ; then - ruby genmk.rb < $rmk > `echo $rmk | sed 's/\.rmk$/.mk/'` - fi -done -sh gendistlist.sh > DISTLIST +autoreconf -vi exit 0 diff --git a/configure.ac b/configure.ac index 4e1dd41d8..10c527565 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # Process this file with autoconf to produce a configure script. -# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc. +# Copyright (C) 2010 Free Software Foundation, Inc. # # This configure.ac is free software; the author # gives unlimited permission to copy and/or distribute it, @@ -23,782 +23,50 @@ dnl which specifies the system running GRUB, such as firmware. dnl This is necessary because the target type in autoconf does not dnl describe such a system very well. dnl -dnl The current strategy is to use variables with no prefix (such as -dnl CC, CFLAGS, etc.) for the host type as well as the build type, -dnl because GRUB does not need to use those variables for the build -dnl type, so there is no conflict. Variables with the prefix "TARGET_" -dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target -dnl type. - +dnl The current strategy is to build utilities using host +dnl cross-compiler and grub core and modules using target +dnl cross-compiler. For this we use nested packages approach, where +dnl top-level package grub utilities is built with HOSTCC and nested +dnl package (in grub-core directory) builds with TARGETCC. +# NOTE: grub-core/configure.ac must also be updated. AC_INIT([GRUB],[1.98],[bug-grub@gnu.org]) -AM_INIT_AUTOMAKE() -AC_PREREQ(2.60) -AC_CONFIG_SRCDIR([include/grub/dl.h]) -AC_CONFIG_HEADER([config.h]) +AC_CONFIG_AUX_DIR([.]) # Checks for host and target systems. AC_CANONICAL_HOST AC_CANONICAL_TARGET -# Program name transformations -AC_ARG_PROGRAM +AM_INIT_AUTOMAKE() +AC_PREREQ(2.60) +AC_CONFIG_SRCDIR([grub-core/include/grub/dl.h]) +AC_CONFIG_HEADER([config.h]) -# Optimization flag. Allow user to override. -if test "x$TARGET_CFLAGS" = x; then - TARGET_CFLAGS="$TARGET_CFLAGS -Os" -fi - -case "$target_cpu" in - i[[3456]]86) target_cpu=i386 ;; - amd64) target_cpu=x86_64 ;; - sparc) target_cpu=sparc64 ;; - mipsel|mips64el) - target_cpu=mips; - TARGET_CFLAGS="$TARGET_CFLAGS -DGRUB_CPU_MIPSEL=1"; - CFLAGS="$CFLAGS -DGRUB_CPU_MIPSEL=1"; - ;; - mips|mips64) - target_cpu=mips; - TARGET_CFLAGS="$TARGET_CFLAGS -DGRUB_CPU_MIPS=1"; - CFLAGS="$CFLAGS -DGRUB_CPU_MIPS=1"; - ;; -esac - -# Specify the platform (such as firmware). -AC_ARG_WITH([platform], - AS_HELP_STRING([--with-platform=PLATFORM], - [select the host platform [[guessed]]])) - -# Guess the platform if not specified. -if test "x$with_platform" = x; then - case "$target_cpu"-"$target_vendor" in - i386-apple) platform=efi ;; - i386-*) platform=pc ;; - x86_64-apple) platform=efi ;; - x86_64-*) platform=pc ;; - powerpc-*) platform=ieee1275 ;; - powerpc64-*) platform=ieee1275 ;; - sparc64-*) platform=ieee1275 ;; - mips-*) platform=yeeloong ;; - *) AC_MSG_ERROR([unsupported CPU: "$target_cpu"]) ;; - esac -else - platform="$with_platform" -fi - -# Adjust CPU unless target was explicitly specified. -if test -z "$target_alias"; then - case "$target_cpu"-"$platform" in - x86_64-efi) ;; - x86_64-emu) ;; - x86_64-*) target_cpu=i386 ;; - powerpc64-ieee1275) target_cpu=powerpc ;; - esac -fi - -# Check if the platform is supported, make final adjustments. -case "$target_cpu"-"$platform" in - i386-efi) ;; - x86_64-efi) ;; - i386-pc) ;; - i386-multiboot) ;; - i386-coreboot) ;; - i386-linuxbios) platform=coreboot ;; - i386-ieee1275) ;; - i386-qemu) ;; - powerpc-ieee1275) ;; - sparc64-ieee1275) ;; - mips-qemu-mips) ;; - mips-yeeloong) ;; - *-emu) ;; - *) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;; -esac - -case "$target_cpu" in - i386 | powerpc) target_m32=1 ;; - x86_64 | sparc64) target_m64=1 ;; -esac - -case "$host_os" in - mingw32*) host_os=cygwin ;; -esac - -# This normalizes the names, and creates a new variable ("host_kernel") -# while at it, since the mapping is not always 1:1 (e.g. different OSes -# using the same kernel type). -case "$host_os" in - gnu*) host_kernel=hurd ;; - linux*) host_kernel=linux ;; - freebsd* | kfreebsd*-gnu) host_kernel=kfreebsd ;; - netbsd*) host_kernel=netbsd ;; - cygwin) host_kernel=windows ;; -esac - -case "$platform" in - coreboot) machine_CFLAGS="-DGRUB_MACHINE_COREBOOT=1" ;; - multiboot) machine_CFLAGS="-DGRUB_MACHINE_MULTIBOOT=1" ;; - efi) machine_CFLAGS="-DGRUB_MACHINE_EFI=1" ;; - ieee1275) machine_CFLAGS="-DGRUB_MACHINE_IEEE1275=1" ;; - qemu) machine_CFLAGS="-DGRUB_MACHINE_QEMU=1" ;; - pc) machine_CFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;; - emu) machine_CFLAGS="-DGRUB_MACHINE_EMU=1" ;; - 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_BONITO=1" ;; -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" -TARGET_ASFLAGS="$TARGET_ASFLAGS $machine_CFLAGS" -TARGET_CFLAGS="$TARGET_CFLAGS $machine_CFLAGS" - -AC_SUBST(host_cpu) -AC_SUBST(host_os) -AC_SUBST(host_kernel) - -AC_SUBST(target_cpu) -AC_SUBST(platform) - -# -# Checks for build programs. -# - -# Although cmp is listed in the GNU Coding Standards as a command which -# can used directly, OpenBSD lacks cmp in the default installation. -AC_CHECK_PROGS([CMP], [cmp]) -if test "x$CMP" = x; then - AC_MSG_ERROR([cmp is not found]) -fi - -AC_CHECK_PROGS([YACC], [bison]) -if test "x$YACC" = x; then - AC_MSG_ERROR([bison is not found]) -fi - -for file in /usr/src/unifont.bdf /usr/share/fonts/X11/misc/unifont.pcf.gz /usr/share/fonts/unifont/unifont.pcf.gz; do - if test -e $file ; then - AC_SUBST([FONT_SOURCE], [$file]) - break - fi -done - -AC_PROG_INSTALL -AC_PROG_AWK -AC_PROG_LEX -AC_PROG_MAKE_SET -AC_PROG_MKDIR_P - -if test "x$LEX" = x; then - AC_MSG_ERROR([flex is not found]) -else - version=`$LEX --version | $AWK '{ split($NF,x,"."); print x[[1]]*10000+x[[2]]*100+x[[3]]; }'` - if test -n "$version" -a "$version" -ge 20535; then - : - else - AC_MSG_ERROR([flex is too old. GRUB requires 2.5.35 or above]) - fi -fi - -# These are not a "must". -AC_PATH_PROG(RUBY, ruby) -AC_PATH_PROG(MAKEINFO, makeinfo) - -# -# Checks for host programs. -# - -AC_PROG_CC -# Must be GCC. -test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required]) - -AC_GNU_SOURCE -AM_GNU_GETTEXT([external]) -AC_SYS_LARGEFILE - -# Identify characteristics of the host architecture. -AC_C_BIGENDIAN -AC_CHECK_SIZEOF(void *) -AC_CHECK_SIZEOF(long) - -grub_apple_cc -if test x$grub_cv_apple_cc = xyes ; then - CFLAGS="$CFLAGS -DAPPLE_CC=1 -fnested-functions" - ASFLAGS="$ASFLAGS -DAPPLE_CC=1" -fi - -if test "x$cross_compiling" = xyes; then - AC_MSG_WARN([cannot generate manual pages while cross compiling]) -else - AC_PATH_PROG(HELP2MAN, help2man) -fi - -# Check for functions. -AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf) - -# For grub-mkisofs -AC_HEADER_MAJOR -AC_HEADER_DIRENT -AC_CHECK_FUNCS(memmove sbrk strdup lstat getuid getgid) -AC_CHECK_HEADERS(sys/mkdev.h sys/sysmacros.h malloc.h termios.h sys/types.h) -AC_CHECK_HEADERS(unistd.h string.h strings.h sys/stat.h sys/fcntl.h limits.h) - -# For opendisk() and getrawpartition() on NetBSD. -# Used in util/deviceiter.c and in util/hostdisk.c. -AC_CHECK_HEADER([util.h], [ - AC_CHECK_LIB([util], [opendisk], [ - LIBUTIL="-lutil" - AC_DEFINE(HAVE_OPENDISK, 1, [Define if opendisk() in -lutil can be used]) - ]) - AC_CHECK_LIB([util], [getrawpartition], [ - LIBUTIL="-lutil" - AC_DEFINE(HAVE_GETRAWPARTITION, 1, [Define if getrawpartition() in -lutil can be used]) - ]) -]) -AC_SUBST([LIBUTIL]) - -# -# Check for target programs. -# - -# Find tools for the target. -if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then - tmp_ac_tool_prefix="$ac_tool_prefix" - ac_tool_prefix=$target_alias- - - AC_CHECK_TOOLS(TARGET_CC, [gcc egcs cc], - [AC_MSG_ERROR([none of gcc, egcs and cc is found. set TARGET_CC manually.])]) - AC_CHECK_TOOL(OBJCOPY, objcopy) - AC_CHECK_TOOL(STRIP, strip) - AC_CHECK_TOOL(NM, nm) - - ac_tool_prefix="$tmp_ac_tool_prefix" -else - if test "x$TARGET_CC" = x; then - TARGET_CC=$CC - fi - AC_CHECK_TOOL(OBJCOPY, objcopy) - AC_CHECK_TOOL(STRIP, strip) - AC_CHECK_TOOL(NM, nm) -fi -AC_SUBST(TARGET_CC) - - -# Test the C compiler for the target environment. -tmp_CC="$CC" -tmp_CFLAGS="$CFLAGS" -tmp_LDFLAGS="$LDFLAGS" -tmp_CPPFLAGS="$CPPFLAGS" -tmp_LIBS="$LIBS" -CC="$TARGET_CC" -CFLAGS="$TARGET_CFLAGS" -CPPFLAGS="$TARGET_CPPFLAGS" -LDFLAGS="$TARGET_LDFLAGS" -LIBS="" - -# debug flags. -TARGET_CFLAGS="$TARGET_CFLAGS -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes \ - -Wundef -Wstrict-prototypes -g" - -# Force no alignment to save space on i386. -if test "x$target_cpu" = xi386; then - AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [ - CFLAGS="$CFLAGS -falign-loops=1" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], - [grub_cv_cc_falign_loop=yes], - [grub_cv_cc_falign_loop=no]) - ]) - - if test "x$grub_cv_cc_falign_loop" = xyes; then - TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1" - else - TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1" - fi - - # Some toolchains enable these features by default, but they need - # registers that aren't set up properly in GRUB. - TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow" -fi - -# By default, GCC 4.4 generates .eh_frame sections containing unwind -# information in some cases where it previously did not. GRUB doesn't need -# these and they just use up vital space. Restore the old compiler -# behaviour. -AC_CACHE_CHECK([whether -fno-dwarf2-cfi-asm works], [grub_cv_cc_fno_dwarf2_cfi_asm], [ - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-dwarf2-cfi-asm" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], - [grub_cv_cc_fno_dwarf2_cfi_asm=yes], - [grub_cv_cc_fno_dwarf2_cfi_asm=no]) - CFLAGS="$SAVE_CFLAGS" -]) - -if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then - TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm" -fi - -grub_apple_target_cc -if test x$grub_cv_apple_target_cc = xyes ; then - TARGET_CFLAGS="$TARGET_CFLAGS -DAPPLE_CC=1 -fnested-functions" - CFLAGS="$CFLAGS -DAPPLE_CC=1 -fnested-functions" - TARGET_ASFLAGS="$TARGET_ASFLAGS -DAPPLE_CC=1" - TARGET_APPLE_CC=1 - AC_CHECK_PROG([OBJCONV], [objconv], [objconv], []) - if test "x$OBJCONV" = x ; then - AC_CHECK_PROG([OBJCONV], [objconv], [./objconv], [], [.]) - fi - if test "x$OBJCONV" = x ; then - AC_MSG_ERROR([objconv not found which is required when building with apple compiler]) - fi - TARGET_IMG_LDSCRIPT= - TARGET_IMG_CFLAGS="-static" - TARGET_IMG_LDFLAGS='-nostdlib -static -Wl,-preload -Wl,-segalign,20 -Wl,-image_base,' - TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20 -Wl,-image_base,' -else - TARGET_APPLE_CC=0 -# Use linker script if present, otherwise use builtin -N script. -if test -f "${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then - TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc" - TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT} -Wl,-Ttext," - TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc -Wl,-Ttext," -else - TARGET_IMG_LDSCRIPT= - TARGET_IMG_LDFLAGS='-Wl,-N -Wl,-Ttext,' - TARGET_IMG_LDFLAGS_AC='-Wl,-N -Wl,-Ttext,' -fi -TARGET_IMG_CFLAGS= -fi - -AC_SUBST(TARGET_IMG_LDSCRIPT) -AC_SUBST(TARGET_IMG_LDFLAGS) -AC_SUBST(TARGET_IMG_CFLAGS) - -# For platforms where ELF is not the default link format. -AC_MSG_CHECKING([for command to convert module to ELF format]) -case "${host_os}" in - cygwin) TARGET_OBJ2ELF='grub-pe2elf'; -# FIXME: put proper test here - AC_DEFINE([NEED_REGISTER_FRAME_INFO], 1, - [Define to 1 if GCC generates calls to __register_frame_info()]) - ;; - *) ;; -esac -AC_SUBST(TARGET_OBJ2ELF) -AC_MSG_RESULT([$TARGET_OBJ2ELF]) - - -if test "x$target_m32" = x1; then - # Force 32-bit mode. - TARGET_CFLAGS="$TARGET_CFLAGS -m32" - TARGET_ASFLAGS="$TARGET_CFLAGS -m32" - TARGET_LDFLAGS="$TARGET_LDFLAGS -m32" - TARGET_MODULE_FORMAT="elf32" -fi - -if test "x$target_m64" = x1; then - # Force 64-bit mode. - TARGET_CFLAGS="$TARGET_CFLAGS -m64" - TARGET_ASFLAGS="$TARGET_ASFLAGS -m64" - TARGET_LDFLAGS="$TARGET_LDFLAGS -m64" - TARGET_MODULE_FORMAT="elf64" -fi - -if test "$target_cpu"-"$platform" = x86_64-efi; then - # Use large model to support 4G memory - AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [ - SAVED_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -m64 -mcmodel=large" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], - [grub_cv_cc_mcmodel=yes], - [grub_cv_cc_mcmodel=no]) - ]) - if test "x$grub_cv_cc_mcmodel" = xno; then - AC_MSG_ERROR([-mcmodel=large not supported. Upgrade your gcc.]) - else - TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large" - fi - - # EFI writes to stack below %rsp, we must not use the red zone - AC_CACHE_CHECK([whether option -mno-red-zone works], grub_cv_cc_no_red_zone, [ - CFLAGS="$CFLAGS -m64 -mno-red-zone" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], - [grub_cv_cc_no_red_zone=yes], - [grub_cv_cc_no_red_zone=no]) - ]) - if test "x$grub_cv_cc_no_red_zone" = xno; then - AC_MSG_ERROR([-mno-red-zone not supported, upgrade your gcc]) - fi - - TARGET_CFLAGS="$TARGET_CFLAGS -mno-red-zone" -fi - -# -# Compiler features. -# - -# Need __enable_execute_stack() for nested function trampolines? -grub_CHECK_ENABLE_EXECUTE_STACK - -# Position independent executable. -grub_CHECK_PIE -[# Need that, because some distributions ship compilers that include -# `-fPIE' in the default specs. -if [ x"$pie_possible" = xyes ]; then - TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE" -fi] - -# Smashing stack protector. -grub_CHECK_STACK_PROTECTOR -# Need that, because some distributions ship compilers that include -# `-fstack-protector' in the default specs. -if test "x$ssp_possible" = xyes; then - TARGET_CFLAGS="$TARGET_CFLAGS -fno-stack-protector" -fi -grub_CHECK_STACK_ARG_PROBE -# Cygwin's GCC uses alloca() to probe the stackframe on static -# stack allocations above some threshold. -if test x"$sap_possible" = xyes; then - TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe" -fi - -AC_ARG_ENABLE([werror], - [AS_HELP_STRING([--disable-werror], - [do not use -Werror when building GRUB])]) -if test x"$enable_werror" != xno ; then - TARGET_CFLAGS="$TARGET_CFLAGS -Werror" -fi - -AC_SUBST(TARGET_CFLAGS) -AC_SUBST(TARGET_MODULE_FORMAT) -AC_SUBST(OBJCONV) -AC_SUBST(TARGET_APPLE_CC) -AC_SUBST(TARGET_ASFLAGS) -AC_SUBST(TARGET_CPPFLAGS) -AC_SUBST(TARGET_LDFLAGS) - -# Set them to their new values for the tests below. -CC="$TARGET_CC" -if test "x$TARGET_APPLE_CC" = x1 ; then -CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error" -else -CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100 -Wno-error" -fi -CPPFLAGS="$TARGET_CPPFLAGS" -LDFLAGS="$TARGET_LDFLAGS" -LIBS=-lgcc - -grub_ASM_USCORE -if test x$grub_cv_asm_uscore = xyes; then -CFLAGS="$CFLAGS -Wl,--defsym,_abort=_main" -else -CFLAGS="$CFLAGS -Wl,--defsym,abort=main" -fi - -# Check for libgcc symbols -AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __trampoline_setup __ucmpdi2 _restgpr_14_x) - -if test "x$TARGET_APPLE_CC" = x1 ; then -CFLAGS="$TARGET_CFLAGS -nostdlib" -else -CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100" -fi -LIBS="" - -# Defined in aclocal.m4. -grub_PROG_TARGET_CC -if test "x$TARGET_APPLE_CC" != x1 ; then -grub_PROG_OBJCOPY_ABSOLUTE -fi -grub_PROG_LD_BUILD_ID_NONE -if test "x$target_cpu" = xi386; then - if test "$platform" != emu && test "x$TARGET_APPLE_CC" != x1 ; then - if test ! -z "$TARGET_IMG_LDSCRIPT"; then - # Check symbols provided by linker script. - CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC}8000 -Wl,--defsym,___main=0x8100" - fi - grub_CHECK_BSS_START_SYMBOL - grub_CHECK_END_SYMBOL - fi - CFLAGS="$TARGET_CFLAGS" - grub_I386_ASM_PREFIX_REQUIREMENT - grub_I386_ASM_ADDR32 - grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK -else - AC_DEFINE([NESTED_FUNC_ATTR], [], [Catch gcc bug]) -fi - -AH_BOTTOM([#if defined(__i386__) && !defined(GRUB_UTIL) -#define NESTED_FUNC_ATTR __attribute__ ((__regparm__ (1))) -#else -#define NESTED_FUNC_ATTR -#endif]) - -AC_ARG_ENABLE([efiemu], - [AS_HELP_STRING([--enable-efiemu], - [build and install the efiemu runtimes (default=guessed)])]) -if test x"$enable_efiemu" = xno ; then - efiemu_excuse="explicitly disabled" -fi -if test x"$efiemu_excuse" = x ; then - AC_CACHE_CHECK([whether options required for efiemu work], grub_cv_cc_efiemu, [ - CFLAGS="$CFLAGS -m64 -mcmodel=large -mno-red-zone -nostdlib" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], - [grub_cv_cc_efiemu=yes], - [grub_cv_cc_efiemu=no]) - ]) - if test x$grub_cv_cc_efiemu = xno; then - efiemu_excuse="cannot compile with -m64 -mcmodel=large -mno-red-zone -nostdlib" - fi -fi -if test x"$enable_efiemu" = xyes && test x"$efiemu_excuse" != x ; then - AC_MSG_ERROR([efiemu runtime was explicitly requested but can't be compiled]) -fi -if test x"$efiemu_excuse" = x ; then -enable_efiemu=yes -else -enable_efiemu=no -fi -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 -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. -CC="$tmp_CC" -CFLAGS="$tmp_CFLAGS" -CPPFLAGS="$tmp_CPPFLAGS" -LDFLAGS="$tmp_LDFLAGS" -LIBS="$tmp_LIBS" - -# -# Check for options. -# - -# Memory manager debugging. -AC_ARG_ENABLE([mm-debug], - AS_HELP_STRING([--enable-mm-debug], - [include memory manager debugging]), - [AC_DEFINE([MM_DEBUG], [1], - [Define to 1 if you enable memory manager debugging.])]) - -AC_ARG_ENABLE([grub-emu-usb], - [AS_HELP_STRING([--enable-grub-emu-usb], - [build and install the `grub-emu' debugging utility with USB support (default=guessed)])]) - -AC_ARG_ENABLE([grub-emu-sdl], - [AS_HELP_STRING([--enable-grub-emu-sdl], - [build and install the `grub-emu' debugging utility with SDL support (default=guessed)])]) - -AC_ARG_ENABLE([grub-emu-pci], - [AS_HELP_STRING([--enable-grub-emu-pci], - [build and install the `grub-emu' debugging utility with PCI support (potentially dangerous) (default=no)])]) - -AC_ARG_ENABLE([grub-emu-modules], - [AS_HELP_STRING([--enable-grub-emu-modules], - [Support module loading in `grub-emu' debugging utility (default=no)])]) - -if test "$platform" = emu; then - missing_ncurses= -[# Check for curses libraries.] - AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"], - [AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"], - [missing_ncurses=[true]])]) - AC_SUBST([LIBCURSES]) -[if [ x"$missing_ncurses" = x ]; then ] - [# Check for headers.] - AC_CHECK_HEADERS([ncurses/curses.h], [], - [AC_CHECK_HEADERS([ncurses.h], [], - [AC_CHECK_HEADERS([curses.h], [], - [missing_ncurses=[true]])])]) -[fi] -if test x"$missing_ncurses" = xtrue ; then - AC_MSG_ERROR([grub-emu can't be compiled without ncurses]) -fi - -if test x"$enable_grub_emu_modules" = xyes ; then - TARGET_NO_MODULES=no -else - TARGET_NO_MODULES=yes -fi -AC_SUBST(TARGET_NO_MODULES) - -if test "$TARGET_NO_MODULES" = yes ; then - # Do not convert modules, otherwise linkage may fail (Cygwin only). - # FIXME: Should be checked above before TARGET_OBJ2ELF is set first. - TARGET_OBJ2ELF= -fi - -if test x"$enable_grub_emu_usb" = xno ; then - grub_emu_usb_excuse="explicitly disabled" -fi - -if test x"$enable_grub_emu_pci" = xyes ; then - grub_emu_usb_excuse="conflicts with PCI support" -fi - -[if [ x"$grub_emu_usb_excuse" = x ]; then - # Check for libusb libraries.] -AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"], - [grub_emu_usb_excuse=["need libusb library"]]) - AC_SUBST([LIBUSB]) -[fi] -[if [ x"$grub_emu_usb_excuse" = x ]; then - # Check for headers.] - AC_CHECK_HEADERS([usb.h], [], - [grub_emu_usb_excuse=["need libusb headers"]]) -[fi] -if test x"$enable_grub_emu_usb" = xyes && test x"$grub_emu_usb_excuse" != x ; then - AC_MSG_ERROR([USB support for grub-emu was explicitly requested but can't be compiled]) -fi -if test x"$grub_emu_usb_excuse" = x ; then -enable_grub_emu_usb=yes -else -enable_grub_emu_usb=no -fi - -if test x"$enable_grub_emu_sdl" = xno ; then - grub_emu_sdl_excuse="explicitely disabled" -fi -[if [ x"$grub_emu_sdl_excuse" = x ]; then - # Check for libSDL libraries.] -AC_CHECK_LIB([SDL], [SDL_Init], [LIBSDL="-lSDL"], - [grub_emu_sdl_excuse=["libSDL libraries are required to build \`grub-emu' with SDL support"]]) - AC_SUBST([LIBSDL]) -[fi] - -[if [ x"$grub_emu_sdl_excuse" = x ]; then - # Check for headers.] - AC_CHECK_HEADERS([SDL/SDL.h], [], - [grub_emu_sdl_excuse=["libSDL header file is required to build \`grub-emu' with SDL support"]]) -[fi] - -if test x"enable_grub_emu_sdl" = xyes && test x"$grub_emu_sdl_excuse" != x ; then - AC_MSG_ERROR([SDL support for grub-emu was explicitely requested but can't be compiled]) -fi -if test x"$grub_emu_sdl_excuse" = x ; then -enable_grub_emu_sdl=yes -else -enable_grub_emu_sdl=no -fi - -if test x"$enable_grub_emu_pci" != xyes ; then - grub_emu_pci_excuse="not enabled" -fi - -if test x"$enable_grub_emu_usb" = xyes ; then - grub_emu_pci_excuse="conflicts with USB support" -fi - -[if [ x"$grub_emu_pci_excuse" = x ]; then - # Check for libpci libraries.] - AC_CHECK_LIB([pciaccess], [pci_system_init], [LIBPCIACCESS="-lpciaccess"], - [grub_emu_pci_excuse=["need libpciaccess library"]]) - AC_SUBST([LIBPCIACCESS]) -[fi] -[if [ x"$grub_emu_pci_excuse" = x ]; then - # Check for headers.] - AC_CHECK_HEADERS([pci/pci.h], [], - [grub_emu_pci_excuse=["need libpciaccess headers"]]) -[fi] - -if test x"$grub_emu_pci_excuse" = x ; then -enable_grub_emu_pci=yes -else - -enable_grub_emu_pci=no -fi - -AC_SUBST([enable_grub_emu_sdl]) -AC_SUBST([enable_grub_emu_usb]) -AC_SUBST([enable_grub_emu_pci]) -fi - -AC_ARG_ENABLE([grub-fstest], - [AS_HELP_STRING([--enable-grub-fstest], - [build and install the `grub-fstest' debugging utility (default=guessed)])]) -if test x"$enable_grub_fstest" = xno ; then - grub_fstest_excuse="explicitly disabled" -fi -if test x"$grub_fstest_excuse" = x ; then -enable_grub_fstest=yes -else -enable_grub_fstest=no -fi -AC_SUBST([enable_grub_fstest]) - -AC_ARG_ENABLE([grub-mkfont], - [AS_HELP_STRING([--enable-grub-mkfont], - [build and install the `grub-mkfont' utility (default=guessed)])]) -if test x"$enable_grub_mkfont" = xno ; then - grub_mkfont_excuse="explicitly disabled" -fi - -if test x"$grub_mkfont_excuse" = x ; then - # Check for freetype libraries. - AC_CHECK_PROGS([FREETYPE], [freetype-config]) - if test "x$FREETYPE" = x ; then - grub_mkfont_excuse=["need freetype2 library"] - fi - freetype_cflags=`freetype-config --cflags` - freetype_libs=`freetype-config --libs` -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 - AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled]) -fi -if test x"$grub_mkfont_excuse" = x ; then -enable_grub_mkfont=yes -else -enable_grub_mkfont=no -fi -AC_SUBST([enable_grub_mkfont]) -AC_SUBST([freetype_cflags]) -AC_SUBST([freetype_libs]) - -AC_SUBST(ASFLAGS) +m4_include([configure.common]) # Output files. grub_CHECK_LINK_DIR if test x"$link_dir" = xyes ; then - AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu]) + AC_CONFIG_LINKS([include/grub/cpu:grub-core/include/grub/$target_cpu]) if test "$platform" != emu ; then - AC_CONFIG_LINKS([include/grub/machine:include/grub/$target_cpu/$platform]) + AC_CONFIG_LINKS([include/grub/machine:grub-core/include/grub/$target_cpu/$platform]) fi else mkdir -p include/grub 2>/dev/null rm -rf include/grub/cpu - cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null + cp -rp $srcdir/grub-core/include/grub/$target_cpu include/grub/cpu 2>/dev/null if test "$platform" != emu ; then rm -rf include/grub/machine - cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null + cp -rp $srcdir/grub-core/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null fi fi -AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh]) + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([po/Makefile]) +AC_CONFIG_FILES([docs/Makefile]) AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) + +AC_CONFIG_SUBDIRS([grub-core]) AC_OUTPUT [ echo "*******************************************************" @@ -820,11 +88,6 @@ echo PCI support for grub-emu: Yes else echo PCI support for grub-emu: No "($grub_emu_pci_excuse)" fi -if [ x"$TARGET_NO_MODULES" = xno ]; then -echo Module support for grub-emu: Yes -else -echo Module support for grub-emu: No -fi fi if [ x"$enable_mm_debug" = xyes ]; then echo With memory debugging: Yes diff --git a/configure.common b/configure.common new file mode 100644 index 000000000..31bac7742 --- /dev/null +++ b/configure.common @@ -0,0 +1,804 @@ +# -*- autoconf -*- + +# Process this file with autoconf to produce a configure script. + +# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc. +# +# This configure.ac 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. + +# This file is shared between grub-core and util configure scripts. + +# Program name transformations +AC_ARG_PROGRAM + +# Optimization flag. Allow user to override. +if test "x$CFLAGS" = x; then + CFLAGS="$CFLAGS -Os" +fi + +# Default HOST_CPPFLAGS +CPPFLAGS='' +HOST_CPPFLAGS="$HOST_CPPFLAGS -Wall -W" +HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_srcdir)/grub-core/include" +HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_builddir)/include" +HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_srcdir)/grub-core/gnulib" +HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_UTIL=1" +HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_LIBDIR=\\\"\$(pkglibdir)\\\"" +HOST_CPPFLAGS="$HOST_CPPFLAGS -DLOCALEDIR=\\\"\$(localedir)\\\"" + +TARGET_CPPFLAGS="$TARGET_CPPFLAGS -Wall -W" +TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_srcdir)/include" +TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_builddir)/include" + +case "$target_cpu" in + i[[3456]]86) target_cpu=i386 ;; + amd64) target_cpu=x86_64 ;; + sparc) target_cpu=sparc64 ;; + mipsel|mips64el) + target_cpu=mips; + cpu_CPPFLAGS="-DGRUB_CPU_MIPSEL=1"; + ;; + mips|mips64) + target_cpu=mips; + cpu_CPPFLAGS="-DGRUB_CPU_MIPS=1"; + ;; +esac + +# Specify the platform (such as firmware). +AC_ARG_WITH([platform], + AS_HELP_STRING([--with-platform=PLATFORM], + [select the host platform [[guessed]]])) + +# Guess the platform if not specified. +if test "x$with_platform" = x; then + case "$target_cpu"-"$target_vendor" in + i386-apple) platform=efi ;; + i386-*) platform=pc ;; + x86_64-apple) platform=efi ;; + x86_64-*) platform=pc ;; + powerpc-*) platform=ieee1275 ;; + powerpc64-*) platform=ieee1275 ;; + sparc64-*) platform=ieee1275 ;; + mips-*) platform=yeeloong ;; + *) AC_MSG_ERROR([unsupported CPU: "$target_cpu"]) ;; + esac +else + platform="$with_platform" +fi + +# Adjust CPU unless target was explicitly specified. +if test -z "$target_alias"; then + case "$target_cpu"-"$platform" in + x86_64-efi) ;; + x86_64-emu) ;; + x86_64-*) target_cpu=i386 ;; + powerpc64-ieee1275) target_cpu=powerpc ;; + esac +fi + +# Check if the platform is supported, make final adjustments. +case "$target_cpu"-"$platform" in + i386-efi) ;; + x86_64-efi) ;; + i386-pc) ;; + i386-multiboot) ;; + i386-coreboot) ;; + i386-linuxbios) platform=coreboot ;; + i386-ieee1275) ;; + i386-qemu) ;; + powerpc-ieee1275) ;; + sparc64-ieee1275) ;; + mips-qemu-mips) ;; + mips-yeeloong) ;; + *-emu) ;; + *) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;; +esac + +case "$target_cpu" in + i386 | powerpc) target_m32=1 ;; + x86_64 | sparc64) target_m64=1 ;; +esac + +case "$host_os" in + mingw32*) host_os=cygwin ;; +esac + +# This normalizes the names, and creates a new variable ("host_kernel") +# while at it, since the mapping is not always 1:1 (e.g. different OSes +# using the same kernel type). +case "$host_os" in + gnu*) host_kernel=hurd ;; + linux*) host_kernel=linux ;; + freebsd* | kfreebsd*-gnu) host_kernel=kfreebsd ;; + netbsd*) host_kernel=netbsd ;; + cygwin) host_kernel=windows ;; +esac + +case "$platform" in + coreboot) machine_CPPFLAGS="-DGRUB_MACHINE_COREBOOT=1" ;; + multiboot) machine_CFLAGS="-DGRUB_MACHINE_MULTIBOOT=1" ;; + efi) machine_CPPFLAGS="-DGRUB_MACHINE_EFI=1" ;; + ieee1275) machine_CPPFLAGS="-DGRUB_MACHINE_IEEE1275=1" ;; + qemu) machine_CPPFLAGS="-DGRUB_MACHINE_QEMU=1" ;; + pc) machine_CPPFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;; + emu) machine_CPPFLAGS="-DGRUB_MACHINE_EMU=1" ;; + yeeloong) machine_CPPFLAGS="-DGRUB_MACHINE_MIPS_YEELOONG=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;; + qemu-mips) machine_CPPFLAGS="-DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;; +esac +case "$target_cpu" in + i386) cpu_CPPFLAGS="$cpu_CPPFLAGS -DGRUB_CPU_I386";; + x86_64) cpu_CPPFLAGS="$cpu_CPPFLAGS -DGRUB_CPU_X86_64";; + powerpc) cpu_CPPFLAGS="$cpu_CPPFLAGS -DGRUB_CPU_POWERPC";; + mips) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS=1" ;; # cpu_CPPFLAGS handled above + sparc64) cpu_CPPFLAGS="$cpu_CPPFLAGS -DGRUB_CPU_SPARC64"; + machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_SPARC64=1" ;; +esac + +HOST_CPPFLAGS="$HOST_CPPFLAGS $cpu_CPPFLAGS $machine_CPPFLAGS" +TARGET_CPPFLAGS="$TARGET_CPPFLAGS $cpu_CPPFLAGS $machine_CPPFLAGS" + +AC_SUBST(host_cpu) +AC_SUBST(host_os) +AC_SUBST(host_kernel) + +AC_SUBST(target_cpu) +AC_SUBST(platform) + +# +# Checks for build programs. +# + +# Although cmp is listed in the GNU Coding Standards as a command which +# can used directly, OpenBSD lacks cmp in the default installation. +AC_CHECK_PROGS([CMP], [cmp]) +if test "x$CMP" = x; then + AC_MSG_ERROR([cmp is not found]) +fi + +for file in /usr/src/unifont.bdf /usr/share/fonts/X11/misc/unifont.pcf.gz /usr/share/fonts/unifont/unifont.pcf.gz; do + if test -e $file ; then + FONT_SOURCE=$file + HOST_CPPFLAGS="$HOST_CPPFLAGS -DUSE_ASCII_FAILBACK=1" + TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DUSE_ASCII_FAILBACK=1" + break + fi +done + +AC_PROG_RANLIB +AC_PROG_INSTALL +AC_PROG_AWK +AC_PROG_LEX +AC_PROG_YACC +AC_PROG_MAKE_SET +AC_PROG_MKDIR_P + +if test "x$LEX" = x; then + AC_MSG_ERROR([flex is not found]) +else + version=`$LEX --version | $AWK '{ split($NF,x,"."); print x[[1]]*10000+x[[2]]*100+x[[3]]; }'` + if test -n "$version" -a "$version" -ge 20535; then + : + else + AC_MSG_ERROR([flex is too old. GRUB requires 2.5.35 or above]) + fi +fi + +# These are not a "must". +AC_PATH_PROG(MAKEINFO, makeinfo) + +# +# Checks for host programs. +# + +AC_PROG_CC +AM_PROG_CC_C_O +AM_PROG_AS + +# Must be GCC. +test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required]) + +AC_GNU_SOURCE +AM_GNU_GETTEXT([external]) +AC_SYS_LARGEFILE + +# Identify characteristics of the host architecture. +AC_C_BIGENDIAN +AC_CHECK_SIZEOF(void *) +AC_CHECK_SIZEOF(long) + +grub_apple_cc +if test x$grub_cv_apple_cc = xyes ; then + HOST_CPPFLAGS="$HOST_CPPFLAGS -DAPPLE_CC=1" + HOST_CFLAGS="$HOST_CFLAGS -fnested-functions" +fi + +if test "x$cross_compiling" = xyes; then + AC_MSG_WARN([cannot generate manual pages while cross compiling]) +else + AC_PATH_PROG(HELP2MAN, help2man) +fi + +# Check for functions. +AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf) + +# For grub-mkisofs +AC_HEADER_MAJOR +AC_HEADER_DIRENT +AC_CHECK_FUNCS(memmove sbrk strdup lstat getuid getgid) +AC_CHECK_HEADERS(sys/mkdev.h sys/sysmacros.h malloc.h termios.h sys/types.h) +AC_CHECK_HEADERS(unistd.h string.h strings.h sys/stat.h sys/fcntl.h limits.h) + +# For opendisk() and getrawpartition() on NetBSD. +# Used in util/deviceiter.c and in util/hostdisk.c. +AC_CHECK_HEADER([util.h], [ + AC_CHECK_LIB([util], [opendisk], [ + LIBUTIL="-lutil" + AC_DEFINE(HAVE_OPENDISK, 1, [Define if opendisk() in -lutil can be used]) + ]) + AC_CHECK_LIB([util], [getrawpartition], [ + LIBUTIL="-lutil" + AC_DEFINE(HAVE_GETRAWPARTITION, 1, [Define if getrawpartition() in -lutil can be used]) + ]) +]) +AC_SUBST([LIBUTIL]) + +# +# Check for host and build compilers. +# +HOST_CC=$CC +AC_CHECK_PROGS(BUILD_CC, [gcc egcs cc], + [AC_MSG_ERROR([none of gcc, egcs and cc is found. set BUILD_CC manually.])]) + +# +# Check for target programs. +# + +# Find tools for the target. +if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then + tmp_ac_tool_prefix="$ac_tool_prefix" + ac_tool_prefix=$target_alias- + + AC_CHECK_TOOLS(TARGET_CC, [gcc egcs cc], + [AC_MSG_ERROR([none of gcc, egcs and cc is found. set TARGET_CC manually.])]) + AC_CHECK_TOOL(OBJCOPY, objcopy) + AC_CHECK_TOOL(STRIP, strip) + AC_CHECK_TOOL(NM, nm) + + ac_tool_prefix="$tmp_ac_tool_prefix" +else + if test "x$TARGET_CC" = x; then + TARGET_CC=$CC + fi + AC_CHECK_TOOL(OBJCOPY, objcopy) + AC_CHECK_TOOL(STRIP, strip) + AC_CHECK_TOOL(NM, nm) +fi +AC_SUBST(HOST_CC) +AC_SUBST(BUILD_CC) +AC_SUBST(TARGET_CC) + +# Test the C compiler for the target environment. +tmp_CC="$CC" +tmp_CFLAGS="$CFLAGS" +tmp_LDFLAGS="$LDFLAGS" +tmp_CPPFLAGS="$CPPFLAGS" +tmp_LIBS="$LIBS" +CC="$TARGET_CC" +CFLAGS="$TARGET_CFLAGS" +CPPFLAGS="$TARGET_CPPFLAGS" +LDFLAGS="$TARGET_LDFLAGS" +LIBS="" + +# debug flags. +TARGET_CFLAGS="$TARGET_CFLAGS -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g" +TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g" + +# Force no alignment to save space on i386. +if test "x$target_cpu" = xi386; then + AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [ + CFLAGS="$CFLAGS -falign-loops=1" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [grub_cv_cc_falign_loop=yes], + [grub_cv_cc_falign_loop=no]) + ]) + + if test "x$grub_cv_cc_falign_loop" = xyes; then + TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1" + else + TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1" + fi + + # Some toolchains enable these features by default, but they need + # registers that aren't set up properly in GRUB. + TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow" +fi + +# By default, GCC 4.4 generates .eh_frame sections containing unwind +# information in some cases where it previously did not. GRUB doesn't need +# these and they just use up vital space. Restore the old compiler +# behaviour. +AC_CACHE_CHECK([whether -fno-dwarf2-cfi-asm works], [grub_cv_cc_fno_dwarf2_cfi_asm], [ + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-dwarf2-cfi-asm" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [grub_cv_cc_fno_dwarf2_cfi_asm=yes], + [grub_cv_cc_fno_dwarf2_cfi_asm=no]) + CFLAGS="$SAVE_CFLAGS" +]) + +if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then + TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm" +fi + +grub_apple_target_cc +if test x$grub_cv_apple_target_cc = xyes ; then + TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DAPPLE_CC=1" + TARGET_CFLAGS="$TARGET_CFLAGS -fnested-functions" + + CFLAGS="$CFLAGS -DAPPLE_CC=1 -fnested-functions" + TARGET_APPLE_CC=1 + AC_CHECK_PROG([OBJCONV], [objconv], [objconv], []) + if test "x$OBJCONV" = x ; then + AC_CHECK_PROG([OBJCONV], [objconv], [./objconv], [], [.]) + fi + if test "x$OBJCONV" = x ; then + AC_MSG_ERROR([objconv not found which is required when building with apple compiler]) + fi + TARGET_IMG_LDSCRIPT= + TARGET_IMG_CFLAGS="-static" + TARGET_IMG_LDFLAGS='-nostdlib -static -Wl,-preload -Wl,-segalign,20 -Wl,-image_base,' + TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20 -Wl,-image_base,' +else + TARGET_APPLE_CC=0 +# Use linker script if present, otherwise use builtin -N script. +if test -f "${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then + TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc" + TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT} -Wl,-Ttext," + TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc -Wl,-Ttext," +else + TARGET_IMG_LDSCRIPT= + TARGET_IMG_LDFLAGS='-Wl,-N -Wl,-Ttext,' + TARGET_IMG_LDFLAGS_AC='-Wl,-N -Wl,-Ttext,' +fi +TARGET_IMG_CFLAGS= +fi + +# For platforms where ELF is not the default link format. +AC_MSG_CHECKING([for command to convert module to ELF format]) +case "${host_os}" in + cygwin) TARGET_OBJ2ELF='grub-pe2elf'; +# FIXME: put proper test here + AC_DEFINE([NEED_REGISTER_FRAME_INFO], 1, + [Define to 1 if GCC generates calls to __register_frame_info()]) + ;; + *) ;; +esac +AC_MSG_RESULT([$TARGET_OBJ2ELF]) + +if test "x$target_m32" = x1; then + # Force 32-bit mode. + TARGET_CFLAGS="$TARGET_CFLAGS -m32" + TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m32" + TARGET_LDFLAGS="$TARGET_LDFLAGS -m32" + TARGET_MODULE_FORMAT="elf32" +fi + +if test "x$target_m64" = x1; then + # Force 64-bit mode. + TARGET_CFLAGS="$TARGET_CFLAGS -m64" + TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m64" + TARGET_LDFLAGS="$TARGET_LDFLAGS -m64" + TARGET_MODULE_FORMAT="elf64" +fi + +if test "$target_cpu"-"$platform" = x86_64-efi; then + # Use large model to support 4G memory + AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [ + SAVED_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -m64 -mcmodel=large" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [grub_cv_cc_mcmodel=yes], + [grub_cv_cc_mcmodel=no]) + ]) + if test "x$grub_cv_cc_mcmodel" = xno; then + AC_MSG_ERROR([-mcmodel=large not supported. Upgrade your gcc.]) + else + TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large" + fi + + # EFI writes to stack below %rsp, we must not use the red zone + AC_CACHE_CHECK([whether option -mno-red-zone works], grub_cv_cc_no_red_zone, [ + CFLAGS="$CFLAGS -m64 -mno-red-zone" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [grub_cv_cc_no_red_zone=yes], + [grub_cv_cc_no_red_zone=no]) + ]) + if test "x$grub_cv_cc_no_red_zone" = xno; then + AC_MSG_ERROR([-mno-red-zone not supported, upgrade your gcc]) + fi + + TARGET_CFLAGS="$TARGET_CFLAGS -mno-red-zone" +fi + +# +# Compiler features. +# + +# Need __enable_execute_stack() for nested function trampolines? +grub_CHECK_ENABLE_EXECUTE_STACK + +# Position independent executable. +grub_CHECK_PIE +[# Need that, because some distributions ship compilers that include +# `-fPIE' in the default specs. +if [ x"$pie_possible" = xyes ]; then + TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE" +fi] + +# Smashing stack protector. +grub_CHECK_STACK_PROTECTOR +# Need that, because some distributions ship compilers that include +# `-fstack-protector' in the default specs. +if test "x$ssp_possible" = xyes; then + TARGET_CFLAGS="$TARGET_CFLAGS -fno-stack-protector" +fi +grub_CHECK_STACK_ARG_PROBE +# Cygwin's GCC uses alloca() to probe the stackframe on static +# stack allocations above some threshold. +if test x"$sap_possible" = xyes; then + TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe" +fi + +AC_ARG_ENABLE([werror], + [AS_HELP_STRING([--disable-werror], + [do not use -Werror when building GRUB])]) +if test x"$enable_werror" != xno ; then + TARGET_CFLAGS="$TARGET_CFLAGS -Werror" +fi + +AC_SUBST(TARGET_MODULE_FORMAT) +AC_SUBST(OBJCONV) +AC_SUBST(TARGET_APPLE_CC) + +AC_SUBST(TARGET_CFLAGS) +AC_SUBST(TARGET_LDFLAGS) +AC_SUBST(TARGET_CPPFLAGS) +AC_SUBST(TARGET_CCASFLAGS) + +AC_SUBST(HOST_CFLAGS) +AC_SUBST(HOST_LDFLAGS) +AC_SUBST(HOST_CPPFLAGS) +AC_SUBST(HOST_CCASFLAGS) + +# Set them to their new values for the tests below. +CC="$TARGET_CC" +if test "x$TARGET_APPLE_CC" = x1 ; then +CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error" +else +CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100 -Wno-error" +fi +CPPFLAGS="$TARGET_CPPFLAGS" +LDFLAGS="$TARGET_LDFLAGS" +LIBS=-lgcc + +grub_ASM_USCORE +if test x$grub_cv_asm_uscore = xyes; then +CFLAGS="$CFLAGS -Wl,--defsym,_abort=_main" +else +CFLAGS="$CFLAGS -Wl,--defsym,abort=main" +fi + +# Check for libgcc symbols +AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __trampoline_setup __ucmpdi2 _restgpr_14_x) + +if test "x$TARGET_APPLE_CC" = x1 ; then +CFLAGS="$TARGET_CFLAGS -nostdlib" +else +CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100" +fi +LIBS="" + +# Defined in aclocal.m4. +grub_PROG_TARGET_CC +if test "x$TARGET_APPLE_CC" != x1 ; then +grub_PROG_OBJCOPY_ABSOLUTE +fi +grub_PROG_LD_BUILD_ID_NONE +if test "x$target_cpu" = xi386; then + if test "$platform" != emu && test "x$TARGET_APPLE_CC" != x1 ; then + if test ! -z "$TARGET_IMG_LDSCRIPT"; then + # Check symbols provided by linker script. + CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC}8000 -Wl,--defsym,___main=0x8100" + fi + grub_CHECK_BSS_START_SYMBOL + grub_CHECK_END_SYMBOL + fi + CFLAGS="$TARGET_CFLAGS" + grub_I386_ASM_PREFIX_REQUIREMENT + grub_I386_ASM_ADDR32 + grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK +else + AC_DEFINE([NESTED_FUNC_ATTR], [], [Catch gcc bug]) +fi + +AH_BOTTOM([#if defined(__i386__) && !defined(GRUB_UTIL) +#define NESTED_FUNC_ATTR __attribute__ ((__regparm__ (1))) +#else +#define NESTED_FUNC_ATTR +#endif]) + +AC_ARG_ENABLE([efiemu], + [AS_HELP_STRING([--enable-efiemu], + [build and install the efiemu runtimes (default=guessed)])]) +if test x"$enable_efiemu" = xno ; then + efiemu_excuse="explicitly disabled" +fi +if test x"$efiemu_excuse" = x ; then + AC_CACHE_CHECK([whether options required for efiemu work], grub_cv_cc_efiemu, [ + CFLAGS="$CFLAGS -m64 -mcmodel=large -mno-red-zone -nostdlib" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [grub_cv_cc_efiemu=yes], + [grub_cv_cc_efiemu=no]) + ]) + if test x$grub_cv_cc_efiemu = xno; then + efiemu_excuse="cannot compile with -m64 -mcmodel=large -mno-red-zone -nostdlib" + fi +fi +if test x"$enable_efiemu" = xyes && test x"$efiemu_excuse" != x ; then + AC_MSG_ERROR([efiemu runtime was explicitly requested but can't be compiled]) +fi +if test x"$efiemu_excuse" = x ; then +enable_efiemu=yes +else +enable_efiemu=no +fi +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 +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. +CC="$tmp_CC" +CFLAGS="$tmp_CFLAGS" +CPPFLAGS="$tmp_CPPFLAGS" +LDFLAGS="$tmp_LDFLAGS" +LIBS="$tmp_LIBS" + +# +# Check for options. +# + +# Memory manager debugging. +AC_ARG_ENABLE([mm-debug], + AS_HELP_STRING([--enable-mm-debug], + [include memory manager debugging]), + [AC_DEFINE([MM_DEBUG], [1], + [Define to 1 if you enable memory manager debugging.])]) + +AC_ARG_ENABLE([grub-emu-usb], + [AS_HELP_STRING([--enable-grub-emu-usb], + [build and install the `grub-emu' debugging utility with USB support (default=guessed)])]) + +AC_ARG_ENABLE([grub-emu-sdl], + [AS_HELP_STRING([--enable-grub-emu-sdl], + [build and install the `grub-emu' debugging utility with SDL support (default=guessed)])]) + +AC_ARG_ENABLE([grub-emu-pci], + [AS_HELP_STRING([--enable-grub-emu-pci], + [build and install the `grub-emu' debugging utility with PCI support (potentially dangerous) (default=no)])]) + +if test "$platform" = emu; then + missing_ncurses= +[# Check for curses libraries.] + AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"], + [AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"], + [missing_ncurses=[true]])]) + AC_SUBST([LIBCURSES]) +[if [ x"$missing_ncurses" = x ]; then ] + [# Check for headers.] + AC_CHECK_HEADERS([ncurses/curses.h], [], + [AC_CHECK_HEADERS([ncurses.h], [], + [AC_CHECK_HEADERS([curses.h], [], + [missing_ncurses=[true]])])]) +[fi] +if test x"$missing_ncurses" = xtrue ; then + AC_MSG_ERROR([grub-emu can't be compiled without ncurses]) +fi + +if test x"$enable_grub_emu_usb" = xno ; then + grub_emu_usb_excuse="explicitly disabled" +fi + +if test x"$enable_grub_emu_pci" = xyes ; then + grub_emu_usb_excuse="conflicts with PCI support" +fi + +[if [ x"$grub_emu_usb_excuse" = x ]; then + # Check for libusb libraries.] +AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"], + [grub_emu_usb_excuse=["need libusb library"]]) + AC_SUBST([LIBUSB]) +[fi] +[if [ x"$grub_emu_usb_excuse" = x ]; then + # Check for headers.] + AC_CHECK_HEADERS([usb.h], [], + [grub_emu_usb_excuse=["need libusb headers"]]) +[fi] +if test x"$enable_grub_emu_usb" = xyes && test x"$grub_emu_usb_excuse" != x ; then + AC_MSG_ERROR([USB support for grub-emu was explicitly requested but can't be compiled]) +fi +if test x"$grub_emu_usb_excuse" = x ; then +enable_grub_emu_usb=yes +else +enable_grub_emu_usb=no +fi + +if test x"$enable_grub_emu_sdl" = xno ; then + grub_emu_sdl_excuse="explicitely disabled" +fi +[if [ x"$grub_emu_sdl_excuse" = x ]; then + # Check for libSDL libraries.] +AC_CHECK_LIB([SDL], [SDL_Init], [LIBSDL="-lSDL"], + [grub_emu_sdl_excuse=["libSDL libraries are required to build \`grub-emu' with SDL support"]]) + AC_SUBST([LIBSDL]) +[fi] + +[if [ x"$grub_emu_sdl_excuse" = x ]; then + # Check for headers.] + AC_CHECK_HEADERS([SDL/SDL.h], [], + [grub_emu_sdl_excuse=["libSDL header file is required to build \`grub-emu' with SDL support"]]) +[fi] + +if test x"enable_grub_emu_sdl" = xyes && test x"$grub_emu_sdl_excuse" != x ; then + AC_MSG_ERROR([SDL support for grub-emu was explicitely requested but can't be compiled]) +fi +if test x"$grub_emu_sdl_excuse" = x ; then +enable_grub_emu_sdl=yes +else +enable_grub_emu_sdl=no +fi + +if test x"$enable_grub_emu_pci" != xyes ; then + grub_emu_pci_excuse="not enabled" +fi + +if test x"$enable_grub_emu_usb" = xyes ; then + grub_emu_pci_excuse="conflicts with USB support" +fi + +[if [ x"$grub_emu_pci_excuse" = x ]; then + # Check for libpci libraries.] + AC_CHECK_LIB([pciaccess], [pci_system_init], [LIBPCIACCESS="-lpciaccess"], + [grub_emu_pci_excuse=["need libpciaccess library"]]) + AC_SUBST([LIBPCIACCESS]) +[fi] +[if [ x"$grub_emu_pci_excuse" = x ]; then + # Check for headers.] + AC_CHECK_HEADERS([pci/pci.h], [], + [grub_emu_pci_excuse=["need libpciaccess headers"]]) +[fi] + +if test x"$grub_emu_pci_excuse" = x ; then +enable_grub_emu_pci=yes +else + +enable_grub_emu_pci=no +fi + +AC_SUBST([enable_grub_emu_sdl]) +AC_SUBST([enable_grub_emu_usb]) +AC_SUBST([enable_grub_emu_pci]) +fi + +AC_ARG_ENABLE([grub-fstest], + [AS_HELP_STRING([--enable-grub-fstest], + [build and install the `grub-fstest' debugging utility (default=guessed)])]) +if test x"$enable_grub_fstest" = xno ; then + grub_fstest_excuse="explicitly disabled" +fi +if test x"$grub_fstest_excuse" = x ; then +enable_grub_fstest=yes +else +enable_grub_fstest=no +fi +AC_SUBST([enable_grub_fstest]) + +AC_ARG_ENABLE([grub-mkfont], + [AS_HELP_STRING([--enable-grub-mkfont], + [build and install the `grub-mkfont' utility (default=guessed)])]) +if test x"$enable_grub_mkfont" = xno ; then + grub_mkfont_excuse="explicitly disabled" +fi + +if test x"$grub_mkfont_excuse" = x ; then + # Check for freetype libraries. + AC_CHECK_PROGS([FREETYPE], [freetype-config]) + if test "x$FREETYPE" = x ; then + grub_mkfont_excuse=["need freetype2 library"] + fi + freetype_cflags=`freetype-config --cflags` + freetype_libs=`freetype-config --libs` +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 + AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled]) +fi +if test x"$grub_mkfont_excuse" = x ; then +enable_grub_mkfont=yes +else +enable_grub_mkfont=no +fi +AC_SUBST([enable_grub_mkfont]) +AC_SUBST([freetype_cflags]) +AC_SUBST([freetype_libs]) + +AC_SUBST([FONT_SOURCE]) +AS_IF([test x$target_cpu = xi386 -a x$platform = xpc], + [AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x8200)]) +AS_IF([test x$target_cpu = xi386 -a x$platform = xcoreboot], + [AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x8200)]) +AS_IF([test x$target_cpu = xmips -a x$platform = xyeeloong], + [AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x80200000)]) +AS_IF([test x$target_cpu = xpowerpc -a x$platform = xieee1275], + [AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x200000)]) +AS_IF([test x$target_cpu = xi386 -a x$platform = xqemu], + [AC_SUBST([GRUB_BOOT_MACHINE_LINK_ADDR], 0xffe00)]) +AS_IF([test x$target_cpu = xi386 -a x$platform = xieee1275], + [AC_SUBST([GRUB_KERNEL_MACHINE_LINK_ADDR], 0x10000)]) +AS_IF([test x$TARGET_APPLE_CC = x1], + [AC_SUBST([USE_APPLE_CC_FIXES], yes)]) + +# +# Automake conditionals +# + +AM_CONDITIONAL([COND_emu], [test x$platform = xemu]) +AM_CONDITIONAL([COND_i386_pc], [test x$target_cpu = xi386 -a x$platform = xpc]) +AM_CONDITIONAL([COND_i386_efi], [test x$target_cpu = xi386 -a x$platform = xefi]) +AM_CONDITIONAL([COND_i386_coreboot], [test x$target_cpu = xi386 -a x$platform = xcoreboot]) +AM_CONDITIONAL([COND_i386_ieee1275], [test x$target_cpu = xi386 -a x$platform = xieee1275]) +AM_CONDITIONAL([COND_i386_qemu], [test x$target_cpu = xi386 -a x$platform = xqemu]) +AM_CONDITIONAL([COND_x86_64_efi], [test x$target_cpu = xx86_64 -a x$platform = xefi]) +AM_CONDITIONAL([COND_mips_yeeloong], [test x$target_cpu = xmips -a x$platform = xyeeloong]) +AM_CONDITIONAL([COND_mips_qemu_mips], [test x$target_cpu = xmips -a x$platform = xqemu_mips]) +AM_CONDITIONAL([COND_sparc64_ieee1275], [test x$target_cpu = xsparc64 -a x$platform = xieee1275]) +AM_CONDITIONAL([COND_powerpc_ieee1275], [test x$target_cpu = xpowerpc -a x$platform = xieee1275]) + +AM_CONDITIONAL([COND_MAN_PAGES], [test x$cross_compiling = xno -a x$HELP2MAN != x]) +AM_CONDITIONAL([COND_GRUB_EMU_USB], [test x$enable_grub_emu_usb = xyes]) +AM_CONDITIONAL([COND_GRUB_EMU_SDL], [test x$enable_grub_emu_sdl = xyes]) +AM_CONDITIONAL([COND_GRUB_EMU_PCI], [test x$enable_grub_emu_pci = xyes]) +AM_CONDITIONAL([COND_GRUB_MKFONT], [test x$enable_grub_mkfont = xyes]) +AM_CONDITIONAL([COND_HAVE_FONT_SOURCE], [test x$FONT_SOURCE != x]) +AM_CONDITIONAL([COND_GRUB_FSTEST], [test x$enable_grub_fstest = xyes]) +AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes]) + diff --git a/docs/Makefile.am b/docs/Makefile.am new file mode 100644 index 000000000..ab65a8dd2 --- /dev/null +++ b/docs/Makefile.am @@ -0,0 +1,6 @@ +AUTOMAKE_OPTIONS = subdir-objects +AM_MAKEINFOFLAGS = --force --no-split --no-validate + +info_TEXINFOS = grub.texi +grub_TEXINFOS = fdl.texi + diff --git a/geninit.sh b/geninit.sh index 43d2d1640..f0810120f 100644 --- a/geninit.sh +++ b/geninit.sh @@ -11,11 +11,6 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -lst="$1" -shift - -header=`echo "${lst}" | sed -e "s/\.lst$/.h/g"` - cat <. */ -#include <$header> +#include EOF +for mod in "$@"; do + echo "extern void grub_${mod}_init (void);" + echo "extern void grub_${mod}_fini (void);" +done + cat </dev/null; then - echo $line | sed -e 's/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/ grub_\1_init ();/' - fi -done < ${lst} +for mod in "$@"; do + echo "grub_${mod}_init ();" +done cat </dev/null; then - echo $line | sed -e 's/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/ grub_\1_fini ();/' - fi -done < ${lst} +for mod in "$@"; do + echo "grub_${mod}_fini ();" +done cat <. - */ - -EOF - -cat </dev/null 2>&1 && u="_" - -$CC @TARGET_CFLAGS@ -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I"$srcdir/include" $* \ - | grep -v '^#' \ - | sed -n \ - -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \ - -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \ - | sort -u diff --git a/genmk.rb b/genmk.rb deleted file mode 100644 index e62dbd4f6..000000000 --- a/genmk.rb +++ /dev/null @@ -1,475 +0,0 @@ -#! /usr/bin/ruby -w -# -# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc. -# -# This genmk.rb 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. - -module Enumerable - def collect_with_index - ret = [] - self.each_with_index do |item, index| - ret.push(yield(item, index)) - end - ret - end -end - -class String - def to_var - self.gsub(/[^a-zA-Z0-9_@]/, '_') - end - - def suffix(str) - self.sub(/\.[^\.]*$/, '') + '.' + str - end - - def to_obj - self.sub(/\.[^\.]*$/, '').to_var + '.o' - end -end - -class Image - def initialize(dir, name) - @dir = dir - @name = name - @rule_count = 0 - end - attr_reader :dir, :name - - def rule(sources) - prefix = @name.to_var - @rule_count += 1 - exe = @name.suffix('exec') - objs = sources.collect do |src| - raise "unknown source file `#{src}'" if /\.[cS]$/ !~ src - prefix + '-' + src.to_obj - end - objs_str = objs.join(' ') - deps = objs.collect {|obj| obj.suffix('d')} - deps_str = deps.join(' ') - -" -clean-image-#{@name}.#{@rule_count}: - rm -f #{@name} #{exe} #{objs_str} - -CLEAN_IMAGE_TARGETS += clean-image-#{@name}.#{@rule_count} - -mostlyclean-image-#{@name}.#{@rule_count}: - rm -f #{deps_str} - -MOSTLYCLEAN_IMAGE_TARGETS += mostlyclean-image-#{@name}.#{@rule_count} - -ifneq ($(TARGET_APPLE_CC),1) -#{@name}: #{exe} - $(OBJCOPY) -O $(#{prefix}_FORMAT) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@ -else -ifneq (#{exe},kernel.exec) -#{@name}: #{exe} ./grub-macho2img - ./grub-macho2img $< $@ -else -#{@name}: #{exe} ./grub-macho2img - ./grub-macho2img --bss $< $@ -endif -endif - -#{exe}: #{objs_str} - $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS) - -" + objs.collect_with_index do |obj, i| - src = sources[i] - fake_obj = File.basename(src).suffix('o') - dep = deps[i] - flag = if /\.c$/ =~ src then 'CFLAGS' else 'ASFLAGS' end - extra_flags = if /\.S$/ =~ src then '-DASM_FILE=1' else '' end - dir = File.dirname(src) - - "#{obj}: #{src} $(#{src}_DEPENDENCIES) - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -DGRUB_FILE=\\\"#{src}\\\" -MD -c -o $@ $< --include #{dep} - -" - end.join('') - end -end - -# Use PModule instead Module, to avoid name conflicting. -class PModule - def initialize(dir, name) - @dir = dir - @name = name - @rule_count = 0 - end - attr_reader :dir, :name - - def rule(sources) - prefix = @name.to_var - @rule_count += 1 - objs = sources.collect do |src| - raise "unknown source file `#{src}'" if /\.[cS]$/ !~ src - prefix + '-' + src.to_obj - end - objs_str = objs.join(' ') - deps = objs.collect {|obj| obj.suffix('d')} - deps_str = deps.join(' ') - pre_obj = 'pre-' + @name.suffix('o') - mod_src = 'mod-' + @name.suffix('c') - mod_obj = mod_src.suffix('o') - defsym = 'def-' + @name.suffix('lst') - undsym = 'und-' + @name.suffix('lst') - mod_name = File.basename(@name, '.mod') - symbolic_name = mod_name.sub(/\.[^\.]*$/, '') - -" -clean-module-#{@name}.#{@rule_count}: - rm -f #{@name} #{mod_obj} #{mod_src} #{pre_obj} #{objs_str} #{undsym} - -CLEAN_MODULE_TARGETS += clean-module-#{@name}.#{@rule_count} - -clean-module-#{@name}-symbol.#{@rule_count}: - rm -f #{defsym} - -CLEAN_MODULE_TARGETS += clean-module-#{@name}-symbol.#{@rule_count} -DEFSYMFILES += #{defsym} -mostlyclean-module-#{@name}.#{@rule_count}: - rm -f #{deps_str} - -MOSTLYCLEAN_MODULE_TARGETS += mostlyclean-module-#{@name}.#{@rule_count} -UNDSYMFILES += #{undsym} - -ifeq ($(TARGET_NO_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) -#{@name}: #{pre_obj} #{mod_obj} $(TARGET_OBJ2ELF) - -rm -f $@ - $(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 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 -#{@name}: #{pre_obj} #{mod_obj} $(TARGET_OBJ2ELF) - -rm -f $@ - -rm -f $@.bin - $(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@.bin #{pre_obj} #{mod_obj} - $(OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -wd1106 -ew2030 -ew2050 -nu -nd $@.bin $@ - -rm -f $@.bin -endif -endif - -#{pre_obj}: $(#{prefix}_DEPENDENCIES) #{objs_str} - -rm -f $@ - $(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ #{objs_str} - -#{mod_obj}: #{mod_src} - $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(#{prefix}_CFLAGS) -DGRUB_FILE=\\\"#{mod_src}\\\" -c -o $@ $< - -#{mod_src}: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh - sh $(srcdir)/genmodsrc.sh '#{mod_name}' $< > $@ || (rm -f $@; exit 1) - -ifneq ($(TARGET_APPLE_CC),1) -#{defsym}: #{pre_obj} - $(NM) -g --defined-only -P -p $< | sed 's/^\\([^ ]*\\).*/\\1 #{mod_name}/' > $@ -else -#{defsym}: #{pre_obj} - $(NM) -g -P -p $< | grep -E '^[a-zA-Z0-9_]* [TDS]' | sed 's/^\\([^ ]*\\).*/\\1 #{mod_name}/' > $@ -endif - -#{undsym}: #{pre_obj} - echo '#{mod_name}' > $@ - $(NM) -u -P -p $< | cut -f1 -d' ' >> $@ - -" + objs.collect_with_index do |obj, i| - src = sources[i] - fake_obj = File.basename(src).suffix('o') - extra_target = obj.sub(/\.[^\.]*$/, '') + '-extra' - command = 'cmd-' + obj.suffix('lst') - fs = 'fs-' + obj.suffix('lst') - partmap = 'partmap-' + obj.suffix('lst') - handler = 'handler-' + obj.suffix('lst') - terminal = 'terminal-' + obj.suffix('lst') - parttool = 'parttool-' + obj.suffix('lst') - video = 'video-' + obj.suffix('lst') - dep = deps[i] - flag = if /\.c$/ =~ src then 'CFLAGS' else 'ASFLAGS' end - extra_flags = if /\.S$/ =~ src then '-DASM_FILE=1' else '' end - dir = File.dirname(src) - - "#{obj}: #{src} $(#{src}_DEPENDENCIES) - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -DGRUB_FILE=\\\"#{src}\\\" -MD -c -o $@ $< --include #{dep} - -clean-module-#{extra_target}.#{@rule_count}: - rm -f #{command} #{fs} #{partmap} #{handler} #{parttool} #{video} #{terminal} - -CLEAN_MODULE_TARGETS += clean-module-#{extra_target}.#{@rule_count} - -COMMANDFILES += #{command} -FSFILES += #{fs} -PARTTOOLFILES += #{parttool} -PARTMAPFILES += #{partmap} -HANDLERFILES += #{handler} -TERMINALFILES += #{terminal} -VIDEOFILES += #{video} - -#{command}: #{src} $(#{src}_DEPENDENCIES) gencmdlist.sh - set -e; \ - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ - | sh $(srcdir)/gencmdlist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) - -#{fs}: #{src} $(#{src}_DEPENDENCIES) genfslist.sh - set -e; \ - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ - | sh $(srcdir)/genfslist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) - -#{parttool}: #{src} $(#{src}_DEPENDENCIES) genparttoollist.sh - set -e; \ - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ - | sh $(srcdir)/genparttoollist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) - -#{partmap}: #{src} $(#{src}_DEPENDENCIES) genpartmaplist.sh - set -e; \ - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ - | sh $(srcdir)/genpartmaplist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) - -#{handler}: #{src} $(#{src}_DEPENDENCIES) genhandlerlist.sh - set -e; \ - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ - | sh $(srcdir)/genhandlerlist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) - -#{terminal}: #{src} $(#{src}_DEPENDENCIES) genterminallist.sh - set -e; \ - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ - | sh $(srcdir)/genterminallist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) - -#{video}: #{src} $(#{src}_DEPENDENCIES) genvideolist.sh - set -e; \ - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ - | sh $(srcdir)/genvideolist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) - -" - end.join('') - end -end - -class Utility - def initialize(dir, name) - @dir = dir - @name = name - @rule_count = 0 - end - def print_tail() - prefix = @name.to_var - print "#{@name}: $(#{prefix}_DEPENDENCIES) $(#{prefix}_OBJECTS) - $(CC) -o $@ $(#{prefix}_OBJECTS) $(LDFLAGS) $(#{prefix}_LDFLAGS) - -" - end - attr_reader :dir, :name - - def rule(sources) - prefix = @name.to_var - @rule_count += 1 - objs = sources.collect do |src| - raise "unknown source file `#{src}'" if /\.[cS]$/ !~ src - prefix + '-' + src.to_obj - end - objs_str = objs.join(' '); - deps = objs.collect {|obj| obj.suffix('d')} - deps_str = deps.join(' '); - - " -clean-utility-#{@name}.#{@rule_count}: - rm -f #{@name}$(EXEEXT) #{objs_str} - -CLEAN_UTILITY_TARGETS += clean-utility-#{@name}.#{@rule_count} - -mostlyclean-utility-#{@name}.#{@rule_count}: - rm -f #{deps_str} - -MOSTLYCLEAN_UTILITY_TARGETS += mostlyclean-utility-#{@name}.#{@rule_count} - -#{prefix}_OBJECTS += #{objs_str} - -" + objs.collect_with_index do |obj, i| - src = sources[i] - fake_obj = File.basename(src).suffix('o') - dep = deps[i] - dir = File.dirname(src) - - "#{obj}: #{src} $(#{src}_DEPENDENCIES) - $(CC) -I#{dir} -I$(srcdir)/#{dir} $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(#{prefix}_CFLAGS) -DGRUB_FILE=\\\"#{src}\\\" -MD -c -o $@ $< --include #{dep} - -" - end.join('') - end -end - -class Program - def initialize(dir, name) - @dir = dir - @name = name - end - attr_reader :dir, :name - - def print_tail() - prefix = @name.to_var - print "CLEANFILES += #{@name} $(#{prefix}_OBJECTS) -ifeq ($(#{prefix}_RELOCATABLE),yes) -#{@name}: $(#{prefix}_DEPENDENCIES) $(#{prefix}_OBJECTS) - $(TARGET_CC) -Wl,-r,-d -o $@ $(#{prefix}_OBJECTS) $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS) - if test x$(TARGET_NO_STRIP) != xyes ; then $(STRIP) --strip-unneeded -K start -R .note -R .comment $@; fi -else -#{@name}: $(#{prefix}_DEPENDENCIES) $(#{prefix}_OBJECTS) - $(TARGET_CC) -o $@ $(#{prefix}_OBJECTS) $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS) - if test x$(TARGET_NO_STRIP) != xyes ; then $(STRIP) -R .rel.dyn -R .reginfo -R .note -R .comment $@; fi -endif - -" - end - - def rule(sources) - prefix = @name.to_var - objs = sources.collect do |src| - raise "unknown source file `#{src}'" if /\.[cS]$/ !~ src - prefix + '-' + src.to_obj - end - deps = objs.collect {|obj| obj.suffix('d')} - deps_str = deps.join(' '); - - "MOSTLYCLEANFILES += #{deps_str} - -" + objs.collect_with_index do |obj, i| - src = sources[i] - fake_obj = File.basename(src).suffix('o') - dep = deps[i] - flag = if /\.c$/ =~ src then 'CFLAGS' else 'ASFLAGS' end - extra_flags = if /\.S$/ =~ src then '-DASM_FILE=1' else '' end - dir = File.dirname(src) - - "#{obj}: #{src} $(#{src}_DEPENDENCIES) - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -DGRUB_FILE=\\\"#{src}\\\" -MD -c -o $@ $< - --include #{dep} - -#{prefix}_OBJECTS += #{obj} -" - end.join('') - end -end - -class Script - def initialize(dir, name) - @dir = dir - @name = name - end - attr_reader :dir, :name - - def rule(sources) - if sources.length != 1 - raise "only a single source file must be specified for a script" - end - src = sources[0] - if /\.in$/ !~ src - raise "unknown source file `#{src}'" - end - - "CLEANFILES += #{@name} - -#{@name}: #{src} $(#{src}_DEPENDENCIES) config.status - ./config.status --file=-:#{src} | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@ - chmod +x $@ - -" - end -end - -images = [] -utils = [] -pmodules = [] -programs = [] -scripts = [] - -l = gets -print l -print "# Generated by genmk.rb, please don't edit!\n" - -cont = false -str = nil -while l = gets - if cont - str += l - else - str = l - end - - print l - cont = (/\\$/ =~ l) - unless cont - str.gsub!(/\\\n/, ' ') - - if /^([a-zA-Z0-9_]+)\s*\+?=\s*(.*?)\s*$/ =~ str - var, args = $1, $2 - - if var =~ /^([a-zA-Z0-9_]+)_([A-Z]+)$/ - prefix, type = $1, $2 - - case type - when 'IMAGES' - images += args.split(/\s+/).collect do |img| - Image.new(prefix, img) - end - - when 'MODULES' - pmodules += args.split(/\s+/).collect do |pmod| - PModule.new(prefix, pmod) - end - - when 'UTILITIES' - utils += args.split(/\s+/).collect do |util| - Utility.new(prefix, util) - end - - when 'PROGRAMS' - programs += args.split(/\s+/).collect do |prog| - Program.new(prefix, prog) - end - - when 'SCRIPTS' - scripts += args.split(/\s+/).collect do |script| - Script.new(prefix, script) - end - - when 'SOURCES' - if img = images.detect() {|i| i.name.to_var == prefix} - print img.rule(args.split(/\s+/)) - elsif pmod = pmodules.detect() {|m| m.name.to_var == prefix} - print pmod.rule(args.split(/\s+/)) - elsif util = utils.detect() {|u| u.name.to_var == prefix} - print util.rule(args.split(/\s+/)) - elsif program = programs.detect() {|u| u.name.to_var == prefix} - print program.rule(args.split(/\s+/)) - elsif script = scripts.detect() {|s| s.name.to_var == prefix} - print script.rule(args.split(/\s+/)) - end - end - end - - end - - end - -end -utils.each {|util| util.print_tail()} -programs.each {|program| program.print_tail()} - diff --git a/gentpl.py b/gentpl.py new file mode 100644 index 000000000..214b58afd --- /dev/null +++ b/gentpl.py @@ -0,0 +1,460 @@ +#! /usr/bin/python + +# +# This is the python script used to generate Makefile.tpl +# + +GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot", + "i386_ieee1275", "x86_64_efi", "mips_yeeloong", "sparc64_ieee1275", + "powerpc_ieee1275" ] + +GROUPS = {} +GROUPS["i386"] = [ "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot", "i386_ieee1275" ] +GROUPS["x86_64"] = [ "x86_64_efi" ] +GROUPS["mips"] = [ "mips_yeeloong" ] +GROUPS["sparc64"] = [ "sparc64_ieee1275" ] +GROUPS["powerpc"] = [ "powerpc_ieee1275" ] +GROUPS["x86"] = GROUPS["i386"] + GROUPS["x86_64"] +GROUPS["x86_efi"] = [ "i386_efi", "x86_64_efi" ] +GROUPS["common"] = GRUB_PLATFORMS[:] +GROUPS["nonemu"] = GRUB_PLATFORMS[:] +GROUPS["nonemu"].remove("emu") + +# +# Create platform => groups reverse map, where groups covering that +# platform are ordered by their sizes +# +RMAP = {} +for platform in GRUB_PLATFORMS: + # initialize with platform itself as a group + RMAP[platform] = [ platform ] + + for k in GROUPS.keys(): + v = GROUPS[k] + # skip groups that don't cover this platform + if platform not in v: continue + + bigger = [] + smaller = [] + # partition currently known groups based on their size + for group in RMAP[platform]: + if group in GRUB_PLATFORMS: smaller.append(group) + elif len(GROUPS[group]) < len(v): smaller.append(group) + else: bigger.append(group) + # insert in the middle + RMAP[platform] = smaller + [ k ] + bigger + +# +# Global variables +# +GVARS = [] + +def gvar_add(var, value): + if var not in GVARS: + GVARS.append(var) + return var + " += " + value + "\n" + +def global_variable_initializers(): + r = "" + for var in GVARS: + r += var + " ?= \n" + return r + +# +# Per PROGRAM/SCRIPT variables +# + +def var_set(var, value): + return var + " = " + value + "\n" + +def var_add(var, value): + return var + " += " + value + "\n" + +# +# Autogen constructs +# + +def if_tag(tag, closure): + return "[+ IF " + tag + " +]" + closure() + "[+ ENDIF +]" + +def if_tag_defined(tag, closure): + return "[+ IF " + tag + " defined +]" + closure() + "[+ ENDIF +]" + +def for_tag(tag, closure): + return "[+ FOR ." + tag + " +]" + closure() + "[+ ENDFOR +]" + +def collect_values(tag, prefix=""): + return for_tag(tag, lambda: prefix + "[+ ." + tag + " +] ") + +def each_group(platform, suffix, closure): + r = None + for group in RMAP[platform]: + if r == None: + r = "[+ IF ." + group + suffix + " +]" + else: + r += "[+ ELIF ." + group + suffix + " +]" + + r += closure(group) + + if r: + r += "[+ ELSE +]" + r += closure(None) + r += "[+ ENDIF +]" + else: + r = closure(None) + + return r + +def each_platform(closure): + r = "" + for platform in GRUB_PLATFORMS: + for group in RMAP[platform]: + if group == RMAP[platform][0]: + r += "[+ IF ." + group + " defined +]" + else: + r += "[+ ELIF ." + group + " defined +]" + + r += "if COND_" + platform + "\n" + r += closure(platform) + r += "endif\n" + r += "[+ ENDIF +]" + return r + +def canonical_name(): return "[+ % name `echo -n %s | sed -e 's/[^0-9A-Za-z@_]/_/g'` +]" +def canonical_module(): return canonical_name() + "_module" +def canonical_kernel(): return canonical_name() + "_exec" +def canonical_image(): return canonical_name() + "_image" + +def shared_sources(prefix=""): return collect_values("shared", prefix) +def shared_nodist_sources(prefix=""): return collect_values("nodist_shared", prefix) + +def default_sources(prefix=""): return collect_values("source", prefix) +def default_nodist_sources(prefix=""): return collect_values("nodist", prefix) +def default_ldadd(): return collect_values("ldadd") +def default_cflags(): return collect_values("cflags") +def default_ldflags(): return collect_values("ldflags") +def default_cppflags(): return collect_values("cppflags") +def default_ccasflags(): return collect_values("ccasflags") + +def group_sources(group, prefix=""): return collect_values(group, prefix) if group else default_sources(prefix) +def group_nodist_sources(group, prefix=""): return collect_values(group + "_nodist", prefix) if group else default_nodist_sources(prefix) + +def platform_sources(platform, prefix=""): return each_group(platform, "", lambda g: collect_values(g, prefix) if g else default_sources(prefix)) +def platform_nodist_sources(platform, prefix=""): return each_group(platform, "_nodist", lambda g: collect_values(g + "_nodist", prefix) if g else default_nodist_sources(prefix)) + +def platform_ldadd(platform): return each_group(platform, "_ldadd", lambda g: collect_values(g + "_ldadd") if g else default_ldadd()) +def platform_cflags(platform): return each_group(platform, "_cflags", lambda g: collect_values(g + "_cflags") if g else default_cflags()) +def platform_ldflags(platform): return each_group(platform, "_ldflags", lambda g: collect_values(g + "_ldflags") if g else default_ldflags()) +def platform_cppflags(platform): return each_group(platform, "_cppflags", lambda g: collect_values(g + "_cppflags") if g else default_cppflags()) +def platform_ccasflags(platform): return each_group(platform, "_ccasflags", lambda g: collect_values(g + "_ccasflags") if g else default_ccasflags()) +def platform_format(platform): return each_group(platform, "_format", lambda g: collect_values(g + "_format") if g else "binary") + +def module(platform): + r = gvar_add("noinst_PROGRAMS", "[+ name +].module") + r += gvar_add("MODULE_FILES", "[+ name +].module") + + r += var_set(canonical_module() + "_SOURCES", platform_sources(platform) + "## platform sources") + r += var_add(canonical_module() + "_SOURCES", shared_sources() + "## shared sources") + r += var_set("nodist_" + canonical_module() + "_SOURCES", platform_nodist_sources(platform) + "## platform nodist sources") + r += var_add("nodist_" + canonical_module() + "_SOURCES", shared_nodist_sources() + "## shared nodist sources") + r += var_set(canonical_module() + "_LDADD", platform_ldadd(platform)) + r += var_set(canonical_module() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_MODULE) " + platform_cflags(platform)) + r += var_set(canonical_module() + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_MODULE) " + platform_ldflags(platform)) + r += var_set(canonical_module() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_MODULE) " + platform_cppflags(platform)) + r += var_set(canonical_module() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_MODULE) " + platform_ccasflags(platform)) + + r += gvar_add("BUILT_SOURCES", "$(nodist_" + canonical_module() + "_SOURCES)") + r += gvar_add("CLEANFILES", "$(nodist_" + canonical_module() + "_SOURCES)") + + r += gvar_add("DEF_FILES", "def-[+ name +].lst") + r += gvar_add("UND_FILES", "und-[+ name +].lst") + r += gvar_add("MOD_FILES", "[+ name +].mod") + r += gvar_add("platform_DATA", "[+ name +].mod") + r += gvar_add("CLEANFILES", "def-[+ name +].lst und-[+ name +].lst mod-[+ name +].c mod-[+ name +].o [+ name +].mod") + + r += gvar_add("COMMAND_FILES", "command-[+ name +].lst") + r += gvar_add("FS_FILES", "fs-[+ name +].lst") + r += gvar_add("VIDEO_FILES", "video-[+ name +].lst") + r += gvar_add("PARTMAP_FILES", "partmap-[+ name +].lst") + r += gvar_add("HANDLER_FILES", "handler-[+ name +].lst") + r += gvar_add("PARTTOOL_FILES", "parttool-[+ name +].lst") + r += gvar_add("TERMINAL_FILES", "terminal-[+ name +].lst") + r += gvar_add("CLEANFILES", "command-[+ name +].lst fs-[+ name +].lst") + r += gvar_add("CLEANFILES", "handler-[+ name +].lst terminal-[+ name +].lst") + r += gvar_add("CLEANFILES", "video-[+ name +].lst partmap-[+ name +].lst parttool-[+ name +].lst") + + r += """ +[+ name +].pp: $(""" + canonical_module() + """_SOURCES) $(nodist_""" + canonical_module() + """_SOURCES) + $(TARGET_CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(""" + canonical_module() + """_CPPFLAGS) $(CPPFLAGS) $^ > $@ || (rm -f $@; exit 1) + +def-[+ name +].lst: [+ name +].module + if test x$(USE_APPLE_CC_FIXES) = xyes; then \ + $(NM) -g -P -p $< | grep -E '^[a-zA-Z0-9_]* [TDS]' | sed "s/^\\([^ ]*\\).*/\\1 [+ name +]/" >> $@; \ + else \ + $(NM) -g --defined-only -P -p $< | sed "s/^\\([^ ]*\\).*/\\1 [+ name +]/" >> $@; \ + fi + +und-[+ name +].lst: [+ name +].module + $(NM) -u -P -p $< | sed "s/^\\([^ ]*\\).*/\\1 [+ name +]/" >> $@ + +mod-[+ name +].c: [+ name +].module $(top_builddir)/moddep.lst $(top_srcdir)/genmodsrc.sh + sh $(top_srcdir)/genmodsrc.sh [+ name +] $(top_builddir)/moddep.lst > $@ || (rm -f $@; exit 1) + +mod-[+ name +].o: mod-[+ name +].c + $(TARGET_CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS_MODULE) $(CPPFLAGS) $(CFLAGS_MODULE) $(CFLAGS) -c -o $@ $< + +[+ name +].mod: [+ name +].module mod-[+ name +].o + if test x$(USE_APPLE_CC_FIXES) = xyes; then \ + $(CCLD) $(LDFLAGS_MODULE) $(LDFLAGS) -o $@.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; \ + else \ + $(CCLD) -o $@ $(LDFLAGS_MODULE) $(LDFLAGS) $^; \ + 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 $@; \ + fi + +command-[+ name +].lst: [+ name +].pp $(top_srcdir)/gencmdlist.sh + cat $< | sh $(top_srcdir)/gencmdlist.sh [+ name +] > $@ || (rm -f $@; exit 1) + +fs-[+ name +].lst: [+ name +].pp $(top_srcdir)/genfslist.sh + cat $< | sh $(top_srcdir)/genfslist.sh [+ name +] > $@ || (rm -f $@; exit 1) + +video-[+ name +].lst: [+ name +].pp $(top_srcdir)/genvideolist.sh + cat $< | sh $(top_srcdir)/genvideolist.sh [+ name +] > $@ || (rm -f $@; exit 1) + +partmap-[+ name +].lst: [+ name +].pp $(top_srcdir)/genpartmaplist.sh + cat $< | sh $(top_srcdir)/genpartmaplist.sh [+ name +] > $@ || (rm -f $@; exit 1) + +parttool-[+ name +].lst: [+ name +].pp $(top_srcdir)/genparttoollist.sh + cat $< | sh $(top_srcdir)/genparttoollist.sh [+ name +] > $@ || (rm -f $@; exit 1) + +handler-[+ name +].lst: [+ name +].pp $(top_srcdir)/genhandlerlist.sh + cat $< | sh $(top_srcdir)/genhandlerlist.sh [+ name +] > $@ || (rm -f $@; exit 1) + +terminal-[+ name +].lst: [+ name +].pp $(top_srcdir)/genterminallist.sh + cat $< | sh $(top_srcdir)/genterminallist.sh [+ name +] > $@ || (rm -f $@; exit 1) +""" + return r + +def rule(target, source, cmd): + if cmd[0] == "\n": + return "\n" + target + ": " + source + cmd.replace("\n", "\n\t") + "\n" + else: + return "\n" + target + ": " + source + "\n\t" + cmd.replace("\n", "\n\t") + "\n" + +def image_nostrip(platform): + return if_tag_defined("image_nostrip." + platform, lambda: rule("[+ name +].img", "[+ name +].exec", "cp $< $@")) + +def image_strip(platform): + return if_tag_defined("image_strip." + platform, lambda: rule("[+ name +].img", "[+ name +].exec", "$(STRIP) -o $@ -R .rel.dyn -R .reginfo -R .note -R .comment $<")) + +def image_strip_keep_kernel(platform): + return if_tag_defined("image_strip_keep_kernel." + platform, lambda: rule("[+ name +].img", "[+ name +].exec", "$(STRIP) -o $@ --strip-unneeded -K start -R .note -R .comment $<")) + +def image_strip_macho2img(platform): + return if_tag_defined("image_strip_macho2img." + platform, lambda: rule("[+ name +].img", "[+ name +].exec", """ +if test "x$(TARGET_APPLE_CC)" = x1; then \ + $(MACHO2IMG) --bss $< $@ || exit 1; \ +else \ + $(STRIP) -o $@ -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< || exit 1; \ +fi +""")) + +def kernel(platform): + r = gvar_add("noinst_PROGRAMS", "[+ name +].exec") + r += var_set(canonical_kernel() + "_SOURCES", platform_sources(platform)) + r += var_add(canonical_kernel() + "_SOURCES", shared_sources()) + r += var_set("nodist_" + canonical_kernel() + "_SOURCES", platform_nodist_sources(platform) + "## platform nodist sources") + r += var_add("nodist_" + canonical_kernel() + "_SOURCES", shared_nodist_sources() + "## shared nodist sources") + r += var_set(canonical_kernel() + "_LDADD", platform_ldadd(platform)) + r += var_set(canonical_kernel() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_KERNEL) " + platform_cflags(platform)) + r += var_set(canonical_kernel() + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_KERNEL) " + platform_ldflags(platform)) + r += var_set(canonical_kernel() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) " + platform_cppflags(platform)) + r += var_set(canonical_kernel() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_KERNEL) " + platform_ccasflags(platform)) + + r += gvar_add("BUILT_SOURCES", "$(nodist_" + canonical_kernel() + "_SOURCES)") + r += gvar_add("CLEANFILES", "$(nodist_" + canonical_kernel() + "_SOURCES)") + + r += gvar_add("platform_DATA", "[+ name +].img") + r += image_nostrip(platform) + r += image_strip(platform) + r += image_strip_keep_kernel(platform) + r += image_strip_macho2img(platform) + return r + +def image(platform): + r = gvar_add("noinst_PROGRAMS", "[+ name +].image") + r += var_set(canonical_image() + "_SOURCES", platform_sources(platform)) + r += var_add(canonical_image() + "_SOURCES", shared_sources()) + r += var_set("nodist_" + canonical_image() + "_SOURCES", platform_nodist_sources(platform) + "## platform nodist sources") + r += var_add("nodist_" + canonical_image() + "_SOURCES", shared_nodist_sources() + "## shared nodist sources") + r += var_set(canonical_image() + "_LDADD", platform_ldadd(platform)) + r += var_set(canonical_image() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_IMAGE) " + platform_cflags(platform)) + r += var_set(canonical_image() + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_IMAGE) " + platform_ldflags(platform)) + r += var_set(canonical_image() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_IMAGE) " + platform_cppflags(platform)) + r += var_set(canonical_image() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_IMAGE) " + platform_ccasflags(platform)) + + r += gvar_add("BUILT_SOURCES", "$(nodist_" + canonical_image() + "_SOURCES)") + r += gvar_add("CLEANFILES", "$(nodist_" + canonical_image() + "_SOURCES)") + + r += gvar_add("platform_DATA", "[+ name +].img") + r += rule("[+ name +].img", "[+ name +].image", """ +if test x$(USE_APPLE_CC_FIXES) = xyes; then \ + $(MACHO2IMG) $< $@; \ +else \ + $(OBJCOPY) -O """ + platform_format(platform) + """ --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; \ +fi +""") + return r + +def library(platform): + r = gvar_add("noinst_LIBRARIES", "[+ name +]") + r += var_set(canonical_name() + "_SOURCES", platform_sources(platform)) + r += var_add(canonical_name() + "_SOURCES", shared_sources()) + r += var_set("nodist_" + canonical_name() + "_SOURCES", platform_nodist_sources(platform)) + r += var_add("nodist_" + canonical_name() + "_SOURCES", shared_nodist_sources()) + r += var_set(canonical_name() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_LIBRARY) " + platform_cflags(platform)) + r += var_set(canonical_name() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) " + platform_cppflags(platform)) + r += var_set(canonical_name() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY) " + platform_ccasflags(platform)) + + r += gvar_add("BUILT_SOURCES", "$(nodist_" + canonical_name() + "_SOURCES)") + r += gvar_add("CLEANFILES", "$(nodist_" + canonical_name() + "_SOURCES)") + + return r + +def installdir(default="bin"): + return "[+ IF installdir +][+ installdir +][+ ELSE +]" + default + "[+ ENDIF +]" + +def manpage(): + r = "if COND_MAN_PAGES\n" + r += "man_MANS += [+ name +].[+ mansection +]\n" + r += rule("[+ name +].[+ mansection +]", "", """ +$(MAKE) $(AM_MAKEFLAGS) [+ name +] +chmod a+x [+ name +] +$(HELP2MAN) --section=[+ mansection +] -o $@ ./[+ name +] +""") + r += gvar_add("CLEANFILES", "[+ name +].[+ mansection +]") + r += "endif\n" + return r + +def program(platform, test=False): + if test: + r = gvar_add("check_PROGRAMS", "[+ name +]") + else: + r = gvar_add(installdir() + "_PROGRAMS", "[+ name +]") + + r += var_set(canonical_name() + "_SOURCES", platform_sources(platform)) + r += var_add(canonical_name() + "_SOURCES", shared_sources()) + r += var_set("nodist_" + canonical_name() + "_SOURCES", platform_nodist_sources(platform)) + r += var_add("nodist_" + canonical_name() + "_SOURCES", shared_nodist_sources()) + r += var_set(canonical_name() + "_LDADD", platform_ldadd(platform)) + r += var_set(canonical_name() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_PROGRAM) " + platform_cflags(platform)) + r += var_set(canonical_name() + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_PROGRAM) " + platform_ldflags(platform)) + r += var_set(canonical_name() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) " + platform_cppflags(platform)) + r += var_set(canonical_name() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_PROGRAM) " + platform_ccasflags(platform)) + + r += gvar_add("BUILT_SOURCES", "$(nodist_" + canonical_name() + "_SOURCES)") + r += gvar_add("CLEANFILES", "$(nodist_" + canonical_name() + "_SOURCES)") + + if test: + r += if_tag_defined("enable", lambda: gvar_add("TESTS", "[+ name +]")) + else: + r += if_tag("mansection", lambda: manpage()) + + return r + +def test_program(platform): + return program(platform, True) + +def data(platform): + return gvar_add(installdir() + "_DATA", platform_sources(platform)) + +def script(platform, test=False): + if test: + r = gvar_add("check_SCRIPTS", "[+ name +]") + else: + r = gvar_add(installdir() + "_SCRIPTS", "[+ name +]") + + r += rule("[+ name +]", "$(top_builddir)/config.status " + platform_sources(platform), """ +$(top_builddir)/config.status --file=-:""" + platform_sources(platform) + """ \ + | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@ +chmod a+x [+ name +] +""") + + r += gvar_add("CLEANFILES", "[+ name +]") + r += gvar_add("EXTRA_DIST", platform_sources(platform)) + + if test: + r += if_tag_defined("enable", lambda: gvar_add("TESTS", "[+ name +]")) + else: + r += if_tag("mansection", lambda: manpage()) + + return r + +def test_script(platform): + return script(platform, True) + +def with_enable_condition(x): + return "[+ IF enable +]if [+ enable +]\n" + x + "endif\n[+ ELSE +]" + x + "[+ ENDIF +]" + +def module_rules(): + return for_tag("module", lambda: with_enable_condition(each_platform(lambda p: module(p)))) + +def kernel_rules(): + return for_tag("kernel", lambda: with_enable_condition(each_platform(lambda p: kernel(p)))) + +def image_rules(): + return for_tag("image", lambda: with_enable_condition(each_platform(lambda p: image(p)))) + +def library_rules(): + return for_tag("library", lambda: with_enable_condition(each_platform(lambda p: library(p)))) + +def program_rules(): + return for_tag("program", lambda: with_enable_condition(each_platform(lambda p: program(p)))) + +def script_rules(): + return for_tag("script", lambda: with_enable_condition(each_platform(lambda p: script(p)))) + +def data_rules(): + return for_tag("data", lambda: with_enable_condition(each_platform(lambda p: data(p)))) + +def test_program_rules(): + return for_tag("test_program", lambda: with_enable_condition(each_platform(lambda p: test_program(p)))) + +def test_script_rules(): + return for_tag("test_script", lambda: with_enable_condition(each_platform(lambda p: test_script(p)))) + +print "[+ AutoGen5 template +]\n" +a = module_rules() +b = kernel_rules() +c = image_rules() +d = library_rules() +e = program_rules() +f = script_rules() +g = data_rules() +h = test_program_rules() +i = test_script_rules() +z = global_variable_initializers() + +print z # initializer for all vars +print a +print b +print c +print d +print e +print f +print g +print h +print i + +print """.PRECIOUS: modules.am +$(srcdir)/modules.am: $(srcdir)/modules.def $(top_srcdir)/Makefile.tpl + autogen -T $(top_srcdir)/Makefile.tpl $(srcdir)/modules.def | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1) + mv $@.new $@ + +.PRECIOUS: $(top_srcdir)/Makefile.tpl +$(top_srcdir)/Makefile.tpl: $(top_srcdir)/gentpl.py + python $(top_srcdir)/gentpl.py | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1) + mv $@.new $@ +""" diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am new file mode 100644 index 000000000..1f2657656 --- /dev/null +++ b/grub-core/Makefile.am @@ -0,0 +1,155 @@ +AUTOMAKE_OPTIONS = subdir-objects +SUBDIRS = po +DEPDIR = .deps-core + +include $(top_srcdir)/Makefile.extra-dist +include $(top_srcdir)/Makefile.vars + +LDADD_KERNEL = -lgcc +CFLAGS_KERNEL = $(TARGET_CFLAGS) $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding +LDFLAGS_KERNEL = $(TARGET_LDFLAGS) $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N -static-libgcc +CPPFLAGS_KERNEL = $(TARGET_CPPFLAGS) $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) +CCASFLAGS_KERNEL = $(TARGET_CCASFLAGS) $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM) + +CFLAGS_MODULE = $(TARGET_CFLAGS) $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding +LDFLAGS_MODULE = $(TARGET_LDFLAGS) $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-r,-d +CPPFLAGS_MODULE = $(TARGET_CPPFLAGS) $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) +CCASFLAGS_MODULE = $(TARGET_CCASFLAGS) $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM) + +CFLAGS_IMAGE = $(TARGET_CFLAGS) $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -fno-builtin +LDFLAGS_IMAGE = $(TARGET_LDFLAGS) $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-S +CPPFLAGS_IMAGE = $(TARGET_CPPFLAGS) $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) +CCASFLAGS_IMAGE = $(TARGET_CCASFLAGS) $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM) + +CFLAGS_LIBRARY = $(TARGET_CFLAGS) $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -fno-builtin +CPPFLAGS_LIBRARY = $(TARGET_CPPFLAGS) $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) +CCASFLAGS_LIBRARY = $(TARGET_CCASFLAGS) $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM) + +CFLAGS_PROGRAM = $(TARGET_CFLAGS) $(CFLAGS_CPU) $(CFLAGS_PLATFORM) +LDFLAGS_PROGRAM = $(TARGET_LDFLAGS) $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) +CPPFLAGS_PROGRAM = $(TARGET_CPPFLAGS) $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) +CCASFLAGS_PROGRAM = $(TARGET_CCASFLAGS) $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM) + +AM_CFLAGS = +AM_LDFLAGS = +AM_CPPFLAGS = $(CPPFLAGS_GRUB) -DGRUB_FILE=\"$(subst $(top_srcdir)/,,$<)\" +AM_CCASFLAGS = -DASM_FILE=1 + +# gentrigtables +gentrigtables: $(top_srcdir)/gentrigtables.c + $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(CPPFLAGS) -lm $< +CLEANFILES += gentrigtables + +# trigtables.c +trigtables.c: gentrigtables.c configure.ac + $(MAKE) $(AM_MAKEFLAGS) gentrigtables + $(top_builddir)/gentrigtables > $@ +CLEANFILES += trigtables.c + +# XXX Use Automake's LEX & YACC support +# See Recording Dependencies Manually in automake doc for below rules +script/sh_module-lexer.$(OBJEXT):grub_script.tab.h +grub_script.tab.c grub_script.tab.h: $(top_srcdir)/script/parser.y + $(YACC) -d -p grub_script_yy -b grub_script $(top_srcdir)/script/parser.y +CLEANFILES += grub_script.tab.c grub_script.tab.h + +# For the lexer. +# See Recording Dependencies Manually in automake doc for below rules +script/sh_module-lexer.$(OBJEXT):grub_script.yy.h +grub_script.yy.c grub_script.yy.h: $(top_srcdir)/script/yylex.l + $(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $(top_srcdir)/script/yylex.l +CLEANFILES += grub_script.yy.c grub_script.yy.h + +include $(srcdir)/modules.am +include $(srcdir)/Makefile.kernel + +# .lst files +platform_DATA += moddep.lst +platform_DATA += fs.lst +platform_DATA += command.lst +platform_DATA += partmap.lst +platform_DATA += handler.lst +platform_DATA += terminal.lst +platform_DATA += parttool.lst +platform_DATA += video.lst +platform_DATA += crypto.lst +CLEANFILES += moddep.lst +CLEANFILES += fs.lst +CLEANFILES += command.lst +CLEANFILES += partmap.lst +CLEANFILES += handler.lst +CLEANFILES += terminal.lst +CLEANFILES += parttool.lst +CLEANFILES += video.lst +CLEANFILES += crypto.lst + +fs.lst: $(FS_FILES) + cat $^ /dev/null | sort | uniq > $@ +command.lst: $(COMMAND_FILES) + cat $^ /dev/null | sort | uniq > $@ +partmap.lst: $(PARTMAP_FILES) + cat $^ /dev/null | sort | uniq > $@ +handler.lst: $(HANDLER_FILES) + cat $^ /dev/null | sort | uniq > $@ +terminal.lst: $(TERMINAL_FILES) + cat $^ /dev/null | sort | uniq > $@ +parttool.lst: $(PARTTOOL_FILES) + cat $^ /dev/null | sort | uniq > $@ +video.lst: $(VIDEO_FILES) + cat $^ /dev/null | sort | uniq > $@ + +# but, crypto.lst is simply copied +crypto.lst: $(top_srcdir)/lib/libgcrypt-grub/cipher/crypto.lst + cp $^ $@ + +# generate global module dependencies list +moddep.lst: kernel_syms.lst genmoddep.awk $(DEF_FILES) $(UND_FILES) + cat $(DEF_FILES) kernel_syms.lst /dev/null \ + | $(AWK) -f $(top_srcdir)/genmoddep.awk $(UND_FILES) > $@ \ + || (rm -f $@; exit 1) + +if COND_i386_pc +if COND_ENABLE_EFIEMU +efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF) + -rm -f $@; \ + if test "x$(TARGET_APPLE_CC)" = x1; then \ + $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_GRUB) -DELF32 -DAPPLE_CC -m32 -Wall -Werror -nostdlib -O2 -c -o $@.bin $< || exit 1; \ + $(OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \ + rm -f $@.bin; \ + else \ + $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_GRUB) -DELF32 -m32 -Wall -Werror -nostdlib -O2 -c -o $@ $< || exit 1; \ + if test ! -z "$(TARGET_OBJ2ELF)"; then $(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi; \ + fi + +efiemu64_c.o: efiemu/runtime/efiemu.c + if test "x$(TARGET_APPLE_CC)" = x1; then \ + $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_GRUB) -DELF64 -DAPPLE_CC=1 -m64 -nostdlib -Wall -Werror -mno-red-zone -c -o $@ $< || exit 1; \ + else \ + $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_GRUB) -DELF64 -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \ + fi + +efiemu64_s.o: efiemu/runtime/efiemu.S + -rm -f $@ + if test "x$(TARGET_APPLE_CC)" = x1; then \ + $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_GRUB) -DELF64 -DAPPLE_CC=1 -m64 -Wall -Werror -nostdlib -O2 -mno-red-zone -c -o $@ $< || exit 1; \ + else \ + $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_GRUB) -DELF64 -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \ + fi + +efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF) + -rm -f $@; \ + if test "x$(TARGET_APPLE_CC)" = x1; then \ + rm -f $@.bin; \ + $(TARGET_CC) -m64 -Wl,-r -nostdlib -o $@.bin $^ || exit 1; \ + $(OBJCONV) -felf64 -nu -nd $@.bin $@ || exit 1; \ + rm -f $@.bin; \ + else \ + $(TARGET_CC) -m64 -nostdlib -Wl,-r -o $@ $^ || exit 1; \ + if test ! -z "$(TARGET_OBJ2ELF)"; then $(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi; \ + fi + +platform_DATA += efiemu32.o efiemu64.o +CLEANFILES += efiemu32.o efiemu64.o efiemu64_c.o efiemu64_s.o +endif +endif + diff --git a/grub-core/Makefile.extra-dist b/grub-core/Makefile.extra-dist new file mode 100644 index 000000000..c6516f06a --- /dev/null +++ b/grub-core/Makefile.extra-dist @@ -0,0 +1,53 @@ +# +# Extra files that need to be distributed (in .tar.gz) to build +# successfully on user site. +# +# XXX Remove wildcards; See 27.3 in automake.info +# + +EXTRA_DIST = + +EXTRA_DIST += gentpl.py +EXTRA_DIST += Makefile.tpl +EXTRA_DIST += modules.def + +EXTRA_DIST += gentrigtables.c + +EXTRA_DIST += genmoddep.awk +EXTRA_DIST += genmodsrc.sh +EXTRA_DIST += gensymlist.sh + +EXTRA_DIST += genemuinit.sh +EXTRA_DIST += genemuinitheader.sh + +EXTRA_DIST += genfslist.sh +EXTRA_DIST += gencmdlist.sh +EXTRA_DIST += genvideolist.sh +EXTRA_DIST += genhandlerlist.sh +EXTRA_DIST += genpartmaplist.sh +EXTRA_DIST += genparttoollist.sh +EXTRA_DIST += genterminallist.sh +EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst + +EXTRA_DIST += script/yylex.l +EXTRA_DIST += script/parser.y + +EXTRA_DIST += lib/relocator.c + +EXTRA_DIST += efiemu/loadcore.c +EXTRA_DIST += efiemu/prepare.c + +EXTRA_DIST += loader/machoXX.c + + +EXTRA_DIST += kern/i386/loader.S +EXTRA_DIST += kern/i386/realmode.S +EXTRA_DIST += loader/i386/bsdXX.c +EXTRA_DIST += loader/i386/bsd_pagetable.c +EXTRA_DIST += loader/i386/multiboot_elfxx.c +EXTRA_DIST += commands/search.c + +EXTRA_DIST += kern/i386/pc/lzma_decode.S + +EXTRA_DIST += $(shell find $(top_srcdir) -name '*.h') + diff --git a/grub-core/Makefile.kernel b/grub-core/Makefile.kernel new file mode 100644 index 000000000..58e464805 --- /dev/null +++ b/grub-core/Makefile.kernel @@ -0,0 +1,192 @@ +# -*- makefile -*- + +KERNEL_HEADER_FILES = +KERNEL_HEADER_FILES += include/grub/cache.h +KERNEL_HEADER_FILES += include/grub/command.h +KERNEL_HEADER_FILES += include/grub/device.h +KERNEL_HEADER_FILES += include/grub/disk.h +KERNEL_HEADER_FILES += include/grub/dl.h +KERNEL_HEADER_FILES += include/grub/elf.h +KERNEL_HEADER_FILES += include/grub/elfload.h +KERNEL_HEADER_FILES += include/grub/env.h +KERNEL_HEADER_FILES += include/grub/env_private.h +KERNEL_HEADER_FILES += include/grub/err.h +KERNEL_HEADER_FILES += include/grub/file.h +KERNEL_HEADER_FILES += include/grub/fs.h +KERNEL_HEADER_FILES += include/grub/handler.h +KERNEL_HEADER_FILES += include/grub/i18n.h +KERNEL_HEADER_FILES += include/grub/kernel.h +KERNEL_HEADER_FILES += include/grub/list.h +KERNEL_HEADER_FILES += include/grub/misc.h +KERNEL_HEADER_FILES += include/grub/mm.h +KERNEL_HEADER_FILES += include/grub/net.h +KERNEL_HEADER_FILES += include/grub/parser.h +KERNEL_HEADER_FILES += include/grub/partition.h +KERNEL_HEADER_FILES += include/grub/reader.h +KERNEL_HEADER_FILES += include/grub/symbol.h +KERNEL_HEADER_FILES += include/grub/term.h +KERNEL_HEADER_FILES += include/grub/time.h +KERNEL_HEADER_FILES += include/grub/types.h + +if COND_i386_pc +KERNEL_HEADER_FILES += include/grub/boot.h +KERNEL_HEADER_FILES += include/grub/loader.h +KERNEL_HEADER_FILES += include/grub/msdos_partition.h +KERNEL_HEADER_FILES += include/grub/machine/biosdisk.h +KERNEL_HEADER_FILES += include/grub/machine/boot.h +KERNEL_HEADER_FILES += include/grub/machine/console.h +KERNEL_HEADER_FILES += include/grub/machine/memory.h +KERNEL_HEADER_FILES += include/grub/machine/loader.h +KERNEL_HEADER_FILES += include/grub/machine/vga.h +KERNEL_HEADER_FILES += include/grub/machine/vbe.h +KERNEL_HEADER_FILES += include/grub/machine/kernel.h +KERNEL_HEADER_FILES += include/grub/machine/pxe.h +KERNEL_HEADER_FILES += include/grub/i386/pit.h +endif + +if COND_i386_efi +KERNEL_HEADER_FILES += include/grub/boot.h +KERNEL_HEADER_FILES += include/grub/loader.h +KERNEL_HEADER_FILES += include/grub/msdos_partition.h +KERNEL_HEADER_FILES += include/grub/efi/efi.h +KERNEL_HEADER_FILES += include/grub/efi/time.h +KERNEL_HEADER_FILES += include/grub/efi/disk.h +KERNEL_HEADER_FILES += include/grub/i386/pit.h +endif + +if COND_i386_coreboot +KERNEL_HEADER_FILES += include/grub/boot.h +KERNEL_HEADER_FILES += include/grub/loader.h +KERNEL_HEADER_FILES += include/grub/msdos_partition.h +KERNEL_HEADER_FILES += include/grub/machine/boot.h +KERNEL_HEADER_FILES += include/grub/machine/console.h +KERNEL_HEADER_FILES += include/grub/machine/init.h +KERNEL_HEADER_FILES += include/grub/machine/memory.h +KERNEL_HEADER_FILES += include/grub/machine/loader.h +endif + +if COND_i386_qemu +KERNEL_HEADER_FILES += include/grub/boot.h +KERNEL_HEADER_FILES += include/grub/loader.h +KERNEL_HEADER_FILES += include/grub/msdos_partition.h +KERNEL_HEADER_FILES += include/grub/machine/boot.h +KERNEL_HEADER_FILES += include/grub/machine/console.h +KERNEL_HEADER_FILES += include/grub/machine/init.h +KERNEL_HEADER_FILES += include/grub/machine/memory.h +KERNEL_HEADER_FILES += include/grub/machine/loader.h +endif + +if COND_i386_ieee1275 +KERNEL_HEADER_FILES += include/grub/loader.h +KERNEL_HEADER_FILES += include/grub/msdos_partition.h +KERNEL_HEADER_FILES += include/grub/ieee1275/ieee1275.h +KERNEL_HEADER_FILES += include/grub/machine/kernel.h +KERNEL_HEADER_FILES += include/grub/machine/loader.h +KERNEL_HEADER_FILES += include/grub/machine/memory.h +endif + +if COND_x86_64_efi +KERNEL_HEADER_FILES += include/grub/boot.h +KERNEL_HEADER_FILES += include/grub/loader.h +KERNEL_HEADER_FILES += include/grub/msdos_partition.h +KERNEL_HEADER_FILES += include/grub/efi/efi.h +KERNEL_HEADER_FILES += include/grub/efi/time.h +KERNEL_HEADER_FILES += include/grub/efi/disk.h +KERNEL_HEADER_FILES += include/grub/machine/loader.h +KERNEL_HEADER_FILES += include/grub/i386/pit.h +endif + +if COND_mips_yeeloong +KERNEL_HEADER_FILES += include/grub/boot.h +KERNEL_HEADER_FILES += include/grub/loader.h +KERNEL_HEADER_FILES += include/grub/msdos_partition.h +KERNEL_HEADER_FILES += include/grub/machine/kernel.h +KERNEL_HEADER_FILES += include/grub/machine/memory.h +KERNEL_HEADER_FILES += include/grub/cpu/cache.h +KERNEL_HEADER_FILES += include/grub/bitmap.h +KERNEL_HEADER_FILES += include/grub/video.h +KERNEL_HEADER_FILES += include/grub/gfxterm.h +KERNEL_HEADER_FILES += include/grub/font.h +KERNEL_HEADER_FILES += include/grub/bitmap_scale.h +KERNEL_HEADER_FILES += include/grub/bufio.h +KERNEL_HEADER_FILES += include/grub/pci.h +KERNEL_HEADER_FILES += include/grub/libgcc.h +endif + +if COND_powerpc_ieee1275 +KERNEL_HEADER_FILES += include/grub/boot.h +KERNEL_HEADER_FILES += include/grub/loader.h +KERNEL_HEADER_FILES += include/grub/msdos_partition.h +KERNEL_HEADER_FILES += include/grub/ieee1275/ieee1275.h +KERNEL_HEADER_FILES += include/grub/machine/kernel.h +KERNEL_HEADER_FILES += include/grub/libgcc.h +endif + +if COND_sparc64_ieee1275 +KERNEL_HEADER_FILES += include/grub/boot.h +KERNEL_HEADER_FILES += include/grub/loader.h +KERNEL_HEADER_FILES += include/grub/msdos_partition.h +KERNEL_HEADER_FILES += include/grub/libgcc.h +KERNEL_HEADER_FILES += include/grub/ieee1275/ieee1275.h +KERNEL_HEADER_FILES += include/grub/machine/kernel.h +KERNEL_HEADER_FILES += include/grub/sparc64/ieee1275/ieee1275.h +endif + +if COND_emu +KERNEL_HEADER_FILES += include/grub/cpu/time.h +KERNEL_HEADER_FILES += include/grub/cpu/types.h +KERNEL_HEADER_FILES += include/grub/gzio.h +KERNEL_HEADER_FILES += include/grub/menu.h +KERNEL_HEADER_FILES += include/grub/datetime.h +KERNEL_HEADER_FILES += include/grub/emu/misc.h +if COND_GRUB_EMU_SDL +KERNEL_HEADER_FILES += include/grub/sdl.h +endif +if COND_GRUB_EMU_USB +KERNEL_HEADER_FILES += include/grub/libusb.h +endif +if COND_GRUB_EMU_PCI +KERNEL_HEADER_FILES += include/grub/libpciaccess.h +endif +endif + +symlist.h: config.h $(KERNEL_HEADER_FILES) + @list='$^'; \ + for p in $$list; do \ + echo "#include <$$p>" >> $@ || (rm -f $@; exit 1); \ + done +CLEANFILES += symlist.h +BUILT_SOURCES += symlist.h + +symlist.c: symlist.h gensymlist.sh + $(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) -DGRUB_SYMBOL_GENERATOR=1 symlist.h > symlist.p || (rm -f symlist.p; exit 1) + cat symlist.p | /bin/sh $(srcdir)/gensymlist.sh config.h $(KERNEL_HEADER_FILES) >$@ || (rm -f $@; exit 1) + rm -f symlist.p +CLEANFILES += symlist.c +BUILT_SOURCES += symlist.c + +noinst_DATA += kernel_syms.lst +kernel_syms.lst: $(KERNEL_HEADER_FILES) config.h + if grep "^#define HAVE_ASM_USCORE" config.h; then u="_"; else u=""; fi + $(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) $(CFLAGS) -DGRUB_SYMBOL_GENERATOR=1 $^ >kernel_syms.input + cat kernel_syms.input | grep -v '^#' | sed -n \ + -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/'"$$u"'\1 kernel/;p;}' \ + -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/'"$$u"'\1 kernel/;p;}' \ + | sort -u >$@ + rm -f kernel_syms.input +CLEANFILES += kernel_syms.lst + +if COND_emu +kern/emu/grub_emu-main.$(OBJEXT):grub_emu_init.h +grub_emu-grub_emu_init.$(OBJEXT):grub_emu_init.h +kern/emu/grub_emu_dyn-main.$(OBJEXT):grub_emu_init.h +grub_emu_dyn-grub_emu_init.$(OBJEXT):grub_emu_init.h + +grub_emu_init.h: genemuinitheader.sh $(MOD_FILES) + rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinitheader.sh $(NM) > $@ +CLEANFILES += grub_emu_init.h + +grub_emu_init.c: grub_emu_init.h genemuinit.sh $(MOD_FILES) + rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinit.sh $(NM) > $@ +CLEANFILES += grub_emu_init.c +endif diff --git a/grub-core/Makefile.vars b/grub-core/Makefile.vars new file mode 100644 index 000000000..710a8fd0b --- /dev/null +++ b/grub-core/Makefile.vars @@ -0,0 +1,80 @@ +# -*- makefile -*- + +# Platform specific options +if COND_i386_pc + CFLAGS_PLATFORM = -mrtd -mregparm=3 +endif +if COND_i386_efi + LDFLAGS_PLATFORM = -melf_i386 +endif +if COND_x86_64_efi + LDFLAGS_PLATFORM = -melf_x86_64 +endif +if COND_i386_qemu + CFLAGS_PLATFORM = -mrtd -mregparm=3 +endif +if COND_i386_coreboot + CFLAGS_PLATFORM = -mrtd -mregparm=3 +endif +if COND_i386_ieee1275 + CFLAGS_PLATFORM = -mrtd -mregparm=3 +endif +if COND_mips_yeeloong + CFLAGS_PLATFORM = -march=mips3 -mexplicit-relocs -mflush-func=grub_cpu_flush_cache + CCASFLAGS_PLATFORM = -march=mips3 +endif +if COND_sparc64_ieee1275 + CFLAGS_PLATFORM = -mno-app-regs + LDFLAGS_PLATFORM = -melf64_sparc -mno-relax +endif + +CPPFLAGS_GRUB = -I$(builddir) -I$(srcdir) -I$(top_builddir) -I$(top_srcdir) +CPPFLAGS_GRUB += -I$(top_srcdir)/include -I$(top_builddir)/include + +CFLAGS_GCRY = -Wno-error -Wno-missing-field-initializers +CPPFLAGS_GCRY = -I$(top_srcdir)/lib/libgcrypt_wrap + +CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -D_GL_UNUSED="__attribute__ ((unused))" +CPPFLAGS_GNULIB = -I$(top_srcdir)/gnulib + +CFLAGS_MKISOFS = -Wno-all -Werror +CPPFLAGS_MKISOFS = -D_FILE_OFFSET_BITS=64 -I$(top_srcdir)/util/mkisofs/include + +CFLAGS_POSIX = -fno-builtin +CPPFLAGS_POSIX = -I$(top_srcdir)/lib/posix_wrap + +CPPFLAGS_EFIEMU = -I$(top_srcdir)/efiemu/runtime + +grubconfdir = $(sysconfdir)/grub.d +platformdir = $(pkglibdir)/$(target_cpu)-$(platform) + +# to calm down automake +BUILT_SOURCES = +CLEANFILES = +COMMAND_FILES = +DEF_FILES = +FS_FILES = +HANDLER_FILES = +IMG_FILES = +MOD_FILES = +MODULE_FILES = +PARTMAP_FILES = +PARTTOOL_FILES = +TERMINAL_FILES = +TESTS = +UND_FILES = +VIDEO_FILES = +bin_PROGRAMS = +bin_SCRIPTS = +check_PROGRAMS = +check_SCRIPTS = +grubconf_DATA = +grubconf_SCRIPTS = +man_MANS = +noinst_DATA = +noinst_LIBRARIES = +noinst_PROGRAMS = +pkglib_SCRIPTS = +platform_DATA = +sbin_PROGRAMS = +sbin_SCRIPTS = diff --git a/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S similarity index 100% rename from boot/i386/pc/boot.S rename to grub-core/boot/i386/pc/boot.S diff --git a/boot/i386/pc/cdboot.S b/grub-core/boot/i386/pc/cdboot.S similarity index 100% rename from boot/i386/pc/cdboot.S rename to grub-core/boot/i386/pc/cdboot.S diff --git a/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S similarity index 100% rename from boot/i386/pc/diskboot.S rename to grub-core/boot/i386/pc/diskboot.S diff --git a/boot/i386/pc/lnxboot.S b/grub-core/boot/i386/pc/lnxboot.S similarity index 100% rename from boot/i386/pc/lnxboot.S rename to grub-core/boot/i386/pc/lnxboot.S diff --git a/boot/i386/pc/pxeboot.S b/grub-core/boot/i386/pc/pxeboot.S similarity index 100% rename from boot/i386/pc/pxeboot.S rename to grub-core/boot/i386/pc/pxeboot.S diff --git a/boot/i386/qemu/boot.S b/grub-core/boot/i386/qemu/boot.S similarity index 100% rename from boot/i386/qemu/boot.S rename to grub-core/boot/i386/qemu/boot.S diff --git a/boot/sparc64/ieee1275/boot.S b/grub-core/boot/sparc64/ieee1275/boot.S similarity index 100% rename from boot/sparc64/ieee1275/boot.S rename to grub-core/boot/sparc64/ieee1275/boot.S diff --git a/boot/sparc64/ieee1275/diskboot.S b/grub-core/boot/sparc64/ieee1275/diskboot.S similarity index 100% rename from boot/sparc64/ieee1275/diskboot.S rename to grub-core/boot/sparc64/ieee1275/diskboot.S diff --git a/bus/bonito.c b/grub-core/bus/bonito.c similarity index 100% rename from bus/bonito.c rename to grub-core/bus/bonito.c diff --git a/util/pci.c b/grub-core/bus/emu/pci.c similarity index 98% rename from util/pci.c rename to grub-core/bus/emu/pci.c index 420ae320b..d1beb561d 100644 --- a/util/pci.c +++ b/grub-core/bus/emu/pci.c @@ -19,6 +19,7 @@ #include #include +#include #include grub_pci_address_t diff --git a/bus/pci.c b/grub-core/bus/pci.c similarity index 100% rename from bus/pci.c rename to grub-core/bus/pci.c diff --git a/util/usb.c b/grub-core/bus/usb/emu/usb.c similarity index 100% rename from util/usb.c rename to grub-core/bus/usb/emu/usb.c diff --git a/bus/usb/ohci.c b/grub-core/bus/usb/ohci.c similarity index 100% rename from bus/usb/ohci.c rename to grub-core/bus/usb/ohci.c diff --git a/bus/usb/uhci.c b/grub-core/bus/usb/uhci.c similarity index 100% rename from bus/usb/uhci.c rename to grub-core/bus/usb/uhci.c diff --git a/bus/usb/usb.c b/grub-core/bus/usb/usb.c similarity index 100% rename from bus/usb/usb.c rename to grub-core/bus/usb/usb.c diff --git a/bus/usb/usbhub.c b/grub-core/bus/usb/usbhub.c similarity index 100% rename from bus/usb/usbhub.c rename to grub-core/bus/usb/usbhub.c diff --git a/bus/usb/usbtrans.c b/grub-core/bus/usb/usbtrans.c similarity index 100% rename from bus/usb/usbtrans.c rename to grub-core/bus/usb/usbtrans.c diff --git a/commands/acpi.c b/grub-core/commands/acpi.c similarity index 100% rename from commands/acpi.c rename to grub-core/commands/acpi.c diff --git a/commands/blocklist.c b/grub-core/commands/blocklist.c similarity index 100% rename from commands/blocklist.c rename to grub-core/commands/blocklist.c diff --git a/commands/boot.c b/grub-core/commands/boot.c similarity index 100% rename from commands/boot.c rename to grub-core/commands/boot.c diff --git a/commands/cat.c b/grub-core/commands/cat.c similarity index 100% rename from commands/cat.c rename to grub-core/commands/cat.c diff --git a/commands/cmp.c b/grub-core/commands/cmp.c similarity index 100% rename from commands/cmp.c rename to grub-core/commands/cmp.c diff --git a/commands/configfile.c b/grub-core/commands/configfile.c similarity index 100% rename from commands/configfile.c rename to grub-core/commands/configfile.c diff --git a/commands/crc.c b/grub-core/commands/crc.c similarity index 100% rename from commands/crc.c rename to grub-core/commands/crc.c diff --git a/commands/date.c b/grub-core/commands/date.c similarity index 100% rename from commands/date.c rename to grub-core/commands/date.c diff --git a/commands/echo.c b/grub-core/commands/echo.c similarity index 100% rename from commands/echo.c rename to grub-core/commands/echo.c diff --git a/commands/efi/acpi.c b/grub-core/commands/efi/acpi.c similarity index 100% rename from commands/efi/acpi.c rename to grub-core/commands/efi/acpi.c diff --git a/commands/efi/fixvideo.c b/grub-core/commands/efi/fixvideo.c similarity index 100% rename from commands/efi/fixvideo.c rename to grub-core/commands/efi/fixvideo.c diff --git a/commands/efi/loadbios.c b/grub-core/commands/efi/loadbios.c similarity index 100% rename from commands/efi/loadbios.c rename to grub-core/commands/efi/loadbios.c diff --git a/commands/extcmd.c b/grub-core/commands/extcmd.c similarity index 100% rename from commands/extcmd.c rename to grub-core/commands/extcmd.c diff --git a/commands/gptsync.c b/grub-core/commands/gptsync.c similarity index 100% rename from commands/gptsync.c rename to grub-core/commands/gptsync.c diff --git a/commands/halt.c b/grub-core/commands/halt.c similarity index 100% rename from commands/halt.c rename to grub-core/commands/halt.c diff --git a/commands/handler.c b/grub-core/commands/handler.c similarity index 100% rename from commands/handler.c rename to grub-core/commands/handler.c diff --git a/commands/hashsum.c b/grub-core/commands/hashsum.c similarity index 100% rename from commands/hashsum.c rename to grub-core/commands/hashsum.c diff --git a/commands/hdparm.c b/grub-core/commands/hdparm.c similarity index 100% rename from commands/hdparm.c rename to grub-core/commands/hdparm.c diff --git a/commands/help.c b/grub-core/commands/help.c similarity index 100% rename from commands/help.c rename to grub-core/commands/help.c diff --git a/commands/hexdump.c b/grub-core/commands/hexdump.c similarity index 100% rename from commands/hexdump.c rename to grub-core/commands/hexdump.c diff --git a/commands/i386/cpuid.c b/grub-core/commands/i386/cpuid.c similarity index 100% rename from commands/i386/cpuid.c rename to grub-core/commands/i386/cpuid.c diff --git a/commands/i386/pc/acpi.c b/grub-core/commands/i386/pc/acpi.c similarity index 100% rename from commands/i386/pc/acpi.c rename to grub-core/commands/i386/pc/acpi.c diff --git a/commands/i386/pc/drivemap.c b/grub-core/commands/i386/pc/drivemap.c similarity index 100% rename from commands/i386/pc/drivemap.c rename to grub-core/commands/i386/pc/drivemap.c diff --git a/commands/i386/pc/drivemap_int13h.S b/grub-core/commands/i386/pc/drivemap_int13h.S similarity index 100% rename from commands/i386/pc/drivemap_int13h.S rename to grub-core/commands/i386/pc/drivemap_int13h.S diff --git a/commands/i386/pc/halt.c b/grub-core/commands/i386/pc/halt.c similarity index 100% rename from commands/i386/pc/halt.c rename to grub-core/commands/i386/pc/halt.c diff --git a/commands/i386/pc/play.c b/grub-core/commands/i386/pc/play.c similarity index 100% rename from commands/i386/pc/play.c rename to grub-core/commands/i386/pc/play.c diff --git a/commands/i386/pc/pxecmd.c b/grub-core/commands/i386/pc/pxecmd.c similarity index 100% rename from commands/i386/pc/pxecmd.c rename to grub-core/commands/i386/pc/pxecmd.c diff --git a/commands/i386/pc/vbeinfo.c b/grub-core/commands/i386/pc/vbeinfo.c similarity index 100% rename from commands/i386/pc/vbeinfo.c rename to grub-core/commands/i386/pc/vbeinfo.c diff --git a/commands/i386/pc/vbetest.c b/grub-core/commands/i386/pc/vbetest.c similarity index 100% rename from commands/i386/pc/vbetest.c rename to grub-core/commands/i386/pc/vbetest.c diff --git a/commands/ieee1275/suspend.c b/grub-core/commands/ieee1275/suspend.c similarity index 100% rename from commands/ieee1275/suspend.c rename to grub-core/commands/ieee1275/suspend.c diff --git a/commands/iorw.c b/grub-core/commands/iorw.c similarity index 100% rename from commands/iorw.c rename to grub-core/commands/iorw.c diff --git a/commands/keystatus.c b/grub-core/commands/keystatus.c similarity index 100% rename from commands/keystatus.c rename to grub-core/commands/keystatus.c diff --git a/commands/loadenv.c b/grub-core/commands/loadenv.c similarity index 100% rename from commands/loadenv.c rename to grub-core/commands/loadenv.c diff --git a/commands/ls.c b/grub-core/commands/ls.c similarity index 100% rename from commands/ls.c rename to grub-core/commands/ls.c diff --git a/commands/lsmmap.c b/grub-core/commands/lsmmap.c similarity index 100% rename from commands/lsmmap.c rename to grub-core/commands/lsmmap.c diff --git a/commands/lspci.c b/grub-core/commands/lspci.c similarity index 100% rename from commands/lspci.c rename to grub-core/commands/lspci.c diff --git a/commands/memrw.c b/grub-core/commands/memrw.c similarity index 100% rename from commands/memrw.c rename to grub-core/commands/memrw.c diff --git a/commands/minicmd.c b/grub-core/commands/minicmd.c similarity index 100% rename from commands/minicmd.c rename to grub-core/commands/minicmd.c diff --git a/commands/parttool.c b/grub-core/commands/parttool.c similarity index 99% rename from commands/parttool.c rename to grub-core/commands/parttool.c index 528cf43d7..d38a8a98f 100644 --- a/commands/parttool.c +++ b/grub-core/commands/parttool.c @@ -175,7 +175,7 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)), } /* Load modules. */ -#if !GRUB_NO_MODULES +#if defined(GRUB_MACHINE_EMU) { const char *prefix; prefix = grub_env_get ("prefix"); diff --git a/commands/password.c b/grub-core/commands/password.c similarity index 100% rename from commands/password.c rename to grub-core/commands/password.c diff --git a/commands/password_pbkdf2.c b/grub-core/commands/password_pbkdf2.c similarity index 100% rename from commands/password_pbkdf2.c rename to grub-core/commands/password_pbkdf2.c diff --git a/commands/probe.c b/grub-core/commands/probe.c similarity index 100% rename from commands/probe.c rename to grub-core/commands/probe.c diff --git a/commands/read.c b/grub-core/commands/read.c similarity index 100% rename from commands/read.c rename to grub-core/commands/read.c diff --git a/commands/reboot.c b/grub-core/commands/reboot.c similarity index 100% rename from commands/reboot.c rename to grub-core/commands/reboot.c diff --git a/commands/regexp.c b/grub-core/commands/regexp.c similarity index 100% rename from commands/regexp.c rename to grub-core/commands/regexp.c diff --git a/commands/search.c b/grub-core/commands/search.c similarity index 100% rename from commands/search.c rename to grub-core/commands/search.c diff --git a/commands/search_file.c b/grub-core/commands/search_file.c similarity index 100% rename from commands/search_file.c rename to grub-core/commands/search_file.c diff --git a/commands/search_label.c b/grub-core/commands/search_label.c similarity index 100% rename from commands/search_label.c rename to grub-core/commands/search_label.c diff --git a/commands/search_uuid.c b/grub-core/commands/search_uuid.c similarity index 100% rename from commands/search_uuid.c rename to grub-core/commands/search_uuid.c diff --git a/commands/search_wrap.c b/grub-core/commands/search_wrap.c similarity index 100% rename from commands/search_wrap.c rename to grub-core/commands/search_wrap.c diff --git a/commands/setpci.c b/grub-core/commands/setpci.c similarity index 100% rename from commands/setpci.c rename to grub-core/commands/setpci.c diff --git a/commands/sleep.c b/grub-core/commands/sleep.c similarity index 100% rename from commands/sleep.c rename to grub-core/commands/sleep.c diff --git a/commands/terminal.c b/grub-core/commands/terminal.c similarity index 100% rename from commands/terminal.c rename to grub-core/commands/terminal.c diff --git a/commands/test.c b/grub-core/commands/test.c similarity index 100% rename from commands/test.c rename to grub-core/commands/test.c diff --git a/commands/true.c b/grub-core/commands/true.c similarity index 100% rename from commands/true.c rename to grub-core/commands/true.c diff --git a/commands/usbtest.c b/grub-core/commands/usbtest.c similarity index 100% rename from commands/usbtest.c rename to grub-core/commands/usbtest.c diff --git a/commands/videotest.c b/grub-core/commands/videotest.c similarity index 100% rename from commands/videotest.c rename to grub-core/commands/videotest.c diff --git a/commands/xnu_uuid.c b/grub-core/commands/xnu_uuid.c similarity index 100% rename from commands/xnu_uuid.c rename to grub-core/commands/xnu_uuid.c diff --git a/conf/any-emu.rmk b/grub-core/conf/any-emu.rmk similarity index 100% rename from conf/any-emu.rmk rename to grub-core/conf/any-emu.rmk diff --git a/conf/common.rmk b/grub-core/conf/common.rmk similarity index 100% rename from conf/common.rmk rename to grub-core/conf/common.rmk diff --git a/conf/i386-coreboot.rmk b/grub-core/conf/i386-coreboot.rmk similarity index 100% rename from conf/i386-coreboot.rmk rename to grub-core/conf/i386-coreboot.rmk diff --git a/conf/i386-efi.rmk b/grub-core/conf/i386-efi.rmk similarity index 100% rename from conf/i386-efi.rmk rename to grub-core/conf/i386-efi.rmk diff --git a/conf/i386-ieee1275.rmk b/grub-core/conf/i386-ieee1275.rmk similarity index 100% rename from conf/i386-ieee1275.rmk rename to grub-core/conf/i386-ieee1275.rmk diff --git a/conf/i386-multiboot.rmk b/grub-core/conf/i386-multiboot.rmk similarity index 100% rename from conf/i386-multiboot.rmk rename to grub-core/conf/i386-multiboot.rmk diff --git a/conf/i386-pc-cygwin-img-ld.sc b/grub-core/conf/i386-pc-cygwin-img-ld.sc similarity index 100% rename from conf/i386-pc-cygwin-img-ld.sc rename to grub-core/conf/i386-pc-cygwin-img-ld.sc diff --git a/conf/i386-pc.rmk b/grub-core/conf/i386-pc.rmk similarity index 100% rename from conf/i386-pc.rmk rename to grub-core/conf/i386-pc.rmk diff --git a/conf/i386-qemu.rmk b/grub-core/conf/i386-qemu.rmk similarity index 100% rename from conf/i386-qemu.rmk rename to grub-core/conf/i386-qemu.rmk diff --git a/conf/i386.rmk b/grub-core/conf/i386.rmk similarity index 100% rename from conf/i386.rmk rename to grub-core/conf/i386.rmk diff --git a/conf/mips-qemu-mips.rmk b/grub-core/conf/mips-qemu-mips.rmk similarity index 100% rename from conf/mips-qemu-mips.rmk rename to grub-core/conf/mips-qemu-mips.rmk diff --git a/conf/mips-yeeloong.rmk b/grub-core/conf/mips-yeeloong.rmk similarity index 100% rename from conf/mips-yeeloong.rmk rename to grub-core/conf/mips-yeeloong.rmk diff --git a/conf/mips.rmk b/grub-core/conf/mips.rmk similarity index 100% rename from conf/mips.rmk rename to grub-core/conf/mips.rmk diff --git a/conf/powerpc-ieee1275.rmk b/grub-core/conf/powerpc-ieee1275.rmk similarity index 100% rename from conf/powerpc-ieee1275.rmk rename to grub-core/conf/powerpc-ieee1275.rmk diff --git a/conf/sparc64-ieee1275.rmk b/grub-core/conf/sparc64-ieee1275.rmk similarity index 100% rename from conf/sparc64-ieee1275.rmk rename to grub-core/conf/sparc64-ieee1275.rmk diff --git a/conf/tests.rmk b/grub-core/conf/tests.rmk similarity index 100% rename from conf/tests.rmk rename to grub-core/conf/tests.rmk diff --git a/conf/x86-efi.rmk b/grub-core/conf/x86-efi.rmk similarity index 100% rename from conf/x86-efi.rmk rename to grub-core/conf/x86-efi.rmk diff --git a/conf/x86_64-efi.rmk b/grub-core/conf/x86_64-efi.rmk similarity index 100% rename from conf/x86_64-efi.rmk rename to grub-core/conf/x86_64-efi.rmk diff --git a/grub-core/configure.ac b/grub-core/configure.ac new file mode 100644 index 000000000..ac462ea77 --- /dev/null +++ b/grub-core/configure.ac @@ -0,0 +1,91 @@ +# Process this file with autoconf to produce a configure script. + +# Copyright (C) 2010 Free Software Foundation, Inc. +# +# This configure.ac 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. + +dnl This configure script is complicated, because GRUB needs to deal +dnl with three potentially different types: +dnl +dnl build -- the environment for building GRUB +dnl host -- the environment for running utilities +dnl target -- the environment for running GRUB +dnl +dnl In addition, GRUB needs to deal with a platform specification +dnl which specifies the system running GRUB, such as firmware. +dnl This is necessary because the target type in autoconf does not +dnl describe such a system very well. +dnl +dnl The current strategy is to build utilities using host +dnl cross-compiler and grub core and modules using target +dnl cross-compiler. For this we use nested packages approach, where +dnl top-level package grub utilities is built with HOSTCC and nested +dnl package (in grub-core directory) builds with TARGETCC. + +# NOTE: ../configure.ac must also be updated. +AC_INIT([GRUB],[1.98],[bug-grub@gnu.org]) +AC_CONFIG_AUX_DIR([.]) + +# Checks for host and target systems. +AC_CANONICAL_HOST +AC_CANONICAL_TARGET + +AM_INIT_AUTOMAKE() +AC_PREREQ(2.60) +AC_CONFIG_SRCDIR([include/grub/dl.h]) +AC_CONFIG_HEADER([config.h]) + +m4_include([configure.common]) + +TARGET_CPP="$TARGET_CC -E" +TARGET_CCAS=$TARGET_CC + +CC=$TARGET_CC +CPP=$TARGET_CC +CCAS=$TARGET_CC + +AC_SUBST(TARGET_CC) +AC_SUBST(TARGET_CPP) +AC_SUBST(TARGET_CCAS) +AC_SUBST(TARGET_IMG_LDSCRIPT) +AC_SUBST(TARGET_IMG_LDFLAGS) +AC_SUBST(TARGET_IMG_CFLAGS) +AC_SUBST(TARGET_OBJ2ELF) +AC_SUBST(TARGET_MODULE_FORMAT) +AC_SUBST(OBJCONV) +AC_SUBST(TARGET_APPLE_CC) +AC_SUBST(ASFLAGS) +AC_SUBST(TARGET_CFLAGS) +AC_SUBST(TARGET_ASFLAGS) +AC_SUBST(TARGET_LDFLAGS) +AC_SUBST(TARGET_CPPFLAGS) + +# Output files. +grub_CHECK_LINK_DIR +if test x"$link_dir" = xyes ; then + AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu]) + if test "$platform" != emu ; then + AC_CONFIG_LINKS([include/grub/machine:include/grub/$target_cpu/$platform]) + fi +else + mkdir -p include/grub 2>/dev/null + rm -rf include/grub/cpu + cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null + if test "$platform" != emu ; then + rm -rf include/grub/machine + cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null + fi +fi + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([po/Makefile]) +AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) + +AC_OUTPUT diff --git a/disk/ata.c b/grub-core/disk/ata.c similarity index 100% rename from disk/ata.c rename to grub-core/disk/ata.c diff --git a/disk/ata_pthru.c b/grub-core/disk/ata_pthru.c similarity index 100% rename from disk/ata_pthru.c rename to grub-core/disk/ata_pthru.c diff --git a/disk/dmraid_nvidia.c b/grub-core/disk/dmraid_nvidia.c similarity index 100% rename from disk/dmraid_nvidia.c rename to grub-core/disk/dmraid_nvidia.c diff --git a/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c similarity index 100% rename from disk/efi/efidisk.c rename to grub-core/disk/efi/efidisk.c diff --git a/disk/host.c b/grub-core/disk/host.c similarity index 100% rename from disk/host.c rename to grub-core/disk/host.c diff --git a/disk/i386/pc/biosdisk.c b/grub-core/disk/i386/pc/biosdisk.c similarity index 100% rename from disk/i386/pc/biosdisk.c rename to grub-core/disk/i386/pc/biosdisk.c diff --git a/disk/ieee1275/nand.c b/grub-core/disk/ieee1275/nand.c similarity index 100% rename from disk/ieee1275/nand.c rename to grub-core/disk/ieee1275/nand.c diff --git a/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c similarity index 100% rename from disk/ieee1275/ofdisk.c rename to grub-core/disk/ieee1275/ofdisk.c diff --git a/disk/loopback.c b/grub-core/disk/loopback.c similarity index 100% rename from disk/loopback.c rename to grub-core/disk/loopback.c diff --git a/disk/lvm.c b/grub-core/disk/lvm.c similarity index 100% rename from disk/lvm.c rename to grub-core/disk/lvm.c diff --git a/disk/mdraid_linux.c b/grub-core/disk/mdraid_linux.c similarity index 100% rename from disk/mdraid_linux.c rename to grub-core/disk/mdraid_linux.c diff --git a/disk/memdisk.c b/grub-core/disk/memdisk.c similarity index 100% rename from disk/memdisk.c rename to grub-core/disk/memdisk.c diff --git a/disk/raid.c b/grub-core/disk/raid.c similarity index 100% rename from disk/raid.c rename to grub-core/disk/raid.c diff --git a/disk/raid5_recover.c b/grub-core/disk/raid5_recover.c similarity index 100% rename from disk/raid5_recover.c rename to grub-core/disk/raid5_recover.c diff --git a/disk/raid6_recover.c b/grub-core/disk/raid6_recover.c similarity index 100% rename from disk/raid6_recover.c rename to grub-core/disk/raid6_recover.c diff --git a/disk/scsi.c b/grub-core/disk/scsi.c similarity index 100% rename from disk/scsi.c rename to grub-core/disk/scsi.c diff --git a/disk/usbms.c b/grub-core/disk/usbms.c similarity index 100% rename from disk/usbms.c rename to grub-core/disk/usbms.c diff --git a/efiemu/i386/coredetect.c b/grub-core/efiemu/i386/coredetect.c similarity index 100% rename from efiemu/i386/coredetect.c rename to grub-core/efiemu/i386/coredetect.c diff --git a/efiemu/i386/loadcore32.c b/grub-core/efiemu/i386/loadcore32.c similarity index 100% rename from efiemu/i386/loadcore32.c rename to grub-core/efiemu/i386/loadcore32.c diff --git a/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c similarity index 100% rename from efiemu/i386/loadcore64.c rename to grub-core/efiemu/i386/loadcore64.c diff --git a/efiemu/i386/pc/cfgtables.c b/grub-core/efiemu/i386/pc/cfgtables.c similarity index 100% rename from efiemu/i386/pc/cfgtables.c rename to grub-core/efiemu/i386/pc/cfgtables.c diff --git a/efiemu/loadcore.c b/grub-core/efiemu/loadcore.c similarity index 100% rename from efiemu/loadcore.c rename to grub-core/efiemu/loadcore.c diff --git a/efiemu/loadcore32.c b/grub-core/efiemu/loadcore32.c similarity index 100% rename from efiemu/loadcore32.c rename to grub-core/efiemu/loadcore32.c diff --git a/efiemu/loadcore64.c b/grub-core/efiemu/loadcore64.c similarity index 100% rename from efiemu/loadcore64.c rename to grub-core/efiemu/loadcore64.c diff --git a/efiemu/loadcore_common.c b/grub-core/efiemu/loadcore_common.c similarity index 100% rename from efiemu/loadcore_common.c rename to grub-core/efiemu/loadcore_common.c diff --git a/efiemu/main.c b/grub-core/efiemu/main.c similarity index 100% rename from efiemu/main.c rename to grub-core/efiemu/main.c diff --git a/efiemu/mm.c b/grub-core/efiemu/mm.c similarity index 100% rename from efiemu/mm.c rename to grub-core/efiemu/mm.c diff --git a/efiemu/pnvram.c b/grub-core/efiemu/pnvram.c similarity index 100% rename from efiemu/pnvram.c rename to grub-core/efiemu/pnvram.c diff --git a/efiemu/prepare.c b/grub-core/efiemu/prepare.c similarity index 100% rename from efiemu/prepare.c rename to grub-core/efiemu/prepare.c diff --git a/efiemu/prepare32.c b/grub-core/efiemu/prepare32.c similarity index 100% rename from efiemu/prepare32.c rename to grub-core/efiemu/prepare32.c diff --git a/efiemu/prepare64.c b/grub-core/efiemu/prepare64.c similarity index 100% rename from efiemu/prepare64.c rename to grub-core/efiemu/prepare64.c diff --git a/efiemu/runtime/config.h b/grub-core/efiemu/runtime/config.h similarity index 100% rename from efiemu/runtime/config.h rename to grub-core/efiemu/runtime/config.h diff --git a/efiemu/runtime/efiemu.S b/grub-core/efiemu/runtime/efiemu.S similarity index 100% rename from efiemu/runtime/efiemu.S rename to grub-core/efiemu/runtime/efiemu.S diff --git a/efiemu/runtime/efiemu.c b/grub-core/efiemu/runtime/efiemu.c similarity index 100% rename from efiemu/runtime/efiemu.c rename to grub-core/efiemu/runtime/efiemu.c diff --git a/efiemu/runtime/efiemu.sh b/grub-core/efiemu/runtime/efiemu.sh similarity index 100% rename from efiemu/runtime/efiemu.sh rename to grub-core/efiemu/runtime/efiemu.sh diff --git a/efiemu/symbols.c b/grub-core/efiemu/symbols.c similarity index 100% rename from efiemu/symbols.c rename to grub-core/efiemu/symbols.c diff --git a/font/font.c b/grub-core/font/font.c similarity index 100% rename from font/font.c rename to grub-core/font/font.c diff --git a/font/font_cmd.c b/grub-core/font/font_cmd.c similarity index 100% rename from font/font_cmd.c rename to grub-core/font/font_cmd.c diff --git a/fs/affs.c b/grub-core/fs/affs.c similarity index 100% rename from fs/affs.c rename to grub-core/fs/affs.c diff --git a/fs/afs.c b/grub-core/fs/afs.c similarity index 100% rename from fs/afs.c rename to grub-core/fs/afs.c diff --git a/fs/afs_be.c b/grub-core/fs/afs_be.c similarity index 100% rename from fs/afs_be.c rename to grub-core/fs/afs_be.c diff --git a/fs/befs.c b/grub-core/fs/befs.c similarity index 100% rename from fs/befs.c rename to grub-core/fs/befs.c diff --git a/fs/befs_be.c b/grub-core/fs/befs_be.c similarity index 100% rename from fs/befs_be.c rename to grub-core/fs/befs_be.c diff --git a/fs/cpio.c b/grub-core/fs/cpio.c similarity index 100% rename from fs/cpio.c rename to grub-core/fs/cpio.c diff --git a/fs/ext2.c b/grub-core/fs/ext2.c similarity index 100% rename from fs/ext2.c rename to grub-core/fs/ext2.c diff --git a/fs/fat.c b/grub-core/fs/fat.c similarity index 100% rename from fs/fat.c rename to grub-core/fs/fat.c diff --git a/fs/fshelp.c b/grub-core/fs/fshelp.c similarity index 100% rename from fs/fshelp.c rename to grub-core/fs/fshelp.c diff --git a/fs/hfs.c b/grub-core/fs/hfs.c similarity index 100% rename from fs/hfs.c rename to grub-core/fs/hfs.c diff --git a/fs/hfsplus.c b/grub-core/fs/hfsplus.c similarity index 100% rename from fs/hfsplus.c rename to grub-core/fs/hfsplus.c diff --git a/fs/i386/pc/pxe.c b/grub-core/fs/i386/pc/pxe.c similarity index 100% rename from fs/i386/pc/pxe.c rename to grub-core/fs/i386/pc/pxe.c diff --git a/fs/iso9660.c b/grub-core/fs/iso9660.c similarity index 100% rename from fs/iso9660.c rename to grub-core/fs/iso9660.c diff --git a/fs/jfs.c b/grub-core/fs/jfs.c similarity index 100% rename from fs/jfs.c rename to grub-core/fs/jfs.c diff --git a/fs/minix.c b/grub-core/fs/minix.c similarity index 100% rename from fs/minix.c rename to grub-core/fs/minix.c diff --git a/fs/nilfs2.c b/grub-core/fs/nilfs2.c similarity index 100% rename from fs/nilfs2.c rename to grub-core/fs/nilfs2.c diff --git a/fs/ntfs.c b/grub-core/fs/ntfs.c similarity index 100% rename from fs/ntfs.c rename to grub-core/fs/ntfs.c diff --git a/fs/ntfscomp.c b/grub-core/fs/ntfscomp.c similarity index 100% rename from fs/ntfscomp.c rename to grub-core/fs/ntfscomp.c diff --git a/fs/reiserfs.c b/grub-core/fs/reiserfs.c similarity index 100% rename from fs/reiserfs.c rename to grub-core/fs/reiserfs.c diff --git a/fs/sfs.c b/grub-core/fs/sfs.c similarity index 100% rename from fs/sfs.c rename to grub-core/fs/sfs.c diff --git a/fs/tar.c b/grub-core/fs/tar.c similarity index 100% rename from fs/tar.c rename to grub-core/fs/tar.c diff --git a/fs/udf.c b/grub-core/fs/udf.c similarity index 100% rename from fs/udf.c rename to grub-core/fs/udf.c diff --git a/fs/ufs.c b/grub-core/fs/ufs.c similarity index 100% rename from fs/ufs.c rename to grub-core/fs/ufs.c diff --git a/fs/ufs2.c b/grub-core/fs/ufs2.c similarity index 100% rename from fs/ufs2.c rename to grub-core/fs/ufs2.c diff --git a/fs/xfs.c b/grub-core/fs/xfs.c similarity index 100% rename from fs/xfs.c rename to grub-core/fs/xfs.c diff --git a/gencmdlist.sh b/grub-core/gencmdlist.sh similarity index 100% rename from gencmdlist.sh rename to grub-core/gencmdlist.sh diff --git a/gendistlist.sh b/grub-core/gendistlist.sh similarity index 100% rename from gendistlist.sh rename to grub-core/gendistlist.sh diff --git a/genemuinit.sh b/grub-core/genemuinit.sh similarity index 100% rename from genemuinit.sh rename to grub-core/genemuinit.sh diff --git a/genemuinitheader.sh b/grub-core/genemuinitheader.sh similarity index 100% rename from genemuinitheader.sh rename to grub-core/genemuinitheader.sh diff --git a/genfslist.sh b/grub-core/genfslist.sh similarity index 100% rename from genfslist.sh rename to grub-core/genfslist.sh diff --git a/genhandlerlist.sh b/grub-core/genhandlerlist.sh similarity index 100% rename from genhandlerlist.sh rename to grub-core/genhandlerlist.sh diff --git a/genmoddep.awk b/grub-core/genmoddep.awk similarity index 93% rename from genmoddep.awk rename to grub-core/genmoddep.awk index 48419a091..6c92e2fc7 100644 --- a/genmoddep.awk +++ b/grub-core/genmoddep.awk @@ -18,15 +18,14 @@ BEGIN { } } -# The first line contains a module name. -FNR == 1 { - module = $1 - next -}; - # The rest is undefined symbols. { - if ($1 in symtab) { + module = $2 + + # skip if empty + if ($1 == "" || $2 == "") + ; + else if ($1 in symtab) { modtab[module] = modtab[module] " " symtab[$1]; } else if ($1 != "__gnu_local_gp") { diff --git a/genmodsrc.sh b/grub-core/genmodsrc.sh similarity index 100% rename from genmodsrc.sh rename to grub-core/genmodsrc.sh diff --git a/genpartmaplist.sh b/grub-core/genpartmaplist.sh similarity index 100% rename from genpartmaplist.sh rename to grub-core/genpartmaplist.sh diff --git a/genparttoollist.sh b/grub-core/genparttoollist.sh similarity index 100% rename from genparttoollist.sh rename to grub-core/genparttoollist.sh diff --git a/gensymlist.sh.in b/grub-core/gensymlist.sh similarity index 84% rename from gensymlist.sh.in rename to grub-core/gensymlist.sh index 3c3ddfa6c..0ab56e9cb 100644 --- a/gensymlist.sh.in +++ b/grub-core/gensymlist.sh @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright (C) 2002,2006,2007,2008 Free Software Foundation, Inc. +# Copyright (C) 2002,2006,2007,2008,2009,2010 Free Software Foundation, Inc. # # This gensymlist.sh.in is free software; the author # gives unlimited permission to copy and/or distribute it, @@ -11,17 +11,11 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -### The configure script will replace these variables. - -: ${srcdir=@srcdir@} -: ${CC=@TARGET_CC@} - - cat <. */ -#include EOF for i in $*; do @@ -60,7 +53,7 @@ cat < int -main () +main (int argc __attribute__ ((unused)), + char **argv __attribute__ ((unused))) { int i; diff --git a/genvideolist.sh b/grub-core/genvideolist.sh similarity index 100% rename from genvideolist.sh rename to grub-core/genvideolist.sh diff --git a/gettext/gettext.c b/grub-core/gettext/gettext.c similarity index 100% rename from gettext/gettext.c rename to grub-core/gettext/gettext.c diff --git a/gfxmenu/gfxmenu.c b/grub-core/gfxmenu/gfxmenu.c similarity index 100% rename from gfxmenu/gfxmenu.c rename to grub-core/gfxmenu/gfxmenu.c diff --git a/gfxmenu/gui_box.c b/grub-core/gfxmenu/gui_box.c similarity index 100% rename from gfxmenu/gui_box.c rename to grub-core/gfxmenu/gui_box.c diff --git a/gfxmenu/gui_canvas.c b/grub-core/gfxmenu/gui_canvas.c similarity index 100% rename from gfxmenu/gui_canvas.c rename to grub-core/gfxmenu/gui_canvas.c diff --git a/gfxmenu/gui_circular_progress.c b/grub-core/gfxmenu/gui_circular_progress.c similarity index 100% rename from gfxmenu/gui_circular_progress.c rename to grub-core/gfxmenu/gui_circular_progress.c diff --git a/gfxmenu/gui_image.c b/grub-core/gfxmenu/gui_image.c similarity index 100% rename from gfxmenu/gui_image.c rename to grub-core/gfxmenu/gui_image.c diff --git a/gfxmenu/gui_label.c b/grub-core/gfxmenu/gui_label.c similarity index 100% rename from gfxmenu/gui_label.c rename to grub-core/gfxmenu/gui_label.c diff --git a/gfxmenu/gui_list.c b/grub-core/gfxmenu/gui_list.c similarity index 100% rename from gfxmenu/gui_list.c rename to grub-core/gfxmenu/gui_list.c diff --git a/gfxmenu/gui_progress_bar.c b/grub-core/gfxmenu/gui_progress_bar.c similarity index 100% rename from gfxmenu/gui_progress_bar.c rename to grub-core/gfxmenu/gui_progress_bar.c diff --git a/gfxmenu/gui_string_util.c b/grub-core/gfxmenu/gui_string_util.c similarity index 100% rename from gfxmenu/gui_string_util.c rename to grub-core/gfxmenu/gui_string_util.c diff --git a/gfxmenu/gui_util.c b/grub-core/gfxmenu/gui_util.c similarity index 100% rename from gfxmenu/gui_util.c rename to grub-core/gfxmenu/gui_util.c diff --git a/gfxmenu/icon_manager.c b/grub-core/gfxmenu/icon_manager.c similarity index 100% rename from gfxmenu/icon_manager.c rename to grub-core/gfxmenu/icon_manager.c diff --git a/gfxmenu/model.c b/grub-core/gfxmenu/model.c similarity index 100% rename from gfxmenu/model.c rename to grub-core/gfxmenu/model.c diff --git a/gfxmenu/named_colors.c b/grub-core/gfxmenu/named_colors.c similarity index 100% rename from gfxmenu/named_colors.c rename to grub-core/gfxmenu/named_colors.c diff --git a/gfxmenu/theme_loader.c b/grub-core/gfxmenu/theme_loader.c similarity index 100% rename from gfxmenu/theme_loader.c rename to grub-core/gfxmenu/theme_loader.c diff --git a/gfxmenu/view.c b/grub-core/gfxmenu/view.c similarity index 100% rename from gfxmenu/view.c rename to grub-core/gfxmenu/view.c diff --git a/gfxmenu/widget-box.c b/grub-core/gfxmenu/widget-box.c similarity index 100% rename from gfxmenu/widget-box.c rename to grub-core/gfxmenu/widget-box.c diff --git a/gnulib/alloca.h b/grub-core/gnulib/alloca.h similarity index 100% rename from gnulib/alloca.h rename to grub-core/gnulib/alloca.h diff --git a/gnulib/argp-ba.c b/grub-core/gnulib/argp-ba.c similarity index 100% rename from gnulib/argp-ba.c rename to grub-core/gnulib/argp-ba.c diff --git a/gnulib/argp-eexst.c b/grub-core/gnulib/argp-eexst.c similarity index 100% rename from gnulib/argp-eexst.c rename to grub-core/gnulib/argp-eexst.c diff --git a/gnulib/argp-fmtstream.c b/grub-core/gnulib/argp-fmtstream.c similarity index 100% rename from gnulib/argp-fmtstream.c rename to grub-core/gnulib/argp-fmtstream.c diff --git a/gnulib/argp-fmtstream.h b/grub-core/gnulib/argp-fmtstream.h similarity index 100% rename from gnulib/argp-fmtstream.h rename to grub-core/gnulib/argp-fmtstream.h diff --git a/gnulib/argp-fs-xinl.c b/grub-core/gnulib/argp-fs-xinl.c similarity index 100% rename from gnulib/argp-fs-xinl.c rename to grub-core/gnulib/argp-fs-xinl.c diff --git a/gnulib/argp-help.c b/grub-core/gnulib/argp-help.c similarity index 100% rename from gnulib/argp-help.c rename to grub-core/gnulib/argp-help.c diff --git a/gnulib/argp-namefrob.h b/grub-core/gnulib/argp-namefrob.h similarity index 100% rename from gnulib/argp-namefrob.h rename to grub-core/gnulib/argp-namefrob.h diff --git a/gnulib/argp-parse.c b/grub-core/gnulib/argp-parse.c similarity index 100% rename from gnulib/argp-parse.c rename to grub-core/gnulib/argp-parse.c diff --git a/gnulib/argp-pin.c b/grub-core/gnulib/argp-pin.c similarity index 100% rename from gnulib/argp-pin.c rename to grub-core/gnulib/argp-pin.c diff --git a/gnulib/argp-pv.c b/grub-core/gnulib/argp-pv.c similarity index 100% rename from gnulib/argp-pv.c rename to grub-core/gnulib/argp-pv.c diff --git a/gnulib/argp-pvh.c b/grub-core/gnulib/argp-pvh.c similarity index 100% rename from gnulib/argp-pvh.c rename to grub-core/gnulib/argp-pvh.c diff --git a/gnulib/argp-version-etc.c b/grub-core/gnulib/argp-version-etc.c similarity index 100% rename from gnulib/argp-version-etc.c rename to grub-core/gnulib/argp-version-etc.c diff --git a/gnulib/argp-version-etc.h b/grub-core/gnulib/argp-version-etc.h similarity index 100% rename from gnulib/argp-version-etc.h rename to grub-core/gnulib/argp-version-etc.h diff --git a/gnulib/argp-xinl.c b/grub-core/gnulib/argp-xinl.c similarity index 100% rename from gnulib/argp-xinl.c rename to grub-core/gnulib/argp-xinl.c diff --git a/gnulib/argp.h b/grub-core/gnulib/argp.h similarity index 100% rename from gnulib/argp.h rename to grub-core/gnulib/argp.h diff --git a/gnulib/error.c b/grub-core/gnulib/error.c similarity index 100% rename from gnulib/error.c rename to grub-core/gnulib/error.c diff --git a/gnulib/error.h b/grub-core/gnulib/error.h similarity index 100% rename from gnulib/error.h rename to grub-core/gnulib/error.h diff --git a/gnulib/fnmatch.c b/grub-core/gnulib/fnmatch.c similarity index 100% rename from gnulib/fnmatch.c rename to grub-core/gnulib/fnmatch.c diff --git a/gnulib/fnmatch.h b/grub-core/gnulib/fnmatch.h similarity index 100% rename from gnulib/fnmatch.h rename to grub-core/gnulib/fnmatch.h diff --git a/gnulib/fnmatch_loop.c b/grub-core/gnulib/fnmatch_loop.c similarity index 100% rename from gnulib/fnmatch_loop.c rename to grub-core/gnulib/fnmatch_loop.c diff --git a/gnulib/getdelim.c b/grub-core/gnulib/getdelim.c similarity index 100% rename from gnulib/getdelim.c rename to grub-core/gnulib/getdelim.c diff --git a/gnulib/getline.c b/grub-core/gnulib/getline.c similarity index 100% rename from gnulib/getline.c rename to grub-core/gnulib/getline.c diff --git a/gnulib/getopt.c b/grub-core/gnulib/getopt.c similarity index 100% rename from gnulib/getopt.c rename to grub-core/gnulib/getopt.c diff --git a/gnulib/getopt.h b/grub-core/gnulib/getopt.h similarity index 100% rename from gnulib/getopt.h rename to grub-core/gnulib/getopt.h diff --git a/gnulib/getopt1.c b/grub-core/gnulib/getopt1.c similarity index 100% rename from gnulib/getopt1.c rename to grub-core/gnulib/getopt1.c diff --git a/gnulib/getopt_int.h b/grub-core/gnulib/getopt_int.h similarity index 100% rename from gnulib/getopt_int.h rename to grub-core/gnulib/getopt_int.h diff --git a/gnulib/gettext.h b/grub-core/gnulib/gettext.h similarity index 100% rename from gnulib/gettext.h rename to grub-core/gnulib/gettext.h diff --git a/gnulib/progname.c b/grub-core/gnulib/progname.c similarity index 100% rename from gnulib/progname.c rename to grub-core/gnulib/progname.c diff --git a/gnulib/progname.h b/grub-core/gnulib/progname.h similarity index 100% rename from gnulib/progname.h rename to grub-core/gnulib/progname.h diff --git a/gnulib/regcomp.c b/grub-core/gnulib/regcomp.c similarity index 100% rename from gnulib/regcomp.c rename to grub-core/gnulib/regcomp.c diff --git a/gnulib/regex.c b/grub-core/gnulib/regex.c similarity index 100% rename from gnulib/regex.c rename to grub-core/gnulib/regex.c diff --git a/gnulib/regex.h b/grub-core/gnulib/regex.h similarity index 100% rename from gnulib/regex.h rename to grub-core/gnulib/regex.h diff --git a/gnulib/regex_internal.c b/grub-core/gnulib/regex_internal.c similarity index 100% rename from gnulib/regex_internal.c rename to grub-core/gnulib/regex_internal.c diff --git a/gnulib/regex_internal.h b/grub-core/gnulib/regex_internal.h similarity index 100% rename from gnulib/regex_internal.h rename to grub-core/gnulib/regex_internal.h diff --git a/gnulib/regexec.c b/grub-core/gnulib/regexec.c similarity index 100% rename from gnulib/regexec.c rename to grub-core/gnulib/regexec.c diff --git a/hello/hello.c b/grub-core/hello/hello.c similarity index 100% rename from hello/hello.c rename to grub-core/hello/hello.c diff --git a/hook/datehook.c b/grub-core/hook/datehook.c similarity index 100% rename from hook/datehook.c rename to grub-core/hook/datehook.c diff --git a/util/import_gcry.py b/grub-core/import_gcry.py similarity index 100% rename from util/import_gcry.py rename to grub-core/import_gcry.py diff --git a/include/grub/acorn_filecore.h b/grub-core/include/grub/acorn_filecore.h similarity index 100% rename from include/grub/acorn_filecore.h rename to grub-core/include/grub/acorn_filecore.h diff --git a/include/grub/acpi.h b/grub-core/include/grub/acpi.h similarity index 100% rename from include/grub/acpi.h rename to grub-core/include/grub/acpi.h diff --git a/include/grub/aout.h b/grub-core/include/grub/aout.h similarity index 100% rename from include/grub/aout.h rename to grub-core/include/grub/aout.h diff --git a/include/grub/at_keyboard.h b/grub-core/include/grub/at_keyboard.h similarity index 100% rename from include/grub/at_keyboard.h rename to grub-core/include/grub/at_keyboard.h diff --git a/include/grub/ata.h b/grub-core/include/grub/ata.h similarity index 100% rename from include/grub/ata.h rename to grub-core/include/grub/ata.h diff --git a/include/grub/auth.h b/grub-core/include/grub/auth.h similarity index 100% rename from include/grub/auth.h rename to grub-core/include/grub/auth.h diff --git a/include/grub/autoefi.h b/grub-core/include/grub/autoefi.h similarity index 100% rename from include/grub/autoefi.h rename to grub-core/include/grub/autoefi.h diff --git a/include/grub/bitmap.h b/grub-core/include/grub/bitmap.h similarity index 100% rename from include/grub/bitmap.h rename to grub-core/include/grub/bitmap.h diff --git a/include/grub/bitmap_scale.h b/grub-core/include/grub/bitmap_scale.h similarity index 100% rename from include/grub/bitmap_scale.h rename to grub-core/include/grub/bitmap_scale.h diff --git a/include/grub/boot.h b/grub-core/include/grub/boot.h similarity index 100% rename from include/grub/boot.h rename to grub-core/include/grub/boot.h diff --git a/include/grub/bsdlabel.h b/grub-core/include/grub/bsdlabel.h similarity index 100% rename from include/grub/bsdlabel.h rename to grub-core/include/grub/bsdlabel.h diff --git a/include/grub/bufio.h b/grub-core/include/grub/bufio.h similarity index 100% rename from include/grub/bufio.h rename to grub-core/include/grub/bufio.h diff --git a/include/grub/cache.h b/grub-core/include/grub/cache.h similarity index 100% rename from include/grub/cache.h rename to grub-core/include/grub/cache.h diff --git a/include/grub/charset.h b/grub-core/include/grub/charset.h similarity index 100% rename from include/grub/charset.h rename to grub-core/include/grub/charset.h diff --git a/include/grub/cmos.h b/grub-core/include/grub/cmos.h similarity index 100% rename from include/grub/cmos.h rename to grub-core/include/grub/cmos.h diff --git a/include/grub/command.h b/grub-core/include/grub/command.h similarity index 100% rename from include/grub/command.h rename to grub-core/include/grub/command.h diff --git a/include/grub/crypto.h b/grub-core/include/grub/crypto.h similarity index 100% rename from include/grub/crypto.h rename to grub-core/include/grub/crypto.h diff --git a/include/grub/datetime.h b/grub-core/include/grub/datetime.h similarity index 100% rename from include/grub/datetime.h rename to grub-core/include/grub/datetime.h diff --git a/include/grub/device.h b/grub-core/include/grub/device.h similarity index 100% rename from include/grub/device.h rename to grub-core/include/grub/device.h diff --git a/include/grub/disk.h b/grub-core/include/grub/disk.h similarity index 100% rename from include/grub/disk.h rename to grub-core/include/grub/disk.h diff --git a/include/grub/dl.h b/grub-core/include/grub/dl.h similarity index 90% rename from include/grub/dl.h rename to grub-core/include/grub/dl.h index cfb7c2f99..f98539a4e 100644 --- a/include/grub/dl.h +++ b/grub-core/include/grub/dl.h @@ -25,6 +25,13 @@ #include #include +/* + * Macros GRUB_MOD_INIT and GRUB_MOD_FINI are also used by build rules + * to collect module names, so we define them only when they are not + * defined already. + */ + +#ifndef GRUB_MOD_INIT #define GRUB_MOD_INIT(name) \ static void grub_mod_init (grub_dl_t mod __attribute__ ((unused))) __attribute__ ((used)); \ void grub_##name##_init (void); \ @@ -32,7 +39,9 @@ void \ grub_##name##_init (void) { grub_mod_init (0); } \ static void \ grub_mod_init (grub_dl_t mod __attribute__ ((unused))) +#endif +#ifndef GRUB_MOD_FINI #define GRUB_MOD_FINI(name) \ static void grub_mod_fini (void) __attribute__ ((used)); \ void grub_##name##_fini (void); \ @@ -40,6 +49,7 @@ void \ grub_##name##_fini (void) { grub_mod_fini (); } \ static void \ grub_mod_fini (void) +#endif #ifdef APPLE_CC #define GRUB_MOD_NAME(name) \ @@ -91,28 +101,8 @@ grub_dl_t grub_dl_load_core (void *addr, grub_size_t size); int EXPORT_FUNC(grub_dl_unload) (grub_dl_t mod); void grub_dl_unload_unneeded (void); void grub_dl_unload_all (void); -#if defined (GRUB_UTIL) || defined (GRUB_TARGET_NO_MODULES) -#define GRUB_NO_MODULES 1 -#else -#define GRUB_NO_MODULES 0 -#endif -#if GRUB_NO_MODULES -static inline int -grub_dl_ref (grub_dl_t mod) -{ - (void) mod; - return 0; -} -static inline int -grub_dl_unref (grub_dl_t mod) -{ - (void) mod; - return 0; -} -#else int EXPORT_FUNC(grub_dl_ref) (grub_dl_t mod); int EXPORT_FUNC(grub_dl_unref) (grub_dl_t mod); -#endif void EXPORT_FUNC(grub_dl_iterate) (int (*hook) (grub_dl_t mod)); grub_dl_t EXPORT_FUNC(grub_dl_get) (const char *name); grub_err_t grub_dl_register_symbol (const char *name, void *addr, @@ -121,7 +111,7 @@ grub_err_t grub_dl_register_symbol (const char *name, void *addr, grub_err_t grub_arch_dl_check_header (void *ehdr); grub_err_t grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr); -#if defined (_mips) && ! GRUB_NO_MODULES +#if defined (_mips) #define GRUB_LINKER_HAVE_INIT 1 void grub_arch_dl_init_linker (void); #endif diff --git a/include/grub/efi/api.h b/grub-core/include/grub/efi/api.h similarity index 100% rename from include/grub/efi/api.h rename to grub-core/include/grub/efi/api.h diff --git a/include/grub/efi/console.h b/grub-core/include/grub/efi/console.h similarity index 100% rename from include/grub/efi/console.h rename to grub-core/include/grub/efi/console.h diff --git a/include/grub/efi/console_control.h b/grub-core/include/grub/efi/console_control.h similarity index 100% rename from include/grub/efi/console_control.h rename to grub-core/include/grub/efi/console_control.h diff --git a/include/grub/efi/disk.h b/grub-core/include/grub/efi/disk.h similarity index 100% rename from include/grub/efi/disk.h rename to grub-core/include/grub/efi/disk.h diff --git a/include/grub/efi/efi.h b/grub-core/include/grub/efi/efi.h similarity index 100% rename from include/grub/efi/efi.h rename to grub-core/include/grub/efi/efi.h diff --git a/include/grub/efi/graphics_output.h b/grub-core/include/grub/efi/graphics_output.h similarity index 100% rename from include/grub/efi/graphics_output.h rename to grub-core/include/grub/efi/graphics_output.h diff --git a/include/grub/efi/memory.h b/grub-core/include/grub/efi/memory.h similarity index 100% rename from include/grub/efi/memory.h rename to grub-core/include/grub/efi/memory.h diff --git a/include/grub/efi/pe32.h b/grub-core/include/grub/efi/pe32.h similarity index 100% rename from include/grub/efi/pe32.h rename to grub-core/include/grub/efi/pe32.h diff --git a/include/grub/efi/time.h b/grub-core/include/grub/efi/time.h similarity index 100% rename from include/grub/efi/time.h rename to grub-core/include/grub/efi/time.h diff --git a/include/grub/efi/uga_draw.h b/grub-core/include/grub/efi/uga_draw.h similarity index 100% rename from include/grub/efi/uga_draw.h rename to grub-core/include/grub/efi/uga_draw.h diff --git a/include/grub/efiemu/efiemu.h b/grub-core/include/grub/efiemu/efiemu.h similarity index 100% rename from include/grub/efiemu/efiemu.h rename to grub-core/include/grub/efiemu/efiemu.h diff --git a/include/grub/efiemu/runtime.h b/grub-core/include/grub/efiemu/runtime.h similarity index 100% rename from include/grub/efiemu/runtime.h rename to grub-core/include/grub/efiemu/runtime.h diff --git a/include/grub/elf.h b/grub-core/include/grub/elf.h similarity index 100% rename from include/grub/elf.h rename to grub-core/include/grub/elf.h diff --git a/include/grub/elfload.h b/grub-core/include/grub/elfload.h similarity index 100% rename from include/grub/elfload.h rename to grub-core/include/grub/elfload.h diff --git a/include/grub/util/console.h b/grub-core/include/grub/emu/console.h similarity index 100% rename from include/grub/util/console.h rename to grub-core/include/grub/emu/console.h diff --git a/include/grub/util/getroot.h b/grub-core/include/grub/emu/getroot.h similarity index 94% rename from include/grub/util/getroot.h rename to grub-core/include/grub/emu/getroot.h index dff7b4df7..04a2805c8 100644 --- a/include/grub/util/getroot.h +++ b/grub-core/include/grub/emu/getroot.h @@ -28,6 +28,7 @@ enum grub_dev_abstraction_types { char *grub_guess_root_device (const char *dir); int grub_util_get_dev_abstraction (const char *os_dev); char *grub_util_get_grub_dev (const char *os_dev); +char *grub_make_system_path_relative_to_its_root (const char *path); const char *grub_util_check_block_device (const char *blk_dev); const char *grub_util_check_char_device (const char *blk_dev); diff --git a/include/grub/util/hostdisk.h b/grub-core/include/grub/emu/hostdisk.h similarity index 100% rename from include/grub/util/hostdisk.h rename to grub-core/include/grub/emu/hostdisk.h diff --git a/grub-core/include/grub/emu/misc.h b/grub-core/include/grub/emu/misc.h new file mode 100644 index 000000000..29c1d4a73 --- /dev/null +++ b/grub-core/include/grub/emu/misc.h @@ -0,0 +1,22 @@ +#ifndef GRUB_EMU_MISC_H +#define GRUB_EMU_MISC_H 1 + +#include +#include + +extern int verbosity; +extern const char *program_name; + +void grub_init_all (void); +void grub_fini_all (void); + +void * EXPORT_FUNC(xmalloc) (grub_size_t size); +void * EXPORT_FUNC(xrealloc) (void *ptr, grub_size_t size); +char * EXPORT_FUNC(xstrdup) (const char *str); +char * EXPORT_FUNC(xasprintf) (const char *fmt, ...); + +void EXPORT_FUNC(grub_util_warn) (const char *fmt, ...); +void EXPORT_FUNC(grub_util_info) (const char *fmt, ...); +void EXPORT_FUNC(grub_util_error) (const char *fmt, ...) __attribute__ ((noreturn)); + +#endif /* GRUB_EMU_MISC_H */ diff --git a/include/grub/env.h b/grub-core/include/grub/env.h similarity index 100% rename from include/grub/env.h rename to grub-core/include/grub/env.h diff --git a/include/grub/env_private.h b/grub-core/include/grub/env_private.h similarity index 100% rename from include/grub/env_private.h rename to grub-core/include/grub/env_private.h diff --git a/include/grub/err.h b/grub-core/include/grub/err.h similarity index 100% rename from include/grub/err.h rename to grub-core/include/grub/err.h diff --git a/include/grub/extcmd.h b/grub-core/include/grub/extcmd.h similarity index 100% rename from include/grub/extcmd.h rename to grub-core/include/grub/extcmd.h diff --git a/include/grub/fbblit.h b/grub-core/include/grub/fbblit.h similarity index 100% rename from include/grub/fbblit.h rename to grub-core/include/grub/fbblit.h diff --git a/include/grub/fbfill.h b/grub-core/include/grub/fbfill.h similarity index 100% rename from include/grub/fbfill.h rename to grub-core/include/grub/fbfill.h diff --git a/include/grub/fbutil.h b/grub-core/include/grub/fbutil.h similarity index 100% rename from include/grub/fbutil.h rename to grub-core/include/grub/fbutil.h diff --git a/include/grub/file.h b/grub-core/include/grub/file.h similarity index 100% rename from include/grub/file.h rename to grub-core/include/grub/file.h diff --git a/include/grub/font.h b/grub-core/include/grub/font.h similarity index 100% rename from include/grub/font.h rename to grub-core/include/grub/font.h diff --git a/include/grub/fontformat.h b/grub-core/include/grub/fontformat.h similarity index 100% rename from include/grub/fontformat.h rename to grub-core/include/grub/fontformat.h diff --git a/include/grub/fs.h b/grub-core/include/grub/fs.h similarity index 100% rename from include/grub/fs.h rename to grub-core/include/grub/fs.h diff --git a/include/grub/fshelp.h b/grub-core/include/grub/fshelp.h similarity index 100% rename from include/grub/fshelp.h rename to grub-core/include/grub/fshelp.h diff --git a/include/grub/gfxmenu_model.h b/grub-core/include/grub/gfxmenu_model.h similarity index 100% rename from include/grub/gfxmenu_model.h rename to grub-core/include/grub/gfxmenu_model.h diff --git a/include/grub/gfxmenu_view.h b/grub-core/include/grub/gfxmenu_view.h similarity index 100% rename from include/grub/gfxmenu_view.h rename to grub-core/include/grub/gfxmenu_view.h diff --git a/include/grub/gfxterm.h b/grub-core/include/grub/gfxterm.h similarity index 100% rename from include/grub/gfxterm.h rename to grub-core/include/grub/gfxterm.h diff --git a/include/grub/gfxwidgets.h b/grub-core/include/grub/gfxwidgets.h similarity index 100% rename from include/grub/gfxwidgets.h rename to grub-core/include/grub/gfxwidgets.h diff --git a/include/grub/gpt_partition.h b/grub-core/include/grub/gpt_partition.h similarity index 100% rename from include/grub/gpt_partition.h rename to grub-core/include/grub/gpt_partition.h diff --git a/include/grub/gui.h b/grub-core/include/grub/gui.h similarity index 100% rename from include/grub/gui.h rename to grub-core/include/grub/gui.h diff --git a/include/grub/gui_string_util.h b/grub-core/include/grub/gui_string_util.h similarity index 100% rename from include/grub/gui_string_util.h rename to grub-core/include/grub/gui_string_util.h diff --git a/include/grub/gzio.h b/grub-core/include/grub/gzio.h similarity index 100% rename from include/grub/gzio.h rename to grub-core/include/grub/gzio.h diff --git a/include/grub/handler.h b/grub-core/include/grub/handler.h similarity index 100% rename from include/grub/handler.h rename to grub-core/include/grub/handler.h diff --git a/include/grub/hfs.h b/grub-core/include/grub/hfs.h similarity index 100% rename from include/grub/hfs.h rename to grub-core/include/grub/hfs.h diff --git a/include/grub/i18n.h b/grub-core/include/grub/i18n.h similarity index 100% rename from include/grub/i18n.h rename to grub-core/include/grub/i18n.h diff --git a/include/grub/i386/at_keyboard.h b/grub-core/include/grub/i386/at_keyboard.h similarity index 100% rename from include/grub/i386/at_keyboard.h rename to grub-core/include/grub/i386/at_keyboard.h diff --git a/include/grub/i386/bsd.h b/grub-core/include/grub/i386/bsd.h similarity index 100% rename from include/grub/i386/bsd.h rename to grub-core/include/grub/i386/bsd.h diff --git a/include/grub/i386/cmos.h b/grub-core/include/grub/i386/cmos.h similarity index 100% rename from include/grub/i386/cmos.h rename to grub-core/include/grub/i386/cmos.h diff --git a/include/grub/i386/coreboot/boot.h b/grub-core/include/grub/i386/coreboot/boot.h similarity index 100% rename from include/grub/i386/coreboot/boot.h rename to grub-core/include/grub/i386/coreboot/boot.h diff --git a/include/grub/i386/coreboot/console.h b/grub-core/include/grub/i386/coreboot/console.h similarity index 100% rename from include/grub/i386/coreboot/console.h rename to grub-core/include/grub/i386/coreboot/console.h diff --git a/include/grub/i386/coreboot/init.h b/grub-core/include/grub/i386/coreboot/init.h similarity index 100% rename from include/grub/i386/coreboot/init.h rename to grub-core/include/grub/i386/coreboot/init.h diff --git a/include/grub/i386/coreboot/kernel.h b/grub-core/include/grub/i386/coreboot/kernel.h similarity index 100% rename from include/grub/i386/coreboot/kernel.h rename to grub-core/include/grub/i386/coreboot/kernel.h diff --git a/include/grub/i386/coreboot/loader.h b/grub-core/include/grub/i386/coreboot/loader.h similarity index 100% rename from include/grub/i386/coreboot/loader.h rename to grub-core/include/grub/i386/coreboot/loader.h diff --git a/include/grub/i386/coreboot/memory.h b/grub-core/include/grub/i386/coreboot/memory.h similarity index 100% rename from include/grub/i386/coreboot/memory.h rename to grub-core/include/grub/i386/coreboot/memory.h diff --git a/include/grub/i386/coreboot/serial.h b/grub-core/include/grub/i386/coreboot/serial.h similarity index 100% rename from include/grub/i386/coreboot/serial.h rename to grub-core/include/grub/i386/coreboot/serial.h diff --git a/include/grub/i386/coreboot/time.h b/grub-core/include/grub/i386/coreboot/time.h similarity index 100% rename from include/grub/i386/coreboot/time.h rename to grub-core/include/grub/i386/coreboot/time.h diff --git a/include/grub/i386/cpuid.h b/grub-core/include/grub/i386/cpuid.h similarity index 100% rename from include/grub/i386/cpuid.h rename to grub-core/include/grub/i386/cpuid.h diff --git a/include/grub/i386/efi/kernel.h b/grub-core/include/grub/i386/efi/kernel.h similarity index 100% rename from include/grub/i386/efi/kernel.h rename to grub-core/include/grub/i386/efi/kernel.h diff --git a/include/grub/i386/efi/loader.h b/grub-core/include/grub/i386/efi/loader.h similarity index 100% rename from include/grub/i386/efi/loader.h rename to grub-core/include/grub/i386/efi/loader.h diff --git a/include/grub/i386/efi/memory.h b/grub-core/include/grub/i386/efi/memory.h similarity index 100% rename from include/grub/i386/efi/memory.h rename to grub-core/include/grub/i386/efi/memory.h diff --git a/include/grub/i386/efi/serial.h b/grub-core/include/grub/i386/efi/serial.h similarity index 100% rename from include/grub/i386/efi/serial.h rename to grub-core/include/grub/i386/efi/serial.h diff --git a/include/grub/i386/efi/time.h b/grub-core/include/grub/i386/efi/time.h similarity index 100% rename from include/grub/i386/efi/time.h rename to grub-core/include/grub/i386/efi/time.h diff --git a/include/grub/i386/efiemu.h b/grub-core/include/grub/i386/efiemu.h similarity index 100% rename from include/grub/i386/efiemu.h rename to grub-core/include/grub/i386/efiemu.h diff --git a/include/grub/i386/freebsd_linker.h b/grub-core/include/grub/i386/freebsd_linker.h similarity index 100% rename from include/grub/i386/freebsd_linker.h rename to grub-core/include/grub/i386/freebsd_linker.h diff --git a/include/grub/i386/freebsd_reboot.h b/grub-core/include/grub/i386/freebsd_reboot.h similarity index 100% rename from include/grub/i386/freebsd_reboot.h rename to grub-core/include/grub/i386/freebsd_reboot.h diff --git a/include/grub/i386/ieee1275/console.h b/grub-core/include/grub/i386/ieee1275/console.h similarity index 100% rename from include/grub/i386/ieee1275/console.h rename to grub-core/include/grub/i386/ieee1275/console.h diff --git a/include/grub/i386/ieee1275/ieee1275.h b/grub-core/include/grub/i386/ieee1275/ieee1275.h similarity index 100% rename from include/grub/i386/ieee1275/ieee1275.h rename to grub-core/include/grub/i386/ieee1275/ieee1275.h diff --git a/include/grub/i386/ieee1275/kernel.h b/grub-core/include/grub/i386/ieee1275/kernel.h similarity index 100% rename from include/grub/i386/ieee1275/kernel.h rename to grub-core/include/grub/i386/ieee1275/kernel.h diff --git a/include/grub/i386/ieee1275/loader.h b/grub-core/include/grub/i386/ieee1275/loader.h similarity index 100% rename from include/grub/i386/ieee1275/loader.h rename to grub-core/include/grub/i386/ieee1275/loader.h diff --git a/include/grub/i386/ieee1275/memory.h b/grub-core/include/grub/i386/ieee1275/memory.h similarity index 100% rename from include/grub/i386/ieee1275/memory.h rename to grub-core/include/grub/i386/ieee1275/memory.h diff --git a/include/grub/i386/ieee1275/serial.h b/grub-core/include/grub/i386/ieee1275/serial.h similarity index 100% rename from include/grub/i386/ieee1275/serial.h rename to grub-core/include/grub/i386/ieee1275/serial.h diff --git a/include/grub/i386/ieee1275/time.h b/grub-core/include/grub/i386/ieee1275/time.h similarity index 100% rename from include/grub/i386/ieee1275/time.h rename to grub-core/include/grub/i386/ieee1275/time.h diff --git a/include/grub/i386/io.h b/grub-core/include/grub/i386/io.h similarity index 100% rename from include/grub/i386/io.h rename to grub-core/include/grub/i386/io.h diff --git a/include/grub/i386/kernel.h b/grub-core/include/grub/i386/kernel.h similarity index 100% rename from include/grub/i386/kernel.h rename to grub-core/include/grub/i386/kernel.h diff --git a/include/grub/i386/linux.h b/grub-core/include/grub/i386/linux.h similarity index 100% rename from include/grub/i386/linux.h rename to grub-core/include/grub/i386/linux.h diff --git a/include/grub/i386/loader.h b/grub-core/include/grub/i386/loader.h similarity index 100% rename from include/grub/i386/loader.h rename to grub-core/include/grub/i386/loader.h diff --git a/include/grub/i386/macho.h b/grub-core/include/grub/i386/macho.h similarity index 100% rename from include/grub/i386/macho.h rename to grub-core/include/grub/i386/macho.h diff --git a/include/grub/i386/memory.h b/grub-core/include/grub/i386/memory.h similarity index 100% rename from include/grub/i386/memory.h rename to grub-core/include/grub/i386/memory.h diff --git a/include/grub/i386/multiboot.h b/grub-core/include/grub/i386/multiboot.h similarity index 100% rename from include/grub/i386/multiboot.h rename to grub-core/include/grub/i386/multiboot.h diff --git a/include/grub/i386/multiboot/boot.h b/grub-core/include/grub/i386/multiboot/boot.h similarity index 100% rename from include/grub/i386/multiboot/boot.h rename to grub-core/include/grub/i386/multiboot/boot.h diff --git a/include/grub/i386/multiboot/console.h b/grub-core/include/grub/i386/multiboot/console.h similarity index 100% rename from include/grub/i386/multiboot/console.h rename to grub-core/include/grub/i386/multiboot/console.h diff --git a/include/grub/i386/multiboot/init.h b/grub-core/include/grub/i386/multiboot/init.h similarity index 100% rename from include/grub/i386/multiboot/init.h rename to grub-core/include/grub/i386/multiboot/init.h diff --git a/include/grub/i386/multiboot/kernel.h b/grub-core/include/grub/i386/multiboot/kernel.h similarity index 100% rename from include/grub/i386/multiboot/kernel.h rename to grub-core/include/grub/i386/multiboot/kernel.h diff --git a/include/grub/i386/multiboot/loader.h b/grub-core/include/grub/i386/multiboot/loader.h similarity index 100% rename from include/grub/i386/multiboot/loader.h rename to grub-core/include/grub/i386/multiboot/loader.h diff --git a/include/grub/i386/multiboot/memory.h b/grub-core/include/grub/i386/multiboot/memory.h similarity index 100% rename from include/grub/i386/multiboot/memory.h rename to grub-core/include/grub/i386/multiboot/memory.h diff --git a/include/grub/i386/multiboot/serial.h b/grub-core/include/grub/i386/multiboot/serial.h similarity index 100% rename from include/grub/i386/multiboot/serial.h rename to grub-core/include/grub/i386/multiboot/serial.h diff --git a/include/grub/i386/multiboot/time.h b/grub-core/include/grub/i386/multiboot/time.h similarity index 100% rename from include/grub/i386/multiboot/time.h rename to grub-core/include/grub/i386/multiboot/time.h diff --git a/include/grub/i386/netbsd_bootinfo.h b/grub-core/include/grub/i386/netbsd_bootinfo.h similarity index 100% rename from include/grub/i386/netbsd_bootinfo.h rename to grub-core/include/grub/i386/netbsd_bootinfo.h diff --git a/include/grub/i386/netbsd_reboot.h b/grub-core/include/grub/i386/netbsd_reboot.h similarity index 100% rename from include/grub/i386/netbsd_reboot.h rename to grub-core/include/grub/i386/netbsd_reboot.h diff --git a/include/grub/i386/openbsd_bootarg.h b/grub-core/include/grub/i386/openbsd_bootarg.h similarity index 100% rename from include/grub/i386/openbsd_bootarg.h rename to grub-core/include/grub/i386/openbsd_bootarg.h diff --git a/include/grub/i386/openbsd_reboot.h b/grub-core/include/grub/i386/openbsd_reboot.h similarity index 100% rename from include/grub/i386/openbsd_reboot.h rename to grub-core/include/grub/i386/openbsd_reboot.h diff --git a/include/grub/i386/pc/biosdisk.h b/grub-core/include/grub/i386/pc/biosdisk.h similarity index 100% rename from include/grub/i386/pc/biosdisk.h rename to grub-core/include/grub/i386/pc/biosdisk.h diff --git a/include/grub/i386/pc/biosnum.h b/grub-core/include/grub/i386/pc/biosnum.h similarity index 100% rename from include/grub/i386/pc/biosnum.h rename to grub-core/include/grub/i386/pc/biosnum.h diff --git a/include/grub/i386/pc/boot.h b/grub-core/include/grub/i386/pc/boot.h similarity index 100% rename from include/grub/i386/pc/boot.h rename to grub-core/include/grub/i386/pc/boot.h diff --git a/include/grub/i386/pc/chainloader.h b/grub-core/include/grub/i386/pc/chainloader.h similarity index 100% rename from include/grub/i386/pc/chainloader.h rename to grub-core/include/grub/i386/pc/chainloader.h diff --git a/include/grub/i386/pc/console.h b/grub-core/include/grub/i386/pc/console.h similarity index 100% rename from include/grub/i386/pc/console.h rename to grub-core/include/grub/i386/pc/console.h diff --git a/include/grub/i386/pc/efiemu.h b/grub-core/include/grub/i386/pc/efiemu.h similarity index 100% rename from include/grub/i386/pc/efiemu.h rename to grub-core/include/grub/i386/pc/efiemu.h diff --git a/include/grub/i386/pc/init.h b/grub-core/include/grub/i386/pc/init.h similarity index 100% rename from include/grub/i386/pc/init.h rename to grub-core/include/grub/i386/pc/init.h diff --git a/include/grub/i386/pc/kernel.h b/grub-core/include/grub/i386/pc/kernel.h similarity index 100% rename from include/grub/i386/pc/kernel.h rename to grub-core/include/grub/i386/pc/kernel.h diff --git a/include/grub/i386/pc/loader.h b/grub-core/include/grub/i386/pc/loader.h similarity index 100% rename from include/grub/i386/pc/loader.h rename to grub-core/include/grub/i386/pc/loader.h diff --git a/include/grub/i386/pc/memory.h b/grub-core/include/grub/i386/pc/memory.h similarity index 100% rename from include/grub/i386/pc/memory.h rename to grub-core/include/grub/i386/pc/memory.h diff --git a/include/grub/i386/pc/pxe.h b/grub-core/include/grub/i386/pc/pxe.h similarity index 100% rename from include/grub/i386/pc/pxe.h rename to grub-core/include/grub/i386/pc/pxe.h diff --git a/include/grub/i386/pc/time.h b/grub-core/include/grub/i386/pc/time.h similarity index 100% rename from include/grub/i386/pc/time.h rename to grub-core/include/grub/i386/pc/time.h diff --git a/include/grub/i386/pc/vbe.h b/grub-core/include/grub/i386/pc/vbe.h similarity index 100% rename from include/grub/i386/pc/vbe.h rename to grub-core/include/grub/i386/pc/vbe.h diff --git a/include/grub/i386/pc/vga.h b/grub-core/include/grub/i386/pc/vga.h similarity index 100% rename from include/grub/i386/pc/vga.h rename to grub-core/include/grub/i386/pc/vga.h diff --git a/include/grub/i386/pci.h b/grub-core/include/grub/i386/pci.h similarity index 100% rename from include/grub/i386/pci.h rename to grub-core/include/grub/i386/pci.h diff --git a/include/grub/i386/pit.h b/grub-core/include/grub/i386/pit.h similarity index 100% rename from include/grub/i386/pit.h rename to grub-core/include/grub/i386/pit.h diff --git a/include/grub/i386/qemu/boot.h b/grub-core/include/grub/i386/qemu/boot.h similarity index 100% rename from include/grub/i386/qemu/boot.h rename to grub-core/include/grub/i386/qemu/boot.h diff --git a/include/grub/i386/qemu/console.h b/grub-core/include/grub/i386/qemu/console.h similarity index 100% rename from include/grub/i386/qemu/console.h rename to grub-core/include/grub/i386/qemu/console.h diff --git a/include/grub/i386/qemu/init.h b/grub-core/include/grub/i386/qemu/init.h similarity index 100% rename from include/grub/i386/qemu/init.h rename to grub-core/include/grub/i386/qemu/init.h diff --git a/include/grub/i386/qemu/kernel.h b/grub-core/include/grub/i386/qemu/kernel.h similarity index 100% rename from include/grub/i386/qemu/kernel.h rename to grub-core/include/grub/i386/qemu/kernel.h diff --git a/include/grub/i386/qemu/loader.h b/grub-core/include/grub/i386/qemu/loader.h similarity index 100% rename from include/grub/i386/qemu/loader.h rename to grub-core/include/grub/i386/qemu/loader.h diff --git a/include/grub/i386/qemu/memory.h b/grub-core/include/grub/i386/qemu/memory.h similarity index 100% rename from include/grub/i386/qemu/memory.h rename to grub-core/include/grub/i386/qemu/memory.h diff --git a/include/grub/i386/qemu/serial.h b/grub-core/include/grub/i386/qemu/serial.h similarity index 100% rename from include/grub/i386/qemu/serial.h rename to grub-core/include/grub/i386/qemu/serial.h diff --git a/include/grub/i386/qemu/time.h b/grub-core/include/grub/i386/qemu/time.h similarity index 100% rename from include/grub/i386/qemu/time.h rename to grub-core/include/grub/i386/qemu/time.h diff --git a/include/grub/i386/relocator.h b/grub-core/include/grub/i386/relocator.h similarity index 100% rename from include/grub/i386/relocator.h rename to grub-core/include/grub/i386/relocator.h diff --git a/include/grub/i386/setjmp.h b/grub-core/include/grub/i386/setjmp.h similarity index 100% rename from include/grub/i386/setjmp.h rename to grub-core/include/grub/i386/setjmp.h diff --git a/include/grub/i386/time.h b/grub-core/include/grub/i386/time.h similarity index 100% rename from include/grub/i386/time.h rename to grub-core/include/grub/i386/time.h diff --git a/include/grub/i386/tsc.h b/grub-core/include/grub/i386/tsc.h similarity index 100% rename from include/grub/i386/tsc.h rename to grub-core/include/grub/i386/tsc.h diff --git a/include/grub/i386/types.h b/grub-core/include/grub/i386/types.h similarity index 100% rename from include/grub/i386/types.h rename to grub-core/include/grub/i386/types.h diff --git a/include/grub/i386/vga_common.h b/grub-core/include/grub/i386/vga_common.h similarity index 100% rename from include/grub/i386/vga_common.h rename to grub-core/include/grub/i386/vga_common.h diff --git a/include/grub/i386/xnu.h b/grub-core/include/grub/i386/xnu.h similarity index 100% rename from include/grub/i386/xnu.h rename to grub-core/include/grub/i386/xnu.h diff --git a/include/grub/icon_manager.h b/grub-core/include/grub/icon_manager.h similarity index 100% rename from include/grub/icon_manager.h rename to grub-core/include/grub/icon_manager.h diff --git a/include/grub/ieee1275/ieee1275.h b/grub-core/include/grub/ieee1275/ieee1275.h similarity index 100% rename from include/grub/ieee1275/ieee1275.h rename to grub-core/include/grub/ieee1275/ieee1275.h diff --git a/include/grub/ieee1275/ofdisk.h b/grub-core/include/grub/ieee1275/ofdisk.h similarity index 100% rename from include/grub/ieee1275/ofdisk.h rename to grub-core/include/grub/ieee1275/ofdisk.h diff --git a/include/grub/kernel.h b/grub-core/include/grub/kernel.h similarity index 100% rename from include/grub/kernel.h rename to grub-core/include/grub/kernel.h diff --git a/include/grub/lib/LzFind.h b/grub-core/include/grub/lib/LzFind.h similarity index 100% rename from include/grub/lib/LzFind.h rename to grub-core/include/grub/lib/LzFind.h diff --git a/include/grub/lib/LzHash.h b/grub-core/include/grub/lib/LzHash.h similarity index 100% rename from include/grub/lib/LzHash.h rename to grub-core/include/grub/lib/LzHash.h diff --git a/include/grub/lib/LzmaDec.h b/grub-core/include/grub/lib/LzmaDec.h similarity index 100% rename from include/grub/lib/LzmaDec.h rename to grub-core/include/grub/lib/LzmaDec.h diff --git a/include/grub/lib/LzmaEnc.h b/grub-core/include/grub/lib/LzmaEnc.h similarity index 100% rename from include/grub/lib/LzmaEnc.h rename to grub-core/include/grub/lib/LzmaEnc.h diff --git a/include/grub/lib/LzmaTypes.h b/grub-core/include/grub/lib/LzmaTypes.h similarity index 100% rename from include/grub/lib/LzmaTypes.h rename to grub-core/include/grub/lib/LzmaTypes.h diff --git a/include/grub/lib/arg.h b/grub-core/include/grub/lib/arg.h similarity index 100% rename from include/grub/lib/arg.h rename to grub-core/include/grub/lib/arg.h diff --git a/include/grub/lib/crc.h b/grub-core/include/grub/lib/crc.h similarity index 100% rename from include/grub/lib/crc.h rename to grub-core/include/grub/lib/crc.h diff --git a/include/grub/lib/envblk.h b/grub-core/include/grub/lib/envblk.h similarity index 100% rename from include/grub/lib/envblk.h rename to grub-core/include/grub/lib/envblk.h diff --git a/include/grub/lib/hexdump.h b/grub-core/include/grub/lib/hexdump.h similarity index 100% rename from include/grub/lib/hexdump.h rename to grub-core/include/grub/lib/hexdump.h diff --git a/include/grub/libgcc.h b/grub-core/include/grub/libgcc.h similarity index 100% rename from include/grub/libgcc.h rename to grub-core/include/grub/libgcc.h diff --git a/include/grub/libpciaccess.h b/grub-core/include/grub/libpciaccess.h similarity index 100% rename from include/grub/libpciaccess.h rename to grub-core/include/grub/libpciaccess.h diff --git a/include/grub/libusb.h b/grub-core/include/grub/libusb.h similarity index 100% rename from include/grub/libusb.h rename to grub-core/include/grub/libusb.h diff --git a/include/grub/list.h b/grub-core/include/grub/list.h similarity index 100% rename from include/grub/list.h rename to grub-core/include/grub/list.h diff --git a/include/grub/loader.h b/grub-core/include/grub/loader.h similarity index 100% rename from include/grub/loader.h rename to grub-core/include/grub/loader.h diff --git a/include/grub/lvm.h b/grub-core/include/grub/lvm.h similarity index 100% rename from include/grub/lvm.h rename to grub-core/include/grub/lvm.h diff --git a/include/grub/macho.h b/grub-core/include/grub/macho.h similarity index 100% rename from include/grub/macho.h rename to grub-core/include/grub/macho.h diff --git a/include/grub/machoload.h b/grub-core/include/grub/machoload.h similarity index 100% rename from include/grub/machoload.h rename to grub-core/include/grub/machoload.h diff --git a/include/grub/memory.h b/grub-core/include/grub/memory.h similarity index 100% rename from include/grub/memory.h rename to grub-core/include/grub/memory.h diff --git a/include/grub/menu.h b/grub-core/include/grub/menu.h similarity index 100% rename from include/grub/menu.h rename to grub-core/include/grub/menu.h diff --git a/include/grub/menu_viewer.h b/grub-core/include/grub/menu_viewer.h similarity index 100% rename from include/grub/menu_viewer.h rename to grub-core/include/grub/menu_viewer.h diff --git a/include/grub/mips/at_keyboard.h b/grub-core/include/grub/mips/at_keyboard.h similarity index 100% rename from include/grub/mips/at_keyboard.h rename to grub-core/include/grub/mips/at_keyboard.h diff --git a/include/grub/mips/cache.h b/grub-core/include/grub/mips/cache.h similarity index 100% rename from include/grub/mips/cache.h rename to grub-core/include/grub/mips/cache.h diff --git a/include/grub/mips/cmos.h b/grub-core/include/grub/mips/cmos.h similarity index 100% rename from include/grub/mips/cmos.h rename to grub-core/include/grub/mips/cmos.h diff --git a/include/grub/mips/io.h b/grub-core/include/grub/mips/io.h similarity index 100% rename from include/grub/mips/io.h rename to grub-core/include/grub/mips/io.h diff --git a/include/grub/mips/kernel.h b/grub-core/include/grub/mips/kernel.h similarity index 100% rename from include/grub/mips/kernel.h rename to grub-core/include/grub/mips/kernel.h diff --git a/include/grub/mips/multiboot.h b/grub-core/include/grub/mips/multiboot.h similarity index 100% rename from include/grub/mips/multiboot.h rename to grub-core/include/grub/mips/multiboot.h diff --git a/include/grub/mips/pci.h b/grub-core/include/grub/mips/pci.h similarity index 100% rename from include/grub/mips/pci.h rename to grub-core/include/grub/mips/pci.h diff --git a/include/grub/mips/qemu-mips/boot.h b/grub-core/include/grub/mips/qemu-mips/boot.h similarity index 100% rename from include/grub/mips/qemu-mips/boot.h rename to grub-core/include/grub/mips/qemu-mips/boot.h diff --git a/include/grub/mips/qemu-mips/kernel.h b/grub-core/include/grub/mips/qemu-mips/kernel.h similarity index 100% rename from include/grub/mips/qemu-mips/kernel.h rename to grub-core/include/grub/mips/qemu-mips/kernel.h diff --git a/include/grub/mips/qemu-mips/loader.h b/grub-core/include/grub/mips/qemu-mips/loader.h similarity index 100% rename from include/grub/mips/qemu-mips/loader.h rename to grub-core/include/grub/mips/qemu-mips/loader.h diff --git a/include/grub/mips/qemu-mips/memory.h b/grub-core/include/grub/mips/qemu-mips/memory.h similarity index 100% rename from include/grub/mips/qemu-mips/memory.h rename to grub-core/include/grub/mips/qemu-mips/memory.h diff --git a/include/grub/mips/qemu-mips/serial.h b/grub-core/include/grub/mips/qemu-mips/serial.h similarity index 100% rename from include/grub/mips/qemu-mips/serial.h rename to grub-core/include/grub/mips/qemu-mips/serial.h diff --git a/include/grub/mips/qemu-mips/time.h b/grub-core/include/grub/mips/qemu-mips/time.h similarity index 100% rename from include/grub/mips/qemu-mips/time.h rename to grub-core/include/grub/mips/qemu-mips/time.h diff --git a/include/grub/mips/relocator.h b/grub-core/include/grub/mips/relocator.h similarity index 100% rename from include/grub/mips/relocator.h rename to grub-core/include/grub/mips/relocator.h diff --git a/include/grub/mips/setjmp.h b/grub-core/include/grub/mips/setjmp.h similarity index 100% rename from include/grub/mips/setjmp.h rename to grub-core/include/grub/mips/setjmp.h diff --git a/include/grub/mips/time.h b/grub-core/include/grub/mips/time.h similarity index 100% rename from include/grub/mips/time.h rename to grub-core/include/grub/mips/time.h diff --git a/include/grub/mips/types.h b/grub-core/include/grub/mips/types.h similarity index 100% rename from include/grub/mips/types.h rename to grub-core/include/grub/mips/types.h diff --git a/include/grub/mips/yeeloong/at_keyboard.h b/grub-core/include/grub/mips/yeeloong/at_keyboard.h similarity index 100% rename from include/grub/mips/yeeloong/at_keyboard.h rename to grub-core/include/grub/mips/yeeloong/at_keyboard.h diff --git a/include/grub/mips/yeeloong/boot.h b/grub-core/include/grub/mips/yeeloong/boot.h similarity index 100% rename from include/grub/mips/yeeloong/boot.h rename to grub-core/include/grub/mips/yeeloong/boot.h diff --git a/include/grub/mips/yeeloong/cmos.h b/grub-core/include/grub/mips/yeeloong/cmos.h similarity index 100% rename from include/grub/mips/yeeloong/cmos.h rename to grub-core/include/grub/mips/yeeloong/cmos.h diff --git a/include/grub/mips/yeeloong/kernel.h b/grub-core/include/grub/mips/yeeloong/kernel.h similarity index 100% rename from include/grub/mips/yeeloong/kernel.h rename to grub-core/include/grub/mips/yeeloong/kernel.h diff --git a/include/grub/mips/yeeloong/loader.h b/grub-core/include/grub/mips/yeeloong/loader.h similarity index 100% rename from include/grub/mips/yeeloong/loader.h rename to grub-core/include/grub/mips/yeeloong/loader.h diff --git a/include/grub/mips/yeeloong/memory.h b/grub-core/include/grub/mips/yeeloong/memory.h similarity index 100% rename from include/grub/mips/yeeloong/memory.h rename to grub-core/include/grub/mips/yeeloong/memory.h diff --git a/include/grub/mips/yeeloong/pci.h b/grub-core/include/grub/mips/yeeloong/pci.h similarity index 100% rename from include/grub/mips/yeeloong/pci.h rename to grub-core/include/grub/mips/yeeloong/pci.h diff --git a/include/grub/mips/yeeloong/serial.h b/grub-core/include/grub/mips/yeeloong/serial.h similarity index 100% rename from include/grub/mips/yeeloong/serial.h rename to grub-core/include/grub/mips/yeeloong/serial.h diff --git a/include/grub/mips/yeeloong/time.h b/grub-core/include/grub/mips/yeeloong/time.h similarity index 100% rename from include/grub/mips/yeeloong/time.h rename to grub-core/include/grub/mips/yeeloong/time.h diff --git a/include/grub/misc.h b/grub-core/include/grub/misc.h similarity index 100% rename from include/grub/misc.h rename to grub-core/include/grub/misc.h diff --git a/include/grub/mm.h b/grub-core/include/grub/mm.h similarity index 100% rename from include/grub/mm.h rename to grub-core/include/grub/mm.h diff --git a/include/grub/msdos_partition.h b/grub-core/include/grub/msdos_partition.h similarity index 100% rename from include/grub/msdos_partition.h rename to grub-core/include/grub/msdos_partition.h diff --git a/include/grub/multiboot.h b/grub-core/include/grub/multiboot.h similarity index 100% rename from include/grub/multiboot.h rename to grub-core/include/grub/multiboot.h diff --git a/include/grub/multiboot_loader.h b/grub-core/include/grub/multiboot_loader.h similarity index 100% rename from include/grub/multiboot_loader.h rename to grub-core/include/grub/multiboot_loader.h diff --git a/include/grub/net.h b/grub-core/include/grub/net.h similarity index 100% rename from include/grub/net.h rename to grub-core/include/grub/net.h diff --git a/include/grub/normal.h b/grub-core/include/grub/normal.h similarity index 100% rename from include/grub/normal.h rename to grub-core/include/grub/normal.h diff --git a/include/grub/ntfs.h b/grub-core/include/grub/ntfs.h similarity index 100% rename from include/grub/ntfs.h rename to grub-core/include/grub/ntfs.h diff --git a/include/grub/parser.h b/grub-core/include/grub/parser.h similarity index 100% rename from include/grub/parser.h rename to grub-core/include/grub/parser.h diff --git a/include/grub/partition.h b/grub-core/include/grub/partition.h similarity index 100% rename from include/grub/partition.h rename to grub-core/include/grub/partition.h diff --git a/include/grub/parttool.h b/grub-core/include/grub/parttool.h similarity index 100% rename from include/grub/parttool.h rename to grub-core/include/grub/parttool.h diff --git a/include/grub/pci.h b/grub-core/include/grub/pci.h similarity index 100% rename from include/grub/pci.h rename to grub-core/include/grub/pci.h diff --git a/include/grub/pciutils.h b/grub-core/include/grub/pciutils.h similarity index 100% rename from include/grub/pciutils.h rename to grub-core/include/grub/pciutils.h diff --git a/include/grub/powerpc/ieee1275/biosdisk.h b/grub-core/include/grub/powerpc/ieee1275/biosdisk.h similarity index 100% rename from include/grub/powerpc/ieee1275/biosdisk.h rename to grub-core/include/grub/powerpc/ieee1275/biosdisk.h diff --git a/include/grub/powerpc/ieee1275/console.h b/grub-core/include/grub/powerpc/ieee1275/console.h similarity index 100% rename from include/grub/powerpc/ieee1275/console.h rename to grub-core/include/grub/powerpc/ieee1275/console.h diff --git a/include/grub/powerpc/ieee1275/ieee1275.h b/grub-core/include/grub/powerpc/ieee1275/ieee1275.h similarity index 100% rename from include/grub/powerpc/ieee1275/ieee1275.h rename to grub-core/include/grub/powerpc/ieee1275/ieee1275.h diff --git a/include/grub/powerpc/ieee1275/kernel.h b/grub-core/include/grub/powerpc/ieee1275/kernel.h similarity index 100% rename from include/grub/powerpc/ieee1275/kernel.h rename to grub-core/include/grub/powerpc/ieee1275/kernel.h diff --git a/include/grub/powerpc/ieee1275/loader.h b/grub-core/include/grub/powerpc/ieee1275/loader.h similarity index 100% rename from include/grub/powerpc/ieee1275/loader.h rename to grub-core/include/grub/powerpc/ieee1275/loader.h diff --git a/include/grub/powerpc/ieee1275/memory.h b/grub-core/include/grub/powerpc/ieee1275/memory.h similarity index 100% rename from include/grub/powerpc/ieee1275/memory.h rename to grub-core/include/grub/powerpc/ieee1275/memory.h diff --git a/include/grub/powerpc/ieee1275/time.h b/grub-core/include/grub/powerpc/ieee1275/time.h similarity index 100% rename from include/grub/powerpc/ieee1275/time.h rename to grub-core/include/grub/powerpc/ieee1275/time.h diff --git a/include/grub/powerpc/ieee1275/util/biosdisk.h b/grub-core/include/grub/powerpc/ieee1275/util/biosdisk.h similarity index 100% rename from include/grub/powerpc/ieee1275/util/biosdisk.h rename to grub-core/include/grub/powerpc/ieee1275/util/biosdisk.h diff --git a/include/grub/powerpc/kernel.h b/grub-core/include/grub/powerpc/kernel.h similarity index 100% rename from include/grub/powerpc/kernel.h rename to grub-core/include/grub/powerpc/kernel.h diff --git a/include/grub/powerpc/setjmp.h b/grub-core/include/grub/powerpc/setjmp.h similarity index 100% rename from include/grub/powerpc/setjmp.h rename to grub-core/include/grub/powerpc/setjmp.h diff --git a/include/grub/powerpc/time.h b/grub-core/include/grub/powerpc/time.h similarity index 100% rename from include/grub/powerpc/time.h rename to grub-core/include/grub/powerpc/time.h diff --git a/include/grub/powerpc/types.h b/grub-core/include/grub/powerpc/types.h similarity index 100% rename from include/grub/powerpc/types.h rename to grub-core/include/grub/powerpc/types.h diff --git a/include/grub/raid.h b/grub-core/include/grub/raid.h similarity index 100% rename from include/grub/raid.h rename to grub-core/include/grub/raid.h diff --git a/include/grub/reader.h b/grub-core/include/grub/reader.h similarity index 100% rename from include/grub/reader.h rename to grub-core/include/grub/reader.h diff --git a/include/grub/script_sh.h b/grub-core/include/grub/script_sh.h similarity index 100% rename from include/grub/script_sh.h rename to grub-core/include/grub/script_sh.h diff --git a/include/grub/scsi.h b/grub-core/include/grub/scsi.h similarity index 100% rename from include/grub/scsi.h rename to grub-core/include/grub/scsi.h diff --git a/include/grub/scsicmd.h b/grub-core/include/grub/scsicmd.h similarity index 100% rename from include/grub/scsicmd.h rename to grub-core/include/grub/scsicmd.h diff --git a/include/grub/sdl.h b/grub-core/include/grub/sdl.h similarity index 100% rename from include/grub/sdl.h rename to grub-core/include/grub/sdl.h diff --git a/include/grub/search.h b/grub-core/include/grub/search.h similarity index 100% rename from include/grub/search.h rename to grub-core/include/grub/search.h diff --git a/include/grub/serial.h b/grub-core/include/grub/serial.h similarity index 100% rename from include/grub/serial.h rename to grub-core/include/grub/serial.h diff --git a/include/grub/setjmp.h b/grub-core/include/grub/setjmp.h similarity index 100% rename from include/grub/setjmp.h rename to grub-core/include/grub/setjmp.h diff --git a/include/grub/sparc64/ieee1275/boot.h b/grub-core/include/grub/sparc64/ieee1275/boot.h similarity index 100% rename from include/grub/sparc64/ieee1275/boot.h rename to grub-core/include/grub/sparc64/ieee1275/boot.h diff --git a/include/grub/sparc64/ieee1275/console.h b/grub-core/include/grub/sparc64/ieee1275/console.h similarity index 100% rename from include/grub/sparc64/ieee1275/console.h rename to grub-core/include/grub/sparc64/ieee1275/console.h diff --git a/include/grub/sparc64/ieee1275/ieee1275.h b/grub-core/include/grub/sparc64/ieee1275/ieee1275.h similarity index 100% rename from include/grub/sparc64/ieee1275/ieee1275.h rename to grub-core/include/grub/sparc64/ieee1275/ieee1275.h diff --git a/include/grub/sparc64/ieee1275/kernel.h b/grub-core/include/grub/sparc64/ieee1275/kernel.h similarity index 100% rename from include/grub/sparc64/ieee1275/kernel.h rename to grub-core/include/grub/sparc64/ieee1275/kernel.h diff --git a/include/grub/sparc64/ieee1275/loader.h b/grub-core/include/grub/sparc64/ieee1275/loader.h similarity index 100% rename from include/grub/sparc64/ieee1275/loader.h rename to grub-core/include/grub/sparc64/ieee1275/loader.h diff --git a/include/grub/sparc64/ieee1275/memory.h b/grub-core/include/grub/sparc64/ieee1275/memory.h similarity index 100% rename from include/grub/sparc64/ieee1275/memory.h rename to grub-core/include/grub/sparc64/ieee1275/memory.h diff --git a/include/grub/sparc64/ieee1275/time.h b/grub-core/include/grub/sparc64/ieee1275/time.h similarity index 100% rename from include/grub/sparc64/ieee1275/time.h rename to grub-core/include/grub/sparc64/ieee1275/time.h diff --git a/include/grub/sparc64/kernel.h b/grub-core/include/grub/sparc64/kernel.h similarity index 100% rename from include/grub/sparc64/kernel.h rename to grub-core/include/grub/sparc64/kernel.h diff --git a/include/grub/sparc64/setjmp.h b/grub-core/include/grub/sparc64/setjmp.h similarity index 100% rename from include/grub/sparc64/setjmp.h rename to grub-core/include/grub/sparc64/setjmp.h diff --git a/include/grub/sparc64/time.h b/grub-core/include/grub/sparc64/time.h similarity index 100% rename from include/grub/sparc64/time.h rename to grub-core/include/grub/sparc64/time.h diff --git a/include/grub/sparc64/types.h b/grub-core/include/grub/sparc64/types.h similarity index 100% rename from include/grub/sparc64/types.h rename to grub-core/include/grub/sparc64/types.h diff --git a/include/grub/symbol.h b/grub-core/include/grub/symbol.h similarity index 100% rename from include/grub/symbol.h rename to grub-core/include/grub/symbol.h diff --git a/include/grub/term.h b/grub-core/include/grub/term.h similarity index 100% rename from include/grub/term.h rename to grub-core/include/grub/term.h diff --git a/include/grub/terminfo.h b/grub-core/include/grub/terminfo.h similarity index 100% rename from include/grub/terminfo.h rename to grub-core/include/grub/terminfo.h diff --git a/include/grub/test.h b/grub-core/include/grub/test.h similarity index 93% rename from include/grub/test.h rename to grub-core/include/grub/test.h index 27591cca2..336d3b672 100644 --- a/include/grub/test.h +++ b/grub-core/include/grub/test.h @@ -72,14 +72,14 @@ void grub_test_nonzero (int cond, const char *file, /* Macro to define a functional test. */ #define GRUB_FUNCTIONAL_TEST(name, funp) \ - GRUB_MOD_INIT(functional_test_##funp) \ + GRUB_MOD_INIT(name) \ { \ - grub_test_register (name, funp); \ + grub_test_register (#name, funp); \ } \ \ - GRUB_MOD_FINI(functional_test_##funp) \ + GRUB_MOD_FINI(name) \ { \ - grub_test_unregister (name); \ + grub_test_unregister (#name); \ } #endif /* ! GRUB_TEST_HEADER */ diff --git a/include/grub/time.h b/grub-core/include/grub/time.h similarity index 100% rename from include/grub/time.h rename to grub-core/include/grub/time.h diff --git a/include/grub/tparm.h b/grub-core/include/grub/tparm.h similarity index 100% rename from include/grub/tparm.h rename to grub-core/include/grub/tparm.h diff --git a/include/grub/trig.h b/grub-core/include/grub/trig.h similarity index 100% rename from include/grub/trig.h rename to grub-core/include/grub/trig.h diff --git a/include/grub/types.h b/grub-core/include/grub/types.h similarity index 100% rename from include/grub/types.h rename to grub-core/include/grub/types.h diff --git a/include/grub/usb.h b/grub-core/include/grub/usb.h similarity index 100% rename from include/grub/usb.h rename to grub-core/include/grub/usb.h diff --git a/include/grub/usbdesc.h b/grub-core/include/grub/usbdesc.h similarity index 100% rename from include/grub/usbdesc.h rename to grub-core/include/grub/usbdesc.h diff --git a/include/grub/usbtrans.h b/grub-core/include/grub/usbtrans.h similarity index 100% rename from include/grub/usbtrans.h rename to grub-core/include/grub/usbtrans.h diff --git a/include/grub/util/deviceiter.h b/grub-core/include/grub/util/deviceiter.h similarity index 100% rename from include/grub/util/deviceiter.h rename to grub-core/include/grub/util/deviceiter.h diff --git a/include/grub/util/lvm.h b/grub-core/include/grub/util/lvm.h similarity index 100% rename from include/grub/util/lvm.h rename to grub-core/include/grub/util/lvm.h diff --git a/include/grub/util/misc.h b/grub-core/include/grub/util/misc.h similarity index 85% rename from include/grub/util/misc.h rename to grub-core/include/grub/util/misc.h index 8b78b92ea..ed71acdcd 100644 --- a/include/grub/util/misc.h +++ b/grub-core/include/grub/util/misc.h @@ -38,17 +38,6 @@ #define DEFAULT_DEVICE_MAP DEFAULT_DIRECTORY "/device.map" -extern char *progname; -extern int verbosity; - -void EXPORT_FUNC(grub_util_warn) (const char *fmt, ...); -void EXPORT_FUNC(grub_util_info) (const char *fmt, ...); -void EXPORT_FUNC(grub_util_error) (const char *fmt, ...) __attribute__ ((noreturn)); - -void *xmalloc (size_t size); -void *xrealloc (void *ptr, size_t size); -char *xstrdup (const char *str); - char *grub_util_get_path (const char *dir, const char *file); size_t grub_util_get_fp_size (FILE *fp); size_t grub_util_get_image_size (const char *path); @@ -71,8 +60,6 @@ int asprintf (char **buf, const char *fmt, ...); #endif -char *xasprintf (const char *fmt, ...); - #ifdef __MINGW32__ #define fseeko fseeko64 diff --git a/include/grub/util/ofpath.h b/grub-core/include/grub/util/ofpath.h similarity index 100% rename from include/grub/util/ofpath.h rename to grub-core/include/grub/util/ofpath.h diff --git a/include/grub/util/raid.h b/grub-core/include/grub/util/raid.h similarity index 100% rename from include/grub/util/raid.h rename to grub-core/include/grub/util/raid.h diff --git a/include/grub/util/resolve.h b/grub-core/include/grub/util/resolve.h similarity index 100% rename from include/grub/util/resolve.h rename to grub-core/include/grub/util/resolve.h diff --git a/include/grub/video.h b/grub-core/include/grub/video.h similarity index 100% rename from include/grub/video.h rename to grub-core/include/grub/video.h diff --git a/include/grub/video_fb.h b/grub-core/include/grub/video_fb.h similarity index 100% rename from include/grub/video_fb.h rename to grub-core/include/grub/video_fb.h diff --git a/include/grub/x86_64/at_keyboard.h b/grub-core/include/grub/x86_64/at_keyboard.h similarity index 100% rename from include/grub/x86_64/at_keyboard.h rename to grub-core/include/grub/x86_64/at_keyboard.h diff --git a/include/grub/x86_64/efi/kernel.h b/grub-core/include/grub/x86_64/efi/kernel.h similarity index 100% rename from include/grub/x86_64/efi/kernel.h rename to grub-core/include/grub/x86_64/efi/kernel.h diff --git a/include/grub/x86_64/efi/loader.h b/grub-core/include/grub/x86_64/efi/loader.h similarity index 100% rename from include/grub/x86_64/efi/loader.h rename to grub-core/include/grub/x86_64/efi/loader.h diff --git a/include/grub/x86_64/efi/memory.h b/grub-core/include/grub/x86_64/efi/memory.h similarity index 100% rename from include/grub/x86_64/efi/memory.h rename to grub-core/include/grub/x86_64/efi/memory.h diff --git a/include/grub/x86_64/efi/serial.h b/grub-core/include/grub/x86_64/efi/serial.h similarity index 100% rename from include/grub/x86_64/efi/serial.h rename to grub-core/include/grub/x86_64/efi/serial.h diff --git a/include/grub/x86_64/efi/time.h b/grub-core/include/grub/x86_64/efi/time.h similarity index 100% rename from include/grub/x86_64/efi/time.h rename to grub-core/include/grub/x86_64/efi/time.h diff --git a/include/grub/x86_64/io.h b/grub-core/include/grub/x86_64/io.h similarity index 100% rename from include/grub/x86_64/io.h rename to grub-core/include/grub/x86_64/io.h diff --git a/include/grub/x86_64/kernel.h b/grub-core/include/grub/x86_64/kernel.h similarity index 100% rename from include/grub/x86_64/kernel.h rename to grub-core/include/grub/x86_64/kernel.h diff --git a/include/grub/x86_64/linux.h b/grub-core/include/grub/x86_64/linux.h similarity index 100% rename from include/grub/x86_64/linux.h rename to grub-core/include/grub/x86_64/linux.h diff --git a/include/grub/x86_64/macho.h b/grub-core/include/grub/x86_64/macho.h similarity index 100% rename from include/grub/x86_64/macho.h rename to grub-core/include/grub/x86_64/macho.h diff --git a/include/grub/x86_64/multiboot.h b/grub-core/include/grub/x86_64/multiboot.h similarity index 100% rename from include/grub/x86_64/multiboot.h rename to grub-core/include/grub/x86_64/multiboot.h diff --git a/include/grub/x86_64/pci.h b/grub-core/include/grub/x86_64/pci.h similarity index 100% rename from include/grub/x86_64/pci.h rename to grub-core/include/grub/x86_64/pci.h diff --git a/include/grub/x86_64/relocator.h b/grub-core/include/grub/x86_64/relocator.h similarity index 100% rename from include/grub/x86_64/relocator.h rename to grub-core/include/grub/x86_64/relocator.h diff --git a/include/grub/x86_64/setjmp.h b/grub-core/include/grub/x86_64/setjmp.h similarity index 100% rename from include/grub/x86_64/setjmp.h rename to grub-core/include/grub/x86_64/setjmp.h diff --git a/include/grub/x86_64/time.h b/grub-core/include/grub/x86_64/time.h similarity index 100% rename from include/grub/x86_64/time.h rename to grub-core/include/grub/x86_64/time.h diff --git a/include/grub/x86_64/types.h b/grub-core/include/grub/x86_64/types.h similarity index 100% rename from include/grub/x86_64/types.h rename to grub-core/include/grub/x86_64/types.h diff --git a/include/grub/x86_64/xnu.h b/grub-core/include/grub/x86_64/xnu.h similarity index 100% rename from include/grub/x86_64/xnu.h rename to grub-core/include/grub/x86_64/xnu.h diff --git a/include/grub/xnu.h b/grub-core/include/grub/xnu.h similarity index 100% rename from include/grub/xnu.h rename to grub-core/include/grub/xnu.h diff --git a/include/multiboot.h b/grub-core/include/multiboot.h similarity index 100% rename from include/multiboot.h rename to grub-core/include/multiboot.h diff --git a/include/multiboot2.h b/grub-core/include/multiboot2.h similarity index 100% rename from include/multiboot2.h rename to grub-core/include/multiboot2.h diff --git a/io/bufio.c b/grub-core/io/bufio.c similarity index 100% rename from io/bufio.c rename to grub-core/io/bufio.c diff --git a/io/gzio.c b/grub-core/io/gzio.c similarity index 100% rename from io/gzio.c rename to grub-core/io/gzio.c diff --git a/kern/command.c b/grub-core/kern/command.c similarity index 100% rename from kern/command.c rename to grub-core/kern/command.c diff --git a/kern/corecmd.c b/grub-core/kern/corecmd.c similarity index 100% rename from kern/corecmd.c rename to grub-core/kern/corecmd.c diff --git a/kern/device.c b/grub-core/kern/device.c similarity index 100% rename from kern/device.c rename to grub-core/kern/device.c diff --git a/kern/disk.c b/grub-core/kern/disk.c similarity index 100% rename from kern/disk.c rename to grub-core/kern/disk.c diff --git a/kern/dl.c b/grub-core/kern/dl.c similarity index 99% rename from kern/dl.c rename to grub-core/kern/dl.c index 19ee13243..12391ced9 100644 --- a/kern/dl.c +++ b/grub-core/kern/dl.c @@ -469,12 +469,13 @@ grub_dl_resolve_dependencies (grub_dl_t mod, Elf_Ehdr *e) return GRUB_ERR_NONE; } -#if !GRUB_NO_MODULES int grub_dl_ref (grub_dl_t mod) { grub_dl_dep_t dep; + if (!mod) return 0; + for (dep = mod->dep; dep; dep = dep->next) grub_dl_ref (dep->mod); @@ -486,12 +487,13 @@ grub_dl_unref (grub_dl_t mod) { grub_dl_dep_t dep; + if (!mod) return 0; + for (dep = mod->dep; dep; dep = dep->next) grub_dl_unref (dep->mod); return --mod->ref_count; } -#endif static void grub_dl_flush_cache (grub_dl_t mod) diff --git a/kern/efi/efi.c b/grub-core/kern/efi/efi.c similarity index 100% rename from kern/efi/efi.c rename to grub-core/kern/efi/efi.c diff --git a/kern/efi/init.c b/grub-core/kern/efi/init.c similarity index 100% rename from kern/efi/init.c rename to grub-core/kern/efi/init.c diff --git a/kern/efi/mm.c b/grub-core/kern/efi/mm.c similarity index 100% rename from kern/efi/mm.c rename to grub-core/kern/efi/mm.c diff --git a/kern/elf.c b/grub-core/kern/elf.c similarity index 100% rename from kern/elf.c rename to grub-core/kern/elf.c diff --git a/grub-core/kern/emu/cache.S b/grub-core/kern/emu/cache.S new file mode 100644 index 000000000..087b2b495 --- /dev/null +++ b/grub-core/kern/emu/cache.S @@ -0,0 +1,17 @@ +#ifndef GRUB_MACHINE_EMU +#error "This source is only meant for grub-emu platform" +#endif + +#if GRUB_CPU_I386 +#elif GRUB_CPU_X86_64 +#elif GRUB_CPU_SPARC64 +#include "../sparc64/cache.S" +#elif GRUB_CPU_MIPS +#include "../mips/cache.S" +#elif GRUB_CPU_MIPSEL +#include "../mips/cache.S" +#elif GRUB_CPU_POWERPC +#include "../powerpc/cache.S" +#else +#error "No target cpu type is defined" +#endif diff --git a/util/console.c b/grub-core/kern/emu/console.c similarity index 99% rename from util/console.c rename to grub-core/kern/emu/console.c index 382fd7f89..f7fbc899a 100644 --- a/util/console.c +++ b/grub-core/kern/emu/console.c @@ -27,7 +27,7 @@ # define A_STANDOUT 0 #endif /* ! A_STANDOUT */ -#include +#include #include #include diff --git a/grub-core/kern/emu/dl.c b/grub-core/kern/emu/dl.c new file mode 100644 index 000000000..4266376a2 --- /dev/null +++ b/grub-core/kern/emu/dl.c @@ -0,0 +1,19 @@ +#ifndef GRUB_MACHINE_EMU +#error "This source is only meant for grub-emu platform" +#endif + +#if GRUB_CPU_I386 +#include "../i386/dl.c" +#elif GRUB_CPU_X86_64 +#include "../x86_64/dl.c" +#elif GRUB_CPU_SPARC64 +#include "../sparc64/dl.c" +#elif GRUB_CPU_MIPS +#include "../mips/dl.c" +#elif GRUB_CPU_MIPSEL +#include "../mips/dl.c" +#elif GRUB_CPU_POWERPC +#include "../powerpc/dl.c" +#else +#error "No target cpu type is defined" +#endif diff --git a/grub-core/kern/emu/dummy/dl.c b/grub-core/kern/emu/dummy/dl.c new file mode 100644 index 000000000..8e9fabfc2 --- /dev/null +++ b/grub-core/kern/emu/dummy/dl.c @@ -0,0 +1,51 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2010 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 . + */ + +#include +#include + +grub_err_t +grub_arch_dl_check_header (void *ehdr) +{ + (void) ehdr; + + return GRUB_ERR_BAD_MODULE; +} + +grub_err_t +grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr) +{ + (void) mod; + (void) ehdr; + + return GRUB_ERR_BAD_MODULE; +} + +/* int */ +/* grub_dl_ref (grub_dl_t mod) */ +/* { */ +/* (void) mod; */ +/* return 0; */ +/* } */ + +/* int */ +/* grub_dl_unref (grub_dl_t mod) */ +/* { */ +/* (void) mod; */ +/* return 0; */ +/* } */ diff --git a/grub-core/kern/emu/dummy/symlist.c b/grub-core/kern/emu/dummy/symlist.c new file mode 100644 index 000000000..d1445a347 --- /dev/null +++ b/grub-core/kern/emu/dummy/symlist.c @@ -0,0 +1,26 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2010 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 . + */ + +#include +#include +#include + +void +grub_register_exported_symbols (void) +{ +} diff --git a/util/getroot.c b/grub-core/kern/emu/getroot.c similarity index 82% rename from util/getroot.c rename to grub-core/kern/emu/getroot.c index 891bd0f10..ba357d861 100644 --- a/util/getroot.c +++ b/grub-core/kern/emu/getroot.c @@ -22,6 +22,10 @@ #include #include #include +#include +#include +#include +#include #ifdef __CYGWIN__ # include @@ -36,9 +40,11 @@ #include #endif -#include -#include -#include +#include +#include +#include +#include +#include static void strip_extra_slashes (char *dir) @@ -541,3 +547,100 @@ grub_util_check_char_device (const char *blk_dev) return 0; } +/* This function never prints trailing slashes (so that its output + can be appended a slash unconditionally). */ +char * +grub_make_system_path_relative_to_its_root (const char *path) +{ + struct stat st; + char *p, *buf, *buf2, *buf3; + uintptr_t offset = 0; + dev_t num; + size_t len; + + /* canonicalize. */ + p = canonicalize_file_name (path); + + if (p == NULL) + grub_util_error ("failed to get canonical path of %s", path); + + len = strlen (p) + 1; + buf = xstrdup (p); + free (p); + + if (stat (buf, &st) < 0) + grub_util_error ("cannot stat %s: %s", buf, strerror (errno)); + + buf2 = xstrdup (buf); + num = st.st_dev; + + /* This loop sets offset to the number of chars of the root + directory we're inspecting. */ + while (1) + { + p = strrchr (buf, '/'); + if (p == NULL) + /* This should never happen. */ + grub_util_error ("FIXME: no / in buf. (make_system_path_relative_to_its_root)"); + if (p != buf) + *p = 0; + else + *++p = 0; + + if (stat (buf, &st) < 0) + grub_util_error ("cannot stat %s: %s", buf, strerror (errno)); + + /* buf is another filesystem; we found it. */ + if (st.st_dev != num) + { + /* offset == 0 means path given is the mount point. + This works around special-casing of "/" in Un*x. This function never + prints trailing slashes (so that its output can be appended a slash + unconditionally). Each slash in is considered a preceding slash, and + therefore the root directory is an empty string. */ + if (offset == 0) + { + free (buf); + free (buf2); + return xstrdup (""); + } + else + break; + } + + offset = p - buf; + /* offset == 1 means root directory. */ + if (offset == 1) + { + /* Include leading slash. */ + offset = 0; + break; + } + } + free (buf); + buf3 = xstrdup (buf2 + offset); + free (buf2); + +#ifdef __CYGWIN__ + if (st.st_dev != (DEV_CYGDRIVE_MAJOR << 16)) + { + /* Reached some mount point not below /cygdrive. + GRUB does not know Cygwin's emulated mounts, + convert to Win32 path. */ + grub_util_info ("Cygwin path = %s\n", buf3); + char * temp = get_win32_path (buf3); + free (buf3); + buf3 = temp; + } +#endif + + /* Remove trailing slashes, return empty string if root directory. */ + len = strlen (buf3); + while (len > 0 && buf3[len - 1] == '/') + { + buf3[len - 1] = '\0'; + len--; + } + + return buf3; +} diff --git a/util/hostdisk.c b/grub-core/kern/emu/hostdisk.c similarity index 99% rename from util/hostdisk.c rename to grub-core/kern/emu/hostdisk.c index 8be487461..983f101ae 100644 --- a/util/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -22,8 +22,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/util/hostfs.c b/grub-core/kern/emu/hostfs.c similarity index 100% rename from util/hostfs.c rename to grub-core/kern/emu/hostfs.c diff --git a/grub-core/kern/emu/lite.c b/grub-core/kern/emu/lite.c new file mode 100644 index 000000000..1f06e39dc --- /dev/null +++ b/grub-core/kern/emu/lite.c @@ -0,0 +1,16 @@ +#include +#include + +/* grub-emu-lite supports dynamic module loading, so it won't have any + embedded modules. */ +void +grub_init_all(void) +{ + return; +} + +void +grub_fini_all(void) +{ + return; +} diff --git a/util/grub-emu.c b/grub-core/kern/emu/main.c similarity index 90% rename from util/grub-emu.c rename to grub-core/kern/emu/main.c index 8c53b0aca..9083e27a0 100644 --- a/util/grub-emu.c +++ b/grub-core/kern/emu/main.c @@ -16,7 +16,10 @@ * along with GRUB. If not, see . */ +#include +#include #include +#include #include #include #include @@ -27,20 +30,22 @@ #include #include #include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include #include -#define ENABLE_RELOCATABLE 0 #include "progname.h" +#define ENABLE_RELOCATABLE 0 + /* Used for going back to the main function. */ static jmp_buf main_env; @@ -53,25 +58,6 @@ grub_arch_modules_addr (void) return 0; } -#if GRUB_NO_MODULES -grub_err_t -grub_arch_dl_check_header (void *ehdr) -{ - (void) ehdr; - - return GRUB_ERR_BAD_MODULE; -} - -grub_err_t -grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr) -{ - (void) mod; - (void) ehdr; - - return GRUB_ERR_BAD_MODULE; -} -#endif - void grub_reboot (void) { @@ -150,10 +136,6 @@ void grub_hostfs_init (void); void grub_hostfs_fini (void); void grub_host_init (void); void grub_host_fini (void); -#if GRUB_NO_MODULES -void grub_init_all (void); -void grub_fini_all (void); -#endif int main (int argc, char *argv[]) @@ -219,9 +201,8 @@ main (int argc, char *argv[]) /* XXX: This is a bit unportable. */ grub_util_biosdisk_init (dev_map); -#if GRUB_NO_MODULES + /* Initialize all embedded modules. */ grub_init_all (); -#endif /* Make sure that there is a root device. */ if (! root_dev) @@ -242,7 +223,7 @@ main (int argc, char *argv[]) if (strcmp (root_dev, "host") == 0) dir = xstrdup (dir); else - dir = make_system_path_relative_to_its_root (dir); + dir = grub_make_system_path_relative_to_its_root (dir); prefix = xmalloc (strlen (root_dev) + 2 + strlen (dir) + 1); sprintf (prefix, "(%s)%s", root_dev, dir); free (dir); @@ -251,9 +232,7 @@ main (int argc, char *argv[]) if (setjmp (main_env) == 0) grub_main (); -#if GRUB_NO_MODULES grub_fini_all (); -#endif grub_hostfs_fini (); grub_host_fini (); @@ -261,3 +240,25 @@ main (int argc, char *argv[]) return 0; } + +#ifdef __MINGW32__ + +void +grub_millisleep (grub_uint32_t ms) +{ + Sleep (ms); +} + +#else + +void +grub_millisleep (grub_uint32_t ms) +{ + struct timespec ts; + + ts.tv_sec = ms / 1000; + ts.tv_nsec = (ms % 1000) * 1000000; + nanosleep (&ts, NULL); +} + +#endif diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c new file mode 100644 index 000000000..d8dfc938d --- /dev/null +++ b/grub-core/kern/emu/misc.c @@ -0,0 +1,199 @@ +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +int verbosity; + +void +grub_util_warn (const char *fmt, ...) +{ + va_list ap; + + fprintf (stderr, _("%s: warn:"), program_name); + fprintf (stderr, " "); + va_start (ap, fmt); + vfprintf (stderr, fmt, ap); + va_end (ap); + fprintf (stderr, ".\n"); + fflush (stderr); +} + +void +grub_util_info (const char *fmt, ...) +{ + if (verbosity > 0) + { + va_list ap; + + fprintf (stderr, _("%s: info:"), program_name); + fprintf (stderr, " "); + va_start (ap, fmt); + vfprintf (stderr, fmt, ap); + va_end (ap); + fprintf (stderr, ".\n"); + fflush (stderr); + } +} + +void +grub_util_error (const char *fmt, ...) +{ + va_list ap; + + fprintf (stderr, _("%s: error:"), program_name); + fprintf (stderr, " "); + va_start (ap, fmt); + vfprintf (stderr, fmt, ap); + va_end (ap); + fprintf (stderr, ".\n"); + exit (1); +} + +void * +grub_malloc (grub_size_t size) +{ + return malloc (size); +} + +void * +grub_zalloc (grub_size_t size) +{ + void *ret; + + ret = malloc (size); + memset (ret, 0, size); + return ret; +} + +void +grub_free (void *ptr) +{ + free (ptr); +} + +void * +grub_realloc (void *ptr, grub_size_t size) +{ + return realloc (ptr, size); +} + +void * +grub_memalign (grub_size_t align, grub_size_t size) +{ + void *p; + +#if defined(HAVE_POSIX_MEMALIGN) + if (align < sizeof (void *)) + align = sizeof (void *); + + else if (align % sizeof (void *)) + grub_fatal ("bad alignment"); + + if (posix_memalign (&p, align, size) != 0) + p = 0; +#elif defined(HAVE_MEMALIGN) + p = memalign (align, size); +#else + (void) align; + (void) size; + grub_fatal ("grub_memalign is not supported"); +#endif + + if (! p) + grub_fatal ("out of memory"); + + return p; +} + +void * +xmalloc (grub_size_t size) +{ + void *p; + + p = grub_malloc (size); + if (! p) + grub_fatal ("out of memory"); + + return p; +} + +void * +xrealloc (void *ptr, grub_size_t size) +{ + ptr = grub_realloc (ptr, size); + if (! ptr) + grub_fatal ("out of memory"); + + return ptr; +} + +char * +xstrdup (const char *str) +{ + size_t len; + char *newstr; + + len = grub_strlen (str); + newstr = (char *) xmalloc (len + 1); + grub_memcpy (newstr, str, len + 1); + + return newstr; +} + +char * +xasprintf (const char *fmt, ...) +{ + va_list ap; + char *result; + + va_start (ap, fmt); + if (vasprintf (&result, fmt, ap) < 0) + { + if (errno == ENOMEM) + grub_util_error ("out of memory"); + return NULL; + } + + return result; +} + +void +grub_exit (void) +{ + exit (1); +} + +grub_uint64_t +grub_get_time_ms (void) +{ + struct timeval tv; + + gettimeofday (&tv, 0); + + return (tv.tv_sec * 1000 + tv.tv_usec / 1000); +} + +grub_uint32_t +grub_get_rtc (void) +{ + struct timeval tv; + + gettimeofday (&tv, 0); + + return (tv.tv_sec * GRUB_TICKS_PER_SECOND + + (((tv.tv_sec % GRUB_TICKS_PER_SECOND) * 1000000 + tv.tv_usec) + * GRUB_TICKS_PER_SECOND / 1000000)); +} diff --git a/util/time.c b/grub-core/kern/emu/time.c similarity index 100% rename from util/time.c rename to grub-core/kern/emu/time.c diff --git a/kern/env.c b/grub-core/kern/env.c similarity index 100% rename from kern/env.c rename to grub-core/kern/env.c diff --git a/kern/err.c b/grub-core/kern/err.c similarity index 100% rename from kern/err.c rename to grub-core/kern/err.c diff --git a/kern/file.c b/grub-core/kern/file.c similarity index 100% rename from kern/file.c rename to grub-core/kern/file.c diff --git a/kern/fs.c b/grub-core/kern/fs.c similarity index 100% rename from kern/fs.c rename to grub-core/kern/fs.c diff --git a/kern/generic/millisleep.c b/grub-core/kern/generic/millisleep.c similarity index 100% rename from kern/generic/millisleep.c rename to grub-core/kern/generic/millisleep.c diff --git a/kern/generic/rtc_get_time_ms.c b/grub-core/kern/generic/rtc_get_time_ms.c similarity index 100% rename from kern/generic/rtc_get_time_ms.c rename to grub-core/kern/generic/rtc_get_time_ms.c diff --git a/kern/handler.c b/grub-core/kern/handler.c similarity index 100% rename from kern/handler.c rename to grub-core/kern/handler.c diff --git a/kern/i386/coreboot/init.c b/grub-core/kern/i386/coreboot/init.c similarity index 100% rename from kern/i386/coreboot/init.c rename to grub-core/kern/i386/coreboot/init.c diff --git a/kern/i386/coreboot/mmap.c b/grub-core/kern/i386/coreboot/mmap.c similarity index 100% rename from kern/i386/coreboot/mmap.c rename to grub-core/kern/i386/coreboot/mmap.c diff --git a/kern/i386/coreboot/startup.S b/grub-core/kern/i386/coreboot/startup.S similarity index 100% rename from kern/i386/coreboot/startup.S rename to grub-core/kern/i386/coreboot/startup.S diff --git a/kern/i386/dl.c b/grub-core/kern/i386/dl.c similarity index 100% rename from kern/i386/dl.c rename to grub-core/kern/i386/dl.c diff --git a/kern/i386/efi/init.c b/grub-core/kern/i386/efi/init.c similarity index 100% rename from kern/i386/efi/init.c rename to grub-core/kern/i386/efi/init.c diff --git a/kern/i386/efi/startup.S b/grub-core/kern/i386/efi/startup.S similarity index 100% rename from kern/i386/efi/startup.S rename to grub-core/kern/i386/efi/startup.S diff --git a/kern/i386/halt.c b/grub-core/kern/i386/halt.c similarity index 100% rename from kern/i386/halt.c rename to grub-core/kern/i386/halt.c diff --git a/kern/i386/ieee1275/init.c b/grub-core/kern/i386/ieee1275/init.c similarity index 100% rename from kern/i386/ieee1275/init.c rename to grub-core/kern/i386/ieee1275/init.c diff --git a/kern/i386/ieee1275/startup.S b/grub-core/kern/i386/ieee1275/startup.S similarity index 100% rename from kern/i386/ieee1275/startup.S rename to grub-core/kern/i386/ieee1275/startup.S diff --git a/kern/i386/loader.S b/grub-core/kern/i386/loader.S similarity index 100% rename from kern/i386/loader.S rename to grub-core/kern/i386/loader.S diff --git a/kern/i386/misc.S b/grub-core/kern/i386/misc.S similarity index 100% rename from kern/i386/misc.S rename to grub-core/kern/i386/misc.S diff --git a/kern/i386/multiboot_mmap.c b/grub-core/kern/i386/multiboot_mmap.c similarity index 100% rename from kern/i386/multiboot_mmap.c rename to grub-core/kern/i386/multiboot_mmap.c diff --git a/kern/i386/pc/init.c b/grub-core/kern/i386/pc/init.c similarity index 100% rename from kern/i386/pc/init.c rename to grub-core/kern/i386/pc/init.c diff --git a/kern/i386/pc/lzma_decode.S b/grub-core/kern/i386/pc/lzma_decode.S similarity index 100% rename from kern/i386/pc/lzma_decode.S rename to grub-core/kern/i386/pc/lzma_decode.S diff --git a/kern/i386/pc/mmap.c b/grub-core/kern/i386/pc/mmap.c similarity index 100% rename from kern/i386/pc/mmap.c rename to grub-core/kern/i386/pc/mmap.c diff --git a/kern/i386/pc/startup.S b/grub-core/kern/i386/pc/startup.S similarity index 100% rename from kern/i386/pc/startup.S rename to grub-core/kern/i386/pc/startup.S diff --git a/kern/i386/pit.c b/grub-core/kern/i386/pit.c similarity index 100% rename from kern/i386/pit.c rename to grub-core/kern/i386/pit.c diff --git a/kern/i386/qemu/mmap.c b/grub-core/kern/i386/qemu/mmap.c similarity index 100% rename from kern/i386/qemu/mmap.c rename to grub-core/kern/i386/qemu/mmap.c diff --git a/kern/i386/qemu/startup.S b/grub-core/kern/i386/qemu/startup.S similarity index 100% rename from kern/i386/qemu/startup.S rename to grub-core/kern/i386/qemu/startup.S diff --git a/kern/i386/realmode.S b/grub-core/kern/i386/realmode.S similarity index 100% rename from kern/i386/realmode.S rename to grub-core/kern/i386/realmode.S diff --git a/kern/i386/tsc.c b/grub-core/kern/i386/tsc.c similarity index 100% rename from kern/i386/tsc.c rename to grub-core/kern/i386/tsc.c diff --git a/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c similarity index 100% rename from kern/ieee1275/cmain.c rename to grub-core/kern/ieee1275/cmain.c diff --git a/kern/ieee1275/ieee1275.c b/grub-core/kern/ieee1275/ieee1275.c similarity index 100% rename from kern/ieee1275/ieee1275.c rename to grub-core/kern/ieee1275/ieee1275.c diff --git a/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c similarity index 100% rename from kern/ieee1275/init.c rename to grub-core/kern/ieee1275/init.c diff --git a/kern/ieee1275/mmap.c b/grub-core/kern/ieee1275/mmap.c similarity index 100% rename from kern/ieee1275/mmap.c rename to grub-core/kern/ieee1275/mmap.c diff --git a/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c similarity index 100% rename from kern/ieee1275/openfw.c rename to grub-core/kern/ieee1275/openfw.c diff --git a/kern/list.c b/grub-core/kern/list.c similarity index 100% rename from kern/list.c rename to grub-core/kern/list.c diff --git a/kern/main.c b/grub-core/kern/main.c similarity index 100% rename from kern/main.c rename to grub-core/kern/main.c diff --git a/kern/mips/cache.S b/grub-core/kern/mips/cache.S similarity index 100% rename from kern/mips/cache.S rename to grub-core/kern/mips/cache.S diff --git a/kern/mips/cache_flush.S b/grub-core/kern/mips/cache_flush.S similarity index 100% rename from kern/mips/cache_flush.S rename to grub-core/kern/mips/cache_flush.S diff --git a/kern/mips/dl.c b/grub-core/kern/mips/dl.c similarity index 100% rename from kern/mips/dl.c rename to grub-core/kern/mips/dl.c diff --git a/kern/mips/init.c b/grub-core/kern/mips/init.c similarity index 100% rename from kern/mips/init.c rename to grub-core/kern/mips/init.c diff --git a/kern/mips/qemu-mips/init.c b/grub-core/kern/mips/qemu-mips/init.c similarity index 100% rename from kern/mips/qemu-mips/init.c rename to grub-core/kern/mips/qemu-mips/init.c diff --git a/kern/mips/startup.S b/grub-core/kern/mips/startup.S similarity index 100% rename from kern/mips/startup.S rename to grub-core/kern/mips/startup.S diff --git a/kern/mips/yeeloong/init.c b/grub-core/kern/mips/yeeloong/init.c similarity index 100% rename from kern/mips/yeeloong/init.c rename to grub-core/kern/mips/yeeloong/init.c diff --git a/kern/misc.c b/grub-core/kern/misc.c similarity index 100% rename from kern/misc.c rename to grub-core/kern/misc.c diff --git a/kern/mm.c b/grub-core/kern/mm.c similarity index 100% rename from kern/mm.c rename to grub-core/kern/mm.c diff --git a/kern/parser.c b/grub-core/kern/parser.c similarity index 100% rename from kern/parser.c rename to grub-core/kern/parser.c diff --git a/kern/partition.c b/grub-core/kern/partition.c similarity index 100% rename from kern/partition.c rename to grub-core/kern/partition.c diff --git a/kern/powerpc/cache.S b/grub-core/kern/powerpc/cache.S similarity index 100% rename from kern/powerpc/cache.S rename to grub-core/kern/powerpc/cache.S diff --git a/kern/powerpc/dl.c b/grub-core/kern/powerpc/dl.c similarity index 100% rename from kern/powerpc/dl.c rename to grub-core/kern/powerpc/dl.c diff --git a/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S similarity index 100% rename from kern/powerpc/ieee1275/startup.S rename to grub-core/kern/powerpc/ieee1275/startup.S diff --git a/kern/rescue_parser.c b/grub-core/kern/rescue_parser.c similarity index 100% rename from kern/rescue_parser.c rename to grub-core/kern/rescue_parser.c diff --git a/kern/rescue_reader.c b/grub-core/kern/rescue_reader.c similarity index 100% rename from kern/rescue_reader.c rename to grub-core/kern/rescue_reader.c diff --git a/kern/sparc64/cache.S b/grub-core/kern/sparc64/cache.S similarity index 100% rename from kern/sparc64/cache.S rename to grub-core/kern/sparc64/cache.S diff --git a/kern/sparc64/dl.c b/grub-core/kern/sparc64/dl.c similarity index 100% rename from kern/sparc64/dl.c rename to grub-core/kern/sparc64/dl.c diff --git a/kern/sparc64/ieee1275/crt0.S b/grub-core/kern/sparc64/ieee1275/crt0.S similarity index 100% rename from kern/sparc64/ieee1275/crt0.S rename to grub-core/kern/sparc64/ieee1275/crt0.S diff --git a/kern/sparc64/ieee1275/ieee1275.c b/grub-core/kern/sparc64/ieee1275/ieee1275.c similarity index 100% rename from kern/sparc64/ieee1275/ieee1275.c rename to grub-core/kern/sparc64/ieee1275/ieee1275.c diff --git a/kern/sparc64/ieee1275/init.c b/grub-core/kern/sparc64/ieee1275/init.c similarity index 100% rename from kern/sparc64/ieee1275/init.c rename to grub-core/kern/sparc64/ieee1275/init.c diff --git a/kern/term.c b/grub-core/kern/term.c similarity index 100% rename from kern/term.c rename to grub-core/kern/term.c diff --git a/kern/time.c b/grub-core/kern/time.c similarity index 100% rename from kern/time.c rename to grub-core/kern/time.c diff --git a/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c similarity index 100% rename from kern/x86_64/dl.c rename to grub-core/kern/x86_64/dl.c diff --git a/kern/x86_64/efi/callwrap.S b/grub-core/kern/x86_64/efi/callwrap.S similarity index 100% rename from kern/x86_64/efi/callwrap.S rename to grub-core/kern/x86_64/efi/callwrap.S diff --git a/kern/x86_64/efi/startup.S b/grub-core/kern/x86_64/efi/startup.S similarity index 100% rename from kern/x86_64/efi/startup.S rename to grub-core/kern/x86_64/efi/startup.S diff --git a/lib/LzFind.c b/grub-core/lib/LzFind.c similarity index 100% rename from lib/LzFind.c rename to grub-core/lib/LzFind.c diff --git a/lib/LzmaDec.c b/grub-core/lib/LzmaDec.c similarity index 100% rename from lib/LzmaDec.c rename to grub-core/lib/LzmaDec.c diff --git a/lib/LzmaEnc.c b/grub-core/lib/LzmaEnc.c similarity index 100% rename from lib/LzmaEnc.c rename to grub-core/lib/LzmaEnc.c diff --git a/lib/arg.c b/grub-core/lib/arg.c similarity index 100% rename from lib/arg.c rename to grub-core/lib/arg.c diff --git a/lib/charset.c b/grub-core/lib/charset.c similarity index 100% rename from lib/charset.c rename to grub-core/lib/charset.c diff --git a/lib/cmos_datetime.c b/grub-core/lib/cmos_datetime.c similarity index 100% rename from lib/cmos_datetime.c rename to grub-core/lib/cmos_datetime.c diff --git a/lib/crc.c b/grub-core/lib/crc.c similarity index 100% rename from lib/crc.c rename to grub-core/lib/crc.c diff --git a/lib/crypto.c b/grub-core/lib/crypto.c similarity index 100% rename from lib/crypto.c rename to grub-core/lib/crypto.c diff --git a/lib/efi/datetime.c b/grub-core/lib/efi/datetime.c similarity index 100% rename from lib/efi/datetime.c rename to grub-core/lib/efi/datetime.c diff --git a/lib/envblk.c b/grub-core/lib/envblk.c similarity index 100% rename from lib/envblk.c rename to grub-core/lib/envblk.c diff --git a/lib/hexdump.c b/grub-core/lib/hexdump.c similarity index 100% rename from lib/hexdump.c rename to grub-core/lib/hexdump.c diff --git a/lib/i386/pc/biosnum.c b/grub-core/lib/i386/pc/biosnum.c similarity index 100% rename from lib/i386/pc/biosnum.c rename to grub-core/lib/i386/pc/biosnum.c diff --git a/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c similarity index 100% rename from lib/i386/relocator.c rename to grub-core/lib/i386/relocator.c diff --git a/lib/i386/relocator_asm.S b/grub-core/lib/i386/relocator_asm.S similarity index 100% rename from lib/i386/relocator_asm.S rename to grub-core/lib/i386/relocator_asm.S diff --git a/lib/i386/relocator_backward.S b/grub-core/lib/i386/relocator_backward.S similarity index 100% rename from lib/i386/relocator_backward.S rename to grub-core/lib/i386/relocator_backward.S diff --git a/lib/i386/setjmp.S b/grub-core/lib/i386/setjmp.S similarity index 100% rename from lib/i386/setjmp.S rename to grub-core/lib/i386/setjmp.S diff --git a/lib/ieee1275/datetime.c b/grub-core/lib/ieee1275/datetime.c similarity index 100% rename from lib/ieee1275/datetime.c rename to grub-core/lib/ieee1275/datetime.c diff --git a/lib/libgcrypt/cipher/ChangeLog b/grub-core/lib/libgcrypt/cipher/ChangeLog similarity index 100% rename from lib/libgcrypt/cipher/ChangeLog rename to grub-core/lib/libgcrypt/cipher/ChangeLog diff --git a/lib/libgcrypt/cipher/ac.c b/grub-core/lib/libgcrypt/cipher/ac.c similarity index 100% rename from lib/libgcrypt/cipher/ac.c rename to grub-core/lib/libgcrypt/cipher/ac.c diff --git a/lib/libgcrypt/cipher/arcfour.c b/grub-core/lib/libgcrypt/cipher/arcfour.c similarity index 100% rename from lib/libgcrypt/cipher/arcfour.c rename to grub-core/lib/libgcrypt/cipher/arcfour.c diff --git a/lib/libgcrypt/cipher/bithelp.h b/grub-core/lib/libgcrypt/cipher/bithelp.h similarity index 100% rename from lib/libgcrypt/cipher/bithelp.h rename to grub-core/lib/libgcrypt/cipher/bithelp.h diff --git a/lib/libgcrypt/cipher/blowfish.c b/grub-core/lib/libgcrypt/cipher/blowfish.c similarity index 100% rename from lib/libgcrypt/cipher/blowfish.c rename to grub-core/lib/libgcrypt/cipher/blowfish.c diff --git a/lib/libgcrypt/cipher/camellia-glue.c b/grub-core/lib/libgcrypt/cipher/camellia-glue.c similarity index 100% rename from lib/libgcrypt/cipher/camellia-glue.c rename to grub-core/lib/libgcrypt/cipher/camellia-glue.c diff --git a/lib/libgcrypt/cipher/camellia.c b/grub-core/lib/libgcrypt/cipher/camellia.c similarity index 100% rename from lib/libgcrypt/cipher/camellia.c rename to grub-core/lib/libgcrypt/cipher/camellia.c diff --git a/lib/libgcrypt/cipher/camellia.h b/grub-core/lib/libgcrypt/cipher/camellia.h similarity index 100% rename from lib/libgcrypt/cipher/camellia.h rename to grub-core/lib/libgcrypt/cipher/camellia.h diff --git a/lib/libgcrypt/cipher/cast5.c b/grub-core/lib/libgcrypt/cipher/cast5.c similarity index 100% rename from lib/libgcrypt/cipher/cast5.c rename to grub-core/lib/libgcrypt/cipher/cast5.c diff --git a/lib/libgcrypt/cipher/cipher.c b/grub-core/lib/libgcrypt/cipher/cipher.c similarity index 100% rename from lib/libgcrypt/cipher/cipher.c rename to grub-core/lib/libgcrypt/cipher/cipher.c diff --git a/lib/libgcrypt/cipher/crc.c b/grub-core/lib/libgcrypt/cipher/crc.c similarity index 100% rename from lib/libgcrypt/cipher/crc.c rename to grub-core/lib/libgcrypt/cipher/crc.c diff --git a/lib/libgcrypt/cipher/des.c b/grub-core/lib/libgcrypt/cipher/des.c similarity index 100% rename from lib/libgcrypt/cipher/des.c rename to grub-core/lib/libgcrypt/cipher/des.c diff --git a/lib/libgcrypt/cipher/dsa.c b/grub-core/lib/libgcrypt/cipher/dsa.c similarity index 100% rename from lib/libgcrypt/cipher/dsa.c rename to grub-core/lib/libgcrypt/cipher/dsa.c diff --git a/lib/libgcrypt/cipher/ecc.c b/grub-core/lib/libgcrypt/cipher/ecc.c similarity index 100% rename from lib/libgcrypt/cipher/ecc.c rename to grub-core/lib/libgcrypt/cipher/ecc.c diff --git a/lib/libgcrypt/cipher/elgamal.c b/grub-core/lib/libgcrypt/cipher/elgamal.c similarity index 100% rename from lib/libgcrypt/cipher/elgamal.c rename to grub-core/lib/libgcrypt/cipher/elgamal.c diff --git a/lib/libgcrypt/cipher/hash-common.c b/grub-core/lib/libgcrypt/cipher/hash-common.c similarity index 100% rename from lib/libgcrypt/cipher/hash-common.c rename to grub-core/lib/libgcrypt/cipher/hash-common.c diff --git a/lib/libgcrypt/cipher/hash-common.h b/grub-core/lib/libgcrypt/cipher/hash-common.h similarity index 100% rename from lib/libgcrypt/cipher/hash-common.h rename to grub-core/lib/libgcrypt/cipher/hash-common.h diff --git a/lib/libgcrypt/cipher/hmac-tests.c b/grub-core/lib/libgcrypt/cipher/hmac-tests.c similarity index 100% rename from lib/libgcrypt/cipher/hmac-tests.c rename to grub-core/lib/libgcrypt/cipher/hmac-tests.c diff --git a/lib/libgcrypt/cipher/md.c b/grub-core/lib/libgcrypt/cipher/md.c similarity index 100% rename from lib/libgcrypt/cipher/md.c rename to grub-core/lib/libgcrypt/cipher/md.c diff --git a/lib/libgcrypt/cipher/md4.c b/grub-core/lib/libgcrypt/cipher/md4.c similarity index 100% rename from lib/libgcrypt/cipher/md4.c rename to grub-core/lib/libgcrypt/cipher/md4.c diff --git a/lib/libgcrypt/cipher/md5.c b/grub-core/lib/libgcrypt/cipher/md5.c similarity index 100% rename from lib/libgcrypt/cipher/md5.c rename to grub-core/lib/libgcrypt/cipher/md5.c diff --git a/lib/libgcrypt/cipher/primegen.c b/grub-core/lib/libgcrypt/cipher/primegen.c similarity index 100% rename from lib/libgcrypt/cipher/primegen.c rename to grub-core/lib/libgcrypt/cipher/primegen.c diff --git a/lib/libgcrypt/cipher/pubkey.c b/grub-core/lib/libgcrypt/cipher/pubkey.c similarity index 100% rename from lib/libgcrypt/cipher/pubkey.c rename to grub-core/lib/libgcrypt/cipher/pubkey.c diff --git a/lib/libgcrypt/cipher/rfc2268.c b/grub-core/lib/libgcrypt/cipher/rfc2268.c similarity index 100% rename from lib/libgcrypt/cipher/rfc2268.c rename to grub-core/lib/libgcrypt/cipher/rfc2268.c diff --git a/lib/libgcrypt/cipher/rijndael-tables.h b/grub-core/lib/libgcrypt/cipher/rijndael-tables.h similarity index 100% rename from lib/libgcrypt/cipher/rijndael-tables.h rename to grub-core/lib/libgcrypt/cipher/rijndael-tables.h diff --git a/lib/libgcrypt/cipher/rijndael.c b/grub-core/lib/libgcrypt/cipher/rijndael.c similarity index 100% rename from lib/libgcrypt/cipher/rijndael.c rename to grub-core/lib/libgcrypt/cipher/rijndael.c diff --git a/lib/libgcrypt/cipher/rmd.h b/grub-core/lib/libgcrypt/cipher/rmd.h similarity index 100% rename from lib/libgcrypt/cipher/rmd.h rename to grub-core/lib/libgcrypt/cipher/rmd.h diff --git a/lib/libgcrypt/cipher/rmd160.c b/grub-core/lib/libgcrypt/cipher/rmd160.c similarity index 100% rename from lib/libgcrypt/cipher/rmd160.c rename to grub-core/lib/libgcrypt/cipher/rmd160.c diff --git a/lib/libgcrypt/cipher/rsa.c b/grub-core/lib/libgcrypt/cipher/rsa.c similarity index 100% rename from lib/libgcrypt/cipher/rsa.c rename to grub-core/lib/libgcrypt/cipher/rsa.c diff --git a/lib/libgcrypt/cipher/seed.c b/grub-core/lib/libgcrypt/cipher/seed.c similarity index 100% rename from lib/libgcrypt/cipher/seed.c rename to grub-core/lib/libgcrypt/cipher/seed.c diff --git a/lib/libgcrypt/cipher/serpent.c b/grub-core/lib/libgcrypt/cipher/serpent.c similarity index 100% rename from lib/libgcrypt/cipher/serpent.c rename to grub-core/lib/libgcrypt/cipher/serpent.c diff --git a/lib/libgcrypt/cipher/sha1.c b/grub-core/lib/libgcrypt/cipher/sha1.c similarity index 100% rename from lib/libgcrypt/cipher/sha1.c rename to grub-core/lib/libgcrypt/cipher/sha1.c diff --git a/lib/libgcrypt/cipher/sha256.c b/grub-core/lib/libgcrypt/cipher/sha256.c similarity index 100% rename from lib/libgcrypt/cipher/sha256.c rename to grub-core/lib/libgcrypt/cipher/sha256.c diff --git a/lib/libgcrypt/cipher/sha512.c b/grub-core/lib/libgcrypt/cipher/sha512.c similarity index 100% rename from lib/libgcrypt/cipher/sha512.c rename to grub-core/lib/libgcrypt/cipher/sha512.c diff --git a/lib/libgcrypt/cipher/tiger.c b/grub-core/lib/libgcrypt/cipher/tiger.c similarity index 100% rename from lib/libgcrypt/cipher/tiger.c rename to grub-core/lib/libgcrypt/cipher/tiger.c diff --git a/lib/libgcrypt/cipher/twofish.c b/grub-core/lib/libgcrypt/cipher/twofish.c similarity index 100% rename from lib/libgcrypt/cipher/twofish.c rename to grub-core/lib/libgcrypt/cipher/twofish.c diff --git a/lib/libgcrypt/cipher/whirlpool.c b/grub-core/lib/libgcrypt/cipher/whirlpool.c similarity index 100% rename from lib/libgcrypt/cipher/whirlpool.c rename to grub-core/lib/libgcrypt/cipher/whirlpool.c diff --git a/lib/libgcrypt_wrap/cipher_wrap.h b/grub-core/lib/libgcrypt_wrap/cipher_wrap.h similarity index 100% rename from lib/libgcrypt_wrap/cipher_wrap.h rename to grub-core/lib/libgcrypt_wrap/cipher_wrap.h diff --git a/lib/mips/relocator.c b/grub-core/lib/mips/relocator.c similarity index 100% rename from lib/mips/relocator.c rename to grub-core/lib/mips/relocator.c diff --git a/lib/mips/relocator_asm.S b/grub-core/lib/mips/relocator_asm.S similarity index 100% rename from lib/mips/relocator_asm.S rename to grub-core/lib/mips/relocator_asm.S diff --git a/lib/mips/setjmp.S b/grub-core/lib/mips/setjmp.S similarity index 100% rename from lib/mips/setjmp.S rename to grub-core/lib/mips/setjmp.S diff --git a/lib/pbkdf2.c b/grub-core/lib/pbkdf2.c similarity index 100% rename from lib/pbkdf2.c rename to grub-core/lib/pbkdf2.c diff --git a/lib/posix_wrap/assert.h b/grub-core/lib/posix_wrap/assert.h similarity index 100% rename from lib/posix_wrap/assert.h rename to grub-core/lib/posix_wrap/assert.h diff --git a/lib/posix_wrap/ctype.h b/grub-core/lib/posix_wrap/ctype.h similarity index 100% rename from lib/posix_wrap/ctype.h rename to grub-core/lib/posix_wrap/ctype.h diff --git a/lib/posix_wrap/errno.h b/grub-core/lib/posix_wrap/errno.h similarity index 100% rename from lib/posix_wrap/errno.h rename to grub-core/lib/posix_wrap/errno.h diff --git a/lib/posix_wrap/langinfo.h b/grub-core/lib/posix_wrap/langinfo.h similarity index 100% rename from lib/posix_wrap/langinfo.h rename to grub-core/lib/posix_wrap/langinfo.h diff --git a/lib/posix_wrap/limits.h b/grub-core/lib/posix_wrap/limits.h similarity index 100% rename from lib/posix_wrap/limits.h rename to grub-core/lib/posix_wrap/limits.h diff --git a/lib/posix_wrap/localcharset.h b/grub-core/lib/posix_wrap/localcharset.h similarity index 100% rename from lib/posix_wrap/localcharset.h rename to grub-core/lib/posix_wrap/localcharset.h diff --git a/lib/posix_wrap/locale.h b/grub-core/lib/posix_wrap/locale.h similarity index 100% rename from lib/posix_wrap/locale.h rename to grub-core/lib/posix_wrap/locale.h diff --git a/lib/posix_wrap/stdint.h b/grub-core/lib/posix_wrap/stdint.h similarity index 100% rename from lib/posix_wrap/stdint.h rename to grub-core/lib/posix_wrap/stdint.h diff --git a/lib/posix_wrap/stdio.h b/grub-core/lib/posix_wrap/stdio.h similarity index 100% rename from lib/posix_wrap/stdio.h rename to grub-core/lib/posix_wrap/stdio.h diff --git a/lib/posix_wrap/stdlib.h b/grub-core/lib/posix_wrap/stdlib.h similarity index 98% rename from lib/posix_wrap/stdlib.h rename to grub-core/lib/posix_wrap/stdlib.h index 5ef6159ef..4c725f6e2 100644 --- a/lib/posix_wrap/stdlib.h +++ b/grub-core/lib/posix_wrap/stdlib.h @@ -20,6 +20,7 @@ #define GRUB_POSIX_STDLIB_H 1 #include +#include static inline void free (void *ptr) diff --git a/lib/posix_wrap/string.h b/grub-core/lib/posix_wrap/string.h similarity index 97% rename from lib/posix_wrap/string.h rename to grub-core/lib/posix_wrap/string.h index 7bb6f1e6f..4224836e2 100644 --- a/lib/posix_wrap/string.h +++ b/grub-core/lib/posix_wrap/string.h @@ -19,6 +19,8 @@ #ifndef GRUB_POSIX_STRING_H #define GRUB_POSIX_STRING_H 1 +#include + static inline grub_size_t strlen (const char *s) { diff --git a/lib/posix_wrap/sys/types.h b/grub-core/lib/posix_wrap/sys/types.h similarity index 100% rename from lib/posix_wrap/sys/types.h rename to grub-core/lib/posix_wrap/sys/types.h diff --git a/lib/posix_wrap/unistd.h b/grub-core/lib/posix_wrap/unistd.h similarity index 100% rename from lib/posix_wrap/unistd.h rename to grub-core/lib/posix_wrap/unistd.h diff --git a/lib/posix_wrap/wchar.h b/grub-core/lib/posix_wrap/wchar.h similarity index 100% rename from lib/posix_wrap/wchar.h rename to grub-core/lib/posix_wrap/wchar.h diff --git a/lib/posix_wrap/wctype.h b/grub-core/lib/posix_wrap/wctype.h similarity index 100% rename from lib/posix_wrap/wctype.h rename to grub-core/lib/posix_wrap/wctype.h diff --git a/lib/powerpc/setjmp.S b/grub-core/lib/powerpc/setjmp.S similarity index 100% rename from lib/powerpc/setjmp.S rename to grub-core/lib/powerpc/setjmp.S diff --git a/lib/relocator.c b/grub-core/lib/relocator.c similarity index 100% rename from lib/relocator.c rename to grub-core/lib/relocator.c diff --git a/lib/sparc64/setjmp.S b/grub-core/lib/sparc64/setjmp.S similarity index 100% rename from lib/sparc64/setjmp.S rename to grub-core/lib/sparc64/setjmp.S diff --git a/lib/x86_64/setjmp.S b/grub-core/lib/x86_64/setjmp.S similarity index 100% rename from lib/x86_64/setjmp.S rename to grub-core/lib/x86_64/setjmp.S diff --git a/loader/aout.c b/grub-core/loader/aout.c similarity index 100% rename from loader/aout.c rename to grub-core/loader/aout.c diff --git a/loader/efi/appleloader.c b/grub-core/loader/efi/appleloader.c similarity index 100% rename from loader/efi/appleloader.c rename to grub-core/loader/efi/appleloader.c diff --git a/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c similarity index 100% rename from loader/efi/chainloader.c rename to grub-core/loader/efi/chainloader.c diff --git a/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c similarity index 100% rename from loader/i386/bsd.c rename to grub-core/loader/i386/bsd.c diff --git a/loader/i386/bsd32.c b/grub-core/loader/i386/bsd32.c similarity index 100% rename from loader/i386/bsd32.c rename to grub-core/loader/i386/bsd32.c diff --git a/loader/i386/bsd64.c b/grub-core/loader/i386/bsd64.c similarity index 100% rename from loader/i386/bsd64.c rename to grub-core/loader/i386/bsd64.c diff --git a/loader/i386/bsdXX.c b/grub-core/loader/i386/bsdXX.c similarity index 100% rename from loader/i386/bsdXX.c rename to grub-core/loader/i386/bsdXX.c diff --git a/loader/i386/bsd_helper.S b/grub-core/loader/i386/bsd_helper.S similarity index 100% rename from loader/i386/bsd_helper.S rename to grub-core/loader/i386/bsd_helper.S diff --git a/loader/i386/bsd_pagetable.c b/grub-core/loader/i386/bsd_pagetable.c similarity index 100% rename from loader/i386/bsd_pagetable.c rename to grub-core/loader/i386/bsd_pagetable.c diff --git a/loader/i386/bsd_trampoline.S b/grub-core/loader/i386/bsd_trampoline.S similarity index 100% rename from loader/i386/bsd_trampoline.S rename to grub-core/loader/i386/bsd_trampoline.S diff --git a/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c similarity index 100% rename from loader/i386/efi/linux.c rename to grub-core/loader/i386/efi/linux.c diff --git a/loader/i386/efi/xnu.c b/grub-core/loader/i386/efi/xnu.c similarity index 100% rename from loader/i386/efi/xnu.c rename to grub-core/loader/i386/efi/xnu.c diff --git a/loader/i386/ieee1275/linux.c b/grub-core/loader/i386/ieee1275/linux.c similarity index 100% rename from loader/i386/ieee1275/linux.c rename to grub-core/loader/i386/ieee1275/linux.c diff --git a/loader/i386/linux.c b/grub-core/loader/i386/linux.c similarity index 100% rename from loader/i386/linux.c rename to grub-core/loader/i386/linux.c diff --git a/loader/i386/linux_trampoline.S b/grub-core/loader/i386/linux_trampoline.S similarity index 100% rename from loader/i386/linux_trampoline.S rename to grub-core/loader/i386/linux_trampoline.S diff --git a/loader/i386/multiboot_mbi.c b/grub-core/loader/i386/multiboot_mbi.c similarity index 100% rename from loader/i386/multiboot_mbi.c rename to grub-core/loader/i386/multiboot_mbi.c diff --git a/loader/i386/pc/chainloader.c b/grub-core/loader/i386/pc/chainloader.c similarity index 100% rename from loader/i386/pc/chainloader.c rename to grub-core/loader/i386/pc/chainloader.c diff --git a/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c similarity index 100% rename from loader/i386/pc/linux.c rename to grub-core/loader/i386/pc/linux.c diff --git a/loader/i386/pc/xnu.c b/grub-core/loader/i386/pc/xnu.c similarity index 100% rename from loader/i386/pc/xnu.c rename to grub-core/loader/i386/pc/xnu.c diff --git a/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c similarity index 100% rename from loader/i386/xnu.c rename to grub-core/loader/i386/xnu.c diff --git a/loader/macho.c b/grub-core/loader/macho.c similarity index 100% rename from loader/macho.c rename to grub-core/loader/macho.c diff --git a/loader/macho32.c b/grub-core/loader/macho32.c similarity index 100% rename from loader/macho32.c rename to grub-core/loader/macho32.c diff --git a/loader/macho64.c b/grub-core/loader/macho64.c similarity index 100% rename from loader/macho64.c rename to grub-core/loader/macho64.c diff --git a/loader/machoXX.c b/grub-core/loader/machoXX.c similarity index 100% rename from loader/machoXX.c rename to grub-core/loader/machoXX.c diff --git a/loader/mips/linux.c b/grub-core/loader/mips/linux.c similarity index 100% rename from loader/mips/linux.c rename to grub-core/loader/mips/linux.c diff --git a/loader/multiboot.c b/grub-core/loader/multiboot.c similarity index 100% rename from loader/multiboot.c rename to grub-core/loader/multiboot.c diff --git a/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c similarity index 100% rename from loader/multiboot_elfxx.c rename to grub-core/loader/multiboot_elfxx.c diff --git a/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c similarity index 100% rename from loader/multiboot_mbi2.c rename to grub-core/loader/multiboot_mbi2.c diff --git a/loader/powerpc/ieee1275/linux.c b/grub-core/loader/powerpc/ieee1275/linux.c similarity index 100% rename from loader/powerpc/ieee1275/linux.c rename to grub-core/loader/powerpc/ieee1275/linux.c diff --git a/loader/sparc64/ieee1275/linux.c b/grub-core/loader/sparc64/ieee1275/linux.c similarity index 100% rename from loader/sparc64/ieee1275/linux.c rename to grub-core/loader/sparc64/ieee1275/linux.c diff --git a/loader/xnu.c b/grub-core/loader/xnu.c similarity index 100% rename from loader/xnu.c rename to grub-core/loader/xnu.c diff --git a/loader/xnu_resume.c b/grub-core/loader/xnu_resume.c similarity index 100% rename from loader/xnu_resume.c rename to grub-core/loader/xnu_resume.c diff --git a/mmap/efi/mmap.c b/grub-core/mmap/efi/mmap.c similarity index 100% rename from mmap/efi/mmap.c rename to grub-core/mmap/efi/mmap.c diff --git a/mmap/i386/mmap.c b/grub-core/mmap/i386/mmap.c similarity index 100% rename from mmap/i386/mmap.c rename to grub-core/mmap/i386/mmap.c diff --git a/mmap/i386/pc/mmap.c b/grub-core/mmap/i386/pc/mmap.c similarity index 100% rename from mmap/i386/pc/mmap.c rename to grub-core/mmap/i386/pc/mmap.c diff --git a/mmap/i386/pc/mmap_helper.S b/grub-core/mmap/i386/pc/mmap_helper.S similarity index 100% rename from mmap/i386/pc/mmap_helper.S rename to grub-core/mmap/i386/pc/mmap_helper.S diff --git a/mmap/i386/uppermem.c b/grub-core/mmap/i386/uppermem.c similarity index 100% rename from mmap/i386/uppermem.c rename to grub-core/mmap/i386/uppermem.c diff --git a/mmap/mips/yeeloong/uppermem.c b/grub-core/mmap/mips/yeeloong/uppermem.c similarity index 100% rename from mmap/mips/yeeloong/uppermem.c rename to grub-core/mmap/mips/yeeloong/uppermem.c diff --git a/mmap/mmap.c b/grub-core/mmap/mmap.c similarity index 100% rename from mmap/mmap.c rename to grub-core/mmap/mmap.c diff --git a/grub-core/modules.def b/grub-core/modules.def new file mode 100644 index 000000000..ae3ede5f1 --- /dev/null +++ b/grub-core/modules.def @@ -0,0 +1,1592 @@ +AutoGen definitions Makefile.tpl; + +kernel = { + name = kernel; + + emu_ldflags = '-Wl,-r'; + x86_efi_ldflags = '-Wl,-r'; + i386_pc_ldflags = '-Wl,-Ttext=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + i386_coreboot_ldflags = '-Wl,-Ttext=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + i386_qemu_ldflags = '-Wl,-Ttext=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + i386_ieee1275_ldflags = '-Wl,-Ttext=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + mips_yeeloong_ldflags = '-Wl,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + powerpc_ieee1275_ldflags = '-Wl,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + + mips_yeeloong_cppflags = '-DUSE_ASCII_FAILBACK'; + i386_qemu_cppflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)'; + i386_qemu_ccasflags = '-DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + + mips_ldadd = '-lgcc'; + powerpc_ldadd = '-lgcc'; + sparc64_ldadd = '-lgcc'; + + nonemu_nodist = symlist.c; + + shared = kern/command.c; + shared = kern/corecmd.c; + shared = kern/device.c; + shared = kern/disk.c; + shared = kern/dl.c; + shared = kern/env.c; + shared = kern/err.c; + shared = kern/file.c; + shared = kern/fs.c; + shared = kern/handler.c; + shared = kern/list.c; + shared = kern/main.c; + shared = kern/misc.c; + shared = kern/parser.c; + shared = kern/partition.c; + shared = kern/rescue_parser.c; + shared = kern/rescue_reader.c; + shared = kern/term.c; + + i386_pc = kern/i386/pc/startup.S; + i386_pc = kern/i386/misc.S; + i386_pc = kern/mm.c; + i386_pc = kern/time.c; + i386_pc = kern/i386/dl.c; + i386_pc = kern/i386/pc/init.c; + i386_pc = kern/i386/pc/mmap.c; + i386_pc = kern/i386/tsc.c; + i386_pc = kern/i386/pit.c; + i386_pc = kern/generic/rtc_get_time_ms.c; + i386_pc = kern/generic/millisleep.c; + i386_pc = term/i386/pc/console.c; + i386_pc = term/i386/vga_common.c; + + i386_efi = kern/i386/efi/startup.S; + i386_efi = kern/mm.c; + i386_efi = kern/i386/dl.c; + i386_efi = kern/i386/efi/init.c; + i386_efi = kern/efi/efi.c; + i386_efi = kern/efi/init.c; + i386_efi = kern/efi/mm.c; + i386_efi = kern/time.c; + i386_efi = kern/i386/tsc.c; + i386_efi = kern/i386/pit.c; + i386_efi = kern/generic/rtc_get_time_ms.c; + i386_efi = kern/generic/millisleep.c; + i386_efi = term/efi/console.c; + i386_efi = disk/efi/efidisk.c; + + i386_coreboot = kern/i386/coreboot/startup.S; + i386_coreboot = kern/i386/misc.S; + i386_coreboot = kern/i386/coreboot/init.c; + i386_coreboot = kern/i386/coreboot/mmap.c; + i386_coreboot = kern/i386/halt.c; + i386_coreboot = kern/mm.c; + i386_coreboot = kern/time.c; + i386_coreboot = kern/i386/dl.c; + i386_coreboot = kern/i386/tsc.c; + i386_coreboot = kern/i386/pit.c; + i386_coreboot = kern/generic/rtc_get_time_ms.c; + i386_coreboot = kern/generic/millisleep.c; + i386_coreboot = term/i386/pc/vga_text.c; + i386_coreboot = term/i386/vga_common.c; + + i386_qemu = kern/i386/qemu/startup.S; + i386_qemu = kern/i386/misc.S; + i386_qemu = kern/i386/coreboot/init.c; + i386_qemu = kern/i386/qemu/mmap.c; + i386_qemu = kern/i386/halt.c; + i386_qemu = kern/mm.c; + i386_qemu = kern/time.c; + i386_qemu = kern/i386/dl.c; + i386_qemu = kern/i386/tsc.c; + i386_qemu = kern/i386/pit.c; + i386_qemu = kern/generic/rtc_get_time_ms.c; + i386_qemu = kern/generic/millisleep.c; + i386_qemu = term/i386/pc/vga_text.c; + i386_qemu = term/i386/vga_common.c; + + i386_ieee1275 = kern/i386/ieee1275/startup.S; + i386_ieee1275 = kern/i386/misc.S; + i386_ieee1275 = kern/i386/ieee1275/init.c; + i386_ieee1275 = kern/ieee1275/init.c; + i386_ieee1275 = kern/ieee1275/mmap.c; + i386_ieee1275 = kern/ieee1275/cmain.c; + i386_ieee1275 = kern/ieee1275/openfw.c; + i386_ieee1275 = kern/mm.c; + i386_ieee1275 = kern/i386/dl.c; + i386_ieee1275 = kern/time.c; + i386_ieee1275 = kern/generic/millisleep.c; + i386_ieee1275 = kern/ieee1275/ieee1275.c; + i386_ieee1275 = term/ieee1275/ofconsole.c; + i386_ieee1275 = disk/ieee1275/ofdisk.c; + + x86_64_efi = kern/x86_64/efi/startup.S; + x86_64_efi = kern/x86_64/efi/callwrap.S; + x86_64_efi = kern/mm.c; + x86_64_efi = kern/x86_64/dl.c; + x86_64_efi = kern/i386/efi/init.c; + x86_64_efi = kern/efi/efi.c; + x86_64_efi = kern/efi/init.c; + x86_64_efi = kern/efi/mm.c; + x86_64_efi = kern/time.c; + x86_64_efi = kern/i386/tsc.c; + x86_64_efi = kern/i386/pit.c; + x86_64_efi = kern/generic/millisleep.c; + x86_64_efi = kern/generic/rtc_get_time_ms.c; + x86_64_efi = term/efi/console.c; + x86_64_efi = disk/efi/efidisk.c; + + mips_yeeloong = kern/mips/startup.S; + mips_yeeloong = kern/mips/init.c; + mips_yeeloong = kern/mips/yeeloong/init.c; + mips_yeeloong = kern/mm.c; + mips_yeeloong = kern/mips/dl.c; + mips_yeeloong = kern/generic/millisleep.c; + mips_yeeloong = kern/generic/rtc_get_time_ms.c; + mips_yeeloong = kern/time.c; + mips_yeeloong = kern/mips/cache.S; + mips_yeeloong = io/bufio.c; + mips_yeeloong = lib/arg.c; + mips_yeeloong = commands/extcmd.c; + mips_yeeloong = bus/pci.c; + mips_yeeloong = bus/bonito.c; + mips_yeeloong = font/font_cmd.c; + mips_yeeloong = font/font.c; + mips_yeeloong = term/at_keyboard.c; + mips_yeeloong = term/gfxterm.c; + mips_yeeloong = video/video.c; + mips_yeeloong = video/fb/video_fb.c; + mips_yeeloong = video/fb/fbblit.c; + mips_yeeloong = video/fb/fbfill.c; + mips_yeeloong = video/fb/fbutil.c; + mips_yeeloong = video/bitmap.c; + mips_yeeloong = video/bitmap_scale.c; + mips_yeeloong = video/sm712.c; + + powerpc_ieee1275 = kern/powerpc/ieee1275/startup.S; + powerpc_ieee1275 = kern/ieee1275/cmain.c; + powerpc_ieee1275 = kern/ieee1275/ieee1275.c; + powerpc_ieee1275 = kern/mm.c; + powerpc_ieee1275 = kern/ieee1275/init.c; + powerpc_ieee1275 = kern/ieee1275/mmap.c; + powerpc_ieee1275 = kern/ieee1275/openfw.c; + powerpc_ieee1275 = kern/powerpc/dl.c; + powerpc_ieee1275 = kern/generic/millisleep.c; + powerpc_ieee1275 = kern/time.c; + powerpc_ieee1275 = kern/powerpc/cache.S; + powerpc_ieee1275 = term/ieee1275/ofconsole.c; + powerpc_ieee1275 = disk/ieee1275/ofdisk.c; + + sparc64_ieee1275 = kern/sparc64/ieee1275/crt0.S; + sparc64_ieee1275 = kern/ieee1275/cmain.c; + sparc64_ieee1275 = kern/ieee1275/ieee1275.c; + sparc64_ieee1275 = kern/mm.c; + sparc64_ieee1275 = kern/sparc64/ieee1275/ieee1275.c; + sparc64_ieee1275 = kern/sparc64/ieee1275/init.c; + sparc64_ieee1275 = kern/ieee1275/mmap.c; + sparc64_ieee1275 = kern/ieee1275/openfw.c; + sparc64_ieee1275 = kern/sparc64/dl.c; + sparc64_ieee1275 = kern/generic/millisleep.c; + sparc64_ieee1275 = kern/time.c; + sparc64_ieee1275 = kern/sparc64/cache.S; + sparc64_ieee1275 = disk/ieee1275/ofdisk.c; + sparc64_ieee1275 = term/ieee1275/ofconsole.c; + + emu = kern/emu/misc.c; + emu = kern/emu/getroot.c; + emu = kern/emu/time.c; + emu = kern/emu/hostdisk.c; + emu = kern/emu/hostfs.c; + emu = kern/emu/console.c; + emu = disk/host.c; + + image_nostrip = { emu; }; + image_strip_keep_kernel = { i386_efi; x86_64_efi; }; + image_strip = { powerpc_ieee1275; i386_coreboot; i386_ieee1275; }; + image_strip_macho2img = { mips_yeeloong; i386_pc; i386_qemu; sparc64_ieee1275; }; +}; + +program = { + name = grub-emu; + mansection = 1; + + source = kern/emu/main.c; + source = kern/emu/dummy/dl.c; + source = kern/emu/dummy/symlist.c; + source = gnulib/progname.c; + + nodist = grub_emu_init.c; + + cflags = '$(CFLAGS_GNULIB)'; + cppflags = '$(CPPFLAGS_GNULIB)'; + + ldadd = kernel.exec; + ldadd = '$(MODULE_FILES)'; + ldadd = '$(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS)'; + + emu; +}; + +program = { + name = grub-emu-lite; + + source = kern/emu/main.c; + source = kern/emu/lite.c; + source = kern/emu/dl.c; + source = kern/emu/cache.S; + source = gnulib/progname.c; + nodist = symlist.c; + + cflags = '$(CFLAGS_GNULIB)'; + cppflags = '$(CPPFLAGS_GNULIB)'; + + ldadd = kernel.exec; + ldadd = '$(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS)'; + + emu; +}; + +module = { + name = trig; + nodist = trigtables.c; + common; +}; + +image = { + name = boot; + i386_pc = boot/i386/pc/boot.S; + i386_pc_ldflags = "-Wl,-Ttext=0x7C00"; + + i386_qemu = boot/i386/qemu/boot.S; + i386_qemu_ldflags = '-Wl,-Ttext,$(GRUB_BOOT_MACHINE_LINK_ADDR)'; + i386_qemu_ccasflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)'; + + sparc64_ieee1275 = boot/sparc64/ieee1275/boot.S; + sparc64_ieee1275_format = a.out-sunos-big; + sparc64_ieee1275_ldflags = ' -Wl,-Ttext=0x4000'; +}; + +image = { + name = cdboot; + source = boot/i386/pc/cdboot.S; + ldflags = "-Wl,-Ttext=0x7C00"; + + i386_pc; +}; + +image = { + name = pxeboot; + source = boot/i386/pc/pxeboot.S; + ldflags = '-Wl,-Ttext=0x7C00'; + + i386_pc; +}; + +image = { + name = diskboot; + i386_pc = boot/i386/pc/diskboot.S; + i386_pc_ldflags = '-Wl,-Ttext=0x8000'; + + sparc64_ieee1275 = boot/sparc64/ieee1275/diskboot.S; + sparc64_ieee1275_ldflags = '-Wl,-Ttext=0x4200'; +}; + +image = { + name = lnxboot; + source = boot/i386/pc/lnxboot.S; + ldflags = '-Wl,-Ttext=0x6000'; + + i386_pc; +}; + +module = { + name = libusb; + source = bus/usb/emu/usb.c; + emu; + enable = COND_GRUB_EMU_USB; +}; + +module = { + name = pci; + source = bus/emu/pci.c; + source = commands/lspci.c; + emu; + enable = COND_GRUB_EMU_PCI; +}; + +module = { + name = usb; + source = bus/usb/usb.c; + source = bus/usb/usbtrans.c; + source = bus/usb/usbhub.c; + i386; +}; + +module = { + name = usb; + source = bus/usb/usb.c; + emu; + enable = COND_GRUB_EMU_USB; +}; + +module = { + name = uhci; + source = bus/usb/uhci.c; + x86; +}; + +module = { + name = ohci; + source = bus/usb/ohci.c; + x86; +}; + +module = { + name = pci; + source = bus/pci.c; + x86; +}; + +library = { + name = libgnulib.a; + source = gnulib/regex.c; + cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)'; + cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)'; + common; +}; + +module = { + name = iorw; + source = commands/iorw.c; + i386; +}; + +module = { + name = regexp; + source = commands/regexp.c; + ldadd = libgnulib.a; + cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)'; + cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)'; + common; +}; + +module = { + name = acpi; + + x86_efi = commands/acpi.c; + x86_efi = commands/efi/acpi.c; + + i386_pc = commands/acpi.c; + i386_pc = commands/i386/pc/acpi.c; +}; + +module = { + common; + name = blocklist; + source = commands/blocklist.c; +}; + +module = { + common; + name = boot; + source = commands/boot.c; + + i386_pc = commands/boot.c; + i386_pc = lib/i386/pc/biosnum.c; +}; + +module = { + common; + name = cat; + source = commands/cat.c; +}; + +module = { + common; + name = cmp; + source = commands/cmp.c; +}; + +module = { + common; + name = configfile; + source = commands/configfile.c; +}; + +module = { + name = cpuid; + source = commands/i386/cpuid.c; + + x86; +}; + +module = { + common; + name = crc; + source = commands/crc.c; + source = lib/crc.c; +}; + +module = { + common; + name = date; + source = commands/date.c; + + x86; + mips; +}; + +module = { + name = drivemap; + + i386_pc = commands/i386/pc/drivemap.c; + i386_pc = commands/i386/pc/drivemap_int13h.S; +}; + +module = { + common; + name = echo; + source = commands/echo.c; +}; + +module = { + common; + name = extcmd; + source = commands/extcmd.c; + source = lib/arg.c; +}; + +module = { + name = fixvideo; + x86_efi = commands/efi/fixvideo.c; +}; + +module = { + common; + name = gptsync; + source = commands/gptsync.c; +}; + +module = { + name = halt; + source = commands/halt.c; + + i386_pc = commands/i386/pc/halt.c; + emu; + x86; + sparc64; + powerpc; +}; + +module = { + common; + name = handler; + source = commands/handler.c; +}; + +module = { + common; + name = hashsum; + source = commands/hashsum.c; +}; + +module = { + name = hdparm; + source = commands/hdparm.c; + source = lib/hexdump.c; + + i386_pc; +}; + +module = { + common; + name = help; + source = commands/help.c; +}; + +module = { + common; + name = hexdump; + source = commands/hexdump.c; + source = lib/hexdump.c; +}; + +module = { + common; + name = keystatus; + source = commands/keystatus.c; +}; + +module = { + name = loadbios; + x86_efi = commands/efi/loadbios.c; +}; + +module = { + common; + name = loadenv; + source = commands/loadenv.c; + source = lib/envblk.c; +}; + +module = { + common; + name = ls; + source = commands/ls.c; +}; + +module = { + common; + name = lsmmap; + source = commands/lsmmap.c; + + i386_pc; + i386_qemu; + i386_coreboot; + i386_ieee1275; + mips_yeeloong; + powerpc_ieee1275; +}; + +module = { + name = lspci; + source = commands/lspci.c; + + x86; + mips; +}; + +module = { + common; + name = memrw; + source = commands/memrw.c; +}; + +module = { + common; + name = minicmd; + source = commands/minicmd.c; +}; + +module = { + common; + name = parttool; + source = commands/parttool.c; +}; + +module = { + common; + name = password; + source = commands/password.c; +}; + +module = { + common; + name = password_pbkdf2; + source = commands/password_pbkdf2.c; +}; + +module = { + name = play; + source = commands/i386/pc/play.c; + i386; +}; + +module = { + common; + name = probe; + source = commands/probe.c; +}; + +module = { + name = pxecmd; + i386_pc = commands/i386/pc/pxecmd.c; +}; + +module = { + common; + name = read; + source = commands/read.c; +}; + +module = { + common; + name = reboot; + source = commands/reboot.c; + + x86; powerpc; sparc64; +}; + +module = { + common; + name = search; + source = commands/search_wrap.c; +}; + +module = { + common; + name = search_fs_file; + source = commands/search_file.c; +}; + +module = { + common; + name = search_fs_uuid; + source = commands/search_uuid.c; +}; + +module = { + common; + name = search_label; + source = commands/search_label.c; +}; + +module = { + name = setpci; + source = commands/setpci.c; + + x86; +}; + +module = { + common; + name = sleep; + source = commands/sleep.c; +}; + +module = { + name = suspend; + source = commands/ieee1275/suspend.c; + i386_ieee1275; + powerpc_ieee1275; +}; + +module = { + common; + name = terminal; + source = commands/terminal.c; +}; + +module = { + common; + name = test; + source = commands/test.c; +}; + +module = { + common; + name = true; + source = commands/true.c; +}; + +module = { + name = usbtest; + source = commands/usbtest.c; + i386_pc; +}; + +module = { + name = usbtest; + source = commands/usbtest.c; + emu; + enable = COND_GRUB_EMU_USB; +}; + +module = { + name = vbeinfo; + i386_pc = commands/i386/pc/vbeinfo.c; +}; + +module = { + name = vbetest; + i386_pc = commands/i386/pc/vbetest.c; +}; + +module = { + common; + name = videotest; + source = commands/videotest.c; +}; + +module = { + common; + name = xnu_uuid; + source = commands/xnu_uuid.c; +}; + +module = { + common; + name = dm_nv; + source = disk/dmraid_nvidia.c; +}; + +module = { + common; + name = loopback; + source = disk/loopback.c; +}; + +module = { + common; + name = lvm; + source = disk/lvm.c; +}; + +module = { + common; + name = mdraid; + source = disk/mdraid_linux.c; +}; + +module = { + common; + name = raid; + source = disk/raid.c; +}; + +module = { + common; + name = raid5rec; + source = disk/raid5_recover.c; +}; + +module = { + common; + name = raid6rec; + source = disk/raid6_recover.c; +}; + +module = { + common; + name = scsi; + source = disk/scsi.c; +}; + +module = { + common; + name = memdisk; + source = disk/memdisk.c; +}; + +module = { + name = ata; + source = disk/ata.c; + + x86; + mips; +}; + +module = { + name = ata_pthru; + source = disk/ata_pthru.c; + + x86; + mips_yeeloong; +}; + +module = { + name = biosdisk; + i386_pc = disk/i386/pc/biosdisk.c; +}; + +module = { + name = usbms; + source = disk/usbms.c; + i386_pc; +}; + +module = { + name = usbms; + source = disk/usbms.c; + emu; + enable = COND_GRUB_EMU_USB; +}; + +module = { + name = nand; + source = disk/ieee1275/nand.c; + + i386_ieee1275; +}; + +module = { + name = efiemu; + i386_pc = efiemu/main.c; + i386_pc = efiemu/i386/loadcore32.c; + i386_pc = efiemu/i386/loadcore64.c; + i386_pc = efiemu/i386/pc/cfgtables.c; + i386_pc = efiemu/mm.c; + i386_pc = efiemu/loadcore_common.c; + i386_pc = efiemu/symbols.c; + i386_pc = efiemu/loadcore32.c; + i386_pc = efiemu/loadcore64.c; + i386_pc = efiemu/prepare32.c; + i386_pc = efiemu/prepare64.c; + i386_pc = efiemu/pnvram.c; + i386_pc = efiemu/i386/coredetect.c; +}; + +module = { + name = font; + source = font/font.c; + source = font/font_cmd.c; + emu; + x86; + sparc64; + powerpc; +}; + +module = { + common; + name = affs; + source = fs/affs.c; +}; + +module = { + common; + name = afs; + source = fs/afs.c; +}; + +module = { + common; + name = afs_be; + source = fs/afs_be.c; +}; + +module = { + common; + name = befs; + source = fs/befs.c; +}; + +module = { + common; + name = befs_be; + source = fs/befs_be.c; +}; + +module = { + common; + name = cpio; + source = fs/cpio.c; +}; + +module = { + common; + name = ext2; + source = fs/ext2.c; +}; + +module = { + common; + name = fat; + source = fs/fat.c; +}; + +module = { + common; + name = fshelp; + source = fs/fshelp.c; +}; + +module = { + common; + name = hfs; + source = fs/hfs.c; +}; + +module = { + common; + name = hfsplus; + source = fs/hfsplus.c; +}; + +module = { + common; + name = iso9660; + source = fs/iso9660.c; +}; + +module = { + common; + name = jfs; + source = fs/jfs.c; +}; + +module = { + common; + name = minix; + source = fs/minix.c; +}; + +module = { + common; + name = nilfs2; + source = fs/nilfs2.c; +}; + +module = { + common; + name = ntfs; + source = fs/ntfs.c; +}; + +module = { + common; + name = ntfscomp; + source = fs/ntfscomp.c; +}; + +module = { + common; + name = reiserfs; + source = fs/reiserfs.c; +}; + +module = { + common; + name = sfs; + source = fs/sfs.c; +}; + +module = { + common; + name = tar; + source = fs/tar.c; +}; + +module = { + common; + name = udf; + source = fs/udf.c; +}; + +module = { + common; + name = ufs1; + source = fs/ufs.c; +}; + +module = { + common; + name = ufs2; + source = fs/ufs2.c; +}; + +module = { + common; + name = xfs; + source = fs/xfs.c; +}; + +module = { + name = pxe; + i386_pc = fs/i386/pc/pxe.c; +}; + +module = { + name = gettext; + source = gettext/gettext.c; + common; +}; + +module = { + common; + name = gfxmenu; + source = gfxmenu/gfxmenu.c; + source = gfxmenu/model.c; + source = gfxmenu/view.c; + source = gfxmenu/icon_manager.c; + source = gfxmenu/theme_loader.c; + source = gfxmenu/widget-box.c; + source = gfxmenu/gui_canvas.c; + source = gfxmenu/gui_circular_progress.c; + source = gfxmenu/gui_box.c; + source = gfxmenu/gui_label.c; + source = gfxmenu/gui_list.c; + source = gfxmenu/gui_image.c; + source = gfxmenu/gui_progress_bar.c; + source = gfxmenu/gui_util.c; + source = gfxmenu/gui_string_util.c; + source = gfxmenu/named_colors.c; +}; + +module = { + common; + name = hello; + source = hello/hello.c; +}; + +module = { + common; + name = gzio; + source = io/gzio.c; +}; + +module = { + name = bufio; + source = io/bufio.c; + emu; + x86; + sparc64; + powerpc; +}; + +module = { + common; + name = elf; + source = kern/elf.c; +}; + +module = { + common; + name = charset; + source = lib/charset.c; +}; + +module = { + common; + name = crypto; + source = lib/crypto.c; +}; + +module = { + common; + name = gcry_arcfour; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/arcfour.c; +}; + +module = { + common; + name = gcry_blowfish; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/blowfish.c; +}; + +module = { + common; + name = gcry_camellia; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/camellia.c; + source = lib/libgcrypt-grub/cipher/camellia-glue.c; +}; + +module = { + common; + name = gcry_cast5; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/cast5.c; +}; + +module = { + common; + name = gcry_crc; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/crc.c; +}; + +module = { + common; + name = gcry_des; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/des.c; +}; + +module = { + common; + name = gcry_md4; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/md4.c; +}; + +module = { + common; + name = gcry_md5; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/md5.c; +}; + +module = { + common; + name = gcry_rfc2268; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/rfc2268.c; +}; + +module = { + common; + name = gcry_rijndael; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/rijndael.c; +}; + +module = { + common; + name = gcry_rmd160; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/rmd160.c; +}; + +module = { + common; + name = gcry_seed; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/seed.c; +}; + +module = { + common; + name = gcry_serpent; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/serpent.c; +}; + +module = { + common; + name = gcry_sha1; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/sha1.c; +}; + +module = { + common; + name = gcry_sha256; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/sha256.c; +}; + +module = { + common; + name = gcry_sha512; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/sha512.c; +}; + +module = { + common; + name = gcry_tiger; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/tiger.c; +}; + +module = { + common; + name = gcry_twofish; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/twofish.c; +}; + +module = { + common; + name = gcry_whirlpool; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + source = lib/libgcrypt-grub/cipher/whirlpool.c; +}; + +module = { + common; + name = pbkdf2; + source = lib/pbkdf2.c; +}; + +module = { + name = relocator; + mips = lib/mips/relocator.c; + mips = lib/mips/relocator_asm.S; + x86 = lib/i386/relocator.c; + x86 = lib/i386/relocator_asm.S; + x86 = lib/i386/relocator_backward.S; +}; + +module = { + name = datetime; + source = lib/cmos_datetime.c; + x86_efi = lib/efi/datetime.c; + sparc64_ieee1275 = lib/ieee1275/datetime.c; + powerpc_ieee1275 = lib/ieee1275/datetime.c; + x86; + mips; +}; + +module = { + name = setjmp; + i386 = lib/i386/setjmp.S; + x86_64 = lib/x86_64/setjmp.S; + mips = lib/mips/setjmp.S; + sparc64 = lib/sparc64/setjmp.S; + powerpc = lib/powerpc/setjmp.S; +}; + +module = { + name = aout; + source = loader/aout.c; + i386_pc; + i386_qemu; + i386_coreboot; + i386_ieee1275; +}; + +module = { + name = bsd; + source = loader/i386/bsd.c; + source = loader/i386/bsd32.c; + source = loader/i386/bsd64.c; + source = loader/i386/bsd_helper.S; + source = loader/i386/bsd_trampoline.S; + i386_pc; + i386_qemu; + i386_coreboot; +}; + +module = { + name = linux16; + source = loader/i386/pc/linux.c; + i386_pc; +}; + +module = { + name = multiboot2; + cppflags = "-DGRUB_USE_MULTIBOOT2"; + + source = loader/multiboot.c; + source = loader/multiboot_mbi2.c; + x86; + mips; +}; + +module = { + name = multiboot; + source = loader/multiboot.c; + source = loader/i386/multiboot_mbi.c; + x86; +}; + +module = { + name = linux; + i386 = loader/i386/linux.c; + i386_efi = loader/i386/efi/linux.c; + i386_ieee1275 = loader/i386/ieee1275/linux.c; + x86_64_efi = loader/i386/efi/linux.c; + x86_64_efi = loader/i386/linux_trampoline.S; + mips = loader/mips/linux.c; + powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c; + sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c; +}; + +module = { + name = xnu; + x86_efi = loader/xnu_resume.c; + x86_efi = loader/i386/xnu.c; + x86_efi = loader/i386/efi/xnu.c; + x86_efi = loader/macho32.c; + x86_efi = loader/macho64.c; + x86_efi = loader/macho.c; + x86_efi = loader/xnu.c; + + i386_pc = loader/xnu_resume.c; + i386_pc = loader/i386/xnu.c; + i386_pc = loader/i386/pc/xnu.c; + i386_pc = loader/macho32.c; + i386_pc = loader/macho64.c; + i386_pc = loader/macho.c; + i386_pc = loader/xnu.c; +}; + +module = { + name = appleldr; + x86_efi = loader/efi/appleloader.c; +}; + +module = { + name = chain; + x86_efi = loader/efi/chainloader.c; + i386_pc = loader/i386/pc/chainloader.c; +}; + +module = { + name = mmap; + i386_pc = mmap/mmap.c; + i386_pc = mmap/i386/uppermem.c; + i386_pc = mmap/i386/mmap.c; + i386_pc = mmap/i386/pc/mmap.c; + i386_pc = mmap/i386/pc/mmap_helper.S; + + x86_efi = mmap/mmap.c; + x86_efi = mmap/i386/uppermem.c; + x86_efi = mmap/i386/mmap.c; + x86_efi = mmap/efi/mmap.c; + + i386_coreboot = mmap/mmap.c; + i386_coreboot = mmap/i386/uppermem.c; + i386_coreboot = mmap/i386/mmap.c; + + i386_qemu = mmap/mmap.c; + i386_qemu = mmap/i386/uppermem.c; + i386_qemu = mmap/i386/mmap.c; + + i386_ieee1275 = mmap/mmap.c; + i386_ieee1275 = mmap/i386/uppermem.c; + i386_ieee1275 = mmap/i386/mmap.c; + + mips_yeeloong = mmap/mmap.c; + mips_yeeloong = mmap/mips/yeeloong/uppermem.c; +}; + +module = { + common; + name = normal; + source = normal/main.c; + source = normal/cmdline.c; + source = normal/dyncmd.c; + source = normal/auth.c; + source = normal/autofs.c; + source = normal/handler.c; + source = normal/color.c; + source = normal/completion.c; + source = normal/datetime.c; + source = normal/menu.c; + source = normal/menu_entry.c; + source = normal/menu_text.c; + source = normal/misc.c; + source = normal/crypto.c; + source = normal/term.c; + source = normal/context.c; +}; + +module = { + common; + name = part_acorn; + source = partmap/acorn.c; +}; + +module = { + common; + name = part_amiga; + source = partmap/amiga.c; +}; + +module = { + common; + name = part_apple; + source = partmap/apple.c; +}; + +module = { + common; + name = part_gpt; + source = partmap/gpt.c; +}; + +module = { + common; + name = part_msdos; + source = partmap/msdos.c; +}; + +module = { + common; + name = part_sun; + source = partmap/sun.c; +}; + +module = { + common; + name = part_bsd; + source = partmap/bsdlabel.c; +}; + +module = { + common; + name = part_sunpc; + source = partmap/sunpc.c; +}; + +module = { + common; + name = msdospart; + source = parttool/msdospart.c; +}; + +module = { + common; + name = sh; + source = script/main.c; + source = script/script.c; + source = script/execute.c; + source = script/function.c; + source = script/lexer.c; + nodist = grub_script.tab.c; + nodist = grub_script.yy.c; + nodist = grub_script.tab.h; + nodist = grub_script.yy.h; + cflags = '$(CFLAGS_POSIX) -Wno-error'; + cppflags = '$(CPPFLAGS_POSIX)'; +}; + +module = { + name = at_keyboard; + source = term/at_keyboard.c; + x86; +}; + +module = { + name = gfxterm; + source = term/gfxterm.c; + emu; + x86; + sparc64; + powerpc; +}; + +module = { + name = serial; + source = term/serial.c; + mips; + i386; +}; + +module = { + common; + name = terminfo; + source = term/terminfo.c; + source = term/tparm.c; +}; + +module = { + name = usb_keyboard; + source = term/usb_keyboard.c; + i386_pc; +}; + +module = { + name = vga; + i386_pc = term/i386/pc/vga.c; +}; + +module = { + name = vga_text; + x86 = term/i386/pc/vga_text.c; + x86 = term/i386/vga_common.c; +}; + +module = { + name = functional_test; + source = tests/lib/functional_test.c; + source = tests/lib/test.c; + common; +}; + +module = { + name = example_functional_test; + source = tests/example_functional_test.c; + cflags = -Wno-format; + common; +}; + +module = { + name = bitmap; + source = video/bitmap.c; + emu; + x86; + sparc64; + powerpc; +}; + +module = { + name = bitmap_scale; + source = video/bitmap_scale.c; + emu; + x86; + sparc64; + powerpc; +}; + +module = { + name = efi_gop; + x86_efi = video/efi_gop.c; +}; + +module = { + name = efi_uga; + x86_efi = video/efi_uga.c; +}; + +module = { + common; + name = jpeg; + source = video/readers/jpeg.c; +}; + +module = { + common; + name = png; + source = video/readers/png.c; +}; + +module = { + common; + name = tga; + source = video/readers/tga.c; +}; + +module = { + name = vbe; + i386_pc = video/i386/pc/vbe.c; +}; + +module = { + name = video_fb; + source = video/fb/video_fb.c; + source = video/fb/fbblit.c; + source = video/fb/fbfill.c; + source = video/fb/fbutil.c; + emu; + x86; + sparc64; + powerpc; +}; + +module = { + name = video; + source = video/video.c; + emu; + x86; + sparc64; + powerpc; +}; + +module = { + name = ieee1275_fb; + source = video/ieee1275.c; + powerpc; + sparc64; +}; + +module = { + name = sdl; + source = video/emu/sdl.c; + enable = COND_GRUB_EMU_SDL; + emu; +}; + +module = { + name = datehook; + source = hook/datehook.c; + common; +}; diff --git a/normal/auth.c b/grub-core/normal/auth.c similarity index 100% rename from normal/auth.c rename to grub-core/normal/auth.c diff --git a/normal/autofs.c b/grub-core/normal/autofs.c similarity index 100% rename from normal/autofs.c rename to grub-core/normal/autofs.c diff --git a/normal/cmdline.c b/grub-core/normal/cmdline.c similarity index 100% rename from normal/cmdline.c rename to grub-core/normal/cmdline.c diff --git a/normal/color.c b/grub-core/normal/color.c similarity index 100% rename from normal/color.c rename to grub-core/normal/color.c diff --git a/normal/completion.c b/grub-core/normal/completion.c similarity index 100% rename from normal/completion.c rename to grub-core/normal/completion.c diff --git a/normal/context.c b/grub-core/normal/context.c similarity index 100% rename from normal/context.c rename to grub-core/normal/context.c diff --git a/normal/crypto.c b/grub-core/normal/crypto.c similarity index 100% rename from normal/crypto.c rename to grub-core/normal/crypto.c diff --git a/normal/datetime.c b/grub-core/normal/datetime.c similarity index 100% rename from normal/datetime.c rename to grub-core/normal/datetime.c diff --git a/normal/dyncmd.c b/grub-core/normal/dyncmd.c similarity index 100% rename from normal/dyncmd.c rename to grub-core/normal/dyncmd.c diff --git a/normal/handler.c b/grub-core/normal/handler.c similarity index 100% rename from normal/handler.c rename to grub-core/normal/handler.c diff --git a/normal/main.c b/grub-core/normal/main.c similarity index 100% rename from normal/main.c rename to grub-core/normal/main.c diff --git a/normal/menu.c b/grub-core/normal/menu.c similarity index 100% rename from normal/menu.c rename to grub-core/normal/menu.c diff --git a/normal/menu_entry.c b/grub-core/normal/menu_entry.c similarity index 100% rename from normal/menu_entry.c rename to grub-core/normal/menu_entry.c diff --git a/normal/menu_text.c b/grub-core/normal/menu_text.c similarity index 100% rename from normal/menu_text.c rename to grub-core/normal/menu_text.c diff --git a/normal/misc.c b/grub-core/normal/misc.c similarity index 100% rename from normal/misc.c rename to grub-core/normal/misc.c diff --git a/normal/term.c b/grub-core/normal/term.c similarity index 100% rename from normal/term.c rename to grub-core/normal/term.c diff --git a/partmap/acorn.c b/grub-core/partmap/acorn.c similarity index 100% rename from partmap/acorn.c rename to grub-core/partmap/acorn.c diff --git a/partmap/amiga.c b/grub-core/partmap/amiga.c similarity index 100% rename from partmap/amiga.c rename to grub-core/partmap/amiga.c diff --git a/partmap/apple.c b/grub-core/partmap/apple.c similarity index 100% rename from partmap/apple.c rename to grub-core/partmap/apple.c diff --git a/partmap/bsdlabel.c b/grub-core/partmap/bsdlabel.c similarity index 100% rename from partmap/bsdlabel.c rename to grub-core/partmap/bsdlabel.c diff --git a/partmap/gpt.c b/grub-core/partmap/gpt.c similarity index 100% rename from partmap/gpt.c rename to grub-core/partmap/gpt.c diff --git a/partmap/msdos.c b/grub-core/partmap/msdos.c similarity index 100% rename from partmap/msdos.c rename to grub-core/partmap/msdos.c diff --git a/partmap/sun.c b/grub-core/partmap/sun.c similarity index 100% rename from partmap/sun.c rename to grub-core/partmap/sun.c diff --git a/partmap/sunpc.c b/grub-core/partmap/sunpc.c similarity index 100% rename from partmap/sunpc.c rename to grub-core/partmap/sunpc.c diff --git a/parttool/msdospart.c b/grub-core/parttool/msdospart.c similarity index 100% rename from parttool/msdospart.c rename to grub-core/parttool/msdospart.c diff --git a/grub-core/po/Makefile.am b/grub-core/po/Makefile.am new file mode 100644 index 000000000..e69de29bb diff --git a/po/POTFILES b/grub-core/po/POTFILES similarity index 100% rename from po/POTFILES rename to grub-core/po/POTFILES diff --git a/po/POTFILES-shell b/grub-core/po/POTFILES-shell similarity index 100% rename from po/POTFILES-shell rename to grub-core/po/POTFILES-shell diff --git a/po/README b/grub-core/po/README similarity index 100% rename from po/README rename to grub-core/po/README diff --git a/script/execute.c b/grub-core/script/execute.c similarity index 100% rename from script/execute.c rename to grub-core/script/execute.c diff --git a/script/function.c b/grub-core/script/function.c similarity index 100% rename from script/function.c rename to grub-core/script/function.c diff --git a/script/lexer.c b/grub-core/script/lexer.c similarity index 100% rename from script/lexer.c rename to grub-core/script/lexer.c diff --git a/script/main.c b/grub-core/script/main.c similarity index 100% rename from script/main.c rename to grub-core/script/main.c diff --git a/script/parser.y b/grub-core/script/parser.y similarity index 100% rename from script/parser.y rename to grub-core/script/parser.y diff --git a/script/script.c b/grub-core/script/script.c similarity index 100% rename from script/script.c rename to grub-core/script/script.c diff --git a/script/yylex.l b/grub-core/script/yylex.l similarity index 100% rename from script/yylex.l rename to grub-core/script/yylex.l diff --git a/term/at_keyboard.c b/grub-core/term/at_keyboard.c similarity index 100% rename from term/at_keyboard.c rename to grub-core/term/at_keyboard.c diff --git a/term/efi/console.c b/grub-core/term/efi/console.c similarity index 100% rename from term/efi/console.c rename to grub-core/term/efi/console.c diff --git a/term/gfxterm.c b/grub-core/term/gfxterm.c similarity index 100% rename from term/gfxterm.c rename to grub-core/term/gfxterm.c diff --git a/term/i386/pc/console.c b/grub-core/term/i386/pc/console.c similarity index 100% rename from term/i386/pc/console.c rename to grub-core/term/i386/pc/console.c diff --git a/term/i386/pc/vga.c b/grub-core/term/i386/pc/vga.c similarity index 100% rename from term/i386/pc/vga.c rename to grub-core/term/i386/pc/vga.c diff --git a/term/i386/pc/vga_text.c b/grub-core/term/i386/pc/vga_text.c similarity index 100% rename from term/i386/pc/vga_text.c rename to grub-core/term/i386/pc/vga_text.c diff --git a/term/i386/vga_common.c b/grub-core/term/i386/vga_common.c similarity index 100% rename from term/i386/vga_common.c rename to grub-core/term/i386/vga_common.c diff --git a/term/ieee1275/ofconsole.c b/grub-core/term/ieee1275/ofconsole.c similarity index 100% rename from term/ieee1275/ofconsole.c rename to grub-core/term/ieee1275/ofconsole.c diff --git a/term/serial.c b/grub-core/term/serial.c similarity index 100% rename from term/serial.c rename to grub-core/term/serial.c diff --git a/term/terminfo.c b/grub-core/term/terminfo.c similarity index 100% rename from term/terminfo.c rename to grub-core/term/terminfo.c diff --git a/term/tparm.c b/grub-core/term/tparm.c similarity index 100% rename from term/tparm.c rename to grub-core/term/tparm.c diff --git a/term/usb_keyboard.c b/grub-core/term/usb_keyboard.c similarity index 100% rename from term/usb_keyboard.c rename to grub-core/term/usb_keyboard.c diff --git a/tests/example_functional_test.c b/grub-core/tests/example_functional_test.c similarity index 95% rename from tests/example_functional_test.c rename to grub-core/tests/example_functional_test.c index 6802d2d53..525988145 100644 --- a/tests/example_functional_test.c +++ b/grub-core/tests/example_functional_test.c @@ -32,4 +32,4 @@ example_test (void) } /* Register example_test method as a functional test. */ -GRUB_FUNCTIONAL_TEST ("example_functional_test", example_test); +GRUB_FUNCTIONAL_TEST (example_functional_test, example_test); diff --git a/tests/lib/functional_test.c b/grub-core/tests/lib/functional_test.c similarity index 100% rename from tests/lib/functional_test.c rename to grub-core/tests/lib/functional_test.c diff --git a/tests/lib/test.c b/grub-core/tests/lib/test.c similarity index 100% rename from tests/lib/test.c rename to grub-core/tests/lib/test.c diff --git a/video/bitmap.c b/grub-core/video/bitmap.c similarity index 100% rename from video/bitmap.c rename to grub-core/video/bitmap.c diff --git a/video/bitmap_scale.c b/grub-core/video/bitmap_scale.c similarity index 100% rename from video/bitmap_scale.c rename to grub-core/video/bitmap_scale.c diff --git a/video/efi_gop.c b/grub-core/video/efi_gop.c similarity index 100% rename from video/efi_gop.c rename to grub-core/video/efi_gop.c diff --git a/video/efi_uga.c b/grub-core/video/efi_uga.c similarity index 100% rename from video/efi_uga.c rename to grub-core/video/efi_uga.c diff --git a/util/sdl.c b/grub-core/video/emu/sdl.c similarity index 100% rename from util/sdl.c rename to grub-core/video/emu/sdl.c diff --git a/video/fb/fbblit.c b/grub-core/video/fb/fbblit.c similarity index 100% rename from video/fb/fbblit.c rename to grub-core/video/fb/fbblit.c diff --git a/video/fb/fbfill.c b/grub-core/video/fb/fbfill.c similarity index 100% rename from video/fb/fbfill.c rename to grub-core/video/fb/fbfill.c diff --git a/video/fb/fbutil.c b/grub-core/video/fb/fbutil.c similarity index 100% rename from video/fb/fbutil.c rename to grub-core/video/fb/fbutil.c diff --git a/video/fb/video_fb.c b/grub-core/video/fb/video_fb.c similarity index 100% rename from video/fb/video_fb.c rename to grub-core/video/fb/video_fb.c diff --git a/video/i386/pc/vbe.c b/grub-core/video/i386/pc/vbe.c similarity index 100% rename from video/i386/pc/vbe.c rename to grub-core/video/i386/pc/vbe.c diff --git a/video/ieee1275.c b/grub-core/video/ieee1275.c similarity index 100% rename from video/ieee1275.c rename to grub-core/video/ieee1275.c diff --git a/video/readers/jpeg.c b/grub-core/video/readers/jpeg.c similarity index 100% rename from video/readers/jpeg.c rename to grub-core/video/readers/jpeg.c diff --git a/video/readers/png.c b/grub-core/video/readers/png.c similarity index 100% rename from video/readers/png.c rename to grub-core/video/readers/png.c diff --git a/video/readers/tga.c b/grub-core/video/readers/tga.c similarity index 100% rename from video/readers/tga.c rename to grub-core/video/readers/tga.c diff --git a/video/sm712.c b/grub-core/video/sm712.c similarity index 100% rename from video/sm712.c rename to grub-core/video/sm712.c diff --git a/video/video.c b/grub-core/video/video.c similarity index 100% rename from video/video.c rename to grub-core/video/video.c diff --git a/modules.def b/modules.def new file mode 100644 index 000000000..4877533ef --- /dev/null +++ b/modules.def @@ -0,0 +1,497 @@ +AutoGen definitions Makefile.tpl; + +library = { + name = libutil.a; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + + nodist = grub_script.tab.c; + nodist = grub_script.yy.c; + nodist = libutil_a_init.c; + + source = grub-core/gnulib/error.c; + source = grub-core/gnulib/fnmatch.c; + source = grub-core/gnulib/getdelim.c; + source = grub-core/gnulib/getline.c; + source = grub-core/gnulib/getopt1.c; + source = grub-core/gnulib/getopt.c; + source = grub-core/gnulib/progname.c; + + source = util/misc.c; + source = grub-core/kern/misc.c; + source = grub-core/kern/emu/misc.c; + source = grub-core/kern/emu/hostfs.c; + source = grub-core/kern/emu/getroot.c; + source = grub-core/kern/emu/hostdisk.c; + + source = grub-core/commands/blocklist.c; + source = grub-core/commands/extcmd.c; + source = grub-core/commands/ls.c; + source = grub-core/disk/dmraid_nvidia.c; + source = grub-core/disk/host.c; + source = grub-core/disk/loopback.c; + source = grub-core/disk/lvm.c; + source = grub-core/disk/mdraid_linux.c; + source = grub-core/disk/raid5_recover.c; + source = grub-core/disk/raid6_recover.c; + source = grub-core/disk/raid.c; + source = grub-core/fs/affs.c; + source = grub-core/fs/afs_be.c; + source = grub-core/fs/afs.c; + source = grub-core/fs/befs_be.c; + source = grub-core/fs/befs.c; + source = grub-core/fs/cpio.c; + source = grub-core/fs/ext2.c; + source = grub-core/fs/fat.c; + source = grub-core/fs/fshelp.c; + source = grub-core/fs/hfs.c; + source = grub-core/fs/hfsplus.c; + source = grub-core/fs/iso9660.c; + source = grub-core/fs/jfs.c; + source = grub-core/fs/minix.c; + source = grub-core/fs/nilfs2.c; + source = grub-core/fs/ntfs.c; + source = grub-core/fs/ntfscomp.c; + source = grub-core/fs/reiserfs.c; + source = grub-core/fs/sfs.c; + source = grub-core/fs/tar.c; + source = grub-core/fs/udf.c; + source = grub-core/fs/ufs2.c; + source = grub-core/fs/ufs.c; + source = grub-core/fs/xfs.c; + source = grub-core/kern/command.c; + source = grub-core/kern/device.c; + source = grub-core/kern/disk.c; + source = grub-core/kern/env.c; + source = grub-core/kern/err.c; + source = grub-core/kern/file.c; + source = grub-core/kern/fs.c; + source = grub-core/kern/handler.c; + source = grub-core/kern/list.c; + source = grub-core/kern/parser.c; + source = grub-core/kern/partition.c; + source = grub-core/lib/arg.c; + source = grub-core/lib/crc.c; + source = grub-core/lib/crypto.c; + source = grub-core/lib/envblk.c; + source = grub-core/lib/hexdump.c; + source = grub-core/lib/libgcrypt-grub/cipher/sha512.c; + source = grub-core/lib/LzFind.c; + source = grub-core/lib/LzmaEnc.c; + source = grub-core/lib/pbkdf2.c; + source = grub-core/normal/datetime.c; + source = grub-core/normal/misc.c; + source = grub-core/partmap/acorn.c; + source = grub-core/partmap/amiga.c; + source = grub-core/partmap/apple.c; + source = grub-core/partmap/gpt.c; + source = grub-core/partmap/msdos.c; + source = grub-core/partmap/sun.c; + source = grub-core/script/function.c; + source = grub-core/script/lexer.c; + source = grub-core/script/main.c; + source = grub-core/script/script.c; + common; +}; + +program = { + name = grub-bin2h; + source = util/bin2h.c; + ldadd = libutil.a; + mansection = 1; + common; +}; + +program = { + name = grub-mkimage; + mansection = 1; + + source = util/grub-mkrawimage.c; + source = util/resolve.c; + + x86_efi = util/i386/efi/grub-mkimage.c; + x86_efi = util/resolve.c; + + ldadd = libutil.a; + + sparc64_ieee1275_cppflags = '-DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + mips_cppflags = '-DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + i386_pc_cppflags = '-DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + i386_qemu_cppflags = '-DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + + i386_pc; i386_qemu; mips; sparc64_ieee1275; +}; + +program = { + name = grub-mkelfimage; + mansection = 1; + source = util/elf/grub-mkimage.c; + source = util/resolve.c; + + ldadd = libutil.a; + common; +}; + +program = { + name = grub-mkisofs; + mansection = 1; + source = util/mkisofs/eltorito.c; + source = util/mkisofs/hash.c; + source = util/mkisofs/joliet.c; + source = util/mkisofs/match.c; + source = util/mkisofs/mkisofs.c; + source = util/mkisofs/multi.c; + source = util/mkisofs/name.c; + source = util/mkisofs/rock.c; + source = util/mkisofs/tree.c; + source = util/mkisofs/write.c; + source = grub-core/gnulib/progname.c; + source = grub-core/gnulib/error.c; + cflags = '$(CFLAGS_MKISOFS)'; + cppflags = '$(CPPFLAGS_MKISOFS)'; + common; +}; + +program = { + name = grub-mkrelpath; + mansection = 1; + + source = util/grub-mkrelpath.c; + + ldadd = libutil.a; + common; +}; + +program = { + name = grub-script-check; + mansection = 1; + + source = util/grub-script-check.c; + + ldadd = libutil.a; + common; +}; + +program = { + name = grub-editenv; + mansection = 1; + + source = util/grub-editenv.c; + + ldadd = libutil.a; + common; +}; + +program = { + name = grub-mkpasswd-pbkdf2; + mansection = 1; + + source = util/grub-mkpasswd-pbkdf2.c; + + ldadd = libutil.a; + cflags = '$(CFLAGS_GCRY)'; + cppflags = '$(CPPFLAGS_GCRY)'; + common; +}; + +program = { + name = grub-macho2img; + mansection = 1; + source = util/grub-macho2img.c; +}; + +program = { + name = grub-pe2elf; + mansection = 1; + source = util/grub-pe2elf.c; + + ldadd = libutil.a; +}; + +program = { + name = grub-fstest; + mansection = 1; + source = util/grub-fstest.c; + + ldadd = libutil.a; + enable = COND_GRUB_FSTEST; + common; +}; + +program = { + name = grub-mkfont; + mansection = 1; + source = util/grub-mkfont.c; + + ldadd = libutil.a; + cflags = '$(freetype_cflags)'; + ldflags = '$(freetype_libs)'; + common; + enable = COND_GRUB_MKFONT; +}; + +program = { + name = grub-mkdevicemap; + installdir = sbin; + mansection = 8; + source = util/grub-mkdevicemap.c; + source = util/deviceiter.c; + source = util/devicemap.c; + + sparc64_ieee1275 = util/grub-mkdevicemap.c; + sparc64_ieee1275 = util/deviceiter.c; + sparc64_ieee1275 = util/ieee1275/ofpath.c; + sparc64_ieee1275 = util/ieee1275/devicemap.c; + + ldadd = libutil.a; + common; +}; + +program = { + name = grub-probe; + installdir = sbin; + mansection = 8; + source = util/grub-probe.c; + + ldadd = libutil.a; + common; +}; + +program = { + name = grub-setup; + installdir = sbin; + mansection = 8; + i386_pc = util/i386/pc/grub-setup.c; + i386_pc = util/raid.c; + i386_pc = util/lvm.c; + + sparc64_ieee1275 = util/ieee1275/ofpath.c; + sparc64_ieee1275 = util/sparc64/ieee1275/grub-setup.c; + sparc64_ieee1275 = util/raid.c; + sparc64_ieee1275 = util/lvm.c; + + ldadd = libutil.a; +}; + +program = { + name = grub-ofpathname; + installdir = sbin; + source = util/ieee1275/grub-ofpathname.c; + source = util/ieee1275/ofpath.c; + + ldadd = libutil.a; + sparc64_ieee1275; +}; + +data = { + source = util/grub.d/README; + installdir = grubconf; + common; +}; + +script = { + name = '00_header'; + source = util/grub.d/00_header.in; + installdir = grubconf; + common; +}; + +script = { + name = '10_windows'; + source = util/grub.d/10_windows.in; + installdir = grubconf; +}; + +script = { + name = '10_hurd'; + source = util/grub.d/10_hurd.in; + installdir = grubconf; +}; + +script = { + name = '10_linux'; + source = util/grub.d/10_linux.in; + installdir = grubconf; + common; +}; + +script = { + name = '30_os-prober'; + source = util/grub.d/30_os-prober.in; + installdir = grubconf; + common; +}; + +script = { + name = '40_custom'; + source = util/grub.d/40_custom.in; + installdir = grubconf; + common; +}; + +script = { + mansection = 1; + name = grub-mkrescue; + source = util/grub-mkrescue.in; + powerpc_ieee1275 = util/powerpc/ieee1275/grub-mkrescue.in; + i386_pc; + i386_qemu; + i386_coreboot; +}; + +script = { + mansection = 8; + installdir = sbin; + name = grub-install; + source = util/grub-install.in; + x86_efi = util/i386/efi/grub-install.in; + i386_ieee1275 = util/ieee1275/grub-install.in; + powerpc_ieee1275 = util/ieee1275/grub-install.in; + mips; + i386_pc; + i386_qemu; + i386_coreboot; +}; + +script = { + name = grub-mkconfig; + source = util/grub-mkconfig.in; + mansection = 8; + installdir = sbin; + common; +}; + +script = { + name = grub-set-default; + source = util/grub-set-default.in; + mansection = 8; + installdir = sbin; + common; +}; + +script = { + name = grub-reboot; + source = util/grub-reboot.in; + mansection = 8; + installdir = sbin; + common; +}; + +script = { + name = grub-mkconfig_lib; + source = util/grub-mkconfig_lib.in; + installdir = pkglib; + common; +}; + +script = { + name = update-grub_lib; + source = util/update-grub_lib.in; + installdir = pkglib; + common; +}; + +test_script = { + name = grub-shell; + source = tests/util/grub-shell.in; + common; +}; + +test_script = { + name = grub-shell-tester; + source = tests/util/grub-shell-tester.in; + common; +}; + +test_script = { + name = example_scripted_test; + source = tests/example_scripted_test.in; + common; +}; + +test_script = { + name = example_grub_script_test; + source = tests/example_grub_script_test.in; + common; +}; + +test_script = { + name = grub_script_echo1; + source = tests/grub_script_echo1.in; + common; + enable; +}; + +test_script = { + name = grub_script_echo_keywords; + source = tests/grub_script_echo_keywords.in; + common; + enable; +}; + +test_script = { + name = grub_script_vars1; + source = tests/grub_script_vars1.in; + common; + enable; +}; + +test_script = { + name = grub_script_for1; + source = tests/grub_script_for1.in; + common; + enable; +}; + +test_script = { + name = grub_script_while1; + source = tests/grub_script_while1.in; + common; + enable; +}; + +test_script = { + name = grub_script_if; + source = tests/grub_script_if.in; + common; + enable; +}; + +test_script = { + name = grub_script_blanklines; + source = tests/grub_script_blanklines.in; + common; + enable; +}; + +test_script = { + name = grub_script_final_semicolon; + source = tests/grub_script_final_semicolon.in; + common; + enable; +}; + +test_script = { + name = grub_script_dollar; + source = tests/grub_script_dollar.in; + common; + enable; +}; + +test_script = { + name = grub_script_comments; + source = tests/grub_script_comments.in; + common; + enable; +}; + +test_program = { + name = example_unit_test; + source = tests/example_unit_test.c; + source = tests/lib/unit_test.c; + source = grub-core/kern/list.c; + source = grub-core/kern/misc.c; + source = grub-core/tests/lib/test.c; + cflags = -Wno-format; + common; +}; diff --git a/po/Makefile.am b/po/Makefile.am new file mode 100644 index 000000000..e69de29bb diff --git a/tests/example_grub_script_test.in b/tests/example_grub_script_test.in index 93a90a18e..6fa3dc98a 100644 --- a/tests/example_grub_script_test.in +++ b/tests/example_grub_script_test.in @@ -1,3 +1,3 @@ -#! @builddir@/grub-shell-tester --modules=echo +#! @abs_top_builddir@/grub-shell-tester --modules=echo echo "hello world" diff --git a/tests/lib/unit_test.c b/tests/lib/unit_test.c index e461150de..92c8ae33a 100644 --- a/tests/lib/unit_test.c +++ b/tests/lib/unit_test.c @@ -105,5 +105,4 @@ grub_exit (void) exit (1); } -struct grub_handler_class grub_term_input_class; -struct grub_handler_class grub_term_output_class; +struct grub_term_input *grub_term_inputs; diff --git a/tests/util/grub-shell-tester.in b/tests/util/grub-shell-tester.in index e9507c8f5..f1e91f561 100644 --- a/tests/util/grub-shell-tester.in +++ b/tests/util/grub-shell-tester.in @@ -91,7 +91,7 @@ if [ "x${source}" = x ] ; then fi outfile1=`mktemp` -@builddir@/grub-shell --qemu-opts="${qemuopts}" --modules=${modules} ${source} >${outfile1} +@abs_top_builddir@/grub-shell --qemu-opts="${qemuopts}" --modules=${modules} ${source} >${outfile1} outfile2=`mktemp` bash ${source} >${outfile2} diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index a41a6f6f4..8324beb97 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.in @@ -123,10 +123,14 @@ source /boot/grub/testcase.cfg halt EOF +rootdir=`mktemp -d` +(cd @abs_top_builddir@ && make DESTDIR=$rootdir install) >/dev/null 2>&1 + isofile=`mktemp` -grub-mkrescue --output=${isofile} --override-directory=${builddir} \ - /boot/grub/grub.cfg=${cfgfile} /boot/grub/testcase.cfg=${source} \ - >/dev/null 2>&1 +sh @abs_top_builddir@/grub-mkrescue --output=${isofile} \ + --root-directory=${rootdir} /boot/grub/grub.cfg=${cfgfile} \ + /boot/grub/testcase.cfg=${source} >/dev/null 2>&1 +rm -rf $rootdir hdafile=`mktemp` cp ${isofile} ${hdafile} diff --git a/util/elf/grub-mkimage.c b/util/elf/grub-mkimage.c index 04a19bc4e..fa9b202eb 100644 --- a/util/elf/grub-mkimage.c +++ b/util/elf/grub-mkimage.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/util/grub-editenv.c b/util/grub-editenv.c index f21042c97..24c36329c 100644 --- a/util/grub-editenv.c +++ b/util/grub-editenv.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -34,24 +35,6 @@ #define DEFAULT_ENVBLK_SIZE 1024 -void -grub_putchar (int c) -{ - putchar (c); -} - -void -grub_refresh (void) -{ - fflush (stdout); -} - -int -grub_getkey (void) -{ - return 0; -} - char * grub_env_get (const char *name __attribute__ ((unused))) { diff --git a/util/grub-fstest.c b/util/grub-fstest.c index c03c43451..9ac5cf550 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -33,8 +34,6 @@ #include #include -#include - #include #include #include @@ -43,27 +42,6 @@ #include "progname.h" -void -grub_putchar (int c) -{ - putchar (c); -} - -int -grub_getkey (void) -{ - return -1; -} - -struct grub_handler_class grub_term_input_class; -struct grub_handler_class grub_term_output_class; - -void -grub_refresh (void) -{ - fflush (stdout); -} - static grub_err_t execute_command (char *name, int n, char **args) { diff --git a/util/grub-mkdevicemap.c b/util/grub-mkdevicemap.c index c68482af1..d534ff9ef 100644 --- a/util/grub-mkdevicemap.c +++ b/util/grub-mkdevicemap.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c index 51e2e494c..30dd96a21 100644 --- a/util/grub-mkfont.c +++ b/util/grub-mkfont.c @@ -18,6 +18,8 @@ #include #include +#include +#include #include #include #include diff --git a/util/grub-mkpasswd-pbkdf2.c b/util/grub-mkpasswd-pbkdf2.c index a00b1e990..4a218bc82 100644 --- a/util/grub-mkpasswd-pbkdf2.c +++ b/util/grub-mkpasswd-pbkdf2.c @@ -18,6 +18,7 @@ #include #include +#include #include #include @@ -30,37 +31,6 @@ #include "progname.h" -/* Few functions to make crypto happy. */ -void * -grub_memmove (void *dest, const void *src, grub_size_t n) -{ - return memmove (dest, src, n); -} - -void * -grub_memset (void *s, int c, grub_size_t n) -{ - return memset (s, c, n); -} - -int -grub_vprintf (const char *fmt, va_list args) -{ - return vprintf (fmt, args); -} - -int -grub_vsnprintf (char *str, grub_size_t n, const char *fmt, va_list args) -{ - return vsnprintf (str, n, fmt, args); -} - -void -grub_abort (void) -{ - abort (); -} - static struct option options[] = { {"iteration_count", required_argument, 0, 'c'}, diff --git a/util/grub-mkrawimage.c b/util/grub-mkrawimage.c index 20a344d04..ff3b9df83 100644 --- a/util/grub-mkrawimage.c +++ b/util/grub-mkrawimage.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/util/grub-mkrelpath.c b/util/grub-mkrelpath.c index 327f0c866..4e9d0ed63 100644 --- a/util/grub-mkrelpath.c +++ b/util/grub-mkrelpath.c @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -97,7 +98,7 @@ main (int argc, char *argv[]) argument = argv[optind]; - relpath = make_system_path_relative_to_its_root (argument); + relpath = grub_make_system_path_relative_to_its_root (argument); printf ("%s\n", relpath); free (relpath); diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in index 44e80b106..2fdb58114 100644 --- a/util/grub-mkrescue.in +++ b/util/grub-mkrescue.in @@ -1,7 +1,7 @@ #! /bin/sh -e # Make GRUB rescue image -# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc. +# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 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 @@ -28,8 +28,11 @@ PACKAGE_TARNAME=@PACKAGE_TARNAME@ PACKAGE_VERSION=@PACKAGE_VERSION@ target_cpu=@target_cpu@ native_platform=@platform@ -pkglib_DATA="@pkglib_DATA@" +pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst" +mkimage=${bindir}/grub-mkimage +mkisofs=${bindir}/grub-mkisofs +mkelfimage=${bindir}/grub-mkelfimage multiboot_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-multiboot pc_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-pc @@ -70,6 +73,8 @@ for option in "$@"; do PATH=${override_dir}:$PATH export PATH ;; + --root-directory=*) + rootdir=`echo "${option}/" | sed 's/--root-directory=//'` ;; -*) echo "Unrecognized option \`$option'" 1>&2 usage @@ -121,6 +126,14 @@ process_input_dir () done } +if [ "${rootdir}" != "" ] ; then + coreboot_dir="${rootdir}/${coreboot_dir}" + pc_dir="${rootdir}/${pc_dir}" + mkimage="${rootdir}/${mkimage}" + mkisofs="${rootdir}/${mkisofs}" + mkelfimage="${rootdir}/${mkelfimage}" +fi + if [ "${override_dir}" = "" ] ; then if test -e "${multiboot_dir}" ; then process_input_dir ${multiboot_dir} multiboot @@ -160,7 +173,7 @@ EOF tar -C ${memdisk_dir} -cf ${memdisk_img} boot rm -rf ${memdisk_dir} - grub-mkelfimage -d ${multiboot_dir}/ -m ${memdisk_img} -o ${iso9660_dir}/boot/multiboot.img \ + ${mkelfimage} -d ${multiboot_dir}/ -m ${memdisk_img} -o ${iso9660_dir}/boot/multiboot.img \ memdisk tar search iso9660 configfile sh \ ata at_keyboard rm -f ${memdisk_img} @@ -171,7 +184,7 @@ fi if test -e "${pc_dir}" ; then echo "Enabling BIOS support ..." core_img=`mktemp "$MKTEMP_TEMPLATE"` - grub-mkimage -d ${pc_dir}/ -o ${core_img} --prefix=/boot/grub/i386-pc \ + ${mkimage} -d ${pc_dir}/ -o ${core_img} --prefix=/boot/grub/i386-pc \ iso9660 biosdisk cat ${pc_dir}/cdboot.img ${core_img} > ${iso9660_dir}/boot/grub/i386-pc/eltorito.img @@ -192,7 +205,7 @@ if test -e "${pc_dir}" ; then fi # build iso image -grub-mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source} +${mkisofs} ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source} rm -rf ${iso9660_dir} rm -f ${embed_img} diff --git a/util/grub-probe.c b/util/grub-probe.c index bb41480e2..0cc35d4c5 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -26,15 +27,13 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include -#include - #include #include #include @@ -58,27 +57,6 @@ enum { int print = PRINT_FS; static unsigned int argument_is_device = 0; -void -grub_putchar (int c) -{ - putchar (c); -} - -int -grub_getkey (void) -{ - return -1; -} - -struct grub_handler_class grub_term_input_class; -struct grub_handler_class grub_term_output_class; - -void -grub_refresh (void) -{ - fflush (stdout); -} - static void probe_partmap (grub_disk_t disk) { @@ -261,7 +239,7 @@ probe (const char *path, char *device_name) grub_util_info ("reading %s via OS facilities", path); filebuf_via_sys = grub_util_read_image (path); - rel_path = make_system_path_relative_to_its_root (path); + rel_path = grub_make_system_path_relative_to_its_root (path); grub_path = xasprintf ("(%s)%s", drive_name, rel_path); free (rel_path); grub_util_info ("reading %s via GRUB facilities", grub_path); diff --git a/util/grub-script-check.c b/util/grub-script-check.c index dc732aa01..fa2459306 100644 --- a/util/grub-script-check.c +++ b/util/grub-script-check.c @@ -21,13 +21,12 @@ #include #include #include +#include #include #include #include #include -#include - #define _GNU_SOURCE 1 #include @@ -39,75 +38,6 @@ #include "progname.h" -void -grub_putchar (int c) -{ - putchar (c); -} - -int -grub_getkey (void) -{ - return -1; -} - -void -grub_refresh (void) -{ - fflush (stdout); -} - -char * -grub_script_execute_argument_to_string (struct grub_script_arg *arg __attribute__ ((unused))) -{ - return 0; -} - -grub_err_t -grub_script_execute_cmdline (struct grub_script_cmd *cmd __attribute__ ((unused))) -{ - return 0; -} - -grub_err_t -grub_script_execute_cmdblock (struct grub_script_cmd *cmd __attribute__ ((unused))) -{ - return 0; -} - -grub_err_t -grub_script_execute_cmdif (struct grub_script_cmd *cmd __attribute__ ((unused))) -{ - return 0; -} - -grub_err_t -grub_script_execute_cmdfor (struct grub_script_cmd *cmd __attribute__ ((unused))) -{ - return 0; -} - -grub_err_t -grub_script_execute_cmdwhile (struct grub_script_cmd *cmd __attribute__ ((unused))) -{ - return 0; -} - -grub_err_t -grub_script_execute_menuentry (struct grub_script_cmd *cmd __attribute__ ((unused))) -{ - return 0; -} - -grub_err_t -grub_script_execute (struct grub_script *script) -{ - if (script == 0 || script->cmd == 0) - return 0; - - return script->cmd->exec (script->cmd); -} - static struct option options[] = { {"help", no_argument, 0, 'h'}, @@ -145,7 +75,7 @@ main (int argc, char *argv[]) char *input; FILE *file = 0; int verbose = 0; - struct grub_script *script; + struct grub_script *script = 0; auto grub_err_t get_config_line (char **line, int cont); grub_err_t get_config_line (char **line, int cont __attribute__ ((unused))) diff --git a/util/i386/efi/grub-mkimage.c b/util/i386/efi/grub-mkimage.c index f8c0f152e..57fba9168 100644 --- a/util/i386/efi/grub-mkimage.c +++ b/util/i386/efi/grub-mkimage.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/util/i386/pc/grub-setup.c b/util/i386/pc/grub-setup.c index 63fa8c328..66d45620c 100644 --- a/util/i386/pc/grub-setup.c +++ b/util/i386/pc/grub-setup.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -28,19 +29,17 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT; -#include - #include #include #include @@ -57,27 +56,6 @@ static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_P #define DEFAULT_BOOT_FILE "boot.img" #define DEFAULT_CORE_FILE "core.img" -void -grub_putchar (int c) -{ - putchar (c); -} - -int -grub_getkey (void) -{ - return -1; -} - -struct grub_handler_class grub_term_input_class; -struct grub_handler_class grub_term_output_class; - -void -grub_refresh (void) -{ - fflush (stdout); -} - static void setup (const char *dir, const char *boot_file, const char *core_file, @@ -423,7 +401,7 @@ unable_to_embed: /* Make sure that GRUB reads the identical image as the OS. */ tmp_img = xmalloc (core_size); core_path_dev_full = grub_util_get_path (dir, core_file); - core_path_dev = make_system_path_relative_to_its_root (core_path_dev_full); + core_path_dev = grub_make_system_path_relative_to_its_root (core_path_dev_full); free (core_path_dev_full); /* It is a Good Thing to sync two times. */ diff --git a/util/lvm.c b/util/lvm.c index 0a0916344..bb2c19fe3 100644 --- a/util/lvm.c +++ b/util/lvm.c @@ -19,7 +19,7 @@ /* We only support LVM on Linux. */ #ifdef __linux__ - +#include #include #include diff --git a/util/misc.c b/util/misc.c index f9d860d9a..a7d555092 100644 --- a/util/misc.c +++ b/util/misc.c @@ -38,11 +38,13 @@ #include #include #include +#include #include #include #include #include #include +#include #define ENABLE_RELOCATABLE 0 #include "progname.h" @@ -63,53 +65,6 @@ #include #endif -int verbosity = 0; - -void -grub_util_warn (const char *fmt, ...) -{ - va_list ap; - - fprintf (stderr, _("%s: warn:"), program_name); - fprintf (stderr, " "); - va_start (ap, fmt); - vfprintf (stderr, fmt, ap); - va_end (ap); - fprintf (stderr, ".\n"); - fflush (stderr); -} - -void -grub_util_info (const char *fmt, ...) -{ - if (verbosity > 0) - { - va_list ap; - - fprintf (stderr, _("%s: info:"), program_name); - fprintf (stderr, " "); - va_start (ap, fmt); - vfprintf (stderr, fmt, ap); - va_end (ap); - fprintf (stderr, ".\n"); - fflush (stderr); - } -} - -void -grub_util_error (const char *fmt, ...) -{ - va_list ap; - - fprintf (stderr, _("%s: error:"), program_name); - fprintf (stderr, " "); - va_start (ap, fmt); - vfprintf (stderr, fmt, ap); - va_end (ap); - fprintf (stderr, ".\n"); - exit (1); -} - #ifdef GRUB_UTIL int grub_err_printf (const char *fmt, ...) @@ -125,41 +80,6 @@ grub_err_printf (const char *fmt, ...) } #endif -void * -xmalloc (size_t size) -{ - void *p; - - p = malloc (size); - if (! p) - grub_util_error ("out of memory"); - - return p; -} - -void * -xrealloc (void *ptr, size_t size) -{ - ptr = realloc (ptr, size); - if (! ptr) - grub_util_error ("out of memory"); - - return ptr; -} - -char * -xstrdup (const char *str) -{ - size_t len; - char *newstr; - - len = strlen (str); - newstr = (char *) xmalloc (len + 1); - memcpy (newstr, str, len + 1); - - return newstr; -} - char * grub_util_get_path (const char *dir, const char *file) { @@ -268,6 +188,89 @@ grub_util_write_image (const char *img, size_t size, FILE *out) grub_util_error ("write failed"); } +char * +grub_script_execute_argument_to_string (struct grub_script_arg *arg __attribute__ ((unused))) +{ + return 0; +} + +grub_err_t +grub_script_execute_cmdline (struct grub_script_cmd *cmd __attribute__ ((unused))) +{ + return 0; +} + +grub_err_t +grub_script_execute_cmdblock (struct grub_script_cmd *cmd __attribute__ ((unused))) +{ + return 0; +} + +grub_err_t +grub_script_execute_cmdif (struct grub_script_cmd *cmd __attribute__ ((unused))) +{ + return 0; +} + +grub_err_t +grub_script_execute_cmdfor (struct grub_script_cmd *cmd __attribute__ ((unused))) +{ + return 0; +} + +grub_err_t +grub_script_execute_cmdwhile (struct grub_script_cmd *cmd __attribute__ ((unused))) +{ + return 0; +} + +grub_err_t +grub_script_execute_menuentry (struct grub_script_cmd *cmd __attribute__ ((unused))) +{ + return 0; +} + +grub_err_t +grub_script_execute (struct grub_script *script) +{ + if (script == 0 || script->cmd == 0) + return 0; + + return script->cmd->exec (script->cmd); +} + +void +grub_putchar (int c) +{ + putchar (c); +} + +int +grub_getkey (void) +{ + return -1; +} + +void +grub_refresh (void) +{ + fflush (stdout); +} + +int +grub_dl_ref (grub_dl_t mod) +{ + (void) mod; + return 0; +} + +int +grub_dl_unref (grub_dl_t mod) +{ + (void) mod; + return 0; +} + /* Some functions that we don't use. */ void grub_mm_init_region (void *addr __attribute__ ((unused)), @@ -275,64 +278,7 @@ grub_mm_init_region (void *addr __attribute__ ((unused)), { } -#if GRUB_NO_MODULES -void -grub_register_exported_symbols (void) -{ -} -#endif - -void -grub_exit (void) -{ - exit (1); -} - -grub_uint32_t -grub_get_rtc (void) -{ - struct timeval tv; - - gettimeofday (&tv, 0); - - return (tv.tv_sec * GRUB_TICKS_PER_SECOND - + (((tv.tv_sec % GRUB_TICKS_PER_SECOND) * 1000000 + tv.tv_usec) - * GRUB_TICKS_PER_SECOND / 1000000)); -} - -grub_uint64_t -grub_get_time_ms (void) -{ - struct timeval tv; - - gettimeofday (&tv, 0); - - return (tv.tv_sec * 1000 + tv.tv_usec / 1000); -} - -#ifdef __MINGW32__ - -void -grub_millisleep (grub_uint32_t ms) -{ - Sleep (ms); -} - -#else - -void -grub_millisleep (grub_uint32_t ms) -{ - struct timespec ts; - - ts.tv_sec = ms / 1000; - ts.tv_nsec = (ms % 1000) * 1000000; - nanosleep (&ts, NULL); -} - -#endif - -#if !(defined (__i386__) || defined (__x86_64__)) && GRUB_NO_MODULES +#if !(defined (__i386__) || defined (__x86_64__)) void grub_arch_sync_caches (void *address __attribute__ ((unused)), grub_size_t len __attribute__ ((unused))) @@ -340,19 +286,6 @@ grub_arch_sync_caches (void *address __attribute__ ((unused)), } #endif -#ifndef HAVE_VASPRINTF - -int -vasprintf (char **buf, const char *fmt, va_list ap) -{ - /* Should be large enough. */ - *buf = xmalloc (512); - - return vsprintf (*buf, fmt, ap); -} - -#endif - #ifndef HAVE_ASPRINTF int @@ -370,23 +303,6 @@ asprintf (char **buf, const char *fmt, ...) #endif -char * -xasprintf (const char *fmt, ...) -{ - va_list ap; - char *result; - - va_start (ap, fmt); - if (vasprintf (&result, fmt, ap) < 0) - { - if (errno == ENOMEM) - grub_util_error ("out of memory"); - return NULL; - } - - return result; -} - #ifdef __MINGW32__ void sync (void) @@ -482,104 +398,6 @@ get_win32_path (const char *path) } #endif -/* This function never prints trailing slashes (so that its output - can be appended a slash unconditionally). */ -char * -make_system_path_relative_to_its_root (const char *path) -{ - struct stat st; - char *p, *buf, *buf2, *buf3; - uintptr_t offset = 0; - dev_t num; - size_t len; - - /* canonicalize. */ - p = canonicalize_file_name (path); - - if (p == NULL) - grub_util_error ("failed to get canonical path of %s", path); - - len = strlen (p) + 1; - buf = xstrdup (p); - free (p); - - if (stat (buf, &st) < 0) - grub_util_error ("cannot stat %s: %s", buf, strerror (errno)); - - buf2 = xstrdup (buf); - num = st.st_dev; - - /* This loop sets offset to the number of chars of the root - directory we're inspecting. */ - while (1) - { - p = strrchr (buf, '/'); - if (p == NULL) - /* This should never happen. */ - grub_util_error ("FIXME: no / in buf. (make_system_path_relative_to_its_root)"); - if (p != buf) - *p = 0; - else - *++p = 0; - - if (stat (buf, &st) < 0) - grub_util_error ("cannot stat %s: %s", buf, strerror (errno)); - - /* buf is another filesystem; we found it. */ - if (st.st_dev != num) - { - /* offset == 0 means path given is the mount point. - This works around special-casing of "/" in Un*x. This function never - prints trailing slashes (so that its output can be appended a slash - unconditionally). Each slash in is considered a preceding slash, and - therefore the root directory is an empty string. */ - if (offset == 0) - { - free (buf); - free (buf2); - return xstrdup (""); - } - else - break; - } - - offset = p - buf; - /* offset == 1 means root directory. */ - if (offset == 1) - { - /* Include leading slash. */ - offset = 0; - break; - } - } - free (buf); - buf3 = xstrdup (buf2 + offset); - free (buf2); - -#ifdef __CYGWIN__ - if (st.st_dev != (DEV_CYGDRIVE_MAJOR << 16)) - { - /* Reached some mount point not below /cygdrive. - GRUB does not know Cygwin's emulated mounts, - convert to Win32 path. */ - grub_util_info ("Cygwin path = %s\n", buf3); - char * temp = get_win32_path (buf3); - free (buf3); - buf3 = temp; - } -#endif - - /* Remove trailing slashes, return empty string if root directory. */ - len = strlen (buf3); - while (len > 0 && buf3[len - 1] == '/') - { - buf3[len - 1] = '\0'; - len--; - } - - return buf3; -} - #ifdef GRUB_UTIL void grub_util_init_nls (void) diff --git a/util/raid.c b/util/raid.c index ec3ecd26e..edf865aa7 100644 --- a/util/raid.c +++ b/util/raid.c @@ -19,6 +19,7 @@ /* We only support RAID on Linux. */ #ifdef __linux__ +#include #include #include diff --git a/util/resolve.c b/util/resolve.c index 8b33beba0..7eadffd38 100644 --- a/util/resolve.c +++ b/util/resolve.c @@ -21,8 +21,9 @@ #include #include -#include +#include #include +#include /* Module. */ struct mod_list diff --git a/util/sparc64/ieee1275/grub-setup.c b/util/sparc64/ieee1275/grub-setup.c index 06bc16795..7051fd078 100644 --- a/util/sparc64/ieee1275/grub-setup.c +++ b/util/sparc64/ieee1275/grub-setup.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -29,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -37,8 +38,6 @@ #include #include -#include - #include #include #include @@ -46,7 +45,7 @@ #include #include #include -#include +#include #define _GNU_SOURCE 1 #include @@ -83,27 +82,6 @@ struct boot_blocklist grub_uint32_t len; } __attribute__ ((packed)); -void -grub_putchar (int c) -{ - putchar (c); -} - -int -grub_getkey (void) -{ - return -1; -} - -struct grub_handler_class grub_term_input_class; -struct grub_handler_class grub_term_output_class; - -void -grub_refresh (void) -{ - fflush (stdout); -} - static void setup (const char *prefix, const char *dir, const char *boot_file, const char *core_file, @@ -627,8 +605,8 @@ main (int argc, char *argv[]) find_dest_dev (&ginfo, argv); - ginfo.prefix = make_system_path_relative_to_its_root (ginfo.dir ? - : DEFAULT_DIRECTORY); + ginfo.prefix = grub_make_system_path_relative_to_its_root (ginfo.dir ? + : DEFAULT_DIRECTORY); check_root_dev (&ginfo);