Commit fddaf3d
Makefile: Auto-clean board build directories when coreboot canary changes
When the coreboot git commit changes (canary mismatch), remove and recreate
the board-specific build directories to prevent stale artifacts from causing
compilation failures.
This eliminates the need for manual `rm -rf build/x86/BOARD` before rebuilding
after coreboot canary updates in development cycles (when creating patches).
One currently still has to, eg:
echo "bogues repo url + commit hash" | sudo tee /home/user/heads/build/x86/coreboot-25.09/.canary
Current logic then:
1. Detects canary changes and triggers repository cleanup
2. Removes both Heads board directory (build/x86/BOARD) and coreboot board
directory (build/x86/coreboot-*/BOARD) that contain stale build artifacts
3. Recreates empty board directories for the subsequent build
4. Allows patches to apply cleanly without Ada compilation errors
This ensures Ada builds work correctly after coreboot updates without manual
intervention (resync repo, apply patches, clean artifact dirs and rebuilds only what changed).
Signed-off-by: Thierry Laurion <insurgo@riseup.net>1 parent ea9b4d8 commit fddaf3d
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
495 | 499 | | |
496 | 500 | | |
497 | 501 | | |
| |||
0 commit comments