Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
718
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 17.42 KB | None | 0 0
  1. --- a/target/linux/mvebu/image/Makefile
  2. +++ b/target/linux/mvebu/image/Makefile
  3. @@ -157,6 +157,7 @@ $(eval $(call NANDProfile,Caiman,armada-
  4.  $(eval $(call NANDProfile,Cobra,armada-385-linksys-cobra,128KiB,2048,512,2048))
  5.  $(eval $(call NANDProfile,Rango,armada-385-linksys-rango,128KiB,2048,512,2048))
  6.  $(eval $(call NANDProfile,Shelby,armada-385-linksys-shelby,128KiB,2048,512,2048))
  7. +$(eval $(call NANDProfile,Venom,armada-385-linksys-venom,128KiB,2048,512,2048))
  8.  
  9.  # Boards with large NOR, where we want to use UBI
  10.  $(eval $(call UBINORProfile,OpenBlocks-AX-3-4,armada-xp-openblocks-ax3-4,128KiB))
  11. @@ -220,6 +221,16 @@ define Image/Build/Profile/Rango/squashf
  12.     ) > $(BIN_DIR)/$(IMG_PREFIX)-armada-385-linksys-rango-squashfs-factory.img
  13.  endef
  14.  
  15. +# Venom: Linksys WRT32X
  16. +define Image/Build/Profile/Venom/squashfs
  17. +   $(call Image/Build/UbinizeImage,armada-385-linksys-venom,,squashfs, -p 128KiB -m 2048 -s 512 -O 2048)
  18. +   ( \
  19. +       dd if=$(KDIR)/uImage-armada-385-linksys-venom bs=3072k conv=sync; \
  20. +       dd if=$(KDIR)/$(IMG_PREFIX)-armada-385-linksys-venom-squashfs-ubinized.bin \
  21. +       bs=2048 conv=sync; \
  22. +   ) > $(BIN_DIR)/$(IMG_PREFIX)-armada-385-linksys-venom-squashfs-factory.img
  23. +endef
  24. +
  25.  ###
  26.  ### Marvell
  27.  ###
  28. --- a/target/linux/mvebu/profiles/linksys.mk
  29. +++ b/target/linux/mvebu/profiles/linksys.mk
  30. @@ -94,3 +94,14 @@ define Profile/Rango/Description
  31.  endef
  32.  
  33.  $(eval $(call Profile,Rango))
  34. +
  35. +define Profile/Venom
  36. +  NAME:=Linksys WRT32X (Venom)
  37. +  PACKAGES:= kmod-mwlwifi wpad-mini swconfig
  38. +endef
  39. +
  40. +define Profile/Venom/Description
  41. + Package set compatible with the Linksys WRT32X (Venom).
  42. +endef
  43. +
  44. +$(eval $(call Profile,Venom))
  45. --- a/target/linux/mvebu/patches-3.18/099-build_linksys_a385_dts.patch
  46. +++ b/target/linux/mvebu/patches-3.18/099-build_linksys_a385_dts.patch
  47. @@ -1,6 +1,6 @@
  48.  --- a/arch/arm/boot/dts/Makefile
  49.  +++ b/arch/arm/boot/dts/Makefile
  50. -@@ -501,6 +501,10 @@ dtb-$(CONFIG_MACH_ARMADA_375) += \
  51. +@@ -501,6 +501,11 @@ dtb-$(CONFIG_MACH_ARMADA_375) += \
  52.   dtb-$(CONFIG_MACH_ARMADA_38X) += \
  53.     armada-385-db.dtb \
  54.     armada-385-db-ap.dtb \
  55. @@ -8,6 +8,7 @@
  56.  +  armada-385-linksys-cobra.dtb \
  57.  +  armada-385-linksys-rango.dtb \
  58.  +  armada-385-linksys-shelby.dtb \
  59. ++  armada-385-linksys-venom.dtb \
  60.     armada-385-rd.dtb
  61.   dtb-$(CONFIG_MACH_ARMADA_XP) += \
  62.     armada-xp-axpwifiap.dtb \
  63. --- a/target/linux/mvebu/patches-3.18/209-solidrun_clearfog.patch
  64. +++ b/target/linux/mvebu/patches-3.18/209-solidrun_clearfog.patch
  65. @@ -1,9 +1,9 @@
  66.  --- a/arch/arm/boot/dts/Makefile
  67.  +++ b/arch/arm/boot/dts/Makefile
  68. -@@ -505,6 +505,7 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
  69. -   armada-385-linksys-cobra.dtb \
  70. +@@ -506,6 +506,7 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
  71.     armada-385-linksys-rango.dtb \
  72.     armada-385-linksys-shelby.dtb \
  73. +   armada-385-linksys-venom.dtb \
  74.  +  armada-388-clearfog.dtb \
  75.     armada-385-rd.dtb
  76.   dtb-$(CONFIG_MACH_ARMADA_XP) += \
  77. --- a/dev/null
  78. +++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-venom.dts
  79. @@ -0,0 +1,409 @@
  80. +/*
  81. + * Device Tree file for the Linksys WRT32X (Venom)
  82. + *
  83. + * Copyright (C) 2017 Imre Kaloz <kaloz@openwrt.org>
  84. + *
  85. + *
  86. + * This file is dual-licensed: you can use it either under the terms
  87. + * of the GPL or the X11 license, at your option. Note that this dual
  88. + * licensing only applies to this file, and not this project as a
  89. + * whole.
  90. + *
  91. + *  a) This file is licensed under the terms of the GNU General Public
  92. + *     License version 2.  This program is licensed "as is" without
  93. + *     any warranty of any kind, whether express or implied.
  94. + *
  95. + * Or, alternatively,
  96. + *
  97. + *  b) Permission is hereby granted, free of charge, to any person
  98. + *     obtaining a copy of this software and associated documentation
  99. + *     files (the "Software"), to deal in the Software without
  100. + *     restriction, including without limitation the rights to use,
  101. + *     copy, modify, merge, publish, distribute, sublicense, and/or
  102. + *     sell copies of the Software, and to permit persons to whom the
  103. + *     Software is furnished to do so, subject to the following
  104. + *     conditions:
  105. + *
  106. + *     The above copyright notice and this permission notice shall be
  107. + *     included in all copies or substantial portions of the Software.
  108. + *
  109. + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  110. + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  111. + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  112. + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  113. + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  114. + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  115. + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  116. + *     OTHER DEALINGS IN THE SOFTWARE.
  117. + */
  118. +
  119. +/dts-v1/;
  120. +#include <dt-bindings/gpio/gpio.h>
  121. +#include <dt-bindings/input/input.h>
  122. +#include "armada-385.dtsi"
  123. +
  124. +/ {
  125. +   model = "Linksys WRT32X";
  126. +   compatible = "linksys,venom", "linksys,armada385", "marvell,armada385",
  127. +            "marvell,armada380";
  128. +
  129. +   chosen {
  130. +       stdout-path = "serial0:115200n8";
  131. +   };
  132. +
  133. +   memory {
  134. +       device_type = "memory";
  135. +       reg = <0x00000000 0x20000000>; /* 512 MB */
  136. +   };
  137. +
  138. +   soc {
  139. +       ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
  140. +             MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
  141. +             MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
  142. +             MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
  143. +             MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
  144. +
  145. +       internal-regs {
  146. +
  147. +           spi@10600 {
  148. +               status = "disabled";
  149. +           };
  150. +
  151. +           i2c@11000 {
  152. +               pinctrl-names = "default";
  153. +               pinctrl-0 = <&i2c0_pins>;
  154. +               status = "okay";
  155. +
  156. +               tmp421@4c {
  157. +                   compatible = "ti,tmp421";
  158. +                   reg = <0x4c>;
  159. +               };
  160. +
  161. +               pca9635@68 {
  162. +                   #address-cells = <1>;
  163. +                   #size-cells = <0>;
  164. +                   compatible = "nxp,pca9635";
  165. +                   reg = <0x68>;
  166. +
  167. +                   wan_amber@0 {
  168. +                       label = "venom:amber:wan";
  169. +                       reg = <0x0>;
  170. +                   };
  171. +
  172. +                   wan_blue@1 {
  173. +                       label = "venom:blue:wan";
  174. +                       reg = <0x1>;
  175. +                   };
  176. +
  177. +                   wlan_2g@2 {
  178. +                       label = "venom:blue:wlan_2g";
  179. +                       reg = <0x2>;
  180. +                   };
  181. +
  182. +                   wlan_5g@3 {
  183. +                       label = "venom:blue:wlan_5g";
  184. +                       reg = <0x3>;
  185. +                   };
  186. +
  187. +                   usb2@5 {
  188. +                       label = "venom:blue:usb2";
  189. +                       reg = <0x5>;
  190. +                   };
  191. +
  192. +                   usb3_1@6 {
  193. +                       label = "venom:blue:usb3_1";
  194. +                       reg = <0x6>;
  195. +                   };
  196. +
  197. +                   usb3_2@7 {
  198. +                       label = "venom:blue:usb3_2";
  199. +                       reg = <0x7>;
  200. +                   };
  201. +
  202. +                   wps_blue@8 {
  203. +                       label = "venom:blue:wps";
  204. +                       reg = <0x8>;
  205. +                   };
  206. +
  207. +                   wps_amber@9 {
  208. +                       label = "venom:amber:wps";
  209. +                       reg = <0x9>;
  210. +                   };
  211. +               };
  212. +           };
  213. +
  214. +           /* J10: VCC, NC, RX, NC, TX, GND  */
  215. +           serial@12000 {
  216. +               status = "okay";
  217. +           };
  218. +
  219. +           ethernet@70000 {
  220. +               status = "okay";
  221. +               phy-mode = "rgmii-id";
  222. +               fixed-link {
  223. +                   speed = <1000>;
  224. +                   full-duplex;
  225. +               };
  226. +           };
  227. +
  228. +           ethernet@34000 {
  229. +               status = "okay";
  230. +               phy-mode = "sgmii";
  231. +               fixed-link {
  232. +                   speed = <1000>;
  233. +                   full-duplex;
  234. +               };
  235. +           };
  236. +
  237. +           mdio {
  238. +               status = "okay";
  239. +           };
  240. +
  241. +           sata@a8000 {
  242. +               status = "okay";
  243. +           };
  244. +
  245. +           /* USB part of the eSATA/USB 2.0 port */
  246. +           usb@58000 {
  247. +               status = "okay";
  248. +           };
  249. +
  250. +           usb3@f8000 {
  251. +               status = "okay";
  252. +               usb-phy = <&usb3_phy>;
  253. +           };
  254. +
  255. +           flash@d0000 {
  256. +               status = "okay";
  257. +               num-cs = <1>;
  258. +               marvell,nand-keep-config;
  259. +               marvell,nand-enable-arbiter;
  260. +               nand-on-flash-bbt;
  261. +
  262. +               partition@0 {
  263. +                   label = "u-boot";
  264. +                   reg = <0x0000000 0x200000>;  /* 2MB */
  265. +                   /* read-only; */
  266. +               };
  267. +
  268. +               partition@200000 {
  269. +                   label = "u_env";
  270. +                   reg = <0x200000 0x20000>;    /* 128KB */
  271. +               };
  272. +
  273. +               partition@220000 {
  274. +                   label = "s_env";
  275. +                   reg = <0x220000 0x40000>;    /* 256KB */
  276. +               };
  277. +
  278. +               partition@180000 {
  279. +                   label = "unused_area";
  280. +                   reg = <0x260000 0x5c0000>;   /* 5.75MB */
  281. +               };
  282. +
  283. +               partition@7e0000 {
  284. +                   label = "devinfo";
  285. +                   reg = <0x7e0000 0x40000>;   /* 256KB */
  286. +                   read-only;
  287. +               };
  288. +
  289. +               /* kernel1 overlaps with rootfs1 by design */
  290. +               partition@900000 {
  291. +                   label = "kernel1";
  292. +                   reg = <0x900000 0x7b00000>;  /* 123MB */
  293. +               };
  294. +
  295. +               partition@c00000 {
  296. +                   label = "rootfs1";
  297. +                   reg = <0xc00000 0x7800000>;  /* 120MB */
  298. +               };
  299. +
  300. +               /* kernel2 overlaps with rootfs2 by design */
  301. +               partition@8400000 {
  302. +                   label = "kernel2";
  303. +                   reg = <0x8400000 0x7b00000>; /* 123MB */
  304. +               };
  305. +
  306. +               partition@8700000 {
  307. +                   label = "rootfs2";
  308. +                   reg = <0x8700000 0x7800000>;  /* 120MB */
  309. +               };
  310. +
  311. +               /* last MB is for the BBT, not writable */
  312. +               partition@ff00000 {
  313. +                   label = "BBT";
  314. +                   reg = <0xff00000 0x100000>;
  315. +               };
  316. +
  317. +           };
  318. +       };
  319. +
  320. +       pcie-controller {
  321. +           status = "okay";
  322. +
  323. +           pcie@1,0 {
  324. +               /* Marvell 88W8964, 5GHz-only */
  325. +               status = "okay";
  326. +
  327. +               mwlwifi {
  328. +                   marvell,2ghz = <0>;
  329. +                   marvell,chainmask = <4 4>;
  330. +               };
  331. +
  332. +           };
  333. +
  334. +           pcie@2,0 {
  335. +               /* Marvell 88W8964, 2GHz-only */
  336. +               status = "okay";
  337. +
  338. +               mwlwifi {
  339. +                   marvell,5ghz = <0>;
  340. +                   marvell,chainmask = <4 4>;
  341. +               };
  342. +
  343. +           };
  344. +       };
  345. +   };
  346. +
  347. +   usb3_phy: usb3_phy {
  348. +       compatible = "usb-nop-xceiv";
  349. +       vcc-supply = <&reg_xhci0_vbus>;
  350. +   };
  351. +
  352. +   reg_xhci0_vbus: xhci0-vbus {
  353. +       compatible = "regulator-fixed";
  354. +       pinctrl-names = "default";
  355. +       pinctrl-0 = <&xhci0_vbus_pins>;
  356. +       regulator-name = "xhci0-vbus";
  357. +       regulator-min-microvolt = <5000000>;
  358. +       regulator-max-microvolt = <5000000>;
  359. +       enable-active-high;
  360. +       gpio = <&gpio1 16 GPIO_ACTIVE_HIGH>;
  361. +   };
  362. +
  363. +   gpio_keys {
  364. +       compatible = "gpio-keys";
  365. +       #address-cells = <1>;
  366. +       #size-cells = <0>;
  367. +       pinctrl-0 = <&keys_pin>;
  368. +       pinctrl-names = "default";
  369. +
  370. +       button@1 {
  371. +           label = "WPS";
  372. +           linux,code = <KEY_WPS_BUTTON>;
  373. +           gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
  374. +       };
  375. +
  376. +       button@2 {
  377. +           label = "Factory Reset Button";
  378. +           linux,code = <KEY_RESTART>;
  379. +           gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
  380. +       };
  381. +   };
  382. +
  383. +   gpio-leds {
  384. +       compatible = "gpio-leds";
  385. +       pinctrl-0 = <&power_led_pin &sata_led_pin>;
  386. +       pinctrl-names = "default";
  387. +
  388. +       power {
  389. +           gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
  390. +           default-state = "on";
  391. +       };
  392. +
  393. +       sata {
  394. +           gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
  395. +           default-state = "off";
  396. +       };
  397. +   };
  398. +
  399. +   dsa@0 {
  400. +       compatible = "marvell,dsa";
  401. +       #address-cells = <2>;
  402. +       #size-cells = <0>;
  403. +
  404. +       dsa,ethernet = <&eth2>;
  405. +       dsa,mii-bus = <&mdio>;
  406. +
  407. +       switch@0 {
  408. +           #address-cells = <1>;
  409. +           #size-cells = <0>;
  410. +           reg = <0x0 0>/* MDIO address 0, switch 0 in tree */
  411. +
  412. +           port@0 {
  413. +               reg = <0>;
  414. +               label = "lan4";
  415. +           };
  416. +
  417. +           port@1 {
  418. +               reg = <1>;
  419. +               label = "lan3";
  420. +           };
  421. +
  422. +           port@2 {
  423. +               reg = <2>;
  424. +               label = "lan2";
  425. +           };
  426. +
  427. +           port@3 {
  428. +               reg = <3>;
  429. +               label = "lan1";
  430. +           };
  431. +
  432. +           port@4 {
  433. +               reg = <4>;
  434. +               label = "wan";
  435. +           };
  436. +
  437. +           port@5 {
  438. +               reg = <5>;
  439. +               label = "cpu";
  440. +           };
  441. +       };
  442. +   };
  443. +
  444. +   gpio-leds {
  445. +       power {
  446. +           label = "venom:blue:power";
  447. +       };
  448. +
  449. +       sata {
  450. +           label = "venom:blue:sata";
  451. +       };
  452. +   };
  453. +
  454. +   mvsw61xx {
  455. +       #address-cells = <1>;
  456. +       #size-cells = <0>;
  457. +       compatible = "marvell,88e6352";
  458. +       status = "okay";
  459. +       reg = <0x10>;
  460. +
  461. +       mii-bus = <&mdio>;
  462. +       cpu-port-0 = <5>;
  463. +       cpu-port-1 = <6>;
  464. +   };
  465. +
  466. +};
  467. +
  468. +&pinctrl {
  469. +   keys_pin: keys-pin {
  470. +       marvell,pins = "mpp24", "mpp29";
  471. +       marvell,function = "gpio";
  472. +   };
  473. +
  474. +   power_led_pin: power-led-pin {
  475. +       marvell,pins = "mpp56";
  476. +       marvell,function = "gpio";
  477. +   };
  478. +
  479. +   sata_led_pin: sata-led-pin {
  480. +       marvell,pins = "mpp21";
  481. +       marvell,function = "gpio";
  482. +   };
  483. +
  484. +   xhci0_vbus_pins: xhci0-vbus-pins {
  485. +       marvell,pins = "mpp47";
  486. +       marvell,function = "gpio";
  487. +   };
  488. +};
  489. --- a/target/linux/mvebu/base-files/etc/diag.sh
  490. +++ b/target/linux/mvebu/base-files/etc/diag.sh
  491. @@ -6,6 +6,21 @@
  492.  
  493.  get_status_led() {
  494.     case $(mvebu_board_name) in
  495. +   armada-385-linksys-caiman)
  496. +       status_led="caiman:white:power"
  497. +       ;;
  498. +   armada-385-linksys-cobra)
  499. +       status_led="cobra:white:power"
  500. +       ;;
  501. +   armada-385-linksys-rango)
  502. +       status_led="rango:white:power"
  503. +       ;;
  504. +   armada-385-linksys-shelby)
  505. +       status_led="shelby:white:power"
  506. +       ;;
  507. +   armada-385-linksys-venom)
  508. +       status_led="venom:blue:power"
  509. +       ;;
  510.     armada-xp-linksys-mamba)
  511.         status_led="mamba:white:power"
  512.         ;;
  513. --- a/target/linux/mvebu/base-files/etc/uci-defaults/01_leds
  514. +++ b/target/linux/mvebu/base-files/etc/uci-defaults/01_leds
  515. @@ -29,6 +29,10 @@ armada-385-linksys-shelby)
  516.     ucidef_set_led_usbdev "usb2" "USB2" "pca963x:shelby:white:usb2" "1-1"
  517.     ucidef_set_led_usbdev "usb3" "USB3" "pca963x:shelby:white:usb3_1" "2-1"
  518.     ;;
  519. +armada-385-linksys-venom)
  520. +   ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "eth0"
  521. +   ucidef_set_led_usbdev "usb2" "USB2" "pca963x:venom:blue:usb2" "1-1"
  522. +   ucidef_set_led_usbdev "usb3" "USB3" "pca963x:venom:blue:usb3_1" "2-1"
  523.  armada-xp-linksys-mamba)
  524.     ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "eth1"
  525.     ucidef_set_led_usbdev "usb2" "USB2" "mamba:white:usb2" "1-1"
  526. --- a/target/linux/mvebu/base-files/etc/uci-defaults/02_network
  527. +++ b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
  528. @@ -27,6 +27,9 @@ armada-385-linksys-rango)
  529.  armada-385-linksys-shelby)
  530.     ucidef_set_interfaces_lan_wan "eth1" "eth0"
  531.     ;;
  532. +armada-385-linksys-venom)
  533. +   ucidef_set_interfaces_lan_wan "eth1" "eth0"
  534. +   ;;
  535.  armada-xp-linksys-mamba)
  536.     ucidef_set_interfaces_lan_wan "eth0" "eth1"
  537.     ucidef_add_switch "switch0" "1" "1"
  538. --- a/target/linux/mvebu/base-files/etc/uci-defaults/03_wireless
  539. +++ b/target/linux/mvebu/base-files/etc/uci-defaults/03_wireless
  540. @@ -10,7 +10,7 @@
  541.  board=$(mvebu_board_name)
  542.  
  543.  case "$board" in
  544. -armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-xp-linksys-mamba)
  545. +armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba)
  546.     SKU=$(strings /dev/mtd3|sed -ne 's/^cert_region=//p')
  547.     case "$SKU" in
  548.         AP)
  549. --- a/target/linux/mvebu/base-files/etc/init.d/linksys_recovery
  550. +++ b/target/linux/mvebu/base-files/etc/init.d/linksys_recovery
  551. @@ -7,7 +7,7 @@ boot() {
  552.  . /lib/mvebu.sh
  553.  
  554.  case $(mvebu_board_name) in
  555. -   armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
  556. +   armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba)
  557.         # make sure auto_recovery in uboot is always on
  558.         AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`"
  559.         if [ "$AUTO_RECOVERY_ENA" != "yes" ] ; then
  560. --- a/target/linux/mvebu/base-files/lib/mvebu.sh
  561. +++ b/target/linux/mvebu/base-files/lib/mvebu.sh
  562. @@ -46,6 +46,9 @@ mvebu_board_detect() {
  563.     *"Linksys WRT3200ACM")
  564.         name="armada-385-linksys-rango"
  565.         ;;
  566. +   *"Linksys WRT32X")
  567. +       name="armada-385-linksys-venom"
  568. +       ;;
  569.     *"Marvell Armada 385 Access Point Development Board")
  570.         name="armada-385-db-ap"
  571.         ;;
  572. --- a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
  573. +++ b/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
  574. @@ -15,7 +15,7 @@ preinit_set_mac_address() {
  575.         ifconfig eth0 hw ether $mac 2>/dev/null
  576.         ifconfig eth1 hw ether $mac_wan 2>/dev/null
  577.         ;;
  578. -   armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby)
  579. +   armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom)
  580.         mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
  581.         mac_wan=$(macaddr_setbit_la "$mac")
  582.         ifconfig eth1 hw ether $mac 2>/dev/null
  583. --- a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
  584. +++ b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
  585. @@ -8,7 +8,7 @@ preinit_mount_syscfg() {
  586.     . /lib/mvebu.sh
  587.  
  588.     case $(mvebu_board_name) in
  589. -   armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
  590. +   armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba)
  591.         needs_recovery=0
  592.         syscfg_part=$(grep syscfg /proc/mtd |cut -c4)
  593.         ubiattach -m $syscfg_part || needs_recovery=1
  594. --- a/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
  595. +++ b/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
  596. @@ -55,7 +55,7 @@ platform_do_upgrade_linksys() {
  597.  
  598.         nand_upgrade_tar "$1"
  599.     }
  600. -   [ "$magic_long" = "27051956" ] && {
  601. +   [ "$magic_long" = "27051956" -o "$magic_long" = "0000a0e1" ] && {
  602.         # check firmwares' rootfs types
  603.         local target_mtd=$(find_mtd_part $part_label)
  604.         local oldroot="$(linksys_get_root_magic $target_mtd)"
  605. --- a/target/linux/mvebu/base-files/lib/upgrade/platform.sh
  606. +++ b/target/linux/mvebu/base-files/lib/upgrade/platform.sh
  607. @@ -20,6 +20,13 @@ platform_check_image() {
  608.         }
  609.         return 0;
  610.         ;;
  611. +   armada-385-linksys-venom)
  612. +       [ "$magic_long" != "0000a0e1" -a "$magic_long" != "73797375" ] && {
  613. +           echo "Invalid image type."
  614. +           return 1
  615. +       }
  616. +       return 0;
  617. +       ;;
  618.     esac
  619.  
  620.     echo "Sysupgrade is not yet supported on $board."
  621. @@ -30,7 +37,7 @@ platform_do_upgrade() {
  622.     local board=$(mvebu_board_name)
  623.  
  624.     case "$board" in
  625. -   armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
  626. +   armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba)
  627.         platform_do_upgrade_linksys "$ARGV"
  628.         ;;
  629.     *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement