mirror of
https://github.com/LiBwrt-op/openwrt-6.x.git
synced 2025-12-17 01:06:35 +00:00
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
f9316a9b6b
@ -130,6 +130,33 @@ define Build/append-gl-metadata
|
||||
}
|
||||
endef
|
||||
|
||||
define Build/append-teltonika-metadata
|
||||
echo \
|
||||
'{$(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
|
||||
"metadata_version": "1.1", \
|
||||
"compat_version": "$(call json_quote,$(compat_version))", \
|
||||
"version":"$(call json_quote,$(VERSION_DIST))-$(call json_quote,$(VERSION_NUMBER))-$(call json_quote,$(REVISION))", \
|
||||
"device_code": [".*"], \
|
||||
"hwver": [".*"], \
|
||||
"batch": [".*"], \
|
||||
"serial": [".*"], \
|
||||
$(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \
|
||||
$(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \
|
||||
[$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma) \
|
||||
"supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \
|
||||
$(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma)) \
|
||||
"version_wrt": { \
|
||||
"dist": "$(call json_quote,$(VERSION_DIST))", \
|
||||
"version": "$(call json_quote,$(VERSION_NUMBER))", \
|
||||
"revision": "$(call json_quote,$(REVISION))", \
|
||||
"target": "$(call json_quote,$(TARGETID))", \
|
||||
"board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \
|
||||
}, \
|
||||
"hw_support": {}, \
|
||||
"hw_mods": {$(shell i=1; for mod in $(SUPPORTED_TELTONIKA_HW_MODS); do [ $$i -gt 1 ] && echo -n ,; echo -n "\"mod$$i\": \"$$mod\""; i=$$((i+1)); done)} \
|
||||
}' | fwtool -I - $@
|
||||
endef
|
||||
|
||||
define Build/append-rootfs
|
||||
dd if=$(IMAGE_ROOTFS) >> $@
|
||||
endef
|
||||
|
||||
@ -136,6 +136,10 @@ tplink,archer-ax80-v1)
|
||||
ubnt,unifi-6-plus)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
|
||||
;;
|
||||
teltonika,rutc50)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
xiaomi,mi-router-ax3000t|\
|
||||
xiaomi,mi-router-wr30u-stock|\
|
||||
xiaomi,redmi-router-ax6000-stock)
|
||||
|
||||
@ -6,9 +6,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
|
||||
PKG_SOURCE_DATE:=2025-08-12
|
||||
PKG_SOURCE_VERSION:=30b99fc9cc138e2775a0595cfd4dba43dff50ea8
|
||||
PKG_MIRROR_HASH:=de3fd5791077c1e91bbf9cf570925bcd2a7c0cf8168b754bf05649bff939ea7b
|
||||
PKG_SOURCE_DATE:=2025-08-25
|
||||
PKG_SOURCE_VERSION:=a510502e7922b0a61e455e43479a62e7d27cf3ba
|
||||
PKG_MIRROR_HASH:=0b8120ce09fdd9176e77b65f2c0866e14aa580ba7e6dd9440f37011418346be7
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -440,6 +440,22 @@ endef
|
||||
$(eval $(call KernelPackage,fs-netfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-nilfs2
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NILFS2 filesystem support
|
||||
KCONFIG:=CONFIG_NILFS2_FS
|
||||
FILES:=$(LINUX_DIR)/fs/nilfs2/nilfs2.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,nilfs2)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nilfs2/description
|
||||
Kernel module for NILFS2 filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nilfs2))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS filesystem client support
|
||||
|
||||
204
package/utils/nilfs-utils/Makefile
Normal file
204
package/utils/nilfs-utils/Makefile
Normal file
@ -0,0 +1,204 @@
|
||||
#
|
||||
# Copyright (C) 2025 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nilfs-utils
|
||||
PKG_VERSION:=2.2.11
|
||||
PKG_RELEASE:=1
|
||||
PKG_URL:=https://nilfs.sourceforge.io
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://nilfs.sourceforge.io/download/
|
||||
PKG_HASH:=8602897ff0d2c49be9bc76311f0b102088e58b6de4f749009403de06ff2c34cd
|
||||
|
||||
PKG_MAINTAINER:=Pavlo Samko <bulldozerbsg@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:nilf:nilfs
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/nilfs-mkfs
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=create a NILFS2 filesystem
|
||||
DEPENDS:=+libuuid +libblkid
|
||||
endef
|
||||
|
||||
define Package/nilfs-cleanerd
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=NILFS2 garbage collector daemon
|
||||
DEPENDS:=+libuuid @KERNEL_POSIX_MQUEUE
|
||||
endef
|
||||
|
||||
define Package/nilfs-mount
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=mount, unmount a NILFS2 file system
|
||||
DEPENDS:=+libmount +libblkid +nilfs-cleanerd
|
||||
endef
|
||||
|
||||
define Package/libnilfs
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=libnilfs
|
||||
endef
|
||||
|
||||
define Package/libnilfsgc
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=libnilfsgc
|
||||
DEPENDS:=+libnilfs
|
||||
endef
|
||||
|
||||
define Package/libnilfscleaner
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=libnilfscleaner
|
||||
DEPENDS:=+libuuid +nilfs-cleanerd @KERNEL_POSIX_MQUEUE
|
||||
endef
|
||||
|
||||
define Package/nilfs-clean
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=run garbage collector on NILFS file system
|
||||
DEPENDS:=+libnilfs +libnilfscleaner
|
||||
endef
|
||||
|
||||
define Package/nilfs-resize
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=resize NILFS file system volume size
|
||||
DEPENDS:=+libnilfs +libnilfsgc
|
||||
endef
|
||||
|
||||
define Package/nilfs-tune
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=adjust tunable file system parameters on NILFS file system
|
||||
DEPENDS:=+libnilfs
|
||||
endef
|
||||
|
||||
define Package/nilfs-checkpoint
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=make, change, remove, list a NILFS2 checkpoint
|
||||
DEPENDS:=+libnilfs
|
||||
endef
|
||||
|
||||
define Package/nilfs-dumpseg
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=print segment information of NILFS2
|
||||
DEPENDS:=+libnilfs
|
||||
endef
|
||||
|
||||
define Package/nilfs-lssu
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=list usage state of NILFS2 segments
|
||||
DEPENDS:=+libnilfs +libnilfsgc
|
||||
endef
|
||||
|
||||
# libmount is used and support of the selinux context mount options
|
||||
# depends on the libmount that distro provides.
|
||||
CONFIGURE_ARGS += \
|
||||
--without-selinux
|
||||
|
||||
define Package/nilfs-mkfs/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.nilfs2 $(1)/sbin/
|
||||
endef
|
||||
|
||||
define Package/nilfs-cleanerd/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/nilfs_cleanerd.conf $(1)/etc/
|
||||
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/sbin/nilfs_cleanerd $(1)/sbin/
|
||||
endef
|
||||
|
||||
define Package/nilfs-mount/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/sbin/mount.nilfs2 $(1)/sbin/
|
||||
$(CP) $(PKG_INSTALL_DIR)/sbin/umount.nilfs2 $(1)/sbin/
|
||||
endef
|
||||
|
||||
define Package/libnilfs/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnilfs.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libnilfsgc/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnilfsgc.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libnilfscleaner/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnilfscleaner.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/nilfs-clean/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nilfs-clean $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/nilfs-resize/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nilfs-resize $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/nilfs-tune/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nilfs-tune $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/nilfs-checkpoint/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/chcp $(1)/usr/bin/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/lscp $(1)/usr/bin/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/mkcp $(1)/usr/bin/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rmcp $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/nilfs-dumpseg/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/dumpseg $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/nilfs-lssu/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/lssu $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,nilfs-mkfs))
|
||||
$(eval $(call BuildPackage,nilfs-cleanerd))
|
||||
$(eval $(call BuildPackage,nilfs-mount))
|
||||
$(eval $(call BuildPackage,libnilfs))
|
||||
$(eval $(call BuildPackage,libnilfsgc))
|
||||
$(eval $(call BuildPackage,libnilfscleaner))
|
||||
$(eval $(call BuildPackage,nilfs-clean))
|
||||
$(eval $(call BuildPackage,nilfs-resize))
|
||||
$(eval $(call BuildPackage,nilfs-tune))
|
||||
$(eval $(call BuildPackage,nilfs-checkpoint))
|
||||
$(eval $(call BuildPackage,nilfs-dumpseg))
|
||||
$(eval $(call BuildPackage,nilfs-lssu))
|
||||
@ -40,12 +40,6 @@
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "green:wlan2g";
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
wlan5g {
|
||||
label = "green:wlan5g";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
@ -159,6 +153,16 @@
|
||||
label = "art";
|
||||
reg = <0xff0000 0x010000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cal_art_1000: calibration@1000 {
|
||||
reg = <0x1000 0x440>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -207,5 +211,11 @@
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
qca,no-eeprom;
|
||||
nvmem-cells = <&cal_art_1000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
|
||||
led {
|
||||
led-sources = <12>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
|
||||
@ -21,12 +21,6 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
wlan2g {
|
||||
label = "green:wlan2g";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
wlan5g {
|
||||
label = "green:wlan5g";
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
@ -48,16 +42,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
leds-ath9k {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
wlan5g-ath {
|
||||
label = "green:wlan5g-ath";
|
||||
gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
@ -225,14 +209,17 @@
|
||||
&pcie {
|
||||
status = "okay";
|
||||
|
||||
ath9k: wifi@0,0 {
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,0030";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&calibration_art_5000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
ieee80211-freq-limit = <4900000 5990000>;
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
|
||||
led {
|
||||
led-sources = <0>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -241,6 +228,11 @@
|
||||
|
||||
nvmem-cells = <&calibration_art_1000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
|
||||
led {
|
||||
led-sources = <13>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
|
||||
&usb {
|
||||
|
||||
@ -41,12 +41,6 @@
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "blue:wlan2g";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
wps {
|
||||
function = LED_FUNCTION_WPS;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
@ -65,15 +59,19 @@
|
||||
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
leds-ath9k {
|
||||
compatible = "gpio-leds";
|
||||
&ath9k {
|
||||
led {
|
||||
led-sources = <0>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
|
||||
wlan5g {
|
||||
label = "blue:wlan5g";
|
||||
gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
&wmac {
|
||||
led {
|
||||
led-sources = <13>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -65,8 +65,6 @@
|
||||
nvmem-cell-names = "mac-address", "calibration";
|
||||
*/
|
||||
qca,no-eeprom; /* remove this when "mac-address" works */
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -38,12 +38,6 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
wlan2g {
|
||||
label = "green:2g";
|
||||
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
usb {
|
||||
function = LED_FUNCTION_USB;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
@ -68,16 +62,6 @@
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
ath9k-leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
wlan {
|
||||
label = "green:5g";
|
||||
gpios = <&ath9k 6 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ref {
|
||||
@ -170,8 +154,11 @@
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&macaddr_addr_0 0x10>, <&calibration_art_5000>;
|
||||
nvmem-cell-names = "mac-address", "calibration";
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
|
||||
led {
|
||||
led-sources = <6>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -188,6 +175,10 @@
|
||||
|
||||
nvmem-cells = <&macaddr_addr_0 0>, <&calibration_art_1000>;
|
||||
nvmem-cell-names = "mac-address", "calibration";
|
||||
|
||||
led {
|
||||
led-sources = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
|
||||
@ -147,11 +147,6 @@
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,003c";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
|
||||
@ -196,7 +196,7 @@
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,003c";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&cal_art_5000>, <&macaddr_romfile_f100 2>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
|
||||
@ -197,7 +197,7 @@
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,0050";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
|
||||
@ -35,12 +35,6 @@
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "green:wlan2g";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
notification {
|
||||
label = "amber:notification";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||
@ -148,6 +142,10 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cal_art_1000: calibration@1000 {
|
||||
reg = <0x1000 0x440>;
|
||||
};
|
||||
|
||||
cal_art_5000: calibration@5000 {
|
||||
reg = <0x5000 0x844>;
|
||||
};
|
||||
@ -181,7 +179,7 @@
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,003c";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&cal_art_5000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
@ -199,5 +197,11 @@
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
qca,no-eeprom;
|
||||
nvmem-cells = <&cal_art_1000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
|
||||
led {
|
||||
led-sources = <22>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
|
||||
@ -265,7 +265,7 @@
|
||||
status = "okay";
|
||||
|
||||
ath10k: wifi@0,0 {
|
||||
compatible = "pci168c,003c";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
@ -328,7 +328,7 @@
|
||||
status = "okay";
|
||||
|
||||
wifi: wifi@0,0 {
|
||||
compatible = "pci168c,003c";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&cal_art_5000>, <&macaddr_config_12>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
|
||||
@ -51,7 +51,6 @@
|
||||
};
|
||||
|
||||
&wifi {
|
||||
compatible = "pci168c,0046";
|
||||
nvmem-cells = <&precal_art_5000>, <&macaddr_config_12>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
};
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
model = "TRENDNET TEW-823DRU";
|
||||
|
||||
aliases {
|
||||
label-mac-device = ð1;
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_green;
|
||||
led-running = &led_power_green;
|
||||
@ -64,6 +65,13 @@
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0 0 0 0 0>;
|
||||
nvmem-cells = <&maccaddr_mac_wan 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
@ -133,6 +141,24 @@
|
||||
label = "mac";
|
||||
reg = <0xfe0000 0x010000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
maccaddr_mac_lan: macaddr@4 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x4 0x11>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
maccaddr_mac_wan: macaddr@18 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x18 0x11>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@ff0000 {
|
||||
@ -172,6 +198,9 @@
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&maccaddr_mac_lan 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
phy-handle = <&phy0>;
|
||||
pll-data = <0x56000000 0x00000101 0x00001616>;
|
||||
|
||||
@ -184,6 +213,9 @@
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&maccaddr_mac_wan 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
pll-data = <0x03000101 0x00000101 0x00001616>;
|
||||
|
||||
fixed-link {
|
||||
@ -195,6 +227,6 @@
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&cal_art_1000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
nvmem-cells = <&cal_art_1000>, <&maccaddr_mac_lan 0>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
};
|
||||
|
||||
@ -170,7 +170,7 @@
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,0056";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&precal_art_5000>, <&macaddr_art_0 1>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,0056";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&precal_art_5000>;
|
||||
nvmem-cell-names = "pre-calibration";
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,0056";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&precal_art_5000>;
|
||||
nvmem-cell-names = "pre-calibration";
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,0046";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_info_8 (-1)>, <&precal_art_5000>;
|
||||
|
||||
@ -847,11 +847,6 @@ ath79_setup_macs()
|
||||
base_mac=$(mtd_get_mac_binary info 0x8)
|
||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||
;;
|
||||
trendnet,tew-823dru)
|
||||
lan_mac=$(mtd_get_mac_text mac 0x4)
|
||||
wan_mac=$(mtd_get_mac_text mac 0x18)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-m|\
|
||||
ubnt,unifi)
|
||||
|
||||
@ -45,10 +45,6 @@ case "$FIRMWARE" in
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR1)
|
||||
;;
|
||||
iodata,wn-ac1167dgr|\
|
||||
iodata,wn-ac1600dgr|\
|
||||
iodata,wn-ac1600dgr2|\
|
||||
iodata,wn-ag300dgr|\
|
||||
sitecom,wlr-7100|\
|
||||
sitecom,wlr-8100)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
|
||||
@ -73,18 +73,23 @@ case "$board" in
|
||||
;;
|
||||
iodata,wn-ac1167dgr|\
|
||||
iodata,wn-ac1600dgr|\
|
||||
iodata,wn-ac1600dgr2|\
|
||||
sitecom,wlr-7100|\
|
||||
sitecom,wlr-8100)
|
||||
iodata,wn-ac1600dgr2)
|
||||
# There is no eeprom data for 5 GHz wlan in "art" partition
|
||||
# which would allow to patch the macaddress
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 0 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
iodata,wn-ag300dgr)
|
||||
# There is no eeprom data for 5 GHz wlan in "art" partition
|
||||
# which would allow to patch the macaddress
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" $PHYNBR > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
sitecom,wlr-7100|\
|
||||
sitecom,wlr-8100)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
nec,wf1200cr|\
|
||||
@ -112,14 +117,6 @@ case "$board" in
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
macaddr_add $base_mac 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
trendnet,tew-823dru)
|
||||
# set the 2.4G interface mac address to LAN MAC
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_text mac 4 > /sys${DEVPATH}/macaddress
|
||||
# set the 5G interface mac address to WAN MAC + 1
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add "$(mtd_get_mac_text mac 0x18)" 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zyxel,nwa1123-ac)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress
|
||||
|
||||
@ -13,6 +13,7 @@ DEVICE_VARS += ELECOM_HWID
|
||||
DEVICE_VARS += MOXA_MAGIC MOXA_HWID
|
||||
DEVICE_VARS += OPENMESH_CE_TYPE ZYXEL_MODEL_STRING
|
||||
DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES
|
||||
DEVICE_VARS += SUPPORTED_TELTONIKA_HW_MODS
|
||||
|
||||
define Build/addpattern
|
||||
-$(STAGING_DIR_HOST)/bin/addpattern -B $(ADDPATTERN_ID) \
|
||||
@ -153,35 +154,6 @@ define Build/teltonika-v1-header
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
metadata_json_teltonika = \
|
||||
'{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
|
||||
"metadata_version": "1.1", \
|
||||
"compat_version": "$(call json_quote,$(compat_version))", \
|
||||
"version":"$(call json_quote,$(VERSION_DIST))-$(call json_quote,$(VERSION_NUMBER))-$(call json_quote,$(REVISION))", \
|
||||
"device_code": [".*"], \
|
||||
"hwver": [".*"], \
|
||||
"batch": [".*"], \
|
||||
"serial": [".*"], \
|
||||
$(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \
|
||||
$(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \
|
||||
[$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma) \
|
||||
"supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \
|
||||
$(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma)) \
|
||||
"version_wrt": { \
|
||||
"dist": "$(call json_quote,$(VERSION_DIST))", \
|
||||
"version": "$(call json_quote,$(VERSION_NUMBER))", \
|
||||
"revision": "$(call json_quote,$(REVISION))", \
|
||||
"target": "$(call json_quote,$(TARGETID))", \
|
||||
"board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \
|
||||
}, \
|
||||
"hw_support": {}, \
|
||||
"hw_mods": {} \
|
||||
}'
|
||||
|
||||
define Build/append-metadata-teltonika
|
||||
echo $(call metadata_json_teltonika) | fwtool -I - $@
|
||||
endef
|
||||
|
||||
define Build/wrgg-pad-rootfs
|
||||
$(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
|
||||
endef
|
||||
@ -3158,7 +3130,7 @@ define Device/teltonika_rut300
|
||||
IMAGE_SIZE := 15552k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs | append-metadata-teltonika | \
|
||||
append-rootfs | pad-rootfs | append-teltonika-metadata | \
|
||||
check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs | append-metadata | \
|
||||
|
||||
@ -476,7 +476,7 @@
|
||||
|
||||
&pcie_bridge0 {
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||
nvmem-cells = <&precal_art_9000>, <&macaddr_config_0 3>;
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
|
||||
DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
|
||||
DEVICE_VARS += WRGG_DEVNAME WRGG_SIGNATURE
|
||||
DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES
|
||||
DEVICE_VARS += SUPPORTED_TELTONIKA_HW_MODS
|
||||
|
||||
define Build/netgear-fit-padding
|
||||
./netgear-fit-padding.py $@ $@.new
|
||||
@ -52,17 +54,6 @@ define Build/append-rootfshdr
|
||||
dd if=$@.new bs=64 count=1 >> $@.$1
|
||||
endef
|
||||
|
||||
define Build/append-rutx-metadata
|
||||
echo \
|
||||
'{ \
|
||||
"device_code": [".*"], \
|
||||
"hwver": [".*"], \
|
||||
"batch": [".*"], \
|
||||
"serial": [".*"], \
|
||||
"supported_devices":["teltonika,rutx"] \
|
||||
}' | fwtool -I - $@
|
||||
endef
|
||||
|
||||
define Build/copy-file
|
||||
cat "$(1)" > "$@"
|
||||
endef
|
||||
@ -1122,13 +1113,15 @@ define Device/teltonika_rutx10
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Teltonika
|
||||
DEVICE_MODEL := RUTX10
|
||||
SUPPORTED_TELTONIKA_DEVICES := teltonika,rutx
|
||||
SUPPORTED_TELTONIKA_HW_MODS := W25N02KV NAND_GD5F2GXX EG060K RUTX_V12
|
||||
SOC := qcom-ipq4018
|
||||
DEVICE_DTS_CONFIG := config@5
|
||||
KERNEL_INSTALL := 1
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-rutx-metadata
|
||||
IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-teltonika-metadata
|
||||
DEVICE_PACKAGES := kmod-btusb
|
||||
endef
|
||||
# Missing DSA Setup
|
||||
|
||||
@ -316,7 +316,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_defaultmac_8 (-1)>, <&precal_radio_1000>;
|
||||
@ -336,7 +336,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_defaultmac_8 0>, <&precal_radio_5000>;
|
||||
|
||||
@ -212,7 +212,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_6 1>, <&precal_art_1000>;
|
||||
@ -235,7 +235,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_6 2>, <&precal_art_5000>;
|
||||
|
||||
@ -329,7 +329,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_appsbl_7ff80 8>;
|
||||
@ -350,7 +350,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_appsbl_7ff80 16>;
|
||||
|
||||
@ -215,7 +215,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_6 1>, <&precal_art_1000>;
|
||||
@ -238,7 +238,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_6 2>, <&precal_art_5000>;
|
||||
|
||||
@ -344,7 +344,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_defaultmac_0 (-1)>, <&precal_ART_1000>;
|
||||
@ -364,7 +364,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_defaultmac_0 0>, <&precal_ART_5000>;
|
||||
|
||||
@ -466,7 +466,7 @@ switch@10 {
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_PRODUCTDATA_12>, <&precal_ART_1000>;
|
||||
@ -486,7 +486,7 @@ switch@10 {
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_PRODUCTDATA_c>, <&precal_ART_5000>;
|
||||
|
||||
@ -527,7 +527,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_ART_1e>, <&precal_ART_1000>;
|
||||
@ -547,7 +547,7 @@
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_ART_18>, <&precal_ART_5000>;
|
||||
|
||||
@ -516,7 +516,7 @@
|
||||
ranges;
|
||||
|
||||
wifi0: wifi@1,0 {
|
||||
compatible = "pci168c,0046";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
@ -534,7 +534,7 @@
|
||||
ranges;
|
||||
|
||||
wifi1: wifi@1,0 {
|
||||
compatible = "pci168c,0046";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -569,7 +569,7 @@
|
||||
ranges;
|
||||
|
||||
wifi0: wifi@1,0 {
|
||||
compatible = "pci168c,0046";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&precal_ART_1000>;
|
||||
@ -592,7 +592,7 @@
|
||||
ranges;
|
||||
|
||||
wifi1: wifi@1,0 {
|
||||
compatible = "pci168c,0046";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&precal_ART_5000>;
|
||||
|
||||
@ -457,7 +457,7 @@
|
||||
ranges;
|
||||
|
||||
wifi0: wifi@1,0 {
|
||||
compatible = "pci168c,0046";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&precal_ART_1000>, <&macaddr_fw_env_12>;
|
||||
@ -480,7 +480,7 @@
|
||||
ranges;
|
||||
|
||||
wifi1: wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&precal_ART_5000>, <&macaddr_fw_env_c>;
|
||||
|
||||
535
target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts
Normal file
535
target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts
Normal file
@ -0,0 +1,535 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "mt7981b.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Teltonika RUTC50";
|
||||
compatible = "teltonika,rutc50", "mediatek,mt7981";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
label-mac-device = &gmac0;
|
||||
led-boot = &power;
|
||||
led-failsafe = &power;
|
||||
led-running = &power;
|
||||
led-upgrade = &power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory@40000000 {
|
||||
reg = <0 0x40000000 0 0x10000000>;
|
||||
device_type = "memory";
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&pio 6 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
|
||||
gpio_pcie_reset {
|
||||
gpio-export,name = "pcie_reset";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&pio 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
gpio_modem_power {
|
||||
gpio-export,name = "modem_power";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
gpio_modem_reset {
|
||||
gpio-export,name = "modem_reset";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&pio 10 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
gpio_modem_status {
|
||||
gpio-export,name = "modem_status";
|
||||
gpio-export,input = <0>;
|
||||
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
gpio_digital_input {
|
||||
gpio-export,name = "digital_input";
|
||||
gpio-export,input = <0>;
|
||||
gpios = <&pio 12 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
gpio_digital_output {
|
||||
gpio-export,name = "digital_output";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&pio 35 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
power: power {
|
||||
function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&pio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan_eth {
|
||||
function = "wan-eth";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wan_wifi {
|
||||
function = "wan-wifi";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&pio 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wan_sim1 {
|
||||
function = "wan-sim1";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio_hc595 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wan_sim2 {
|
||||
function = "wan-sim2";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio_hc595 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wifi_2g {
|
||||
function = LED_FUNCTION_WLAN_2GHZ;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&pio 14 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
wifi_5g {
|
||||
function = LED_FUNCTION_WLAN_5GHZ;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&pio 5 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
3G {
|
||||
function = "3G";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio_hc595 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
4G {
|
||||
function = "4G";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio_hc595 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
5G {
|
||||
function = "5G";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio_hc595 4 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
rssi1 {
|
||||
function = "rssi-1";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio_hc595 3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
rssi2 {
|
||||
function = "rssi-2";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio_hc595 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
rssi3 {
|
||||
function = "rssi-3";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio_hc595 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
watchdog {
|
||||
compatible = "linux,wdt-gpio";
|
||||
gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
|
||||
hw_algo = "toggle";
|
||||
hw_margin_ms = <1000>;
|
||||
};
|
||||
};
|
||||
|
||||
ð {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gbe_led0_pins>, <&gbe_led1_pins>;
|
||||
status = "okay";
|
||||
|
||||
gmac0: mac@0 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <0>;
|
||||
phy-mode = "2500base-x";
|
||||
nvmem-cells = <&macaddr_config_0 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
gmac1: mac@1 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <1>;
|
||||
label = "wan";
|
||||
phy-mode = "gmii";
|
||||
phy-handle = <&int_gbe_phy>;
|
||||
nvmem-cells = <&macaddr_config_0 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
&int_gbe_phy_led0{
|
||||
function = LED_FUNCTION_WAN;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&int_gbe_phy_led1{
|
||||
function = LED_FUNCTION_WAN;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio_bus {
|
||||
switch: switch@1f {
|
||||
compatible = "mediatek,mt7531";
|
||||
reg = <31>;
|
||||
reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
phy-handle = <&swphy0>;
|
||||
label = "lan4";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
phy-handle = <&swphy1>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
phy-handle = <&swphy2>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
phy-handle = <&swphy3>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
label = "cpu";
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
swphy0: phy@0 {
|
||||
reg = <0>;
|
||||
|
||||
mediatek,led-config = <
|
||||
0x21 0x8009 /* BASIC_CTRL */
|
||||
0x22 0x0c00 /* ON_DURATION */
|
||||
0x23 0x1400 /* BLINK_DURATION */
|
||||
0x24 0xc001 /* LED0_ON_CTRL */
|
||||
0x25 0x0003 /* LED0_BLINK_CTRL */
|
||||
0x26 0xc006 /* LED1_ON_CTRL */
|
||||
0x27 0x003c /* LED1_BLINK_CTRL */
|
||||
>;
|
||||
};
|
||||
|
||||
swphy1: phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
swphy2: phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
swphy3: phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_flash_pins>;
|
||||
status = "okay";
|
||||
|
||||
spi_nand@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "spi-nand";
|
||||
reg = <0>;
|
||||
|
||||
spi-max-frequency = <52000000>;
|
||||
spi-tx-buswidth = <4>;
|
||||
spi-rx-buswidth = <4>;
|
||||
|
||||
mediatek,nmbm;
|
||||
mediatek,bmt-max-ratio = <1>;
|
||||
mediatek,bmt-max-reserved-blocks = <64>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "rutos-a";
|
||||
reg = <0x00000000 0x10000000>;
|
||||
};
|
||||
|
||||
partition@10000000 {
|
||||
label = "rutos-b";
|
||||
reg = <0x10000000 0x10000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spic_pins>;
|
||||
status = "okay";
|
||||
|
||||
gpio_hc595: gpio_hc595@0 {
|
||||
compatible = "fairchild,74hc595";
|
||||
reg = <0>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
registers-number = <1>;
|
||||
spi-max-frequency = <10000000>;
|
||||
enable-gpios = <&pio 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi2_flash_pins>;
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
|
||||
spi-max-frequency = <4000000>;
|
||||
spi-tx-buswidth = <4>;
|
||||
spi-rx-buswidth = <4>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@00000 {
|
||||
label = "bl2";
|
||||
reg = <0x00000 0x0040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x0010000>;
|
||||
};
|
||||
|
||||
factory: partition@50000 {
|
||||
label = "factory";
|
||||
reg = <0x50000 0x00A0000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_factory_0: eeprom@0 {
|
||||
reg = <0x0 0x1000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config: partition@f0000 {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
label = "config";
|
||||
reg = <0xF0000 0x0010000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_config_0: macaddr@0 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x0 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot: partition@100000 {
|
||||
label = "fip";
|
||||
reg = <0x100000 0x0100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@200000 {
|
||||
label = "bootconfig-a";
|
||||
reg = <0x200000 0x010000>;
|
||||
};
|
||||
|
||||
partition@210000 {
|
||||
label = "bootconfig-b";
|
||||
reg = <0x210000 0x010000>;
|
||||
};
|
||||
|
||||
partition@220000 {
|
||||
label = "event-log";
|
||||
reg = <0x220000 0x090000>;
|
||||
};
|
||||
|
||||
partition@2B0000 {
|
||||
label = "recovery";
|
||||
reg = <0x2B0000 0xD50000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
spi0_flash_pins: spi0-pins {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi0", "spi0_wp_hold";
|
||||
};
|
||||
|
||||
conf-pu {
|
||||
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
drive-strength = <MTK_DRIVE_4mA>;
|
||||
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
|
||||
conf-pd {
|
||||
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
drive-strength = <MTK_DRIVE_4mA>;
|
||||
bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
};
|
||||
|
||||
spic_pins: spi1-pins {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi1_1";
|
||||
};
|
||||
};
|
||||
|
||||
spi2_flash_pins: spi2-pins {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi2", "spi2_wp_hold";
|
||||
};
|
||||
|
||||
conf-pu {
|
||||
pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
|
||||
conf-pd {
|
||||
pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&xhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wifi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
status = "okay";
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
|
||||
band@0 {
|
||||
reg = <0>;
|
||||
nvmem-cells = <&macaddr_config_0 2>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
band@1 {
|
||||
reg = <1>;
|
||||
nvmem-cells = <&macaddr_config_0 3>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
@ -207,6 +207,10 @@ smartrg,sdg-8733a)
|
||||
ucidef_set_led_netdev "wan-orange" "WAN" "mdio-bus:08:orange:wan" "wan" "link_100 link_1000"
|
||||
ucidef_set_led_netdev "wan-white" "WAN" "mdio-bus:08:white:wan" "wan" "link_10000"
|
||||
;;
|
||||
teltonika,rutc50)
|
||||
ucidef_set_led_netdev "wan-green" "WAN" "mdio-bus:00:green:wan" "wan" "link_1000 tx rx"
|
||||
ucidef_set_led_netdev "wan-amber" "WAN" "mdio-bus:00:amber:wan" "wan" "link_100 link_10 tx rx"
|
||||
;;
|
||||
tplink,fr365-v1)
|
||||
ucidef_set_led_netdev "port2-green-act" "port-2" "green:port2_act" "port2" "link tx rx"
|
||||
ucidef_set_led_netdev "port1-green-act" "port-1" "green:sfp" "port1" "link tx rx"
|
||||
|
||||
@ -8,6 +8,10 @@ case "$board" in
|
||||
huasifei,wh3000-pro)
|
||||
ucidef_add_gpio_switch "modem_power" "Modem power" "modem_power" "0"
|
||||
;;
|
||||
teltonika,rutc50)
|
||||
ucidef_add_gpio_switch "modem_power" "Modem power button" "modem_power" "1"
|
||||
ucidef_add_gpio_switch "modem_reset" "Modem reset" "modem_reset" "0"
|
||||
;;
|
||||
zbtlink,zbt-z8102ax|\
|
||||
zbtlink,zbt-z8102ax-v2)
|
||||
ucidef_add_gpio_switch "5g1" "Power 1st modem" "5g1" "1"
|
||||
|
||||
@ -23,6 +23,28 @@ boot() {
|
||||
EOF
|
||||
logger "bootcount: rd23 model detected, nvram was updated"
|
||||
;;
|
||||
teltonika,rutc50)
|
||||
#Bootloader expect successfull startup value after update, we need to write success value to bootconfig partition
|
||||
#otherwise bootloader will fallback to previous root partition
|
||||
. /lib/functions.sh
|
||||
local PART="$(cmdline_get_var ubi.mtd)"
|
||||
local MTD_INDEX=$(find_mtd_index bootconfig-a)
|
||||
|
||||
case "$PART" in
|
||||
rutos-a)
|
||||
[ "$(md5sum /dev/mtd$MTD_INDEX | awk '{print $1}')" = "adc4a78e76efc6b4afdc41925e4017c6" ] || {
|
||||
logger -t "bootcount" "saving new failsafe boot config in /dev/mtd$MTD_INDEX bootconfig-a partition rutos-a"
|
||||
echo -ne "\xe1\xb0\xba\xba\x01\x00\xf9\x01\xf8\x01\xf0\x00\x3d\xd4\xfb\x95" | mtd -e bootconfig-a write - bootconfig-a
|
||||
}
|
||||
;;
|
||||
rutos-b)
|
||||
[ "$(md5sum /dev/mtd$MTD_INDEX | awk '{print $1}')" = "2904b3476604ef153d1925acdde062e8" ] || {
|
||||
logger -t "bootcount" "saving new failsafe boot config in /dev/mtd$MTD_INDEX bootconfig-a partition rutos-b"
|
||||
echo -ne "\xe1\xb0\xba\xba\x01\x01\xf7\x01\xf8\x00\xf0\x00\xce\xd4\x44\x08" | mtd -e bootconfig-a write - bootconfig-a
|
||||
}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
zyxel,ex5700-telenor)
|
||||
fw_setenv uboot_bootcount 0
|
||||
;;
|
||||
|
||||
@ -182,6 +182,10 @@ platform_do_upgrade() {
|
||||
CI_ROOTPART="rootfs"
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
teltonika,rutc50)
|
||||
CI_UBIPART="$(cmdline_get_var ubi.mtd)"
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
nradio,c8-668gl)
|
||||
CI_DATAPART="rootfs_data"
|
||||
CI_KERNPART="kernel_2nd"
|
||||
|
||||
@ -2,7 +2,7 @@ ARCH:=aarch64
|
||||
SUBTARGET:=filogic
|
||||
BOARDNAME:=Filogic 8x0 (MT798x)
|
||||
CPU_TYPE:=cortex-a53
|
||||
DEFAULT_PACKAGES += fitblk kmod-phy-aquantia kmod-crypto-hw-safexcel wpad-openssl uboot-envtools bridger
|
||||
DEFAULT_PACKAGES += fitblk kmod-crypto-hw-safexcel wpad-openssl uboot-envtools bridger
|
||||
KERNELNAME:=Image dtbs
|
||||
DEFAULT_PROFILE:=openwrt_one
|
||||
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
DTS_DIR := $(DTS_DIR)/mediatek
|
||||
DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES
|
||||
DEVICE_VARS += SUPPORTED_TELTONIKA_HW_MODS
|
||||
|
||||
define Image/Prepare
|
||||
# For UBI we want only one extra block
|
||||
@ -1116,7 +1118,7 @@ define Device/gatonetworks_gdsp
|
||||
DEVICE_PACKAGES := e2fsprogs f2fsck mkf2fs fitblk \
|
||||
kmod-mt7915e kmod-mt7981-firmware \
|
||||
kmod-usb-net-qmi-wwan kmod-usb-serial-option kmod-usb3 \
|
||||
mt7981-wo-firmware -kmod-phy-aquantia automount
|
||||
mt7981-wo-firmware automount
|
||||
ARTIFACTS := preloader.bin bl31-uboot.fip sdcard.img.gz
|
||||
ARTIFACT/preloader.bin := mt7981-bl2 nor-ddr3
|
||||
ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot gatonetworks_gdsp
|
||||
@ -1641,7 +1643,7 @@ define Device/mediatek_mt7988a-rfb
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/
|
||||
DEVICE_DTC_FLAGS := --pad 4096
|
||||
DEVICE_DTS_LOADADDR := 0x45f00000
|
||||
DEVICE_PACKAGES := mt7988-2p5g-phy-firmware kmod-sfp
|
||||
DEVICE_PACKAGES := mt7988-2p5g-phy-firmware kmod-sfp kmod-phy-aquantia
|
||||
KERNEL_LOADADDR := 0x46000000
|
||||
KERNEL := kernel-bin | gzip
|
||||
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
||||
@ -2059,6 +2061,24 @@ define Device/snr_snr-cpe-ax2
|
||||
endef
|
||||
TARGET_DEVICES += snr_snr-cpe-ax2
|
||||
|
||||
define Device/teltonika_rutc50
|
||||
DEVICE_VENDOR := Teltonika
|
||||
DEVICE_MODEL := RUTC50
|
||||
SUPPORTED_TELTONIKA_DEVICES := teltonika,rutc
|
||||
DEVICE_DTS := mt7981a-teltonika-rutc50
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_IN_UBI := 1
|
||||
UBINIZE_OPTS := -E 5
|
||||
DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 kmod-usb-net-qmi-wwan \
|
||||
kmod-usb-serial-option kmod-gpio-nxp-74hc164
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-ubi | append-teltonika-metadata
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += teltonika_rutc50
|
||||
|
||||
define Device/tenbay_wr3000k
|
||||
DEVICE_VENDOR := Tenbay
|
||||
DEVICE_MODEL := WR3000K
|
||||
|
||||
@ -121,7 +121,9 @@
|
||||
};
|
||||
|
||||
macaddr_factory_1fdfa: macaddr@1fdfa {
|
||||
compatible = "mac-base";
|
||||
reg = <0x1fdfa 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
macaddr_factory_1fdf4: macaddr@1fdf4 {
|
||||
@ -180,7 +182,7 @@
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_factory_1fdfa>;
|
||||
nvmem-cells = <&macaddr_factory_1fdfa 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
@ -208,6 +210,21 @@
|
||||
nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
|
||||
nvmem-cell-names = "eeprom", "precal";
|
||||
mediatek,disable-radar-background;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
band@0 {
|
||||
reg = <0>;
|
||||
nvmem-cells = <&macaddr_factory_1fdfa 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
band@1 {
|
||||
reg = <1>;
|
||||
nvmem-cells = <&macaddr_factory_1fdfa 2>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
include ./common-tp-link.mk
|
||||
|
||||
DEFAULT_SOC := mt7628an
|
||||
DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES
|
||||
DEVICE_VARS += SUPPORTED_TELTONIKA_HW_MODS
|
||||
|
||||
define Build/creality_wb-01-factory
|
||||
mv $@ $(dir $@)factory.bin
|
||||
@ -42,25 +44,6 @@ define Build/ravpower-wd009-factory
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/append-teltonika-metadata
|
||||
$(eval model_id=$(word 1,$(1)))
|
||||
$(eval hw_mods=$(subst $(space),$(comma),$(wordlist 2,$(words $(1)),$(1))))
|
||||
|
||||
echo \
|
||||
'{ \
|
||||
"metadata_version": "1.1", \
|
||||
"compat_version": "1.0", \
|
||||
"version": "OpenWrt", \
|
||||
"device_code": [".*"], \
|
||||
"hwver": [".*"], \
|
||||
"batch": [".*"], \
|
||||
"serial": [".*"], \
|
||||
"supported_devices":["teltonika,$(model_id)"], \
|
||||
"hw_support": { }, \
|
||||
"hw_mods": { $(hw_mods) } \
|
||||
}' | fwtool -I - $@
|
||||
endef
|
||||
|
||||
define Device/7links_wlr-12xx
|
||||
IMAGE_SIZE := 7872k
|
||||
DEVICE_VENDOR := 7Links
|
||||
@ -710,6 +693,8 @@ define Device/teltonika_rut9x1
|
||||
DEVICE_MODEL := RUT951
|
||||
DEVICE_ALT0_VENDOR := Teltonika
|
||||
DEVICE_ALT0_MODEL := RUT901
|
||||
SUPPORTED_TELTONIKA_DEVICES := teltonika,rut9m
|
||||
SUPPORTED_TELTONIKA_HW_MODS := 2c7c_6005 TLA2021 CH343 esim ala440
|
||||
IMAGE_SIZE := 15424k
|
||||
BLOCKSIZE := 64k
|
||||
DEVICE_PACKAGES := uqmi kmod-mt76x2 kmod-usb2 kmod-usb-ohci \
|
||||
@ -717,8 +702,7 @@ define Device/teltonika_rut9x1
|
||||
kmod-i2c-mt7628 kmod-usb-net-cdc-ether
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs | check-size | append-teltonika-metadata rut9m \
|
||||
"mod1":"2c7c_6005" "mod2":"TLA2021" "mod3":"CH343" "mod4":"esim" "mod5":"ala440"
|
||||
append-rootfs | pad-rootfs | check-size | append-teltonika-metadata
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += teltonika_rut9x1
|
||||
@ -728,6 +712,8 @@ define Device/teltonika_rut9x6
|
||||
DEVICE_MODEL := RUT956
|
||||
DEVICE_ALT0_VENDOR := Teltonika
|
||||
DEVICE_ALT0_MODEL := RUT906
|
||||
SUPPORTED_TELTONIKA_DEVICES := teltonika,rut9m
|
||||
SUPPORTED_TELTONIKA_HW_MODS := 2c7c_6005 TLA2021 CH343 esim ala440
|
||||
IMAGE_SIZE := 15424k
|
||||
BLOCKSIZE := 64k
|
||||
DEVICE_PACKAGES := uqmi kmod-mt76x2 kmod-usb2 kmod-usb-ohci \
|
||||
@ -735,8 +721,7 @@ define Device/teltonika_rut9x6
|
||||
kmod-hwmon-mcp3021 kmod-scsi-core kmod-usb-storage kmod-usb-acm kmod-usb-net-cdc-ether
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs | check-size | append-teltonika-metadata rut9m \
|
||||
"mod1":"2c7c_6005" "mod2":"TLA2021" "mod3":"CH343" "mod4":"esim" "mod5":"ala440"
|
||||
append-rootfs | pad-rootfs | check-size | append-teltonika-metadata
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += teltonika_rut9x6
|
||||
@ -1421,11 +1406,12 @@ define Device/teltonika_rut200
|
||||
DEVICE_VENDOR := Teltonika
|
||||
DEVICE_MODEL := RUT200
|
||||
DEVICE_VARIANT := v1-v4
|
||||
SUPPORTED_TELTONIKA_DEVICES := teltonika,rut2m
|
||||
IMAGE_SIZE := 15424k
|
||||
BLOCKSIZE := 64k
|
||||
DEVICE_PACKAGES +=kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-usb-serial-option kmod-usb-net-cdc-ether
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-teltonika-metadata rut2m
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-teltonika-metadata
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += teltonika_rut200
|
||||
@ -1434,11 +1420,12 @@ define Device/teltonika_rut241
|
||||
DEVICE_VENDOR := Teltonika
|
||||
DEVICE_MODEL := RUT241
|
||||
DEVICE_VARIANT := v1-v4
|
||||
SUPPORTED_TELTONIKA_DEVICES := teltonika,rut2m
|
||||
IMAGE_SIZE := 15424k
|
||||
BLOCKSIZE := 64k
|
||||
DEVICE_PACKAGES += uqmi kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-usb-serial-option
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-teltonika-metadata rut2m
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-teltonika-metadata
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += teltonika_rut241
|
||||
|
||||
@ -248,9 +248,4 @@ case "$board" in
|
||||
[ "$PHYNBR" = "0" ] && macaddr_setbit_la "$hw_mac_addr" > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && echo -n "$hw_mac_addr" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zyxel,wsm20)
|
||||
hw_mac_addr="$(mtd_get_mac_binary Factory 0x1fdfa)"
|
||||
[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mold
|
||||
PKG_VERSION:=2.40.1
|
||||
PKG_VERSION:=2.40.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/rui314/mold/archive/refs/tags
|
||||
PKG_HASH:=d1ce09a69941f8158604c3edcc96c7178231e7dba2da66b20f5ef6e112c443b7
|
||||
PKG_HASH:=69414c702ec1084e1fa8ca16da24f167f549e5e11e9ecd5d70a8dcda6f08c249
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
Loading…
Reference in New Issue
Block a user