Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/coolsnowwolf/lede
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Apr 28, 2021
2 parents ea12768 + cda4a4f commit 910af7e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 26 deletions.
21 changes: 21 additions & 0 deletions package/lean/baidupcs-web/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ PKG_MIRROR_HASH:=815410a7c348c82eea638f6d34fd4dfab59286e16b172c434ff0008de24676d
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE

PKG_CONFIG_DEPENDS:= \
CONFIG_BAIDUPCS_WEB_COMPRESS_GOPROXY \
CONFIG_BAIDUPCS_WEB_COMPRESS_UPX

PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
Expand All @@ -43,14 +47,31 @@ define Package/$(PKG_NAME)/description
BaiduPCS-Web is a web controller for BaiduPCS-Go
endef

define Package/$(PKG_NAME)/config
config BAIDUPCS_WEB_COMPRESS_GOPROXY
bool "Compiling with GOPROXY proxy"
default n

config BAIDUPCS_WEB_COMPRESS_UPX
bool "Compress executable files with UPX"
default y
endef

ifeq ($(CONFIG_BAIDUPCS_WEB_COMPRESS_GOPROXY),y)
export GO111MODULE=on
export GOPROXY=https://goproxy.baidu.com
endif

define Build/Compile
( \
GOOS=$$$$(go env GOOS) GOARCH=$$$$(go env GOARCH) go get -v github.com/GeertJohan/go.rice/rice/... ; \
cd $(PKG_BUILD_DIR)/internal/pcsweb ; \
"$$$$(go env GOPATH)/bin/rice" embed-go ; \
)
$(call GoPackage/Build/Compile)
ifeq ($(CONFIG_BAIDUPCS_WEB_COMPRESS_UPX),y)
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/BaiduPCS-Go
endif
endef

define Package/$(PKG_NAME)/install
Expand Down
15 changes: 8 additions & 7 deletions target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr6606.dts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;

#include "mt7621.dtsi"

Expand All @@ -8,7 +9,7 @@
/ {
compatible = "xiaomi,mi-router-cr6606", "mediatek,mt7621-soc";
model = "Xiaomi Mi Router CR6606";

aliases {
led-boot = &led_sys_yellow;
led-failsafe = &led_sys_yellow;
Expand All @@ -25,22 +26,22 @@
compatible = "gpio-leds";

led_sys_yellow: sys_yellow {
label = "yellow:sys";
label = "mi-router-cr6606:yellow:sys";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};

led_sys_blue: sys_blue {
label = "blue:sys";
label = "mi-router-cr6606:blue:sys";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};

net_yellow {
label = "yellow:net";
label = "mi-router-cr6606:yellow:net";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};

net_blue {
label = "blue:net";
label = "mi-router-cr6606:blue:net";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
};
Expand Down Expand Up @@ -127,7 +128,7 @@
partition@7000000 {
label = "obr";
reg = <0x7000000 0x1000000>;
read-only;
read-only;
};
};
};
Expand Down Expand Up @@ -184,4 +185,4 @@
groups = "jtag", "uart3", "wdt";
function = "gpio";
};
};
};
21 changes: 4 additions & 17 deletions target/linux/ramips/image/mt7621.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1065,8 +1065,6 @@ define Device/xiaomi_mir4
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := Mi Router 4
SUPPORTED_DEVICES += R4
SUPPORTED_DEVICES += mir4
DEVICE_PACKAGES := kmod-mt7603e kmod-mt76x2e luci-app-mtwifi uboot-envtools
endef
TARGET_DEVICES += xiaomi_mir4
Expand Down Expand Up @@ -1094,29 +1092,18 @@ endef
TARGET_DEVICES += xiaomi_mi-router-ac2100

define Device/xiaomi_mi-router-cr6606
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := Mi Router CR6606
DEVICE_ALT0_VENDOR := Xiaomi
DEVICE_ALT0_MODEL := Mi Router CR6606
DEVICE_ALT0_VARIANT := China Unicom
DEVICE_ALT1_VENDOR := Xiaomi
DEVICE_ALT1_MODEL := Mi Router CR6608
DEVICE_ALT1_VARIANT := China Mobile
DEVICE_ALT2_VENDOR := Xiaomi
DEVICE_ALT2_MODEL := Mi Router CR6609
DEVICE_ALT2_VARIANT := China Telecom
BLOCKSIZE := 128k
PAGESIZE := 2048
UBINIZE_OPTS := -E 5
IMAGE_SIZE := 51200k
IMAGES += firmware.bin overlay.bin
IMAGE/firmware.bin := append-kernel | pad-to 128k | append-rootfs | \
pad-rootfs
IMAGE/firmware.bin := append-kernel | pad-to 128k | append-rootfs | pad-rootfs
IMAGE/overlay.bin := append-ubi | check-size
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_PACKAGES += uboot-envtools kmod-mt7915e
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := Mi Router CR6606
DEVICE_PACKAGES += uboot-envtools kmod-mt7915e wpad-openssl
endef
TARGET_DEVICES += xiaomi_mi-router-cr6606

Expand Down
2 changes: 1 addition & 1 deletion target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ xiaomi,mi-router-ac2100)
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x1"
;;
xiaomi,mi-router-cr6606)
ucidef_set_led_netdev "internet" "internet" "blue:net" "wan"
ucidef_set_led_netdev "internet" "internet" "mi-router-cr6606:blue:net" "wan"
;;
xiaomi,redmi-router-ac2100)
ucidef_set_led_switch "wan" "wan" "$boardname:white:wan" "switch0" "0x1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ ramips_setup_interfaces()
ucidef_set_interface_lan "eth0.1 ra0 rai0"
;;
xiaomi,mi-router-ac2100|\
xiaomi,mi-router-cr6606|\
xiaomi,redmi-router-ac2100)
ucidef_add_switch "switch0" \
"0:wan" "2:lan:1" "3:lan:2" "4:lan:3" "6@eth0"
Expand Down

0 comments on commit 910af7e

Please sign in to comment.