Skip to content

tools: Preserve SPI NOR module overrides - #112

Merged
enjoy-digital merged 1 commit into
masterfrom
feature/module-generator-overrides
Jul 10, 2026
Merged

tools: Preserve SPI NOR module overrides#112
enjoy-digital merged 1 commit into
masterfrom
feature/module-generator-overrides

Conversation

@enjoy-digital

Copy link
Copy Markdown
Member

Summary

  • make per-device opcode corrections first-class generator inputs, with validated replace/add/remove operations
  • apply explicit opcode, dummy-cycle, and quad-enable overrides after imported capabilities are interpreted
  • migrate the existing manual opcode, dummy-cycle, and quad-enable corrections into override_cfg.py
  • teach the module template to emit the additional attributes
  • add parity tests so checked-in generated modules cannot silently drift from their overrides

This addresses the regeneration problem described in #55 without blindly combining capability flags from Linux, flashrom, and OpenOCD. Modernizing those external importers remains separate follow-up work, since current Linux often discovers capabilities dynamically through SFDP.

Tests

  • pytest -q (36 passed, 198 subtests passed)
  • python3 -m py_compile tools/spi_nor_config_generator/override_cfg.py tools/spi_nor_config_generator/flash_module_template.py tools/spi_nor_config_generator/spi_nor_cfg_gen.py

@enjoy-digital
enjoy-digital merged commit 4842f59 into master Jul 10, 2026
2 checks passed
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.

1 participant