diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -94,6 +94,9 @@ $(SUBMODULES): | |||
94 | install-submodules: cmd=install | 94 | install-submodules: cmd=install |
95 | install-submodules: $(SUBMODULES) | 95 | install-submodules: $(SUBMODULES) |
96 | 96 | ||
97 | rootfs = samizdat | ||
98 | export rootfs | ||
99 | |||
97 | .PHONY: rootfs | 100 | .PHONY: rootfs |
98 | rootfs: | 101 | rootfs: |
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 | ||
105 | rootfs = samizdat | ||
106 | |||
107 | define get_kernel_version | ||
108 | egrep '^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-}) | ||
112 | endef | ||
113 | |||
114 | boot: rootfs | 108 | boot: rootfs |
115 | sudo kernel_version=$$($(get_kernel_version)) qemu.sh | 109 | sudo SLOW_BOOT=y qemu.sh |
110 | |||
111 | fastboot: rootfs | ||
112 | sudo qemu.sh | ||
116 | 113 | ||
117 | reuse_child := $(shell 2>/dev/null read child < reused-child && echo --reuse_child=$$child; true) | 114 | reuse_child := $(shell 2>/dev/null read child < reused-child && echo --reuse_child=$$child; true) |
118 | 115 | ||