Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/2] syslinux: Builds with the target toolchain
Date: Wed, 5 Apr 2017 22:25:03 +0200	[thread overview]
Message-ID: <20170405222503.79f8e645@free-electrons.com> (raw)
In-Reply-To: <1491398930-6130-1-git-send-email-benoit.allard@greenbone.net>

Hello,

On Wed,  5 Apr 2017 15:28:49 +0200, Beno?t Allard wrote:
> Until now, the host toolchain was used to build syslinux. syslinux does requires gnu-efi, and this is built using the target toolchain. Mixing different toolchains doesn't work well, so let's use the target toolchain for syslinux as well.
> 
> Well, almost, as syslinux also contains some utilities that have to run on the host. Those ones need to be built with the host toolchain.
> 
> This was tested using a buildroot's built x86_64 toolchain, and checked that some 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>

Unfortunately, this doesn't build for me: the prepcore tool is built
for the target, but executed on the host. I've intentionally tested
with a x86-64 musl toolchain, so that the C library of the target is
not the one of my host machine, which guarantees a target executable
will not run on my host machine. It fails with:

perl /home/thomas/projets/buildroot/output/build/syslinux-6.03/core/lstadjust.pl ldlinux.lsr ldlinux.sec ldlinux.lst
objcopy -O binary -S ldlinux.elf ldlinux.raw
/home/thomas/projets/buildroot/output/build/syslinux-6.03/bios/core/../lzo/prepcore ldlinux.raw ldlinux.bin
make[5]: /home/thomas/projets/buildroot/output/build/syslinux-6.03/bios/core/../lzo/prepcore: Command not found
/home/thomas/projets/buildroot/output/build/syslinux-6.03/core/Makefile:153: recipe for target 'ldlinux.bin' failed
make[5]: *** [ldlinux.bin] Error 127
rm ldlinux.o ldlinux.raw
/home/thomas/projets/buildroot/output/build/syslinux-6.03/Makefile:285: recipe for target 'core' failed
make[4]: *** [core] Error 2
/home/thomas/projets/buildroot/output/build/syslinux-6.03/Makefile:254: recipe for target 'bios' failed
make[3]: *** [bios] Error 2
Makefile:103: recipe for target 'bios' failed
make[2]: *** [bios] Error 2

To reproduce this issue, build the following configuration:

BR2_x86_64=y
BR2_x86_atom=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-x86-64-musl-2017.02-744-g40962a0.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_5=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_10=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_SYSLINUX=y
BR2_TARGET_SYSLINUX_ISOLINUX=y
BR2_TARGET_SYSLINUX_PXELINUX=y
BR2_TARGET_SYSLINUX_MBR=y

Also, I've done a number of improvements to your patch, so if you could
restart from the version I was about to commit before seeing the issue,
it would be nice. I pushed it at:

  http://git.free-electrons.com/users/thomas-petazzoni/buildroot/commit/?h=syslinux-fix

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  parent reply	other threads:[~2017-04-05 20:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05 10:09 [Buildroot] [PATCH] syslinux: Builds with the target toolchain Benoît Allard
2017-04-05 11:02 ` Thomas Petazzoni
2017-04-05 13:38   ` Benoît Allard
2017-04-05 14:48     ` Arnout Vandecappelle
2017-04-05 13:28 ` [Buildroot] [PATCH v2 1/2] " Benoît Allard
2017-04-05 13:28   ` [Buildroot] [PATCH v2 2/2] Take ownership of the (orphaned) syslinux package Benoît Allard
2017-04-05 14:51     ` Arnout Vandecappelle
2017-04-05 19:07     ` Thomas Petazzoni
2017-04-05 20:25   ` Thomas Petazzoni [this message]
2017-04-06 10:04   ` [Buildroot] [PATCH v4 1/1] syslinux: build with the target toolchain Benoît Allard
2017-04-06 15:13     ` Thomas Petazzoni
2017-04-07  8:06       ` Benoît Allard
2017-04-07  8:16         ` Thomas Petazzoni
2017-04-07  9:05     ` [Buildroot] [PATCH v5] " Benoît Allard
2017-04-08 14:08       ` Thomas Petazzoni
2017-04-11  7:45         ` Benoît Allard
2017-04-12  8:34           ` Thomas Petazzoni
2017-04-24 19:19       ` Peter Korsgaard

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=20170405222503.79f8e645@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox