kernel: M2 earlycon build — full 6.18 zImage + minimal RV1106 board DT
M1 is complete (clk + pinctrl + mach compile clean); this reaches M2's build milestone. multi_v7_defconfig + configs/m2-earlycon.fragment builds an 11.8 MB zImage with clk-rv1106.o and pinctrl-rockchip.o (our rv1106 data) compiled into the full tree — no rv1106 warnings. dts/rv1106-warden-m2.dts (CPU, GIC-400, arch timer, 256 MiB RAM, GRF, the CRU, uart2 as snps,dw-apb-uart) compiles clean at W=1 with earlycon=uart8250,mmio32,0xff4c0000. Reproducible via build-m2.sh. Boot is the next step and is on-hardware/attended: package zImage + dtb, load on a bench unit with a recovery net, watch for the earlycon "it's alive". PORT-VERIFY before trusting a boot: DDR size/base, the CPU clock mux, console baud. 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
435953799c
commit
d50934d048
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
# build-m2.sh — reproducible M2 (earlycon) build of the RV1106 → 6.18 forward-port.
|
||||
#
|
||||
# Produces: a zImage with our ported SoC drivers, and rv1106-warden-m2.dtb.
|
||||
# Boot is a separate on-hardware step (see PORT-STATUS.md "M2 boot").
|
||||
#
|
||||
# Usage: KTREE=/path/to/linux-6.18.46 SDK_TC=/path/to/toolchain/bin ./build-m2.sh
|
||||
# Defaults match this workspace.
|
||||
set -euo pipefail
|
||||
|
||||
FE="${FE:-<flare-edge>}"
|
||||
KTREE="${KTREE:-$FE/research/linux-6.18.46}"
|
||||
SDK_TC="${SDK_TC:-$FE/sdk/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin}"
|
||||
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# The SDK toolchain bakes absolute paths and needs `python` (not python3) + a
|
||||
# space-free PATH (see the flare-edge-sdk-path-compat note).
|
||||
export PATH="$SDK_TC:/usr/bin:/bin"
|
||||
export ARCH=arm
|
||||
export CROSS_COMPILE=arm-rockchip830-linux-uclibcgnueabihf-
|
||||
|
||||
[ -d "$KTREE" ] || { echo "kernel tree not found: $KTREE" >&2; exit 1; }
|
||||
command -v python >/dev/null || { echo "need 'python' on PATH (SDK quirk)" >&2; exit 1; }
|
||||
|
||||
# Stage our board DT into the tree if it drifted from the capture.
|
||||
install -m664 "$HERE/dts/rv1106-warden-m2.dts" \
|
||||
"$KTREE/arch/arm/boot/dts/rockchip/rv1106-warden-m2.dts"
|
||||
grep -q 'rv1106-warden-m2.dtb' "$KTREE/arch/arm/boot/dts/rockchip/Makefile" \
|
||||
|| sed -i 's/\trk3288-vyasa.dtb/\trk3288-vyasa.dtb \\\n\trv1106-warden-m2.dtb/' \
|
||||
"$KTREE/arch/arm/boot/dts/rockchip/Makefile"
|
||||
|
||||
cd "$KTREE"
|
||||
make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE" multi_v7_defconfig
|
||||
./scripts/kconfig/merge_config.sh -m .config "$HERE/configs/m2-earlycon.fragment"
|
||||
make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE" olddefconfig
|
||||
make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE" -j"$(nproc)" zImage
|
||||
make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE" rockchip/rv1106-warden-m2.dtb
|
||||
|
||||
echo
|
||||
echo "== M2 build OK =="
|
||||
ls -la arch/arm/boot/zImage arch/arm/boot/dts/rockchip/rv1106-warden-m2.dtb
|
||||
Reference in New Issue
Block a user