Skip to content

Commit

Permalink
Makefile: Remove unnecessary kernel source compilation in the prepare…
Browse files Browse the repository at this point in the history
… phase.

for linux source header, make prepare always while cross compilation.

Signed-off-by: CFC4N <[email protected]>
  • Loading branch information
cfc4n committed Oct 9, 2024
1 parent e7bbc4c commit f46a391
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ help:

.PHONY: prepare
prepare:
if [ -d "/lib/modules/$(KERN_RELEASE)/build" ]; then \
$(CMD_CD) /lib/modules/$(KERN_RELEASE)/build && $(KERNEL_HEADER_GEN) || { echo "Kernel header generation failed"; exit 1; } \
fi
if [ -d "$(LINUX_SOURCE_PATH)" ]; then \
$(CMD_CD) $(LINUX_SOURCE_PATH) && $(KERNEL_HEADER_GEN) || { echo "Kernel header generation failed"; exit 1; } \
elif [ -n "$(CROSS_ARCH)" ]; then \
Expand Down
2 changes: 1 addition & 1 deletion variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ endif
# include vpath
#
ifdef CROSS_ARCH
KERNEL_HEADER_GEN = test -e arch/$(LINUX_ARCH)/kernel/asm-offsets.s || yes "" | $(SUDO) make ARCH=$(LINUX_ARCH) CROSS_COMPILE=$(CMD_CC_PREFIX) prepare V=0
KERNEL_HEADER_GEN = yes "" | $(SUDO) make ARCH=$(LINUX_ARCH) CROSS_COMPILE=$(CMD_CC_PREFIX) prepare V=0
ifdef KERN_HEADERS
LINUX_SOURCE_PATH = $(KERN_HEADERS)
else
Expand Down

0 comments on commit f46a391

Please sign in to comment.