]> code.delx.au - refind/commitdiff
Version 0.4.0 release.
authorsrs5694 <srs5694@users.sourceforge.net>
Mon, 21 May 2012 02:37:37 +0000 (22:37 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Mon, 21 May 2012 02:37:37 +0000 (22:37 -0400)
29 files changed:
BUILDING.txt
CREDITS.txt
NEWS.txt
docs/refind/bootmode.html
docs/refind/configfile.html
docs/refind/drivers.html
docs/refind/features.html
docs/refind/getting.html
docs/refind/index.html
docs/refind/installing.html
docs/refind/linux.html
docs/refind/revisions.html
docs/refind/themes.html
docs/refind/todo.html
docs/refind/using.html
filesystems/Make.common
filesystems/Makefile
filesystems/fsw_efi.c
filesystems/test/.svn/all-wcprops [deleted file]
filesystems/test/.svn/entries [deleted file]
filesystems/test/.svn/text-base/README.svn-base [deleted file]
filesystems/test/.svn/text-base/fsw_posix.c.svn-base [deleted file]
filesystems/test/.svn/text-base/fsw_posix.h.svn-base [deleted file]
filesystems/test/.svn/text-base/fsw_posix_base.h.svn-base [deleted file]
filesystems/test/.svn/text-base/lslr.c.svn-base [deleted file]
filesystems/test/.svn/text-base/lsroot.c.svn-base [deleted file]
mkcdimage
mkdistrib
refind/main.c

index 924ee8e79b030e9a3d4de56c6bebaa1c26f3504e..7d5fbd2dab54a5b4806b0e1ba4ab50eff8843197 100644 (file)
@@ -165,21 +165,22 @@ The EFI filesystem drivers in the filesystems subdirectory require the
 TianoCore UDK2010.SR1 toolkit. The drivers might compile with another
 version of the TianoCore toolkit, but I've not tested them with anything
 else. (My attempts to use GNU-EFI have failed; at best, I've gotten drivers
-that load but hang the system.)
+that load but hang the computer.)
 
 Unfortunately, the TianoCore toolkit is bulky and weird by Linux
 programming standards. I don't know of any Linux distribution packages for
 it in RPM, Debian package file, or other format; you MUST install the kit
 from source code using its own unusual compilation procedure. The
-installation documentation also omits a few steps. Here's how I installed
-the toolkit:
+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 from
    https://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UDK2010.
 
 2) Type "mkdir /usr/local/UDK2010". 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 Makefile if you install somewhere else.
+   edit the EDK2BASE line in the Make.common file if you install somewhere
+   else.
 
 3) Type "cd /usr/local/UDK2010".
 
@@ -211,7 +212,10 @@ the toolkit:
      type "gcc -v" to learn your GCC version number)
    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.
+   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.
 
 11) Type "make -C /usr/local/UDK2010/MyWorkSpace/BaseTools/Source/C".
     (This step is not documented on the EDK Web page.)
@@ -221,11 +225,25 @@ the toolkit:
 
 Once the toolkit is installed, you can build the filesystem drivers. If you
 installed in a location other than the one I've specified, you must edit
-the Makefile's EDK2BASE variable. You can then type "make" to build all the
-drivers, or specify a filesystem type to build just it.
+the EDK2BASE variable in the filesystems/Make.common file in the rEFInd
+source package.. You can then type "make" in the "filesystems" directory,
+or "make fs" in the main source directory, to build all the drivers. If you
+want to build just one driver, you can change into the "filesystems"
+directory and type "make {fsname}", where {fsname} is a filesystem name --
+"ext2", "reiserfs", "iso9660", or "hfs". The drivers will appear in the
+"filesystems" directory, and also be copied to the "drivers" directory.
+
+To install drivers, you can type "make install" in the "filesystems"
+directory. This copies all the drivers to the
+"/boot/efi/EFI/refind/drivers" directory. Alternatively, you can copy the
+files you want manually.
+
+*CAUTION:* Install drivers for your system's architecture *ONLY*.
+Installing drivers for the wrong architecture causes some systems to hang
+at boot time.
 
 The drivers all rely on filesystem wrapper code created by rEFIt's author,
 Christoph Phisterer. Most of the drivers seem to have passed through
 Oracle's VirtualBox project ((https://www.virtualbox.org) and the Clover
-boot loader project (https://sourceforge.net/projects/cloverefiboot/). Most
-of the drivers are based on code from the Linux kernel.
+boot loader project (https://sourceforge.net/projects/cloverefiboot/),
+which I used as the source for this build.
index ad7f478d8fcf3620331bf103bba40916278639c3..b3e85afed7f7db0a7bbbf2f831687b4eb0d80adf 100644 (file)
@@ -20,8 +20,8 @@ I've incorporated into the current version. Specifically:
   wrapper created by Christoph Phisterer. They then passed through Oracle's
   VirtualBox (https://www.virtualbox.org) and the Clover boot loader
   project (https://sourceforge.net/projects/cloverefiboot/). The
-  filesystem-specific code comes from various sources, including Apple and
-  the Linux kernel.
+  filesystem-specific code comes from various sources, including Apple,
+  the Linux kernel, and Christoph Phisterer.
 
 * I replaced many of the original rEFIt icons with icons taken from the
   Oxygen Icons project, either from the Oxygen Refit package on its page
index 84e1371cbbb0e34ed035cfdaf3eaac5e548be998..82cd1be4a0893266491e6208695625988dc6c2e8 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,18 @@
-0.3.6 (?/??/2012):
+0.3.6 (5/20/2012):
 ------------------
 
+- Inclusion of drivers for ISO-9660, HFS+, ReiserFS, and ext2fs. Most of
+  these drivers originated with rEFIt, although the HFS+ driver seems to
+  have come from Oracle's VirtualBox, with some files from Apple. I hadn't
+  included these drivers previously because the build process proved
+  challenging. As it is, they don't work on my Mac Mini, I suspect because
+  the build process with the UDK2010 development kit may not work with the
+  EFI 1.x that Apple uses.
+
+- Addition of support for drivers in the "drivers_{arch}" subdirectory of
+  the main rEFInd binary directory (e.g., "drivers_x64" or "drivers_ia32").
+  Drivers may continue to be placed in the "drivers" subdirectory.
+
 - Added new feature to eject CDs (and other removable media): Press F12 to
   eject all such media. This function works only on some Macs, though (it
   relies on an Apple-specific EFI extension, and this extension isn't even
index 7ddb3da1ca59cce7ae32b6277e0e903559ec9591..7082ca8596a1420c011b6031b6b5cd887e004a66 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>\r
 \r
 <p>Originally written: 3/14/2012; last Web page update:\r
-5/15/2012, referencing rEFInd 0.3.5</p>\r
+5/20/2012, referencing rEFInd 0.4.0</p>\r
 \r
 \r
 <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>\r
index 994a70c6a8b35f2be508bde0a59f21e4abdddbc3..ca6b444ee2ed947afe063adaf1a940889b816c6a 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:
-5/15/2012, referencing rEFInd 0.3.5</p>
+5/20/2012, referencing rEFInd 0.4.0</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>
index a4447a0996c97ad821b22ea6f9dd4ecbce6281ad..579ddac56169cb0f6877283c508257761d1798eb 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 4/19/2012; last Web page update:
-5/15/2012, referencing rEFInd 0.3.5</p>
+5/20/2012, referencing rEFInd 0.4.0</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>
@@ -90,7 +90,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <hr />
 
-<p>Beginning with version 0.2.7, rEFInd has been able to load EFI drivers. Although EFI implementations should be able to do this prior to rEFInd's launch, in my experience, most EFI implementations offer such poor control over EFI driver loading that they can't be counted on to do this. Thus, if you want to use EFI drivers, rEFInd's ability to do so can be useful. This page tells you why you might want to use drivers, where you can go to find them, and provides tips on a few specific drivers.</p>
+<p>Beginning with version 0.2.7, rEFInd has been able to load EFI drivers, and as of version 0.4.0, it has shipped with some EFI filesystem drivers. Although EFI implementations should be able to load drivers prior to rEFInd's launch, in my experience, most EFI implementations offer such poor control over EFI driver loading that they can't be counted on to do this. Thus, if you want to use EFI drivers, rEFInd's ability to do so can be useful. This page tells you why you might want to use drivers, how you can install and use rEFInd's own drivers, where you can go to find other drivers, and provides tips on a few specific drivers.</p>
 
 <h2>Why Should You Use EFI Drivers?</h2>
 
@@ -112,43 +112,95 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>To the best of my knowledge, the best reason to want EFI driver support in rEFInd is to provide access to filesystems. Although EFI filesystem driver choices are currently limited, those that are available can help to improve your installation and configuration options, particularly if you've found yourself "boxed in" by awkward installation or bugs, such as the dinky ESP that Ubuntu creates by default or the bug that prevents a Linux kernel with <a href="efistub.html">EFI stub loader support</a> from booting from the ESP of at least some Macs.</p>
 
-<p>As a side note, using an ISO-9660 driver can theoretically help you keep the size of a custom Linux boot CD/DVD down to a reasonable value. This is because EFI systems normally boot from optical discs by reading a FAT image file in El Torito format and treating that file as an ESP. If you need to store the kernel both in that file and directly in the ISO-9660 filesystem (to maintain bootability on BIOS systems), that can represent an unwanted extra space requirement. Placing rEFInd and an ISO-9660 driver in the FAT image file should enable you to store the kernel on the disc only once. Unfortunately, my attempts to get this to work have failed to date. When the ISO-9660 driver is loaded from the El Torito image, my test systems seem to allow only one of the two filesystems (the El Torito image's FAT filesystem or the optical disc's ISO-9660 filesystem) to be active; load one and the other goes away. Also, some EFI implementations include ISO-9660 drivers, so you might not need a separate ISO-9660 driver if you're building a disc for a particular computer.</p>
+<p>As a side note, using an ISO-9660 driver can theoretically help you keep the size of a custom Linux boot CD/DVD down to a reasonable value. This is because EFI systems normally boot from optical discs by reading a FAT image file in El Torito format and treating that file as an ESP. If you need to store the kernel both in that file and directly in the ISO-9660 filesystem (to maintain bootability on BIOS systems), that can represent an unwanted extra space requirement. Placing rEFInd and an ISO-9660 driver in the FAT image file should enable you to store the kernel on the disc only once. Unfortunately, this doesn't work in practice. When the ISO-9660 driver is loaded from the El Torito image, the driver discovers that the optical disc is in use and refuses to access it. It's possible to use EFI shell commands to give the ISO-9660 driver access to the shell device, but this causes the El Torito access to go away, which means that anything loaded from the El Torito image (such as rEFInd) is likely to malfunction. Also, some EFI implementations include ISO-9660 drivers, so you might not need a separate ISO-9660 driver if you're building a disc for a particular computer.</p>
 
-<h2>Finding and Installing EFI Drivers</h2>
+<h2>Using rEFInd's EFI Drivers</h2>
 
-<p>As already noted, I know of no EFI drivers for EFI hardware, aside from those that are built into motherboards' EFI implementations. I do, however, know of a few EFI filesystem drivers:</p>
+<p class="sidebar"><b>Note:</b> rEFInd's drivers don't work on my 32-bit Mac Mini, but the 32-bit builds do work under VirtualBox. On my Mac, I get an "incompatible version" error when loading them at a shell, or an error code of 80000019 when rEFInd attempts to auto-load them. I'm looking into this problem. In the meantime, if you can't load rEFInd's drivers, I recommend you use drivers from another source, as described shortly.</p>
+
+<p>Since version 0.4.0, rEFInd has shipped with a small collection of read-only EFI filesystem drivers. These are:</p>
+
+<ul>
+
+<li><b>ReiserFS</b>&mdash;This driver originated with rEFIt. It's useful
+    for reading Linux kernels from a separate <tt>/boot</tt> partition, or
+    even from a root (<tt>/</tt>) filesystem, if you use ReiserFS on
+    it.</li>
+
+<li><b>Ext2fs</b>&mdash;This driver also originated with rEFIt. It can be
+    used in the same way as the ReiserFS driver. Although it's called an
+    "ext2fs" driver, it also works with ext3fs.</li>
+
+<li><b>ISO-9660</b>&mdash;This driver originated with rEFIt's author, but
+    he never released a final version. Its code was improved by Oracle for
+    use in its VirtualBox product, and then further modified by the authors
+    of the <a
+    href="https://sourceforge.net/projects/cloverefiboot/">Clover</a> boot
+    loader. If your firmware doesn't provide its own ISO-9660 driver, this
+    one can be helpful; however, you may need to install it on your hard
+    disk before you can read an optical disc.</li>
+
+<li><b>HFS+</b>&mdash;Oracle seems to have written this driver, apparently
+    with some code taken from open source Apple examples. It was then
+    further modified by the Clover authors. I expect this driver to have
+    limited appeal most rEFInd users. Macs don't need it, since Apple's EFI
+    implementation provides its own HFS+ driver, and HFS+ isn't normally
+    used on UEFI-based PCs. Some CDs are mastered with both ISO-9660 and
+    HFS+, or even with HFS+ alone, and it's conceivable that an HFS+ driver
+    would be useful when accessing such discs. I'm providing the driver
+    mainly because it compiled cleanly with no extra work, aside from
+    providing a Makefile entry for it.</li>
+
+</ul>
+
+<p>All of these drivers rely on filesystem wrapper code written by rEFIt's author, Christoph Phisterer. They all suffer from speed problems on some systems, as described later in <a href="#notes">"Notes on Specific Drivers;"</a> however, these problems are very minor on most systems.</p>
+
+<p class="sidebar"><b>Note:</b> rEFInd's <tt>install.sh</tt> script does not currently install drivers; however, if you installed manually, you may have already installed rEFInd's drivers. See the <a href="installing.html">Installing rEFInd</a> page for details.</p>
+
+<p>If you want to use one or more of these drivers, you can install them from the rEFInd binary package from the <tt>refind/drivers_<tt class="variable">arch</tt></tt> directory, where <tt class="variable">arch</tt> is a CPU architecture code&mdash;<tt>x64</tt> or <tt>ia32</tt>. The files are named after the filesystems they handle, such as <tt>ext2_x64.efi</tt> for the 64-bit ext2fs driver. You should copy the files for the filesystems you want to use to the <tt>drivers</tt> or <tt>drivers_<tt class="variable">arch</tt></tt> subdirectory of the main rEFInd installation directory. (You may need to create this subdirectory.) Be careful to install drivers only for your own architecture. Attempting to load drivers for the wrong CPU type will cause a small delay at best, or may cause the computer to crash at worst. I've placed rEFInd's drivers in directories that are named to minimize this risk, but you should exercise care when copying driver files.</p>
+
+<p class="sidebar"><b>Warning:</b> <i>Do not</i> place EFI program files in your driver directories! Unfortunately, EFI uses the same <tt>.efi</tt> filename extension to identify both EFI program files and EFI drivers. Therefore, rEFInd can't distinguish between the two prior to loading them, and if you place program files in a drivers directory, rEFInd will run the EFI program file when it does its driver scan.</p>
+
+<p>When you reboot after installing drivers, rEFInd should automatically detect and use the drivers you install. There's likely to be an extra delay, typically from one to five seconds, as rEFInd loads the drivers and tells the EFI to detect the filesystems they handle. For this reason, and because of the possibility of drivers harboring bugs, I recommend installing only those drivers that you need. If you like, you can install drivers you don't plan on using to some other directory, such as <tt>/drivers</tt> on the ESP's root. You can then load these drivers manually with the EFI shell's <tt>load</tt> command if the need arises in the future. You can then tell the shell to re-assign drive identifiers with <tt>map -r</tt>:</p>
+
+<pre class="listing">
+fs0: <tt class="userinput">load reiserfs_x64.efi</tt>
+fs0: <tt class="userinput">map -r</tt>
+</pre>
+
+<p>If you build rEFInd from source, you should be aware that the drivers rely on <a href="https://sourceforge.net/projects/tianocore/">TianoCore's development kit,</a> whereas rEFInd itself uses <a href="http://sourceforge.net/projects/gnu-efi/">GNU-EFI.</a> Thus, to compile both, you'll need to install both development kits. Unfortunately, the TianoCore kit is a bit unusual from a Linux developer's perspective, and you'll probably have to build it from source code. Consult the <tt>BUILDING.txt</tt> file in the source package for more information. None of this is important if you use a binary build of rEFInd, unless you've obtained it from a third party who hasn't built the drivers. If that's the case, you'll have to download rEFInd from Sourceforge (see the <a href="http://www.rodsbooks.com/refind/getting.html">Getting rEFInd page</a> for details) or use drivers from another source.</p>
+
+<h2>Finding Additional EFI Drivers</h2>
+
+<p>As already noted, I know of no EFI drivers for EFI hardware, aside from those that are built into motherboards' EFI implementations. I do, however, know of a few EFI filesystem drivers, in addition to those provided with rEFInd:</p>
 
 <ul>
 
 <li><b><a href="http://refit.sourceforge.net">rEFIt's ext2fs and ReiserFS drivers</a></b>&mdash;You can gain read-only access to ext2fs, ext3fs, and ReiserFS volumes with these drivers. You can use the binaries in the <tt>refit-bin-0.14/efi/tools/drivers</tt> directory of the binary package directly on a Mac. On a UEFI-based PC, though, you'll need to break the Mac-style "fat" binary into its 32- and 64-bit components. You can use my <a href="http://www.rodsbooks.com/thin/index.html"><tt>thin</tt></a> program for this job.</li>
 
-<li><b><a href="https://sourceforge.net/projects/cloverefiboot/">Clover EFI's ISO-9660, ext2fs, and HFS+ drivers</a></b>&mdash;This project is an offshoot of TianoCore, the main UEFI project. It's primarily a Hackintosh boot loader, but it includes drivers for <a href="http://cloverefiboot.svn.sourceforge.net/viewvc/cloverefiboot/VBoxFsDxe/">ISO-9660, ext2fs, and HFS+;</a> however, building them requires a fair amount of expertise. You can find a compile script for the ISO-9660 driver <a href="https://github.com/the-ridikulus-rat/My_Shell_Scripts/blob/master/tianocore_uefi/iso9660_virtualbox_x86_64_udk_linux_compile.sh">here,</a> and a compiled ISO-9660 binary <a href="http://dl.dropbox.com/u/9710721/VBoxIso9600.efi">here.</a> The compiled binary has worked in a brief test; however, it didn't give access to the ISO-9660 filesystem when it was loaded from an El Torito image the ISO-9660 filesystem held.</li>
+<li><b><a href="https://sourceforge.net/projects/cloverefiboot/">Clover EFI's ISO-9660, ext2fs, and HFS+ drivers</a></b>&mdash;This project is an offshoot of TianoCore, the main UEFI project. It's primarily a Hackintosh boot loader, but it includes drivers for <a href="http://cloverefiboot.svn.sourceforge.net/viewvc/cloverefiboot/VBoxFsDxe/">ISO-9660, ext2fs, and HFS+;</a> however, building them requires a fair amount of expertise. These drivers served as a starting point for rEFInd's drivers.</li>
 
-<li><b><a href="http://www.osx86.net/view/2571-clover_v2_r384__efi_bootloader_pkg_+_gpt_efi_tools.html">Clover's EFI Tools package</a></b>&mdash;This osx86.net thread includes links to a package called <tt>EFI_Tools_Clover_v2_r384_EFI_x32_x64_EN.zip</tt>, which holds an OS X application (a directory with a <tt>.app</tt> extension, as seen from other platforms) with a number of drivers in the <tt>Contents/Resources/EFI/drivers64</tt> directory (and an equivalent for 32-bit binaries). Some of these, such as keyboard drivers, are unlikely to be useful unless your system is badly broken as delivered. Three that caught my eye, however, are <tt>VBoxExt2-64.efi</tt>, <tt>NTFS-64.efi</tt>, and <tt>VBoxIso9600-64.efi</tt>.</li>
+<li><b><a href="http://www.osx86.net/view/2571-clover_v2_r384__efi_bootloader_pkg_+_gpt_efi_tools.html">Clover's EFI Tools package</a></b>&mdash;This osx86.net thread includes links to a package called <tt>EFI_Tools_Clover_v2_r447_EFI_x32_x64_EN.zip</tt>, which holds an OS X application (a directory with a <tt>.app</tt> extension, as seen from other platforms) with a number of drivers in the <tt>Contents/Resources/EFI/drivers64</tt> directory (and an equivalent for 32-bit binaries). Some of these, such as keyboard drivers, are unlikely to be useful unless your system is badly broken as delivered. Three that caught my eye, however, are <tt>VBoxExt2-64.efi</tt>, <tt>NTFS-64.efi</tt>, and <tt>VBoxIso9600-64.efi</tt>.</li>
 
 <li><b><a href="https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe">VirtualBox's HFS+ and ISO-9660 drivers</a></b>&mdash;These drivers are available in source code form, and come with VirtualBox binaries. I've not attempted to compile them myself, but I've seen a report that suggests they may include assumptions that require use of <a href="http://www.mingw.org/">MinGW,</a> a GCC-based compiler for Windows (and cross-compiler to build Windows executables under Linux). I don't know of a source for binaries suitable for use on EFI-based computers; if you want to use them, you'll need to figure out how to compile them yourself.</li>
 
 </ul>
 
-<p>Most of these cross-project drivers appear to be related. For instance, the ISO-9660 drivers are both based on code written by Christoph Phisterer for rEFIt (although he doesn't seem to have finished and released it in binary form himself).</p>
-
-<p>As you can see, pickings are rather slim. Nonetheless, the drivers that exist are useful for certain purposes. The options could increase in the future, too. Source code to a wide variety of filesystems is available in GRUB Legacy, GRUB 2, Linux, various BSD kernels, and in other projects. Sooner or later somebody's likely to begin porting those drivers to EFI. If you do so, or if you know of additional EFI drivers, please <a href="mailto:rodsmith@rodsbooks.com">tell me about it,</a> so I can share the information here. Likewise if you know of a source for other EFI drivers&mdash;say, for a video card or disk controller card.</p>
+<p>Most of these cross-project drivers appear to be related, and most of them have fed into rEFInd's drivers. I used the Clover package, which in turn was based on the VirtualBox drivers, as a starting point. Everybody else has dropped rEFIt's original ReiserFS driver, but I added that back. Of these drivers, only the Clover EFI Tools NTFS driver is missing from rEFInd. Specific versions can have their own quirks, though. For instance, the Clover (and I suspect VirtualBox) drivers don't return volume labels, which causes rEFInd to display loaders on those volumes as being on a disk called <tt>Unknown</tt>. (I fixed that bug for rEFInd's version, and it wasn't present in the original rEFIt drivers.)</p>
 
-<p class="sidebar"><b>Warning:</b> <i>Do not</i> place EFI program files in your driver directories! Unfortunately, EFI uses the same <tt>.efi</tt> filename extension to identify both EFI program files and EFI drivers. Therefore, rEFInd can't distinguish between the two prior to loading them, and if you place program files in a drivers directory, rEFInd will run the EFI program file when it does its driver scan.</p>
+<p>Driver availability could increase in the future. Source code to a wide variety of filesystems is available in GRUB Legacy, GRUB 2, Linux, various BSD kernels, and in other projects. Sooner or later somebody's likely to begin porting those drivers to EFI. If you do so, or if you know of additional EFI drivers, please <a href="mailto:rodsmith@rodsbooks.com">tell me about it,</a> so I can share the information here. Likewise if you know of a source for other EFI drivers&mdash;say, for a video card or disk controller card.</p>
 
-<p>Once you've obtained an EFI driver or two, you can install it in rEFInd by creating a subdirectory of the rEFInd directory called <tt>drivers</tt>&mdash;for instance, <tt>EFI/refind/drivers</tt>, if you've installed rEFInd to <tt>EFI/refind</tt> on the ESP. Alternatively, you can create a directory of any other name and use the <tt>scan_driver_dirs</tt> option in <tt>refind.conf</tt> to tell rEFInd where to look for drivers. Either way, rEFInd attempts to load all the EFI drivers from these directories, so placing your files there and rebooting will do the trick.</p>
-
-<p>rEFInd is likely to take slightly longer to start up when you use drivers, but the effect is likely to be small. On my systems, it's usually just a second or so. This effect could be greater with some drivers or on some systems, though.</p>
+<p>Once you've obtained an EFI driver, you can install it in rEFInd just as you would install rEFInd's own drivers, as described earlier.</p>
 
+<a name="notes">
 <h2>Notes on Specific Drivers</h2>
+</a>
 
-<p>I've tested the original rEFIt drivers on a handful of systems. First let me re-emphasize one point: To use rEFIt's ext2fs and ReiserFS drivers on a UEFI-based PC, you must separate the x86 and x86-64 binaries from the "fat" binary format that come in the binary package. You can do this with my <a href="http://www.rodsbooks.com/thin/index.html"><tt>thin</tt></a> program.</p>
-
-<p>The rEFIt ext2fs driver works on both ext2fs and ext3fs, but not on ext4fs&mdash;at least, not in my one test. (There may be options you can use when creating an ext4 filesystem that would enable the rEFIt ext2fs driver to handle it, but if so I don't know what they are.) The ReiserFS driver is obviously useful only on ReiserFS partitions. (Reiser4 is not supported, as far as I know.) Given that these filesystems are getting a bit on in age by Linux standards, you might do well to use them on a separate Linux <tt>/boot</tt> partition; however, if you're willing to use ext3fs or ReiserFS on your root (<tt>/</tt>) filesystem, you can use the rEFIt drivers to read your kernel from it. Note that this assumes you use conventional partitions; to the best of my knowledge, there's no EFI driver for Linux's Logical Volume Manager (LVM) or Redundant Array of Independent Disks (RAID) configurations, so the EFI can't access filesystems stored in these ways.</p>
+<p>I've tested several of the drivers described on this page on a handful of systems. The ext2fs driver (from any source) works on both ext2fs and ext3fs, but not on ext4fs&mdash;at least, not in my one test. (There may be options you can use when creating an ext4 filesystem that would enable the ext2fs driver to handle it, but if so I don't know what they are.) The ReiserFS driver is obviously useful only on ReiserFS partitions. (Reiser4 is not supported, as far as I know.) Given that these filesystems are getting a bit on in age by Linux standards, you might do well to use them on a separate Linux <tt>/boot</tt> partition; however, if you're willing to use ext3fs or ReiserFS on your root (<tt>/</tt>) filesystem, you can use the EFI drivers to read your kernel from it. Note that this assumes you use conventional partitions; to the best of my knowledge, there's no EFI driver for Linux's Logical Volume Manager (LVM) or Redundant Array of Independent Disks (RAID) configurations, so the EFI can't access filesystems stored in these ways.</p>
 
-<p>The ext2fs and ReiserFS drivers work, but they are a bit sluggish&mdash;particularly the ext2fs driver. The extent of the problem depends on the computer. In my tests so far, VirtualBox has fared the worse. On it, loading a Linux kernel with EFI stub loader from a FAT partition takes 2 seconds, from the moment of selecting the OS in rEFInd to the moment the kernel messages begin to appear. The equivalent time using ReiserFS is 20 seconds, and with ext2fs it's 200 seconds (that is, 3 minutes and 20 seconds). On a 32-bit Mac Mini, though, the speed problem is much less pronounced&mdash;my kernel loads in just 3 seconds from a ReiserFS partition and in 13 seconds from an ext2 filesystem. Times with ext2fs on a UEFI PC with an Intel motherboard were also reasonable, although I didn't record precise values. Nonetheless, if you try the ext2fs driver and it seems to hang, be patient; it may finally boot up. If so, and if the delay is too great for you to accept, you might consider using ReiserFS instead of ext2fs or ext3fs, at least if a change is practical. (For a <tt>/boot</tt> partition, it almost certainly is practical; you can back it up quite easily, create a fresh filesystem on it, and restore it. You may need to adjust your <tt>/etc/fstab</tt> entry for a new UUID value, though.)</p>
+<p>The ext2fs and ReiserFS drivers work, but they are a bit sluggish&mdash;particularly the ext2fs driver. The extent of the problem depends on the computer. In my tests so far, VirtualBox has fared the worst. On it, loading a Linux kernel with EFI stub loader from a FAT partition takes 2 seconds, from the moment of selecting the OS in rEFInd to the moment the kernel messages begin to appear. The equivalent time using ReiserFS or HFS+ is 20 seconds, and with ext2fs it's 200 seconds (that is, 3 minutes and 20 seconds). On a 32-bit Mac Mini, though, the speed problem is much less pronounced&mdash;my kernel loads in just 3 seconds from a ReiserFS partition and in 13 seconds from an ext2 filesystem. Times with ext2fs on a UEFI PC with an Intel motherboard are in the 2&ndash;4 second range. Nonetheless, if you try the ext2fs driver and it seems to hang, be patient; it may finally boot up. If so, and if the delay is too great for you to accept, you might consider using ReiserFS instead of ext2fs or ext3fs, at least if a change is practical. (For a <tt>/boot</tt> partition, it almost certainly is practical; you can back it up quite easily, create a fresh filesystem on it, and restore it. You may need to adjust your <tt>/etc/fstab</tt> entry for a new UUID value, though.) You can even use HFS+ on a Linux <tt>/boot</tt> partition, although this makes the most sense on a Mac, which has its own EFI HFS+ driver.</p>
 
-<p>The Clover EFI Tools ext2fs driver performs much like the rEFIt ext2fs driver, but it doesn't deliver a filesystem label, which makes it less desirable. The NTFS driver from this package is nice and speedy, though, so if for some reason you need to place a boot loader on an NTFS volume, this driver might be worth tracking down.</p>
+<p>Since the ext2fs and ReiserFS drivers share a common origin, it should come as no surprise that they perform in much the same way no matter which version (rEFIt, Clover, or rEFInd) you use. One exception is that the Clover EFI Tools drivers don't deliver filesystem labels, which makes them less desirable than the rEFIt or rEFInd drivers. The NTFS driver from the Clover Tools package is nice and speedy, though, so if for some reason you need to place a boot loader on an NTFS volume, this driver might be worth tracking down.</p>
 
 <p>Although both ext2fs and ReiserFS are case-sensitive, these drivers treat them in a case-insensitive way. Symbolic links work, which opens up possibilities for configuration, such as using a single kernel binary for multiple Linux distributions, with a link in one subdirectory pointing to a file in another directory. (If you try this, though, be sure to use <i>relative</i> links, as in <tt>../otherdist/bzImage.efi</tt>, at least if the partition is not Linux's root filesystem.)</p>
 
index d1291ac87953a4679f1d1d3b9e7cc838abdb0a95..0fdd59b617d44bb35de2357b9f39d087603e7ca9 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:
-5/15/2012, referencing rEFInd 0.3.5</p>
+5/20/2012, referencing rEFInd 0.4.0</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>
 
@@ -107,6 +107,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <li>Load EFI drivers for filesystems or hardware devices not supported natively by your firmware. (This feature is absent in some builds of rEFIt and in rEFInd prior to version 0.2.7.)</li>
 
+<li>Inclusion of drivers for the Linux ReiserFS and ext2 filesystems in the
+    main package. (These drivers are absent from rEFInd prior to version
+    0.4.0; and the rEFInd versions don't work on at least some Macs.)</li>
+
 </ul>
 
 <p>I've used rEFIt on a couple of computers for over a year, but I've found that it has some frustrating limitations. It tends to flood the screen with non-functional BIOS boot options, for instance; and it has a number of bugs on UEFI-based systems. I therefore expanded on rEFIt, giving rEFInd features that improve on or go beyond those of rEFIt, such as:</p>
@@ -149,6 +153,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <li>An "exit" option (disabled by default), so that you can return to whatever shell or boot manager you used to launch rEFInd, should this ability be desirable. (This feature first appeared in rEFInd 0.2.4.)</li>
 
+<li>Drivers for ISO-9660 and HFS+, which are not included in rEFIt. (The ISO-9660 driver is based on code from the rEFIt project, but was never completed by its original author. It was completed by Oracle for VirtualBox.)</li>
+
 </ul>
 
 <p>On the flip side, at least for Mac users, rEFInd comes with less sophisticated Mac installation tools than does rEFIt, in favor of more OS-agnostic packaging.</p>
index d38c6191d7018d07426235367da7890c6b2675a1..1a43a2f5d27c26d10e006aa3592a903ea1129b0c 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:
-5/15/2012, referencing rEFInd 0.3.5</p>
+5/20/2012, referencing rEFInd 0.4.0</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>
 
@@ -97,40 +97,40 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
-<li><b><a href="http://sourceforge.net/projects/refind/files/0.3.5/refind-src-0.3.5.zip/download">A
+<li><b><a href="http://sourceforge.net/projects/refind/files/0.4.0/refind-src-0.4.0.zip/download">A
     source code zip file</a></b>&mdash;This is useful if you want to
     compile the software locally. Note that I use Linux with the <a
     href="http://sourceforge.net/projects/gnu-efi">GNU-EFI</a> development
-    tools. rEFIt used an Intel/Microsoft toolchain. Backporting rEFInd to
-    that toolchain is theoretically possible, but I've not attempted
-    it.</li>
+    tools to build the main rEFInd binary, and Linux with the <a
+    href="https://sourceforge.net/projects/tianocore/">TianoCore
+    development kit</a> for the drivers. rEFIt used an Intel/Microsoft
+    toolchain. Backporting rEFInd to that toolchain is theoretically
+    possible, but I've not attempted it.</li>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.3.5/refind-bin-0.3.5.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.4.0/refind-bin-0.4.0.zip/download">A
     binary zip file</a></b>&mdash;Download this if you want to install
-    rEFInd on an <i>x</i>86 or <i>x</i>86-64 computer and have no need to
-    test rEFInd first by booting it on an optical disc. This zip file
-    package includes both <i>x</i>86 (aka IA32) and <i>x</i>86-64 (aka
-    <i>x</i>64, AMD64, or EM64T) versions of rEFInd. Which you install
-    depends on your architecture, as described on the <a
+    rEFInd and/or its filesystem drivers on an <i>x</i>86 or <i>x</i>86-64
+    computer and have no need to test rEFInd first by booting it on an
+    optical disc. This zip file package includes both <i>x</i>86 (aka IA32)
+    and <i>x</i>86-64 (aka <i>x</i>64, AMD64, or EM64T) versions of rEFInd.
+    Which you install depends on your architecture, as described on the <a
     href="installing.html">Installing rEFInd</a> page.</li>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.3.5/refind-cd-0.3.5.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.4.0/refind-cd-0.4.0.zip/download">A
     CD-R image file</a></b>&mdash;This download contains the same files as
-    the zip file, but you can burn it to a CD-R to test rEFInd without
-    installing it first. (It boots on UEFI PCs, but fails on some older
-    Macs.) If you like it, you can then copy the files from the CD-R to
-    your hard disk. The files are named in such a way that the disc should
-    boot on either 64-bit (<i>x</i>86-64) or 32-bit (<i>x</i>86) EFI
-    computers. Note that there's a bug that causes rEFInd to complain about
-    invalid parameters while scanning various directories. You can safely
-    ignore this message, but you'll need to press a key to dismiss it. I've
-    included an open source EFI shell program on this disc that's not
-    included in the binary zip file, so that you can access an EFI shell
-    from a bootable disc even if you don't have an EFI shell available from
-    your regular hard disk. This can be an extremely valuable diagnostic
-    tool if you know about about using an EFI shell.</li>
+    the zip file, but you can burn it to a CD-R to test rEFInd (and its
+    filesystem drivers) without installing it first. (It boots on UEFI PCs,
+    but fails on some older Macs.) If you like it, you can then copy the
+    files from the CD-R to your hard disk. The files are named in such a
+    way that the disc should boot on either 64-bit (<i>x</i>86-64) or
+    32-bit (<i>x</i>86) EFI computers. I've included an open source EFI
+    shell program on this disc that's not included in the binary zip file,
+    so that you can access an EFI shell from a bootable disc even if you
+    don't have an EFI shell available from your regular hard disk. This can
+    be an extremely valuable diagnostic tool if you know how to use an EFI
+    shell.</li>
 
 <li><b><a href="https://sourceforge.net/p/refind/code">Source code via
     git</a></b>&mdash;If you want to peruse the source code in your Web
index f57dae9d630c43db0d762c68d9a1f3837ee9b7c6..7e79b57b4a35d0ba0f7a459fc41b7abc92e68a5b 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:
-5/15/2012, referencing rEFInd 0.3.5</p>
+5/20/2012, referencing rEFInd 0.4.0</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>
index c68268f85fd7f11dc96bf571b415a9c8a91f7383..0b2886436ad40eb25e66912799a699ce1740298a 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:
-5/15/2012, referencing rEFInd 0.3.5</p>
+5/20/2012, referencing rEFInd 0.4.0</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>
@@ -92,7 +92,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p class="sidebar"><b>Important:</b> A rEFInd zip file, when uncompressed, creates a directory called <tt>refind-<i>version</i></tt>, where <tt><i>version</i></tt> is the version number. This directory includes a subdirectory called <tt>refind</tt> that holds the boot loader, along with another that holds documentation, as well as miscellaneous files in <tt>refind-<i>version</i></tt> itself. When I refer to "the <tt>refind</tt> directory" on this page, I mean the directory with that precise name, not the <tt>refind-<i>version</i></tt> directory that is its parent.</p>
 
-<p>Once you've uncompressed a rEFInd binary zip file, you must install it to your computer's ESP (or conceivably to some other location). The details of how you do this depend on your OS and your computer (UEFI-based PC vs. Macintosh). The upcoming sections provide details. For Linux and Mac OS X, you can use the installation script, <a href="#installsh"><tt>install.sh</tt>,</a> which provides easy one-command installation on most systems. Occasionally this script will fail, though, so I also provide explicit instructions for <a href="#linux">Linux</a> and <a href="#osx">Mac OS X.</a> Installation under <a href="#windows">Windows</a> also must be done manually. In some cases, you'll have to deviate from the default naming conventions, as described in <a href="#naming">a section on this topic.</a> If you're upgrading rEFInd, see the <a href="#upgrading">section on upgrading.</a> Finally, I describe how to install some <a href="#addons">additional components</a> you might find useful.</a></p>
+<p>Once you've uncompressed a rEFInd binary zip file, you must install it to your computer's ESP (or conceivably to some other location). The details of how you do this depend on your OS and your computer (UEFI-based PC vs. Macintosh). The upcoming sections provide details. For Linux and Mac OS X, you can use the installation script, <a href="#installsh"><tt>install.sh</tt>,</a> which provides easy one-command installation on most systems. Occasionally this script will fail, though, so I also provide explicit instructions for <a href="#linux">Linux</a> and <a href="#osx">Mac OS X.</a> Installation under <a href="#windows">Windows</a> also must be done manually. In some cases, you'll have to deviate from the default naming conventions, as described in <a href="#naming">a section on this topic.</a> If you're upgrading rEFInd, see the <a href="#upgrading">section on upgrading.</a> Finally, I describe how to install some <a href="#addons">additional components</a> you might find useful.</a> Note that this page describes installing the main rEFInd program; if you want to use the EFI filesystem drivers included with rEFInd, you should consult the <a href="drivers.html">page on using drivers with rEFInd.</a></p>
 
 <a name="installsh">
 <h2>Installing rEFInd Using <tt>install.sh</tt> under Linux or Mac OS X</h2>
@@ -198,12 +198,14 @@ Filesystem     1K-blocks  Used Available Use% Mounted on
 
 <ol>
 
-<li>Type <tt><b>cp -r refind /boot/efi/EFI/</b></tt> from the <tt>refind-<i>version</i></tt> directory in which the <tt>refind</tt> directory exists. This copies all the files that rEFInd needs to work.</li>
+<li>Type <tt><b>cp -r refind /boot/efi/EFI/</b></tt> from the <tt>refind-<i>version</i></tt> directory in which the <tt>refind</tt> directory exists. This copies all the files that rEFInd needs to work. Note that this includes <i>all</i> of rEFInd's drivers.</li>
 
 <li>Type <tt><b>cd /boot/efi/EFI/refind</b></tt> to change into rEFInd's new directory on the ESP.</li>
 
 <li>Type <tt><b>rm refind_ia32.efi</b></tt> to remove the IA32 binary if you're using an <i>x</i>86-64 (64-bit) system; or type <tt><b>rm refind_x64.efi</b></tt> to remove the <i>x</i>86-64 binary if you're using an <i>x</i>86 (32-bit) system. You can optionally rename the binary you keep as <tt>refind.efi</tt>, but this isn't required. (Note that you must keep the version that's the correct bit width for your EFI; if you've installed a 32-bit Linux on a 64-bit PC with a 64-bit EFI, you'd keep <tt>refind_x64.efi</tt>.</li>
 
+<li>Optionally, type <tt class="userinput">rm -r drivers_ia32</tt> to remove the <i>x</i>86 drivers from an <i>x</i>86-64 system, or <tt class="userinput">rm -r drivers_x64</tt> to remove the <i>x</i>86-64 drivers from a 32-bit <i>x</i>86 system. You may also want to remove some or all of the drivers for the architecture you are using; if you don't need them, they'll slow down the start process. See the <a href="drivers.html">page on drivers</a> for more on this topic.</li>
+
 <li>Rename the configuration file by typing <tt><b>mv refind.conf-sample refind.conf</b></tt>. Consult the <a href="configfile.html">Editing the rEFInd Configuration File</a> page for information on how to adjust your options.</li>
 
 <a name="efibootmgr">
@@ -268,6 +270,15 @@ $ <b>ioreg -l -p IODeviceTree | grep firmware-abi</b>
     64-bit EFI or <b><tt>sudo rm /efi/refind/refind_x64.efi</tt></b> on a
     Mac with a 32-bit EFI.</li>
 
+<li>Optionally, remove the drivers directory for the architecture you're
+    not using&mdash;<tt>/efi/refind/drivers_ia32</tt> or
+    <tt>/efi/refind/drivers_x64</tt>, as appropriate. You may also want to
+    remove some or all of the drivers for the architecture you are using;
+    if you don't need them, they'll slow down the start process. See the <a
+    href="drivers.html">page on drivers</a> for more on this topic. Note
+    that Apple's firmware includes its own HFS+ driver, so the HFS+ driver
+    provided with rEFInd is useless on Macs.</li>
+
 <li>If this is your first installation, type <b><tt>sudo mv
     /efi/refind/refind.conf-sample /efi/refind/refind.conf</tt></b>
     (adjusting the path as necessary) to rename the sample configuration
@@ -322,6 +333,8 @@ $ <b>ioreg -l -p IODeviceTree | grep firmware-abi</b>
 
 <li>Type <b><tt>del refind_ia32.efi</tt></b> to delete the unused 32-bit version of rEFInd. (Windows only supports EFI boots on 64-bit EFI implementations and in 64-bit versions of Windows.)</li>
 
+<li>Optionally type <tt class="userinput">rd /s drivers_ia32</tt> to delete the <tt>drivers_ia32</tt> directory and its contents. You may also want to selectively delete some of the drivers in the <tt>drivers_x64</tt> directory, depending on your needs. Unnecessary drivers may slow the rEFInd start process. See the <a href="drivers.html">page on drivers</a> for more on this topic.</li>
+
 <li>Type <b><tt>rename refind.conf-sample refind.conf</tt></b> to rename rEFInd's configuration file.</li>
 
 <li>Type <b><tt>bcdedit /set {bootmgr} path \EFI\refind\refind_x64.efi</tt></b> to set rEFInd as the default EFI boot program. Note that <tt>{bootmgr}</tt> is entered as such; that's not a notation for a variable.</li>
@@ -428,10 +441,12 @@ $ <b>ioreg -l -p IODeviceTree | grep firmware-abi</b>
     href="http://refit.sourceforge.net">original rEFIt package.</a></li>
 
 <li><b>Drivers</b>&mdash;You can install drivers to extend the capabilities
-    of the EFI. Most notably, filesystem drivers for ext2fs and ReiserFS
-    are available. These can enable you to boot a Linux kernel with EFI
-    stub support from an ext2fs, ext3fs, or ReiserFS partition. See the <a
-    href="drivers.html">Using EFI Drivers</a> page for more on this
+    of the EFI. rEFInd ships with filesystem drivers for ext2fs and
+    ReiserFS, which can enable you to boot a Linux kernel with EFI stub
+    support from an ext2fs, ext3fs, or ReiserFS partition. (rEFInd also
+    provides ISO-9660 and HFS+ drivers.) You can find additional drivers
+    from other sources, although they're still on the scarce side. See the
+    <a href="drivers.html">Using EFI Drivers</a> page for more on this
     topic.</li>
 
 </ul>
index f1b901d145afa4fc7cb80ce249aeeddf015c4375..d9b47d147e68cb1b0f4316d33a190b62c95c1a0a 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/19/2012; last Web page update:
-5/15/2012, referencing rEFInd 0.3.5</p>
+5/20/2012, referencing rEFInd 0.4.0</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>
@@ -133,7 +133,7 @@ another possibility.</p>
     will also scan for kernels <i>without</i> a <tt>.efi</tt> filename
     extension. This option is not the default, though, because it can pick
     up old kernels that lack EFI stub loader support and even non-kernel
-    files, such as icon files named to give a kernel a unique icon.</li>
+    files.</li>
 
 <p class="sidebar">A kernel whose filename lacks a version string matches an initial RAM disk that also lacks a version string in its filename. Note that you can reliably use only <i>one</i> kernel and initial RAM disk per directory that lack version numbers in their filenames.</p>
 
index a72657c611486c286d876c05ee877d823efb6d69..8bac8053dce6012801d4e91b39fb2d026cd4de9f 100644 (file)
@@ -14,7 +14,7 @@
 <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-<p>Last Web page update: 5/15/2012</p>
+<p>Last Web page update: 5/20/2012</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>
@@ -93,6 +93,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
+<li><b>0.4.0 (5/20/2012)</b>&mdash;I've bumped up this version number more than usual to reflect the addition of four filesystem drivers (for ext2fs, ReiserFS, HFS+, and ISO-9660) to the rEFInd package. These drivers originate with the original rEFIt, VirtualBox, and Clover boot loader projects. You can learn more on the <a href="drivers.html">drivers page.</a> To facilitate inclusion of drivers on the CD image, rEFInd also now supports reading drivers from architecture-specific subdirectories&mdash;<tt>drivers_x64</tt> and <tt>drivers_ia32</tt> for <i>x</i>86-64 and <i>x</i>86 systems, respectively. This version also adds the ability to eject removable media on some Macs (this won't work on UEFI-based PCs, unfortunately). Finally, this version fixes a problem that could cause GRUB 2 to be unable to read its configuration file in some settings when launched from rEFInd.</li>
+
 <li><b>0.3.5 (5/15/2012)</b>&mdash;This version's biggest new feature is the ability to re-scan for boot loaders after launching the program. This is done by pressing the Esc key, which causes rEFInd to re-read its configuration file, to tell the EFI to reconnect all disks, and to do a fresh scan of all disks for loaders. This is useful if you insert a removable disk after starting the computer, if rEFInd starts before a disk has fully settled, if you make a change to the configuration file, or if you manually load a driver. This version also fixes a minor bug that could cause the scroll-right arrow to be replaced with a left-pointing arrow under some circumstances; and I've removed the scan for a BIOS Boot Partition that I added in 0.3.2, since I'm told it isn't launching correctly. (BIOS-mode GRUB 2 can still be launched on Macs from its boot code in the MBR.)</li>
 
 <li><b>0.3.4 (5/9/2012)</b>&mdash;The biggest change to this version is the addition of the <tt>icons_dir</tt> configuration file token, which enables you to specify a directory that holds icons that override those in the default <tt>icons</tt> subdirectory. See the <a href="themes.html">Theming rEFInd</a> and <a href="configfile.html">Configuring the Boot Manager</a> pages for details. This version also reduces flicker when moving your selection around the screen and modifies the <tt>install.sh</tt> script so that it can be used directly after building rEFInd from source code. Related to this, building from source now creates a binary that includes an architecture code&mdash;<tt>refind_ia32.efi</tt> or <tt>refind_x64.efi</tt> rather than <tt>refind.efi</tt>.</li>
index ef18fb655c5ffc8d8bd250b615cf42a3e9c936c9..9daac49dd1272a4cf3c30742ba6413fae3a17f8a 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 4/19/2012; last Web page update:
-5/15/2012, referencing rEFInd 0.3.5</p>
+5/20/2012, referencing rEFInd 0.4.0</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>
index 61510f36334a265c66a0a4fa3bf8d667c6e0a5a7..03bac98b34287f74023f2f98dcac8b00e7cfaeec 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:
-5/15/2012, referencing rEFInd 0.3.5</p>
+5/20/2012, referencing rEFInd 0.4.0</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>
@@ -94,132 +94,198 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>This page exists to document some of rEFInd's known bugs and limitations, as well as features I hope to add in the future. Some of the items on this list are things that you may be able to help with, so if you'd like to contribute, feel free to drop me a line!</p>
 
-<p>Without further ado, then, and in no particular order:</p>
+<p>The following list groups things that need to be done into broad categories. In some cases, there's some ambiguity about how an item might best be classified. Without further ado, then:</p>
 
 <ul>
 
-<li>Testing! rEFIt was complex enough that changes such as the ones I've
-    made have the potential to disrupt the program's operation in
-    unexpected ways. Since the initial 0.2.0 release, I've continued to add
-    features to rEFInd, and every new feature is another way for bugs to
-    get into the program. I can only test on a handful of systems with a
-    limited number of configurations. Therefore, if you try rEFInd and run
-    into bugs, please report them to me!</li>
-
-<li>Currently, rEFInd can detect whether it's compiled for <i>x</i>86 or
-    <i>x</i>86-64 systems and displays this information in its "About"
-    screen (AboutrEFInd() in main.c). I'd like to add detection for Itanium
-    and ARM systems, but I have no way to test such changes.</li>
-
-<li>I have little talent with graphics manipulation programs, so rEFInd's
-    boot logo, such as it is, is pretty weak. If you have artistic talent
-    and would like to create a rEFInd logo, please feel free to send it to
-    me. I won't make any final decision about changes until at least June
-    30 of 2012.</li>
-
-<li>rEFIt's original design, and hence rEFInd's design, enables easy
-    theming by replacing icon files. If you'd like to design a new theme
-    for rEFInd, feel free to submit it. I might or might not replace the
-    icons it uses now (most of which come from the Oxygen Icons package),
-    but I may provide links to themes on this Web site (or even host them
-    on the project's Sourceforge page). For more information on designing
-    themes for rEFInd, see the <a href="themes.html">Theming rEFInd</a>
-    page.</li>
-
-<li>The code could be more flexible in its handling of the sizes of various
-    graphical elements, and particularly drawn text. Prior to version
-    0.2.2, submenu text was invisible on UEFI-based PCs with 800x600 and
-    smaller displays because of an inability to properly crop the graphics
-    fields that hold the text. With version 0.2.2, I've put a band-aid on
-    this problem by reducing the field size so that it now works on 800x600
-    displays, but smaller displays still suffer from this problem. This is
-    just an example of the inflexibility of certain layout issues within
-    rEFInd.</li>
-
-<li>Although the ICNS file format used by rEFInd supports multiple image
-    sizes, if a size that rEFInd needs isn't present in the file, rEFInd
-    can't use the icon. The ability to scale images to the desired size
-    would be useful.</li>
-
-<li>EFI supports network boots. rEFInd doesn't, but it would be nice if it
-    would.</li>
-
-<li>I would like to be able to specify the volume on which a boot loader
-    resides using a partition GUID value, but extracting a GUID from the
-    partition data is harder than extracting the volume's label or counting
-    up the filesystem numbers.</li>
-
-<li>It would be useful to be able to specify paths to boot loaders and/or
-    initial RAM disks relative to the rEFInd directory (or the boot
-    loader's directory, in the case of initrds).</li>
-
-<li>There's currently no way to create a manual boot stanza for a
-    BIOS-booted OS. This isn't a big priority for me personally, but I can
-    see how it could be for some people.</li>
-
-<li>I'd like to find a way to get rEFInd to launch BIOS boot loaders on
-    UEFI-based systems. This option currently works only on Macs&mdash;or
-    at least, I've not gotten it to work on any of my UEFI-based PCs. (I've
-    done some experiments to try to get this to work, but so far without
-    success. If you'd like to help on this, <a
-    href="mailto:rodsmith@rodsbooks.com">e-mail me</a> for my
-    thoughts.)</li>
-
-<li>The <a href="http://www.rodsbooks.com/gb-hybrid-efi/">Gigabyte Hybrid
-    EFI</a> has a bug that causes the allegedly case-insensitive
-    <tt>StriCmp()</tt> function to perform a case-sensitive comparison.
-    This causes any number of bugs in file matching. For instance: Changing
-    the case of icon filename extensions (or various other parts of icon
-    filenames) causes icons to be replaced by ugly "generic" ones; and
-    rEFInd sometimes appears in its own menu (the firmware sometimes
-    returns an all-caps version of the filename, but other times returns
-    the filename with the correct case, causing a mismatch if the path
-    includes lowercase elements). Some of these problems can be overcome by
-    converting both strings to be compared to one case before doing the
-    comparison, but others aren't so easy, since I think <tt>StriCmp()</tt>
-    is being called internally to the EFI. In any event, it'd be nice to
-    fix some of these problems. OTOH, this is a workaround for a bug on
-    just one EFI implementation, and a dismal one at that, so I'm inclined
-    to just let it go.</li>
-
-<li>I've received queries about rEFInd's ability to work with Apple's
-    whole-disk encryption scheme that's new with OS X 10.7. Unfortunately,
-    I lack the hardware to test this, but my understanding is that it will
-    work correctly <i>if</i> rEFInd is installed in the ESP rather than on
-    the Mac OS X root partition. See <a
-    href="https://sourceforge.net/p/refind/discussion/general/thread/5c7d0195/">this
-    forum thread</a> for more information.</li>
-
-<li>The Shutdown option works correctly on Macs, but not on UEFI-based PCs.
-    On such systems, Shutdown reboots the computer. This should be
-    fixed.</li>
-
-<li>I'd like to find a way to enable users to enter customizations for boot
-    options and then save them to the <tt>refind.conf</tt> file.</li>
-
-<li>It should be possible to override specific auto-detected boot loader
-    settings&mdash;say, to disable one specific boot loader or change its
-    icon.</li>
-
-<li>A way to read boot options set via <tt>efibootmgr</tt>, <tt>bless</tt>,
-    or similar options from NVRAM to add to the boot set would be
-    useful.</li>
-
-<li>A way to examine and change the NVRAM settings could be useful. This
-    would enable a CD-based boot of rEFInd to fix a broken disk boot.
-    Perhaps this could be done via a separate tool that could be launched
-    much like the shell or <tt>gptsync</tt>.</li>
-
-<li>The media-ejection feature (F12) should be extended to work on
-    UEFI-based PCs and early Macs. At the moment, it relies on an
-    Apple-specific EFI extension, and I know of no standard EFI way to do
-    it.</li>
-
-<li>I'd like to give the user the ability to set custom options on a
-    single-boot basis, similar to what's possible in GRUB.</li>
-
-<li>The code is in need of review to search for memory leaks and similar
-    problems.</p>
+<li><b>Tasks with which non-programmers can help:</b>
+
+    <ul>
+
+    <li>Testing! rEFIt was complex enough that changes such as the ones
+       I've made have the potential to disrupt the program's operation in
+       unexpected ways. Since the initial 0.2.0 release, I've continued to
+       add features to rEFInd, and every new feature is another way for
+       bugs to get into the program. I can only test on a handful of
+       systems with a limited number of configurations. Therefore, if you
+       try rEFInd and run into bugs, please report them to me!</li>
+
+    <li>I have little talent with graphics manipulation programs, so
+       rEFInd's boot logo, such as it is, is pretty weak. If you have
+       artistic talent and would like to create a rEFInd logo, please feel
+       free to send it to me. I won't make any final decision about
+       changes until at least June 30 of 2012.</li>
+
+    <li>rEFIt's original design, and hence rEFInd's design, enables easy
+       theming by replacing icon files. If you'd like to design a new
+       theme for rEFInd, feel free to submit it. I might or might not
+       replace the icons it uses now (most of which come from the Oxygen
+       Icons package), but I may provide links to themes on this Web site
+       (or even host them on the project's Sourceforge page). For more
+       information on designing themes for rEFInd, see the <a
+       href="themes.html">Theming rEFInd</a> page.</li>
+
+    </ul></li> <!-- Non-programmer help -->
+
+<li><b>Improvements to existing features:</b>
+
+    <ul>
+
+    <li>Currently, rEFInd can detect whether it's compiled for <i>x</i>86
+       or <i>x</i>86-64 systems and displays this information in its
+       "About" screen (<tt>AboutrEFInd()</tt> in <tt>main.c</tt>). I'd
+       like to add detection for Itanium and ARM systems, but I have no
+       way to test such changes.</li>
+
+    <li>The code could be more flexible in its handling of the sizes of
+       various graphical elements, and particularly drawn text. Prior to
+       version 0.2.2, submenu text was invisible on UEFI-based PCs with
+       800x600 and smaller displays because of an inability to properly
+       crop the graphics fields that hold the text. With version 0.2.2,
+       I've put a band-aid on this problem by reducing the field size so
+       that it now works on 800x600 displays, but smaller displays still
+       suffer from this problem. This is just an example of the
+       inflexibility of certain layout issues within rEFInd.</li>
+
+    <li>Although the ICNS file format used by rEFInd supports multiple
+       image sizes, if a size that rEFInd needs isn't present in the file,
+       rEFInd can't use the icon. The ability to scale images to the
+       desired size would be useful.</li>
+
+    <li>I would like to be able to specify the volume on which a boot
+       loader resides using a partition GUID value, but extracting a GUID
+       from the partition data is harder than extracting the volume's
+       label or counting up the filesystem numbers.</li>
+
+    <li>It would be useful to be able to specify paths to boot loaders
+       and/or initial RAM disks relative to the rEFInd directory (or the
+       boot loader's directory, in the case of initrds).</li>
+
+    </ul></li> <!-- Improvements -->
+
+<li><b>Known bugs that need squashing:</b>
+
+    <ul>
+
+    <li>I'd like to find a way to get rEFInd to launch BIOS boot loaders on
+       UEFI-based systems. This option currently works only on
+       Macs&mdash;or at least, I've not gotten it to work on any of my
+       UEFI-based PCs. (I've done some experiments to try to get this to
+       work, but so far without success. If you'd like to help on this, <a
+       href="mailto:rodsmith@rodsbooks.com">e-mail me</a> for my
+       thoughts.)</li>
+
+    <li>The <a href="http://www.rodsbooks.com/gb-hybrid-efi/">Gigabyte
+       Hybrid EFI</a> has a bug that causes the allegedly case-insensitive
+       <tt>StriCmp()</tt> function to perform a case-sensitive comparison.
+       This causes any number of bugs in file matching. For instance:
+       Changing the case of icon filename extensions (or various other
+       parts of icon filenames) causes icons to be replaced by ugly
+       "generic" ones; and rEFInd sometimes appears in its own menu (the
+       firmware sometimes returns an all-caps version of the filename, but
+       other times returns the filename with the correct case, causing a
+       mismatch if the path includes lowercase elements). Some of these
+       problems can be overcome by converting both strings to be compared
+       to one case before doing the comparison, but others aren't so easy,
+       since I think <tt>StriCmp()</tt> is being called internally to the
+       EFI. In any event, it'd be nice to fix some of these problems.
+       OTOH, this is a workaround for a bug on just one EFI
+       implementation, and a dismal one at that, so I'm inclined to just
+       let it go.</li>
+
+    <li>The Shutdown option works correctly on Macs, but not on UEFI-based PCs.
+        On such systems, Shutdown reboots the computer. This should be
+        fixed.</li>
+
+    <li>The media-ejection feature (F12) should be extended to work on
+       UEFI-based PCs and early Macs. At the moment, it relies on an
+       Apple-specific EFI extension, and I know of no standard EFI way to
+       do it.</li>
+
+    <li>The code is in need of review to search for memory leaks and
+       similar problems.</p>
+
+    </ul></li> <!-- Known bugs -->
+
+<li><b>New features I'd like to add:</b>
+
+    <ul>
+
+    <li>EFI supports network boots. rEFInd doesn't, but it would be nice if
+       it would.</li>
+
+    <li>There's currently no way to create a manual boot stanza for a
+       BIOS-booted OS. This isn't a big priority for me personally, but I
+       can see how it could be for some people.</li>
+
+    <li>I've received queries about rEFInd's ability to work with Apple's
+       whole-disk encryption scheme that's new with OS X 10.7.
+       Unfortunately, I lack the hardware to test this, but my
+       understanding is that it will work correctly <i>if</i> rEFInd is
+       installed in the ESP rather than on the Mac OS X root partition.
+       See <a
+       href="https://sourceforge.net/p/refind/discussion/general/thread/5c7d0195/">this
+       forum thread</a> for more information.</li>
+
+    <li>I'd like to find a way to enable users to enter customizations for
+       boot options and then save them to the <tt>refind.conf</tt>
+       file.</li>
+
+    <li>It should be possible to override specific auto-detected boot
+       loader settings&mdash;say, to disable one specific boot loader or
+       change its icon.</li>
+
+    <li>A way to read boot options set via <tt>efibootmgr</tt>,
+       <tt>bless</tt>, or similar options from NVRAM to add to the boot
+       set would be useful.</li>
+
+    <li>A way to examine and change the NVRAM settings could be useful.
+       This would enable a CD-based boot of rEFInd to fix a broken disk
+       boot. Perhaps this could be done via a separate tool that could be
+       launched much like the shell or <tt>gptsync</tt>.</li>
+
+    <li>I'd like to give the user the ability to set custom options on a
+       single-boot basis, similar to what's possible in GRUB.</li>
+
+    </ul></li> <!-- New features -->
+
+    <li><b>Improvements to the EFI drivers:</b>
+
+    <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>Drivers for additional filesystems are required. Given the recent
+       shift to ext4fs, that should be the priority; however, other Linux
+       filesystems, UDF, and perhaps others would all be welcome
+       additions. Also along these lines, adding drivers for Linux LVM and
+       RAID setups would be useful, too.</li>
+
+    <li>As detailed on the <a href="drivers.html">drivers page,</a> there
+       are performance issues with the drivers on some systems. I suspect
+       that most "real" computers aren't greatly affected (in my tests,
+       the problem is worst with VirtualBox, and the next worst is a
+       system that uses <a
+       href="http://www.rodsbooks.com/bios2uefi/">DUET</a>). Nonetheless,
+       I'd like to track down the cause and fix it.
+
+    <li>The driver installation procedure could be improved, perhaps by
+        adding support for drivers to the <tt>install.sh</tt> script.
+
+    </ul></li> <!-- Drivers -->
 
 </ul>
 
index b1bc47fa900e212225a555d67d324e0c630b30a7..4d62aa15c1141b6a66546c2647a99e1344b45897 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:
-5/15/2012, referencing rEFInd 0.3.5</p>
+5/20/2012, referencing rEFInd 0.4.0</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>
index 99b165afe24144f5da82c93fb0529a7a5ac18b00..f636bade732f0273ddcdbde8d76da8ce1bc08ff5 100644 (file)
@@ -23,7 +23,7 @@ endif
 
 EDK2BASE = /usr/local/UDK2010/MyWorkSpace
 
-# Below file defines TARGET (RELEASE or DEBUG), TARGET_ARCH (X64 or IA32), and TOOL_CHAIN_TAG (GCC45, GCC46, or GCC47)
+# Below file defines TARGET (RELEASE or DEBUG), TARGET_ARCH (X64 or IA32), and TOOL_CHAIN_TAG (GCC44, GCC45, GCC46, or GCC47)
 include $(EDK2BASE)/Conf/target.txt
 
 EFIINC = $(EDK2BASE)/MdePkg/Include/
@@ -101,9 +101,6 @@ LIBS            = $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
 %.o: %.c
        $(CC) $(CPPFLAGS) $(ARCH_C_FLAGS) $(CFLAGS) $(INCLUDE_DIRS) -DFSTYPE=$(DRIVERNAME) -c $< -o $@
 
-FORMAT   = efi-bsdrv-$(ARCH)
-
-
 ifneq (,$(filter %.efi,$(BUILDME)))
 
 SHLIB_TARGET = $(subst .efi,.lib,$(BUILDME))
@@ -118,24 +115,10 @@ $(BUILDME): $(DLL_TARGET)
        $(OBJCOPY) --strip-unneeded $(DLL_TARGET)
        $(OBJCOPY) $(DLL_TARGET)
        $(GENFW) -e UEFI_DRIVER -o $(BUILDME) $(DLL_TARGET)
-       mkdir -p ../fs-drivers
-       cp $(BUILDME) ../fs-drivers
+       mkdir -p ../drivers
+       cp $(BUILDME) ../drivers
 #      $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
-#                 -j .rela -j .reloc --target=$(FORMAT) $< $@
-
-endif
-
-# rules for libraries
-
-ifneq (,$(filter %.a,$(BUILDME)))
+#                 -j .rela -j .reloc --target=efi-bsdrv-$(ARCH) $< $@
 
 endif
 
-# utility rules
-
-clean:
-       rm -f $(BUILDME) *~ *.so $(OBJS) *.efi *.lib *.dll
-
-
-
-# EOF
index d4f0b6c15affd2efc4bfe63a532f4559cb1390ee..de697bfeca46f855e9e7d136945254f4b26abda2 100644 (file)
@@ -8,9 +8,9 @@
 
 INSTALL_DIR = /boot/efi/EFI/refind/drivers
 
-all:   ext2fs reiserfs iso9660 hfs
+all:   ext2 reiserfs iso9660 hfs
 
-ext2fs:
+ext2:
        rm -f fsw_efi.o
        make DRIVERNAME=ext2 -f Make.common
 
index e7d240083a22cb180e9cedcf8b5dc6376ade00a8..2f5a4c69c68eab3ae25bb4bdc7c2e918aff6f9d0 100644 (file)
@@ -77,7 +77,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"Fsw " FSW_EFI_STRINGIFY(t) L" File System Driver"
+#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.4.0 " FSW_EFI_STRINGIFY(t) L" File System Driver"
 
 // function prototypes
 
diff --git a/filesystems/test/.svn/all-wcprops b/filesystems/test/.svn/all-wcprops
deleted file mode 100644 (file)
index 1c8e48f..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 48
-/svnroot/cloverefiboot/!svn/ver/1/VBoxFsDxe/test
-END
-fsw_posix_base.h
-K 25
-svn:wc:ra_dav:version-url
-V 65
-/svnroot/cloverefiboot/!svn/ver/1/VBoxFsDxe/test/fsw_posix_base.h
-END
-fsw_posix.c
-K 25
-svn:wc:ra_dav:version-url
-V 60
-/svnroot/cloverefiboot/!svn/ver/1/VBoxFsDxe/test/fsw_posix.c
-END
-lsroot.c
-K 25
-svn:wc:ra_dav:version-url
-V 57
-/svnroot/cloverefiboot/!svn/ver/1/VBoxFsDxe/test/lsroot.c
-END
-fsw_posix.h
-K 25
-svn:wc:ra_dav:version-url
-V 60
-/svnroot/cloverefiboot/!svn/ver/1/VBoxFsDxe/test/fsw_posix.h
-END
-README
-K 25
-svn:wc:ra_dav:version-url
-V 55
-/svnroot/cloverefiboot/!svn/ver/1/VBoxFsDxe/test/README
-END
-lslr.c
-K 25
-svn:wc:ra_dav:version-url
-V 55
-/svnroot/cloverefiboot/!svn/ver/1/VBoxFsDxe/test/lslr.c
-END
diff --git a/filesystems/test/.svn/entries b/filesystems/test/.svn/entries
deleted file mode 100644 (file)
index f594e04..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-10
-
-dir
-432
-https://cloverefiboot.svn.sourceforge.net/svnroot/cloverefiboot/VBoxFsDxe/test
-https://cloverefiboot.svn.sourceforge.net/svnroot/cloverefiboot
-
-
-
-2011-04-04T13:39:25.410063Z
-1
-slice2009
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0f885799-303c-4bf3-9050-968124707f2f
-\f
-fsw_posix_base.h
-file
-
-
-
-
-2012-05-15T01:06:34.000000Z
-17516f05bd8d1ca74803cd8e1bc8b20f
-2011-04-04T13:39:25.410063Z
-1
-slice2009
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2920
-\f
-fsw_posix.c
-file
-
-
-
-
-2012-05-15T01:06:34.000000Z
-c847b0b03df254cb7f31e25315063957
-2011-04-04T13:39:25.410063Z
-1
-slice2009
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-13763
-\f
-lsroot.c
-file
-
-
-
-
-2012-05-15T01:06:34.000000Z
-55a5a9b6c4ec0b2f6ee39d14ec82b276
-2011-04-04T13:39:25.410063Z
-1
-slice2009
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2807
-\f
-fsw_posix.h
-file
-
-
-
-
-2012-05-15T01:06:34.000000Z
-cbfe2e553a18fcb978b5ebfd3a06def1
-2011-04-04T13:39:25.410063Z
-1
-slice2009
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3297
-\f
-README
-file
-
-
-
-
-2012-05-15T01:06:34.000000Z
-9fbd16e1fb2413b7e0780f603f26de91
-2011-04-04T13:39:25.410063Z
-1
-slice2009
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-134
-\f
-lslr.c
-file
-
-
-
-
-2012-05-15T01:06:34.000000Z
-a26b88236b0a0e7bfbb2adaa5d4836f4
-2011-04-04T13:39:25.410063Z
-1
-slice2009
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-4059
-\f
diff --git a/filesystems/test/.svn/text-base/README.svn-base b/filesystems/test/.svn/text-base/README.svn-base
deleted file mode 100644 (file)
index c7c34e4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-This folder contains tests for VBoxFsDxe module, allowing up 
-and test filesystems without EFI environment and launching whole VBox. 
diff --git a/filesystems/test/.svn/text-base/fsw_posix.c.svn-base b/filesystems/test/.svn/text-base/fsw_posix.c.svn-base
deleted file mode 100644 (file)
index eee8c5f..0000000
+++ /dev/null
@@ -1,479 +0,0 @@
-/**
- * \file fsw_posix.c
- * POSIX user space host environment code.
- */
-
-/*-
- * Copyright (c) 2006 Christoph Pfisterer
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *  * Neither the name of Christoph Pfisterer nor the names of the
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "fsw_posix.h"
-
-
-#ifndef FSTYPE
-/** The file system type name to use. */
-#define FSTYPE ext2
-#endif
-
-
-// function prototypes
-
-fsw_status_t fsw_posix_open_dno(struct fsw_posix_volume *pvol, const char *path, int required_type,
-                                struct fsw_shandle *shand);
-
-void fsw_posix_change_blocksize(struct fsw_volume *vol,
-                              fsw_u32 old_phys_blocksize, fsw_u32 old_log_blocksize,
-                              fsw_u32 new_phys_blocksize, fsw_u32 new_log_blocksize);
-fsw_status_t fsw_posix_read_block(struct fsw_volume *vol, fsw_u32 phys_bno, void *buffer);
-
-/**
- * Dispatch table for our FSW host driver.
- */
-
-struct fsw_host_table   fsw_posix_host_table = {
-    FSW_STRING_TYPE_ISO88591,
-
-    fsw_posix_change_blocksize,
-    fsw_posix_read_block
-};
-
-extern struct fsw_fstype_table   FSW_FSTYPE_TABLE_NAME(FSTYPE);
-
-
-/**
- * Mount function.
- */
-
-struct fsw_posix_volume * fsw_posix_mount(const char *path, struct fsw_fstype_table *fstype_table)
-{
-    fsw_status_t        status;
-    struct fsw_posix_volume *pvol;
-
-    // allocate volume structure
-    status = fsw_alloc_zero(sizeof(struct fsw_posix_volume), (void **)&pvol);
-    if (status)
-        return NULL;
-    pvol->fd = -1;
-
-    // open underlying file/device
-    pvol->fd = open(path, O_RDONLY, 0);
-    if (pvol->fd < 0) {
-        fprintf(stderr, "fsw_posix_mount: %s: %s\n", path, strerror(errno));
-        fsw_free(pvol);
-        return NULL;
-    }
-
-    // mount the filesystem
-    if (fstype_table == NULL)
-        fstype_table = &FSW_FSTYPE_TABLE_NAME(FSTYPE);
-    status = fsw_mount(pvol, &fsw_posix_host_table, fstype_table, &pvol->vol);
-    if (status) {
-        fprintf(stderr, "fsw_posix_mount: fsw_mount returned %d\n", status);
-        fsw_free(pvol);
-        return NULL;
-    }
-
-    return pvol;
-}
-
-/**
- * Unmount function.
- */
-
-int fsw_posix_unmount(struct fsw_posix_volume *pvol)
-{
-    if (pvol->vol != NULL)
-        fsw_unmount(pvol->vol);
-    fsw_free(pvol);
-    return 0;
-}
-
-/**
- * Open a named regular file.
- */
-
-struct fsw_posix_file * fsw_posix_open(struct fsw_posix_volume *pvol, const char *path, int flags, mode_t mode)
-{
-    fsw_status_t        status;
-    struct fsw_posix_file *file;
-
-    // TODO: check flags for unwanted values
-
-    // allocate file structure
-    status = fsw_alloc(sizeof(struct fsw_posix_file), &file);
-    if (status)
-        return NULL;
-    file->pvol = pvol;
-
-    // open the file
-    status = fsw_posix_open_dno(pvol, path, FSW_DNODE_TYPE_FILE, &file->shand);
-    if (status) {
-        fprintf(stderr, "fsw_posix_open: open_dno returned %d\n", status);
-        fsw_free(file);
-        return NULL;
-    }
-
-    return file;
-}
-
-/**
- * Read data from a regular file.
- */
-
-ssize_t fsw_posix_read(struct fsw_posix_file *file, void *buf, size_t nbytes)
-{
-    fsw_status_t        status;
-    fsw_u32             buffer_size;
-
-    buffer_size = nbytes;
-    status = fsw_shandle_read(&file->shand, &buffer_size, buf);
-    if (status)
-        return -1;
-    return buffer_size;
-}
-
-/**
- * Change position within a regular file.
- */
-
-off_t fsw_posix_lseek(struct fsw_posix_file *file, off_t offset, int whence)
-{
-    fsw_u64             base_offset = 0;
-
-    // get base offset
-    base_offset = 0;
-    if (whence == SEEK_CUR)
-        base_offset = file->shand.pos;
-    else if (whence == SEEK_END)
-        base_offset = file->shand.dnode->size;
-
-    // calculate new offset, prevent seeks before the start of the file
-    if (offset < 0 && -offset > base_offset)
-        file->shand.pos = 0;
-    else
-        file->shand.pos = base_offset + offset;
-
-    return file->shand.pos;
-}
-
-/**
- * Close a regular file.
- */
-
-int fsw_posix_close(struct fsw_posix_file *file)
-{
-    fsw_shandle_close(&file->shand);
-    fsw_free(file);
-    return 0;
-}
-
-/**
- * Open a directory for iteration.
- */
-
-struct fsw_posix_dir * fsw_posix_opendir(struct fsw_posix_volume *pvol, const char *path)
-{
-    fsw_status_t        status;
-    struct fsw_posix_dir *dir;
-
-    // allocate file structure
-    status = fsw_alloc(sizeof(struct fsw_posix_dir), &dir);
-    if (status)
-        return NULL;
-    dir->pvol = pvol;
-
-    // open the directory
-    status = fsw_posix_open_dno(pvol, path, FSW_DNODE_TYPE_DIR, &dir->shand);
-    if (status) {
-        fprintf(stderr, "fsw_posix_opendir: open_dno returned %d\n", status);
-        fsw_free(dir);
-        return NULL;
-    }
-
-    return dir;
-}
-
-/**
- * Read the next entry from a directory.
- */
-
-struct dirent * fsw_posix_readdir(struct fsw_posix_dir *dir)
-{
-    fsw_status_t        status;
-    struct fsw_dnode    *dno;
-    static struct dirent dent;
-
-    // get next entry from file system
-    status = fsw_dnode_dir_read(&dir->shand, &dno);
-    if (status) {
-        if (status != 4)
-            fprintf(stderr, "fsw_posix_readdir: fsw_dnode_dir_read returned %d\n", status);
-        return NULL;
-    }
-    status = fsw_dnode_fill(dno);
-    if (status) {
-        fprintf(stderr, "fsw_posix_readdir: fsw_dnode_fill returned %d\n", status);
-        fsw_dnode_release(dno);
-        return NULL;
-    }
-
-    // fill dirent structure
-    dent.d_fileno = dno->dnode_id;
-    dent.d_reclen = 8 + dno->name.size + 1;
-    switch (dno->type) {
-        case FSW_DNODE_TYPE_FILE:
-            dent.d_type = DT_REG;
-            break;
-        case FSW_DNODE_TYPE_DIR:
-            dent.d_type = DT_DIR;
-            break;
-        case FSW_DNODE_TYPE_SYMLINK:
-            dent.d_type = DT_LNK;
-            break;
-        default:
-            dent.d_type = DT_UNKNOWN;
-            break;
-    }
-#if 0
-    dent.d_namlen = dno->name.size;
-#endif
-    memcpy(dent.d_name, dno->name.data, dno->name.size);
-    dent.d_name[dno->name.size] = 0;
-
-    return &dent;
-}
-
-/**
- * Rewind a directory to the start.
- */
-
-void fsw_posix_rewinddir(struct fsw_posix_dir *dir)
-{
-    dir->shand.pos = 0;
-}
-
-/**
- * Close a directory.
- */
-
-int fsw_posix_closedir(struct fsw_posix_dir *dir)
-{
-    fsw_shandle_close(&dir->shand);
-    fsw_free(dir);
-    return 0;
-}
-
-/**
- * Open a shand of a required type by path.
- */
-
-fsw_status_t fsw_posix_open_dno(struct fsw_posix_volume *pvol, const char *path, int required_type, struct fsw_shandle *shand)
-{
-    fsw_status_t        status;
-    struct fsw_dnode    *dno;
-    struct fsw_dnode    *target_dno;
-    struct fsw_string   lookup_path;
-
-    lookup_path.type = FSW_STRING_TYPE_ISO88591;
-    lookup_path.len  = strlen(path);
-    lookup_path.size = lookup_path.len;
-    lookup_path.data = (void *)path;
-
-    // resolve the path (symlinks along the way are automatically resolved)
-    status = fsw_dnode_lookup_path(pvol->vol->root, &lookup_path, '/', &dno);
-    if (status) {
-        fprintf(stderr, "fsw_posix_open_dno: fsw_dnode_lookup_path returned %d\n", status);
-        return status;
-    }
-
-    // if the final node is a symlink, also resolve it
-    status = fsw_dnode_resolve(dno, &target_dno);
-    fsw_dnode_release(dno);
-    if (status) {
-        fprintf(stderr, "fsw_posix_open_dno: fsw_dnode_resolve returned %d\n", status);
-        return status;
-    }
-    dno = target_dno;
-
-    // check that it is a regular file
-    status = fsw_dnode_fill(dno);
-    if (status) {
-        fprintf(stderr, "fsw_posix_open_dno: fsw_dnode_fill returned %d\n", status);
-        fsw_dnode_release(dno);
-        return status;
-    }
-    if (dno->type != required_type) {
-        fprintf(stderr, "fsw_posix_open_dno: dnode is not of the requested type\n");
-        fsw_dnode_release(dno);
-        return FSW_UNSUPPORTED;
-    }
-
-    // open shandle
-    status = fsw_shandle_open(dno, shand);
-    if (status) {
-        fprintf(stderr, "fsw_posix_open_dno: fsw_shandle_open returned %d\n", status);
-    }
-    fsw_dnode_release(dno);
-    return status;
-}
-
-/**
- * FSW interface function for block size changes. This function is called by the FSW core
- * when the file system driver changes the block sizes for the volume.
- */
-
-void fsw_posix_change_blocksize(struct fsw_volume *vol,
-                                fsw_u32 old_phys_blocksize, fsw_u32 old_log_blocksize,
-                                fsw_u32 new_phys_blocksize, fsw_u32 new_log_blocksize)
-{
-    // nothing to do
-}
-
-/**
- * FSW interface function to read data blocks. This function is called by the FSW core
- * to read a block of data from the device. The buffer is allocated by the core code.
- */
-
-fsw_status_t fsw_posix_read_block(struct fsw_volume *vol, fsw_u32 phys_bno, void *buffer)
-{
-    struct fsw_posix_volume *pvol = (struct fsw_posix_volume *)vol->host_data;
-    off_t           block_offset, seek_result;
-    ssize_t         read_result;
-
-    FSW_MSG_DEBUGV((FSW_MSGSTR("fsw_posix_read_block: %d  (%d)\n"), phys_bno, vol->phys_blocksize));
-
-    // read from disk
-    block_offset = (off_t)phys_bno * vol->phys_blocksize;
-    seek_result = lseek(pvol->fd, block_offset, SEEK_SET);
-    if (seek_result != block_offset)
-        return FSW_IO_ERROR;
-    read_result = read(pvol->fd, buffer, vol->phys_blocksize);
-    if (read_result != vol->phys_blocksize)
-        return FSW_IO_ERROR;
-
-    return FSW_SUCCESS;
-}
-
-
-/**
- * Time mapping callback for the fsw_dnode_stat call. This function converts
- * a Posix style timestamp into an EFI_TIME structure and writes it to the
- * appropriate member of the EFI_FILE_INFO structure that we're filling.
- */
-
-/*
-static void fsw_posix_store_time_posix(struct fsw_dnode_stat *sb, int which, fsw_u32 posix_time)
-{
-    EFI_FILE_INFO       *FileInfo = (EFI_FILE_INFO *)sb->host_data;
-
-    if (which == FSW_DNODE_STAT_CTIME)
-        fsw_posix_decode_time(&FileInfo->CreateTime,       posix_time);
-    else if (which == FSW_DNODE_STAT_MTIME)
-        fsw_posix_decode_time(&FileInfo->ModificationTime, posix_time);
-    else if (which == FSW_DNODE_STAT_ATIME)
-        fsw_posix_decode_time(&FileInfo->LastAccessTime,   posix_time);
-}
-*/
-
-/**
- * Mode mapping callback for the fsw_dnode_stat call. This function looks at
- * the Posix mode passed by the file system driver and makes appropriate
- * adjustments to the EFI_FILE_INFO structure that we're filling.
- */
-
-/*
-static void fsw_posix_store_attr_posix(struct fsw_dnode_stat *sb, fsw_u16 posix_mode)
-{
-    EFI_FILE_INFO       *FileInfo = (EFI_FILE_INFO *)sb->host_data;
-
-    if ((posix_mode & S_IWUSR) == 0)
-        FileInfo->Attribute |= EFI_FILE_READ_ONLY;
-}
-*/
-
-/**
- * Common function to fill an EFI_FILE_INFO with information about a dnode.
- */
-
-/*
-EFI_STATUS fsw_posix_dnode_fill_FileInfo(IN FSW_VOLUME_DATA *Volume,
-                                       IN struct fsw_dnode *dno,
-                                       IN OUT UINTN *BufferSize,
-                                       OUT VOID *Buffer)
-{
-    EFI_STATUS          Status;
-    EFI_FILE_INFO       *FileInfo;
-    UINTN               RequiredSize;
-    struct fsw_dnode_stat sb;
-
-    // make sure the dnode has complete info
-    Status = fsw_posix_map_status(fsw_dnode_fill(dno), Volume);
-    if (EFI_ERROR(Status))
-        return Status;
-
-    // TODO: check/assert that the dno's name is in UTF16
-
-    // check buffer size
-    RequiredSize = SIZE_OF_EFI_FILE_INFO + fsw_posix_strsize(&dno->name);
-    if (*BufferSize < RequiredSize) {
-        // TODO: wind back the directory in this case
-
-        *BufferSize = RequiredSize;
-        return EFI_BUFFER_TOO_SMALL;
-    }
-
-    // fill structure
-    ZeroMem(Buffer, RequiredSize);
-    FileInfo = (EFI_FILE_INFO *)Buffer;
-    FileInfo->Size = RequiredSize;
-    FileInfo->FileSize          = dno->size;
-    FileInfo->Attribute         = 0;
-    if (dno->type == FSW_DNODE_TYPE_DIR)
-        FileInfo->Attribute    |= EFI_FILE_DIRECTORY;
-    fsw_posix_strcpy(FileInfo->FileName, &dno->name);
-
-    // get the missing info from the fs driver
-    ZeroMem(&sb, sizeof(struct fsw_dnode_stat));
-    sb.store_time_posix = fsw_posix_store_time_posix;
-    sb.store_attr_posix = fsw_posix_store_attr_posix;
-    sb.host_data = FileInfo;
-    Status = fsw_posix_map_status(fsw_dnode_stat(dno, &sb), Volume);
-    if (EFI_ERROR(Status))
-        return Status;
-    FileInfo->PhysicalSize      = sb.used_bytes;
-
-    // prepare for return
-    *BufferSize = RequiredSize;
-    return EFI_SUCCESS;
-}
-*/
-
-// EOF
diff --git a/filesystems/test/.svn/text-base/fsw_posix.h.svn-base b/filesystems/test/.svn/text-base/fsw_posix.h.svn-base
deleted file mode 100644 (file)
index 8ab72f5..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * \file fsw_posix.h
- * POSIX user space host environment header.
- */
-
-/*-
- * Copyright (c) 2006 Christoph Pfisterer
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *  * Neither the name of Christoph Pfisterer nor the names of the
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _FSW_POSIX_H_
-#define _FSW_POSIX_H_
-
-#include "fsw_core.h"
-
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/dir.h>
-
-
-/**
- * POSIX Host: Private per-volume structure.
- */
-
-struct fsw_posix_volume {
-    struct fsw_volume           *vol;           //!< FSW volume structure
-
-    int                         fd;             //!< System file descriptor for data access
-
-};
-
-/**
- * POSIX Host: Private structure for an open file.
- */
-
-struct fsw_posix_file {
-    struct fsw_posix_volume     *pvol;          //!< POSIX host volume structure
-
-    struct fsw_shandle          shand;          //!< FSW handle for this file
-
-};
-
-/**
- * POSIX Host: Private structure for an open directory.
- */
-
-struct fsw_posix_dir {
-    struct fsw_posix_volume     *pvol;          //!< POSIX host volume structure
-
-    struct fsw_shandle          shand;          //!< FSW handle for this file
-
-};
-
-
-/* functions */
-
-struct fsw_posix_volume * fsw_posix_mount(const char *path, struct fsw_fstype_table *fstype_table);
-int fsw_posix_unmount(struct fsw_posix_volume *pvol);
-
-struct fsw_posix_file * fsw_posix_open(struct fsw_posix_volume *pvol, const char *path, int flags, mode_t mode);
-ssize_t fsw_posix_read(struct fsw_posix_file *file, void *buf, size_t nbytes);
-off_t fsw_posix_lseek(struct fsw_posix_file *file, off_t offset, int whence);
-int fsw_posix_close(struct fsw_posix_file *file);
-
-struct fsw_posix_dir * fsw_posix_opendir(struct fsw_posix_volume *pvol, const char *path);
-struct dirent * fsw_posix_readdir(struct fsw_posix_dir *dir);
-void fsw_posix_rewinddir(struct fsw_posix_dir *dir);
-int fsw_posix_closedir(struct fsw_posix_dir *dir);
-
-
-#endif
diff --git a/filesystems/test/.svn/text-base/fsw_posix_base.h.svn-base b/filesystems/test/.svn/text-base/fsw_posix_base.h.svn-base
deleted file mode 100644 (file)
index ee1d96c..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * \file fsw_posix_base.h
- * Base definitions for the POSIX user space host environment.
- */
-
-/*-
- * Copyright (c) 2006 Christoph Pfisterer
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *  * Neither the name of Christoph Pfisterer nor the names of the
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _FSW_POSIX_BASE_H_
-#define _FSW_POSIX_BASE_H_
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-#define FSW_LITTLE_ENDIAN (1)
-// TODO: use info from the headers to define FSW_LITTLE_ENDIAN or FSW_BIG_ENDIAN
-
-
-// types
-
-typedef signed char         fsw_s8;
-typedef unsigned char       fsw_u8;
-typedef short               fsw_s16;
-typedef unsigned short      fsw_u16;
-typedef long                fsw_s32;
-typedef unsigned long       fsw_u32;
-typedef long long           fsw_s64;
-typedef unsigned long long  fsw_u64;
-
-
-// allocation functions
-
-#define fsw_alloc(size, ptrptr) (((*(ptrptr) = malloc(size)) == NULL) ? FSW_OUT_OF_MEMORY : FSW_SUCCESS)
-#define fsw_free(ptr) free(ptr)
-
-// memory functions
-
-#define fsw_memzero(dest,size) memset(dest,0,size)
-#define fsw_memcpy(dest,src,size) memcpy(dest,src,size)
-#define fsw_memeq(p1,p2,size) (memcmp(p1,p2,size) == 0)
-
-// message printing
-
-#define FSW_MSGSTR(s) s
-#define FSW_MSGFUNC printf
-
-// 64-bit hooks
-
-#define FSW_U64_SHR(val,shiftbits) ((val) >> (shiftbits))
-#define FSW_U64_DIV(val,divisor) ((val) / (divisor))
-#define DEBUG(x)
-
-#define RShiftU64(val, shift) ((val) >> (shift))
-#define LShiftU64(val, shift) ((val) << (shift))
-
-#endif
diff --git a/filesystems/test/.svn/text-base/lslr.c.svn-base b/filesystems/test/.svn/text-base/lslr.c.svn-base
deleted file mode 100644 (file)
index d3e4e3c..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * \file lslr.c
- * Test program for the POSIX user space environment.
- */
-
-/*-
- * Copyright (c) 2006 Christoph Pfisterer
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *  * Neither the name of Christoph Pfisterer nor the names of the
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "fsw_posix.h"
-
-
-//extern struct fsw_fstype_table FSW_FSTYPE_TABLE_NAME(ext2);
-//extern struct fsw_fstype_table FSW_FSTYPE_TABLE_NAME(reiserfs);
-extern struct fsw_fstype_table FSW_FSTYPE_TABLE_NAME(FSTYPE);
-
-static struct fsw_fstype_table *fstypes[] = {
-    //&FSW_FSTYPE_TABLE_NAME(ext2),
-    //&FSW_FSTYPE_TABLE_NAME(reiserfs),
-    &FSW_FSTYPE_TABLE_NAME(FSTYPE       ),
-    NULL
-};
-
-static int listdir(struct fsw_posix_volume *vol, char *path, int level)
-{
-    struct fsw_posix_dir *dir;
-    struct dirent *dent;
-    int i;
-    char subpath[4096];
-
-    dir = fsw_posix_opendir(vol, path);
-    if (dir == NULL) {
-        printf("opendir(%s) call failed.\n", path);
-        return 1;
-    }
-    while ((dent = fsw_posix_readdir(dir)) != NULL) {
-        for (i = 0; i < level*2; i++)
-            fputc(' ', stdout);
-        printf("%d  %s\n", dent->d_type, dent->d_name);
-
-        if (dent->d_type == DT_DIR) {
-            snprintf(subpath, 4095, "%s%s/", path, dent->d_name);
-            listdir(vol, subpath, level + 1);
-        }
-    }
-    fsw_posix_closedir(dir);
-
-    return 0;
-}
-
-static int catfile(struct fsw_posix_volume *vol, char *path)
-{
-    struct fsw_posix_file *file;
-    int r;
-    char buf[256];
-
-    file = fsw_posix_open(vol, path, 0, 0);
-    if (file == NULL) {
-        printf("open(%s) call failed.\n", path);
-        return 1;
-    }
-    while ((r=fsw_posix_read(file, buf, sizeof(buf))) > 0)
-    {
-        int i;
-        for (i=0; i<r; i++)
-        {
-           printf("%c", buf[i]);
-        }
-    }
-    fsw_posix_close(file);
-
-    return 0;
-}
-
-int main(int argc, char **argv)
-{
-    struct fsw_posix_volume *vol;
-    int i;
-
-    if (argc != 2) {
-        printf("Usage: lslr <file/device>\n");
-        return 1;
-    }
-
-    for (i = 0; fstypes[i]; i++) {
-        vol = fsw_posix_mount(argv[1], fstypes[i]);
-        if (vol != NULL) {
-            printf("Mounted as '%s'.\n", fstypes[i]->name.data);
-            break;
-        }
-    }
-    if (vol == NULL) {
-        printf("Mounting failed.\n");
-        return 1;
-    }
-
-    //listdir(vol, "/System/Library/Extensions/udf.kext/", 0);
-    //listdir(vol, "/System/Library/Extensions/AppleACPIPlatform.kext/", 0);
-    //listdir(vol, "/System/Library/Extensions/", 0);
-    catfile(vol, "/System/Library/Extensions/AppleHPET.kext/Contents/Info.plist");
-    //listdir(vol, "/", 0);
-
-    fsw_posix_unmount(vol);
-
-    return 0;
-}
-
-// EOF
diff --git a/filesystems/test/.svn/text-base/lsroot.c.svn-base b/filesystems/test/.svn/text-base/lsroot.c.svn-base
deleted file mode 100644 (file)
index bb2cba0..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * \file lsroot.c
- * Example program for the POSIX user space environment.
- */
-
-/*-
- * Copyright (c) 2006 Christoph Pfisterer
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *  * Neither the name of Christoph Pfisterer nor the names of the
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "fsw_posix.h"
-
-
-extern struct fsw_fstype_table FSW_FSTYPE_TABLE_NAME(ext2);
-extern struct fsw_fstype_table FSW_FSTYPE_TABLE_NAME(reiserfs);
-extern struct fsw_fstype_table FSW_FSTYPE_TABLE_NAME(iso9660);
-extern struct fsw_fstype_table FSW_FSTYPE_TABLE_NAME(hfs);
-
-int main(int argc, char **argv)
-{
-    struct fsw_posix_volume *vol;
-    struct fsw_posix_dir *dir;
-    struct dirent *dent;
-
-    if (argc != 2) {
-        printf("Usage: lsroot <file/device>\n");
-        return 1;
-    }
-
-    //vol = fsw_posix_mount(argv[1], &FSW_FSTYPE_TABLE_NAME(ext2));
-    //vol = fsw_posix_mount(argv[1], &FSW_FSTYPE_TABLE_NAME(reiserfs));
-    vol = fsw_posix_mount(argv[1], &FSW_FSTYPE_TABLE_NAME(FSTYPE));
-    if (vol == NULL) {
-        printf("Mounting failed.\n");
-        return 1;
-    }
-    //dir = fsw_posix_opendir(vol, "/drivers/net/");
-    dir = fsw_posix_opendir(vol, "/");
-    if (dir == NULL) {
-        printf("opendir call failed.\n");
-        return 1;
-    }
-    while ((dent = fsw_posix_readdir(dir)) != NULL) {
-        printf("- %s\n", dent->d_name);
-    }
-    fsw_posix_closedir(dir);
-    fsw_posix_unmount(vol);
-
-    return 0;
-}
-
-// EOF
index a132ee6cf95d9e81179093e7cdbac6ae47ce7c9f..648da71929c1204b47bd507c8c69b0d6890c3a18 100755 (executable)
--- a/mkcdimage
+++ b/mkcdimage
@@ -39,6 +39,14 @@ ln ../../refind/refind.conf-sample ./refind.conf
 mkdir icons
 cd icons
 ln ../../../refind/icons/* ./
+cd ../
+mkdir drivers_x64
+cd drivers_x64
+ln ../../../refind/drivers_x64/* ./
+cd ..
+mkdir drivers_ia32
+cd drivers_ia32
+ln ../../../refind/drivers_x64/* ./
 cd ../../..
 
 # Get the size of the binaries to go in the El Torito image in kB
@@ -53,7 +61,7 @@ mv EFI/boot/shell*.efi ./
 # Prepare a FAT filesystem image and populate it with the
 # EFI boot files....
 dd if=/dev/zero of=refind-bin-$Version.img bs=1024 count=$ToritoSize
-mkdosfs -n "rEFInd.ET" refind-bin-$Version.img
+mkdosfs -n "ElTorito" refind-bin-$Version.img
 mcopy -irefind-bin-$Version.img -s EFI shell*.efi ::/
 
 # Make the ISO-9660 image file....
index 30c98255e053232f91e97911a329637899aa702a..bc44a2d8a46981d6ec1c36b9a5079c2c4b389611 100755 (executable)
--- a/mkdistrib
+++ b/mkdistrib
@@ -16,20 +16,26 @@ make clean
 # Prepare a place and copy files there....
 mkdir -p ../snapshots/$1/refind-$1/icons
 cp --preserve=timestamps icons/*icns ../snapshots/$1/refind-$1/icons/
-cp -a docs images include libeg refind install.sh CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1
+cp -a docs images include libeg refind filesystems install.sh CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1
 
-# Go there are prepare a souce code zip file....
+# Go there and prepare a souce code zip file....
 cd ../snapshots/$1/
 zip -9r refind-src-$1.zip refind-$1
 
-# Build the source code into a binary
+# Build the source code into binaries
 cd refind-$1
 make
-mkdir -p refind-bin-$1/refind
+make fs
+mkdir -p refind-bin-$1/refind/drivers_x64
+mkdir -p refind-bin-$1/refind/drivers_ia32
 cp -a icons refind-bin-$1/refind/
+cp --preserve=timestamps drivers/*_x64.efi refind-bin-$1/refind/drivers_x64/
+cp --preserve=timestamps filesystems/LICENSE*txt refind-bin-$1/refind/drivers_x64/
+cp --preserve=timestamps filesystems/LICENSE*txt refind-bin-$1/refind/drivers_ia32/
 cp --preserve=timestamps refind.conf-sample refind-bin-$1/refind/
 cp refind/refind_x64.efi refind-bin-$1/refind/refind_x64.efi
 cp $StartDir/refind_ia32.efi refind-bin-$1/refind/
+cp $StartDir/drivers/*_ia32.efi refind-bin-$1/refind/drivers_ia32/
 cp -a COPYING.txt LICENSE.txt README.txt docs CREDITS.txt install.sh refind-bin-$1
 zip -9r ../refind-bin-$1.zip refind-bin-$1
 cd ..
index f619bec592fc4225bf59bec466566da68d1e7951..8dd041e843bcaef0db470d9637e80d43c936a62f 100644 (file)
 #define MACOSX_LOADER_PATH      L"System\\Library\\CoreServices\\boot.efi"
 #if defined (EFIX64)
 #define SHELL_NAMES             L"\\EFI\\tools\\shell.efi,\\shellx64.efi"
+#define DRIVER_DIRS             L"drivers,drivers_x64"
 #elif defined (EFI32)
 #define SHELL_NAMES             L"\\EFI\\tools\\shell.efi,\\shellia32.efi"
+#define DRIVER_DIRS             L"drivers,drivers_ia32"
 #else
 #define SHELL_NAMES             L"\\EFI\\tools\\shell.efi"
 #endif
@@ -104,7 +106,7 @@ static VOID AboutrEFInd(VOID)
 {
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.3.5.1");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.0");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
@@ -1372,16 +1374,22 @@ Done:
 // file line.
 static VOID LoadDrivers(VOID)
 {
-    CHAR16        *Directory;
+    CHAR16        *Directory, *SelfDirectory;
     UINTN         i = 0, Length, NumFound = 0;
 
-    // load drivers from the "drivers" subdirectory of rEFInd's home directory
-    Directory = StrDuplicate(SelfDirPath);
-    CleanUpPathNameSlashes(Directory);
-    MergeStrings(&Directory, L"drivers", L'\\');
-    NumFound += ScanDriverDir(Directory);
+    // load drivers from the subdirectories of rEFInd's home directory specified
+    // in the DRIVER_DIRS constant.
+    while ((Directory = FindCommaDelimited(DRIVER_DIRS, i++)) != NULL) {
+       SelfDirectory = StrDuplicate(SelfDirPath);
+       CleanUpPathNameSlashes(SelfDirectory);
+       MergeStrings(&SelfDirectory, Directory, L'\\');
+       NumFound += ScanDriverDir(SelfDirectory);
+       FreePool(Directory);
+       FreePool(SelfDirectory);
+    }
 
     // Scan additional user-specified driver directories....
+    i = 0;
     while ((Directory = FindCommaDelimited(GlobalConfig.DriverDirs, i++)) != NULL) {
        CleanUpPathNameSlashes(Directory);
        Length = StrLen(Directory);