packages/chip/docs/android/riscv-bringup.md
The Android path is split into a simulator track and a physical-board track. The simulator track proves that the software stack and device contracts are coherent. The physical-board track proves that real drivers, clocks, memory, display, and power behavior can survive Android workloads.
| Target | Purpose | Status expectation |
|---|---|---|
| AOSP riscv64 / Cuttlefish | Fastest Android userspace and framework path | Use for simulator/home-screen work and app/runtime validation; not a proof of e1_soc hardware ABI. |
| QEMU virt | Kernel, init, shell, block, network, and device-contract smoke | Good for software plumbing; not hardware ABI proof. |
| Renode | Peripheral and firmware model smoke | Useful for deterministic device-model tests. |
| TH1520 board | Physical RISC-V Android baseline | Best purchasable Android/RISC-V reference, but not fully open SoC silicon. |
| e1_soc RTL | Open hardware contract proof | Tiny target; Linux/Android performance claims are non-v0. |
Current local evidence: Android has not been verified booting in this repo. Treat the commands below as the required bring-up recipe and evidence checklist until a checked-in transcript proves otherwise. The repo-local scaffold checks are CLI-only and must not be reported as Android boot evidence.
Use a Linux host for Cuttlefish. The expected development host is Ubuntu or Debian on x86_64 with hardware virtualization enabled.
Minimum host checks:
grep -c -w 'vmx\|svm' /proc/cpuinfo
find /dev -name kvm
groups "$USER" | grep -E 'kvm|cvdnetwork|render'
qemu-system-riscv64 --version
adb version
repo version
Repo preflight and handoff:
cd /path/to/Eliza-AI-SoC
export AOSP_DIR=/path/to/aosp
python3 scripts/check_aosp_linux_preflight.py --write-report
sw/aosp-device/import-aosp-device.sh --check "$AOSP_DIR"
make aosp-bsp-check
AOSP_DIR="$AOSP_DIR" scripts/boot_android_simulator.sh \
--run-cuttlefish --run-cts --run-vts --run-qemu --run-renode
python3 scripts/check_android_sim_boot.py
python3 scripts/check_software_bsp.py aosp --require-evidence
Expected results:
/dev/kvm exists and the user is in kvm, cvdnetwork, and render.repo, adb, launch_cvd, and stop_cvd are in PATH after the AOSP
environment is sourced.Cuttlefish host packages, when not provided by the OS image, are built and installed from the Android Cuttlefish host package source:
sudo apt install -y git devscripts equivs config-package-dev \
debhelper-compat golang curl
git clone https://github.com/google/android-cuttlefish
cd android-cuttlefish
tools/buildutils/build_packages.sh
sudo dpkg -i ./cuttlefish-base_*_*64.deb || sudo apt-get install -f
sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f
sudo usermod -aG kvm,cvdnetwork,render "$USER"
sudo reboot
Use this track first because it exercises Android userspace, ART, framework services, adb, and Tradefed without depending on the unfinished e1_soc CPU and GPU story.
mkdir -p ~/aosp-riscv64
cd ~/aosp-riscv64
repo init -u https://android.googlesource.com/platform/manifest \
-b android-latest-release
repo sync -c -j"$(nproc)"
source build/envsetup.sh
lunch aosp_cf_riscv64_phone-trunk_staging-userdebug
make -j"$(nproc)"
Shell-first launch:
launch_cvd -cpus=4 --memory_mb=8192 --gpu_mode=none --daemon
adb wait-for-device
adb shell getprop ro.product.cpu.abi
adb shell uname -m
adb shell logcat -d -b all > out/eliza-riscv64-logcat.txt
stop_cvd
Home-screen launch:
launch_cvd -cpus=8 --memory_mb=8192 --daemon
adb wait-for-device
adb shell getprop sys.boot_completed
adb shell dumpsys SurfaceFlinger --display-id
adb shell logcat -d -b all > out/eliza-riscv64-home-logcat.txt
stop_cvd
Record failure as useful data. Do not update status to "Android running" from
these repo-local docs. A virtual-device transcript may be useful smoke evidence
when it includes adb shell, ro.product.cpu.abi=riscv64, and
sys.boot_completed=1, but it is still not e1_soc hardware ABI proof.
The checked-in capture wrapper records that bounded transcript shape without fabricating pass markers:
sw/aosp-device/capture-aosp-evidence.sh /path/to/aosp cuttlefish-boot
make software-bsp-evidence-check
For a different external Cuttlefish product or UI launch, set:
AOSP_PRODUCT=aosp_cf_riscv64_phone-trunk_staging-userdebug \
AOSP_CUTTLEFISH_ARGS="--cpus=8 --memory_mb=8192" \
sw/aosp-device/capture-aosp-evidence.sh /path/to/aosp cuttlefish-boot
The cuttlefish-boot mode currently emits the backward-compatible
docs/evidence/android/cuttlefish_riscv64_boot.log alias. The stricter AOSP
BSP gate in scripts/check_software_bsp.py requires
docs/evidence/android/cuttlefish_riscv64_smoke.log plus QEMU and Renode smoke
logs before the Android BSP evidence gate clears.
The repo-local device tree is a scaffold intended to be copied or overlaid into an external AOSP checkout:
cd ~/aosp-riscv64
mkdir -p device/eliza
rsync -a /path/to/Eliza-AI-SoC/sw/aosp-device/device/eliza/ \
device/eliza/
source build/envsetup.sh
lunch eliza_ai_soc-userdebug
m nothing
m vendorimage
The first expected result is a useful build failure if a required Android
surface is not implemented. A successful m vendorimage only means the scaffold
is syntactically integrated; it does not mean Android boots on e1_soc.
Use the repo capture commands for archived evidence:
sw/aosp-device/capture-aosp-evidence.sh /path/to/aosp lunch
sw/aosp-device/capture-aosp-evidence.sh /path/to/aosp vendorimage
sw/aosp-device/capture-aosp-evidence.sh /path/to/aosp checkvintf
sw/aosp-device/capture-aosp-evidence.sh /path/to/aosp cts-subset
sw/aosp-device/capture-aosp-evidence.sh /path/to/aosp vts-subset
python3 scripts/intake_android_evidence.py --target aosp --from-dir /path/to/logs --install
The required evidence files, command markers, and pass markers for
scripts/check_software_bsp.py are listed in
docs/android/bsp-log-evidence-manifest.json. The stricter AOSP gate requires
these logs:
docs/evidence/android/eliza_ai_soc_lunch.logdocs/evidence/android/eliza_ai_soc_vendorimage.logdocs/evidence/android/eliza_ai_soc_checkvintf.logdocs/evidence/android/eliza_ai_soc_sepolicy_build.logdocs/evidence/android/eliza_ai_soc_selinux_neverallow.logdocs/evidence/android/eliza_ai_soc_cts_vts_plan.logdocs/evidence/android/cuttlefish_riscv64_smoke.logdocs/evidence/android/qemu_riscv64_smoke.logdocs/evidence/android/renode_e1_soc_smoke.logThe legacy capture outputs cuttlefish_riscv64_boot.log,
cts_virtual_device_subset.log, and vts_virtual_device_subset.log may be
kept as aliases when produced by capture-aosp-evidence.sh, but they are not a
complete AOSP BSP evidence gate.
Expected local artifacts after integration:
| Artifact | Producer | Evidence to attach |
|---|---|---|
out/target/product/eliza_ai_soc/vendor.img | m vendorimage | ls -lh, build log, VINTF check result |
out/target/product/eliza_ai_soc/installed-files-vendor.txt | AOSP build | HAL/init/fstab entries present |
out/target/product/eliza_ai_soc/obj/PACKAGING/vndk_intermediates | AOSP build | VNDK/Treble packaging log |
out/target/product/eliza_ai_soc/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil | AOSP policy build | SELinux policy build transcript |
out/eliza-riscv64-logcat.txt | Cuttlefish run | virtual-device smoke, init, HAL, and SELinux data; not e1_soc boot proof |
out/host/linux-x86/cts | m cts or Tradefed list/run command | CTS/VTS plan transcript and result dir, not a full CTS claim |
out/host/linux-x86/vts | m vts or Tradefed list/run command | CTS/VTS plan transcript and result dir, not a full VTS claim |
The sw/aosp-device/device/eliza/eliza_ai_soc tree must remain tied to
sw/platform/e1_platform_contract.json. Any HAL, init service, device-tree
node, or kernel driver added for Android must have a contract entry or an
explicit stub rationale.
The checked-in sw/linux/dts/eliza-e1.dts file is not a complete AP boot
DTB. For Android/Linux bring-up it must be combined with, or replaced by, the
selected generated AP DTS containing CPU, memory, timer, interrupt-controller,
and enabled UART console nodes. Run python3 scripts/capture_cpu_ap_evidence.py dts-audit --run-dtc against the generated DTS before using it for OpenSBI,
Linux, or Android boot evidence.
Required v0 surfaces:
All v0 HALs must either fail closed or delegate to the Linux device contract. No stub may fake hardware success.
| Surface | AOSP artifact | Contract source | v0 behavior |
|---|---|---|---|
| Graphics composer | hwcomposer.eliza_ai_soc and VINTF [email protected] | display MMIO region at 0x10030000 | Stub exposes a framebuffer path only after a Linux display node exists; otherwise service stays disabled or returns unsupported. |
| NPU | e1_npu.default and VINTF [email protected] | npu MMIO region at 0x10020000 and IRQ_NPU | Runtime shim runs fixed-vector smoke only when /dev/e1-npu exists; all other ops return unsupported. |
| DMA | No public Android HAL in v0 | dma MMIO region at 0x10010000 and IRQ_DMA | Kernel-only support for NPU/display staging; no framework exposure. |
| Input | Generic evdev or no-op input | Board DTS input node, when present | Simulator may use Cuttlefish input; e1_soc target has no touch claim. |
| Audio | None | No contract entry | Excluded; do not add manifest entries. |
| Camera | None | No contract entry | Excluded; do not add manifest entries. |
| Radio/modem | None | No contract entry | Excluded; do not add manifest entries. |
| Power/thermal | Minimal default Android services only | No power island contract yet | Excluded from performance claims. |
Explicit v0 exclusions:
The three-week target is not a consumer phone. It is a verified demo:
qemu_riscv64_smoke.log and renode_e1_soc_smoke.log.The first compatibility goal is a stable virtual-device subset, not a full phone certification run.
Build test harnesses from the same AOSP checkout:
source build/envsetup.sh
lunch aosp_cf_riscv64_phone-trunk_staging-userdebug
m -j"$(nproc)" cts vts
Run order:
adb shell true, adb shell cmd package list packages, and
adb shell getenforce.cts-tradefed run cts-virtual-device-stable when the riscv64 virtual device
is stable enough to keep multiple shards online./dev/e1-npu absent must not crash Android;
present must pass a fixed-vector runtime test before any NNAPI/TFLite claim.Initial excludes:
CtsCameraTestCasesCtsMedia* modules requiring hardware codecs or microphonesCtsGraphics* modules requiring GLES/Vulkan conformancePass criteria for the first report:
Use this order so failures stay actionable:
| Symptom | First commands | Likely owner |
|---|---|---|
| Cuttlefish does not launch | launch_cvd -verbosity=DEBUG, ls -l /dev/kvm, groups, cvd_status | host setup |
adb devices is empty | adb kill-server; adb start-server, `ss -ltnp | grep 652, tail -200 ~/cuttlefish_runtime/logs/*` |
| riscv64 build fails before lunch | repo branch, build/soong/soong_ui.bash --dumpvar-mode TARGET_ARCH | AOSP branch/target |
| boot hangs before init | tail -300 ~/cuttlefish_runtime/kernel.log, adb wait-for-device | kernel/bootloader |
| init restarts HAL | `adb shell logcat -b all -d | grep -E 'init |
| VINTF failure | adb shell lshal, adb shell vintf when available, inspect vendor manifest | manifest/HAL |
| SELinux denial | `adb shell dmesg | grep avc, adb logcat -b all -d |
| UI never reaches home | adb shell getprop sys.boot_completed, dumpsys SurfaceFlinger, logcat ActivityTaskManager | graphics/framework |
| CTS module times out | tradefed.sh list devices, adb logcat, retry a single module | test infra or module |
Every Android bring-up report must include:
make aosp-bsp-checkpython3 sw/check_bsp_scaffolds.py aospRepo-local expected output before external AOSP work:
aosp: scaffold audit
local command: make aosp-bsp-check
expected output: aosp BSP check passed.
dependency blocker: external AOSP checkout with riscv64/Cuttlefish host dependencies and HAL binaries
status: clear
aosp BSP check failed:
- aosp BSP BLOCKED: missing evidence for external AOSP lunch/vendorimage/VINTF/SELinux/CTS-VTS intake logs plus virtual-device smoke transcripts: ...
Sources: