-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (37 loc) · 1.46 KB
/
Makefile
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
CL_DIR=${CURDIR}/.cloudlab
TOOLS_SRC_DIR=${CURDIR}/setup/cloudlab-tools
.PHONY: all
all:
@echo "Setting up eBPF..."
cd ${CURDIR}/setup/cloudlab-tools/tools/ebpf && \
$(MAKE) && \
echo "eBPF setup complete"
include setup/cloudlab-tools/cloudlab_tools.mk
update-cl-tools:
@echo "Updating cloudlab tools..."
cd ${CURDIR}/setup/cloudlab-tools && git pull origin && cd ../.. && \
echo "Cloudlab tools updated"
update-headers:
@echo "Updating headers..."
cd ${CURDIR}/lib/bpf-headers && \
git clone https://github.com/libbpf/libbpf.git && \
rm -r bpf/* && \
cp -r libbpf/src/* bpf/ && \
cp -r libbpf/include/linux . && \
mkdir -p uapi && \
cp -r libbpf/include/uapi/linux uapi/ && \
rm -r libbpf && \
cd ${CURDIR} && \
git submodule update --remote --merge lib/bpf-headers && \
echo "Headers updated"
go-generate-exp:
@echo "Performing go generate for experiment ${EXPERIMENT}" && \
$(MAKE) cl-sync-code && \
$(MAKE) cl-run-cmd COMMAND="cd ${REMOTE_DIR}/${REMOTE_SUBDIR}/experiments/${EXPERIMENT} && source ~/.profile && go generate" && \
$(MAKE) cl-scp-from-host SCP_SRC="${REMOTE_DIR}/${REMOTE_SUBDIR}/experiments/${EXPERIMENT}/*{el,eb}.{go,o}" SCP_DEST="${CURDIR}/experiments/${EXPERIMENT}" && \
echo "Go generate complete"
update-vm-linux:
# execute this command on the cloudlab node
@echo "Updating vmlinux.h" && \
bpftool btf dump file /sys/kernel/btf/vmlinux format c > ${REMOTE_DIR}/${REMOTE_SUBDIR}/lib/vmlinux/vmlinux.h && \
echo "vmlinux.h updated"