0474d89de7
efivar only makes sense on platforms that support UEFI. UEFI is only supported by some architectures at the moment, being mostly employed on platforms such as x86, x86_64 and aarch64. Some other platforms such as MIPS and PowerPC may have some unofficial UEFI support. UEFI is also limited to little endian architectures. efivar was being supported in Buildroot without architecture restrictions so far, however this has led to the creation of a number of hacks in the recipes, mostly for architectures that are not supported by UEFI. In order to avoid spending more time to debug these failures and maintaining more hacks for unsupported architectures, efivar can be restricted to that platforms where it makes sense and where it is more likely to receive some testing and actual usage. The existing hacks for the now unsupported architectures are removed, and the dependency is propagated to efibootmgr as it depends on efivar. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
52 lines
1.5 KiB
Makefile
52 lines
1.5 KiB
Makefile
################################################################################
|
|
#
|
|
# efivar
|
|
#
|
|
################################################################################
|
|
|
|
EFIVAR_VERSION = 30
|
|
EFIVAR_SITE = $(call github,rhinstaller,efivar,$(EFIVAR_VERSION))
|
|
EFIVAR_LICENSE = LGPLv2.1
|
|
EFIVAR_LICENSE_FILES = COPYING
|
|
EFIVAR_DEPENDENCIES = popt
|
|
EFIVAR_INSTALL_STAGING = YES
|
|
|
|
# BINTARGETS is set to skip efivar-static which requires static popt,
|
|
# and since we depend on dynamic libraries, efivar will never be built
|
|
# in a static-only environment.
|
|
# -fPIC is needed at least on MIPS, otherwise fails to build shared
|
|
# -library.
|
|
EFIVAR_MAKE_OPTS = \
|
|
libdir=/usr/lib \
|
|
BINTARGETS=efivar \
|
|
LDFLAGS="$(TARGET_LDFLAGS) -fPIC"
|
|
|
|
define EFIVAR_BUILD_CMDS
|
|
# makeguids is an internal host tool and must be built separately with
|
|
# $(HOST_CC), otherwise it gets cross-built.
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \
|
|
CFLAGS="$(HOST_CFLAGS) -std=gnu99" \
|
|
$(MAKE) -C $(@D)/src gcc_cflags= makeguids
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) \
|
|
AR=$(TARGET_AR) NM=$(TARGET_NM) RANLIB=$(TARGET_RANLIB) \
|
|
$(EFIVAR_MAKE_OPTS) \
|
|
all
|
|
endef
|
|
|
|
define EFIVAR_INSTALL_STAGING_CMDS
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) \
|
|
$(EFIVAR_MAKE_OPTS) \
|
|
DESTDIR="$(STAGING_DIR)" \
|
|
install
|
|
endef
|
|
|
|
define EFIVAR_INSTALL_TARGET_CMDS
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) \
|
|
$(EFIVAR_MAKE_OPTS) \
|
|
DESTDIR="$(TARGET_DIR)" \
|
|
install
|
|
endef
|
|
|
|
$(eval $(generic-package))
|