-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
27 lines (22 loc) · 1.18 KB
/
Makefile
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
.PHONY : all
.PHONY : clean
CURDIR=$(shell pwd)
CPUS=$$(($(shell cat /sys/devices/system/cpu/present | awk -F- '{ print $$2 }')+1))
all: clean config kernel
config:
$(Q)mkdir $(CURDIR)/build
$(Q)$(MAKE) -C $(CURDIR)/linux O=$(CURDIR)/build CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm caninos_labrador_defconfig
menuconfig:
$(Q)$(MAKE) -C $(CURDIR)/linux O=$(CURDIR)/build CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm menuconfig
kernel:
$(Q)$(MAKE) -C $(CURDIR)/linux O=$(CURDIR)/build CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm dtbs
$(Q)$(MAKE) -C $(CURDIR)/linux O=$(CURDIR)/build CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm -j$(CPUS) uImage modules
$(Q)$(MAKE) -C $(CURDIR)/linux O=$(CURDIR)/build CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm -j$(CPUS) INSTALL_MOD_PATH=$(CURDIR)/build modules_install
$(Q)rm -rf $(CURDIR)/output
$(Q)mkdir $(CURDIR)/output
$(Q)mkdir $(CURDIR)/output/lib
$(Q)cp -rf $(CURDIR)/build/lib/modules $(CURDIR)/output/lib/; find $(CURDIR)/output/lib/ -type l -exec rm -f {} \;
$(Q)cp $(CURDIR)/build/arch/arm/boot/uImage $(CURDIR)/output/
$(Q)cp $(CURDIR)/build/arch/arm/boot/dts/caninos_labrador.dtb $(CURDIR)/output/kernel.dtb
clean:
$(Q)rm -rf build output