diff mbox series

[1/1] package/qemu: add symlink to target qemu-system

Message ID 20220511004007.3630-1-christian@paral.in
State Accepted
Headers show
Series [1/1] package/qemu: add symlink to target qemu-system | expand

Commit Message

Christian Stewart May 11, 2022, 12:40 a.m. UTC
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@paral.in>
---
 package/qemu/qemu.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Arnout Vandecappelle May 14, 2022, 9:46 a.m. UTC | #1
On 11/05/2022 02:40, Christian Stewart via buildroot wrote:
> 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@paral.in>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   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
diff mbox series

Patch

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