From 980dd3203b7f08dc4cf089409c68fc22dd31851f Mon Sep 17 00:00:00 2001 From: Jaymin Patel Date: Thu, 9 Nov 2023 16:01:15 +0530 Subject: [PATCH 1/2] [Issue-53]: add one wire device tree overlay Signed-off-by: Jaymin Patel --- onion-dt-overlay/Makefile | 10 ++++++++++ onion-dt-overlay/src/w1-gpio.dts | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 onion-dt-overlay/src/w1-gpio.dts diff --git a/onion-dt-overlay/Makefile b/onion-dt-overlay/Makefile index 22c2f94..10a602a 100644 --- a/onion-dt-overlay/Makefile +++ b/onion-dt-overlay/Makefile @@ -65,9 +65,19 @@ define BuildDtbo $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/$(1).dtbo $$(1)/lib/firmware/device-tree/overlays/$(1).dtbo endef + define Package/onion-dt-overlay-$(1)/postinst + #!/bin/sh + + if [ -z "$${IPKG_INSTROOT}" ]; then + mkdir -p /sys/kernel/config/device-tree/overlays/$(1) + cat /lib/firmware/device-tree/overlays/$(1).dtbo > /sys/kernel/config/device-tree/overlays/$(1)/dtbo + fi + endef + $$(eval $$(call BuildPackage,onion-dt-overlay-$(1))) endef $(eval $(call BuildPackage,onion-dt-overlay)) $(eval $(call BuildDtbo,sw-spi,,Provides SW SPI)) +$(eval $(call BuildDtbo,w1-gpio,+kmod-w1 +kmod-w1-master-gpio +kmod-w1-slave-therm,Provides One Wire GPIO)) diff --git a/onion-dt-overlay/src/w1-gpio.dts b/onion-dt-overlay/src/w1-gpio.dts new file mode 100644 index 0000000..c70f336 --- /dev/null +++ b/onion-dt-overlay/src/w1-gpio.dts @@ -0,0 +1,16 @@ +/dts-v1/; +/plugin/; + +/ { + fragment@0 { + target-path = "/"; + + __overlay__ { + onewire:onewire { + compatible = "w1-gpio"; + gpios = <&gpio 19 0>; + status = "okay"; + }; + }; + }; +}; From 24e807fba370cc771852f494dd0131ca498e290c Mon Sep 17 00:00:00 2001 From: Lazar Date: Thu, 9 Nov 2023 10:11:34 -0500 Subject: [PATCH 2/2] Upped omega2-base package release number --- omega2-base/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omega2-base/Makefile b/omega2-base/Makefile index 8fe9bc2..9233a1c 100644 --- a/omega2-base/Makefile +++ b/omega2-base/Makefile @@ -1,6 +1,6 @@ # Copyright (C) 2021 Onion Corporation # -# Author: Lazar Demin +# Author: Lazar Demin # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=omega2-base PKG_VERSION:=22.03.5 -PKG_RELEASE:=20231031 +PKG_RELEASE:=20231109 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)