[v3,4/9] config/riscv: add qemu crossbuild target
Checks
Commit Message
A new cross-compilation target that has extensions that DPDK uses and
QEMU supports. Initially, this is just the Zbc extension for hardware
CRC support.
Signed-off-by: Daniel Gregory <daniel.gregory@bytedance.com>
---
config/riscv/meson.build | 3 ++-
config/riscv/riscv64_qemu_linux_gcc | 17 +++++++++++++++++
.../linux_gsg/cross_build_dpdk_for_riscv.rst | 5 +++++
3 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 config/riscv/riscv64_qemu_linux_gcc
@@ -43,7 +43,8 @@ vendor_generic = {
['RTE_MAX_NUMA_NODES', 2]
],
'arch_config': {
- 'generic': {'machine_args': ['-march=rv64gc']}
+ 'generic': {'machine_args': ['-march=rv64gc']},
+ 'qemu': {'machine_args': ['-march=rv64gc_zbc']},
}
}
new file mode 100644
@@ -0,0 +1,17 @@
+[binaries]
+c = ['ccache', 'riscv64-linux-gnu-gcc']
+cpp = ['ccache', 'riscv64-linux-gnu-g++']
+ar = 'riscv64-linux-gnu-ar'
+strip = 'riscv64-linux-gnu-strip'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'riscv64'
+cpu = 'rv64gc_zbc'
+endian = 'little'
+
+[properties]
+vendor_id = 'generic'
+arch_id = 'qemu'
+pkg_config_libdir = '/usr/lib/riscv64-linux-gnu/pkgconfig'
@@ -110,6 +110,11 @@ Currently the following targets are supported:
* SiFive U740 SoC: ``config/riscv/riscv64_sifive_u740_linux_gcc``
+* QEMU: ``config/riscv/riscv64_qemu_linux_gcc``
+
+ * A target with all the extensions that QEMU supports that DPDK has a use for
+ (currently ``rv64gc_zbc``). Requires QEMU version 7.0.0 or newer.
+
To add a new target support, ``config/riscv/meson.build`` has to be modified by
adding a new vendor/architecture id and a corresponding cross-file has to be
added to ``config/riscv`` directory.