x86-64 hardware.
LD_CODE = aarch64elf
endif
-EDK2BASE = /usr/local/UDK2014/MyWorkSpace
+#EDK2BASE = /usr/local/UDK2014/MyWorkSpace
#EDK2BASE = /usr/local/EDK2/tianocore-edk2
#ENTRYPOINT=_ModuleEntryPoint
ENTRYPOINT=efi_main
DEBUGFLAGS = -Wall -Wno-missing-braces -Wno-array-bounds -ffunction-sections -fdata-sections
CFLAGS = $(OPTIMFLAGS) -g -fshort-wchar -fno-stack-protector $(DEBUGFLAGS) -c
-prefix = /usr/bin/
-CC = $(prefix)gcc
-AS = $(prefix)as
-LD = $(prefix)ld
-AR = $(prefix)ar
-RANLIB = $(prefix)ranlib
-OBJCOPY = $(prefix)objcopy
-GENFW = $(EDK2BASE)/BaseTools/Source/C/bin/GenFw
-
-
LDSCRIPT = $(EDK2BASE)/BaseTools/Scripts/gcc4.4-ld-script
LDFLAGS = -nostdlib -n -q --gc-sections --script=$(EDK2BASE)/BaseTools/Scripts/gcc4.4-ld-script \
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-CC=gcc
-CXX=g++
CXXFLAGS=-O2 -fpic -D_REENTRANT -D_GNU_SOURCE -Wall -g
NAMES=refind
SRCS=$(NAMES:=.c)
GPTSYNC_DIR=gptsync
EFILIB_DIR=EfiLib
+export EDK2BASE = /usr/local/UDK2014/MyWorkSpace
+export GENFW = $(EDK2BASE)/BaseTools/Source/C/bin/GenFw
+export prefix = /usr/bin/
+ifeq ($(ARCH),aarch64)
+ export CC = $(prefix)aarch64-linux-gnu-gcc
+ export AS = $(prefix)aarch64-linux-gnu-as
+ export LD = $(prefix)aarch64-linux-gnu-ld
+ export AR = $(prefix)aarch64-linux-gnu-ar
+ export RANLIB = $(prefix)aarch64-linux-gnu-ranlib
+ export OBJCOPY = $(prefix)aarch64-linux-gnu-objcopy
+else
+ export CC = $(prefix)gcc
+ export AS = $(prefix)as
+ export LD = $(prefix)ld
+ export AR = $(prefix)ar
+ export RANLIB = $(prefix)ranlib
+ export OBJCOPY = $(prefix)objcopy
+endif
+
# Build rEFInd, including libeg
all: tiano
+make AR_TARGET=libeg -C $(LIBEG_DIR) -f Make.tiano
+make AR_TARGET=mok -C $(MOK_DIR) -f Make.tiano
+make BUILDME=refind DLL_TARGET=refind -C $(LOADER_DIR) -f Make.tiano
+ifneq ($(ARCH),aarch64)
+make -C $(GPTSYNC_DIR) -f Make.tiano
+endif
# +make -C $(FS_DIR)
+gptsync:
+ +make -C $(GPTSYNC_DIR) -f Make.tiano
+
+gptsync_gnuefi:
+ +make -C $(GPTSYNC_DIR) gnuefi
+
clean:
make -C $(LIBEG_DIR) clean
make -C $(MOK_DIR) clean
else
ifeq (i386, $(DEB_HOST_ARCH_CPU))
EFI_ARCH := ia32
+else
+ifeq (arm64, $(DEB_HOST_ARCH_CPU))
+ EFI_ARCH := aa64
else
$(warning EFI architecture for $(DEB_HOST_ARCH_CPU) is unknown)
EFI_ARCH := $(DEB_HOST_ARCH_CPU)
endif
endif
+endif
%:
dh $@
DEBUGFLAGS = -Wall -Wno-missing-braces -Wno-array-bounds -ffunction-sections -fdata-sections
CFLAGS = $(OPTIMFLAGS) -g -fshort-wchar -fno-stack-protector $(DEBUGFLAGS) -c -include AutoGen.h -DHOST_EFI_EDK2
-prefix = /usr/bin/
-CC = $(prefix)gcc
-AS = $(prefix)as
-LD = $(prefix)ld
-AR = $(prefix)ar
-RANLIB = $(prefix)ranlib
-OBJCOPY = $(prefix)objcopy
-GENFW = $(EDK2BASE)/BaseTools/Source/C/bin/GenFw
+prefix ?= /usr/bin/
+CC ?= $(prefix)gcc
+AS ?= $(prefix)as
+LD ?= $(prefix)ld
+AR ?= $(prefix)ar
+RANLIB ?= $(prefix)ranlib
+OBJCOPY ?= $(prefix)objcopy
+GENFW ?= $(EDK2BASE)/BaseTools/Source/C/bin/GenFw
LDSCRIPT = $(EDK2BASE)/BaseTools/Scripts/gcc4.4-ld-script
LD_CODE = aarch64elf
endif
-EDK2BASE = /usr/local/UDK2014/MyWorkSpace
+export EDK2BASE = /usr/local/UDK2014/MyWorkSpace
#EDK2BASE = /usr/local/edk2
# Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, or GCC46)
CFLAGS = $(OPTIMFLAGS) -g -fshort-wchar -fno-stack-protector $(DEBUGFLAGS) -c -DHOST_EFI_EDK2 -D__MAKEWITH_TIANO
#CFLAGS = $(OPTIMFLAGS) -g -fshort-wchar -fno-stack-protector $(DEBUGFLAGS) -c -include AutoGen.h -DHOST_EFI_EDK2
-prefix = /usr/bin/
-CC = $(prefix)gcc
-AS = $(prefix)as
-LD = $(prefix)ld
-AR = $(prefix)ar
-RANLIB = $(prefix)ranlib
-OBJCOPY = $(prefix)objcopy
-GENFW = $(EDK2BASE)/BaseTools/Source/C/bin/GenFw
+prefix ?= /usr/bin/
+CC ?= $(prefix)gcc
+AS ?= $(prefix)as
+LD ?= $(prefix)ld
+AR ?= $(prefix)ar
+RANLIB ?= $(prefix)ranlib
+OBJCOPY ?= $(prefix)objcopy
+GENFW ?= $(EDK2BASE)/BaseTools/Source/C/bin/GenFw
LDSCRIPT = $(EDK2BASE)/BaseTools/Scripts/gcc4.4-ld-script
#include "gptsync.h"
#include "syslinux_mbr.h"
+#define memcpy(a, b, c) CopyMem(a, b, c)
//
// MBR functions
// FUTURE: use STR(), #define Print printf
-#define copy_guid(destguid, srcguid) (memcpy(destguid, srcguid, 16))
+#define copy_guid(destguid, srcguid) (CopyMem(destguid, srcguid, 16))
#define guids_are_equal(guid1, guid2) (memcmp(guid1, guid2, 16) == 0)
#define EFI_UNSUPPORTED 1
# EFI-boot CD...
ln ../../refind/refind_ia32.efi ./bootia32.efi
ln ../../refind/refind_x64.efi ./bootx64.efi
+ln ../../refind/refind_aa64.efi ./bootaa64.efi
cp ../../refind/refind.conf-sample ./refind.conf
sed -i '/#showtools/a showtools shell,memtest,gdisk,apple_recovery,csr_rotate,windows_recovery,mok_tool,about,shutdown,reboot,firmware' refind.conf
sed -i '/#csr_values/a csr_values 10,77' refind.conf
mkdir drivers_ia32
cd drivers_ia32
ln ../../../refind/drivers_ia32/* ./
+cd ..
+mkdir drivers_aa64
+cd drivers_aa64
+ln ../../../refind/drivers_aa64/* ./
cd ../../..
# Get the size of the binaries to go in the El Torito image in kB
cp --preserve=timestamps icons/*png icons/README ../snapshots/$1/refind-$1/icons/
cp --preserve=timestamps -r icons/licenses/* ../snapshots/$1/refind-$1/icons/licenses/
cp --preserve=timestamps -r icons/svg/* ../snapshots/$1/refind-$1/icons/svg/
-cp -a debian docs images keys fonts banners include EfiLib libeg mok net refind filesystems gptsync refind.spec refind-install mkrlconf mvrefind mountesp 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 debian docs images keys fonts banners include EfiLib libeg mok net refind filesystems gptsync refind.spec refind-install mkrlconf mvrefind mountesp CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt refind.inf Make.tiano Make.common Make.aarch64 Makefile refind.conf-sample ../snapshots/$1/refind-$1
# Go there and prepare a souce code tarball....
cd ../snapshots/$1/
# Remove SVG files, since they aren't needed for binary packages....
rm -rf refind-$1/icons/svg
-# Build the IA32 binaries
+# Build the ARM64 binaries
cd refind-$1
+ARCH=aarch64 make -j1
+ARCH=aarch64 make fs
+mkdir -p refind-bin-$1/refind/drivers_aa64
+cp --preserve=timestamps drivers_aa64/*_aa64.efi refind-bin-$1/refind/drivers_aa64/
+cp --preserve=timestamps filesystems/LICENSE*txt refind-bin-$1/refind/drivers_aa64/
+cp refind/refind_aa64.efi refind-bin-$1/refind/refind_aa64.efi
+cp refind/refind_aa64.efi $StartDir/
+mkdir -p refind-bin-$1/refind/tools_aa64
+# Don't copy gptsync_aa64.efi because it won't build in cross-compile environment
+# and because it's likely to be useless on ARM64.
+
+# Build the IA32 binaries
+make clean
ARCH=ia32 make -j1
ARCH=ia32 make fs
mkdir -p refind-bin-$1/refind/drivers_ia32
mv ~/rpmbuild/SRPMS/refind-$1* ./
sudo alien --to-deb -k -c refind-$1*x86_64.rpm
sudo chown rodsmith: refind*deb
-rm ~/rpmbuild/SOURCES/refind-src-$1.tar.gz
+rm ~/rpmbuild/SOURCES/refind-src-*
# Clean up
if [[ $SignIt == 1 ]] ; then
#define DRIVER_DIRS L"drivers"
#define FALLBACK_FULLNAME L"EFI\\BOOT\\boot.efi" /* Not really correct */
#define FALLBACK_BASENAME L"boot.efi" /* Not really correct */
-// Below is GUID for ARM64
-EFI_GUID gFreedesktopRootGuid = { 0xb921b045, 0x1df0, 0x41c3, { 0xaf, 0x44, 0x4c, 0x6f, 0x28, 0x0d, 0x3f, 0xae }};
+// Below is GUID for ARM32
+EFI_GUID gFreedesktopRootGuid = { 0x69dad710, 0x2ce4, 0x4e3c, { 0xb1, 0x6c, 0x21, 0xa1, 0xd4, 0x9a, 0xbe, 0xd3 }};
#endif
#define FAT_ARCH 0x0ef1fab9 /* ID for Apple "fat" binary */
if (AboutMenu.EntryCount == 0) {
AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
- AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.10.0.5");
+ AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.10.0.6");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2015 Roderick W. Smith");