Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (68b0e873c50e955bbde97e8c470691e1047035bb)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (68b0e873c50e955bbde97e8c470691e1047035bb)
  • Date: Thu, 2 Feb 2023 14:07:48 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

utils/bluez5/DETAILS
| 1
utils/bluez5/HISTORY
| 13 ++
utils/bluez5/PRE_BUILD
| 3
utils/bluez5/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch
| 21 ++++

utils/bluez5/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch
| 33 ++++++
utils/bluez5/patches/003-Increase-firmware-load-timeout-to-30s.patch
| 20 +++
utils/bluez5/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch
| 13 ++
utils/bluez5/patches/005-hostname-Use-phone-class-for-handhelds.patch
| 51 ++++++++++
utils/bluez5/patches/disable-lock-test.patch
| 18 +++
utils/bluez5/patches/fix-endianness.patch
| 13 ++
utils/bluez5/patches/max-input.patch
| 13 ++
utils/bluez5/patches/test-mesh-crypto.patch
| 14 ++
12 files changed, 213 insertions(+)

New commits:
commit 68b0e873c50e955bbde97e8c470691e1047035bb
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

bluez5: Import patches from Apline Linux

diff --git a/utils/bluez5/DETAILS b/utils/bluez5/DETAILS
index 407e3f8..b45e3ac 100755
--- a/utils/bluez5/DETAILS
+++ b/utils/bluez5/DETAILS
@@ -1,6 +1,7 @@
SPELL=bluez5
SPELLX=bluez
VERSION=5.66
+ PATCHLEVEL=1

SOURCE_HASH=sha512:ed0994932687eacf27207867366671b323671f5d5199daf36ea5eff8f254f2bc99ef989ef7df9883b35c06f2af60452be8bad0a06109428a4717cf2b247b4865
SECURITY_PATCH=2
SOURCE=$SPELLX-$VERSION.tar.xz
diff --git a/utils/bluez5/HISTORY b/utils/bluez5/HISTORY
index 05ab1ac..195d346 100644
--- a/utils/bluez5/HISTORY
+++ b/utils/bluez5/HISTORY
@@ -1,3 +1,16 @@
+2023-02-02 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: PATCHLEVEL++
+ * PRE_BUILD, patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch,
+
patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch,
+ patches/003-Increase-firmware-load-timeout-to-30s.patch,
+ patches/004-Move-the-43xx-firmware-into-lib-firmware.patch,
+ patches/005-hostname-Use-phone-class-for-handhelds.patch,
+ patches/disable-lock-test.patch,
+ patches/fix-endianness.patch,
+ patches/max-input.patch,
+ patches/test-mesh-crypto.patch:
+ imported patches from Alpine Linux
+
2022-11-10 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 5.66
* PRE_BUILD: removed, useless now
diff --git a/utils/bluez5/PRE_BUILD b/utils/bluez5/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/utils/bluez5/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/utils/bluez5/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch
b/utils/bluez5/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch
new file mode 100644
index 0000000..96e8a26
--- /dev/null
+++ b/utils/bluez5/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch
@@ -0,0 +1,21 @@
+From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil AT raspberrypi.org>
+Date: Tue, 16 Feb 2016 16:40:46 +0000
+Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant
+
+---
+ tools/hciattach.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/tools/hciattach.c
++++ b/tools/hciattach.c
+@@ -1144,6 +1144,9 @@ struct uart_t uart[] = {
+ { "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000,
+ FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL },
+
++ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000,
++ 0, DISABLE_PM, NULL, bcm43xx, NULL },
++
+ { "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
+ FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
+
diff --git
a/utils/bluez5/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch

b/utils/bluez5/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch
new file mode 100644
index 0000000..a221861
--- /dev/null
+++
b/utils/bluez5/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch
@@ -0,0 +1,33 @@
+From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil AT raspberrypi.org>
+Date: Tue, 16 Feb 2016 16:39:09 +0000
+Subject: [PATCH 2/4] bcm43xx: The UART speed must be reset after the firmware
+ download
+
+---
+ tools/hciattach_bcm43xx.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/tools/hciattach_bcm43xx.c
++++ b/tools/hciattach_bcm43xx.c
+@@ -366,11 +366,8 @@ int bcm43xx_init(int fd, int def_speed,
+ return -1;
+
+ if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {
+- fprintf(stderr, "Patch not found, continue anyway\n");
++ fprintf(stderr, "Patch not found for %s, continue anyway\n",
chip_name);
+ } else {
+- if (bcm43xx_set_speed(fd, ti, speed))
+- return -1;
+-
+ if (bcm43xx_load_firmware(fd, fw_path))
+ return -1;
+
+@@ -380,6 +377,7 @@ int bcm43xx_init(int fd, int def_speed,
+ return -1;
+ }
+
++ sleep(1);
+ if (bcm43xx_reset(fd))
+ return -1;
+ }
diff --git
a/utils/bluez5/patches/003-Increase-firmware-load-timeout-to-30s.patch
b/utils/bluez5/patches/003-Increase-firmware-load-timeout-to-30s.patch
new file mode 100644
index 0000000..fa0948d
--- /dev/null
+++ b/utils/bluez5/patches/003-Increase-firmware-load-timeout-to-30s.patch
@@ -0,0 +1,20 @@
+From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil AT raspberrypi.org>
+Date: Wed, 20 Jan 2016 16:00:37 +0000
+Subject: [PATCH 3/4] Increase firmware load timeout to 30s
+
+---
+ tools/hciattach.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/hciattach.c
++++ b/tools/hciattach.c
+@@ -1293,7 +1293,7 @@ int main(int argc, char *argv[])
+ {
+ struct uart_t *u = NULL;
+ int detach, printpid, raw, opt, i, n, ld, err;
+- int to = 10;
++ int to = 30;
+ int init_speed = 0;
+ int send_break = 0;
+ pid_t pid;
diff --git
a/utils/bluez5/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch
b/utils/bluez5/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch
new file mode 100644
index 0000000..67410c7
--- /dev/null
+++ b/utils/bluez5/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch
@@ -0,0 +1,13 @@
+diff --git a/tools/hciattach.h b/tools/hciattach.h
+index dfa4c1e..c21dbda 100644
+--- a/tools/hciattach.h
++++ b/tools/hciattach.h
+@@ -41,7 +41,7 @@
+ #define HCI_UART_VND_DETECT 5
+
+ #ifndef FIRMWARE_DIR
+-#define FIRMWARE_DIR "/etc/firmware"
++#define FIRMWARE_DIR "/lib/firmware"
+ #endif
+
+ int read_hci_event(int fd, unsigned char *buf, int size);
diff --git
a/utils/bluez5/patches/005-hostname-Use-phone-class-for-handhelds.patch
b/utils/bluez5/patches/005-hostname-Use-phone-class-for-handhelds.patch
new file mode 100644
index 0000000..c5ad4bf
--- /dev/null
+++ b/utils/bluez5/patches/005-hostname-Use-phone-class-for-handhelds.patch
@@ -0,0 +1,51 @@
+From 7960816020bbd94b1c2f0ff75f73b25927717875 Mon Sep 17 00:00:00 2001
+From: Dylan Van Assche <me AT dylanvanassche.be>
+Date: Fri, 11 Jun 2021 20:18:44 +0200
+Subject: [PATCH] hostname: Use phone class for handhelds
+
+Advertise devices with chassis type 'handheld'
+as phone instead of computer.
+---
+ plugins/hostname.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/plugins/hostname.c b/plugins/hostname.c
+index 1a9513adb..85c342d36 100644
+--- a/plugins/hostname.c
++++ b/plugins/hostname.c
+@@ -31,6 +31,7 @@
+
+ #define MAJOR_CLASS_MISCELLANEOUS 0x00
+ #define MAJOR_CLASS_COMPUTER 0x01
++#define MAJOR_CLASS_PHONE 0x02
+
+ #define MINOR_CLASS_UNCATEGORIZED 0x00
+ #define MINOR_CLASS_DESKTOP 0x01
+@@ -40,6 +41,7 @@
+ #define MINOR_CLASS_PALM_SIZED 0x05
+ #define MINOR_CLASS_WEARABLE 0x06
+ #define MINOR_CLASS_TABLET 0x07
++#define MINOR_CLASS_SMARTPHONE 0x03
+
+ static uint8_t major_class = MAJOR_CLASS_MISCELLANEOUS;
+ static uint8_t minor_class = MINOR_CLASS_UNCATEGORIZED;
+@@ -106,11 +108,11 @@ static const struct {
+ uint8_t major_class;
+ uint8_t minor_class;
+ } chassis_table[] = {
+- { "desktop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_DESKTOP },
+- { "server", MAJOR_CLASS_COMPUTER, MINOR_CLASS_SERVER },
+- { "laptop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_LAPTOP },
+- { "handset", MAJOR_CLASS_COMPUTER, MINOR_CLASS_HANDHELD },
+- { "tablet", MAJOR_CLASS_COMPUTER, MINOR_CLASS_TABLET },
++ { "desktop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_DESKTOP },
++ { "server", MAJOR_CLASS_COMPUTER, MINOR_CLASS_SERVER },
++ { "laptop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_LAPTOP },
++ { "handset", MAJOR_CLASS_PHONE, MINOR_CLASS_SMARTPHONE },
++ { "tablet", MAJOR_CLASS_COMPUTER, MINOR_CLASS_TABLET },
+ { }
+ };
+
+--
+2.31.1
+
diff --git a/utils/bluez5/patches/disable-lock-test.patch
b/utils/bluez5/patches/disable-lock-test.patch
new file mode 100644
index 0000000..3d849a8
--- /dev/null
+++ b/utils/bluez5/patches/disable-lock-test.patch
@@ -0,0 +1,18 @@
+This test locks up.
+
+--- bluez-5.47/unit/test-gatt.c.old 2017-07-14 04:12:22.000000000 -0500
++++ bluez-5.47/unit/test-gatt.c 2017-09-28 03:03:00.678738581 -0500
+@@ -4459,11 +4459,11 @@
+ raw_pdu(0x18, 0x01),
+ raw_pdu(0x01, 0x18, 0x25, 0x00, 0x06));
+
+- define_test_server("/robustness/unkown-request",
++ /*define_test_server("/robustness/unkown-request",
+ test_server, service_db_1, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0xbf, 0x00),
+- raw_pdu(0x01, 0xbf, 0x00, 0x00, 0x06));
++ raw_pdu(0x01, 0xbf, 0x00, 0x00, 0x06));*/
+
+ define_test_server("/robustness/unkown-command",
+ test_server, service_db_1, NULL,
diff --git a/utils/bluez5/patches/fix-endianness.patch
b/utils/bluez5/patches/fix-endianness.patch
new file mode 100644
index 0000000..c60e229
--- /dev/null
+++ b/utils/bluez5/patches/fix-endianness.patch
@@ -0,0 +1,13 @@
+--- a/src/shared/util.h
++++ b/src/shared/util.h
+@@ -15,6 +15,7 @@
+ #include <byteswap.h>
+ #include <string.h>
+ #include <sys/types.h>
++#include <endian.h>
+
+ #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+ #define BIT(n) (1 << (n))
+--
+2.30.2
+
diff --git a/utils/bluez5/patches/max-input.patch
b/utils/bluez5/patches/max-input.patch
new file mode 100644
index 0000000..887befe
--- /dev/null
+++ b/utils/bluez5/patches/max-input.patch
@@ -0,0 +1,13 @@
+diff --git a/src/shared/util.c b/src/shared/util.c
+index 0a0308c..a2b8c23 100644
+--- a/src/shared/util.c
++++ b/src/shared/util.c
+@@ -65,7 +65,7 @@ void *util_memdup(const void *src, size_t size)
+ void util_debug_va(util_debug_func_t function, void *user_data,
+ const char *format, va_list va)
+ {
+- char str[MAX_INPUT];
++ char str[_POSIX_MAX_INPUT];
+
+ if (!function || !format)
+ return;
diff --git a/utils/bluez5/patches/test-mesh-crypto.patch
b/utils/bluez5/patches/test-mesh-crypto.patch
new file mode 100644
index 0000000..90fc293
--- /dev/null
+++ b/utils/bluez5/patches/test-mesh-crypto.patch
@@ -0,0 +1,14 @@
+Requires kernel option that might not be enabled on the builder
+https://bugzilla.kernel.org/show_bug.cgi?id=206815
+diff --git a/Makefile.am b/Makefile.am
+index ff0df21..a384c31 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -539,7 +539,6 @@ unit_test_midi_LDADD = src/libshared-glib.la \
+ endif
+
+ if MESH
+-unit_tests += unit/test-mesh-crypto
+ unit_test_mesh_crypto_CPPFLAGS = $(ell_cflags)
+ unit_test_mesh_crypto_SOURCES = unit/test-mesh-crypto.c \
+ mesh/crypto.h ell/internal ell/ell.h



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (68b0e873c50e955bbde97e8c470691e1047035bb), Ismael Luceno, 02/02/2023

Archive powered by MHonArc 2.6.24.

Top of Page