diff options
author | Timo Teräs <timo.teras@iki.fi> | 2018-12-28 10:33:06 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2018-12-28 10:33:06 +0200 |
commit | e92f3a421240a849e7be52c15d9448419891c2ae (patch) | |
tree | 93a3d52deca6f58c3f7f836da3732c62213528f9 /main/alpine-ipxe | |
parent | 546b4ab3c85e86b127b8d94a189f016b7f06d7e8 (diff) | |
download | aports-e92f3a421240a849e7be52c15d9448419891c2ae.tar.bz2 aports-e92f3a421240a849e7be52c15d9448419891c2ae.tar.xz |
main/alpine-ipxe: fix aarch64 build
cherry-pick upstream PR fixing the issue
Diffstat (limited to 'main/alpine-ipxe')
-rw-r--r-- | main/alpine-ipxe/APKBUILD | 6 | ||||
-rw-r--r-- | main/alpine-ipxe/fix-aarch64.patch | 45 |
2 files changed, 50 insertions, 1 deletions
diff --git a/main/alpine-ipxe/APKBUILD b/main/alpine-ipxe/APKBUILD index c9e7674b29..7b423298f5 100644 --- a/main/alpine-ipxe/APKBUILD +++ b/main/alpine-ipxe/APKBUILD @@ -3,7 +3,7 @@ pkgname=alpine-ipxe pkgver=1.0_git20180825 _sha=133f4c47baef6002b2ccb4904a035cda2303c6e5 -pkgrel=0 +pkgrel=1 pkgdesc="iPXE build for Alpine Linux netboot" url="https://boot.alpinelinux.org" arch="x86 x86_64 aarch64" @@ -14,6 +14,7 @@ options="!strip !check !archcheck !tracedeps" # no tests install="" subpackages="" source="ipxe-$pkgver.tar.gz::https://github.com/ipxe/ipxe/archive/$_sha.tar.gz + fix-aarch64.patch DST_Root_CA_X3.pem alpine-netboot-ca.crt boot.ipxe @@ -38,6 +39,8 @@ for _target in $_targets; do done prepare() { + default_prepare + cd "$builddir" local general="DIGEST_CMD NET_PROTO_IPV6 DOWNLOAD_PROTO_HTTPS IMAGE_TRUST_CMD NSLOOKUP_CMD PING_CMD REBOOT_CMD NTP_CMD PCI_CMD TIME_CMD VLAN_CMD" @@ -76,6 +79,7 @@ _split() { } sha512sums="fee3e1ab3951c9fed4c84a7f812341389873a919c8c38c45874d830fbaec3e40c02fa245a57cd0a251f41a8581d3f0739d9135009b1e644054faf6ef89130792 ipxe-1.0_git20180825.tar.gz +b64be052649c62195000801b3d7762eb97f6a98a0c18f2d4bf719b35ceb07230adb71ed5452d7a6eeaf424ca3033552456a56fac99d40c18a04c94b79ad4a636 fix-aarch64.patch 1f52b62aa9e3ec0656ea3cb5c8e52eda924d58728e64bb03ca6c112858b91b13cf0a9328b105bb232973e240406b240ed14e72b5bd325e82e6fddf3126dbcc58 DST_Root_CA_X3.pem 68030e3f30983ee45c7f740445a246ea0df225becdd0644e06ffdbd84682ac576934dab79fecceb31b70929d81ce85b40301a977862bf7beb042270be21e6d34 alpine-netboot-ca.crt 5a4f1edd0178e696e919e93b90689091f669bffe77ebb9da10d4872d208205fe42b285551f541a07b2067054a2344639052e2b297a582a1f71d907797a77d719 boot.ipxe" diff --git a/main/alpine-ipxe/fix-aarch64.patch b/main/alpine-ipxe/fix-aarch64.patch new file mode 100644 index 0000000000..d67c1542e6 --- /dev/null +++ b/main/alpine-ipxe/fix-aarch64.patch @@ -0,0 +1,45 @@ +From 0d245e1f23449426503d0856bf259fa3841dae43 Mon Sep 17 00:00:00 2001 +From: "John L. Jolly" <jjolly@suse.com> +Date: Fri, 12 Oct 2018 16:42:56 +0000 +Subject: [PATCH] [build] Fix asm argument modifiers for aarch64 build + +When building bin-arm64-efi/snp.efi using the gcc8 compiler, the following error occurs: + + In file included from core/xferbuf.c:28: + core/xferbuf.c: In function 'xferbuf_malloc_realloc': + include/errno.h:261:2: error: invalid 'asm': invalid address mode + __asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \ + ^~~~~~~ + include/errno.h:549:16: note: in expansion of macro '__einfo_error' + #define ENOSPC __einfo_error ( EINFO_ENOSPC ) + ^~~~~~~~~~~~~ + core/xferbuf.c:192:11: note: in expansion of macro 'ENOSPC' + return -ENOSPC; + ^~~~~~ + +The 'a' address mode is invalid for aarch64. Simply changing this to +the constant operand type 'c' seems to resolve the issue on aarch64 and +does not appear to affect x86_64 or i586. + +Signed-off-by: John L. Jolly <jjolly@suse.com> +--- + include/errno.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/errno.h b/include/errno.h +index e80bf9ca5..342384fa4 100644 +--- a/include/errno.h ++++ b/include/errno.h +@@ -262,10 +262,10 @@ static inline void eplatform_discard ( int dummy __unused, ... ) {} + ".align 8\n\t" \ + "\n1:\n\t" \ + ".long ( 4f - 1b )\n\t" \ +- ".long %a0\n\t" \ ++ ".long %c0\n\t" \ + ".long ( 2f - 1b )\n\t" \ + ".long ( 3f - 1b )\n\t" \ +- ".long %a1\n\t" \ ++ ".long %c1\n\t" \ + "\n2:\t.asciz \"" __einfo_desc ( einfo ) "\"\n\t" \ + "\n3:\t.asciz \"" __FILE__ "\"\n\t" \ + ".align 8\n\t" \ |