SHARE
TWEET

i.onik WiFi Cloud Hub OpenWRT build by Ligius

a guest Feb 24th, 2017 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  package/kernel/mac80211/files/lib/wifi/mac80211.sh |  2 +-
  2.  .../linux/ramips/base-files/etc/board.d/02_network |  1 +
  3.  target/linux/ramips/base-files/etc/diag.sh         |  1 +
  4.  target/linux/ramips/base-files/lib/ramips.sh       |  3 +
  5.  .../ramips/base-files/lib/upgrade/platform.sh      |  1 +
  6.  target/linux/ramips/dts/IONIKCLOUDHUB.dts          | 99 ++++++++++++++++++++++
  7.  target/linux/ramips/image/rt305x.mk                |  2 +
  8.  target/linux/ramips/rt305x/config-4.4              |  2 +-
  9.  .../linux/ramips/rt305x/profiles/ionikcloudhub.mk  | 20 +++++
  10.  9 files changed, 129 insertions(+), 2 deletions(-)
  11.  
  12. diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
  13. index 06f3b8b..a939e1e 100644
  14. --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
  15. +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
  16. @@ -117,7 +117,7 @@ config wifi-device  radio$devidx
  17.  $dev_id
  18.  $ht_capab
  19.     # REMOVE THIS LINE TO ENABLE WIFI:
  20. -   option disabled 1
  21. +   # option disabled 1
  22.  
  23.  config wifi-iface
  24.     option device   radio$devidx
  25. diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
  26. index 6157d87..fce13e4 100755
  27. --- a/target/linux/ramips/base-files/etc/board.d/02_network
  28. +++ b/target/linux/ramips/base-files/etc/board.d/02_network
  29. @@ -142,6 +142,7 @@ ramips_setup_interfaces()
  30.             "0:lan" "1:wan" "6@eth0"
  31.         ;;
  32.     b2c|\
  33. +   ionik-cloud-hub|\
  34.     nw718|\
  35.     psr-680w|\
  36.     sl-r7205|\
  37. diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
  38. index 0c5abb2..f55415b 100644
  39. --- a/target/linux/ramips/base-files/etc/diag.sh
  40. +++ b/target/linux/ramips/base-files/etc/diag.sh
  41. @@ -138,6 +138,7 @@ get_status_led() {
  42.         status_led="$board:blue:status"
  43.         ;;
  44.     miwifi-mini|\
  45. +   ionik-cloud-hub|\
  46.     zte-q7)
  47.         status_led="$board:red:status"
  48.         ;;
  49. diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
  50. index 10139d7..96f8f4d 100755
  51. --- a/target/linux/ramips/base-files/lib/ramips.sh
  52. +++ b/target/linux/ramips/base-files/lib/ramips.sh
  53. @@ -217,6 +217,9 @@ ramips_board_detect() {
  54.     *"HW550-3G")
  55.         name="hw550-3g"
  56.         ;;
  57. +   *"i.onik Wi-Fi Cloud Hub")
  58. +       name="ionik-cloud-hub"
  59. +       ;;
  60.     *"IP2202")
  61.         name="ip2202"
  62.         ;;
  63. diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
  64. index e3bea00..778c0c2 100755
  65. --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
  66. +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
  67. @@ -68,6 +68,7 @@ platform_check_image() {
  68.     ht-tm02|\
  69.     hw550-3g|\
  70.     ip2202|\
  71. +   ionik-cloud-hub|\
  72.     jhr-n805r|\
  73.     jhr-n825r|\
  74.     jhr-n926r|\
  75. diff --git a/target/linux/ramips/dts/IONIKCLOUDHUB.dts b/target/linux/ramips/dts/IONIKCLOUDHUB.dts
  76. new file mode 100644
  77. index 0000000..e58a252
  78. --- /dev/null
  79. +++ b/target/linux/ramips/dts/IONIKCLOUDHUB.dts
  80. @@ -0,0 +1,99 @@
  81. +/dts-v1/;
  82. +
  83. +#include "rt5350.dtsi"
  84. +
  85. +/ {
  86. +   compatible = "IONIKCLOUDHUB", "ralink,rt5350-soc";
  87. +   model = "i.onik Wi-Fi Cloud Hub";
  88. +
  89. +   gpio-leds {
  90. +       compatible = "gpio-leds";
  91. +
  92. +       status {
  93. +           label = "ionikcloudhub:red:status";
  94. +           gpios = <&gpio0 9 1>;
  95. +       };
  96. +   };
  97. +
  98. +   gpio-keys-polled {
  99. +       compatible = "gpio-keys-polled";
  100. +       #address-cells = <1>;
  101. +       #size-cells = <0>;
  102. +       poll-interval = <20>;
  103. +
  104. +       power {
  105. +           label = "power";
  106. +           gpios = <&gpio0 0 1>;
  107. +           linux,code = <0x116>;
  108. +       };
  109. +
  110. +       reset {
  111. +           label = "reset";
  112. +           gpios = <&gpio0 10 1>;
  113. +           linux,code = <0x198>;
  114. +       };
  115. +   };
  116. +};
  117. +
  118. +
  119. +&spi0 {
  120. +   status = "okay";
  121. +
  122. +   en25q64@0 {
  123. +       #address-cells = <1>;
  124. +       #size-cells = <1>;
  125. +       compatible = "jedec,spi-nor";
  126. +       reg = <0>;
  127. +       linux,modalias = "m25p80", "en25q64";
  128. +       spi-max-frequency = <10000000>;
  129. +
  130. +       partition@0 {
  131. +           label = "u-boot";
  132. +           reg = <0x0 0x30000>;
  133. +           read-only;
  134. +       };
  135. +
  136. +       partition@30000 {
  137. +           label = "u-boot-env";
  138. +           reg = <0x30000 0x10000>;
  139. +           read-only;
  140. +       };
  141. +
  142. +       factory: partition@40000 {
  143. +           label = "factory";
  144. +           reg = <0x40000 0x10000>;
  145. +           read-only;
  146. +       };
  147. +
  148. +       partition@50000 {
  149. +           label = "recover";
  150. +           reg = <0x50000 0x1c0000>;
  151. +       };
  152. +
  153. +       partition@210040 {
  154. +           label = "firmware";
  155. +           reg = <0x210000 0x5f0000>;
  156. +       };
  157. +   };
  158. +};
  159. +
  160. +&pinctrl {
  161. +   state_default: pinctrl0 {
  162. +       gpio {
  163. +           ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
  164. +           ralink,function = "gpio";
  165. +       };
  166. +   };
  167. +};
  168. +
  169. +&ehci {
  170. +   status = "okay";
  171. +};
  172. +
  173. +&ohci {
  174. +   status = "okay";
  175. +};
  176. +
  177. +&wmac {
  178. +   ralink,mtd-eeprom = <&factory 0>;
  179. +};
  180. diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk
  181. index 9617574..94e1b76 100644
  182. --- a/target/linux/ramips/image/rt305x.mk
  183. +++ b/target/linux/ramips/image/rt305x.mk
  184. @@ -280,6 +280,7 @@ Image/Build/Profile/WCR150GN=$(call BuildFirmware/Default4M/$(1),$(1),wcr150gn,W
  185.  Image/Build/Profile/MZK-DP150N=$(call BuildFirmware/Default4M/$(1),$(1),mzk-dp150n,MZK-DP150N)
  186.  Image/Build/Profile/WHRG300N=$(call BuildFirmware/WHRG300N/$(1),$(1))
  187.  Image/Build/Profile/WIZARD8800=$(call BuildFirmware/Default8M/$(1),$(1),wizard-8800,WIZARD8800,Linux Kernel Image)
  188. +Image/Build/Profile/IONIKCLOUDHUB=$(call BuildFirmware/Default8M/$(1),$(1),ionik-cloud-hub,IONIKCLOUDHUB,Linux Kernel Image)
  189.  Image/Build/Profile/WIZFI630A=$(call BuildFirmware/Default16M/$(1),$(1),wizfi630a,WIZFI630A)
  190.  Image/Build/Profile/WL-330N=$(call BuildFirmware/Default4M/$(1),$(1),wl-330n,WL-330N)
  191.  Image/Build/Profile/WL-330N3G=$(call BuildFirmware/Default4M/$(1),$(1),wl-330n3g,WL-330N3G)
  192. @@ -336,6 +337,7 @@ define Image/Build/Profile/Default
  193.     $(call Image/Build/Profile/FREESTATION5,$(1))
  194.  #  $(call Image/Build/Profile/HG255D,$(1))
  195.     $(call Image/Build/Profile/HLKRM04,$(1))
  196. +   $(call Image/Build/Profile/IONIKCLOUDHUB,$(1))
  197.     $(call Image/Build/Profile/HT-TM02,$(1))
  198.     $(call Image/Build/Profile/HW550-3G,$(1))
  199.     $(call Image/Build/Profile/IP2202,$(1))
  200. diff --git a/target/linux/ramips/rt305x/config-4.4 b/target/linux/ramips/rt305x/config-4.4
  201. index 9911d92..71697b4 100644
  202. --- a/target/linux/ramips/rt305x/config-4.4
  203. +++ b/target/linux/ramips/rt305x/config-4.4
  204. @@ -23,7 +23,7 @@ CONFIG_CLKSRC_MMIO=y
  205.  CONFIG_CLKSRC_OF=y
  206.  CONFIG_CLKSRC_PROBE=y
  207.  CONFIG_CLONE_BACKWARDS=y
  208. -CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
  209. +CONFIG_CMDLINE="rootfstype=squashfs,jffs2 mem=64M"
  210.  CONFIG_CMDLINE_BOOL=y
  211.  # CONFIG_CMDLINE_OVERRIDE is not set
  212.  CONFIG_CPU_GENERIC_DUMP_TLB=y
  213. diff --git a/target/linux/ramips/rt305x/profiles/ionikcloudhub.mk b/target/linux/ramips/rt305x/profiles/ionikcloudhub.mk
  214. new file mode 100644
  215. index 0000000..ee6c92d
  216. --- /dev/null
  217. +++ b/target/linux/ramips/rt305x/profiles/ionikcloudhub.mk
  218. @@ -0,0 +1,20 @@
  219. +#
  220. +# Copyright (C) 2013 OpenWrt.org
  221. +#
  222. +# This is free software, licensed under the GNU General Public License v2.
  223. +# See /LICENSE for more information.
  224. +#
  225. +
  226. +define Profile/IONIKCLOUDHUB
  227. +   NAME:=IONIK CLOUD HUB
  228. +   PACKAGES:=\
  229. +       kmod-ledtrig-netdev kmod-ledtrig-timer kmod-leds-gpio \
  230. +       kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-net usbutils \
  231. +       kmod-scsi-core kmod-scsi-generic kmod-fs-ext4 kmod-fs-msdos \
  232. +       kmod-usb-storage kmod-usb-storage-extras block-mount
  233. +endef
  234. +
  235. +define Profile/IONIKCLOUDHUB/Description
  236. +   Package set for i.onik Wi-Fi Cloud Hub
  237. +endef
  238. +$(eval $(call Profile,IONIKCLOUDHUB))
RAW Paste Data
Top