From e07b72471fa62945801b4a4e3bcac662a1b4888d Mon Sep 17 00:00:00 2001
From: srs5694
Originally written: 3/14/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html index bf402c7..508512a 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index ff59c2d..bacb267 100644 --- a/docs/refind/drivers.html +++ b/docs/refind/drivers.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 4/19/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
@@ -175,7 +175,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comNote that most of these uses are theoretical, at least to me; I don't know of any specific examples of EFI drivers (available as separate files) for disk controller hardware, network cards, or video cards. Such drivers are often embedded in the firmware of the devices themselves, and should be loaded automatically by the EFI. Chances are good that a few such drivers are available, unknown to me, and more may become available in the future. If you happen to have a device and need support for it under EFI, searching for drivers is certainly worth doing.
-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 EFI stub loader support from booting from the ESP of at least some Macs.
+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 somewhat 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 EFI stub loader support from booting from the ESP of at least some Macs.
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.
@@ -220,6 +220,17 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com changing /dev/sda2 to your filesystem's device. +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 "Notes on Specific Drivers;" however, these problems are very minor on most systems.
+All of these drivers rely on filesystem wrapper code written by rEFIt's author, Christoph Phisterer.
@@ -265,19 +276,19 @@ fs0: map -rMost 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 Unknown. (I fixed that bug for rEFInd's version, and it wasn't present in the original rEFIt drivers.)
+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 Unknown. (I fixed that bug for rEFInd's version, and it wasn't present in the original rEFIt drivers.) Most of these drivers also suffer from speed problems on some computers. This is worst with the ext2fs drivers under VirtualBox; on my main computer, that combination takes 3 minutes to load a Linux kernel and initial RAM disk file! Most real computers don't suffer nearly so badly, but some can take an extra five seconds or so to boot a kernel. I've fixed the speed problems in rEFInd's drivers as of version 0.7.0.
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 tell me about it, so I can share the information here. Likewise if you know of a source for other EFI drivers—say, for a video card or disk controller card.
@@ -287,11 +298,9 @@ fs0: map -rI've tested several of the drivers described on this page on a handful of systems. The Pfisterer ext2fs driver (from any source) works on both ext2fs and ext3fs, but not on ext4fs—but Agner's derivative ext4fs driver handles ext4fs, so that's not a problem. The ReiserFS driver is obviously useful only on ReiserFS partitions. (Reiser4 is not supported, as far as I know.) Given that ext2fs, ext3fs, and ReiserFS are getting a bit on in age by Linux standards, you might do well to use them on a separate Linux /boot partition; however, if you're willing to use ext3fs, ext4fs, or ReiserFS on your root (/) 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.
- -The Pfisterer ReiserFS and ext2fs drivers work, but they are a bit sluggish—particularly the ext2fs driver. The Agner ext4fs driver, when handling an actual ext4 filesystem, is in-between these two drivers in speed. 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, with ext4fs it's 75 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—my kernel loads in just 3 seconds from a ReiserFS partition and in 13 seconds from an ext2 filesystem. Speeds were similar with my newest computer, an ASUS P8H77-I board. Times with ext2fs on a UEFI PC with an Intel motherboard are in the 2–4 second range. 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 ext4fs or ReiserFS instead of ext2fs or ext3fs, at least if a change is practical. (For a /boot 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 /etc/fstab entry for a new UUID value, though. As noted earlier, be sure to use notail as an option in /etc/fstab for ReiserFS if you want to read it from EFI.) You can even use HFS+ on a Linux /boot partition, although this makes the most sense on a Mac, which has its own EFI HFS+ driver. Of course, you can also create a FAT /boot partition and not deal with drivers at all. Mounting your ESP at /boot is a practical solution for many users.
+I've tested several of the drivers described on this page on a handful of systems. The Pfisterer ext2fs driver (from any source) works on both ext2fs and ext3fs, but not on ext4fs—but Agner's derivative ext4fs driver handles ext4fs, so that's not a problem. The ReiserFS driver is obviously useful only on ReiserFS partitions. (Reiser4 is not supported, as far as I know.) The Btrfs driver is the newest of the lot, and so I've tested it the least, but it's worked for me on two test systems. Given that ext2fs, ext3fs, and ReiserFS are getting a bit on in age by Linux standards, you might do well to use them on a separate Linux /boot partition; however, if you're willing to use ext3fs, ext4fs, Btrfs, or ReiserFS on your root (/) 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.
-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. The NTFS driver from the Clover Tools package is nice and speedy, so if for some reason you need to place a boot loader on an NTFS volume, this driver might be worth tracking down.
+As noted earlier, rEFInd's drivers prior to version 0.7.0, as well as related drivers from rEFIt, Clover, and VirtualBox, suffer from speed problems. These problems are mostly minor, adding a second or two to boot times; but on some computers, the speed problems can be dramatic, boosting kernel-load times up to as much as three minutes (under VirtualBox). If you run into excessive boot times with such a driver, try switching to the latest rEFInd driver instead.
Although ext2fs, ext3fs, ext4fs, and ReiserFS are all case-sensitive, these drivers treat them in a case-insensitive way. Symbolic links work; however, rEFInd 0.6.11 and later ignore symbolic links, since many distributions use them in a way that creates redundant or non-functional entries in the rEFInd menu. You should be able to use hard links if you want to use a single kernel file in multiple ways (say for two distributions).
diff --git a/docs/refind/features.html b/docs/refind/features.html index 50b27d5..d2064c7 100644 --- a/docs/refind/features.html +++ b/docs/refind/features.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
@@ -151,7 +151,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
@@ -136,7 +136,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
diff --git a/docs/refind/linux.html b/docs/refind/linux.html index 1acfafa..6decdd5 100644 --- a/docs/refind/linux.html +++ b/docs/refind/linux.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/19/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
@@ -182,7 +182,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comThis method requires that your /boot directory, whether it's on a separate partition or is a regular directory in your root (/) filesystem, be readable by the EFI. At the moment, all EFI implementations can read FAT and Macs can read HFS+. By using drivers, you can make any EFI read HFS+, ISO-9660, ReiserFS, ext2fs, ext3fs, or ext4fs. Thus, if you use any of these filesystems on a regular partition (not an LVM or RAID configuration) that holds your kernels in /boot, you qualify for this easy method. The default partition layouts used by Ubuntu, Fedora, and many other distributions qualify, because they use one of these filesystems (usually ext4fs) in a normal partition or on a separate /boot partition. You must also have a 3.3.0 or later Linux kernel with EFI stub support, of course.
+This method requires that your /boot directory, whether it's on a separate partition or is a regular directory in your root (/) filesystem, be readable by the EFI. At the moment, all EFI implementations can read FAT and Macs can read HFS+. By using drivers, you can make any EFI read HFS+, ISO-9660, ReiserFS, ext2fs, ext3fs, ext4fs, or Btrfs. Thus, if you use any of these filesystems on a regular partition (not an LVM or RAID configuration) that holds your kernels in /boot, you qualify for this easy method. The default partition layouts used by Ubuntu, Fedora, and many other distributions qualify, because they use one of these filesystems (usually ext4fs) in a normal partition or on a separate /boot partition. You must also have a 3.3.0 or later Linux kernel with EFI stub support, of course.
If you installed rEFInd 0.6.0 or later with its install.sh script from your regular Linux installation, chances are everything's set up; you should be able to reboot and see your Linux kernels as boot options. If you installed manually, from OS X, or from an emergency system, though, you may need to do a couple of things manually: @@ -250,7 +250,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
If your /boot directory happens to be on an XFS, JFS, or Btrfs partition that the EFI can't read, or it's tucked away in an LVM or RAID configuration that the EFI can't read, you won't be able to use the easiest solution. Fortunately, this problem can be overcome with relatively little fuss. Several variant procedures are possible, but I begin by describing one that will almost always work, although it's got some important caveats (described at the end). You should perform the following steps as root, or precede each of these commands with sudo:
+If your /boot directory happens to be on an XFS or JFS partition that the EFI can't read, or it's tucked away in an LVM or RAID configuration that the EFI can't read, you won't be able to use the easiest solution. Fortunately, this problem can be overcome with relatively little fuss. Several variant procedures are possible, but I begin by describing one that will almost always work, although it's got some important caveats (described at the end). You should perform the following steps as root, or precede each of these commands with sudo:
Once this task is done, updates to your kernel will automatically be stored in the root directory of your ESP, where rEFInd will automatically detect them. Thus, the boot configuration becomes maintenance-free. The procedure as just described has some drawbacks, though. By placing your kernels in the root directory of your ESP, you render them vulnerable to any other OS with which you might be dual-booting. Your ESP must also be large enough to hold all your kernels. If you dual-boot with multiple Linux distributions, they might conceivably overwrite each others' kernels, and distinguishing one from another becomes more difficult.
-For these reasons, a variant of this procedure is desirable on some systems. Most of the steps are similar, but in this variant, you create a separate /boot partition that's independent of the ESP. This partition can use FAT, HFS+, ReiserFS, ext2fs, ext3fs, or ext4fs; but if you use any of the last five filesystems (four on Macs), you must install the matching EFI filesystem driver that ships with rEFInd. Creating the filesystem will normally require you to shrink an existing partition by a suitable amount (200–500MiB). Mount your new /boot partition at a temporary location, copy or move the current /boot files into it, unmount it, and add it to /etc/fstab as /boot.
+For these reasons, a variant of this procedure is desirable on some systems. Most of the steps are similar, but in this variant, you create a separate /boot partition that's independent of the ESP. This partition can use FAT, HFS+, ReiserFS, ext2fs, ext3fs, ext4fs, or Btrfs; but if you use any of the last six filesystems (five on Macs), you must install the matching EFI filesystem driver that ships with rEFInd. Creating the filesystem will normally require you to shrink an existing partition by a suitable amount (200–500MiB). Mount your new /boot partition at a temporary location, copy or move the current /boot files into it, unmount it, and add it to /etc/fstab as /boot.
-If your distribution already uses a separate /boot partition, but if it uses XFS or some other unsuitable filesystem, you can back it up, create a fresh FAT, HFS+, ReiserFS, ext2, ext3, or ext4 filesystem on it, and restore the original files. You'll probably need to adjust the UUID value in /etc/fstab to ensure that the computer mounts the new filesystem when you boot. If you use a separate non-ESP /boot partition, you'll probably want to continue mounting the ESP at /boot/efi.
+If your distribution already uses a separate /boot partition, but if it uses XFS or some other unsuitable filesystem, you can back it up, create a fresh FAT, HFS+, ReiserFS, Btrfs, ext2, ext3, or ext4 filesystem on it, and restore the original files. You'll probably need to adjust the UUID value in /etc/fstab to ensure that the computer mounts the new filesystem when you boot. If you use a separate non-ESP /boot partition, you'll probably want to continue mounting the ESP at /boot/efi.
Ordinarily, a kernel booted in this way must reside on the ESP, or at least on another FAT partition. On a Macintosh, though, you can use HFS+ to house your kernel files. In fact, that may be necessary; my Mac Mini hangs when I try to boot a Linux kernel via an EFI stub loader from the computer's ESP, but it works fine when booting from an HFS+ partition. If you use EFI drivers, though, you can place your kernel on any filesystem for which an EFI driver exists. This list is currently rather limited (ext2fs/ext3fs, ReiserFS, ISO-9660, and HFS+), but even just one or two options might help a lot if you've got an undersized ESP or if copying your kernel file to the ESP is a hassle you'd rather avoid.
+Ordinarily, a kernel booted in this way must reside on the ESP, or at least on another FAT partition. On a Macintosh, though, you can use HFS+ to house your kernel files. In fact, that may be necessary; my Mac Mini hangs when I try to boot a Linux kernel via an EFI stub loader from the computer's ESP, but it works fine when booting from an HFS+ partition. If you use EFI drivers, though, you can place your kernel on any filesystem for which an EFI driver exists. This list is currently good (ext2fs/ext3fs, ext4fs, ReiserFS, Btrfs, ISO-9660, and HFS+), so chances are you'll be able to use this method to boot your kernel from your root (/) partition or from a /boot partition.
rEFInd sorts boot loader entries within each directory by time stamp, so that the most recent entry comes first. Thus, if you specify a directory name (or a volume label, for loaders stored in a volume's root directory) as the default_selection, rEFInd will make the most recent loader in the directory the default. This can obviate the need to adjust this configuration parameter when you add a new kernel; chances are you want the most recently-added kernel to be the default, and rEFInd makes it so when you set the default_selection in this way. If you don't want the latest kernel to become the default, you can use touch to give the desired kernel (or other boot loader) in the directory a more recent time stamp, or you can set default_selection to a value that uniquely identifies your desired default loader. One caveat you should keep in mind is that the EFI and Windows interpret the hardware clock as local time, whereas Mac OS X uses Coordinated Universal Time (UTC). Linux can work either way. Thus, time stamps for boot loaders can be skewed by several hours depending on the environment in which they were created or last modified.
diff --git a/docs/refind/revisions.html b/docs/refind/revisions.html index ed3aebc..e77b7e3 100644 --- a/docs/refind/revisions.html +++ b/docs/refind/revisions.html @@ -14,7 +14,7 @@by Roderick W. Smith, rodsmith@rodsbooks.com
-Last Web page update: 6/18/2013
+Last Web page update: 6/27/2013
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!
@@ -130,6 +130,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 11/13/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
diff --git a/docs/refind/themes.html b/docs/refind/themes.html index 956b926..57ad4e0 100644 --- a/docs/refind/themes.html +++ b/docs/refind/themes.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 4/19/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
diff --git a/docs/refind/todo.html b/docs/refind/todo.html index 2ab1637..7fc8876 100644 --- a/docs/refind/todo.html +++ b/docs/refind/todo.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
@@ -359,19 +359,12 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -6/18/2013, referencing rEFInd 0.6.12
+6/27/2013, referencing rEFInd 0.7.0I'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!
diff --git a/filesystems/Make.gnuefi b/filesystems/Make.gnuefi index d3ea0ef..3b99878 100644 --- a/filesystems/Make.gnuefi +++ b/filesystems/Make.gnuefi @@ -31,7 +31,7 @@ ifeq ($(ARCH),x86_64) LD_CODE = elf_x86_64 endif -LOCAL_CPPFLAGS = -DCACHE=$(CACHE) -DFSTYPE=$(DRIVERNAME) $(ARCH_C_FLAGS) -I$(SRCDIR) -I$(SRCDIR)/../include -I$(SRCDIR)/../libeg +LOCAL_CPPFLAGS = -DFSTYPE=$(DRIVERNAME) $(ARCH_C_FLAGS) -I$(SRCDIR) -I$(SRCDIR)/../include -I$(SRCDIR)/../libeg OBJS = fsw_core.o fsw_efi.o fsw_efi_lib.o fsw_lib.o fsw_$(DRIVERNAME).o TARGET = $(DRIVERNAME)_$(FILENAME_CODE).efi diff --git a/filesystems/Make.tiano b/filesystems/Make.tiano index a61108b..b9ad0a8 100644 --- a/filesystems/Make.tiano +++ b/filesystems/Make.tiano @@ -80,7 +80,7 @@ LDFLAGS = -nostdlib -n -q --gc-sections --script=$(EDK2BASE)/BaseTools/S --entry _ModuleEntryPoint -u _ModuleEntryPoint -m $(LD_CODE) %.obj: %.c - $(CC) $(ARCH_C_FLAGS) $(CFLAGS) $(INCLUDE_DIRS) -DCACHE=$(CACHE) -DFSTYPE=$(DRIVERNAME) -DNO_BUILTIN_VA_FUNCS -c $< -o $@ + $(CC) $(ARCH_C_FLAGS) $(CFLAGS) $(INCLUDE_DIRS) -DFSTYPE=$(DRIVERNAME) -DNO_BUILTIN_VA_FUNCS -c $< -o $@ ifneq (,$(filter %.efi,$(BUILDME))) diff --git a/filesystems/Makefile b/filesystems/Makefile index f6a0011..4aa838e 100644 --- a/filesystems/Makefile +++ b/filesystems/Makefile @@ -18,27 +18,27 @@ all: $(FILESYSTEMS) ext2: rm -f fsw_efi.obj - +make DRIVERNAME=ext2 CACHE=0 -f Make.tiano + +make DRIVERNAME=ext2 -f Make.tiano ext4: rm -f fsw_efi.obj - +make DRIVERNAME=ext4 CACHE=1 -f Make.tiano + +make DRIVERNAME=ext4 -f Make.tiano reiserfs: rm -f fsw_efi.obj - +make DRIVERNAME=reiserfs CACHE=1 -f Make.tiano + +make DRIVERNAME=reiserfs -f Make.tiano iso9660: rm -f fsw_efi.obj - +make DRIVERNAME=iso9660 CACHE=1 -f Make.tiano + +make DRIVERNAME=iso9660 -f Make.tiano hfs: rm -f fsw_efi.obj - +make DRIVERNAME=hfs CACHE=1 -f Make.tiano + +make DRIVERNAME=hfs -f Make.tiano btrfs: rm -f fsw_efi.obj - +make DRIVERNAME=btrfs CACHE=1 -f Make.tiano + +make DRIVERNAME=btrfs -f Make.tiano # Build the drivers with GNU-EFI.... @@ -48,27 +48,27 @@ all_gnuefi: $(FILESYSTEMS_GNUEFI) ext2_gnuefi: rm -f fsw_efi.o - +make DRIVERNAME=ext2 CACHE=0 -f Make.gnuefi + +make DRIVERNAME=ext2 -f Make.gnuefi ext4_gnuefi: rm -f fsw_efi.o - +make DRIVERNAME=ext4 CACHE=1 -f Make.gnuefi + +make DRIVERNAME=ext4 -f Make.gnuefi reiserfs_gnuefi: rm -f fsw_efi.o - +make DRIVERNAME=reiserfs CACHE=1 -f Make.gnuefi + +make DRIVERNAME=reiserfs -f Make.gnuefi iso9660_gnuefi: rm -f fsw_efi.o - +make DRIVERNAME=iso9660 CACHE=1 -f Make.gnuefi + +make DRIVERNAME=iso9660 -f Make.gnuefi hfs_gnuefi: rm -f fsw_efi.o - +make DRIVERNAME=hfs CACHE=1 -f Make.gnuefi + +make DRIVERNAME=hfs -f Make.gnuefi btrfs_gnuefi: rm -f fsw_efi.o - +make DRIVERNAME=btrfs CACHE=1 -f Make.gnuefi + +make DRIVERNAME=btrfs -f Make.gnuefi # utility rules diff --git a/filesystems/fsw_btrfs.c b/filesystems/fsw_btrfs.c index 7359c44..1cfab95 100644 --- a/filesystems/fsw_btrfs.c +++ b/filesystems/fsw_btrfs.c @@ -60,7 +60,6 @@ #include "scandisk.c" #define BTRFS_DEFAULT_BLOCK_SIZE 4096 -//#define BTRFS_DEFAULT_BLOCK_SIZE 8192 #define BTRFS_INITIAL_BCACHE_SIZE 1024 #define GRUB_BTRFS_SIGNATURE "_BHRfS_M" diff --git a/filesystems/fsw_core.c b/filesystems/fsw_core.c index b00b227..1ecb75f 100644 --- a/filesystems/fsw_core.c +++ b/filesystems/fsw_core.c @@ -178,7 +178,7 @@ void fsw_set_blocksize(struct fsw_volume *vol, fsw_u32 phys_blocksize, fsw_u32 l * caller calls fsw_block_release. */ -fsw_status_t fsw_block_get(struct VOLSTRUCTNAME *vol, fsw_u32 phys_bno, fsw_u32 cache_level, void **buffer_out) +fsw_status_t fsw_block_get(struct VOLSTRUCTNAME *vol, fsw_u64 phys_bno, fsw_u32 cache_level, void **buffer_out) { fsw_status_t status; fsw_u32 i, discard_level, new_bcache_size; @@ -198,7 +198,7 @@ fsw_status_t fsw_block_get(struct VOLSTRUCTNAME *vol, fsw_u32 phys_bno, fsw_u32 for (i = 0; i < vol->bcache_size; i++) { vol->bcache[i].refcount = 0; vol->bcache[i].cache_level = 0; - vol->bcache[i].phys_bno = (fsw_u32)FSW_INVALID_BNO; + vol->bcache[i].phys_bno = (fsw_u64)FSW_INVALID_BNO; vol->bcache[i].data = NULL; } i = 0; @@ -219,7 +219,7 @@ fsw_status_t fsw_block_get(struct VOLSTRUCTNAME *vol, fsw_u32 phys_bno, fsw_u32 // find a free entry in the cache table for (i = 0; i < vol->bcache_size; i++) { - if (vol->bcache[i].phys_bno == (fsw_u32)FSW_INVALID_BNO) + if (vol->bcache[i].phys_bno == (fsw_u64)FSW_INVALID_BNO) break; } if (i >= vol->bcache_size) { @@ -246,7 +246,7 @@ fsw_status_t fsw_block_get(struct VOLSTRUCTNAME *vol, fsw_u32 phys_bno, fsw_u32 for (i = vol->bcache_size; i < new_bcache_size; i++) { new_bcache[i].refcount = 0; new_bcache[i].cache_level = 0; - new_bcache[i].phys_bno = (fsw_u32)FSW_INVALID_BNO; + new_bcache[i].phys_bno = (fsw_u64)FSW_INVALID_BNO; new_bcache[i].data = NULL; } i = vol->bcache_size; @@ -257,7 +257,7 @@ fsw_status_t fsw_block_get(struct VOLSTRUCTNAME *vol, fsw_u32 phys_bno, fsw_u32 vol->bcache = new_bcache; vol->bcache_size = new_bcache_size; } - vol->bcache[i].phys_bno = (fsw_u32)FSW_INVALID_BNO; + vol->bcache[i].phys_bno = (fsw_u64)FSW_INVALID_BNO; miss: // read the data @@ -282,7 +282,7 @@ miss: * from fsw_block_get. */ -void fsw_block_release(struct VOLSTRUCTNAME *vol, fsw_u32 phys_bno, void *buffer) +void fsw_block_release(struct VOLSTRUCTNAME *vol, fsw_u64 phys_bno, void *buffer) { fsw_u32 i; @@ -879,8 +879,8 @@ fsw_status_t fsw_shandle_read(struct fsw_shandle *shand, fsw_u32 *buffer_size_in struct fsw_dnode *dno = shand->dnode; struct fsw_volume *vol = dno->vol; fsw_u8 *buffer, *block_buffer; - fsw_u32 buflen, copylen, pos; - fsw_u32 log_bno, pos_in_extent, phys_bno, pos_in_physblock; + fsw_u64 buflen, copylen, pos; + fsw_u64 log_bno, pos_in_extent, phys_bno, pos_in_physblock; fsw_u32 cache_level; if (shand->pos >= dno->size) { // already at EOF @@ -899,7 +899,7 @@ fsw_status_t fsw_shandle_read(struct fsw_shandle *shand, fsw_u32 *buffer_size_in while (buflen > 0) { // get extent for the current logical block - log_bno = pos / vol->log_blocksize; + log_bno = FSW_U64_DIV(pos, vol->log_blocksize); if (shand->extent.type == FSW_EXTENT_TYPE_INVALID || log_bno < shand->extent.log_start || log_bno >= shand->extent.log_start + shand->extent.log_count) { @@ -921,7 +921,7 @@ fsw_status_t fsw_shandle_read(struct fsw_shandle *shand, fsw_u32 *buffer_size_in // dispatch by extent type if (shand->extent.type == FSW_EXTENT_TYPE_PHYSBLOCK) { // convert to physical block number and offset - phys_bno = shand->extent.phys_start + pos_in_extent / vol->phys_blocksize; + phys_bno = shand->extent.phys_start + FSW_U64_DIV(pos_in_extent, vol->phys_blocksize); pos_in_physblock = pos_in_extent & (vol->phys_blocksize - 1); copylen = vol->phys_blocksize - pos_in_physblock; if (copylen > buflen) diff --git a/filesystems/fsw_core.h b/filesystems/fsw_core.h index d8267e4..654dbb3 100644 --- a/filesystems/fsw_core.h +++ b/filesystems/fsw_core.h @@ -73,7 +73,7 @@ #define FSW_FSTYPE_TABLE_NAME(t) FSW_CONCAT3(fsw_,t,_table) /** Indicates that the block cache entry is empty. */ -#define FSW_INVALID_BNO (~0UL) +#define FSW_INVALID_BNO 0xFFFFFFFFFFFFFFFF // @@ -230,7 +230,7 @@ struct fsw_fstype_table; struct fsw_blockcache { fsw_u32 refcount; //!< Reference count fsw_u32 cache_level; //!< Level of importance of this block - fsw_u32 phys_bno; //!< Physical block number + fsw_u64 phys_bno; //!< Physical block number void *data; //!< Block data buffer }; @@ -294,9 +294,9 @@ enum { struct fsw_extent { fsw_u32 type; //!< Type of extent specification - fsw_u32 log_start; //!< Starting logical block number + fsw_u64 log_start; //!< Starting logical block number fsw_u32 log_count; //!< Logical block count - fsw_u32 phys_start; //!< Starting physical block number (for FSW_EXTENT_TYPE_PHYSBLOCK only) + fsw_u64 phys_start; //!< Starting physical block number (for FSW_EXTENT_TYPE_PHYSBLOCK only) void *buffer; //!< Allocated buffer pointer (for FSW_EXTENT_TYPE_BUFFER only) }; @@ -363,7 +363,7 @@ struct fsw_host_table void (*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 (*read_block)(struct fsw_volume *vol, fsw_u32 phys_bno, void *buffer); + fsw_status_t (*read_block)(struct fsw_volume *vol, fsw_u64 phys_bno, void *buffer); }; /** @@ -409,8 +409,8 @@ void fsw_unmount(struct fsw_volume *vol); fsw_status_t fsw_volume_stat(struct fsw_volume *vol, struct fsw_volume_stat *sb); void fsw_set_blocksize(struct VOLSTRUCTNAME *vol, fsw_u32 phys_blocksize, fsw_u32 log_blocksize); -fsw_status_t fsw_block_get(struct VOLSTRUCTNAME *vol, fsw_u32 phys_bno, fsw_u32 cache_level, void **buffer_out); -void fsw_block_release(struct VOLSTRUCTNAME *vol, fsw_u32 phys_bno, void *buffer); +fsw_status_t fsw_block_get(struct VOLSTRUCTNAME *vol, fsw_u64 phys_bno, fsw_u32 cache_level, void **buffer_out); +void fsw_block_release(struct VOLSTRUCTNAME *vol, fsw_u64 phys_bno, void *buffer); /*@}*/ diff --git a/filesystems/fsw_efi.c b/filesystems/fsw_efi.c index 88bcfc7..6acfcbc 100644 --- a/filesystems/fsw_efi.c +++ b/filesystems/fsw_efi.c @@ -98,7 +98,7 @@ EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO /** Helper macro for stringification. */ #define FSW_EFI_STRINGIFY(x) #x /** Expands to the EFI driver name given the file system type name. */ -#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.12.2 " FSW_EFI_STRINGIFY(t) L" File System Driver" +#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.7.0 " FSW_EFI_STRINGIFY(t) L" File System Driver" // function prototypes @@ -125,7 +125,7 @@ EFI_STATUS EFIAPI fsw_efi_ComponentName_GetControllerName(IN EFI_COMPONENT_NAME void fsw_efi_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_efi_read_block(struct fsw_volume *vol, fsw_u32 phys_bno, void *buffer); +fsw_status_t fsw_efi_read_block(struct fsw_volume *vol, fsw_u64 phys_bno, void *buffer); EFI_STATUS fsw_efi_map_status(fsw_status_t fsw_status, FSW_VOLUME_DATA *Volume); @@ -162,6 +162,21 @@ EFI_STATUS fsw_efi_dnode_fill_FileInfo(IN FSW_VOLUME_DATA *Volume, IN OUT UINTN *BufferSize, OUT VOID *Buffer); +/** + * Structure for holding disk cache data. + */ + +#define CACHE_SIZE 131072 /* 128KiB */ +struct cache_data { + fsw_u8 *Cache; + fsw_u64 CacheStart; + BOOLEAN CacheValid; + FSW_VOLUME_DATA *Volume; // NOTE: Do not deallocate; copied here to ID volume +}; + +#define NUM_CACHES 2 /* Don't increase without modifying fsw_efi_read_block() */ +static struct cache_data Caches[NUM_CACHES]; + /** * Interface structure for the EFI Driver Binding protocol. */ @@ -401,6 +416,7 @@ EFI_STATUS EFIAPI fsw_efi_DriverBinding_Stop(IN EFI_DRIVER_BINDING_PROTOCOL *T EFI_STATUS Status; EFI_FILE_IO_INTERFACE *FileSystem; FSW_VOLUME_DATA *Volume; + int i; #if DEBUG_LEVEL Print(L"fsw_efi_DriverBinding_Stop\n"); @@ -442,6 +458,13 @@ EFI_STATUS EFIAPI fsw_efi_DriverBinding_Stop(IN EFI_DRIVER_BINDING_PROTOCOL *T This->DriverBindingHandle, ControllerHandle); + // clear the cache + for (i = 0; i < NUM_CACHES; i++) { + if (Caches[i].Cache != NULL) { + FreePool(Caches[i].Cache); + Caches[i].Cache = NULL; + } // if + } return Status; } @@ -494,89 +517,84 @@ void fsw_efi_change_blocksize(struct fsw_volume *vol, /** * 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. + * Two caches are maintained, so as to improve performance on some systems. (VirtualBox + * is particularly susceptible to performance problems with an uncached driver -- the + * ext2 driver can take 200 seconds to load a Linux kernel under VirtualBox, whereas + * the time is more like 3 seconds with a cache!) Two independent caches are maintained + * because the ext2fs driver tends to alternate between accessing two parts of the + * disk. */ - -#if CACHE != 0 -/** - * This version implements a primitive cache that greatly improves performance of most - * filesystems under VirtualBox, and slightly improves it on a handful of other systems. - */ -#define CACHE_SIZE 131072 /* 128KiB */ -fsw_status_t fsw_efi_read_block(struct fsw_volume *vol, fsw_u32 phys_bno, void *buffer) -{ - EFI_STATUS Status = EFI_SUCCESS; - FSW_VOLUME_DATA *Volume = (FSW_VOLUME_DATA *)vol->host_data; - static fsw_u8 *Cache = NULL; - static fsw_u64 CacheStart = 0; - static BOOLEAN CacheValid = FALSE; - static FSW_VOLUME_DATA *PrevVol = NULL; - fsw_u64 StartRead = (fsw_u64) phys_bno * vol->phys_blocksize; - -// FSW_MSG_DEBUGV((FSW_MSGSTR("fsw_efi_read_block: %d (%d)\n"), phys_bno, vol->phys_blocksize)); - - if (Cache == NULL) { - Cache = AllocatePool(CACHE_SIZE); - } - - if ((PrevVol != Volume) || (StartRead < CacheStart) || ((StartRead + vol->phys_blocksize) > CacheStart + CACHE_SIZE)) { - CacheStart = StartRead; - CacheValid = FALSE; - PrevVol = Volume; - } - - // read from disk - if (!CacheValid && (Cache != NULL)) { - Status = refit_call5_wrapper(Volume->DiskIo->ReadDisk, Volume->DiskIo, Volume->MediaId, - StartRead, CACHE_SIZE, Cache); - if (!EFI_ERROR(Status)) - CacheValid = TRUE; - } // if (!CacheValid) - - if (CacheValid) { - if (buffer != NULL) { - CopyMem(buffer, &Cache[StartRead - CacheStart], vol->phys_blocksize); - } else { - Status = EFI_BAD_BUFFER_SIZE; - } // if/else buffer OK - } else { - // Unable to use cache; load without cache.... - Status = refit_call5_wrapper(Volume->DiskIo->ReadDisk, Volume->DiskIo, Volume->MediaId, - (UINT64)phys_bno * vol->phys_blocksize, - vol->phys_blocksize, - buffer); - } // if/else CacheValid - - Volume->LastIOStatus = Status; - if (EFI_ERROR(Status)) - return FSW_IO_ERROR; - return FSW_SUCCESS; -} -#else -/** - * This version is the original, which does NOT implement a cache. It performs badly under - * VirtualBox, but I'm still using it for ext2fs because there seems to be a glitch in the - * ext2fs driver that causes a loop that repeatedly re-reads pairs of sectors, and the - * primitive cache in the preceding code just makes that worse. - */ -fsw_status_t fsw_efi_read_block(struct fsw_volume *vol, fsw_u32 phys_bno, void *buffer) -{ - EFI_STATUS Status; - FSW_VOLUME_DATA *Volume = (FSW_VOLUME_DATA *)vol->host_data; - -// FSW_MSG_DEBUGV((FSW_MSGSTR("fsw_efi_read_block: %d (%d)\n"), phys_bno, vol->phys_blocksize)); - - // read from disk - Status = refit_call5_wrapper(Volume->DiskIo->ReadDisk, Volume->DiskIo, Volume->MediaId, - (UINT64)phys_bno * vol->phys_blocksize, - vol->phys_blocksize, - buffer); - Volume->LastIOStatus = Status; - if (EFI_ERROR(Status)) - return FSW_IO_ERROR; - return FSW_SUCCESS; -} -#endif +fsw_status_t fsw_efi_read_block(struct fsw_volume *vol, fsw_u64 phys_bno, void *buffer) { + static int LastRead = -1; + int i, ReadCache = -1; + FSW_VOLUME_DATA *Volume = (FSW_VOLUME_DATA *)vol->host_data; + EFI_STATUS Status = EFI_SUCCESS; + BOOLEAN ReadOneBlock = FALSE; + fsw_u64 StartRead = phys_bno * vol->phys_blocksize; + + if (buffer == NULL) + return (fsw_status_t) EFI_BAD_BUFFER_SIZE; + + // Initialize static data structures, if necessary.... + if (LastRead < 0) { + for (i = 0; i < NUM_CACHES; i++) { + Caches[i].Cache = NULL; + Caches[i].CacheStart = 0; + Caches[i].CacheValid = FALSE; + Caches[i].Volume = NULL; + } // for + } // if + + // Look for a cache hit on the current query.... + i = 0; + do { + if ((Caches[i].Volume == Volume) && + (StartRead >= Caches[i].CacheStart) && + ((StartRead + vol->phys_blocksize) <= (Caches[i].CacheStart + CACHE_SIZE))) { + ReadCache = i; + } + i++; + } while ((i < NUM_CACHES) && (ReadCache < 0)); + + // No cache hit found; load new cache and pass it on.... + if (ReadCache < 0) { + if (LastRead == -1) + LastRead = 1; + ReadCache = 1 - LastRead; // NOTE: If NUM_CACHES > 2, this must become more complex + if (Caches[ReadCache].Cache == NULL) + Caches[ReadCache].Cache = AllocatePool(CACHE_SIZE); + if (Caches[ReadCache].Cache != NULL) { + Status = refit_call5_wrapper(Volume->DiskIo->ReadDisk, Volume->DiskIo, Volume->MediaId, + StartRead, CACHE_SIZE, Caches[ReadCache].Cache); + if (!EFI_ERROR(Status)) { + Caches[ReadCache].CacheStart = StartRead; + Caches[ReadCache].CacheValid = TRUE; + Caches[ReadCache].Volume = Volume; + LastRead = ReadCache; + } else { + ReadOneBlock = TRUE; + } + } else { + ReadOneBlock = TRUE; + } // if cache memory allocated + } // if (ReadCache < 0) + + if (Caches[ReadCache].Cache != NULL) { + CopyMem(buffer, &Caches[ReadCache].Cache[StartRead - Caches[ReadCache].CacheStart], vol->phys_blocksize); + } else { + ReadOneBlock = TRUE; + } + + if (ReadOneBlock) { // Something's failed, so try a simple disk read of one block.... + Status = refit_call5_wrapper(Volume->DiskIo->ReadDisk, Volume->DiskIo, Volume->MediaId, + phys_bno * vol->phys_blocksize, + vol->phys_blocksize, + buffer); + } + + return Status; +} // fsw_status_t *fsw_efi_read_block() /** * Map FSW status codes to EFI status codes. The FSW_IO_ERROR code is only produced diff --git a/filesystems/fsw_ext4.c b/filesystems/fsw_ext4.c index 0beaa4d..2d731c7 100644 --- a/filesystems/fsw_ext4.c +++ b/filesystems/fsw_ext4.c @@ -385,7 +385,7 @@ static fsw_status_t fsw_ext4_get_by_extent(struct fsw_ext4_volume *vol, struct f struct fsw_extent *extent) { fsw_status_t status; - fsw_u32 bno, release_bno, buf_offset, file_bcnt; + fsw_u32 bno, buf_offset; int ext_cnt; void *buffer; diff --git a/filesystems/fsw_iso9660.c b/filesystems/fsw_iso9660.c index 9c1fa54..697c440 100644 --- a/filesystems/fsw_iso9660.c +++ b/filesystems/fsw_iso9660.c @@ -282,7 +282,6 @@ static fsw_status_t fsw_iso9660_volume_mount(struct fsw_iso9660_volume *vol) struct iso9660_dirrec rootdir; int sua_pos; char *sig; - int skip; struct fsw_rock_ridge_susp_entry *entry; // read through the Volume Descriptor Set @@ -363,7 +362,6 @@ static fsw_status_t fsw_iso9660_volume_mount(struct fsw_iso9660_volume *vol) #if 1 status = fsw_block_get(vol, ISOINT(rootdir.extent_location), 0, &buffer); sig = (char *)buffer + sua_pos; - skip = 0; entry = (struct fsw_rock_ridge_susp_entry *)sig; if ( entry->sig[0] == 'S' && entry->sig[1] == 'P') @@ -376,7 +374,6 @@ static fsw_status_t fsw_iso9660_volume_mount(struct fsw_iso9660_volume *vol) // FSW_MSG_DEBUG((FSW_MSGSTR("fsw_iso9660_volume_mount: SP magic isn't valid\n"))); // DBG("fsw_iso9660_volume_mount: SP magic isn't valid\n"); } - skip = sp->skip; } #endif // release volume descriptors diff --git a/filesystems/fsw_reiserfs.c b/filesystems/fsw_reiserfs.c index f6cb4db..05e8163 100644 --- a/filesystems/fsw_reiserfs.c +++ b/filesystems/fsw_reiserfs.c @@ -751,7 +751,6 @@ static fsw_status_t fsw_reiserfs_item_next(struct fsw_reiserfs_volume *vol, { fsw_status_t status; fsw_u32 dir_id, objectid; - fsw_u64 offset; fsw_u32 tree_bno, next_tree_bno, tree_level, nr_item, nr_ptr_item; fsw_u8 *buffer; struct block_head *bhead; @@ -763,9 +762,8 @@ static fsw_status_t fsw_reiserfs_item_next(struct fsw_reiserfs_volume *vol, dir_id = item->ih.ih_key.k_dir_id; objectid = item->ih.ih_key.k_objectid; - offset = item->item_offset; - FSW_MSG_DEBUG((FSW_MSGSTR("fsw_reiserfs_item_next: next for %d/%d/%lld\n"), dir_id, objectid, offset)); + FSW_MSG_DEBUG((FSW_MSGSTR("fsw_reiserfs_item_next: next for %d/%d/%lld\n"), dir_id, objectid, item->item_offset)); // find a node that has more items, moving up until we find one diff --git a/install.sh b/install.sh index 1e87e7c..a2c5612 100755 --- a/install.sh +++ b/install.sh @@ -33,6 +33,7 @@ # # Revision history: # +# 0.7.0 -- Added support for the new Btrfs driver # 0.6.12 -- Added support for PreLoader as well as for shim # 0.6.11 -- Improvements in script's ability to handle directories with spaces # in their names @@ -247,6 +248,8 @@ CopyDrivers() { ;; reiserfs) DriverType="reiserfs" ;; + btrfs) DriverType="btrfs" + ;; hfsplus) DriverType="hfs" ;; *) BootFS="" diff --git a/mkdistrib b/mkdistrib index 537db79..ea1f27b 100755 --- a/mkdistrib +++ b/mkdistrib @@ -56,7 +56,7 @@ zip -9r refind-src-$1.zip refind-$1 # Build the IA32 binaries cd refind-$1 -ARCH=ia32 make -j4 +ARCH=ia32 make -j1 ARCH=ia32 make fs mkdir -p refind-bin-$1/refind/drivers_ia32 cp --preserve=timestamps drivers_ia32/*_ia32.efi refind-bin-$1/refind/drivers_ia32/ @@ -68,7 +68,7 @@ cp --preserve=timestamps gptsync/gptsync_ia32.efi refind-bin-$1/refind/tools_ia3 # Build the X64 binaries make clean -make -j4 +make -j1 make fs mkdir -p refind-bin-$1/refind/drivers_x64 cp -a icons refind-bin-$1/refind/ @@ -100,7 +100,7 @@ zip -9r ../refind-bin-$1.zip refind-bin-$1 # Prepare a variant with the x86-64 version built with GNU-EFI.... make clean -make -j4 gnuefi +make -j1 gnuefi if [[ $SignIt == 1 ]] ; then $SBSign --key $KeysDir/refind.key --cert $KeysDir/refind.crt --output refind-bin-$1/refind/refind_x64.efi refind/refind_x64.efi else diff --git a/refind.spec b/refind.spec index ab5edf0..87e5e39 100644 --- a/refind.spec +++ b/refind.spec @@ -1,6 +1,6 @@ Summary: EFI boot manager software Name: refind -Version: 0.6.12 +Version: 0.7.0 Release: 1%{?dist} Summary: EFI boot manager software License: GPLv3 @@ -157,5 +157,5 @@ fi # wiping out the just-updated files. %changelog -* Tue Jun 18 2013 R Smith