Skip to content

feat(pc): add NAND OOB simulation and bad-block matrix#141

Closed
wendal wants to merge 26 commits into
masterfrom
feat/pc-nand-oob-badblock
Closed

feat(pc): add NAND OOB simulation and bad-block matrix#141
wendal wants to merge 26 commits into
masterfrom
feat/pc-nand-oob-badblock

Conversation

@wendal

@wendal wendal commented May 30, 2026

Copy link
Copy Markdown
Member

Summary

  • add independent OOB storage to PC virtual NAND and mark bad blocks in OOB
  • enforce lfsn/pgfs as required targets in lf_fs_matrix across 1%/5%/10% bad-block ratios
  • add ratio runner and source-level regression tests for NAND OOB/bad-block behavior

Test Plan

  • python -m unittest testcase/unit_testcase_tools/lf_fs_matrix/test_lf_fs_matrix_script.py testcase/unit_testcase_tools/lf_nand_basic/test_pc_vnand_oob_model.py
  • python testcase/unit_testcase_tools/lf_fs_matrix/run_lf_fs_matrix_ratios.py --timeout 120

wendal and others added 26 commits May 27, 2026 11:04
…en using PSRAM

Merge pull request !246 from Wendal/feat/airui_rotation_buf_psram
- scan NAND bad-block markers during FTL init and log bad_blocks/bad_pages

- log usable/reserve_free/reserve_total/raw capacity at init

- add ftl_init_stats utest entry

- update lf_fs_matrix docs and refresh pac_man.zip test asset

Co-authored-by: Copilot <[email protected]>
Upgrade format/mount failure paths from LLOGD to LLOGW with explicit
error codes, so failures are visible in production firmware logs.
Add success log with block_count and block_size on successful mount.

Root cause of lfs3 mount failure was LUAT_USE_LFSV3_COMPONENT being
disabled in luat_conf_bsp.h (SDK side fix, not tracked here).

Verified: LF_FS_HW_PASS fs=lfs3 on Air1601 hardware (COM10).

Co-authored-by: Copilot <[email protected]>
Fix lfs3 mount failure on Air1601 hardware.

Root cause: LUAT_USE_LFSV3_COMPONENT was disabled in luat_conf_bsp.h,
causing the entire lfs3 bridge (flash_lfs3_lf, lfs3_vfs_init) to be
excluded from compilation.

LuatOS change: improve error logging in luat_little_flash_lfs3.c
SDK change: enable LUAT_USE_LFSV3_COMPONENT in luat_conf_bsp.h

Hardware test result (Air1601, COM10):
  lfs3: LF_FS_HW_PASS - file_ok=1 perf_ok=1 unzip_ok=1

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings May 30, 2026 09:03
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 7 committers have signed the CLA.

❌ gitee-org
❌ wendal
❌ jiangfang001
❌ Tiger1Wolf
❌ shuaizenge
❌ PKM-Bai
❌ shihao-w
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
25 Security Hotspots
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@wendal wendal closed this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants