Mercurial > hg > Members > anatofuz > CbC_xv6
changeset 7:fa68a049532a
qemu-system-arm wrapper
author | tobaru |
---|---|
date | Fri, 26 Jan 2018 18:07:38 +0900 |
parents | 2617849843ec |
children | 90f9bf5e1580 |
files | qemu-system-arm |
diffstat | 1 files changed, 38 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qemu-system-arm Fri Jan 26 18:07:38 2018 +0900 @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Quick'n'dirty qemu-system-arm wrapper +# +# This is a temporary wrapper script to enable +# qemu-system-arm 0.12.3 to be managed by libvirt 0.7.6 +# (Fedora 13 Alpha). To use it: +# 1. mv /usr/bin/qemu-system-arm /usr/bin/qemu-system-arm.bin +# 2. save this script as /usr/bin/qemu-system-arm with +# appropriate permissions +# +# Chris Tyler 2010-03-11 +# + +LOGFILE=/dev/null +# LOGFILE=/tmp/aaa.log + +ARGS="$(echo "$*"| \ + sed -e "s/pci.[0-9]*/pci/g" \ + -e "s/bus=scsi[^,]*//g" \ + -e "s/-vga cirrus//g" \ + -e "s/if=none,/if=scsi,/g" \ + -e "s/-device scsi-disk[^ ]*//g" \ + -e "s/-device rtl[^ ]*mac=\([a-fA-F0-9:]*\)[^ ]*/-net nic,macaddr=\1,vlan=0,name=nic.0/g" \ + -e "s/-device [^ ]*//g" \ +)" + +echo "Date: $(date)" >>$LOGFILE +echo "Original args: $ARGS" >>$LOGFILE +echo "Edited args: $ARGS" >>$LOGFILE + +/bin/qemu-system-arm.bin $ARGS + +RESULT=$? +echo "Result code: $RESULT" >>$LOGFILE +# (echo "ID: ";id) >>/tmp/qemu.log + +exit $?