From 9a296c1588ef7f29ffc528194f36874d0483896a Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 9 Mar 2022 10:42:04 +0100 Subject: [PATCH 1/4] Replace mnfinfo binary by a bash script --- config-rutx | 1 - root/package/utils/mnfinfo/Makefile | 58 --------- root/package/utils/mnfinfo/src/Makefile | 35 ------ root/package/utils/mnfinfo/src/README.md | 25 ---- root/package/utils/mnfinfo/src/libmnfinfo.so | Bin 13488 -> 0 bytes root/package/utils/mnfinfo/src/mnf_info | Bin 15516 -> 0 bytes root/package/utils/mnfinfo/src/mnfinfo.so | Bin 8864 -> 0 bytes .../utils/mnfinfo/src/src/include/mnfinfo.h | 115 ------------------ .../utils/mnfinfo/src/src/include/rut2.h | 21 ---- .../utils/mnfinfo/src/src/include/rut3.h | 21 ---- .../utils/mnfinfo/src/src/include/rutx.h | 21 ---- .../utils/mnfinfo/src/src/include/trb1.h | 17 --- .../utils/mnfinfo/src/src/include/trb2.h | 21 ---- .../utils/mnfinfo/src/src/libmnfinfo.o | Bin 5376 -> 0 bytes root/package/utils/mnfinfo/src/src/mnf_info.o | Bin 6468 -> 0 bytes root/package/utils/mnfinfo/src/src/mnf_rpc.o | Bin 2976 -> 0 bytes .../linux/ipq40xx/base-files/sbin/mnf_info | 10 ++ 17 files changed, 10 insertions(+), 335 deletions(-) delete mode 100644 root/package/utils/mnfinfo/Makefile delete mode 100644 root/package/utils/mnfinfo/src/Makefile delete mode 100644 root/package/utils/mnfinfo/src/README.md delete mode 100755 root/package/utils/mnfinfo/src/libmnfinfo.so delete mode 100755 root/package/utils/mnfinfo/src/mnf_info delete mode 100755 root/package/utils/mnfinfo/src/mnfinfo.so delete mode 100644 root/package/utils/mnfinfo/src/src/include/mnfinfo.h delete mode 100644 root/package/utils/mnfinfo/src/src/include/rut2.h delete mode 100644 root/package/utils/mnfinfo/src/src/include/rut3.h delete mode 100644 root/package/utils/mnfinfo/src/src/include/rutx.h delete mode 100644 root/package/utils/mnfinfo/src/src/include/trb1.h delete mode 100644 root/package/utils/mnfinfo/src/src/include/trb2.h delete mode 100644 root/package/utils/mnfinfo/src/src/libmnfinfo.o delete mode 100644 root/package/utils/mnfinfo/src/src/mnf_info.o delete mode 100644 root/package/utils/mnfinfo/src/src/mnf_rpc.o create mode 100755 root/target/linux/ipq40xx/base-files/sbin/mnf_info diff --git a/config-rutx b/config-rutx index b2907bc2..b881ed1e 100644 --- a/config-rutx +++ b/config-rutx @@ -15,4 +15,3 @@ CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=64 CONFIG_KERNEL_SWAP=y CONFIG_PREINITOPT=y CONFIG_PACKAGE_kmod-r2ec=y -CONFIG_PACKAGE_mnfinfo=y diff --git a/root/package/utils/mnfinfo/Makefile b/root/package/utils/mnfinfo/Makefile deleted file mode 100644 index e5e300d3..00000000 --- a/root/package/utils/mnfinfo/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2020 Teltonika -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/download.mk - -PKG_NAME:=mnfinfo -PKG_VERSION:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/mnfinfo - SECTION:=net - CATEGORY:=Network - TITLE:=Device mnf-info command line interface - DEPENDS:=+libpthread +libmnfinfo -endef - -define Package/libmnfinfo - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Device mnf-info API library -endef - -define Package/rpcd-mod-mnfinfo - SECTION:=libs - CATEGORY:=Libraries - TITLE:=mnfinfo rpcd module - DEPENDS:=+rpcd +libmnfinfo -endef - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include/libmnfinfo - $(CP) $(PKG_BUILD_DIR)/*.so $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/src/include/*.h $(STAGING_DIR)/usr/include/libmnfinfo/ -endef - -define Package/mnfinfo/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mnf_info $(1)/sbin/mnf_info -endef - -define Package/libmnfinfo/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/libmnfinfo.so $(1)/usr/lib/ -endef - -define Package/rpcd-mod-mnfinfo/install - $(INSTALL_DIR) $(1)/usr/lib/rpcd - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mnfinfo.so $(1)/usr/lib/rpcd/ -endef - -$(eval $(call BuildPackage,mnfinfo)) -$(eval $(call BuildPackage,libmnfinfo)) -$(eval $(call BuildPackage,rpcd-mod-mnfinfo)) diff --git a/root/package/utils/mnfinfo/src/Makefile b/root/package/utils/mnfinfo/src/Makefile deleted file mode 100644 index ec79416d..00000000 --- a/root/package/utils/mnfinfo/src/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -MNF_SOURCES = src/mnf_info.c -MNF_OBJS = $(MNF_SOURCES:.c=.o) -MNF_TARGET = mnf_info - -MNF_RPC_SOURCES = src/mnf_rpc.c -MNF_RPC_OBJS = $(MNF_RPC_SOURCES:.c=.o) -MNF_RPC_TARGET = mnfinfo.so - -LIB_SOURCES = src/libmnfinfo.c -LIB_OBJS = $(LIB_SOURCES:.c=.o) -LIB_TARGET = libmnfinfo.so - -CFLAGS += -Wall -Wextra -Wpedantic -Werror -Wno-missing-braces -Wno-unused-function -Wno-unused-parameter -fPIC -I src/include -LDFLAGS += -L. - -MNF_LDFLAGS = -MNF_RPC_LDFLAGS = -lmnfinfo - -RM = rm -f - -all: $(LIB_TARGET) $(MNF_RPC_TARGET) $(MNF_TARGET) - -$(LIB_TARGET): $(LIB_OBJS) - $(CC) $(LDFLAGS) -shared -o $@ $^ - -$(MNF_RPC_TARGET): $(MNF_RPC_OBJS) $(LIB_TARGET) - $(CC) $(LDFLAGS) $(MNF_RPC_LDFLAGS) -shared -o $@ $^ - -$(MNF_TARGET): $(MNF_OBJS) $(LIB_OBJS) - $(CC) $(LDFLAGS) $(MNF_LDFLAGS) -o $@ $^ - -clean: - $(RM) $(LIB_OBJS) $(LIB_TARGET) - $(RM) $(MNF_RPC_OBJS) $(MNF_RPC_TARGET) - $(RM) $(MNF_OBJS) $(MNF_TARGET) diff --git a/root/package/utils/mnfinfo/src/README.md b/root/package/utils/mnfinfo/src/README.md deleted file mode 100644 index af13c115..00000000 --- a/root/package/utils/mnfinfo/src/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# libmnfinfo - -How it works: depending on the platform, selected in the menuconfig, a different platform flag is defined during compilation. Depending on that flag, a header file with platform-specific MTD field defines is included. Here are all the defines, (currently) used for these headers: - -* `MAX_SIM_ID` - maximum allowed SIM index on the platform. -* `MTD_CONFIG_RO` - absolute path of a read-only MTD partition. Used for most field reads. -* `MTD_CONFIG_RW` - absolute path of a read/write MTD partition. Used for SIM PIN value reads/writes. -* `MAC_OFFSET` - MAC field offset in the `MTD_CONFIG_RO` partition. -* `MAC_LENGTH` - MAC field length in the `MTD_CONFIG_RO` partition. -* `NAME_OFFSET` - product name field offset in the `MTD_CONFIG_RO` partition. -* `NAME_LENGTH` - product name field length in the `MTD_CONFIG_RO` partition. -* `WPS_OFFSET` - WPS field offset in the `MTD_CONFIG_RO` partition. -* `WPS_LENGTH` - WPS field length in the `MTD_CONFIG_RO` partition. -* `SERIAL_OFFSET` - product serial code field offset in the `MTD_CONFIG_RO` partition. -* `SERIAL_LENGTH` - product serial code field length in the `MTD_CONFIG_RO` partition. -* `BATCH_OFFSET` - batch index field offset in the `MTD_CONFIG_RO` partition. -* `BATCH_LENGTH` - batch index field length in the `MTD_CONFIG_RO` partition. -* `HWVER_OFFSET` - hardware version index field offset in the `MTD_CONFIG_RO` partition. -* `HWVER_LENGTH` - hardware version index field length in the `MTD_CONFIG_RO` partition. -* `SIMPIN_OFFSET` - SIM card PIN code field offset in the `MTD_CONFIG_RW` partition. -* `SIMPIN_LENGTH` - SIM card PIN code field length in the `MTD_CONFIG_RW` partition. -* `WIFI_OFFSET` - Wi-Fi password field offset in the `MTD_CONFIG_RO` partition. -* `WIFI_LENGTH` - Wi-Fi password field length in the `MTD_CONFIG_RO` partition. - -Only defines with actual values should be written. All other defines should be removed from the platform-specific header file. diff --git a/root/package/utils/mnfinfo/src/libmnfinfo.so b/root/package/utils/mnfinfo/src/libmnfinfo.so deleted file mode 100755 index 8e7ab9af8895f8dbc828fc61d17a3f58afa0c681..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13488 zcmeHOe{fXSb-r(RC04R5FBohY6Z?fiYdg|vB?JOjZdV{dY6}no8=NwJtahKI4Xa&s zcg2rRJ=rnDc0JaB2e(d1sCHU=;z^q+?a&6dkSJh#oQ|E52inq1>S|Z)h!D~W7dtq% zqkiAJ@2;K}#r918YDWhj-E;0a_ug~QJ@3Bz_8xzwy<@$mX+nWp+#|>>nI}XOD+54} zC~FeBD1+=S@i|LQk%9|8A&6yGg=Wc5+$F?`yEF?s(cv4wa$D{~c?$AVkP|O~CsOVK zZYiWAC~g4CF^uSf+}VEz`X;h13Nat31Kq&8fj0pc0IPun>Qw>n08;lBAmLUZ`zLs1 z@u`1rvo+wZB2Y$KK^ImU0g zT$wXf;*T?JaZP{Kc0qJN--x8mKd(@}n@ zL~fS!$H(SX1X2ci3$SW$pLlbPoOq#vXRN71$J;_kN3FV#y>SwD>4482dOPS_wku*aQ z5soENrs$8OyPky6Yo?9onl(K{GQMrJgQ z!<-ovsrU@GZ|@#6IisdKln(dJsM$M^n#o6dqQ=198Fi^>zcCP`g|~rszqUrWhDZr$j8;-5U-YDSs;AZy*;2g(b1}NIvf; zu@|!BGsklBZcQx0;$35jIJwRe>-P~$JaETR-i8h01WRllCs{)86iY1r2usAT{m4x`JnHxKKTIXv{nL-9pD52+r3J<>&wNv-yq>P8Ag0=Ac^~bd!Uwbmn>*{_Yc4cz`ajYPG+3|Y@jul*)Y|ec+oBIxI(Zs;G2xi9-29+W>R1lrnoLA50 zDgxQuQOM_kF85_~Wg?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_H86z4stC=K4c$9HttxOkJ5pj>XL`voz|{!8x+N3c^rdt{}qU0Z<)ikFdbNgqx4-i zCyKxZG#m~r4K7_KNP^h%#iOyMPOLsyKN?eb_4PNZv_*?XW6M=+@e&nlpe5F|G;M4S zH*Z=S4vX;G4{mDOc@J8;nNTn*?+ zxE(;w=o@_f^?rwZrmrL0*9JYfVvt`G=vlmZa9-kv!)@8DbJh?R^5cN8ymdfjXH(%$ zoCzeX(TDzWqdoSufc>F?^O)cMbU=My@TWdr(AD6Dhb`Yq#%Ln2$A`)dOo)4mPS zz9!JrX3OP0g)|!O3d6X&8=Y>DLNS zh@Vz)KpCZA)!A1#R2N@D*dIPj{LzN}6^8tDLj6{gia>0466kiA%ZNb6N-)ii;Fv@N&9fIO1y7z5?kDk`h3Eo1Fe zh!}b;6_@>80VuJG@)H<`*kLQ@lFRwwZj~!Fu14%{>Fj$3MXOeE*CBz^67hJ?!L`>D zh^wiLA^kP*zr&pb@pvY2?oZ(Pk@px9jHSr1H+G}2$7uVZ2!gKjTJf2}}fDqoJ zD5s)4?d5uycs$$K4o2L6>H2ZqxelIqtKoU(kp|u|#EHkX0z=|$h9_?B_DaqDcV=i9`1kyowWE z54=$#z|@KE6ugf21n_<*bL=0LceVuYYx9Ko<^*^@FTt~}5#ogj@P1u_w`@MnFf=@6 z7aq1y2W6KXz?;Oz<2dHgvkx*0&8Hd_5|u3WWgRcH1Y?uR)bRcbwbDyQ diff --git a/root/package/utils/mnfinfo/src/mnfinfo.so b/root/package/utils/mnfinfo/src/mnfinfo.so deleted file mode 100755 index 176d5fe8911c7830af20a42f52aa9bbe9569b735..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8864 zcmeHMeT-aH6~Aw0w%xAncDrn$KxxNjNl-g8+p?vtU)iPIR-lD#3lU7s>zkRkyMy!P zn>VGas5PL}#AYEj3Q3{+NB=-EirT~yiy?rfm?~=^rhj0ZE!|Logo0K1itF!pKW6Vf z3L)VSW74yG=A3iSx#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S1%yv<{JG;R1&ghJBmukKyLmvc89t@@ODrBuR$ zdL>_D!quq2rtSS(2i$=hH@dEHH{Nz*|JLg^uvxW=JK~k|MSMosyyd2A`?t6^ZQ8VB z;AZ#c{%f}kxbOKupr54VD?gsFqObON=jXQr`K3TU!AHJTM6%Bq&-$#u)~e4A@AqxP z_M;xo>=gOVroNR}p8z7?Hs0^sg?f#XA4Z}d7Mh{ zG~Q)t$MZ3<3ZxI(k}_VWv`jmmn~B?CXTY#)kicUt?RcIhR>9ll@|f^>AnmRN@|;cF z2cC93y+V}txXqyS&7%|dHzMB&4A721KgQ17uNzcopdE25(Ae>ON4%4j)nNSXfNboz z4-(H;?rqv`H7L&u#C6&i34IVfO<5GrDMV8ilA8Qi!1J`ve&G3z-^rtPlLBdQdj^u4zV8LkKBgVdN&LQl*3z>~G)+7JH2!#AI*dx}M4AEG z5g!5?J9*B+B#PQG&tV|_vRt00cfxKdcmwoB_%V?FdME&Bw@R_{mpbAvf$&w8iTK$M zyU!T`ls1GXfrh6%0lPsm8dxX7pMkbr5|eYI)Tke$`)kB554-O3*u4_5+XuTJp2zOr z+O9|Imf;W;wPV>a{Fpk>^eF85$Y?O_khUff^i9|`u$Ha>e?5@>j4qICl4D`uBqqz> WtOQdQsx8ON*!>!VhT&_1VgC!D=U`p{ diff --git a/root/package/utils/mnfinfo/src/src/include/mnfinfo.h b/root/package/utils/mnfinfo/src/src/include/mnfinfo.h deleted file mode 100644 index ad2700bd..00000000 --- a/root/package/utils/mnfinfo/src/src/include/mnfinfo.h +++ /dev/null @@ -1,115 +0,0 @@ -#include -#include - -#define STRING_NA(a) do { (a)[0] = 'N'; (a)[1] = '/'; (a)[2] = 'A'; (a)[3] = 0; } while(0) -#define STRING_NA_LENGTH 3 - -#define PARTITION_SIZE 0xA0 -#define SECTION_SIZE 0x10 - -#if defined(RUTX_PLATFORM) -#include "rutx.h" -#elif defined(TRB1_PLATFORM) -#include "trb1.h" -#elif defined(TRB2_PLATFORM) -#include "trb2.h" -#elif defined(RUT2_PLATFORM) -#include "rut2.h" -#elif defined(RUT300_PLATFORM) || defined(RUT360_PLATFORM) -#include "rut3.h" -#else -#error Platform not recognized! -#endif - -#if !(defined(MAC_OFFSET) && defined(MAC_LENGTH)) -#undef MAC_OFFSET -#undef MAC_LENGTH -#define MAC_OFFSET 0 -#define MAC_LENGTH STRING_NA_LENGTH -#else -#define MAC_ENABLED -#endif - -#if !(defined(NAME_OFFSET) && defined(NAME_LENGTH)) -#undef NAME_OFFSET -#undef NAME_LENGTH -#define NAME_OFFSET 0 -#define NAME_LENGTH STRING_NA_LENGTH -#else -#define NAME_ENABLED -#endif - -#if !(defined(WPS_OFFSET) && defined(WPS_LENGTH)) -#undef WPS_OFFSET -#undef WPS_LENGTH -#define WPS_OFFSET 0 -#define WPS_LENGTH STRING_NA_LENGTH -#else -#define WPS_ENABLED -#endif - -#if !(defined(SERIAL_OFFSET) && defined(SERIAL_LENGTH)) -#undef SERIAL_OFFSET -#undef SERIAL_LENGTH -#define SERIAL_OFFSET 0 -#define SERIAL_LENGTH STRING_NA_LENGTH -#else -#define SERIAL_ENABLED -#endif - -#if !(defined(BATCH_OFFSET) && defined(BATCH_LENGTH)) -#undef BATCH_OFFSET -#undef BATCH_LENGTH -#define BATCH_OFFSET 0 -#define BATCH_LENGTH STRING_NA_LENGTH -#else -#define BATCH_ENABLED -#endif - -#if !(defined(HWVER_OFFSET) && defined(HWVER_LENGTH)) -#undef HWVER_OFFSET -#undef HWVER_LENGTH -#define HWVER_OFFSET 0 -#define HWVER_LENGTH STRING_NA_LENGTH -#else -#define HWVER_ENABLED -#endif - -#if !(defined(SIMPIN_OFFSET) && defined(SIMPIN_LENGTH)) -#undef SIMPIN_OFFSET -#undef SIMPIN_LENGTH -#define SIMPIN_OFFSET 0 -#define SIMPIN_LENGTH STRING_NA_LENGTH -#else -#define SIMPIN_ENABLED -#endif - -#if !(defined(WIFI_OFFSET) && defined(WIFI_LENGTH)) -#undef WIFI_OFFSET -#undef WIFI_LENGTH -#define WIFI_OFFSET 0 -#define WIFI_LENGTH STRING_NA_LENGTH -#else -#define WIFI_ENABLED -#endif - -/* - * mnfinfo_get_*() functions return ptr to static memory, which is not to be free()d! - * the returned memory ptr is safely accessible throughout the using program's runtime - * bad: free(mnfinfo_get_mac()); - * - * returns NULL on /dev/mtdX reading failure, "N/A" if the particular device - * doesn't support the field, or a dummy string if the mtdblock space contains garbage -*/ -char* mnfinfo_get_mac(void); -char* mnfinfo_get_name(void); -char* mnfinfo_get_maceth(void); -char* mnfinfo_get_sn(void); -char* mnfinfo_get_hwver(void); -char* mnfinfo_get_batch(void); -char* mnfinfo_get_wps(void); -char* mnfinfo_get_wifi_pw(void); -char* mnfinfo_get_sim_pin(uint8_t sim_id); - -// returns true on success -bool mnfinfo_set_sim_pin(uint8_t sim_id, const char *pin); diff --git a/root/package/utils/mnfinfo/src/src/include/rut2.h b/root/package/utils/mnfinfo/src/src/include/rut2.h deleted file mode 100644 index b4a12414..00000000 --- a/root/package/utils/mnfinfo/src/src/include/rut2.h +++ /dev/null @@ -1,21 +0,0 @@ -#define MAX_SIM_ID 1 - -#define MTD_CONFIG_RO "/dev/mtd1" -#define MTD_CONFIG_RW "/dev/mtd1" - -#define MAC_OFFSET 0x00 -#define MAC_LENGTH 6 -#define NAME_OFFSET 0x10 -#define NAME_LENGTH 12 -#define WPS_OFFSET 0x20 -#define WPS_LENGTH 8 -#define SERIAL_OFFSET 0x30 -#define SERIAL_LENGTH 10 -#define BATCH_OFFSET 0x40 -#define BATCH_LENGTH 4 -#define HWVER_OFFSET 0x50 -#define HWVER_LENGTH 4 -#define SIMPIN_OFFSET 0x70 -#define SIMPIN_LENGTH 4 -#define WIFI_OFFSET 0x90 -#define WIFI_LENGTH 16 diff --git a/root/package/utils/mnfinfo/src/src/include/rut3.h b/root/package/utils/mnfinfo/src/src/include/rut3.h deleted file mode 100644 index b4a12414..00000000 --- a/root/package/utils/mnfinfo/src/src/include/rut3.h +++ /dev/null @@ -1,21 +0,0 @@ -#define MAX_SIM_ID 1 - -#define MTD_CONFIG_RO "/dev/mtd1" -#define MTD_CONFIG_RW "/dev/mtd1" - -#define MAC_OFFSET 0x00 -#define MAC_LENGTH 6 -#define NAME_OFFSET 0x10 -#define NAME_LENGTH 12 -#define WPS_OFFSET 0x20 -#define WPS_LENGTH 8 -#define SERIAL_OFFSET 0x30 -#define SERIAL_LENGTH 10 -#define BATCH_OFFSET 0x40 -#define BATCH_LENGTH 4 -#define HWVER_OFFSET 0x50 -#define HWVER_LENGTH 4 -#define SIMPIN_OFFSET 0x70 -#define SIMPIN_LENGTH 4 -#define WIFI_OFFSET 0x90 -#define WIFI_LENGTH 16 diff --git a/root/package/utils/mnfinfo/src/src/include/rutx.h b/root/package/utils/mnfinfo/src/src/include/rutx.h deleted file mode 100644 index 4976a3b6..00000000 --- a/root/package/utils/mnfinfo/src/src/include/rutx.h +++ /dev/null @@ -1,21 +0,0 @@ -#define MAX_SIM_ID 4 - -#define MTD_CONFIG_RO "/dev/mtd13" -#define MTD_CONFIG_RW "/dev/mtd14" - -#define MAC_OFFSET 0x00 -#define MAC_LENGTH 6 -#define NAME_OFFSET 0x10 -#define NAME_LENGTH 12 -#define WPS_OFFSET 0x20 -#define WPS_LENGTH 8 -#define SERIAL_OFFSET 0x30 -#define SERIAL_LENGTH 10 -#define BATCH_OFFSET 0x40 -#define BATCH_LENGTH 4 -#define HWVER_OFFSET 0x50 -#define HWVER_LENGTH 4 -#define SIMPIN_OFFSET 0x00 -#define SIMPIN_LENGTH 4 -#define WIFI_OFFSET 0x90 -#define WIFI_LENGTH 16 diff --git a/root/package/utils/mnfinfo/src/src/include/trb1.h b/root/package/utils/mnfinfo/src/src/include/trb1.h deleted file mode 100644 index 6003e6bb..00000000 --- a/root/package/utils/mnfinfo/src/src/include/trb1.h +++ /dev/null @@ -1,17 +0,0 @@ -#define MAX_SIM_ID 1 - -#define MTD_CONFIG_RO "/dev/mtd7" -#define MTD_CONFIG_RW "/dev/mtd7" - -#define MAC_OFFSET 0x50 -#define MAC_LENGTH 12 -#define NAME_OFFSET 0x20 -#define NAME_LENGTH 12 -#define SERIAL_OFFSET 0x10 -#define SERIAL_LENGTH 10 -#define BATCH_OFFSET 0x40 -#define BATCH_LENGTH 3 -#define HWVER_OFFSET 0x30 -#define HWVER_LENGTH 4 -#define SIMPIN_LENGTH 4 -#define SIMPIN_OFFSET 0x70 diff --git a/root/package/utils/mnfinfo/src/src/include/trb2.h b/root/package/utils/mnfinfo/src/src/include/trb2.h deleted file mode 100644 index bbb281f9..00000000 --- a/root/package/utils/mnfinfo/src/src/include/trb2.h +++ /dev/null @@ -1,21 +0,0 @@ -#define MAX_SIM_ID 2 - -#define MTD_CONFIG_RO "/dev/mtd1" -#define MTD_CONFIG_RW "/dev/mtd1" - -#define MAC_OFFSET 0x00 -#define MAC_LENGTH 6 -#define NAME_OFFSET 0x10 -#define NAME_LENGTH 12 -#define WPS_OFFSET 0x20 -#define WPS_LENGTH 8 -#define SERIAL_OFFSET 0x30 -#define SERIAL_LENGTH 10 -#define BATCH_OFFSET 0x40 -#define BATCH_LENGTH 4 -#define HWVER_OFFSET 0x50 -#define HWVER_LENGTH 4 -#define SIMPIN_OFFSET 0x70 -#define SIMPIN_LENGTH 4 -#define WIFI_OFFSET 0x90 -#define WIFI_LENGTH 16 diff --git a/root/package/utils/mnfinfo/src/src/libmnfinfo.o b/root/package/utils/mnfinfo/src/src/libmnfinfo.o deleted file mode 100644 index 7ead455f305bc1983afdeb99bc6f146ca612e71c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5376 zcmbtYZ){W76+h2*f(eGX9bGBS#v5gAXu-UMkN`?o2MBa)Aa0PiZxa0mu=$P*rZAxZKZyo5>va4Nmb=PJcV|hly0bH)zs|wd+$E; zl2VOnSGw<FF*vei-0#qi>BA3Y{RZv2!5@IPumUfArwDVroDdwuNih4ldoQn z3`Ygs-dmZ#$gDsTv>-O~iQt5pFdQ0N!6**O2 zDwEa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6^L|0Hoo6dqgHe4$X0Izu6^LmLxX8Yx(=dVj|WAXPkJcVTfXYCPlCLUG&*>wlDAj9j1;M~h=t@&6UavtSA{?l7vT;n*=iR9mimNS}Gr3Z@u0R&}Y8g zP|AnMmk+zDB}Y9PS=L0kh&VllSjX|`*w^v{;!M%p7jR-vnwn!=UISPiM{B0YV9;GS n_}|I1=Q_A9u2t_by0U^z`%EVR)?Hkuj=0m/dev/null) + shift + ;; + esac +done \ No newline at end of file From 85d847a12ef9498b30640e64d7a19a63beda0830 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 10 Mar 2022 08:06:12 +0100 Subject: [PATCH 2/4] Add RUTX modems definitions --- .../ipq40xx/base-files/bin/config_generate | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/root/target/linux/ipq40xx/base-files/bin/config_generate b/root/target/linux/ipq40xx/base-files/bin/config_generate index 09801874..b2542b14 100755 --- a/root/target/linux/ipq40xx/base-files/bin/config_generate +++ b/root/target/linux/ipq40xx/base-files/bin/config_generate @@ -135,15 +135,15 @@ generate_network() { uci set network.$1.proto='dhcp' uci set network.$1.metric='1' - [ -e /proc/sys/net/ipv6 ] && { - uci -q batch <<-EOF - delete network.${1}6 - set network.${1}6='interface' - set network.${1}6.ifname='$ifname' - set network.${1}6.proto='dhcpv6' - set network.${1}6.metric='1' - EOF - } + #[ -e /proc/sys/net/ipv6 ] && { + # uci -q batch <<-EOF + # delete network.${1}6 + # set network.${1}6='interface' + # set network.${1}6.device='$ifname' + # set network.${1}6.proto='dhcpv6' + # set network.${1}6.metric='1' + # EOF + #} ;; pppoe) From b66beeb1e21cae7523e642de012c8d1fb6faaf8a Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sun, 13 Mar 2022 19:58:30 +0100 Subject: [PATCH 3/4] Remove not needed files for RUTX --- .../linux/ipq40xx/base-files/bin/board_track | 36 ---- .../linux/ipq40xx/base-files/bin/ipk-sig.sh | 17 -- .../base-files/etc/board.d/1-board_json | 4 +- .../base-files/etc/init.d/modem_tracker | 39 ---- .../base-files/etc/uci-defaults/02_simcard | 28 --- .../etc/uci-defaults/03_side-widget | 119 ----------- .../etc/uci-defaults/05_add_mctl_cfg | 16 -- .../etc/uci-defaults/13_migrate-groups | 35 ---- .../etc/uci-defaults/40_strongswan_to_ipsec | 140 ------------- .../uci-defaults/50_migrate_pptp_l2tp_sstp | 82 -------- .../base-files/lib/preinit/75_stm32_autoflash | 10 - .../base-files/lib/preinit/82_version_migrate | 21 -- .../arm/boot/dts/qcom-ipq4018-rutx-08_10.dts | 57 ------ .../arm/boot/dts/qcom-ipq4018-rutx-09_11.dts | 122 ------------ .../arm/boot/dts/qcom-ipq4018-rutx-12.dts | 149 -------------- .../arm/boot/dts/qcom-ipq4018-rutx-R1.dts | 84 -------- .../arm/boot/dts/qcom-ipq4018-rutx-STM32.dts | 188 ------------------ .../boot/dts/qcom-ipq4018-rutx-common.dtsi | 84 -------- .../arm/boot/dts/qcom-ipq4018-rutx-i2c.dtsi | 20 -- .../boot/dts/qcom-ipq4018-rutx-shiftreg.dtsi | 25 --- 20 files changed, 1 insertion(+), 1275 deletions(-) delete mode 100755 root/target/linux/ipq40xx/base-files/bin/board_track delete mode 100755 root/target/linux/ipq40xx/base-files/bin/ipk-sig.sh delete mode 100755 root/target/linux/ipq40xx/base-files/etc/init.d/modem_tracker delete mode 100644 root/target/linux/ipq40xx/base-files/etc/uci-defaults/02_simcard delete mode 100644 root/target/linux/ipq40xx/base-files/etc/uci-defaults/03_side-widget delete mode 100644 root/target/linux/ipq40xx/base-files/etc/uci-defaults/05_add_mctl_cfg delete mode 100755 root/target/linux/ipq40xx/base-files/etc/uci-defaults/13_migrate-groups delete mode 100755 root/target/linux/ipq40xx/base-files/etc/uci-defaults/40_strongswan_to_ipsec delete mode 100644 root/target/linux/ipq40xx/base-files/etc/uci-defaults/50_migrate_pptp_l2tp_sstp delete mode 100644 root/target/linux/ipq40xx/base-files/lib/preinit/75_stm32_autoflash delete mode 100644 root/target/linux/ipq40xx/base-files/lib/preinit/82_version_migrate delete mode 100644 root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-08_10.dts delete mode 100644 root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-09_11.dts delete mode 100644 root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-12.dts delete mode 100644 root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-R1.dts delete mode 100644 root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-STM32.dts delete mode 100644 root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-common.dtsi delete mode 100644 root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-i2c.dtsi delete mode 100644 root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-shiftreg.dtsi diff --git a/root/target/linux/ipq40xx/base-files/bin/board_track b/root/target/linux/ipq40xx/base-files/bin/board_track deleted file mode 100755 index 3f620e73..00000000 --- a/root/target/linux/ipq40xx/base-files/bin/board_track +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -. /lib/functions/uci-defaults.sh - -CFG=/etc/board.json -SLP=30 - -check_modem() { - json_select "$2" - json_get_vars id - - [ -z "$id" ] && { - json_select .. - return 0 - } - - ttys=$(ls -d /sys/bus/usb/devices/$id/${id}*/tty?*) - - [ -n "$ttys" ] || { #FAILED TO FIND MODEM - mctl -s - sleep 1 - mctl -p - json_select .. - return 1 - } - - #MODEM UP - json_select .. -} - -board_config_update -while true; do - json_for_each_item check_modem modems - sleep $SLP - [ $SLP -lt 300 ] && SLP=$((SLP+30)) -done diff --git a/root/target/linux/ipq40xx/base-files/bin/ipk-sig.sh b/root/target/linux/ipq40xx/base-files/bin/ipk-sig.sh deleted file mode 100755 index 016f5f56..00000000 --- a/root/target/linux/ipq40xx/base-files/bin/ipk-sig.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -sig="/tmp/.$(cat /proc/sys/kernel/random/uuid).sig" - -check() { - local ipk="$1" - [ -z "$ipk" ] && return 1 - - tar -xzOf "$ipk" ./control+data.sig > $sig || return 2 - - tar -xzOf "$ipk" ./control.tar.gz ./data.tar.gz | usign -V -m - -P /etc/opkg/keys -x $sig || return 3 -} - -check $1 -status=$? -rm -f $sig -return $status diff --git a/root/target/linux/ipq40xx/base-files/etc/board.d/1-board_json b/root/target/linux/ipq40xx/base-files/etc/board.d/1-board_json index 6d26ba42..619e0062 100755 --- a/root/target/linux/ipq40xx/base-files/etc/board.d/1-board_json +++ b/root/target/linux/ipq40xx/base-files/etc/board.d/1-board_json @@ -193,9 +193,7 @@ setup_json() { } #~ Get model name for RUTX products -if ! model="$(mnf_info --name)" 2>/dev/null; then - model="$(mnf_info --prod-code)" 2>/dev/null -fi +model="$(mnf_info --name)" 2>/dev/null platform="$(cat /proc/device-tree/platform)" 2>/dev/null diff --git a/root/target/linux/ipq40xx/base-files/etc/init.d/modem_tracker b/root/target/linux/ipq40xx/base-files/etc/init.d/modem_tracker deleted file mode 100755 index 3a3d06bc..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/init.d/modem_tracker +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2021 Teltonika Networks - -START=96 - -USE_PROCD=1 - -PROG=/bin/board_track -NAME=board_track -PIDCOUNT=1 - -start_service() { - config_load system - - config_get modem_track system modem_track 1 - - [ "$modem_track" != 0 ] || return - - local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid" - - procd_open_instance - procd_set_param command "$PROG" - procd_set_param file /etc/config/system - - procd_set_param respawn - - procd_set_param stdout 1 - procd_set_param pidfile $pid_file - procd_close_instance -} - -reload_service() { - stop - start -} - -service_triggers() { - procd_add_reload_trigger "system" -} diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/02_simcard b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/02_simcard deleted file mode 100644 index 7e8dbc6a..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/02_simcard +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -. /lib/functions.sh -. /lib/functions/board.sh - - -set_pin() { - local sim="$1" - local modem position num builtin - - config_get modem "$sim" modem - builtin=$(is_builtin_modem "$modem") - [ "$builtin" = "0" ] && return - - config_get position "$sim" position - #If modem builtin and primary then position num 3 or 4 else 1 or 2 - [ "$builtin" = "2" ] && num=$((position + 2)) || num=$position - - pin=`/sbin/mnf_info --simpin $num` - [ -z "$pin" ] && return - - uci -q set "simcard"."$sim"."pincode"="$pin" -} - -config_load simcard -config_foreach set_pin sim -uci commit simcard - -exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/03_side-widget b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/03_side-widget deleted file mode 100644 index 36c60051..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/03_side-widget +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh -. /lib/functions.sh - -CONFIG="widget" -MOBILE_CONFIG="/etc/config/simcard" -RMS_CONFIG="/etc/config/rms_connect_mqtt" -WIFI_CONFIG="/etc/config/wireless" -ETHERNET=$(uci -q get network.@switch[0].name) -ethernet_widget_exists=0 -mobile_widget_exists=0 -system_widget_exists=0 -wifi_widget_exists=0 -rms_widget_exists=0 -position=1 -radio0_network=1 -radio1_network=1 - -check_for_widgets() { - local widget="$1" - local type - config_get type "$widget" type - - if [ "$type" = "ethernet" ]; then - ethernet_widget_exists=1 - elif [ "$type" = "mobile" ]; then - mobile_widget_exists=1 - elif [ "$type" = "system" ]; then - system_widget_exists=1 - elif [ "$type" = "wifi" ]; then - wifi_widget_exists=1 - elif [ "$type" = "rms" ]; then - rms_widget_exists=1 - fi -} - -setup_wifi_fields() { - local iface_section="$1" - local device - config_get device "$iface_section" device - - section=$(uci -q add widget widget) - - if [ "$device" == "radio0" ]; then - uci -q set $CONFIG."${section}.id"=$device."network${radio0_network}" - let "radio0_network=radio0_network + 1" - elif [ "$device" == "radio1" ]; then - uci -q set $CONFIG."${section}.id"=$device."network${radio1_network}" - let "radio1_network=radio1_network + 1" - fi - uci -q set $CONFIG."${section}.type=wifi" - uci -q set $CONFIG."${section}.position=${position}" - uci -q set $CONFIG."${section}.enabled=1" - let "position=position + 1" -} - -check_if_config_exists() { - if [ ! -f "/etc/config/${CONFIG}" ]; then - touch "/etc/config/${CONFIG}" - fi -} - -setup_side_widget() { - config_load widget - config_foreach check_for_widgets widget - - if [ $ethernet_widget_exists -eq 0 -a -n "$ETHERNET" ]; then - check_if_config_exists - section=$(uci -q add widget widget) - uci -q set $CONFIG."${section}.id=widget1" - uci -q set $CONFIG."${section}.type=ethernet" - uci -q set $CONFIG."${section}.position=${position}" - uci -q set $CONFIG."${section}.enabled=1" - let "position=position + 1" - fi - - if [ $mobile_widget_exists -eq 0 -a -s "$MOBILE_CONFIG" -a -f "$MOBILE_CONFIG" ]; then - check_if_config_exists - modem_count=$(jsonfilter -q -i /etc/board.json -e '@["modems"][*]' | wc -l) - for i in $(seq $modem_count) - do - section=$(uci -q add widget widget) - uci -q set $CONFIG."${section}.id=mobile-widget$i" - uci -q set $CONFIG."${section}.type=mobile" - uci -q set $CONFIG."${section}.position=${position}" - uci -q set $CONFIG."${section}.enabled=1" - let "position=position + 1" - done - fi - - if [ $system_widget_exists -eq 0 ]; then - check_if_config_exists - section=$(uci -q add widget widget) - uci -q set $CONFIG."${section}.id=widget3" - uci -q set $CONFIG."${section}.type=system" - uci -q set $CONFIG."${section}.position=${position}" - uci -q set $CONFIG."${section}.enabled=1" - let "position=position + 1" - fi - - if [ $wifi_widget_exists -eq 0 -a -f "$WIFI_CONFIG" ]; then - check_if_config_exists - config_load wireless - config_foreach setup_wifi_fields wifi-iface - fi - - if [ $rms_widget_exists -eq 0 -a -f "$RMS_CONFIG" ]; then - check_if_config_exists - section=$(uci -q add widget widget) - uci -q set $CONFIG."${section}.id=widget5" - uci -q set $CONFIG."${section}.type=rms" - uci -q set $CONFIG."${section}.position=${position}" - uci -q set $CONFIG."${section}.enabled=1" - let "position=position + 1" - fi - - uci -q commit $CONFIG -} -setup_side_widget -exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/05_add_mctl_cfg b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/05_add_mctl_cfg deleted file mode 100644 index 431c38ae..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/05_add_mctl_cfg +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -[ -n "$(uci -q get system.modem.disable)" ] || { - for m in /sys/class/gpio/modem*_power; do - local label="$(basename $m | awk -F_ '{print $1}')" - uci set "system.${label}=mctl" - uci set "system.${label}.disable=0" - - # modem is turned on in preinit but others are not - [ "${label}" != "modem" ] && /sbin/mctl -p -m "${label}" - done - - uci commit system -} - -exit 0 \ No newline at end of file diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/13_migrate-groups b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/13_migrate-groups deleted file mode 100755 index c4b6e3d1..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/13_migrate-groups +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -. /lib/functions.sh - -CONFIG="/etc/config/user_groups" - -migrate_tel_list() { - local tel="$1" - local new_section="$2" - - uci -q add_list user_groups."$new_section".tel="$tel" -} - -migrate_group() { - local group="$1" - local name - - config_get name "$group" name "" - local new_section=`uci -q add user_groups phone` - uci -q set user_groups."$new_section".name="$name" - config_list_foreach "$group" tel migrate_tel_list "$new_section" - - uci -q delete sms_utils."$group" -} - -if [ ! -e "$CONFIG" ]; then - touch "$CONFIG" -fi - -config_load sms_utils -config_foreach migrate_group group - -uci -q commit user_groups -uci -q commit sms_utils - -exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/40_strongswan_to_ipsec b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/40_strongswan_to_ipsec deleted file mode 100755 index 88497cbc..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/40_strongswan_to_ipsec +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh - -[ -e /etc/config/strongswan ] || exit 0 - -. /lib/functions.sh -ENABLED=0 - -move_config() { - - local name=$1 - - #get old config - config_get_bool enabled "$1" "enabled" "0" - config_get keyexchange "$1" "keyexchange" - config_get aggressive "$1" "aggressive" - config_get ipsec_type "$1" "ipsec_type" - config_get my_identifier_type "$1" "my_identifier_type" - config_get my_identifier "$1" "my_identifier" - config_get leftfirewall "$1" "leftfirewall" - config_get forceencaps "$1" "forceencaps" - config_get dpdaction "$1" "dpdaction" "none" - config_get dpddelay "$1" "dpddelay" - config_get dpdtimeout "$1" "dpdtimeout" - config_get psk_key "$1" "psk_key" - config_get right "$1" "right" - config_get rightfirewall "$1" "rightfirewall" - config_get ike_encryption_algorithm "$1" "ike_encryption_algorithm" - config_get ike_authentication_algorithm "$1" "ike_authentication_algorithm" - config_get ike_dh_group "$1" "ike_dh_group" - config_get ikelifetime "$1" "ikelifetime" - config_get esp_encryption_algorithm "$1" "esp_encryption_algorithm" - config_get esp_hash_algorithm "$1" "esp_hash_algorithm" - config_get esp_pfs_group "$1" "esp_pfs_group" - config_get keylife "$1" "keylife" - config_get leftsubnet "$1" "leftsubnet" - config_get rightsubnet "$1" "rightsubnet" - config_get leftprotoport "$1" "leftprotoport" - config_get rightprotoport "$1" "rightprotoport" - - [ "$enabled" = 1 ] && ENABLED=1 - #set new config structure - - config_set - uci_add "ipsec" "proposal" "${name}_ph1" - uci_set "ipsec" $CONFIG_SECTION "encryption_algorithm" "$ike_encryption_algorithm" - uci_set "ipsec" $CONFIG_SECTION "hash_algorithm" "$ike_authentication_algorithm" - uci_set "ipsec" $CONFIG_SECTION "dh_group" "$ike_dh_group" - - uci_add "ipsec" "proposal" "${name}_ph2" - uci_set "ipsec" $CONFIG_SECTION "encryption_algorithm" "$esp_encryption_algorithm" - uci_set "ipsec" $CONFIG_SECTION "hash_algorithm" "$esp_hash_algorithm" - uci_set "ipsec" $CONFIG_SECTION "dh_group" "$esp_pfs_group" - - uci_add "ipsec" "connection" "${name}_c" - uci_set "ipsec" $CONFIG_SECTION "mode" "start" - uci_set "ipsec" $CONFIG_SECTION "type" "$ipsec_type" - uci_set "ipsec" $CONFIG_SECTION "local_subnet" "$leftsubnet" - uci_set "ipsec" $CONFIG_SECTION "remote_subnet" "$rightsubnet" - uci_set "ipsec" $CONFIG_SECTION "remote_firewall" "$rightfirewall" - uci_set "ipsec" $CONFIG_SECTION "keyexchange" "$keyexchange" - uci_set "ipsec" $CONFIG_SECTION "aggressive" "$aggressive" - uci_set "ipsec" $CONFIG_SECTION "ikelifetime" "$ikelifetime" - uci_set "ipsec" $CONFIG_SECTION "lifetime" "$lifetime" - [ -n "$dpdaction" ] && { - uci_set "ipsec" $CONFIG_SECTION "_dpd" "1" - uci_set "ipsec" $CONFIG_SECTION "dpdaction" "$dpdaction" - uci_set "ipsec" $CONFIG_SECTION "dpddelay" "$dpddelay" - } - uci_set "ipsec" $CONFIG_SECTION "crypto_proposal" "${name}_ph2" - uci_set "ipsec" $CONFIG_SECTION "leftprotoport" "$leftprotoport" - uci_set "ipsec" $CONFIG_SECTION "rightprotoport" "$rightprotoport" - uci_set "ipsec" $CONFIG_SECTION "lifetime" "$keylife" - uci_set "ipsec" $CONFIG_SECTION "forceencaps" "$forceencaps" - - uci_add "ipsec" "remote" "${name}" - uci_set "ipsec" $CONFIG_SECTION "enabled" "$enabled" - uci_set "ipsec" $CONFIG_SECTION "gateway" "$right" - uci_set "ipsec" $CONFIG_SECTION "remote_identifier" "%any" - uci_set "ipsec" $CONFIG_SECTION "authentication_method" "psk" - uci_set "ipsec" $CONFIG_SECTION "pre_shared_key" "$psk_key" - uci_set "ipsec" $CONFIG_SECTION "local_identifier" "$my_identifier" - uci_set "ipsec" $CONFIG_SECTION "crypto_proposal" "${name}_ph1" - - [ "$ipsec_type" = "tunnel" ] && uci -q add_list "ipsec"."${CONFIG_SECTION}"."tunnel"="${name}_c" - [ "$ipsec_type" = "transport" ] && uci -q add_list "ipsec"."${CONFIG_SECTION}"."transport"="${name}_c" - - uci_commit "ipsec" -} - -config_load 'strongswan' -config_foreach move_config 'conn' - -[ "$ENABLED" = 1 ] && { - uci_add firewall rule - uci_set firewall "$CONFIG_SECTION" src 'wan' - uci_set firewall "$CONFIG_SECTION" name 'Allow-IPsec-ESP' - uci_set firewall "$CONFIG_SECTION" target 'ACCEPT' - uci_set firewall "$CONFIG_SECTION" vpn_type 'IPsec' - uci_set firewall "$CONFIG_SECTION" proto 'esp' - - uci_add firewall rule - uci_set firewall "$CONFIG_SECTION" dest_port '4500' - uci_set firewall "$CONFIG_SECTION" src 'wan' - uci_set firewall "$CONFIG_SECTION" name 'Allow-IPsec-NAT-T' - uci_set firewall "$CONFIG_SECTION" target 'ACCEPT' - uci_set firewall "$CONFIG_SECTION" vpn_type 'IPsec' - uci_set firewall "$CONFIG_SECTION" proto 'udp' - - uci_add firewall rule - uci_set firewall "$CONFIG_SECTION" dest_port '500' - uci_set firewall "$CONFIG_SECTION" src 'wan' - uci_set firewall "$CONFIG_SECTION" name 'Allow-IPsec-IKE' - uci_set firewall "$CONFIG_SECTION" target 'ACCEPT' - uci_set firewall "$CONFIG_SECTION" vpn_type 'IPsec' - uci_set firewall "$CONFIG_SECTION" proto 'udp' - - uci_add firewall rule - uci_set firewall "$CONFIG_SECTION" src 'wan' - uci_set firewall "$CONFIG_SECTION" name 'Allow-IPsec-Forward' - uci_set firewall "$CONFIG_SECTION" extra '-m policy --dir in --pol ipsec' - uci_set firewall "$CONFIG_SECTION" target 'ACCEPT' - uci_set firewall "$CONFIG_SECTION" vpn_type 'IPsec' - uci_set firewall "$CONFIG_SECTION" dest '*' - uci_set firewall "$CONFIG_SECTION" proto 'all' - - uci_add firewall redirect - uci_set firewall "$CONFIG_SECTION" proto any - uci_set firewall "$CONFIG_SECTION" name Exclude-IPsec-from-NAT - uci_set firewall "$CONFIG_SECTION" extra '-m policy --dir out --pol ipsec' - uci_set firewall "$CONFIG_SECTION" vpn_type IPsec - uci_set firewall "$CONFIG_SECTION" target ACCEPT - uci_set firewall "$CONFIG_SECTION" dest wan - uci_set firewall "$CONFIG_SECTION" enabled 1 - - uci_commit firewall -} - -rm -f /etc/config/strongswan - -exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/50_migrate_pptp_l2tp_sstp b/root/target/linux/ipq40xx/base-files/etc/uci-defaults/50_migrate_pptp_l2tp_sstp deleted file mode 100644 index 2c470f93..00000000 --- a/root/target/linux/ipq40xx/base-files/etc/uci-defaults/50_migrate_pptp_l2tp_sstp +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh -#this script move configuration from 1.x firmware -#it should rename some sections and add option disabled to network config - -move_config() { - local section="$1" - local file="$2" - - config_get_bool enabled "$1" "enabled" "0" - config_get _name "$1" "_name" - config_get _type "$1" "_type" - [ -z "$_type" ] && config_get _type "$1" "type" - [ "$enabled" -eq 1 ] && [ "$_type" = "client" ] && { - uci set network."$1".auto=1 - uci_commit "${config}" - } - [ "${_type}_${_name}" = "$section" ] && return - uci_rename "$file" "$section" "${_type:+${_type}_}${_name}" - uci_commit "${config}" -} - -move_network() { - local section="$1" - local net_proto net_name net_type net_enabled - - config_get net_proto "$section" "proto" - - case "$net_proto" in - pptp|\ - l2tp) - config_get net_name "$1" "_name" - config_get_bool net_enabled "$1" "enabled" - [ "client_${net_name}" = "$section" ] && return - [ -n "$net_enabled" ] && { - [ "$net_enabled" = "1" ] && uci_set network "$section" disabled 0 || uci_set network "$section" disabled 1 - uci_remove network "$section" enabled - } - uci_rename network "$section" "${net_type:+${net_type}_}${net_name}" - uci_commit network - - ;; - sstp) - config_get_bool net_enabled "$1" "enabled" - [ -z "$net_enabled" ] && return - [ "$net_enabled" = "1" ] && uci_set network "$section" disabled 0 || uci_set network "$section" disabled 1 - uci_remove network "$section" enabled - uci_commit network - ;; - *) - return - ;; - esac -} - -# removes client configurations, because they reside in network and with vuci became unncessary -remove_network() { - local section="$1" - local current_config="$2" - local sectionType - config_get sectionType "$1" "type" - if [ "$sectionType" = "client" ]; then - uci_remove "$current_config" "$section" - uci_commit "$current_config" - fi -} - -configs="pptpd xl2tpd" - -for config in $configs; do - [ -s /etc/config/${config} ] || continue - config_load "$config" - config_foreach move_config "service" "$config" - config_foreach remove_network "service" "$config" -done - -[ -s /etc/config/network ] || exit 0 -config_load "network" -config_foreach move_network "interface" - -exit 0 diff --git a/root/target/linux/ipq40xx/base-files/lib/preinit/75_stm32_autoflash b/root/target/linux/ipq40xx/base-files/lib/preinit/75_stm32_autoflash deleted file mode 100644 index 5d96b340..00000000 --- a/root/target/linux/ipq40xx/base-files/lib/preinit/75_stm32_autoflash +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -do_stm32_autoflash() { - # launch STM32 flash utility - [ -e "/sys/r2ec/reset" -a -f /usr/bin/autoflash ] && { - /usr/bin/autoflash - } -} - -[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_stm32_autoflash diff --git a/root/target/linux/ipq40xx/base-files/lib/preinit/82_version_migrate b/root/target/linux/ipq40xx/base-files/lib/preinit/82_version_migrate deleted file mode 100644 index 565ac215..00000000 --- a/root/target/linux/ipq40xx/base-files/lib/preinit/82_version_migrate +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006 OpenWrt.org -# Copyright (C) 2010 Vertical Communications - -do_check_version() { - version="$(uci -q get system.@system[0].device_fw_version)" - [ -z "$version" ] && { - return 0 - } - - numeric_version="${version##*_}" - client_removed="${numeric_version#*.}" - major="${client_removed%%.*}" - - [ -f /sysupgrade.tgz ] && [ -n "$major" ] && [ "$major" -lt 2 ] && { - echo "- migration work -" - cp /rom/etc/inittab /etc/inittab - } -} - -[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_check_version diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-08_10.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-08_10.dts deleted file mode 100644 index 0404ede3..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-08_10.dts +++ /dev/null @@ -1,57 +0,0 @@ -#include "qcom-ipq4018-rutx-common.dtsi" -#include "qcom-ipq4018-rutx-shiftreg.dtsi" - -/ { - model = "RUTX08/10"; - - soc { - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_modem_reset { - gpio-export,name = "modem_reset"; - gpio-export,output = <0>; - gpios = <&shift_io 1 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem_power { - gpio-export,name = "modem_power"; - gpio-export,output = <0>; - gpios = <&shift_io 2 GPIO_ACTIVE_HIGH>; - }; - - gpio_sim_select { - gpio-export,name = "sim_sel"; - gpio-export,output = <1>; - gpios = <&shift_io 3 GPIO_ACTIVE_HIGH>; - }; - - gpio_out_1 { - gpio-export,name = "gpio23"; - gpio-export,output = <0>; - gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>; - }; - - gpio_in_1 { - gpio-export,name = "gpio24"; - gpio-export,input = <0>; - gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_wifi_24 { - label = "wifi_gen_2"; - gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>; - }; - - led_wifi_50 { - label = "wifi_gen_5"; - gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-09_11.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-09_11.dts deleted file mode 100644 index 707011a4..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-09_11.dts +++ /dev/null @@ -1,122 +0,0 @@ -#include "qcom-ipq4018-rutx-common.dtsi" -#include "qcom-ipq4018-rutx-shiftreg.dtsi" - -/ { - model = "RUTX09/11"; - - soc { - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_modem_reset { - gpio-export,name = "modem_reset"; - gpio-export,output = <0>; - gpios = <&shift_io 1 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem_power { - gpio-export,name = "modem_power"; - gpio-export,output = <0>; - gpios = <&shift_io 2 GPIO_ACTIVE_HIGH>; - }; - - gpio_sim_select { - gpio-export,name = "sim_sel"; - gpio-export,output = <1>; - gpios = <&shift_io 3 GPIO_ACTIVE_LOW>; - }; - - gpio_out_1 { - gpio-export,name = "gpio23"; - gpio-export,output = <0>; - gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>; - }; - - gpio_in_1 { - gpio-export,name = "gpio24"; - gpio-export,input = <0>; - gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_wan_sim1 { - label = "wan_sim_1"; - gpios = <&shift_io 21 GPIO_ACTIVE_HIGH>; - }; - - led_wan_sim2 { - label = "wan_sim_2"; - gpios = <&shift_io 22 GPIO_ACTIVE_HIGH>; - }; - - led_wan_eth { - label = "wan_wifi_4"; // not wan_eth_3 ! - gpios = <&shift_io 13 GPIO_ACTIVE_HIGH>; - }; - - led_wan_wifi { - label = "wan_eth_3"; // not wan_wifi_4 ! - gpios = <&shift_io 20 GPIO_ACTIVE_HIGH>; - }; - - led_gen_2 { - label = "mob_gen_2"; - gpios = <&shift_io 7 GPIO_ACTIVE_HIGH>; - }; - - led_gen_3 { - label = "mob_gen_3"; - gpios = <&shift_io 8 GPIO_ACTIVE_HIGH>; - }; - - led_gen_4 { - label = "mob_gen_4"; - gpios = <&shift_io 9 GPIO_ACTIVE_HIGH>; - }; - - led_ssid_1 { - label = "mob_ssid_1"; - gpios = <&shift_io 10 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_2 { - label = "mob_ssid_2"; - gpios = <&shift_io 11 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_3 { - label = "mob_ssid_3"; - gpios = <&shift_io 12 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_4 { - label = "mob_ssid_4"; - gpios = <&shift_io 14 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_5 { - label = "mob_ssid_5"; - gpios = <&shift_io 15 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_wifi_24 { - label = "wifi_gen_2"; - gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>; - }; - - led_wifi_50 { - label = "wifi_gen_5"; - gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-12.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-12.dts deleted file mode 100644 index d39f64e9..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-12.dts +++ /dev/null @@ -1,149 +0,0 @@ -#include "qcom-ipq4018-rutx-common.dtsi" -#include "qcom-ipq4018-rutx-shiftreg.dtsi" - -/ { - model = "RUTX12"; - - soc { - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_modem_reset { - gpio-export,name = "modem_reset"; - gpio-export,output = <0>; - gpios = <&shift_io 16 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem_power { - gpio-export,name = "modem_power"; - gpio-export,output = <0>; - gpios = <&shift_io 17 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem2_reset { - gpio-export,name = "modem2_reset"; - gpio-export,output = <0>; - gpios = <&shift_io 18 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem2_power { - gpio-export,name = "modem2_power"; - gpio-export,output = <0>; - gpios = <&shift_io 19 GPIO_ACTIVE_HIGH>; - }; - - gpio_out_1 { - gpio-export,name = "gpio23"; - gpio-export,output = <0>; - gpios = <&shift_io 20 GPIO_ACTIVE_HIGH>; - }; - - gpio_in_1 { - gpio-export,name = "gpio24"; - gpio-export,input = <0>; - gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_wan_sim1 { - label = "wan_sim_1"; - gpios = <&shift_io 14 GPIO_ACTIVE_HIGH>; - }; - - led_wan_sim2 { - label = "wan_sim_2"; - gpios = <&shift_io 15 GPIO_ACTIVE_HIGH>; - }; - - led_wan_eth { - label = "wan_wifi_4"; // not wan_eth_3 ! - gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>; - }; - - led_wan_wifi { - label = "wan_eth_3"; // not wan_wifi_4 ! - gpios = <&shift_io 7 GPIO_ACTIVE_HIGH>; - }; - - led_gen_2 { - label = "mob_gen_2"; - gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>; - }; - - led_gen_3 { - label = "mob_gen_3"; - gpios = <&shift_io 4 GPIO_ACTIVE_HIGH>; - }; - - led_gen_4 { - label = "mob_gen_4"; - gpios = <&shift_io 3 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_2 { - label = "mob2_gen_2"; - gpios = <&shift_io 11 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_3 { - label = "mob2_gen_3"; - gpios = <&shift_io 12 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_4 { - label = "mob2_gen_4"; - gpios = <&shift_io 13 GPIO_ACTIVE_HIGH>; - }; - - led_ssid_1 { - label = "mob_ssid_1"; - gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_3 { - label = "mob_ssid_3"; - gpios = <&shift_io 1 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_5 { - label = "mob_ssid_5"; - gpios = <&shift_io 2 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_1 { - label = "mob2_ssid_1"; - gpios = <&shift_io 8 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_3 { - label = "mob2_ssid_3"; - gpios = <&shift_io 9 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_5 { - label = "mob2_ssid_5"; - gpios = <&shift_io 10 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_wifi_24 { - label = "wifi_gen_2"; - gpios = <&shift_io 22 GPIO_ACTIVE_HIGH>; - }; - - led_wifi_50 { - label = "wifi_gen_5"; - gpios = <&shift_io 23 GPIO_ACTIVE_HIGH>; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-R1.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-R1.dts deleted file mode 100644 index 5f30195b..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-R1.dts +++ /dev/null @@ -1,84 +0,0 @@ -#include "qcom-ipq4018-rutx-common.dtsi" -#include "qcom-ipq4018-rutx-shiftreg.dtsi" -#include "qcom-ipq4018-rutx-i2c.dtsi" // SFP - -/ { - model = "RUTXR1"; - - soc { - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_modem_reset { - gpio-export,name = "modem_reset"; - gpio-export,output = <0>; - gpios = <&shift_io 1 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem_power { - gpio-export,name = "modem_power"; - gpio-export,output = <0>; - gpios = <&shift_io 2 GPIO_ACTIVE_HIGH>; - }; - - gpio_sim_select { - gpio-export,name = "sim_sel"; - gpio-export,output = <1>; - gpios = <&shift_io 3 GPIO_ACTIVE_LOW>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_wan_sim1 { - label = "wan_sim_1"; - gpios = <&shift_io 4 GPIO_ACTIVE_HIGH>; - }; - - led_wan_sim2 { - label = "wan_sim_2"; - gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>; - }; - - led_wan_eth { - label = "wan_wifi_4"; // not wan_eth_3 ! - gpios = <&shift_io 11 GPIO_ACTIVE_HIGH>; - }; - - led_wan_mob { - label = "wan_mob_5"; - gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>; - }; - - led_gen_3 { - label = "mob_gen_3"; - gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>; - }; - - led_gen_4 { - label = "mob_gen_4"; - gpios = <&shift_io 7 GPIO_ACTIVE_HIGH>; - }; - - led_ssid_1 { - label = "mob_ssid_1"; - gpios = <&shift_io 8 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_3 { - label = "mob_ssid_3"; - gpios = <&shift_io 9 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_5 { - label = "mob_ssid_5"; - gpios = <&shift_io 10 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-STM32.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-STM32.dts deleted file mode 100644 index c6e53f02..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-STM32.dts +++ /dev/null @@ -1,188 +0,0 @@ -#include "qcom-ipq4018-rutx-common.dtsi" -#include "qcom-ipq4018-rutx-i2c.dtsi" - -/ { - model = "RUTX STM32"; - io_expander = "stm32"; - - soc { - i2c_0: i2c@78b7000 { - stm32_io: stm32@74 { - #gpio-cells = <2>; - compatible = "tlt,stm32v1"; - reg = <0x74>; - gpio-controller; - interrupt-parent = <&tlmm>; - interrupts = <5 2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - gpio-export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_modem_reset { - gpio-export,name = "modem_reset"; - gpio-export,output = <0>; - gpios = <&stm32_io 21 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem_power { - gpio-export,name = "modem_power"; - gpio-export,output = <0>; - gpios = <&stm32_io 20 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem2_reset { - gpio-export,name = "modem2_reset"; - gpio-export,output = <0>; - gpios = <&stm32_io 13 GPIO_ACTIVE_HIGH>; - }; - - gpio_modem2_power { - gpio-export,name = "modem2_power"; - gpio-export,output = <0>; - gpios = <&stm32_io 14 GPIO_ACTIVE_HIGH>; - }; - - gpio_sim_select { - gpio-export,name = "sim_sel"; - gpio-export,output = <1>; - gpios = <&stm32_io 22 GPIO_ACTIVE_LOW>; - }; - - gpio_out_1 { - gpio-export,name = "gpio23"; - gpio-export,output = <0>; - gpio-export,direction_may_change; - gpios = <&stm32_io 23 GPIO_ACTIVE_HIGH>; - }; - - gpio_in_1 { - gpio-export,name = "gpio24"; - gpio-export,input = <0>; - gpio-export,direction_may_change; - gpios = <&stm32_io 24 GPIO_ACTIVE_LOW>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_wan_sim1 { - label = "wan_sim_1"; - gpios = <&stm32_io 0 GPIO_ACTIVE_HIGH>; - }; - - led_wan_sim2 { - label = "wan_sim_2"; - gpios = <&stm32_io 1 GPIO_ACTIVE_HIGH>; - }; - - led_wan_eth { - label = "wan_eth_3"; - gpios = <&stm32_io 2 GPIO_ACTIVE_HIGH>; - }; - - led_wan_wifi { - label = "wan_wifi_4"; - gpios = <&stm32_io 3 GPIO_ACTIVE_HIGH>; - }; - - led_wan_mob { - label = "wan_mob_5"; - gpios = <&stm32_io 16 GPIO_ACTIVE_HIGH>; - }; - - led_gen_2 { - label = "mob_gen_2"; - gpios = <&stm32_io 4 GPIO_ACTIVE_HIGH>; - }; - - led_gen_3 { - label = "mob_gen_3"; - gpios = <&stm32_io 5 GPIO_ACTIVE_HIGH>; - }; - - led_gen_4 { - label = "mob_gen_4"; - gpios = <&stm32_io 6 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_2 { - label = "mob2_gen_2"; - gpios = <&stm32_io 32 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_3 { - label = "mob2_gen_3"; - gpios = <&stm32_io 33 GPIO_ACTIVE_HIGH>; - }; - - led2_gen_4 { - label = "mob2_gen_4"; - gpios = <&stm32_io 34 GPIO_ACTIVE_HIGH>; - }; - - led_ssid_1 { - label = "mob_ssid_1"; - gpios = <&stm32_io 7 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_2 { - label = "mob_ssid_2"; - gpios = <&stm32_io 8 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_3 { - label = "mob_ssid_3"; - gpios = <&stm32_io 9 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_4 { - label = "mob_ssid_4"; - gpios = <&stm32_io 10 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_ssid_5 { - label = "mob_ssid_5"; - gpios = <&stm32_io 11 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_1 { - label = "mob2_ssid_1"; - gpios = <&stm32_io 31 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_3 { - label = "mob2_ssid_3"; - gpios = <&stm32_io 30 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led2_ssid_5 { - label = "mob2_ssid_5"; - gpios = <&stm32_io 29 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "timer"; - }; - - led_wifi_24 { - label = "wifi_gen_2"; - gpios = <&stm32_io 19 GPIO_ACTIVE_HIGH>; - }; - - led_wifi_50 { - label = "wifi_gen_5"; - gpios = <&stm32_io 18 GPIO_ACTIVE_HIGH>; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-common.dtsi b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-common.dtsi deleted file mode 100644 index 974ebfaf..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-common.dtsi +++ /dev/null @@ -1,84 +0,0 @@ -#include "qcom-ipq4019-ap.dk01.1.dtsi" -#include -//#include "platform_name.dtsi" - -/ { - compatible = "teltonika,rutx", "qcom,ap-dk01.1-c2", "qcom,ipq4019"; - - memory { - device_type = "memory"; - reg = <0x80000000 0x10000000>; - }; - - soc { - mdio@90000 { - status = "ok"; - pinctrl-0 = <&mdio_pins>; - pinctrl-names = "default"; - phy-reset-gpio = <&tlmm 62 0>; - - ethphy4: ethernet-phy@4 { - qcom,fiber-enable; - }; - }; - - pinctrl@1000000 { - mdio_pins: mdio_pinmux { - mux_1 { - pins = "gpio53"; - function = "mdio"; - bias-pull-up; - }; - mux_2 { - pins = "gpio52"; - function = "mdc"; - bias-pull-up; - }; - }; - }; - - spi_0: spi@78b5000 { - cs-gpios = <&tlmm 54 0>, <&tlmm 63 0>; - num-cs = <2>; - - mx25l25635f@0 { - compatible = "n25q128a11", "mx25l25635f", "jedec,spi-nor"; - #address-cells = <1>; - #size-cells = <1>; - reg = <0>; - spi-max-frequency = <24000000>; - }; - - mt29f@1 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "spi-nand","spinand,mt29f"; - reg = <1>; - spi-max-frequency = <24000000>; - }; - }; - - gpio_keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&tlmm 4 1>; - linux,code = <0x198>; - }; - }; - - usb3: usb3@8af8800 { - dwc3@8a00000 { - snps,dis_u2_susphy_quirk; - snps,dis_u3_susphy_quirk; - }; - }; - - usb2: usb2@60f8800 { - dwc3@6000000 { - snps,dis_u2_susphy_quirk; - }; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-i2c.dtsi b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-i2c.dtsi deleted file mode 100644 index eab95a62..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-i2c.dtsi +++ /dev/null @@ -1,20 +0,0 @@ -/ { - soc { - pinctrl@1000000 { - i2c_0_pins: i2c_0_pinmux { - mux { - pins = "gpio58", "gpio59"; - function = "blsp_i2c0"; - bias-disable; - }; - }; - }; - - i2c_0: i2c@78b7000 { /* BLSP1 QUP2 */ - pinctrl-0 = <&i2c_0_pins>; - pinctrl-names = "default"; - clock-frequency = <400000>; - status = "ok"; - }; - }; -}; diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-shiftreg.dtsi b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-shiftreg.dtsi deleted file mode 100644 index 38810ce7..00000000 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx-shiftreg.dtsi +++ /dev/null @@ -1,25 +0,0 @@ -/ { - io_expander = "shiftreg_1"; - - soc { - ext_io { - compatible = "spi-gpio"; - #address-cells = <1>; - #size-cells = <0>; - - gpio-sck = <&tlmm 1 GPIO_ACTIVE_HIGH>; // SRCLK - gpio-mosi = <&tlmm 3 GPIO_ACTIVE_HIGH>; // SER - cs-gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>; // RCLK - num-chipselects = <1>; - - shift_io: shift_io@0 { - compatible = "fairchild,74hc595"; - reg = <0>; - gpio-controller; - #gpio-cells = <2>; - registers-number = <3>; - spi-max-frequency = <10000000>; - }; - }; - }; -}; From f82578174385cf57784b2f7282fbed62a9cf25bc Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 14 Mar 2022 08:45:45 +0100 Subject: [PATCH 4/4] Clean RUTX unused files and change for sysupgrade --- .../base-files/lib/preinit/82_modem_power | 20 --- .../base-files/lib/upgrade/platform.sh | 4 +- .../target/linux/ipq40xx/base-files/sbin/mctl | 120 ------------------ .../ipq40xx/base-files/sbin/user_defaults | 14 -- 4 files changed, 3 insertions(+), 155 deletions(-) delete mode 100644 root/target/linux/ipq40xx/base-files/lib/preinit/82_modem_power delete mode 100755 root/target/linux/ipq40xx/base-files/sbin/mctl delete mode 100755 root/target/linux/ipq40xx/base-files/sbin/user_defaults diff --git a/root/target/linux/ipq40xx/base-files/lib/preinit/82_modem_power b/root/target/linux/ipq40xx/base-files/lib/preinit/82_modem_power deleted file mode 100644 index 7db2ecf2..00000000 --- a/root/target/linux/ipq40xx/base-files/lib/preinit/82_modem_power +++ /dev/null @@ -1,20 +0,0 @@ -set_state() { - local label="$1" - local disable - - [ -e "/sys/class/gpio/${label}_power/value" ] || return - - config_get disable ${label} disable - [ "${disable}" -eq 1 ] && \ - /sbin/mctl -s -m "${label}" || \ - /sbin/mctl -p -m "${label}" -} - -do_power_modem() { - [ -z "$(uci -q get system.modem.disable)" ] && /sbin/mctl -p || { - config_load system - config_foreach set_state mctl - } -} - -boot_hook_add preinit_main do_power_modem diff --git a/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index cb8d7658..70dc76ae 100644 --- a/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -184,7 +184,9 @@ platform_do_upgrade() { PART_NAME="inactive" platform_do_upgrade_dualboot_datachk "$1" ;; - teltonika,rutx |\ + teltonika,rutx) + platform_do_upgrade_ipq "$1" + ;; zte,mf286d) CI_UBIPART="rootfs" nand_do_upgrade "$1" diff --git a/root/target/linux/ipq40xx/base-files/sbin/mctl b/root/target/linux/ipq40xx/base-files/sbin/mctl deleted file mode 100755 index f501cc2e..00000000 --- a/root/target/linux/ipq40xx/base-files/sbin/mctl +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/sh - -. /usr/share/libubox/jshn.sh - -PS_ON=1 -PS_OFF=2 - -MPS=0 -MLBL="modem" - -modem_reset() { - local label="$1" - - [ -e "/sys/class/gpio/${label}_reset/value" ] || return - - echo 1 > "/sys/class/gpio/${label}_reset/value" - sleep 1 - echo 0 > "/sys/class/gpio/${label}_reset/value" -} - -modem_off() { - local label="$1" - - [ -e "/sys/class/gpio/${label}_reset/value" ] || return - - echo 1 > "/sys/class/gpio/${label}_reset/value" -} - -modem_power() { - local label="$1" - - [ -e "/sys/class/gpio/${label}_power/value" ] || return - - # simulate power press - echo 1 > "/sys/class/gpio/${label}_power/value" - sleep 1 - echo 0 > "/sys/class/gpio/${label}_power/value" -} - -modem_list() { - local list="modem" - local label - - [ "$(modem_fetch_primary)" -eq 0 ] && { - echo "${list}" - return - } - - for m in /sys/class/gpio/modem*_power; do - label="$(basename $m | awk -F_ '{print $1}')" - [ "${label}" != "modem" ] && list="${list},${label}" - done - - echo "${list}" -} - -modem_fetch_primary() { - local modem modems primary - - json_init - json_load_file "/etc/board.json" - - json_get_keys modems modems - json_select modems - - for modem in $modems; do - json_select "$modem" - json_get_vars primary - - [ -n "$primary" ] && { - echo 1 - return - } - - json_select .. - done - echo 0 -} - -modem_is_available() { - local label="$1" - [ -e "/sys/class/gpio/${label}_power/value" ] -} - -usage() { - cat < -Control modem power state. - -Options: - -p, --power-on power on modem - -s, --shutdown shutdown modem - -r, --reboot reboot modem - -m, --modem