@@ -56,7 +56,8 @@ ifeq ($(filter $(KERNEL_VERSION),$(KERNEL_VERSIONS)),)
56
56
$(error "Kernel version $(KERNEL_VERSION) is not supported. Supported versions are $(KERNEL_VERSIONS)")
57
57
endif
58
58
59
- KERNEL_CONFIG =tools/kernel-configs/microvm-kernel-$(host_arch ) -$(KERNEL_VERSION ) .config
59
+ KERNEL_CONFIG_BASE =microvm-kernel-$(host_arch ) -$(KERNEL_VERSION ) .config
60
+ KERNEL_CONFIG =tools/kernel-configs/$(KERNEL_CONFIG_BASE )
60
61
# Copied from https://github.com/firecracker-microvm/firecracker/blob/v1.1.0/tools/devtool#L2082
61
62
# This allows us to specify a kernel without the patch version, but still get the correct build path to reference the kernel binary
62
63
KERNEL_FULL_VERSION =$(shell cat "$(KERNEL_CONFIG ) " | grep -Po "^\# Linux\/$(kernel_config_pattern ) (([0-9]+.) [0-9]+)" | cut -d ' ' -f 3)
@@ -345,8 +346,7 @@ $(FIRECRACKER_DIR)/Cargo.toml:
345
346
git submodule update --init --recursive $(FIRECRACKER_DIR )
346
347
347
348
$(FIRECRACKER_BIN ) : $(FIRECRACKER_DIR ) /Cargo.toml
348
- $(FIRECRACKER_DIR ) /tools/devtool -y build --release && \
349
- $(FIRECRACKER_DIR ) /tools/devtool -y strip
349
+ $(FIRECRACKER_DIR ) /tools/devtool -y build --release
350
350
cp $(FIRECRACKER_DIR ) /build/cargo_target/$(FIRECRACKER_TARGET ) /release/firecracker $@
351
351
352
352
.PHONY : firecracker-clean
@@ -359,7 +359,8 @@ firecracker-clean:
359
359
kernel : $(KERNEL_BIN )
360
360
361
361
$(KERNEL_BIN ) : $(KERNEL_CONFIG )
362
- $(FIRECRACKER_DIR ) /tools/devtool -y build_kernel --config $(KERNEL_CONFIG )
362
+ cp $(KERNEL_CONFIG ) $(FIRECRACKER_DIR )
363
+ $(FIRECRACKER_DIR ) /tools/devtool -y build_kernel --config $(FIRECRACKER_DIR ) /$(KERNEL_CONFIG_BASE )
363
364
364
365
.PHONY : install-kernel
365
366
install-kernel : $(KERNEL_BIN )
0 commit comments