]> code.delx.au - refind/blobdiff - BUILDING.txt
Added new "icons_dir" configuration file token.
[refind] / BUILDING.txt
index a3d2dc816ea6a0ebe80822894d3bf8d620174e66..91d86f9d579d9a8c7dec3f96254ac25a16352c4b 100644 (file)
@@ -48,14 +48,14 @@ To compile rEFInd, you'll need the following:
 
 * A standard set of Linux development tools, based on GCC.
 
-* The GNU-EFI package (http://sourceforge.net/projects/gnu-efi/). You
-  can install this from a package called "gnu-efi"; however, rEFInd relies
-  on features that were added somewhere between GNU-EFI 3.0i and 3.0p to
-  provide driver-loading capabilities. As of 4/2012, most Linux
-  distributions seem to deliver rather elderly versions of GNU-EFI, so you
-  may need to download the latest source code, compile it, and install it
-  locally. Since rEFInd version 0.2.7, the Makefiles assume this (see
-  below).
+* The GNU-EFI package (http://sourceforge.net/projects/gnu-efi/). You can
+  install this from a package called "gnu-efi"; however, rEFInd relies on
+  features that were added in (I think) 3.0l to provide driver-loading
+  capabilities. The versions I've used and that work are 3.0p and 3.0q. As
+  of 5/2012, most Linux distributions seem to deliver rather elderly
+  versions of GNU-EFI, so you may need to download the latest source code,
+  compile it, and install it locally. Since rEFInd version 0.2.7, the
+  Makefiles assume this (see below).
 
 It's possible that you could use a non-Linux platform to compile rEFInd. To
 the best of my knowledge, the rEFInd code doesn't rely on anything
@@ -82,7 +82,8 @@ With your development system set up, you can compile rEFInd as follows:
    "refind", "libeg", and "include".
 
 4) Type "make". With any luck, rEFInd will compile without error, leaving
-   the "refind.efi" file in the "refind" subdirectory.
+   the "refind_ia32.efi" or "refind_x64.efi" file, depending on your
+   platform, in the "refind" subdirectory.
 
 If rEFInd doesn't compile correctly, you'll need to track down the source
 of the problem. Double-check that you've got all the necessary development
@@ -99,12 +100,12 @@ EFICRT0         = /usr/local/lib
 
 If you've installed GNU-EFI from a distribution's package, you may need to
 remove "local" from those paths, and perhaps change references to "lib" to
-"lib64". As noted earlier, though, as of 4/2012, most distributions provide
+"lib64". As noted earlier, though, as of 5/2012, most distributions provide
 out-of-date GNU-EFI implementations that will not work with rEFInd 0.2.7
 and later.
 
 When I tried to compile rEFInd under Ubuntu 12.04 (i386), even with a
-locally-compiled GNU-EFI 3.0p, I got errors like this:
+locally-compiled GNU-EFI 3.0p or 3.0q, I got errors like this:
 
 main.o: In function `StartLegacy.isra.0':
 main.c:(.text+0x8b1): undefined reference to `__stack_chk_fail_local'
@@ -112,28 +113,41 @@ lib.o: In function `ScanVolumeBootcode.part.3':
 lib.c:(.text+0xf2f): undefined reference to `__stack_chk_fail_local'
 lib.o: In function `ScanExtendedPartition.isra.4':
 
-The solution was to recompile GNU-EFI 3.0p with the -fno-stack-protector
-GCC flag. In GNU-EFI, this can be added to the CFLAGS line in Make.common.
+The solution was to recompile GNU-EFI with the -fno-stack-protector GCC
+flag. In GNU-EFI, this can be added to the CFLAGS line in Make.defaults.
 
 Installing rEFInd
 =================
 
-With rEFInd compiled, you can install it. On a UEFI-based system, you'll
-want to copy files on the ESP as follows:
+With rEFInd compiled, you can install it. The easiest way to do this is
+with the install.sh script, which works on both Linux and Mac OS X.
+Alternatively, you can type "make install" to install using this script.
+Note that this installation copies files to the ESP and uses "efibootmgr"
+(on Linux) or "bless" (on OS X) to add rEFInd to the firmware's boot loader
+list. The docs/refind/installing.html file provides more details on this
+script and its use.
+
+If install.sh doesn't work for you or if you prefer to do the job manually,
+you may. On a UEFI-based system, you'll want to copy files on the ESP as
+follows:
 
 * Create a directory for rEFInd, such as EFI/refind.
-* Copy refind/refind.efi to the ESP's EFI/refind directory.
+* Copy refind/refind_ia32.efi or refind_x64.efi to the ESP's EFI/refind
+  directory.
 * Copy refind.conf-sample to the EFI/refind directory as refind.conf.
 * Copy the icons subdirectory, including all its files, to EFI/refind.
 
 You'll then need to activate rEFInd in your EFI. This can be done with
 tools such as "efibootmgr" under Linux or "bless" under OS X. See the
-docs/installing.html file for details.
-
-You may have noticed an install.sh script in the source package. This
-script is intended for distribution with my own binary packages of rEFInd,
-and it copies files from the "refind" subdirectory (relative to the
-script's location) -- namely refind_x64.efi or refind_ia32.efi,
-refind.conf-sample, and an icons subdirectory. You can rearrange your files
-to provide this layout, but it's no more work to copy the files as just
-described.
+docs/refind/installing.html file for details.
+
+Note to Distribution Maintainers
+================================
+
+The install.sh script, and therefore the "install" target in the Makefile,
+installs the program directly to the ESP and it modifies the *CURRENT
+COMPUTER's* NVRAM. Thus, you should *NOT* use this target as part of the
+build process for your binary packages (RPMs, Debian packages, etc.).
+(Gentoo could use it in an ebuild, though....) You COULD, however, copy the
+files to a directory somewhere (/usr/share/refind or whatever) and then
+call install.sh as part of the binary package installation process.