[PATCH v1 5/5] test: Add test case for FIT image load address overlap detection

2025-07-29 Thread Aristo Chen
detection feature works correctly and prevents deployment of FIT images with conflicting memory layouts that could cause runtime failures. Signed-off-by: Aristo Chen --- test/py/tests/test_fit_mkimage_validate.py | 65 ++ 1 file changed, 65 insertions(+) diff --git a/tes

[PATCH v1 4/5] tools: mkimage: detect overlapping load regions in FIT configurations

2025-07-29 Thread Aristo Chen
addresses between images. Signed-off-by: Aristo Chen --- tools/fit_image.c | 78 +++ tools/mkimage.c | 3 +- 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/tools/fit_image.c b/tools/fit_image.c index 331be5ae71d..d0061adf051 100644 --- a

[PATCH v1 3/5] arm: dts: k3-am6xx: Fix FIT image memory overlap in binman configurations

2025-07-29 Thread Aristo Chen
): These overlay files had insufficient spacing between load addresses, causing actual memory overlaps. Increase spacing to 8KB boundaries to accommodate overlay sizes safely. An upcoming commit will validate if the memory region is overlapped Signed-off-by: Aristo Chen --- arch/arm/dts/k3-am625

[PATCH v1 2/5] binman: Fix FIT image overlap issues for testFitSplitElf

2025-07-29 Thread Aristo Chen
ATF address defined in elf_sections.lds 2. Makefile to properly build elf_sections_tee binary 3. Updat ftest.py to use separate ELF files for TEE vs ATF components in split-elf operations. An upcoming commit will validate if the memory region is overlapped Signed-off-by: Aristo Chen

[PATCH v1 1/5] binman: Fix FIT image overlap issues

2025-07-29 Thread Aristo Chen
addresses from 0x0 to 0x2000 to avoid overlapping with ATF in the 0x10-0xfc range: - 276_fit_firmware_loadables.dts - 340_fit_signature.dts - 342_fit_signature.dts An upcoming commit will validate if the memory region is overlapped Signed-off-by: Aristo Chen --- tools/binman/test

[PATCH v1 0/5] mkimage: Detect FIT image load address overlaps and fix related test/DTS issues

2025-07-29 Thread Aristo Chen
issues before runtime failures. Aristo Chen (5): binman: Fix FIT image overlap issues binman: Fix FIT image overlap issues for testFitSplitElf arm: dts: k3-am6xx: Fix FIT image memory overlap in binman configurations tools: mkimage: detect overlapping load regions in FIT configurations

[PATCH v2 1/3] arm: k3-am65-iot2050: Fix invalid default configuration reference

2025-07-15 Thread Aristo Chen
'ti/k3-am6528-iot2050-basic' not found under /configurations" An upcoming commit will validate the if the default configuration exists Signed-off-by: Aristo Chen --- arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm

[PATCH v2 2/3] tools: fit_image: validate existence of default configuration node

2025-07-15 Thread Aristo Chen
tch adds a validation step in mkimage to check that the referenced default configuration node is present. If not, mkimage will print an error and abort. This helps catch malformed or outdated ITS files early at build time instead of deferring failure to runtime. Signed-off-by: Aristo Chen --- tools/f

[PATCH v2 3/3] test: fit: add test case for invalid default configuration reference

2025-07-15 Thread Aristo Chen
to verify that mkimage correctly fails when the 'default' configuration does not exist. The test creates a minimal ITS with an invalid default reference and checks that mkimage produces the expected error message. Signed-off-by: Aristo Chen --- test/py/tests/test_fit_mkim

[PATCH v2 0/3] mkimage: validate default configuration reference

2025-07-15 Thread Aristo Chen
verify that mkimage correctly fails when an invalid default configuration is present in the ITS file. This series improves the robustness of FIT image generation and helps catch malformed image trees during build time. ### Changes in v2 - Modify the order of the commits, code is not changed Aristo

[PATCH v1 3/3] test: fit: add test case for invalid default configuration reference

2025-07-14 Thread Aristo Chen
to verify that mkimage correctly fails when the 'default' configuration does not exist. The test creates a minimal ITS with an invalid default reference and checks that mkimage produces the expected error message. Signed-off-by: Aristo Chen --- test/py/tests/test_fit_mkim

[PATCH v1 2/3] arm: k3-am65-iot2050: Fix invalid default configuration reference

2025-07-14 Thread Aristo Chen
'ti/k3-am6528-iot2050-basic' not found under /configurations" Signed-off-by: Aristo Chen --- arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi b/arch/arm/dts/k3-am65-iot2050-boot-ima

[PATCH v1 1/3] tools: fit_image: validate existence of default configuration node

2025-07-14 Thread Aristo Chen
tch adds a validation step in mkimage to check that the referenced default configuration node is present. If not, mkimage will print an error and abort. This helps catch malformed or outdated ITS files early at build time instead of deferring failure to runtime. Signed-off-by: Aristo Chen --- tools/f

[PATCH v1 0/3] mkimage: validate default configuration reference

2025-07-14 Thread Aristo Chen
verify that mkimage correctly fails when an invalid default configuration is present in the ITS file. This series improves the robustness of FIT image generation and helps catch malformed image trees during build time. Aristo Chen (3): tools: fit_image: validate existence of default configuration

[PATCH v4 4/5] test: py: add mkimage test for undefined image references in FIT configs

2025-06-10 Thread Aristo Chen
serts that mkimage fails with a clear error message, as introduced in the new validation logic. This helps ensure the validation logic behaves correctly and prevents regressions in future FIT enhancements. Signed-off-by: Aristo Chen --- test/py/tests/test_fit_mkimage_valida

[PATCH v4 3/5] binman: test: Ensure all config references exist in /images node

2025-06-10 Thread Aristo Chen
minimal definitions for atf and uboot under the /images node in all relevant test DTS files. Signed-off-by: Aristo Chen --- tools/binman/test/170_fit_fdt.dts | 14 ++ tools/binman/test/220_fit_subentry_bintool.dts | 2 +- tools/binman/test/223_fit_fdt_oper.dts | 14

[PATCH v4 5/5] arm: dts: phycore-am62x: Add missing tifsstub image nodes for FIT loadables

2025-06-10 Thread Aristo Chen
nding nodes were defined under /images. This patch was inspired by commit 622f826bf025704cbcc4f39252d4a83129a9cabb ("arm: dts: phycore-am62x: Package TIFS Stub"). It resolves the issue by adding proper Binman nodes for each TIFS variant (`tifsstub-hs`, `tifsstub-fs`, and `tifsstub-gp`)

[PATCH v4 2/5] tools: mkimage: validate image references in FIT configurations

2025-06-10 Thread Aristo Chen
tep during FIT import that iterates over each configuration and verifies that all referenced image names are defined under /images. If a missing image is detected, an appropriate error is reported and mkimage exits with FDT_ERR_NOTFOUND. This ensures that configuration integrity is validated at

[PATCH v4 0/5] mkimage: validate image references in FIT configurations

2025-06-10 Thread Aristo Chen
handle_file()` as a separate commit - Update all affected binman test DTS files to include the missing `atf` and `uboot` image nodes - Add a new Python test case under `test/py/` to ensure mkimage correctly fails when an image is missing Best regards, Aristo Chen Aristo Chen (5): tools:

[PATCH v4 1/5] tools: mkimage: propagate error codes from fit_handle_file()

2025-06-10 Thread Aristo Chen
FDT_ERR_NOTFOUND or other errors. Signed-off-by: Aristo Chen --- tools/fit_image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/fit_image.c b/tools/fit_image.c index caed8d5f901..3d2fbad3853 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -750,7 +750,7

[PATCH 1/1] bootstage: Fix typo

2025-06-01 Thread Aristo Chen
Fix typo from heder to header Signed-off-by: Aristo Chen --- include/bootstage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bootstage.h b/include/bootstage.h index 3300ca0248a..528d0ca0614 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -73,7 +73,7

[PATCH v3 0/4] mkimage: validate image references in FIT configurations

2025-05-21 Thread Aristo Chen
_file()` as a separate commit - Update all affected binman test DTS files to include the missing `atf` and `uboot` image nodes - Add a new Python test case under `test/py/` to ensure mkimage correctly fails when an image is missing Best regards, Aristo Chen Aristo Chen (4): tools: mkimage: prop

[PATCH v3 4/4] test: py: add mkimage test for undefined image references in FIT configs

2025-05-21 Thread Aristo Chen
serts that mkimage fails with a clear error message, as introduced in the new validation logic. This helps ensure the validation logic behaves correctly and prevents regressions in future FIT enhancements. Signed-off-by: Aristo Chen --- test/py/tests/test_fit_mkimage_valida

[PATCH v3 3/4] binman: test: Ensure all config references exist in /images node

2025-05-21 Thread Aristo Chen
minimal definitions for atf and uboot under the /images node in all relevant test DTS files. Signed-off-by: Aristo Chen --- tools/binman/test/170_fit_fdt.dts | 14 ++ tools/binman/test/220_fit_subentry_bintool.dts | 2 +- tools/binman/test/223_fit_fdt_oper.dts | 14

[PATCH v3 1/4] tools: mkimage: propagate error codes from fit_handle_file()

2025-05-21 Thread Aristo Chen
FDT_ERR_NOTFOUND or other errors. Signed-off-by: Aristo Chen --- tools/fit_image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/fit_image.c b/tools/fit_image.c index caed8d5f901..3d2fbad3853 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -750,7 +750,7

[PATCH v3 2/4] tools: mkimage: validate image references in FIT configurations

2025-05-21 Thread Aristo Chen
tep during FIT import that iterates over each configuration and verifies that all referenced image names are defined under /images. If a missing image is detected, an appropriate error is reported and mkimage exits with FDT_ERR_NOTFOUND. This ensures that configuration integrity is validated at

[PATCH v2 2/4] tools: mkimage: validate image references in FIT configurations

2025-05-20 Thread Aristo Chen
tep during FIT import that iterates over each configuration and verifies that all referenced image names are defined under /images. If a missing image is detected, an appropriate error is reported and mkimage exits with FDT_ERR_NOTFOUND. This ensures that configuration integrity is validated at

[PATCH v2 0/4] mkimage: validate image references in FIT configurations

2025-05-20 Thread Aristo Chen
_file()` as a separate commit - Update all affected binman test DTS files to include the missing `atf` and `uboot` image nodes - Add a new Python test case under `test/py/` to ensure mkimage correctly fails when an image is missing Best regards, Aristo Chen

[PATCH v2 4/4] test: py: add mkimage test for undefined image references in FIT configs

2025-05-20 Thread Aristo Chen
serts that mkimage fails with a clear error message, as introduced in the new validation logic. This helps ensure the validation logic behaves correctly and prevents regressions in future FIT enhancements. Signed-off-by: Aristo Chen --- test/py/tests/test_fit_mkimage_valida

[PATCH v2 1/4] tools: mkimage: propagate error codes from fit_handle_file()

2025-05-20 Thread Aristo Chen
FDT_ERR_NOTFOUND or other errors. Signed-off-by: Aristo Chen --- tools/fit_image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/fit_image.c b/tools/fit_image.c index caed8d5f901..3d2fbad3853 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -750,7 +750,7

[PATCH v2 3/4] binman: test: Ensure all config references exist in /images node

2025-05-20 Thread Aristo Chen
minimal definitions for atf and uboot under the /images node in all relevant test DTS files. Signed-off-by: Aristo Chen --- tools/binman/test/170_fit_fdt.dts | 14 ++ tools/binman/test/220_fit_subentry_bintool.dts | 2 +- tools/binman/test/223_fit_fdt_oper.dts | 14

Re: [PATCH 1/1] tools: mkimage: validate image references in FIT configurations

2025-05-15 Thread Aristo Chen
t 17:28, Quentin Schulz > > > wrote: > > > > > > > > Hi Aristo, > > > > > > > > On 5/5/25 12:08 PM, Aristo Chen wrote: > > > > > When parsing a FIT image source (ITS), mkimage does not currently > > > > > che

[PATCH 1/1] cmd: ximg: handle Z_BUF_ERROR explicitly in GZIP decompression

2025-05-08 Thread Aristo Chen
When decompressing GZIP-compressed image parts via the `imxtract` command, explicitly handle the `Z_BUF_ERROR` return value from `gunzip()` to provide a clearer diagnostic. This error typically indicates that the destination buffer is too small to hold the uncompressed data. Signed-off-by: Aristo

[PATCH 1/1] tools: mkimage: validate image references in FIT configurations

2025-05-05 Thread Aristo Chen
tep during FIT import that iterates over each configuration and verifies that all referenced image names are defined under /images. If a missing image is detected, an appropriate error is reported and mkimage exits with FDT_ERR_NOTFOUND. This ensures that configuration integrity is validated at

[PATCH v2 1/1] bootm: improve error message when gzip decompression buffer is too small

2025-04-29 Thread Aristo Chen
uffer size, this change helps users diagnose and fix boot failures more easily. Signed-off-by: Aristo Chen --- boot/bootm.c | 4 +++- lib/gunzip.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index f5cbb10f0d1..f6aa32746b7 100644 --- a/bo

Re: [PATCH] bootm: improve error message when gzip decompression buffer is too small

2025-04-29 Thread Aristo Chen
Tom Rini 於 2025年4月29日 週二 下午10:15寫道: > > On Tue, Apr 29, 2025 at 06:08:50PM +0800, 陳偉銘 wrote: > > Tom Rini 於 2025年4月29日 週二 上午1:24寫道: > > > > > > On Mon, Apr 28, 2025 at 02:07:57PM +0800, Aristo Chen wrote: > > > > > > > Currently, when de

[PATCH] bootm: improve error message when gzip decompression buffer is too small

2025-04-28 Thread Aristo Chen
uffer size, this change helps users diagnose and fix boot failures more easily. Signed-off-by: Aristo Chen --- boot/bootm.c | 15 +++ lib/gunzip.c | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/boot/bootm.c b/boot/bootm.c index f5cbb10f0d1..eae19232487 100644

[PATCH] doc: fix typo

2025-04-24 Thread Aristo Chen
Fix typo from "to" to "do" Signed-off-by: Aristo Chen --- doc/usage/blkmap.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/usage/blkmap.rst b/doc/usage/blkmap.rst index 75f736c259f..4e9091e8ffa 100644 --- a/doc/usage/blkmap.rst +++ b/doc/usage

[PATCH] doc: fix typos

2025-04-23 Thread Aristo Chen
fix typo from "commnad" to "command" Signed-off-by: Aristo Chen --- doc/usage/cmd/part.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/usage/cmd/part.rst b/doc/usage/cmd/part.rst index e7faeccbb09..e7f6e54ecea 100644 --- a/doc/usage/cmd/part.rst

[PATCH] doc: arch: arm64: fix typos

2025-04-22 Thread Aristo Chen
Fix typo from "recommened" to "recommended" Signed-off-by: Aristo Chen --- doc/arch/arm64.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/arch/arm64.rst b/doc/arch/arm64.rst index 19662be6fc6..d72200ffdb9 100644 --- a/doc/arch/arm64.rst +++

[PATCH] doc: remove duplicated "commands"

2025-04-20 Thread Aristo Chen
The "commands" are duplicated, so remove one of them Signed-off-by: Aristo Chen --- doc/usage/cmd/md.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/usage/cmd/md.rst b/doc/usage/cmd/md.rst index 9a9919f9ad0..1eeaa824bf2 100644 --- a/doc/usage/cmd/md.rst

[PATCH] cmd: Kconfig: Fix typos

2025-04-20 Thread Aristo Chen
fix the following typos - from "categorys" to "categories" - from "indivdually" to "individually" Signed-off-by: Aristo Chen --- cmd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index c2ce519d1

[PATCH] configs: Remove duplicated bootcmd 'mmc dev ${mmcdev}'

2025-03-19 Thread Aristo Chen
The 'mmc dev ${mmcdev}' is defined twice, so remove the duplicated one Signed-off-by: Aristo Chen --- configs/mx6sxsabreauto_defconfig | 2 +- configs/mx6ul_14x14_evk_defconfig | 2 +- configs/mx6ul_9x9_evk_defconfig | 2 +- configs/mx6ull_14x14_evk