From 9b877e67c541f1c08950930a0ad8e0c6ee2ea2e9 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Sun, 30 Dec 2012 14:23:41 -0500 Subject: [PATCH] Version 0.6.2 official release. --- NEWS.txt | 16 +++++++----- docs/refind/bootmode.html | 2 +- docs/refind/configfile.html | 2 +- docs/refind/drivers.html | 4 +-- docs/refind/features.html | 6 ++--- docs/refind/getting.html | 49 +++++++++++++++++++++++++------------ docs/refind/index.html | 2 +- docs/refind/installing.html | 2 +- docs/refind/linux.html | 2 +- docs/refind/revisions.html | 4 ++- docs/refind/secureboot.html | 2 +- docs/refind/themes.html | 2 +- docs/refind/todo.html | 19 +++++++------- docs/refind/using.html | 2 +- filesystems/Make.gnuefi | 1 + filesystems/Make.tiano | 3 +-- filesystems/Makefile | 3 +++ filesystems/fsw_core.h | 3 ++- filesystems/fsw_efi.c | 3 ++- filesystems/fsw_ext4.c | 8 +++--- mkdistrib | 18 ++++++++++---- refind.spec | 17 ++++++------- refind/Makefile | 1 + refind/main.c | 2 +- 24 files changed, 102 insertions(+), 71 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index d04ee1b..231a5ca 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,11 +1,15 @@ -0.6.2 (12/??/2012): +0.6.2 (12/30/2012): ------------------- -- The drivers can now be built with the GNU-EFI toolkit as well as with the - TianoCore EDK2. See the BUILDING.txt file for details on how to build - them with either toolkit. This improvement doesn't affect users of my - binary packages, but it should make it easier for Linux distributions to - adopt rEFInd into their package systems. +- Inclusion of a sample refind.spec file for the benefit of RPM + distribution maintainers who might want to include rEFInd. It's a bit + rough, but it gets you a good chunk of the way there.... + +- The EFI filesystem drivers can now be built with the GNU-EFI toolkit as + well as with the TianoCore EDK2. See the BUILDING.txt file for details on + how to build them with either toolkit. This improvement doesn't affect + users of my binary packages, but it should make it easier for Linux + distributions to adopt rEFInd into their package systems. - Tweaked refind.inf file for better build results using "native" TianoCore EDK2 build process (vs. the Makefile-based build process that I use under diff --git a/docs/refind/bootmode.html b/docs/refind/bootmode.html index d4376ac..b0672df 100644 --- a/docs/refind/bootmode.html +++ b/docs/refind/bootmode.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -12/21/2012, referencing rEFInd 0.6.1

+12/30/2012, referencing rEFInd 0.6.2

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!

diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html index 3200ed8..345608e 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -12/21/2012, referencing rEFInd 0.6.1

+12/30/2012, referencing rEFInd 0.6.2

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!

diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index 5d19efb..aa4bcee 100644 --- a/docs/refind/drivers.html +++ b/docs/refind/drivers.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 4/19/2012; last Web page update: -12/21/2012, referencing rEFInd 0.6.1

+12/30/2012, referencing rEFInd 0.6.2

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!

@@ -190,8 +190,6 @@ fs0: load reiserfs_x64.efi fs0: map -r -

If you build rEFInd from source, you should be aware that the drivers rely on TianoCore's development kit, whereas rEFInd itself can use either TianoCore's kit or GNU-EFI. Thus, to compile both, you'll need to install TianoCore, with GNU-EFI being optional but providing no additional benefits. 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 BUILDING.txt 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 Getting rEFInd page for details) or use drivers from another source.

-

Finding Additional EFI Drivers

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:

diff --git a/docs/refind/features.html b/docs/refind/features.html index 5f3e0bb..0979f4c 100644 --- a/docs/refind/features.html +++ b/docs/refind/features.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -12/21/2012, referencing rEFInd 0.6.1

+12/30/2012, referencing rEFInd 0.6.2

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!

@@ -109,9 +109,9 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • 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.)
  • -
  • Inclusion of drivers for the Linux ReiserFS and ext2 filesystems in the +
  • Inclusion of drivers for the Linux ReiserFS, ext2 filesystems in the main package. (These drivers are absent from rEFInd prior to version - 0.4.0.)
  • + 0.4.0. See below concerning an ext4fs driver.) diff --git a/docs/refind/getting.html b/docs/refind/getting.html index 4f78925..d7cd605 100644 --- a/docs/refind/getting.html +++ b/docs/refind/getting.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/14/2012; last Web page update: -12/21/2012, referencing rEFInd 0.6.1

    +12/30/2012, referencing rEFInd 0.6.2

    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!

    @@ -93,23 +93,21 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Getting rEFInd from Sourceforge

    -

    You can find the rEFInd source code and binary packages at its SourceForge page. Note that rEFInd is OS-independent—it runs before the OS, so you download the same binary package for any OS. You can obtain rEFInd in four different forms:

    +

    You can find the rEFInd source code and binary packages at its SourceForge page. Note that rEFInd is OS-independent—it runs before the OS, so you download the same binary package for any OS. You can obtain rEFInd in several different forms:

    diff --git a/docs/refind/index.html b/docs/refind/index.html index ba66f0c..b65c355 100644 --- a/docs/refind/index.html +++ b/docs/refind/index.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/14/2012; last Web page update: -12/21/2012, referencing rEFInd 0.6.1

    +12/30/2012, referencing rEFInd 0.6.2

    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!

    diff --git a/docs/refind/installing.html b/docs/refind/installing.html index 1e9e88b..68a93c8 100644 --- a/docs/refind/installing.html +++ b/docs/refind/installing.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/14/2012; last Web page update: -12/21/2012, referencing rEFInd 0.6.1

    +12/30/2012, referencing rEFInd 0.6.2

    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!

    diff --git a/docs/refind/linux.html b/docs/refind/linux.html index eaad48b..cadfc88 100644 --- a/docs/refind/linux.html +++ b/docs/refind/linux.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/19/2012; last Web page update: -12/21/2012, referencing rEFInd 0.6.1

    +12/30/2012, referencing rEFInd 0.6.2

    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!

    diff --git a/docs/refind/revisions.html b/docs/refind/revisions.html index aed03b7..b457e26 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: 12/21/2012

    +

    Last Web page update: 12/30/2012

    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!

    @@ -92,6 +92,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    diff --git a/docs/refind/using.html b/docs/refind/using.html index f63fd63..8227ca1 100644 --- a/docs/refind/using.html +++ b/docs/refind/using.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/14/2012; last Web page update: -12/21/2012, referencing rEFInd 0.6.1

    +12/30/2012, referencing rEFInd 0.6.2

    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!

    diff --git a/filesystems/Make.gnuefi b/filesystems/Make.gnuefi index 4d69b91..1c7e950 100644 --- a/filesystems/Make.gnuefi +++ b/filesystems/Make.gnuefi @@ -43,6 +43,7 @@ include $(SRCDIR)/../Make.common $(TARGET): $(SHLIB_TARGET) $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \ -j .rela -j .reloc --target=$(FORMAT_DRIVER) $< $@ + chmod a-x $(TARGET) cp $(TARGET) ../drivers_$(FILENAME_CODE) # EOF diff --git a/filesystems/Make.tiano b/filesystems/Make.tiano index 1482ad2..64266cd 100644 --- a/filesystems/Make.tiano +++ b/filesystems/Make.tiano @@ -22,8 +22,7 @@ ifeq ($(ARCH),ia32) endif ifeq ($(ARCH),x86_64) -# ARCH_C_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -mcmodel=large -m64 - ARCH_C_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -m64 + ARCH_C_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -mcmodel=large -m64 ARCHDIR = X64 UC_ARCH = X64 FILENAME_CODE = x64 diff --git a/filesystems/Makefile b/filesystems/Makefile index 2f742ee..bc22314 100644 --- a/filesystems/Makefile +++ b/filesystems/Makefile @@ -38,6 +38,8 @@ hfs: # Build the drivers with GNU-EFI.... +gnuefi: $(FILESYSTEMS_GNUEFI) + all_gnuefi: $(FILESYSTEMS_GNUEFI) ext2_gnuefi: @@ -64,6 +66,7 @@ hfs_gnuefi: clean: rm -f *~ *.bak *.o *.obj *.so *.efi *.dll err.txt $(TEXTFILES) + make -C test clean install: diff --git a/filesystems/fsw_core.h b/filesystems/fsw_core.h index 5d2ab07..56eb58b 100644 --- a/filesystems/fsw_core.h +++ b/filesystems/fsw_core.h @@ -55,8 +55,9 @@ #define _FSW_CORE_H_ #include "fsw_base.h" +#ifdef __MAKEWITH_GNUEFI #include "fsw_efi_base.h" - +#endif /** Maximum size for a path, specifically symlink target paths. */ #ifndef HOST_EFI_EDK2 diff --git a/filesystems/fsw_efi.c b/filesystems/fsw_efi.c index 79b3720..d7631de 100644 --- a/filesystems/fsw_efi.c +++ b/filesystems/fsw_efi.c @@ -73,6 +73,8 @@ #define DBG(x...) #endif +#ifdef __MAKEWITH_GNUEFI + #define EFI_DISK_IO_PROTOCOL_GUID \ { \ 0xce345171, 0xba0b, 0x11d2, {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ @@ -83,7 +85,6 @@ 0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ } -#ifdef __MAKEWITH_GNUEFI EFI_GUID gEfiDriverBindingProtocolGuid = EFI_DRIVER_BINDING_PROTOCOL_GUID; EFI_GUID gEfiComponentNameProtocolGuid = EFI_COMPONENT_NAME_PROTOCOL_GUID; EFI_GUID gEfiDiskIoProtocolGuid = EFI_DISK_IO_PROTOCOL_GUID; diff --git a/filesystems/fsw_ext4.c b/filesystems/fsw_ext4.c index b648b3f..abef2cb 100644 --- a/filesystems/fsw_ext4.c +++ b/filesystems/fsw_ext4.c @@ -385,9 +385,8 @@ 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_bcnt, buf_offset, file_bcnt; + fsw_u32 bno, release_bno, buf_offset, file_bcnt; int ext_cnt; - int ext_depth; void *buffer; struct ext4_extent_header *ext4_extent_header; @@ -399,7 +398,6 @@ static fsw_status_t fsw_ext4_get_by_extent(struct fsw_ext4_volume *vol, struct f // First buffer is the i_block field from inode... buffer = (void *)dno->raw->i_block; - buf_bcnt = EXT4_NDIR_BLOCKS; buf_offset = 0; while(1) { ext4_extent_header = (struct ext4_extent_header *)buffer + buf_offset; @@ -432,7 +430,7 @@ static fsw_status_t fsw_ext4_get_by_extent(struct fsw_ext4_volume *vol, struct f ext4_extent_header->eh_depth)); ext4_extent_idx = (struct ext4_extent_idx *)(buffer + buf_offset); buf_offset += sizeof(struct ext4_extent_idx); - + FSW_MSG_DEBUG((FSW_MSGSTR("fsw_ext4_get_by_extent: index node covers block %d...\n"), ext4_extent_idx->ei_block)); if(bno >= ext4_extent_idx->ei_block) @@ -447,7 +445,7 @@ static fsw_status_t fsw_ext4_get_by_extent(struct fsw_ext4_volume *vol, struct f } } } - + return FSW_NOT_FOUND; } diff --git a/mkdistrib b/mkdistrib index 7a83fee..4ce2c68 100755 --- a/mkdistrib +++ b/mkdistrib @@ -47,7 +47,7 @@ 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 keys include EfiLib libeg mok refind filesystems install.sh mkrlconf.sh CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt refind.inf Make.tiano Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1 +cp -a docs images keys include EfiLib libeg mok refind filesystems refind.spec install.sh mkrlconf.sh CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt refind.inf Make.tiano Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1 # Go there and prepare a souce code zip file.... cd ../snapshots/$1/ @@ -55,8 +55,8 @@ zip -9r refind-src-$1.zip refind-$1 # Build the IA32 binaries cd refind-$1 -ARCH=ia32 make -ARCH=ia32 make fs +ARCH=ia32 make -j4 +ARCH=ia32 make -j4 fs mkdir -p refind-bin-$1/refind/drivers_ia32 cp --preserve=timestamps drivers_ia32/*_ia32.efi refind-bin-$1/refind/drivers_ia32/ cp --preserve=timestamps filesystems/LICENSE*txt refind-bin-$1/refind/drivers_ia32/ @@ -65,8 +65,8 @@ cp refind/refind_ia32.efi $StartDir/ # Build the X64 binaries make clean -make -make fs +make -j4 +make -j4 fs mkdir -p refind-bin-$1/refind/drivers_x64 cp -a icons refind-bin-$1/refind/ if [[ $SignIt == 1 ]] ; then @@ -93,4 +93,12 @@ fi zip -9r ../refind-bin-$1.zip refind-bin-$1 cd .. rm -r refind-$1 + +# Prepare the RPM files +cp refind-src-$1.zip ~/rpmbuild/SOURCES/ +rpmbuild -ba $StartDir/refind.spec +mv ~/rpmbuild/RPMS/*/refind-$1* ./ +mv ~/rpmbuild/SRPMS/refind-$1* ./ + +# Finish cd $StartDir diff --git a/refind.spec b/refind.spec index 4938cfc..5df8cd0 100644 --- a/refind.spec +++ b/refind.spec @@ -58,22 +58,19 @@ rm -rf $RPM_BUILD_ROOT %doc /usr/share/doc/refind-%{version}/refind/* /usr/share/refind/install.sh /usr/sbin/mkrlconf.sh -/boot/efi/EFI/refind/refind.efi -/boot/efi/EFI/refind/drivers/* -/boot/efi/EFI/refind/icons/* -/boot/efi/EFI/refind/keys/* -/boot/efi/EFI/refind/keys -/boot/efi/EFI/refind/icons -/boot/efi/EFI/refind/drivers /boot/efi/EFI/refind %config /boot/efi/EFI/refind/refind.conf %post -InstallDisk=`grep /boot/efi /etc/mtab | cut -d " " -f 1 | cut -c 1-8` -PartNum=`grep /boot/efi /etc/mtab | cut -d " " -f 1 | cut -c 9-10` -efibootmgr -c -d $InstallDisk -p $PartNum -l \\EFI\\refind\\refind.efi -L "rEFInd Boot Manager" +ExistingEntry=`efibootmgr | grep "rEFInd Boot Manager" | cut -c 5-8` +if [[ ! -n $ExistingEntry ]] ; then + InstallDisk=`grep /boot/efi /etc/mtab | cut -d " " -f 1 | cut -c 1-8` + PartNum=`grep /boot/efi /etc/mtab | cut -d " " -f 1 | cut -c 9-10` + efibootmgr -c -d $InstallDisk -p $PartNum -l \\EFI\\refind\\refind.efi -L "rEFInd Boot Manager" +fi /usr/sbin/mkrlconf.sh + %changelog * Sun Dec 30 2012 R Smith - 0.6.2 - Created spec file for 0.6.2 release diff --git a/refind/Makefile b/refind/Makefile index 844c443..9b74ccc 100644 --- a/refind/Makefile +++ b/refind/Makefile @@ -35,6 +35,7 @@ include $(SRCDIR)/../Make.common $(TARGET): $(SHLIB_TARGET) $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \ -j .rela -j .reloc --target=$(FORMAT) $< $@ + chmod a-x $(TARGET) # EOF # DO NOT DELETE diff --git a/refind/main.c b/refind/main.c index c50906c..87bd63c 100644 --- a/refind/main.c +++ b/refind/main.c @@ -132,7 +132,7 @@ static VOID AboutrEFInd(VOID) if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.1.5"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.2"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith"); -- 2.39.2