Skip to content

Commit

Permalink
Merge branch 'project-chip:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Alami-Amine authored Aug 8, 2024
2 parents 936debe + ea01e21 commit 332c043
Show file tree
Hide file tree
Showing 558 changed files with 18,438 additions and 5,542 deletions.
42 changes: 0 additions & 42 deletions .github/stale.yml

This file was deleted.

9 changes: 2 additions & 7 deletions .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ concurrency:

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:

qemu-esp32:
Expand Down Expand Up @@ -75,12 +75,7 @@ jobs:
name: Tizen

runs-on: ubuntu-latest
# NOTE: job temporarely disabled as it seems flaky. The flake does not result in usable
# logs so the current theory is that we run out of space. This is unusual as
# larger docker images succeed at bootstrap, however it needs more investigation
# to detect an exact/real root cause.
if: false
# if: github.actor != 'restyled-io[bot]'
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-tizen-qemu:54
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Process Stale Issues and PRs"
on:
workflow_dispatch:
schedule:
- cron: "30 1 * * *"

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message:
"This issue has been automatically marked as stale because
it has not had recent activity. It will be closed if no
further activity occurs. Remove stale label or comment or
this will be closed in 30 days."
stale-pr-message:
"This pull request has been automatically marked as stale
because it has not had recent activity. It will be closed
if no further activity occurs. Remove stale label or
comment or this will be closed in 10 days."
close-issue-message:
"This stale issue has been automatically closed. Thank you
for your contributions."
close-pr-message:
"This stale pull request has been automatically closed.
Thank you for your contributions."
days-before-issue-stale: 30
days-before-issue-close: -1 # Don't close them for now
days-before-pr-stale: 90
days-before-pr-close: 10
exempt-issue-labels:
"security,blocked,cert blocker,build issue,Spec XML
align,CI/CD improvements,memory"
exempt-pr-labels:
"security,blocked,cert blocker,build issue,Spec XML
align,CI/CD improvements,memory"
108 changes: 2 additions & 106 deletions .github/workflows/tests.yaml

Large diffs are not rendered by default.

33 changes: 21 additions & 12 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
pull_request_rules:
- name: Label conflicting pull requests
description: Add a label to a pull request with conflict to spot it easily
conditions:
- conflict
- '-closed'
actions:
label:
toggle:
- conflict
- name: Automatic merge on PullApprove
conditions:
- or:
- "check-success=pullapprove"
- label="fast track"
- "#approved-reviews-by>=1"
- "#review-threads-unresolved=0"
- "-draft"
- "label!=docker" # Don't auto merge docker images
- "#check-failure=0" # Don't auto merge with a failure
- "#check-pending=0" # Don't auto merge with anything pending
- "check-success~=Build" # Don't auto merge unless a build has succeeded, needed because above is true on a fresh PR before builds
- check-success=pullapprove
- label="fast track"
- '#approved-reviews-by>=1'
- '#review-threads-unresolved=0'
- '-draft'
- label!=docker
- '#check-failure=0'
- '#check-pending=0'
- check-success~=Build
- or:
- "check-success=pullapprove"
- "check-skipped=pullapprove"
- "check-neutral=pullapprove"
- check-success=pullapprove
- check-skipped=pullapprove
- check-neutral=pullapprove
actions:
merge:
method: squash
1 change: 0 additions & 1 deletion .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ exclude:
- "scripts/tools/zap/tests/outputs/**/*" # Matches generated output 1:1
- "examples/chef/sample_app_util/test_files/*.yaml"
- "examples/chef/zzz_generated/**/*"
- "examples/platform/nxp/k32w/k32w0/scripts/demo_generated_certs/**/*"
- "examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/*" # zap-generated files
- "integrations/cloudbuild/*.yaml" # uglier long command line content
- "scripts/run_codegen_targets.sh" # shellharden breaks for loops over command outputs
Expand Down
6 changes: 3 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -689,23 +689,23 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {

if (enable_k32w_lighting_app_build) {
group("k32w_lighting_app") {
deps = [ "${chip_root}/examples/lighting-app/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lighting_app)" ]
deps = [ "${chip_root}/examples/lighting-app/nxp/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lighting_app)" ]
}

extra_build_deps += [ ":k32w_lighting_app" ]
}

if (enable_k32w_lock_app_build) {
group("k32w_lock_app") {
deps = [ "${chip_root}/examples/lock-app/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ]
deps = [ "${chip_root}/examples/lock-app/nxp/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ]
}

extra_build_deps += [ ":k32w_lock_app" ]
}

if (enable_k32w_shell_app_build) {
group("k32w_shell_app") {
deps = [ "${chip_root}/examples/shell/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_shell_app)" ]
deps = [ "${chip_root}/examples/shell/nxp/k32w0/(${chip_root}/config/k32w/toolchain:k32w_shell_app)" ]
}

extra_build_deps += [ ":k32w_shell_app" ]
Expand Down
7 changes: 6 additions & 1 deletion build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,11 @@ config("warnings_third_party") {
}

config("symbols_default") {
cflags = [ "-g${symbol_level}" ]
if (strip_symbols) {
cflags = [ "-s" ]
} else {
cflags = [ "-g${symbol_level}" ]
}
}

config("std_default") {
Expand Down Expand Up @@ -489,6 +493,7 @@ config("libfuzzer_fuzzing") {

config("oss_fuzz") {
cflags = string_split(getenv("CFLAGS"))
cflags_cc = string_split(getenv("CXXFLAGS"))
ldflags = string_split(getenv("CXXFLAGS"))
ldflags += [ getenv("LIB_FUZZING_ENGINE") ]
}
Expand Down
9 changes: 6 additions & 3 deletions build/config/compiler/compiler.gni
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ declare_args() {
symbol_level = 2

# Enable position independent code (-fPIC).
enable_pic =
current_os == "linux" || current_os == "mac" || current_os == "android"
enable_pic = current_os == "linux" || current_os == "mac" ||
current_os == "android" || current_os == "tizen"

# Enable position independent executables (-pie).
enable_pie = current_os == "linux"
enable_pie = current_os == "linux" || current_os == "tizen"

# Remove unwind tables from the binary to save space.
exclude_unwind_tables = current_os != "android"
Expand All @@ -48,6 +48,9 @@ declare_args() {
# enable libfuzzer
is_libfuzzer = false

# Remove all symbol table and relocation information from the binary.
strip_symbols = false

# Generate code coverage analysis artifacts when enabled.
use_coverage = false

Expand Down
5 changes: 1 addition & 4 deletions config/beken/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ import("//build_overrides/chip.gni")
#import("${chip_root}/build/chip/tests.gni")

group("beken") {
deps = [
"${chip_root}/examples/lighting-app/beken:MatterApp",
"${chip_root}/src/lib",
]
deps = [ "${chip_root}/src/lib" ]
}
group("default") {
deps = [ ":beken" ]
Expand Down
8 changes: 4 additions & 4 deletions config/k32w/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni")
arm_toolchain("k32w_lighting_app") {
toolchain_args = {
current_os = "freertos"
import("${chip_root}/examples/lighting-app/nxp/k32w/k32w0/args.gni")
import("${chip_root}/examples/lighting-app/nxp/k32w0/args.gni")
}
}

arm_toolchain("k32w_lock_app") {
toolchain_args = {
current_os = "freertos"
import("${chip_root}/examples/lock-app/nxp/k32w/k32w0/args.gni")
import("${chip_root}/examples/lock-app/nxp/k32w0/args.gni")
}
}

arm_toolchain("k32w_contact_sensor_app") {
toolchain_args = {
current_os = "freertos"
import("${chip_root}/examples/contact-sensor-app/nxp/k32w/k32w0/args.gni")
import("${chip_root}/examples/contact-sensor-app/nxp/k32w0/args.gni")
}
}

arm_toolchain("k32w_shell_app") {
toolchain_args = {
current_os = "freertos"
import("${chip_root}/examples/shell/nxp/k32w/k32w0/args.gni")
import("${chip_root}/examples/shell/nxp/k32w0/args.gni")
}
}
75 changes: 48 additions & 27 deletions config/telink/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if (CONFIG_CHIP_ROTATING_DEVICE_ID)
matter_add_gn_arg_bool("chip_enable_additional_data_advertising" TRUE)
endif()

if(CONFIG_WIFI_W91)
if (CONFIG_WIFI_W91)
matter_add_gn_arg_string("chip_mdns" "minimal")
elseif (CONFIG_NET_L2_OPENTHREAD)
matter_add_gn_arg_string("chip_mdns" "platform")
Expand Down Expand Up @@ -160,12 +160,11 @@ include(${TELINK_COMMON}/common.cmake)

set(BLOCK_SIZE "1024")

# get code-partition mcuboot_partition size
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
dt_reg_size(mcuboot_size PATH ${dts_partition_path})
math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)

if (CONFIG_BOOTLOADER_MCUBOOT)
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
dt_reg_size(mcuboot_size PATH ${dts_partition_path})
math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)

add_custom_target(build_mcuboot ALL
COMMAND
west build -b ${BASE_BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr
Expand All @@ -183,31 +182,30 @@ if (CONFIG_BOOTLOADER_MCUBOOT)

add_dependencies(merge_mcuboot ${ZEPHYR_FINAL_EXECUTABLE})

if (CONFIG_CHIP_OTA_IMAGE_BUILD)
chip_ota_image(chip-ota-image
INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin
OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin
)
if (CONFIG_CHIP_OTA_IMAGE_BUILD)
chip_ota_image(chip-ota-image
INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin
OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin
)

add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE})
endif()
add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE})
endif()
endif()

# get code-partition factory_partition address
dt_nodelabel(dts_partition_path NODELABEL "factory_partition")
dt_reg_addr(factory_size PATH ${dts_partition_path})
math(EXPR factory_blocks "${factory_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)

if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE)
add_custom_target(merge_factory_data ALL
COMMAND
dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${factory_blocks}
)
if (CONFIG_CHIP_OTA_IMAGE_BUILD)
add_dependencies(merge_factory_data merge_mcuboot)
else()
add_dependencies(merge_factory_data ${ZEPHYR_FINAL_EXECUTABLE})
endif()
dt_nodelabel(dts_partition_path NODELABEL "factory_partition")
dt_reg_addr(factory_size PATH ${dts_partition_path})
math(EXPR factory_blocks "${factory_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)

add_custom_target(merge_factory_data ALL
COMMAND
dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${factory_blocks}
)
if (CONFIG_CHIP_OTA_IMAGE_BUILD)
add_dependencies(merge_factory_data merge_mcuboot)
else()
add_dependencies(merge_factory_data ${ZEPHYR_FINAL_EXECUTABLE})
endif()
endif()

# ==============================================================================
Expand All @@ -218,4 +216,27 @@ if (CONFIG_CHIP_FACTORY_DATA_BUILD)
telink_generate_factory_data()
endif()

if (CONFIG_SOC_SERIES_RISCV_TELINK_W91 AND CONFIG_TELINK_W91_FETCH_N22_BIN)
dt_nodelabel(flash_path NODELABEL "flash")
dt_reg_size(flash_size PATH ${flash_path})
math(EXPR flash_blocks "${flash_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)

add_custom_target(merge_n22 ALL
COMMAND
[ -f ${PROJECT_BINARY_DIR}/n22.bin ] && (
dd if=/dev/zero bs=${BLOCK_SIZE} count=${flash_blocks} | tr '\\000' '\\377' > ${PROJECT_BINARY_DIR}/merged.bin &&
dd if=${PROJECT_BINARY_DIR}/zephyr.bin of=${PROJECT_BINARY_DIR}/merged.bin conv=notrunc &&
dd if=${PROJECT_BINARY_DIR}/n22.bin of=${PROJECT_BINARY_DIR}/merged.bin bs=${BLOCK_SIZE} seek=${flash_blocks} conv=notrunc
) || true
)

if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE)
add_dependencies(merge_n22 merge_factory_data)
elseif (CONFIG_CHIP_OTA_IMAGE_BUILD)
add_dependencies(merge_n22 merge_mcuboot)
else()
add_dependencies(merge_n22 ${ZEPHYR_FINAL_EXECUTABLE})
endif()
endif()

endif() # CONFIG_CHIP
Loading

0 comments on commit 332c043

Please sign in to comment.