-
Notifications
You must be signed in to change notification settings - Fork 174
meta-zephyr-sdk: xilinx_qemu: Update to QEMU 8.1.0 #859
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
Conversation
01bb181 to
1d20944
Compare
5885e26 to
d2a5d26
Compare
|
I had to do some attempts to finally find the configuration which is working via your layers. Sorry about it. |
|
Is this already upstream in qemu? We are planning to move the latest release and it would help alot if those targets are upstream so we do not need to maintain multiple versions of qemu |
|
Nope. Xilinx is using configuration based on DTB (HW DTB) which is hard to upstream. Some IP models are in upstream also some platform but a lot of features which we would like to use are not there yet. |
6c3759d to
5e70673
Compare
Update Xilinx Qemu version based on 8.1.0 which is aligned with Xilinx v2024.2 (xilinx_v2024.2 tag) tools. Also at the same time enable riscv32/64 targets and remove compilation flags which are not longer available. --disable-vnc-png was removed in Xilinx 2023.1. --disable-blobs was removed in Xilinx 2024.1. --disable-sheepdog was removed in 2022.1. There is also a need to cover new dependencies including libtasn1, bison libcrypt and ninja. And also disabling meson when Qemu is configured and enable gcrypt to emulate crypto models. Signed-off-by: Michal Simek <[email protected]>
Wire AMD QEMU via qemu-system-xilinx-aarch64 in SDK The latest AMD QEMU version is not available in any official SDK. But you can build it yourself and add it to existing Zephyr SDK. Download the latest QEMU: git clone https://github.com/Xilinx/qemu Configure it (align your SDK location): mkdir test && cd test && \ ../qemu/configure --disable-docs --disable-sdl --disable-debug-info \ --disable-cap-ng --disable-libnfs --disable-libusb --disable-libiscsi \ --disable-usb-redir --disable-linux-aio --disable-guest-agent \ --disable-libssh --disable-seccomp --disable-tpm --disable-numa \ --disable-glusterfs --disable-virtfs --disable-xen --disable-curl \ --disable-attr --disable-curses --disable-iconv --disable-kvm \ --disable-parallels --disable-replication --disable-live-block-migration \ --target-list="aarch64-softmmu" --skip-meson \ --enable-gcrypt \ --prefix=XYZ/zephyr-sdk/zephyr-sdk-XYZ/sysroots/x86_64-pokysdk-linux/usr/xilinx/ There is an attempt to enable this configuration in official SDK zephyrproject-rtos/sdk-ng#859 Difference in flags is calling with additional "--enable-gcrypt" to properly model cryptographics devices. Zephyr is not using them but it is easier for keeping configuration in sync with official DTSes. The patch is adding versalnet_rpu-qemu.dts which is export from DTB got via https://github.com/Xilinx/qemu-devicetrees (file LATEST/SINGLE_ARCH/board-versal-net-psx-vn-p-b2197-00-x-prc-09.dtb) where only one change has been made in serial@0xf1920000 - chardev = "serial2"; + chardev = "con"; The reason for this change is that Zephyr scripts are referencing to chardev with name "con" as console. "-chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline" This is not a problem when you have system with only one serial but default AMD DTSes are describing multiple consoles that's why it is necessary to properly point to serial IP which is used as output device. The second important change is adding CMakeLists.txt which is describing building DTB out of ${BOARD}-qemu.dts to have full QEMU description in the tree in text format instead of dealing with binaries as is done for QEMU boards (./boards/qemu/cortex_a9/fdt-zynq7000s.dtb, ./boards/qemu/cortex_r5/fdt-single_arch-zcu102-arm.dtb). The biggest advantage is that small changes (like chardev above) can be easier review in text form and also anybody can do changes there. DT description is terrible because it is DTB export and a lot of things should be fixed (for example: node names) but there is no tool check against dt binding because there is no binding for QEMU models yet. That's why dtc is called with -q to suppress all the warnings coming from dts->dtb conversion. The main future is that west build -t run_qemu is wired which improves way how to test this system. Signed-off-by: Michal Simek <[email protected]> Message-ID: <ee3633ef012aaf09bd50d07610cf738c28f9df28.1739959112.git.michal.simek@amd.com> State: pending
Update Xilinx Qemu version based on 8.1.0 which is aligned with Xilinx v2024.2 (xilinx_v2024.2 tag) tools.
Also at the same time enable riscv32/64 targets and remove compilation flags which are not longer available.
--disable-vnc-png was removed in Xilinx 2023.1.
--disable-blobs was removed in Xilinx 2024.1.
--disable-sheepdog was removed in 2022.1.