commit | 09cbcfd7f801592c82e085a65c9fae6de6999d62 | [log] [tgz] |
---|---|---|
author | dimitry <dimitry@google.com> | Wed Jul 17 22:35:38 2024 +0200 |
committer | dimitry <dimitry@google.com> | Wed Jul 17 23:17:47 2024 +0200 |
tree | af60d9fe95918a0b485fb4cfcef7abdac9827a07 | |
parent | 2fb75b29f2432f61aa11b65b3913f0aecb9c260b [diff] |
Refactor guest_signal_handling to support riscv64 device Bug: 352784623 Flag: EXEMPT NDK Test: builds Change-Id: I6c77d8ce1ccd05a2709808062c2ba4a3529dea2c
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