From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: buildroot@buildroot.org
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Subject: [Buildroot] [PATCH 2/2] boot/syslinux: Don't delete host syslinux installer
Date: Sun, 30 Aug 2026 20:19:02 +0200 [thread overview]
Message-ID: <20260830181907.106154-2-alexander.sverdlin@gmail.com> (raw)
In-Reply-To: <20260830181907.106154-1-alexander.sverdlin@gmail.com>
With 6.04-pre2 the installer is being built properly with host
toolchain and can be successfully used to install BIOS bootloader
into the target image.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
...ost-toolchain-for-syslinux-installer.patch | 48 +++++++++++++++++++
boot/syslinux/syslinux.mk | 8 ----
2 files changed, 48 insertions(+), 8 deletions(-)
create mode 100644 boot/syslinux/0005-mtools-Use-the-host-toolchain-for-syslinux-installer.patch
diff --git a/boot/syslinux/0005-mtools-Use-the-host-toolchain-for-syslinux-installer.patch b/boot/syslinux/0005-mtools-Use-the-host-toolchain-for-syslinux-installer.patch
new file mode 100644
index 0000000000..3fe431ac37
--- /dev/null
+++ b/boot/syslinux/0005-mtools-Use-the-host-toolchain-for-syslinux-installer.patch
@@ -0,0 +1,48 @@
+From 3eb38370b831ede21ecb8cda7ed04b6123531df4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
+Date: Thu, 6 Apr 2017 09:43:46 +0200
+Subject: [PATCH] mtools: Use the host toolchain for syslinux installer
+
+Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
+---
+ mtools/Makefile | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/mtools/Makefile b/mtools/Makefile
+index 632b185b..b67354d4 100755
+--- a/mtools/Makefile
++++ b/mtools/Makefile
+@@ -1,5 +1,8 @@
+ include $(MAKEDIR)/syslinux.mk
+
++CC_FOR_BUILD ?= $(CC)
++STRIP_FOR_BUILD ?= $(STRIP)
++
+ OPTFLAGS = -g -Os
+ INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libfat -I$(SRC)/../libinstaller
+ CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
+@@ -35,16 +38,16 @@ spotless: clean
+ installer: syslinux
+
+ syslinux: $(OBJS)
+- $(CC) $(LDFLAGS) -o $@ $^
++ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^
+
+ strip:
+- $(STRIP) syslinux
++ $(STRIP_FOR_BUILD) syslinux
+
+ %.o: %.c
+- $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
+ %.i: %.c
+- $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
+ %.s: %.c
+- $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
+
+ -include .*.d
+--
+2.31.1
+
diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
index 3d24869e59..ab531f69fd 100644
--- a/boot/syslinux/syslinux.mk
+++ b/boot/syslinux/syslinux.mk
@@ -98,14 +98,6 @@ define SYSLINUX_INSTALL_TARGET_CMDS
-C $(@D) $(SYSLINUX_TARGET) install
endef
-# That 'syslinux' binary is an installer actually built for the target.
-# However, buildroot makes no usage of it, so better delete it than have it
-# installed at the wrong place
-define SYSLINUX_POST_INSTALL_CLEANUP
- rm -rf $(HOST_DIR)/bin/syslinux
-endef
-SYSLINUX_POST_INSTALL_TARGET_HOOKS += SYSLINUX_POST_INSTALL_CLEANUP
-
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += bios/core/isolinux.bin
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += bios/core/pxelinux.bin
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_LPXELINUX) += bios/core/lpxelinux.bin
--
2.55.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-08-30 18:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 18:19 [Buildroot] [PATCH 1/2] boot/syslinux: Bump to 6.04-pre2 Alexander Sverdlin
2026-08-30 18:19 ` Alexander Sverdlin [this message]
2026-09-19 16:24 ` [Buildroot] [PATCH 2/2] boot/syslinux: Don't delete host syslinux installer Thomas Petazzoni via buildroot
2026-09-19 16:23 ` [Buildroot] [PATCH 1/2] boot/syslinux: Bump to 6.04-pre2 Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260830181907.106154-2-alexander.sverdlin@gmail.com \
--to=alexander.sverdlin@gmail.com \
--cc=buildroot@buildroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.