-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_wayland
executable file
·60 lines (45 loc) · 1.63 KB
/
run_wayland
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
#!/bin/sh
echo "$PATH" | grep -q '\.local' || ( echo "Please add $HOME/.local to your path" && exit 1 )
cwd=$PWD
url_md5sums="http://download.tizen.org/snapshots/tizen/common/latest/images/emulator32-wayland/common-emulator-wayland-mbr-i586/MD5SUMS"
md5sums="MD5SUMS"
if [ ! -f $md5sums ]; then
wget $url_md5sums
fi
kernel=`grep common-i386-emulator MD5SUMS | cut -c 35-`
rootfs_tgz=`grep common-emulator-wayland-mbr-i586.tar.gz MD5SUMS | cut -c 35-`
url_rootfs="http://download.tizen.org/snapshots/tizen/common/latest/images/emulator32-wayland/common-emulator-wayland-mbr-i586/$rootfs_tgz"
url_kernel="http://download.tizen.org/snapshots/tizen/common/latest/images/emulator32-wayland/common-emulator-wayland-mbr-i586/$kernel"
size=1G
rootfs="tizen-common.img"
swap="swap.x86"
cmdline='console=ttyS0 root=/dev/sda rw video=LVDS-1:1920x1080-32@60 ip=10.0.2.15::10.0.2.2:255.255.255.0::eth0:none'
cmdline="$cmdline vm_name=tizen sdb_port=26100"
serial="file://dev/stderr"
if [ ! -f $rootfs_tgz ]; then
wget $url_rootfs
fi
if [ ! -f $rootfs ]; then
tar xf $rootfs_tgz
fi
if [ ! -f $kernel ]; then
wget $url_kernel
fi
if [ ! -f $swap ]; then
qemu-img create -f raw $swap 1G
mkswap $swap
fi
qemu-system-i386 \
-M pc \
-m 1024 \
-drive file="$rootfs",if=virtio,index=1 \
-drive file="$swap",if=virtio,index=2 \
-boot c \
-append "$cmdline" \
-serial "$serial" \
-kernel "$kernel" \
-enable-kvm -smp 2 -vga none -display sdl -soundhw all \
-vigs-backend gl -yagl-backend vigs -enable-vigs -enable-yagl \
-usb -device usb-mouse -device usb-kbd \
-net nic -net user -redir tcp:22122::22 \
#eol