-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 1.11 KB
/
Makefile
File metadata and controls
45 lines (37 loc) · 1.11 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
# force to use bash otherwise some built-in do not work
SHELL := /bin/bash
# Determine the number of processors
NUM_JOBS := $(shell nproc)
ARCH := $(shell uname -m)
.PHONY: config kbuild kmodule install
all: config kbuild install
config:
@echo "Entering configs folder..."
@if [ ! -f linux/.config ]; then \
echo "Copying config file..."; \
pushd configs && \
cp -av kernel_618-rc1_net-next-dev-GOB_enabled.config ../linux/.config && \
popd; \
pushd linux && \
make -j$(NUM_JOBS) olddefconfig && \
popd; \
else \
echo "Config file already exists. Skipping copy."; \
fi
kbuild:
@echo "Building kernel with $(NUM_JOBS) parallel jobs..."
cd linux && \
make -j$(NUM_JOBS)
install:
@echo "Entering the tests/vm folder..."
@if [ ! -f ../tests/vm/bzImage ]; then \
echo "Linking kernel bzImage in VM folder.."; \
pushd ../tests/vm && \
ln -sv ../../kernel/linux/arch/$(ARCH)/boot/bzImage . && \
popd; \
else \
echo "Kernel already soft-linked in VM folder. Skipping linking."; \
fi
#kmodule:
# @echo "Building out-of-tree kernel module with $(NUM_JOBS) parallel jobs..."
# cd modules && make all