openwrt/feed/kmod-i2c-mux-pinctrl/Makefile
Lee Miller 0a0851250a
Make packages for kmod-i2c-mux-pinctrl and kmod-rtc-pcf85063 using sources
taken from linux-5.10.146 and include them into the image.
2023-05-11 05:55:23 +03:00

42 lines
1.0 KiB
Makefile

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=i2c-mux-pinctrl
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define KernelPackage/$(PKG_NAME)
SUBMENU:=I2C support
TITLE:=pinctrl-based I2C multiplexer
DEPENDS:=+kmod-i2c-mux
AUTOLOAD:=$(call AutoLoad,51,i2c-mux-pinctrl,1)
FILES:=$(PKG_BUILD_DIR)/i2c-mux-pinctrl.ko
KCONFIG:=
endef
define KernelPackage/$(PKG_NAME)/description
Kernel modules for GENERIC_PINCTRL I2C bus mux/switching devices
endef
EXTRA_KCONFIG:= \
CONFIG_I2C_MUX_PINCTRL=m
EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
endef
$(eval $(call KernelPackage,$(PKG_NAME)))