[Telink] Add OTA LZMA image compression & Update builds to docker version 90 (#36356)

* [Telink] Decrease MCUboot RAM usage for LZMA compression

* [Telink] Update process_binaries script for LZMA compression

* [Telink] Optimize MCUboot flash usage for LZMA

* [Telink] BOOT_BOOTSTRAP is not needed with BOOT_UPGRADE_ONLY mode

* [Telink] Enable support LZMA compression

* [Telink] Remove LZMA properties for RAW

* [Telink] image update initiation via button press

* [Telink] Increase heap size

* [Telink] Use DEBUG log level as default

* [Telink] Add Flash overay to test LZMA
slot-1 smaller then slot-0

* Revert "[Telink] Add Flash overay to test LZMA"

This reverts commit 88ec4cb2c9a6642c9ddb4d24c7afb3f1c4d7db6e.

* [Telink] Fix matter.ota regenaration without remove build folder

* [Telink] Add LZMA CI build

* [Telink] Temporarry use latest Zephyr to check CI builds

* Restyled by autopep8

* Restyled by isort

* [Telink] Update builds to docker version 90

* [Telink] Fix targets

* [Telink] use compress-lzma instead of compress_lzma

---------

Co-authored-by: Serhii Salamakha <serhii.salamakha@gmail.com>
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml
index 7ec2a6b..43a3993 100644
--- a/.github/workflows/bloat_check.yaml
+++ b/.github/workflows/bloat_check.yaml
@@ -34,7 +34,7 @@
         runs-on: ubuntu-latest
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
 
         steps:
             - name: Checkout
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 210106c..85bb795 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -43,7 +43,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/:/runner-root-volume"
                 - "/tmp/log_output:/tmp/test_logs"
@@ -139,7 +139,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/:/runner-root-volume"
                 - "/tmp/log_output:/tmp/test_logs"
@@ -308,7 +308,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/:/runner-root-volume"
                 - "/tmp/log_output:/tmp/test_logs"
@@ -371,7 +371,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/:/runner-root-volume"
                 - "/tmp/log_output:/tmp/test_logs"
@@ -490,7 +490,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/:/runner-root-volume"
                 - "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml
index a1e5907..d7360f6 100644
--- a/.github/workflows/chef.yaml
+++ b/.github/workflows/chef.yaml
@@ -36,7 +36,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             options: --user root
 
         steps:
@@ -57,7 +57,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-esp32:81
+            image: ghcr.io/project-chip/chip-build-esp32:90
             options: --user root
 
         steps:
@@ -78,7 +78,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-nrf-platform:81
+            image: ghcr.io/project-chip/chip-build-nrf-platform:90
             options: --user root
 
         steps:
@@ -99,7 +99,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-telink:81
+            image: ghcr.io/project-chip/chip-build-telink:90
             options: --user root
 
         steps:
@@ -111,7 +111,7 @@
                 platform: telink
             # - name: Update Zephyr to specific revision (for developers purpose)
             #   shell: bash
-            #   run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 3ed7686a9378de6be1368c912f9a42f998bbfb18"
+            #   run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py f762f1a1027284e63e338e6d83deeade62f355b0"
             - name: CI Examples Telink
               shell: bash
               run: |
diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml
index 9dc5bba..e345ff2 100644
--- a/.github/workflows/doxygen.yaml
+++ b/.github/workflows/doxygen.yaml
@@ -84,7 +84,7 @@
 
         runs-on: ubuntu-latest
         container:
-            image: ghcr.io/project-chip/chip-build-doxygen:81
+            image: ghcr.io/project-chip/chip-build-doxygen:90
 
         if: github.actor != 'restyled-io[bot]'
 
diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml
index 1c87787..a4b40a1 100644
--- a/.github/workflows/examples-ameba.yaml
+++ b/.github/workflows/examples-ameba.yaml
@@ -39,7 +39,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-ameba:81
+            image: ghcr.io/project-chip/chip-build-ameba:90
             options: --user root
 
         steps:
diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml
index 7597ef1..143ce33 100644
--- a/.github/workflows/examples-asr.yaml
+++ b/.github/workflows/examples-asr.yaml
@@ -37,7 +37,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-asr:81
+            image: ghcr.io/project-chip/chip-build-asr:90
             options: --user root
 
         steps:
diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml
index 9a51b61..2e9cf4a 100644
--- a/.github/workflows/examples-bouffalolab.yaml
+++ b/.github/workflows/examples-bouffalolab.yaml
@@ -38,7 +38,7 @@
     if: github.actor != 'restyled-io[bot]'
 
     container:
-      image: ghcr.io/project-chip/chip-build-bouffalolab:81
+      image: ghcr.io/project-chip/chip-build-bouffalolab:90
       volumes:
         - "/tmp/bloat_reports:/tmp/bloat_reports"
     steps:
diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml
index 31988e6..097a7d1 100644
--- a/.github/workflows/examples-cc13xx_26xx.yaml
+++ b/.github/workflows/examples-cc13xx_26xx.yaml
@@ -42,7 +42,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-ti:81
+            image: ghcr.io/project-chip/chip-build-ti:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
         steps:
diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml
index 24edcb3..25afa79 100644
--- a/.github/workflows/examples-cc32xx.yaml
+++ b/.github/workflows/examples-cc32xx.yaml
@@ -41,7 +41,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-ti:81
+            image: ghcr.io/project-chip/chip-build-ti:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
         steps:
diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml
index ab85bc1..dd9fb12 100644
--- a/.github/workflows/examples-efr32.yaml
+++ b/.github/workflows/examples-efr32.yaml
@@ -41,7 +41,7 @@
     if: github.actor != 'restyled-io[bot]'
 
     container:
-      image: ghcr.io/project-chip/chip-build-efr32:89
+      image: ghcr.io/project-chip/chip-build-efr32:90
       volumes:
         - "/tmp/bloat_reports:/tmp/bloat_reports"
     steps:
diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml
index b3a6ed2..9853c0d 100644
--- a/.github/workflows/examples-esp32.yaml
+++ b/.github/workflows/examples-esp32.yaml
@@ -37,7 +37,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-esp32:81
+            image: ghcr.io/project-chip/chip-build-esp32:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
 
@@ -124,7 +124,7 @@
         if: github.actor != 'restyled-io[bot]' &&  github.repository_owner == 'espressif'
 
         container:
-            image: ghcr.io/project-chip/chip-build-esp32:81
+            image: ghcr.io/project-chip/chip-build-esp32:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
 
diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml
index ada44f1..49c2097 100644
--- a/.github/workflows/examples-infineon.yaml
+++ b/.github/workflows/examples-infineon.yaml
@@ -38,7 +38,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-infineon:81
+            image: ghcr.io/project-chip/chip-build-infineon:90
             env:
                # TODO: this should probably be part of the dockerfile itself
                CY_TOOLS_PATHS: /opt/Tools/ModusToolbox/tools_3.2
diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml
index 5aeeb4d..46c2173 100644
--- a/.github/workflows/examples-linux-arm.yaml
+++ b/.github/workflows/examples-linux-arm.yaml
@@ -37,7 +37,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-crosscompile:81
+            image: ghcr.io/project-chip/chip-build-crosscompile:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
 
diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml
index d2f1014..e1d64f7 100644
--- a/.github/workflows/examples-linux-imx.yaml
+++ b/.github/workflows/examples-linux-imx.yaml
@@ -37,7 +37,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-imx:81
+            image: ghcr.io/project-chip/chip-build-imx:90
 
         steps:
             - name: Checkout
diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml
index 2bed5ac..8c483ca 100644
--- a/.github/workflows/examples-linux-standalone.yaml
+++ b/.github/workflows/examples-linux-standalone.yaml
@@ -37,7 +37,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
 
diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml
index 31275c7..14bfb6f 100644
--- a/.github/workflows/examples-linux-tv-casting-app.yaml
+++ b/.github/workflows/examples-linux-tv-casting-app.yaml
@@ -37,7 +37,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
 
         steps:
             - name: Checkout
diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml
index 8f76321..077bdbb 100644
--- a/.github/workflows/examples-mw320.yaml
+++ b/.github/workflows/examples-mw320.yaml
@@ -40,7 +40,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
         steps:
diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml
index d781087..0db5e82 100644
--- a/.github/workflows/examples-nrfconnect.yaml
+++ b/.github/workflows/examples-nrfconnect.yaml
@@ -40,7 +40,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-nrf-platform:81
+            image: ghcr.io/project-chip/chip-build-nrf-platform:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
 
diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml
index f1f682e..cccfa44 100644
--- a/.github/workflows/examples-nuttx.yaml
+++ b/.github/workflows/examples-nuttx.yaml
@@ -38,7 +38,7 @@
     if: github.actor != 'restyled-io[bot]'
 
     container:
-      image: ghcr.io/project-chip/chip-build-nuttx:81
+      image: ghcr.io/project-chip/chip-build-nuttx:90
       volumes:
         - "/tmp/bloat_reports:/tmp/bloat_reports"
     steps:
diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml
index f9c6392..aa78254 100644
--- a/.github/workflows/examples-nxp.yaml
+++ b/.github/workflows/examples-nxp.yaml
@@ -40,7 +40,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-nxp:81
+            image: ghcr.io/project-chip/chip-build-nxp:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
         steps:
@@ -240,7 +240,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-nxp-zephyr:81
+            image: ghcr.io/project-chip/chip-build-nxp-zephyr:90
 
         steps:
             - name: Checkout
diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml
index 95389cb..2d59643 100644
--- a/.github/workflows/examples-openiotsdk.yaml
+++ b/.github/workflows/examples-openiotsdk.yaml
@@ -36,7 +36,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-openiotsdk:81
+            image: ghcr.io/project-chip/chip-build-openiotsdk:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
             options: --privileged
diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml
index 312c493..3287b28 100644
--- a/.github/workflows/examples-qpg.yaml
+++ b/.github/workflows/examples-qpg.yaml
@@ -40,7 +40,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
         steps:
diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml
index 2e8f857..d10c91a 100644
--- a/.github/workflows/examples-stm32.yaml
+++ b/.github/workflows/examples-stm32.yaml
@@ -41,7 +41,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
         steps:
diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml
index a1d7244..6c8b9bd 100644
--- a/.github/workflows/examples-telink.yaml
+++ b/.github/workflows/examples-telink.yaml
@@ -39,7 +39,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-telink:81
+            image: ghcr.io/project-chip/chip-build-telink:90
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
 
@@ -58,7 +58,7 @@
                 gh-context: ${{ toJson(github) }}
 
             # - name: Update Zephyr to specific revision (for developers purpose)
-            #   run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 3ed7686a9378de6be1368c912f9a42f998bbfb18"
+            #   run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py f762f1a1027284e63e338e6d83deeade62f355b0"
 
             - name: Build example Telink (B92 retention) Air Quality Sensor App
               # Run test for master and s07641069 PRs
@@ -167,14 +167,14 @@
             - name: clean out build output (keep tools)
               run: rm -rf ./out/telink*
 
-            - name: Build example Telink (B92) Light Switch App with OTA, Shell, Factory Data
+            - name: Build example Telink (B92) Light Switch App with OTA (LZMA), Shell, Factory Data
               # Run test for master and all PRs
               run: |
                   ./scripts/run_in_build_env.sh \
-                    "./scripts/build/build_examples.py --target 'telink-tlsr9528a-light-switch-ota-shell-factory-data' build"
+                    "./scripts/build/build_examples.py --target 'telink-tlsr9528a-light-switch-ota-compress-lzma-shell-factory-data' build"
                   .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
-                    telink tlsr9528a light-switch-app-ota-shell-factory-data \
-                    out/telink-tlsr9528a-light-switch-ota-shell-factory-data/zephyr/zephyr.elf \
+                    telink tlsr9528a light-switch-app-ota-compress-lzma-shell-factory-data \
+                    out/telink-tlsr9528a-light-switch-ota-compress-lzma-shell-factory-data/zephyr/zephyr.elf \
                     /tmp/bloat_reports/
 
             - name: clean out build output
diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml
index f0e4dfb..f465f39 100644
--- a/.github/workflows/examples-tizen.yaml
+++ b/.github/workflows/examples-tizen.yaml
@@ -37,7 +37,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-tizen:81
+            image: ghcr.io/project-chip/chip-build-tizen:90
             options: --user root
             volumes:
                 - "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml
index c3871ad..6acc150 100644
--- a/.github/workflows/full-android.yaml
+++ b/.github/workflows/full-android.yaml
@@ -39,7 +39,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-android:81
+            image: ghcr.io/project-chip/chip-build-android:90
             volumes:
                 - "/tmp/log_output:/tmp/test_logs"
 
diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml
index c37ca98..f36b370 100644
--- a/.github/workflows/fuzzing-build.yaml
+++ b/.github/workflows/fuzzing-build.yaml
@@ -33,7 +33,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/tmp/log_output:/tmp/test_logs"
 
diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml
index abf2e75..f416be3 100644
--- a/.github/workflows/java-tests.yaml
+++ b/.github/workflows/java-tests.yaml
@@ -43,7 +43,7 @@
         runs-on: ubuntu-latest
 
         container:
-            image: ghcr.io/project-chip/chip-build-java:81
+            image: ghcr.io/project-chip/chip-build-java:90
             options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
                 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0"
 
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 2471529..590a259 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -36,7 +36,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
 
         steps:
             - name: Checkout
diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml
index dae8a2b..da55158 100644
--- a/.github/workflows/minimal-build.yaml
+++ b/.github/workflows/minimal-build.yaml
@@ -34,7 +34,7 @@
         runs-on: ubuntu-latest
 
         container:
-            image: ghcr.io/project-chip/chip-build-minimal:81
+            image: ghcr.io/project-chip/chip-build-minimal:90
 
         steps:
             - name: Checkout
@@ -56,7 +56,7 @@
         runs-on: ubuntu-latest
 
         container:
-            image: ghcr.io/project-chip/chip-build-minimal:81
+            image: ghcr.io/project-chip/chip-build-minimal:90
 
         steps:
             - name: Checkout
diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml
index 5f9bbe7..07b31ee 100644
--- a/.github/workflows/qemu.yaml
+++ b/.github/workflows/qemu.yaml
@@ -41,7 +41,7 @@
         if: github.actor != 'restyled-io[bot]' && github.repository_owner == 'espressif'
 
         container:
-            image: ghcr.io/project-chip/chip-build-esp32-qemu:81
+            image: ghcr.io/project-chip/chip-build-esp32-qemu:90
             volumes:
                 - "/tmp/log_output:/tmp/test_logs"
 
@@ -79,7 +79,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-tizen-qemu:81
+            image: ghcr.io/project-chip/chip-build-tizen-qemu:90
             options: --user root
             volumes:
                 - "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml
index 54997b6..14b2c32 100644
--- a/.github/workflows/release_artifacts.yaml
+++ b/.github/workflows/release_artifacts.yaml
@@ -32,7 +32,7 @@
         runs-on: ubuntu-latest
 
         container:
-            image: ghcr.io/project-chip/chip-build-esp32:81
+            image: ghcr.io/project-chip/chip-build-esp32:90
 
         steps:
             - name: Checkout
@@ -64,7 +64,7 @@
         runs-on: ubuntu-latest
 
         container:
-            image: ghcr.io/project-chip/chip-build-efr32:85
+            image: ghcr.io/project-chip/chip-build-efr32:90
         steps:
             - name: Checkout
               uses: actions/checkout@v4
diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml
index 7d0e124..38a614e 100644
--- a/.github/workflows/smoketest-android.yaml
+++ b/.github/workflows/smoketest-android.yaml
@@ -37,7 +37,7 @@
         if: github.actor != 'restyled-io[bot]'
 
         container:
-            image: ghcr.io/project-chip/chip-build-android:81
+            image: ghcr.io/project-chip/chip-build-android:90
             volumes:
                 - "/:/runner-root-volume"
                 - "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 77c31b8..3b2fcb0 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -50,7 +50,7 @@
         runs-on: ubuntu-latest
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
                 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
 
@@ -457,7 +457,7 @@
         runs-on: ubuntu-latest
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
                 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0"
 
diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml
index 1cc0213..b2fc345 100644
--- a/.github/workflows/unit_integration_test.yaml
+++ b/.github/workflows/unit_integration_test.yaml
@@ -40,7 +40,7 @@
         runs-on: ubuntu-latest
 
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
             volumes:
                 - "/:/runner-root-volume"
                 - "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml
index 483b948..0d6d9b6 100644
--- a/.github/workflows/zap_regeneration.yaml
+++ b/.github/workflows/zap_regeneration.yaml
@@ -30,7 +30,7 @@
 
         runs-on: ubuntu-20.04
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
         defaults:
             run:
                 shell: sh
diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml
index 383a985..c4edd57 100644
--- a/.github/workflows/zap_templates.yaml
+++ b/.github/workflows/zap_templates.yaml
@@ -35,7 +35,7 @@
 
         runs-on: ubuntu-20.04
         container:
-            image: ghcr.io/project-chip/chip-build:81
+            image: ghcr.io/project-chip/chip-build:90
         defaults:
             run:
                 shell: sh
diff --git a/config/telink/app/bootloader_compress_lzma.conf b/config/telink/app/bootloader_compress_lzma.conf
new file mode 100644
index 0000000..cb349ee
--- /dev/null
+++ b/config/telink/app/bootloader_compress_lzma.conf
@@ -0,0 +1,46 @@
+#
+#   Copyright (c) 2024 Project CHIP Authors
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+
+# Enable overwrite the primary slot with the upgrade image instead of swapping them.
+# This prevents the fallback recovery.
+CONFIG_BOOT_UPGRADE_ONLY=y
+
+# Enable this option in case if the whole slot0 image need to be validated
+# With disabled option the only image magic is validated
+CONFIG_BOOT_VALIDATE_SLOT0=y
+
+# Maximum number of image sectors supported by the bootloader.
+# Maximum signed image size: 512 * 4096 = 2M Bytes
+CONFIG_BOOT_MAX_IMG_SECTORS=512
+
+# Sets log level for modules which don't specify it explicitly.
+# When set to 0 it means log will not be activated for those modules.
+# Levels are:
+#  - 0 OFF, do not write by default
+#  - 1 ERROR, default to only write LOG_LEVEL_ERR
+#  - 2 WARNING, default to write LOG_LEVEL_WRN
+#  - 3 INFO, default to write LOG_LEVEL_INFO
+#  - 4 DEBUG, default to write LOG_LEVEL_DBG
+CONFIG_LOG_DEFAULT_LEVEL=3
+
+# LZMA used sys_heap based allocators
+CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=78000
+
+# Enable build size optimizations
+CONFIG_SIZE_OPTIMIZATIONS=y
+
+# Enable support LZMA compression
+CONFIG_COMPRESS_LZMA=y
diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt
index 7490cc4..1b14847 100644
--- a/config/telink/chip-module/CMakeLists.txt
+++ b/config/telink/chip-module/CMakeLists.txt
@@ -185,8 +185,17 @@
 # ==============================================================================
 
 if (CONFIG_CHIP_OTA_IMAGE_BUILD)
+    if (CONFIG_COMPRESS_LZMA)
+        add_custom_command(
+            OUTPUT ${PROJECT_BINARY_DIR}/${CONFIG_SIGNED_OTA_IMAGE_FILE_NAME}
+            COMMAND ${CMAKE_COMMAND} -E true
+            COMMENT "Fake command, ${CONFIG_SIGNED_OTA_IMAGE_FILE_NAME} file created in process_binaries target"
+            DEPENDS ${ZEPHYR_FINAL_EXECUTABLE}
+        )
+    endif()
+
     chip_ota_image(chip-ota-image
-        INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin
+        INPUT_FILES ${PROJECT_BINARY_DIR}/${CONFIG_SIGNED_OTA_IMAGE_FILE_NAME}
         OUTPUT_FILE ${PROJECT_BINARY_DIR}/${CONFIG_CHIP_OTA_IMAGE_FILE_NAME}
     )
     add_dependencies(chip-ota-image process_binaries)
diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig
index 7d9296b..ee87af2 100644
--- a/config/telink/chip-module/Kconfig
+++ b/config/telink/chip-module/Kconfig
@@ -71,6 +71,27 @@
 	bool
 	default y if CHIP_OTA_REQUESTOR
 
+config SIGNED_OTA_IMAGE_FILE_NAME
+	string "Zephyr signed image file name"
+	default "zephyr.signed.lzma.signed.bin" if COMPRESS_LZMA
+	default "zephyr.signed.bin"
+	depends on CHIP_OTA_REQUESTOR
+	help
+	  Provides the file name of the generated Zephyr signed image.
+
+config TELINK_OTA_BUTTON_TEST
+	bool "Enable image update initiation via button press"
+	default n
+	depends on CHIP_OTA_REQUESTOR
+	help
+	  Merge the signed binary with the same version as the main into slot-1 of merged.hex.
+	  Pressing the button initiates a forced image update.
+
+config TELINK_OTA_PARTITION_ADDR
+	hex "image-1 partition address"
+	default $(dt_node_reg_addr_hex,$(dt_nodelabel_path,slot1_partition),0)
+	depends on TELINK_OTA_BUTTON_TEST
+
 config CHIP_ROTATING_DEVICE_ID
 	bool "Generate rotating device ID"
 	default y
diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md
index 9c442d6..5cf2c9a 100644
--- a/examples/all-clusters-app/ameba/README.md
+++ b/examples/all-clusters-app/ameba/README.md
@@ -27,11 +27,11 @@
 
 -   Pull docker image:
 
-          $ docker pull ghcr.io/project-chip/chip-build-ameba:81
+          $ docker pull ghcr.io/project-chip/chip-build-ameba:90
 
 -   Run docker container:
 
-          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
+          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90
 
 -   Setup build environment:
 
diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md
index b120d9c..447d950 100644
--- a/examples/all-clusters-minimal-app/ameba/README.md
+++ b/examples/all-clusters-minimal-app/ameba/README.md
@@ -27,13 +27,13 @@
 -   Pull docker image:
 
           ```
-          $ docker pull ghcr.io/project-chip/chip-build-ameba:81
+          $ docker pull ghcr.io/project-chip/chip-build-ameba:90
           ```
 
 -   Run docker container:
 
           ```
-          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
+          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90
           ```
 
 -   Setup build environment:
diff --git a/examples/fabric-admin/README.md b/examples/fabric-admin/README.md
index bdfb82d..92fdffd 100644
--- a/examples/fabric-admin/README.md
+++ b/examples/fabric-admin/README.md
@@ -23,13 +23,13 @@
 ### Pull Docker Images
 
 ```
-docker pull ghcr.io/project-chip/chip-build-crosscompile:81
+docker pull ghcr.io/project-chip/chip-build-crosscompile:90
 ```
 
 ### Run docker
 
 ```
-docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:81 /bin/bash
+docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:90 /bin/bash
 ```
 
 ### Build
diff --git a/examples/fabric-bridge-app/linux/README.md b/examples/fabric-bridge-app/linux/README.md
index fdb4661..912bb32 100644
--- a/examples/fabric-bridge-app/linux/README.md
+++ b/examples/fabric-bridge-app/linux/README.md
@@ -100,13 +100,13 @@
     Pull Docker Images
 
     ```
-    docker pull ghcr.io/project-chip/chip-build-crosscompile:81
+    docker pull ghcr.io/project-chip/chip-build-crosscompile:90
     ```
 
     Run docker
 
     ```
-    docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:81 /bin/bash
+    docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:90 /bin/bash
     ```
 
     Build
diff --git a/examples/fabric-sync/README.md b/examples/fabric-sync/README.md
index 0309218..0fd4735 100644
--- a/examples/fabric-sync/README.md
+++ b/examples/fabric-sync/README.md
@@ -92,13 +92,13 @@
     Pull Docker Images
 
     ```
-    docker pull ghcr.io/project-chip/chip-build-crosscompile:81
+    docker pull ghcr.io/project-chip/chip-build-crosscompile:90
     ```
 
     Run docker
 
     ```
-    docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:81 /bin/bash
+    docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:90 /bin/bash
     ```
 
     Build
diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md
index a0d0275..ea9304f 100644
--- a/examples/light-switch-app/ameba/README.md
+++ b/examples/light-switch-app/ameba/README.md
@@ -26,11 +26,11 @@
 
 -   Pull docker image:
 
-          $ docker pull ghcr.io/project-chip/chip-build-ameba:81
+          $ docker pull ghcr.io/project-chip/chip-build-ameba:90
 
 -   Run docker container:
 
-          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
+          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90
 
 -   Setup build environment:
 
diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md
index 7527d02..e91aec0 100644
--- a/examples/lighting-app/ameba/README.md
+++ b/examples/lighting-app/ameba/README.md
@@ -23,11 +23,11 @@
 
 -   Pull docker image:
 
-          $ docker pull ghcr.io/project-chip/chip-build-ameba:81
+          $ docker pull ghcr.io/project-chip/chip-build-ameba:90
 
 -   Run docker container:
 
-          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
+          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90
 
 -   Setup build environment:
 
diff --git a/examples/lighting-app/telink/prj.conf b/examples/lighting-app/telink/prj.conf
index 39eb720..9c7bab3 100644
--- a/examples/lighting-app/telink/prj.conf
+++ b/examples/lighting-app/telink/prj.conf
@@ -31,6 +31,7 @@
 # Disable Matter OTA DFU
 CONFIG_CHIP_OTA_REQUESTOR=n
 CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=1
+CONFIG_TELINK_OTA_BUTTON_TEST=n
 
 # Disable CHIP shell support
 CONFIG_CHIP_LIB_SHELL=n
diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md
index 1af6617..e748f41 100644
--- a/examples/ota-requestor-app/ameba/README.md
+++ b/examples/ota-requestor-app/ameba/README.md
@@ -6,11 +6,11 @@
 
 -   Pull docker image:
 
-          $ docker pull ghcr.io/project-chip/chip-build-ameba:81
+          $ docker pull ghcr.io/project-chip/chip-build-ameba:90
 
 -   Run docker container:
 
-          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
+          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90
 
 -   Setup build environment:
 
diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md
index 6478091..136a37a 100644
--- a/examples/pigweed-app/ameba/README.md
+++ b/examples/pigweed-app/ameba/README.md
@@ -31,11 +31,11 @@
 
 -   Pull docker image:
 
-          $ docker pull ghcr.io/project-chip/chip-build-ameba:81
+          $ docker pull ghcr.io/project-chip/chip-build-ameba:90
 
 -   Run docker container:
 
-          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
+          $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90
 
 -   Setup build environment:
 
diff --git a/examples/platform/telink/common.cmake b/examples/platform/telink/common.cmake
index 34ff2db..80050c8 100644
--- a/examples/platform/telink/common.cmake
+++ b/examples/platform/telink/common.cmake
@@ -63,7 +63,11 @@
   unset(USB_CONF_OVERLAY_FILE)
 endif()
 
-set(BOOT_CONF_OVERLAY_FILE "${CHIP_ROOT}/config/telink/app/bootloader.conf")
+if(${CONFIG_COMPRESS_LZMA} MATCHES y)
+  set(BOOT_CONF_OVERLAY_FILE "${CHIP_ROOT}/config/telink/app/bootloader_compress_lzma.conf")
+else()
+  set(BOOT_CONF_OVERLAY_FILE "${CHIP_ROOT}/config/telink/app/bootloader.conf")
+endif()
 if(NOT EXISTS "${BOOT_CONF_OVERLAY_FILE}")
   message(FATAL_ERROR "${BOOT_CONF_OVERLAY_FILE} doesn't exist")
 endif()
diff --git a/examples/platform/telink/common/include/AppTaskCommon.h b/examples/platform/telink/common/include/AppTaskCommon.h
index ff3f7bf..22c5f51 100644
--- a/examples/platform/telink/common/include/AppTaskCommon.h
+++ b/examples/platform/telink/common/include/AppTaskCommon.h
@@ -111,6 +111,11 @@
     static void StartWiFiHandler(AppEvent * aEvent);
 #endif
 
+#if CONFIG_TELINK_OTA_BUTTON_TEST
+    static void TestOTAButtonEventHandler(void);
+    static void TestOTAHandler(AppEvent * aEvent);
+#endif
+
     static void ExampleActionButtonEventHandler(void);
 
     void SetExampleButtonCallbacks(EventHandler aAction_CB);
diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp
index 1303674..858334a 100644
--- a/examples/platform/telink/common/src/AppTaskCommon.cpp
+++ b/examples/platform/telink/common/src/AppTaskCommon.cpp
@@ -447,7 +447,11 @@
 {
     buttonManager.addCallback(FactoryResetButtonEventHandler, 0, true);
     buttonManager.addCallback(ExampleActionButtonEventHandler, 1, true);
+#if CONFIG_TELINK_OTA_BUTTON_TEST
+    buttonManager.addCallback(TestOTAButtonEventHandler, 2, true);
+#else
     buttonManager.addCallback(StartBleAdvButtonEventHandler, 2, true);
+#endif
 #if CHIP_DEVICE_CONFIG_ENABLE_THREAD
     buttonManager.addCallback(StartThreadButtonEventHandler, 3, true);
 #elif CHIP_DEVICE_CONFIG_ENABLE_WIFI
@@ -595,6 +599,26 @@
     LOG_INF("Factory Reset Trigger Counter is cleared");
 }
 
+#if CONFIG_TELINK_OTA_BUTTON_TEST
+void AppTaskCommon::TestOTAButtonEventHandler(void)
+{
+    AppEvent event;
+
+    event.Type               = AppEvent::kEventType_Button;
+    event.ButtonEvent.Action = kButtonPushEvent;
+    event.Handler            = TestOTAHandler;
+    GetAppTask().PostEvent(&event);
+}
+
+void AppTaskCommon::TestOTAHandler(AppEvent * aEvent)
+{
+    LOG_INF("TestOTAHandler");
+
+    chip::DeviceLayer::OTAImageProcessorImpl imageProcessor;
+    imageProcessor.Apply();
+}
+#endif
+
 #if CHIP_DEVICE_CONFIG_ENABLE_THREAD
 void AppTaskCommon::StartThreadButtonEventHandler(void)
 {
diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml
index fd34dab..1eafb85 100644
--- a/integrations/cloudbuild/chef.yaml
+++ b/integrations/cloudbuild/chef.yaml
@@ -1,5 +1,5 @@
 steps:
-    - name: "ghcr.io/project-chip/chip-build-vscode:81"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       entrypoint: "bash"
       args:
           - "-c"
@@ -7,7 +7,7 @@
               git config --global --add safe.directory "*"
               python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android 
       id: Submodules
-    - name: "ghcr.io/project-chip/chip-build-vscode:81"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting
       #       jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3)
       env:
@@ -23,7 +23,7 @@
           - name: pwenv
             path: /pwenv
       timeout: 900s
-    - name: "ghcr.io/project-chip/chip-build-vscode:81"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       env:
           - PW_ENVIRONMENT_ROOT=/pwenv
       args:
@@ -38,7 +38,7 @@
           - name: pwenv
             path: /pwenv
 
-    - name: "ghcr.io/project-chip/chip-build-vscode:81"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       env:
           - PW_ENVIRONMENT_ROOT=/pwenv
       args:
diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml
index 02e7351..f1ca127 100644
--- a/integrations/cloudbuild/smoke-test.yaml
+++ b/integrations/cloudbuild/smoke-test.yaml
@@ -1,5 +1,5 @@
 steps:
-    - name: "ghcr.io/project-chip/chip-build-vscode:89"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       entrypoint: "bash"
       args:
           - "-c"
@@ -7,7 +7,7 @@
               git config --global --add safe.directory "*"
               python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android 
       id: Submodules
-    - name: "ghcr.io/project-chip/chip-build-vscode:89"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting
       #       jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3)
       env:
@@ -24,7 +24,7 @@
             path: /pwenv
       timeout: 900s
 
-    - name: "ghcr.io/project-chip/chip-build-vscode:89"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       id: ESP32
       env:
           - PW_ENVIRONMENT_ROOT=/pwenv
@@ -45,7 +45,7 @@
       volumes:
           - name: pwenv
             path: /pwenv
-    - name: "ghcr.io/project-chip/chip-build-vscode:89"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       id: NRFConnect
       env:
           - PW_ENVIRONMENT_ROOT=/pwenv
@@ -66,7 +66,7 @@
           - name: pwenv
             path: /pwenv
 
-    - name: "ghcr.io/project-chip/chip-build-vscode:89"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       id: EFR32
       env:
           - PW_ENVIRONMENT_ROOT=/pwenv
@@ -88,7 +88,7 @@
           - name: pwenv
             path: /pwenv
 
-    - name: "ghcr.io/project-chip/chip-build-vscode:89"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       id: Linux
       env:
           - PW_ENVIRONMENT_ROOT=/pwenv
@@ -141,7 +141,7 @@
           - name: pwenv
             path: /pwenv
 
-    - name: "ghcr.io/project-chip/chip-build-vscode:89"
+    - name: "ghcr.io/project-chip/chip-build-vscode:90"
       id: Android
       env:
           - PW_ENVIRONMENT_ROOT=/pwenv
diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py
index ff7dd29..b36824b 100755
--- a/scripts/build/build/targets.py
+++ b/scripts/build/build/targets.py
@@ -800,6 +800,7 @@
     target.AppendModifier('4mb', enable_4mb_flash=True)
     target.AppendModifier('mars', mars_board_config=True)
     target.AppendModifier('usb', usb_board_config=True)
+    target.AppendModifier('compress-lzma', compress_lzma_config=True)
 
     return target
 
diff --git a/scripts/build/builders/telink.py b/scripts/build/builders/telink.py
index 1145b84..644f4cd 100644
--- a/scripts/build/builders/telink.py
+++ b/scripts/build/builders/telink.py
@@ -154,6 +154,7 @@
                  enable_4mb_flash: bool = False,
                  mars_board_config: bool = False,
                  usb_board_config: bool = False,
+                 compress_lzma_config: bool = False,
                  ):
         super(TelinkBuilder, self).__init__(root, runner)
         self.app = app
@@ -166,6 +167,7 @@
         self.enable_4mb_flash = enable_4mb_flash
         self.mars_board_config = mars_board_config
         self.usb_board_config = usb_board_config
+        self.compress_lzma_config = compress_lzma_config
 
     def get_cmd_prefixes(self):
         if not self._runner.dry_run:
@@ -210,6 +212,9 @@
         if self.usb_board_config:
             flags.append("-DTLNK_USB_DONGLE=y")
 
+        if self.compress_lzma_config:
+            flags.append("-DCONFIG_COMPRESS_LZMA=y")
+
         if self.options.pregen_dir:
             flags.append(f"-DCHIP_CODEGEN_PREGEN_DIR={shlex.quote(self.options.pregen_dir)}")
 
diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt
index e585494..f34f42b 100644
--- a/scripts/build/testdata/all_targets_linux_x64.txt
+++ b/scripts/build/testdata/all_targets_linux_x64.txt
@@ -22,5 +22,5 @@
 qpg-qpg6105-{lock,light,shell,persistent-storage,light-switch,thermostat}[-updateimage]
 stm32-stm32wb5mm-dk-light
 tizen-arm-{all-clusters,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-coverage][-with-ui]
-telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars][-usb]
+telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars][-usb][-compress-lzma]
 openiotsdk-{shell,lock}[-mbedtls][-psa]
diff --git a/scripts/tools/telink/process_binaries.py b/scripts/tools/telink/process_binaries.py
index 0f650e2..5144920 100755
--- a/scripts/tools/telink/process_binaries.py
+++ b/scripts/tools/telink/process_binaries.py
@@ -16,6 +16,7 @@
 # limitations under the License.
 #
 
+import lzma
 import os
 import subprocess
 import sys
@@ -58,6 +59,45 @@
 # Obtain build configuration
 build_conf = BuildConfiguration(os.path.join(os.getcwd(), os.pardir))
 
+
+def compress_lzma_firmware(input_file, output_file):
+    # Read the input firmware binary
+    with open(input_file, 'rb') as f:
+        firmware_data = f.read()  # Read the rest of the file from the offset
+
+    # Define the properties
+    lc = 1  # Literal context bits
+    lp = 2  # Literal position bits
+    pb = 0  # Position bits
+    dict_size = build_conf['CONFIG_COMPRESS_LZMA_DICTIONARY_SIZE']  # dictionary size
+
+    # Create the LZMA compressor using the specified parameters
+    compressor = lzma.LZMACompressor(
+        format=lzma.FORMAT_RAW,  # Use raw format to match with `lzma_raw_decoder()` in C
+        filters=[
+            {
+                "id": lzma.FILTER_LZMA1,  # Use LZMA1 filter for compatibility
+                "dict_size": dict_size,   # Set dictionary size
+                "lc": lc,                 # Literal context bits
+                "lp": lp,                 # Literal position bits
+                "pb": pb,                 # Position bits
+                "mode": lzma.MODE_NORMAL,  # Normal compression mode
+                "mf": lzma.MF_BT4,        # Match finder algorithm
+                "depth": 0                # Default match finder depth
+            }
+        ]
+    )
+
+    # Compress the firmware data
+    compressed_data = compressor.compress(firmware_data) + compressor.flush()
+
+    # Write the compressed binary to output file
+    with open(output_file, 'wb') as f:
+        f.write(compressed_data)
+
+    print(f"Compressed {input_file} -> {output_file} (size reduced from {len(firmware_data)} to {len(compressed_data)} bytes)")
+
+
 # Clean up merged.bin from previous build
 if os.path.exists('merged.bin'):
     os.remove('merged.bin')
@@ -83,7 +123,7 @@
             '--slot-size', str(build_conf['CONFIG_FLASH_LOAD_SIZE']),
             '--key', os.path.join(ZEPHYR_BASE, '../', build_conf['CONFIG_MCUBOOT_SIGNATURE_KEY_FILE']),
             'merged.bin',
-            'zephyr.signed.bin'
+            build_conf['CONFIG_SIGNED_OTA_IMAGE_FILE_NAME']
         ]
         try:
             subprocess.run(sign_command, check=True)
@@ -94,6 +134,31 @@
 # Merge MCUBoot binary if configured
 if build_conf.getboolean('CONFIG_BOOTLOADER_MCUBOOT'):
     merge_binaries('mcuboot.bin', 'zephyr.signed.bin', 'merged.bin', build_conf['CONFIG_FLASH_LOAD_OFFSET'])
+    if build_conf.getboolean('CONFIG_COMPRESS_LZMA'):
+        compress_lzma_firmware('zephyr.signed.bin', 'zephyr.signed.lzma.bin')
+
+        sign_command = [
+            'python3',
+            os.path.join(ZEPHYR_BASE, '../bootloader/mcuboot/scripts/imgtool.py'),
+            'sign',
+            '--version', '0.0.0+0',
+            '--align', '1',
+            '--header-size', str(build_conf['CONFIG_ROM_START_OFFSET']),
+            '--slot-size', str(build_conf['CONFIG_FLASH_LOAD_SIZE']),
+            '--key', os.path.join(ZEPHYR_BASE, '../', build_conf['CONFIG_MCUBOOT_SIGNATURE_KEY_FILE']),
+            '--pad-header',
+            'zephyr.signed.lzma.bin',
+            build_conf['CONFIG_SIGNED_OTA_IMAGE_FILE_NAME']
+        ]
+
+        try:
+            subprocess.run(sign_command, check=True)
+        except subprocess.CalledProcessError as e:
+            raise RuntimeError(f"Error signing the image: {e}")
+
+    if build_conf.getboolean('CONFIG_TELINK_OTA_BUTTON_TEST'):
+        merge_binaries('merged.bin', build_conf['CONFIG_SIGNED_OTA_IMAGE_FILE_NAME'],
+                       'merged.bin', build_conf['CONFIG_TELINK_OTA_PARTITION_ADDR'])
 
 # Merge Factory Data binary if configured
 if build_conf.getboolean('CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE'):