-
Notifications
You must be signed in to change notification settings - Fork 0
/
qemu.sh
executable file
·95 lines (65 loc) · 3.15 KB
/
qemu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#! /bin/sh
WORKSPACE=`pwd`
PREFIX=/opt/qemu/bin
# Other options: -vnc :1 == -vnc 127.0.0.1:1 vncviewer 127.0.0.1:5901
# A minimal one.
#$PREFIX/qemu-system-i386 -s -m 128 -kernel bzImage -hda rootfs.img -append "root=/dev/sda init=/sbin/init"
# Save the output information.
#$PREFIX/qemu-system-i386 -s -m 128 -kernel bzImage -hda rootfs.img -serial file:./linux-start.log -append "root=/dev/sda init=/sbin/init console=ttyS0"
# Start with NFS and output redirect to terminal.
#$PREFIX/qemu-system-i386 -s -m 128 -vnc :1 -kernel bzImage -hda fat:rw:/mnt -serial stdio \
# -append "root=/dev/nfs nfsroot=192.168.9.33:$WORKSPACE/rootfs rw \
# ip=192.168.9.88:192.168.9.33:192.168.9.33:255.255.255.0::eth0:auto \
# init=/sbin/init console=ttyS0" \
# -net nic,model=e1000,vlan=0,macaddr=00:cd:ef:00:02:01 \
# -net tap,vlan=0,ifname=tap0,script=$WORKSPACE/ifup-qemu
# Start with NFS normally, start log saved in "linux-start-normal.log".
#$PREFIX/qemu-system-i386 -s -m 128 -kernel bzImage -hda fat:rw:/mnt \
# -append "notsc clocksource=acpi_pm root=/dev/nfs nfsroot=192.168.9.33:$WORKSPACE/rootfs rw \
# ip=192.168.9.88:192.168.9.33:192.168.9.33:255.255.255.0::eth0:auto \
# init=/sbin/init console=ttyS0" \
# -net nic,model=e1000,vlan=0,macaddr=00:cd:ef:00:02:01 \
# -net tap,vlan=0,ifname=tap0,script=$WORKSPACE/ifup-qemu \
# -serial file:./linux-start.log
# pci-serial test.
#$PREFIX/qemu-system-i386 -s -m 128 -kernel bzImage -hda fat:rw:hda \
# -append "notsc clocksource=acpi_pm root=/dev/nfs nfsroot=192.168.9.33:$WORKSPACE/rootfs rw \
# ip=192.168.9.88:192.168.9.33:192.168.9.33:255.255.255.0::eth0:auto \
# init=/sbin/init" \
# -net nic,model=e1000,vlan=0,macaddr=00:cd:ef:00:02:01 \
# -net tap,vlan=0,ifname=tap0,script=$WORKSPACE/ifup-qemu \
# -chardev vc,id=PCIserial \
# -device pci-can,chardev=PCIserial \
$PREFIX/qemu-system-i386 -s -m 128 -kernel bzImage \
-append "notsc clocksource=acpi_pm root=/dev/nfs nfsroot=192.168.9.33:$WORKSPACE/rootfs rw \
ip=192.168.9.88:192.168.9.33:192.168.9.33:255.255.255.0::eth0:auto \
init=/sbin/init" \
-net nic,model=e1000,vlan=0,macaddr=00:cd:ef:00:02:01 \
-net tap,vlan=0,ifname=tap0,script=$WORKSPACE/ifup-qemu \
-serial none \
-chardev vc,id=UDPserial \
-device pci-serial,chardev=UDPserial \
-chardev can,id=sja1000,port=vcan0 \
-device pci-can,chardev=sja1000
# -chardev udp,id=UDPserial,host=localhost,port=3334 \
# -device pci-serial,chardev=UDPserial \
# -chardev vc,id=PCIserial \
# -device pci-serial,chardev=PCIserial \
# -chardev can,id=pci0,port=vcan0 \
# -device pci-can,chardev=pci0
# -serial none \
# -chardev can,id=PCIcan,port=vcan0 \
# -device pci-can,chardev=PCIcan
# -device pci-serial,chardev=PCIcan \
# Use QMP(QEMU Monitor Protocol).
# -qmp unix:/tmp/server.sock,server,nowait \
# For serial device.
# -chardev serial,id=isa0,path=none -serial vc:800x600 -serial stdio \
# -serial file:./linux-start.log \
# -device pci-serial,chardev=isa0
### ISA-Serial OK
# -chardev serial,id=isa0,path=/dev/ttyS0 \
# -device isa-serial,chardev=isa0,iobase=0x3f8,irq=4,index=0
# -device pci-serial
# -device isa-serial,iobase=IOADDR,irq=IRQ,index=IDX
# http://git.qemu.org/qemu.git hw/misc/pci-testdev.c