Compare commits

...

32 Commits

Author SHA1 Message Date
jaspreetsachdev
fce075bd2c Merge pull request #532 from Telecominfraproject/v2.9.0-rc2
V2.9.0 rc2
2023-03-15 13:00:26 -04:00
John Crispin
ea95356ebd rtty: improve patch indenting
Newer version of GCC complained about inconsistent indenting.

Signed-off-by: John Crispin <john@phrozen.org>
2023-03-15 09:56:09 +01:00
Piotr Dymacz
8111566f35 feeds: ucentral: include BlueZ 5.66
Copy 'bluez' package from OpenWrt's packages master branch to 'ucentral'
feed so that we can use latest version and add custom, local changes.

Keep this within 'ucentral' feeds directory to override version provided
by community based 'packages' feed from OpenWrt 21.02.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-14 15:53:43 +01:00
John Crispin
c952b34858 ucentral-schema: update to latest HEAD
54453a6 cmd_script: custom scripts with no uri failed to send the stdout to the server

Fixes: WIFI-12358
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-14 14:52:23 +01:00
John Crispin
792e3a8a2e rtty: throttle the amount of data being pushed to the server
The socket died when too much data was sent too fast

Fixes: WIFI-12334
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-14 14:41:08 +01:00
John Crispin
ae75067938 ucentral-schema: default to 32 STA max assoc if the driver does not report a valid value
Fixes: WIFI-12355
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-13 15:03:24 +01:00
John Crispin
81b66ad44b dnsmasq: fix handling of option 38
Fixes: WIFI-12260
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-13 11:55:28 +01:00
John Crispin
e193250291 ucentral-schema: update to latest HEAD
5e08879 add additional event types

Signed-off-by: John Crispin <john@phrozen.org>
2023-03-13 07:49:54 +01:00
Piotr Dymacz
dc0dae6284 mcu: select host dependencies based on MCU firmware type
In case of some types of MCU firmware, additional tools, daemons, kernel
drivers, etc. are required on the host side. For example, for Bluetooth
HCI controller, at least kernel module and BlueZ should be included.

This adds a simple recipe which generates dependencies list per firmware
type/name and for existing 'hci_usb' and 'hci_uart', selects 3 packages:
'bluez-daemon', 'kmod-bluetooth' and 'kmod-crypto-user'.

Kernel crypto interface in user space has to be also included because
the BlueZ isn't able to create static address for LE-only controller
without it, which results in no registration of new BT interface:

  bluetoothd[668]: src/adapter.c:get_static_addr() Failed to open crypto
  bluetoothd[668]: No Bluetooth address for index 0

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-10 12:11:06 +01:00
John Crispin
7c535de60d ucentral-schema: update to latest HEAD
204341f state: add port_id and port_desc to lldp state

Fixes: WIFI-11975
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-09 16:40:58 +01:00
John Crispin
26192989cd ipq807x: add CIG WF196 BDF
split the image into 2 SKUs for CA/US.

Fixes: WIFI-12357
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-09 15:14:36 +01:00
John Crispin
317aaadcbd ucentral-schema: update to latest HEAD
0f40765 turn telemetry and realtime filter into an enum

Signed-off-by: John Crispin <john@phrozen.org>
2023-03-08 17:35:43 +01:00
Satya-sc
c670733ea5 ucentral-event: added support to queue the events when there is no ucentral client is running and send those once it is available
Signed-off-by: Satya-sc <Satya@shasta.cloud>
2023-03-08 17:20:21 +01:00
John Crispin
f92617f24a ipq807x: add zephyr specific profiles
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-08 17:18:53 +01:00
Piotr Dymacz
337a68cf1d mcu: ipq807x: add support for CIG WF-196
This includes default configuration for the on-board Nordic nRF52833 MCU
in CIG WF-196. A Zephyr based sample 'hci_uart' firmware is selected.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
e09633fc2a ipq807x: add Zephyr HCI UART MCU firmware to CIG WF-196
Include Zephyr v3.3.x based Bluetooth LE HCI UART firmware package in
default packages list for the CIG WF-196. This brings initial support
for the on-board nRF52833 MCU.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
d838391850 profiles: cig_wf196: include 'mcu' feed
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
d59e58b794 mcu: ipq807x: add support for EdgeCore EAP102
This includes default configuration for the on-board Nordic nRF52840 MCU
in EdgeCore EAP102. A Zephyr based sample 'hci_usb' firmware is selected.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
ee7bf9671a ipq807x: add Zephyr HCI USB MCU firmware to EdgeCore EAP102
Include Zephyr v3.3.x based Bluetooth LE HCI USB firmware package in
default packages list for the EdgeCore EAP102. This brings initial
support for the on-board nRF52840 MCU.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
c4f0f367bc profiles: edgecore_eap102: include 'mcu' feed
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
5f649ea1f4 mcu-firmware: include firmware based on latest Zephyr
This adds Zephyr firmware builds from custom git branch based on the
latest's upstream branch name 'main': 'main__mcu-on-wifi-boards'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
397c6df34a feeds: mcu: introduce 'mcu-firmware' package
The new 'mcu-firmware' package will provide binary firmware dedicated
for MCU embedded on Wi-Fi boards (and also standalone, e.g. USB based),
supported by the OpenWrt/OpenWiFi projects. Currently, only Zephyr RTOS
based sample firmware ('BLE HCI controller' and 'hello world') files are
provided, for Wi-Fi boards and one standalone development module, listed
below:

- CIG WF-196 (Nordic nRF52833, UART bus)
- EdgeCore EAP102 (Nordic nRF52840, USB bus)
- Nordic nRF52840 Dongle (Nordic nRF52840, USB bus)

Different firmware types planned in future include Nordic's nRF Connect
SDK, OpenThread and others.

The Zephyr based firmware comes from a custom fork available in GitLab:
'https://gitlab.com/pepe2k/zephyr' (firmware in this package were built
from a v3.3.0 release based branch 'zephyr-v3.3.x__mcu-on-wifi-boards').

MCU firmware from this package is compatible only with OpenWrt/OpenWiFi
generic MCU support stack which, among others, assumes availability of
compatible bootloader (MCUboot is currently the only one supported) and
e.g. multiple firmware slots. MCUboot fork development takes part in git
repository hosted in GitLab: 'https://gitlab.com/pepe2k/mcuboot/'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
7a37e9bf0b mcu: support default configuration with uci-defaults
This adds support for creating initial MCU configuration with use of
'uci-defaults' in a same was as for example 'uboot-envtools' package.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
e4ed881dd7 mcu: support OpenWiFi with uCentral
On device running OpenWiFi with uCentral, additional copy of the initial
UCI configuration will be generated in '/etc/config-shadow/'. As part of
the MCU configuration is done during runtime, after the 'config-shadow'
is created, we should update it as well to keep everything in sync.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
9aff26b7fb mcu: provide example UCI configuration file
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
5603442a37 feeds: mcu: introduce 'mcu' package
This introduces new package 'mcu' which is a collection of shell based
scripts used as glue code for generic MCU configuration and management.

The scripts are responsible for communicating with embedded MCU running
compatible MCUboot bootloader version over MCUmgr/SMP protocol.
The communication is realized based on usage of the introduced earlier
dedicated CLI tool called 'umcumgr.

The most important function of this package is a simple MCU's firmware
management (checking firmware available in the MCU's internal flash,
uploading new and selecting active on multi-firmware slot capable MCU).

This solution requires MCU running modified version of MCUboot,
available in GitLab: https://gitlab.com/pepe2k/mcuboot

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Piotr Dymacz
8a86ae3b7d feeds: add mcu feed with 'umcumgr' package
The 'umcumgr' is a simple command line tool for MCU firmware management
over MCUmgr/SMP protocol. It will be used together with MCUboot running
on the on-board (or external, e.g. in form of a dongle) MCU.

While at it, add also dedicated 'mcu.yml' profile file.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-07 11:08:39 +01:00
Ken
9997af10a5 CIG WF-660A : Add WF-660a support [patch 3]
Fixed caldata.bin can NOT be generated with EMMC issue.
2023-03-06 10:41:39 +01:00
John Crispin
5fec90d4ca uspot: fix userurl and allow cleartext password
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-06 09:37:17 +01:00
Piotr Dymacz
f1a56edd09 ipq807x: backport some additional fixes for Bluetooth
This backports more fixes for the Bluetooth subsystem from 4.9.
They were found missing during some initial Bluetooth LE testing.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-02 16:43:05 +01:00
Piotr Dymacz
3f03cfa7c4 ipq807x: backport fix for Bluetooth LE-only HCI controllers
This backports an essential fix for Bluetooth LE-only HCI devices from
kernel 4.9: 39385cb5f327 ("Bluetooth: Fix using the correct source
address type").

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-03-02 16:43:05 +01:00
John Crispin
f34db0bb24 ucentral-schema: update to latest HEAD
5517c1c wifiscan: add additional options to the periodic scan feature

Fixes: WIFI-11993
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-01 17:36:38 +01:00
48 changed files with 2134 additions and 28 deletions

View File

@@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: ['actiontec_web7200', 'cig_wf188n', 'cig_wf194c4', 'cig_wf196', 'cig_wf610d', 'cig_wf808', 'cybertan_eww622-a1', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'liteon_wpx8324', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'indio_um-305ac', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'meshpp_s618_cp03', 'meshpp_s618_cp01', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4', 'x64_vm', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650' ]
target: ['actiontec_web7200', 'cig_wf188n', 'cig_wf194c4', 'cig_wf196-us', 'cig_wf196-ca', 'cig_wf610d', 'cig_wf808', 'cybertan_eww622-a1', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'liteon_wpx8324', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'indio_um-305ac', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'meshpp_s618_cp03', 'meshpp_s618_cp01', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4', 'x64_vm', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650' ]
steps:
- uses: actions/checkout@v3

View File

@@ -70,6 +70,9 @@ caldata_extract() {
local mtd
mtd=$(find_mtd_chardev $part)
if [ -z "$mtd" ]; then
mtd=/dev/$(echo $(find_mmc_part $part) | sed 's/^.\{5\}//')
fi
[ -n "$mtd" ] || caldata_die "no mtd device found for partition $part"
dd if=$mtd of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \

View File

@@ -36,24 +36,39 @@ define Device/cig_wf194c4
endef
TARGET_DEVICES += cig_wf194c4
define Device/cig_wf196
DEVICE_TITLE := CIG WF196
define Device/cig_wf196_us
DEVICE_TITLE := CIG WF196 (US)
DEVICE_DTS := qcom-ipq807x-wf196
DEVICE_DTS_CONFIG=config@hk14
SUPPORTED_DEVICES := cig,wf196
BLOCKSIZE := 256k
PAGESIZE := 4096
DEVICE_PACKAGES := ath11k-wifi-cig-wf196 aq-fw-download uboot-envtools kmod-usb3 kmod-usb2 \
ath11k-firmware-qcn9000 ath11k-wifi-cig-wf196_6g
DEVICE_PACKAGES := ath11k-wifi-cig-wf196-us aq-fw-download uboot-envtools kmod-usb3 kmod-usb2 \
ath11k-firmware-qcn9000 ath11k-wifi-cig-wf196_6g-us \
zephyr-v3.3.x-hci_uart-cig_wf196_nrf52833
endef
TARGET_DEVICES += cig_wf196
TARGET_DEVICES += cig_wf196_us
define Device/cig_wf196_ca
DEVICE_TITLE := CIG WF196 (CA)
DEVICE_DTS := qcom-ipq807x-wf196
DEVICE_DTS_CONFIG=config@hk14
SUPPORTED_DEVICES := cig,wf196
BLOCKSIZE := 256k
PAGESIZE := 4096
DEVICE_PACKAGES := ath11k-wifi-cig-wf196-ca aq-fw-download uboot-envtools kmod-usb3 kmod-usb2 \
ath11k-firmware-qcn9000 ath11k-wifi-cig-wf196_6g-ca \
zephyr-v3.3.x-hci_uart-cig_wf196_nrf52833
endef
TARGET_DEVICES += cig_wf196_ca
define Device/edgecore_eap102
DEVICE_TITLE := Edgecore EAP102
DEVICE_DTS := qcom-ipq807x-eap102
DEVICE_DTS_CONFIG=config@ac02
SUPPORTED_DEVICES := edgecore,eap102
DEVICE_PACKAGES := ath11k-wifi-edgecore-eap102 kmod-usb2 kmod-usb3 uboot-envtools
DEVICE_PACKAGES := ath11k-wifi-edgecore-eap102 kmod-usb2 kmod-usb3 uboot-envtools \
zephyr-v3.3.x-hci_usb-edgecore_eap102_nrf52840
endef
TARGET_DEVICES += edgecore_eap102

View File

@@ -0,0 +1,131 @@
From 39385cb5f3274735b03ed1f8e7ff517b02a0beed Mon Sep 17 00:00:00 2001
From: Johan Hedberg <johan.hedberg@intel.com>
Date: Sat, 12 Nov 2016 17:03:07 +0200
Subject: [PATCH] Bluetooth: Fix using the correct source address type
The hci_get_route() API is used to look up local HCI devices, however
so far it has been incapable of dealing with anything else than the
public address of HCI devices. This completely breaks with LE-only HCI
devices that do not come with a public address, but use a static
random address instead.
This patch exteds the hci_get_route() API with a src_type parameter
that's used for comparing with the right address of each HCI device.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
include/net/bluetooth/hci_core.h | 2 +-
net/bluetooth/6lowpan.c | 4 ++--
net/bluetooth/hci_conn.c | 26 ++++++++++++++++++++++++--
net/bluetooth/l2cap_core.c | 2 +-
net/bluetooth/rfcomm/tty.c | 2 +-
net/bluetooth/sco.c | 2 +-
6 files changed, 30 insertions(+), 8 deletions(-)
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1003,7 +1003,7 @@ static inline void hci_set_drvdata(struc
}
struct hci_dev *hci_dev_get(int index);
-struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src);
+struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src, u8 src_type);
struct hci_dev *hci_alloc_dev(void);
void hci_free_dev(struct hci_dev *hdev);
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -1102,7 +1102,6 @@ static int get_l2cap_conn(char *buf, bda
{
struct hci_conn *hcon;
struct hci_dev *hdev;
- bdaddr_t *src = BDADDR_ANY;
int n;
n = sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx %hhu",
@@ -1113,7 +1112,8 @@ static int get_l2cap_conn(char *buf, bda
if (n < 7)
return -EINVAL;
- hdev = hci_get_route(addr, src);
+ /* The LE_PUBLIC address type is ignored because of BDADDR_ANY */
+ hdev = hci_get_route(addr, BDADDR_ANY, BDADDR_LE_PUBLIC);
if (!hdev)
return -ENOENT;
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -609,7 +609,7 @@ int hci_conn_del(struct hci_conn *conn)
return 0;
}
-struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src)
+struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src, uint8_t src_type)
{
int use_src = bacmp(src, BDADDR_ANY);
struct hci_dev *hdev = NULL, *d;
@@ -630,7 +630,29 @@ struct hci_dev *hci_get_route(bdaddr_t *
*/
if (use_src) {
- if (!bacmp(&d->bdaddr, src)) {
+ bdaddr_t id_addr;
+ u8 id_addr_type;
+
+ if (src_type == BDADDR_BREDR) {
+ if (!lmp_bredr_capable(d))
+ continue;
+ bacpy(&id_addr, &d->bdaddr);
+ id_addr_type = BDADDR_BREDR;
+ } else {
+ if (!lmp_le_capable(d))
+ continue;
+
+ hci_copy_identity_address(d, &id_addr,
+ &id_addr_type);
+
+ /* Convert from HCI to three-value type */
+ if (id_addr_type == ADDR_LE_DEV_PUBLIC)
+ id_addr_type = BDADDR_LE_PUBLIC;
+ else
+ id_addr_type = BDADDR_LE_RANDOM;
+ }
+
+ if (!bacmp(&id_addr, src) && id_addr_type == src_type) {
hdev = d; break;
}
} else {
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -7044,7 +7044,7 @@ int l2cap_chan_connect(struct l2cap_chan
BT_DBG("%pMR -> %pMR (type %u) psm 0x%2.2x", &chan->src, dst,
dst_type, __le16_to_cpu(psm));
- hdev = hci_get_route(dst, &chan->src);
+ hdev = hci_get_route(dst, &chan->src, chan->src_type);
if (!hdev)
return -EHOSTUNREACH;
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -178,7 +178,7 @@ static void rfcomm_reparent_device(struc
struct hci_dev *hdev;
struct hci_conn *conn;
- hdev = hci_get_route(&dev->dst, &dev->src);
+ hdev = hci_get_route(&dev->dst, &dev->src, BDADDR_BREDR);
if (!hdev)
return;
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -219,7 +219,7 @@ static int sco_connect(struct sock *sk)
BT_DBG("%pMR -> %pMR", &sco_pi(sk)->src, &sco_pi(sk)->dst);
- hdev = hci_get_route(&sco_pi(sk)->dst, &sco_pi(sk)->src);
+ hdev = hci_get_route(&sco_pi(sk)->dst, &sco_pi(sk)->src, BDADDR_BREDR);
if (!hdev)
return -EHOSTUNREACH;

View File

@@ -0,0 +1,37 @@
From 345bafc04fa2dea44dbdc8bda5633de256a74262 Mon Sep 17 00:00:00 2001
From: Yu Liu <yudiliu@google.com>
Date: Mon, 19 Apr 2021 16:53:30 -0700
Subject: [PATCH] Bluetooth: Fix the HCI to MGMT status conversion table
[ Upstream commit 4ef36a52b0e47c80bbfd69c0cce61c7ae9f541ed ]
0x2B, 0x31 and 0x33 are reserved for future use but were not present in
the HCI to MGMT conversion table, this caused the conversion to be
incorrect for the HCI status code greater than 0x2A.
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Signed-off-by: Yu Liu <yudiliu@google.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/bluetooth/mgmt.c | 3 +++
1 file changed, 3 insertions(+)
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -212,12 +212,15 @@ static u8 mgmt_status_table[] = {
MGMT_STATUS_TIMEOUT, /* Instant Passed */
MGMT_STATUS_NOT_SUPPORTED, /* Pairing Not Supported */
MGMT_STATUS_FAILED, /* Transaction Collision */
+ MGMT_STATUS_FAILED, /* Reserved for future use */
MGMT_STATUS_INVALID_PARAMS, /* Unacceptable Parameter */
MGMT_STATUS_REJECTED, /* QoS Rejected */
MGMT_STATUS_NOT_SUPPORTED, /* Classification Not Supported */
MGMT_STATUS_REJECTED, /* Insufficient Security */
MGMT_STATUS_INVALID_PARAMS, /* Parameter Out Of Range */
+ MGMT_STATUS_FAILED, /* Reserved for future use */
MGMT_STATUS_BUSY, /* Role Switch Pending */
+ MGMT_STATUS_FAILED, /* Reserved for future use */
MGMT_STATUS_FAILED, /* Slot Violation */
MGMT_STATUS_FAILED, /* Role Switch Failed */
MGMT_STATUS_INVALID_PARAMS, /* EIR Too Large */

View File

@@ -0,0 +1,52 @@
From 433c3febcb837cf8f2758660c6a89e1d734c55dc Mon Sep 17 00:00:00 2001
From: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Date: Wed, 28 Jul 2021 15:51:04 +0800
Subject: [PATCH] Bluetooth: skip invalid hci_sync_conn_complete_evt
[ Upstream commit 92fe24a7db751b80925214ede43f8d2be792ea7b ]
Syzbot reported a corrupted list in kobject_add_internal [1]. This
happens when multiple HCI_EV_SYNC_CONN_COMPLETE event packets with
status 0 are sent for the same HCI connection. This causes us to
register the device more than once which corrupts the kset list.
As this is forbidden behavior, we add a check for whether we're
trying to process the same HCI_EV_SYNC_CONN_COMPLETE event multiple
times for one connection. If that's the case, the event is invalid, so
we report an error that the device is misbehaving, and ignore the
packet.
Link: https://syzkaller.appspot.com/bug?extid=66264bf2fd0476be7e6c [1]
Reported-by: syzbot+66264bf2fd0476be7e6c@syzkaller.appspotmail.com
Tested-by: syzbot+66264bf2fd0476be7e6c@syzkaller.appspotmail.com
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/bluetooth/hci_event.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3748,6 +3748,21 @@ static void hci_sync_conn_complete_evt(s
switch (ev->status) {
case 0x00:
+ /* The synchronous connection complete event should only be
+ * sent once per new connection. Receiving a successful
+ * complete event when the connection status is already
+ * BT_CONNECTED means that the device is misbehaving and sent
+ * multiple complete event packets for the same new connection.
+ *
+ * Registering the device more than once can corrupt kernel
+ * memory, hence upon detecting this invalid event, we report
+ * an error and ignore the packet.
+ */
+ if (conn->state == BT_CONNECTED) {
+ bt_dev_err(hdev, "Ignoring connect complete event for existing connection");
+ goto unlock;
+ }
+
conn->handle = __le16_to_cpu(ev->handle);
conn->state = BT_CONNECTED;
conn->type = ev->link_type;

View File

@@ -0,0 +1,33 @@
From 69f728dac41d13fc3e8d4514684e476ebd0d61f5 Mon Sep 17 00:00:00 2001
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Wed, 13 Oct 2021 16:55:46 +0800
Subject: [PATCH] Bluetooth: Fix debugfs entry leak in hci_register_dev()
[ Upstream commit 5a4bb6a8e981d3d0d492aa38412ee80b21033177 ]
Fault injection test report debugfs entry leak as follows:
debugfs: Directory 'hci0' with parent 'bluetooth' already present!
When register_pm_notifier() failed in hci_register_dev(), the debugfs
create by debugfs_create_dir() do not removed in the error handing path.
Add the remove debugfs code to fix it.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/bluetooth/hci_core.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3420,6 +3420,7 @@ int hci_register_dev(struct hci_dev *hde
return id;
err_wqueue:
+ debugfs_remove_recursive(hdev->debugfs);
destroy_workqueue(hdev->workqueue);
destroy_workqueue(hdev->req_workqueue);
err:

View File

@@ -0,0 +1,128 @@
#
# Copyright (C) 2023 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mcu-firmware
PKG_VERSION:=2023-03-05
PKG_RELEASE:=1
PKG_MAINTAINER:=Piotr Dymacz <pepe2k@gmail.com>
include $(INCLUDE_DIR)/package.mk
define Package/mcu-fw-default
CATEGORY:=Firmware
SUBMENU:=MCU firmware
SECTION:=firmware
TITLE:=MCU firmware
endef
# Zephyr versions
# 4 fields separated with underscore:
# version-name_git-sha_pipeline-id_sha256-of-package
ZEPHYR_VERSIONS := \
zephyr-v3.3.x_7055d10e538e_3877473859_321a0daf6328698a913c6504d19aa85a5170dfce6039b86d31d2e9162d34af7c \
zephyr-main_63d7f67d401d_3877472923_e44948759ad705f8a28449760ec3153f81d3620e0d3665e50490c7786dd2f8e2
ZEPHYR_FW_CI_URL := https://gitlab.com/pepe2k/zephyr/-/jobs/
# Zephyr 'hello_world' targets
ZEPHYR_HELLO_WORLD_TARGETS := \
cig_wf196_nrf52833 \
edgecore_eap102_nrf52840 \
nrf52840dongle_nrf52840
# Zephyr 'hci_uart' targets
ZEPHYR_HCI_UART_TARGETS:= \
cig_wf196_nrf52833 \
edgecore_eap102_nrf52840 \
nrf52840dongle_nrf52840
# Zephyr 'hci_usb' targets
ZEPHYR_HCI_USB_TARGETS := \
edgecore_eap102_nrf52840 \
nrf52840dongle_nrf52840
word-underscore = $(word $2,$(subst _, ,$1))
define Download/zephyr-fw
URL:=$(ZEPHYR_FW_CI_URL)$(call word-underscore,$(2),3)/
URL_FILE:=artifacts/download?file_type=archive
FILE:=$(call word-underscore,$(2),1)-$(call word-underscore,$(2),2).zip
HASH:=$(call word-underscore,$(2),4)
endef
$(foreach FW,$(ZEPHYR_VERSIONS),$(eval $(call Download,zephyr-fw,$(FW))))
# $(1) version (e.g zephyr-v3.3.x)
# $(2) firmware name (e.g. hci_usb)
# $(3) target/board name (e.g. nrf52840dongle_nrf52840)
define zephyr-fw
define Package/$(1)-$(2)-$(3)
$(call Package/mcu-fw-default)
DEPENDS:=+mcu $(call zephyr-fw-deps,$(2))
TITLE:=Zephyr '$(2)'
endef
define Package/$(1)-$(2)-$(3)/description
Zephyr '$(1)' based firmware '$(2)' for '$(3)' board
endef
define Package/$(1)-$(2)-$(3)/install
$(INSTALL_DIR) $$(1)/lib/firmware/mcu/$(3)/$(1)__$(2)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(1)/$(3)/$(1)__$(2)/*.bin \
$$(1)/lib/firmware/mcu/$(3)/$(1)__$(2)/
endef
endef
define zephyr-fw-deps
$(if $(findstring hci_u,$1),+bluez-daemon +kmod-bluetooth +kmod-crypto-user)
endef
define zephyr-fw-unzip
mkdir -p $(PKG_BUILD_DIR)/$(call word-underscore,$(1),1); \
unzip -q -d $(PKG_BUILD_DIR)/$(call word-underscore,$(1),1) \
$(DL_DIR)/$(call word-underscore,$(1),1)-$(call word-underscore,$(1),2).zip; \
for fw in $(PKG_BUILD_DIR)/$(call word-underscore,$(1),1)/*.tar.gz; do \
$(TAR) -C $(PKG_BUILD_DIR)/$(call word-underscore,$(1),1) --one-top-level -xzf $$$$fw; \
rm -rf $$$$fw; \
done;
endef
define Build/Prepare
$(foreach FW,$(ZEPHYR_VERSIONS),$(call zephyr-fw-unzip,$(FW)))
endef
define Build/Compile
endef
$(foreach VER,$(ZEPHYR_VERSIONS),\
$(foreach TARGET,$(ZEPHYR_HELLO_WORLD_TARGETS),\
$(eval $(call zephyr-fw,$(call word-underscore,$(VER),1),hello_world,$(TARGET)))))
$(foreach VER,$(ZEPHYR_VERSIONS),\
$(foreach TARGET,$(ZEPHYR_HCI_UART_TARGETS),\
$(eval $(call zephyr-fw,$(call word-underscore,$(VER),1),hci_uart,$(TARGET)))))
$(foreach VER,$(ZEPHYR_VERSIONS),\
$(foreach TARGET,$(ZEPHYR_HCI_USB_TARGETS),\
$(eval $(call zephyr-fw,$(call word-underscore,$(VER),1),hci_usb,$(TARGET)))))
$(foreach VER,$(ZEPHYR_VERSIONS),\
$(foreach TARGET,$(ZEPHYR_HELLO_WORLD_TARGETS),\
$(eval $(call BuildPackage,$(call word-underscore,$(VER),1)-hello_world-$(TARGET)))))
$(foreach VER,$(ZEPHYR_VERSIONS),\
$(foreach TARGET,$(ZEPHYR_HCI_UART_TARGETS),\
$(eval $(call BuildPackage,$(call word-underscore,$(VER),1)-hci_uart-$(TARGET)))))
$(foreach VER,$(ZEPHYR_VERSIONS),\
$(foreach TARGET,$(ZEPHYR_HCI_USB_TARGETS),\
$(eval $(call BuildPackage,$(call word-underscore,$(VER),1)-hci_usb-$(TARGET)))))

50
feeds/mcu/mcu/Makefile Normal file
View File

@@ -0,0 +1,50 @@
#
# Copyright (C) 2023 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mcu
PKG_VERSION:=2023-03-05
PKG_RELEASE=1
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=
PKG_MAINTAINER:=Piotr Dymacz <pepe2k@gmail.com>
include $(INCLUDE_DIR)/package.mk
define Package/mcu
TITLE:=Generic OpenWrt/OpenWiFi MCU config and management handler
CATEGORY:=Utilities
DEPENDS:=+umcumgr +libubox
SECTION:=utils
endef
define Package/mcu/conffiles
/etc/config/mcu
endef
define Build/Compile
endef
define Package/mcu/install
$(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/hotplug.d/usb $(1)/lib/functions $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/mcu.init $(1)/etc/init.d/mcu
$(INSTALL_DATA) ./files/mcu.hotplug $(1)/etc/hotplug.d/usb/30-mcu
$(INSTALL_DATA) ./files/mcu.sh $(1)/lib/functions
$(if $(wildcard ./files/uci-defaults/$(BOARD)_$(SUBTARGET)), \
$(INSTALL_DATA) ./files/uci-defaults/$(BOARD)_$(SUBTARGET) \
$(1)/etc/uci-defaults/20-mcu, \
$(if $(wildcard ./files/uci-defaults/$(BOARD)), \
$(INSTALL_DATA) ./files/uci-defaults/$(BOARD) \
$(1)/etc/uci-defaults/20-mcu \
) \
)
endef
$(eval $(call BuildPackage,mcu))

View File

@@ -0,0 +1,32 @@
config mcu 'uart_no_hw_flow'
option interface 'uart'
option bootloader 'mcuboot'
option enable_pin 'mcu-enable'
option uart_path '/dev/ttyMSM1'
option uart_baud '115200'
option firmware 'zephyr-main__hello_world'
option disabled '1'
config mcu 'uart_with_hw_flow'
option interface 'uart'
option bootloader 'mcuboot'
option enable_pin 'mcu-enable'
option uart_path '/dev/ttyMSM1'
option uart_baud '1000000'
option uart_flow '1'
option firmware 'zephyr-main__hello_world'
option disabled '1'
config mcu 'usb_with_enable_pin'
option interface 'usb'
option bootloader 'mcuboot'
option enable_pin 'mcu-enable'
option firmware 'zephyr-main__hello_world'
option disabled '1'
config mcu 'usb_no_enable_pin'
option interface 'usb'
option bootloader 'mcuboot'
option sn 'ABCDEF1234567890'
option firmware 'zephyr-main__hello_world'
option disabled '1'

View File

@@ -0,0 +1,122 @@
#!/bin/sh
. /lib/functions.sh
. /lib/functions/mcu.sh
MCU_SCRIPT_NAME="mcu-hotplug"
MCU_CFG_FOUND="0"
mcu_hotplug_setup() {
local sn
local disabled
local sn_dev="$2"
local uart="$3"
SECT="$1"
[ "$MCU_CFG_FOUND" = "1" ] && return 0
config_get sn "$SECT" sn
[ "$sn" != "$sn_dev" ] && return 0
MCU_SCRIPT_NAME="mcu-hotplug.${SECT}"
MCU_CFG_FOUND="1"
mcu_logi "found matching config section '$SECT'"
# Section disabled?
config_get_bool disabled "$SECT" disabled "0"
[ "$disabled" = "1" ] && {
mcu_logw "section is disabled in config"
return 0
}
mcu_sn_check_and_update "$sn" "$uart"
[ $? -ne 0 ] && return 1
mcu_fw_check_and_update "$uart"
[ $? -ne 0 ] && return 1
}
# We are looking for ttyACM with specific product name and USB VID:PID
[ "$ACTION" = "add" -a \
"$DRIVER" = "cdc_acm" -a \
"$DEVTYPE" = "usb_interface" ] && {
usb_path="/sys/bus/usb/devices/"
dev="$(echo "$DEVICENAME" | cut -d ':' -f 1)"
[ -n "$dev" ] || return 1
p="$(cat "${usb_path}/${dev}/product" 2>/dev/null)"
id="$(cat "${usb_path}/${dev}/idVendor" 2>/dev/null)"
id="${id}$(cat "${usb_path}//${dev}/idProduct" 2>/dev/null)"
sn="$(cat "${usb_path}/${dev}/serial" 2>/dev/null)"
[ "$p" = "$MCUBOOT_USB_PRODUCT" -a \
"$id" = "$MCUBOOT_USB_VID_PID" ] || return 0
mcu_logi "found compatible MCU with S/N '$sn' at USB bus '$dev'"
MCU_SYSINFO_OUTPUT=""
MCU_IMGLIST_OUTPUT=""
# We expect just a single ttyACM interface
usb_path="/sys/bus/usb/devices/${dev}*/tty/*"
for tty in $usb_path; do
[ -c "/dev/$(basename "$tty")" ] && {
uart_path="/dev/$(basename "$tty")"
break
}
done
[ -n "$uart_path" ] || {
mcu_loge "failed to find ttyACM interface"
return 1
}
# Try to acquire lock (init script might be handling this device)
exec 9>"$MCU_FLOCK_FILE" || return 1
flock -n 9 || {
mcu_logd "lock taken by init script, skipping"
return 1
}
config_load mcu
config_foreach mcu_hotplug_setup mcu "$sn" "$uart_path"
# Add new config section for this MCU if no matching found (by S/N)
[ "$MCU_CFG_FOUND" = "0" ] && {
MCU_SCRIPT_NAME="mcu-hotplug"
sect="${sn:0:8}_usb"
mcu_logi "no matching MCU config found, adding new (disabled): '$sect'"
[ -d /etc/config-shadow ] && {
uci -c /etc/config-shadow -q batch <<-EOF
set mcu.${sect}=mcu
set mcu.${sect}.interface=usb
set mcu.${sect}.bootloader=mcuboot
set mcu.${sect}.sn=$sn
set mcu.${sect}.disabled=1
EOF
uci -c /etc/config-shadow -q commit mcu
}
uci -q batch <<-EOF
set mcu.${sect}=mcu
set mcu.${sect}.interface=usb
set mcu.${sect}.bootloader=mcuboot
set mcu.${sect}.sn=$sn
set mcu.${sect}.disabled=1
EOF
uci -q commit mcu
flock -u 9
return 0
}
flock -u 9
}

View File

@@ -0,0 +1,254 @@
#!/bin/sh /etc/rc.common
START=80
. /lib/functions/mcu.sh
SECT=
mcu_setup_uart() {
local uart="$1"
local baud="$2"
local flow="$3"
local gpio_path="$4"
local gpio_on="$5"
local sn="$6"
# Take out MCU out of reset and read basic info
mcu_enable_pin_set "$gpio_path" "$gpio_on"
sleep 1
mcu_sn_check_and_update "$sn" "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
mcu_fw_check_and_update "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
}
mcu_setup_usb() {
local gpio_path="$1"
local gpio_on="$2"
local sn="$3"
local gpio_off="0"
local uart
[ "$gpio_on" = "0" ] && gpio_off="1"
# If we have S/N in config, only take out the MCU from reset
[ -n "$sn" ] && {
mcu_logi "MCU S/N already set, hotplug will perform config"
mcu_enable_pin_set "$gpio_path" "$gpio_on"
return 0
}
# If S/N is missing, we need to take out MCU from reset, find out
# its S/N and save it for later
exec 9>"$MCU_FLOCK_FILE" || {
mcu_loge "failed to obtain lock (exec fail)!"
return 1
}
flock -n 9 || {
mcu_loge "failed to obtain lock (flock fail)!"
return 1
}
usb_path="/sys/bus/usb/devices/*"
devs_old=""
for dev_path in $usb_path; do
dev="$(basename "$dev_path")"
[[ $dev == *":"* ]] && continue
p="$(cat "${dev_path}/product" 2>/dev/null)"
id="$(cat "${dev_path}/idVendor" 2>/dev/null)"
id="${id}$(cat "${dev_path}/idProduct" 2>/dev/null)"
[ "$p" = "$MCUBOOT_USB_PRODUCT" -a \
"$id" = "$MCUBOOT_USB_VID_PID" ] && \
devs_old="$devs_old $dev"
done
mcu_enable_pin_set "$gpio_path" "$gpio_on"
sleep 2
dev_found=""
for dev_path in $usb_path; do
dev="$(basename "$dev_path")"
[[ $dev == *":"* ]] && continue
p="$(cat "${dev_path}/product" 2>/dev/null)"
id="$(cat "${dev_path}/idVendor" 2>/dev/null)"
id="${id}$(cat "${dev_path}/idProduct" 2>/dev/null)"
[ "$p" = "$MCUBOOT_USB_PRODUCT" -a \
"$id" = "$MCUBOOT_USB_VID_PID" ] && {
[ -n "$devs_old" ] && {
if echo "$devs_old" | grep -q "$dev"; then
continue
fi
}
dev_found="$dev"
break
}
done
[ -n "$dev_found" ] || {
mcu_loge "failed to find MCU on USB bus"
mcu_enable_pin_set "$gpio_path" "$gpio_off"
flock -u 9
return 1
}
mcu_logd "MCU found on USB bus: '$dev_found'"
# We expect just a single ttyACM interface
usb_path="/sys/bus/usb/devices/${dev_found}*/tty/*"
for tty_path in $usb_path; do
tty="$(basename "$tty_path")"
[ -c "/dev/${tty}" ] && {
uart="/dev/${tty}"
break
}
done
[ -n "$uart" ] || {
mcu_loge "failed to find ttyACM interface"
mcu_enable_pin_set "$gpio_path" "$gpio_off"
flock -u 9
return 1
}
mcu_sn_check_and_update "$sn" "$uart"
[ $? -ne 0 ] && {
mcu_enable_pin_set "$gpio_path" "$gpio_off"
flock -u 9
return 1
}
mcu_fw_check_and_update "$uart"
[ $? -ne 0 ] && {
mcu_enable_pin_set "$gpio_path" "$gpio_off"
flock -u 9
return 1
}
flock -u 9
}
mcu_setup() {
local sn
local disabled
local uart_baud
local uart_flow
local uart_path
local interface
local bootloader
local enable_pin
local gpio_path
local gpio_on="1"
local gpio_off="0"
SECT="$1"
MCU_SCRIPT_NAME="mcu-init.${SECT}"
MCU_SYSINFO_OUTPUT=""
MCU_IMGLIST_OUTPUT=""
# Section disabled?
config_get_bool disabled "$SECT" disabled "0"
[ "$disabled" = "1" ] && {
mcu_logw "section is disabled in config"
return 0
}
config_get sn "$SECT" sn
config_get bootloader "$SECT" bootloader
config_get enable_pin "$SECT" enable_pin
config_get interface "$SECT" interface
config_get uart_path "$SECT" uart_path
config_get uart_baud "$SECT" uart_baud "115200"
config_get_bool uart_flow "$SECT" uart_flow "0"
# As for now, only 'mcuboot' bootloader is supported
case "$bootloader" in
"mcuboot")
command -v umcumgr > /dev/null 2>&1 || {
mcu_loge "missing 'umcumgr' tool"
return 1
}
;;
*)
mcu_loge "unsupported or unset 'bootloader' option"
return 1
;;
esac
# Verify 'enable_pin' option
if [ -z "$enable_pin" ]; then
# USB based MCU without GPIO based way for reset are fully
# handled by the hotplug script
[ "$interface" = "usb" ] && {
mcu_logw "'enable_pin' option is unset, ignoring"
return 0
}
[ "$interface" = "uart" ] && {
mcu_loge "'enable_pin' option is unset"
return 1
}
else
gpio_path="/sys/class/gpio/${enable_pin}"
[ -d "$gpio_path" ] || {
mcu_loge "invalid 'enable_pin' option"
return 1
}
[ "$(cat "${gpio_path}/active_low")" = "1" ] && {
gpio_on="0"
gpio_off="1"
}
# TODO: should we maybe bail out here if the MCU was took out
# of reset already before, by something/someone else?
[ "$(cat "${gpio_path}/value")" = "$gpio_on" ] && {
mcu_logw "MCU already enabled, resetting"
mcu_enable_pin_set "$gpio_path" "$gpio_off"
sleep 1
}
fi
# For now only 'usb' and 'uart' interfaces are supported
case "$interface" in
"uart")
[ -z "$uart_path" -o ! -c "$uart_path" ] && {
mcu_loge "invalid or unset 'uart_path' option"
return 1
}
mcu_setup_uart "$uart_path" "$uart_baud" "$uart_flow" \
"$gpio_path" "$gpio_on" "$sn"
;;
"usb")
mcu_setup_usb "$gpio_path" "$gpio_on" "$sn"
;;
*)
mcu_loge "unsupported or unset 'interface' option"
return 1
;;
esac
}
start() {
config_load mcu
config_foreach mcu_setup mcu
return 0
}

541
feeds/mcu/mcu/files/mcu.sh Normal file
View File

@@ -0,0 +1,541 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
# Product name and VID:PID used by OpenWrt/OpenWiFi MCUboot fork
MCUBOOT_USB_PRODUCT="MCUboot serial recovery"
MCUBOOT_USB_VID_PID="16c005e1"
MCU_FW_DIR="/lib/firmware/mcu/"
MCU_FLOCK_FILE="/tmp/lock/mcu"
MCU_SYSINFO_OUTPUT=
MCU_IMGLIST_OUTPUT=
MCU_SCRIPT_NAME=""
# logger helpers
mcu_log() {
if [ -n "$MCU_SCRIPT_NAME" ]; then
logger -p "$1" -t "${MCU_SCRIPT_NAME}[$$]" "$2"
else
logger -p "$1" "$2"
fi
}
mcu_loge() {
mcu_log "err" "$1"
}
mcu_logd() {
mcu_log "debug" "$1"
}
mcu_logi() {
mcu_log "info" "$1"
}
mcu_logn() {
mcu_log "notice" "$1"
}
mcu_logw() {
mcu_log "warn" "$1"
}
_mcu_get_fwlist() {
local uart="$1"
local baud="$2"
local flow="$3"
if [ "$flow" = "1" ]; then
flow=" -f"
else
flow=""
fi
[ -n "$baud" ] || baud="115200"
MCU_IMGLIST_OUTPUT="$(umcumgr -s -d "$uart" -b "$baud$flow" list)"
[ $? -eq 0 ] || return 1
}
_mcu_get_fwmetadata() {
local slot="$1"
local uart="$2"
local baud="$3"
local flow="$4"
local value
[ -n "$MCU_IMGLIST_OUTPUT" ] || {
_mcu_get_fwlist "$uart" "$baud" "$flow" || {
mcu_loge "request 'list' failed (uart='$uart', baud='$baud', flow='$flow')"
return 1
}
}
if [ "$slot" = "0" ]; then
slot="slot0_metadata"
else
slot="slot1_metadata"
fi
value="$(echo "$MCU_IMGLIST_OUTPUT" | grep "$slot=" | cut -d '=' -f 2)"
echo "$value"
}
_mcu_get_sysinfo() {
local uart="$1"
local baud="$2"
local flow="$3"
if [ "$flow" = "1" ]; then
flow=" -f"
else
flow=""
fi
[ -n "$baud" ] || baud="115200"
MCU_SYSINFO_OUTPUT="$(umcumgr -s -d "$uart" -b "$baud$flow" sysinfo)"
[ $? -eq 0 ] || return 1
}
_mcu_get() {
local field="$1"
local uart="$2"
local baud="$3"
local flow="$4"
local value
[ -n "$MCU_SYSINFO_OUTPUT" ] || {
_mcu_get_sysinfo "$uart" "$baud" "$flow" || {
mcu_loge "request 'sysinfo' failed (uart='$uart', baud='$baud', flow='$flow')"
return 1
}
}
value="$(echo "$MCU_SYSINFO_OUTPUT" | grep "$field=" | cut -d '=' -f 2)"
echo "$value"
}
mcu_get_sn() {
local uart="$1"
local baud="$2"
local flow="$3"
local value
value="$(_mcu_get "serial_num" "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
[ -n "$value" ] && mcu_logd "MCU S/N: '$value'"
echo "$value"
}
mcu_get_board() {
local uart="$1"
local baud="$2"
local flow="$3"
local value
value="$(_mcu_get "board" "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
[ -n "$value" ] && mcu_logd "MCU board: '$value'"
echo "$value"
}
mcu_get_slotsnum() {
local uart="$1"
local baud="$2"
local flow="$3"
local value
value="$(_mcu_get "single_slot" "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
[ -n "$value" ] || value="1"
[ "$value" != "1" ] && value="2"
[ -n "$value" ] && mcu_logd "number of firmware slots: '$value'"
echo "$value"
}
mcu_get_softver() {
local uart="$1"
local baud="$2"
local flow="$3"
local value
value="$(_mcu_get "soft_ver" "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
[ -n "$value" ] && mcu_logd "MCUboot version: '$value'"
echo "$value"
}
mcu_get_activeslot() {
local uart="$1"
local baud="$2"
local flow="$3"
local value
value="$(_mcu_get "active_slot" "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
[ -n "$value" ] && mcu_logd "active firmware slot: '$value'"
echo "$value"
}
mcu_get_fwname() {
local slot="$1"
local uart="$2"
local baud="$3"
local flow="$4"
local value
local metadata
metadata="$(_mcu_get_fwmetadata "$slot" "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
[ -n "$metadata" ] && {
json_load "$metadata"
json_get_var value fw_name
}
if [ -n "$value" ]; then
mcu_logi "firmware installed in slot '$slot': '$value'"
else
mcu_logw "no firmware installed in slot '$slot'"
fi
echo "$value"
}
mcu_req_boot() {
local uart="$1"
local baud="$2"
local flow="$3"
if [ "$flow" = "1" ]; then
flow=" -f"
else
flow=""
fi
[ -n "$baud" ] || baud="115200"
umcumgr -s -d "$uart" -b "$baud$flow" boot || {
mcu_loge "request 'boot' failed"
return 1
}
mcu_logi "MCU requested to boot the firmware"
}
mcu_req_reset() {
local uart="$1"
local baud="$2"
local flow="$3"
if [ "$flow" = "1" ]; then
flow=" -f"
else
flow=""
fi
[ -n "$baud" ] || baud="115200"
# Request warm reset of the MCU
umcumgr -s -d "$uart" -b "$baud$flow" reset || {
mcu_loge "request 'reset' failed"
return 1
}
mcu_logi "MCU requested to reset"
}
mcu_sel_slot() {
local slot="$1"
local uart="$2"
local baud="$3"
local flow="$4"
if [ "$flow" = "1" ]; then
flow=" -f"
else
flow=""
fi
[ -n "$baud" ] || baud="115200"
# Request firmware active slot change
umcumgr -s -d "$uart" -b "$baud$flow" select "$slot" || {
mcu_loge "request 'select slot' failed"
return 1
}
mcu_logi "active firmware slot changed to: '$slot'"
}
mcu_fw_upload() {
local board="$1"
local slot="$2"
local fw_name="$3"
local uart="$4"
local baud="$5"
local flow="$6"
local fw_path
if [ "$flow" = "1" ]; then
flow=" -f"
else
flow=""
fi
[ -n "$baud" ] || baud="115200"
fw_path="${MCU_FW_DIR}/${board}/${fw_name}/slot${slot}.bin"
umcumgr -q info "$fw_path" > /dev/null 2>&1 || {
mcu_loge "invalid or missing firmware file: '$fw_path'"
return 1
}
mcu_logi "uploading '$fw_name' to slot: '$slot'..."
# Upload fw to selected slot (TODO: slots numbering Zephyr vs. MCUboot)
[ "$slot" = "1" ] && slot="2"
umcumgr -q -n "$slot" -d "$uart" -b "$baud$flow" upload "$fw_path" || {
mcu_loge "request 'upload' failed"
return 1
}
mcu_logi "firmware uploaded!"
}
mcu_enable_pin_set() {
local gpio="$1"
local gpio_value="$2"
mcu_logd "setting MCU enable_pin '$(basename "$gpio")' to '$gpio_value'"
echo "$gpio_value" > "${gpio}/value" 2>/dev/null
}
mcu_sn_check_and_update() {
local sn="$1"
local uart="$2"
local baud="$3"
local flow="$4"
local sn_dev
if [ "$flow" = "1" ]; then
flow=" -f"
else
flow=""
fi
[ -n "$baud" ] || baud="115200"
sn_dev="$(mcu_get_sn "$uart" "$baud" "$flow")"
[ -n "$sn_dev" ] || return 1
[ -n "$sn_dev" ] && {
if [ -z "$sn" ]; then
[ -d /etc/config-shadow ] && {
uci -c /etc/config-shadow -q set mcu.${SECT}.sn="$sn_dev"
uci -c /etc/config-shadow -q commit mcu
}
uci -q set mcu.${SECT}.sn="$sn_dev"
uci -q commit mcu
else
[ "$sn" != "$sn_dev" ] && {
mcu_loge "MCU S/N mismatch ('$sn_dev' != '$sn')!"
return 1
}
fi
}
return 0
}
mcu_fw_check_and_update() {
local uart="$1"
local baud="$2"
local flow="$3"
local active_slot
local fw_slots
local slot0_fw
local slot1_fw
local firmware
local board
config_get firmware "$SECT" firmware
[ -n "$firmware" ] || mcu_logw "option 'firmware' unset"
# MCU board name
board="$(mcu_get_board "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
# Number of firmware slots and active slot
fw_slots="$(mcu_get_slotsnum "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
[ -n "$fw_slots" ] || fw_slots="1"
[ "$fw_slots" = "2" ] && {
active_slot="$(mcu_get_activeslot "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
}
[ -n "$active_slot" ] || active_slot="0"
# Firmware available?
[ -n "$firmware" ] && {
if [ "$fw_slots" = "2" ]; then
[ -f "${MCU_FW_DIR}/${board}/${firmware}/slot0.bin" -a \
-f "${MCU_FW_DIR}/${board}/${firmware}/slot1.bin" ] || {
mcu_loge "firmware '$firmware' doesn't exist"
return 1
}
else
[ -f "${MCU_FW_DIR}/${board}/${firmware}/slot0.bin" ] || {
mcu_loge "firmware '$firmware' doesn't exist"
return 1
}
fi
}
slot0_fw="$(mcu_get_fwname "0" "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
[ "$fw_slots" = "2" ] && {
slot1_fw="$(mcu_get_fwname "1" "$uart" "$baud" "$flow")"
[ $? -eq 0 ] || return 1
}
# No target firmware provided, check what's on device and update config
[ -n "$firmware" ] || {
firmware="$slot0_fw"
[ "$active_slot" = "1" ] && firmware="$slot1_fw"
[ -n "$firmware" ] && {
[ -d /etc/config-shadow ] && {
uci -c /etc/config-shadow -q set mcu.${SECT}.firmware="$firmware"
uci -c /etc/config-shadow -q commit mcu
}
uci -q set mcu.${SECT}.firmware="$firmware"
uci -q commit mcu
mcu_req_boot "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
}
return 0
}
# Do we have target firmware installed in the first slot?
[ "$firmware" = "$slot0_fw" ] && {
mcu_logd "found matching firmware installed in slot '0'"
if [ "$fw_slots" = "2" -a "$active_slot" != "0" ]; then
mcu_sel_slot "0" "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
# Changing active slots requires MCU reset at the moment
mcu_req_reset "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
else
mcu_req_boot "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
fi
return 0
}
# Upload and boot firmware on single-slot device
[ "$fw_slots" = "1" ] && {
mcu_fw_upload "$board" "0" "$firmware" "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
mcu_req_boot "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
return 0
}
# Do we have target firmware installed in the second slot?
[ "$firmware" = "$slot1_fw" ] && {
mcu_logd "found matching firmware installed in slot '1'"
if [ "$active_slot" != "1" ]; then
mcu_sel_slot "1" "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
# Changing active slots requires MCU reset at the moment
mcu_req_reset "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
else
mcu_req_boot "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
fi
return 0
}
# Upload and boot firmware on multi-slot device
# Always use inactive slot
if [ "$active_slot" = "0" ]; then
active_slot="1"
else
active_slot="0"
fi
mcu_fw_upload "$board" "$active_slot" "$firmware" "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
mcu_sel_slot "$active_slot" "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
# Changing active slots requires MCU reset at the moment
mcu_req_reset "$uart" "$baud" "$flow"
[ $? -ne 0 ] && return 1
return 0
}
mcu_add_uci_config() {
local name="$1"
local interface="$2"
local bootloader="$3"
local firmware="$4"
local enable_pin="$5"
local uart_path="$6"
local uart_baud="$7"
local uart_flow="$8"
uci -q set mcu.${name}="mcu"
uci -q set mcu.${name}.interface="$interface"
uci -q set mcu.${name}.bootloader="$bootloader"
uci -q set mcu.${name}.firmware="$firmware"
[ -n "$enable_pin" ] && uci -q set mcu.${name}.enable_pin="$enable_pin"
[ -n "$uart_path" ] && uci -q set mcu.${name}.uart_path="$uart_path"
[ -n "$uart_baud" ] && uci -q set mcu.${name}.uart_baud="$uart_baud"
[ "$uart_flow" = "1" ] && uci -q set mcu.${name}.uart_flow="1"
uci -q set mcu.${name}.disabled="0"
uci -q commit mcu
}

View File

@@ -0,0 +1,23 @@
[ -e /etc/config/mcu ] && exit 0
touch /etc/config/mcu
. /lib/functions.sh
. /lib/functions/mcu.sh
board=$(board_name)
case "$board" in
cig,wf196)
mcu_add_uci_config "nrf52833_uart" "uart" "mcuboot" \
"zephyr-v3.3.x__hci_uart" \
"mcu-enable" "/dev/ttyMSM1" "115200"
;;
edgecore,eap102)
mcu_add_uci_config "nrf52840_usb" "usb" "mcuboot" \
"zephyr-v3.3.x__hci_usb" \
"mcu-enable"
;;
esac
exit 0

View File

@@ -0,0 +1,43 @@
#
# Copyright (C) 2023 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=umcumgr
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.com/pepe2k/umcumgr
PKG_SOURCE_DATE:=2023-03-06
PKG_SOURCE_VERSION:=966606a2868b8e6b0a2c7e129dc45a30e0d9ef87
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=
PKG_MAINTAINER:=Piotr Dymacz <pepe2k@gmail.com>
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_INSTALL:=1
define Package/umcumgr
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libubox
TITLE:=User space tool for MCUmgr SMP based management
endef
define Package/umcumgr/description
Simple user space tool for MCU management over MCUmgr SMP
(Simple Management Protocol) protocol
endef
define Package/umcumgr/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/umcumgr $(1)/usr/bin/
endef
$(eval $(call BuildPackage,umcumgr))

View File

@@ -0,0 +1,169 @@
#
# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bluez
PKG_VERSION:=5.66
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
PKG_HASH:=39fea64b590c9492984a0c27a89fc203e1cdc74866086efb8f4698677ab2b574
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=
PKG_CPE_ID:=cpe:/a:bluez:bluez
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/bluez/Default
TITLE:=Bluetooth
URL:=http://www.bluez.org/
endef
define Package/bluez-libs
$(call Package/bluez/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= library
DEPENDS:=+libpthread +USB_SUPPORT:kmod-bluetooth
endef
define Package/bluez-utils
$(call Package/bluez/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= utilities
DEPENDS:=+bluez-libs
endef
define Package/bluez-utils-btmon
$(call Package/bluez/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= utilities
DEPENDS:=+bluez-libs +glib2
endef
define Package/bluez-utils-extra
$(call Package/bluez/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= additional utilities
DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS) +dbus
endef
define Package/bluez-daemon
$(call Package/bluez/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= daemon
DEPENDS:=+bluez-libs +bluez-utils +bluez-utils-extra +glib2 +libncurses +libreadline +dbus +libical $(INTL_DEPENDS) $(ICONV_DEPENDS)
endef
define Package/bluez-daemon/conffiles
/etc/bluetooth/main.conf
/etc/bluetooth/network.conf
/etc/bluetooth/input.conf
/etc/bluetooth/keys
/etc/config/bluetooth
endef
TARGET_CFLAGS += -D_GNU_SOURCE -ffunction-sections -fdata-sections
TARGET_LDFLAGS += -Wl,--gc-sections
CONFIGURE_ARGS += \
--enable-static \
--enable-shared \
--enable-client \
--enable-datafiles \
--enable-experimental \
--enable-library \
--enable-monitor \
--enable-obex \
--enable-threads \
--enable-tools \
--disable-android \
--disable-cups \
--disable-manpages \
--disable-sixaxis \
--disable-systemd \
--disable-test \
--disable-udev \
--enable-deprecated
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
endef
define Package/bluez-libs/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
endef
define Package/bluez-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/bdaddr $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/btattach $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hciattach $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hciconfig $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hcidump $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hcitool $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
endef
define Package/bluez-utils-btmon/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
endef
define Package/bluez-utils-extra/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpris-proxy $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
endef
define Package/bluez-daemon/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bluetooth.conf $(1)/etc/dbus-1/system.d/bluetooth.conf
$(INSTALL_DIR) $(1)/etc/bluetooth
$(INSTALL_DIR) $(1)/etc/bluetooth/keys
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
endef
$(eval $(call BuildPackage,bluez-libs))
$(eval $(call BuildPackage,bluez-utils))
$(eval $(call BuildPackage,bluez-utils-btmon))
$(eval $(call BuildPackage,bluez-utils-extra))
$(eval $(call BuildPackage,bluez-daemon))

View File

@@ -0,0 +1,14 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
#start after dbus (60)
START=62
USE_PROCD=1
PROG=/usr/bin/bluetoothd
start_service() {
ln -snf /etc/bluetooth/keys/ /var/lib/bluetooth
procd_open_instance
procd_set_param command "$PROG" -n
procd_close_instance
}

View File

@@ -0,0 +1,14 @@
#!/bin/sh
# Write bluetooth PIN number here:
pin=
if [ -z "$pin" ]; then
msg="Set bluetooth PIN in file $0"
logger -p user.err "$msg"
for i in /dev/pts/* ; do
[ -w $i ] && echo "$msg" > $i
done
else
echo "PIN:$pin"
fi

View File

@@ -0,0 +1,21 @@
From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@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
@@ -1078,6 +1078,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 },

View File

@@ -0,0 +1,33 @@
From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@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
@@ -350,11 +350,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;
@@ -364,6 +361,7 @@ int bcm43xx_init(int fd, int def_speed,
return -1;
}
+ sleep(1);
if (bcm43xx_reset(fd))
return -1;
}

View File

@@ -0,0 +1,20 @@
From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@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
@@ -1227,7 +1227,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;

View File

@@ -0,0 +1,20 @@
From 76681284b0ea49852041fdb97a35175089a08781 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 23 Feb 2016 17:52:29 +0000
Subject: [PATCH 4/4] Move the 43xx firmware into /lib/firmware
---
tools/hciattach_bcm43xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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/brcm"
#endif
int read_hci_event(int fd, unsigned char *buf, int size);

View File

@@ -0,0 +1,75 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -3598,7 +3598,7 @@ unit_tests = $(am__append_62) unit/test-
@CLIENT_TRUE@ client/player.h client/player.c
@CLIENT_TRUE@client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
-@CLIENT_TRUE@ $(GLIB_LIBS) $(DBUS_LIBS) -lreadline
+@CLIENT_TRUE@ $(GLIB_LIBS) $(DBUS_LIBS) -lreadline -lncurses
@ZSH_COMPLETIONS_TRUE@zshcompletiondir = $(ZSH_COMPLETIONDIR)
@ZSH_COMPLETIONS_TRUE@dist_zshcompletion_DATA = completion/zsh/_bluetoothctl
@@ -3877,7 +3877,7 @@ unit_tests = $(am__append_62) unit/test-
@DEPRECATED_TRUE@@MESH_TRUE@@TOOLS_TRUE@tools_meshctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
@DEPRECATED_TRUE@@MESH_TRUE@@TOOLS_TRUE@ lib/libbluetooth-internal.la \
-@DEPRECATED_TRUE@@MESH_TRUE@@TOOLS_TRUE@ $(GLIB_LIBS) $(DBUS_LIBS) -ljson-c -lreadline
+@DEPRECATED_TRUE@@MESH_TRUE@@TOOLS_TRUE@ $(GLIB_LIBS) $(DBUS_LIBS) -ljson-c -lreadline -lncurses
@MESH_TRUE@@TOOLS_TRUE@tools_mesh_cfgclient_SOURCES = tools/mesh-cfgclient.c \
@MESH_TRUE@@TOOLS_TRUE@ tools/mesh/model.h tools/mesh/config-model.h \
@@ -3891,7 +3891,7 @@ unit_tests = $(am__append_62) unit/test-
@MESH_TRUE@@TOOLS_TRUE@ mesh/crypto.h mesh/crypto.c
@MESH_TRUE@@TOOLS_TRUE@tools_mesh_cfgclient_LDADD = lib/libbluetooth-internal.la src/libshared-ell.la \
-@MESH_TRUE@@TOOLS_TRUE@ $(ell_ldadd) -ljson-c -lreadline
+@MESH_TRUE@@TOOLS_TRUE@ $(ell_ldadd) -ljson-c -lreadline -lncurses
@MESH_TRUE@@TOOLS_TRUE@tools_mesh_cfgtest_SOURCES = tools/mesh-cfgtest.c
@MESH_TRUE@@TOOLS_TRUE@tools_mesh_cfgtest_LDADD = lib/libbluetooth-internal.la src/libshared-ell.la \
@@ -3948,7 +3948,7 @@ unit_tests = $(am__append_62) unit/test-
@READLINE_TRUE@ tools/obex-client-tool.c
@READLINE_TRUE@tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \
-@READLINE_TRUE@ src/libshared-glib.la $(GLIB_LIBS) -lreadline
+@READLINE_TRUE@ src/libshared-glib.la $(GLIB_LIBS) -lreadline -lncurses
@READLINE_TRUE@tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \
@READLINE_TRUE@ tools/obex-server-tool.c
@@ -3959,15 +3959,15 @@ unit_tests = $(am__append_62) unit/test-
@READLINE_TRUE@tools_bluetooth_player_SOURCES = tools/bluetooth-player.c client/player.c
@READLINE_TRUE@tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \
@READLINE_TRUE@ src/libshared-glib.la \
-@READLINE_TRUE@ $(GLIB_LIBS) $(DBUS_LIBS) -lreadline
+@READLINE_TRUE@ $(GLIB_LIBS) $(DBUS_LIBS) -lreadline -lncurses
@READLINE_TRUE@tools_obexctl_SOURCES = tools/obexctl.c
@READLINE_TRUE@tools_obexctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
-@READLINE_TRUE@ $(GLIB_LIBS) $(DBUS_LIBS) -lreadline
+@READLINE_TRUE@ $(GLIB_LIBS) $(DBUS_LIBS) -lreadline -lncurses
@READLINE_TRUE@tools_btmgmt_SOURCES = tools/btmgmt.c src/uuid-helper.c client/display.c
@READLINE_TRUE@tools_btmgmt_LDADD = lib/libbluetooth-internal.la src/libshared-mainloop.la \
-@READLINE_TRUE@ -lreadline
+@READLINE_TRUE@ -lreadline -lncurses
@DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \
@DEPRECATED_TRUE@@READLINE_TRUE@ attrib/gattrib.c btio/btio.c \
@@ -3976,7 +3976,7 @@ unit_tests = $(am__append_62) unit/test-
@DEPRECATED_TRUE@@READLINE_TRUE@ client/display.h
@DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \
-@DEPRECATED_TRUE@@READLINE_TRUE@ src/libshared-glib.la $(GLIB_LIBS) -lreadline
+@DEPRECATED_TRUE@@READLINE_TRUE@ src/libshared-glib.la $(GLIB_LIBS) -lreadline -lncurses
@CUPS_TRUE@cupsdir = $(libdir)/cups/backend
@CUPS_TRUE@profiles_cups_bluetooth_SOURCES = profiles/cups/main.c \
@@ -3996,7 +3996,7 @@ unit_tests = $(am__append_62) unit/test-
@BTPCLIENT_TRUE@tools_btpclient_DEPENDENCIES = lib/libbluetooth-internal.la $(ell_dependencies)
@BTPCLIENT_TRUE@tools_btpclientctl_SOURCES = tools/btpclientctl.c client/display.c
@BTPCLIENT_TRUE@tools_btpclientctl_LDADD = src/libshared-mainloop.la src/libshared-glib.la \
-@BTPCLIENT_TRUE@ lib/libbluetooth-internal.la -lreadline
+@BTPCLIENT_TRUE@ lib/libbluetooth-internal.la -lreadline -lncurses
# SPDX-License-Identifier: GPL-2.0

View File

@@ -0,0 +1,10 @@
--- 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))

View File

@@ -0,0 +1,49 @@
Submitted By: Armin K. <krejzi at email dot com>
Date: 2013-04-29
Initial Package Version: 5.17
Upstream Status: unknown
Origin: Arch Linux (Giovanni Campagna)
Description: Allow using obexd without systemd in the user session
Not all sessions run systemd --user (actually, the majority
doesn't), so the dbus daemon must be able to spawn obexd
directly, and to do so it needs the full path of the daemon.
---
Makefile.obexd | 4 ++--
obexd/src/org.bluez.obex.service | 4 ----
obexd/src/org.bluez.obex.service.in | 4 ++++
3 files changed, 6 insertions(+), 6 deletions(-)
delete mode 100644 obexd/src/org.bluez.obex.service
create mode 100644 obexd/src/org.bluez.obex.service.in
--- a/Makefile.obexd
+++ b/Makefile.obexd
@@ -2,12 +2,12 @@
if SYSTEMD
systemduserunitdir = $(SYSTEMD_USERUNITDIR)
systemduserunit_DATA = obexd/src/obex.service
+endif
dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
dbussessionbus_DATA = obexd/src/org.bluez.obex.service
-endif
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
if OBEX
--- a/obexd/src/org.bluez.obex.service
+++ /dev/null
@@ -1,4 +0,0 @@
-[D-BUS Service]
-Name=org.bluez.obex
-Exec=/bin/false
-SystemdService=dbus-org.bluez.obex.service
--- /dev/null
+++ b/obexd/src/org.bluez.obex.service.in
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.bluez.obex
+Exec=@libexecdir@/obexd
+SystemdService=dbus-org.bluez.obex.service

View File

@@ -0,0 +1,47 @@
From 2c3bba7b38be03834162e34069156f1fd49f0528 Mon Sep 17 00:00:00 2001
From: "antoine.belvire@laposte.net" <antoine.belvire@laposte.net>
Date: Tue, 27 Mar 2018 20:30:26 +0200
Subject: adapter: Don't refresh adv_manager for non-LE devices
btd_adv_manager_refresh is called upon MGMT_SETTING_DISCOVERABLE setting change
but as only LE adapters have an adv_manager, this leads to segmentation fault
for non-LE devices:
0 btd_adv_manager_refresh (manager=0x0) at src/advertising.c:1176
1 0x0000556fe45fcb02 in settings_changed (settings=<optimized out>,
adapter=0x556fe53f7c70) at src/adapter.c:543
2 new_settings_callback (index=<optimized out>, length=<optimized out>,
param=<optimized out>, user_data=0x556fe53f7c70) at src/adapter.c:573
3 0x0000556fe462c278 in request_complete (mgmt=mgmt@entry=0x556fe53f20c0,
status=<optimized out>, opcode=opcode@entry=7, index=index@entry=0,
length=length@entry=4, param=0x556fe53eb5f9) at src/shared/mgmt.c:261
4 0x0000556fe462cd9d in can_read_data (io=<optimized out>,
user_data=0x556fe53f20c0) at src/shared/mgmt.c:353
5 0x0000556fe46396e3 in watch_callback (channel=<optimized out>,
cond=<optimized out>, user_data=<optimized out>)
at src/shared/io-glib.c:170
6 0x00007fe351c980e5 in g_main_context_dispatch ()
from /usr/lib64/libglib-2.0.so.0
7 0x00007fe351c984b0 in ?? () from /usr/lib64/libglib-2.0.so.0
8 0x00007fe351c987c2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
9 0x0000556fe45abc75 in main (argc=<optimized out>, argv=<optimized out>)
at src/main.c:770
This commit prevents the call to btd_adv_manager_refresh for non-LE devices.
---
src/adapter.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -634,7 +634,9 @@ static void settings_changed(struct btd_
*/
if (!adapter->discovery_discoverable)
store_adapter_info(adapter);
- btd_adv_manager_refresh(adapter->adv_manager);
+
+ if (adapter->supported_settings & MGMT_SETTING_LE)
+ btd_adv_manager_refresh(adapter->adv_manager);
}
if (changed_mask & MGMT_SETTING_BONDABLE) {

View File

@@ -0,0 +1,27 @@
--- a/obexd/client/sync.c
+++ b/obexd/client/sync.c
@@ -209,7 +209,7 @@ static void sync_remove(struct obc_sessi
g_dbus_unregister_interface(conn, path, SYNC_INTERFACE);
}
-static struct obc_driver sync = {
+static struct obc_driver sync2 = {
.service = "SYNC",
.uuid = SYNC_UUID,
.target = OBEX_SYNC_UUID,
@@ -228,7 +228,7 @@ int sync_init(void)
if (!conn)
return -EIO;
- err = obc_driver_register(&sync);
+ err = obc_driver_register(&sync2);
if (err < 0) {
dbus_connection_unref(conn);
conn = NULL;
@@ -245,5 +245,5 @@ void sync_exit(void)
dbus_connection_unref(conn);
conn = NULL;
- obc_driver_unregister(&sync);
+ obc_driver_unregister(&sync2);
}

View File

@@ -0,0 +1,12 @@
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -23,6 +23,9 @@
#include <dirent.h>
#include <limits.h>
#include <string.h>
+#ifndef MAX_INPUT
+#define MAX_INPUT _POSIX_MAX_INPUT
+#endif
#ifdef HAVE_SYS_RANDOM_H
#include <sys/random.h>

View File

@@ -0,0 +1,31 @@
Index: rtty-7.1.4/src/rtty.c
===================================================================
--- rtty-7.1.4.orig/src/rtty.c
+++ rtty-7.1.4/src/rtty.c
@@ -36,6 +36,8 @@
#include "utils.h"
#include "command.h"
+#include <poll.h>
+
extern int force_exit;
extern int connected;
@@ -84,7 +86,7 @@ static void pty_on_read(struct ev_loop *
struct tty *tty = container_of(w, struct tty, ior);
struct rtty *rtty = tty->rtty;
struct buffer *wb = &rtty->wb;
- static uint8_t buf[4096];
+ static uint8_t buf[32* 1024];
int len;
while (1) {
@@ -394,6 +396,8 @@ static void on_net_write(struct ev_loop
if (buffer_length(&rtty->wb) < 1)
ev_io_stop(loop, w);
+
+ poll(NULL, 0, 100);
}
static void on_net_connected(int sock, void *arg)

View File

@@ -30,6 +30,8 @@ let config;
let wan_ports;
let carrier = {};
let boot_file = "/tmp/booted";
let ucentral_running = false;
let pending_events = [];
function config_load() {
uci.load('event');
@@ -55,10 +57,13 @@ function event(object, verb, payload) {
type += '.' + verb;
if (match(object, type, config.realtime?.filter))
ubus.call('ucentral', 'event', {
type,
payload
});
if (ucentral_running)
ubus.call('ucentral', 'event', {
type,
payload
});
else
push(pending_events, {type, payload});
else if (!config.bulk?.interval || match(object, type, config.bulk?.filter))
ubus.call('ucentral', 'telemetry', {
@@ -225,6 +230,12 @@ function log_subscriber_remove_cb(remove) {
printf('dhcp remove: %.J\n', remove);
}
function send_pending_events() {
for (let payload in pending_events)
ubus.call('ucentral', 'event', payload);
pending_events = [];
}
function unsub_object(add, id, path) {
let object = split(path, '.');
@@ -240,6 +251,13 @@ function unsub_object(add, id, path) {
printf('adding %s\n', path);
log_subscriber.subscribe(path);
break;
case 'ucentral':
if(add) {
ucentral_running = true;
send_pending_events();
} else
ucentral_running = false;
break;
}
if (object[0] == 'hostapd' && object[1]) {
if (add)

View File

@@ -24,7 +24,8 @@ function timer_cb() {
params: {
active: true,
override_dfs: false,
verbose: false,
verbose: +config.wifiscan.verbose,
information_elements: +config.wifiscan.information_elements,
periodic: true,
serial: 'foo',
}

View File

@@ -4,10 +4,10 @@ PKG_NAME:=ucentral-schema
PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-schema.git
PKG_MIRROR_HASH:=d7ba8e7cc26526144397d910d6eabe491ebf878a18ecb80a8bc84b17606ac57d
PKG_MIRROR_HASH:=62d2b659d16dbdb467215da655259fcb6b239a635f43ee1e87c4d3a3db281d45
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-05-29
PKG_SOURCE_VERSION:=5287f72bb7608e6562739682f20823f02812ddd9
PKG_SOURCE_VERSION:=54453a6345519ead8edbf75475fd802a8af7a245
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -12,10 +12,12 @@ cig,wf194c4|\
cig,wf194c|\
cig,wf610d|\
cig,wf808|\
cig,wf660a|\
cig,wf196)
cig,wf660a)
ucidef_set_wifi_country 'US'
;;
cig,wf196)
ucidef_set_wifi_country "$(cat /lib/firmware/country)"
;;
esac
board_config_flush

View File

@@ -74,7 +74,9 @@
"filters": [ "probe", "auth", "assoc", "disassoc", "deauth", "local-deauth", "inactive-deauth", "key-mismatch", "beacon-report", "radar-detected"]
},
"wifi-scan": {
"interval": 60
"interval": 60,
"verbose": true,
"information-elements": false
},
"telemetry": {
"interval": 15,

View File

@@ -13,4 +13,4 @@ function phy_get() {
}
let phys = phy_get();
printf("%d\n", phys[0].max_ap_assoc);
printf("%d\n", phys[0].max_ap_assoc || 32);

View File

@@ -1,4 +1,4 @@
Status: 302 Found
Location: http://{{env.SERVER_ADDR}}/hotspot/?redir={{env.headers.host}}
Location: http://{{env.SERVER_ADDR}}/hotspot/?redir={{env.headers.host}}{{env.REQUEST_URI}}
Content-Type: text/html

View File

@@ -13,7 +13,10 @@ function auth_client(ctx) {
let payload = portal.radius_init(ctx);
payload.logoff_url = sprintf('http://%s:3990/', ctx.env.SERVER_ADDR);
if (ctx.query_string.username && ctx.query_string.response) {
if (ctx.query_string.username && ctx.query_string.password && !portal.config.uam.uam_secret) {
payload.username = ctx.query_string.username;
payload.password = ctx.query_string.password;
} else if (ctx.query_string.username && ctx.query_string.response) {
let challenge = uam.md5(portal.config.uam.challenge, ctx.format_mac);
payload.username = ctx.query_string.username;

View File

@@ -29,7 +29,8 @@ ALLWIFIBOARDS:= \
cig-wf660a \
cig-wf194c \
cig-wf194c4 \
cig-wf196 \
cig-wf196-ca \
cig-wf196-us \
cybertan-eww622-a1 \
edgecore-eap101 \
gl-ax1800 \
@@ -86,9 +87,14 @@ $(call Package/ath11k-wifi-default)
TITLE:=board-2.bin for QCOM IPQ6122 eval kits
endef
define Package/ath11k-wifi-cig-wf196_6g
define Package/ath11k-wifi-cig-wf196_6g-ca
$(call Package/ath11k-wifi-default)
TITLE:=cig-wf196 6G bdf
TITLE:=cig-wf196 6G bdf CA
endef
define Package/ath11k-wifi-cig-wf196_6g-us
$(call Package/ath11k-wifi-default)
TITLE:=cig-wf196 6G bdf US
endef
define Package/ath11k-wifi-gl-ax1800
@@ -198,9 +204,16 @@ define Package/ath11k-wifi-qcom-qcn9000/install
$(INSTALL_DATA) ./board-2.bin.QCN9000 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board-2.bin
endef
define Package/ath11k-wifi-cig-wf196_6g/install
define Package/ath11k-wifi-cig-wf196_6g-ca/install
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0/
$(INSTALL_DATA) ./board-cig-wf196_6g.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin
$(INSTALL_DATA) ./board-cig-wf196_6g-ca.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin
echo -n 'CA' > $(1)/lib/firmware/country
endef
define Package/ath11k-wifi-cig-wf196_6g-us/install
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0/
$(INSTALL_DATA) ./board-cig-wf196_6g-us.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin
echo -n 'US' > $(1)/lib/firmware/country
endef
define Package/ath11k-wifi-gl-ax1800/install
@@ -240,7 +253,8 @@ $(eval $(call generate-ath11k-wifi-package,cig-wf188n,Cigtech WF188n))
$(eval $(call generate-ath11k-wifi-package,cig-wf660a,Cigtech WF660a))
$(eval $(call generate-ath11k-wifi-package,cig-wf194c,Cigtech WF194c))
$(eval $(call generate-ath11k-wifi-package,cig-wf194c4,Cigtech WF194c4))
$(eval $(call generate-ath11k-wifi-package,cig-wf196,Cigtech WF196))
$(eval $(call generate-ath11k-wifi-package,cig-wf196-ca,Cigtech WF196 CA))
$(eval $(call generate-ath11k-wifi-package,cig-wf196-us,Cigtech WF196 US))
$(eval $(call generate-ath11k-wifi-package,cybertan-eww622-a1,CyberTan EWW622 A1))
$(eval $(call generate-ath11k-wifi-package,sercomm-wallaby,Sercomm Kiwi))
$(eval $(call generate-ath11k-wifi-package,wallys-dr6018,Wallys DR6018))
@@ -265,6 +279,7 @@ $(eval $(call BuildPackage,ath11k-wifi-qcom-ipq6122))
$(eval $(call BuildPackage,ath11k-wifi-qcom-ipq8074))
$(eval $(call BuildPackage,ath11k-wifi-qcom-ipq6018))
$(eval $(call BuildPackage,ath11k-wifi-qcom-qcn9000))
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g))
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-ca))
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-us))
$(eval $(call BuildPackage,ath11k-wifi-motorola-q14))
$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi))

View File

@@ -31,7 +31,7 @@ index 6fcf139beb..d7c1324184 100755
+ mkdir -p ${WORKING_PATH}
+ fi
+ for ip in ${capwap}; do
+ echo ${ip} >> ${DHCP_OPT_FILE_TMP}
+ echo -n ${ip} >> ${DHCP_OPT_FILE_TMP}
+ done
+ if ! cmp -s "${DHCP_OPT_FILE}" "${DHCP_OPT_FILE_TMP}"; then
+ mv ${DHCP_OPT_FILE_TMP} ${DHCP_OPT_FILE}

17
profiles/cig_wf196-ca.yml Normal file
View File

@@ -0,0 +1,17 @@
---
profile: cig_wf196_ca
target: ipq807x
subtarget: ipq807x
description: Build image for the CIG WF196 (CA)
image: bin/targets/ipq807x/ipq807x/openwrt-ipq807x-cig_wf196_ca-squashfs-sysupgrade.tar
feeds:
- name: ipq807x
path: ../../feeds/ipq807x
include:
- wifi-ax
- ucentral-ap
packages:
- ath11k-fwtest
- ftm
diffconfig: |
CONFIG_KERNEL_IPQ_MEM_PROFILE=0

17
profiles/cig_wf196-us.yml Normal file
View File

@@ -0,0 +1,17 @@
---
profile: cig_wf196_us
target: ipq807x
subtarget: ipq807x
description: Build image for the CIG WF196 (US)
image: bin/targets/ipq807x/ipq807x/openwrt-ipq807x-cig_wf196_us-squashfs-sysupgrade.tar
feeds:
- name: ipq807x
path: ../../feeds/ipq807x
include:
- wifi-ax
- ucentral-ap
packages:
- ath11k-fwtest
- ftm
diffconfig: |
CONFIG_KERNEL_IPQ_MEM_PROFILE=0

View File

@@ -10,6 +10,7 @@ feeds:
include:
- wifi-ax
- ucentral-ap
- mcu
packages:
- ath11k-fwtest
- ftm

View File

@@ -0,0 +1,15 @@
---
profile: edgecore_eap102
target: ipq807x
subtarget: ipq807x
description: Build image for the Edgecore EAP102
image: bin/targets/ipq807x/ipq807x/openwrt-ipq807x-edgecore_eap102-squashfs-sysupgrade.tar
feeds:
- name: ipq807x
path: ../../feeds/ipq807x
include:
- wifi-ax
- ucentral-ap
- mcu
diffconfig: |
CONFIG_KERNEL_IPQ_MEM_PROFILE=0

9
profiles/mcu.yml Normal file
View File

@@ -0,0 +1,9 @@
---
description: Add MCU support related dependencies
feeds:
- name: mcu
path: ../../feeds/mcu
packages:
- umcumgr
- bluez