lopper: assists: gen_domain_dts: auto-detect carrier-board peripheral… - #799
lopper: assists: gen_domain_dts: auto-detect carrier-board peripheral…#799kedareswararao wants to merge 1 commit into
Conversation
… Kconfig Lopper currently generates the Zephyr-specific devicetree but not the Kconfig defaults a peripheral may also need, so those are hand-added per board today. Add infra to generate these too: if a peripheral needs certain configs, add a rule to emit them into the board's Kconfig.defconfig, so it gets copied to the board and consumed just like the generated DT. Board-specific entries (e.g. EEPROM) can be added by reading the board name off the SDT root node. Also guard the board_Kconfig.defconfig scratch file, reused across west lopper-command invocations, against being appended to under a stale board's guard left over from a prior run. Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
|
@zeddii : Please review when you have sometime |
|
Thanks @kedareswararao — auto-generating the DT-derived Kconfig defaults instead of hand-adding them per board is a useful direction. A few things to sort before it can be merged: one correctness bug, a test gap, and something I'd like to understand. 1. Blocking — the stale-file guard has a hole (same board, silent config bleed).
So the guard only protects the append case. For a board not in the dict (e.g. Fix: reset the file for the current board unconditionally at the start of the run (or delete any pre-existing scratch copy) before either path, so a prior run can't survive regardless of whether this run adds anything. 2. Please add tests. The new helpers ( 3. Not a blocker — just thinking out loud on None of this is a rejection — the peripheral-detection logic is sound and well-commented, and the blast radius is safely Zephyr-scoped. The stale-file bug + tests are the things to fix in this PR; #3 is just me trying to understand the flow. |
… Kconfig
Lopper currently generates the Zephyr-specific devicetree but not the Kconfig defaults a peripheral may also need, so those are hand-added per board today. Add infra to generate these too: if a peripheral needs certain configs, add a rule to emit them into the board's Kconfig.defconfig, so it gets copied to the board and consumed just like the generated DT. Board-specific entries (e.g. EEPROM) can be added by reading the board name off the SDT root node.
Also guard the board_Kconfig.defconfig scratch file, reused across west lopper-command invocations, against being appended to under a stale board's guard left over from a prior run.