Merge Lean's source

This commit is contained in:
CN_SZTL 2019-12-15 22:16:04 +08:00
commit 2bcf58feab
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
14 changed files with 412 additions and 58 deletions

View File

@ -16,9 +16,9 @@ DEVICE_TYPE?=router
DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd block-mount \
kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget libustream-openssl ca-certificates \
default-settings luci luci-app-ddns luci-app-sqm luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot \
luci-app-filetransfer luci-app-vsftpd ddns-scripts_aliyun luci-app-ssr-plus \
luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus \
luci-app-pptp-server luci-app-arpbind luci-app-vlmcsd luci-app-wol luci-app-ramfree \
luci-app-sfe luci-app-flowoffload luci-app-nlbwmon luci-app-accesscontrol luci-app-zerotier luci-app-xlnetacc
luci-app-sfe luci-app-flowoffload luci-app-nlbwmon luci-app-accesscontrol
# For nas targets
DEFAULT_PACKAGES.nas:=fdisk lsblk mdadm automount autosamba luci-app-usb-printer
# For router targets

View File

@ -15,12 +15,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=coremark
PKG_RELEASE:=12
PKG_RELEASE:=13
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/eembc/coremark.git
PKG_SOURCE_VERSION:=2e9d6165f362f7071d29b7f88c6d32655e5d4a3c
PKG_SOURCE_DATE:=2019-01-31
PKG_SOURCE_VERSION:=21d473aae1f11d52ea592a8685734be2209aa66f
PKG_SOURCE_DATE:=2019-09-30
include $(INCLUDE_DIR)/package.mk
@ -48,7 +48,7 @@ define Build/Compile
$(SED) 's|EXE = .exe|EXE =|' $(PKG_BUILD_DIR)/$(DIR_ARCH)/core_portme.mak
mkdir $(PKG_BUILD_DIR)/$(ARCH)
cp -r $(PKG_BUILD_DIR)/$(DIR_ARCH)/* $(PKG_BUILD_DIR)/$(ARCH)
$(MAKE) XCFLAGS="-DMULTITHREAD=8 -DUSE_PTHREAD" -C $(PKG_BUILD_DIR) PORT_DIR=$(ARCH) $(MAKE_FLAGS) \
$(MAKE) XCFLAGS="-DMULTITHREAD=16 -DUSE_PTHREAD" -C $(PKG_BUILD_DIR) PORT_DIR=$(ARCH) $(MAKE_FLAGS) \
compile
endef
@ -64,7 +64,7 @@ endef
define Package/coremark/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || sed -i '/coremark/d' /etc/crontabs/root
[ -n "$${IPKG_INSTROOT}" ] || echo "0 4 * * 0 /etc/coremark.sh" >> /etc/crontabs/root
[ -n "$${IPKG_INSTROOT}" ] || echo "0 4 * * * /etc/coremark.sh" >> /etc/crontabs/root
[ -n "$${IPKG_INSTROOT}" ] || crontab /etc/crontabs/root
endef

View File

@ -1,7 +1,7 @@
#!/bin/sh
sed -i '/coremark/d' /etc/crontabs/root
echo "0 4 * * 0 /etc/coremark.sh" >> /etc/crontabs/root
echo "0 4 * * * /etc/coremark.sh" >> /etc/crontabs/root
crontab /etc/crontabs/root
touch /etc/bench.log

View File

@ -20,7 +20,7 @@ DEFAULT_PACKAGES += \
kmod-ath10k wpad-openssl \
kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019 \
automount autosamba luci-app-ipsec-vpnd v2ray shadowsocks-libev-ss-redir shadowsocksr-libev-server \
luci-app-unblockneteasemusic luci-app-qbittorrent \
luci-app-unblockneteasemusic luci-app-qbittorrent luci-app-zerotier luci-app-xlnetacc ddns-scripts_aliyun ca-certificates \
htop fdisk e2fsprogs
$(eval $(call BuildTarget))

View File

@ -0,0 +1,142 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "iptime,a6ns-m", "mediatek,mt7621-soc";
model = "ipTIME A6ns-M";
aliases {
led-boot = &led_cpu;
led-failsafe = &led_cpu;
led-running = &led_cpu;
led-upgrade = &led_cpu;
label-mac-device = &ethernet;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";
usb {
label = "a6ns-m:blue:usb";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>;
linux,default-trigger = "usbport";
};
wlan5g {
label = "a6ns-m:blue:wlan5g";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0radio";
};
wlan2g {
label = "a6ns-m:blue:wlan2g";
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1radio";
};
led_cpu: cpu {
label = "a6ns-m:blue:cpu";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <80000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
uboot: partition@0 {
label = "u-boot";
reg = <0x0 0x20000>;
read-only;
};
partition@20000 {
label = "config";
reg = <0x20000 0x10000>;
read-only;
};
factory: partition@30000 {
label = "factory";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x40000 0xfc0000>;
};
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "uart3", "jtag", "wdt";
ralink,function = "gpio";
};
};
&ethernet {
mtd-mac-address = <&uboot 0x1fc20>;
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
ieee80211-freq-limit = <5000000 6000000>;
};
};
&pcie1 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <2400000 2500000>;
};
};

View File

@ -0,0 +1,144 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "jcg,jhr-ac876m", "mediatek,mt7621-soc";
model = "JCG JHR-AC876M";
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
led-running = &led_wps;
led-upgrade = &led_wps;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";
usb3 {
label = "jhr-ac876m:blue:usb3";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>;
linux,default-trigger = "usbport";
};
usb2 {
label = "jhr-ac876m:blue:usb2";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
trigger-sources = <&ehci_port2>;
linux,default-trigger = "usbport";
};
led_wps: wps {
label = "jhr-ac876m:blue:wps";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <80000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
ieee80211-freq-limit = <2400000 2500000>;
led {
led-active-low;
};
};
};
&pcie1 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
led {
led-active-low;
};
};
};
&ethernet {
mtd-mac-address = <&factory 0xe000>;
};
&state_default {
gpio {
ralink,group = "i2c", "uart3", "jtag", "wdt";
ralink,function = "gpio";
};
};

View File

@ -48,7 +48,9 @@ define Device/seama
endef
define Build/jcg-header
$(STAGING_DIR_HOST)/bin/jcgimage -v $(1) $(if $(JCG_MAXSIZE), -m $(JCG_MAXSIZE),) -u $@ -o $@.new
$(STAGING_DIR_HOST)/bin/jcgimage -v $(1) \
$(if $(JCG_MAXSIZE), -m $$(($(subst k, * 1024,$(JCG_MAXSIZE)))),) \
-u $@ -o $@.new
mv $@.new $@
endef

View File

@ -50,7 +50,7 @@ define Device/alfa-network_tube-e4g
DEVICE_VENDOR := ALFA Network
DEVICE_MODEL := Tube-E4G
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci uboot-envtools uqmi \
-iwinfo -kmod-rt2800-soc -wpad-basic
-iwinfo -kmod-rt2800-soc -wpad-openssl
endef
TARGET_DEVICES += alfa-network_tube-e4g

View File

@ -91,7 +91,7 @@ define Device/afoundry_ew1200
DEVICE_MODEL := EW1200
DEVICE_PACKAGES := \
kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
kmod-usb-ledtrig-usbport wpad-basic
kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += ew1200
endef
TARGET_DEVICES += afoundry_ew1200
@ -131,7 +131,7 @@ define Device/asus_rt-ac57u
DEVICE_VENDOR := ASUS
DEVICE_MODEL := RT-AC57U
IMAGE_SIZE := 16064k
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
endef
TARGET_DEVICES += asus_rt-ac57u
@ -147,7 +147,7 @@ define Device/asus_rt-ac65p
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e wpad-basic uboot-envtools
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e wpad-openssl uboot-envtools
endef
TARGET_DEVICES += asus_rt-ac65p
@ -163,7 +163,7 @@ define Device/asus_rt-ac85p
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e wpad-basic uboot-envtools
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e wpad-openssl uboot-envtools
endef
TARGET_DEVICES += asus_rt-ac85p
@ -173,7 +173,7 @@ define Device/buffalo_wsr-1166dhp
IMAGE_SIZE := 15936k
DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WSR-1166DHP
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-openssl
SUPPORTED_DEVICES += wsr-1166
endef
TARGET_DEVICES += buffalo_wsr-1166dhp
@ -183,7 +183,7 @@ define Device/buffalo_wsr-600dhp
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WSR-600DHP
DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci wpad-basic
DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci wpad-openssl
SUPPORTED_DEVICES += wsr-600
endef
TARGET_DEVICES += buffalo_wsr-600dhp
@ -198,7 +198,7 @@ define Device/dlink_dir-860l-b1
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DIR-860L
DEVICE_VARIANT := B1
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += dir-860l-b1
endef
TARGET_DEVICES += dlink_dir-860l-b1
@ -209,7 +209,7 @@ define Device/d-team_newifi-d2
DEVICE_VENDOR := Newifi
DEVICE_MODEL := D2
DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
endef
TARGET_DEVICES += d-team_newifi-d2
@ -220,7 +220,7 @@ define Device/d-team_pbr-m1
DEVICE_MODEL := PBR-M1
DEVICE_PACKAGES := \
kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += pbr-m1
endef
TARGET_DEVICES += d-team_pbr-m1
@ -235,7 +235,7 @@ define Device/edimax_rg21s
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
elx-header 02020038 8844A2D168B45A2D
DEVICE_PACKAGES := \
kmod-mt7615e wpad-basic
kmod-mt7615e wpad-openssl
endef
TARGET_DEVICES += edimax_rg21s
@ -247,7 +247,7 @@ define Device/elecom_wrc-1167ghbk2-s
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) |\
elecom-wrc-factory WRC-1167GHBK2-S 0.00
DEVICE_PACKAGES := kmod-mt7615e wpad-basic
DEVICE_PACKAGES := kmod-mt7615e wpad-openssl
endef
TARGET_DEVICES += elecom_wrc-1167ghbk2-s
@ -278,7 +278,7 @@ define Device/firefly_firewrt
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Firefly
DEVICE_MODEL := FireWRT
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += firewrt
endef
TARGET_DEVICES += firefly_firewrt
@ -289,7 +289,7 @@ define Device/gehua_ghl-r-001
DEVICE_VENDOR := GeHua
DEVICE_MODEL := GHL-R-001
DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
endef
TARGET_DEVICES += gehua_ghl-r-001
@ -323,7 +323,7 @@ define Device/hiwifi_hc5962
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
DEVICE_VENDOR := HiWiFi
DEVICE_MODEL := HC5962
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-basic
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-openssl
SUPPORTED_DEVICES += hc5962
endef
TARGET_DEVICES += hiwifi_hc5962
@ -335,7 +335,7 @@ define Device/iodata_wn-ax1167gr
iodata-factory 7864320 4 0x1055 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
DEVICE_VENDOR := I-O DATA
DEVICE_MODEL := WN-AX1167GR
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-openssl
endef
TARGET_DEVICES += iodata_wn-ax1167gr
@ -344,7 +344,7 @@ define Device/iodata_wn-gx300gr
IMAGE_SIZE := 7616k
DEVICE_VENDOR := I-O DATA
DEVICE_MODEL := WN-GX300GR
DEVICE_PACKAGES := kmod-mt7603 wpad-basic
DEVICE_PACKAGES := kmod-mt7603 wpad-openssl
endef
TARGET_DEVICES += iodata_wn-gx300gr
@ -357,17 +357,40 @@ define Device/iodata_wnpr2600g
IMAGE/factory.bin := \
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
elx-header 0104003a 8844A2D168B45A2D
DEVICE_PACKAGES := kmod-mt7615e wpad-basic
DEVICE_PACKAGES := kmod-mt7615e wpad-openssl
endef
TARGET_DEVICES += iodata_wnpr2600g
define Device/iptime_a6ns-m
MTK_SOC := mt7621
IMAGE_SIZE := 16128k
UIMAGE_NAME := a6nm
DEVICE_VENDOR := ipTIME
DEVICE_MODEL := A6ns-M
DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
endef
TARGET_DEVICES += iptime_a6ns-m
define Device/jcg_jhr-ac876m
MTK_SOC := mt7621
IMAGE_SIZE := 16064k
IMAGES += factory.bin
IMAGE/factory.bin := \
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 89.1
JCG_MAXSIZE := 16064k
DEVICE_VENDOR := JCG
DEVICE_MODEL := JHR-AC876M
DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
endef
TARGET_DEVICES += jcg_jhr-ac876m
define Device/lenovo_newifi-d1
MTK_SOC := mt7621
IMAGE_SIZE := 32448k
DEVICE_VENDOR := Newifi
DEVICE_MODEL := D1
DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport wpad-basic
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += newifi-d1
endef
TARGET_DEVICES += lenovo_newifi-d1
@ -377,7 +400,7 @@ define Device/linksys_re6500
IMAGE_SIZE := 7872k
DEVICE_VENDOR := Linksys
DEVICE_MODEL := RE6500
DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
DEVICE_PACKAGES := kmod-mt76x2 wpad-openssl
SUPPORTED_DEVICES += re6500
endef
TARGET_DEVICES += linksys_re6500
@ -441,7 +464,7 @@ define Device/mqmaker_witi
DEVICE_MODEL := WiTi
DEVICE_PACKAGES := \
kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
kmod-usb-ledtrig-usbport wpad-basic
kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m
endef
TARGET_DEVICES += mqmaker_witi
@ -453,7 +476,7 @@ define Device/mtc_wr1201
DEVICE_MODEL := Wireless Router WR1201
KERNEL_INITRAMFS := $(KERNEL_DTB) | wr1201-factory-header
DEVICE_PACKAGES := \
kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
endef
TARGET_DEVICES += mtc_wr1201
@ -461,7 +484,7 @@ define Device/netgear_ex6150
MTK_SOC := mt7621
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := EX6150
DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
DEVICE_PACKAGES := kmod-mt76x2 wpad-openssl
NETGEAR_BOARD_ID := U12H318T00_NETGEAR
IMAGE_SIZE := 14848k
IMAGES += factory.chk
@ -483,7 +506,7 @@ define Device/netgear_sercomm_nand
IMAGE/kernel.bin := append-kernel
IMAGE/rootfs.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
DEVICE_VENDOR := NETGEAR
DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
endef
DEVICE_VARS += SERCOMM_HWNAME SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER
@ -565,7 +588,7 @@ define Device/netgear_wndr3700-v5
DEVICE_MODEL := WNDR3700
DEVICE_VARIANT := v5
DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += wndr3700v5
endef
TARGET_DEVICES += netgear_wndr3700-v5
@ -581,7 +604,7 @@ define Device/netis_wf-2881
IMAGE/sysupgrade.bin := append-kernel | append-ubi | append-metadata | check-size $$$$(IMAGE_SIZE)
DEVICE_VENDOR := NETIS
DEVICE_MODEL := WF-2881
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += wf-2881
endef
TARGET_DEVICES += netis_wf-2881
@ -613,7 +636,7 @@ define Device/samknows_whitebox-v8
DEVICE_MODEL := Whitebox 8
DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \
uboot-envtools wpad-basic
uboot-envtools wpad-openssl
SUPPORTED_DEVICES += sk-wb8
endef
TARGET_DEVICES += samknows_whitebox-v8
@ -623,7 +646,7 @@ define Device/storylink_sap-g3200u3
IMAGE_SIZE := 7872k
DEVICE_VENDOR := STORYLiNK
DEVICE_MODEL := SAP-G3200U3
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += sap-g3200u3
endef
TARGET_DEVICES += storylink_sap-g3200u3
@ -633,7 +656,7 @@ define Device/telco-electronics_x1
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Telco Electronics
DEVICE_MODEL := X1
DEVICE_PACKAGES := kmod-usb3 kmod-mt76 wpad-basic
DEVICE_PACKAGES := kmod-usb3 kmod-mt76 wpad-openssl
endef
TARGET_DEVICES += telco-electronics_x1
@ -653,7 +676,7 @@ define Device/totolink_a7000r
UIMAGE_NAME := C8340R1C-9999
DEVICE_VENDOR := TOTOLINK
DEVICE_MODEL := A7000R
DEVICE_PACKAGES := kmod-mt7615e wpad-basic
DEVICE_PACKAGES := kmod-mt7615e wpad-openssl
endef
TARGET_DEVICES += totolink_a7000r
@ -662,7 +685,7 @@ define Device/adslr_g7
IMAGE_SIZE := 16064k
DEVICE_VENDOR := ADSLR
DEVICE_MODEL := G7
DEVICE_PACKAGES := kmod-mt7615e wpad-basic
DEVICE_PACKAGES := kmod-mt7615e wpad-openssl
endef
TARGET_DEVICES += adslr_g7
@ -684,7 +707,7 @@ define Device/tplink_re350-v1
$(Device/tplink-safeloader)
DEVICE_MODEL := RE350
DEVICE_VARIANT := v1
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-openssl
TPLINK_BOARD_ID := RE350-V1
IMAGE_SIZE := 6016k
SUPPORTED_DEVICES += re350-v1
@ -695,7 +718,7 @@ define Device/tplink_re650-v1
$(Device/tplink-safeloader)
DEVICE_MODEL := RE650
DEVICE_VARIANT := v1
DEVICE_PACKAGES := kmod-mt7615e wpad-basic
DEVICE_PACKAGES := kmod-mt7615e wpad-openssl
TPLINK_BOARD_ID := RE650-V1
IMAGE_SIZE := 14208k
endef
@ -751,7 +774,7 @@ define Device/wevo_11acnas
UIMAGE_NAME := 11AC-NAS-Router(0.0.0)
DEVICE_VENDOR := WeVO
DEVICE_MODEL := 11AC NAS Router
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += 11acnas
endef
TARGET_DEVICES += wevo_11acnas
@ -764,7 +787,7 @@ define Device/wevo_w2914ns-v2
DEVICE_MODEL := W2914NS
DEVICE_VARIANT := v2
DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += w2914nsv2
endef
TARGET_DEVICES += wevo_w2914ns-v2
@ -785,7 +808,7 @@ define Device/xiaomi_mir3g
SUPPORTED_DEVICES += R3G
SUPPORTED_DEVICES += mir3g
DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl \
uboot-envtools
endef
TARGET_DEVICES += xiaomi_mir3g
@ -799,7 +822,7 @@ define Device/xiaomi_mir3g-v2
DEVICE_ALT0_VENDOR := Xiaomi
DEVICE_ALT0_MODEL := Mi Router 4A
DEVICE_ALT0_VARIANT := Gigabit Edition
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-openssl
endef
TARGET_DEVICES += xiaomi_mir3g-v2
@ -816,7 +839,7 @@ define Device/xiaomi_mir3p
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
DEVICE_PACKAGES := \
kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \
kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl \
uboot-envtools
endef
TARGET_DEVICES += xiaomi_mir3p
@ -847,7 +870,7 @@ define Device/youhua_wr1200js
DEVICE_VENDOR := YouHua
DEVICE_MODEL := WR1200JS
DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
endef
TARGET_DEVICES += youhua_wr1200js
@ -857,7 +880,7 @@ define Device/youku_yk-l2
DEVICE_VENDOR := Youku
DEVICE_MODEL := YK-L2
DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
endef
TARGET_DEVICES += youku_yk-l2
@ -867,7 +890,7 @@ define Device/zbtlink_zbt-we1326
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-WE1326
DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 wpad-basic
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 wpad-openssl
SUPPORTED_DEVICES += zbt-we1326
endef
TARGET_DEVICES += zbtlink_zbt-we1326
@ -879,7 +902,7 @@ define Device/zbtlink_zbt-we3526
DEVICE_MODEL := ZBT-WE3526
DEVICE_PACKAGES := \
kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
endef
TARGET_DEVICES += zbtlink_zbt-we3526
@ -890,7 +913,7 @@ define Device/zbtlink_zbt-wg2626
DEVICE_MODEL := ZBT-WG2626
DEVICE_PACKAGES := \
kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
kmod-usb-ledtrig-usbport wpad-basic
kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += zbt-wg2626
endef
TARGET_DEVICES += zbtlink_zbt-wg2626
@ -903,7 +926,7 @@ define Device/zbtlink_zbt-wg3526-16m
DEVICE_VARIANT := 16M
DEVICE_PACKAGES := \
kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M
endef
TARGET_DEVICES += zbtlink_zbt-wg3526-16m
@ -916,7 +939,7 @@ define Device/zbtlink_zbt-wg3526-32m
DEVICE_VARIANT := 32M
DEVICE_PACKAGES := \
kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
kmod-usb3 kmod-usb-ledtrig-usbport wpad-openssl
SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M
endef
TARGET_DEVICES += zbtlink_zbt-wg3526-32m

View File

@ -37,7 +37,7 @@ define Device/cudy_wr1000
IMAGES += factory.bin
IMAGE/factory.bin := \
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 92.122
JCG_MAXSIZE := 8060928
JCG_MAXSIZE := 7872k
DEVICE_VENDOR := Cudy
DEVICE_MODEL := WR1000
DEVICE_PACKAGES := kmod-mt76x2

View File

@ -7,7 +7,7 @@ BOARDNAME:=MT7620 based boards
FEATURES+=usb ramdisk
CPU_TYPE:=24kc
DEFAULT_PACKAGES += kmod-rt2800-soc wpad-basic
DEFAULT_PACKAGES += kmod-rt2800-soc wpad-openssl
define Target/Description
Build firmware images for Ralink MT7620 based boards.

View File

@ -14,6 +14,7 @@ ramips_setup_interfaces()
d-team,pbr-m1|\
firefly,firewrt|\
hiwifi,hc5962|\
jcg,jhr-ac876m|\
mediatek,ap-mt7621a-v60|\
mediatek,mt7621-eval-board|\
mqmaker,witi|\
@ -63,6 +64,7 @@ ramips_setup_interfaces()
asus,rt-ac65p|\
asus,rt-ac57u|\
asus,rt-ac85p|\
iptime,a6ns-m|\
mikrotik,rb750gr3|\
ubiquiti,edgerouterx|\
ubiquiti,edgerouterx-sfp|\
@ -222,6 +224,13 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
label_mac=$wan_mac
;;
iptime,a6ns-m)
wan_mac=$(mtd_get_mac_binary u-boot 0x1fc40)
;;
jcg,jhr-ac876m)
label_mac=$(mtd_get_mac_binary factory 0x4)
wan_mac=$label_mac
;;
mediatek,ap-mt7621a-v60)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x5)" 1)
;;

View File

@ -0,0 +1,34 @@
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 24e1ea3..b1ff69a 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -313,6 +313,21 @@ static int m25p_remove(struct spi_device *spi)
return mtd_device_unregister(&flash->spi_nor.mtd);
}
+static void m25p_shutdown(struct spi_device *spi)
+{
+ struct m25p *flash = spi_get_drvdata(spi);
+
+ if ((&flash->spi_nor)->addr_width > 3) {
+ printk(KERN_INFO "m25p80: exit 4-byte address mode\n");
+ flash->command[0] = SPINOR_OP_EX4B; // exit 4-byte address mode: 0xe9
+ spi_write(flash->spi, flash->command, 1);
+ flash->command[0] = 0x66; // enable reset
+ spi_write(flash->spi, flash->command, 1);
+ flash->command[0] = 0x99; // reset
+ spi_write(flash->spi, flash->command, 1);
+ }
+}
+
/*
* Do NOT add to this array without reading the following:
*
@@ -387,6 +402,7 @@ static struct spi_driver m25p80_driver = {
.id_table = m25p_ids,
.probe = m25p_probe,
.remove = m25p_remove,
+ .shutdown = m25p_shutdown,
/* REVISIT: many of these chips have deep power-down modes, which
* should clearly be entered on suspend() to minimize power use.

View File

@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/target.mk
DEFAULT_PACKAGES += partx-utils mkf2fs fdisk e2fsprogs wpad kmod-usb-hid \
kmod-ath5k kmod-ath9k kmod-ath9k-htc kmod-ath10k kmod-rt2800-usb kmod-e1000e kmod-igb kmod-igbvf kmod-ixgbe kmod-pcnet32 kmod-tulip kmod-vmxnet3 kmod-i40e kmod-i40evf kmod-r8125 kmod-8139cp kmod-8139too kmod-fs-f2fs \
htop lm-sensors autocore automount autosamba luci-app-zerotier luci-app-ipsec-vpnd luci-app-pptp-server luci-proto-bonding luci-app-zerotier luci-app-unblockneteasemusic luci-app-qbittorrent luci-app-v2ray-server \
htop lm-sensors autocore automount autosamba luci-app-zerotier luci-app-ipsec-vpnd luci-app-pptp-server luci-proto-bonding luci-app-unblockneteasemusic luci-app-qbittorrent luci-app-v2ray-server luci-app-xlnetacc ddns-scripts_aliyun ca-certificates \
ath10k-firmware-qca988x ath10k-firmware-qca9888 ath10k-firmware-qca9984 brcmfmac-firmware-43602a1-pcie kmod-crypto-misc \
alsa-utils kmod-ac97 kmod-sound-hda-core kmod-sound-hda-codec-realtek kmod-sound-hda-codec-via kmod-sound-via82xx kmod-usb-audio \
kmod-usb-net kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8150 kmod-usb-net-rtl8152