sophgo-sg200x-aic8800: don't git-fetch the driver during config-dump - #10381
Merged
Conversation
post_family_config also runs under `config-dump-json` (CONFIG_DEFS_ONLY=yes),
which the build-engine inventory runs in parallel for every board x branch.
This extension is the only aic8800 one that fetches a vendor driver from git
(the others install prebuilt DKMS debs), and it did so unconditionally in
post_family_config - so the inventory triggered a real fetch that has no
kernel tree to feed and raced on the global git config:
git --no-pager config --global --add safe.directory \
/armbian/cache/sources/aic8800-milkv-duos/<ref> -> exit 128
That failed config-dump-json for both milkv-duos boards and took down the
whole "Generate build engine inventory" job.
Guard the fetch with CONFIG_DEFS_ONLY (the framework's own idiom, already used
by main-config.sh / cli-docker.sh, and mirrored by this extension's kernel
hook via `[[ ! -f .config ]]`). AIC8800_SRC_DIR is still declared for the real
build, where post_family_config runs without CONFIG_DEFS_ONLY and the fetch
happens before custom_kernel_config copies from it.
Signed-off-by: Igor Pecovnik <igor@armbian.com>
Contributor
📝 WalkthroughWalkthroughThe AIC8800 extension now initializes its source directory before fetching. Configuration-only runs skip repository access, while kernel builds continue to fetch the pinned repository. ChangesAIC8800 fetch control
Estimated code review effort: 2 (Simple) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why the "Generate build engine inventory" job fails
The inventory job (
compile.sh inventory-boards→config-dump-jsonper board×branch) dies on the milkv-duos boards:Why milkv-duos and not the other aic8800 boards
Every other aic8800 board installs a prebuilt DKMS deb (
radxa-aic8800,brostrend-aic8800-dkms) — no git fetch at config time.sophgo-sg200x-aic8800is the only one that pulls a vendor driver from git, and it did so unconditionally inpost_family_config:post_family_configalso runs underconfig-dump-json(CONFIG_DEFS_ONLY=yes), which the inventory runs in parallel for all four milkv-duos board×branch combos. So the inventory triggers a real git fetch that (a) has no kernel tree to feed and (b) races on the global git config (git config --global --add safe.directory→ exit 128). That empties the config JSON, andinventory-boards-csv.pythenKeyErrors and takes the whole job down.The extension already guards its kernel hook against config-dump (
[[ ! -f .config ]] && return 0) — it just missed the fetch hook.Fix
Skip the fetch when
CONFIG_DEFS_ONLY=yes— the framework's own idiom (used bymain-config.sh,cli-docker.sh).AIC8800_SRC_DIRis still declared (deterministic path off the pinned ref) so version/hash calculation is unchanged. In a real build,post_family_configruns withCONFIG_DEFS_ONLYunset, so the fetch happens as before, ahead ofcustom_kernel_configcopying from it (that copy is itself.config-guarded, i.e. real-build only).Validation
bash -nclean.AIC8800_SRC_DIR's only real use (thecp -aat line 96) is behind the[[ ! -f .config ]]guard, so the config-dump path never needs the fetched files.This unblocks the inventory job at the source. (A defensive follow-up could also make
inventory-boards-csv.pyskip a board whose config gather failed instead ofKeyError-ing, so no single board can ever crash the whole inventory — happy to do that separately.)Summary by CodeRabbit