Move buildroot to bsp directory.
This commit is contained in:
59
bsp/buildroot/boot/syslinux/Config.in
Normal file
59
bsp/buildroot/boot/syslinux/Config.in
Normal file
@@ -0,0 +1,59 @@
|
||||
config BR2_TARGET_SYSLINUX
|
||||
bool "syslinux"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
select BR2_HOSTARCH_NEEDS_IA32_COMPILER
|
||||
help
|
||||
The syslinux bootloader for x86 systems.
|
||||
This includes: syslinux, pxelinux, extlinux.
|
||||
|
||||
http://syslinux.org
|
||||
|
||||
if BR2_TARGET_SYSLINUX
|
||||
|
||||
config BR2_TARGET_SYSLINUX_LEGACY_BIOS
|
||||
bool
|
||||
|
||||
choice
|
||||
bool "Image to install"
|
||||
|
||||
config BR2_TARGET_SYSLINUX_ISOLINUX
|
||||
bool "isolinux"
|
||||
select BR2_TARGET_SYSLINUX_LEGACY_BIOS
|
||||
help
|
||||
Install the legacy-BIOS 'isolinux' image, to boot off
|
||||
optical media (CDROM, DVD.)
|
||||
|
||||
config BR2_TARGET_SYSLINUX_PXELINUX
|
||||
bool "pxelinux"
|
||||
select BR2_TARGET_SYSLINUX_LEGACY_BIOS
|
||||
help
|
||||
Install the legacy-BIOS 'pxelinux' image, to boot off
|
||||
the network using PXE.
|
||||
|
||||
config BR2_TARGET_SYSLINUX_MBR
|
||||
bool "mbr"
|
||||
select BR2_TARGET_SYSLINUX_LEGACY_BIOS
|
||||
help
|
||||
Install the legacy-BIOS 'mbr' image, to boot off a
|
||||
local MBR-partition (e.g. prepared with 'extlinux'
|
||||
or 'syslinux').
|
||||
|
||||
config BR2_TARGET_SYSLINUX_EFI
|
||||
bool "efi"
|
||||
select BR2_PACKAGE_GNU_EFI
|
||||
help
|
||||
Install the 'efi' image, to boot from an EFI environment.
|
||||
|
||||
endchoice
|
||||
|
||||
if BR2_TARGET_SYSLINUX_LEGACY_BIOS
|
||||
|
||||
config BR2_TARGET_SYSLINUX_C32
|
||||
string "modules to install"
|
||||
help
|
||||
Enter a space-separated list of .c32 modules to install.
|
||||
Leave empty to install no module.
|
||||
|
||||
endif # BR2_TARGET_SYSLINUX_LEGACY_BIOS
|
||||
|
||||
endif # BR2_TARGET_SYSLINUX
|
||||
2
bsp/buildroot/boot/syslinux/syslinux.hash
Normal file
2
bsp/buildroot/boot/syslinux/syslinux.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# From https://www.kernel.org/pub/linux/utils/boot/syslinux/sha256sums.asc
|
||||
sha256 26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e syslinux-6.03.tar.xz
|
||||
89
bsp/buildroot/boot/syslinux/syslinux.mk
Normal file
89
bsp/buildroot/boot/syslinux/syslinux.mk
Normal file
@@ -0,0 +1,89 @@
|
||||
################################################################################
|
||||
#
|
||||
# syslinux to make target msdos/iso9660 filesystems bootable
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SYSLINUX_VERSION = 6.03
|
||||
SYSLINUX_SOURCE = syslinux-$(SYSLINUX_VERSION).tar.xz
|
||||
SYSLINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux
|
||||
|
||||
SYSLINUX_LICENSE = GPLv2+
|
||||
SYSLINUX_LICENSE_FILES = COPYING
|
||||
|
||||
SYSLINUX_INSTALL_IMAGES = YES
|
||||
|
||||
SYSLINUX_DEPENDENCIES = host-nasm host-util-linux host-upx
|
||||
|
||||
ifeq ($(BR2_TARGET_SYSLINUX_LEGACY_BIOS),y)
|
||||
SYSLINUX_TARGET = bios
|
||||
endif
|
||||
|
||||
# The syslinux build system must be forced to use Buildroot's gnu-efi
|
||||
# package by setting EFIINC, LIBDIR and LIBEFI. Otherwise, it uses its
|
||||
# own copy of gnu-efi included in syslinux's sources since 6.03
|
||||
# release.
|
||||
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)
|
||||
SYSLINUX_EFI_ARGS = \
|
||||
EFIINC=$(STAGING_DIR)/usr/include/efi \
|
||||
LIBDIR=$(STAGING_DIR)/usr/lib \
|
||||
LIBEFI=$(STAGING_DIR)/usr/lib/libefi.a
|
||||
endif # EFI
|
||||
|
||||
# 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
|
||||
|
||||
# syslinux build system has no convenient way to pass CFLAGS,
|
||||
# and the internal zlib should take precedence so -I shouldn't
|
||||
# be used.
|
||||
define SYSLINUX_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \
|
||||
AR="$(HOSTAR)" $(SYSLINUX_EFI_ARGS) -C $(@D) $(SYSLINUX_TARGET)
|
||||
endef
|
||||
|
||||
# While the actual bootloader is compiled for the target, several
|
||||
# utilities for installing the bootloader are meant for the host.
|
||||
# Repeat the target, otherwise syslinux will try to build everything
|
||||
# Repeat CC and AR, since syslinux really wants to check them at
|
||||
# install time
|
||||
define SYSLINUX_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \
|
||||
AR="$(HOSTAR)" $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(HOST_DIR) \
|
||||
-C $(@D) $(SYSLINUX_TARGET) install
|
||||
endef
|
||||
|
||||
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_MBR) += bios/mbr/mbr.bin
|
||||
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_EFI) += $(SYSLINUX_EFI_BITS)/efi/syslinux.efi
|
||||
|
||||
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.
|
||||
define SYSLINUX_INSTALL_IMAGES_CMDS
|
||||
for i in $(SYSLINUX_IMAGES-y); do \
|
||||
$(INSTALL) -D -m 0755 $(@D)/$$i $(BINARIES_DIR)/syslinux/$${i##*/}; \
|
||||
done
|
||||
for i in $(SYSLINUX_C32); do \
|
||||
$(INSTALL) -D -m 0755 $(HOST_DIR)/usr/share/syslinux/$${i} \
|
||||
$(BINARIES_DIR)/syslinux/$${i}; \
|
||||
done
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user