mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Merge branch 'test' into develop
This commit is contained in:
commit
b816b2f64c
23 changed files with 693 additions and 1179 deletions
13
build.sh
13
build.sh
|
@ -42,7 +42,7 @@ OMR_KERNEL=${OMR_KERNEL:-5.4}
|
|||
OMR_RELEASE=${OMR_RELEASE:-$(git describe --tags `git rev-list --tags --max-count=1` | tail -1 | cut -d '-' -f1)}
|
||||
OMR_REPO=${OMR_REPO:-http://$OMR_HOST:$OMR_PORT/release/$OMR_RELEASE/$OMR_TARGET}
|
||||
|
||||
OMR_FEED_URL="${OMR_FEED_URL:-https://github.com/suyuan168/openmptcprouter-feeds}"
|
||||
OMR_FEED_URL="${OMR_FEED_URL:-https://github.com/ysurac/openmptcprouter-feeds}"
|
||||
OMR_FEED_SRC="${OMR_FEED_SRC:-develop}"
|
||||
|
||||
CUSTOM_FEED_URL="${CUSTOM_FEED_URL}"
|
||||
|
@ -203,9 +203,6 @@ fi
|
|||
if [ "$OMR_PACKAGES" = "mini" ]; then
|
||||
echo "CONFIG_PACKAGE_${OMR_DIST}-mini=y" >> "$OMR_TARGET/source/.config"
|
||||
fi
|
||||
if [ "$OMR_PACKAGES" = "zuixiao" ]; then
|
||||
echo "CONFIG_PACKAGE_${OMR_DIST}-zuixiao=y" >> "$OMR_TARGET/source/.config"
|
||||
fi
|
||||
|
||||
if [ "$OMR_TARGET" = "bpi-r1" -a "$OMR_OPENWRT" = "master" ]; then
|
||||
# We disable mc in master, because it leads to unknown compilation errors on bpi-r1 target
|
||||
|
@ -335,6 +332,13 @@ if ! patch -Rf -N -p1 -s --dry-run < ../../patches/nanqinlang.patch; then
|
|||
fi
|
||||
echo "Done"
|
||||
|
||||
echo "Checking if remove_abi patch is set or not"
|
||||
if ! patch -Rf -N -p1 -s --dry-run < ../../patches/remove_abi.patch; then
|
||||
echo "apply..."
|
||||
patch -N -p1 -s < ../../patches/remove_abi.patch
|
||||
fi
|
||||
echo "Done"
|
||||
|
||||
# Add BBR2 patch, only working on 64bits images for now
|
||||
if [ "$OMR_TARGET" = "x86_64" ] || [ "$OMR_TARGET" = "bpi-r64" ] || [ "$OMR_TARGET" = "rpi4" ] || [ "$OMR_TARGET" = "espressobin" ] || [ "$OMR_TARGET" = "r2s" ] || [ "$OMR_TARGET" = "rpi3" ]; then
|
||||
echo "Checking if BBRv2 patch is set or not"
|
||||
|
@ -436,7 +440,6 @@ cd "$OMR_TARGET/source"
|
|||
echo "Update feeds index"
|
||||
cp .config .config.keep
|
||||
scripts/feeds clean
|
||||
scripts/feeds install -a
|
||||
scripts/feeds update -a
|
||||
|
||||
#cd -
|
||||
|
|
12
config-4018
12
config-4018
|
@ -1,12 +0,0 @@
|
|||
CONFIG_TARGET_ipq40xx=y
|
||||
CONFIG_TARGET_ipq40xx_generic=y
|
||||
CONFIG_TARGET_ipq40xx_generic_DEVICE_8dev_jalapeno=y
|
||||
CONFIG_TARGET_BOARD="ipq40xx"
|
||||
CONFIG_TARGET_SUBTARGET="generic"
|
||||
CONFIG_TARGET_PROFILE="DEVICE_8dev_jalapeno"
|
||||
CONFIG_TARGET_ARCH_PACKAGES="arm_cortex-a7_neon-vfpv4"
|
||||
CONFIG_PACKAGE_ath10k-board-qca4019=y
|
||||
CONFIG_PACKAGE_ath10k-firmware-qca4019-ct-htt=y
|
||||
CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers=y
|
||||
CONFIG_KERNEL_ARM_MODULE_PLTS=y
|
||||
CONFIG_KERNEL_TCP_CONG_BBR2=y
|
43
root/package/base-files/files/etc/banner
Executable file → Normal file
43
root/package/base-files/files/etc/banner
Executable file → Normal file
|
@ -1,39 +1,8 @@
|
|||
|
||||
/***
|
||||
* ,s555SB@@&
|
||||
* :9H####@@@@@Xi
|
||||
* 1@@@@@@@@@@@@@@8
|
||||
* ,8@@@@@@@@@B@@@@@@8
|
||||
* :B@@@@X3hi8Bs;B@@@@@Ah,
|
||||
* ,8i r@@@B: 1S ,M@@@@@@#8;
|
||||
* 1AB35.i: X@@8 . SGhr ,A@@@@@@@@S
|
||||
* 1@h31MX8 18Hhh3i .i3r ,A@@@@@@@@@5
|
||||
* ;@&i,58r5 rGSS: :B@@@@@@@@@@A
|
||||
* 1#i . 9i hX. .: .5@@@@@@@@@@@1
|
||||
* sG1, ,G53s. 9#Xi;hS5 3B@@@@@@@B1
|
||||
* .h8h.,A@@@MXSs, #@H1: 3ssSSX@1
|
||||
* s ,@@@@@@@@@@@@Xhi, r#@@X1s9M8 .GA981
|
||||
* ,. rS8H#@@@@@@@@@@#HG51;. .h31i;9@r .8@@@@BS;i;
|
||||
* .19AXXXAB@@@@@@@@@@@@@@#MHXG893hrX#XGGXM@@@@@@@@@@MS
|
||||
* s@@MM@@@hsX#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&,
|
||||
* :GB@#3G@@Brs ,1GM@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B,
|
||||
* .hM@@@#@@#MX 51 r;iSGAM@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8
|
||||
* :3B@@@@@@@@@@@&9@h :Gs .;sSXH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:
|
||||
* s&HA#@@@@@@@@@@@@@@M89A;.8S. ,r3@@@@@@@@@@@@@@@@@@@@@@@@@@@r
|
||||
* ,13B@@@@@@@@@@@@@@@@@@@5 5B3 ;. ;@@@@@@@@@@@@@@@@@@@@@@@@@@@i
|
||||
* 5#@@#&@@@@@@@@@@@@@@@@@@9 .39: ;@@@@@@@@@@@@@@@@@@@@@@@@@@@;
|
||||
* 9@@@X:MM@@@@@@@@@@@@@@@#; ;31. H@@@@@@@@@@@@@@@@@@@@@@@@@@:
|
||||
* SH#@B9.rM@@@@@@@@@@@@@B :. 3@@@@@@@@@@@@@@@@@@@@@@@@@@5
|
||||
* ,:. 9@@@@@@@@@@@#HB5 .M@@@@@@@@@@@@@@@@@@@@@@@@@B
|
||||
* ,ssirhSM@&1;i19911i,. s@@@@@@@@@@@@@@@@@@@@@@@@@@S
|
||||
* ,,,rHAri1h1rh&@#353Sh: 8@@@@@@@@@@@@@@@@@@@@@@@@@#:
|
||||
* .A3hH@#5S553&@@#h i:i9S #@@@@@@@@@@@@@@@@@@@@@@@@@A.
|
||||
*
|
||||
*
|
||||
* 又看源码,看你妹妹呀!
|
||||
*/
|
||||
|
||||
___ __ __ ___ _____ ___ ___ _
|
||||
/ _ \ _ __ ___ _ _ | \/ | _ \_ _/ __| _ \_ _ ___ _ _| |_ ___ _ _
|
||||
| (_) | '_ \/ -_) ' \| |\/| | _/ | || (__| _/ '_/ _ \ || | _/ -_) '_|
|
||||
\___/| .__/\___|_||_|_| |_|_| |_| \___|_| |_| \___/\_,_|\__\___|_|
|
||||
|_|
|
||||
------------------------------------------------------------------------------
|
||||
55860.com QQ 175338181 weixin:xinyangla
|
||||
(%C)
|
||||
(%C)
|
||||
------------------------------------------------------------------------------
|
||||
|
|
16
root/package/base-files/files/etc/board.d/99-default_network
Executable file
16
root/package/base-files/files/etc/board.d/99-default_network
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2013-2015 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
json_is_a network object && exit 0
|
||||
|
||||
ucidef_set_interface_lan 'eth0'
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
|
@ -1,5 +0,0 @@
|
|||
root:$1$ie.8vTnt$7EzhI1ZYiwp8hSAC4eSId0:18473:0:99999:7:::
|
||||
daemon:*:0:0:99999:7:::
|
||||
ftp:*:0:0:99999:7:::
|
||||
network:*:0:0:99999:7:::
|
||||
nobody:*:0:0:99999:7:::
|
20
root/package/firmware/ipq-wifi/Makefile
Executable file → Normal file
20
root/package/firmware/ipq-wifi/Makefile
Executable file → Normal file
|
@ -30,19 +30,14 @@ ALLWIFIBOARDS:= \
|
|||
avm_fritzrepeater-1200 \
|
||||
buffalo_wtr-m2133hp \
|
||||
cellc_rtl30vw \
|
||||
devolo_magic-2-wifi-next \
|
||||
dlink_dap2610 \
|
||||
edgecore_ecw5410 \
|
||||
edgecore_oap100 \
|
||||
engenius_eap2200 \
|
||||
engenius_emd1 \
|
||||
engenius_emr3500 \
|
||||
ezviz_cs-w3-wd1200g-eup \
|
||||
glinet_gl-ap1300 \
|
||||
glinet_gl-s1300 \
|
||||
linksys_ea8300 \
|
||||
linksys_mr8300-v0 \
|
||||
luma_wrtq-329acn \
|
||||
p2w_r619ac \
|
||||
mobipromo_cm520-79f \
|
||||
nec_wg2600hp3 \
|
||||
plasmacloud_pa1200 \
|
||||
|
@ -57,7 +52,7 @@ define Package/ipq-wifi-default
|
|||
SUBMENU:=ath10k Board-Specific Overrides
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x)
|
||||
DEPENDS:=@TARGET_ipq40xx
|
||||
TITLE:=Custom Board
|
||||
endef
|
||||
|
||||
|
@ -115,25 +110,16 @@ $(eval $(call generate-ipq-wifi-package,aruba_ap-303,Aruba AP-303))
|
|||
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
|
||||
$(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP))
|
||||
$(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW))
|
||||
$(eval $(call generate-ipq-wifi-package,devolo_magic-2-wifi-next,devolo Magic 2 WiFi next))
|
||||
$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610))
|
||||
$(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410))
|
||||
$(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500))
|
||||
$(eval $(call generate-ipq-wifi-package,ezviz_cs-w3-wd1200g-eup,EZVIZ CS-W3-WD1200G EUP))
|
||||
$(eval $(call generate-ipq-wifi-package,glinet_gl-ap1300,GL.iNet GL-AP1300))
|
||||
$(eval $(call generate-ipq-wifi-package,glinet_gl-s1300,GL.iNet GL-S1300))
|
||||
$(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
|
||||
$(eval $(call generate-ipq-wifi-package,linksys_mr8300-v0,Linksys MR8300))
|
||||
$(eval $(call generate-ipq-wifi-package,luma_wrtq-329acn,Luma WRTQ-329ACN))
|
||||
$(eval $(call generate-ipq-wifi-package,mobipromo_cm520-79f,MobiPromo CM520-79F))
|
||||
$(eval $(call generate-ipq-wifi-package,nec_wg2600hp3,NEC Platforms WG2600HP3))
|
||||
$(eval $(call generate-ipq-wifi-package,plasmacloud_pa1200,Plasma Cloud PA1200))
|
||||
$(eval $(call generate-ipq-wifi-package,plasmacloud_pa2200,Plasma Cloud PA2200))
|
||||
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
|
||||
$(eval $(call generate-ipq-wifi-package,pangu_l1000,PANGU L1000))
|
||||
$(eval $(call generate-ipq-wifi-package,p2w_r619ac,P&W R619AC))
|
||||
|
||||
$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
|
||||
$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
|
||||
|
|
Binary file not shown.
432
root/rules.mk
Normal file
432
root/rules.mk
Normal file
|
@ -0,0 +1,432 @@
|
|||
#
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE Project
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifneq ($(__rules_inc),1)
|
||||
__rules_inc=1
|
||||
|
||||
ifeq ($(DUMP),)
|
||||
-include $(TOPDIR)/.config
|
||||
endif
|
||||
include $(TOPDIR)/include/debug.mk
|
||||
include $(TOPDIR)/include/verbose.mk
|
||||
|
||||
ifneq ($(filter check,$(MAKECMDGOALS)),)
|
||||
CHECK:=1
|
||||
DUMP:=1
|
||||
endif
|
||||
|
||||
export TMP_DIR:=$(TOPDIR)/tmp
|
||||
export TMPDIR:=$(TMP_DIR)
|
||||
|
||||
qstrip=$(strip $(subst ",,$(1)))
|
||||
#"))
|
||||
|
||||
empty:=
|
||||
space:= $(empty) $(empty)
|
||||
comma:=,
|
||||
merge=$(subst $(space),,$(1))
|
||||
confvar=$(shell echo '$(foreach v,$(1),$(v)=$(subst ','\'',$($(v))))' | $(STAGING_DIR_HOST)/bin/mkhash md5)
|
||||
strip_last=$(patsubst %.$(lastword $(subst .,$(space),$(1))),%,$(1))
|
||||
|
||||
paren_left = (
|
||||
paren_right = )
|
||||
chars_lower = a b c d e f g h i j k l m n o p q r s t u v w x y z
|
||||
chars_upper = A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
||||
|
||||
define sep
|
||||
|
||||
endef
|
||||
|
||||
define newline
|
||||
|
||||
|
||||
endef
|
||||
|
||||
__tr_list = $(join $(join $(1),$(foreach char,$(1),$(comma))),$(2))
|
||||
__tr_head_stripped = $(subst $(space),,$(foreach cv,$(call __tr_list,$(1),$(2)),$$$(paren_left)subst$(cv)$(comma)))
|
||||
__tr_head = $(subst $(paren_left)subst,$(paren_left)subst$(space),$(__tr_head_stripped))
|
||||
__tr_tail = $(subst $(space),,$(foreach cv,$(1),$(paren_right)))
|
||||
__tr_template = $(__tr_head)$$(1)$(__tr_tail)
|
||||
|
||||
$(eval toupper = $(call __tr_template,$(chars_lower),$(chars_upper)))
|
||||
$(eval tolower = $(call __tr_template,$(chars_upper),$(chars_lower)))
|
||||
|
||||
version_abbrev = $(if $(if $(CHECK),,$(DUMP)),$(1),$(shell printf '%.8s' $(1)))
|
||||
|
||||
_SINGLE=export MAKEFLAGS=$(space);
|
||||
CFLAGS:=
|
||||
ARCH:=$(subst i486,i386,$(subst i586,i386,$(subst i686,i386,$(call qstrip,$(CONFIG_ARCH)))))
|
||||
ARCH_PACKAGES:=$(call qstrip,$(CONFIG_TARGET_ARCH_PACKAGES))
|
||||
BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
|
||||
SUBTARGET:=$(call qstrip,$(CONFIG_TARGET_SUBTARGET))
|
||||
TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
|
||||
export EXTRA_OPTIMIZATION:=$(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION)))
|
||||
TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX))
|
||||
BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
|
||||
SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
|
||||
BUILD_SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
|
||||
NPROC:=$(shell sysctl -n hw.ncpu 2>/dev/null || nproc)
|
||||
export SHELL:=/usr/bin/env bash
|
||||
|
||||
IS_PACKAGE_BUILD := $(if $(filter package/%,$(BUILD_SUBDIR)),1)
|
||||
|
||||
OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH))
|
||||
|
||||
ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be powerpc ))
|
||||
FPIC:=-fPIC
|
||||
else
|
||||
FPIC:=-fpic
|
||||
endif
|
||||
|
||||
HOST_FPIC:=-fPIC
|
||||
|
||||
ARCH_SUFFIX:=$(call qstrip,$(CONFIG_CPU_TYPE))
|
||||
GCC_ARCH:=
|
||||
|
||||
ifneq ($(ARCH_SUFFIX),)
|
||||
ARCH_SUFFIX:=_$(ARCH_SUFFIX)
|
||||
endif
|
||||
ifneq ($(filter -march=armv%,$(TARGET_OPTIMIZATION)),)
|
||||
GCC_ARCH:=$(patsubst -march=%,%,$(filter -march=armv%,$(TARGET_OPTIMIZATION)))
|
||||
endif
|
||||
ifdef CONFIG_HAS_SPE_FPU
|
||||
TARGET_SUFFIX:=$(TARGET_SUFFIX)spe
|
||||
endif
|
||||
ifdef CONFIG_MIPS64_ABI
|
||||
ifneq ($(CONFIG_MIPS64_ABI_O32),y)
|
||||
ARCH_SUFFIX:=$(ARCH_SUFFIX)_$(call qstrip,$(CONFIG_MIPS64_ABI))
|
||||
endif
|
||||
endif
|
||||
|
||||
DEFAULT_SUBDIR_TARGETS:=clean download prepare compile update refresh prereq dist distcheck configure check check-depends
|
||||
|
||||
define DefaultTargets
|
||||
$(foreach t,$(DEFAULT_SUBDIR_TARGETS) $(1),
|
||||
.$(t):
|
||||
$(t): .$(t)
|
||||
.PHONY: $(t) .$(t)
|
||||
)
|
||||
endef
|
||||
|
||||
DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)
|
||||
OUTPUT_DIR:=$(if $(call qstrip,$(CONFIG_BINARY_FOLDER)),$(call qstrip,$(CONFIG_BINARY_FOLDER)),$(TOPDIR)/bin)
|
||||
BIN_DIR:=$(OUTPUT_DIR)/targets/$(BOARD)/$(SUBTARGET)
|
||||
INCLUDE_DIR:=$(TOPDIR)/include
|
||||
SCRIPT_DIR:=$(TOPDIR)/scripts
|
||||
BUILD_DIR_BASE:=$(TOPDIR)/build_dir
|
||||
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
GCCV:=$(call qstrip,$(CONFIG_GCC_VERSION))
|
||||
LIBC:=$(call qstrip,$(CONFIG_LIBC))
|
||||
REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))
|
||||
GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-openwrt-linux
|
||||
DIR_SUFFIX:=_$(LIBC)$(if $(CONFIG_arm),_eabi)
|
||||
BIN_DIR:=$(BIN_DIR)$(if $(CONFIG_USE_MUSL),,-$(LIBC))
|
||||
TARGET_DIR_NAME = target-$(ARCH)$(ARCH_SUFFIX)$(DIR_SUFFIX)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
|
||||
TOOLCHAIN_DIR_NAME = toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX)
|
||||
else
|
||||
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
|
||||
GNU_TARGET_NAME=$(call qstrip,$(CONFIG_TARGET_NAME))
|
||||
else
|
||||
GNU_TARGET_NAME=$(shell gcc -dumpmachine)
|
||||
endif
|
||||
REAL_GNU_TARGET_NAME=$(GNU_TARGET_NAME)
|
||||
LIBC:=$(call qstrip,$(CONFIG_LIBC))
|
||||
TARGET_DIR_NAME:=target-$(GNU_TARGET_NAME)_$(LIBC)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
|
||||
TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME)
|
||||
endif
|
||||
|
||||
ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_TARGET_uml)),)
|
||||
ifeq ($(CONFIG_GCC_USE_IREMAP),y)
|
||||
iremap = -iremap$(1):$(2)
|
||||
else
|
||||
iremap = -f$(if $(CONFIG_REPRODUCIBLE_DEBUG_INFO),file,macro)-prefix-map=$(1)=$(2)
|
||||
endif
|
||||
endif
|
||||
|
||||
PACKAGE_DIR:=$(BIN_DIR)/packages
|
||||
PACKAGE_DIR_ALL:=$(TOPDIR)/staging_dir/packages/$(BOARD)
|
||||
BUILD_DIR:=$(BUILD_DIR_BASE)/$(TARGET_DIR_NAME)
|
||||
STAGING_DIR:=$(TOPDIR)/staging_dir/$(TARGET_DIR_NAME)
|
||||
BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/$(TOOLCHAIN_DIR_NAME)
|
||||
TOOLCHAIN_DIR:=$(TOPDIR)/staging_dir/$(TOOLCHAIN_DIR_NAME)
|
||||
STAMP_DIR:=$(BUILD_DIR)/stamp
|
||||
STAMP_DIR_HOST=$(BUILD_DIR_HOST)/stamp
|
||||
TARGET_ROOTFS_DIR?=$(if $(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(BUILD_DIR))
|
||||
TARGET_DIR:=$(TARGET_ROOTFS_DIR)/root-$(BOARD)
|
||||
STAGING_DIR_ROOT:=$(STAGING_DIR)/root-$(BOARD)
|
||||
STAGING_DIR_IMAGE:=$(STAGING_DIR)/image
|
||||
BUILD_LOG_DIR:=$(if $(call qstrip,$(CONFIG_BUILD_LOG_DIR)),$(call qstrip,$(CONFIG_BUILD_LOG_DIR)),$(TOPDIR)/logs)
|
||||
PKG_INFO_DIR := $(STAGING_DIR)/pkginfo
|
||||
|
||||
BUILD_DIR_HOST:=$(if $(IS_PACKAGE_BUILD),$(BUILD_DIR_BASE)/hostpkg,$(BUILD_DIR_BASE)/host)
|
||||
STAGING_DIR_HOST:=$(TOPDIR)/staging_dir/host
|
||||
STAGING_DIR_HOSTPKG:=$(TOPDIR)/staging_dir/hostpkg
|
||||
|
||||
TARGET_PATH:=$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH)))))
|
||||
TARGET_INIT_PATH:=$(call qstrip,$(CONFIG_TARGET_INIT_PATH))
|
||||
TARGET_INIT_PATH:=$(if $(TARGET_INIT_PATH),$(TARGET_INIT_PATH),/usr/sbin:/sbin:/usr/bin:/bin)
|
||||
TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3) $(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION))
|
||||
TARGET_CXXFLAGS = $(TARGET_CFLAGS)
|
||||
TARGET_ASFLAGS_DEFAULT = $(TARGET_CFLAGS)
|
||||
TARGET_ASFLAGS = $(TARGET_ASFLAGS_DEFAULT)
|
||||
TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include
|
||||
TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
|
||||
ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
LIBGCC_S_PATH=$(realpath $(wildcard $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC))))
|
||||
LIBGCC_S=$(if $(LIBGCC_S_PATH),-L$(dir $(LIBGCC_S_PATH)) -lgcc_s)
|
||||
LIBGCC_A=$(realpath $(lastword $(wildcard $(dir $(LIBGCC_S_PATH))/gcc/*/*/libgcc.a)))
|
||||
else
|
||||
LIBGCC_A=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.a))
|
||||
LIBGCC_S=$(if $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so),-L$(TOOLCHAIN_DIR)/lib -lgcc_s,$(LIBGCC_A))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_64BIT),y)
|
||||
LIB_SUFFIX:=64
|
||||
endif
|
||||
|
||||
ifndef DUMP
|
||||
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
-include $(TOOLCHAIN_DIR)/info.mk
|
||||
export GCC_HONOUR_COPTS:=0
|
||||
TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-)
|
||||
TARGET_CFLAGS+= -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result
|
||||
TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include
|
||||
ifeq ($(CONFIG_USE_MUSL),y)
|
||||
TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/include/fortify
|
||||
endif
|
||||
TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/include
|
||||
TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib
|
||||
TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
|
||||
else
|
||||
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
|
||||
TARGET_CROSS:=$(call qstrip,$(CONFIG_TOOLCHAIN_PREFIX))
|
||||
TOOLCHAIN_ROOT_DIR:=$(call qstrip,$(CONFIG_TOOLCHAIN_ROOT))
|
||||
TOOLCHAIN_BIN_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_BIN_PATH)))
|
||||
TOOLCHAIN_INC_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_INC_PATH)))
|
||||
TOOLCHAIN_LIB_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_LIB_PATH)))
|
||||
ifneq ($(TOOLCHAIN_BIN_DIRS),)
|
||||
TARGET_PATH:=$(subst $(space),:,$(TOOLCHAIN_BIN_DIRS)):$(TARGET_PATH)
|
||||
endif
|
||||
ifneq ($(TOOLCHAIN_INC_DIRS),)
|
||||
TARGET_CPPFLAGS+= $(patsubst %,-I%,$(TOOLCHAIN_INC_DIRS))
|
||||
endif
|
||||
ifneq ($(TOOLCHAIN_LIB_DIRS),)
|
||||
TARGET_LDFLAGS+= $(patsubst %,-L%,$(TOOLCHAIN_LIB_DIRS))
|
||||
endif
|
||||
TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
TARGET_PATH_PKG:=$(STAGING_DIR)/host/bin:$(STAGING_DIR_HOSTPKG)/bin:$(TARGET_PATH)
|
||||
|
||||
ifeq ($(CONFIG_SOFT_FLOAT),y)
|
||||
SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
|
||||
ifeq ($(CONFIG_arm),y)
|
||||
TARGET_CFLAGS+= -mfloat-abi=soft
|
||||
else
|
||||
TARGET_CFLAGS+= -msoft-float
|
||||
endif
|
||||
else
|
||||
SOFT_FLOAT_CONFIG_OPTION:=
|
||||
ifeq ($(CONFIG_arm),y)
|
||||
TARGET_CFLAGS+= -mfloat-abi=hard
|
||||
endif
|
||||
endif
|
||||
|
||||
export PATH:=$(TARGET_PATH)
|
||||
export STAGING_DIR STAGING_DIR_HOST STAGING_DIR_HOSTPKG
|
||||
export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh;
|
||||
|
||||
PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
|
||||
|
||||
export PKG_CONFIG
|
||||
|
||||
HOSTCC:=gcc
|
||||
HOSTCXX:=g++
|
||||
HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR_HOSTPKG)/include -I$(STAGING_DIR)/host/include)
|
||||
HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS)
|
||||
HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR_HOSTPKG)/lib -L$(STAGING_DIR)/host/lib)
|
||||
|
||||
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
TARGET_AR:=$(TARGET_CROSS)gcc-ar
|
||||
TARGET_RANLIB:=$(TARGET_CROSS)gcc-ranlib
|
||||
TARGET_NM:=$(TARGET_CROSS)gcc-nm
|
||||
else
|
||||
TARGET_AR:=$(TARGET_CROSS)ar
|
||||
TARGET_RANLIB:=$(TARGET_CROSS)ranlib
|
||||
TARGET_NM:=$(TARGET_CROSS)nm
|
||||
endif
|
||||
|
||||
BUILD_KEY=$(TOPDIR)/key-build
|
||||
|
||||
FAKEROOT:=$(STAGING_DIR_HOST)/bin/fakeroot
|
||||
|
||||
TARGET_CC:=$(TARGET_CROSS)gcc
|
||||
TARGET_CXX:=$(TARGET_CROSS)g++
|
||||
KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh
|
||||
SED:=$(STAGING_DIR_HOST)/bin/sed -i -e
|
||||
ESED:=$(STAGING_DIR_HOST)/bin/sed -E -i -e
|
||||
CP:=cp -fpR
|
||||
LN:=ln -sf
|
||||
XARGS:=xargs -r
|
||||
|
||||
BASH:=bash
|
||||
TAR:=tar
|
||||
FIND:=find
|
||||
PATCH:=patch
|
||||
PYTHON:=python
|
||||
|
||||
INSTALL_BIN:=install -m0755
|
||||
INSTALL_SUID:=install -m4755
|
||||
INSTALL_DIR:=install -d -m0755
|
||||
INSTALL_DATA:=install -m0644
|
||||
INSTALL_CONF:=install -m0600
|
||||
|
||||
TARGET_CC_NOCACHE:=$(TARGET_CC)
|
||||
TARGET_CXX_NOCACHE:=$(TARGET_CXX)
|
||||
HOSTCC_NOCACHE:=$(HOSTCC)
|
||||
HOSTCXX_NOCACHE:=$(HOSTCXX)
|
||||
export TARGET_CC_NOCACHE
|
||||
export TARGET_CXX_NOCACHE
|
||||
export HOSTCC_NOCACHE
|
||||
export HOSTCXX_NOCACHE
|
||||
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
TARGET_CC:= ccache_cc
|
||||
TARGET_CXX:= ccache_cxx
|
||||
HOSTCC:= ccache $(HOSTCC)
|
||||
HOSTCXX:= ccache $(HOSTCXX)
|
||||
export CCACHE_BASEDIR:=$(TOPDIR)
|
||||
export CCACHE_DIR:=$(if $(call qstrip,$(CONFIG_CCACHE_DIR)),$(call qstrip,$(CONFIG_CCACHE_DIR)),$(TOPDIR)/.ccache)
|
||||
export CCACHE_COMPILERCHECK:=%compiler% -dumpmachine; %compiler% -dumpversion
|
||||
endif
|
||||
|
||||
TARGET_CONFIGURE_OPTS = \
|
||||
AR="$(TARGET_AR)" \
|
||||
AS="$(TARGET_CC) -c $(TARGET_ASFLAGS)" \
|
||||
LD=$(TARGET_CROSS)ld \
|
||||
NM="$(TARGET_NM)" \
|
||||
CC="$(TARGET_CC)" \
|
||||
GCC="$(TARGET_CC)" \
|
||||
CXX="$(TARGET_CXX)" \
|
||||
RANLIB="$(TARGET_RANLIB)" \
|
||||
STRIP=$(TARGET_CROSS)strip \
|
||||
OBJCOPY=$(TARGET_CROSS)objcopy \
|
||||
OBJDUMP=$(TARGET_CROSS)objdump \
|
||||
SIZE=$(TARGET_CROSS)size
|
||||
|
||||
# strip an entire directory
|
||||
ifneq ($(CONFIG_NO_STRIP),)
|
||||
RSTRIP:=:
|
||||
STRIP:=:
|
||||
else
|
||||
ifneq ($(CONFIG_USE_STRIP),)
|
||||
STRIP:=$(TARGET_CROSS)strip $(call qstrip,$(CONFIG_STRIP_ARGS))
|
||||
else
|
||||
ifneq ($(CONFIG_USE_SSTRIP),)
|
||||
STRIP:=$(STAGING_DIR_HOST)/bin/sstrip $(call qstrip,$(CONFIG_SSTRIP_ARGS))
|
||||
endif
|
||||
endif
|
||||
RSTRIP= \
|
||||
export CROSS="$(TARGET_CROSS)" \
|
||||
$(if $(PKG_BUILD_ID),KEEP_BUILD_ID=1) \
|
||||
$(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \
|
||||
$(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \
|
||||
NM="$(TARGET_CROSS)nm" \
|
||||
STRIP="$(STRIP)" \
|
||||
STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \
|
||||
PATCHELF="$(STAGING_DIR_HOST)/bin/patchelf" \
|
||||
$(SCRIPT_DIR)/rstrip.sh
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IPV6),y)
|
||||
DISABLE_IPV6:=
|
||||
else
|
||||
DISABLE_IPV6:=--disable-ipv6
|
||||
endif
|
||||
|
||||
TAR_OPTIONS:=-xf -
|
||||
|
||||
ifeq ($(CONFIG_BUILD_LOG),y)
|
||||
BUILD_LOG:=1
|
||||
endif
|
||||
|
||||
export BISON_PKGDATADIR:=$(STAGING_DIR_HOST)/share/bison
|
||||
export M4:=$(STAGING_DIR_HOST)/bin/m4
|
||||
|
||||
define shvar
|
||||
V_$(subst .,_,$(subst -,_,$(subst /,_,$(1))))
|
||||
endef
|
||||
|
||||
define shexport
|
||||
export $(call shvar,$(1))=$$(call $(1))
|
||||
endef
|
||||
|
||||
# Execute commands under flock
|
||||
# $(1) => The shell expression.
|
||||
# $(2) => The lock name. If not given, the global lock will be used.
|
||||
ifneq ($(wildcard $(STAGING_DIR_HOST)/bin/flock),)
|
||||
define locked
|
||||
SHELL= \
|
||||
flock \
|
||||
$(TMP_DIR)/.$(if $(2),$(strip $(2)),global).flock \
|
||||
-c '$(subst ','\'',$(1))'
|
||||
endef
|
||||
else
|
||||
locked=$(1)
|
||||
endif
|
||||
|
||||
# Recursively copy paths into another directory, purge dangling
|
||||
# symlinks before.
|
||||
# $(1) => File glob expression
|
||||
# $(2) => Destination directory
|
||||
define file_copy
|
||||
for src_dir in $(sort $(foreach d,$(wildcard $(1)),$(dir $(d)))); do \
|
||||
( cd $$src_dir; find -type f -or -type d ) | \
|
||||
( cd $(2); while :; do \
|
||||
read FILE; \
|
||||
[ -z "$$FILE" ] && break; \
|
||||
[ -L "$$FILE" ] || continue; \
|
||||
echo "Removing symlink $(2)/$$FILE"; \
|
||||
rm -f "$$FILE"; \
|
||||
done; ); \
|
||||
done; \
|
||||
$(CP) $(1) $(2)
|
||||
endef
|
||||
|
||||
# Calculate sha256sum of any plain file within a given directory
|
||||
# $(1) => Input directory
|
||||
# $(2) => If set, recurse into subdirectories
|
||||
define sha256sums
|
||||
(cd $(1); find . $(if $(2),,-maxdepth 1) -type f -not -name 'sha256sums' -printf "%P\n" | sort | \
|
||||
xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums)
|
||||
endef
|
||||
|
||||
# file extension
|
||||
ext=$(word $(words $(subst ., ,$(1))),$(subst ., ,$(1)))
|
||||
|
||||
all:
|
||||
FORCE: ;
|
||||
.PHONY: FORCE
|
||||
|
||||
check: FORCE
|
||||
@true
|
||||
|
||||
val.%:
|
||||
@$(if $(filter undefined,$(origin $*)),\
|
||||
echo "$* undefined" >&2, \
|
||||
echo '$(subst ','"'"',$($*))' \
|
||||
)
|
||||
|
||||
var.%:
|
||||
@$(if $(filter undefined,$(origin $*)),\
|
||||
echo "$* undefined" >&2, \
|
||||
echo "$*='"'$(subst ','"'\"'\"'"',$($*))'"'" \
|
||||
)
|
||||
|
||||
endif #__rules_inc
|
|
@ -1,81 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
alfa-network,ap120c-ac)
|
||||
ucidef_set_led_netdev "wan" "WAN" "amber:wan" "eth1"
|
||||
;;
|
||||
asus,rt-ac58u)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x1e"
|
||||
;;
|
||||
avm,fritzbox-4040)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" "phy1tpt"
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e"
|
||||
;;
|
||||
avm,fritzbox-7530 |\
|
||||
glinet,gl-b1300)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
|
||||
;;
|
||||
edgecore,oap100)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt"
|
||||
;;
|
||||
engenius,eap1300)
|
||||
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "yellow:wlan5g" "phy1tpt"
|
||||
ucidef_set_led_default "mesh" "MESH" "blue:mesh" "0"
|
||||
;;
|
||||
engenius,eap2200)
|
||||
ucidef_set_led_netdev "lan1" "LAN1" "blue:lan1" "eth0"
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "blue:lan2" "eth1"
|
||||
;;
|
||||
engenius,ens620ext)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy1tpt"
|
||||
ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "eth0"
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth1"
|
||||
;;
|
||||
mobipromo,cm520-79f)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "blue:lan2" "switch0" "0x08"
|
||||
;;
|
||||
pangu,l1000)
|
||||
ucidef_set_led_default "power" "POWER" "blue:power" "1"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt"
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_led_netdev "4g1" "4g1" "blue:4g1" "4g1"
|
||||
ucidef_set_led_netdev "4g2" "4g2" "blue:4g2" "4g2"
|
||||
ucidef_set_led_netdev "4g3" "4g3" "blue:4g3" "4g3"
|
||||
;;
|
||||
netgear,ex6100v2 |\
|
||||
netgear,ex6150v2)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:router" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:client" "phy1tpt"
|
||||
;;
|
||||
qxwlan,e2600ac-c1 |\
|
||||
qxwlan,e2600ac-c2)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN0" "green:wlan0" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN1" "green:wlan1" "phy1tpt"
|
||||
;;
|
||||
zyxel,nbg6617 |\
|
||||
zyxel,wre6606)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy1tpt"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2015 The Linux Foundation. All rights reserved.
|
||||
# Copyright (c) 2011-2015 OpenWrt.org
|
||||
|
@ -15,10 +16,7 @@ ipq40xx_setup_interfaces()
|
|||
8dev,jalapeno|\
|
||||
alfa-network,ap120c-ac|\
|
||||
engenius,emr3500|\
|
||||
engenius,ens620ext|\
|
||||
luma,wrtq-329acn|\
|
||||
plasmacloud,pa1200|\
|
||||
plasmacloud,pa2200)
|
||||
engenius,ens620ext)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
;;
|
||||
aruba,ap-303|\
|
||||
|
@ -40,13 +38,13 @@ ipq40xx_setup_interfaces()
|
|||
;;
|
||||
asus,map-ac2200|\
|
||||
cilab,meshpoint-one|\
|
||||
edgecore,ecw5211|\
|
||||
edgecore,oap100|\
|
||||
openmesh,a42|\
|
||||
openmesh,a62)
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
;;
|
||||
asus,rt-ac58u|\
|
||||
p2w,r619ac-128m|\
|
||||
p2w,r619ac|\
|
||||
zyxel,nbg6617)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
|
@ -54,9 +52,7 @@ ipq40xx_setup_interfaces()
|
|||
;;
|
||||
avm,fritzbox-4040|\
|
||||
linksys,ea6350v3|\
|
||||
pangu,l1000|\
|
||||
linksys,ea8300|\
|
||||
linksys,mr8300)
|
||||
linksys,ea8300)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
|
@ -65,10 +61,7 @@ ipq40xx_setup_interfaces()
|
|||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
;;
|
||||
avm,fritzrepeater-3000)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "4:lan:1" "5:lan:2"
|
||||
;;
|
||||
avm,fritzrepeater-3000|\
|
||||
compex,wpj419|\
|
||||
compex,wpj428|\
|
||||
engenius,eap2200)
|
||||
|
@ -84,15 +77,11 @@ ipq40xx_setup_interfaces()
|
|||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "3:lan" "4:lan"
|
||||
;;
|
||||
devolo,magic-2-wifi-next)
|
||||
ucidef_set_interface_lan "eth0 eth1 eth2"
|
||||
;;
|
||||
ezviz,cs-w3-wd1200g-eup)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "0u@eth1" "5:wan"
|
||||
;;
|
||||
glinet,gl-ap1300 |\
|
||||
glinet,gl-b1300 |\
|
||||
glinet,gl-s1300)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
|
@ -132,7 +121,9 @@ ipq40xx_setup_macs()
|
|||
8dev,habanero-dvk)
|
||||
label_mac=$(mtd_get_mac_binary "ART" 0x1006)
|
||||
;;
|
||||
asus,rt-ac58u)
|
||||
asus,rt-ac58u|\
|
||||
p2w,r619ac-128m|\
|
||||
p2w,r619ac)
|
||||
CI_UBIPART=UBI_DEV
|
||||
wan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
|
||||
lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
|
||||
|
@ -141,10 +132,6 @@ ipq40xx_setup_macs()
|
|||
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
|
||||
|
@ -183,4 +170,4 @@ ipq40xx_setup_interfaces $board
|
|||
ipq40xx_setup_macs $board
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
cellc,rtl30vw)
|
||||
ucidef_add_gpio_switch "w_disable" "W_DISABLE mPCIE pin" "398" "1"
|
||||
ucidef_add_gpio_switch "pmd_resin_n" "PMD_RESIN_N pin" "399" "1"
|
||||
ucidef_add_gpio_switch "mcpie_vcc" "LTE power" "400" "0"
|
||||
ucidef_add_gpio_switch "usb_vcc" "USB power" "401" "0"
|
||||
;;
|
||||
cilab,meshpoint-one)
|
||||
ucidef_add_gpio_switch "poe_passtrough" "POE passtrough enable" "413" "1"
|
||||
;;
|
||||
compex,wpj428)
|
||||
ucidef_add_gpio_switch "sim_card_select" "SIM card select" "3" "0"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
46
root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
Executable file → Normal file
46
root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
Executable file → Normal file
|
@ -36,12 +36,10 @@ case "$FIRMWARE" in
|
|||
ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x32)
|
||||
;;
|
||||
engenius,eap2200 |\
|
||||
openmesh,a62 |\
|
||||
plasmacloud,pa2200)
|
||||
openmesh,a62)
|
||||
caldata_extract "0:ART" 0x9000 0x2f20
|
||||
;;
|
||||
linksys,ea8300 |\
|
||||
linksys,mr8300)
|
||||
linksys,ea8300)
|
||||
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))
|
||||
|
@ -55,11 +53,12 @@ case "$FIRMWARE" in
|
|||
alfa-network,ap120c-ac |\
|
||||
cilab,meshpoint-one |\
|
||||
ezviz,cs-w3-wd1200g-eup |\
|
||||
glinet,gl-ap1300 |\
|
||||
glinet,gl-b1300 |\
|
||||
glinet,gl-s1300 |\
|
||||
linksys,ea6350v3 |\
|
||||
mobipromo,cm520-79f |\
|
||||
p2w,r619ac-128m |\
|
||||
p2w,r619ac |\
|
||||
qcom,ap-dk01.1-c1)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
;;
|
||||
|
@ -96,24 +95,15 @@ case "$FIRMWARE" in
|
|||
cellc,rtl30vw |\
|
||||
compex,wpj419 |\
|
||||
compex,wpj428 |\
|
||||
edgecore,ecw5211 |\
|
||||
edgecore,oap100 |\
|
||||
engenius,eap1300 |\
|
||||
engenius,eap2200 |\
|
||||
luma,wrtq-329acn|\
|
||||
openmesh,a42 |\
|
||||
openmesh,a62 |\
|
||||
plasmacloud,pa1200 |\
|
||||
plasmacloud,pa2200 |\
|
||||
qxwlan,e2600ac-c1 |\
|
||||
qxwlan,e2600ac-c2 |\
|
||||
unielec,u4019-32m)
|
||||
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)
|
||||
|
@ -130,12 +120,7 @@ case "$FIRMWARE" in
|
|||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2)
|
||||
;;
|
||||
linksys,ea8300 |\
|
||||
linksys,mr8300)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
|
||||
;;
|
||||
pangu,l1000)
|
||||
linksys,ea8300)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
|
||||
;;
|
||||
|
@ -163,11 +148,12 @@ case "$FIRMWARE" in
|
|||
alfa-network,ap120c-ac |\
|
||||
cilab,meshpoint-one |\
|
||||
ezviz,cs-w3-wd1200g-eup |\
|
||||
glinet,gl-ap1300 |\
|
||||
glinet,gl-b1300 |\
|
||||
glinet,gl-s1300 |\
|
||||
linksys,ea6350v3 |\
|
||||
mobipromo,cm520-79f |\
|
||||
p2w,r619ac-128m |\
|
||||
p2w,r619ac |\
|
||||
qcom,ap-dk01.1-c1)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
;;
|
||||
|
@ -204,24 +190,15 @@ case "$FIRMWARE" in
|
|||
cellc,rtl30vw |\
|
||||
compex,wpj419 |\
|
||||
compex,wpj428 |\
|
||||
edgecore,ecw5211 |\
|
||||
edgecore,oap100 |\
|
||||
engenius,eap1300 |\
|
||||
engenius,eap2200 |\
|
||||
luma,wrtq-329acn|\
|
||||
openmesh,a42 |\
|
||||
openmesh,a62 |\
|
||||
plasmacloud,pa1200 |\
|
||||
plasmacloud,pa2200 |\
|
||||
qxwlan,e2600ac-c1 |\
|
||||
qxwlan,e2600ac-c2 |\
|
||||
unielec,u4019-32m)
|
||||
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)
|
||||
|
@ -238,12 +215,7 @@ case "$FIRMWARE" in
|
|||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +3)
|
||||
;;
|
||||
linksys,ea8300 |\
|
||||
linksys,mr8300)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
|
||||
;;
|
||||
pangu,l1000)
|
||||
linksys,ea8300)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
|
||||
;;
|
||||
|
@ -267,4 +239,4 @@ case "$FIRMWARE" in
|
|||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
|
|
@ -1,205 +0,0 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
|
||||
START=99
|
||||
STOP=98
|
||||
|
||||
rps_flow_cnt=4096
|
||||
core_count=$(grep -c processor /proc/cpuinfo)
|
||||
rps_sock_flow_ent=`expr $core_count \* $rps_flow_cnt`
|
||||
queue_cores="0 1 2"
|
||||
queue_irq_cores="1 2"
|
||||
wifi_core="3"
|
||||
usb_core="0"
|
||||
|
||||
############### util functions ###############
|
||||
|
||||
to_hex_list() {
|
||||
local cores=$1
|
||||
local converted=""
|
||||
for core in $(echo $cores | awk '{print}')
|
||||
do
|
||||
local hex="$(gen_hex_mask "$core")"
|
||||
converted="$converted $hex"
|
||||
done
|
||||
echo `echo $converted | sed 's/^ *//'`
|
||||
}
|
||||
|
||||
gen_hex_mask() {
|
||||
local cores=$1
|
||||
local mask=0
|
||||
for core in $(echo $cores | awk '{print}')
|
||||
do
|
||||
local bit="$((1 << $core))"
|
||||
let "mask = mask + bit"
|
||||
done
|
||||
local hex="$(printf %x "$mask")"
|
||||
echo "$hex"
|
||||
}
|
||||
|
||||
val_at_index() {
|
||||
local values=$1
|
||||
local idx=$2
|
||||
echo `echo $values | awk -v i=$idx '{print $i}'`
|
||||
}
|
||||
|
||||
size_of_list() {
|
||||
local list=$1
|
||||
local spaces=`echo $list | grep -o ' ' | wc -l`
|
||||
echo `expr $spaces + 1`
|
||||
}
|
||||
|
||||
set_core_mask() {
|
||||
local file=$1
|
||||
local cores=$2
|
||||
local mask="$(gen_hex_mask "$cores")"
|
||||
echo $mask > $file
|
||||
}
|
||||
|
||||
set_core_mask_round() {
|
||||
local files=$1
|
||||
local cores=$2
|
||||
local step_size=$3
|
||||
[ ! -n "$3" ] && step_size=1
|
||||
|
||||
local core_count="$(size_of_list "$cores")"
|
||||
local counter=0
|
||||
local idx=1
|
||||
local roof=`expr $core_count \* $step_size`
|
||||
for file in $(echo $files | awk '{print}')
|
||||
do
|
||||
let "idx = counter / step_size + 1"
|
||||
local core="$(val_at_index "$cores" $idx)"
|
||||
set_core_mask $file $core
|
||||
let "counter = counter + 1"
|
||||
[ $counter -ge $roof ] && counter=0
|
||||
done
|
||||
}
|
||||
|
||||
############### assign network queues ###############
|
||||
|
||||
set_interface_round() {
|
||||
local interface=$1
|
||||
local cores=$2
|
||||
local step_size=$3
|
||||
[ ! -n "$3" ] && step_size=1
|
||||
|
||||
echo "using round mask for interface: $interface, step size: $step_size"
|
||||
set_core_mask_round "$(ls /sys/class/net/$interface/queues/tx-*/xps_cpus)" "$cores" $step_size
|
||||
set_core_mask_round "$(ls /sys/class/net/$interface/queues/rx-*/rps_cpus)" "$cores" $step_size
|
||||
|
||||
for file in /sys/class/net/$interface/queues/rx-[0-9]*/rps_flow_cnt
|
||||
do
|
||||
echo $rps_flow_cnt > $file
|
||||
done
|
||||
}
|
||||
|
||||
set_interface() {
|
||||
local interface=$1
|
||||
local cores=$2
|
||||
|
||||
echo "using cores: $cores for interface: $interface"
|
||||
|
||||
for file in /sys/class/net/$interface/queues/rx-[0-9]*/rps_cpus
|
||||
do
|
||||
set_core_mask $file "$cores"
|
||||
echo $rps_flow_cnt > `dirname $file`/rps_flow_cnt
|
||||
done
|
||||
|
||||
for file in /sys/class/net/$interface/queues/tx-[0-9]*/xps_cpus
|
||||
do
|
||||
set_core_mask $file "$cores"
|
||||
done
|
||||
}
|
||||
|
||||
set_interface_queues() {
|
||||
echo "using cpu: $queue_cores for network queues"
|
||||
for dev in /sys/class/net/eth*
|
||||
do
|
||||
[ -d "$dev" ] || continue
|
||||
|
||||
local interface=`basename $dev`
|
||||
|
||||
set_interface $interface "$queue_cores"
|
||||
done
|
||||
|
||||
for dev in /sys/class/net/wlan*
|
||||
do
|
||||
[ -d "$dev" ] || continue
|
||||
|
||||
local interface=`basename $dev`
|
||||
|
||||
set_interface $interface "$queue_cores"
|
||||
done
|
||||
|
||||
for dev in /sys/class/net/eth*
|
||||
do
|
||||
local eth=`basename $dev`
|
||||
echo "enabling offload on $eth"
|
||||
ethtool -K $eth rx-checksum on >/dev/null 2>&1
|
||||
ethtool -K $eth tx-checksum-ip-generic on >/dev/null 2>&1 || (
|
||||
ethtool -K $eth tx-checksum-ipv4 on >/dev/null 2>&1
|
||||
ethtool -K $eth tx-checksum-ipv6 on >/dev/null 2>&1)
|
||||
ethtool -K $eth tx-scatter-gather on >/dev/null 2>&1
|
||||
ethtool -K $eth gso on >/dev/null 2>&1
|
||||
ethtool -K $eth gro on >/dev/null 2>&1
|
||||
ethtool -K $eth lro on >/dev/null 2>&1
|
||||
ethtool -K $eth tso on >/dev/null 2>&1
|
||||
ethtool -K $eth ufo on >/dev/null 2>&1
|
||||
done
|
||||
|
||||
echo $rps_sock_flow_ent > /proc/sys/net/core/rps_sock_flow_entries
|
||||
sysctl -w net.core.rps_sock_flow_entries=$rps_sock_flow_ent
|
||||
}
|
||||
|
||||
############### assign interrupts ###############
|
||||
set_irq_cores() {
|
||||
local mask="$(gen_hex_mask "$2")"
|
||||
echo "set mask $mask for irq: $1"
|
||||
echo $mask > "/proc/irq/$1/smp_affinity"
|
||||
}
|
||||
|
||||
set_irq_pattern() {
|
||||
local name_pattern="$1"
|
||||
local cores="$2"
|
||||
|
||||
for irq in `grep "$name_pattern" /proc/interrupts | cut -d: -f1 | sed 's, *,,'`
|
||||
do
|
||||
set_irq_cores $irq "$cores"
|
||||
done
|
||||
}
|
||||
|
||||
set_irq_interleave() {
|
||||
local name_pattern=$1
|
||||
local cores=$2
|
||||
local step_size=$3
|
||||
|
||||
local files=""
|
||||
for irq in `grep "$name_pattern" /proc/interrupts | cut -d: -f1 | sed 's, *,,'`
|
||||
do
|
||||
files="$files\
|
||||
/proc/irq/$irq/smp_affinity"
|
||||
done
|
||||
|
||||
set_core_mask_round "$files" "$cores" "$step_size"
|
||||
}
|
||||
|
||||
set_irqs() {
|
||||
#dma
|
||||
set_irq_pattern bam_dma "$usb_core"
|
||||
|
||||
#ethernet
|
||||
set_irq_interleave eth_tx "$queue_irq_cores" 4
|
||||
set_irq_interleave eth_rx "$queue_irq_cores" 1
|
||||
|
||||
#pcie
|
||||
set_irq_pattern pcie "$wifi_core"
|
||||
|
||||
#usb
|
||||
set_irq_pattern usb "$usb_core"
|
||||
}
|
||||
|
||||
start() {
|
||||
set_interface_queues
|
||||
set_irqs
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
#!/bin/sh
|
||||
# this scripts is used for adjust cpu's choice of interrupts.
|
||||
#
|
||||
|
||||
################################################
|
||||
# Adjust smp_affinity of edma
|
||||
# Globals:
|
||||
# None
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
# Remark:
|
||||
# execute only once on start-up.
|
||||
################################################
|
||||
adjust_edma_smp_affinity() {
|
||||
grep -q edma_eth_ /proc/interrupts || return 0
|
||||
local nr=`cat /proc/cpuinfo | grep processor | wc -l`
|
||||
local cpu=0
|
||||
local tx_irq_num
|
||||
|
||||
for tx_num in `seq 0 1 15` ; do
|
||||
cpu=`printf "%x" $((1<<((tx_num/4+3)%nr)))`
|
||||
tx_irq_num=`grep -m1 edma_eth_tx$tx_num /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$tx_irq_num" ] && echo $cpu > /proc/irq/$tx_irq_num/smp_affinity
|
||||
done
|
||||
|
||||
for rx_num in `seq 0 1 7` ; do
|
||||
cpu=`printf "%x" $((1<<((rx_num/2)%nr)))`
|
||||
rx_irq_num=`grep -m1 edma_eth_rx$rx_num /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$rx_irq_num" ] && echo $cpu > /proc/irq/$rx_irq_num/smp_affinity
|
||||
done
|
||||
}
|
||||
|
||||
################################################
|
||||
# Adjust smp_affinity of ath10k for 2G and 5G
|
||||
# Globals:
|
||||
# None
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
# Remark:
|
||||
# execute only once on start-up.
|
||||
################################################
|
||||
adjust_radio_smp_affinity() {
|
||||
local irqs="`grep -E 'ath10k' /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`"
|
||||
local nr=`cat /proc/cpuinfo | grep processor | wc -l`
|
||||
local idx=2
|
||||
|
||||
for irq in $irqs; do
|
||||
cpu=`printf "%x" $((1<<((idx)%nr)))`
|
||||
echo $cpu > /proc/irq/$irq/smp_affinity
|
||||
idx=$((idx+1))
|
||||
done
|
||||
}
|
||||
|
||||
################################################
|
||||
# Adjust queue of eth
|
||||
# Globals:
|
||||
# None
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
# Remark:
|
||||
# Each network reboot needs to be executed.
|
||||
################################################
|
||||
adjust_eth_queue() {
|
||||
local nr=`cat /proc/cpuinfo | grep processor | wc -l`
|
||||
local cpu=`printf "%x" $(((1<<nr)-1))`
|
||||
|
||||
for epath in /sys/class/net/eth[0-9]*; do
|
||||
test -e $epath || break
|
||||
echo $epath | grep -q "\." && continue
|
||||
eth=`basename $epath`
|
||||
for exps in /sys/class/net/$eth/queues/rx-[0-9]*/rps_cpus; do
|
||||
test -e $exps || break
|
||||
echo $cpu > $exps
|
||||
echo 256 > `dirname $exps`/rps_flow_cnt
|
||||
done
|
||||
which ethtool >/dev/null 2>&1 && ethtool -K $eth gro off
|
||||
done
|
||||
|
||||
echo 1024 > /proc/sys/net/core/rps_sock_flow_entries
|
||||
}
|
|
@ -1,122 +0,0 @@
|
|||
linksys_get_target_firmware() {
|
||||
local cur_boot_part mtd_ubi0
|
||||
|
||||
cur_boot_part="$(/usr/sbin/fw_printenv -n boot_part)"
|
||||
if [ -z "${cur_boot_part}" ]; then
|
||||
mtd_ubi0=$(cat /sys/devices/virtual/ubi/ubi0/mtd_num)
|
||||
case "$(grep -E "^mtd${mtd_ubi0}:" /proc/mtd | cut -d '"' -f 2)" in
|
||||
kernel|rootfs)
|
||||
cur_boot_part=1
|
||||
;;
|
||||
alt_kernel|alt_rootfs)
|
||||
cur_boot_part=2
|
||||
;;
|
||||
esac
|
||||
>&2 printf "Current boot_part='%s' selected from ubi0/mtd_num='%s'" \
|
||||
"${cur_boot_part}" "${mtd_ubi0}"
|
||||
fi
|
||||
|
||||
# OEM U-Boot for EA6350v3, EA8300 and MR8300; bootcmd=
|
||||
# if test $auto_recovery = no;
|
||||
# then bootipq;
|
||||
# elif test $boot_part = 1;
|
||||
# then run bootpart1;
|
||||
# else run bootpart2;
|
||||
# fi
|
||||
|
||||
case "$cur_boot_part" in
|
||||
1)
|
||||
fw_setenv -s - <<-EOF
|
||||
boot_part 2
|
||||
auto_recovery yes
|
||||
EOF
|
||||
printf "alt_kernel"
|
||||
return
|
||||
;;
|
||||
2)
|
||||
fw_setenv -s - <<-EOF
|
||||
boot_part 1
|
||||
auto_recovery yes
|
||||
EOF
|
||||
printf "kernel"
|
||||
return
|
||||
;;
|
||||
*)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
linksys_get_root_magic() {
|
||||
(get_image "$@" | dd skip=786432 bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2>/dev/null
|
||||
}
|
||||
|
||||
platform_do_upgrade_linksys() {
|
||||
local magic_long="$(get_magic_long "$1")"
|
||||
|
||||
local rm_oem_fw_vols="squashfs ubifs" # from OEM [alt_]rootfs UBI
|
||||
local vol
|
||||
|
||||
mkdir -p /var/lock
|
||||
local part_label="$(linksys_get_target_firmware)"
|
||||
touch /var/lock/fw_printenv.lock
|
||||
|
||||
if [ -z "$part_label" ]; then
|
||||
echo "cannot find target partition"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local target_mtd=$(find_mtd_part "$part_label")
|
||||
|
||||
[ "$magic_long" = "73797375" ] && {
|
||||
CI_KERNPART="$part_label"
|
||||
if [ "$part_label" = "kernel" ]; then
|
||||
CI_UBIPART="rootfs"
|
||||
else
|
||||
CI_UBIPART="alt_rootfs"
|
||||
fi
|
||||
|
||||
local mtdnum="$(find_mtd_index "$CI_UBIPART")"
|
||||
if [ ! "$mtdnum" ]; then
|
||||
echo "cannot find ubi mtd partition $CI_UBIPART"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local ubidev="$(nand_find_ubi "$CI_UBIPART")"
|
||||
if [ ! "$ubidev" ]; then
|
||||
ubiattach -m "$mtdnum"
|
||||
sync
|
||||
ubidev="$(nand_find_ubi "$CI_UBIPART")"
|
||||
fi
|
||||
|
||||
if [ "$ubidev" ]; then
|
||||
for vol in $rm_oem_fw_vols; do
|
||||
ubirmvol "/dev/$ubidev" -N "$vol" 2>/dev/null
|
||||
done
|
||||
fi
|
||||
|
||||
# complete std upgrade
|
||||
nand_upgrade_tar "$1"
|
||||
}
|
||||
|
||||
[ "$magic_long" = "27051956" ] && {
|
||||
# This magic is for a uImage (which is a sysupgrade image)
|
||||
# check firmwares' rootfs types
|
||||
local oldroot="$(linksys_get_root_magic "$target_mtd")"
|
||||
local newroot="$(linksys_get_root_magic "$1")"
|
||||
|
||||
if [ "$newroot" = "55424923" ] && [ "$oldroot" = "55424923" ]; then
|
||||
# we're upgrading from a firmware with UBI to one with UBI
|
||||
# erase everything to be safe
|
||||
# - Is that really needed? Won't remove (or comment) the if,
|
||||
# because it may be needed in a future device.
|
||||
#mtd erase $part_label
|
||||
#get_image "$1" | mtd -n write - $part_label
|
||||
echo "writing \"$1\" UBI image to \"$part_label\" (UBI)..."
|
||||
get_image "$1" | mtd write - "$part_label"
|
||||
else
|
||||
echo "writing \"$1\" image to \"$part_label\""
|
||||
get_image "$1" | mtd write - "$part_label"
|
||||
fi
|
||||
}
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
# 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_openmesh() {
|
||||
local tar_file="$1"
|
||||
local restore_backup
|
||||
local primary_kernel_mtd
|
||||
|
||||
local setenv_script="/tmp/fw_env_upgrade"
|
||||
|
||||
local kernel_mtd="$(find_mtd_index $PART_NAME)"
|
||||
local kernel_offset="$(cat /sys/class/mtd/mtd${kernel_mtd}/offset)"
|
||||
local total_size="$(cat /sys/class/mtd/mtd${kernel_mtd}/size)"
|
||||
|
||||
# detect to which flash region the new image is written to.
|
||||
#
|
||||
# 1. check what is the mtd index for the first flash region on this
|
||||
# device
|
||||
# 2. check if the target partition ("inactive") has the mtd index of
|
||||
# the first flash region
|
||||
#
|
||||
# - when it is: the new bootseq will be 1,2 and the first region is
|
||||
# modified
|
||||
# - when it isnt: bootseq will be 2,1 and the second region is
|
||||
# modified
|
||||
#
|
||||
# The detection has to be done via the hardcoded mtd partition because
|
||||
# the current boot might be done with the fallback region. Let us
|
||||
# assume that the current bootseq is 1,2. The bootloader detected that
|
||||
# the image in flash region 1 is corrupt and thus switches to flash
|
||||
# region 2. The bootseq in the u-boot-env is now still the same and
|
||||
# the sysupgrade code can now only rely on the actual mtd indexes and
|
||||
# not the bootseq variable to detect the currently booted flash
|
||||
# region/image.
|
||||
#
|
||||
# In the above example, an implementation which uses bootseq ("1,2") to
|
||||
# detect the currently booted image would assume that region 1 is booted
|
||||
# and then overwrite the variables for the wrong flash region (aka the
|
||||
# one which isn't modified). This could result in a device which doesn't
|
||||
# boot anymore to Linux until it was reflashed with ap51-flash.
|
||||
local next_boot_part="1"
|
||||
case "$(board_name)" in
|
||||
openmesh,a42)
|
||||
primary_kernel_mtd=8
|
||||
;;
|
||||
openmesh,a62)
|
||||
primary_kernel_mtd=10
|
||||
;;
|
||||
*)
|
||||
echo "failed to detect primary kernel mtd partition for board"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
[ "$kernel_mtd" = "$primary_kernel_mtd" ] || next_boot_part="2"
|
||||
|
||||
local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
|
||||
board_dir=${board_dir%/}
|
||||
|
||||
local kernel_length=$(tar xf $tar_file ${board_dir}/kernel -O | wc -c)
|
||||
local rootfs_length=$(tar xf $tar_file ${board_dir}/root -O | wc -c)
|
||||
# rootfs without EOF marker
|
||||
rootfs_length=$((rootfs_length-4))
|
||||
|
||||
local kernel_md5=$(tar xf $tar_file ${board_dir}/kernel -O | md5sum); kernel_md5="${kernel_md5%% *}"
|
||||
# md5 checksum of rootfs with EOF marker
|
||||
local rootfs_md5=$(tar xf $tar_file ${board_dir}/root -O | dd bs=1 count=$rootfs_length | md5sum); rootfs_md5="${rootfs_md5%% *}"
|
||||
|
||||
#
|
||||
# add tar support to get_image() to use default_do_upgrade() instead?
|
||||
#
|
||||
|
||||
# take care of restoring a saved config
|
||||
[ -n "$UPGRADE_BACKUP" ] && restore_backup="${MTD_CONFIG_ARGS} -j ${UPGRADE_BACKUP}"
|
||||
|
||||
mtd -q erase inactive
|
||||
tar xf $tar_file ${board_dir}/root -O | mtd -n -p $kernel_length $restore_backup write - $PART_NAME
|
||||
tar xf $tar_file ${board_dir}/kernel -O | mtd -n write - $PART_NAME
|
||||
|
||||
# prepare new u-boot env
|
||||
if [ "$next_boot_part" = "1" ]; then
|
||||
echo "bootseq 1,2" > $setenv_script
|
||||
else
|
||||
echo "bootseq 2,1" > $setenv_script
|
||||
fi
|
||||
|
||||
printf "kernel_size_%i 0x%08x\n" $next_boot_part $kernel_length >> $setenv_script
|
||||
printf "vmlinux_start_addr 0x%08x\n" ${kernel_offset} >> $setenv_script
|
||||
printf "vmlinux_size 0x%08x\n" ${kernel_length} >> $setenv_script
|
||||
printf "vmlinux_checksum %s\n" ${kernel_md5} >> $setenv_script
|
||||
|
||||
printf "rootfs_size_%i 0x%08x\n" $next_boot_part $((total_size-kernel_length)) >> $setenv_script
|
||||
printf "rootfs_start_addr 0x%08x\n" $((kernel_offset+kernel_length)) >> $setenv_script
|
||||
printf "rootfs_size 0x%08x\n" ${rootfs_length} >> $setenv_script
|
||||
printf "rootfs_checksum %s\n" ${rootfs_md5} >> $setenv_script
|
||||
|
||||
# store u-boot env changes
|
||||
mkdir -p /var/lock
|
||||
fw_setenv -s $setenv_script || {
|
||||
echo "failed to update U-Boot environment"
|
||||
return 1
|
||||
}
|
||||
}
|
22
root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
Executable file → Normal file
22
root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
Executable file → Normal file
|
@ -59,7 +59,6 @@ platform_do_upgrade() {
|
|||
case "$(board_name)" in
|
||||
8dev,jalapeno |\
|
||||
aruba,ap-303 |\
|
||||
pangu,l1000 |\
|
||||
aruba,ap-303h |\
|
||||
aruba,ap-365 |\
|
||||
avm,fritzbox-7530 |\
|
||||
|
@ -67,14 +66,8 @@ platform_do_upgrade() {
|
|||
avm,fritzrepeater-3000 |\
|
||||
buffalo,wtr-m2133hp |\
|
||||
cilab,meshpoint-one |\
|
||||
edgecore,ecw5211 |\
|
||||
edgecore,oap100 |\
|
||||
engenius,eap2200 |\
|
||||
glinet,gl-ap1300 |\
|
||||
luma,wrtq-329acn |\
|
||||
mobipromo,cm520-79f |\
|
||||
p2w,r619ac-64m |\
|
||||
p2w,r619ac-128m |\
|
||||
qxwlan,e2600ac-c2)
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
|
@ -102,12 +95,13 @@ platform_do_upgrade() {
|
|||
CI_UBIPART="ubifs"
|
||||
askey_do_upgrade "$1"
|
||||
;;
|
||||
compex,wpj419)
|
||||
compex,wpj419|\
|
||||
p2w,r619ac-128m|\
|
||||
p2w,r619ac)
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
linksys,ea6350v3 |\
|
||||
linksys,ea8300 |\
|
||||
linksys,mr8300)
|
||||
linksys,ea8300)
|
||||
platform_do_upgrade_linksys "$1"
|
||||
;;
|
||||
meraki,mr33)
|
||||
|
@ -115,11 +109,9 @@ platform_do_upgrade() {
|
|||
nand_do_upgrade "$1"
|
||||
;;
|
||||
openmesh,a42 |\
|
||||
openmesh,a62 |\
|
||||
plasmacloud,pa1200 |\
|
||||
plasmacloud,pa2200)
|
||||
openmesh,a62)
|
||||
PART_NAME="inactive"
|
||||
platform_do_upgrade_dualboot_datachk "$1"
|
||||
platform_do_upgrade_openmesh "$1"
|
||||
;;
|
||||
zyxel,nbg6617)
|
||||
zyxel_do_upgrade "$1"
|
||||
|
@ -128,4 +120,4 @@ platform_do_upgrade() {
|
|||
default_do_upgrade "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq4019-r619ac.dtsi"
|
||||
|
||||
/ {
|
||||
model = "P&W R619AC 128M";
|
||||
compatible = "p2w,r619ac-128m";
|
||||
|
||||
chosen {
|
||||
bootargs-append = " root=/dev/ubiblock0_1 rootfstype=squashfs";
|
||||
};
|
||||
};
|
||||
|
||||
&rootfs_part1 {
|
||||
reg = <0x0 0x8000000>;
|
||||
};
|
||||
|
||||
/delete-node/ &rootfs_part2;
|
|
@ -0,0 +1,12 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq4019-r619ac.dtsi"
|
||||
|
||||
/ {
|
||||
model = "P&W R619AC";
|
||||
compatible = "p2w,r619ac";
|
||||
|
||||
chosen {
|
||||
bootargs-append = " root=/dev/ubiblock0_1 rootfstype=squashfs";
|
||||
};
|
||||
};
|
|
@ -1,8 +1,4 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
*
|
||||
* Copyright (c) 2018 Peng Zhang <sd20@qxwlan.com>
|
||||
*
|
||||
*/
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq4019.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
@ -10,26 +6,12 @@
|
|||
#include <dt-bindings/soc/qcom,tcsr.h>
|
||||
|
||||
/ {
|
||||
|
||||
model = "GZ841902_55860.com";
|
||||
compatible = "pangu,l1000", "qcom,ipq4019";
|
||||
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x20000000>; /* 512MB */
|
||||
};
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhci;
|
||||
led-boot = &power;
|
||||
led-failsafe = &power;
|
||||
led-running = &power;
|
||||
led-upgrade = &power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs-append = " root=/dev/ubiblock0_1 rootfstype=squashfs";
|
||||
aliases {
|
||||
led-boot = &led_sys;
|
||||
led-failsafe = &led_sys;
|
||||
led-running = &led_sys;
|
||||
led-upgrade = &led_sys;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
soc {
|
||||
|
@ -41,8 +23,6 @@
|
|||
status = "okay";
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
pinctrl-names = "default";
|
||||
reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
|
||||
reset-delay-us = <2000>;
|
||||
};
|
||||
|
||||
ess-psgmii@98000 {
|
||||
|
@ -56,11 +36,9 @@
|
|||
};
|
||||
|
||||
tcsr@194b000 {
|
||||
/* select hostmode */
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x194b000 0x100>;
|
||||
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ess_tcsr@1953000 {
|
||||
|
@ -93,15 +71,6 @@
|
|||
|
||||
ess-switch@c000000 {
|
||||
status = "okay";
|
||||
switch_lan_bmp = <0x18>;
|
||||
switch_wan_bmp = <0x20>;
|
||||
};
|
||||
|
||||
i2c@78b7000 { /* BLSP1 QUP2 */
|
||||
pinctrl-0 = <&i2c_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
edma@c080000 {
|
||||
|
@ -109,6 +78,29 @@
|
|||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_sys: sys {
|
||||
label = "r619ac:blue:sys";
|
||||
gpios = <&tlmm 39 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "r619ac:blue:wlan2g";
|
||||
gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
wlan5g {
|
||||
label = "r619ac:blue:wlan5g";
|
||||
gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
|
@ -118,79 +110,18 @@
|
|||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
power: status {
|
||||
label = "blue:status";
|
||||
gpios = <&tlmm 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "blue:wlan2g";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan5g {
|
||||
label = "bule:wlan5g";
|
||||
gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan {
|
||||
label = "bule:wan";
|
||||
gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
4g1 {
|
||||
label = "bule:4g1";
|
||||
gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
4g2 {
|
||||
label = "bule:4g2";
|
||||
gpios = <&tlmm 45 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
4g3 {
|
||||
label = "bule:4g3";
|
||||
gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
usb {
|
||||
label = "bule:usb";
|
||||
gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
|
||||
trigger-sources = <&usb2>, <&usb3>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&vqmmc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&sd_pins>;
|
||||
pinctrl-names = "default";
|
||||
cd-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
|
||||
vqmmc-supply = <&vqmmc>;
|
||||
};
|
||||
|
||||
&blsp_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cryptobam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp1_spi1 {
|
||||
pinctrl-0 = <&spi_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
compatible = "jedec,spi-nor";
|
||||
spi-max-frequency = <24000000>;
|
||||
|
||||
partitions {
|
||||
|
@ -198,57 +129,80 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
SBL1@0 {
|
||||
partition@0 {
|
||||
label = "SBL1";
|
||||
reg = <0x0 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
MIBIB@40000 {
|
||||
partition@40000 {
|
||||
label = "MIBIB";
|
||||
reg = <0x40000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
QSEE@60000 {
|
||||
partition@60000 {
|
||||
label = "QSEE";
|
||||
reg = <0x60000 0x60000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
CDT@c0000 {
|
||||
partition@c0000 {
|
||||
label = "CDT";
|
||||
reg = <0xc0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
DDRPARAMS@d0000 {
|
||||
partition@d0000 {
|
||||
label = "DDRPARAMS";
|
||||
reg = <0xd0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
APPSBLENV@e0000 {
|
||||
partition@e0000 {
|
||||
label = "APPSBLENV";
|
||||
reg = <0xe0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
APPSBL@f0000 {
|
||||
partition@f0000 {
|
||||
label = "APPSBL";
|
||||
reg = <0xf0000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
ART@170000 {
|
||||
partition@1 {
|
||||
label = "Bootloader";
|
||||
reg = <0x0 0x170000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@170000 {
|
||||
label = "ART";
|
||||
reg = <0x170000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@180000 {
|
||||
label = "unused";
|
||||
reg = <0x180000 0xe80000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
&blsp1_uart1 {
|
||||
pinctrl-0 = <&serial_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cryptobam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
nand@0 {
|
||||
partitions {
|
||||
|
@ -256,9 +210,14 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
rootfs@0 {
|
||||
rootfs_part1: partition@0 {
|
||||
label = "rootfs";
|
||||
reg = <0x0 0x8000000>;
|
||||
reg = <0x0 0x4000000>;
|
||||
};
|
||||
|
||||
rootfs_part2: partition@4000000 {
|
||||
label = "unused1";
|
||||
reg = <0x4000000 0x4000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -268,33 +227,21 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
pinctrl-0 = <&serial_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp1_uart2 {
|
||||
pinctrl-0 = <&serial_1_pins>;
|
||||
&sdhci {
|
||||
pinctrl-0 = <&sd_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
vqmmc-supply = <&vqmmc>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
serial_pins: serial_pinmux {
|
||||
mux {
|
||||
pins = "gpio16", "gpio17";
|
||||
function = "blsp_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_1 {
|
||||
pins = "gpio6";
|
||||
function = "mdio";
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
mux_2 {
|
||||
pins = "gpio7";
|
||||
function = "mdc";
|
||||
|
@ -302,88 +249,53 @@
|
|||
};
|
||||
};
|
||||
|
||||
serial_1_pins: serial1_pinmux {
|
||||
mux {
|
||||
pins = "gpio8", "gpio9",
|
||||
"gpio10", "gpio11";
|
||||
function = "blsp_uart1";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
i2c_0_pins: i2c-0-pinmux {
|
||||
mux {
|
||||
pins = "gpio20", "gpio21";
|
||||
function = "blsp_i2c0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
spi_0_pins: spi_0_pinmux {
|
||||
pinmux {
|
||||
function = "blsp_spi0";
|
||||
pins = "gpio13", "gpio14", "gpio15";
|
||||
};
|
||||
pinmux_cs {
|
||||
function = "gpio";
|
||||
pins = "gpio12";
|
||||
};
|
||||
pinconf {
|
||||
pins = "gpio13", "gpio14", "gpio15";
|
||||
drive-strength = <12>;
|
||||
bias-disable;
|
||||
};
|
||||
pinconf_cs {
|
||||
pins = "gpio12";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
nand_pins: nand_pins {
|
||||
pullups {
|
||||
pins = "gpio52", "gpio53", "gpio58",
|
||||
"gpio59";
|
||||
function = "qpic";
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
pulldowns {
|
||||
pins = "gpio54", "gpio55", "gpio56",
|
||||
"gpio57", "gpio60", "gpio61",
|
||||
"gpio62", "gpio63", "gpio64",
|
||||
"gpio65", "gpio66", "gpio67",
|
||||
"gpio68", "gpio69";
|
||||
function = "qpic";
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
sd_pins: sd_pins {
|
||||
pinmux {
|
||||
sd_0_pins: sd_0_pinmux {
|
||||
mux_1 {
|
||||
pins = "gpio23", "gpio24", "gpio25", "gpio26", "gpio28";
|
||||
function = "sdio";
|
||||
pins = "gpio23", "gpio24", "gpio25", "gpio26",
|
||||
"gpio28", "gpio29", "gpio30", "gpio31";
|
||||
drive-strength = <10>;
|
||||
};
|
||||
|
||||
pinmux_sd_clk {
|
||||
function = "sdio";
|
||||
mux_2 {
|
||||
pins = "gpio27";
|
||||
function = "sdio";
|
||||
drive-strength = <16>;
|
||||
};
|
||||
};
|
||||
|
||||
pinmux_sd7 {
|
||||
function = "sdio";
|
||||
pins = "gpio32";
|
||||
drive-strength = <10>;
|
||||
serial_0_pins: serial0-pinmux {
|
||||
mux {
|
||||
pins = "gpio16", "gpio17";
|
||||
function = "blsp_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pinmux {
|
||||
mux {
|
||||
pins = "gpio32", "gpio39", "gpio50";
|
||||
function = "gpio";
|
||||
bias-pull-up;
|
||||
output-low;
|
||||
};
|
||||
|
||||
mux_1 {
|
||||
pins = "gpio52";
|
||||
function = "gpio";
|
||||
bias-pull-up;
|
||||
output-high;
|
||||
};
|
||||
|
||||
mux_2 {
|
||||
pins = "gpio61";
|
||||
function = "gpio";
|
||||
bias-pull-down;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb2_hs_phy {
|
||||
&usb3_ss_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -391,16 +303,20 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_ss_phy {
|
||||
&usb2_hs_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vqmmc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
status = "okay";
|
||||
qcom,ath10k-calibration-variant = "PANGU-L1000";
|
||||
qcom,ath10k-calibration-variant = "R619AC";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
status = "okay";
|
||||
qcom,ath10k-calibration-variant = "PANGU-L1000";
|
||||
};
|
||||
qcom,ath10k-calibration-variant = "R619AC";
|
||||
};
|
|
@ -1,8 +1,23 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
|
||||
DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
|
||||
DEVICE_VARS += WRGG_DEVNAME WRGG_SIGNATURE
|
||||
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
||||
KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
|
||||
KERNEL_PREFIX := $$(IMAGE_PREFIX)
|
||||
KERNEL_LOADADDR := 0x80208000
|
||||
DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
|
||||
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
|
||||
IMAGE/sysupgrade.bin/squashfs :=
|
||||
endef
|
||||
|
||||
define Device/FitImage
|
||||
KERNEL_SUFFIX := -fit-uImage.itb
|
||||
KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
|
@ -115,21 +130,6 @@ define Device/8dev_jalapeno
|
|||
endef
|
||||
TARGET_DEVICES += 8dev_jalapeno
|
||||
|
||||
define Device/pangu_l1000
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := PANGU
|
||||
DEVICE_MODEL := L1000
|
||||
SOC := qcom-ipq4019
|
||||
DEVICE_DTS := qcom-ipq4019-l1000
|
||||
KERNEL_INSTALL := 1
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := l1000
|
||||
DEVICE_PACKAGES := ipq-wifi-pangu_l1000
|
||||
endef
|
||||
TARGET_DEVICES += pangu_l1000
|
||||
|
||||
define Device/alfa-network_ap120c-ac
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
|
@ -156,7 +156,6 @@ endef
|
|||
define Device/aruba_ap-303
|
||||
$(call Device/aruba_glenmorangie)
|
||||
DEVICE_MODEL := AP-303
|
||||
DEVICE_PACKAGES += uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += aruba_ap-303
|
||||
|
||||
|
@ -169,7 +168,7 @@ TARGET_DEVICES += aruba_ap-303h
|
|||
define Device/aruba_ap-365
|
||||
$(call Device/aruba_glenmorangie)
|
||||
DEVICE_MODEL := AP-365
|
||||
DEVICE_PACKAGES += kmod-hwmon-ad7418 uboot-envtools
|
||||
DEVICE_PACKAGES += kmod-hwmon-ad7418
|
||||
endef
|
||||
TARGET_DEVICES += aruba_ap-365
|
||||
|
||||
|
@ -318,25 +317,6 @@ define Device/compex_wpj428
|
|||
endef
|
||||
TARGET_DEVICES += compex_wpj428
|
||||
|
||||
define Device/devolo_magic-2-wifi-next
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := devolo
|
||||
DEVICE_MODEL := Magic 2 WiFi next
|
||||
SOC := qcom-ipq4018
|
||||
KERNEL_SIZE := 4096k
|
||||
|
||||
# If the bootloader sees 0xDEADC0DE and this trailer at the 64k boundary of a TFTP image
|
||||
# it will bootm it, just like we want for the initramfs.
|
||||
KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to 64k |\
|
||||
append-string -e '\xDE\xAD\xC0\xDE{"fl_initramfs":""}\x00'
|
||||
|
||||
IMAGE_SIZE := 26624k
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
|
||||
DEVICE_PACKAGES := ipq-wifi-devolo_magic-2-wifi-next uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += devolo_magic-2-wifi-next
|
||||
|
||||
define Device/dlink_dap-2610
|
||||
$(call Device/FitImageLzma)
|
||||
DEVICE_VENDOR := D-Link
|
||||
|
@ -364,32 +344,6 @@ define Device/dlink_dap-2610
|
|||
endef
|
||||
TARGET_DEVICES += dlink_dap-2610
|
||||
|
||||
define Device/edgecore_ecw5211
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Edgecore
|
||||
DEVICE_MODEL := ECW5211
|
||||
SOC := qcom-ipq4018
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_PACKAGES := kmod-tpm-i2c-atmel kmod-usb-acm uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_ecw5211
|
||||
|
||||
define Device/edgecore_oap100
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Edgecore
|
||||
DEVICE_MODEL := OAP100
|
||||
SOC := qcom-ipq4019
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGES := nand-sysupgrade.bin
|
||||
DEVICE_DTS_CONFIG := config@ap.dk07.1-c1
|
||||
DEVICE_PACKAGES := ipq-wifi-edgecore_oap100 kmod-usb-acm kmod-usb-net kmod-usb-net-cdc-qmi uqmi
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_oap100
|
||||
|
||||
define Device/engenius_eap1300
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := EnGenius
|
||||
|
@ -483,21 +437,6 @@ define Device/ezviz_cs-w3-wd1200g-eup
|
|||
endef
|
||||
TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup
|
||||
|
||||
define Device/glinet_gl-ap1300
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := GL.iNet
|
||||
DEVICE_MODEL := GL-AP1300
|
||||
SOC := qcom-ipq4018
|
||||
DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 131072k
|
||||
KERNEL_INSTALL := 1
|
||||
DEVICE_PACKAGES := ipq-wifi-glinet_gl-ap1300
|
||||
endef
|
||||
TARGET_DEVICES += glinet_gl-ap1300
|
||||
|
||||
define Device/glinet_gl-b1300
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := GL.iNet
|
||||
|
@ -576,34 +515,6 @@ define Device/linksys_ea8300
|
|||
endef
|
||||
TARGET_DEVICES += linksys_ea8300
|
||||
|
||||
define Device/linksys_mr8300
|
||||
$(call Device/FitzImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := MR8300
|
||||
SOC := qcom-ipq4019
|
||||
KERNEL_SIZE := 3072k
|
||||
IMAGE_SIZE := 87040k
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MR8300
|
||||
DEVICE_PACKAGES := uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_mr8300-v0 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += linksys_mr8300
|
||||
|
||||
define Device/luma_wrtq-329acn
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Luma Home
|
||||
DEVICE_MODEL := WRTQ-329ACN
|
||||
SOC := qcom-ipq4018
|
||||
DEVICE_PACKAGES := ipq-wifi-luma_wrtq-329acn kmod-ath3k kmod-eeprom-at24 kmod-i2c-gpio uboot-envtools
|
||||
IMAGE_SIZE := 76632k
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
endef
|
||||
TARGET_DEVICES += luma_wrtq-329acn
|
||||
|
||||
define Device/meraki_mr33
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Cisco Meraki
|
||||
|
@ -629,7 +540,6 @@ TARGET_DEVICES += mobipromo_cm520-79f
|
|||
|
||||
define Device/netgear_ex61x0v2
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_DTS_CONFIG := config@4
|
||||
NETGEAR_BOARD_ID := EX6150v2series
|
||||
NETGEAR_HW_ID := 29765285+16+0+128+2x2
|
||||
|
@ -639,6 +549,7 @@ endef
|
|||
|
||||
define Device/netgear_ex6100v2
|
||||
$(call Device/netgear_ex61x0v2)
|
||||
DEVICE_VENDOR := Netgear
|
||||
DEVICE_MODEL := EX6100
|
||||
DEVICE_VARIANT := v2
|
||||
endef
|
||||
|
@ -646,6 +557,7 @@ TARGET_DEVICES += netgear_ex6100v2
|
|||
|
||||
define Device/netgear_ex6150v2
|
||||
$(call Device/netgear_ex61x0v2)
|
||||
DEVICE_VENDOR := Netgear
|
||||
DEVICE_MODEL := EX6150
|
||||
DEVICE_VARIANT := v2
|
||||
endef
|
||||
|
@ -681,40 +593,9 @@ define Device/openmesh_a62
|
|||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9888-ct uboot-envtools
|
||||
endef
|
||||
|
||||
TARGET_DEVICES += openmesh_a62
|
||||
|
||||
define Device/plasmacloud_pa1200
|
||||
$(call Device/FitImageLzma)
|
||||
DEVICE_VENDOR := Plasma Cloud
|
||||
DEVICE_MODEL := PA1200
|
||||
SOC := qcom-ipq4018
|
||||
DEVICE_DTS_CONFIG := config@pc.pa1200
|
||||
BLOCKSIZE := 64k
|
||||
KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
|
||||
IMAGE_SIZE := 15616k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
|
||||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
DEVICE_PACKAGES := uboot-envtools ipq-wifi-plasmacloud-pa1200
|
||||
endef
|
||||
TARGET_DEVICES += plasmacloud_pa1200
|
||||
|
||||
define Device/plasmacloud_pa2200
|
||||
$(call Device/FitImageLzma)
|
||||
DEVICE_VENDOR := Plasma Cloud
|
||||
DEVICE_MODEL := PA2200
|
||||
SOC := qcom-ipq4019
|
||||
DEVICE_DTS_CONFIG := config@pc.pa2200
|
||||
BLOCKSIZE := 64k
|
||||
KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
|
||||
IMAGE_SIZE := 15552k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
|
||||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-plasmacloud-pa2200 uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += plasmacloud_pa2200
|
||||
|
||||
define Device/qcom_ap-dk01.1-c1
|
||||
DEVICE_VENDOR := Qualcomm Atheros
|
||||
DEVICE_MODEL := AP-DK01.1
|
||||
|
@ -746,6 +627,35 @@ define Device/qcom_ap-dk04.1-c1
|
|||
endef
|
||||
TARGET_DEVICES += qcom_ap-dk04.1-c1
|
||||
|
||||
define Device/p2w_r619ac
|
||||
$(call Device/FitzImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := P&W
|
||||
DEVICE_MODEL := R619AC
|
||||
SOC := qcom-ipq4019
|
||||
DEVICE_DTS_CONFIG := config@10
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGES += nand-factory.bin
|
||||
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
|
||||
DEVICE_PACKAGES := ipq-wifi-p2w_r619ac
|
||||
endef
|
||||
TARGET_DEVICES += p2w_r619ac
|
||||
|
||||
define Device/p2w_r619ac-128m
|
||||
$(call Device/FitzImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := P&W
|
||||
DEVICE_MODEL := R619AC
|
||||
DEVICE_VARIANT := 128M
|
||||
SOC := qcom-ipq4019
|
||||
DEVICE_DTS_CONFIG := config@10
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_PACKAGES := ipq-wifi-p2w_r619ac
|
||||
endef
|
||||
TARGET_DEVICES += p2w_r619ac-128m
|
||||
|
||||
define Device/qxwlan_e2600ac-c1
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Qxwlan
|
||||
|
@ -819,4 +729,6 @@ define Device/zyxel_wre6606
|
|||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size
|
||||
DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_wre6606
|
||||
TARGET_DEVICES += zyxel_wre6606
|
||||
|
||||
$(eval $(call BuildImage))
|
15
root/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
Executable file → Normal file
15
root/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
Executable file → Normal file
|
@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -837,11 +837,59 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
@@ -837,11 +837,52 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
qcom-apq8074-dragonboard.dtb \
|
||||
qcom-apq8084-ifc6540.dtb \
|
||||
qcom-apq8084-mtp.dtb \
|
||||
|
@ -18,25 +18,19 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||
+ qcom-ipq4018-ap120c-ac.dtb \
|
||||
+ qcom-ipq4018-dap-2610.dtb \
|
||||
+ qcom-ipq4018-cs-w3-wd1200g-eup.dtb \
|
||||
+ qcom-ipq4018-magic-2-wifi-next.dtb \
|
||||
+ qcom-ipq4018-ea6350v3.dtb \
|
||||
+ qcom-ipq4018-eap1300.dtb \
|
||||
+ qcom-ipq4018-ecw5211.dtb \
|
||||
+ qcom-ipq4018-emd1.dtb \
|
||||
+ qcom-ipq4018-emr3500.dtb \
|
||||
+ qcom-ipq4018-ens620ext.dtb \
|
||||
+ qcom-ipq4018-ex6100v2.dtb \
|
||||
+ qcom-ipq4018-ex6150v2.dtb \
|
||||
+ qcom-ipq4018-fritzbox-4040.dtb \
|
||||
+ qcom-ipq4018-gl-ap1300.dtb \
|
||||
+ qcom-ipq4018-jalapeno.dtb \
|
||||
+ qcom-ipq4018-meshpoint-one.dtb \
|
||||
+ qcom-ipq4018-nbg6617.dtb \
|
||||
+ qcom-ipq4019-oap100.dtb \
|
||||
+ qcom-ipq4018-pa1200.dtb \
|
||||
+ qcom-ipq4018-rt-ac58u.dtb \
|
||||
+ qcom-ipq4018-wre6606.dtb \
|
||||
+ qcom-ipq4018-wrtq-329acn.dtb \
|
||||
qcom-ipq4019-ap.dk01.1-c1.dtb \
|
||||
qcom-ipq4019-ap.dk04.1-c1.dtb \
|
||||
qcom-ipq4019-ap.dk04.1-c3.dtb \
|
||||
|
@ -49,12 +43,12 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||
+ qcom-ipq4019-fritzbox-7530.dtb \
|
||||
+ qcom-ipq4019-fritzrepeater-1200.dtb \
|
||||
+ qcom-ipq4019-fritzrepeater-3000.dtb \
|
||||
+ qcom-ipq4019-r619ac.dtb \
|
||||
+ qcom-ipq4019-r619ac-128m.dtb \
|
||||
+ qcom-ipq4019-map-ac2200.dtb \
|
||||
+ qcom-ipq4019-mr8300.dtb \
|
||||
+ qcom-ipq4019-e2600ac-c1.dtb \
|
||||
+ qcom-ipq4019-e2600ac-c2.dtb \
|
||||
+ qcom-ipq4019-habanero-dvk.dtb \
|
||||
+ qcom-ipq4019-pa2200.dtb \
|
||||
+ qcom-ipq4019-rtl30vw.dtb \
|
||||
+ qcom-ipq4019-u4019-32m.dtb \
|
||||
+ qcom-ipq4019-wpj419.dtb \
|
||||
|
@ -66,7 +60,6 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||
+ qcom-ipq4029-gl-b1300.dtb \
|
||||
+ qcom-ipq4029-gl-s1300.dtb \
|
||||
+ qcom-ipq4029-mr33.dtb \
|
||||
+ qcom-ipq4019-l1000.dtb \
|
||||
qcom-ipq8064-ap148.dtb \
|
||||
qcom-msm8660-surf.dtb \
|
||||
qcom-msm8960-cdp.dtb \
|
||||
qcom-msm8960-cdp.dtb \
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
From: William <gw826943555@qq.com>
|
||||
Subject: [PATCH] ipq40xx: improve CPU clock
|
||||
Date: Tue, 15 Dec 2020 15:26:35 +0800
|
||||
|
||||
This patch will match the clock-latency-ns values in the device tree
|
||||
for those found inside the OEM device tree and kernel source code and
|
||||
unlock 896Mhz CPU operating points.
|
||||
|
||||
Signed-off-by: William <gw826943555@qq.com>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
|
||||
@@ -114,20 +114,24 @@
|
||||
|
||||
opp-48000000 {
|
||||
opp-hz = /bits/ 64 <48000000>;
|
||||
- clock-latency-ns = <256000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
};
|
||||
opp-200000000 {
|
||||
opp-hz = /bits/ 64 <200000000>;
|
||||
- clock-latency-ns = <256000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
};
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
- clock-latency-ns = <256000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
};
|
||||
opp-716000000 {
|
||||
opp-hz = /bits/ 64 <716000000>;
|
||||
- clock-latency-ns = <256000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
};
|
||||
+ opp-896000000 {
|
||||
+ opp-hz = /bits/ 64 <896000000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
memory {
|
||||
--- a/drivers/clk/qcom/gcc-ipq4019.c
|
||||
+++ b/drivers/clk/qcom/gcc-ipq4019.c
|
||||
@@ -579,6 +579,9 @@ static const struct freq_tbl ftbl_gcc_ap
|
||||
F(632000000, P_DDRPLLAPSS, 1, 0, 0),
|
||||
F(672000000, P_DDRPLLAPSS, 1, 0, 0),
|
||||
F(716000000, P_DDRPLLAPSS, 1, 0, 0),
|
||||
+ F(768000000, P_DDRPLLAPSS, 1, 0, 0),
|
||||
+ F(823000000, P_DDRPLLAPSS, 1, 0, 0),
|
||||
+ F(896000000, P_DDRPLLAPSS, 1, 0, 0),
|
||||
{ }
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue