initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,69 @@
From 874d9605aa9cd028aed149c2dd1bb410856477fb Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 21 Jun 2020 23:28:37 +0200
Subject: [PATCH] autotools: make example build optional
This patch makes example build optional for autotools build system.
In order to keep the former behavior, example build is enabled by default.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[Retrieved (and slightly updated to remove CMakeLists.txt) from:
https://git.buildroot.net/buildroot/tree/package/libnfc/0001-build-systems-make-example-build-optional.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Retrieved from:
https://github.com/nfc-tools/libnfc/commit/874d9605aa9cd028aed149c2dd1bb410856477fb]
---
Makefile.am | 8 +++++++-
configure.ac | 11 +++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index d2f6fc8e..516ebee2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,13 @@ ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = $(LIBNFC_CFLAGS)
-SUBDIRS = libnfc utils examples include contrib cmake test
+SUBDIRS = libnfc utils
+
+if EXAMPLE_ENABLED
+SUBDIRS += examples
+endif
+
+SUBDIRS += include contrib cmake test
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libnfc.pc
diff --git a/configure.ac b/configure.ac
index 280a6d08..46b65d33 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,6 +157,14 @@ then
fi
AM_CONDITIONAL(DOC_ENABLED, [test x"$enable_doc" = xyes])
+# Example build (default: yes)
+AC_ARG_ENABLE([example],AS_HELP_STRING([--enable-example],[Enable example build.]),[enable_example=$enableval],[enable_example="yes"])
+
+AC_MSG_CHECKING(for example build)
+AC_MSG_RESULT($enable_example)
+
+AM_CONDITIONAL(EXAMPLE_ENABLED, [test x"$enable_example" = xyes])
+
# Dependencies
PKG_CONFIG_REQUIRES=""
@@ -175,7 +183,10 @@ if test x$ac_cv_with_cutter = xyes -a x$ac_cv_use_cutter = xno; then
fi
AM_CONDITIONAL([WITH_CUTTER], [test "$ac_cv_use_cutter" != "no"])
+if test x"$enable_example" = "xyes"
+then
AC_CHECK_READLINE
+fi
# Help us to write great code ;-)
CFLAGS="$CFLAGS -Wall -pedantic -Wextra"
+81
View File
@@ -0,0 +1,81 @@
config BR2_PACKAGE_LIBNFC
bool "libnfc"
help
Public platform independent Near Field Communication (NFC)
library.
http://www.libnfc.org/
if BR2_PACKAGE_LIBNFC
config BR2_PACKAGE_LIBNFC_ACR122_PCSC
bool "acr122_pcsc driver"
depends on BR2_TOOLCHAIN_HAS_THREADS # pcsc-lite
depends on BR2_USE_MMU # pcsc-lite
depends on !BR2_STATIC_LIBS # pcsc-lite
select BR2_PACKAGE_PCSC_LITE
help
support for acr112_pcsc driver
comment "acr122_pcsc driver needs a toolchain w/ threads, dynamic library"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
config BR2_PACKAGE_LIBNFC_ACR122_USB
bool "acr122_usb driver"
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
select BR2_PACKAGE_LIBUSB
select BR2_PACKAGE_LIBUSB_COMPAT
help
support for acr122_usb driver
comment "acr122_usb driver needs a toolchain w/ threads, gcc >= 4.9"
depends on !BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
config BR2_PACKAGE_LIBNFC_ACR122S
bool "acr122s driver"
help
support for acr122s driver
config BR2_PACKAGE_LIBNFC_ARYGON
bool "arygon driver"
default y
help
support for arygon driver
config BR2_PACKAGE_LIBNFC_PN532_I2C
bool "pn532_i2c driver"
help
support for pn532_i2c driver
config BR2_PACKAGE_LIBNFC_PN532_SPI
bool "pn532_spi driver"
help
support for pn532_spi driver
config BR2_PACKAGE_LIBNFC_PN532_UART
bool "pn532_uart driver"
help
support for pn532_uart driver
config BR2_PACKAGE_LIBNFC_PN53X_USB
bool "pn53x_usb driver"
default y
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
select BR2_PACKAGE_LIBUSB
select BR2_PACKAGE_LIBUSB_COMPAT
help
support for pn53x_usb driver
comment "pn53x_usb driver needs a toolchain w/ threads, gcc >= 4.9"
depends on !BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
config BR2_PACKAGE_LIBNFC_EXAMPLES
bool "build libnfc examples"
select BR2_PACKAGE_READLINE
endif
+3
View File
@@ -0,0 +1,3 @@
# Locally computed:
sha256 6d9ad31c86408711f0a60f05b1933101c7497683c2e0d8917d1611a3feba3dd5 libnfc-1.8.0.tar.bz2
sha256 9ccf26cfe845e0eb8bb58053e47366e7ab6b697ae010f7650978d4b71b7d1fc1 COPYING
+63
View File
@@ -0,0 +1,63 @@
################################################################################
#
# libnfc
#
################################################################################
LIBNFC_VERSION = 1.8.0
LIBNFC_SOURCE = libnfc-$(LIBNFC_VERSION).tar.bz2
LIBNFC_SITE = https://github.com/nfc-tools/libnfc/releases/download/libnfc-$(LIBNFC_VERSION)
LIBNFC_LICENSE = LGPL-3.0+
LIBNFC_LICENSE_FILES = COPYING
LIBNFC_AUTORECONF = YES
LIBNFC_INSTALL_STAGING = YES
LIBNFC_DEPENDENCIES = host-pkgconf
# N.B. The acr122 driver requires pcsc-lite.
ifeq ($(BR2_PACKAGE_LIBNFC_ACR122_PCSC),y)
LIBNFC_DRIVER_LIST += acr122_pcsc
LIBNFC_DEPENDENCIES += pcsc-lite
endif
ifeq ($(BR2_PACKAGE_LIBNFC_ACR122_USB),y)
LIBNFC_DRIVER_LIST += acr122_usb
LIBNFC_DEPENDENCIES += libusb libusb-compat
endif
ifeq ($(BR2_PACKAGE_LIBNFC_ACR122S),y)
LIBNFC_DRIVER_LIST += acr122s
endif
ifeq ($(BR2_PACKAGE_LIBNFC_ARYGON),y)
LIBNFC_DRIVER_LIST += arygon
endif
ifeq ($(BR2_PACKAGE_LIBNFC_PN532_I2C),y)
LIBNFC_DRIVER_LIST += pn532_i2c
endif
ifeq ($(BR2_PACKAGE_LIBNFC_PN532_SPI),y)
LIBNFC_DRIVER_LIST += pn532_spi
endif
ifeq ($(BR2_PACKAGE_LIBNFC_PN532_UART),y)
LIBNFC_DRIVER_LIST += pn532_uart
endif
ifeq ($(BR2_PACKAGE_LIBNFC_PN53X_USB),y)
LIBNFC_DRIVER_LIST += pn53x_usb
LIBNFC_DEPENDENCIES += libusb libusb-compat
endif
LIBNFC_CONF_OPTS = \
--with-drivers=$(subst $(space),$(comma),$(strip $(LIBNFC_DRIVER_LIST)))
ifeq ($(BR2_PACKAGE_LIBNFC_EXAMPLES),y)
LIBNFC_CONF_OPTS += --enable-example
LIBNFC_DEPENDENCIES += readline
else
LIBNFC_CONF_OPTS += --disable-example
endif
$(eval $(autotools-package))