]> code.delx.au - refind/commitdiff
Fix drivers to work on Macs.
authorsrs5694 <srs5694@users.sourceforge.net>
Fri, 15 Jun 2012 23:28:47 +0000 (19:28 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Fri, 15 Jun 2012 23:28:47 +0000 (19:28 -0400)
BUILDING.txt
NEWS.txt
docs/refind/getting.html
docs/refind/todo.html
filesystems/AutoGen.c
filesystems/Make.common
filesystems/VBoxFswParam.h
filesystems/fsw_core.h
filesystems/fsw_efi.c
refind/main.c

index 04aba2e821912bd03d8d1e490a8bf3d3c2ed1bb8..81404819ae721f8aba3a41b130887bbc2f63eead 100644 (file)
@@ -216,13 +216,22 @@ unclear about others. Here's how I installed the toolkit:
    - TARGET = RELEASE (DEBUG might work, but I've not tested it).
    - TARGET_ARCH = X64 (on x86-64; leave this as IA32 on x86)
    - TOOL_CHAIN_TAG = GCC45 (or other value depending on your GCC version;
-     type "gcc -v" to learn your GCC version number)
+     type "gcc -v" to learn your GCC version number). Note that GCC 4.7
+     doesn't have its own entry, so use GCC46 for GCC 4.7.
    The Makefile for the drivers reads some of these variables from this
    file and uses them when accessing directories, so be sure to type these
-   entries in the case specified. Note that the documentation refers to
-   editing Conf/tools_def.txt in addition to Conf/target.txt, but doesn't
-   specify what to change in Conf/tools_def.txt. I haven't found it
-   necessary to make any changes in Conf/tools_def.txt.
+   entries in the case specified.
+
+10) The documentation refers to editing Conf/tools_def.txt in addition to
+    Conf/target.txt, but doesn't specify what to change in
+    Conf/tools_def.txt. I haven't found it necessary to make any changes in
+    Conf/tools_def.txt EXCEPT when using GCC 4.7 on a Fedora 17 system.
+    (I haven't used GCC 4.7 on other platforms, so this may well be
+    necessary on other systems, too.) With that setup, I found it
+    necessary to change the following line:
+    *_GCC46_X64_ASM_FLAGS            = DEF(GCC46_ASM_FLAGS) -m64 -melf_x86_64
+    to:
+    *_GCC46_X64_ASM_FLAGS            = DEF(GCC46_ASM_FLAGS) -m64
 
 11) Type "make -C /usr/local/UDK2010/MyWorkSpace/BaseTools/Source/C".
     (This step is not documented on the EDK Web page.)
index a5024ebe4716ff4dae0205ddfab9ba516bf83cb3..b9ac7a7a8ad9ba8f2dca749470252a4b1caf43e3 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,8 @@
+0.4.3 (?/??/2012):
+------------------
+
+- Filesystem drivers now work on EFI 1.x systems, such as Macs.
+
 0.4.2 (6/3/2012):
 -----------------
 
index 8f87dcbb4a9776fc4bf117f1bb903452df4ecdd1..670eb94861edd792abb7c670fef908c8aaeb4c50 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-6/3/2012, referencing rEFInd 0.4.2</p>
+6/7/2012, referencing rEFInd 0.4.2</p>
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
 
@@ -150,7 +150,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <h2>Getting rEFInd from Your OS's Repositories</h2>
 
-<p>If you use Arch Linux, you can obtain rEFInd from its repositories, in both <a href="https://aur.archlinux.org/packages.php?ID=57632">stable</a> and <a href="https://aur.archlinux.org/packages.php?ID=57966">git (experimental)</a> releases. The git release is likely to include pre-release bug fixes and new features, but those features may be poorly tested or undocumented.</p>
+<p>If you use Arch Linux, you can obtain rEFInd from its repositories, in both <a href="http://www.archlinux.org/packages/extra/any/refind-efi-x86_64/">stable</a> and <a href="https://aur.archlinux.org/packages.php?ID=59810">git (experimental)</a> releases. The git release is likely to include pre-release bug fixes and new features, but those features may be poorly tested or undocumented.</p>
 
 <p>You can also obtain rEFInd from the <a href="http://nixos.org/nixpkgs/">Nix Packages collection,</a> which creates packages for a number of OSes using its own packaging system.</p>
 
index 5fe91147f51002d09eb9dadbe1f1a165fa612af3..763d699d28276e6f08b702553f068484156baf94 100644 (file)
@@ -293,20 +293,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
     <ul>
 
-    <li>The drivers I've built fail to load on a 32-bit Mac Mini; I get an
-       "incompatible version" error message at an EFI shell, or an error
-       code of 80000019 when rEFInd tries to load them. (These two
-       messages are equivalent.) I suspect the problem is related to the
-       EFI version 1.<i>x</i> used on the Mac, as opposed to UEFI
-       2.<i>x</i> used on PCs. I'm looking into the problem. In the
-       meantime, if you have this problem, I recommend tracking down
-       equivalent drivers from other sources. (See the <a
-       href="drivers.html">drivers page</a> for some pointers.) I'd
-       appreciate <a href="mailto:rodsmith@rodsbooks.com">hearing from
-       you</a> if you have problems along these lines. Please tell me what
-       type of computer you're using, and especially the firmware version
-       data (from rEFInd's "about" screen). This may help me narrow down
-       the cause.</li>
+    <li>The 32-bit versions of the drivers return filesystem labels that
+       omit the first two characters of the name. If the name is shorter
+       than two characters, the driver may return the wrong volume's
+       label. The 64-bit builds seem to be unaffected by this bug.</li>
 
     <li>Drivers for additional filesystems are required. Given the recent
        shift to ext4fs, that should be the priority; however, other Linux
index cc01832eed2ac0850cfa7ea10f35aad10a61f241..894b43898450254aacae20dd00e452ae0f31c99b 100644 (file)
@@ -193,7 +193,8 @@ ProcessLibraryDestructorList (
 
 }
 
-const UINT32 _gUefiDriverRevision = 0x00020000U;
+//const UINT32 _gUefiDriverRevision = 0x00020000U;
+const UINT32 _gUefiDriverRevision = 0x00010000U;
 const UINT32 _gDxeRevision = 0x00000000U;
 
 
index 13011507532fd35868b613e48ad2dc7edcbfc94c..1c5872b6da309936afd0428b54abacd118f43d82 100644 (file)
@@ -46,7 +46,9 @@ ALL_EFILIBS     = $(EFILIB)/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevel
 
 INCLUDE_DIRS    = -I $(EDK2BASE)/MdePkg \
                   -I $(EDK2BASE)/MdePkg/Include \
-                  -I $(EDK2BASE)/MdePkg/Include/$(ARCHDIR)
+                  -I $(EDK2BASE)/MdePkg/Include/$(ARCHDIR) \
+                 -I $(EDK2BASE)/EdkCompatibilityPkg/Foundation/Framework/Include \
+                 -I $(EDK2BASE)/EdkCompatibilityPkg/Foundation/Library/Dxe/Include
 
 FSW_NAMES       = fsw_efi fsw_core fsw_efi_lib fsw_lib AutoGen
 OBJS            = $(FSW_NAMES:=.o)
index 0f20c9ef50def679469c9661b99ebd8e6b9c3002..0c44f8904097b2acce27a635df086eb8b596df94 100644 (file)
 # define DivU64x32(x,y,z) DivU64x32((x),(y))
 
 
-INTN CompareGuidEdk1(
-  IN EFI_GUID     *Guid1,
-  IN EFI_GUID     *Guid2
-                     );
+// INTN CompareGuidEdk1(
+//   IN EFI_GUID     *Guid1,
+//   IN EFI_GUID     *Guid2
+//                      );
 
 //#define CompareGuid(x, y) CompareGuidEdk1((x),(y))
 # define HOST_EFI 1
index 284913c056ead112e5673538570850f9d8f86ce3..4464cbd80545c24978d4fd50fb21232d2b40da38 100644 (file)
@@ -478,7 +478,6 @@ fsw_u16      fsw_to_lower(fsw_u16 ch);
 
 /*@}*/
 
-
 /**
  * \name Posix Mode Macros
  * These macros can be used globally to test fields and bits in
index a364a2d4ab00c36337e011fbd09b07c51c0d340f..7c4ea0faf012fabc893ed5789a074006f1d497ef 100644 (file)
@@ -50,6 +50,9 @@
  */
 
 #include "fsw_efi.h"
+#include "fsw_core.h"
+//#include <EfiCommonLib.h>
+//#include <EfiDriverLib.h>
 
 #define DEBUG_LEVEL 0
 
@@ -77,7 +80,7 @@
 /** Helper macro for stringification. */
 #define FSW_EFI_STRINGIFY(x) #x
 /** Expands to the EFI driver name given the file system type name. */
-#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.4.1 " FSW_EFI_STRINGIFY(t) L" File System Driver"
+#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.4.2 " FSW_EFI_STRINGIFY(t) L" File System Driver"
 
 // function prototypes
 
index 298a6d2ddc98d11b62f90f0eff93489e1e2398c8..312b12631bc23040e2057b5724e76b2f61a09bb0 100644 (file)
@@ -156,8 +156,6 @@ static EFI_STATUS StartEFIImageList(IN EFI_DEVICE_PATH **DevicePaths,
     // load the image into memory
     ReturnStatus = Status = EFI_NOT_FOUND;  // in case the list is empty
     for (DevicePathIndex = 0; DevicePaths[DevicePathIndex] != NULL; DevicePathIndex++) {
-//        Print(L"About to try loading '%s' from '%s'\n", ImageTitle, DevicePathToStr(DevicePaths[DevicePathIndex]));
-//        PauseForKey();
         ReturnStatus = Status = refit_call6_wrapper(BS->LoadImage, FALSE, SelfImageHandle, DevicePaths[DevicePathIndex], NULL, 0, &ChildImageHandle);
         if (ReturnStatus != EFI_NOT_FOUND)
             break;