summaryrefslogtreecommitdiffstats
path: root/boot/syslinux/0004-memdisk-Force-ld-output-format-to-32-bits.patch
diff options
context:
space:
mode:
authorBenoît Allard <benoit.allard@greenbone.net>2017-04-07 11:05:13 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-04-08 16:07:49 +0200
commit6e432d5ecb46959f3c27dbbca48e41512bb40a70 (patch)
tree9a740d4167d7b281cd55bcec339be6b9bd882dac /boot/syslinux/0004-memdisk-Force-ld-output-format-to-32-bits.patch
parenta4d8252ee940bfcf2ad3261ea9f9a87e99d0056f (diff)
downloadbuildroot-6e432d5ecb46959f3c27dbbca48e41512bb40a70.tar.gz
buildroot-6e432d5ecb46959f3c27dbbca48e41512bb40a70.zip
syslinux: build with the target toolchain
Until now, the host toolchain was used to build syslinux, as it was not possible to build a 32-bit syslinux with a x86-64 toolchain. However, syslinux requires gnu-efi, and gnu-efi is built using the target toolchain. Mixing different toolchains doesn't work well, so this commit changes the syslinux package to use the target toolchain for syslinux as well. This is made possible by patches 0003-Fix-ldlinux.elf-Not-enough-room-for-program-headers-.patch and 0004-memdisk-Force-ld-output-format-to-32-bits.patch. Since syslinux also contains some utilities that have to run on the host, those have to continue being built with the host toolchain, which requires patch 0005-utils-Use-the-host-toolchain-to-build.patch. Patch 0006-lzo-Use-the-host-toolchain-for-prepcore.patch is about building prepcore, another utility with the host toolchain as it is required at build-time. This was tested using a Buildroot's built x86_64 toolchain, and checked that the output binaries are 32-bits. It was tested as well if they actually boot on hardware. Signed-off-by: Benoît Allard <benoit.allard@greenbone.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'boot/syslinux/0004-memdisk-Force-ld-output-format-to-32-bits.patch')
-rw-r--r--boot/syslinux/0004-memdisk-Force-ld-output-format-to-32-bits.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/boot/syslinux/0004-memdisk-Force-ld-output-format-to-32-bits.patch b/boot/syslinux/0004-memdisk-Force-ld-output-format-to-32-bits.patch
new file mode 100644
index 0000000000..4eedf4973e
--- /dev/null
+++ b/boot/syslinux/0004-memdisk-Force-ld-output-format-to-32-bits.patch
@@ -0,0 +1,32 @@
+From c0287594239d5af2082cac20817f8e8b11a4b1b2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
+Date: Wed, 5 Apr 2017 14:18:09 +0200
+Subject: [PATCH] memdisk: Force ld output format to 32-bits
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On toolchains where the default output is x86_64, we need to be
+consistent with the other .o files
+
+Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
+---
+ memdisk/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/memdisk/Makefile b/memdisk/Makefile
+index e6557d8..06613ff 100644
+--- a/memdisk/Makefile
++++ b/memdisk/Makefile
+@@ -78,7 +78,7 @@ memdisk16.o: memdisk16.asm
+ $(NASM) -f bin $(NASMOPT) $(NFLAGS) $(NINCLUDE) -o $@ -l $*.lst $<
+
+ memdisk_%.o: memdisk_%.bin
+- $(LD) -r -b binary -o $@ $<
++ $(LD) --oformat elf32-i386 -r -b binary -o $@ $<
+
+ memdisk16.elf: $(OBJS16)
+ $(LD) -Ttext 0 -o $@ $^
+--
+2.7.4
+
OpenPOWER on IntegriCloud