Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
45 changes: 45 additions & 0 deletions recipes-core/barton-common/barton-common_0.1.1.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
DESCRIPTION = "Barton IoT Platform Library"
HOMEPAGE = "https://github.com/rdkcentral/BartonCommon"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1079582effd6f382a3fba8297d579b46"

DEPENDS:append = " \
cjson \
curl \
dbus \
glib-2.0 \
mbedtls \
libxml2 \
"

SRC_URI = "git://git@github.com/rdkcentral/BartonCommon.git;protocol=ssh;name=barton;nobranch=1"
SRCREV = "aadf6f2b18991deb9bd261adb8125e3caa4abfcd"
S = "${WORKDIR}/git"
PR = "r0"

inherit cmake pkgconfig

EXTRA_OECMAKE = "\
-DBUILD_TESTING=OFF \
"

do_install() {
install -d ${D}/${libdir}
# Copy static libraries to ${libdir}
find ${WORKDIR}/build -name "*.a" -exec cp {} ${D}/${libdir}/ \;

install -d ${D}${includedir}

# Copy any subdirectory of ${S}/libs/*/c/public to ${includedir}
for dir in ${S}/libs/*/c/public; do
if [ -d "$dir" ]; then
cp -r --no-preserve=ownership "$dir"/* ${D}${includedir}
fi
done

# device helper special case
cp -r --no-preserve=ownership ${S}/libs/device/helper/c/public/* ${D}${includedir}
}

FILES_${PN}-dev += "${libdir}/*.a"
FILES_${PN}-dev += "${includedir}"
Comment on lines +44 to +45

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

The variable syntax FILES_${PN} is deprecated in modern BitBake/Yocto. The recommended syntax uses a colon separator instead of an underscore. These should be changed to FILES:${PN} to align with current best practices and avoid potential deprecation warnings in newer Yocto releases.

Suggested change
FILES_${PN}-dev += "${libdir}/*.a"
FILES_${PN}-dev += "${includedir}"
FILES:${PN}-dev += "${libdir}/*.a"
FILES:${PN}-dev += "${includedir}"

Copilot uses AI. Check for mistakes.
82 changes: 82 additions & 0 deletions recipes-core/barton-core/barton_git.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
DESCRIPTION = "Barton IoT Platform Library"
HOMEPAGE = "https://github.com/rdkcentral/BartonCore"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1079582effd6f382a3fba8297d579b46"

DEPENDS:append = " \
cjson \
curl \
dbus \
glib-2.0 \
mbedtls \
libxml2 \
barton-common \
"

RPROVIDES_${PN} += "barton"

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

The variable syntax RPROVIDES_${PN} is deprecated in modern BitBake/Yocto. The recommended syntax uses a colon separator instead of an underscore. This should be changed to RPROVIDES:${PN} to align with current best practices and avoid potential deprecation warnings in newer Yocto releases.

Suggested change
RPROVIDES_${PN} += "barton"
RPROVIDES:${PN} += "barton"

Copilot uses AI. Check for mistakes.

SRC_URI = "git://git@github.com/rdkcentral/BartonCore.git;protocol=ssh;name=barton;nobranch=1"
SRCREV = "194b866acada6f143e5c6982dacec9b5793b710d"
S = "${WORKDIR}/git"
PR = "r0"

BPV = "2.2.0"
PV = "${BPV}+git"

inherit cmake pkgconfig

# These options provide a convenient facade in front of bitbake dependency management. A client
# can choose to just overwrite EXTRA_OECMAKE options directly if they wish but must be mindful of
# dependencies.
BARTON_BUILD_REFERENCE ?= "OFF"
BARTON_BUILD_MATTER ?= "OFF"
BARTON_BUILD_THREAD ?= "OFF"
BARTON_BUILD_ZIGBEE ?= "OFF"
BARTON_GEN_GIR ?= "OFF"
BARTON_BUILD_TESTS ?= "OFF"
EXTRA_OECMAKE = "\
-DBCORE_BUILD_REFERENCE=${BARTON_BUILD_REFERENCE} \
-DBCORE_GEN_GIR=${BARTON_GEN_GIR} \
-DBUILD_TESTING=${BARTON_BUILD_TESTS} \
-DBCORE_MATTER=${BARTON_BUILD_MATTER} \
-DBCORE_THREAD=${BARTON_BUILD_THREAD} \
-DBCORE_ZIGBEE=${BARTON_BUILD_ZIGBEE} \
-DBCORE_BUILD_THIRD_PARTY_BARTON_COMMON=OFF \
"

DEPENDS:append = "${@bb.utils.contains('BARTON_BUILD_REFERENCE', 'ON', ' barton-linenoise', '', d)}"
DEPENDS:append = "${@bb.utils.contains('BARTON_BUILD_MATTER', 'ON', ' barton-matter jsoncpp', '', d)}"
DEPENDS:append = "${@bb.utils.contains('BARTON_BUILD_THREAD', 'ON', ' otbr-agent', '', d)}"
RDEPENDS_${PN}:append = "${@bb.utils.contains('BARTON_BUILD_THREAD', 'ON', ' otbr-agent', '', d)}"

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

The variable syntax RDEPENDS_${PN} is deprecated in modern BitBake/Yocto. The recommended syntax uses a colon separator instead of an underscore. This should be changed to RDEPENDS:${PN} to align with current best practices and avoid potential deprecation warnings in newer Yocto releases.

Suggested change
RDEPENDS_${PN}:append = "${@bb.utils.contains('BARTON_BUILD_THREAD', 'ON', ' otbr-agent', '', d)}"
RDEPENDS:${PN}:append = "${@bb.utils.contains('BARTON_BUILD_THREAD', 'ON', ' otbr-agent', '', d)}"

Copilot uses AI. Check for mistakes.
DEPENDS:append = "${@bb.utils.contains('BARTON_BUILD_TESTS', 'ON', ' cmocka gtest', '', d)}"
#TODO: zigbee
#TODO: gir generation - Barton cmake looks for the existence of g-ir tools and does the generation on its own. We do not use gobject-introspection.bbclass at this time.

do_install:append() {
install -d ${D}${includedir}/barton

# Install public API headers
if [ -d ${S}/api/c/public ]; then
cp -r --no-preserve=ownership ${S}/api/c/public/* ${D}${includedir}/barton/
else
echo "Warning: No public API headers found in ${S}/api/c/public"
exit 1
fi

# BartonCore CMake does not generate install instructions for the reference app
if "${@bb.utils.contains('BARTON_BUILD_REFERENCE', 'ON', 'true', 'false', d)}"; then
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/build/reference/barton-core-reference ${D}${bindir}/barton-core-reference
fi
}

FILES_${PN} += "${@bb.utils.contains('BARTON_BUILD_REFERENCE', 'ON', '${bindir}/barton-core-reference', '', d)}"

# Define what goes in the main runtime package
FILES_${PN} += "${libdir}/libBartonCore.so.*"

# Ensure the dev package contains the public API headers
FILES_${PN}-dev += "${includedir}/barton/"

# Skip QA check for .so files in the -dev package
INSANE_SKIP_${PN}-dev += "dev-elf"
Comment on lines +73 to +82

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

The variable syntax FILES_${PN} is deprecated in modern BitBake/Yocto. The recommended syntax uses a colon separator instead of an underscore. These should be changed to FILES:${PN} to align with current best practices and avoid potential deprecation warnings in newer Yocto releases.

Copilot uses AI. Check for mistakes.

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

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

The variable syntax INSANE_SKIP_${PN} is deprecated in modern BitBake/Yocto. The recommended syntax uses a colon separator instead of an underscore. This should be changed to INSANE_SKIP:${PN} to align with current best practices and avoid potential deprecation warnings in newer Yocto releases.

Suggested change
INSANE_SKIP_${PN}-dev += "dev-elf"
INSANE_SKIP:${PN}-dev += "dev-elf"

Copilot uses AI. Check for mistakes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Example customization for barton-matter
# This shows how to customize the Matter configuration for your specific product

# increment when changing anything in this bbappend
PR:append = ".1"

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += " \
Expand Down
56 changes: 31 additions & 25 deletions recipes-matter/barton-matter-example/files/barton.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1961,6 +1961,7 @@ endpoint 0 {
callback attribute capabilityMinima;
callback attribute specificationVersion;
callback attribute maxPathsPerInvoke;
ram attribute configurationVersion default = 1;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
Expand Down Expand Up @@ -2038,31 +2039,6 @@ endpoint 0 {
handle command TimeSnapshotResponse;
}

server cluster ThreadNetworkDiagnostics {
callback attribute channel;
callback attribute routingRole;
callback attribute networkName;
callback attribute panId;
callback attribute extendedPanId;
callback attribute meshLocalPrefix;
callback attribute neighborTable;
callback attribute routeTable;
callback attribute partitionId;
callback attribute weighting;
callback attribute dataVersion;
callback attribute stableDataVersion;
callback attribute leaderRouterId;
callback attribute securityPolicy;
callback attribute channelPage0Mask;
callback attribute operationalDatasetComponents;
callback attribute activeNetworkFaultsList;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 2;
}

server cluster WiFiNetworkDiagnostics {
callback attribute bssid;
callback attribute securityType;
Expand Down Expand Up @@ -2123,6 +2099,9 @@ endpoint 0 {
handle command UpdateFabricLabel;
handle command RemoveFabric;
handle command AddTrustedRootCertificate;
handle command SetVIDVerificationStatement;
handle command SignVIDVerificationRequest;
handle command SignVIDVerificationResponse;
}

server cluster GroupKeyManagement {
Expand Down Expand Up @@ -2169,6 +2148,33 @@ endpoint 1 {
ram attribute clusterRevision default = 1;
}

server cluster ThreadNetworkDiagnostics {
callback attribute channel;
callback attribute routingRole;
callback attribute networkName;
callback attribute panId;
callback attribute extendedPanId;
callback attribute meshLocalPrefix;
callback attribute neighborTable;
callback attribute routeTable;
callback attribute partitionId;
callback attribute weighting;
callback attribute dataVersion;
callback attribute stableDataVersion;
callback attribute leaderRouterId;
callback attribute securityPolicy;
callback attribute channelPage0Mask;
callback attribute operationalDatasetComponents;
callback attribute activeNetworkFaultsList;
callback attribute extAddress;
callback attribute rloc16;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 3;
}

server cluster WiFiNetworkManagement {
callback attribute ssid;
callback attribute passphraseSurrogate;
Expand Down
Loading
Loading