Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (37 loc) · 1.44 KB
/
Copy pathMakefile
File metadata and controls
50 lines (37 loc) · 1.44 KB
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
PACKAGE = pve-microvm
VERSION = 0.1.0
.PHONY: all build install clean deb kernel test
all: build
build:
@echo "Nothing to compile (kernel built separately via CI or kernel/build-kernel.sh)"
test:
tests/run-tests.sh
kernel:
cd kernel && ./build-kernel.sh --version 6.12.22 --output vmlinuz-microvm
install:
# Patches
install -d $(DESTDIR)/usr/share/pve-microvm/patches
install -m 644 debian/patches/*.patch $(DESTDIR)/usr/share/pve-microvm/patches/
# Patch tool and MicroVM module
install -d $(DESTDIR)/usr/share/pve-microvm
install -m 755 tools/pve-microvm-patch $(DESTDIR)/usr/share/pve-microvm/
install -m 644 tools/MicroVM.pm $(DESTDIR)/usr/share/pve-microvm/
install -m 644 doc/microvm-defaults.conf $(DESTDIR)/usr/share/pve-microvm/
# OCI import tool
install -d $(DESTDIR)/usr/bin
install -m 755 tools/pve-oci-import $(DESTDIR)/usr/bin/
# Kernel binary (if built)
if [ -f kernel/vmlinuz-microvm ]; then \
install -m 644 kernel/vmlinuz-microvm $(DESTDIR)/usr/share/pve-microvm/vmlinuz; \
fi
# Kernel build tooling
install -d $(DESTDIR)/usr/share/pve-microvm/kernel
install -m 755 kernel/build-kernel.sh $(DESTDIR)/usr/share/pve-microvm/kernel/
install -m 644 kernel/base-x86_64-6.1.config $(DESTDIR)/usr/share/pve-microvm/kernel/
install -m 644 kernel/pve-microvm-overlay.config $(DESTDIR)/usr/share/pve-microvm/kernel/
deb:
dpkg-buildpackage -us -uc -b
clean:
dh_clean 2>/dev/null || true
realclean:
rm -f kernel/vmlinuz-microvm