summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 7 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index e5a3109..bfa02b7 100644
--- a/Makefile
+++ b/Makefile
@@ -94,6 +94,9 @@ $(SUBMODULES):
94install-submodules: cmd=install 94install-submodules: cmd=install
95install-submodules: $(SUBMODULES) 95install-submodules: $(SUBMODULES)
96 96
97rootfs = samizdat
98export rootfs
99
97.PHONY: rootfs 100.PHONY: rootfs
98rootfs: 101rootfs:
99 [ -e install-submodules-stamp ] || make install-submodules-stamp 102 [ -e install-submodules-stamp ] || make install-submodules-stamp
@@ -102,17 +105,11 @@ rootfs:
102 sudo mkdir -p /srv/nbd 105 sudo mkdir -p /srv/nbd
103 sudo ln -sf "$$PWD"/rootfs/$(rootfs).btrfs /srv/nbd/samizdat.btrfs 106 sudo ln -sf "$$PWD"/rootfs/$(rootfs).btrfs /srv/nbd/samizdat.btrfs
104 107
105rootfs = samizdat
106
107define get_kernel_version
108egrep '^ii linux-image-(amd64|686)' rootfs/_build/$(rootfs).pkgs.txt | \
109 (read _ pkg ver _; apt-cache show $$pkg=$$ver) | \
110 grep Depends | \
111 (read _ a; echo $${a#linux-image-})
112endef
113
114boot: rootfs 108boot: rootfs
115 sudo kernel_version=$$($(get_kernel_version)) qemu.sh 109 sudo SLOW_BOOT=y qemu.sh
110
111fastboot: rootfs
112 sudo qemu.sh
116 113
117reuse_child := $(shell 2>/dev/null read child < reused-child && echo --reuse_child=$$child; true) 114reuse_child := $(shell 2>/dev/null read child < reused-child && echo --reuse_child=$$child; true)
118 115