Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement generate cmake-main.xxx.inc by scripts #4

Merged
merged 1 commit into from
Apr 21, 2022
Merged

implement generate cmake-main.xxx.inc by scripts #4

merged 1 commit into from
Apr 21, 2022

Conversation

unicornx
Copy link

The cmake-main.xxx.inc files should be generated by scripts, not
by manual.

Following changes to support adding riscv64 part.

  • added "qemu-system-riscv64" targets in android-qemu2-glue/scripts/gen-cmake.py
  • added configs in default-configs/riscv64-softmmu.mak so the generated
    cmake-main.xxx.inc share the same qemu2-shared for arm/x86/riscv.
    Double-checked and found the new configs all exists both for other
    ARCH such as ARM/X86.
  • updated CMakeLists.txt, optimized the code due to we should use
    ./accel/stubs/hvf-stub.c not ./hvf-stub.c, these two files are same.
    And now ./accel/stubs/hvf-stub.c is included in generated .inc files.

With upon changes, we can generated the cmake-main.xxx.inc files as
below:

./android/scripts/unix/build-qemu-android.sh --verbose --host=linux-x86_64
./android-qemu2-glue/scripts/gen-cmake.py -i \
../../prebuilts/android-emulator-build/qemu-upstream/ -r . \
-o <path_to_generated_files>

Noted: due to I only tested linux-x86_64, so in this commit, I only
updated cmake-main.linux-x86_64.inc.

Signed-off-by: Chen Wang wangchen20@iscas.ac.cn

The cmake-main.xxx.inc files should be generated by scripts, not
by manual.

Following changes to support adding riscv64 part.

- added "qemu-system-riscv64" targets in android-qemu2-glue/scripts/gen-cmake.py
- added configs in default-configs/riscv64-softmmu.mak so the generated
  cmake-main.xxx.inc share the same qemu2-shared for arm/x86/riscv.
  Double-checked and found the new configs all exists both for other
  ARCH such as ARM/X86.
- updated CMakeLists.txt, optimized the code due to we should use
  ./accel/stubs/hvf-stub.c not ./hvf-stub.c, these two files are same.
  And now ./accel/stubs/hvf-stub.c is included in generated .inc files.

With upon changes, we can generated the cmake-main.xxx.inc files as
below:

```
./android/scripts/unix/build-qemu-android.sh --verbose --host=linux-x86_64
./android-qemu2-glue/scripts/gen-cmake.py -i \
../../prebuilts/android-emulator-build/qemu-upstream/ -r . \
-o <path_to_generated_files>
```

Noted: due to I only tested linux-x86_64, so in this commit, I only
updated cmake-main.linux-x86_64.inc.

Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
@MaoHan001 MaoHan001 merged commit 4edcafd into riscv-android-src:emu-31.2.1.0-riscv64 Apr 21, 2022
@unicornx unicornx deleted the plct-dev-cmake branch April 22, 2022 06:30
@unicornx unicornx restored the plct-dev-cmake branch April 26, 2022 02:19
@unicornx unicornx deleted the plct-dev-cmake branch April 26, 2022 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants