I'm trying to build rEFInd using EDK2 based on Windows x64 installation, but I've got a lot of problems. Does anyone built rEFInd on Windows installation? Need I to modificate refind.inf file?
Thanks in advance, ane help would be appreciated.
Michał Ciesielski
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've never attempted a Windows build of rEFInd. In fact, I've never built it under anything but Linux. You might check this site, which describes building rEFInd under OS X:
In theory, the process should be similar under Windows.
You might also post details about your problems. Note that the first error you see is usually the most important one; subsequent error messages sometimes go away when you fix the first compilation problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Then edit conf\target.txt and change:
ACTIVE_PLATFORM = RefindPkg/RefindPkg.dsc
TARGET = DEBUG
TARGET_ARCH = X64 (or IA32)
TOOL_CHAIN_TAG = VS2010x86 (or whatever you are using)
Then edit conf\tools_def.txt and change:
DEFINE WINSDK_VERSION = v7.1 (or whatever you are using)
Then edit RefindPkg\refind.inf
And add the following to the [BuildOptions...] sections. MSFT:*_*_*_CC_FLAGS = /D__MAKEWITH_TIANO
Then you can run "build" to use the standard UDK build process. But once you do that you'll have to fix the 100+ syntax errors in the source code. Microsoft's compiler is a lot more stricter than gcc. There are missing typecasts, bad use of #pragma, and other invalid initializers that need to be fixed.
Enjoy!
Last edit: Peter Quiring 2014-07-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm glad to hear you got it to compile. If you care to submit a patch with the changes you needed, I'll consider making them to the standard rEFInd distribution, with the caveat that those patches not interfere with compiling rEFInd using GCC or GNU-EFI.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm trying to build rEFInd using EDK2 based on Windows x64 installation, but I've got a lot of problems. Does anyone built rEFInd on Windows installation? Need I to modificate refind.inf file?
Thanks in advance, ane help would be appreciated.
Michał Ciesielski
I've never attempted a Windows build of rEFInd. In fact, I've never built it under anything but Linux. You might check this site, which describes building rEFInd under OS X:
https://github.com/snarez/refind-edk2
In theory, the process should be similar under Windows.
You might also post details about your problems. Note that the first error you see is usually the most important one; subsequent error messages sometimes go away when you fix the first compilation problem.
I've got it to compile under Windows.
Place the refind-0.8.3 folder in the UDK MyWorkSpace folder and rename it to RefindPkg.
In my setup I use Windows SDK 7 (make sure to install the VC compiler SP1 or the build fails)
Add this file to the RefindPkg folder and name it RefindPkg.dsc
[Defines]
PLATFORM_NAME = RefindPkg
PLATFORM_GUID = 1390FDD3-350D-4934-8428-EA02078CE4C8
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/Refind
SUPPORTED_ARCHITECTURES = IA32|X64
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
[LibraryClasses]
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
[Components]
RefindPkg/refind.inf
Then edit conf\target.txt and change:
ACTIVE_PLATFORM = RefindPkg/RefindPkg.dsc
TARGET = DEBUG
TARGET_ARCH = X64 (or IA32)
TOOL_CHAIN_TAG = VS2010x86 (or whatever you are using)
Then edit conf\tools_def.txt and change:
DEFINE WINSDK_VERSION = v7.1 (or whatever you are using)
Then edit RefindPkg\refind.inf
And add the following to the [BuildOptions...] sections.
MSFT:*_*_*_CC_FLAGS = /D__MAKEWITH_TIANO
Then you can run "build" to use the standard UDK build process. But once you do that you'll have to fix the 100+ syntax errors in the source code. Microsoft's compiler is a lot more stricter than gcc. There are missing typecasts, bad use of #pragma, and other invalid initializers that need to be fixed.
Enjoy!
Last edit: Peter Quiring 2014-07-22
I'm glad to hear you got it to compile. If you care to submit a patch with the changes you needed, I'll consider making them to the standard rEFInd distribution, with the caveat that those patches not interfere with compiling rEFInd using GCC or GNU-EFI.