diff options
| author | Manos Pitsidianakis <manos.pitsidianakis@linaro.org> | 2024-10-24 17:03:00 +0300 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-05 14:18:15 +0100 |
| commit | 37fdb2f56a90c7d5ea7093b920a7bf72c03aff17 (patch) | |
| tree | bc992b6a83b62d964819addea7fdc5fd0d6c9f48 /rust/hw/char/pl011/meson.build | |
| parent | ca5aa28e244ee3dfe0dd6c76c7c33ce78f25beed (diff) | |
| download | focaccia-qemu-37fdb2f56a90c7d5ea7093b920a7bf72c03aff17.tar.gz focaccia-qemu-37fdb2f56a90c7d5ea7093b920a7bf72c03aff17.zip | |
rust: add PL011 device model
This commit adds a re-implementation of hw/char/pl011.c in Rust. How to build: 1. Configure a QEMU build with: --enable-system --target-list=aarch64-softmmu --enable-rust 2. Launching a VM with qemu-system-aarch64 should use the Rust version of the pl011 device Co-authored-by: Junjie Mao <junjie.mao@intel.com> Co-authored-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Junjie Mao <junjie.mao@intel.com> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Link: https://lore.kernel.org/r/20241024-rust-round-2-v1-2-051e7a25b978@linaro.org
Diffstat (limited to 'rust/hw/char/pl011/meson.build')
| -rw-r--r-- | rust/hw/char/pl011/meson.build | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/rust/hw/char/pl011/meson.build b/rust/hw/char/pl011/meson.build new file mode 100644 index 0000000000..547cca5a96 --- /dev/null +++ b/rust/hw/char/pl011/meson.build @@ -0,0 +1,26 @@ +subproject('bilge-0.2-rs', required: true) +subproject('bilge-impl-0.2-rs', required: true) + +bilge_dep = dependency('bilge-0.2-rs') +bilge_impl_dep = dependency('bilge-impl-0.2-rs') + +_libpl011_rs = static_library( + 'pl011', + files('src/lib.rs'), + override_options: ['rust_std=2021', 'build.rust_std=2021'], + rust_abi: 'rust', + dependencies: [ + bilge_dep, + bilge_impl_dep, + qemu_api, + qemu_api_macros, + ], +) + +rust_devices_ss.add(when: 'CONFIG_X_PL011_RUST', if_true: [declare_dependency( + link_whole: [_libpl011_rs], + # Putting proc macro crates in `dependencies` is necessary for Meson to find + # them when compiling the root per-target static rust lib. + dependencies: [bilge_impl_dep, qemu_api_macros], + variables: {'crate': 'pl011'}, +)]) |