mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
From f36f71f60b1e68c0f12e615b9b128d089ec3dd19 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Fri, 7 Jun 2019 09:51:33 +0200
|
||||
Subject: tools: Fix build after y2038 changes in glibc
|
||||
|
||||
The 32-bit SIOCGSTAMP has been deprecated. Use the deprecated name
|
||||
to fix the build.
|
||||
[Retrieved from:
|
||||
https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/tools/?id=f36f71f60b1e68c0f12e615b9b128d089ec3dd19]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
tools/l2test.c | 6 +++++-
|
||||
tools/rctest.c | 6 +++++-
|
||||
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
(limited to 'tools')
|
||||
|
||||
diff --git a/tools/l2test.c b/tools/l2test.c
|
||||
index e755ac881..e787c2ce2 100644
|
||||
--- a/tools/l2test.c
|
||||
+++ b/tools/l2test.c
|
||||
@@ -55,6 +55,10 @@
|
||||
#define BREDR_DEFAULT_PSM 0x1011
|
||||
#define LE_DEFAULT_PSM 0x0080
|
||||
|
||||
+#ifndef SIOCGSTAMP_OLD
|
||||
+#define SIOCGSTAMP_OLD SIOCGSTAMP
|
||||
+#endif
|
||||
+
|
||||
/* Test modes */
|
||||
enum {
|
||||
SEND,
|
||||
@@ -907,7 +911,7 @@ static void recv_mode(int sk)
|
||||
if (timestamp) {
|
||||
struct timeval tv;
|
||||
|
||||
- if (ioctl(sk, SIOCGSTAMP, &tv) < 0) {
|
||||
+ if (ioctl(sk, SIOCGSTAMP_OLD, &tv) < 0) {
|
||||
timestamp = 0;
|
||||
memset(ts, 0, sizeof(ts));
|
||||
} else {
|
||||
diff --git a/tools/rctest.c b/tools/rctest.c
|
||||
index 94490f462..bc8ed875d 100644
|
||||
--- a/tools/rctest.c
|
||||
+++ b/tools/rctest.c
|
||||
@@ -50,6 +50,10 @@
|
||||
|
||||
#include "src/shared/util.h"
|
||||
|
||||
+#ifndef SIOCGSTAMP_OLD
|
||||
+#define SIOCGSTAMP_OLD SIOCGSTAMP
|
||||
+#endif
|
||||
+
|
||||
/* Test modes */
|
||||
enum {
|
||||
SEND,
|
||||
@@ -505,7 +509,7 @@ static void recv_mode(int sk)
|
||||
if (timestamp) {
|
||||
struct timeval tv;
|
||||
|
||||
- if (ioctl(sk, SIOCGSTAMP, &tv) < 0) {
|
||||
+ if (ioctl(sk, SIOCGSTAMP_OLD, &tv) < 0) {
|
||||
timestamp = 0;
|
||||
memset(ts, 0, sizeof(ts));
|
||||
} else {
|
||||
--
|
||||
cgit 1.2-0.3.lf.el7
|
||||
|
||||
105
package/bluez5_utils/Config.in
Normal file
105
package/bluez5_utils/Config.in
Normal file
@@ -0,0 +1,105 @@
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS
|
||||
bool "bluez-utils 5.x"
|
||||
depends on BR2_USE_WCHAR # libglib2
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
|
||||
depends on BR2_USE_MMU # dbus
|
||||
depends on !BR2_STATIC_LIBS # uses dlfcn
|
||||
depends on !BR2_PACKAGE_BLUEZ_UTILS # conflicts with 4.x version
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
select BR2_PACKAGE_DBUS
|
||||
select BR2_PACKAGE_LIBGLIB2
|
||||
help
|
||||
bluez utils version 5.x
|
||||
|
||||
With this release BlueZ only supports the new Bluetooth
|
||||
Management kernel interface (introduced in Linux 3.4).
|
||||
|
||||
For Low Energy support at least kernel version 3.5 is
|
||||
needed.
|
||||
|
||||
The API is not backward compatible with BlueZ 4.
|
||||
|
||||
Bluez utils will use systemd and/or udev if enabled.
|
||||
|
||||
http://www.bluez.org
|
||||
http://www.kernel.org/pub/linux/bluetooth
|
||||
|
||||
if BR2_PACKAGE_BLUEZ5_UTILS
|
||||
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS_OBEX
|
||||
bool "build OBEX support"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
select BR2_PACKAGE_LIBICAL
|
||||
help
|
||||
Enable the OBEX support in Bluez 5.x.
|
||||
|
||||
comment "OBEX support needs a toolchain w/ C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
|
||||
bool "build CLI client"
|
||||
select BR2_PACKAGE_READLINE
|
||||
help
|
||||
Enable the Bluez 5.x command line client.
|
||||
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
|
||||
bool "install deprecated tool"
|
||||
depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
|
||||
help
|
||||
Build BlueZ 5.x deprecated tools. These currently include:
|
||||
hciattach, hciconfig, hcitool, hcidump, rfcomm, sdptool,
|
||||
ciptool, gatttool.
|
||||
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL
|
||||
bool "build experimental obexd plugin"
|
||||
help
|
||||
Build BlueZ 5.x experimental Nokia OBEX PC Suite plugin
|
||||
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HEALTH
|
||||
bool "build health plugin"
|
||||
help
|
||||
Build BlueZ 5.x health plugin
|
||||
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MIDI
|
||||
bool "build midi profile"
|
||||
select BR2_PACKAGE_ALSA_LIB
|
||||
select BR2_PACKAGE_ALSA_LIB_SEQ
|
||||
help
|
||||
Build BlueZ 5.x midi plugin
|
||||
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NFC
|
||||
bool "build nfc plugin"
|
||||
help
|
||||
Build BlueZ 5.x nfc plugin
|
||||
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SAP
|
||||
bool "build sap plugin"
|
||||
help
|
||||
Build BlueZ 5.x sap plugin
|
||||
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SIXAXIS
|
||||
bool "build sixaxis plugin"
|
||||
depends on BR2_PACKAGE_HAS_UDEV
|
||||
help
|
||||
Build BlueZ 5.x sixaxis plugin (support Sony Dualshock
|
||||
controller)
|
||||
|
||||
comment "sixaxis plugin needs udev /dev management"
|
||||
depends on !BR2_PACKAGE_HAS_UDEV
|
||||
|
||||
config BR2_PACKAGE_BLUEZ5_UTILS_TEST
|
||||
bool "build tests"
|
||||
help
|
||||
Build BlueZ 5.x tests
|
||||
|
||||
endif
|
||||
|
||||
comment "bluez5-utils needs a toolchain w/ wchar, threads, headers >= 3.4, dynamic library"
|
||||
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 || BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on BR2_USE_MMU
|
||||
|
||||
comment "bluez5-utils conflicts with older bluez-utils version"
|
||||
depends on BR2_PACKAGE_BLUEZ_UTILS
|
||||
4
package/bluez5_utils/bluez5_utils.hash
Normal file
4
package/bluez5_utils/bluez5_utils.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# From https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc:
|
||||
sha256 5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911 bluez-5.50.tar.xz
|
||||
sha256 b499eddebda05a8859e32b820a64577d91f1de2b52efa2a1575a2cb4000bc259 COPYING
|
||||
sha256 ec60b993835e2c6b79e6d9226345f4e614e686eb57dc13b6420c15a33a8996e5 COPYING.LIB
|
||||
129
package/bluez5_utils/bluez5_utils.mk
Normal file
129
package/bluez5_utils/bluez5_utils.mk
Normal file
@@ -0,0 +1,129 @@
|
||||
################################################################################
|
||||
#
|
||||
# bluez5_utils
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Keep the version and patches in sync with bluez5_utils-headers
|
||||
BLUEZ5_UTILS_VERSION = 5.50
|
||||
BLUEZ5_UTILS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz
|
||||
BLUEZ5_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth
|
||||
BLUEZ5_UTILS_INSTALL_STAGING = YES
|
||||
BLUEZ5_UTILS_LICENSE = GPL-2.0+, LGPL-2.1+
|
||||
BLUEZ5_UTILS_LICENSE_FILES = COPYING COPYING.LIB
|
||||
|
||||
BLUEZ5_UTILS_DEPENDENCIES = \
|
||||
$(if $(BR2_PACKAGE_BLUEZ5_UTILS_HEADERS),bluez5_utils-headers) \
|
||||
dbus \
|
||||
libglib2
|
||||
|
||||
BLUEZ5_UTILS_CONF_OPTS = \
|
||||
--enable-tools \
|
||||
--enable-library \
|
||||
--disable-cups \
|
||||
--with-dbusconfdir=/etc
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_OBEX),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-obex
|
||||
BLUEZ5_UTILS_DEPENDENCIES += libical
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-obex
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_CLIENT),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-client
|
||||
BLUEZ5_UTILS_DEPENDENCIES += readline
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-client
|
||||
endif
|
||||
|
||||
# experimental plugins
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-experimental
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-experimental
|
||||
endif
|
||||
|
||||
# enable health plugin
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HEALTH),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-health
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-health
|
||||
endif
|
||||
|
||||
# enable midi profile
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MIDI),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-midi
|
||||
BLUEZ5_UTILS_DEPENDENCIES += alsa-lib
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-midi
|
||||
endif
|
||||
|
||||
# enable nfc plugin
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NFC),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-nfc
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-nfc
|
||||
endif
|
||||
|
||||
# enable sap plugin
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SAP),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-sap
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-sap
|
||||
endif
|
||||
|
||||
# enable sixaxis plugin
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SIXAXIS),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-sixaxis
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis
|
||||
endif
|
||||
|
||||
# install gatttool (For some reason upstream choose not to do it by default)
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED),y)
|
||||
define BLUEZ5_UTILS_INSTALL_GATTTOOL
|
||||
$(INSTALL) -D -m 0755 $(@D)/attrib/gatttool $(TARGET_DIR)/usr/bin/gatttool
|
||||
endef
|
||||
BLUEZ5_UTILS_POST_INSTALL_TARGET_HOOKS += BLUEZ5_UTILS_INSTALL_GATTTOOL
|
||||
# hciattach_bcm43xx defines default firmware path in `/etc/firmware`, but
|
||||
# Broadcom firmware blobs are usually located in `/lib/firmware`.
|
||||
BLUEZ5_UTILS_CONF_ENV += \
|
||||
CPPFLAGS='$(TARGET_CPPFLAGS) -DFIRMWARE_DIR=\"/lib/firmware\"'
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-deprecated
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-deprecated
|
||||
endif
|
||||
|
||||
# enable test
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_TEST),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-test
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-test
|
||||
endif
|
||||
|
||||
# use udev if available
|
||||
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-udev
|
||||
BLUEZ5_UTILS_DEPENDENCIES += udev
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-udev
|
||||
endif
|
||||
|
||||
# integrate with systemd if available
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
BLUEZ5_UTILS_CONF_OPTS += --enable-systemd
|
||||
BLUEZ5_UTILS_DEPENDENCIES += systemd
|
||||
else
|
||||
BLUEZ5_UTILS_CONF_OPTS += --disable-systemd
|
||||
endif
|
||||
|
||||
define BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants
|
||||
ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants/bluetooth.service
|
||||
ln -fs ../../../usr/lib/systemd/system/bluetooth.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/dbus-org.bluez.service
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user