Add BL616 TangCore build smoke test + reference libchdr integration - #175
Merged
Conversation
Compile+link CI job against the real Xuantie/T-Head toolchain and nand2mario's real bouffalo_sdk fork/firmware-bl616 (Sipeed Tang Console 60K/Primer 25K's onboard BL616 companion MCU), not the vanilla riscv64-unknown-elf-gcc proxy rv32-ram-budget.yml uses. Pinned to fixed commits since firmware-bl616/bouffalo_sdk are repos we don't control. contrib/tangcore-bl616/ has the FatFS core_file_callbacks bridge and a firmware-overlay proving the vendored libchdr actually links (a real call site was needed - an unreferenced build links "clean" by getting dead-stripped, which looked like success but proved nothing on the first attempt). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMYbZzB8mioFmotWGFnAXG
firmware-bl616/bouffalo_sdk are nand2mario's Apache-2.0 repos, not ours.
The previous commit stored full modified copies of his CMakeLists.txt and
main.cpp under contrib/ - that's redistributing his copyrighted files
wholesale, not the minimal way to express "libchdr adds these lines".
Replace with a 92-line unified diff (contrib/tangcore-bl616/patches/),
applied via git apply against a freshly-cloned pinned commit in CI - the
standard way to distribute a modification without redistributing the
whole file. Verified it applies cleanly and reproduces byte-identical
files. Fixed a caching bug this surfaced: firmware-bl616 must never be
cached post-patch (would either replay the patch onto an already-patched
tree, or freeze a stale libchdr copy into the cache instead of testing
the current checkout) - only the two untouched clones (toolchain, SDK)
are cached now, firmware-bl616 is always cloned fresh. Re-verified the
full corrected pipeline end-to-end, including a second run to confirm
idempotency, and the resulting build is unchanged.
chd_fatfs.{h,c} are unaffected - 100% original code, no third-party
content, now carrying proper BSD-3-Clause headers matching the rest of
libchdr. contrib/tangcore-bl616/README.md documents the licensing
situation explicitly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMYbZzB8mioFmotWGFnAXG
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.
Summary
bouffalo_sdkfork/firmware-bl616(the onboard BL616 companion MCU on Sipeed Tang Console 60K / Primer 25K), not the vanillariscv64-unknown-elf-gccproxyrv32-ram-budget.ymluses.contrib/tangcore-bl616/chd/chd_fatfs.{h,c}- originalcore_file_callbacksbridge onto FatFS (BSD-3-Clause, no third-party content).contrib/tangcore-bl616/patches/- a small unified diff againstfirmware-bl616'sCMakeLists.txt/main.cpp(Apache-2.0, © nand2mario), applied viagit applyat CI time against a pinned commit - not a copy of his files, seecontrib/tangcore-bl616/README.mdfor the full licensing rationale.toolchain_gcc_t-head_linux/bouffalo_sdk/firmware-bl616since those are repos we don't control.No BL616 hardware in CI, so this proves the real toolchain/SDK/firmware combination keeps compiling and fully linking libchdr in - not that
chd_open()/chd_read()work at runtime.Test plan
git apply --checkcleanly and reproduce identical files against the pinnedfirmware-bl616commitextern "C"on the bridge header) by forcing a real call site (chd_link_probe()) instead of trusting an unreferenced "clean" link🤖 Generated with Claude Code
https://claude.ai/code/session_01KMYbZzB8mioFmotWGFnAXG