-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstorage.sh
More file actions
34 lines (31 loc) · 829 Bytes
/
storage.sh
File metadata and controls
34 lines (31 loc) · 829 Bytes
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
#!/bin/bash
set -e
pushd build
make -j8
popd
# We can't pass a symlink to the main VM, since we allow dynamic linker loading
# there, and TinyKVM refuses to use symlinks for security reasons.
# --rust:
# ./build/storagekvm guest/rust_storage/target/release/demo guest/rust_storage/storage
# --cpp
# ./build/storagekvm guest/storage/main guest/storage/storage
# Parse args
if [ "$1" = "--rust" ]; then
MAIN=guest/rust_storage/target/release/demo
SECONDARY=guest/rust_storage/storage
elif [ "$1" = "--cpp" ]; then
MAIN=guest/storage/main
SECONDARY=guest/storage/storage
else
echo "Usage: $0 [--rust|--cpp]"
exit 1
fi
# Verbose shell
set -x
# If second argument is --gdb, run under gdb
if [ "$2" = "--gdb" ]; then
gdb --args ./build/storagekvm $MAIN $SECONDARY
else
# Run normally
./build/storagekvm $MAIN $SECONDARY
fi