From 7e3973ef27e3e67f9d53adda26f50914a3555990 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 19 Oct 2023 12:04:04 +0200 Subject: [PATCH] Remove not used patches --- .../ipq40xx.new/base-files/bin/board_detect | 14 - .../ipq40xx.new/base-files/bin/board_modem | 346 --- .../ipq40xx.new/base-files/bin/board_track | 47 - .../base-files/bin/config_generate | 824 ------- .../ipq40xx.new/base-files/bin/ipcalc.sh | 71 - .../base-files/etc/board.d/02_network | 235 -- .../base-files/etc/board.d/1-board_json | 515 ----- .../etc/hotplug.d/firmware/11-ath10k-caldata | 332 --- .../etc/hotplug.d/ieee80211/09_fix_wifi_mac | 23 - .../ipq40xx.new/base-files/etc/init.d/boot | 70 - .../ipq40xx.new/base-files/etc/init.d/done | 13 - .../base-files/etc/init.d/gpio_switch | 66 - .../ipq40xx.new/base-files/etc/init.d/led | 140 -- .../base-files/etc/init.d/modem_tracker | 37 - .../base-files/etc/init.d/ntpserver | 28 - .../base-files/etc/init.d/powerctl | 32 - .../ipq40xx.new/base-files/etc/init.d/sysctl | 46 - .../base-files/etc/init.d/sysfixtime | 34 - .../ipq40xx.new/base-files/etc/init.d/system | 45 - .../ipq40xx.new/base-files/etc/init.d/umount | 13 - .../base-files/etc/uci-defaults/01_mnf-info | 26 - .../etc/uci-defaults/04_migrate-vlan | 34 - .../base-files/lib/functions/board.sh | 54 - .../base-files/lib/functions/migrate.sh | 196 -- .../base-files/lib/functions/network.sh | 313 --- .../lib/functions/teltonika-defaults.sh | 143 -- .../lib/functions/teltonika-functions.sh | 68 - .../base-files/lib/functions/uci-defaults.sh | 726 ------- .../base-files/lib/preinit/82_modem_power | 23 - .../base-files/lib/upgrade/ipq_failsafe.sh | 383 ---- .../base-files/lib/upgrade/platform.sh | 222 -- .../ipq40xx.new/base-files/lib/upgrade/stage2 | 147 -- .../linux/ipq40xx.new/base-files/sbin/mctl | 120 -- .../ipq40xx.new/base-files/sbin/mnf_info | 10 - .../base-files/usr/share/art/art_rutx.bin | Bin 65536 -> 0 bytes 6.6/target/linux/ipq40xx.new/config-6.1 | 540 ----- .../linux/ipq40xx.new/dts/platform_name.dtsi | 1 - .../ipq40xx.new/dts/qcom-ipq4018-rutx-08.dts | 24 - .../dts/qcom-ipq4018-rutx-08_STM32.dts | 26 - .../ipq40xx.new/dts/qcom-ipq4018-rutx-09.dts | 106 - .../dts/qcom-ipq4018-rutx-09_STM32.dts | 108 - .../ipq40xx.new/dts/qcom-ipq4018-rutx-10.dts | 38 - .../dts/qcom-ipq4018-rutx-10_STM32.dts | 40 - .../ipq40xx.new/dts/qcom-ipq4018-rutx-11.dts | 121 -- .../dts/qcom-ipq4018-rutx-11_STM32.dts | 123 -- .../ipq40xx.new/dts/qcom-ipq4018-rutx-12.dts | 148 -- .../dts/qcom-ipq4018-rutx-12_STM32.dts | 150 -- .../ipq40xx.new/dts/qcom-ipq4018-rutx-14.dts | 98 - .../dts/qcom-ipq4018-rutx-14_STM32.dts | 100 - .../ipq40xx.new/dts/qcom-ipq4018-rutx-50.dts | 110 - .../ipq40xx.new/dts/qcom-ipq4018-rutx-R1.dts | 83 - .../dts/qcom-ipq4018-rutx-R1_STM32.dts | 82 - .../dts/qcom-ipq4018-rutx-STM32.dtsi | 21 - .../dts/qcom-ipq4018-rutx-common.dtsi | 84 - .../dts/qcom-ipq4018-rutx-i2c.dtsi | 20 - .../dts/qcom-ipq4018-rutx-shiftreg.dtsi | 27 - .../files/drivers/net/phy/qca807x.c | 859 -------- 6.6/target/linux/ipq40xx.new/image/generic.mk | 1255 ----------- .../uboot_fw/appsboardconfig_premium_tlt | 80 - .../image/uboot_fw/boardconfig_premium_tlt | 79 - .../uboot_fw/norplusnand-apps-flash.conf | 17 - .../image/uboot_fw/norplusnand-flash.conf | 53 - .../norplusnand-system-partition-ipq40xx.bin | Bin 65536 -> 0 bytes .../linux/ipq40xx.new/image/uboot_fw/pack.py | 1908 ----------------- .../104-clk-fix-apss-cpu-overclocking.patch | 115 - .../300-clk-qcom-ipq4019-add-ess-reset.patch | 52 - ...-compressed-add-appended-DTB-section.patch | 48 - ...d-set-ipq40xx-watchdog-to-allow-boot.patch | 66 - .../420-firmware-qcom-scm-disable-SDI.patch | 47 - ...-firmware-qcom-scm-cold-boot-address.patch | 121 -- ...-add-support-for-Toshiba-TC58NVG0S3H.patch | 29 - ...pecific-data-to-struct-skb_shared_in.patch | 43 - ...019-add-shinfo-based-tagging-driver-.patch | 187 -- ...4019-add-ethernet-controller-DT-node.patch | 81 - .../706-arm-dts-ipq4019-add-switch-node.patch | 98 - .../707-dt-bindings-net-add-QCA807x-PHY.patch | 61 - ...8-arm-dts-ipq4019-QCA807x-properties.patch | 62 - ...8-net-phy-Add-Qualcom-QCA807x-driver.patch | 50 - .../850-soc-add-qualcomm-syscon.patch | 180 -- .../900-dts-ipq4019-ap-dk01.1.patch | 158 -- .../902-dts-ipq4019-ap-dk04.1.patch | 104 - .../patches-6.1/998-lantiq-atm-hacks.patch | 43 - .../999-atm-mpoa-intel-dsl-phy-support.patch | 137 -- .../arch/arm64/boot/dts/mediatek/mt7981.dtsi | 775 ------- .../dts/mediatek/mt7986a-rfb-spim-nand.dts | 52 - .../dts/mediatek/mt7986a-rfb-spim-nor.dts | 51 - .../arm64/boot/dts/mediatek/mt7986a-rfb.dtsi | 389 ---- .../mediatek/mt7988a-dsa-10g-spim-nand.dts | 200 -- .../dts/mediatek/mt7988a-rfb-spim-nand.dtsi | 70 - .../arm64/boot/dts/mediatek/mt7988a-rfb.dtsi | 175 -- .../arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 853 -------- .../drivers/clk/mediatek/clk-mt7988-apmixed.c | 113 - .../drivers/clk/mediatek/clk-mt7988-eth.c | 141 -- .../clk/mediatek/clk-mt7988-infracfg.c | 369 ---- .../clk/mediatek/clk-mt7988-topckgen.c | 446 ---- .../drivers/net/phy/mediatek-2p5ge.c | 262 --- .../drivers/pinctrl/mediatek/pinctrl-mt7988.c | 1282 ----------- .../dt-bindings/clock/mediatek,mt7988-clk.h | 276 --- .../files/drivers/net/phy/rtk/rtl8367s_mdio.c | 309 --- 6.6/target/linux/mediatek/mt7622/config-6.1 | 515 ----- 6.6/target/linux/mediatek/mt7623/config-6.1 | 609 ------ 6.6/target/linux/mediatek/mt7629/config-6.1 | 349 --- ...-overlays-to-built-from-.dtso-named-.patch | 44 - ...ek-mt7986-add-support-for-RX-Wireles.patch | 106 - ...s-mt7986-harmonize-device-node-order.patch | 166 -- ...7986-add-crypto-related-device-nodes.patch | 68 - ...4-v6.2-arm64-dts-mt7986-add-i2c-node.patch | 37 - ...s-mediatek-mt7986-Add-SoC-compatible.patch | 61 - ...-mt7986-add-spi-related-device-nodes.patch | 157 -- ...-mt7986-add-usb-related-device-nodes.patch | 127 -- ...-mt7986-add-mmc-related-device-nodes.patch | 160 -- ...mt7986-add-pcie-related-device-nodes.patch | 118 - ...6.3-arm64-dts-mt7986-add-Bananapi-R3.patch | 689 ------ ...ropagate-chassis-type-where-possible.patch | 323 --- .../012-v6.5-arm64-dts-mt7986-add-PWM.patch | 38 - ...5-arm64-dts-mt7986-add-PWM-to-BPI-R3.patch | 43 - ...-set-Wifi-Leds-low-active-for-BPI-R3.patch | 27 - ...-use-size-of-reserved-partition-for-.patch | 46 - ...m64-dts-mt7986-add-thermal-and-efuse.patch | 80 - ...5-arm64-dts-mt7986-add-thermal-zones.patch | 51 - ...-add-pwm-fan-and-cooling-maps-to-BPI.patch | 64 - ...-increase-bl2-partition-on-NAND-of-B.patch | 41 - .../100-dts-update-mt7622-rfb1.patch | 107 - .../101-dts-update-mt7629-rfb.patch | 60 - .../103-mt7623-enable-arch-timer.patch | 20 - .../patches-6.1/104-mt7622-add-snor-irq.patch | 10 - .../105-dts-mt7622-enable-pstore.patch | 16 - .../110-dts-fix-bpi2-console.patch | 10 - .../111-dts-fix-bpi64-console.patch | 11 - .../112-dts-fix-bpi64-lan-names.patch | 37 - .../113-dts-fix-bpi64-leds-and-buttons.patch | 47 - .../114-dts-bpi64-disable-rtc.patch | 21 - .../115-dts-bpi64-add-snand-support.patch | 50 - .../121-hack-spi-nand-1b-bbm.patch | 20 - .../130-dts-mt7629-add-snand-support.patch | 94 - .../131-dts-mt7622-add-snand-support.patch | 68 - ...dts-fix-wmac-support-for-mt7622-rfb1.patch | 18 - ...s-mt7623-eip97-inside-secure-support.patch | 24 - .../160-dts-mt7623-bpi-r2-earlycon.patch | 11 - ...1-dts-mt7623-bpi-r2-mmc-device-order.patch | 11 - .../162-dts-mt7623-bpi-r2-led-aliases.patch | 29 - ...163-dts-mt7623-bpi-r2-ethernet-alias.patch | 10 - ...80-dts-mt7622-bpi-r64-add-mt7531-irq.patch | 13 - ...-dts-mediatek-mt7622-fix-GICv2-range.patch | 106 - .../193-dts-mt7623-thermal_zone_fix.patch | 48 - .../194-dts-mt7968a-add-ramoops.patch | 17 - ...i-r3-leds-port-names-and-wifi-eeprom.patch | 196 -- ...-phy-phy-mtk-tphy-Add-hifsys-support.patch | 66 - ...llow-configuring-uart-rx-tx-and-rts-.patch | 88 - ...-add-pull_type-attribute-for-mediate.patch | 100 - ....3-pinctrl-add-mt7981-pinctrl-driver.patch | 1094 ---------- ...-add-missing-options-to-PINCTRL_MT79.patch | 30 - ...-gate-Propagate-struct-device-with-m.patch | 536 ----- ...mux-Propagate-struct-device-where-po.patch | 140 -- ...-mtk-Propagate-struct-device-for-com.patch | 181 -- ...-mux-Propagate-struct-device-for-mtk.patch | 103 - ...mediatek-clk-mtk-Add-dummy-clock-ops.patch | 74 - ...tch-to-mtk_clk_simple_probe-where-po.patch | 790 ------- ...-clk-mtk-Extend-mtk_clk_simple_probe.patch | 189 -- ...-mt7986-topckgen-Properly-keep-some-.patch | 97 - ...-mt7986-topckgen-Migrate-to-mtk_clk_.patch | 88 - ...986-apmixed-Use-PLL_AO-flag-to-set-c.patch | 38 - ...-clock-mediatek-add-mt7981-clock-IDs.patch | 237 -- ...lk-mediatek-add-MT7981-clock-support.patch | 932 -------- ...-mediatek-add-support-for-MT7988-SoC.patch | 26 - ...k-mediatek-Add-pcw-chg-shift-control.patch | 24 - ...lk-mediatek-add-mt7988-clock-support.patch | 31 - ...-mediatek-add-support-for-MT7986-SoC.patch | 47 - ...d-Inline-Crypto-Engine-clock-control.patch | 57 - ...fix-two-spelling-mistakes-in-comment.patch | 36 - ...d-open-coding-by-using-mmc_op_tuning.patch | 39 - .../330-snand-mtk-bmt-support.patch | 34 - .../331-mt7622-rfb1-enable-bmt.patch | 10 - ...Add-support-for-the-Fidelix-FM35X1GA.patch | 122 -- ...ypto-add-eip97-inside-secure-support.patch | 27 - ...01-crypto-fix-eip97-cache-incoherent.patch | 26 - ...405-v6.2-mt7986-trng-add-rng-support.patch | 43 - .../patches-6.1/410-bt-mtk-serial-fix.patch | 33 - ...xx-Move-chip_config-to-driver-s-priv.patch | 130 -- ...-Add-support-for-dynamic-calibration.patch | 236 -- ...ers-spi-mem-Add-spi-calibration-hook.patch | 41 - ...xx-Add-controller-s-calibration-para.patch | 43 - ...and-Add-calibration-support-for-spin.patch | 81 - ...nor-Add-calibration-support-for-spi-.patch | 57 - .../500-gsw-rtl8367s-mt7622-support.patch | 25 - ...ert-PERST-for-100ms-for-power-and-cl.patch | 34 - ...s-mediatek-add-mt7622-pcie-slot-node.patch | 28 - ...diatek-fix-clearing-interrupt-status.patch | 23 - ...ediatek-add-support-for-coherent-DMA.patch | 82 - .../721-dts-mt7622-mediatek-fix-300mhz.patch | 27 - .../722-remove-300Hz-to-prevent-freeze.patch | 25 - ...er-for-MediaTek-SoC-built-in-GE-PHYs.patch | 1204 ----------- ...-ge-soc-initialize-MT7988-PHY-LEDs-d.patch | 213 -- ...-don-t-use-SGMII-AN-if-using-phylink.patch | 63 - ...phy-add-driver-for-MediaTek-2.5G-PHY.patch | 39 - .../804-pwm-add-mt7986-support.patch | 23 - ...mtk-use-function-pointer-for-raw_to_.patch | 56 - ...ek-add-support-for-MT7986-and-MT7981.patch | 240 --- ...-extend-pinctrl-moore-to-support-new.patch | 129 -- ...v6.2-i2c-mediatek-add-mt7986-support.patch | 44 - ...evm_platform_get_and_ioremap_resourc.patch | 42 - ...t65xx-drop-of_match_ptr-for-ID-table.patch | 33 - ...-mediatek-add-support-for-MT7981-SoC.patch | 47 - ...mt7622-bpi-r64-aliases-for-dtoverlay.patch | 65 - .../901-arm-add-cmdline-override.patch | 54 - .../910-dts-mt7622-bpi-r64-wifi-eeprom.patch | 31 - .../930-spi-mt65xx-enable-sel-clk.patch | 18 - ..._wed-rename-mtk_wed_get_memory_regio.patch | 44 - ...986-move-cpuboot-in-a-dedicated-node.patch | 66 - ..._wed-move-cpuboot-in-a-dedicated-dts.patch | 89 - ...tk_wed-move-ilm-a-dedicated-dts-node.patch | 91 - ...tk_wed-move-dlm-a-dedicated-dts-node.patch | 57 - ...-mt7986-move-ilm-in-a-dedicated-node.patch | 83 - ...-mt7986-move-dlm-in-a-dedicated-node.patch | 81 - 6.6/target/linux/mvebu/config-6.1 | 435 ---- 6.6/target/linux/mvebu/cortexa53/config-6.1 | 83 - 6.6/target/linux/mvebu/cortexa72/config-6.1 | 97 - 6.6/target/linux/mvebu/cortexa9/config-6.1 | 3 - .../100-aardvark-workaround-PCIe.patch | 81 - ...a-support-HW-controlled-mode-via-pri.patch | 118 - ...a-initialize-multi-intensity-to-full.patch | 33 - ...a-change-max-brightness-from-255-to-.patch | 31 - ...set-linkstation-poweroff-add-ls220de.patch | 15 - ...Mangle-bootloader-s-kernel-arguments.patch | 279 --- ...-mvebu-armada-38x-enable-libata-leds.patch | 10 - .../patches-6.1/302-add_powertables.patch | 770 ------- .../patches-6.1/304-revert_i2c_delay.patch | 15 - .../305-armada-385-rd-mtd-partitions.patch | 19 - .../306-ARM-mvebu-385-ap-Add-partitions.patch | 35 - ...-armada-xp-linksys-mamba-broken-idle.patch | 10 - .../308-armada-xp-linksys-mamba-wan.patch | 11 - .../patches-6.1/309-linksys-status-led.patch | 50 - .../310-linksys-use-eth0-as-cpu-port.patch | 25 - .../311-adjust-compatible-for-linksys.patch | 68 - ...da388-clearfog-emmc-on-clearfog-base.patch | 87 - .../313-helios4-dts-status-led-alias.patch | 28 - ...rmada-xp-linksys-mamba-resize-kernel.patch | 37 - ...316-armada-370-dts-fix-crypto-engine.patch | 29 - .../patches-6.1/400-find_active_root.patch | 60 - .../700-mvneta-tx-queue-workaround.patch | 38 - ...dicate-failure-to-enter-deeper-sleep.patch | 40 - ...-pci-mvebu-time-out-reset-on-link-up.patch | 60 - ...IEI-vendor-prefix-and-IEI-WT61P803-P.patch | 218 -- ...a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch | 1034 --------- ...d-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch | 501 ----- ...d-the-IEI-WT61P803-PUZZLE-LED-driver.patch | 207 -- ...I-Add-iei-wt61p803-puzzle-driver-sys.patch | 82 - ...mon-Add-iei-wt61p803-puzzle-hwmon-dr.patch | 74 - ...an-entry-for-the-IEI-WT61P803-PUZZLE.patch | 41 - ...rs-leds-wt61p803-puzzle-improvements.patch | 271 --- ...ivers-leds-wt61p803-puzzle-mcu-retry.patch | 63 - 6.6/target/linux/qualcommax/config-6.1 | 557 ----- .../arm64/boot/dts/qcom/ipq8072-l8072v2.dts | 515 ----- 6.6/target/linux/qualcommax/image/ipq807x.mk | 201 -- .../ipq807x/base-files/etc/board.d/01_leds | 41 - .../ipq807x/base-files/etc/board.d/02_network | 56 - .../etc/hotplug.d/firmware/11-ath11k-caldata | 45 - .../base-files/lib/upgrade/platform.sh | 118 - .../qualcommax/ipq807x/base-files/sbin/getmac | 122 -- .../qualcommax/ipq807x/base-files/sbin/setmac | 219 -- .../ipq807x/base-files/sbin/setmac_all | 26 - .../0905-ipq8074-add-blsp1-i2c4.patch | 25 - 6.6/target/linux/ramips/mt7621/config-6.1 | 306 --- .../110-reset_controller_driver.patch | 61 - .../patches-6.1/200-add-ralink-eth.patch | 20 - ...0-mt7620-export-chip-version-and-pkg.patch | 19 - ...e-to-enable-disable-the-cevt-r4k-irq.patch | 100 - ...IPS-ralink-add-cpu-frequency-scaling.patch | 195 -- ...-MIPS-add-bootargs-override-property.patch | 63 - ...315-owrt-hack-fix-mt7688-cache-issue.patch | 28 - ...-select-illegal-access-driver-by-def.patch | 25 - .../patches-6.1/324-mt7621-perfctr-fix.patch | 15 - ...mtd-cfi-cmdset-0002-force-word-write.patch | 20 - ...documentation-for-mt7621-nand-driver.patch | 85 - ...ethernet-mediatek-support-net-labels.patch | 34 - ...y-simplify-phy_link_change-arguments.patch | 118 - .../721-NET-no-auto-carrier-off-support.patch | 47 - ...DT-Add-documentation-for-gpio-ralink.patch | 59 - ...alink-add-gpio-driver-for-ralink-SoC.patch | 416 ---- ...support-for-GPIO-as-interrupt-contro.patch | 44 - .../810-uvc-add-iPassion-iP2970-support.patch | 244 --- ...-DT-Add-documentation-for-spi-rt2880.patch | 44 - ...SPI-ralink-add-Ralink-SoC-spi-driver.patch | 579 ----- .../835-asoc-add-mt7620-support.patch | 1033 --------- ...erial-add-ugly-custom-baud-rate-hack.patch | 22 - .../845-pwm-add-mediatek-support.patch | 219 -- .../850-awake-rt305x-dwc2-controller.patch | 15 - .../patches-6.1/855-linkit_bootstrap.patch | 97 - .../armv8/base-files/etc/board.d/01_leds | 43 - .../armv8/base-files/etc/board.d/02_network | 128 -- .../etc/hotplug.d/net/40-net-smp-affinity | 56 - .../etc/hotplug.d/usb/15-usb-wifi-config | 6 - .../armv8/base-files/etc/init.d/fanctrl | 15 - .../uci-defaults/12_enable-netifd-smp-tune | 7 - .../base-files/lib/preinit/79_move_config | 16 - .../armv8/base-files/lib/upgrade/platform.sh | 86 - 6.6/target/linux/rockchip/armv8/config-6.1 | 704 ------ .../rockchip/rk3328-dram-default-timing.dtsi | 311 --- .../boot/dts/rockchip/rk3399-dlfr100.dts | 733 ------- .../dts/rockchip/rk3399-guangmiao-g4c.dts | 664 ------ .../boot/dts/rockchip/rk3399-h3399pc.dts | 837 -------- .../boot/dts/rockchip/rk3399-king3399.dts | 1127 ---------- .../boot/dts/rockchip/rk3399-mpc1903.dts | 687 ------ .../boot/dts/rockchip/rk3399-nanopi-r4se.dts | 18 - .../boot/dts/rockchip/rk3568-fastrhino.dtsi | 526 ----- .../boot/dts/rockchip/rk3568-hinlink-opc.dtsi | 660 ------ .../dts/rockchip/rk3568-mrkaio-m68s-plus.dts | 119 - .../boot/dts/rockchip/rk3568-mrkaio-m68s.dts | 154 -- .../boot/dts/rockchip/rk3568-mrkaio-m68s.dtsi | 523 ----- .../boot/dts/rockchip/rk3568-nanopi-r5c.dts | 681 ------ .../boot/dts/rockchip/rk3568-nanopi-r5s.dts | 710 ------ .../boot/dts/rockchip/rk3568-opc-h66k.dts | 20 - .../boot/dts/rockchip/rk3568-opc-h68k.dts | 76 - .../boot/dts/rockchip/rk3568-opc-h69k.dts | 89 - .../boot/dts/rockchip/rk3568-photonicat.dts | 592 ----- .../arm64/boot/dts/rockchip/rk3568-r66s.dts | 26 - .../arm64/boot/dts/rockchip/rk3568-r68s.dts | 83 - .../boot/dts/rockchip/rk3568-radxa-cm3i.dtsi | 418 ---- .../boot/dts/rockchip/rk3568-radxa-e25.dts | 251 --- .../arm64/boot/dts/rockchip/rk3568-roc-pc.dts | 796 ------- .../boot/dts/rockchip/rk3568-rock-3a.dts | 770 ------- .../drivers/char/hw_random/rockchip-rng.c | 310 --- .../files/drivers/devfreq/rk3328_dmc.c | 852 -------- .../include/dt-bindings/clock/rockchip-ddr.h | 63 - .../include/dt-bindings/memory/rk3328-dram.h | 159 -- 6.6/target/linux/rockchip/image/Makefile | 82 - 6.6/target/linux/rockchip/image/armv8.mk | 273 --- .../linux/rockchip/image/mmc.bootscript | 8 - .../rockchip/image/nanopi-r2s.bootscript | 8 - .../rockchip/image/nanopi-r4s.bootscript | 8 - .../rockchip/image/nanopi-r5s.bootscript | 8 - 6.6/target/linux/rockchip/modules.mk | 70 - ...-r8169-add-LED-configuration-from-OF.patch | 49 - .../patches-6.1/106-rockchip-rock-pi-4.patch | 35 - ...-initial-signal-voltage-on-power-off.patch | 35 - ...568-update-gicv3-its-and-pci-msi-map.patch | 94 - ...gic-v3-add-hackaround-for-rk3568-its.patch | 198 -- ...dts-rockchip-rk3568-Add-xpcs-support.patch | 33 - ...kill-gpio-add-of_match_table-support.patch | 34 - ...8-add-i2c0-controller-for-nanopi-r2s.patch | 22 - ...-support-for-FriendlyARM-NanoPi-Neo3.patch | 442 ---- ...ip-rk356x-add-support-for-new-boards.patch | 18 - ...chip-rk3399-add-support-more-devices.patch | 13 - ...-for-rockchip-hardware-random-number.patch | 45 - ...ip-add-hardware-random-number-genera.patch | 69 - ...ip-add-devfreq-driver-for-rk3328-dmc.patch | 44 - ...setting-ddr-clock-via-SIP-Version-2-.patch | 210 -- ...eq-rockchip-dfi-add-more-soc-support.patch | 662 ------ ...m64-dts-rockchip-rk3328-add-dfi-node.patch | 27 - ...anopi-r2s-add-rk3328-dmc-relate-node.patch | 126 -- ...ip-add-more-cpu-operating-points-for.patch | 44 - ...chip-rk3399-overclock-to-2.2-1.8-GHz.patch | 46 - 352 files changed, 60007 deletions(-) delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/bin/board_detect delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/bin/board_modem delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/bin/board_track delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/bin/config_generate delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/bin/ipcalc.sh delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/etc/board.d/02_network delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/board.d/1-board_json delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/etc/hotplug.d/firmware/11-ath10k-caldata delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/etc/hotplug.d/ieee80211/09_fix_wifi_mac delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/boot delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/done delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/gpio_switch delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/led delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/modem_tracker delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/ntpserver delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/powerctl delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/sysctl delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/sysfixtime delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/system delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/etc/init.d/umount delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/etc/uci-defaults/01_mnf-info delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/etc/uci-defaults/04_migrate-vlan delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/lib/functions/board.sh delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/lib/functions/migrate.sh delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/lib/functions/network.sh delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/lib/functions/teltonika-defaults.sh delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/lib/functions/teltonika-functions.sh delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/lib/functions/uci-defaults.sh delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/lib/preinit/82_modem_power delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/ipq_failsafe.sh delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/platform.sh delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/stage2 delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/sbin/mctl delete mode 100755 6.6/target/linux/ipq40xx.new/base-files/sbin/mnf_info delete mode 100644 6.6/target/linux/ipq40xx.new/base-files/usr/share/art/art_rutx.bin delete mode 100644 6.6/target/linux/ipq40xx.new/config-6.1 delete mode 100644 6.6/target/linux/ipq40xx.new/dts/platform_name.dtsi delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-08.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-08_STM32.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-09.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-09_STM32.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-10.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-10_STM32.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-11.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-11_STM32.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-12.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-12_STM32.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-14.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-14_STM32.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-50.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-R1.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-R1_STM32.dts delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-STM32.dtsi delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-common.dtsi delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-i2c.dtsi delete mode 100644 6.6/target/linux/ipq40xx.new/dts/qcom-ipq4018-rutx-shiftreg.dtsi delete mode 100644 6.6/target/linux/ipq40xx.new/files/drivers/net/phy/qca807x.c delete mode 100644 6.6/target/linux/ipq40xx.new/image/generic.mk delete mode 100755 6.6/target/linux/ipq40xx.new/image/uboot_fw/appsboardconfig_premium_tlt delete mode 100755 6.6/target/linux/ipq40xx.new/image/uboot_fw/boardconfig_premium_tlt delete mode 100644 6.6/target/linux/ipq40xx.new/image/uboot_fw/norplusnand-apps-flash.conf delete mode 100644 6.6/target/linux/ipq40xx.new/image/uboot_fw/norplusnand-flash.conf delete mode 100755 6.6/target/linux/ipq40xx.new/image/uboot_fw/norplusnand-system-partition-ipq40xx.bin delete mode 100755 6.6/target/linux/ipq40xx.new/image/uboot_fw/pack.py delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/104-clk-fix-apss-cpu-overclocking.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/300-clk-qcom-ipq4019-add-ess-reset.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/301-arm-compressed-add-appended-DTB-section.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/302-arm-compressed-set-ipq40xx-watchdog-to-allow-boot.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/420-firmware-qcom-scm-disable-SDI.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/421-firmware-qcom-scm-cold-boot-address.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/700-skbuff-add-DSA-specific-data-to-struct-skb_shared_in.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/701-net-dsa-tag_ipq4019-add-shinfo-based-tagging-driver-.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/703-arm-dts-ipq4019-add-ethernet-controller-DT-node.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/706-arm-dts-ipq4019-add-switch-node.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/707-dt-bindings-net-add-QCA807x-PHY.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/708-arm-dts-ipq4019-QCA807x-properties.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/708-net-phy-Add-Qualcom-QCA807x-driver.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/850-soc-add-qualcomm-syscon.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/900-dts-ipq4019-ap-dk01.1.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/902-dts-ipq4019-ap-dk04.1.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/998-lantiq-atm-hacks.patch delete mode 100644 6.6/target/linux/ipq40xx.new/patches-6.1/999-atm-mpoa-intel-dsl-phy-support.patch delete mode 100644 6.6/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7981.dtsi delete mode 100644 6.6/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts delete mode 100644 6.6/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nor.dts delete mode 100644 6.6/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi delete mode 100644 6.6/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-dsa-10g-spim-nand.dts delete mode 100644 6.6/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-rfb-spim-nand.dtsi delete mode 100644 6.6/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dtsi delete mode 100644 6.6/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a.dtsi delete mode 100644 6.6/target/linux/mediatek/files-6.1/drivers/clk/mediatek/clk-mt7988-apmixed.c delete mode 100644 6.6/target/linux/mediatek/files-6.1/drivers/clk/mediatek/clk-mt7988-eth.c delete mode 100644 6.6/target/linux/mediatek/files-6.1/drivers/clk/mediatek/clk-mt7988-infracfg.c delete mode 100644 6.6/target/linux/mediatek/files-6.1/drivers/clk/mediatek/clk-mt7988-topckgen.c delete mode 100644 6.6/target/linux/mediatek/files-6.1/drivers/net/phy/mediatek-2p5ge.c delete mode 100644 6.6/target/linux/mediatek/files-6.1/drivers/pinctrl/mediatek/pinctrl-mt7988.c delete mode 100644 6.6/target/linux/mediatek/files-6.1/include/dt-bindings/clock/mediatek,mt7988-clk.h delete mode 100644 6.6/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367s_mdio.c delete mode 100644 6.6/target/linux/mediatek/mt7622/config-6.1 delete mode 100644 6.6/target/linux/mediatek/mt7623/config-6.1 delete mode 100644 6.6/target/linux/mediatek/mt7629/config-6.1 delete mode 100644 6.6/target/linux/mediatek/patches-6.1/000-v6.2-kbuild-Allow-DTB-overlays-to-built-from-.dtso-named-.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/001-v6.2-arm64-dts-mediatek-mt7986-add-support-for-RX-Wireles.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/002-v6.2-arm64-dts-mt7986-harmonize-device-node-order.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/003-v6.2-arm64-dts-mt7986-add-crypto-related-device-nodes.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/004-v6.2-arm64-dts-mt7986-add-i2c-node.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/005-v6.2-arm64-dts-mediatek-mt7986-Add-SoC-compatible.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/006-v6.2-arm64-dts-mt7986-add-spi-related-device-nodes.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/007-v6.3-arm64-dts-mt7986-add-usb-related-device-nodes.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/008-v6.3-arm64-dts-mt7986-add-mmc-related-device-nodes.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/009-v6.3-arm64-dts-mt7986-add-pcie-related-device-nodes.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/010-v6.3-arm64-dts-mt7986-add-Bananapi-R3.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/011-v6.5-arm64-mediatek-Propagate-chassis-type-where-possible.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/012-v6.5-arm64-dts-mt7986-add-PWM.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/013-v6.5-arm64-dts-mt7986-add-PWM-to-BPI-R3.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/014-v6.5-arm64-dts-mt7986-set-Wifi-Leds-low-active-for-BPI-R3.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/015-v6.5-arm64-dts-mt7986-use-size-of-reserved-partition-for-.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/016-v6.5-arm64-dts-mt7986-add-thermal-and-efuse.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/017-v6.5-arm64-dts-mt7986-add-thermal-zones.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/018-v6.5-arm64-dts-mt7986-add-pwm-fan-and-cooling-maps-to-BPI.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/019-v6.5-arm64-dts-mt7986-increase-bl2-partition-on-NAND-of-B.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/101-dts-update-mt7629-rfb.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/103-mt7623-enable-arch-timer.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/104-mt7622-add-snor-irq.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/105-dts-mt7622-enable-pstore.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/110-dts-fix-bpi2-console.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/111-dts-fix-bpi64-console.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/112-dts-fix-bpi64-lan-names.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/113-dts-fix-bpi64-leds-and-buttons.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/114-dts-bpi64-disable-rtc.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/115-dts-bpi64-add-snand-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/121-hack-spi-nand-1b-bbm.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/130-dts-mt7629-add-snand-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/131-dts-mt7622-add-snand-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/140-dts-fix-wmac-support-for-mt7622-rfb1.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/150-dts-mt7623-eip97-inside-secure-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/160-dts-mt7623-bpi-r2-earlycon.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/161-dts-mt7623-bpi-r2-mmc-device-order.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/162-dts-mt7623-bpi-r2-led-aliases.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/163-dts-mt7623-bpi-r2-ethernet-alias.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/180-dts-mt7622-bpi-r64-add-mt7531-irq.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/193-dts-mt7623-thermal_zone_fix.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/194-dts-mt7968a-add-ramoops.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/195-dts-mt7986a-bpi-r3-leds-port-names-and-wifi-eeprom.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/200-phy-phy-mtk-tphy-Add-hifsys-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/210-v6.2-pinctrl-mt7986-allow-configuring-uart-rx-tx-and-rts-.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/211-v6.2-pinctrl-mediatek-add-pull_type-attribute-for-mediate.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/215-v6.3-pinctrl-add-mt7981-pinctrl-driver.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/216-v6.3-pinctrl-mediatek-add-missing-options-to-PINCTRL_MT79.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/220-v6.3-clk-mediatek-clk-gate-Propagate-struct-device-with-m.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/221-v6.3-clk-mediatek-cpumux-Propagate-struct-device-where-po.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/222-v6.3-clk-mediatek-clk-mtk-Propagate-struct-device-for-com.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/223-v6.3-clk-mediatek-clk-mux-Propagate-struct-device-for-mtk.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/224-v6.3-clk-mediatek-clk-mtk-Add-dummy-clock-ops.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/225-v6.3-clk-mediatek-Switch-to-mtk_clk_simple_probe-where-po.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/226-v6.3-clk-mediatek-clk-mtk-Extend-mtk_clk_simple_probe.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/227-v6.3-clk-mediatek-clk-mt7986-topckgen-Properly-keep-some-.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/228-v6.3-clk-mediatek-clk-mt7986-topckgen-Migrate-to-mtk_clk_.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/229-v6.4-clk-mediatek-mt7986-apmixed-Use-PLL_AO-flag-to-set-c.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/230-v6.4-dt-bindings-clock-mediatek-add-mt7981-clock-IDs.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/231-v6.4-clk-mediatek-add-MT7981-clock-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/240-pinctrl-mediatek-add-support-for-MT7988-SoC.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/241-clk-mediatek-Add-pcw-chg-shift-control.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/242-clk-mediatek-add-mt7988-clock-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/320-v6.2-mmc-mediatek-add-support-for-MT7986-SoC.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/321-v6.2-mmc-mtk-sd-add-Inline-Crypto-Engine-clock-control.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/322-v6.2-mmc-mtk-sd-fix-two-spelling-mistakes-in-comment.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/323-v6.2-mmc-Avoid-open-coding-by-using-mmc_op_tuning.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/330-snand-mtk-bmt-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/331-mt7622-rfb1-enable-bmt.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/400-crypto-add-eip97-inside-secure-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/401-crypto-fix-eip97-cache-incoherent.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/405-v6.2-mt7986-trng-add-rng-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/431-drivers-spi-mt65xx-Move-chip_config-to-driver-s-priv.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/432-drivers-spi-Add-support-for-dynamic-calibration.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/433-drivers-spi-mem-Add-spi-calibration-hook.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/434-drivers-spi-mt65xx-Add-controller-s-calibration-para.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/435-drivers-mtd-spinand-Add-calibration-support-for-spin.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/500-gsw-rtl8367s-mt7622-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/601-PCI-mediatek-Assert-PERST-for-100ms-for-power-and-cl.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/610-pcie-mediatek-fix-clearing-interrupt-status.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/721-dts-mt7622-mediatek-fix-300mhz.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/722-remove-300Hz-to-prevent-freeze.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/730-v6.5-net-phy-add-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/731-net-phy-mediatek-ge-soc-initialize-MT7988-PHY-LEDs-d.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/732-net-phy-mxl-gpy-don-t-use-SGMII-AN-if-using-phylink.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/733-net-phy-add-driver-for-MediaTek-2.5G-PHY.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/804-pwm-add-mt7986-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/805-v6.2-thermal-drivers-mtk-use-function-pointer-for-raw_to_.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/806-v6.2-thermal-mediatek-add-support-for-MT7986-and-MT7981.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/826-v6.2-pinctrl-mediatek-extend-pinctrl-moore-to-support-new.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/851-v6.2-i2c-mediatek-add-mt7986-support.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/852-v6.3-i2c-mt65xx-Use-devm_platform_get_and_ioremap_resourc.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/853-v6.3-i2c-mt65xx-drop-of_match_ptr-for-ID-table.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/854-v6.4-i2c-mediatek-add-support-for-MT7981-SoC.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/901-arm-add-cmdline-override.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/910-dts-mt7622-bpi-r64-wifi-eeprom.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/930-spi-mt65xx-enable-sel-clk.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/940-net-ethernet-mtk_wed-rename-mtk_wed_get_memory_regio.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/943-net-ethernet-mtk_wed-move-ilm-a-dedicated-dts-node.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.1/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch delete mode 100644 6.6/target/linux/mvebu/config-6.1 delete mode 100644 6.6/target/linux/mvebu/cortexa53/config-6.1 delete mode 100644 6.6/target/linux/mvebu/cortexa72/config-6.1 delete mode 100644 6.6/target/linux/mvebu/cortexa9/config-6.1 delete mode 100644 6.6/target/linux/mvebu/patches-6.1/100-aardvark-workaround-PCIe.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/102-leds-turris-omnia-support-HW-controlled-mode-via-pri.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/105-power-reset-linkstation-poweroff-add-ls220de.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/301-mvebu-armada-38x-enable-libata-leds.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/302-add_powertables.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/304-revert_i2c_delay.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/305-armada-385-rd-mtd-partitions.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/306-ARM-mvebu-385-ap-Add-partitions.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/307-armada-xp-linksys-mamba-broken-idle.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/308-armada-xp-linksys-mamba-wan.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/309-linksys-status-led.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/310-linksys-use-eth0-as-cpu-port.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/311-adjust-compatible-for-linksys.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/313-helios4-dts-status-led-alias.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/315-armada-xp-linksys-mamba-resize-kernel.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/316-armada-370-dts-fix-crypto-engine.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/400-find_active_root.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/700-mvneta-tx-queue-workaround.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/801-pci-mvebu-time-out-reset-on-link-up.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/905-Documentation-ABI-Add-iei-wt61p803-puzzle-driver-sys.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/910-drivers-leds-wt61p803-puzzle-improvements.patch delete mode 100644 6.6/target/linux/mvebu/patches-6.1/911-drivers-leds-wt61p803-puzzle-mcu-retry.patch delete mode 100644 6.6/target/linux/qualcommax/config-6.1 delete mode 100755 6.6/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-l8072v2.dts delete mode 100755 6.6/target/linux/qualcommax/image/ipq807x.mk delete mode 100755 6.6/target/linux/qualcommax/ipq807x/base-files/etc/board.d/01_leds delete mode 100755 6.6/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network delete mode 100755 6.6/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata delete mode 100755 6.6/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh delete mode 100755 6.6/target/linux/qualcommax/ipq807x/base-files/sbin/getmac delete mode 100755 6.6/target/linux/qualcommax/ipq807x/base-files/sbin/setmac delete mode 100755 6.6/target/linux/qualcommax/ipq807x/base-files/sbin/setmac_all delete mode 100644 6.6/target/linux/qualcommax/patches-6.1/0905-ipq8074-add-blsp1-i2c4.patch delete mode 100644 6.6/target/linux/ramips/mt7621/config-6.1 delete mode 100644 6.6/target/linux/ramips/patches-6.1/110-reset_controller_driver.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/200-add-ralink-eth.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/300-mt7620-export-chip-version-and-pkg.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/312-MIPS-ralink-add-cpu-frequency-scaling.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/316-arch-mips-do-not-select-illegal-access-driver-by-def.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/324-mt7621-perfctr-fix.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/400-mtd-cfi-cmdset-0002-force-word-write.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/411-dt-bindings-add-documentation-for-mt7621-nand-driver.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/700-net-ethernet-mediatek-support-net-labels.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/720-Revert-net-phy-simplify-phy_link_change-arguments.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/721-NET-no-auto-carrier-off-support.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/801-DT-Add-documentation-for-gpio-ralink.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/803-gpio-ralink-Add-support-for-GPIO-as-interrupt-contro.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/810-uvc-add-iPassion-iP2970-support.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/820-DT-Add-documentation-for-spi-rt2880.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/835-asoc-add-mt7620-support.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/840-serial-add-ugly-custom-baud-rate-hack.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/845-pwm-add-mediatek-support.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/850-awake-rt305x-dwc2-controller.patch delete mode 100644 6.6/target/linux/ramips/patches-6.1/855-linkit_bootstrap.patch delete mode 100755 6.6/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds delete mode 100755 6.6/target/linux/rockchip/armv8/base-files/etc/board.d/02_network delete mode 100644 6.6/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity delete mode 100755 6.6/target/linux/rockchip/armv8/base-files/etc/hotplug.d/usb/15-usb-wifi-config delete mode 100755 6.6/target/linux/rockchip/armv8/base-files/etc/init.d/fanctrl delete mode 100644 6.6/target/linux/rockchip/armv8/base-files/etc/uci-defaults/12_enable-netifd-smp-tune delete mode 100644 6.6/target/linux/rockchip/armv8/base-files/lib/preinit/79_move_config delete mode 100644 6.6/target/linux/rockchip/armv8/base-files/lib/upgrade/platform.sh delete mode 100644 6.6/target/linux/rockchip/armv8/config-6.1 delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3328-dram-default-timing.dtsi delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-dlfr100.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-guangmiao-g4c.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-h3399pc.dts delete mode 100755 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-king3399.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-mpc1903.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4se.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-fastrhino.dtsi delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-hinlink-opc.dtsi delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-mrkaio-m68s-plus.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-mrkaio-m68s.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-mrkaio-m68s.dtsi delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h66k.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h68k.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-opc-h69k.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-r66s.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-r68s.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-roc-pc.dts delete mode 100644 6.6/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts delete mode 100644 6.6/target/linux/rockchip/files/drivers/char/hw_random/rockchip-rng.c delete mode 100644 6.6/target/linux/rockchip/files/drivers/devfreq/rk3328_dmc.c delete mode 100644 6.6/target/linux/rockchip/files/include/dt-bindings/clock/rockchip-ddr.h delete mode 100644 6.6/target/linux/rockchip/files/include/dt-bindings/memory/rk3328-dram.h delete mode 100644 6.6/target/linux/rockchip/image/Makefile delete mode 100644 6.6/target/linux/rockchip/image/armv8.mk delete mode 100644 6.6/target/linux/rockchip/image/mmc.bootscript delete mode 100644 6.6/target/linux/rockchip/image/nanopi-r2s.bootscript delete mode 100644 6.6/target/linux/rockchip/image/nanopi-r4s.bootscript delete mode 100644 6.6/target/linux/rockchip/image/nanopi-r5s.bootscript delete mode 100644 6.6/target/linux/rockchip/modules.mk delete mode 100644 6.6/target/linux/rockchip/patches-6.1/101-net-realtek-r8169-add-LED-configuration-from-OF.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/106-rockchip-rock-pi-4.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/107-mmc-core-set-initial-signal-voltage-on-power-off.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/110-arm64-rk3568-update-gicv3-its-and-pci-msi-map.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/111-irqchip-gic-v3-add-hackaround-for-rk3568-its.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/112-arm64-dts-rockchip-rk3568-Add-xpcs-support.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/114-rfkill-gpio-add-of_match_table-support.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/201-rockchip-rk3328-add-i2c0-controller-for-nanopi-r2s.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/205-rockchip-rk3328-add-support-for-FriendlyARM-NanoPi-Neo3.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/210-rockchip-rk356x-add-support-for-new-boards.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/211-rockchip-rk3399-add-support-more-devices.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/801-char-add-support-for-rockchip-hardware-random-number.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/802-arm64-dts-rockchip-add-hardware-random-number-genera.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/803-PM-devfreq-rockchip-add-devfreq-driver-for-rk3328-dmc.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/804-clk-rockchip-support-setting-ddr-clock-via-SIP-Version-2-.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/805-PM-devfreq-rockchip-dfi-add-more-soc-support.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/806-arm64-dts-rockchip-rk3328-add-dfi-node.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/807-arm64-dts-nanopi-r2s-add-rk3328-dmc-relate-node.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/991-arm64-dts-rockchip-add-more-cpu-operating-points-for.patch delete mode 100644 6.6/target/linux/rockchip/patches-6.1/992-rockchip-rk3399-overclock-to-2.2-1.8-GHz.patch diff --git a/6.6/target/linux/ipq40xx.new/base-files/bin/board_detect b/6.6/target/linux/ipq40xx.new/base-files/bin/board_detect deleted file mode 100755 index 840bd0178..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/bin/board_detect +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -CFG=$1 - -[ -n "$CFG" ] || CFG=/etc/board.json - -[ -d "/etc/board.d/" -a ! -s "$CFG" ] && { - for a in $(ls /etc/board.d/*); do - [ -x $a ] || continue; - $(. $a) - done -} - -[ -s "$CFG" ] || return 1 diff --git a/6.6/target/linux/ipq40xx.new/base-files/bin/board_modem b/6.6/target/linux/ipq40xx.new/base-files/bin/board_modem deleted file mode 100755 index 6481c682d..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/bin/board_modem +++ /dev/null @@ -1,346 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2015 The Linux Foundation. All rights reserved. -# Copyright (c) 2011-2015 OpenWrt.org -# - -. /lib/functions/uci-defaults.sh -. /lib/functions/system.sh - -CFG=/etc/board.json - -# do not run on preinit/early init -[ "$EARLY_INIT" ] && return - -strstr() { - [ "${1#*$2*}" = "$1" ] && return 1 - return 0 -} - -print_array() { - json_add_array $1 - case "$1" in - 5G_NSA) - for element in $2 - do - json_add_string "" "$(echo $element)" - done - ;; - 5G_SA) - for element in $2 - do - json_add_string "" "$(echo $element)" - done - ;; - 4G) - for element in $2 - do - json_add_string "" "$(echo $element)" - done - ;; - 3G) - for element in $2 - do - json_add_string "" "wcdma_$(echo $element)" - done - ;; - 2G) - for element in $2 - do - json_add_string "" "$(echo $element)" - done - ;; - esac - json_close_array -} - -gather_band_capabilities() { - # Same logic as unhandler.c - ###################### EG06 ######################### - if strstr $revision_from_unhandler "EG06E"; then #EG06E - lte_bands="1 3 5 7 8 20 28 32 38 40 41" #B - trysg_bands="850 900 1800 2100" #MHz - dug_bands="" - elif strstr $revision_from_unhandler "EG06A"; then #EG06A - lte_bands="2 4 5 7 12 13 25 26 29 30 66" - trysg_bands="850 1700 1900" - dug_bands="" - ###################### EC25 ######################### - elif strstr $revision_from_unhandler "EC25EF"; then #EC25E - lte_bands="1 3 5 7 8 20 38 40 41" - trysg_bands="850 900 2100" - dug_bands="900 1800" #MHz - elif strstr $revision_from_unhandler "EC25EC"; then #EC25EC - lte_bands="1 3 7 8 20 28" - trysg_bands="900 2100" - dug_bands="900 1800" - elif strstr $revision_from_unhandler "EC25AUX"; then #EC25AUX - lte_bands="1 2 3 4 5 7 8 28 40" - trysg_bands="850 900 1700 1900 2100" - dug_bands="850 900 1800 1900" - elif strstr $revision_from_unhandler "EC25AFA"; then #EC25A - lte_bands="2 4 12" - trysg_bands="850 1700 1900" - dug_bands="" - elif strstr $revision_from_unhandler "EC25V"; then #EC25V - lte_bands="4 13" - trysg_bands="" - dug_bands="" - elif strstr $revision_from_unhandler "EC25AFX"; then #EC25AFX - lte_bands="2 4 5 12 13 14 66 71" - trysg_bands="850 1700 1900" - dug_bands="" - elif strstr $revision_from_unhandler "EC25AFF"; then #EC25AF - lte_bands="2 4 5 12 13 14 66 71" - trysg_bands="850 1700 1900" - dug_bands="" - elif strstr $revision_from_unhandler "EC25AUTF"; then #EC25AUT - lte_bands="1 3 5 7 28" - trysg_bands="850 2100" - dug_bands="" - elif strstr $revision_from_unhandler "EC25AUTL"; then #EC25AUTL - lte_bands="3 7 28" - trysg_bands="" - dug_bands="" - elif strstr $revision_from_unhandler "EC25AUF"; then #EC25AU - lte_bands="1 2 3 4 5 7 8 28 40" - trysg_bands="850 900 1900 2100" - dug_bands="850 900 1800 1900" - elif strstr $revision_from_unhandler "EC25J"; then #EC25J - lte_bands="1 3 8 18 19 26 41" - trysg_bands="800 900 2100" - dug_bands="" - elif strstr $revision_from_unhandler "EC25EUX"; then #EC25EUX - lte_bands="1 3 7 8 20 28 38 40 41" - trysg_bands="900 2100" - dug_bands="900 1800" - elif strstr $revision_from_unhandler "EC25EUF"; then #EC25EU - lte_bands="1 3 7 8 20 28 38 40 41" - trysg_bands="900 2100" - dug_bands="900 1800" - elif strstr $revision_from_unhandler "EC25EUG"; then #EC25EU - lte_bands="1 3 7 8 20 28 38 40 41" - trysg_bands="900 2100" - dug_bands="900 1800" - elif strstr $revision_from_unhandler "EC25MX"; then #EC25MX - lte_bands="2 4 5 7 28 66" - trysg_bands="850 1700 1900" - dug_bands="" - ###################### EC21 ######################### - elif strstr $revision_from_unhandler "EC21EUX"; then #EC21EUX - lte_bands="1 3 7 8 20 28" - trysg_bands="900 2100" - dug_bands="900 1800" - elif strstr $revision_from_unhandler "EC21EU"; then #EC21EU - lte_bands="1 3 7 8 20 28" - trysg_bands="900 2100" - dug_bands="900 1800" - elif strstr $revision_from_unhandler "EC21EC"; then #EC21EC - lte_bands="1 3 7 8 20 28" - trysg_bands="900 2100" - dug_bands="900 1800" - elif strstr $revision_from_unhandler "EC21E"; then #EC21E - lte_bands="1 3 5 7 8 20" - trysg_bands="850 900 2100" - dug_bands="900 1800" - elif strstr $revision_from_unhandler "EC21V"; then #EC21V - lte_bands="4 13" - trysg_bands="" - dug_bands="" - elif strstr $revision_from_unhandler "EC21KL"; then #EC21KL - lte_bands="1 3 5 7 8" - trysg_bands="" - dug_bands="" - elif strstr $revision_from_unhandler "EC21J"; then #EC21J - lte_bands="1 3 8 18 19 26" - trysg_bands="" - dug_bands="" - elif strstr $revision_from_unhandler "EC21AUX"; then #EC21AUX - lte_bands="1 2 3 4 5 7 8 28 40" - trysg_bands="850 900 1700 1900 2100" - dug_bands="850 900 1800 1900" - elif strstr $revision_from_unhandler "EC21AUT"; then #EC21AUT - lte_bands="1 3 5 7 28" - trysg_bands="850 2100" - dug_bands="" - elif strstr $revision_from_unhandler "EC21AU"; then #EC21AU - lte_bands="1 2 3 4 5 7 8 28 40" - trysg_bands="850 900 1900 2100" - dug_bands="850 900 1800 1900" - elif strstr $revision_from_unhandler "EC21A"; then #EC21A - lte_bands="2 4 12" - trysg_bands="850 1700 1900" - dug_bands="" - ###################### EG25 ######################### - elif strstr $revision_from_unhandler "EG25G"; then #EG25G - lte_bands="1 2 3 4 5 7 8 12 13 18 19 20 25 26 28 38 39 40 41" - trysg_bands="800 850 900 1700 1900 2100" - dug_bands="850 900 1800 1900" - elif strstr $revision_from_unhandler "EG12EA"; then #EG12EA - lte_bands="1 3 5 7 8 20 28 38 40 41" - trysg_bands="850 900 1800 2100" - dug_bands="" - elif strstr $revision_from_unhandler "EG12NA"; then #EG12NA - lte_bands="2 4 5 7 12 13 14 17 25 26 29 30 41 66 71" - trysg_bands="850 1700 1900" - dug_bands="" - elif strstr $revision_from_unhandler "BG96"; then #BG96M - lte_bands="1 2 3 4 5 8 12 13 18 19 20 26 28 39" - trysg_bands="" - dug_bands="850 900 1800 1900" - ##################### SLM750 ######################## - elif strstr $revision_from_unhandler "750VE"; then #SLM750VE - lte_bands="1 3 5 7 8 20 40" - trysg_bands="850 900 2100" - dug_bands="900 1800" - elif strstr $revision_from_unhandler "750VAU"; then #SLM750VAU - lte_bands="1 3 5 7 8 28 40" - trysg_bands="850 900 2100" - dug_bands="850 900 1800" - elif strstr $revision_from_unhandler "750VA"; then #SLM750VA - lte_bands="2 4 5 12 13 17 18 25 26 41" - trysg_bands="850 1700 1900" - dug_bands="850 1900" - elif strstr $revision_from_unhandler "750VJ"; then #SLM750VJ - lte_bands="1 3 8 18 19 26 41" - trysg_bands="800 900 2100" - dug_bands="" - elif strstr $revision_from_unhandler "750VSA"; then #SLM750VSA - lte_bands="2 4 5 7 8 28 40" - trysg_bands="850 900 1900" - dug_bands="850 900 1900" - ###################### UC20 ######################### - elif strstr $revision_from_unhandler "UC20E"; then #UC20E - lte_bands="" - trysg_bands="900 2100" - dug_bands="850 900 1800 1900" - elif strstr $revision_from_unhandler "UC20G"; then #UC20G - lte_bands="" - trysg_bands="800 850 900 1900 2100" - dug_bands="850 900 1800 1900" - elif strstr $revision_from_unhandler "UC20A"; then #UC20A - lte_bands="" - trysg_bands="850 1900" - dug_bands="" - ###################### EC200A ######################### - elif strstr $revision_from_unhandler "EC200AAU"; then #EC200AAU - lte_bands="1 2 3 4 5 7 8 28 40 66" - trysg_bands="850 900 1700 1900 2100" - dug_bands="850 900 1800 1900" - elif strstr $revision_from_unhandler "EC200AEU"; then #EC200AEU - lte_bands="1 3 5 7 8 20 28 38 40 41" - trysg_bands="850 900 2100" - dug_bands="900 1800" - ####################### RG501QEU ####################### - elif strstr $revision_from_unhandler "RG501QEU"; then #5G module - nsa_nr5g_bands="1 3 5 7 8 20 28 38 40 41 77 78" - sa_nr5g_bands="1 3 5 7 8 20 28 38 40 41 77 78" - lte_bands="1 3 5 7 8 20 28 32 38 40 41 42 43" - trysg_bands="2100 850 900" - dug_bands="" - elif strstr $revision_from_unhandler "RG520NEU"; then #5G module - nsa_nr5g_bands="1 3 5 7 8 20 28 38 40 41 75 76 77 78" - sa_nr5g_bands="1 3 5 7 8 20 28 38 40 41 75 76 77 78" - lte_bands="1 3 5 7 8 20 28 32 38 40 41 42 43" - trysg_bands="2100 850 900" - dug_bands="" - else - lte_bands="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28" - trysg_bands="700 800 850 900 1500 1700 2600" - dug_bands="1700 1800 1900 2100" - fi -} - -validate_service_modes() { - json_get_keys service_modes service_modes - - found_modes="$(printf "$service_modes" | awk '!seen[$0]++'| wc -l)" - [ "$found_modes" -eq 0 ] && { - return 0 - } - - return 1 -} - -#~ Get model name for RUTX products -setup_modem() { - local key="$1" - local object_num="$2" - local id gps boudrate type desc control product vendor stop_bits - - json_select "$object_num" - json_get_vars id product - - if [ "$id" = "$id_from_unhandler" ]; then - - [ -z "$product" ] || \ - { - [ -f "/sys/bus/usb/devices/$id/idVendor" ] && [ -f "/sys/bus/usb/devices/$id/idProduct" ] || { - json_select .. - return 1 - } - - validate_service_modes && { - gather_band_capabilities - json_select_object service_modes - [ -z "$nsa_nr5g_bands" ] || print_array "5G_NSA" "$nsa_nr5g_bands" - [ -z "$sa_nr5g_bands" ] || print_array "5G_SA" "$sa_nr5g_bands" - [ -z "$lte_bands" ] || print_array "4G" "$lte_bands" - [ -z "$trysg_bands" ] || print_array "3G" "$trysg_bands" - [ -z "$dug_bands" ] || print_array "2G" "$dug_bands" - json_select .. - } - json_select .. - return 1 - } - - vendor="$(cat "/sys/bus/usb/devices/$id/idVendor")" - product="$(cat "/sys/bus/usb/devices/$id/idProduct")" - - [ -f "/lib/network/wwan/$vendor:$product" ] && { - devicename="$id" - - gather_band_capabilities - - json_set_namespace defaults old_cb - json_load "$(cat /lib/network/wwan/$vendor:$product)" - json_get_vars gps boudrate type desc control stop_bits - json_set_namespace "$old_cb" - - [ "${devicename%%:*}" = "$devicename" ] && { - json_add_string vendor "$vendor" - json_add_string product "$product" - json_add_string gps "$gps" - json_add_string stop_bits "$stop_bits" - json_add_string boudrate "$boudrate" - json_add_string type "$type" - json_add_string desc "$desc" - json_add_string control "$control" - json_add_string revision "${revision_from_unhandler::-2}" - json_add_object service_modes - [ -z "$nsa_nr5g_bands" ] || print_array "5G_NSA" "$nsa_nr5g_bands" - [ -z "$sa_nr5g_bands" ] || print_array "5G_SA" "$sa_nr5g_bands" - [ -z "$lte_bands" ] || print_array "4G" "$lte_bands" - [ -z "$trysg_bands" ] || print_array "3G" "$trysg_bands" - [ -z "$dug_bands" ] || print_array "2G" "$dug_bands" - json_close_object - } - } - fi - json_select .. -} - -[ -s "${CFG}" ] || exit 1 - -id_from_unhandler="$1" -revision_from_unhandler="$2" - -lock /var/run/board_modem.lock - -board_config_update -json_for_each_item setup_modem modems -board_config_flush - -lock -u /var/run/board_modem.lock - -exit 0 diff --git a/6.6/target/linux/ipq40xx.new/base-files/bin/board_track b/6.6/target/linux/ipq40xx.new/base-files/bin/board_track deleted file mode 100755 index 563b87681..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/bin/board_track +++ /dev/null @@ -1,47 +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 - } - - #logger -t "board-track" "ls -d /sys/bus/usb/devices/$id/${id}*/tty?*" - ttys=$(ls -d /sys/bus/usb/devices/$id/${id}*/tty?*) - - [ -n "$ttys" ] || { #FAILED TO FIND MODEM - logger -t "board-track" "modem $id not detected" - for m in /sys/class/gpio/modem*_power; do - label="$(basename $m | awk -F_ '{print $1}')" - mctl -s -m ${label} - sleep 1 - mctl -p -m ${label} - done - sleep 5 - ip link set up dev wwan0 2>&1 >/dev/null - ip link set up dev wwan1 2>&1 >/dev/null - json_select .. - return 1 - } - - [ -n "$(ip link show dev wwan0 | grep DOWN)" ] && ip link set up dev wwan0 2>&1 >/dev/null - [ -n "$(ip link show dev wwan1 | grep DOWN)" ] && ip link set up dev wwan1 2>&1 >/dev/null - - #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/6.6/target/linux/ipq40xx.new/base-files/bin/config_generate b/6.6/target/linux/ipq40xx.new/base-files/bin/config_generate deleted file mode 100755 index c205a7fdf..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/bin/config_generate +++ /dev/null @@ -1,824 +0,0 @@ -#!/bin/sh - -CFG=/etc/board.json - -. /usr/share/libubox/jshn.sh - -[ -s $CFG ] || /bin/board_detect || exit 1 - -[ -s /etc/config/network ] && \ -[ -s /etc/config/system ] && \ -[ -s /etc/config/hwinfo ] && \ -[ -s /etc/config/blesem ] && \ -[ -s /etc/config/poe ] && \ -exit 0 - -generate_bridge() { - local name=$1 - local macaddr=$2 - uci -q batch <<-EOF - set network.$name=device - set network.$name.name=$name - set network.$name.type=bridge - EOF - if [ -n "$macaddr" ]; then - uci -q batch <<-EOF - set network.$name.macaddr=$macaddr - EOF - fi -} - -generate_static_network() { - uci -q batch <<-EOF - delete network.loopback - set network.loopback='interface' - set network.loopback.device='lo' - set network.loopback.proto='static' - set network.loopback.ipaddr='127.0.0.1' - set network.loopback.netmask='255.0.0.0' - EOF - - if json_is_a dsl object; then - json_select dsl - if json_is_a atmbridge object; then - json_select atmbridge - local vpi vci encaps payload nameprefix - json_get_vars vpi vci encaps payload nameprefix - uci -q batch <<-EOF - delete network.atm - set network.atm='atm-bridge' - set network.atm.vpi='$vpi' - set network.atm.vci='$vci' - set network.atm.encaps='$encaps' - set network.atm.payload='$payload' - set network.atm.nameprefix='$nameprefix' - EOF - json_select .. - fi - - if json_is_a modem object; then - json_select modem - local type annex firmware tone xfer_mode - json_get_vars type annex firmware tone xfer_mode - uci -q batch <<-EOF - delete network.dsl - set network.dsl='dsl' - set network.dsl.annex='$annex' - set network.dsl.firmware='$firmware' - set network.dsl.tone='$tone' - set network.dsl.xfer_mode='$xfer_mode' - EOF - json_select .. - fi - json_select .. - fi -} - -ip6assign= -disable_vlan= -apply_network_options() { - json_select network_options && { - json_get_vars ip6assign ula disable_vlan - json_select .. - } - [ -z "$ip6assign" ] && ip6assign=1 - [ -z "$ula" ] && ula=1 - - [ -e /proc/sys/net/ipv6 ] && [ "$ula" = 1 ] && { - uci -q batch <<-EOF - delete network.globals - set network.globals='globals' - set network.globals.ula_prefix='auto' - EOF - } -} - -metric=1 -addr_offset=2 -generate_network() { - local ports device macaddr proto type ipaddr netmask vlan no_metric - local bridge=$2 - - uci -q batch <<-EOF - delete "network.$1" - set network.$1='interface' - EOF - - json_select network - json_select "$1" - json_get_vars device macaddr proto ipaddr netmask vlan ipv6 guest type - json_get_values ports ports - json_select .. - json_select .. - - - json_select network_options && { - json_get_vars no_metric - json_select .. - } - - # Force bridge for "lan" as it may have other devices (e.g. wireless) - # bridged - [ "$1" = "lan" ] && [ -z "$ports" ] && { - ports="$device" - } - - [ -n "$ports" ] && [ -z "$bridge" ] && { - - [ -n "$macaddr" ] && { - for port in $ports; do - uci -q batch <<-EOF - add network device - set network.@device[-1].name='$port' - set network.@device[-1].macaddr='$macaddr' - EOF - done - } - - uci -q batch <<-EOF - add network device - rename network.@device[-1]='br_$1' - set network.@device[-1].name='br-$1' - set network.@device[-1].type='bridge' - EOF - - [ -n "$device" ] && uci add_list network.@device[-1].ports="$device" || { - for port in $ports; do - uci add_list network.@device[-1].ports="$port" - done - } - - device=br-$1 - type= - macaddr="" - - json_select hwinfo - json_get_vars dsa - json_select .. - - } - - if [ -n "$macaddr" ]; then - uci -q batch <<-EOF - add network device - set network.@device[-1].name='$device' - set network.@device[-1].macaddr='$macaddr' - EOF - fi - - uci -q batch <<-EOF - delete network.$1 - set network.$1='interface' - set network.$1.type='$type' - set network.$1.device='$device' - set network.$1.proto='none' - EOF - [ "$1" != "lan" ] && metric=$((metric+1)) - [ "$guest" = "1" ] && uci set network.$1.guest='1' - - case "$proto" in - static) - local ipad metr - case "$1" in - lan) - ipad="192.168.100.1" - metr=1 - ;; - *) - ipad=${ipaddr:-"192.168.$((addr_offset++)).1"} - metr="$metric" - ;; - esac - - netm=${netmask:-"255.255.255.0"} - - uci -q batch <<-EOF - set network.$1.proto='static' - set network.$1.ipaddr='$ipad' - set network.$1.netmask='$netm' - set network.$1.metric='$metr' - EOF - - [ "$ipv6" = "1" ] && uci set network.$1.ipv6="$ipv6" - [ -e /proc/sys/net/ipv6 ] && [ "$ip6assign" = 1 ] && \ - uci set network.$1.ip6assign='60' - ;; - - dhcp) - # fixup IPv6 slave interface if parent is a bridge - [ "$type" = "bridge" ] && device="br-$1" - - uci -q batch <<-EOF - set network.$1.proto='dhcp' - set network.$1.metric='$metric' - EOF - [ -e /proc/sys/net/ipv6 ] && { - metric=$((metric+1)) - uci -q batch <<-EOF - delete network.${1}6 - set network.${1}6='interface' - set network.${1}6.device='$device' - set network.${1}6.proto='dhcpv6' - set network.${1}6.metric='$metric' - EOF - [ "$ip6assign" != 1 ] && uci set network.${1}6.delegate='0' - } - ;; - - pppoe) - uci -q batch <<-EOF - set network.$1.proto='pppoe' - set network.$1.username='username' - set network.$1.password='password' - EOF - [ -e /proc/sys/net/ipv6 ] && { - uci -q batch <<-EOF - set network.$1.ipv6='1' - delete network.${1}6 - set network.${1}6='interface' - set network.${1}6.device='@${1}' - set network.${1}6.proto='dhcpv6' - EOF - } - ;; - esac - - [ -n "$no_metric" ] && { - uci -q delete network.${1}.metric - [ -e /proc/sys/net/ipv6 ] && uci -q delete network.${1}6.metric - } -} - -add_modem_section() { - local id="$1" - local num="$2" - local simcount="$3" - local builtin="$4" - local custom_proto custom_ifname - - json_select .. - json_get_vars custom_proto custom_ifname - json_select modems - for count in $(seq "$simcount"); do - interface="mob${num}s${count}a1" - local proto="wwan" - - # if needed, use custom proto for rmnet/other devices - [ -n "${custom_proto}" ] && proto="${custom_proto}" - - metric=$((metric+1)) - - uci_remove network "${interface}" - uci_add network interface "${interface}" - uci_set network "${interface}" proto "$proto" - uci_set network "${interface}" modem "$id" - uci_set network "${interface}" metric "$metric" - uci_set network "${interface}" sim "${count}" - uci_set network "${interface}" dhcpv6 "0" - uci_set network "${interface}" pdptype "ip" - uci_set network "${interface}" method "nat" - uci_set network "${interface}" auth "none" - uci_set network "${interface}" auto_apn "1" - - # if needed, use custom ifname for rmnet/other devices - [ -n "${custom_ifname}" ] && \ - uci_set network "${interface}" device "${custom_ifname}" - - uci_commit network - - update_firewall_zone "wan" "$interface" - create_multiwan_iface "$interface" "$metric" - add_simcard_config "$id" "${count}" "${count}" "$builtin" - add_sim_switch_config "$id" "${count}" - add_quota_limit_config "$interface" - done - add_sms_storage_config "$id" -} - -generate_dynamic_lte() { -[ -f /lib/functions/modem.sh ] || return -. /lib/functions/modem.sh - - local interface num id simcount builtin - - #creating simcard sections from board.json file - if json_is_a modems array; then - json_get_keys modems modems - json_select modems - - num=1 - - for modem in $modems; do - json_select "$modem" - json_get_vars id simcount builtin - json_select .. - add_modem_section "$id" "$num" "$simcount" "$builtin" - num=$(( num + 1 )) - done - - json_select .. - else - ## because of RUTX8 have no default modem - # after this script runs out simcard config - # must not be empty due to external modems could appear to config - echo " " >> /etc/config/simcard - fi - - #creating simcard sections from conneted via USB - for a in `ls /sys/bus/usb/devices`; do - local vendor product - [ -f "/sys/bus/usb/devices/$a/idVendor" ] && [ -f "/sys/bus/usb/devices/$a/idProduct" ] || continue - vendor=$(cat "/sys/bus/usb/devices/$a/idVendor") - product=$(cat "/sys/bus/usb/devices/$a/idProduct") - [ -f "/lib/network/wwan/${vendor}:${product}" ] && { - add_simcard_config "$a" "1" "0" "" - add_sms_storage_config "$a" - } - done -} - -generate_switch_vlans_ports() { - local switch="$1" - local port ports role roles num attr val - - # - # autogenerate vlans - # - - if json_is_a roles array; then - json_get_keys roles roles - json_select roles - - for role in $roles; do - json_select "$role" - json_get_vars ports - json_select .. - - uci -q batch <<-EOF - add network switch_vlan - set network.@switch_vlan[-1].device='$switch' - set network.@switch_vlan[-1].vlan='$role' - set network.@switch_vlan[-1].vid='$role' - set network.@switch_vlan[-1].ports='$ports' - EOF - done - - json_select .. - fi - - - # - # write port specific settings - # - - if json_is_a ports array; then - json_get_keys ports ports - json_select ports - - for port in $ports; do - json_select "$port" - json_get_vars num - - if json_is_a attr object; then - json_get_keys attr attr - json_select attr - uci -q batch <<-EOF - add network switch_port - set network.@switch_port[-1].device='$switch' - set network.@switch_port[-1].port=$num - EOF - - for attr in $attr; do - json_get_var val "$attr" - uci -q set network.@switch_port[-1].$attr="$val" - done - json_select .. - fi - json_select .. - done - - json_select .. - fi -} - -generate_switch() { - local key="$1" - local vlans - - json_select switch - json_select "$key" - json_get_vars enable reset blinkrate cpu_port \ - ar8xxx_mib_type ar8xxx_mib_poll_interval - - [ "$disable_vlan" = 1 ] && enable=0 - uci -q batch <<-EOF - add network switch - set network.@switch[-1].name='$key' - set network.@switch[-1].reset='$reset' - set network.@switch[-1].enable_vlan='$enable' - set network.@switch[-1].blinkrate='$blinkrate' - set network.@switch[-1].ar8xxx_mib_type='$ar8xxx_mib_type' - set network.@switch[-1].ar8xxx_mib_poll_interval='$ar8xxx_mib_poll_interval' - EOF - - generate_switch_vlans_ports "$1" - - json_select .. - json_select .. -} - - -generate_static_system() { - param=$(/sbin/mnf_info "--name") - hostname=${param:0:6} - uci -q batch <<-EOF - delete system.@system[0] - set system.system='system' - set system.@system[-1].hostname='$hostname' - set system.@system[-1].timezone='UTC' - set system.@system[-1].ttylogin='0' - set system.@system[-1].log_buffer_size='128' - set system.@system[-1].log_size='200' - set system.@system[-1].urandom_seed='0' - - delete system.ntp - set system.ntp='timeserver' - set system.ntp.zoneName='UTC' - set system.ntp.enabled='0' - set system.ntp.enable_server='0' - add_list system.ntp.server='0.pool.ntp.org' - add_list system.ntp.server='1.pool.ntp.org' - add_list system.ntp.server='2.pool.ntp.org' - add_list system.ntp.server='3.pool.ntp.org' - - delete system.debug - set system.debug='debug' - set system.debug.sms_utils_debug_level='4' - EOF - - if json_is_a system object; then - json_select system - local hostname - if json_get_var hostname hostname; then - uci -q set "system.@system[-1].hostname=$hostname" - fi - - if json_is_a ntpserver array; then - local keys key - json_get_keys keys ntpserver - json_select ntpserver - uci -q delete "system.ntp.server" - - for key in $keys; do - local server - if json_get_var server "$key"; then - uci -q add_list "system.ntp.server=$server" - fi - done - json_select .. - fi - json_select .. - fi -} - -generate_rssimon() { - local key="$1" - local cfg="rssid_$key" - local refresh threshold - - json_select rssimon - json_select "$key" - json_get_vars refresh threshold - json_select .. - json_select .. - - uci -q batch <<-EOF - delete system.$cfg - set system.$cfg='rssid' - set system.$cfg.dev='$key' - set system.$cfg.refresh='$refresh' - set system.$cfg.threshold='$threshold' - EOF -} - -generate_led() { - local key="$1" - local cfg="led_$key" - - json_select led - json_select "$key" - json_get_vars name sysfs type trigger default - - uci -q batch <<-EOF - delete system.$cfg - set system.$cfg='led' - set system.$cfg.name='$name' - set system.$cfg.sysfs='$sysfs' - set system.$cfg.trigger='$trigger' - set system.$cfg.default='$default' - EOF - - case "$type" in - gpio) - local gpio inverted - json_get_vars gpio inverted - uci -q batch <<-EOF - set system.$cfg.trigger='gpio' - set system.$cfg.gpio='$gpio' - set system.$cfg.inverted='$inverted' - EOF - ;; - - netdev) - local device mode - json_get_vars device mode - uci -q batch <<-EOF - set system.$cfg.trigger='netdev' - set system.$cfg.mode='$mode' - set system.$cfg.dev='$device' - EOF - ;; - - usb) - local device - json_get_vars device - uci -q batch <<-EOF - set system.$cfg.trigger='usbdev' - set system.$cfg.interval='50' - set system.$cfg.dev='$device' - EOF - ;; - - usbport) - local ports port - json_get_values ports ports - uci set system.$cfg.trigger='usbport' - for port in $ports; do - uci add_list system.$cfg.port=$port - done - ;; - - rssi) - local iface minq maxq offset factor - json_get_vars iface minq maxq offset factor - uci -q batch <<-EOF - set system.$cfg.trigger='rssi' - set system.$cfg.iface='rssid_$iface' - set system.$cfg.minq='$minq' - set system.$cfg.maxq='$maxq' - set system.$cfg.offset='$offset' - set system.$cfg.factor='$factor' - EOF - ;; - - switch) - local port_mask speed_mask mode - json_get_vars port_mask speed_mask mode - uci -q batch <<-EOF - set system.$cfg.port_mask='$port_mask' - set system.$cfg.speed_mask='$speed_mask' - set system.$cfg.mode='$mode' - EOF - ;; - - portstate) - local port_state - json_get_vars port_state - uci -q batch <<-EOF - set system.$cfg.port_state='$port_state' - EOF - ;; - - timer|oneshot) - local delayon delayoff - json_get_vars delayon delayoff - uci -q batch <<-EOF - set system.$cfg.trigger='$type' - set system.$cfg.delayon='$delayon' - set system.$cfg.delayoff='$delayoff' - EOF - ;; - esac - - json_select .. - json_select .. -} - -generate_gpioswitch() { - local cfg="$1" - - json_select gpioswitch - json_select "$cfg" - local name pin default - json_get_vars name pin default - uci -q batch <<-EOF - delete system.$cfg - set system.$cfg='gpio_switch' - set system.$cfg.name='$name' - set system.$cfg.gpio_pin='$pin' - set system.$cfg.value='$default' - EOF - json_select .. - json_select .. -} - -generate_hwinfo() { - local parameter="$1" - local temp - - json_select hwinfo - json_get_var temp "$parameter" - json_select .. - - uci -q batch <<-EOF - set hwinfo.hwinfo='hwinfo' - set hwinfo.hwinfo.$parameter='$temp' - EOF -} - -set_poe_ports() { - json_select "$1" - json_get_vars name class budget - uci -q batch <<-EOF - set poe.port$1='port$1' - set poe.port$1.name='$name' - set poe.port$1.poe_enable='1' - set poe.port$1.class='$class' - set poe.port$1.budget='$budget' - EOF - json_select .. -} - -set_poe_chips(){ - local keys key - uci -q set poe.chip$1=chip$1 - json_get_keys keys "$1" - json_select "$1" - for key in $keys; do - json_get_var var "$key" - uci -q set poe.chip$1.$key="$var" - done - json_select .. -} - -generate_poe_config(){ - if json_is_a poe object; then - json_select poe - json_get_vars chip_count budget poe_ports - uci -q batch <<-EOF - set poe.poe='poe' - set poe.poe.chip_count='$chip_count' - set poe.poe.budget='$budget' - set poe.poe.poe_ports='$poe_ports' - EOF - if json_is_a ports array; then - #json_for_each_item "set_poe_ports" ports - json_select ports - idx=1 - while json_is_a ${idx} object - do - "set_poe_ports" $idx - idx=$(( idx + 1 )) - done - json_select .. - fi - if json_is_a poe_chips array; then - json_select poe_chips - idx=1 - while json_is_a ${idx} object - do - "set_poe_chips" $idx - idx=$(( idx + 1 )) - done - json_select .. - fi - json_select .. - fi -} - -generate_bluetooth() { - uci -q batch <<-EOF - set blesem.general='section' - set blesem.general.enabled='0' - set blesem.settings='app' - set blesem.settings.refresh_time='30000' - EOF -} - -add_firewall_zone() { - local device - - json_select network - json_select "$1" - json_get_vars device - json_select .. - json_select .. - - fw3 -q network "$1" || fw3 -q device "$device" && return - - uci -q batch <<-EOF - add firewall zone - set firewall.@zone[-1].name='$1' - set firewall.@zone[-1].network='$1' - set firewall.@zone[-1].input='REJECT' - set firewall.@zone[-1].output='ACCEPT' - set firewall.@zone[-1].forward='REJECT' - - add firewall forwarding - set firewall.@forwarding[-1].src='$1' - set firewall.@forwarding[-1].dest='wan' - - add firewall rule - set firewall.@rule[-1].name='Allow-DNS-$1' - set firewall.@rule[-1].src='$1' - set firewall.@rule[-1].dest_port='53' - set firewall.@rule[-1].proto='tcp udp' - set firewall.@rule[-1].target='ACCEPT' - - add firewall rule - set firewall.@rule[-1].name='Allow-DHCP-$1' - set firewall.@rule[-1].src='$1' - set firewall.@rule[-1].dest_port='67' - set firewall.@rule[-1].proto='udp' - set firewall.@rule[-1].family='ipv4' - set firewall.@rule[-1].target='ACCEPT' - EOF -} - -add_dhcp() { - - json_select network - json_select "$1" - json_get_vars _dhcp - json_select .. - json_select .. - - [ "$_dhcp" = "true" ] || return - uci -q batch <<-EOF - set dhcp.$1='dhcp' - set dhcp.$1.interface='$1' - set dhcp.$1.start='100' - set dhcp.$1.limit='150' - set dhcp.$1.leasetime='1h' - EOF -} - -json_init -json_load "$(cat ${CFG})" - -umask 077 - -if [ ! -s /etc/config/network ]; then - touch /etc/config/network - generate_static_network - apply_network_options - - json_get_keys keys network - for key in $keys; do - generate_network $key - add_dhcp "$key" - done - - json_get_keys keys switch - for key in $keys; do generate_switch $key; done - - generate_dynamic_lte -fi - -if [ ! -s /etc/config/system ]; then - touch /etc/config/system - generate_static_system - - json_get_keys keys rssimon - for key in $keys; do generate_rssimon $key; done - - json_get_keys keys gpioswitch - for key in $keys; do generate_gpioswitch $key; done - - json_get_keys keys led - for key in $keys; do generate_led $key; done -fi - -if [ ! -s /etc/config/hwinfo ]; then - touch /etc/config/hwinfo - json_get_keys keys hwinfo - for key in $keys; do generate_hwinfo $key; done -fi - -if [ ! -s /etc/config/poe ]; then - touch /etc/config/poe - generate_poe_config -fi - -if [ ! -s /etc/config/blesem ]; then - bluetooth="" - json_select hwinfo - json_get_vars bluetooth - [ "$bluetooth" -eq 1 ] && { - touch /etc/config/blesem - touch /etc/config/ble_devices - generate_bluetooth - } -fi - -uci commit diff --git a/6.6/target/linux/ipq40xx.new/base-files/bin/ipcalc.sh b/6.6/target/linux/ipq40xx.new/base-files/bin/ipcalc.sh deleted file mode 100755 index 5d5eac3ea..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/bin/ipcalc.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -awk -f - $* <limit) end=limit - - print "IP="int2ip(ipaddr) - print "NETMASK="int2ip(netmask) - print "BROADCAST="int2ip(broadcast) - print "NETWORK="int2ip(network) - print "PREFIX="32-bitcount(compl32(netmask)) - - # range calculations: - # ipcalc - - if (ARGC > 3) { - print "START="int2ip(start) - print "END="int2ip(end) - } -} -EOF diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/board.d/02_network b/6.6/target/linux/ipq40xx.new/base-files/etc/board.d/02_network deleted file mode 100644 index 97fbb10ee..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/board.d/02_network +++ /dev/null @@ -1,235 +0,0 @@ -# -# Copyright (c) 2015 The Linux Foundation. All rights reserved. -# Copyright (c) 2011-2015 OpenWrt.org -# - -. /lib/functions/uci-defaults.sh -. /lib/functions/system.sh - -ipq40xx_setup_interfaces() -{ - local board="$1" - - case "$board" in - 8dev,habanero-dvk|\ - avm,fritzbox-4040|\ - asus,rt-ac42u|\ - asus,rt-ac58u|\ - linksys,ea6350v3|\ - linksys,ea8300|\ - linksys,mr8300|\ - mikrotik,hap-ac2|\ - mikrotik,hap-ac3|\ - mikrotik,hap-ac3-lte6-kit|\ - p2w,r619ac-64m|\ - p2w,r619ac-128m|\ - pakedge,wr-1|\ - teltonika,rutx|\ - teltonika,rutx12|\ - teltonika,rutx50|\ - zyxel,nbg6617) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" - ;; - 8dev,jalapeno|\ - alfa-network,ap120c-ac|\ - asus,map-ac2200|\ - cilab,meshpoint-one|\ - edgecore,ecw5211|\ - glinet,gl-ap1300|\ - glinet,gl-b2200|\ - google,wifi|\ - linksys,whw03v2|\ - luma,wrtq-329acn|\ - mikrotik,cap-ac|\ - netgear,wac510|\ - sony,ncp-hg100-cellular|\ - wallys,dr40x9|\ - zte,mf18a|\ - zte,mf289f) - ucidef_set_interfaces_lan_wan "lan" "wan" - ;; - aruba,ap-303|\ - aruba,ap-365|\ - avm,fritzrepeater-1200|\ - dlink,dap-2610|\ - extreme-networks,ws-ap3915i|\ - meraki,mr33|\ - meraki,mr74|\ - mikrotik,lhgg-60ad|\ - mikrotik,sxtsq-5-ac|\ - netgear,ex6100v2|\ - netgear,ex6150v2) - ucidef_set_interface_lan "lan" - ;; - avm,fritzbox-7530) - ucidef_set_interface_lan "lan1 lan2 lan3 lan4" - ;; - avm,fritzrepeater-3000|\ - cellc,rtl30vw) - ucidef_set_interface_lan "lan1 lan2" - ;; - compex,wpj428) - ucidef_set_interface_lan "lan1 lan2" - ;; - linksys,whw01) - ucidef_set_interface_lan "eth1 eth2" - ;; - glinet,gl-a1300|\ - glinet,gl-b1300|\ - mobipromo,cm520-79f) - ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" - ;; - mikrotik,wap-ac|\ - mikrotik,wap-ac-lte|\ - mikrotik,wap-r-ac) - ucidef_set_interface_lan "sw-eth1 sw-eth2" - ;; - aruba,ap-303h|\ - buffalo,wtr-m2133hp|\ - ezviz,cs-w3-wd1200g-eup|\ - netgear,rbr50|\ - netgear,rbs50|\ - netgear,srr60|\ - netgear,srs60|\ - teltonika,rutx10) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" - ;; - openmesh,a42|\ - openmesh,a62) - ucidef_set_interfaces_lan_wan "ethernet2" "ethernet1" - ;; - plasmacloud,pa1200|\ - plasmacloud,pa2200) - ucidef_set_interfaces_lan_wan "ethernet1" "ethernet2" - ;; - qxwlan,e2600ac-c1) - ucidef_set_interfaces_lan_wan "sw-eth1" "sw-eth2" - ;; - qxwlan,e2600ac-c2) - ucidef_set_interfaces_lan_wan "sw-eth1 sw-eth2" "sw-eth3" - ;; - zte,mf286d) - ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" "wan" - ;; - *) - echo "Unsupported hardware. Network interfaces not initialized" - ;; - esac -} - -ipq40xx_setup_dsl() -{ - local board="$1" - local annex="j" - local tone="b" - local xfer_mode="" - - case "$board" in - avm,fritzbox-7530) - ;; - *) - return 0 - ;; - esac - - ucidef_add_atm_bridge "1" "32" "llc" "bridged" "dsl" - ucidef_add_vdsl_modem "$annex" "$tone" "$xfer_mode" - ucidef_set_interface_wan "dsl0" "pppoe" -} - -ipq40xx_setup_macs() -{ - local board="$1" - local lan_mac="" - local wan_mac="" - local label_mac="" - - case "$board" in - 8dev,habanero-dvk) - label_mac=$(mtd_get_mac_binary "ART" 0x1006) - ;; - asus,rt-ac42u) - label_mac=$(mtd_get_mac_binary_ubi Factory 0x1006) - ;; - asus,rt-ac58u) - wan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006) - lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006) - label_mac=$wan_mac - ;; - avm,fritzbox-7530) - local tffsdev=$(find_mtd_chardev "nand-tffs") - wan_mac=$(/usr/bin/fritz_tffs_nand -b -d $tffsdev -n macdsl) - ;; - cilab,meshpoint-one) - label_mac=$(mtd_get_mac_binary "ART" 0x1006) - ;; - devolo,magic-2-wifi-next) - lan_mac=$(mtd_get_mac_ascii APPSBLENV MacAddress0) - label_mac=$lan_mac - ;; - dlink,dap-2610) - lan_mac=$(mtd_get_mac_ascii bdcfg lanmac) - label_mac=$lan_mac - ;; - engenius,eap2200|\ - engenius,emd1) - lan_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr) - label_mac=$lan_mac - ;; - engenius,emr3500) - wan_mac=$(mtd_get_mac_ascii 0:APPSBLENV wanaddr) - lan_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr) - label_mac=$wan_mac - ;; - engenius,ens620ext) - wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) - lan_mac=$(macaddr_add "$wan_mac" 1) - ;; - ezviz,cs-w3-wd1200g-eup) - label_mac=$(mtd_get_mac_binary "ART" 0x6) - ;; - google,wifi) - wan_mac=$(get_mac_label) - lan_mac=$(macaddr_add "$wan_mac" 1) - ;; - linksys,ea6350v3|\ - linksys,ea8300 |\ - linksys,mr8300) - wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - lan_mac=$(macaddr_add "$wan_mac" 1) - ;; - mikrotik,cap-ac |\ - mikrotik,hap-ac2|\ - mikrotik,hap-ac3|\ - mikrotik,hap-ac3-lte6-kit) - wan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base) - lan_mac=$(macaddr_add $wan_mac 1) - label_mac="$wan_mac" - ;; - mikrotik,lhgg-60ad|\ - mikrotik,sxtsq-5-ac) - lan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base) - label_mac="$lan_mac" - ;; - netgear,rbr50|\ - netgear,rbs50|\ - netgear,srr60|\ - netgear,srs60|\ - pakedge,wr-1) - wan_mac=$(macaddr_add $(get_mac_label) 1) - ;; - esac - - [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac - [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac - [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac -} - -board_config_update -board=$(board_name) -ipq40xx_setup_interfaces $board -ipq40xx_setup_dsl $board -ipq40xx_setup_macs $board -board_config_flush - -exit 0 diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/board.d/1-board_json b/6.6/target/linux/ipq40xx.new/base-files/etc/board.d/1-board_json deleted file mode 100755 index 8ce32f614..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/board.d/1-board_json +++ /dev/null @@ -1,515 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2015 The Linux Foundation. All rights reserved. -# Copyright (c) 2011-2015 OpenWrt.org -# - -. /lib/functions/uci-defaults.sh -. /lib/functions/teltonika-defaults.sh -. /lib/functions/system.sh - -[ -f /lib/functions/target-defaults.sh ] && \ - . /lib/functions/target-defaults.sh - -setup_json() { - local model="$1" - - case "$model" in - RUTX08*) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "0u@eth1" "5:wan" - ucidef_set_usb_jack "/usb1/1-1/" - ucidef_set_hwinfo usb ethernet ios - ucidef_set_network_options "vlans" 128 "readonly_vlans" 2 - ;; - RUTX09*) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "0u@eth1" "5:wan" - ucidef_add_static_modem_info "$model" "3-1" "2" "primary" "gps_out" - ucidef_set_usb_jack "/usb1/1-1/" - ucidef_set_hwinfo dual_sim usb gps mobile ethernet ios - ucidef_set_network_options "vlans" 128 "readonly_vlans" 2 - ;; - RUTX10*) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "0u@eth1" "5:wan" - ucidef_set_usb_jack "/usb1/1-1/" - ucidef_add_wlan_bssid_limit "wlan0" 16 - ucidef_add_wlan_bssid_limit "wlan1" 16 - ucidef_set_hwinfo bluetooth usb wifi dual_band_ssid ethernet ios - ucidef_set_network_options "vlans" 128 "readonly_vlans" 2 - ;; - RUTX11*) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "0u@eth1" "5:wan" - ucidef_add_wlan_bssid_limit "wlan0" 16 - ucidef_add_wlan_bssid_limit "wlan1" 16 - ucidef_add_static_modem_info "$model" "3-1" "2" "primary" "gps_out" - ucidef_set_usb_jack "/usb1/1-1/" - ucidef_set_hwinfo dual_sim usb gps mobile wifi dual_band_ssid bluetooth ethernet ios - ucidef_set_network_options "vlans" 128 "readonly_vlans" 2 - ;; - RUTXR1*) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" - ucidef_add_wlan_bssid_limit "wlan0" 16 - ucidef_add_wlan_bssid_limit "wlan1" 16 - ucidef_add_static_modem_info "$model" "3-1" "2" "primary" - ucidef_set_hwinfo dual_sim usb mobile wifi dual_band_ssid ethernet sfp_port sfp_switch console rs232 - ucidef_set_usb_jack "/usb1/1-1/1-1.2/" - ucidef_add_serial_capabilities "rs232" \ - "300 600 1200 2400 4800 9600 19200 38400 57600 115200" \ - "7 8" \ - "rts/cts xon/xoff none" \ - "1 2" \ - "even odd mark space none" \ - "/usb1/1-1/1-1.3/" - ucidef_set_release_version "2.3.1" - ucidef_set_network_options "vlans" 128 "readonly_vlans" 2 - ;; - RUTX12*) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" - ucidef_add_wlan_bssid_limit "wlan0" 16 - ucidef_add_wlan_bssid_limit "wlan1" 16 - # builtin and primary should be first modem - ucidef_add_static_modem_info "$model" "3-1" "1" "primary" "gps_out" - ucidef_add_static_modem_info "$model" "1-1.2" "1" - ucidef_set_usb_jack "/usb1/1-1/1-1.3/" - ucidef_set_hwinfo usb gps mobile wifi dual_band_ssid bluetooth ethernet ios dual_modem - ucidef_set_release_version "2.3.1" - ucidef_set_network_options "vlans" 128 "readonly_vlans" 2 - ;; - RUTX14*) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" - ucidef_add_wlan_bssid_limit "wlan0" 16 - ucidef_add_wlan_bssid_limit "wlan1" 16 - ucidef_add_static_modem_info "$model" "1-1" "2" "primary" "gps_out" - ucidef_set_usb_jack "/usb3/3-1/" - ucidef_set_hwinfo usb gps dual_sim mobile wifi dual_band_ssid bluetooth ethernet ios at_sim - ucidef_set_release_version "2.6.1" - ucidef_set_network_options "vlans" 128 "readonly_vlans" 2 - ;; - RUTX18*) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" - ucidef_add_wlan_bssid_limit "wlan0" 16 - ucidef_add_wlan_bssid_limit "wlan1" 16 - ucidef_add_static_modem_info "$model" "2-1" "2" "primary" "gps_out" - ucidef_set_usb_jack "/usb1/1-1/" - ucidef_set_hwinfo usb gps dual_sim mobile wifi dual_band_ssid bluetooth ethernet ios - ucidef_set_network_options "vlans" 128 "readonly_vlans" 2 - ;; - RUTX50*) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_switch "switch0" \ - "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" - ucidef_add_wlan_bssid_limit "wlan0" 16 - ucidef_add_wlan_bssid_limit "wlan1" 16 - ucidef_add_static_modem_info "$model" "2-1" "2" "primary" "gps_out" - ucidef_set_usb_jack "/usb3/3-1/" - ucidef_set_hwinfo dual_sim usb gps mobile wifi dual_band_ssid ethernet ios at_sim - ucidef_set_release_version "7.2.8" - ucidef_set_network_options "vlans" 128 "readonly_vlans" 2 - ;; - TRB2*) - ucidef_set_led_switch "lan" "LAN" "eth_led" "switch0" "0x04" - ucidef_set_interface_lan "eth0" - ucidef_add_static_modem_info "$model" "1-1.4" "2" "primary" "gps_out" - ucidef_add_serial_capabilities "rs232" \ - "300 600 1200 2400 4800 9600 19200 38400 57600 115200" \ - "7 8" \ - "rts/cts xon/xoff none" \ - "1 2" \ - "even odd mark space none" \ - "/usb1/1-1/1-1.3/" - ucidef_add_serial_capabilities "rs485" \ - "300 600 1200 2400 4800 9600 19200 38400 57600 115200 \ - 230400 460800 921600 1000000 3000000" \ - "7 8" \ - "none" \ - "1 2" \ - "even odd mark space none" \ - "/usb1/1-1/1-1.2/" - ucidef_set_hwinfo dual_sim mobile gps ethernet ios rs232 rs485 - ucidef_set_network_options "vlans" 16 "readonly_vlans" 1 - ;; - RUT361* |\ - RUT200* |\ - RUT241* |\ - RUT260*) - ucidef_set_led_switch "lan" "LAN" "eth1_led" "switch0" "0x2" - ucidef_set_led_switch "wan" "WAN" "eth2_led" "switch0" "0x1" - ucidef_add_switch "switch0" "1:lan" "0:wan:2" "6@eth0" - ucidef_add_wlan_bssid_limit "wlan0" 4 - ucidef_set_interface_default_macaddr "lan" "$(mtd_get_mac_binary config 0x0)" - ucidef_set_interface_default_macaddr "wan" "$(macaddr_add "$(mtd_get_mac_binary config 0x0)" 1)" - ucidef_add_static_modem_info "$model" "1-1" "1" "primary" - [ "${model:6:1}" = "1" ] && ucidef_set_hwinfo mobile wifi \ - ethernet || ucidef_set_hwinfo mobile wifi ethernet ios - [ "${model:4:2}" = "60" ] && ucidef_set_release_version "7.4.2" - ucidef_set_network_options "vlans" 16 "readonly_vlans" 2 - ;; - RUT2*) - ucidef_set_led_switch "lan" "LAN" "lan_led" "switch0" "0x04" - ucidef_set_led_netdev "wan" "WAN" "wan_led" "eth1" - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_wlan_bssid_limit "wlan0" 8 - ucidef_add_static_modem_info "$model" "1-1" "1" "primary" - [ "${model:6:1}" = "1" ] && ucidef_set_hwinfo mobile wifi \ - ethernet || ucidef_set_hwinfo mobile wifi ethernet ios - ucidef_set_network_options "vlans" 16 "readonly_vlans" 1 - ;; - RUT300*) - ucidef_set_led_switch "lan1" "LAN1" "eth1_led" "switch0" "0x02" - ucidef_set_led_switch "lan2" "LAN2" "eth2_led" "switch0" "0x10" - ucidef_set_led_switch "lan3" "LAN3" "eth3_led" "switch0" "0x08" - ucidef_set_led_switch "lan4" "LAN4" "eth4_led" "switch0" "0x04" - ucidef_set_led_netdev "wan" "WAN" "wan_led" "eth1" - ucidef_set_interface_wan "eth1" - ucidef_set_usb_jack "/usb1/1-1/" - ucidef_add_switch "switch0" \ - "0@eth0" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2" - ucidef_set_hwinfo usb ethernet ios - ucidef_set_network_options "vlans" 16 "readonly_vlans" 1 - ;; - RUT301*) - ucidef_set_led_switch "lan1" "LAN1" "eth1_led" "switch0" "0x01" - ucidef_set_led_switch "lan2" "LAN2" "eth2_led" "switch0" "0x02" - ucidef_set_led_switch "lan3" "LAN3" "eth3_led" "switch0" "0x04" - ucidef_set_led_switch "lan4" "LAN4" "eth4_led" "switch0" "0x08" - ucidef_set_led_switch "wan" "WAN" "wan_led" "switch0" "0x10" - ucidef_add_switch "switch0" "0:lan:1" "1:lan:2" "2:lan:3" \ - "3:lan:4" "4:wan" "6@eth0" - ucidef_set_usb_jack "/usb2/2-1/" - ucidef_set_interface_default_macaddr "wan" "$(macaddr_add "$(mtd_get_mac_binary config 0x0)" 1)" - ucidef_set_hwinfo usb ethernet ios - ucidef_set_network_options "vlans" 16 "readonly_vlans" 2 - ;; - RUT360*) - ucidef_set_led_switch "lan" "LAN" "eth1_led" "switch0" "0x10" - ucidef_set_led_netdev "wan" "WAN" "eth2_led" "eth1" - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_wlan_bssid_limit "wlan0" 8 - ucidef_add_wlan_bssid_limit "wlan1" 8 - ucidef_add_static_modem_info "$model" "1-1" "1" "primary" - ucidef_set_hwinfo mobile wifi dual_band_ssid ethernet ios - ucidef_set_network_options "vlans" 16 "readonly_vlans" 1 - ;; - RUT950*) - ucidef_set_led_switch "lan1" "LAN1" "eth1_led" "switch0" "0x10" - ucidef_set_led_switch "lan2" "LAN2" "eth2_led" "switch0" "0x08" - ucidef_set_led_switch "lan3" "LAN3" "eth3_led" "switch0" "0x04" - ucidef_set_led_netdev "wan" "WAN" "wan_led" "eth1" - ucidef_set_interface_wan "eth1" - ucidef_add_wlan_bssid_limit "wlan0" 8 - ucidef_add_switch "switch0" "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" - ucidef_add_static_modem_info "$model" "1-1" "2" "primary" - [ "${model:7:2}" = "06" ] && ucidef_set_hwinfo dual_sim mobile \ - wifi ethernet || ucidef_set_hwinfo dual_sim mobile wifi ethernet ios - ucidef_set_network_options "vlans" 15 "readonly_vlans" 1 - ;; - RUT955*) - ucidef_set_led_switch "lan1" "LAN1" "eth1_led" "switch0" "0x10" - ucidef_set_led_switch "lan2" "LAN2" "eth2_led" "switch0" "0x08" - ucidef_set_led_switch "lan3" "LAN3" "eth3_led" "switch0" "0x04" - ucidef_set_led_netdev "wan" "WAN" "wan_led" "eth1" - ucidef_set_interface_wan "eth1" - ucidef_add_wlan_bssid_limit "wlan0" 8 - ucidef_add_switch "switch0" "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" - ucidef_set_usb_jack "/usb1/1-1/1-1.1/" - ucidef_add_static_modem_info "$model" "1-1.4" "2" "primary" "gps_out" - [ "${model:7:2}" = "06" ] && ucidef_set_hwinfo dual_sim usb gps sd_card \ - mobile wifi ethernet rs232 rs485 || ucidef_set_hwinfo dual_sim usb gps sd_card \ - mobile wifi ethernet ios rs232 rs485 - ucidef_add_serial_capabilities "rs232" \ - "300 600 1200 2400 4800 9600 19200 38400 57600 115200" \ - "5 6 7 8" \ - "rts/cts xon/xoff none" \ - "1 2" \ - "even odd mark space none" \ - "/usb1/1-1/1-1.3/" - ucidef_add_serial_capabilities "rs485" \ - "300 600 1200 2400 4800 9600 19200 38400 57600 115200 \ - 230400 460800 921600 1000000 3000000" \ - "8" \ - "none" \ - "1 2" \ - "even odd none" \ - "/tty/ttyATH1" - ucidef_set_network_options "vlans" 15 "readonly_vlans" 1 - ;; - RUT901* |\ - RUT951*) - ucidef_set_led_switch "lan1" "LAN1" "eth1_led" "switch0" "0x01" - ucidef_set_led_switch "lan2" "LAN2" "eth2_led" "switch0" "0x02" - ucidef_set_led_switch "lan3" "LAN3" "eth3_led" "switch0" "0x04" - ucidef_set_led_switch "wan" "WAN" "wan_led" "switch0" "0x10" - ucidef_add_switch "switch0" "0:lan:1" "1:lan:2" "2:lan:3" "4:wan" "6@eth0" - ucidef_set_interface_default_macaddr "lan" "$(mtd_get_mac_binary config 0x0)" - ucidef_set_interface_default_macaddr "wan" "$(macaddr_add "$(mtd_get_mac_binary config 0x0)" 1)" - ucidef_add_wlan_bssid_limit "wlan0" 4 - ucidef_add_static_modem_info "$model" "1-1" "2" "primary" - [ "${model:7:1}" = "6" ] && ucidef_set_hwinfo dual_sim mobile \ - wifi ethernet || ucidef_set_hwinfo dual_sim mobile wifi ethernet ios - [ "${model:4:2}" = "01" ] && ucidef_set_release_version "7.3.1" - ucidef_set_network_options "vlans" 16 "readonly_vlans" 2 - ;; - RUT906* |\ - RUT956*) - ucidef_set_led_switch "lan1" "LAN1" "eth1_led" "switch0" "0x01" - ucidef_set_led_switch "lan2" "LAN2" "eth2_led" "switch0" "0x02" - ucidef_set_led_switch "lan3" "LAN3" "eth3_led" "switch0" "0x04" - ucidef_set_led_switch "wan" "WAN" "wan_led" "switch0" "0x10" - ucidef_add_switch "switch0" "0:lan:1" "1:lan:2" "2:lan:3" "4:wan" "6@eth0" - ucidef_set_interface_default_macaddr "lan" "$(mtd_get_mac_binary config 0x0)" - ucidef_set_usb_jack "/usb1/1-1/1-1.1/" - ucidef_set_interface_default_macaddr "wan" "$(macaddr_add "$(mtd_get_mac_binary config 0x0)" 1)" - ucidef_add_wlan_bssid_limit "wlan0" 4 - ucidef_add_static_modem_info "$model" "1-1.4" "2" "primary" "gps_out" - [ "${model:7:1}" = "6" ] && ucidef_set_hwinfo dual_sim usb gps \ - mobile wifi ethernet rs232 rs485 || ucidef_set_hwinfo dual_sim usb gps \ - mobile wifi ethernet ios rs232 rs485 - [ "${model:4:2}" = "06" ] && ucidef_set_release_version "7.4.2" - ucidef_add_serial_capabilities "rs232" \ - "300 600 1200 2400 4800 9600 19200 38400 57600 115200" \ - "5 6 7 8" \ - "rts/cts xon/xoff none" \ - "1 2" \ - "even odd mark space none" \ - "/usb1/1-1/1-1.3/" - ucidef_add_serial_capabilities "rs485" \ - "300 600 1200 2400 4800 9600 19200 38400 57600 115200 230400" \ - "5 6 7 8" \ - "xon/xoff none" \ - "1 2" \ - "even odd mark space none" \ - "/tty/ttyS1" - ucidef_set_network_options "vlans" 16 "readonly_vlans" 2 - ;; - TRB140*) - ucidef_set_interface_lan "eth0 rndis0" - [ "${model:7:1}" = "2" ] && ucidef_set_hwinfo mobile ethernet || \ - ucidef_set_hwinfo mobile ethernet ios - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - [ "${model:6:1}" = "4" ] && \ - ucidef_set_release_version "7.4.2" - ;; - TRB143*) - ucidef_set_interface_lan "eth0 rndis0" - [ "${model:7:1}" = "2" ] && ucidef_set_hwinfo mobile ethernet || \ - ucidef_set_hwinfo mobile ethernet ios - ucidef_add_serial_capabilities "mbus" \ - "300 600 1200 2400 4800 9600 19200 38400" \ - "5 6 7 8" \ - "xon/xoff none" \ - "1 2" \ - "even odd mark space none" \ - "/tty/ttyHS0" - if [ "${model:6:1}" = "4" ]; then - ucidef_set_release_version "7.4.3" - else - ucidef_set_release_version "7.1.7" - fi - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - TRB141*) - ucidef_set_interface_lan "rndis0" - ucidef_set_hwinfo mobile ios - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - [ "${model:6:1}" = "4" ] && \ - ucidef_set_release_version "7.4.3" - ;; - TRB142*) - ucidef_set_interface_lan "rndis0" - [ "${model:7:1}" = "2" ] && ucidef_set_hwinfo mobile rs232 || \ - ucidef_set_hwinfo mobile ios rs232 - ucidef_add_serial_capabilities "rs232" \ - "300 600 1200 2400 4800 9600 19200 38400 57600 115200" \ - "5 6 7 8" \ - "rts/cts xon/xoff none" \ - "1 2" \ - "even odd mark space none" \ - "/tty/ttyHS0" - if [ "${model:6:1}" = "3" ]; then - ucidef_set_release_version "7.1" - elif [ "${model:6:1}" = "4" ]; then - ucidef_set_release_version "7.4.3" - fi - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - TRB145*) - ucidef_set_interface_lan "rndis0" - [ "${model:7:1}" = "2" ] && ucidef_set_hwinfo mobile rs485 || \ - ucidef_set_hwinfo mobile ios rs485 - ucidef_add_serial_capabilities "rs485" \ - "300 600 1200 2400 4800 9600 19200 38400 57600 115200 \ - 230400 460800 921600 1000000 3000000" \ - "5 6 7 8" \ - "xon/xoff none" \ - "1 2" \ - "even odd mark space none" \ - "/tty/ttyHS0" - if [ "${model:6:1}" = "2" ]; then - ucidef_set_release_version "7.1" - elif [ "${model:6:1}" = "4" ]; then - ucidef_set_release_version "7.4.3" - fi - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - TCR100*) - ucidef_set_led_switch "lan" "LAN" "eth1_led" "switch0" "0x10" - ucidef_set_led_netdev "wan" "WAN" "eth2_led" "eth1" - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ucidef_add_wlan_bssid_limit "wlan0" 8 - ucidef_add_wlan_bssid_limit "wlan1" 8 - ucidef_set_interface guest proto static type bridge \ - guest 1 _wireless true _dhcp true - ucidef_add_static_modem_info "$model" "1-1" "1" "primary" - ucidef_set_hwinfo mobile wifi dual_band_ssid wps ethernet - ucidef_set_release_version "7.2.4" - ucidef_set_network_options "vlans" 16 "readonly_vlans" 1 - ;; - OTD140*) - ucidef_set_led_switch "lan1" "LAN1" "eth1_led" "switch0" "0x10" - ucidef_set_led_switch "lan2" "LAN2" "eth2_led" "switch0" "0x2" - ucidef_add_switch "switch0" "4:lan:1" "1:lan:2" "6@eth0" - ucidef_set_interface_default_macaddr "lan" "$(mtd_get_mac_binary config 0x0)" - ucidef_set_interface "lan" "default_ip" "%%LAN_IP%%" - ucidef_add_static_modem_info "$model" "1-1" "2" "primary" - ucidef_set_hwinfo ethernet mobile dual_sim poe - ucidef_set_network_options "vlans" 16 "readonly_vlans" 1 - ucidef_set_poe 2 15400 1 "lan2" "3" 15400 - ucidef_set_poe_chip "0X77" "0:lan2" - ucidef_set_poe_chip "0X2F" "1:lan2" - ;; - OTD160*) - ucidef_set_led_switch "lan1" "LAN1" "eth1_led" "switch0" "0x04" - ucidef_set_led_switch "lan2" "LAN2" "eth2_led" "switch0" "0x02" - ucidef_set_interface_lan "eth0" - ucidef_add_wlan_bssid_limit "wlan0" 8 - ucidef_add_wlan_bssid_limit "wlan1" 8 - ucidef_add_static_modem_info "$model" "1-1" "2" "primary" - ucidef_set_hwinfo dual_sim mobile wifi dual_band_ssid ethernet - ucidef_set_network_options "vlans" 16 "readonly_vlans" 1 - ;; - TAP100*) - ucidef_set_led_switch "lan" "LAN" "eth0_led" "switch0" "0x10" - ucidef_add_wlan_bssid_limit "wlan0" 4 - ucidef_set_interface_lan "eth0" - ucidef_set_interface "lan" "ipv6" "1" - ucidef_set_interface_default_macaddr "lan" "$(mtd_get_mac_binary config 0x0)" - ucidef_set_hwinfo wifi ethernet sw_rst_on_init - ucidef_set_network_options "ula" false "disable_vlan" true "ip6assign" false "vlans" 16 "readonly_vlans" 1 "no_metric" true - ucidef_set_interface "dhcp" "device" "@lan" "proto" "dhcp" - ;; - TRB500*) - ucidef_set_interface_lan "eth0 ecm0" - ucidef_set_interface_default_macaddr "lan" "$(mtd_get_mac_binary mnf_info 0x0)" \ - "$(macaddr_add "$(mtd_get_mac_binary mnf_info 0x0)" 1)" - ucidef_set_hwinfo mobile ethernet ios - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - RUTM50*) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" - ucidef_set_usb_jack "/usb1/1-2/" - ucidef_add_wlan_bssid_limit "wlan0" 4 - ucidef_add_wlan_bssid_limit "wlan1" 4 - ucidef_add_static_modem_info "$model" "2-1" "2" "primary" "gps_out" - ucidef_set_hwinfo usb ethernet ios gps mobile wifi dual_band_ssid dual_sim at_sim dsa hw_nat - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - RUTM51*) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" - ucidef_set_usb_jack "/usb1/1-2/" - ucidef_add_wlan_bssid_limit "wlan0" 4 - ucidef_add_wlan_bssid_limit "wlan1" 4 - ucidef_add_static_modem_info "$model" "2-1" "2" "primary" - ucidef_set_hwinfo usb ethernet ios mobile wifi dual_band_ssid dual_sim at_sim dsa hw_nat - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ucidef_set_release_version "7.4.4" - ;; - RUTM08*) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" - ucidef_set_usb_jack "/usb1/1-1/" - ucidef_set_hwinfo usb ethernet ios dsa hw_nat - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - RUTM09*) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" - ucidef_add_static_modem_info "$model" "1-2" "2" "primary" "gps_out" - ucidef_set_usb_jack "/usb1/1-1/" - ucidef_set_hwinfo usb ethernet ios gps mobile dual_sim dsa hw_nat - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - RUTM10*) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" - ucidef_set_usb_jack "/usb1/1-1/" - ucidef_add_wlan_bssid_limit "wlan0" 4 - ucidef_add_wlan_bssid_limit "wlan1" 4 - ucidef_set_hwinfo usb ethernet ios wifi dual_band_ssid dsa hw_nat - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - RUTM11*) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" - ucidef_set_usb_jack "/usb1/1-1/" - ucidef_add_wlan_bssid_limit "wlan0" 4 - ucidef_add_wlan_bssid_limit "wlan1" 4 - ucidef_add_static_modem_info "$model" "1-2" "2" "primary" "gps_out" - ucidef_set_hwinfo usb ethernet ios gps mobile wifi dual_band_ssid dual_sim dsa hw_nat - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - RUTM12*) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" - ucidef_set_usb_jack "/usb1/1-2/1-2.3/" - ucidef_add_wlan_bssid_limit "wlan0" 4 - ucidef_add_wlan_bssid_limit "wlan1" 4 - ucidef_add_static_modem_info "$model" "1-1" "1" "primary" "gps_out" - ucidef_add_static_modem_info "$model" "1-2.2" "1" - ucidef_set_hwinfo usb ethernet ios gps mobile wifi dual_band_ssid dual_modem dsa hw_nat - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - - x86) - ucidef_set_interface_wan "eth0" - ucidef_set_interface_lan "eth1" - ucidef_add_wlan_bssid_limit "wlan0" 4 - ucidef_add_wlan_bssid_limit "wlan1" 4 - ucidef_set_hwinfo usb wifi dual_band_ssid ethernet - ucidef_set_network_options "vlans" 4094 "readonly_vlans" 1 - ;; - *) - echo "Unsupported hardware. Network interfaces not intialized" - ;; - esac - - ucidef_set_interface "lan" "default_ip" "%%LAN_IP%%" - - type ucidef_target_defaults &> /dev/null && \ - ucidef_target_defaults "$model" -} - -#~ Get model name for RUTX products -if ! model="$(mnf_info --name)" 2>/dev/null; then - model="$(mnf_info --prod-code)" 2>/dev/null -fi - -platform="$(cat /proc/device-tree/platform)" 2>/dev/null - -board_config_update -setup_json "$model" - -ucidef_set_board_platform "$platform" - -board_config_flush - -exit 0 diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/6.6/target/linux/ipq40xx.new/base-files/etc/hotplug.d/firmware/11-ath10k-caldata deleted file mode 100644 index ea90aab58..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ /dev/null @@ -1,332 +0,0 @@ -#!/bin/sh - -ath10kcal_die() { - echo "ath10cal: " "$*" - exit 1 -} - -ath10kcal_extract() { - local part=$1 - local offset=$2 - local count=$3 - local mtd - - mtd=$(find_mtd_chardev $part) - [ -n "$mtd" ] || \ - ath10kcal_die "no mtd device found for partition $part" - - dd if=$mtd of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \ - ath10kcal_die "failed to extract calibration data from $mtd" -} - -ensure_correct_art() { - # NOTE(rytis): Hardcoded hashes for 64 KiB file, filled with zeroes (md5b0) and ones (md5b1). - local md5b0="fcd6bcb56c1689fcef28b57c22475bad" - local md5b1="ecb99e6ffea7be1e5419350f725da86b" - local artdir="/dev/mtd12" - local bindir="/usr/share/art/art_rutx.bin" - local md5art="$(md5sum $artdir)" - md5art="${md5art%% *}" - local devicename="$(mnf_info -n)" - devicename="${devicename:0:6}" - - if [ "$devicename" != "RUTX08" ] && [ "$devicename" != "RUTX09" ]; then - if [ "$md5art" == "$md5b0" ] || [ "$md5art" == "$md5b1" ] && [ -e "$bindir" ]; then - mtd write $bindir $artdir - fi - else - if [ "$md5art" != "$md5b0" ] && [ "$md5art" != "$md5b1" ]; then - mtd erase $artdir - fi - fi -} - -[ -e /lib/firmware/$FIRMWARE ] && exit 0 - -. /lib/functions.sh -. /lib/functions/system.sh - -board=$(board_name) - -ensure_correct_art - -case "$FIRMWARE" in -"ath10k/cal-pci-0000:01:00.0.bin") - case "$board" in - meraki,mr33 |\ - meraki,mr74) - caldata_extract_ubi "ART" 0x9000 0x844 - caldata_valid "4408" || caldata_extract "ART" 0x9000 0x844 - ;; - esac - ;; -"ath10k/pre-cal-pci-0000:01:00.0.bin") - case "$board" in - asus,map-ac2200) - caldata_extract_ubi "Factory" 0x9000 0x2f20 - ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ - /lib/firmware/ath10k/QCA9888/hw2.0/board.bin - ;; - asus,rt-ac42u) - caldata_extract_ubi "Factory" 0x9000 0x2f20 - ;; - avm,fritzrepeater-3000) - /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") - ;; - linksys,ea8300 |\ - linksys,mr8300) - caldata_extract "ART" 0x9000 0x2f20 - # OEM assigns 4 sequential MACs - ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4)) - ;; - netgear,rbr50|\ - netgear,rbs50|\ - netgear,srr60|\ - netgear,srs60) - caldata_extract_mmc "0:ART" 0x9000 0x2f20 - ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0x12) - ;; - esac - ;; -"ath10k/pre-cal-ahb-a800000.wifi.bin") - case "$board" in - qcom,ap-dk01.1-c1) - caldata_extract "ART" 0x1000 0x2f20 - ;; - asus,map-ac2200|\ - asus,rt-ac42u|\ - asus,rt-ac58u) - caldata_extract_ubi "Factory" 0x1000 0x2f20 - ;; - avm,fritzbox-4040) - /usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config") - ;; - avm,fritzbox-7530 |\ - avm,fritzrepeater-1200 |\ - avm,fritzrepeater-3000) - /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") - ;; - cellc,rtl30vw) - caldata_extract "0:ART" 0x1000 0x2f20 - ;; - devolo,magic-2-wifi-next) - caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_ascii APPSBLENV WiFiMacAddress0) - ;; - dlink,dap-2610) - caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac) - ;; - engenius,emd1) - caldata_extract "0:ART" 0x1000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) - ;; - engenius,emr3500) - caldata_extract "0:ART" 0x1000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) - ;; - engenius,ens620ext) - caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 2) - ;; - extreme-networks,ws-ap3915i) - caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_ascii CFG1 RADIOADDR0) - ;; - linksys,ea8300 |\ - linksys,mr8300) - caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2) - ;; - meraki,mr33 |\ - meraki,mr74) - caldata_extract_ubi "ART" 0x1000 0x2f20 - caldata_valid "202f" || caldata_extract "ART" 0x1000 0x2f20 - ;; - mikrotik,cap-ac |\ - mikrotik,hap-ac2 |\ - mikrotik,hap-ac3 |\ - mikrotik,hap-ac3-lte6-kit |\ - mikrotik,wap-ac |\ - mikrotik,wap-ac-lte |\ - mikrotik,wap-r-ac) - wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data" - ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x0 0x2f20 ) || \ - ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_0" 0x0 0x2f20 ) - ;; - netgear,rbr50|\ - netgear,rbs50|\ - netgear,srr60|\ - netgear,srs60) - caldata_extract_mmc "0:ART" 0x1000 0x2f20 - ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0x0) - ;; - pakedge,wr-1) - caldata_extract "0:ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(get_mac_label) 2) - ;; - teltonika,rutx10|\ - teltonika,rutx50) - caldata_extract "0:ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:CONFIG" 0x0) 2) - ;; - sony,ncp-hg100-cellular) - caldata_extract_mmc "0:ART" 0x1000 0x2f20 - ;; - zyxel,nbg6617 |\ - zyxel,wre6606) - caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2) - ;; - teltonika,rutx12 |\ - teltonika,rutx) - ath10kcal_extract "0:ART" 4096 12064 - ;; - esac - ;; -"ath10k/pre-cal-ahb-a800000.wifi.bin") - case "$board" in - qcom,ap-dk01.1-c1) - caldata_extract "ART" 0x5000 0x2f20 - ;; - asus,map-ac2200|\ - asus,rt-ac58u) - caldata_extract_ubi "Factory" 0x5000 0x2f20 - ;; - avm,fritzbox-4040) - /usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config") - ;; - avm,fritzbox-7530 |\ - avm,fritzrepeater-1200 |\ - avm,fritzrepeater-3000) - /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ - /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") - ;; - cellc,rtl30vw) - caldata_extract "0:ART" 0x5000 0x2f20 - ;; - devolo,magic-2-wifi-next) - caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_ascii APPSBLENV WiFiMacAddress1) - ;; - dlink,dap-2610) - caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a) - ;; - engenius,emd1) - caldata_extract "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) 1) - ;; - engenius,emr3500) - caldata_extract "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) 1) - ;; - engenius,ens620ext) - caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 3) - ;; - extreme-networks,ws-ap3915i) - caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_ascii CFG1 RADIOADDR1) - ;; - linksys,ea8300 |\ - linksys,mr8300) - caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3) - ;; - meraki,mr33 |\ - meraki,mr74) - caldata_extract_ubi "ART" 0x5000 0x2f20 - caldata_valid "202f" || caldata_extract "ART" 0x5000 0x2f20 - ;; - mikrotik,cap-ac |\ - mikrotik,hap-ac2 |\ - mikrotik,hap-ac3 |\ - mikrotik,hap-ac3-lte6-kit |\ - mikrotik,sxtsq-5-ac |\ - mikrotik,wap-ac |\ - mikrotik,wap-ac-lte |\ - mikrotik,wap-r-ac) - wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data" - ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x8000 0x2f20 ) || \ - ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_2" 0x0 0x2f20 ) - ;; - netgear,rbr50|\ - netgear,rbs50|\ - netgear,srr60|\ - netgear,srs60) - caldata_extract_mmc "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0xc) - ;; - pakedge,wr-1) - caldata_extract "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(get_mac_label) 4) - ;; - teltonika,rutx10|\ - teltonika,rutx50) - caldata_extract "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:CONFIG" 0x0) 3) - ;; - sony,ncp-hg100-cellular) - caldata_extract_mmc "0:ART" 0x5000 0x2f20 - ;; - zyxel,nbg6617 |\ - zyxel,wre6606) - caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) - ;; - teltonika,rutx12 |\ - teltonika,rutx) - ath10kcal_extract "0:ART" 20480 12064 - ;; - esac - ;; -"ath10k/QCA4019/hw1.0/board-ahb-a000000.wifi.bin") - case "$board" in - mikrotik,cap-ac |\ - mikrotik,hap-ac2 |\ - mikrotik,hap-ac3 |\ - mikrotik,hap-ac3-lte6-kit |\ - mikrotik,wap-ac |\ - mikrotik,wap-ac-lte |\ - mikrotik,wap-r-ac) - wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data" - ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x2f20 0x2f20 ) || \ - ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_0" 0x2f20 0x2f20 ) - ;; - esac - ;; -"ath10k/QCA4019/hw1.0/board-ahb-a800000.wifi.bin") - case "$board" in - mikrotik,cap-ac |\ - mikrotik,hap-ac2 |\ - mikrotik,hap-ac3 |\ - mikrotik,hap-ac3-lte6-kit |\ - mikrotik,sxtsq-5-ac |\ - mikrotik,wap-ac |\ - mikrotik,wap-ac-lte |\ - mikrotik,wap-r-ac) - wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data" - ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0xaf20 0x2f20 ) || \ - ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_2" 0x2f20 0x2f20 ) - ;; - esac - ;; -*) - exit 1 - ;; -esac diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/hotplug.d/ieee80211/09_fix_wifi_mac b/6.6/target/linux/ipq40xx.new/base-files/etc/hotplug.d/ieee80211/09_fix_wifi_mac deleted file mode 100644 index 4c4893f41..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/hotplug.d/ieee80211/09_fix_wifi_mac +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/ash - -[ "$ACTION" == "add" ] || exit 0 - -PHYNBR=${DEVPATH##*/phy} - -[ -n $PHYNBR ] || exit 0 - -. /lib/functions.sh -. /lib/functions/system.sh - -board=$(board_name) - -case "$board" in - teltonika,rutx) - mac_addr=$(mtd_get_mac_binary 0:CONFIG 0) - if [ "$mac_addr" != "ff:ff:ff:ff:ff:ff" ]; then - echo $(macaddr_add $mac_addr $(($PHYNBR + 2)) ) > /sys${DEVPATH}/macaddress - fi - ;; - *) - ;; -esac diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/boot b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/boot deleted file mode 100755 index 855498824..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/boot +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=10 -STOP=90 - -uci_apply_defaults() { - . /lib/functions/system.sh - - cd /etc/uci-defaults || return 0 - files="$(find . -type f | sort)" - [ -z "$files" ] && return 0 - mkdir -p /tmp/.uci - for file in $files; do - ( . "./$file" ) && rm -f "$file" - done - uci commit -} - -boot() { - [ -f /proc/mounts ] || /sbin/mount_root - [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc - - mkdir -p /var/run - mkdir -p /var/log - mkdir -p /var/lock - mkdir -p /var/state - mkdir -p /var/tmp - mkdir -p /tmp/.uci - chmod 0700 /tmp/.uci - touch /var/log/wtmp - touch /var/log/lastlog - mkdir -p /tmp/resolv.conf.d - touch /tmp/resolv.conf.d/resolv.conf.auto - ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf - grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug - grep -q bpf /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime,mode=0700 -t bpf bpffs /sys/fs/bpf - grep -q pstore /proc/filesystems && /bin/mount -o noatime -t pstore pstore /sys/fs/pstore - - # mount all entries in fstab - /bin/mount -a & - - # /log directory might be created on preinit - # symlink /storage to /log on TRB14X devices - [ -d /storage -a ! -h /log ] && { - rm -rf /log - ln -sf /storage /log - } - - # Wifi --- - param=$(/sbin/mnf_info "--name") - router_name=${param:0:6} - if [ $router_name == "RUTX08" ] || [ $router_name == "RUTX09" ]; then - rm /etc/modules.d/ath10k - fi - - /bin/board_detect - - /sbin/kmodloader - - /bin/config_generate - uci_apply_defaults - - [ -f "/etc/config/teltonika" ] && rm /etc/config/teltonika - - # temporary hack until configd exists - /sbin/reload_config - # leave finished boot script indication - touch /var/run/boot-done -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/done b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/done deleted file mode 100755 index b64e6e4d6..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/done +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org - -START=95 -boot() { - mount_root done - rm -f /sysupgrade.tgz && sync - - # process user commands - [ -f /etc/rc.local ] && { - sh /etc/rc.local - } -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/gpio_switch b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/gpio_switch deleted file mode 100755 index 24d790b06..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/gpio_switch +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=94 -STOP=10 -USE_PROCD=1 - - -load_gpio_switch() -{ - local name - local gpio_pin - local value - - config_get gpio_pin "$1" gpio_pin - config_get name "$1" name - config_get value "$1" value 0 - - [ -z "$gpio_pin" ] && { - echo >&2 "Skipping gpio_switch '$name' due to missing gpio_pin" - return 1 - } - - local gpio_path - if [ -n "$(echo "$gpio_pin" | grep -E "^[0-9]+$")" ]; then - gpio_path="/sys/class/gpio/gpio${gpio_pin}" - - # export GPIO pin for access - [ -d "$gpio_path" ] || { - echo "$gpio_pin" >/sys/class/gpio/export - # we need to wait a bit until the GPIO appears - [ -d "$gpio_path" ] || sleep 1 - } - - # direction attribute only exists if the kernel supports changing the - # direction of a GPIO - if [ -e "${gpio_path}/direction" ]; then - # set the pin to output with high or low pin value - { [ "$value" = "0" ] && echo "low" || echo "high"; } \ - >"$gpio_path/direction" - else - { [ "$value" = "0" ] && echo "0" || echo "1"; } \ - >"$gpio_path/value" - fi - else - gpio_path="/sys/class/gpio/${gpio_pin}" - - [ -d "$gpio_path" ] && { - { [ "$value" = "0" ] && echo "0" || echo "1"; } \ - >"$gpio_path/value" - } - fi -} - -service_triggers() -{ - procd_add_reload_trigger "system" -} - -start_service() -{ - [ -e /sys/class/gpio/ ] && { - config_load system - config_foreach load_gpio_switch gpio_switch - } -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/led b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/led deleted file mode 100755 index 277fb4e76..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/led +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008 OpenWrt.org - -START=96 - -load_led() { - local name - local sysfs - local trigger - local dev - local ports - local mode - local default - local delayon - local delayoff - local interval - - config_get sysfs $1 sysfs - config_get name $1 name "$sysfs" - config_get trigger $1 trigger "none" - config_get dev $1 dev - config_get ports $1 port - config_get mode $1 mode - config_get_bool default $1 default "0" - config_get delayon $1 delayon - config_get delayoff $1 delayoff - config_get interval $1 interval "50" - config_get port_state $1 port_state - config_get delay $1 delay "150" - config_get message $1 message "" - config_get gpio $1 gpio "0" - config_get inverted $1 inverted "0" - - if [ "$trigger" = "rssi" ]; then - # handled by rssileds userspace process - return - fi - - [ "$trigger" = "usbdev" ] && { - # Backward compatibility: translate to the new trigger - trigger="usbport" - # Translate port of root hub, e.g. 4-1 -> usb4-port1 - ports=$(echo "$dev" | sed -n 's/^\([0-9]*\)-\([0-9]*\)$/usb\1-port\2/p') - # Translate port of extra hub, e.g. 2-2.4 -> 2-2-port4 - [ -z "$ports" ] && ports=$(echo "$dev" | sed -n 's/\./-port/p') - } - - [ -e /sys/class/leds/${sysfs}/brightness ] && { - echo "setting up led ${name}" - - printf "%s %s %d\n" \ - "$sysfs" \ - "$(sed -ne 's/^.*\[\(.*\)\].*$/\1/p' /sys/class/leds/${sysfs}/trigger)" \ - "$(cat /sys/class/leds/${sysfs}/brightness)" \ - >> /var/run/led.state - - [ "$default" = 0 ] && - echo 0 >/sys/class/leds/${sysfs}/brightness - - echo $trigger > /sys/class/leds/${sysfs}/trigger 2> /dev/null - ret="$?" - - [ $default = 1 ] && - cat /sys/class/leds/${sysfs}/max_brightness > /sys/class/leds/${sysfs}/brightness - - [ $ret = 0 ] || { - echo >&2 "Skipping trigger '$trigger' for led '$name' due to missing kernel module" - return 1 - } - case "$trigger" in - "netdev") - [ -n "$dev" ] && { - echo $dev > /sys/class/leds/${sysfs}/device_name - for m in $mode; do - [ -e "/sys/class/leds/${sysfs}/$m" ] && \ - echo 1 > /sys/class/leds/${sysfs}/$m - done - echo $interval > /sys/class/leds/${sysfs}/interval - } - ;; - - "timer"|"oneshot") - [ -n "$delayon" ] && \ - echo $delayon > /sys/class/leds/${sysfs}/delay_on - [ -n "$delayoff" ] && \ - echo $delayoff > /sys/class/leds/${sysfs}/delay_off - ;; - - "usbport") - local p - - for p in $ports; do - echo 1 > /sys/class/leds/${sysfs}/ports/$p - done - ;; - - "port_state") - [ -n "$port_state" ] && \ - echo $port_state > /sys/class/leds/${sysfs}/port_state - ;; - - "gpio") - echo $gpio > /sys/class/leds/${sysfs}/gpio - echo $inverted > /sys/class/leds/${sysfs}/inverted - ;; - - switch[0-9]*) - local port_mask speed_mask - - config_get port_mask $1 port_mask - [ -n "$port_mask" ] && \ - echo $port_mask > /sys/class/leds/${sysfs}/port_mask - config_get speed_mask $1 speed_mask - [ -n "$speed_mask" ] && \ - echo $speed_mask > /sys/class/leds/${sysfs}/speed_mask - [ -n "$mode" ] && \ - echo "$mode" > /sys/class/leds/${sysfs}/mode - ;; - esac - } -} - -start() { - [ -e /sys/class/leds/ ] && { - [ -s /var/run/led.state ] && { - local led trigger brightness - while read led trigger brightness; do - [ -e "/sys/class/leds/$led/trigger" ] && \ - echo "$trigger" > "/sys/class/leds/$led/trigger" - - [ -e "/sys/class/leds/$led/brightness" ] && \ - echo "$brightness" > "/sys/class/leds/$led/brightness" - done < /var/run/led.state - rm /var/run/led.state - } - - config_load system - config_foreach load_led led - } -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/modem_tracker b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/modem_tracker deleted file mode 100755 index 46202b764..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/modem_tracker +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2021 Teltonika Networks -# Copyright (C) 2022 Ycarus (Yannick Chabanois) - -START=2 - -USE_PROCD=1 - -PROG=/bin/board_track -NAME=board_track -PIDCOUNT=1 - -start_service() { - . /lib/functions - - [ "$(board_name)" != "teltonika,rutx" ] && return 0 - 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/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/ntpserver b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/ntpserver deleted file mode 100755 index 78095bd41..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/ntpserver +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh /etc/rc.common - -# Copyright (C) 2021 Teltonika - -START=50 -STOP=51 -USE_PROCD=1 - -service_triggers() -{ - procd_add_reload_trigger "ntpserver" -} - -start_service() { - . /lib/functions.sh - local enabled - - config_load ntpserver - config_get enabled general enabled "0" - - [ "$enabled" -gt 0 ] || return - - logger -t "ntpd" "Starting NTP server" - procd_open_instance - procd_set_param respawn 0 - procd_set_param command "ntpd" -ln - procd_close_instance -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/powerctl b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/powerctl deleted file mode 100755 index 7b346fc5b..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/powerctl +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=98 - -ipq40xx_power_auto() { - # change scaling governor as ondemand to enable clock scaling based on system load - echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - - # set scaling min freq as 200 MHz - echo "716000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - - # Change sampling rate for frequency scaling decisions to 1s, from 10 ms - #echo "1000000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - - # Change sampling rate for frequency down scaling decision to 10s - #echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - - # Change the CPU load threshold above which frequency is up-scaled to - # turbo frequency,to 50% - #echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold -} - -start() { - . /lib/functions.sh - - local board=$(board_name) - case "$board" in - teltonika,rutx | ap-dk01.1-c1 | ap-dk01.1-c2 | ap-dk04.1-c1 | ap-dk04.1-c2 | ap-dk04.1-c3 | \ - ap-dk04.1-c4 | ap-dk04.1-c5 | ap-dk05.1-c1 | ap-dk06.1-c1 | ap-dk07.1-c1 | ap-dk07.1-c2 | ap-dk07.1-c3) - ipq40xx_power_auto ;; - esac -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/sysctl b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/sysctl deleted file mode 100755 index 01416a5c6..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/sysctl +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org - -START=11 - -apply_defaults() { - local mem="$(awk '/^MemTotal:/ {print $2}' /proc/meminfo)" - local min_free frag_low_thresh frag_high_thresh - - if [ "$mem" -gt 65536 ]; then # 128M - min_free=16384 - elif [ "$mem" -gt 32768 ]; then # 64M - #Too high for RUT3 device, lets make 2048 - #min_free=8192 - min_free=2048 - else - min_free=1024 - frag_low_thresh=393216 - frag_high_thresh=524288 - fi - - sysctl -qw vm.min_free_kbytes="$min_free" - - [ "$frag_low_thresh" ] && sysctl -qw \ - net.ipv4.ipfrag_low_thresh="$frag_low_thresh" \ - net.ipv4.ipfrag_high_thresh="$frag_high_thresh" \ - net.ipv6.ip6frag_low_thresh="$frag_low_thresh" \ - net.ipv6.ip6frag_high_thresh="$frag_high_thresh" \ - net.netfilter.nf_conntrack_frag6_low_thresh="$frag_low_thresh" \ - net.netfilter.nf_conntrack_frag6_high_thresh="$frag_high_thresh" - - # first set default, then all interfaces to avoid races with appearing interfaces - if [ -d /proc/sys/net/ipv6/conf ]; then - echo 0 > /proc/sys/net/ipv6/conf/default/accept_ra - for iface in /proc/sys/net/ipv6/conf/*/accept_ra; do - echo 0 > "$iface" - done - fi -} - -start() { - apply_defaults - for CONF in /etc/sysctl.d/*.conf /etc/sysctl.conf; do - [ -f "$CONF" ] && sysctl -e -p "$CONF" >&- - done -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/sysfixtime b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/sysfixtime deleted file mode 100755 index 47d7af614..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/sysfixtime +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2013-2014 OpenWrt.org - -START=00 -STOP=90 - -RTC_DEV=/dev/rtc0 -HWCLOCK=/sbin/hwclock - -boot() { -# start && exit 0 - - local maxtime="$(maxtime)" - local curtime="$(date +%s)" - [ $curtime -lt $maxtime ] && date -s @$maxtime -} - -start() { - boot -} - -stop() { - [ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -w -u -f $RTC_DEV && \ - logger -t sysfixtime "saved '$(date)' to $RTC_DEV" -} - -maxtime() { - local file newest - - for file in $( find /etc -type f ) ; do - [ -z "$newest" -o "$newest" -ot "$file" ] && newest=$file - done - [ "$newest" ] && date -r "$newest" +%s -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/system b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/system deleted file mode 100755 index 0e4670912..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/system +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=10 -USE_PROCD=1 - -validate_system_section() { - uci_load_validate system system "$1" "$2" \ - 'hostname:string:%%NAME%%' \ - 'conloglevel:uinteger' \ - 'buffersize:uinteger' \ - 'timezone:string:UTC' \ - 'zonename:string' -} - -system_config() { - [ "$2" = 0 ] || { - echo "validation failed" - return 1 - } - - echo "$hostname" > /proc/sys/kernel/hostname - [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize} - echo "$timezone" > /tmp/TZ - [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/${zonename// /_}" ] \ - && ln -sf "/usr/share/zoneinfo/${zonename// /_}" /tmp/localtime \ - && rm -f /tmp/TZ - - # apply timezone to kernel - hwclock -u --systz -} - -reload_service() { - config_load system - config_foreach validate_system_section system system_config -} - -service_triggers() { - procd_add_reload_trigger "system" - procd_add_validation validate_system_section -} - -start_service() { - reload_service -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/umount b/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/umount deleted file mode 100755 index b764ae158..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/init.d/umount +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org - -STOP=90 - -restart() { - : -} - -stop() { - sync - /bin/umount -a -d -r -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/uci-defaults/01_mnf-info b/6.6/target/linux/ipq40xx.new/base-files/etc/uci-defaults/01_mnf-info deleted file mode 100644 index 0e5bf0277..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/uci-defaults/01_mnf-info +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -SECTION="hwinfo" -CONFIG="hwinfo" - -get_hw_info() { - param=$(/sbin/mnf_info "--name") - [ -n "$param" -a ${#param} == 12 ] && uci set "system"."@system[0]"."device_code"=$param - - hostname=${param:0:6} - [ -n "$hostname" -a ${#hostname} == 6 -a -z "$(uci -q get system.@system[0].hostname)" ] && uci set "system"."@system[0]"."hostname"=OpenMPTCProuter - - routername=${param:0:6} - [ -n "$routername" -a ${#routername} == 6 -a -z "$(uci -q get system.@system[0].routername)" ] && uci set "system"."@system[0]"."routername"=$routername - - version=$(cat /etc/version) - [ -n "$version" ] && uci set "system"."@system[0]"."device_fw_version"=$version - - uci commit "system" -} - -# get device information -echo "Reading device information" -get_hw_info - -exit 0 diff --git a/6.6/target/linux/ipq40xx.new/base-files/etc/uci-defaults/04_migrate-vlan b/6.6/target/linux/ipq40xx.new/base-files/etc/uci-defaults/04_migrate-vlan deleted file mode 100644 index 7b96fa485..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/etc/uci-defaults/04_migrate-vlan +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -. /lib/functions.sh - -move_network(){ - local section=$1 - local device ports vlan - - config_get ports "$section" ports - config_get device "$section" device - config_get vlan "$section" vlan - - [ "$vlan" -eq 1 ] && { - if list_contains "ports" "0t" && list_contains "ports" "5"; then - uci_set network "$section" ports "${ports/0t/0}" - uci_set network "$section" vlan "2" - uci_remove network "$section" vid - fi - } - - [ "$vlan" -eq 2 ] && { - if list_contains ports "0t"; then - echo "Contains" - uci_set network "$section" ports "${ports/0t/0}" - uci_set network "$section" vlan "1" - uci_remove network "$section" vid - fi - } -} - -config_load network -config_foreach move_network switch_vlan -uci_commit network - -exit 0 diff --git a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/board.sh b/6.6/target/linux/ipq40xx.new/base-files/lib/functions/board.sh deleted file mode 100644 index b6741c884..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/board.sh +++ /dev/null @@ -1,54 +0,0 @@ - -. /usr/share/libubox/jshn.sh - -# when device contains 2 internal modems, this function will return '2' if -# selected modem(inc_id) is builtin and primary. -# And if it's only builtin, then '1' -is_builtin_modem() { - local inc_id="$1" - local modem modems id builtin 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 id builtin primary - - [ "$id" = "$inc_id" ] && { - [ -n "$builtin" ] && { - [ -n "$primary" ] && { - echo 2 - return - } - - echo 1 - return - } - - echo 0 - return - } - - json_select .. - done - - echo 0 -} - -is_dual_modem() { - json_init - json_load_file "/etc/board.json" - - json_get_keys hwinfo hwinfo - json_select hwinfo - - json_get_vars dual_modem - - [ "$dual_modem" = "1" ] && echo 1 || echo 0 - - json_select .. -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/migrate.sh b/6.6/target/linux/ipq40xx.new/base-files/lib/functions/migrate.sh deleted file mode 100644 index 634f95601..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/migrate.sh +++ /dev/null @@ -1,196 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh -. /usr/share/libubox/jshn.sh - -CFG_PATH="/etc/config/" - -get_section_name() { - local ___var="$1" - [ "$#" -ge 1 ] && shift - local ___type="$1" - [ "$#" -ge 1 ] && shift - local section cfgtype - - [ -z "$CONFIG_SECTIONS" ] && return 0 - for section in ${CONFIG_SECTIONS}; do - config_get cfgtype "$section" TYPE - [ -n "$___type" -a "x$cfgtype" != "x$___type" ] && continue - eval export "${___var}=\${section}" - return 0 - done -} - -_set_option() { - local option="$1" - local value="$2" - - uci_set "$_NEW_CONFIG" "$_NEW_SEC_NAME" "$option" "$value" -} - -_set_list_option() { - local option="$1" - local value="$2" - - for element in $value; do - uci_add_list "$_NEW_CONFIG" "$_NEW_SEC_NAME" "$option" "$element" - done -} - -_del_uci_element() { - local section="$1" - local option="$2" - - uci_remove "$_OLD_CONFIG" "$section" "$option" -} -_option_cond_cb() { - local value=$3 - - json_select $2 - json_get_var old 1 - json_get_var new 2 - - [ "$old" = "$value" ] && _COND_VALUE="$new" - - json_select .. -} - -_parse_condition(){ - local value="$1" - - _COND_VALUE= - json_for_each_item _option_cond_cb "if" "$value" -} - -_option_rule_cb(){ - local rule="$1" - local option="$2" - local value - - [ -n "$rule" ] || return 0 - - json_select "$option" - json_get_vars new_name "if" default cb type - - if [ -n "$cb" ]; then - eval "$cb \"\$option\" \"\$_OLD_SEC_NAME\" \"\$_NEW_SEC_NAME\"" - [ "$?" -eq 0 ] && { - json_select .. - return 0 - } - - value="$_OPTION_VALUE" - else - config_get value $_OLD_SEC_NAME "$option" "$default" - fi - - [ -n "$if" ] && { - _parse_condition "$value" - value="${_COND_VALUE:-${value:-$default}}" - } - - if [ -n "$type" -a "$type" = "list" ]; then - _set_list_option "${new_name:-$option}" "$value" - else - _set_option "${new_name:-$option}" "$value" - fi - - json_select .. -} - -_init_section() { - local sec_t - - json_get_vars old_name new_name new_type old_type - [ -n "$old_name" -o -n "$old_type" ] || return 1 - - if [ -z "$old_name" ]; then - get_section_name _OLD_SEC_NAME "$old_type" - else - _OLD_SEC_NAME=$old_name - fi - - _NEW_SEC_NAME=$new_name - _OLD_SEC_TYPE=$old_type - _NEW_SEC_TYPE=${new_type:-$old_type} - [ -n "$_NEW_SEC_TYPE" ] || \ - eval "_NEW_SEC_TYPE=\$CONFIG_${_OLD_SEC_NAME}_TYPE" - - if [ -n "$_NEW_SEC_NAME" ]; then - uci set "$_NEW_CONFIG"."$_NEW_SEC_NAME"="$_NEW_SEC_TYPE" - else - _NEW_SEC_NAME="$(uci -q add "$_NEW_CONFIG" "$_NEW_SEC_TYPE")" - fi - - [ -n "$_NEW_SEC_NAME" ] || return 1 -} - -_section_rule_cb(){ - local rule="$1" - local section="$2" - local value - - [ -n "$rule" ] || return 0 - - json_select "$section" - json_get_vars cb old_name new_name new_type old_type remove - [ -n "$cb" ] && { - eval "$cb \"\$old_name\" \"\$new_name\" \"\$old_type\" \"\$new_type\"" - [ "$?" -eq 0 ] && { - json_select .. - return 0 - } - } - - _init_section - [ $? -ne 0 ] && { - logger -t "Migration" "Unable to init section" - json_select .. - - return 1 - } - - json_for_each_item _option_rule_cb options - json_select .. - [ -n "$remove" ] && { - _del_uci_element "$old_name" - uci_commit "$_OLD_CONFIG" - } -} - -_init_config() { - json_select config - json_get_vars old_name new_name - - [ -n "$old_name" ] || return 1 - [ -f "$CFG_PATH$old_name" ] || return 1 - [ -f "$CFG_PATH$new_name" ] || touch $CFG_PATH$new_name - - config_load "$old_name" - _NEW_CONFIG="${new_name:-$old_name}" - _OLD_CONFIG="$old_name" - - json_select .. -} - -migrate() { - local remove - local json_file="$1" - - [ -f "$json_file" ] || return 0 - - json_init - json_load_file "$json_file" - json_select - _init_config - [ $? -ne 0 ] && { - logger -t "Migration" "Unable to load config" - return 1 - } - - json_for_each_item _section_rule_cb sections - uci_commit "$_NEW_CONFIG" - - json_get_vars remove - [ -n "$remove" ] && rm "$CFG_PATH$_OLD_CONFIG" -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/network.sh b/6.6/target/linux/ipq40xx.new/base-files/lib/functions/network.sh deleted file mode 100644 index a5d8d2637..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/network.sh +++ /dev/null @@ -1,313 +0,0 @@ -# 1: destination variable -# 2: interface -# 3: path -# 4: separator -# 5: limit -__network_ifstatus() { - local __tmp - - [ -z "$__NETWORK_CACHE" ] && { - __tmp="$(ubus call network.interface dump 2>&1)" - case "$?" in - 4) : ;; - 0) export __NETWORK_CACHE="$__tmp" ;; - *) echo "$__tmp" >&2 ;; - esac - } - - __tmp="$(jsonfilter ${4:+-F "$4"} ${5:+-l "$5"} -s "${__NETWORK_CACHE:-{}}" -e "$1=@.interface${2:+[@.interface='$2']}$3")" - - [ -z "$__tmp" ] && \ - unset "$1" && \ - return 1 - - eval "$__tmp" -} - -# determine first IPv4 address of given logical interface -# 1: destination variable -# 2: interface -network_get_ipaddr() { - __network_ifstatus "$1" "$2" "['ipv4-address'][0].address"; -} - -# determine first IPv6 address of given logical interface -# 1: destination variable -# 2: interface -network_get_ipaddr6() { - __network_ifstatus "$1" "$2" "['ipv6-address'][0].address" || \ - __network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][0]['local-address'].address" || \ - return 1 -} - -# determine first IPv4 subnet of given logical interface -# 1: destination variable -# 2: interface -network_get_subnet() { - __network_ifstatus "$1" "$2" "['ipv4-address'][0]['address','mask']" "/" -} - -# determine first IPv6 subnet of given logical interface -# 1: destination variable -# 2: interface -network_get_subnet6() { - local __nets __addr - - if network_get_subnets6 __nets "$2"; then - # Attempt to return first non-fe80::/10, non-fc::/7 range - for __addr in $__nets; do - case "$__addr" in fe[8ab]?:*|f[cd]??:*) - continue - esac - export "$1=$__addr" - return 0 - done - - # Attempt to return first non-fe80::/10 range - for __addr in $__nets; do - case "$__addr" in fe[8ab]?:*) - continue - esac - export "$1=$__addr" - return 0 - done - - # Return first item - for __addr in $__nets; do - export "$1=$__addr" - return 0 - done - fi - - unset "$1" - return 1 -} - -# determine first IPv6 prefix of given logical interface -# 1: destination variable -# 2: interface -network_get_prefix6() { - __network_ifstatus "$1" "$2" "['ipv6-prefix'][0]['address','mask']" "/" -} - -# determine all IPv4 addresses of given logical interface -# 1: destination variable -# 2: interface -network_get_ipaddrs() { - __network_ifstatus "$1" "$2" "['ipv4-address'][*].address" -} - -# determine all IPv6 addresses of given logical interface -# 1: destination variable -# 2: interface -network_get_ipaddrs6() { - local __addr - local __list="" - - if __network_ifstatus "__addr" "$2" "['ipv6-address'][*].address"; then - for __addr in $__addr; do - __list="${__list:+$__list }${__addr}" - done - fi - - if __network_ifstatus "__addr" "$2" "['ipv6-prefix-assignment'][*]['local-address'].address"; then - for __addr in $__addr; do - __list="${__list:+$__list }${__addr}" - done - fi - - if [ -n "$__list" ]; then - export "$1=$__list" - return 0 - fi - - unset "$1" - return 1 -} - -# determine all IP addresses of given logical interface -# 1: destination variable -# 2: interface -network_get_ipaddrs_all() { - local __addr __addr6 - - network_get_ipaddrs __addr "$2" - network_get_ipaddrs6 __addr6 "$2" - - if [ -n "$__addr" -o -n "$__addr6" ]; then - export "$1=${__addr:+$__addr }$__addr6" - return 0 - fi - - unset "$1" - return 1 -} - -# determine all IPv4 subnets of given logical interface -# 1: destination variable -# 2: interface -network_get_subnets() { - __network_ifstatus "$1" "$2" "['ipv4-address'][*]['address','mask']" "/ " -} - -# determine all IPv6 subnets of given logical interface -# 1: destination variable -# 2: interface -network_get_subnets6() { - local __addr __mask - local __list="" - - if __network_ifstatus "__addr" "$2" "['ipv6-address'][*]['address','mask']" "/ "; then - for __addr in $__addr; do - __list="${__list:+$__list }${__addr}" - done - fi - - if __network_ifstatus "__addr" "$2" "['ipv6-prefix-assignment'][*]['local-address'].address" && \ - __network_ifstatus "__mask" "$2" "['ipv6-prefix-assignment'][*].mask"; then - for __addr in $__addr; do - __list="${__list:+$__list }${__addr}/${__mask%% *}" - __mask="${__mask#* }" - done - fi - - if [ -n "$__list" ]; then - export "$1=$__list" - return 0 - fi - - unset "$1" - return 1 -} - -# determine all IPv6 prefixes of given logical interface -# 1: destination variable -# 2: interface -network_get_prefixes6() { - __network_ifstatus "$1" "$2" "['ipv6-prefix'][*]['address','mask']" "/ " -} - -# determine IPv4 gateway of given logical interface -# 1: destination variable -# 2: interface -# 3: consider inactive gateway if "true" (optional) -network_get_gateway() { - __network_ifstatus "$1" "$2" ".route[@.target='0.0.0.0' && !@.table].nexthop" "" 1 && \ - return 0 - - [ "$3" = 1 -o "$3" = "true" ] && \ - __network_ifstatus "$1" "$2" ".inactive.route[@.target='0.0.0.0' && !@.table].nexthop" "" 1 -} - -# determine IPv6 gateway of given logical interface -# 1: destination variable -# 2: interface -# 3: consider inactive gateway if "true" (optional) -network_get_gateway6() { - __network_ifstatus "$1" "$2" ".route[@.target='::' && !@.table].nexthop" "" 1 && \ - return 0 - - [ "$3" = 1 -o "$3" = "true" ] && \ - __network_ifstatus "$1" "$2" ".inactive.route[@.target='::' && !@.table].nexthop" "" 1 -} - -# determine the DNS servers of the given logical interface -# 1: destination variable -# 2: interface -# 3: consider inactive servers if "true" (optional) -network_get_dnsserver() { - __network_ifstatus "$1" "$2" "['dns-server'][*]" && return 0 - - [ "$3" = 1 -o "$3" = "true" ] && \ - __network_ifstatus "$1" "$2" ".inactive['dns-server'][*]" -} - -# determine the domains of the given logical interface -# 1: destination variable -# 2: interface -# 3: consider inactive domains if "true" (optional) -network_get_dnssearch() { - __network_ifstatus "$1" "$2" "['dns-search'][*]" && return 0 - - [ "$3" = 1 -o "$3" = "true" ] && \ - __network_ifstatus "$1" "$2" ".inactive['dns-search'][*]" -} - -# 1: destination variable -# 2: addr -# 3: inactive -# 4: limit -__network_wan() -{ - limit=1 - [ -n "$4" ] && limit="$4" - __network_ifstatus "$1" "" \ - "[@.route[@.target='$2' && !@.table]].interface" "" $limit && \ - return 0 - - [ "$3" = 1 -o "$3" = "true" ] && \ - __network_ifstatus "$1" "" \ - "[@.inactive.route[@.target='$2' && !@.table]].interface" "" $limit -} - -# find the logical interface which holds the current IPv4 default route -# 1: destination variable -# 2: consider inactive default routes if "true" (optional) -network_find_wan() { __network_wan "$1" "0.0.0.0" "$2" "$3"; } - -# find the logical interface which holds the current IPv6 default route -# 1: destination variable -# 2: consider inactive default routes if "true" (optional) -network_find_wan6() { __network_wan "$1" "::" "$2"; } - -# test whether the given logical interface is running -# 1: interface -network_is_up() -{ - local __up - __network_ifstatus "__up" "$1" ".up" && [ "$__up" = 1 ] -} - -# determine the protocol of the given logical interface -# 1: destination variable -# 2: interface -network_get_protocol() { __network_ifstatus "$1" "$2" ".proto"; } - -# determine the uptime of the given logical interface -# 1: destination variable -# 2: interface -network_get_uptime() { __network_ifstatus "$1" "$2" ".uptime"; } - -# determine the metric of the given logical interface -# 1: destination variable -# 2: interface -network_get_metric() { __network_ifstatus "$1" "$2" ".metric"; } - -# determine the layer 3 linux network device of the given logical interface -# 1: destination variable -# 2: interface -network_get_device() { __network_ifstatus "$1" "$2" ".l3_device"; } - -# determine the layer 2 linux network device of the given logical interface -# 1: destination variable -# 2: interface -network_get_physdev() { __network_ifstatus "$1" "$2" ".device"; } - -# defer netifd actions on the given linux network device -# 1: device name -network_defer_device() -{ - ubus call network.device set_state \ - "$(printf '{ "name": "%s", "defer": true }' "$1")" 2>/dev/null -} - -# continue netifd actions on the given linux network device -# 1: device name -network_ready_device() -{ - ubus call network.device set_state \ - "$(printf '{ "name": "%s", "defer": false }' "$1")" 2>/dev/null -} - -# flush the internal value cache to force re-reading values from ubus -network_flush_cache() { unset __NETWORK_CACHE; } diff --git a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/teltonika-defaults.sh b/6.6/target/linux/ipq40xx.new/base-files/lib/functions/teltonika-defaults.sh deleted file mode 100755 index 3435d0339..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/teltonika-defaults.sh +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/ash - -. /lib/functions.sh -. /usr/share/libubox/jshn.sh - -ucidef_add_static_modem_info() { - #Parameters: model usb_id sim_count other_params - local model usb_id count - local modem_counter=0 - local sim_count=1 - - model="$1" - usb_id="$2" - - [ -n "$3" ] && sim_count="$3" - - json_get_keys count modems - [ -n "$count" ] && modem_counter="$(echo "$count" | wc -w)" - - json_select_array "modems" - json_add_object - json_add_string id "$usb_id" - json_add_string num "$((modem_counter + 1))" - json_add_boolean builtin 1 - json_add_int simcount "$sim_count" - - for i in "$@"; do - case "$i" in - primary) - json_add_boolean primary 1 - ;; - gps_out) - json_add_boolean gps_out 1 - ;; - esac - done - - json_close_object - json_select .. -} - -ucidef_add_serial_capabilities() { - json_select_array serial - json_add_object - [ -n "$1" ] && { - json_select_array devices - for d in $1; do - json_add_string "" $d - done - json_select .. - } - - json_select_array bauds - for b in $2; do - json_add_string "" $b - done - json_select .. - - json_select_array data_bits - for n in $3; do - json_add_string "" $n - done - json_select .. - - json_select_array flow_control - for n in $4; do - json_add_string "" $n - done - json_select .. - - json_select_array stop_bits - for n in $5; do - json_add_string "" $n - done - json_select .. - - json_select_array parity_types - for n in $6; do - json_add_string "" $n - done - json_select .. - - json_add_string "path" $7 - - json_close_object - json_select .. -} - -ucidef_add_wlan_bssid_limit() { - json_select_object wlan - json_add_object "$1" - json_add_int bssid_limit "$2" - json_close_object - json_select .. -} - -ucidef_set_hwinfo() { - local args=" $* " - local options=' - dual_sim - at_sim - wifi - dual_band_ssid - wps - mobile - gps - usb - poe - bluetooth - ethernet - sfp_port - ios - sfp_switch - rs232 - rs485 - console - dual_modem - sd_card - sw_rst_on_init - dsa - hw_nat - ' - - json_select_object hwinfo - - for opt in $options; do - if [[ "$args" =~ " $(echo "$opt" | tr -d '\011\012\015\040') " ]]; then - json_add_boolean "$opt" 1 - else - json_add_boolean "$opt" 0 - fi - done - - json_select .. -} - -ucidef_set_release_version() { - json_add_string release_version "$1" -} - -ucidef_set_usb_jack() { - json_add_string "usb_jack" "$1" -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/teltonika-functions.sh b/6.6/target/linux/ipq40xx.new/base-files/lib/functions/teltonika-functions.sh deleted file mode 100755 index 43eaf285a..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/teltonika-functions.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -. /usr/share/libubox/jshn.sh - -is_ios_enabled() { - local ios - json_load_file "/etc/board.json" && - json_select hwinfo && - json_get_var ios ios && [ "$ios" = "1" ] -} - -# set_tty_options -set_tty_options() { - local PARITY_TMP="" - local SBITS_TMP="" - local FCTRL_TMP="" - - case "$4" in - "odd") PARITY_TMP="parenb parodd -cmspar" ;; - "even") PARITY_TMP="parenb -parodd -cmspar" ;; - "mark") PARITY_TMP="parenb parodd cmspar";; - "space") PARITY_TMP="parenb -parodd cmspar";; - *) PARITY_TMP="-parenb -parodd -cmspar" ;; - esac - - case "$5" in - 1) SBITS_TMP="-cstopb" ;; - 2) SBITS_TMP="cstopb" ;; - *) SBITS_TMP="-cstopb" ;; - esac - - case "$6" in - "none") FCTRL_TMP="-crtscts -ixon -ixoff" ;; - "rts/cts") FCTRL_TMP="crtscts -ixon -ixoff" ;; - "xon/xoff") FCTRL_TMP="-crtscts ixon ixoff" ;; - *) FCTRL_TMP="-crtscts -ixon -ixoff" ;; - esac - - case "$7" in - 0 | 1) - echo "$7" >/sys/class/gpio/rs485_rx_en/value - ;; - esac - - if [ "$8" == "1" ]; then - FCTRL_TMP="$FCTRL_TMP echo" - else - FCTRL_TMP="$FCTRL_TMP -echo" - fi - - local stty_retries=0 - while ! stty -F "$1" "$2" cs"$3" $PARITY_TMP "$SBITS_TMP" $FCTRL_TMP; do - if [ $stty_retries -lt 5 ]; then - stty_retries=$((stty_retries + 1)) - echo "stty was unable to set all the parameters, retrying in 10 seconds" - sleep 10 - else - echo "stty failed, continuing anyway" - break - fi - done -} - -to_lower() { - tr '[A-Z]' '[a-z]' <<-EOF - $@ - EOF -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/uci-defaults.sh b/6.6/target/linux/ipq40xx.new/base-files/lib/functions/uci-defaults.sh deleted file mode 100644 index 8d4ff13e2..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/lib/functions/uci-defaults.sh +++ /dev/null @@ -1,726 +0,0 @@ -#!/bin/ash - -. /lib/functions.sh -. /usr/share/libubox/jshn.sh - -json_select_array() { - local _json_no_warning=1 - - json_select "$1" - [ $? = 0 ] && return - - json_add_array "$1" - json_close_array - - json_select "$1" -} - -json_select_object() { - local _json_no_warning=1 - - json_select "$1" - [ $? = 0 ] && return - - json_add_object "$1" - json_close_object - - json_select "$1" -} - -ucidef_set_interface() { - local network=$1; shift - - [ -z "$network" ] && return - - json_select_object network - json_select_object "$network" - - while [ -n "$1" ]; do - local opt=$1; shift - local val=$1; shift - - [ -n "$opt" -a -n "$val" ] || break - - [ "$opt" = "device" -a "$val" != "${val/ //}" ] && { - json_select_array "ports" - for e in $val; do json_add_string "" "$e"; done - json_close_array - } || { - json_add_string "$opt" "$val" - } - done - - if ! json_is_a proto string; then - case "$network" in - lan) json_add_string proto static ;; - wan) json_add_string proto dhcp ;; - *) json_add_string proto none ;; - esac - fi - - json_select .. - json_select .. -} - -ucidef_set_interface_default_macaddr() { - local network="$1" ifname - - json_select_object 'network' - json_select_object "$network" - if json_is_a ports array; then - json_select_array 'ports' - json_get_keys port_id - for i in $port_id; do - json_get_var port "$i" - ifname="${ifname} $port" - done - json_select .. - else - json_get_var ifname 'device' - fi - json_select .. - json_select .. - - for i in $ifname; do - local macaddr="$2"; shift - [ -n "$macaddr" ] || break - json_select_object 'network-device' - json_select_object "$i" - json_add_string 'macaddr' "$macaddr" - json_select .. - json_select .. - done -} - -ucidef_set_board_id() { - json_select_object model - json_add_string id "$1" - json_select .. -} - -ucidef_set_board_platform() { - json_select_object model - json_add_string platform "$1" - json_select .. -} - -ucidef_set_model_name() { - json_select_object model - json_add_string name "$1" - json_select .. -} - -ucidef_set_compat_version() { - json_select_object system - json_add_string compat_version "${1:-1.0}" - json_select .. -} - -ucidef_set_interface_lan() { - ucidef_set_interface "lan" device "$1" proto "${2:-static}" -} - -ucidef_set_interface_wan() { - ucidef_set_interface "wan" device "$1" proto "${2:-dhcp}" -} - -ucidef_set_interfaces_lan_wan() { - local lan_if="$1" - local wan_if="$2" - - ucidef_set_interface_lan "$lan_if" - ucidef_set_interface_wan "$wan_if" -} - -_ucidef_add_switch_port() { - # inherited: $num $device $need_tag $want_untag $role $index $prev_role - # inherited: $n_cpu $n_ports $n_vlan $cpu0 $cpu1 $cpu2 $cpu3 $cpu4 $cpu5 - - n_ports=$((n_ports + 1)) - - json_select_array ports - json_add_object - json_add_int num "$num" - [ -n "$device" ] && json_add_string device "$device" - [ -n "$need_tag" ] && json_add_boolean need_tag "$need_tag" - [ -n "$want_untag" ] && json_add_boolean want_untag "$want_untag" - [ -n "$role" ] && json_add_string role "$role" - [ -n "$index" ] && json_add_int index "$index" - json_close_object - json_select .. - - # record pointer to cpu entry for lookup in _ucidef_finish_switch_roles() - [ -n "$device" ] && { - export "cpu$n_cpu=$n_ports" - n_cpu=$((n_cpu + 1)) - } - - # create/append object to role list - [ -n "$role" ] && { - json_select_array roles - - if [ "$role" != "$prev_role" ]; then - json_add_object - json_add_string role "$role" - json_add_string ports "$num" - json_close_object - - prev_role="$role" - n_vlan=$((n_vlan + 1)) - else - json_select_object "$n_vlan" - json_get_var port ports - json_add_string ports "$port $num" - json_select .. - fi - - json_select .. - } -} - -_ucidef_finish_switch_roles() { - # inherited: $name $n_cpu $n_vlan $cpu0 $cpu1 $cpu2 $cpu3 $cpu4 $cpu5 - local index role roles num device need_tag want_untag port ports - - json_select switch - json_select "$name" - json_get_keys roles roles - json_select .. - json_select .. - - for index in $roles; do - eval "port=\$cpu$(((index - 1) % n_cpu))" - - json_select switch - json_select "$name" - json_select ports - json_select "$port" - json_get_vars num device need_tag want_untag - json_select .. - json_select .. - - if [ ${need_tag:-0} -eq 1 -o ${want_untag:-0} -ne 1 ]; then - num="${num}t" - device="${device}.${index}" - fi - - json_select roles - json_select "$index" - json_get_vars role ports - json_add_string ports "$ports $num" - json_add_string device "$device" - json_select .. - json_select .. - json_select .. - json_select .. - - json_select_object network - local devices - - json_select_object "$role" - # attach previous interfaces (for multi-switch devices) - json_get_var devices device - if ! list_contains devices "$device"; then - devices="${devices:+$devices }$device" - fi - json_select .. - json_select .. - - ucidef_set_interface "$role" device "$devices" - done -} - -ucidef_set_ar8xxx_switch_mib() { - local name="$1" - local type="$2" - local interval="$3" - - json_select_object switch - json_select_object "$name" - json_add_int ar8xxx_mib_type $type - json_add_int ar8xxx_mib_poll_interval $interval - json_select .. - json_select .. -} - -ucidef_add_switch() { - local enabled=1 - if [ "$1" = "enabled" ]; then - shift - enabled="$1" - shift - fi - - local name="$1"; shift - local port num role device index need_tag prev_role - local cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 - local n_cpu=0 n_vlan=0 n_ports=0 - - json_select_object switch - json_select_object "$name" - json_add_boolean enable "$enabled" - json_add_boolean reset 1 - - for port in "$@"; do - case "$port" in - [0-9]*@*) - num="${port%%@*}" - device="${port##*@}" - need_tag=0 - want_untag=0 - [ "${num%t}" != "$num" ] && { - num="${num%t}" - need_tag=1 - } - [ "${num%u}" != "$num" ] && { - num="${num%u}" - want_untag=1 - } - ;; - [0-9]*:*:[0-9]*) - num="${port%%:*}" - index="${port##*:}" - role="${port#[0-9]*:}"; role="${role%:*}" - ;; - [0-9]*:*) - num="${port%%:*}" - role="${port##*:}" - ;; - esac - - if [ -n "$num" ] && [ -n "$device$role" ]; then - _ucidef_add_switch_port - fi - - unset num device role index need_tag want_untag - done - json_select .. - json_select .. - - _ucidef_finish_switch_roles -} - -ucidef_add_switch_attr() { - local name="$1" - local key="$2" - local val="$3" - - json_select_object switch - json_select_object "$name" - - case "$val" in - true|false) [ "$val" != "true" ]; json_add_boolean "$key" $? ;; - [0-9]) json_add_int "$key" "$val" ;; - *) json_add_string "$key" "$val" ;; - esac - - json_select .. - json_select .. -} - -ucidef_add_switch_port_attr() { - local name="$1" - local port="$2" - local key="$3" - local val="$4" - local ports i num - - json_select_object switch - json_select_object "$name" - - json_get_keys ports ports - json_select_array ports - - for i in $ports; do - json_select "$i" - json_get_var num num - - if [ -n "$num" ] && [ $num -eq $port ]; then - json_select_object attr - - case "$val" in - true|false) [ "$val" != "true" ]; json_add_boolean "$key" $? ;; - [0-9]) json_add_int "$key" "$val" ;; - *) json_add_string "$key" "$val" ;; - esac - - json_select .. - fi - - json_select .. - done - - json_select .. - json_select .. - json_select .. -} - -ucidef_set_interface_macaddr() { - local network="$1" - local macaddr="$2" - - ucidef_set_interface "$network" macaddr "$macaddr" -} - -ucidef_add_atm_bridge() { - local vpi="$1" - local vci="$2" - local encaps="$3" - local payload="$4" - local nameprefix="$5" - - json_select_object dsl - json_select_object atmbridge - json_add_int vpi "$vpi" - json_add_int vci "$vci" - json_add_string encaps "$encaps" - json_add_string payload "$payload" - json_add_string nameprefix "$nameprefix" - json_select .. - json_select .. -} - -ucidef_add_adsl_modem() { - local annex="$1" - local firmware="$2" - - json_select_object dsl - json_select_object modem - json_add_string type "adsl" - json_add_string annex "$annex" - json_add_string firmware "$firmware" - json_select .. - json_select .. -} - -ucidef_add_vdsl_modem() { - local annex="$1" - local tone="$2" - local xfer_mode="$3" - - json_select_object dsl - json_select_object modem - json_add_string type "vdsl" - json_add_string annex "$annex" - json_add_string tone "$tone" - json_add_string xfer_mode "$xfer_mode" - json_select .. - json_select .. -} - -ucidef_set_led_ataport() { - _ucidef_set_led_trigger "$1" "$2" "$3" ata"$4" -} - -_ucidef_set_led_common() { - local cfg="led_$1" - local name="$2" - local sysfs="$3" - - json_select_object led - - json_select_object "$1" - json_add_string name "$name" - json_add_string sysfs "$sysfs" -} - -ucidef_set_led_default() { - local default="$4" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string default "$default" - json_select .. - - json_select .. -} - -ucidef_set_led_gpio() { - local gpio="$4" - local inverted="$5" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string trigger "$trigger" - json_add_string type gpio - json_add_int gpio "$gpio" - json_add_boolean inverted "$inverted" - json_select .. - - json_select .. -} - -ucidef_set_led_ide() { - _ucidef_set_led_trigger "$1" "$2" "$3" disk-activity -} - -ucidef_set_led_netdev() { - local dev="$4" - local mode="${5:-link tx rx}" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string type netdev - json_add_string device "$dev" - json_add_string mode "$mode" - json_select .. - - json_select .. -} - -ucidef_set_led_oneshot() { - _ucidef_set_led_timer $1 $2 $3 "oneshot" $4 $5 -} - -ucidef_set_led_portstate() { - local port_state="$4" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string trigger port_state - json_add_string type portstate - json_add_string port_state "$port_state" - json_select .. - - json_select .. -} - -ucidef_set_led_rssi() { - local iface="$4" - local minq="$5" - local maxq="$6" - local offset="${7:-0}" - local factor="${8:-1}" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string type rssi - json_add_string name "$name" - json_add_string iface "$iface" - json_add_string minq "$minq" - json_add_string maxq "$maxq" - json_add_string offset "$offset" - json_add_string factor "$factor" - json_select .. - - json_select .. -} - -ucidef_set_led_switch() { - local trigger_name="$4" - local port_mask="$5" - local speed_mask="$6" - local mode="$7" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string trigger "$trigger_name" - json_add_string type switch - json_add_string mode "$mode" - json_add_string port_mask "$port_mask" - json_add_string speed_mask "$speed_mask" - json_select .. - - json_select .. -} - -_ucidef_set_led_timer() { - local trigger_name="$4" - local delayon="$5" - local delayoff="$6" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string type "$trigger_name" - json_add_string trigger "$trigger_name" - json_add_int delayon "$delayon" - json_add_int delayoff "$delayoff" - json_select .. - - json_select .. -} - -ucidef_set_led_timer() { - _ucidef_set_led_timer $1 $2 $3 "timer" $4 $5 -} - -_ucidef_set_led_trigger() { - local trigger_name="$4" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string trigger "$trigger_name" - json_select .. - - json_select .. -} - -ucidef_set_led_usbdev() { - local dev="$4" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string type usb - json_add_string device "$dev" - json_select .. - - json_select .. -} - -ucidef_set_led_usbhost() { - _ucidef_set_led_trigger "$1" "$2" "$3" usb-host -} - -ucidef_set_led_usbport() { - local obj="$1" - local name="$2" - local sysfs="$3" - shift - shift - shift - - _ucidef_set_led_common "$obj" "$name" "$sysfs" - - json_add_string type usbport - json_select_array ports - for port in "$@"; do - json_add_string port "$port" - done - json_select .. - json_select .. - - json_select .. -} - -ucidef_set_led_wlan() { - _ucidef_set_led_trigger "$1" "$2" "$3" "$4" -} - -ucidef_set_rssimon() { - local dev="$1" - local refresh="$2" - local threshold="$3" - - json_select_object rssimon - - json_select_object "$dev" - [ -n "$refresh" ] && json_add_int refresh "$refresh" - [ -n "$threshold" ] && json_add_int threshold "$threshold" - json_select .. - - json_select .. -} - -ucidef_add_gpio_switch() { - local cfg="$1" - local name="$2" - local pin="$3" - local default="${4:-0}" - - json_select_object gpioswitch - json_select_object "$cfg" - json_add_string name "$name" - json_add_int pin "$pin" - json_add_int default "$default" - json_select .. - json_select .. -} - -ucidef_set_hostname() { - local hostname="$1" - - json_select_object system - json_add_string hostname "$hostname" - json_select .. -} - -ucidef_set_ntpserver() { - local server - - json_select_object system - json_select_array ntpserver - for server in "$@"; do - json_add_string "" "$server" - done - json_select .. - json_select .. -} - -ucidef_set_network_options() { - json_add_object "network_options" - n=$# - - for i in $(seq $((n / 2))); do - opt="$1" - val="$2" - - if [ "$val" -eq "$val" ] 2>/dev/null; then - json_add_int "$opt" "$val" - else - [ "$val" = "true" ] && val=1 || val=0 - json_add_boolean "$opt" "$val" - fi - shift; shift - done - json_close_object -} - -ucidef_set_poe() { - json_add_object poe - json_add_int "chip_count" "$1" - json_add_int "budget" "$2" - json_add_int "poe_ports" "$3" - shift 3 - json_add_array ports - while [ $# -gt 0 ] - do - json_add_object "" - json_add_string "name" "$1" - json_add_string "class" "$2" - json_add_int "budget" "$3" - json_close_object - shift 3 - done - json_close_array - json_add_array poe_chips - json_close_array - json_close_object -} - -ucidef_set_poe_chip() { - json_select_object poe - json_select_array poe_chips - json_add_object "" - for port in "$@"; do - case "$port" in - 0X*) - json_add_string address "$port" - ;; - [0-9]:*) - json_add_string chan"${port%%:*}" "${port##*:}" - ;; - esac - done - json_close_object - json_select .. - json_select .. -} - -board_config_update() { - json_init - [ -f ${CFG} ] && json_load "$(cat ${CFG})" - - # auto-initialize model id and name if applicable - if ! json_is_a model object; then - json_select_object model - [ -f "/tmp/sysinfo/board_name" ] && \ - json_add_string id "$(cat /tmp/sysinfo/board_name)" - [ -f "/tmp/sysinfo/model" ] && \ - json_add_string name "$(cat /tmp/sysinfo/model)" - json_select .. - fi -} - -board_config_flush() { - json_dump -i -o ${CFG} -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/lib/preinit/82_modem_power b/6.6/target/linux/ipq40xx.new/base-files/lib/preinit/82_modem_power deleted file mode 100644 index 52593d50d..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/lib/preinit/82_modem_power +++ /dev/null @@ -1,23 +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}" -c || \ - /sbin/mctl -p -m "${label}" -c -} - -do_power_modem() { - [ -f /etc/board.json ] || return - - [ -z "$(uci -q get system.modem.disable)" ] && /sbin/mctl -p -a -c || { - config_load system - config_foreach set_state mctl - } -} - -boot_hook_add preinit_main do_power_modem diff --git a/6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/ipq_failsafe.sh b/6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/ipq_failsafe.sh deleted file mode 100644 index dc59c6f97..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/ipq_failsafe.sh +++ /dev/null @@ -1,383 +0,0 @@ -find_mmc_part() { - local DEVNAME PARTNAME - - if grep -q "$1" /proc/mtd; then - echo "" && return 0 - fi - - for DEVNAME in /sys/block/mmcblk0/mmcblk*p*; do - PARTNAME=$(grep PARTNAME ${DEVNAME}/uevent | cut -f2 -d'=') - [ "$PARTNAME" = "$1" ] && echo "/dev/$(basename $DEVNAME)" && return 0 - done -} - -get_full_section_name() { - local img=$1 - local sec=$2 - - dumpimage -l ${img} | grep "^ Image.*(${sec})" | \ - sed 's,^ Image.*(\(.*\)),\1,' -} - -image_contains() { - local img=$1 - local sec=$2 - dumpimage -l ${img} | grep -q "^ Image.*(${sec}.*)" || return 1 -} - -print_sections() { - local img=$1 - - dumpimage -l ${img} | awk '/^ Image.*(.*)/ { print gensub(/Image .* \((.*)\)/,"\\1", $0) }' -} - -image_has_mandatory_section() { - local img=$1 - local mandatory_sections=$2 - - for sec in ${mandatory_sections}; do - image_contains $img ${sec} || {\ - return 1 - } - done -} - -image_demux() { - local img=$1 - - for sec in $(print_sections ${img}); do - local fullname=$(get_full_section_name ${img} ${sec}) - - local position=$(dumpimage -l ${img} | grep "(${fullname})" | awk '{print $2}') - dumpimage -i ${img} -o /tmp/${fullname}.bin -T "flat_dt" -p "${position}" ${fullname} > /dev/null || { \ - echo "Error while extracting \"${sec}\" from ${img}" - return 1 - } - done - return 0 -} - -image_is_FIT() { - if ! dumpimage -l $1 > /dev/null 2>&1; then - echo "$1 is not a valid FIT image" - return 1 - fi - return 0 -} - -switch_layout() { - local layout=$1 - local boot_layout=`find / -name boot_layout` - - # Layout switching is only required as the boot images (up to u-boot) - # use 512 user data bytes per code word, whereas Linux uses 516 bytes. - # It's only applicable for NAND flash. So let's return if we don't have - # one. - - [ -n "$boot_layout" ] || return - - case "${layout}" in - boot|1) echo 1 > $boot_layout;; - linux|0) echo 0 > $boot_layout;; - *) echo "Unknown layout \"${layout}\"";; - esac -} - -do_flash_mtd() { - local bin=$1 - local mtdname=$2 - local append="" - - local mtdpart=$(grep "\"${mtdname}\"" /proc/mtd | awk -F: '{print $1}') - local pgsz=$(cat /sys/class/mtd/${mtdpart}/writesize) - [ -f "$CONF_TAR" -a "$SAVE_CONFIG" -eq 1 -a "$2" == "rootfs" ] && append="-j $CONF_TAR" - - dd if=/tmp/${bin}.bin bs=${pgsz} conv=sync | mtd $append -e "/dev/${mtdpart}" write - "/dev/${mtdpart}" -} - -do_flash_emmc() { - local bin=$1 - local emmcblock=$2 - - dd if=/dev/zero of=${emmcblock} - dd if=/tmp/${bin}.bin of=${emmcblock} -} - -do_flash_partition() { - local bin=$1 - local mtdname=$2 - local emmcblock="$(find_mmc_part "$mtdname")" - - if [ -e "$emmcblock" ]; then - do_flash_emmc $bin $emmcblock - else - do_flash_mtd $bin $mtdname - fi -} - -do_flash_bootconfig() { - local bin=$1 - local mtdname=$2 - - # Fail safe upgrade - if [ -f /proc/boot_info/getbinary_${bin} ]; then - cat /proc/boot_info/getbinary_${bin} > /tmp/${bin}.bin - do_flash_partition $bin $mtdname - fi -} - -do_flash_failsafe_partition() { - local bin=$1 - local mtdname=$2 - local emmcblock - local primaryboot - - # Fail safe upgrade - [ -f /proc/boot_info/$mtdname/upgradepartition ] && { - default_mtd=$mtdname - mtdname=$(cat /proc/boot_info/$mtdname/upgradepartition) - primaryboot=$(cat /proc/boot_info/$default_mtd/primaryboot) - if [ $primaryboot -eq 0 ]; then - echo 1 > /proc/boot_info/$default_mtd/primaryboot - else - echo 0 > /proc/boot_info/$default_mtd/primaryboot - fi - } - - emmcblock="$(find_mmc_part "$mtdname")" - - if [ -e "$emmcblock" ]; then - do_flash_emmc $bin $emmcblock - else - do_flash_mtd $bin $mtdname - fi - -} - -do_flash_ubi() { - local bin=$1 - local mtdname=$2 - local mtdpart - local primaryboot - - mtdpart=$(grep "\"${mtdname}\"" /proc/mtd | awk -F: '{print $1}') - ubidetach -p /dev/${mtdpart} - - # Fail safe upgrade - [ -f /proc/boot_info/$mtdname/upgradepartition ] && { - primaryboot=$(cat /proc/boot_info/$mtdname/primaryboot) - if [ $primaryboot -eq 0 ]; then - echo 1 > /proc/boot_info/$mtdname/primaryboot - else - echo 0 > /proc/boot_info/$mtdname/primaryboot - fi - - mtdname=$(cat /proc/boot_info/$mtdname/upgradepartition) - } - - mtdpart=$(grep "\"${mtdname}\"" /proc/mtd | awk -F: '{print $1}') - ubiformat /dev/${mtdpart} -y -f /tmp/${bin}.bin -} - -do_flash_tz() { - local sec=$1 - local mtdpart=$(grep "\"0:QSEE\"" /proc/mtd | awk -F: '{print $1}') - local emmcblock="$(find_mmc_part "0:QSEE")" - - if [ -n "$mtdpart" -o -e "$emmcblock" ]; then - do_flash_failsafe_partition ${sec} "0:QSEE" - else - do_flash_failsafe_partition ${sec} "0:TZ" - fi -} - -do_flash_ddr() { - local sec=$1 - local mtdpart=$(grep "\"0:CDT\"" /proc/mtd | awk -F: '{print $1}') - local emmcblock="$(find_mmc_part "0:CDT")" - - if [ -n "$mtdpart" -o -e "$emmcblock" ]; then - do_flash_failsafe_partition ${sec} "0:CDT" - else - do_flash_failsafe_partition ${sec} "0:DDRPARAMS" - fi -} - -to_upper () { - echo $1 | awk '{print toupper($0)}' -} - -flash_section() { - local sec=$1 - - local board=$(board_name) - case "${sec}" in - hlos*) switch_layout linux; do_flash_failsafe_partition ${sec} "0:HLOS";; - rootfs*) switch_layout linux; do_flash_failsafe_partition ${sec} "rootfs";; - fs*) switch_layout linux; do_flash_failsafe_partition ${sec} "rootfs";; - ubi*) switch_layout linux; do_flash_ubi ${sec} "rootfs";; - #sbl1*) switch_layout boot; do_flash_partition ${sec} "0:SBL1";; - #sbl2*) switch_layout boot; do_flash_failsafe_partition ${sec} "0:SBL2";; - #sbl3*) switch_layout boot; do_flash_failsafe_partition ${sec} "0:SBL3";; - #mibib*) switch_layout boot; do_flash_partition ${sec} "0:MIBIB";; - #dtb-$(to_upper $board)*) switch_layout boot; do_flash_partition ${sec} "0:DTB";; - u-boot*) switch_layout boot; do_flash_failsafe_partition ${sec} "0:APPSBL";; - #ddr-$(to_upper $board)*) switch_layout boot; do_flash_ddr ${sec};; - ddr-${board}-*) switch_layout boot; do_flash_failsafe_partition ${sec} "0:CDT";; - #ssd*) switch_layout boot; do_flash_partition ${sec} "0:SSD";; - tz*) switch_layout boot; do_flash_tz ${sec};; - #rpm*) switch_layout boot; do_flash_failsafe_partition ${sec} "0:RPM";; - *) echo "Section ${sec} ignored"; return 1;; - esac - - echo "Flashed ${sec}" -} - -erase_emmc_config() { - local emmcblock="$(find_mmc_part "rootfs_data")" - if [ -e "$emmcblock" ]; then - dd if=/dev/zero of=${emmcblock} - mkfs.ext4 "$emmcblock" - fi -} - -platform_pre_upgrade() { - cp /sbin/upgraded /tmp - ubus call system nandupgrade "{\"path\": \"$1\" }" -} - -platform_check_image_ipq() { - local board=$(board_name) - - local mandatory_nand="ubi" - local mandatory_nor_emmc="hlos fs" - local mandatory_nor="hlos" - local mandatory_section_found=0 - local optional="sbl2 u-boot ddr-${board} ssd tz rpm" - local ignored="mibib bootconfig sbl1" - - image_is_FIT $1 || return 1 - - image_has_mandatory_section $1 ${mandatory_nand} && {\ - mandatory_section_found=1 - } - - image_has_mandatory_section $1 ${mandatory_nor_emmc} && {\ - mandatory_section_found=1 - } - - image_has_mandatory_section $1 ${mandatory_nor} && {\ - mandatory_section_found=1 - } - - if [ $mandatory_section_found -eq 0 ]; then - echo "Error: mandatory section(s) missing from \"$1\". Abort..." - return 1 - fi - - for sec in ${optional}; do - image_contains $1 ${sec} || {\ - echo "Warning: optional section \"${sec}\" missing from \"$1\". Continue..." - } - done - - for sec in ${ignored}; do - image_contains $1 ${sec} && {\ - echo "Warning: section \"${sec}\" will be ignored from \"$1\". Continue..." - } - done - - image_demux $1 || {\ - echo "Error: \"$1\" couldn't be extracted. Abort..." - return 1 - } - - [ -f /tmp/hlos_version ] && rm -f /tmp/*_version - dumpimage -c $1 2>/dev/null - return $? -} - -platform_version_upgrade() { - local version_files="appsbl_version sbl_version tz_version hlos_version rpm_version" - local sys="/sys/devices/system/qfprom/qfprom0/" - local tmp="/tmp/" - - for file in $version_files; do - [ -f "${tmp}${file}" ] && { - echo "Updating "${sys}${file}" with `cat "${tmp}${file}"`" - echo `cat "${tmp}${file}"` > "${sys}${file}" - rm -f "${tmp}${file}" - } - done -} - - -# The U-Boot loader of the OpenMesh devices requires image sizes and -# checksums to be provided in the U-Boot environment. -# The OpenMesh devices come with 2 main partitions - while one is active -# sysupgrade will flash the other. The boot order is changed to boot the -# newly flashed partition. If the new partition can't be booted due to -# upgrade failures the previously used partition is loaded. - -platform_do_upgrade_ipq() { - local board=$(board_name) - - # verify some things exist before erasing - if [ ! -e $1 ]; then - echo "Error: Can't find $1 after switching to ramfs, aborting upgrade!" - reboot - fi - - for sec in $(print_sections $1); do - if [ ! -e /tmp/${sec}.bin ]; then - echo "Error: Cant' find ${sec} after switching to ramfs, aborting upgrade!" - reboot - fi - done - - case "$board" in - teltonika,rutx) - for sec in $(print_sections $1); do - flash_section ${sec} - done - - switch_layout linux - # update bootconfig to register that fw upgrade has been done - do_flash_bootconfig bootconfig "0:BOOTCONFIG" - do_flash_bootconfig bootconfig1 "0:BOOTCONFIG1" - platform_version_upgrade - - erase_emmc_config - return 0; - ;; - esac - - echo "Upgrade failed!" - return 1; -} - -platform_copy_config_ipq() { - local emmcblock="$(find_mmc_part "rootfs_data")" - mkdir -p /tmp/overlay - - if [ -e "$emmcblock" ]; then - mount -t ext4 "$emmcblock" /tmp/overlay - cp /tmp/sysupgrade.tgz /tmp/overlay/ - sync - umount /tmp/overlay - else - local mtdname=rootfs - local mtdpart - - [ -f /proc/boot_info/$mtdname/upgradepartition ] && { - mtdname=$(cat /proc/boot_info/$mtdname/upgradepartition) - } - - mtdpart=$(grep "\"${mtdname}\"" /proc/mtd | awk -F: '{print $1}') - ubiattach -p /dev/${mtdpart} - mount -t ubifs ubi0:rootfs_data /tmp/overlay - cp /tmp/sysupgrade.tgz /tmp/overlay/ - sync - umount /tmp/overlay - fi -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/platform.sh b/6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/platform.sh deleted file mode 100644 index c2e675c63..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/platform.sh +++ /dev/null @@ -1,222 +0,0 @@ -PART_NAME=firmware -REQUIRE_IMAGE_METADATA=1 - -RAMFS_COPY_BIN='fw_printenv fw_setenv' -RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' - -platform_check_image() { - case "$(board_name)" in - asus,rt-ac42u |\ - asus,rt-ac58u) - local ubidev=$(nand_find_ubi $CI_UBIPART) - local asus_root=$(nand_find_volume $ubidev jffs2) - - [ -n "$asus_root" ] || return 0 - - cat << EOF -jffs2 partition is still present. -There's probably no space left -to install the filesystem. - -You need to delete the jffs2 partition first: -# ubirmvol /dev/ubi0 --name=jffs2 - -Once this is done. Retry. -EOF - return 1 - ;; - teltonika,rutx) - platform_check_image_ipq "$1" - ;; - zte,mf286d) - CI_UBIPART="rootfs" - local mtdnum="$( find_mtd_index $CI_UBIPART )" - [ ! "$mtdnum" ] && return 1 - ubiattach -m "$mtdnum" || true - local ubidev="$( nand_find_ubi $CI_UBIPART )" - local ubi_rootfs=$(nand_find_volume $ubidev ubi_rootfs) - local ubi_rootfs_data=$(nand_find_volume $ubidev ubi_rootfs_data) - - [ -n "$ubi_rootfs" ] || [ -n "$ubi_rootfs_data" ] || return 0 - - cat << EOF -ubi_rootfs partition is still present. - -You need to delete the stock partition first: -# ubirmvol /dev/ubi0 -N ubi_rootfs -Please also delete ubi_rootfs_data, if exist: -# ubirmvol /dev/ubi0 -N ubi_rootfs_data - -Once this is done. Retry. -EOF - return 1 - ;; - esac - return 0; -} - -askey_do_upgrade() { - local tar_file="$1" - - local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') - board_dir=${board_dir%/} - - tar Oxf $tar_file ${board_dir}/root | mtd write - rootfs - - nand_do_upgrade "$1" -} - -zyxel_do_upgrade() { - local tar_file="$1" - - local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') - board_dir=${board_dir%/} - - tar Oxf $tar_file ${board_dir}/kernel | mtd write - kernel - - if [ -n "$UPGRADE_BACKUP" ]; then - tar Oxf $tar_file ${board_dir}/root | mtd -j "$UPGRADE_BACKUP" write - rootfs - else - tar Oxf $tar_file ${board_dir}/root | mtd write - rootfs - fi -} - -platform_do_upgrade_mikrotik_nand() { - local fw_mtd=$(find_mtd_part kernel) - fw_mtd="${fw_mtd/block/}" - [ -n "$fw_mtd" ] || return - - local board_dir=$(tar tf "$1" | grep -m 1 '^sysupgrade-.*/$') - board_dir=${board_dir%/} - [ -n "$board_dir" ] || return - - local kernel_len=$(tar xf "$1" ${board_dir}/kernel -O | wc -c) - [ -n "$kernel_len" ] || return - - tar xf "$1" ${board_dir}/kernel -O | ubiformat "$fw_mtd" -y -S $kernel_len -f - - - CI_KERNPART="none" - nand_do_upgrade "$1" -} - -platform_do_upgrade() { - case "$(board_name)" in - 8dev,jalapeno |\ - aruba,ap-303 |\ - aruba,ap-303h |\ - aruba,ap-365 |\ - avm,fritzbox-7530 |\ - avm,fritzrepeater-1200 |\ - avm,fritzrepeater-3000 |\ - buffalo,wtr-m2133hp |\ - cilab,meshpoint-one |\ - edgecore,ecw5211 |\ - edgecore,oap100 |\ - engenius,eap2200 |\ - glinet,gl-ap1300 |\ - luma,wrtq-329acn |\ - mobipromo,cm520-79f |\ - netgear,wac510 |\ - p2w,r619ac-64m |\ - p2w,r619ac-128m |\ - qxwlan,e2600ac-c2) - nand_do_upgrade "$1" - ;; - glinet,gl-b2200) - CI_KERNPART="0:HLOS" - CI_ROOTPART="rootfs" - CI_DATAPART="rootfs_data" - emmc_do_upgrade "$1" - ;; - alfa-network,ap120c-ac) - part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')" - if [ "$part" = "rootfs1" ]; then - fw_setenv active 2 || exit 1 - CI_UBIPART="rootfs2" - else - fw_setenv active 1 || exit 1 - CI_UBIPART="rootfs1" - fi - nand_do_upgrade "$1" - ;; - asus,map-ac2200) - CI_KERNPART="linux" - nand_do_upgrade "$1" - ;; - asus,rt-ac42u |\ - asus,rt-ac58u) - CI_KERNPART="linux" - nand_do_upgrade "$1" - ;; - cellc,rtl30vw) - CI_UBIPART="ubifs" - askey_do_upgrade "$1" - ;; - compex,wpj419) - nand_do_upgrade "$1" - ;; - linksys,ea6350v3 |\ - linksys,ea8300 |\ - linksys,mr8300) - platform_do_upgrade_linksys "$1" - ;; - meraki,mr33) - CI_KERNPART="part.safe" - nand_do_upgrade "$1" - ;; - mikrotik,cap-ac|\ - mikrotik,hap-ac2|\ - mikrotik,lhgg-60ad|\ - mikrotik,sxtsq-5-ac) - [ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware - default_do_upgrade "$1" - ;; - mikrotik,hap-ac3) - platform_do_upgrade_mikrotik_nand "$1" - ;; - netgear,rbr50 |\ - netgear,rbs50 |\ - netgear,srr60 |\ - netgear,srs60) - platform_do_upgrade_netgear_orbi_upgrade "$1" - ;; - openmesh,a42 |\ - openmesh,a62 |\ - plasmacloud,pa1200 |\ - plasmacloud,pa2200) - PART_NAME="inactive" - platform_do_upgrade_dualboot_datachk "$1" - ;; - teltonika,rutx12 |\ - teltonika,rutx) - platform_do_upgrade_ipq "$1" - ;; - teltonika,rutx10 |\ - teltonika,rutx50 |\ - zte,mf18a |\ - zte,mf286d |\ - zte,mf287plus |\ - zte,mf289f) - CI_UBIPART="rootfs" - nand_do_upgrade "$1" - ;; - zyxel,nbg6617) - zyxel_do_upgrade "$1" - ;; - *) - default_do_upgrade "$1" - ;; - esac -} - -platform_copy_config() { - case "$(board_name)" in - glinet,gl-b2200) - emmc_copy_config - ;; - teltonika,rutx) - platform_copy_config_ipq - ;; - esac - return 0; -} diff --git a/6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/stage2 b/6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/stage2 deleted file mode 100755 index 5f79619ee..000000000 --- a/6.6/target/linux/ipq40xx.new/base-files/lib/upgrade/stage2 +++ /dev/null @@ -1,147 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh -. /lib/functions/system.sh - -export IMAGE="$1" -COMMAND="$2" - -export INTERACTIVE=0 -export VERBOSE=1 -export CONFFILES=/tmp/sysupgrade.conffiles - -RAMFS_COPY_BIN= # extra programs for temporary ramfs root -RAMFS_COPY_DATA= # extra data files - -include /lib/upgrade - - -supivot() { # - /bin/mount | grep "on $1 type" 2>&- 1>&- || /bin/mount -o bind $1 $1 - mkdir -p $1$2 $1/proc $1/sys $1/dev $1/tmp $1/overlay && \ - /bin/mount -o noatime,move /proc $1/proc && \ - pivot_root $1 $1$2 || { - /bin/umount -l $1 $1 - return 1 - } - - /bin/mount -o noatime,move $2/sys /sys - /bin/mount -o noatime,move $2/dev /dev - /bin/mount -o noatime,move $2/tmp /tmp - /bin/mount -o noatime,move $2/overlay /overlay 2>&- - return 0 -} - -switch_to_ramfs() { - for binary in \ - /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount \ - pivot_root mount_root reboot sync kill sleep \ - md5sum hexdump cat zcat bzcat dd tar \ - ls basename find cp mv rm mkdir rmdir mknod touch chmod \ - '[' printf wc grep awk sed cut \ - mtd partx losetup mkfs.ext4 nandwrite flash_erase \ - ubiupdatevol ubiattach ubiblock ubiformat \ - ubidetach ubirsvol ubirmvol ubimkvol \ - snapshot snapshot_tool date jshn dtbtool dtc mkbootimg \ - ubinize-image.sh sysupgrade-tar.sh which ubinize mktemp \ - dumpimage ledman fwtool \ - $RAMFS_COPY_BIN - do - local file="$(command -v "$binary" 2>/dev/null)" - [ -n "$file" ] && install_bin "$file" - done - install_file /etc/resolv.conf \ - /lib/*.sh \ - /lib/functions/*.sh \ - /lib/upgrade/*.sh \ - /lib/upgrade/do_stage2 \ - /usr/share/libubox/jshn.sh \ - /etc/board.json \ - $RAMFS_COPY_DATA - - [ -L "/lib64" ] && ln -s /lib $RAM_ROOT/lib64 - - supivot $RAM_ROOT /mnt || { - v "Failed to switch over to ramfs. Please reboot." - exit 1 - } - - /bin/mount -o remount,ro /mnt - /bin/umount -l /mnt - - grep /overlay /proc/mounts > /dev/null && { - /bin/mount -o noatime,remount,ro /overlay - /bin/umount -l /overlay - } -} - -kill_remaining() { # [ [ ] ] - local loop_limit=10 - - local sig="${1:-TERM}" - local loop="${2:-0}" - local run=true - local stat - local proc_ppid=$(cut -d' ' -f4 /proc/$$/stat) - - vn "Sending $sig to remaining processes ..." - - while $run; do - run=false - for stat in /proc/[0-9]*/stat; do - [ -f "$stat" ] || continue - - local pid name state ppid rest - read pid name state ppid rest < $stat - name="${name#(}"; name="${name%)}" - - # Skip PID1, our parent, ourself and our children - [ $pid -ne 1 -a $pid -ne $proc_ppid -a $pid -ne $$ -a $ppid -ne $$ ] || continue - - local cmdline - read cmdline < /proc/$pid/cmdline - - # Skip kernel threads - [ -n "$cmdline" ] || continue - - _vn " $name" - kill -$sig $pid 2>/dev/null - - [ $loop -eq 1 ] && run=true - done - - let loop_limit-- - [ $loop_limit -eq 0 ] && { - _v - v "Failed to kill all processes." - exit 1 - } - done - _v -} - -[ -n "$(pgrep telnetd)" ] && { - killall -9 telnetd -} - -[ -n "$(pgrep dropbear)" ] && { - killall -9 dropbear -} - -killall -9 ash - -kill_remaining TERM -sleep 3 -kill_remaining KILL 1 - -sleep 1 - -echo 3 > /proc/sys/vm/drop_caches - -if [ -n "$(rootfs_type)" ]; then - v "Switching to ramdisk..." - switch_to_ramfs -fi - -# Exec new shell from ramfs -exec /bin/busybox ash -c "$COMMAND" diff --git a/6.6/target/linux/ipq40xx.new/base-files/sbin/mctl b/6.6/target/linux/ipq40xx.new/base-files/sbin/mctl deleted file mode 100755 index f501cc2e5..000000000 --- a/6.6/target/linux/ipq40xx.new/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