Commit a923795d authored by aumgn's avatar aumgn
Browse files

[cleanup] Add bin dir

parent 522173d5
...@@ -18,7 +18,7 @@ install: submodules \ ...@@ -18,7 +18,7 @@ install: submodules \
.PHONY: submodules .PHONY: submodules
submodules: submodules:
git submodule update --init git submodule update --init --depth 10
make -Ctools/PinThreads make -Ctools/PinThreads
make -Csrc/mini-volrend make -Csrc/mini-volrend
make -Cbenchmarks/phoenix/phoenix-2.0 make -Cbenchmarks/phoenix/phoenix-2.0
......
#! /bin/bash
set -e
kernel=$1
ssh mc2 mkdir -p /tmp/kernel
scp -r ~/deploy/kernel/linux-*-$kernel*.deb mc2:/tmp/kernel
ssh root@mc2 <<EOF
pushd /tmp/kernel
dpkg -i --force-all linux-*-$kernel*.deb
popd
rm -rf /tmp/kernel
sed -i.\$(uname -r) "s/\$(uname -r)/$kernel/g" /boot/grub/grub.cfg
EOF
kareboot3 -m erods-mc-2
#! /bin/bash
image=ubuntu1604-x64-${1:-mc-2}
kernel=$2
set -e
kadeploy3 -m erods-mc-2 -e $image -k
ssh root@mc2 <<EOF
echo 'erods-mc-2' >/etc/hostname
# Replace this directory with a file or it
# would mess up installation of new kernels
rm -rf /etc/udev/rules.d/70-persistent-net.rules
touch /etc/udev/rules.d/70-persistent-net.rules
useradd ferreira -mU -s /bin/bash
echo "ferreira ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
mkdir -p ~ferreira/.ssh
cp ~/.ssh/authorized_keys ~ferreira/.ssh/authorized_keys
chmod go-rwx -R ~ferreira/.ssh
chown ferreira -R ~ferreira/.ssh
EOF
scp -r ~/.dotfiles mc2:~
scp -r ~/.ssh/known_hosts mc2:~/.ssh/
scp -r ~/.ssh/hosts mc2:~/.ssh/
scp -r ~/.ssh/keys mc2:~/.ssh/
ssh mc2 <<EOF
mkdir /tmp/kernel
cd ~/.dotfiles
stow base bash emacs git R shell ssh
cd ~/
source ~/.config/bash/rc
ssh-hosts gen
git clone erods:repo/bench.git ~/bench
cat <<SSHEOF >> ~/.bashrc
export AUMGN_PROMPT_HOST=mc2
source ~/.config/bash/rc
export BENCH_PATH=~/bench
PATH=\$BENCH_PATH/bin/mc-2:\$PATH
SSHEOF
echo 'source ~/.config/bash/profile' >> ~/.bash_profile
export BENCH_PATH=~/bench
PATH=\$BENCH_PATH/bin/mc-2:\$PATH
make -C\$BENCH_PATH
EOF
scp -r ~/files/tmp mc2:~/bench/
scp -r ~/deploy/mc2/ubuntu1604-x64-mc-2.qcow2 mc2:~/bench/tmp/
if [[ a$kernel == a ]]; then
exit 0
fi
# Install kernel
chkernel $kernel
CORES=$(nproc)
KERNEL_FLAVOR=${1:-tptracepoint}
KERNEL_STAMP=${2:-$(python -c 'import uuid; print(str(uuid.uuid1())[0:8])')}
cd $BENCH_PATH/src/linux
make-kpkg \
--rootcmd fakeroot \
--jobs $CORES \
--append-to-version -$KERNEL_FLAVOR-$KERNEL_STAMP \
--revision 2 \
--initrd kernel_image
#! /bin/bash
KERNEL_FLAVOR=${1:-tptracepoint}
KERNEL_STAMP=${2:-$(python -c 'import uuid; print(str(uuid.uuid1())[0:8])')}
pushd ~/linux
git reset --hard c7dd25cc70176e2
git pull
cpl $KERNEL_FLAVOR $KERNEL_STAMP
popd
sudo dpkg -i $BENCH_PATH/src/linux-image-4.9.9-$KERNEL_FLAVOR-$KERNEL_STAMP+_2_amd64.deb
vm 4.9.9-$KERNEL_FLAVOR-$KERNEL_STAMP+
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
set -e set -e
export BENCH_PATH=$HOME/bench
export TMPFS_PATH=$BENCH_PATH/tmpfs export TMPFS_PATH=$BENCH_PATH/tmpfs
export PERF_BASE_PREFIX="perf record -a -c 1 -e sched:sched_thread_placement" export PERF_BASE_PREFIX="perf record -a -c 1 -e sched:sched_thread_placement"
...@@ -135,7 +134,7 @@ dump_versions() { ...@@ -135,7 +134,7 @@ dump_versions() {
mkdir -p $version_dir mkdir -p $version_dir
git -C $BENCH_PATH rev-parse HEAD >>$version_dir/bench 2>/dev/null git -C $BENCH_PATH rev-parse HEAD >>$version_dir/bench 2>/dev/null
git submodule -C $BENCH_PATH >>$version_dir/submodules 2>/dev/null git -C $BENCH_PATH submodule >>$version_dir/submodules 2>/dev/null
} }
dump_args() { dump_args() {
......
#! /bin/bash
KERNEL_VERSION=${1:-4.9.9-040909-generic}
mode="-display none -daemonize"
# mode="-display curses"
sudo qemu-system-x86_64 \
-m "10G" \
-smp $(nproc) \
-enable-kvm \
-cpu host \
$mode \
-hda $BENCH_PATH/tmp/ubuntu1604-x64-mc-2.qcow2 \
-k fr \
-rtc base=localtime \
-net nic,model=virtio \
-net user,hostfwd=tcp::2222-:22 \
-virtfs local,path=$HOME,mount_tag=host,security_model=passthrough,id=host \
-kernel "/boot/vmlinuz-$KERNEL_VERSION" \
-initrd "/boot/initrd.img-$KERNEL_VERSION" \
-append "root=/dev/sda1 rw net.ifnames=0 intel_pstate=disable numa_balancing=disable"
ssh vm
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment