[Buildroot] [git commit] package/qemu: add symlink to target qemu-system

Arnout Vandecappelle (Essensium/Mind) arnout at mind.be
Sat May 14 09:37:17 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=c6b9cd9a11fe7fec6bfec2ddbd42c2851dba0011
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Scripts which use the buildroot host system to execute a qemu for the compiled
buildroot output can use the symlink at host/bin/qemu-system to execute the
appropriate qemu-system for the target, for example qemu-system-riscv64.

Signed-off-by: Christian Stewart <christian at paral.in>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
---
 package/qemu/qemu.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 9c2b819174..1bcffc2340 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -400,6 +400,12 @@ define HOST_QEMU_INSTALL_CMDS
 	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install
 endef
 
+# install symlink to qemu-system
+define HOST_QEMU_POST_INSTALL_SYMLINK
+	ln -sf ./qemu-system-$(HOST_QEMU_ARCH) $(HOST_DIR)/bin/qemu-system
+endef
+HOST_QEMU_POST_INSTALL_HOOKS += HOST_QEMU_POST_INSTALL_SYMLINK
+
 $(eval $(host-generic-package))
 
 # variable used by other packages



More information about the buildroot mailing list