Commit Graph

37 Commits (65d8abe26a4d6497c6e7be94ed00d4d966e143ed)

Author SHA1 Message Date
Romain Naour 6ccfd40711 boot/syslinux: add missing python dependency
Syslinux use some python scripts during the build and they
are using python interpreter by default. It fail to build
when there is no python interpreter on the host.

[...]/syslinux-6.03/com32/cmenu/menugen.py
make[6]: python: No such file or directory

Since Syslinux 5.00, we can override the python interpreter
used during the build:

https://repo.or.cz/syslinux.git/commitdiff/4dec62ce9c2c0d170f21b3ae2d7c618eb7a30c05

Add the	missing	host-python3 dependency and override
it in SYSLINUX_BUILD_CMDS.

Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/1614446766

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[yann.morin.1998@free.fr: fix check-package]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-09-24 22:02:57 +02:00
Ricardo Martincoski c9f6e1a329 boot/*/*.mk: fix code style
Use only one space before backslash.
Indent with tabs.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-01 07:54:59 +02:00
Arnout Vandecappelle 3b91bd4791 Globally replace $(HOST_DIR)/usr/share with $(HOST_DIR)/share
Since things are no longer installed in $(HOST_DIR)/usr, the callers
should also not refer to it.

This is a mechanical change with
git grep -l '$(HOST_DIR)/usr/share' | xargs sed -i 's%$(HOST_DIR)/usr/share%$(HOST_DIR)/share%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:21:31 +02:00
Arnout Vandecappelle 0f9c0bf3d5 Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin
Since things are no longer installed in $(HOST_DIR)/usr, the callers
should also not refer to it.

This is a mechanical change with
git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:19:29 +02:00
Thomas Petazzoni d98d7d660e syslinux: add missing dependency on host-util-linux
If util-linux is not installed system-wide on the host, the build
fails with:

/usr/bin/gcc -Wp,-MT,isohybrid.o,-MMD,./.isohybrid.o.d -O2 -I/home/thomas/projets/buildroot/output/host/usr/include -W -Wall -Wstrict-prototypes  -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I/home/thomas/projets/buildroot/output/build/syslinux-6.03/utils -c -o isohybrid.o /home/thomas/projets/buildroot/output/build/syslinux-6.03/utils/isohybrid.c
/home/thomas/projets/buildroot/output/build/syslinux-6.03/utils/isohybrid.c:40:23: fatal error: uuid/uuid.h: No such file or directory
 #include <uuid/uuid.h>
                       ^
compilation terminated.

Therefore, this commit adds a dependency on host-util-linux, which
will ensure that libuuid is available. The resulting isohybrid tool is
really installed, and linked with libuuid:

$ readelf -d output/host/usr/bin/isohybrid

Dynamic section at offset 0x3e00 contains 26 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libuuid.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000f (RPATH)              Library rpath: [/home/thomas/projets/buildroot/output/host/usr/lib]

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-06-11 15:21:30 +02:00
Benoît Allard 6e432d5ecb 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>
2017-04-08 16:07:49 +02:00
Rahul Bedarkar af31c309e7 boot, linux, package: use SPDX short identifier for GPLv2/GPLv2+
We want to use SPDX identifier for license strings as much as possible.
SPDX short identifier for GPLv2/GPLv2+ is GPL-2.0/GPL-2.0+.

This change is done by using following command.
find . -name "*.mk" | xargs sed -ri '/LICENSE( )?[\+:]?=/s/\<GPLv2\>/GPL-2.0/g'

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-01 15:16:38 +02:00
Benoît Allard 3177e74c8f syslinux: Allow to build multiple flavors simultaneously
This becomes handy when building hybrid images that needs to be able
to boot in MBR and GPT mode.

Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
Tested-by: Matt Weber <matt@thewebers.ws>
Reviewed-by: Matt Weber <matt@thewebers.ws>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-18 23:41:37 +02:00
Romain Naour 52ceb700ff boot/syslinux: bump version to 6.03
Since 6.03 syslinux release, the gnu-efi sources are bundled whith
syslinux. We need to force the build system to use the Buildroot's
gnu-efi package.

Remove the patch for find-gnu-efi.sh script which was removed, as well
as the SYSROOT variable from the BUILD_CMDS, which is no longer
needed.

There are still some parallel build issues, so MAKE1 can't
be removed for now.

Add a hash file.

Fix indentation.

[Thomas: fix minor typos in a new comment in the .mk file.]

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-04 23:02:53 +01:00
Thomas De Schampheleire f268f7131b .mk files: bulk aligment and whitespace cleanup of assignments
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.

This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.

Alignment of line continuation characters (\) is kept as-is.

The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'

Brief explanation of this command:
    ^\([A-Z0-9a-z_]\+\)     a regular variable at the beginning of the line
    \([?:+]\?=\)            any assignment character =, :=, ?=, +=
    \([^\\]\+\)             any string not containing a line continuation
    \([^\\ \t]\+\s*\\\)     string, optional whitespace, followed by a
                            line continuation character
    \(\s*\\\)               optional whitespace, followed by a line
                            continuation character

Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.

This expression was tested on following test text: (initial tab not
included)

	FOO     = spaces before
	FOO     =   spaces before and after
	FOO	= tab before
	FOO	  = tab and spaces before
	FOO =	tab after
	FOO =	   tab and spaces after
	FOO =   	spaces and tab after
	FOO =    \
	FOO = bar \
	FOO = bar space    \
	FOO   =		   \
	GENIMAGE_DEPENDENCIES   = host-pkgconf libconfuse
	FOO     += spaces before
	FOO     ?=   spaces before and after
	FOO     :=
	FOO     =
	FOO	=
	FOO	  =
	FOO =
	   $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
	AT91BOOTSTRAP3_DEFCONFIG = \
	AXEL_DISABLE_I18N=--i18n=0

After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
  expression leaves the number of whitespace between the value and line
  continuation character intact, but the whitespace before that could have
  changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
  actually makes the code more readable.

Finally, the end result was manually reviewed.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-07 15:00:28 +02:00
Jerzy Grzegorek c7f4b96471 package: remove the trailing slash sign from <PKG>_SITE variable
Since the trailing slash is stripped from $($(PKG)_SITE) by pkg-generic.mk:

$(call DOWNLOAD,$($(PKG)_SITE:/=)/$($(PKG)_SOURCE))

so it is redundant.
This patch removes it from $(PKG)_SITE variable for BR consistency.

Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-31 23:17:46 +02:00
Yann E. MORIN 230b1efb02 boot/syslinux: install in a sub-dir of $(BINARIES_DIR)
Since syslinux can now install quite a number of files, install
them in a sub-directory of $(BINARIES_DIR) for clarity.

It also aligns it to rpi-firmware, grub2, gummiboot, that install
all of their files in a sub-dir of $(BINARIES_DIR), too.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-03 22:05:30 +02:00
Yann E. MORIN d98e0457f3 boot/syslinux: add option to install c32 modules
[Peter: reworded comment slightly]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-03 22:05:06 +02:00
Yann E. MORIN 6cdb0c4935 boot/syslinux: add an option to install a MBR blob
This MBR blob will look for an active partition, and boot the bootcode
present in that partition. This can be used to boot an extlinux-prepared
partition.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Lundquist <lists@zelow.no>
Cc: Frank Hunleth <fhunleth@troodon-software.com>
Tested-by: Frank Hunleth <fhunleth@troodon-software.com>
Tested-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-03 22:00:00 +02:00
Yann E. MORIN 4fb1d4b3e3 boot/syslinux: add option to install the EFI image
syslinux can now also build an EFI application.

If the target is 64-bit, we build the 64-bit EFI app,
otherwise we build the 32-bit EFI app.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Frank Hunleth <fhunleth@troodon-software.com>
Tested-by: Frank Hunleth <fhunleth@troodon-software.com>
Tested-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-03 21:57:40 +02:00
Yann E. MORIN 93be225d92 boot/syslinux: bump version
This new version has a very, very weird build system. There are different
images that syslinux can now build:
  - the plain legacy-bios images we already supported previously
  - two new EFI32 and EFI64 applications

To build one or the other, the Makefile accepts one or more of:
    make (bios|efi32|efi64)

Specify all of them, and it builds all. Specify 'install', and it installs
all of them, as one may expect.

Still a regular behaviour, is to build only a subset (down to one):
    make bios           <-- builds just the legacy-bios images
    make efi32 bios     <-- builds just the legacy-bios and efi32 images

Where it gets weird is the install procedure. Can you guess how it's done?
Hint: the syslinux guys have invented the multiple-argument parsing in
pure Makefiles. To build then install only the bios images, one would do:
    make bios
    make bios install

Yep, that's it. make bios install. Two arguments, one action.

That makes for some funky workarounds in our install procedure...

'bios' is the only image we support so far, with efi to come in a future
patch.

Using MAKE1, as there are issues with highly-parallel builds.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Frank Hunleth <fhunleth@troodon-software.com>
Tested-by: Frank Hunleth <fhunleth@troodon-software.com>
Tested-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-03 21:49:00 +02:00
Yann E. MORIN 7a2b94acf8 boot/syslinux: move comments out of define-block
The comments are not really part of the command we want to execute,
so move them out of the define-block. This also cleans up the output,
as they will no longer appear.

Reported-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-03 21:37:48 +02:00
Yann E. MORIN 8b8f9004f4 boot/syslinux: prepare to install non-core images
Currently, we hard-code the path to the images we install, and
expect them to be from the core/ sub-dir.

Not all images we can install are located in core/. For example,
the efi boot images (to come later) are not located in core/.

Prepare the upcoming installation of extlinux by not expecting
images be in core/.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Lundquist <lists@zelow.no>
Cc: Frank Hunleth <fhunleth@troodon-software.com>
Tested-by: Frank Hunleth <fhunleth@troodon-software.com>
Tested-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-03 21:33:32 +02:00
Thomas Petazzoni ac7f60d872 syslinux: remove host variant
The host variant of syslinux wasn't exposed anywhere, so the only way
to use it was to know that a "host-syslinux" target existed. Moreover,
thanks to commit 8e0d411898 ('syslinux:
install helper programs to the host'), the host utilities of syslinux
are automatically installed to $(HOST_DIR) when building the target
syslinux.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-20 11:55:15 +02:00
Frank Hunleth 8e0d411898 syslinux: install helper programs to the host
Even though syslinux is built for the target, it does create helper
programs intended to be run on the host such as syslinux and extlinux.
This change installs these helper programs to the host so that they may be
called by post image creation scripts.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-20 11:44:14 +02:00
Thomas De Schampheleire 3d86d29bf0 packages: remove package clean commands
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-08 19:42:34 +01:00
Romain Naour 41b351a6f0 syslinux: bump to version 4.07
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-11 12:53:53 +02:00
Jerzy Grzegorek 086f333f39 Normalize separator size to 80
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-07 10:54:54 +02:00
Daniel Price c12b067226 syslinux: bump to version 4.06
Signed-off-by: Daniel Price <daniel.price@gmail.com>
Tested-by: Will Moore <will.moore@beraninstruments.com>
Tested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-24 11:51:48 +01:00
Simon Dawson f13cb75fb7 syslinux: add license information
Signed-off-by: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-08-21 12:09:23 +02:00
Arnout Vandecappelle (Essensium/Mind) e1502ebc0c all packages: rename XXXTARGETS to xxx-package
Also remove the redundant $(call ...).

This is a purely mechanical change, performed with
find package linux toolchain boot -name \*.mk | \
  xargs sed -i -e 's/$(eval $(call GENTARGETS))/$(eval $(generic-package))/' \
               -e 's/$(eval $(call AUTOTARGETS))/$(eval $(autotools-package))/' \
               -e 's/$(eval $(call CMAKETARGETS))/$(eval $(cmake-package))/'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 20:23:05 +02:00
Arnout Vandecappelle (Essensium/Mind) 69e64c42b7 all packages: use new host-xxx-package macros
This is a purely mechanical change, performed with
find package linux toolchain boot -name \*.mk | \
  xargs sed -i -e 's/$(eval $(call GENTARGETS,host))/$(eval $(host-generic-package))/' \
               -e 's/$(eval $(call AUTOTARGETS,host))/$(eval $(host-autotools-package))/' \
               -e 's/$(eval $(call CMAKETARGETS,host))/$(eval $(host-cmake-package))/'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 20:18:03 +02:00
Aras Vaichas d2ff1ac2b3 syslinux: bump to 4.05
* bump syslinux from 4.04 to 4.05
* add patch to fix build problem with 4.05, see
http://old.nabble.com/syslinux-fails-to-build-td34112447.html
* add util-linux dependency and make sure the build finds it

Signed-off-by: Aras Vaichas <aras.vaichas@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 19:45:06 +02:00
Arnout Vandecappelle (Essensium/Mind) 9baaa5b4a3 syslinux: add support for host-install
This makes it possible to build the syslinux/extlinux installer, so a
bootable USB drive, CompactFlash or SD card can be created by a user
script.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-01-24 12:59:47 +01:00
Arnout Vandecappelle (Essensium/Mind) 48558c83cb syslinux: bump to version 4.04
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-01-22 22:56:47 +01:00
Thomas Petazzoni 0849e8193e package: remove useless arguments from GENTARGETS
Thanks to the pkgparentdir and pkgname functions, we can rewrite the
GENTARGETS macro in a way that avoids the need for each package to
repeat its name and the directory in which it is present.

[Peter: pkgdir->pkgparentdir]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-29 23:09:58 +02:00
Thomas Petazzoni b0d446dee4 Improve TARGETS handling for bootloaders and kernel
As the kernel and bootloaders do not use the normal BR2_PACKAGE_*
Kconfig options, their target name was not automatically added to the
global TARGETS variable. Each bootloader .mk and the linux.mk had to
add their own target manually to TARGETS, and the package
infrastructure was making tests on non-existing Kconfig variables.

This commit improves the package infrastructure so that it looks at
BR2_PACKAGE_<pkg> for packages, BR2_TARGET_<pkg> for bootloaders and
at the special BR2_LINUX_KERNEL for the linux package.

This allows to simplify a little bit the bootloaders and linux .mk
files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-07-11 23:40:23 +02:00
Thomas Petazzoni 5391de7771 syslinux: convert to GENTARGETS
Moreover, the installation of pxelinux and/or isolinux is now handled
as suboptions, like we traditionally do for other packages. This allows
to have a single option (BR2_TARGET_SYSLINUX) that enables the
syslinux package.

[Peter: drop basename in install step]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-07-10 15:27:20 +02:00
Thomas Petazzoni b5fe862e61 syslinux: depends on host-nasm
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-12 13:38:45 +02:00
Thomas Petazzoni 77d15d6771 syslinux: remove the unnecessary SYSLINUX_SUPPORTED_ARCH check
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-12 13:38:44 +02:00
Thomas Petazzoni e69ae0bce5 syslinux: bump version and fix build
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-12 13:38:44 +02:00
Thomas Petazzoni 649b5b9250 bootloaders: move bootloader build code to boot/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-10 21:05:12 +02:00