AOSP-RISCV

Overview

aosp-riscv

Overview

T-Head has ported Android 10 on RISC-V architecture. Android's primary purpose is to create an open software platform available for carriers, OEMs, and developers to make their innovative ideas a reality and to introduce a successful, real-world product that improves the mobile experience for users. Video for Android on XuanTie910

aosp.gif Graph 1. AOSP on RISC-V 64(XuanTie 910)

Chip

ICE EVB is a XuanTie C910 based high performance SoC board developed by T-Head. The ICE SoC has intergrated 3 XuanTie C910 cores (RISC-V 64) and 1 GPU core; featuring speed and intelligence with a high cost-effective ratio. The chip can provide [email protected] HEVC/AVC/JPEG decoding ability, and varieties of high-speed interfaces and peripherals for controling and data exchange; suits for 3D graphics, visual AI and multimedia processing.

ice.png

Graph 2. ICE chip

For more information about XuanTie 910 CPU core IP, please check: XuanTie C910 introduction

Open source

This port bases on android10-release (platform/manifest 1c222b02bde285fe1272b4440584750154d3882d). All the source code developed by T-HEAD are contained in the repository, anyone interested in this project can reproduce the emulator environment following the instructions from: Quick start

Comments
  • android10-release sources from https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest URL failing to download.

    android10-release sources from https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest URL failing to download.

    I was facing an issue while downloading android10 sources from https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest URL as follow's,

    $ cd ${AOSP_RISCV_BUILD_TOP} $ repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android10-release

    error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received. fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed

    platform/prebuilts/misc: remote: Counting objects: 1582, done.
    remote: Compressing objects: 100% (1118/1118), done.
    error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received. fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed

    remote: Counting objects: 1582, done. MiB | 44.00 KiB/s
    remote: Compressing objects: 100% (1118/1118), done.
    remote: Total 12081 (delta 6032), reused 10083 (delta 5385)
    Receiving objects: 100% (12081/12081), 108.40 MiB | 55.00 KiB/s, done. Resolving deltas: 100% (6032/6032), done. remote: Counting objects: 25, done. 7 MiB | 74.00 KiB/s objects: 96% (9959/10289), 821.60 MiB | 86.00 KiB/s
    remote: Compressing objects: 100% (20/20), done.
    error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received. fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed

    platform/prebuilts/misc: remote: Counting objects: 1582, done.
    remote: Compressing objects: 100% (1118/1118), done.
    error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received. fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed

    Can any one help me out to reslove this issue.

    Thanks in advance Ghalib khan.

    opened by ghalib210 4
  • reproduce.sh script is failing to clone sources.

    reproduce.sh script is failing to clone sources.

    Hello,

    Am trying to reproduce build of aosp-riscv on x86 Machine, i have cloned https://github.com/T-head-Semi/aosp-riscv.git and run the reproduce script there it was failing to clone prebuilt sources as follows.

    Can any one know why this was happen and help me to resolve this issue.

    $ ./reproduce.sh --2021-02-01 17:41:19-- https://rosp-riscv.oss-cn-hangzhou.aliyuncs.com/prebuilts/android-emulator/linux-x86_64.zip Resolving rosp-riscv.oss-cn-hangzhou.aliyuncs.com (rosp-riscv.oss-cn-hangzhou.aliyuncs.com)... failed: Name or service not known. wget: unable to resolve host address ‘rosp-riscv.oss-cn-hangzhou.aliyuncs.com’ --2021-02-01 17:41:20-- https://rosp-riscv.oss-cn-hangzhou.aliyuncs.com/prebuilts/clang-tools/linux-x86.zip Resolving rosp-riscv.oss-cn-hangzhou.aliyuncs.com (rosp-riscv.oss-cn-hangzhou.aliyuncs.com)... failed: Name or service not known. wget: unable to resolve host address ‘rosp-riscv.oss-cn-hangzhou.aliyuncs.com’ --2021-02-01 17:41:20-- https://rosp-riscv.oss-cn-hangzhou.aliyuncs.com/prebuilts/clang/host/linux-x86/clang-dev.zip Resolving rosp-riscv.oss-cn-hangzhou.aliyuncs.com (rosp-riscv.oss-cn-hangzhou.aliyuncs.com)... failed: Name or service not known. wget: unable to resolve host address ‘rosp-riscv.oss-cn-hangzhou.aliyuncs.com’ --2021-02-01 17:41:20-- https://rosp-riscv.oss-cn-hangzhou.aliyuncs.com/prebuilts/gcc/linux-x86/riscv64/riscv64.zip Resolving rosp-riscv.oss-cn-hangzhou.aliyuncs.com (rosp-riscv.oss-cn-hangzhou.aliyuncs.com)... failed: Name or service not known. wget: unable to resolve host address ‘rosp-riscv.oss-cn-hangzhou.aliyuncs.com’ --2021-02-01 17:41:20-- https://rosp-riscv.oss-cn-hangzhou.aliyuncs.com/prebuilts/misc/riscv64.zip Resolving rosp-riscv.oss-cn-hangzhou.aliyuncs.com (rosp-riscv.oss-cn-hangzhou.aliyuncs.com)... failed: Name or service not known. wget: unable to resolve host address ‘rosp-riscv.oss-cn-hangzhou.aliyuncs.com’ --2021-02-01 17:41:20-- https://rosp-riscv.oss-cn-hangzhou.aliyuncs.com/prebuilts/ndk/r20.zip Resolving rosp-riscv.oss-cn-hangzhou.aliyuncs.com (rosp-riscv.oss-cn-hangzhou.aliyuncs.com)... failed: Name or service not known. wget: unable to resolve host address ‘rosp-riscv.oss-cn-hangzhou.aliyuncs.com’ --2021-02-01 17:41:20-- https://rosp-riscv.oss-cn-hangzhou.aliyuncs.com/prebuilts/qemu-kernel/riscv64.zip Resolving rosp-riscv.oss-cn-hangzhou.aliyuncs.com (rosp-riscv.oss-cn-hangzhou.aliyuncs.com)... failed: Name or service not known. wget: unable to resolve host address ‘rosp-riscv.oss-cn-hangzhou.aliyuncs.com’ --2021-02-01 17:41:20-- https://rosp-riscv.oss-cn-hangzhou.aliyuncs.com/prebuilts/vndk/v28/riscv64.zip Resolving rosp-riscv.oss-cn-hangzhou.aliyuncs.com (rosp-riscv.oss-cn-hangzhou.aliyuncs.com)... failed: Name or service not known. wget: unable to resolve host address ‘rosp-riscv.oss-cn-hangzhou.aliyuncs.com’

    Thanks in advance. Ghalib khan.

    opened by ghalib210 3
  • Build failed!

    Build failed!

    hi, I tried to build and failed, error log attached, anybody else see the similar issue? error.log

    machine info, FYI:

    LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic

    opened by unicornx 2
  • binder loop error

    binder loop error

    Hi,

    I have build and trying to boot ramdisk. system & vendor images. while booting am hitting the following Error, can anyone resolve this issue to get till ADB shell.

    fu540_andriod-selinux-boot.log

    opened by cghalibkhan 0
  • Building image for real Hardware.

    Building image for real Hardware.

    Hello folks,

    I want to build android OS to real RISC-V target Machine, can anyone help me out, How can build android OS.

    Thanks in advance, Ghalib khan c.

    opened by ghalib210 3
  • Emulator failing once it Lunched.

    Emulator failing once it Lunched.

    Hello,

    I have cloned and build aosp-riscv, Currently there was 2 issues like,

    1. when i lunch emulator it's failing and throwing an Error as follows,

    $ emulator -selinux permissive -qemu -smp 2 -m 3800M -bios /home/performance-server/ghalib-khan/android/aosp-riscv/aosp-riscv/aosp/prebuilts/qemu-kernel/riscv64/ranchu/fw_jump.bin emulator: WARNING: encryption is off emulator: ERROR: VkCommonOperations.cpp:537: Failed to create Vulkan instance. ProbeKVM: This user doesn't have permissions to use KVM (/dev/kvm). The KVM line in /etc/group is: [LINE_NOT_FOUND]

    If the current user has KVM permissions, the KVM line in /etc/group should end with ":" followed by your username.

    If we see LINE_NOT_FOUND, the kvm group may need to be created along with permissions: sudo groupadd -r kvm # Then ensure /lib/udev/rules.d/50-udev-default.rules contains something like: # KERNEL=="kvm", GROUP="kvm", MODE="0660" # and then run: sudo gpasswd -a $USER kvm

    If we see kvm:... but no username at the end, running the following command may allow KVM access: sudo gpasswd -a $USER kvm

    You may need to log out and back in for changes to take effect.

    [email protected], [email protected] qemu-system-riscv64: plic: invalid register write: 000001fc qemu-system-riscv64: plic: invalid register read: 00002090 qemu-system-riscv64: plic: invalid register write: 00002090 qemu-system-riscv64: plic: invalid register read: 00002190 qemu-system-riscv64: plic: invalid register write: 00002190 Segmentation fault (core dumped)

    1. In Emulator Graphical thinks are not visible.

    Can any help me out resolve this issue.

    Thanks in advance, Ghalib khan c.

    opened by ghalib210 1
  • seems that there is some issue when building the whole image

    seems that there is some issue when building the whole image

    ./reproduce.sh

    ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=10 TARGET_PRODUCT=aosp_riscv64 TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_ARCH=riscv64 TARGET_ARCH_VARIANT=riscv64 TARGET_CPU_VARIANT=generic HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.15.0-118-generic-x86_64-Ubuntu-16.04.6-LTS HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=QP1A.191105.004 OUT_DIR=out

    ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=10 TARGET_PRODUCT=aosp_riscv64 TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_ARCH=riscv64 TARGET_ARCH_VARIANT=riscv64 TARGET_CPU_VARIANT=generic HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.15.0-118-generic-x86_64-Ubuntu-16.04.6-LTS HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=QP1A.191105.004 OUT_DIR=out

    [100% 46/46] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja FAILED: out/soong/build.ninja out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp error: test/suite_harness/common/host-side/util/Android.bp:15:1: "compatibility-host-util" depends on undefined module "cts_error_prone_rules" 18:45:07 soong bootstrap failed with: exit status 1

    opened by nelson-xia 2
Owner
T-Head Semiconductor Co., Ltd.
T-Head Semiconductor Co., Ltd.
Patches & Script for AOSP to run on Xuantie RISC-V CPU

Overview Graph 1. AOSP on RISC-V 64(XuanTie 910) Video for Android on XuanTie910 News and related resources Chip ICE is a XuanTie C910 based high perf

T-Head Semiconductor Co., Ltd. 432 Jan 2, 2023
kianv a simple implementation of a rv32im riscv cpu and soc in verilog with firmware that runs raytracer, mandelbrot, etc.....

A very simple riscv cpu/soc one single file implementation created in my spare time! But it is full rv32im CPU :) I have wrote all from scratch to lea

splinedrive 122 Dec 26, 2022
repo to house various LLVM based SIHFT passes for RISCV 32/64 soft error resilience

compas-ft-riscv COMPAS: Compiler-assisted Software-implemented Hardware Fault Tolerance implemented in LLVM passes for the RISC-V backend Repo to hous

EDA@TUM 2 Jan 10, 2022
A compiler for a C-ish language to a RISCV-ish machine

Apiales - a sillyC compiler A compiler for a C-like language to a RISCV-like architecture. Built for my own learning, made with love and caffeine in F

Thomas Berryhill 2 Dec 21, 2021
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, X86)

Unicorn Engine Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU. Unicorn offers some unparalleled fea

Unicorn Engine 6k Jan 3, 2023