commit | 0d42b9db0c245b89272c5941c9c76c41d2114b04 | [log] [tgz] |
---|---|---|
author | Victor Khimenko <khim@google.com> | Sun Aug 04 01:37:11 2024 +0000 |
committer | Victor Khimenko <khim@google.com> | Sun Aug 04 20:09:39 2024 +0000 |
tree | f050f3a66a5bbb4be8cd4d2c8b0b97781d96805a | |
parent | 064f7bc8b3b9da922d654b4cd9430796a460e2bd [diff] |
[interinsics] Rename folders to avoid ambiguity. Use the name “x86_common” for common code that can be used with 32-bit “x86” architecture and also with “x86-64” to avoid ambiguity. Test: m berberis_all Change-Id: I8aa8b185fddac9bb59e0472dd6a254e42c36e697
Dynamic binary translator to run Android apps with riscv64 native code on x86_64 devices or emulators.
Supported extensions include Zb* (bit manipulation) and most of Zv (vector). Some less commonly used vector instructions are not yet implemented, but Android CTS and some Android apps run with the current set of implemented instructions.
Note: Googlers, read go/berberis and go/berberis-start first.
From your Android root checkout, run:
source build/envsetup.sh lunch sdk_phone64_x86_64_riscv64-trunk_staging-eng m berberis_all
For development, we recommend building all existing targets before uploading changes, since they are currently not always synchronized with berberis_all
:
mmm frameworks/libs/binary_translation
out/host/linux-x86/bin/berberis_program_runner_riscv64 \ out/target/product/emu64xr/testcases/berberis_hello_world_static.native_bridge/x86_64/berberis_hello_world_static
On success Hello!
will be printed.
m berberis_all berberis_run_host_tests
or
out/host/linux-x86/nativetest64/berberis_host_tests/berberis_host_tests
m emulator -memory 4096 -writable-system -partition-size 65536 -qemu -cpu host &
Note: Requires a running device or emulator with Berberis support.
adb root adb sync data
adb shell /data/nativetest64/berberis_guest_loader_riscv64_tests/berberis_guest_loader_riscv64_tests
adb shell /data/nativetest64/berberis_ndk_program_tests/berberis_ndk_program_tests
Note: Requires a running device or emulator with Berberis support.
m TARGET_PRODUCT=aosp_riscv64 bionic-unit-tests
adb push out/target/product/generic_riscv64/data/nativetest64/bionic-loader-test-libs /data/local/tmp adb push out/target/product/generic_riscv64/data/nativetest64/bionic-unit-tests /data/local/tmp
adb shell /system/bin/berberis_program_runner_riscv64 /data/local/tmp/bionic-unit-tests/bionic-unit-tests --no_isolate