ci: self-provision python + cross toolchain in kernel-build job
Make the self-hosted kernel-build runnable with zero manual toolchain/python setup on the runner host (docs/ci-cd.md steps 3-4 move into the workflow): - build/build-kernel.sh: honor a caller-provided CROSS_COMPILE (default stays the Luckfox uclibc prefix). The kernel is freestanding, so a generic arm cross compiler links it. - kernel-build job: set CROSS_COMPILE=arm-linux-gnueabihf- (Debian gcc-arm-linux-gnueabihf, already on 0640) instead of depending on the ephemeral SDK checkout path; symlink python->python3 into $RUNNER_TEMP/bin on $GITHUB_PATH for the bare-`python` SDK quirk. - docs/ci-cd.md: only steps 1-2 (systemd service + cgroup cap) still need 0640 sudo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wB8KB3MMQztRDXCMCkPrf
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
4f060db1b1
commit
5a9432b8bc
@@ -77,10 +77,15 @@ done
|
||||
# 4. configure
|
||||
log "configuring (warden_defconfig)"
|
||||
cp "$HERE/warden_defconfig" "$SRC/.config"
|
||||
export ARCH=arm CROSS_COMPILE=arm-rockchip830-linux-uclibcgnueabihf-
|
||||
# CROSS_COMPILE defaults to the Luckfox SDK uclibc prefix (set SDK_TC to its bin/),
|
||||
# but the kernel is freestanding, so a caller may override with a generic arm cross
|
||||
# toolchain instead — e.g. CROSS_COMPILE=arm-linux-gnueabihf- (in Debian's
|
||||
# gcc-arm-linux-gnueabihf), which the CI runner already has on PATH.
|
||||
export ARCH=arm
|
||||
export CROSS_COMPILE="${CROSS_COMPILE:-arm-rockchip830-linux-uclibcgnueabihf-}"
|
||||
if [ -n "${SDK_TC:-}" ]; then export PATH="$SDK_TC:$PATH"; fi
|
||||
command -v "${CROSS_COMPILE}gcc" >/dev/null \
|
||||
|| { echo "cross toolchain ${CROSS_COMPILE}gcc not on PATH (set SDK_TC)" >&2; exit 1; }
|
||||
|| { echo "cross toolchain ${CROSS_COMPILE}gcc not on PATH (set SDK_TC, or CROSS_COMPILE to one that is)" >&2; exit 1; }
|
||||
make -C "$SRC" ARCH=arm CROSS_COMPILE="$CROSS_COMPILE" olddefconfig >/dev/null
|
||||
|
||||
# 5. build zImage + the board dtb
|
||||
|
||||
Reference in New Issue
Block a user