Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ Copyright [2014] [Cisco Systems, Inc.]
Licensed under the Apache License, Version 2.0

Some material is derived from openembedded.org or the yocto project and is licensed in the same manner here (MIT for metadata; source code to match the associated recipe license).

The zzz_generated.tar.gz file uses material from Project Chip which is:
Copyright (c) 2023 Project CHIP Authors
Licensed under the Apache License, Version 2.0
See the README.md file under recipes-matter for details.
The parent ZAP file is included as `recipes-matter/barton-matter-reference/files/barton.zap`
Copy link

Copilot AI Nov 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The referenced path 'recipes-matter/barton-matter-reference/files/barton.zap' does not match the actual location 'meta-rdk-mtk-bpir4/recipes-matter/barton-matter/files/barton.zap'. Update the path to correctly reflect the file location.

Suggested change
The parent ZAP file is included as `recipes-matter/barton-matter-reference/files/barton.zap`
The parent ZAP file is included as `meta-rdk-mtk-bpir4/recipes-matter/barton-matter/files/barton.zap`

Copilot uses AI. Check for mistakes.
2 changes: 2 additions & 0 deletions conf/distro/include/rdk-bpi.inc
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,6 @@ DISTRO_FEATURES_append = " resource_optimization"

DISTRO_FEATURES_append = " CONFIG_IEEE80211BE"

DISTRO_FEATURES_append = " matter"

#DISTRO_FEATURES_append = " generic_mlo"
2 changes: 2 additions & 0 deletions meta-rdk-mtk-bpir4/recipes-ccsp/util/utopia.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://service_bridge_bpi.sh"

CFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'matter', ' -DFEATURE_MATTER_ENABLED', '', d)}"

do_install_append() {

install -d ${D}${sysconfdir}/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Add this new section
do_install_append() {
install -m 0755 ${B}/tools/btattach ${D}${bindir}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
DESCRIPTION = "Bluetooth CPC HCI Bridge"
LICENSE = "Proprietary"
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LICENSE is set to 'Proprietary' but the checksum points to a specific license file. If the Gecko SDK has a specific license type (e.g., Zlib as is common for Silabs SDK), the LICENSE field should reflect that rather than 'Proprietary'.

Suggested change
LICENSE = "Proprietary"
LICENSE = "Zlib"

Copilot uses AI. Check for mistakes.
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/gsdk/License.txt;md5=9a041f41aad5520b22ab2bb033c11e3c"

# GSDK path definition
GSDK_DIR = "${WORKDIR}/git/gsdk"
BT_BRIDGE_DIR = "${GSDK_DIR}/app/bluetooth/example_host/bt_host_cpc_hci_bridge"

SRC_URI = "git://github.com/SiliconLabs/gecko_sdk.git;protocol=https;branch=gsdk_4.4;destsuffix=git/gsdk;name=gsdk"
SRCREV_gsdk = "9ad9e19638a2d0ce01ce21d32f5049c5f1b21d70"

SRC_URI += "file://bt-host-cpc-hci-bridge.service \
file://bt-host-cpc-hci-bridge-attach.service \
"

DEPENDS += "cpcd"
RDEPENDS_${PN} += "cpcd (= 4.4.1.0-r0) bluez5-noinst-tools"

S = "${BT_BRIDGE_DIR}"

inherit pkgconfig systemd

# Ensure we're using the correct toolchain
TOOLCHAIN = "gcc"
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ virtual/libc"

# Basic compilation flags
CFLAGS = "${TARGET_CFLAGS} -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHOST_TOOLCHAIN -DPOSIX -DSL_CATALOG_APP_LOG_PRESENT"

EXTRA_OEMAKE = "\
CPC=1 \
CC='${CC}' \
CROSS_COMPILE=${TARGET_PREFIX} \
CFLAGS='${CFLAGS} \
-I${STAGING_INCDIR} \
-I${STAGING_INCDIR}/sl_cpc \
-I${GSDK_DIR}/app/bluetooth/common_host/iostream_mock \
-I${GSDK_DIR}/app/bluetooth/common_host/app_log \
-I${GSDK_DIR}/app/bluetooth/common_host/app_log/config \
-I${GSDK_DIR}/platform/common/inc \
-I${GSDK_DIR}/protocol/bluetooth/bgstack/ll/utils/hci_packet/inc \
-fno-short-enums -Wall -std=c99' \
LDFLAGS='${LDFLAGS}' \
"

do_configure[noexec] = "1"

do_compile() {
oe_runmake
}

do_install() {
# Install binary from the exe directory
install -d ${D}${bindir}
install -m 0755 ${S}/exe/bt_host_cpc_hci_bridge ${D}${bindir}

# Install systemd services
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/bt-host-cpc-hci-bridge.service ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/bt-host-cpc-hci-bridge-attach.service ${D}${systemd_system_unitdir}
}

FILES_${PN} += "${systemd_system_unitdir}"

SYSTEMD_SERVICE_${PN} = "bt-host-cpc-hci-bridge.service bt-host-cpc-hci-bridge-attach.service"
SYSTEMD_AUTO_ENABLE = "enable"
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Attach Bluetooth HCI Bridge
After=bt-host-cpc-hci-bridge.service
Requires=bt-host-cpc-hci-bridge.service

[Service]
Type=simple
ExecStartPre=/bin/sh -c 'while [ ! -e /dev/pts/0 ]; do sleep 1; done'
ExecStart=/usr/bin/btattach -B /dev/pts/0 -S 115200
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Bluetooth CPC HCI Bridge
After=cpcd.service
Requires=cpcd.service

[Service]
Type=simple
ExecStart=/usr/bin/bt_host_cpc_hci_bridge
Restart=always
RestartSec=5
WorkingDirectory=/tmp

[Install]
WantedBy=multi-user.target
28 changes: 28 additions & 0 deletions meta-rdk-mtk-bpir4/recipes-connectivity/cpcd/cpcd_4.4.1.0.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# TODO: Verify license -- it is Silabs specific
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO comment indicates license verification is incomplete. This should be resolved before merging to production, especially for a proprietary license.

Suggested change
# TODO: Verify license -- it is Silabs specific

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TODO comment in line 1 indicates the license needs verification for Silabs, but the LICENSE field is set to 'Proprietary'. This should be clarified - either remove the TODO if the license is correct, or keep investigating if it's truly proprietary vs. a specific Silabs license.

Suggested change
# TODO: Verify license -- it is Silabs specific

Copilot uses AI. Check for mistakes.
DESCRIPTION = "Co-Processor Communication Daemon"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5e588136d392e8e0e36bd310e9ca0ab3"
SRC_URI = "git://github.com/SiliconLabs/cpc_daemon;protocol=https;name=cpc-daemon;branch=main"
PR = "r0"
# Tag v4.4.1
SRCREV_cpc-daemon = "283b31aef4f32df23596b8cff1a646dd1dc442c6"
SRC_URI += "file://cpcd.service \
file://cpcd.conf \
"
DEPENDS += "mbedtls systemd"
RDEPENDS_${PN} += "systemd"
S = "${WORKDIR}/git"
inherit cmake pkgconfig
EXTRA_OECMAKE += "-DUSE_LEGACY_GPIO_SYSFS=TRUE \
"
do_install_append() {
install -d ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/cpcd.conf ${D}${sysconfdir}/cpcd.conf
install -d ${D}${bindir}
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/cpcd.service ${D}${systemd_unitdir}/system/cpcd.service
}
FILES_${PN} += "${systemd_unitdir}/system/"
inherit systemd
SYSTEMD_SERVICE_${PN} = "cpcd.service"
SYSTEMD_AUTO_ENABLE = "enable"
100 changes: 100 additions & 0 deletions meta-rdk-mtk-bpir4/recipes-connectivity/cpcd/files/cpcd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Instance Name
# Optional, defaults to "cpcd_0"
# This string uniquely identifies the running cpcd instance.
# An application must pass this value to cpc_init() to connect
# to this particular instance.
instance_name: cpcd_0

# Bus type selection
# Mandatory
# Allowed values : UART or SPI
bus_type: UART

# SPI device file
# Mandatory if spi chosen, ignored if uart chosen
spi_device_file: /dev/spidev0.0

# SPI RX IRQ gpio chip
# Mandatory if spi chosen, ignored if uart chosen
spi_rx_irq_gpio_chip: gpiochip0

# SPI RX IRQ gpio
# RX interrupt gpio selection
spi_rx_irq_gpio: 22

# SPI bitrate.
# Ignored if uart chosen.
# See doc/spi_bitrate.md for a complete explanation
spi_device_bitrate: 1000000

# UART device file
# Mandatory if uart chosen, ignored if spi chosen
uart_device_file: /dev/ttyACM0

# UART baud rate.
# Optional if uart chosen, ignored if spi chosen. Defaults to 115200
# Allowed values : standard UART baud rates listed in 'termios.h'
uart_device_baud: 115200

# UART flow control.
# Optional if uart chosen, ignored if spi chosen. Defaults to 'true'
# Allowed values are 'true' or 'false'
uart_hardflow: true

# BOOTLOADER Recovery Pins Enabled
# Set to true to enter bootloader via wake and reset pins
# If true, bootloader_wake_gpio/chip and bootloader_reset_gpio/chip must be configured
bootloader_recovery_pins_enabled: false

# BOOTLOADER WAKE gpio chip
# Wakeup gpio chip used by the bootloader
bootloader_wake_gpio_chip: gpiochip0

# BOOTLOADER WAKE gpio
# Wakeup gpio used by the bootloader
# Ensure bootloader_recovery_pins_enabled=true to use this pin
bootloader_wake_gpio: 24

# BOOTLOADER RESET gpio chip
# Reset gpio chip used by the bootloader
bootloader_reset_gpio_chip: gpiochip0

# BOOTLOADER RESET gpio
# Reset gpio used by the bootloader
# Ensure bootloader_recovery_pins_enabled=true to use this pin
bootloader_reset_gpio: 23

# Prints tracing information to stdout
# Optional, defaults to 'false'
# Allowed values are 'true' or 'false'
stdout_trace: false

# Prints tracing information to a file located under traces_folder
# Optional, defaults to 'false'
# Allowed values are 'true' or 'false'
trace_to_file: false

# Traces folder
# Optional, defaults to '/dev/shm/cpcd-traces'
# Folder mounted on a tmpfs is preferred
traces_folder: /dev/shm/cpcd-traces

# Enable frame trace
# Optional, defaults to 'false'
# Allowed values are 'true' or 'false'
enable_frame_trace: false

# Number of open file descriptors.
# Optional, defaults to 2000
# If the error 'Too many open files' occurs, this is the value to increase.
rlimit_nofile: 2000

# Disable the encryption over CPC endpoints
# Optional, defaults false
disable_encryption: true

# Binding key file
# Mandatory when security is used
# Must have 32 alphanumeric characters as the first line, representing a 128 bit binding key
# If ECDH encryption is used, this file will be created during the binding process
binding_key_file: ~/.cpcd/binding.key
12 changes: 12 additions & 0 deletions meta-rdk-mtk-bpir4/recipes-connectivity/cpcd/files/cpcd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Service for the 802.15.4 co-processor communication daemon
StartLimitIntervalSec=300
StartLimitBurst=5
[Service]
Type=simple
Restart=always
RestartSec=5
TimeoutStartSec=60
ExecStart=/usr/bin/cpcd -c /etc/cpcd.conf
[Install]
WantedBy=multi-user.target
Loading