-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathgenimages.sh
executable file
·60 lines (53 loc) · 1.93 KB
/
genimages.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
#!/bin/bash
set -x
IMAGES=$(pwd)/images
rm -rf $IMAGES
mkdir -p $IMAGES
# ========================================================================
# Generate Unikraft images
# ========================================================================
function build_for {
CONTAINER=uk-tmp-hello-pt
# kill zombies
docker container stop $CONTAINER
docker rm -f $CONTAINER
sleep 6
docker pull hlefeuvre/unikraft-eurosys21:latest
docker run --rm --privileged --name=$CONTAINER \
-dt hlefeuvre/unikraft-eurosys21
docker exec -it $CONTAINER bash -c \
"cd app-${1} && cp configs/${2}.conf .config"
docker exec -it $CONTAINER bash -c \
"cd app-${1} && make prepare && make -j"
# important for tracepoints -> dbg binaries
docker cp ${CONTAINER}:/root/workspace/apps/app-${1}/build/app-${1}_kvm-x86_64.dbg \
${IMAGES}/unikraft+${2}.kernel
docker container stop $CONTAINER
docker rm -f $CONTAINER
sleep 3
}
build_for helloworld-boottime-pt dyn
build_for helloworld stat
# 32MB measurement needs a hack
# this is temporary (the patch has not been merged yet)
CONTAINER=uk-tmp-hello-pt
# kill zombies
docker container stop $CONTAINER
docker rm -f $CONTAINER
sleep 6
docker pull hlefeuvre/unikraft-eurosys21:latest
docker run --rm --privileged --name=$CONTAINER \
-v $(pwd)/data/:/data \
-dt hlefeuvre/unikraft-eurosys21
docker exec -it $CONTAINER bash -c \
"cd app-helloworld-boottime-pt && cp configs/dyn.conf .config"
docker exec -it $CONTAINER bash -c \
"cd ../unikraft-ptsupport && git apply /data/0001-Patch-for-32MB-dynamic.patch"
docker exec -it $CONTAINER bash -c \
"cd app-helloworld-boottime-pt && make prepare && make -j"
# important for tracepoints -> dbg binaries
docker cp ${CONTAINER}:/root/workspace/apps/app-helloworld-boottime-pt/build/app-helloworld-boottime-pt_kvm-x86_64.dbg \
${IMAGES}/unikraft+dyn32.kernel
docker container stop $CONTAINER
docker rm -f $CONTAINER
sleep 3