-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·79 lines (68 loc) · 2.02 KB
/
build.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
#!/bin/bash
#
# Copyright (c) 2011, Joyent Inc., All rights reserved.
#
for dir in seabios vgabios kvm/test; do
cp roms/${dir}/config.mak.tmpl roms/${dir}/config.mak
done
PNGDIR="${PWD}/libpng-1.5.4"
PNGINC="${PNGDIR}/proto/usr/local/include"
PNGLIB="${PNGDIR}/proto/usr/local/lib"
if [[ ! -d ${PNGDIR} ]]; then
(curl -k https://download.joyent.com/pub/kvm-cmd/libpng-1.5.4.tar.gz | \
gtar -zxf -)
if [[ $? != "0" || ! -d ${PNGDIR} ]]; then
echo "Failed to get libpng."
rm -rf ${PNGDIR}
exit 1
fi
fi
if [[ ! -e ${PNGLIB}/libpng.a ]]; then
(cd ${PNGDIR} && \
LDFLAGS=-m64 CFLAGS=-m64 ./configure --disable-shared && \
make && \
mkdir -p ${PNGDIR}/proto && \
make DESTDIR=${PNGDIR}/proto install)
fi
# --kerneldir=$(cd `pwd`/../kvm; pwd) \
echo "==> Running configure"
# --enable-kvm-pit \
# --disable-kvm-device-assignment \
# --enable-trace-backend=dtrace \
# --target-list=x86_64-softmmu \
# --extra-cflags="-I${PNGDIR}/proto/usr/local/include -I/root/dev/kvm -DDEBUG_KVM -DDEBUG_IOPORT -DDEBUG_UNUSED_IOPORT -DDEBUG_IRQ" \
# --datadir=${SMARTOS}/share/qemu \
SMARTDC="/smartdc2"
#
# Make sure ctf utilities are in our path
#
KERNEL_SOURCE=$(pwd)/../../illumos
CTFBINDIR=$KERNEL_SOURCE/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386
export PATH=$PATH:$CTFBINDIR
./configure \
--extra-cflags="-I${PNGDIR}/proto/usr/local/include" \
--extra-ldflags="-L${PNGDIR}/proto/usr/local/lib -lz -lm -Wl,-R,${SMARTDC}/lib" \
--prefix=${SMARTDC} \
--audio-card-list=ac97 \
--audio-drv-list= \
--disable-bluez \
--disable-brlapi \
--disable-curl \
--enable-debug \
--enable-kvm \
--enable-vnc-png \
--disable-sdl \
--enable-vnc-jpeg \
--disable-vnc-sasl \
--disable-vnc-tls \
--enable-trace-backend=dtrace \
--enable-spice \
--disable-curses \
--target-list="x86_64-softmmu" \
--cpu=x86_64
if [[ $? != 0 ]]; then
echo "Failed to configure, bailing"
exit 1
fi
echo "==> Make"
gmake