refind: allows building for aarch64
This commit is contained in:
parent
589907bd38
commit
19c404cf45
2 changed files with 34 additions and 1 deletions
27
pkgs/tools/bootloaders/refind/0001-toolchain.patch
Normal file
27
pkgs/tools/bootloaders/refind/0001-toolchain.patch
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
diff --git a/Make.common b/Make.common
|
||||||
|
index 3f0b919..ee365f5 100644
|
||||||
|
--- a/Make.common
|
||||||
|
+++ b/Make.common
|
||||||
|
@@ -33,22 +33,6 @@ ARCH ?= $(HOSTARCH)
|
||||||
|
|
||||||
|
# Note: TIANOBASE is defined in master Makefile and exported
|
||||||
|
GENFW = $(TIANOBASE)/BaseTools/Source/C/bin/GenFw
|
||||||
|
-prefix = /usr/bin/
|
||||||
|
-ifeq ($(ARCH),aarch64)
|
||||||
|
- CC = $(prefix)aarch64-linux-gnu-gcc
|
||||||
|
- AS = $(prefix)aarch64-linux-gnu-as
|
||||||
|
- LD = $(prefix)aarch64-linux-gnu-ld
|
||||||
|
- AR = $(prefix)aarch64-linux-gnu-ar
|
||||||
|
- RANLIB = $(prefix)aarch64-linux-gnu-ranlib
|
||||||
|
- OBJCOPY = $(prefix)aarch64-linux-gnu-objcopy
|
||||||
|
-else
|
||||||
|
- CC = $(prefix)gcc
|
||||||
|
- AS = $(prefix)as
|
||||||
|
- LD = $(prefix)ld
|
||||||
|
- AR = $(prefix)ar
|
||||||
|
- RANLIB = $(prefix)ranlib
|
||||||
|
- OBJCOPY = $(prefix)objcopy
|
||||||
|
-endif
|
||||||
|
|
||||||
|
ifeq ($(MAKEWITH),TIANO)
|
||||||
|
# Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, GCC46, or GCC47)
|
|
@ -4,6 +4,7 @@ let
|
||||||
archids = {
|
archids = {
|
||||||
"x86_64-linux" = { hostarch = "x86_64"; efiPlatform = "x64"; };
|
"x86_64-linux" = { hostarch = "x86_64"; efiPlatform = "x64"; };
|
||||||
"i686-linux" = rec { hostarch = "ia32"; efiPlatform = hostarch; };
|
"i686-linux" = rec { hostarch = "ia32"; efiPlatform = hostarch; };
|
||||||
|
"aarch64-linux" = rec { hostarch = "aarch64"; efiPlatform = "aa64"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
@ -21,6 +22,10 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1bjd0dl77bc5k6g3kc7s8m57vpbg2zscph9qh84xll9rc10g3fir";
|
sha256 = "1bjd0dl77bc5k6g3kc7s8m57vpbg2zscph9qh84xll9rc10g3fir";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./0001-toolchain.patch
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ gnu-efi ];
|
buildInputs = [ gnu-efi ];
|
||||||
|
|
||||||
hardeningDisable = [ "stackprotector" ];
|
hardeningDisable = [ "stackprotector" ];
|
||||||
|
@ -32,6 +37,7 @@ stdenv.mkDerivation rec {
|
||||||
"GNUEFILIB=${gnu-efi}/lib"
|
"GNUEFILIB=${gnu-efi}/lib"
|
||||||
"EFICRT0=${gnu-efi}/lib"
|
"EFICRT0=${gnu-efi}/lib"
|
||||||
"HOSTARCH=${hostarch}"
|
"HOSTARCH=${hostarch}"
|
||||||
|
"ARCH=${hostarch}"
|
||||||
];
|
];
|
||||||
|
|
||||||
buildFlags = [ "gnuefi" "fs_gnuefi" ];
|
buildFlags = [ "gnuefi" "fs_gnuefi" ];
|
||||||
|
@ -116,7 +122,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
homepage = http://refind.sourceforge.net/;
|
homepage = http://refind.sourceforge.net/;
|
||||||
maintainers = [ maintainers.AndersonTorres ];
|
maintainers = [ maintainers.AndersonTorres ];
|
||||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue