]> code.delx.au - refind/commitdiff
Support for building with TianoCore UDK2014 in addition to UDK2010.
authorsrs5694 <srs5694@users.sourceforge.net>
Sun, 18 May 2014 19:42:20 +0000 (15:42 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Sun, 18 May 2014 19:42:20 +0000 (15:42 -0400)
15 files changed:
BUILDING.txt
EfiLib/BdsHelper.c
EfiLib/BdsTianoCore.c
EfiLib/BmLib.c
EfiLib/DevicePath.c
EfiLib/legacy.c
Make.tiano
NEWS.txt
filesystems/Make.tiano
filesystems/Makefile
gptsync/Make.tiano
libeg/screen.c
refind.inf
refind.spec
refind/Make.tiano

index 0ef9faed710288eca76161ae6beef5c9a18784c3..df00b427e9cc8f2b9366492654fb4e905e9127ce 100644 (file)
@@ -15,30 +15,22 @@ To compile rEFInd, you'll need the following:
 * One of the following:
 
   * The TianoCore EDK2 package
-    (http://sourceforge.net/projects/tianocore/). I've tested using the
-    UDK2010.SR1 and UDK2010.SR1.UP1 variants
-    (http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UDK2010),
-    which are "frozen," rather than the main EDK2 development branch, which
-    is changing as the developers add features, fix bugs, and so on. Using
-    TianoCore EDK2 is supported in rEFInd version 0.4.3 and later (0.4.0
-    and later for the filesystem drivers only). See below for TianoCore
-    setup instructions.
+    (http://sourceforge.net/projects/tianocore/). I initially used the
+    UDK2010 package and others in that series, but beginning with rEFInd
+    0.8.2, I've been using UDK2014
+    (http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UDK2014).
+    All of the UDK release are "frozen," rather than the main EDK2
+    development branch, which is changing as the developers add features,
+    fix bugs, and so on. See below for TianoCore setup instructions.
 
   * The GNU-EFI package (http://sourceforge.net/projects/gnu-efi/). You can
     install this from a package called "gnu-efi"; however, rEFInd relies on
-    features that were added in (I think) 3.0l to provide driver-loading
-    capabilities. The versions I've used and that work are 3.0p, 3.0q,
-    3.0r, 3.0s, and 3.0u, with a caveat: The new time-sensitive
-    default_selection feature causes rEFInd to hang when using 3.0s and
-    earlier. 3.0u works fine for this (tested with compilation on three
-    computers). I don't know if 3.0t would work. Through mid-to-late 2012,
-    most Linux distributions delivered rather elderly versions of GNU-EFI,
-    but many are catching up by late 2012. You should check your GNU-EFI
-    version number; you may need to download the latest source code,
-    compile it, and install it locally. Between rEFInd version 0.2.7 and
-    0.6.1, the Makefiles assumed a locally-compiled GNU-EFI package, but
-    older and more recent versions assume GNU-EFI installation in typical
-    locations for distribution-provided packages.
+    features that were added sometime between version 3.0s and 3.0u, so I
+    recommend using 3.0u (or conceivably later). You should check your
+    GNU-EFI version number; you may need to download the latest source
+    code, compile it, and install it locally. The Makefiles assume a
+    GNU-EFI package installed via a package manager. If you install from
+    source code, you may need to adjust those Makefiles' paths.
 
 Of the two toolkits, I prefer to use TianoCore because it produces binaries
 that are about 20-30KiB smaller than those made by GNU-EFI, and I can
@@ -47,7 +39,9 @@ had problems on a 32-bit Mac Mini with the drivers produced by GNU-EFI
 hanging the system if I try to load more than one of them. (I haven't
 encountered this problem on UEFI-based PCs.) That said, the TianoCore EDK2
 package is much harder to install, so you may prefer to use GNU-EFI unless
-you have a specific need for the TianoCore toolkit.
+you have a specific need for the TianoCore toolkit. Automated build tools
+like the OpenSUSE Build Service (OBS) and the Ubuntu Personal Package
+Archive (PPA) mechanism don't yet support TianoCore.
 
 It's possible to use a non-Linux platform to compile rEFInd. To the best of
 my knowledge, the rEFInd code doesn't rely on anything Linux-specific in
@@ -90,21 +84,21 @@ you MUST install the kit from source code using its own unusual compilation
 procedure. The installation documentation also omits at least one step and
 is a bit unclear about others. Here's how I installed the toolkit:
 
-1) Download UDK2010.SR1.UP1.P1 from
-   https://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UDK2010.
+1) Download UDK2014.SR1.UP1.P1 from
+   https://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UDK2014.
 
-2) Type "mkdir /usr/local/UDK2010". You can use another directory, but the
+2) Type "mkdir /usr/local/UDK2014". You can use another directory, but the
    Makefile for rEFInd's EFI drivers assumes this location. You'll need to
    edit the EDK2BASE line in the Make.tiano file if you install somewhere
    else.
 
-3) Type "cd /usr/local/UDK2010".
+3) Type "cd /usr/local/UDK2014".
 
-4) Unzip the downloaded file (UDK2010.SR1.UP1.P1.Complete.MyWorkSpace.zip)
-   in the current directory (/usr/local/UDK2010). This creates a handful of
+4) Unzip the downloaded file (UDK2014.SR1.UP1.P1.Complete.MyWorkSpace.zip)
+   in the current directory (/usr/local/UDK2014). This creates a handful of
    files, including a tarball and a couple of .zip files.
 
-5) Type "unzip UDK2010.SR1.UP1.MyWorkSpace.zip". This extracts the
+5) Type "unzip UDK2014.SR1.UP1.MyWorkSpace.zip". This extracts the
    platform-neutral portion of the development kit.
 
 6) Type "cd MyWorkSpace".
@@ -144,12 +138,15 @@ is a bit unclear about others. Here's how I installed the toolkit:
     to:
     *_GCC46_X64_ASM_FLAGS            = DEF(GCC46_ASM_FLAGS) -m64
 
-12) Type "make -C /usr/local/UDK2010/MyWorkSpace/BaseTools/Source/C".
+12) Type "make -C /usr/local/UDK2014/MyWorkSpace/BaseTools/Source/C".
     (This step is not documented on the EDK Web page.) Note that this
     requires the g++ compiler and UUID development libraries.
     
 13) Type "build" to build the main set of EDK2 files. This process is
-    likely to take a few minutes.
+    likely to take a few minutes. This step requires Python 2; if you have
+    Python 3 installed, you may need to adjust the default python for this
+    build (for instance, by typing "eselect python set python2.7" in
+    Gentoo).
 
 If you installed in a location other than the one I've specified, you must
 edit the EDK2BASE variable in the Make.tiano and filesystems/Make.tiano
@@ -203,13 +200,13 @@ to the various GNU-EFI include files and libraries. Since rEFInd 0.6.2, the
 default Make.common file includes the following definitions:
 
 EFIINC          = /usr/include/efi
-GNUEFILIB       = /usr/lib64
-EFILIB          = /usr/lib64
-EFICRT0         = /usr/lib64
+GNUEFILIB       = /usr/lib
+EFILIB          = /usr/lib
+EFICRT0         = /usr/lib
 
 If you've installed GNU-EFI from source code, you may need to add "local"
 to those paths, as in "/usr/local/include/efi". You might need to change
-references to "lib64" to "lib32" or "lib" on some systems. Recall that you
+references to "lib" to "lib32" or "lib64" on some systems. Recall that you
 need at least GNU-EFI version 3.0l to build rEFInd, and until very
 recently, most distributions provided out-of-date versions of this package.
 
index 563993a9171a9fb2ea990f223fc7e9bc7b785f5b..b4ece24b97bee1b16232e33a4c237c896d077b0c 100644 (file)
@@ -8,7 +8,7 @@
 #include "BdsHelper.h"
 #include "legacy.h"
 #include "../refind/screen.h"
-#include "refit_call_wrapper.h"
+#include "../include/refit_call_wrapper.h"
 
 EFI_GUID gEfiLegacyBootProtocolGuid     = { 0xdb9a1e3d, 0x45cb, 0x4abb, { 0x85, 0x3b, 0xe5, 0x38, 0x7f, 0xdb, 0x2e, 0x2d }};
 
index 7c7d214432847f7e34c50ca3cc52d92bd4736cac..271758d12ef933f68823b5ea4a5bf06c5e2e88c5 100644 (file)
@@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "BdsHelper.h"
 #include "gnuefi-helper.h"
 #endif
-#include "refit_call_wrapper.h"
+#include "../include/refit_call_wrapper.h"
 
 EFI_GUID EfiDevicePathProtocolGuid = { 0x09576E91, 0x6D3F, 0x11D2, { 0x8E, 0x39, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }};
 
index 4feddd50337fbc33e4275797b93461a6f137b27f..4e7ebaaee058bc822d363bbf628450a4037dd146 100644 (file)
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #else\r
 #include "gnuefi-helper.h"\r
 #endif\r
-#include "refit_call_wrapper.h"\r
+#include "../include/refit_call_wrapper.h"\r
 \r
 /**\r
 \r
index 75c666ee81bdb66a5e677c2a552b98bd18be1501..bfaf1c641eb213362ef993c37da30a28dda14ac8 100644 (file)
@@ -1159,7 +1159,7 @@ DevPathFvFilePath (
 \r
 **/\r
 VOID\r
-DevPathRelativeOffsetRange (\r
+MyDevPathRelativeOffsetRange (\r
   IN OUT POOL_PRINT       *Str,\r
   IN VOID                 *DevPath\r
   )\r
@@ -1459,7 +1459,7 @@ DEVICE_PATH_STRING_TABLE  DevPathTable[] = {
   {\r
     MEDIA_DEVICE_PATH,\r
     MEDIA_RELATIVE_OFFSET_RANGE_DP,\r
-    DevPathRelativeOffsetRange,\r
+    MyDevPathRelativeOffsetRange,\r
   },\r
   {\r
     BBS_DEVICE_PATH,\r
index 4541b31f6ec340270fee916780f2a4bbaa31a9ef..3e5edee4746903c1dae588ded1d3e22f19ca1e10 100644 (file)
@@ -23,7 +23,7 @@
 #define EfiReallocatePool ReallocatePool
 #define EfiLibLocateProtocol LibLocateProtocol
 #else
-#include "tiano_includes.h"
+#include "../include/tiano_includes.h"
 #endif
 #include "legacy.h"
 #include "GenericBdsLib.h"
index 5bfb158a04a6a7073d64d362923e6429a0e0844b..546df7302227b1d99e21b1c4b9ccf566cba08608 100644 (file)
@@ -29,8 +29,10 @@ ifeq ($(ARCH),x86_64)
   LD_CODE = elf_x86_64
 endif
 
-EDK2BASE = /usr/local/UDK2010/MyWorkSpace
+EDK2BASE = /usr/local/UDK2014/MyWorkSpace
 #EDK2BASE = /usr/local/EDK2/tianocore-edk2
+#ENTRYPOINT=_ModuleEntryPoint
+ENTRYPOINT=efi_main
 
 # Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, GCC46, or GCC47)
 include $(EDK2BASE)/Conf/target.txt
@@ -64,7 +66,7 @@ GENFW           = $(EDK2BASE)/BaseTools/Source/C/bin/GenFw
 LDSCRIPT = $(EDK2BASE)/BaseTools/Scripts/gcc4.4-ld-script
 
 LDFLAGS         = -nostdlib -n -q --gc-sections --script=$(EDK2BASE)/BaseTools/Scripts/gcc4.4-ld-script \
-                  --entry efi_main -u efi_main -m $(LD_CODE)
+                  --entry $(ENTRYPOINT) -u $(ENTRYPOINT) -m $(LD_CODE)
 
 %.obj: %.c
        $(CC) $(ARCH_C_FLAGS) $(CFLAGS) $(INCLUDE_DIRS) -DNO_BUILTIN_VA_FUNCS -D__MAKEWITH_TIANO -c $< -o $@
index 32b4428da56bcc0ca71aa8caec62f88c4bf7dc36..05ec22fd5ec6c278e9a2ae5ad94747f073412eb3 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,9 @@
 0.8.2 (5/??/2014):
 ------------------
 
+- I've updated my personal build system, and therefore the rEFInd Makefiles
+  and related files, to use TianoCore UDK2014 rather than UDK2010.
+
 - Added "deep_uefi_legacy_scan" token. When not set (the default), rEFInd
   does not modify EFI NVRAM settings when scanning for BIOS-mode boot
   loaders on UEFI-based (non-Mac) computers. Some computers require
index b9ad0a87aeb7e26d785482198433cff15d856e58..39cdfa54f16a64c1502aa3f7f6e7c735c7a4f864 100644 (file)
@@ -29,7 +29,7 @@ ifeq ($(ARCH),x86_64)
   LD_CODE = elf_x86_64
 endif
 
-EDK2BASE = /usr/local/UDK2010/MyWorkSpace
+EDK2BASE = /usr/local/UDK2014/MyWorkSpace
 #EDK2BASE = /usr/local/edk2
 
 # Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, or GCC46)
@@ -92,7 +92,7 @@ $(DLL_TARGET): $(OBJS) fsw_$(DRIVERNAME).obj
        $(LD) -o $(DRIVERNAME)_$(FILENAME_CODE).dll $(LDFLAGS) --start-group $(ALL_EFILIBS) $(OBJS) fsw_$(DRIVERNAME).obj --end-group
 
 $(BUILDME): $(DLL_TARGET)
-       $(OBJCOPY) --strip-unneeded $(DLL_TARGET)
+       $(OBJCOPY) --strip-unneeded -R .eh_frame $(DLL_TARGET)
        $(GENFW) -e UEFI_DRIVER -o $(BUILDME) $(DLL_TARGET)
 #      $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
 #                 -j .rela -j .reloc --rename-section .data=.hii --target=efi-bsdrv-$(ARCH) $< $@
index 4aa838e2c19aa63a396548be1ec8b3a14eba687c..74d03dae9a69e982f4393fad0aed96ec946a47e7 100644 (file)
@@ -16,6 +16,10 @@ TEXTFILES = $(FILESYSTEMS:=*.txt)
 
 all:   $(FILESYSTEMS)
 
+xfs:
+       rm -f fsw_efi.obj
+       +make DRIVERNAME=xfs -f Make.tiano
+
 ext2:
        rm -f fsw_efi.obj
        +make DRIVERNAME=ext2 -f Make.tiano
@@ -46,6 +50,10 @@ gnuefi: $(FILESYSTEMS_GNUEFI)
 
 all_gnuefi:    $(FILESYSTEMS_GNUEFI)
 
+xfs_gnuefi:
+       rm -f fsw_efi.o
+       +make DRIVERNAME=xfs -f Make.gnuefi
+
 ext2_gnuefi:
        rm -f fsw_efi.o
        +make DRIVERNAME=ext2 -f Make.gnuefi
index b6c46f2c7112984b0d3759fa13cd5bfdcba2f602..85823eea11250de949ad3191d669673f7f2c3812 100644 (file)
@@ -29,7 +29,7 @@ ifeq ($(ARCH),x86_64)
   LD_CODE = elf_x86_64
 endif
 
-EDK2BASE = /usr/local/UDK2010/MyWorkSpace
+EDK2BASE = /usr/local/UDK2014/MyWorkSpace
 #EDK2BASE = /usr/local/edk2
 
 # Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, or GCC46)
@@ -100,7 +100,7 @@ $(DLL_TARGET): $(OBJS)
        $(LD) -o gptsync_$(FILENAME_CODE).dll $(LDFLAGS) --start-group $(ALL_EFILIBS) $(OBJS) --end-group
 
 $(BUILDME): $(DLL_TARGET)
-       $(OBJCOPY) --strip-unneeded $(DLL_TARGET)
+       $(OBJCOPY) --strip-unneeded -R .eh_frame $(DLL_TARGET)
        $(GENFW) -e UEFI_APPLICATION -o $(BUILDME) $(DLL_TARGET)
 
 endif
index 9fa999bd15a671a8b921cdaacfe0541fd65ffaf2..cdf150655a0a02443e9192d97f6369585ff23609 100644 (file)
@@ -47,7 +47,7 @@
 #include "../refind/lib.h"
 #include "../include/refit_call_wrapper.h"
 #include "libeg.h"
-#include "Handle.h"
+#include "../include/Handle.h"
 
 #include <efiUgaDraw.h>
 #include <efiConsoleControl.h>
index d98b25a50dd3980bcac2da97bde17f12cd61e971..1b3f8976d8ddd856c03189b0631ba7d262d7b8aa 100644 (file)
@@ -1,9 +1,9 @@
 ## @file\r
 #\r
-# refind.inf file to build rEFInd using the EDK2/UDK2010 development\r
+# refind.inf file to build rEFInd using the EDK2/UDK2010/UDK2014 development\r
 # kit.\r
 #\r
-# Copyright (c) 2012 by Roderick W. Smith\r
+# Copyright (c) 2012-2014 by Roderick W. Smith\r
 # Released under the terms of the GPLv3, a copy of which should come\r
 # with this file.\r
 #\r
@@ -32,7 +32,7 @@
   EfiLib/BdsConnect.c #included into GenericBdsLib\r
   EfiLib/BdsHelper.c\r
   EfiLib/BdsTianoCore.c\r
-  EfiLib/Console.c\r
+  EfiLib/legacy.c\r
   mok/mok.c\r
   mok/guid.c\r
   mok/security_policy.c\r
@@ -44,6 +44,8 @@
   refind/menu.c\r
   refind/screen.c\r
   refind/driver_support.c\r
+  refind/gpt.c\r
+  refind/crc32.c\r
   libeg/image.c\r
   libeg/load_bmp.c\r
   libeg/load_icns.c\r
index 3ab1ee5d9a0056c26b303af38dd1b6da5f8c84ad..3bf7d80a07b7115413a237f90218b0ba783c8219 100644 (file)
@@ -49,7 +49,7 @@ when paired with Linux kernels that provide EFI stub support.
 %setup -q
 
 %build
-if [[ -d /usr/local/UDK2010 ]] ; then
+if [[ -d /usr/local/UDK2014 ]] ; then
    make
    make fs
 else
index d9bb1873d9c23a2b59c43aee48f50dbb566afb10..6b1a8900e7983999991f6ad95ed8e2fbdfc740ea 100644 (file)
@@ -26,6 +26,7 @@ ALL_EFILIBS     = $(EFILIB)/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevel
                   $(EFILIB)/DxeHobLib/DxeHobLib/OUTPUT/DxeHobLib.lib \
                   $(EFILIB)/BaseIoLibIntrinsic/BaseIoLibIntrinsic/OUTPUT/BaseIoLibIntrinsic.lib \
                   $(EFILIB)/BasePeCoffLib/BasePeCoffLib/OUTPUT/BasePeCoffLib.lib
+#                $(EFILIB)/BasePerformanceLibNull/BasePerformanceLibNull/OUTPUT/BasePerformanceLibNull.lib \
 #                /usr/local/UDK2010/MyWorkSpace/Build/Mde/RELEASE_GCC46/X64/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu/OUTPUT/SecPeiDxeTimerLibCpu.lib \
 #                /usr/local/UDK2010/MyWorkSpace/Build/MdeModule/RELEASE_GCC46/X64/MdeModulePkg/Core/Dxe/DxeMain/OUTPUT/DxeCore.lib \
 #                /usr/local/UDK2010/MyWorkSpace/Build/Mde/RELEASE_GCC46/X64/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib/OUTPUT/BaseCacheMaintenanceLib.lib \
@@ -46,7 +47,7 @@ $(DLL_TARGET)_$(FILENAME_CODE).dll: $(OBJS) ../libeg/libeg.lib ../EfiLib/EfiLib.
        $(LD) -o $(DLL_TARGET)_$(FILENAME_CODE).dll $(LDFLAGS) --start-group $(ALL_EFILIBS) $(OBJS) ../libeg/libeg.lib ../EfiLib/EfiLib.lib ../mok/mok.lib --end-group
 
 $(BUILDME): $(DLL_TARGET)_$(FILENAME_CODE).dll
-       $(OBJCOPY) --strip-unneeded $(DLL_TARGET)_$(FILENAME_CODE).dll
+       $(OBJCOPY) --strip-unneeded -R .eh_frame $(DLL_TARGET)_$(FILENAME_CODE).dll
        $(GENFW) -e UEFI_APPLICATION -o $(BUILDME)_$(FILENAME_CODE).efi $(DLL_TARGET)_$(FILENAME_CODE).dll
 
 clean: