Finally figured out how to provide direct path to config
Honestly reading the code is the best docs
This commit is contained in:
parent
138abd5634
commit
13ddec78a4
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
13
Makefile
13
Makefile
|
|
@ -4,19 +4,12 @@ BUILD_DIR ?= $(MAKEFILE_DIR)build
|
|||
ARCH ?= x86
|
||||
KERNEL_FILE_NAME ?= bzImage
|
||||
|
||||
export BUILD_DIR
|
||||
export ARCH
|
||||
export KERNEL_FILE_NAME
|
||||
|
||||
KERNEL_PATH = $(BUILD_DIR)/arch/$(ARCH)/boot/$(bzImage)
|
||||
|
||||
all: $(KERNEL_PATH)
|
||||
|
||||
|
||||
$(KERNEL_PATH):
|
||||
@mkdir -p $(BUILD_DIR)/linux/kernel
|
||||
cp $(MAKEFILE_DIR)/linux/.config $(BUILD_DIR)/linux/kernel/.config
|
||||
$(MAKE) -C $(MAKEFILE_DIR)/linux/kernel O=$(BUILD_DIR)/linux/kernel
|
||||
|
||||
kernel:
|
||||
$(MAKE) -C $(MAKEFILE_DIR)/linux
|
||||
|
||||
|
||||
clean:
|
||||
|
|
|
|||
15
linux/Makefile
Normal file
15
linux/Makefile
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
BUILD_DIR ?= $(MAKEFILE_DIR)build
|
||||
ARCH ?= x86
|
||||
KERNEL_FILE_NAME ?= bzImage
|
||||
|
||||
KERNEL_PATH = $(BUILD_DIR)/arch/$(ARCH)/boot/$(bzImage)
|
||||
KERNEL_BUILD_DIR=$(BUILD_DIR)/linux/kernel
|
||||
|
||||
all: $(KERNEL_PATH)
|
||||
|
||||
|
||||
$(KERNEL_PATH):
|
||||
@mkdir -p $(KERNEL_BUILD_DIR)
|
||||
$(MAKE) -C $(MAKEFILE_DIR)/kernel O=$(KERNEL_BUILD_DIR) KCONFIG_CONFIG="$(MAKEFILE_DIR)/.config"
|
||||
Loading…
Reference in New Issue
Block a user