When building modules, define make variable OPT_FDT if the kernel config
includes the FDT option. Use OPT_FDT to conditionally compile modules that require FDT support. In the past we've gotten away with using the arch name as a proxy for FDT support in makefile conditional logic, but now mips has some platforms with fdt support and some without and we need a more direct test.
This commit is contained in:
parent
6351b3857b
commit
99819ca00c
@ -150,3 +150,11 @@ MK_${var}_SUPPORT:= yes
|
||||
.endif
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
# Some modules only compile successfully if option FDT is set, due to #ifdef FDT
|
||||
# wrapped around declarations. Module makefiles can optionally compile such
|
||||
# things using .if !empty(OPT_FDT)
|
||||
.if !defined(OPT_FDT) && defined(KERNBUILDDIR)
|
||||
OPT_FDT!= sed -n '/FDT/p' ${KERNBUILDDIR}/opt_platform.h
|
||||
.export OPT_FDT
|
||||
.endif
|
||||
|
@ -25,6 +25,10 @@
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
SUBDIR = gpiobus gpioiic gpioled gpiopps gpiospi
|
||||
SUBDIR = gpiobus gpioiic gpioled gpiospi
|
||||
|
||||
.if !empty(OPT_FDT)
|
||||
SUBDIR += gpiopps
|
||||
.endif
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user