[OpenWrt-Devel] how to add/package kernel module?
John Crispin
john at phrozen.org
Mon Jul 30 02:24:14 EDT 2018
On 27/07/18 17:26, Torbjorn Jansson wrote:
> Hello.
>
> Probably over a year ago i built a rasperry pi and made a custom build
> of openwrt and added a small patch for myself to make module for htu21
> temp and humidity sensor available.
>
> the patch i made i'm not sure if it is correct or not and even if it
> still works with all the changes that has been done but it would be
> nice to have the kernel module (kmod-iio-htu21) built and available as
> an option preferably in some future release.
>
> i use the htu21 kernel module with a small shell script to push the
> data out to an mqtt server for further handling.
> there is probably more iio modules that could be useful to others but
> for now i'm happy if i can make a new version of openwrt with the
> kernel module added and preferably also get it included so i don't
> need a custom build.
>
>
> below is my old patch.
>
Patch looks ok at first glance, but there are a few formal errors, the
Signed-off-by is missing and the patch headline needs to be prefixed and
a proper description needs to be written ->
https://openwrt.org/submitting-patches
John
>
> diff --git a/package/kernel/linux/modules/other.mk
> b/package/kernel/linux/modules/other.mk
> index 38b98f3..3770510 100644
> --- a/package/kernel/linux/modules/other.mk
> +++ b/package/kernel/linux/modules/other.mk
> @@ -329,6 +329,29 @@ endef
> $(eval $(call KernelPackage,iio-dht11))
>
>
> +define KernelPackage/iio-htu21
> + SUBMENU:=$(OTHER_MENU)
> + DEPENDS:=kmod-i2c-core kmod-iio-core
> + TITLE:=Measurement Specialties HTU21 humidity & temperature sensor
> + KCONFIG:= \
> + CONFIG_HTU21 \
> + CONFIG_IIO_MS_SENSORS_I2C
> + FILES:= \
> + $(LINUX_DIR)/drivers/iio/humidity/htu21.ko \
> + $(LINUX_DIR)/drivers/iio/common/ms_sensors/ms_sensors_i2c.ko
> + AUTOLOAD:=$(call AutoLoad,56,htu21)
> +endef
> +
> +define KernelPackage/iio-htu21/description
> + support for the Measurement Specialties HTU21 humidity and
> + temperature sensor.
> + This driver is also used for MS8607 temperature, pressure & humidity
> + sensor
> +endef
> +
> +$(eval $(call KernelPackage,iio-htu21))
> +
> +
> define KernelPackage/lp
> SUBMENU:=$(OTHER_MENU)
> TITLE:=Parallel port and line printer support
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list