Skip to content

Commit

Permalink
Revert ipxe commit 3fb3ffc when compiling with gcc 4.8.5 for aarch64,…
Browse files Browse the repository at this point in the history
… which is the gcc version on RHEL7. gcc 4.9 and later work with the existing ASM, and gcc 8 and later fail with revert patch. Hence only apply the patch in the specific case of gcc 4.8.5 on aarch64. See ipxe/ipxe@1a77466 and ipxe/ipxe@3fb3ffc.
  • Loading branch information
bensallen committed Sep 23, 2021
1 parent c74b515 commit ee36d96
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
15 changes: 15 additions & 0 deletions provision/3rd_party/GPL/0000-ipxe-revert-3fb3ffc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- a/ipxe-2265a65/src/include/errno.h 2021-09-23 01:01:07.372658000 +0000
+++ b/ipxe-2265a65/src/include/errno.h 2021-09-23 01:01:18.089527000 +0000
@@ -262,10 +262,10 @@
".balign 8\n\t" \
"\n1:\n\t" \
".long ( 4f - 1b )\n\t" \
- ".long %c0\n\t" \
+ ".long %a0\n\t" \
".long ( 2f - 1b )\n\t" \
".long ( 3f - 1b )\n\t" \
- ".long %c1\n\t" \
+ ".long %a1\n\t" \
"\n2:\t.asciz \"" __einfo_desc ( einfo ) "\"\n\t" \
"\n3:\t.asciz \"" __FILE__ "\"\n\t" \
".balign 8\n\t" \
2 changes: 1 addition & 1 deletion provision/3rd_party/GPL/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist_gplsrc_DATA = README busybox-1.33.1.tar.bz2 e2fsprogs-1.46.4.tar.gz ipxe-2265a65.tar.xz parted-3.4.tar.xz
dist_gplsrc_DATA = 0000-ipxe-revert-3fb3ffc.patch README busybox-1.33.1.tar.bz2 e2fsprogs-1.46.4.tar.gz ipxe-2265a65.tar.xz parted-3.4.tar.xz

gplsrcdir = $(prefix)/src/warewulf/3rd_party/GPL/

Expand Down
Binary file removed provision/3rd_party/GPL/ipxe-133f4c4.tar.xz
Binary file not shown.
8 changes: 6 additions & 2 deletions provision/3rd_party/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ all: $(IPXETARGETS)
IPXE_VERSION = 2265a65
IPXE_SOURCE = $(top_srcdir)/3rd_party/GPL/ipxe-$(IPXE_VERSION).tar.xz
IPXE_DIR = ipxe-$(IPXE_VERSION)
IPXE_PATCH = GPL/0000-ipxe-revert-3fb3ffc.patch


prep:
Expand Down Expand Up @@ -59,13 +60,16 @@ endif
bin-arm64-efi/snp.efi: prep

if BUILD_ARM64
@ if [ -n "@local_ipxe_snp_arm64_path@" -a -f "@local_ipxe_snp_arm64_path@" ]; then \
@ if [ `$(CROSS_COMPILE_ARM64)gcc -dumpversion` == 4.8.5 ]; then \
( cd _work && pwd && patch -N -p1 < ../$(IPXE_PATCH) ) ; \
fi ; \
if [ -n "@local_ipxe_snp_arm64_path@" -a -f "@local_ipxe_snp_arm64_path@" ]; then \
echo "Detected local install of arm64 snp.efi boot image. Bypassing build process." ;\
mkdir -p _work/$(IPXE_DIR)/src/bin-arm64-efi ;\
cp "@local_ipxe_snp_arm64_path@" _work/$(IPXE_DIR)/src/bin-arm64-efi/snp.efi ;\
else \
$(MAKE) -C _work/$(IPXE_DIR)/src CROSS_COMPILE=$(CROSS_COMPILE_ARM64) bin-arm64-efi/snp.efi; \
fi
fi
endif

install-data-local: $(IPXETARGETS)
Expand Down
6 changes: 3 additions & 3 deletions provision/warewulf-provision.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ Requires: libarchive.so.13()(64bit)
%else
%global localtools 0
Requires: %{name}-gpl_sources = %{version}-%{release}
Provides: parted = 3.2
Provides: e2fsprogs = 1.42.12
Provides: libarchive = 3.3.1
Provides: parted = 3.4
Provides: e2fsprogs = 1.44.6
Provides: libarchive = 3.5.2
Provides: libarchive.so.13()(64bit)
%endif

Expand Down

0 comments on commit ee36d96

Please sign in to comment.