-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathKbuild
83 lines (72 loc) · 2.5 KB
/
Kbuild
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
ifeq ($(SOC_FAMILY),)
$(error SOC_FAMILY missing)
else
$(info Building for SoC $(SOC_FAMILY))
endif
ifeq ($(KERNEL_VERSION),)
$(error KERNEL_VERSION missing)
else
$(info Building for Kernel $(KERNEL_VERSION))
endif
ccflags-y := -DRELEASE -DUSER_BIT_32 -DKERNEL_BIT_32 -Wno-date-time -D_GNU_SOURCE
ccflags-y += -I$(src)/$(KERNEL_VERSION)/isp/$(SOC_FAMILY)/include
#### ALL #####
$(info Building ISP for Kernel $(KERNEL_VERSION))
include $(src)/$(KERNEL_VERSION)/isp/Kbuild
ifeq ($(KERNEL_VERSION),3.10)
$(info Building GPIO-UserKeys for Kernel $(KERNEL_VERSION))
include $(src)/$(KERNEL_VERSION)/misc/gpio-userkeys/Kbuild
endif
ifeq ($(KERNEL_VERSION),3.10)
$(info Building PWM for Kernel $(KERNEL_VERSION))
include $(src)/$(KERNEL_VERSION)/misc/pwm/Kbuild
endif
ifeq ($(BR2_THINGINO_MOTORS),y)
$(info Building Motor for Kernel $(KERNEL_VERSION))
include $(src)/$(KERNEL_VERSION)/misc/motor/Kbuild
ifeq ($(BR2_THINGINO_MOTORS_SPI),y)
ifeq ($(KERNEL_VERSION),3.10)
$(info Building Motor SPI for Kernel $(KERNEL_VERSION))
include $(src)/$(KERNEL_VERSION)/misc/ms419xx/Kbuild
endif
endif
endif
#### PLATFORM ####
# Check if building for SOC T23, which overrides other conditions
ifeq ($(CONFIG_SOC_T23),y)
$(info Building Audio for SOC T23 using oss)
include $(src)/$(KERNEL_VERSION)/audio/$(SOC_FAMILY)/oss3/Kbuild
# Handle other kernel versions and SOC configurations
else
# Check for kernel version 3.10
ifeq ($(KERNEL_VERSION),3.10)
$(info Building Audio for Kernel $(KERNEL_VERSION) using oss2)
include $(src)/$(KERNEL_VERSION)/audio/$(SOC_FAMILY)/oss2/Kbuild
else
# Default to oss3 for any other kernel version
$(info Building Audio for Kernel $(KERNEL_VERSION) using oss3)
include $(src)/$(KERNEL_VERSION)/audio/$(SOC_FAMILY)/oss3/Kbuild
endif
endif
ifeq ($(CONFIG_SOC_T31)$(CONFIG_SOC_T40)$(CONFIG_SOC_T41),y)
$(info Building AVPU for Kernel $(KERNEL_VERSION))
ifeq ($(CONFIG_SOC_T31),y)
include $(src)/$(KERNEL_VERSION)/avpu/t31/Kbuild
endif
ifeq ($(CONFIG_SOC_T40)$(CONFIG_SOC_T41),y)
include $(src)/$(KERNEL_VERSION)/avpu/t40/Kbuild
endif
endif
ifeq ($(CONFIG_SOC_T40)$(CONFIG_SOC_T41),y)
include $(src)/$(KERNEL_VERSION)/misc/mpsys-driver/Kbuild
include $(src)/$(KERNEL_VERSION)/misc/soc-nna/Kbuild
include $(src)/$(KERNEL_VERSION)/misc/jz-dtrng/Kbuild
endif
#### SENSORS ####
ifeq ($(SENSOR_MODEL),)
$(warning SENSOR_MODEL missing)
else
$(info Building for sensor $(SENSOR_MODEL))
include $(src)/$(KERNEL_VERSION)/sensor-src/Kbuild
endif
#include $(src)/sinfo/Kbuild