2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2005-06-23 07:09:05 +02:00
|
|
|
#
|
|
|
|
# syslinux to make target msdos/iso9660 filesystems bootable
|
|
|
|
#
|
2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2005-06-23 07:09:05 +02:00
|
|
|
|
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-02 19:10:34 +02:00
|
|
|
SYSLINUX_VERSION = 6.02
|
|
|
|
SYSLINUX_SOURCE = syslinux-$(SYSLINUX_VERSION).tar.xz
|
2014-07-31 10:46:58 +02:00
|
|
|
SYSLINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux
|
2005-06-23 07:09:05 +02:00
|
|
|
|
2012-08-18 11:25:39 +02:00
|
|
|
SYSLINUX_LICENSE = GPLv2+
|
|
|
|
SYSLINUX_LICENSE_FILES = COPYING
|
|
|
|
|
2011-07-05 21:54:04 +02:00
|
|
|
SYSLINUX_INSTALL_IMAGES = YES
|
2005-06-23 07:09:05 +02:00
|
|
|
|
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-02 19:10:34 +02:00
|
|
|
SYSLINUX_DEPENDENCIES = host-nasm host-util-linux host-upx
|
|
|
|
|
2014-05-02 19:10:35 +02:00
|
|
|
ifeq ($(BR2_TARGET_SYSLINUX_LEGACY_BIOS),y)
|
|
|
|
SYSLINUX_TARGET = bios
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_SYSLINUX_EFI),y)
|
|
|
|
ifeq ($(BR2_ARCH_IS_64),y)
|
|
|
|
SYSLINUX_EFI_BITS = efi64
|
|
|
|
else
|
|
|
|
SYSLINUX_EFI_BITS = efi32
|
|
|
|
endif # 64-bit
|
|
|
|
SYSLINUX_DEPENDENCIES += gnu-efi
|
|
|
|
SYSLINUX_TARGET = $(SYSLINUX_EFI_BITS)
|
|
|
|
endif # EFI
|
|
|
|
|
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-02 19:10:34 +02:00
|
|
|
# The syslinux tarball comes with pre-compiled binaries.
|
|
|
|
# Since timestamps might not be in the correct order, a rebuild is
|
|
|
|
# not always triggered for all the different images.
|
|
|
|
# Cleanup the mess even before we attempt a build, so we indeed
|
|
|
|
# build everything from source.
|
|
|
|
define SYSLINUX_CLEANUP
|
|
|
|
rm -rf $(@D)/bios $(@D)/efi32 $(@D)/efi64
|
|
|
|
endef
|
|
|
|
SYSLINUX_POST_PATCH_HOOKS += SYSLINUX_CLEANUP
|
2007-02-04 17:34:56 +01:00
|
|
|
|
2012-07-05 22:01:31 +02:00
|
|
|
# syslinux build system has no convenient way to pass CFLAGS,
|
|
|
|
# and the internal zlib should take precedence so -I shouldn't
|
|
|
|
# be used.
|
2011-07-05 21:54:04 +02:00
|
|
|
define SYSLINUX_BUILD_CMDS
|
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-02 19:10:34 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \
|
2014-05-02 19:10:35 +02:00
|
|
|
AR="$(HOSTAR)" SYSROOT=$(STAGING_DIR) -C $(@D) $(SYSLINUX_TARGET)
|
2011-07-05 21:54:04 +02:00
|
|
|
endef
|
2005-06-23 07:09:05 +02:00
|
|
|
|
2014-05-02 19:10:31 +02:00
|
|
|
# While the actual bootloader is compiled for the target, several
|
|
|
|
# utilities for installing the bootloader are meant for the host.
|
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-02 19:10:34 +02:00
|
|
|
# Repeat the target, otherwise syslinux will try to build everything
|
|
|
|
# Repeat CC and AR, since syslinux really wants to check them at
|
|
|
|
# install time
|
2014-03-16 20:04:30 +01:00
|
|
|
define SYSLINUX_INSTALL_TARGET_CMDS
|
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-02 19:10:34 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \
|
2014-05-02 19:10:35 +02:00
|
|
|
AR="$(HOSTAR)" SYSROOT=$(STAGING_DIR) INSTALLROOT=$(HOST_DIR) \
|
|
|
|
-C $(@D) $(SYSLINUX_TARGET) install
|
2014-03-16 20:04:30 +01:00
|
|
|
endef
|
|
|
|
|
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-02 19:10:34 +02:00
|
|
|
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += bios/core/isolinux.bin
|
|
|
|
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += bios/core/pxelinux.bin
|
2014-05-02 19:10:36 +02:00
|
|
|
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_MBR) += bios/mbr/mbr.bin
|
2014-05-02 19:10:35 +02:00
|
|
|
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_EFI) += $(SYSLINUX_EFI_BITS)/efi/syslinux.efi
|
2005-06-23 07:09:05 +02:00
|
|
|
|
2014-05-02 19:10:37 +02:00
|
|
|
SYSLINUX_C32 = $(call qstrip,$(BR2_TARGET_SYSLINUX_C32))
|
|
|
|
|
|
|
|
# We install the c32 modules from the host-installed tree, where they
|
|
|
|
# are all neatly installed in a single location, while they are
|
|
|
|
# scattered around everywhere in the build tree.
|
2011-07-05 21:54:04 +02:00
|
|
|
define SYSLINUX_INSTALL_IMAGES_CMDS
|
|
|
|
for i in $(SYSLINUX_IMAGES-y); do \
|
2014-05-02 19:10:38 +02:00
|
|
|
$(INSTALL) -D -m 0755 $(@D)/$$i $(BINARIES_DIR)/syslinux/$${i##*/}; \
|
2011-07-05 21:54:04 +02:00
|
|
|
done
|
2014-05-02 19:10:37 +02:00
|
|
|
for i in $(SYSLINUX_C32); do \
|
|
|
|
$(INSTALL) -D -m 0755 $(HOST_DIR)/usr/share/syslinux/$${i} \
|
2014-05-02 19:10:38 +02:00
|
|
|
$(BINARIES_DIR)/syslinux/$${i}; \
|
2014-05-02 19:10:37 +02:00
|
|
|
done
|
2011-07-05 21:54:04 +02:00
|
|
|
endef
|
2010-03-16 21:50:16 +01:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|