mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-08 10:23:47 +08:00
Merge Official Source
This commit is contained in:
commit
b764cf94bd
@ -5,6 +5,20 @@
|
|||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
config EXPERIMENTAL
|
||||||
|
bool "Enable experimental features by default"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Set this option to build with latest bleeding edge features
|
||||||
|
which may or may not work as expected.
|
||||||
|
If you would like to help the development of OpenWrt, you are
|
||||||
|
encouraged to set this option and provide feedback (both
|
||||||
|
positive and negative). But do so only if you know how to
|
||||||
|
recover your device in case of flashing potentially non-working
|
||||||
|
firmware.
|
||||||
|
|
||||||
|
If you plan to use this build in production, say NO!
|
||||||
|
|
||||||
menu "Global build settings"
|
menu "Global build settings"
|
||||||
|
|
||||||
config JSON_OVERVIEW_IMAGE_INFO
|
config JSON_OVERVIEW_IMAGE_INFO
|
||||||
@ -51,7 +65,7 @@ menu "Global build settings"
|
|||||||
config TESTING_KERNEL
|
config TESTING_KERNEL
|
||||||
bool "Use the testing kernel version"
|
bool "Use the testing kernel version"
|
||||||
depends on HAS_TESTING_KERNEL
|
depends on HAS_TESTING_KERNEL
|
||||||
default n
|
default EXPERIMENTAL
|
||||||
help
|
help
|
||||||
If the target supports a newer kernel version than the default,
|
If the target supports a newer kernel version than the default,
|
||||||
you can use this config option to enable it
|
you can use this config option to enable it
|
||||||
@ -215,10 +229,6 @@ menu "Global build settings"
|
|||||||
config USE_UCLIBCXX
|
config USE_UCLIBCXX
|
||||||
bool "uClibc++"
|
bool "uClibc++"
|
||||||
|
|
||||||
config USE_LIBCXX
|
|
||||||
bool "libc++"
|
|
||||||
depends on !USE_UCLIBC
|
|
||||||
|
|
||||||
config USE_LIBSTDCXX
|
config USE_LIBSTDCXX
|
||||||
bool "libstdc++"
|
bool "libstdc++"
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir*"
|
DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir*"
|
||||||
|
|
||||||
find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) | mkhash md5
|
find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -printf "%p%T@\n" | sort | mkhash md5
|
||||||
|
|
||||||
define rdep
|
define rdep
|
||||||
.PRECIOUS: $(2)
|
.PRECIOUS: $(2)
|
||||||
|
@ -24,7 +24,7 @@ Kernel/Patch:=$(Kernel/Patch/Default)
|
|||||||
ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
|
ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
|
||||||
LINUX_CAT:=xzcat
|
LINUX_CAT:=xzcat
|
||||||
else
|
else
|
||||||
LINUX_CAT:=zcat
|
LINUX_CAT:=gzip -dc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
|
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
|
||||||
|
@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
|
|||||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LINUX_VERSION-5.4 = .81
|
LINUX_VERSION-5.4 = .82
|
||||||
|
|
||||||
LINUX_KERNEL_HASH-5.4.81 = 9470bde475726996202d845a5fc3bc8bd3bb546bbc6816fb663fa73df25d8427
|
LINUX_KERNEL_HASH-5.4.82 = fb4458e4ea38b6c5df4ee8cee0d9b0420b5aed07e273787b045c0db48709ddaf
|
||||||
|
|
||||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||||
|
@ -170,6 +170,9 @@ $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
|
|||||||
$(eval $(call SetupHostCommand,file,Please install the 'file' package, \
|
$(eval $(call SetupHostCommand,file,Please install the 'file' package, \
|
||||||
file --version 2>&1 | grep file))
|
file --version 2>&1 | grep file))
|
||||||
|
|
||||||
|
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
|
||||||
|
rsync --version </dev/null))
|
||||||
|
|
||||||
$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
|
$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
|
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
|
||||||
|
@ -47,7 +47,7 @@ TARGET_DIR_ORIG := $(TARGET_ROOTFS_DIR)/root.orig-$(BOARD)
|
|||||||
|
|
||||||
ifdef CONFIG_CLEAN_IPKG
|
ifdef CONFIG_CLEAN_IPKG
|
||||||
define clean_ipkg
|
define clean_ipkg
|
||||||
-find $(1)/usr/lib/opkg/info -type f -and -not -name '*.control' | $(XARGS) rm -rf
|
-find $(1)/usr/lib/opkg/info -type f -and -not -name '*.control' -delete
|
||||||
-sed -i -ne '/^Require-User: /p' $(1)/usr/lib/opkg/info/*.control
|
-sed -i -ne '/^Require-User: /p' $(1)/usr/lib/opkg/info/*.control
|
||||||
awk ' \
|
awk ' \
|
||||||
BEGIN { conffiles = 0; print "Conffiles:" } \
|
BEGIN { conffiles = 0; print "Conffiles:" } \
|
||||||
@ -56,7 +56,7 @@ ifdef CONFIG_CLEAN_IPKG
|
|||||||
conffiles == 1 { print } \
|
conffiles == 1 { print } \
|
||||||
' $(1)/usr/lib/opkg/status >$(1)/usr/lib/opkg/status.new
|
' $(1)/usr/lib/opkg/status >$(1)/usr/lib/opkg/status.new
|
||||||
mv $(1)/usr/lib/opkg/status.new $(1)/usr/lib/opkg/status
|
mv $(1)/usr/lib/opkg/status.new $(1)/usr/lib/opkg/status
|
||||||
-find $(1)/usr/lib/opkg -empty | $(XARGS) rm -rf
|
-find $(1)/usr/lib/opkg -empty -delete
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -88,15 +88,13 @@ define prepare_rootfs
|
|||||||
done || true \
|
done || true \
|
||||||
)
|
)
|
||||||
$(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(1)/usr/lib/opkg/status)
|
$(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(1)/usr/lib/opkg/status)
|
||||||
@-find $(1) -name CVS | $(XARGS) rm -rf
|
@-find $(1) -name CVS -o -name .svn -o -name .git -o -name '.#*' | $(XARGS) rm -rf
|
||||||
@-find $(1) -name .svn | $(XARGS) rm -rf
|
rm -rf \
|
||||||
@-find $(1) -name .git | $(XARGS) rm -rf
|
$(1)/boot \
|
||||||
@-find $(1) -name '.#*' | $(XARGS) rm -f
|
$(1)/tmp/* \
|
||||||
rm -rf $(1)/tmp/*
|
$(1)/usr/lib/opkg/info/*.postinst* \
|
||||||
rm -f $(1)/usr/lib/opkg/lists/*
|
$(1)/usr/lib/opkg/lists/* \
|
||||||
rm -f $(1)/usr/lib/opkg/info/*.postinst*
|
$(1)/var/lock/*.lock
|
||||||
rm -f $(1)/var/lock/*.lock
|
|
||||||
rm -rf $(1)/boot
|
|
||||||
$(call clean_ipkg,$(1))
|
$(call clean_ipkg,$(1))
|
||||||
$(call mklibs,$(1))
|
$(call mklibs,$(1))
|
||||||
$(if $(SOURCE_DATE_EPOCH),find $(1)/ -mindepth 1 -execdir touch -hcd "@$(SOURCE_DATE_EPOCH)" "{}" +)
|
$(if $(SOURCE_DATE_EPOCH),find $(1)/ -mindepth 1 -execdir touch -hcd "@$(SOURCE_DATE_EPOCH)" "{}" +)
|
||||||
|
@ -4,8 +4,8 @@ ifndef DUMP
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PKG_PREPARED_DEPENDS += CONFIG_USE_UCLIBCXX CONFIG_USE_LIBCXX
|
PKG_PREPARED_DEPENDS += CONFIG_USE_UCLIBCXX
|
||||||
CXX_DEPENDS = +USE_UCLIBCXX:uclibcxx +USE_LIBCXX:libcxx +USE_LIBSTDCXX:libstdcpp
|
CXX_DEPENDS = +USE_UCLIBCXX:uclibcxx +USE_LIBSTDCXX:libstdcpp
|
||||||
|
|
||||||
ifneq ($(CONFIG_USE_UCLIBCXX),)
|
ifneq ($(CONFIG_USE_UCLIBCXX),)
|
||||||
ifneq ($(CONFIG_CCACHE),)
|
ifneq ($(CONFIG_CCACHE),)
|
||||||
@ -14,11 +14,3 @@ ifneq ($(CONFIG_USE_UCLIBCXX),)
|
|||||||
TARGET_CXX=g++-uc
|
TARGET_CXX=g++-uc
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_USE_LIBCXX),)
|
|
||||||
ifneq ($(CONFIG_CCACHE),)
|
|
||||||
TARGET_CXX_NOCACHE=g++-libcxx
|
|
||||||
else
|
|
||||||
TARGET_CXX=g++-libcxx
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
|
|||||||
include $(INCLUDE_DIR)/feeds.mk
|
include $(INCLUDE_DIR)/feeds.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=239
|
PKG_RELEASE:=240
|
||||||
PKG_FLAGS:=nonshared
|
PKG_FLAGS:=nonshared
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
|
@ -3,6 +3,16 @@
|
|||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
|
caldata_dd() {
|
||||||
|
local source=$1
|
||||||
|
local target=$2
|
||||||
|
local count=$(($3))
|
||||||
|
local offset=$(($4))
|
||||||
|
|
||||||
|
dd if=$source of=$target iflag=skip_bytes,fullblock bs=$count skip=$offset count=1 2>/dev/null
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
caldata_die() {
|
caldata_die() {
|
||||||
echo "caldata: " "$*"
|
echo "caldata: " "$*"
|
||||||
exit 1
|
exit 1
|
||||||
@ -17,7 +27,7 @@ caldata_extract() {
|
|||||||
mtd=$(find_mtd_chardev $part)
|
mtd=$(find_mtd_chardev $part)
|
||||||
[ -n "$mtd" ] || caldata_die "no mtd device found for partition $part"
|
[ -n "$mtd" ] || caldata_die "no mtd device found for partition $part"
|
||||||
|
|
||||||
dd if=$mtd of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
|
caldata_dd $mtd /lib/firmware/$FIRMWARE $count $offset || \
|
||||||
caldata_die "failed to extract calibration data from $mtd"
|
caldata_die "failed to extract calibration data from $mtd"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,7 +44,7 @@ caldata_extract_ubi() {
|
|||||||
ubi=$(nand_find_volume $ubidev $part)
|
ubi=$(nand_find_volume $ubidev $part)
|
||||||
[ -n "$ubi" ] || caldata_die "no UBI volume found for $part"
|
[ -n "$ubi" ] || caldata_die "no UBI volume found for $part"
|
||||||
|
|
||||||
dd if=/dev/$ubi of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
|
caldata_dd /dev/$ubi /lib/firmware/$FIRMWARE $count $offset || \
|
||||||
caldata_die "failed to extract calibration data from $ubi"
|
caldata_die "failed to extract calibration data from $ubi"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,8 +74,7 @@ caldata_from_file() {
|
|||||||
|
|
||||||
[ -n "$target" ] || target=/lib/firmware/$FIRMWARE
|
[ -n "$target" ] || target=/lib/firmware/$FIRMWARE
|
||||||
|
|
||||||
# dd doesn't handle partial reads from special files: use cat
|
caldata_dd $source $target $count $offset || \
|
||||||
cat $source | dd of=$target iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
|
|
||||||
caldata_die "failed to extract calibration data from $source"
|
caldata_die "failed to extract calibration data from $source"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,16 +82,20 @@ caldata_sysfsload_from_file() {
|
|||||||
local source=$1
|
local source=$1
|
||||||
local offset=$(($2))
|
local offset=$(($2))
|
||||||
local count=$(($3))
|
local count=$(($3))
|
||||||
|
local target_dir="/sys/$DEVPATH"
|
||||||
|
local target="$target_dir/data"
|
||||||
|
|
||||||
# dd doesn't handle partial reads from special files: use cat
|
[ -d "$target_dir" ] || \
|
||||||
# test extract to /dev/null first
|
caldata_die "no sysfs dir to write: $target"
|
||||||
cat $source | dd of=/dev/null iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
|
|
||||||
|
echo 1 > "$target_dir/loading"
|
||||||
|
caldata_dd $source $target $count $offset
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo 1 > "$target_dir/loading"
|
||||||
caldata_die "failed to extract calibration data from $source"
|
caldata_die "failed to extract calibration data from $source"
|
||||||
|
else
|
||||||
# can't fail now
|
echo 0 > "$target_dir/loading"
|
||||||
echo 1 > /sys/$DEVPATH/loading
|
fi
|
||||||
cat $source | dd of=/sys/$DEVPATH/data iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null
|
|
||||||
echo 0 > /sys/$DEVPATH/loading
|
|
||||||
}
|
}
|
||||||
|
|
||||||
caldata_valid() {
|
caldata_valid() {
|
||||||
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=uboot-envtools
|
PKG_NAME:=uboot-envtools
|
||||||
PKG_DISTNAME:=u-boot
|
PKG_DISTNAME:=u-boot
|
||||||
PKG_VERSION:=2020.04
|
PKG_VERSION:=2020.04
|
||||||
PKG_RELEASE:=8
|
PKG_RELEASE:=9
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:= \
|
PKG_SOURCE_URL:= \
|
||||||
|
@ -29,7 +29,7 @@ buffalo,wsr-1166dhp|\
|
|||||||
buffalo,wsr-600dhp|\
|
buffalo,wsr-600dhp|\
|
||||||
mediatek,linkit-smart-7688|\
|
mediatek,linkit-smart-7688|\
|
||||||
samknows,whitebox-v8|\
|
samknows,whitebox-v8|\
|
||||||
xiaomi,mir3g-v2|\
|
xiaomi,mi-router-3g-v2|\
|
||||||
xiaomi,mi-router-4a-gigabit|\
|
xiaomi,mi-router-4a-gigabit|\
|
||||||
xiaomi,mi-router-4c|\
|
xiaomi,mi-router-4c|\
|
||||||
xiaomi,miwifi-nano|\
|
xiaomi,miwifi-nano|\
|
||||||
@ -45,9 +45,9 @@ ravpower,rp-wd03)
|
|||||||
linksys,ea7300-v1|\
|
linksys,ea7300-v1|\
|
||||||
linksys,ea7300-v2|\
|
linksys,ea7300-v2|\
|
||||||
linksys,ea7500-v2|\
|
linksys,ea7500-v2|\
|
||||||
|
xiaomi,mi-router-3g|\
|
||||||
|
xiaomi,mi-router-3-pro|\
|
||||||
xiaomi,mi-router-ac2100|\
|
xiaomi,mi-router-ac2100|\
|
||||||
xiaomi,mir3p|\
|
|
||||||
xiaomi,mir3g|\
|
|
||||||
xiaomi,redmi-router-ac2100)
|
xiaomi,redmi-router-ac2100)
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
|
||||||
;;
|
;;
|
||||||
|
@ -124,16 +124,18 @@ $(eval $(call KernelPackage,lib-lzo))
|
|||||||
define KernelPackage/lib-zstd
|
define KernelPackage/lib-zstd
|
||||||
SUBMENU:=$(LIB_MENU)
|
SUBMENU:=$(LIB_MENU)
|
||||||
TITLE:=ZSTD support
|
TITLE:=ZSTD support
|
||||||
|
DEPENDS:=+kmod-crypto-acompress
|
||||||
KCONFIG:= \
|
KCONFIG:= \
|
||||||
|
CONFIG_CRYPTO_ZSTD \
|
||||||
CONFIG_ZSTD_COMPRESS \
|
CONFIG_ZSTD_COMPRESS \
|
||||||
CONFIG_ZSTD_DECOMPRESS \
|
CONFIG_ZSTD_DECOMPRESS \
|
||||||
CONFIG_XXHASH
|
CONFIG_XXHASH
|
||||||
HIDDEN:=1
|
|
||||||
FILES:= \
|
FILES:= \
|
||||||
|
$(LINUX_DIR)/crypto/zstd.ko \
|
||||||
$(LINUX_DIR)/lib/xxhash.ko \
|
$(LINUX_DIR)/lib/xxhash.ko \
|
||||||
$(LINUX_DIR)/lib/zstd/zstd_compress.ko \
|
$(LINUX_DIR)/lib/zstd/zstd_compress.ko \
|
||||||
$(LINUX_DIR)/lib/zstd/zstd_decompress.ko
|
$(LINUX_DIR)/lib/zstd/zstd_decompress.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,xxhash zstd_compress zstd_decompress)
|
AUTOLOAD:=$(call AutoProbe,xxhash zstd zstd_compress zstd_decompress)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/lib-zstd/description
|
define KernelPackage/lib-zstd/description
|
||||||
|
@ -1105,7 +1105,7 @@ endef
|
|||||||
|
|
||||||
|
|
||||||
define KernelPackage/usb-net-aqc111
|
define KernelPackage/usb-net-aqc111
|
||||||
TITLE:=Kernel module for Aquantia AQtion USB to 5/2.5GbE Controllers
|
TITLE:=Support for USB-to-Ethernet Aquantia AQtion 5/2.5GbE
|
||||||
DEPENDS:=+kmod-libphy
|
DEPENDS:=+kmod-libphy
|
||||||
KCONFIG:=CONFIG_USB_NET_AQC111
|
KCONFIG:=CONFIG_USB_NET_AQC111
|
||||||
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/aqc111.ko
|
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/aqc111.ko
|
||||||
@ -1114,8 +1114,7 @@ define KernelPackage/usb-net-aqc111
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/usb-net-aqc111/description
|
define KernelPackage/usb-net-aqc111/description
|
||||||
Kernel module for Aquantia AQtion USB Ethernet adapters
|
Support for USB-to-Ethernet Aquantia AQtion 5/2.5GbE
|
||||||
based on AQC111U/AQC112 chips.
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,usb-net-aqc111))
|
$(eval $(call KernelPackage,usb-net-aqc111))
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=libcxx
|
|
||||||
PKG_VERSION:=10.0.0
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz
|
|
||||||
PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION)
|
|
||||||
PKG_HASH:=270f8a3f176f1981b0f6ab8aa556720988872ec2b48ed3b605d0ced8d09156c7
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).src
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
|
|
||||||
PKG_LICENSE:=MIT
|
|
||||||
PKG_LICENSE_FILES:=LICENSE.txt
|
|
||||||
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
PKG_BUILD_DEPENDS:=libcxxabi
|
|
||||||
CMAKE_BINARY_SUBDIR:=build
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(INCLUDE_DIR)/cmake.mk
|
|
||||||
|
|
||||||
define Package/libcxx
|
|
||||||
SECTION:=libs
|
|
||||||
CATEGORY:=Libraries
|
|
||||||
TITLE:=LLVM libstdc++
|
|
||||||
URL:=https://libcxx.llvm.org/
|
|
||||||
DEPENDS:=+libatomic +libpthread
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libcxx/description
|
|
||||||
libc++ is an implementation of the C++ standard library, targeting C++11, C++14 and above.
|
|
||||||
endef
|
|
||||||
|
|
||||||
CMAKE_OPTIONS += \
|
|
||||||
-DLIBCXX_CXX_ABI="libcxxabi" \
|
|
||||||
-DLIBCXX_ENABLE_ASSERTIONS=OFF \
|
|
||||||
-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \
|
|
||||||
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
|
|
||||||
-DLIBCXX_INCLUDE_DOCS=OFF \
|
|
||||||
-DLIBCXX_INCLUDE_TESTS=OFF \
|
|
||||||
-DLIBCXX_LIBDIR_SUFFIX="" \
|
|
||||||
-DLIBCXX_STANDALONE_BUILD=ON \
|
|
||||||
-DLIBCXX_HAS_MUSL_LIBC=$(if $(CONFIG_USE_MUSL),ON,OFF)
|
|
||||||
|
|
||||||
TARGET_CXXFLAGS += -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -Wno-attributes -flto
|
|
||||||
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(call Build/InstallDev/cmake,$(1))
|
|
||||||
$(CP) files/g++-libcxx $(TOOLCHAIN_DIR)/bin/
|
|
||||||
$(SED) 's,CXX,$(TARGET_CXX),g' $(TOOLCHAIN_DIR)/bin/g++-libcxx
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libcxx/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libc++.so.* $(1)/usr/lib/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,libcxx))
|
|
@ -1,19 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
WRAPPER_INCLUDEDIR="-I$STAGING_DIR/usr/include/c++/v1"
|
|
||||||
WRAPPER_LIBDIR="-L$STAGING_DIR/usr/lib"
|
|
||||||
WRAPPER_LIBS="-lc -lgcc_s -lssp_nonshared"
|
|
||||||
|
|
||||||
WRAPPER_OPTIONS=""
|
|
||||||
WRAPPER_INCLIB="Y"
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case "$arg" in
|
|
||||||
-c|-E|-S) WRAPPER_INCLIB="N" ;;
|
|
||||||
-static) [ "$WRAPPER_LIBS" != "-lc -lgcc_s -lssp_nonshared -lgcc_eh" ] && WRAPPER_LIBS="-lc -lgcc_s -lssp_nonshared -lgcc_eh" ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
[ "$WRAPPER_INCLIB" = "Y" ] && WRAPPER_OPTIONS="-nodefaultlibs $WRAPPER_LIBDIR -lc++ -lc++abi $WRAPPER_LIBS"
|
|
||||||
|
|
||||||
exec CXX -nostdinc++ -DGCC_HASCLASSVISIBILITY "$WRAPPER_INCLUDEDIR" "$@" $WRAPPER_OPTIONS
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -760,6 +760,10 @@ function(cxx_link_system_libraries targe
|
|
||||||
target_link_libraries(${target} PRIVATE atomic)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
+ if (LIBCXX_HAS_MUSL_LIBC)
|
|
||||||
+ target_link_libraries(${target} PRIVATE ssp_nonshared)
|
|
||||||
+ endif()
|
|
||||||
+
|
|
||||||
if (MINGW)
|
|
||||||
target_link_libraries(${target} PRIVATE "${MINGW_LIBRARIES}")
|
|
||||||
endif()
|
|
@ -1,71 +0,0 @@
|
|||||||
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=libcxxabi
|
|
||||||
PKG_VERSION:=10.0.0
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz
|
|
||||||
PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION)
|
|
||||||
PKG_HASH:=e71bac75a88c9dde455ad3f2a2b449bf745eafd41d2d8432253b2964e0ca14e1
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).src
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
|
|
||||||
PKG_LICENSE:=MIT
|
|
||||||
PKG_LICENSE_FILES:=LICENSE.txt
|
|
||||||
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
CMAKE_BINARY_SUBDIR:=build
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(INCLUDE_DIR)/cmake.mk
|
|
||||||
|
|
||||||
define Package/libcxxabi
|
|
||||||
SECTION:=libs
|
|
||||||
CATEGORY:=Libraries
|
|
||||||
TITLE:=LLVM lib++abi
|
|
||||||
URL:=https://libcxxabi.llvm.org/
|
|
||||||
DEPENDS:=+libpthread
|
|
||||||
BUILDONLY:=1
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libcxxabi/description
|
|
||||||
libc++abi is a new implementation of low level support for a standard C++ library.
|
|
||||||
endef
|
|
||||||
|
|
||||||
CMAKE_OPTIONS += \
|
|
||||||
-DLIBCXXABI_ENABLE_EXCEPTIONS=ON \
|
|
||||||
-DLIBCXXABI_ENABLE_PEDANTIC=OFF \
|
|
||||||
-DLIBCXXABI_ENABLE_PIC=ON \
|
|
||||||
-DLIBCXXABI_ENABLE_WERROR=OFF \
|
|
||||||
-DLIBCXXABI_USE_LLVM_UNWINDER=OFF \
|
|
||||||
-DLIBCXXABI_USE_COMPILER_RT=OFF \
|
|
||||||
-DLIBCXXABI_ENABLE_THREADS=ON \
|
|
||||||
-DLIBCXXABI_HAS_PTHREAD_API=ON \
|
|
||||||
-DLIBCXXABI_INCLUDE_TESTS=OFF \
|
|
||||||
-DLIBCXXABI_LIBDIR_SUFFIX="" \
|
|
||||||
-DLIBCXXABI_INSTALL_LIBRARY=ON \
|
|
||||||
-DLIBCXXABI_ENABLE_SHARED=OFF \
|
|
||||||
-DLIBCXXABI_LIBCXX_SRC_DIR=$(BUILD_DIR)/libcxx-$(PKG_VERSION).src \
|
|
||||||
-DLIBCXXABI_LIBCXX_INCLUDES=$(BUILD_DIR)/libcxx-$(PKG_VERSION).src/include
|
|
||||||
|
|
||||||
TARGET_CXXFLAGS += -flto
|
|
||||||
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
|
|
||||||
|
|
||||||
define Build/Prepare
|
|
||||||
$(MAKE) -C $(TOPDIR)/package/libs/libcxx prepare
|
|
||||||
$(call Build/Prepare/Default)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(call Build/InstallDev/cmake,$(1))
|
|
||||||
$(INSTALL_DIR) $(1)/usr/include/
|
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,libcxxabi))
|
|
@ -1,27 +0,0 @@
|
|||||||
--- a/src/cxa_exception.h
|
|
||||||
+++ b/src/cxa_exception.h
|
|
||||||
@@ -27,6 +27,13 @@ _LIBCXXABI_HIDDEN uint64_t __getExceptio
|
|
||||||
_LIBCXXABI_HIDDEN void __setExceptionClass ( _Unwind_Exception*, uint64_t);
|
|
||||||
_LIBCXXABI_HIDDEN bool __isOurExceptionClass(const _Unwind_Exception*);
|
|
||||||
|
|
||||||
+#if defined(__arm__) && defined(__GNUC__)
|
|
||||||
+// missing values from _Unwind_Reason_Code enum
|
|
||||||
+#define _URC_FATAL_PHASE2_ERROR ((_Unwind_Reason_Code)2)
|
|
||||||
+#define _URC_FATAL_PHASE1_ERROR ((_Unwind_Reason_Code)3)
|
|
||||||
+#define _URC_NORMAL_STOP ((_Unwind_Reason_Code)4)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
struct _LIBCXXABI_HIDDEN __cxa_exception {
|
|
||||||
#if defined(__LP64__) || defined(_WIN64) || defined(_LIBCXXABI_ARM_EHABI)
|
|
||||||
// Now _Unwind_Exception is marked with __attribute__((aligned)),
|
|
||||||
--- a/src/cxa_personality.cpp
|
|
||||||
+++ b/src/cxa_personality.cpp
|
|
||||||
@@ -1108,7 +1108,7 @@ __gxx_personality_v0(_Unwind_State state
|
|
||||||
|
|
||||||
// Check the undocumented force unwinding behavior
|
|
||||||
bool is_force_unwinding = state & _US_FORCE_UNWIND;
|
|
||||||
- state &= ~_US_FORCE_UNWIND;
|
|
||||||
+ state = (_Unwind_State)(state & ~_US_FORCE_UNWIND);
|
|
||||||
|
|
||||||
scan_results results;
|
|
||||||
switch (state) {
|
|
@ -5,9 +5,9 @@ PKG_RELEASE=1
|
|||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
|
||||||
PKG_MIRROR_HASH:=cf963b19f5a25da85b2d8888514cbcc33c3f641c4478c9c25312b8bf83fe9e6b
|
PKG_MIRROR_HASH:=97dc4eba01cf2c5d6a6d0db3747e0cdc0d95cb87e51b3115272e7d3e69a8b255
|
||||||
PKG_SOURCE_DATE:=2020-08-06
|
PKG_SOURCE_DATE:=2020-12-12
|
||||||
PKG_SOURCE_VERSION:=9e52171d70def760a6949676800d0b73f85ee22d
|
PKG_SOURCE_VERSION:=357877693ca363b12e6e7e14d345639b2440cd07
|
||||||
CMAKE_INSTALL:=1
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
PKG_LICENSE:=ISC
|
PKG_LICENSE:=ISC
|
||||||
@ -27,7 +27,7 @@ define Package/libubox
|
|||||||
SECTION:=libs
|
SECTION:=libs
|
||||||
CATEGORY:=Libraries
|
CATEGORY:=Libraries
|
||||||
TITLE:=Basic utility library
|
TITLE:=Basic utility library
|
||||||
ABI_VERSION:=20191228
|
ABI_VERSION:=20201212
|
||||||
DEPENDS:=
|
DEPENDS:=
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2006-2016 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=lzo
|
|
||||||
PKG_VERSION:=2.10
|
|
||||||
PKG_RELEASE:=4
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
||||||
PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
|
|
||||||
PKG_HASH:=c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072
|
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0-or-later
|
|
||||||
PKG_LICENSE_FILES:=COPYING
|
|
||||||
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
CMAKE_BINARY_SUBDIR:=openwrt-build
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(INCLUDE_DIR)/cmake.mk
|
|
||||||
|
|
||||||
define Package/liblzo
|
|
||||||
SECTION:=libs
|
|
||||||
CATEGORY:=Libraries
|
|
||||||
TITLE:=A real-time data compression library
|
|
||||||
URL:=http://www.oberhumer.com/opensource/lzo/
|
|
||||||
ABI_VERSION:=2
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/liblzo/description
|
|
||||||
LZO is a data compression library which is suitable for data de-/compression
|
|
||||||
in real-time. This means it favours speed over compression ratio.
|
|
||||||
endef
|
|
||||||
|
|
||||||
CMAKE_OPTIONS += \
|
|
||||||
-DENABLE_SHARED=ON \
|
|
||||||
-DENABLE_STATIC=ON \
|
|
||||||
\
|
|
||||||
-DBUILD_TESTING=OFF \
|
|
||||||
-DCMAKE_SKIP_INSTALL_RPATH=ON
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
|
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/lzo $(1)/usr/include/
|
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.{a,so*} $(1)/usr/lib/
|
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lzo2.pc $(1)/usr/lib/pkgconfig
|
|
||||||
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/lzo2.pc
|
|
||||||
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/lzo2.pc
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/liblzo/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.so.* $(1)/usr/lib/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,liblzo))
|
|
@ -334,6 +334,7 @@ define Build/Configure
|
|||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--libdir=lib \
|
--libdir=lib \
|
||||||
--openssldir=/etc/ssl \
|
--openssldir=/etc/ssl \
|
||||||
|
--cross-compile-prefix="$(TARGET_CROSS)" \
|
||||||
$(TARGET_CPPFLAGS) \
|
$(TARGET_CPPFLAGS) \
|
||||||
$(TARGET_LDFLAGS) \
|
$(TARGET_LDFLAGS) \
|
||||||
$(OPENSSL_OPTIONS) && \
|
$(OPENSSL_OPTIONS) && \
|
||||||
@ -346,14 +347,12 @@ TARGET_LDFLAGS += -Wl,--gc-sections
|
|||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
||||||
CC="$(TARGET_CC)" \
|
CC="$(TARGET_CC)" \
|
||||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||||
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
||||||
$(OPENSSL_MAKEFLAGS) \
|
$(OPENSSL_MAKEFLAGS) \
|
||||||
all
|
all
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
||||||
CC="$(TARGET_CC)" \
|
CC="$(TARGET_CC)" \
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||||
$(OPENSSL_MAKEFLAGS) \
|
$(OPENSSL_MAKEFLAGS) \
|
||||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=wolfssl
|
PKG_NAME:=wolfssl
|
||||||
PKG_VERSION:=4.5.0-stable
|
PKG_VERSION:=4.5.0-stable
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=5
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
||||||
@ -61,9 +61,12 @@ TARGET_LDFLAGS += -flto
|
|||||||
|
|
||||||
# --enable-stunnel needed for OpenSSL API compatibility bits
|
# --enable-stunnel needed for OpenSSL API compatibility bits
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
|
--enable-lighty \
|
||||||
|
--enable-opensslall \
|
||||||
--enable-opensslextra \
|
--enable-opensslextra \
|
||||||
--enable-sni \
|
--enable-sni \
|
||||||
--enable-stunnel \
|
--enable-stunnel \
|
||||||
|
--disable-crypttests \
|
||||||
--disable-examples \
|
--disable-examples \
|
||||||
--disable-jobserver \
|
--disable-jobserver \
|
||||||
--$(if $(CONFIG_IPV6),enable,disable)-ipv6 \
|
--$(if $(CONFIG_IPV6),enable,disable)-ipv6 \
|
||||||
|
@ -0,0 +1,123 @@
|
|||||||
|
From ea5c290d605b2af7b10d6e5ce69aa3534f52385f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eric Blankenhorn <eric@wolfssl.com>
|
||||||
|
Date: Fri, 17 Jul 2020 08:37:02 -0500
|
||||||
|
Subject: [PATCH] Fix CheckHostName matching
|
||||||
|
|
||||||
|
---
|
||||||
|
src/internal.c | 18 ++++++++++++------
|
||||||
|
src/ssl.c | 5 +++++
|
||||||
|
tests/api.c | 30 ++++++++++++++++++++++++++++++
|
||||||
|
3 files changed, 47 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/internal.c b/src/internal.c
|
||||||
|
index dc57df0242..cda815d875 100644
|
||||||
|
--- a/src/internal.c
|
||||||
|
+++ b/src/internal.c
|
||||||
|
@@ -9346,7 +9346,7 @@ int CheckForAltNames(DecodedCert* dCert, const char* domain, int* checkCN)
|
||||||
|
altName = dCert->altNames;
|
||||||
|
|
||||||
|
if (checkCN != NULL) {
|
||||||
|
- *checkCN = altName == NULL;
|
||||||
|
+ *checkCN = (altName == NULL) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (altName) {
|
||||||
|
@@ -9415,23 +9415,29 @@ int CheckForAltNames(DecodedCert* dCert, const char* domain, int* checkCN)
|
||||||
|
int CheckHostName(DecodedCert* dCert, const char *domainName, size_t domainNameLen)
|
||||||
|
{
|
||||||
|
int checkCN;
|
||||||
|
+ int ret = DOMAIN_NAME_MISMATCH;
|
||||||
|
|
||||||
|
/* Assume name is NUL terminated. */
|
||||||
|
(void)domainNameLen;
|
||||||
|
|
||||||
|
if (CheckForAltNames(dCert, domainName, &checkCN) != 1) {
|
||||||
|
- WOLFSSL_MSG("DomainName match on alt names failed too");
|
||||||
|
- return DOMAIN_NAME_MISMATCH;
|
||||||
|
+ WOLFSSL_MSG("DomainName match on alt names failed");
|
||||||
|
}
|
||||||
|
+ else {
|
||||||
|
+ ret = 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (checkCN == 1) {
|
||||||
|
if (MatchDomainName(dCert->subjectCN, dCert->subjectCNLen,
|
||||||
|
- domainName) == 0) {
|
||||||
|
+ domainName) == 1) {
|
||||||
|
+ ret = 0;
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
WOLFSSL_MSG("DomainName match on common name failed");
|
||||||
|
- return DOMAIN_NAME_MISMATCH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- return 0;
|
||||||
|
+ return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CheckIPAddr(DecodedCert* dCert, const char* ipasc)
|
||||||
|
diff --git a/src/ssl.c b/src/ssl.c
|
||||||
|
index 11bc08a3cb..59ad9bae60 100644
|
||||||
|
--- a/src/ssl.c
|
||||||
|
+++ b/src/ssl.c
|
||||||
|
@@ -43661,6 +43661,11 @@ int wolfSSL_X509_check_host(WOLFSSL_X509 *x, const char *chk, size_t chklen,
|
||||||
|
(void)flags;
|
||||||
|
(void)peername;
|
||||||
|
|
||||||
|
+ if ((x == NULL) || (chk == NULL)) {
|
||||||
|
+ WOLFSSL_MSG("Invalid parameter");
|
||||||
|
+ return WOLFSSL_FAILURE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (flags == WOLFSSL_NO_WILDCARDS) {
|
||||||
|
WOLFSSL_MSG("X509_CHECK_FLAG_NO_WILDCARDS not yet implemented");
|
||||||
|
return WOLFSSL_FAILURE;
|
||||||
|
diff --git a/tests/api.c b/tests/api.c
|
||||||
|
index 774a332968..db888952d4 100644
|
||||||
|
--- a/tests/api.c
|
||||||
|
+++ b/tests/api.c
|
||||||
|
@@ -23875,6 +23875,35 @@ static void test_wolfSSL_X509_issuer_name_hash(void)
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void test_wolfSSL_X509_check_host(void)
|
||||||
|
+{
|
||||||
|
+#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) && !defined(NO_FILESYSTEM) \
|
||||||
|
+ && !defined(NO_SHA) && !defined(NO_RSA)
|
||||||
|
+
|
||||||
|
+ X509* x509;
|
||||||
|
+ const char altName[] = "example.com";
|
||||||
|
+
|
||||||
|
+ printf(testingFmt, "wolfSSL_X509_check_host()");
|
||||||
|
+
|
||||||
|
+ AssertNotNull(x509 = wolfSSL_X509_load_certificate_file(cliCertFile,
|
||||||
|
+ SSL_FILETYPE_PEM));
|
||||||
|
+
|
||||||
|
+ AssertIntEQ(X509_check_host(x509, altName, XSTRLEN(altName), 0, NULL),
|
||||||
|
+ WOLFSSL_SUCCESS);
|
||||||
|
+
|
||||||
|
+ AssertIntEQ(X509_check_host(x509, NULL, 0, 0, NULL),
|
||||||
|
+ WOLFSSL_FAILURE);
|
||||||
|
+
|
||||||
|
+ X509_free(x509);
|
||||||
|
+
|
||||||
|
+ AssertIntEQ(X509_check_host(NULL, altName, XSTRLEN(altName), 0, NULL),
|
||||||
|
+ WOLFSSL_FAILURE);
|
||||||
|
+
|
||||||
|
+ printf(resultFmt, passed);
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void test_wolfSSL_DES(void)
|
||||||
|
{
|
||||||
|
#if defined(OPENSSL_EXTRA) && !defined(NO_DES3)
|
||||||
|
@@ -36407,6 +36436,7 @@ void ApiTest(void)
|
||||||
|
test_wolfSSL_X509_INFO();
|
||||||
|
test_wolfSSL_X509_subject_name_hash();
|
||||||
|
test_wolfSSL_X509_issuer_name_hash();
|
||||||
|
+ test_wolfSSL_X509_check_host();
|
||||||
|
test_wolfSSL_DES();
|
||||||
|
test_wolfSSL_certs();
|
||||||
|
test_wolfSSL_ASN1_TIME_print();
|
@ -2,7 +2,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=xfrm
|
PKG_NAME:=xfrm
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -11,8 +11,8 @@ proto_xfrm_setup() {
|
|||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
local mode="xfrm"
|
local mode="xfrm"
|
||||||
|
|
||||||
local tunlink ifid mtu zone
|
local tunlink ifid mtu zone multicast
|
||||||
json_get_vars tunlink ifid mtu zone
|
json_get_vars tunlink ifid mtu zone multicast
|
||||||
|
|
||||||
[ -z "$tunlink" ] && {
|
[ -z "$tunlink" ] && {
|
||||||
proto_notify_error "$cfg" NO_TUNLINK
|
proto_notify_error "$cfg" NO_TUNLINK
|
||||||
@ -36,6 +36,8 @@ proto_xfrm_setup() {
|
|||||||
|
|
||||||
json_add_string link "$tunlink"
|
json_add_string link "$tunlink"
|
||||||
|
|
||||||
|
json_add_boolean multicast "${multicast:-1}"
|
||||||
|
|
||||||
json_add_object 'data'
|
json_add_object 'data'
|
||||||
[ -n "$ifid" ] && json_add_int ifid "$ifid"
|
[ -n "$ifid" ] && json_add_int ifid "$ifid"
|
||||||
json_close_object
|
json_close_object
|
||||||
@ -61,6 +63,7 @@ proto_xfrm_init_config() {
|
|||||||
proto_config_add_string "tunlink"
|
proto_config_add_string "tunlink"
|
||||||
proto_config_add_string "zone"
|
proto_config_add_string "zone"
|
||||||
proto_config_add_int "ifid"
|
proto_config_add_int "ifid"
|
||||||
|
proto_config_add_boolean "multicast"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ PKG_RELEASE:=16
|
|||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
|
||||||
PKG_SOURCE_DATE:=2020-03-28
|
PKG_SOURCE_DATE:=2020-12-08
|
||||||
PKG_SOURCE_VERSION:=f575351cbb3defc0bf52680c9082912a6c264374
|
PKG_SOURCE_VERSION:=0ffa3a31f7146d320214f431291c1196070a010f
|
||||||
PKG_MIRROR_HASH:=3a0df503be81d25da44a83ae36d5fbeaabae1b7c99f6eb8ffe6f62311e254d06
|
PKG_MIRROR_HASH:=16eab81663ad7bd7f650c62019b65ded21f08e797874041787543e2e8ed665e8
|
||||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
||||||
|
@ -99,4 +99,14 @@ config DROPBEAR_SCP
|
|||||||
bool "Build dropbear with scp"
|
bool "Build dropbear with scp"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
config DROPBEAR_ASKPASS
|
||||||
|
bool "Enable askpass helper support"
|
||||||
|
default n
|
||||||
|
depends on DROPBEAR_DBCLIENT
|
||||||
|
help
|
||||||
|
This enables support for ssh-askpass helper in dropbear client
|
||||||
|
in order to authenticate on remote hosts.
|
||||||
|
|
||||||
|
Increases binary size by about 0.1 kB (MIPS).
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=dropbear
|
PKG_NAME:=dropbear
|
||||||
PKG_VERSION:=2020.81
|
PKG_VERSION:=2020.81
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:= \
|
PKG_SOURCE_URL:= \
|
||||||
@ -32,7 +32,7 @@ PKG_CONFIG_DEPENDS:= \
|
|||||||
CONFIG_DROPBEAR_CURVE25519 CONFIG_DROPBEAR_ZLIB \
|
CONFIG_DROPBEAR_CURVE25519 CONFIG_DROPBEAR_ZLIB \
|
||||||
CONFIG_DROPBEAR_ED25519 CONFIG_DROPBEAR_CHACHA20POLY1305 \
|
CONFIG_DROPBEAR_ED25519 CONFIG_DROPBEAR_CHACHA20POLY1305 \
|
||||||
CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE \
|
CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE \
|
||||||
CONFIG_DROPBEAR_DBCLIENT CONFIG_DROPBEAR_SCP
|
CONFIG_DROPBEAR_DBCLIENT CONFIG_DROPBEAR_SCP CONFIG_DROPBEAR_ASKPASS
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
@ -96,47 +96,77 @@ CONFIGURE_ARGS += \
|
|||||||
$(if $(CONFIG_DROPBEAR_ZLIB),,--disable-zlib) \
|
$(if $(CONFIG_DROPBEAR_ZLIB),,--disable-zlib) \
|
||||||
--enable-bundled-libtom
|
--enable-bundled-libtom
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# option|value - add option to localoptions.h
|
||||||
|
# !!option|value - replace option in sysoptions.h
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# remove protocol idented software version number:
|
||||||
|
# - LOCAL_IDENT
|
||||||
|
# disable legacy/unsafe methods and unused functionality:
|
||||||
|
# - INETD_MODE
|
||||||
|
# - DROPBEAR_CLI_NETCAT
|
||||||
|
# - DROPBEAR_DSS
|
||||||
|
# - DO_MOTD
|
||||||
|
DB_OPT_COMMON = \
|
||||||
|
DEFAULT_PATH|"$(TARGET_INIT_PATH)" \
|
||||||
|
!!LOCAL_IDENT|"SSH-2.0-dropbear" \
|
||||||
|
INETD_MODE|0 \
|
||||||
|
DROPBEAR_CLI_NETCAT|0 \
|
||||||
|
DROPBEAR_DSS|0 \
|
||||||
|
DO_MOTD|0 \
|
||||||
|
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# option|config|enabled|disabled = add option to localoptions.h
|
||||||
|
# !!option|config|enabled|disabled = replace option in sysoptions.h
|
||||||
|
#
|
||||||
|
# option := (config) ? enabled : disabled
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
DB_OPT_CONFIG = \
|
||||||
|
DROPBEAR_CURVE25519|CONFIG_DROPBEAR_CURVE25519|1|0 \
|
||||||
|
DROPBEAR_ED25519|CONFIG_DROPBEAR_ED25519|1|0 \
|
||||||
|
DROPBEAR_CHACHA20POLY1305|CONFIG_DROPBEAR_CHACHA20POLY1305|1|0 \
|
||||||
|
DROPBEAR_ECDSA|CONFIG_DROPBEAR_ECC|1|0 \
|
||||||
|
DROPBEAR_ECDH|CONFIG_DROPBEAR_ECC|1|0 \
|
||||||
|
!!DROPBEAR_ECC_384|CONFIG_DROPBEAR_ECC_FULL|1|0 \
|
||||||
|
!!DROPBEAR_ECC_521|CONFIG_DROPBEAR_ECC_FULL|1|0 \
|
||||||
|
DROPBEAR_CLI_ASKPASS_HELPER|CONFIG_DROPBEAR_ASKPASS|1|0 \
|
||||||
|
|
||||||
|
|
||||||
TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections -flto
|
TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections -flto
|
||||||
TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver
|
TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver
|
||||||
|
|
||||||
|
db_opt_add =echo '\#define $(1) $(2)' >> $(PKG_BUILD_DIR)/localoptions.h
|
||||||
|
db_opt_replace =$(ESED) 's,^(\#define $(1)) .*$$$$,\1 $(2),g' $(PKG_BUILD_DIR)/sysoptions.h
|
||||||
|
|
||||||
|
define Build/Configure/dropbear_headers
|
||||||
|
$(strip $(foreach s,$(DB_OPT_COMMON), \
|
||||||
|
$(if $(filter !!%,$(word 1,$(subst |, ,$(s)))), \
|
||||||
|
$(call db_opt_replace,$(patsubst !!%,%,$(word 1,$(subst |, ,$(s)))),$(word 2,$(subst |, ,$(s)))), \
|
||||||
|
$(call db_opt_add,$(word 1,$(subst |, ,$(s))),$(word 2,$(subst |, ,$(s)))) \
|
||||||
|
) ; \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(strip $(foreach s,$(DB_OPT_CONFIG), \
|
||||||
|
$(if $(filter !!%,$(word 1,$(subst |, ,$(s)))), \
|
||||||
|
$(call db_opt_replace,$(patsubst !!%,%,$(word 1,$(subst |, ,$(s)))),$(if $($(word 2,$(subst |, ,$(s)))),$(word 3,$(subst |, ,$(s))),$(word 4,$(subst |, ,$(s))))), \
|
||||||
|
$(call db_opt_add,$(word 1,$(subst |, ,$(s))),$(if $($(word 2,$(subst |, ,$(s)))),$(word 3,$(subst |, ,$(s))),$(word 4,$(subst |, ,$(s))))) \
|
||||||
|
) ; \
|
||||||
|
))
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
: > $(PKG_BUILD_DIR)/localoptions.h
|
: > $(PKG_BUILD_DIR)/localoptions.h
|
||||||
|
|
||||||
$(Build/Configure/Default)
|
$(Build/Configure/Default)
|
||||||
|
|
||||||
echo '#define DEFAULT_PATH "$(TARGET_INIT_PATH)"' >> \
|
$(Build/Configure/dropbear_headers)
|
||||||
$(PKG_BUILD_DIR)/localoptions.h
|
|
||||||
|
|
||||||
echo '#define DROPBEAR_CURVE25519 $(if $(CONFIG_DROPBEAR_CURVE25519),1,0)' >> \
|
|
||||||
$(PKG_BUILD_DIR)/localoptions.h
|
|
||||||
|
|
||||||
for OPTION in DROPBEAR_ECDSA DROPBEAR_ECDH; do \
|
|
||||||
echo "#define $$$$OPTION $(if $(CONFIG_DROPBEAR_ECC),1,0)" >> \
|
|
||||||
$(PKG_BUILD_DIR)/localoptions.h; \
|
|
||||||
done
|
|
||||||
|
|
||||||
echo '#define DROPBEAR_ED25519 $(if $(CONFIG_DROPBEAR_ED25519),1,0)' >> \
|
|
||||||
$(PKG_BUILD_DIR)/localoptions.h
|
|
||||||
|
|
||||||
echo '#define DROPBEAR_CHACHA20POLY1305 $(if $(CONFIG_DROPBEAR_CHACHA20POLY1305),1,0)' >> \
|
|
||||||
$(PKG_BUILD_DIR)/localoptions.h
|
|
||||||
|
|
||||||
# remove protocol idented software version number
|
|
||||||
$(ESED) 's,^(#define LOCAL_IDENT) .*$$$$,\1 "SSH-2.0-dropbear",g' \
|
|
||||||
$(PKG_BUILD_DIR)/sysoptions.h
|
|
||||||
|
|
||||||
# disable legacy/unsafe methods and unused functionality
|
|
||||||
for OPTION in INETD_MODE DROPBEAR_CLI_NETCAT \
|
|
||||||
DROPBEAR_DSS DROPBEAR_USE_PASSWORD_ENV DO_MOTD ; do \
|
|
||||||
echo "#define $$$$OPTION 0" >> \
|
|
||||||
$(PKG_BUILD_DIR)/localoptions.h; \
|
|
||||||
done
|
|
||||||
|
|
||||||
# enable nistp384 and nistp521 only if full ECC support was requested
|
|
||||||
for OPTION in DROPBEAR_ECC_384 DROPBEAR_ECC_521; do \
|
|
||||||
$(ESED) 's,^(#define '$$$$OPTION') .*$$$$,\1 $(if $(CONFIG_DROPBEAR_ECC_FULL),1,0),g' \
|
|
||||||
$(PKG_BUILD_DIR)/sysoptions.h; \
|
|
||||||
done
|
|
||||||
|
|
||||||
# Enforce rebuild of svr-chansession.c
|
# Enforce rebuild of svr-chansession.c
|
||||||
rm -f $(PKG_BUILD_DIR)/svr-chansession.o
|
rm -f $(PKG_BUILD_DIR)/svr-chansession.o
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=hostapd
|
PKG_NAME:=hostapd
|
||||||
PKG_RELEASE:=17
|
PKG_RELEASE:=18
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
@ -124,7 +124,7 @@ hostapd_prepare_device_config() {
|
|||||||
set_default country_ie 1
|
set_default country_ie 1
|
||||||
set_default spectrum_mgmt_required 0
|
set_default spectrum_mgmt_required 0
|
||||||
set_default doth 1
|
set_default doth 1
|
||||||
set_default legacy_rates 1
|
set_default legacy_rates 0
|
||||||
set_default airtime_mode 0
|
set_default airtime_mode 0
|
||||||
set_default cell_density 0
|
set_default cell_density 0
|
||||||
|
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
From 23509dc05b24a28fb46022800e0e271ae0118de2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jo-Philipp Wich <jo@mein.io>
|
||||||
|
Date: Wed, 9 Dec 2020 12:04:04 +0100
|
||||||
|
Subject: [PATCH] build: prevent conflict with official AX_LIB_READLINE macro
|
||||||
|
|
||||||
|
On systems where the official AX_LIB_READLINE (ax_lib_readline.m4) is
|
||||||
|
present in a globally shared autoconf include directory, auto(re)conf
|
||||||
|
will prefer including that offical version over the local variant due
|
||||||
|
to the offical macro having a higher serial number.
|
||||||
|
|
||||||
|
As a consequence, @READLINE_LIBS@ will not be substituted in *.in files,
|
||||||
|
eventually failing the compilation with errors similar to:
|
||||||
|
|
||||||
|
gcc: error: READLINE_LIBS@: No such file or directory
|
||||||
|
|
||||||
|
Avoid this problem by renaming the incompatible local macro to
|
||||||
|
AX_LIB_READLINE_LLDPD which is sufficient to prevent any clashes.
|
||||||
|
|
||||||
|
We encountered this problem on OpenWrt which uses GNU autoconf-archive
|
||||||
|
to provide commonly used M4 macros through a global include directory,
|
||||||
|
which happens to ship AX_LIB_READLINE as well.
|
||||||
|
|
||||||
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
||||||
|
---
|
||||||
|
configure.ac | 2 +-
|
||||||
|
m4/ax_lib_readline.m4 | 6 +++---
|
||||||
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -273,7 +273,7 @@ AC_ARG_WITH([readline],
|
||||||
|
[],
|
||||||
|
[with_readline=auto])
|
||||||
|
if test x"$with_readline" != x"no"; then
|
||||||
|
- AX_LIB_READLINE
|
||||||
|
+ AX_LIB_READLINE_LLDPD
|
||||||
|
if test x"$with_readline" != x"check" -a x"$with_readline" != x"auto"; then
|
||||||
|
if test x"$ax_cv_lib_readline" = x"no"; then
|
||||||
|
AC_MSG_FAILURE([*** no readline support found])
|
||||||
|
--- a/m4/ax_lib_readline.m4
|
||||||
|
+++ b/m4/ax_lib_readline.m4
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
-# AX_LIB_READLINE
|
||||||
|
+# AX_LIB_READLINE_LLDPD
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
@@ -66,8 +66,8 @@
|
||||||
|
|
||||||
|
#serial 6
|
||||||
|
|
||||||
|
-AU_ALIAS([VL_LIB_READLINE], [AX_LIB_READLINE])
|
||||||
|
-AC_DEFUN([AX_LIB_READLINE], [
|
||||||
|
+AU_ALIAS([VL_LIB_READLINE], [AX_LIB_READLINE_LLDPD])
|
||||||
|
+AC_DEFUN([AX_LIB_READLINE_LLDPD], [
|
||||||
|
AC_CACHE_CHECK([for a readline compatible library],
|
||||||
|
ax_cv_lib_readline, [
|
||||||
|
_save_LIBS="$LIBS"
|
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
|||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
|
||||||
PKG_SOURCE_DATE:=2020-11-15
|
PKG_SOURCE_DATE:=2020-12-13
|
||||||
PKG_SOURCE_VERSION:=fb55e80394c51d7502bb278f57520dec15a11355
|
PKG_SOURCE_VERSION:=2cf6232fd170a24b801d71d497947d7aabd12015
|
||||||
PKG_MIRROR_HASH:=631d15fd7c93529fa33433380c4811dbacca9665864e5836c6daca0c7165f25a
|
PKG_MIRROR_HASH:=097a6b186bc85cc8ff95a611e23ab50a6d8025988f19e0d48520e12a1020274d
|
||||||
|
|
||||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2010-2013 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=openvpn-easy-rsa
|
|
||||||
|
|
||||||
PKG_VERSION:=3.0.4
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
PKG_SOURCE_URL:=https://github.com/OpenVPN/easy-rsa/releases/download/v$(PKG_VERSION)/
|
|
||||||
PKG_SOURCE:=EasyRSA-$(PKG_VERSION).tgz
|
|
||||||
PKG_HASH:=472167f976c6cb7c860cec6150a5616e163ae20365c81f179811d6ee0779ec5a
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/EasyRSA-$(PKG_VERSION)
|
|
||||||
PKGARCH:=all
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define Package/openvpn-easy-rsa
|
|
||||||
TITLE:=CLI utility to build and manage a PKI CA.
|
|
||||||
SECTION:=net
|
|
||||||
CATEGORY:=Network
|
|
||||||
URL:=http://openvpn.net
|
|
||||||
SUBMENU:=VPN
|
|
||||||
DEPENDS:=+openssl-util
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/openvpn-easy-rsa/conffiles
|
|
||||||
/etc/easy-rsa/vars
|
|
||||||
/etc/easy-rsa/openssl-1.0.cnf
|
|
||||||
/etc/easy-rsa/openssl-easyrsa.cnf
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Configure
|
|
||||||
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/openvpn-easy-rsa/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/easyrsa $(1)/usr/bin/
|
|
||||||
$(INSTALL_DIR) $(1)/etc/easy-rsa
|
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/openssl-easyrsa.cnf $(1)/etc/easy-rsa/openssl-1.0.cnf
|
|
||||||
$(LN) /etc/easy-rsa/openssl-1.0.cnf $(1)/etc/easy-rsa/openssl-easyrsa.cnf
|
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/vars.example $(1)/etc/easy-rsa/vars
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/etc/easy-rsa/pki
|
|
||||||
chmod 700 $(1)/etc/easy-rsa/pki
|
|
||||||
$(INSTALL_DIR) $(1)/etc/easy-rsa/pki/private
|
|
||||||
chmod 700 $(1)/etc/easy-rsa/pki/private
|
|
||||||
$(INSTALL_DIR) $(1)/etc/easy-rsa/pki/reqs
|
|
||||||
chmod 700 $(1)/etc/easy-rsa/pki/reqs
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/etc/easy-rsa/x509-types
|
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/x509-types/* $(1)/etc/easy-rsa/x509-types/
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
|
||||||
$(INSTALL_DATA) files/openvpn-easy-rsa.upgrade $(1)/lib/upgrade/keep.d/$(PKG_NAME)
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,openvpn-easy-rsa))
|
|
@ -1 +0,0 @@
|
|||||||
/etc/easy-rsa/pki/
|
|
@ -1,22 +0,0 @@
|
|||||||
Index: EasyRSA-3.0.4/easyrsa
|
|
||||||
===================================================================
|
|
||||||
--- EasyRSA-3.0.4.orig/easyrsa
|
|
||||||
+++ EasyRSA-3.0.4/easyrsa
|
|
||||||
@@ -1033,7 +1033,7 @@ vars_setup() {
|
|
||||||
vars=
|
|
||||||
|
|
||||||
# set up program path
|
|
||||||
- prog_vars="${0%/*}/vars"
|
|
||||||
+ prog_vars="/etc/easy-rsa/vars"
|
|
||||||
# set up PKI path
|
|
||||||
pki_vars="${EASYRSA_PKI:-$PWD/pki}/vars"
|
|
||||||
|
|
||||||
@@ -1060,7 +1060,7 @@ Note: using Easy-RSA configuration from:
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set defaults, preferring existing env-vars if present
|
|
||||||
- set_var EASYRSA "${0%/*}"
|
|
||||||
+ set_var EASYRSA "/etc/easy-rsa"
|
|
||||||
set_var EASYRSA_OPENSSL openssl
|
|
||||||
set_var EASYRSA_PKI "$PWD/pki"
|
|
||||||
set_var EASYRSA_DN cn_only
|
|
@ -1,58 +0,0 @@
|
|||||||
if PACKAGE_openvpn-mbedtls
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_LZO
|
|
||||||
bool "Enable LZO compression support"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_LZ4
|
|
||||||
bool "Enable LZ4 compression support"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_SERVER
|
|
||||||
bool "Enable server support (otherwise only client mode is support)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
#config OPENVPN_mbedtls_ENABLE_EUREPHIA
|
|
||||||
# bool "Enable support for the eurephia plug-in"
|
|
||||||
# default n
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_MANAGEMENT
|
|
||||||
bool "Enable management server support"
|
|
||||||
default n
|
|
||||||
|
|
||||||
#config OPENVPN_mbedtls_ENABLE_PKCS11
|
|
||||||
# bool "Enable pkcs11 support"
|
|
||||||
# default n
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_FRAGMENT
|
|
||||||
bool "Enable internal fragmentation support (--fragment)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_MULTIHOME
|
|
||||||
bool "Enable multi-homed UDP server support (--multihome)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_PORT_SHARE
|
|
||||||
bool "Enable TCP server port-share support (--port-share)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_DEF_AUTH
|
|
||||||
bool "Enable deferred authentication"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_PF
|
|
||||||
bool "Enable internal packet filter"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_IPROUTE2
|
|
||||||
bool "Enable support for iproute2"
|
|
||||||
default n
|
|
||||||
|
|
||||||
config OPENVPN_mbedtls_ENABLE_SMALL
|
|
||||||
bool "Enable size optimization"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
enable smaller executable size (disable OCC, usage
|
|
||||||
message, and verb 4 parm list)
|
|
||||||
|
|
||||||
endif
|
|
@ -1,50 +0,0 @@
|
|||||||
if PACKAGE_openvpn-nossl
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_LZO
|
|
||||||
bool "Enable LZO compression support"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_LZ4
|
|
||||||
bool "Enable LZ4 compression support"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_SERVER
|
|
||||||
bool "Enable server support (otherwise only client mode is support)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_MANAGEMENT
|
|
||||||
bool "Enable management server support"
|
|
||||||
default n
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_FRAGMENT
|
|
||||||
bool "Enable internal fragmentation support (--fragment)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_MULTIHOME
|
|
||||||
bool "Enable multi-homed UDP server support (--multihome)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_PORT_SHARE
|
|
||||||
bool "Enable TCP server port-share support (--port-share)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_DEF_AUTH
|
|
||||||
bool "Enable deferred authentication"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_PF
|
|
||||||
bool "Enable internal packet filter"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_IPROUTE2
|
|
||||||
bool "Enable support for iproute2"
|
|
||||||
default n
|
|
||||||
|
|
||||||
config OPENVPN_nossl_ENABLE_SMALL
|
|
||||||
bool "Enable size optimization"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
enable smaller executable size (disable OCC, usage
|
|
||||||
message, and verb 4 parm list)
|
|
||||||
|
|
||||||
endif
|
|
@ -1,62 +0,0 @@
|
|||||||
if PACKAGE_openvpn-openssl
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_LZO
|
|
||||||
bool "Enable LZO compression support"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_LZ4
|
|
||||||
bool "Enable LZ4 compression support"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_X509_ALT_USERNAME
|
|
||||||
bool "Enable the --x509-username-field feature"
|
|
||||||
default n
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_SERVER
|
|
||||||
bool "Enable server support (otherwise only client mode is support)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
#config OPENVPN_openssl_ENABLE_EUREPHIA
|
|
||||||
# bool "Enable support for the eurephia plug-in"
|
|
||||||
# default n
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_MANAGEMENT
|
|
||||||
bool "Enable management server support"
|
|
||||||
default n
|
|
||||||
|
|
||||||
#config OPENVPN_openssl_ENABLE_PKCS11
|
|
||||||
# bool "Enable pkcs11 support"
|
|
||||||
# default n
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_FRAGMENT
|
|
||||||
bool "Enable internal fragmentation support (--fragment)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_MULTIHOME
|
|
||||||
bool "Enable multi-homed UDP server support (--multihome)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_PORT_SHARE
|
|
||||||
bool "Enable TCP server port-share support (--port-share)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_DEF_AUTH
|
|
||||||
bool "Enable deferred authentication"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_PF
|
|
||||||
bool "Enable internal packet filter"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_IPROUTE2
|
|
||||||
bool "Enable support for iproute2"
|
|
||||||
default n
|
|
||||||
|
|
||||||
config OPENVPN_openssl_ENABLE_SMALL
|
|
||||||
bool "Enable size optimization"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
enable smaller executable size (disable OCC, usage
|
|
||||||
message, and verb 4 parm list)
|
|
||||||
|
|
||||||
endif
|
|
@ -1,158 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2010-2015 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=openvpn
|
|
||||||
|
|
||||||
PKG_VERSION:=2.4.9
|
|
||||||
PKG_RELEASE:=5
|
|
||||||
|
|
||||||
PKG_SOURCE_URL:=\
|
|
||||||
https://build.openvpn.net/downloads/releases/ \
|
|
||||||
https://swupdate.openvpn.net/community/releases/
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
||||||
PKG_HASH:=641f3add8694b2ccc39fd4fd92554e4f089ad16a8db6d2b473ec284839a5ebe2
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
|
||||||
PKG_FIXUP:=autoreconf
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
|
||||||
PKG_CPE_ID:=cpe:/a:openvpn:openvpn
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define Package/openvpn/Default
|
|
||||||
TITLE:=Open source VPN solution using $(2)
|
|
||||||
SECTION:=net
|
|
||||||
CATEGORY:=Network
|
|
||||||
URL:=http://openvpn.net
|
|
||||||
SUBMENU:=VPN
|
|
||||||
MENU:=1
|
|
||||||
DEPENDS:=+kmod-tun +OPENVPN_$(1)_ENABLE_LZO:liblzo +OPENVPN_$(1)_ENABLE_IPROUTE2:ip $(3)
|
|
||||||
VARIANT:=$(1)
|
|
||||||
ifeq ($(1),nossl)
|
|
||||||
PROVIDES:=openvpn
|
|
||||||
else
|
|
||||||
PROVIDES:=openvpn openvpn-crypto
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
Package/openvpn-openssl=$(call Package/openvpn/Default,openssl,OpenSSL,+PACKAGE_openvpn-openssl:libopenssl)
|
|
||||||
Package/openvpn-mbedtls=$(call Package/openvpn/Default,mbedtls,mbedTLS,+PACKAGE_openvpn-mbedtls:libmbedtls)
|
|
||||||
Package/openvpn-nossl=$(call Package/openvpn/Default,nossl,plaintext (no SSL))
|
|
||||||
|
|
||||||
define Package/openvpn/config/Default
|
|
||||||
source "$(SOURCE)/Config-$(1).in"
|
|
||||||
endef
|
|
||||||
|
|
||||||
Package/openvpn-openssl/config=$(call Package/openvpn/config/Default,openssl)
|
|
||||||
Package/openvpn-mbedtls/config=$(call Package/openvpn/config/Default,mbedtls)
|
|
||||||
Package/openvpn-nossl/config=$(call Package/openvpn/config/Default,nossl)
|
|
||||||
|
|
||||||
ifeq ($(BUILD_VARIANT),mbedtls)
|
|
||||||
CONFIG_OPENVPN_MBEDTLS:=y
|
|
||||||
endif
|
|
||||||
ifeq ($(BUILD_VARIANT),openssl)
|
|
||||||
CONFIG_OPENVPN_OPENSSL:=y
|
|
||||||
endif
|
|
||||||
ifeq ($(BUILD_VARIANT),nossl)
|
|
||||||
CONFIG_OPENVPN_NOSSL:=y
|
|
||||||
endif
|
|
||||||
|
|
||||||
CONFIGURE_VARS += \
|
|
||||||
IFCONFIG=/sbin/ifconfig \
|
|
||||||
ROUTE=/sbin/route \
|
|
||||||
IPROUTE=/sbin/ip \
|
|
||||||
NETSTAT=/sbin/netstat
|
|
||||||
|
|
||||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections
|
|
||||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
|
||||||
|
|
||||||
define Build/Configure
|
|
||||||
$(call Build/Configure/Default, \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_SMALL),--enable-small) \
|
|
||||||
--disable-selinux \
|
|
||||||
--disable-systemd \
|
|
||||||
--disable-plugins \
|
|
||||||
--disable-debug \
|
|
||||||
--disable-pkcs11 \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_LZO),--enable,--disable)-lzo \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_LZ4),--enable,--disable)-lz4 \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_X509_ALT_USERNAME),--enable,--disable)-x509-alt-username \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_SERVER),--enable,--disable)-server \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_MANAGEMENT),--enable,--disable)-management \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_FRAGMENT),--enable,--disable)-fragment \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_MULTIHOME),--enable,--disable)-multihome \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_IPROUTE2),--enable,--disable)-iproute2 \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_DEF_AUTH),--enable,--disable)-def-auth \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_PF),--enable,--disable)-pf \
|
|
||||||
$(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_PORT_SHARE),--enable,--disable)-port-share \
|
|
||||||
$(if $(CONFIG_OPENVPN_NOSSL),--disable-crypto,--enable-crypto) \
|
|
||||||
$(if $(CONFIG_OPENVPN_OPENSSL),--with-crypto-library=openssl) \
|
|
||||||
$(if $(CONFIG_OPENVPN_MBEDTLS),--with-crypto-library=mbedtls) \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/openvpn-$(BUILD_VARIANT)/conffiles
|
|
||||||
/etc/config/openvpn
|
|
||||||
/etc/openvpn.user
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/openvpn-$(BUILD_VARIANT)/install
|
|
||||||
$(INSTALL_DIR) \
|
|
||||||
$(1)/usr/sbin \
|
|
||||||
$(1)/usr/share/openvpn \
|
|
||||||
$(1)/etc/init.d \
|
|
||||||
$(1)/etc/config \
|
|
||||||
$(1)/etc/openvpn \
|
|
||||||
$(1)/lib/functions \
|
|
||||||
$(1)/lib/upgrade/keep.d \
|
|
||||||
$(1)/usr/libexec \
|
|
||||||
$(1)/etc/hotplug.d/openvpn
|
|
||||||
|
|
||||||
$(INSTALL_BIN) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/sbin/openvpn \
|
|
||||||
$(1)/usr/sbin/
|
|
||||||
|
|
||||||
$(INSTALL_BIN) \
|
|
||||||
files/openvpn.init \
|
|
||||||
$(1)/etc/init.d/openvpn
|
|
||||||
|
|
||||||
$(INSTALL_BIN) \
|
|
||||||
files/usr/libexec/openvpn-hotplug \
|
|
||||||
$(1)/usr/libexec/openvpn-hotplug
|
|
||||||
|
|
||||||
$(INSTALL_DATA) \
|
|
||||||
files/lib/functions/openvpn.sh \
|
|
||||||
$(1)/lib/functions/openvpn.sh
|
|
||||||
|
|
||||||
$(INSTALL_DATA) \
|
|
||||||
files/etc/hotplug.d/openvpn/01-user \
|
|
||||||
$(1)/etc/hotplug.d/openvpn/01-user
|
|
||||||
|
|
||||||
$(INSTALL_DATA) \
|
|
||||||
files/etc/openvpn.user \
|
|
||||||
$(1)/etc/openvpn.user
|
|
||||||
|
|
||||||
$(INSTALL_DATA) \
|
|
||||||
files/openvpn.options \
|
|
||||||
$(1)/usr/share/openvpn/openvpn.options
|
|
||||||
|
|
||||||
$(INSTALL_CONF) files/openvpn.config \
|
|
||||||
$(1)/etc/config/openvpn
|
|
||||||
|
|
||||||
$(INSTALL_DATA) \
|
|
||||||
files/openvpn.upgrade \
|
|
||||||
$(1)/lib/upgrade/keep.d/openvpn
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,openvpn-openssl))
|
|
||||||
$(eval $(call BuildPackage,openvpn-mbedtls))
|
|
||||||
$(eval $(call BuildPackage,openvpn-nossl))
|
|
@ -1,22 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
. /lib/functions/openvpn.sh
|
|
||||||
|
|
||||||
[ -e "/etc/openvpn.user" ] && {
|
|
||||||
env -i ACTION="$ACTION" INSTANCE="$INSTANCE" \
|
|
||||||
/bin/sh \
|
|
||||||
/etc/openvpn.user \
|
|
||||||
$*
|
|
||||||
}
|
|
||||||
|
|
||||||
# Wrap user defined scripts on up/down events
|
|
||||||
case "$ACTION" in
|
|
||||||
up|down)
|
|
||||||
if get_openvpn_option "$config" command "$ACTION"; then
|
|
||||||
shift
|
|
||||||
exec /bin/sh -c "$command $*"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# This file is interpreted as shell script.
|
|
||||||
# Put your custom openvpn action here, they will
|
|
||||||
# be executed with each opevnp event.
|
|
||||||
#
|
|
||||||
# $ACTION
|
|
||||||
# <down> down action is generated after the TUN/TAP device is closed
|
|
||||||
# <up> up action is generated after the TUN/TAP device is opened
|
|
||||||
# $INSTANCE Name of the openvpn instance which went up or down
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
get_openvpn_option() {
|
|
||||||
local config="$1"
|
|
||||||
local variable="$2"
|
|
||||||
local option="$3"
|
|
||||||
|
|
||||||
local value="$(sed -rne 's/^[ \t]*'"$option"'[ \t]+(([^ \t\\]|\\.)+)[ \t]*$/\1/p' "$config" | tail -n1 | sed -re 's/\\(.)/\1/g')"
|
|
||||||
[ -n "$value" ] || value="$(sed -rne 's/^[ \t]*'"$option"'[ \t]+'"'([^']+)'"'[ \t]*$/\1/p' "$config" | tail -n1)"
|
|
||||||
[ -n "$value" ] || value="$(sed -rne 's/^[ \t]*'"$option"'[ \t]+"(([^"\\]|\\.)+)"[ \t]*$/\1/p' "$config" | tail -n1 | sed -re 's/\\(.)/\1/g')"
|
|
||||||
[ -n "$value" ] || return 1
|
|
||||||
|
|
||||||
export -n "$variable=$value"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
@ -1,474 +0,0 @@
|
|||||||
package openvpn
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
# Sample to include a custom config file. #
|
|
||||||
#################################################
|
|
||||||
|
|
||||||
config openvpn custom_config
|
|
||||||
|
|
||||||
# Set to 1 to enable this instance:
|
|
||||||
option enabled 0
|
|
||||||
|
|
||||||
# Include OpenVPN configuration
|
|
||||||
option config /etc/openvpn/my-vpn.conf
|
|
||||||
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
# Sample OpenVPN 2.0 uci config for #
|
|
||||||
# multi-client server. #
|
|
||||||
#################################################
|
|
||||||
|
|
||||||
config openvpn sample_server
|
|
||||||
|
|
||||||
# Set to 1 to enable this instance:
|
|
||||||
option enabled 0
|
|
||||||
|
|
||||||
# Which local IP address should OpenVPN
|
|
||||||
# listen on? (optional)
|
|
||||||
# option local 0.0.0.0
|
|
||||||
|
|
||||||
# Which TCP/UDP port should OpenVPN listen on?
|
|
||||||
# If you want to run multiple OpenVPN instances
|
|
||||||
# on the same machine, use a different port
|
|
||||||
# number for each one. You will need to
|
|
||||||
# open up this port on your firewall.
|
|
||||||
option port 1194
|
|
||||||
|
|
||||||
# TCP or UDP server?
|
|
||||||
# option proto tcp
|
|
||||||
option proto udp
|
|
||||||
|
|
||||||
# "dev tun" will create a routed IP tunnel,
|
|
||||||
# "dev tap" will create an ethernet tunnel.
|
|
||||||
# Use "dev tap0" if you are ethernet bridging
|
|
||||||
# and have precreated a tap0 virtual interface
|
|
||||||
# and bridged it with your ethernet interface.
|
|
||||||
# If you want to control access policies
|
|
||||||
# over the VPN, you must create firewall
|
|
||||||
# rules for the the TUN/TAP interface.
|
|
||||||
# On non-Windows systems, you can give
|
|
||||||
# an explicit unit number, such as tun0.
|
|
||||||
# On Windows, use "dev-node" for this.
|
|
||||||
# On most systems, the VPN will not function
|
|
||||||
# unless you partially or fully disable
|
|
||||||
# the firewall for the TUN/TAP interface.
|
|
||||||
# option dev tap
|
|
||||||
option dev tun
|
|
||||||
|
|
||||||
# SSL/TLS root certificate (ca), certificate
|
|
||||||
# (cert), and private key (key). Each client
|
|
||||||
# and the server must have their own cert and
|
|
||||||
# key file. The server and all clients will
|
|
||||||
# use the same ca file.
|
|
||||||
#
|
|
||||||
# See the "easy-rsa" directory for a series
|
|
||||||
# of scripts for generating RSA certificates
|
|
||||||
# and private keys. Remember to use
|
|
||||||
# a unique Common Name for the server
|
|
||||||
# and each of the client certificates.
|
|
||||||
#
|
|
||||||
# Any X509 key management system can be used.
|
|
||||||
# OpenVPN can also use a PKCS #12 formatted key file
|
|
||||||
# (see "pkcs12" directive in man page).
|
|
||||||
option ca /etc/openvpn/ca.crt
|
|
||||||
option cert /etc/openvpn/server.crt
|
|
||||||
# This file should be kept secret:
|
|
||||||
option key /etc/openvpn/server.key
|
|
||||||
|
|
||||||
# Diffie hellman parameters.
|
|
||||||
# Generate your own with:
|
|
||||||
# openssl dhparam -out dh2048.pem 2048
|
|
||||||
# Substitute 2048 for 1024 if you are using
|
|
||||||
# 1024 bit keys.
|
|
||||||
option dh /etc/openvpn/dh2048.pem
|
|
||||||
|
|
||||||
# Configure server mode and supply a VPN subnet
|
|
||||||
# for OpenVPN to draw client addresses from.
|
|
||||||
# The server will take 10.8.0.1 for itself,
|
|
||||||
# the rest will be made available to clients.
|
|
||||||
# Each client will be able to reach the server
|
|
||||||
# on 10.8.0.1. Comment this line out if you are
|
|
||||||
# ethernet bridging. See the man page for more info.
|
|
||||||
option server "10.8.0.0 255.255.255.0"
|
|
||||||
|
|
||||||
# Maintain a record of client <-> virtual IP address
|
|
||||||
# associations in this file. If OpenVPN goes down or
|
|
||||||
# is restarted, reconnecting clients can be assigned
|
|
||||||
# the same virtual IP address from the pool that was
|
|
||||||
# previously assigned.
|
|
||||||
option ifconfig_pool_persist /tmp/ipp.txt
|
|
||||||
|
|
||||||
# Configure server mode for ethernet bridging.
|
|
||||||
# You must first use your OS's bridging capability
|
|
||||||
# to bridge the TAP interface with the ethernet
|
|
||||||
# NIC interface. Then you must manually set the
|
|
||||||
# IP/netmask on the bridge interface, here we
|
|
||||||
# assume 10.8.0.4/255.255.255.0. Finally we
|
|
||||||
# must set aside an IP range in this subnet
|
|
||||||
# (start=10.8.0.50 end=10.8.0.100) to allocate
|
|
||||||
# to connecting clients. Leave this line commented
|
|
||||||
# out unless you are ethernet bridging.
|
|
||||||
# option server_bridge "10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100"
|
|
||||||
|
|
||||||
# Push routes to the client to allow it
|
|
||||||
# to reach other private subnets behind
|
|
||||||
# the server. Remember that these
|
|
||||||
# private subnets will also need
|
|
||||||
# to know to route the OpenVPN client
|
|
||||||
# address pool (10.8.0.0/255.255.255.0)
|
|
||||||
# back to the OpenVPN server.
|
|
||||||
# list push "route 192.168.10.0 255.255.255.0"
|
|
||||||
# list push "route 192.168.20.0 255.255.255.0"
|
|
||||||
|
|
||||||
# To assign specific IP addresses to specific
|
|
||||||
# clients or if a connecting client has a private
|
|
||||||
# subnet behind it that should also have VPN access,
|
|
||||||
# use the subdirectory "ccd" for client-specific
|
|
||||||
# configuration files (see man page for more info).
|
|
||||||
|
|
||||||
# EXAMPLE: Suppose the client
|
|
||||||
# having the certificate common name "Thelonious"
|
|
||||||
# also has a small subnet behind his connecting
|
|
||||||
# machine, such as 192.168.40.128/255.255.255.248.
|
|
||||||
# First, uncomment out these lines:
|
|
||||||
# option client_config_dir /etc/openvpn/ccd
|
|
||||||
# list route "192.168.40.128 255.255.255.248"
|
|
||||||
# Then create a file ccd/Thelonious with this line:
|
|
||||||
# iroute 192.168.40.128 255.255.255.248
|
|
||||||
# This will allow Thelonious' private subnet to
|
|
||||||
# access the VPN. This example will only work
|
|
||||||
# if you are routing, not bridging, i.e. you are
|
|
||||||
# using "dev tun" and "server" directives.
|
|
||||||
|
|
||||||
# EXAMPLE: Suppose you want to give
|
|
||||||
# Thelonious a fixed VPN IP address of 10.9.0.1.
|
|
||||||
# First uncomment out these lines:
|
|
||||||
# option client_config_dir /etc/openvpn/ccd
|
|
||||||
# list route "10.9.0.0 255.255.255.252"
|
|
||||||
# list route "192.168.100.0 255.255.255.0"
|
|
||||||
# Then add this line to ccd/Thelonious:
|
|
||||||
# ifconfig-push "10.9.0.1 10.9.0.2"
|
|
||||||
|
|
||||||
# Suppose that you want to enable different
|
|
||||||
# firewall access policies for different groups
|
|
||||||
# of clients. There are two methods:
|
|
||||||
# (1) Run multiple OpenVPN daemons, one for each
|
|
||||||
# group, and firewall the TUN/TAP interface
|
|
||||||
# for each group/daemon appropriately.
|
|
||||||
# (2) (Advanced) Create a script to dynamically
|
|
||||||
# modify the firewall in response to access
|
|
||||||
# from different clients. See man
|
|
||||||
# page for more info on learn-address script.
|
|
||||||
# option learn_address /etc/openvpn/script
|
|
||||||
|
|
||||||
# If enabled, this directive will configure
|
|
||||||
# all clients to redirect their default
|
|
||||||
# network gateway through the VPN, causing
|
|
||||||
# all IP traffic such as web browsing and
|
|
||||||
# and DNS lookups to go through the VPN
|
|
||||||
# (The OpenVPN server machine may need to NAT
|
|
||||||
# the TUN/TAP interface to the internet in
|
|
||||||
# order for this to work properly).
|
|
||||||
# CAVEAT: May break client's network config if
|
|
||||||
# client's local DHCP server packets get routed
|
|
||||||
# through the tunnel. Solution: make sure
|
|
||||||
# client's local DHCP server is reachable via
|
|
||||||
# a more specific route than the default route
|
|
||||||
# of 0.0.0.0/0.0.0.0.
|
|
||||||
# list push "redirect-gateway"
|
|
||||||
|
|
||||||
# Certain Windows-specific network settings
|
|
||||||
# can be pushed to clients, such as DNS
|
|
||||||
# or WINS server addresses. CAVEAT:
|
|
||||||
# http://openvpn.net/faq.html#dhcpcaveats
|
|
||||||
# list push "dhcp-option DNS 10.8.0.1"
|
|
||||||
# list push "dhcp-option WINS 10.8.0.1"
|
|
||||||
|
|
||||||
# Uncomment this directive to allow different
|
|
||||||
# clients to be able to "see" each other.
|
|
||||||
# By default, clients will only see the server.
|
|
||||||
# To force clients to only see the server, you
|
|
||||||
# will also need to appropriately firewall the
|
|
||||||
# server's TUN/TAP interface.
|
|
||||||
# option client_to_client 1
|
|
||||||
|
|
||||||
# Uncomment this directive if multiple clients
|
|
||||||
# might connect with the same certificate/key
|
|
||||||
# files or common names. This is recommended
|
|
||||||
# only for testing purposes. For production use,
|
|
||||||
# each client should have its own certificate/key
|
|
||||||
# pair.
|
|
||||||
#
|
|
||||||
# IF YOU HAVE NOT GENERATED INDIVIDUAL
|
|
||||||
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
|
|
||||||
# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
|
|
||||||
# UNCOMMENT THIS LINE OUT.
|
|
||||||
# option duplicate_cn 1
|
|
||||||
|
|
||||||
# The keepalive directive causes ping-like
|
|
||||||
# messages to be sent back and forth over
|
|
||||||
# the link so that each side knows when
|
|
||||||
# the other side has gone down.
|
|
||||||
# Ping every 10 seconds, assume that remote
|
|
||||||
# peer is down if no ping received during
|
|
||||||
# a 120 second time period.
|
|
||||||
option keepalive "10 120"
|
|
||||||
|
|
||||||
# For extra security beyond that provided
|
|
||||||
# by SSL/TLS, create an "HMAC firewall"
|
|
||||||
# to help block DoS attacks and UDP port flooding.
|
|
||||||
#
|
|
||||||
# Generate with:
|
|
||||||
# openvpn --genkey --secret ta.key
|
|
||||||
#
|
|
||||||
# The server and each client must have
|
|
||||||
# a copy of this key.
|
|
||||||
# The second parameter should be '0'
|
|
||||||
# on the server and '1' on the clients.
|
|
||||||
# This file is secret:
|
|
||||||
# option tls_auth "/etc/openvpn/ta.key 0"
|
|
||||||
|
|
||||||
# For additional privacy, a shared secret key
|
|
||||||
# can be used for both authentication (as in tls_auth)
|
|
||||||
# and encryption of the TLS control channel.
|
|
||||||
#
|
|
||||||
# Generate a shared secret with:
|
|
||||||
# openvpn --genkey --secret ta.key
|
|
||||||
#
|
|
||||||
# The server and each client must have
|
|
||||||
# a copy of this key.
|
|
||||||
#
|
|
||||||
# tls_auth and tls_crypt should NOT
|
|
||||||
# be combined, as tls_crypt implies tls_auth.
|
|
||||||
# Use EITHER tls_crypt, tls_auth, or neither option.
|
|
||||||
# option tls_crypt "/etc/openvpn/ta.key"
|
|
||||||
|
|
||||||
# Set the minimum required TLS protocol version
|
|
||||||
# for all connections.
|
|
||||||
#
|
|
||||||
# Require at least TLS 1.1
|
|
||||||
# option tls_version_min "1.1"
|
|
||||||
# Require at least TLS 1.2
|
|
||||||
# option tls_version_min "1.2"
|
|
||||||
# Require TLS 1.2, or the highest version supported
|
|
||||||
# on the system
|
|
||||||
# option tls_version_min "1.2 'or-highest'"
|
|
||||||
|
|
||||||
# OpenVPN versions 2.4 and later will attempt to
|
|
||||||
# automatically negotiate the most secure cipher
|
|
||||||
# between the client and server, regardless of a
|
|
||||||
# configured "option cipher" (see below).
|
|
||||||
# Automatic negotiation is recommended.
|
|
||||||
#
|
|
||||||
# Uncomment this option to disable this behavior,
|
|
||||||
# and force all OpenVPN peers to use the configured
|
|
||||||
# cipher option instead (not recommended).
|
|
||||||
# option ncp_disable
|
|
||||||
|
|
||||||
# Select a cryptographic cipher.
|
|
||||||
# This config item must be copied to
|
|
||||||
# the client config file as well.
|
|
||||||
#
|
|
||||||
# To see all supported ciphers, run:
|
|
||||||
# openvpn --show-ciphers
|
|
||||||
#
|
|
||||||
# Blowfish (default for backwards compatibility,
|
|
||||||
# but not recommended due to weaknesses):
|
|
||||||
# option cipher BF-CBC
|
|
||||||
# AES:
|
|
||||||
# option cipher AES-128-CBC
|
|
||||||
# Triple-DES:
|
|
||||||
# option cipher DES-EDE3-CBC
|
|
||||||
|
|
||||||
# Enable compression on the VPN link.
|
|
||||||
# If you enable it here, you must also
|
|
||||||
# enable it in the client config file.
|
|
||||||
#
|
|
||||||
# Compression is not recommended, as compression and
|
|
||||||
# encryption in combination can weaken the security
|
|
||||||
# of the connection.
|
|
||||||
#
|
|
||||||
# LZ4 requires OpenVPN 2.4+ client and server
|
|
||||||
# option compress lz4
|
|
||||||
# LZO is compatible with most OpenVPN versions
|
|
||||||
# (set "compress lzo" on 2.4+ clients, and "comp-lzo yes" on older clients)
|
|
||||||
# option compress lzo
|
|
||||||
|
|
||||||
# The maximum number of concurrently connected
|
|
||||||
# clients we want to allow.
|
|
||||||
# option max_clients 100
|
|
||||||
|
|
||||||
# The persist options will try to avoid
|
|
||||||
# accessing certain resources on restart
|
|
||||||
# that may no longer be accessible because
|
|
||||||
# of the privilege downgrade.
|
|
||||||
option persist_key 1
|
|
||||||
option persist_tun 1
|
|
||||||
option user nobody
|
|
||||||
|
|
||||||
# Output a short status file showing
|
|
||||||
# current connections, truncated
|
|
||||||
# and rewritten every minute.
|
|
||||||
option status /tmp/openvpn-status.log
|
|
||||||
|
|
||||||
# By default, log messages will go to the syslog (or
|
|
||||||
# on Windows, if running as a service, they will go to
|
|
||||||
# the "\Program Files\OpenVPN\log" directory).
|
|
||||||
# Use log or log-append to override this default.
|
|
||||||
# "log" will truncate the log file on OpenVPN startup,
|
|
||||||
# while "log-append" will append to it. Use one
|
|
||||||
# or the other (but not both).
|
|
||||||
# option log /tmp/openvpn.log
|
|
||||||
# option log_append /tmp/openvpn.log
|
|
||||||
|
|
||||||
# Set the appropriate level of log
|
|
||||||
# file verbosity.
|
|
||||||
#
|
|
||||||
# 0 is silent, except for fatal errors
|
|
||||||
# 4 is reasonable for general usage
|
|
||||||
# 5 and 6 can help to debug connection problems
|
|
||||||
# 9 is extremely verbose
|
|
||||||
option verb 3
|
|
||||||
|
|
||||||
# Silence repeating messages. At most 20
|
|
||||||
# sequential messages of the same message
|
|
||||||
# category will be output to the log.
|
|
||||||
# option mute 20
|
|
||||||
|
|
||||||
|
|
||||||
##############################################
|
|
||||||
# Sample client-side OpenVPN 2.0 uci config #
|
|
||||||
# for connecting to multi-client server. #
|
|
||||||
##############################################
|
|
||||||
|
|
||||||
config openvpn sample_client
|
|
||||||
|
|
||||||
# Set to 1 to enable this instance:
|
|
||||||
option enabled 0
|
|
||||||
|
|
||||||
# Specify that we are a client and that we
|
|
||||||
# will be pulling certain config file directives
|
|
||||||
# from the server.
|
|
||||||
option client 1
|
|
||||||
|
|
||||||
# Use the same setting as you are using on
|
|
||||||
# the server.
|
|
||||||
# On most systems, the VPN will not function
|
|
||||||
# unless you partially or fully disable
|
|
||||||
# the firewall for the TUN/TAP interface.
|
|
||||||
# option dev tap
|
|
||||||
option dev tun
|
|
||||||
|
|
||||||
# Are we connecting to a TCP or
|
|
||||||
# UDP server? Use the same setting as
|
|
||||||
# on the server.
|
|
||||||
# option proto tcp
|
|
||||||
option proto udp
|
|
||||||
|
|
||||||
# The hostname/IP and port of the server.
|
|
||||||
# You can have multiple remote entries
|
|
||||||
# to load balance between the servers.
|
|
||||||
list remote "my_server_1 1194"
|
|
||||||
# list remote "my_server_2 1194"
|
|
||||||
|
|
||||||
# Choose a random host from the remote
|
|
||||||
# list for load_balancing. Otherwise
|
|
||||||
# try hosts in the order specified.
|
|
||||||
# option remote_random 1
|
|
||||||
|
|
||||||
# Keep trying indefinitely to resolve the
|
|
||||||
# host name of the OpenVPN server. Very useful
|
|
||||||
# on machines which are not permanently connected
|
|
||||||
# to the internet such as laptops.
|
|
||||||
option resolv_retry infinite
|
|
||||||
|
|
||||||
# Most clients don't need to bind to
|
|
||||||
# a specific local port number.
|
|
||||||
option nobind 1
|
|
||||||
|
|
||||||
# Try to preserve some state across restarts.
|
|
||||||
option persist_key 1
|
|
||||||
option persist_tun 1
|
|
||||||
option user nobody
|
|
||||||
|
|
||||||
# If you are connecting through an
|
|
||||||
# HTTP proxy to reach the actual OpenVPN
|
|
||||||
# server, put the proxy server/IP and
|
|
||||||
# port number here. See the man page
|
|
||||||
# if your proxy server requires
|
|
||||||
# authentication.
|
|
||||||
# retry on connection failures:
|
|
||||||
# option http_proxy_retry 1
|
|
||||||
# specify http proxy address and port:
|
|
||||||
# option http_proxy "192.168.1.100 8080"
|
|
||||||
|
|
||||||
# Wireless networks often produce a lot
|
|
||||||
# of duplicate packets. Set this flag
|
|
||||||
# to silence duplicate packet warnings.
|
|
||||||
# option mute_replay_warnings 1
|
|
||||||
|
|
||||||
# SSL/TLS parms.
|
|
||||||
# See the server config file for more
|
|
||||||
# description. It's best to use
|
|
||||||
# a separate .crt/.key file pair
|
|
||||||
# for each client. A single ca
|
|
||||||
# file can be used for all clients.
|
|
||||||
option ca /etc/openvpn/ca.crt
|
|
||||||
option cert /etc/openvpn/client.crt
|
|
||||||
option key /etc/openvpn/client.key
|
|
||||||
|
|
||||||
# Verify server certificate by checking
|
|
||||||
# that the certicate has the key usage
|
|
||||||
# field set to "server". This is an
|
|
||||||
# important precaution to protect against
|
|
||||||
# a potential attack discussed here:
|
|
||||||
# http://openvpn.net/howto.html#mitm
|
|
||||||
#
|
|
||||||
# To use this feature, you will need to generate
|
|
||||||
# your server certificates with the nsCertType
|
|
||||||
# field set to "server". The build_key_server
|
|
||||||
# script in the easy_rsa folder will do this.
|
|
||||||
# option remote_cert_tls server
|
|
||||||
|
|
||||||
# If a tls_auth key is used on the server
|
|
||||||
# then every client must also have the key.
|
|
||||||
# option tls_auth "/etc/openvpn/ta.key 1"
|
|
||||||
|
|
||||||
# If a tls_crypt key is used on the server
|
|
||||||
# every client must also have the key.
|
|
||||||
# option tls_crypt "/etc/openvpn/ta.key"
|
|
||||||
|
|
||||||
# Set the minimum required TLS protocol version
|
|
||||||
# for all connections.
|
|
||||||
#
|
|
||||||
# Require at least TLS 1.1
|
|
||||||
# option tls_version_min "1.1"
|
|
||||||
# Require at least TLS 1.2
|
|
||||||
# option tls_version_min "1.2"
|
|
||||||
# Require TLS 1.2, or the highest version supported
|
|
||||||
# on the system
|
|
||||||
# option tls_version_min "1.2 'or-highest'"
|
|
||||||
|
|
||||||
# Select a cryptographic cipher.
|
|
||||||
# If the cipher option is used on the server
|
|
||||||
# then you must also specify it here.
|
|
||||||
# option cipher x
|
|
||||||
|
|
||||||
# Enable compression on the VPN link.
|
|
||||||
# Don't enable this unless it is also
|
|
||||||
# enabled in the server config file.
|
|
||||||
#
|
|
||||||
# Compression is not recommended, as compression and
|
|
||||||
# encryption in combination can weaken the security
|
|
||||||
# of the connection.
|
|
||||||
#
|
|
||||||
# LZ4 requires OpenVPN 2.4+ on server and client
|
|
||||||
# option compress lz4
|
|
||||||
# LZO is compatible with most OpenVPN versions
|
|
||||||
# option compress lzo
|
|
||||||
|
|
||||||
# Set log file verbosity.
|
|
||||||
option verb 3
|
|
||||||
|
|
||||||
# Silence repeating messages
|
|
||||||
# option mute 20
|
|
@ -1,209 +0,0 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
|
||||||
# Copyright (C) 2008-2013 OpenWrt.org
|
|
||||||
# Copyright (C) 2008 Jo-Philipp Wich
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
|
|
||||||
START=90
|
|
||||||
STOP=10
|
|
||||||
|
|
||||||
USE_PROCD=1
|
|
||||||
PROG=/usr/sbin/openvpn
|
|
||||||
|
|
||||||
LIST_SEP="
|
|
||||||
"
|
|
||||||
|
|
||||||
UCI_STARTED=
|
|
||||||
UCI_DISABLED=
|
|
||||||
|
|
||||||
append_param() {
|
|
||||||
local s="$1"
|
|
||||||
local v="$2"
|
|
||||||
case "$v" in
|
|
||||||
*_*_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;;
|
|
||||||
*_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;;
|
|
||||||
*_*) v=${v%%_*}-${v#*_} ;;
|
|
||||||
esac
|
|
||||||
echo -n "$v" >> "/var/etc/openvpn-$s.conf"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
append_bools() {
|
|
||||||
local p; local v; local s="$1"; shift
|
|
||||||
for p in $*; do
|
|
||||||
config_get_bool v "$s" "$p"
|
|
||||||
[ "$v" = 1 ] && append_param "$s" "$p" && echo >> "/var/etc/openvpn-$s.conf"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
append_params() {
|
|
||||||
local p; local v; local s="$1"; shift
|
|
||||||
for p in $*; do
|
|
||||||
config_get v "$s" "$p"
|
|
||||||
IFS="$LIST_SEP"
|
|
||||||
for v in $v; do
|
|
||||||
[ -n "$v" ] && [ "$p" != "push" ] && append_param "$s" "$p" && echo " $v" >> "/var/etc/openvpn-$s.conf"
|
|
||||||
[ -n "$v" ] && [ "$p" = "push" ] && append_param "$s" "$p" && echo " \"$v\"" >> "/var/etc/openvpn-$s.conf"
|
|
||||||
done
|
|
||||||
unset IFS
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
append_list() {
|
|
||||||
local p; local v; local s="$1"; shift
|
|
||||||
|
|
||||||
list_cb_append() {
|
|
||||||
v="${v}:$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
for p in $*; do
|
|
||||||
unset v
|
|
||||||
config_list_foreach "$s" "$p" list_cb_append
|
|
||||||
[ -n "$v" ] && append_param "$s" "$p" && echo " ${v:1}" >> "/var/etc/openvpn-$s.conf"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
section_enabled() {
|
|
||||||
config_get_bool enable "$1" 'enable' 0
|
|
||||||
config_get_bool enabled "$1" 'enabled' 0
|
|
||||||
[ $enable -gt 0 ] || [ $enabled -gt 0 ]
|
|
||||||
}
|
|
||||||
|
|
||||||
openvpn_get_dev() {
|
|
||||||
local dev dev_type
|
|
||||||
local name="$1"
|
|
||||||
local conf="$2"
|
|
||||||
|
|
||||||
# Do override only for configurations with config_file
|
|
||||||
config_get config_file "$name" config
|
|
||||||
[ -n "$config_file" ] || return
|
|
||||||
|
|
||||||
# Check there is someething to override
|
|
||||||
config_get dev "$name" dev
|
|
||||||
config_get dev_type "$name" dev_type
|
|
||||||
[ -n "$dev" ] || return
|
|
||||||
|
|
||||||
# If there is a no dev_type, try to guess it
|
|
||||||
if [ -z "$dev_type" ]; then
|
|
||||||
. /lib/functions/openvpn.sh
|
|
||||||
|
|
||||||
local odev odev_type
|
|
||||||
get_openvpn_option "$conf" odev dev
|
|
||||||
get_openvpn_option "$conf" odev_type dev-type
|
|
||||||
[ -n "$odev_type" ] || odev_type="$odev"
|
|
||||||
|
|
||||||
case "$odev_type" in
|
|
||||||
tun*) dev_type="tun" ;;
|
|
||||||
tap*) dev_type="tap" ;;
|
|
||||||
*) return;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Return overrides
|
|
||||||
echo "--dev-type $dev_type --dev $dev"
|
|
||||||
}
|
|
||||||
|
|
||||||
openvpn_add_instance() {
|
|
||||||
local name="$1"
|
|
||||||
local dir="$2"
|
|
||||||
local conf="$3"
|
|
||||||
local security="$4"
|
|
||||||
|
|
||||||
procd_open_instance "$name"
|
|
||||||
procd_set_param command "$PROG" \
|
|
||||||
--syslog "openvpn($name)" \
|
|
||||||
--status "/var/run/openvpn.$name.status" \
|
|
||||||
--cd "$dir" \
|
|
||||||
--config "$conf" \
|
|
||||||
--up "/usr/libexec/openvpn-hotplug up $name" \
|
|
||||||
--down "/usr/libexec/openvpn-hotplug down $name" \
|
|
||||||
--script-security "${security:-2}" \
|
|
||||||
$(openvpn_get_dev "$name" "$conf")
|
|
||||||
procd_set_param file "$dir/$conf"
|
|
||||||
procd_set_param term_timeout 15
|
|
||||||
procd_set_param respawn
|
|
||||||
procd_append_param respawn 3600
|
|
||||||
procd_append_param respawn 5
|
|
||||||
procd_append_param respawn -1
|
|
||||||
procd_close_instance
|
|
||||||
}
|
|
||||||
|
|
||||||
start_instance() {
|
|
||||||
local s="$1"
|
|
||||||
|
|
||||||
config_get config "$s" config
|
|
||||||
config="${config:+$(readlink -f "$config")}"
|
|
||||||
|
|
||||||
section_enabled "$s" || {
|
|
||||||
append UCI_DISABLED "$config" "$LIST_SEP"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
local script_security
|
|
||||||
config_get script_security "$s" script_security
|
|
||||||
|
|
||||||
[ ! -d "/var/run" ] && mkdir -p "/var/run"
|
|
||||||
|
|
||||||
if [ ! -z "$config" ]; then
|
|
||||||
append UCI_STARTED "$config" "$LIST_SEP"
|
|
||||||
openvpn_add_instance "$s" "${config%/*}" "$config" "$script_security"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ ! -d "/var/etc" ] && mkdir -p "/var/etc"
|
|
||||||
[ -f "/var/etc/openvpn-$s.conf" ] && rm "/var/etc/openvpn-$s.conf"
|
|
||||||
|
|
||||||
append_bools "$s" $OPENVPN_BOOLS
|
|
||||||
append_params "$s" $OPENVPN_PARAMS
|
|
||||||
append_list "$s" $OPENVPN_LIST
|
|
||||||
|
|
||||||
openvpn_add_instance "$s" "/var/etc" "openvpn-$s.conf" "$script_security"
|
|
||||||
}
|
|
||||||
|
|
||||||
start_service() {
|
|
||||||
local instance="$1"
|
|
||||||
local instance_found=0
|
|
||||||
|
|
||||||
config_cb() {
|
|
||||||
local type="$1"
|
|
||||||
local name="$2"
|
|
||||||
if [ "$type" = "openvpn" ]; then
|
|
||||||
if [ -n "$instance" -a "$instance" = "$name" ]; then
|
|
||||||
instance_found=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
. /usr/share/openvpn/openvpn.options
|
|
||||||
config_load 'openvpn'
|
|
||||||
|
|
||||||
if [ -n "$instance" ]; then
|
|
||||||
[ "$instance_found" -gt 0 ] || return
|
|
||||||
start_instance "$instance"
|
|
||||||
else
|
|
||||||
config_foreach start_instance 'openvpn'
|
|
||||||
|
|
||||||
local path name
|
|
||||||
for path in /etc/openvpn/*.conf; do
|
|
||||||
if [ -f "$path" ]; then
|
|
||||||
name="${path##*/}"; name="${name%.conf}"
|
|
||||||
|
|
||||||
# don't start configs again that are already started by uci
|
|
||||||
if echo "$UCI_STARTED" | grep -qxF "$path"; then
|
|
||||||
continue
|
|
||||||
|
|
||||||
# don't start configs which are set to disabled in uci
|
|
||||||
elif echo "$UCI_DISABLED" | grep -qxF "$path"; then
|
|
||||||
logger -t openvpn "$name.conf is disabled in /etc/config/openvpn"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
openvpn_add_instance "$name" "${path%/*}" "$path"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
service_triggers() {
|
|
||||||
procd_add_reload_trigger openvpn
|
|
||||||
}
|
|
@ -1,194 +0,0 @@
|
|||||||
OPENVPN_PARAMS='
|
|
||||||
askpass
|
|
||||||
auth
|
|
||||||
auth_retry
|
|
||||||
auth_user_pass
|
|
||||||
auth_user_pass_verify
|
|
||||||
bcast_buffers
|
|
||||||
ca
|
|
||||||
capath
|
|
||||||
cd
|
|
||||||
cert
|
|
||||||
chroot
|
|
||||||
cipher
|
|
||||||
client_config_dir
|
|
||||||
client_connect
|
|
||||||
client_disconnect
|
|
||||||
comp_lzo
|
|
||||||
compress
|
|
||||||
connect_freq
|
|
||||||
connect_retry
|
|
||||||
connect_retry_max
|
|
||||||
connect_timeout
|
|
||||||
crl_verify
|
|
||||||
dev
|
|
||||||
dev_node
|
|
||||||
dev_type
|
|
||||||
dh
|
|
||||||
ecdh_curve
|
|
||||||
echo
|
|
||||||
engine
|
|
||||||
explicit_exit_notify
|
|
||||||
extra_certs
|
|
||||||
fragment
|
|
||||||
group
|
|
||||||
hand_window
|
|
||||||
hash_size
|
|
||||||
http_proxy
|
|
||||||
http_proxy_option
|
|
||||||
http_proxy_timeout
|
|
||||||
ifconfig
|
|
||||||
ifconfig_ipv6
|
|
||||||
ifconfig_ipv6_pool
|
|
||||||
ifconfig_ipv6_push
|
|
||||||
ifconfig_pool
|
|
||||||
ifconfig_pool_persist
|
|
||||||
ifconfig_push
|
|
||||||
inactive
|
|
||||||
ipchange
|
|
||||||
iroute
|
|
||||||
iroute_ipv6
|
|
||||||
keepalive
|
|
||||||
key
|
|
||||||
key_direction
|
|
||||||
key_method
|
|
||||||
keysize
|
|
||||||
learn_address
|
|
||||||
link_mtu
|
|
||||||
lladdr
|
|
||||||
local
|
|
||||||
log
|
|
||||||
log_append
|
|
||||||
lport
|
|
||||||
management
|
|
||||||
management_log_cache
|
|
||||||
max_clients
|
|
||||||
max_routes_per_client
|
|
||||||
mode
|
|
||||||
mssfix
|
|
||||||
mtu_disc
|
|
||||||
mute
|
|
||||||
nice
|
|
||||||
ns_cert_type
|
|
||||||
ping
|
|
||||||
ping_exit
|
|
||||||
ping_restart
|
|
||||||
pkcs12
|
|
||||||
plugin
|
|
||||||
port
|
|
||||||
port_share
|
|
||||||
prng
|
|
||||||
proto
|
|
||||||
pull_filter
|
|
||||||
push
|
|
||||||
rcvbuf
|
|
||||||
redirect_gateway
|
|
||||||
remap_usr1
|
|
||||||
remote
|
|
||||||
remote_cert_eku
|
|
||||||
remote_cert_ku
|
|
||||||
remote_cert_tls
|
|
||||||
reneg_bytes
|
|
||||||
reneg_pkts
|
|
||||||
reneg_sec
|
|
||||||
replay_persist
|
|
||||||
replay_window
|
|
||||||
resolv_retry
|
|
||||||
route
|
|
||||||
route_delay
|
|
||||||
route_gateway
|
|
||||||
route_ipv6
|
|
||||||
route_metric
|
|
||||||
route_pre_down
|
|
||||||
route_up
|
|
||||||
rport
|
|
||||||
secret
|
|
||||||
server
|
|
||||||
server_bridge
|
|
||||||
server_ipv6
|
|
||||||
setenv
|
|
||||||
shaper
|
|
||||||
sndbuf
|
|
||||||
socks_proxy
|
|
||||||
status
|
|
||||||
status_version
|
|
||||||
syslog
|
|
||||||
tcp_queue_limit
|
|
||||||
tls_auth
|
|
||||||
tls_crypt
|
|
||||||
tls_timeout
|
|
||||||
tls_verify
|
|
||||||
tls_version_min
|
|
||||||
tmp_dir
|
|
||||||
topology
|
|
||||||
tran_window
|
|
||||||
tun_mtu
|
|
||||||
tun_mtu_extra
|
|
||||||
txqueuelen
|
|
||||||
user
|
|
||||||
verb
|
|
||||||
verify_client_cert
|
|
||||||
verify_x509_name
|
|
||||||
x509_username_field
|
|
||||||
'
|
|
||||||
|
|
||||||
OPENVPN_BOOLS='
|
|
||||||
allow_recursive_routing
|
|
||||||
auth_nocache
|
|
||||||
auth_user_pass_optional
|
|
||||||
bind
|
|
||||||
ccd_exclusive
|
|
||||||
client
|
|
||||||
client_to_client
|
|
||||||
comp_noadapt
|
|
||||||
disable
|
|
||||||
disable_occ
|
|
||||||
down_pre
|
|
||||||
duplicate_cn
|
|
||||||
fast_io
|
|
||||||
float
|
|
||||||
http_proxy_retry
|
|
||||||
ifconfig_noexec
|
|
||||||
ifconfig_nowarn
|
|
||||||
management_forget_disconnect
|
|
||||||
management_hold
|
|
||||||
management_query_passwords
|
|
||||||
management_signal
|
|
||||||
mktun
|
|
||||||
mlock
|
|
||||||
mtu_test
|
|
||||||
multihome
|
|
||||||
mute_replay_warnings
|
|
||||||
ncp_disable
|
|
||||||
nobind
|
|
||||||
opt_verify
|
|
||||||
passtos
|
|
||||||
persist_key
|
|
||||||
persist_local_ip
|
|
||||||
persist_remote_ip
|
|
||||||
persist_tun
|
|
||||||
ping_timer_rem
|
|
||||||
pull
|
|
||||||
push_reset
|
|
||||||
remote_random
|
|
||||||
rmtun
|
|
||||||
route_noexec
|
|
||||||
route_nopull
|
|
||||||
single_session
|
|
||||||
socks_proxy_retry
|
|
||||||
suppress_timestamps
|
|
||||||
tcp_nodelay
|
|
||||||
test_crypto
|
|
||||||
tls_client
|
|
||||||
tls_exit
|
|
||||||
tls_server
|
|
||||||
up_delay
|
|
||||||
up_restart
|
|
||||||
username_as_common_name
|
|
||||||
'
|
|
||||||
|
|
||||||
OPENVPN_LIST='
|
|
||||||
ncp_ciphers
|
|
||||||
tls_cipher
|
|
||||||
tls_ciphersuites
|
|
||||||
'
|
|
@ -1 +0,0 @@
|
|||||||
/etc/openvpn/
|
|
@ -1,10 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
ACTION=$1
|
|
||||||
shift
|
|
||||||
INSTANCE=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
export ACTION=$ACTION
|
|
||||||
export INSTANCE=$INSTANCE
|
|
||||||
exec /sbin/hotplug-call openvpn "$@"
|
|
@ -1,10 +0,0 @@
|
|||||||
--- a/src/openvpn/options.c
|
|
||||||
+++ b/src/openvpn/options.c
|
|
||||||
@@ -106,7 +106,6 @@ const char title_string[] =
|
|
||||||
#ifdef HAVE_AEAD_CIPHER_MODES
|
|
||||||
" [AEAD]"
|
|
||||||
#endif
|
|
||||||
- " built on " __DATE__
|
|
||||||
;
|
|
||||||
|
|
||||||
#ifndef ENABLE_SMALL
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/src/openvpn/ssl_mbedtls.c
|
|
||||||
+++ b/src/openvpn/ssl_mbedtls.c
|
|
||||||
@@ -1415,7 +1415,7 @@ const char *
|
|
||||||
get_ssl_library_version(void)
|
|
||||||
{
|
|
||||||
static char mbedtls_version[30];
|
|
||||||
- unsigned int pv = mbedtls_version_get_number();
|
|
||||||
+ unsigned int pv = MBEDTLS_VERSION_NUMBER;
|
|
||||||
sprintf( mbedtls_version, "mbed TLS %d.%d.%d",
|
|
||||||
(pv>>24)&0xff, (pv>>16)&0xff, (pv>>8)&0xff );
|
|
||||||
return mbedtls_version;
|
|
@ -1,58 +0,0 @@
|
|||||||
From 17a476fd5c8cc49f1d103a50199e87ede76b1b67 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Steffan Karger <steffan@karger.me>
|
|
||||||
Date: Sun, 26 Nov 2017 16:04:00 +0100
|
|
||||||
Subject: [PATCH] openssl: don't use deprecated SSLEAY/SSLeay symbols
|
|
||||||
|
|
||||||
Compiling our current master against OpenSSL 1.1 with
|
|
||||||
-DOPENSSL_API_COMPAT=0x10100000L screams bloody murder. This patch fixes
|
|
||||||
the errors about the deprecated SSLEAY/SSLeay symbols and defines.
|
|
||||||
|
|
||||||
Signed-off-by: Steffan Karger <steffan@karger.me>
|
|
||||||
Acked-by: Gert Doering <gert@greenie.muc.de>
|
|
||||||
Message-Id: <20171126150401.28565-1-steffan@karger.me>
|
|
||||||
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15934.html
|
|
||||||
Signed-off-by: Gert Doering <gert@greenie.muc.de>
|
|
||||||
---
|
|
||||||
configure.ac | 1 +
|
|
||||||
src/openvpn/openssl_compat.h | 8 ++++++++
|
|
||||||
src/openvpn/ssl_openssl.c | 2 +-
|
|
||||||
3 files changed, 10 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -904,6 +904,7 @@ if test "${enable_crypto}" = "yes" -a "$
|
|
||||||
EVP_MD_CTX_free \
|
|
||||||
EVP_MD_CTX_reset \
|
|
||||||
EVP_CIPHER_CTX_reset \
|
|
||||||
+ OpenSSL_version \
|
|
||||||
SSL_CTX_get_default_passwd_cb \
|
|
||||||
SSL_CTX_get_default_passwd_cb_userdata \
|
|
||||||
SSL_CTX_set_security_level \
|
|
||||||
--- a/src/openvpn/openssl_compat.h
|
|
||||||
+++ b/src/openvpn/openssl_compat.h
|
|
||||||
@@ -689,6 +689,14 @@ EC_GROUP_order_bits(const EC_GROUP *grou
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* SSLeay symbols have been renamed in OpenSSL 1.1 */
|
|
||||||
+#ifndef OPENSSL_VERSION
|
|
||||||
+#define OPENSSL_VERSION SSLEAY_VERSION
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifndef HAVE_OPENSSL_VERSION
|
|
||||||
+#define OpenSSL_version SSLeay_version
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#if !defined(RSA_F_RSA_OSSL_PRIVATE_ENCRYPT)
|
|
||||||
#define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT RSA_F_RSA_EAY_PRIVATE_ENCRYPT
|
|
||||||
#endif
|
|
||||||
--- a/src/openvpn/ssl_openssl.c
|
|
||||||
+++ b/src/openvpn/ssl_openssl.c
|
|
||||||
@@ -2008,7 +2008,7 @@ get_highest_preference_tls_cipher(char *
|
|
||||||
const char *
|
|
||||||
get_ssl_library_version(void)
|
|
||||||
{
|
|
||||||
- return SSLeay_version(SSLEAY_VERSION);
|
|
||||||
+ return OpenSSL_version(OPENSSL_VERSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* defined(ENABLE_CRYPTO) && defined(ENABLE_CRYPTO_OPENSSL) */
|
|
@ -1,65 +0,0 @@
|
|||||||
From 1987498271abadf042d8bb3feee1fe0d877a9d55 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Steffan Karger <steffan@karger.me>
|
|
||||||
Date: Sun, 26 Nov 2017 16:49:12 +0100
|
|
||||||
Subject: [PATCH] openssl: add missing #include statements
|
|
||||||
|
|
||||||
Compiling our current master against OpenSSL 1.1 with
|
|
||||||
-DOPENSSL_API_COMPAT=0x10100000L screams bloody murder. This patch fixes
|
|
||||||
the errors caused by missing includes. Previous openssl versions would
|
|
||||||
usually include 'the rest of the world', but they're fixing that. So we
|
|
||||||
should no longer rely on it.
|
|
||||||
|
|
||||||
(And sneaking in alphabetic ordering of the includes while touching them.)
|
|
||||||
|
|
||||||
Signed-off-by: Steffan Karger <steffan@karger.me>
|
|
||||||
Acked-by: Gert Doering <gert@greenie.muc.de>
|
|
||||||
Message-Id: <20171126154912.13283-1-steffan@karger.me>
|
|
||||||
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15936.html
|
|
||||||
Signed-off-by: Gert Doering <gert@greenie.muc.de>
|
|
||||||
---
|
|
||||||
src/openvpn/openssl_compat.h | 1 +
|
|
||||||
src/openvpn/ssl_openssl.c | 6 +++++-
|
|
||||||
src/openvpn/ssl_verify_openssl.c | 3 ++-
|
|
||||||
3 files changed, 8 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/src/openvpn/openssl_compat.h
|
|
||||||
+++ b/src/openvpn/openssl_compat.h
|
|
||||||
@@ -42,6 +42,7 @@
|
|
||||||
|
|
||||||
#include "buffer.h"
|
|
||||||
|
|
||||||
+#include <openssl/rsa.h>
|
|
||||||
#include <openssl/ssl.h>
|
|
||||||
#include <openssl/x509.h>
|
|
||||||
|
|
||||||
--- a/src/openvpn/ssl_openssl.c
|
|
||||||
+++ b/src/openvpn/ssl_openssl.c
|
|
||||||
@@ -52,10 +52,14 @@
|
|
||||||
|
|
||||||
#include "ssl_verify_openssl.h"
|
|
||||||
|
|
||||||
+#include <openssl/bn.h>
|
|
||||||
+#include <openssl/crypto.h>
|
|
||||||
+#include <openssl/dh.h>
|
|
||||||
+#include <openssl/dsa.h>
|
|
||||||
#include <openssl/err.h>
|
|
||||||
#include <openssl/pkcs12.h>
|
|
||||||
+#include <openssl/rsa.h>
|
|
||||||
#include <openssl/x509.h>
|
|
||||||
-#include <openssl/crypto.h>
|
|
||||||
#ifndef OPENSSL_NO_EC
|
|
||||||
#include <openssl/ec.h>
|
|
||||||
#endif
|
|
||||||
--- a/src/openvpn/ssl_verify_openssl.c
|
|
||||||
+++ b/src/openvpn/ssl_verify_openssl.c
|
|
||||||
@@ -44,8 +44,9 @@
|
|
||||||
#include "ssl_verify_backend.h"
|
|
||||||
#include "openssl_compat.h"
|
|
||||||
|
|
||||||
-#include <openssl/x509v3.h>
|
|
||||||
+#include <openssl/bn.h>
|
|
||||||
#include <openssl/err.h>
|
|
||||||
+#include <openssl/x509v3.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
|
|
@ -1,74 +0,0 @@
|
|||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -1080,68 +1080,15 @@ dnl
|
|
||||||
AC_ARG_VAR([LZ4_CFLAGS], [C compiler flags for lz4])
|
|
||||||
AC_ARG_VAR([LZ4_LIBS], [linker flags for lz4])
|
|
||||||
if test "$enable_lz4" = "yes" && test "$enable_comp_stub" = "no"; then
|
|
||||||
- if test -z "${LZ4_CFLAGS}" -a -z "${LZ4_LIBS}"; then
|
|
||||||
- # if the user did not explicitly specify flags, try to autodetect
|
|
||||||
- PKG_CHECK_MODULES([LZ4],
|
|
||||||
- [liblz4 >= 1.7.1 liblz4 < 100],
|
|
||||||
- [have_lz4="yes"],
|
|
||||||
- [LZ4_LIBS="-llz4"] # If this fails, we will do another test next.
|
|
||||||
- # We also add set LZ4_LIBS otherwise the
|
|
||||||
- # linker will not know about the lz4 library
|
|
||||||
- )
|
|
||||||
- fi
|
|
||||||
|
|
||||||
saved_CFLAGS="${CFLAGS}"
|
|
||||||
saved_LIBS="${LIBS}"
|
|
||||||
CFLAGS="${CFLAGS} ${LZ4_CFLAGS}"
|
|
||||||
LIBS="${LIBS} ${LZ4_LIBS}"
|
|
||||||
|
|
||||||
- # If pkgconfig check failed or LZ4_CFLAGS/LZ4_LIBS env vars
|
|
||||||
- # are used, check the version directly in the LZ4 include file
|
|
||||||
- if test "${have_lz4}" != "yes"; then
|
|
||||||
- AC_CHECK_HEADERS([lz4.h],
|
|
||||||
- [have_lz4h="yes"],
|
|
||||||
- [])
|
|
||||||
-
|
|
||||||
- if test "${have_lz4h}" = "yes" ; then
|
|
||||||
- AC_MSG_CHECKING([additionally if system LZ4 version >= 1.7.1])
|
|
||||||
- AC_COMPILE_IFELSE(
|
|
||||||
- [AC_LANG_PROGRAM([[
|
|
||||||
-#include <lz4.h>
|
|
||||||
- ]],
|
|
||||||
- [[
|
|
||||||
-/* Version encoding: MMNNPP (Major miNor Patch) - see lz4.h for details */
|
|
||||||
-#if LZ4_VERSION_NUMBER < 10701L
|
|
||||||
-#error LZ4 is too old
|
|
||||||
-#endif
|
|
||||||
- ]]
|
|
||||||
- )],
|
|
||||||
- [
|
|
||||||
- AC_MSG_RESULT([ok])
|
|
||||||
- have_lz4="yes"
|
|
||||||
- ],
|
|
||||||
- [AC_MSG_RESULT([system LZ4 library is too old])]
|
|
||||||
- )
|
|
||||||
- fi
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- # Double check we have a few needed functions
|
|
||||||
- if test "${have_lz4}" = "yes" ; then
|
|
||||||
- AC_CHECK_LIB([lz4],
|
|
||||||
- [LZ4_compress_default],
|
|
||||||
- [],
|
|
||||||
- [have_lz4="no"])
|
|
||||||
- AC_CHECK_LIB([lz4],
|
|
||||||
- [LZ4_decompress_safe],
|
|
||||||
- [],
|
|
||||||
- [have_lz4="no"])
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- if test "${have_lz4}" != "yes" ; then
|
|
||||||
- AC_MSG_RESULT([ usable LZ4 library or header not found, using version in src/compat/compat-lz4.*])
|
|
||||||
- AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
|
|
||||||
- LZ4_LIBS=""
|
|
||||||
- fi
|
|
||||||
+ AC_MSG_RESULT([ usable LZ4 library or header not found, using version in src/compat/compat-lz4.*])
|
|
||||||
+ AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
|
|
||||||
+ LZ4_LIBS=""
|
|
||||||
OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}"
|
|
||||||
OPTIONAL_LZ4_LIBS="${LZ4_LIBS}"
|
|
||||||
AC_DEFINE(ENABLE_LZ4, [1], [Enable LZ4 compression library])
|
|
@ -1,81 +0,0 @@
|
|||||||
--- a/src/openvpn/syshead.h
|
|
||||||
+++ b/src/openvpn/syshead.h
|
|
||||||
@@ -597,11 +597,11 @@ socket_defined(const socket_descriptor_t
|
|
||||||
/*
|
|
||||||
* Should we include NTLM proxy functionality
|
|
||||||
*/
|
|
||||||
-#if defined(ENABLE_CRYPTO)
|
|
||||||
-#define NTLM 1
|
|
||||||
-#else
|
|
||||||
+//#if defined(ENABLE_CRYPTO)
|
|
||||||
+//#define NTLM 1
|
|
||||||
+//#else
|
|
||||||
#define NTLM 0
|
|
||||||
-#endif
|
|
||||||
+//#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Should we include proxy digest auth functionality
|
|
||||||
--- a/src/openvpn/crypto_mbedtls.c
|
|
||||||
+++ b/src/openvpn/crypto_mbedtls.c
|
|
||||||
@@ -319,6 +319,7 @@ int
|
|
||||||
key_des_num_cblocks(const mbedtls_cipher_info_t *kt)
|
|
||||||
{
|
|
||||||
int ret = 0;
|
|
||||||
+#ifdef MBEDTLS_DES_C
|
|
||||||
if (kt->type == MBEDTLS_CIPHER_DES_CBC)
|
|
||||||
{
|
|
||||||
ret = 1;
|
|
||||||
@@ -331,6 +332,7 @@ key_des_num_cblocks(const mbedtls_cipher
|
|
||||||
{
|
|
||||||
ret = 3;
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
dmsg(D_CRYPTO_DEBUG, "CRYPTO INFO: n_DES_cblocks=%d", ret);
|
|
||||||
return ret;
|
|
||||||
@@ -339,6 +341,7 @@ key_des_num_cblocks(const mbedtls_cipher
|
|
||||||
bool
|
|
||||||
key_des_check(uint8_t *key, int key_len, int ndc)
|
|
||||||
{
|
|
||||||
+#ifdef MBEDTLS_DES_C
|
|
||||||
int i;
|
|
||||||
struct buffer b;
|
|
||||||
|
|
||||||
@@ -367,11 +370,15 @@ key_des_check(uint8_t *key, int key_len,
|
|
||||||
|
|
||||||
err:
|
|
||||||
return false;
|
|
||||||
+#else
|
|
||||||
+ return true;
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
key_des_fixup(uint8_t *key, int key_len, int ndc)
|
|
||||||
{
|
|
||||||
+#ifdef MBEDTLS_DES_C
|
|
||||||
int i;
|
|
||||||
struct buffer b;
|
|
||||||
|
|
||||||
@@ -386,6 +393,7 @@ key_des_fixup(uint8_t *key, int key_len,
|
|
||||||
}
|
|
||||||
mbedtls_des_key_set_parity(key);
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -705,10 +713,12 @@ cipher_des_encrypt_ecb(const unsigned ch
|
|
||||||
unsigned char *src,
|
|
||||||
unsigned char *dst)
|
|
||||||
{
|
|
||||||
+#ifdef MBEDTLS_DES_C
|
|
||||||
mbedtls_des_context ctx;
|
|
||||||
|
|
||||||
ASSERT(mbed_ok(mbedtls_des_setkey_enc(&ctx, key)));
|
|
||||||
ASSERT(mbed_ok(mbedtls_des_crypt_ecb(&ctx, src, dst)));
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=iftop
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
PKG_SOURCE_URL:=https://code.blinkace.com/pdw/iftop.git
|
|
||||||
PKG_SOURCE_DATE:=2018-10-03
|
|
||||||
PKG_SOURCE_VERSION:=77901c8c53e01359d83b8090aacfe62214658183
|
|
||||||
PKG_MIRROR_HASH:=219231541a437f5aecd497796be0202d337e13f141359a93595bf2cd8c5c5544
|
|
||||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define Package/iftop
|
|
||||||
SECTION:=net
|
|
||||||
CATEGORY:=Network
|
|
||||||
DEPENDS:=+libpcap +libncurses +libpthread
|
|
||||||
TITLE:=display bandwith usage on an interface
|
|
||||||
URL:=http://www.ex-parrot.com/~pdw/iftop/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/iftop/description
|
|
||||||
iftop does for network usage what top(1) does for CPU usage. It
|
|
||||||
listens to network traffic on a named interface and displays a
|
|
||||||
table of current bandwidth usage by pairs of hosts. Handy for
|
|
||||||
answering the question 'why is our ADSL link so slow?'.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/iftop/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/iftop $(1)/usr/bin/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,iftop))
|
|
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
|||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
|
||||||
PKG_MIRROR_HASH:=97cfe9528405d9a21c05fa1638780c27a66bfb6f21becfc3f4fdca1420711db8
|
PKG_MIRROR_HASH:=22670e033b5623348de37c1d1e69caf799752b38205be8b25bc7020ef9e69884
|
||||||
PKG_SOURCE_DATE:=2020-10-16
|
PKG_SOURCE_DATE:=2020-12-12
|
||||||
PKG_SOURCE_VERSION:=f25ab8a8484215e5fc88c952f25db9a06de311f7
|
PKG_SOURCE_VERSION:=f415323b7c87d66ab11d89325937d5dae5eb65c9
|
||||||
CMAKE_INSTALL:=1
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
@ -14,9 +14,9 @@ PKG_FLAGS:=essential
|
|||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git
|
PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git
|
||||||
PKG_SOURCE_DATE:=2020-11-25
|
PKG_SOURCE_DATE:=2020-12-05
|
||||||
PKG_SOURCE_VERSION:=66f458decf9fd2839d77bf420e93d9c78025488a
|
PKG_SOURCE_VERSION:=efb26a35e4e5446f135307c4ff7df9e9563c23a9
|
||||||
PKG_MIRROR_HASH:=932cf0002fd05e8a231df6d3e2c807b2c62501aa36ac2a3e20665622872e262d
|
PKG_MIRROR_HASH:=9294140567f1b122a7229fc80ab1b70e167b478c1a3062e0b64631c189beeda5
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
@ -8,13 +8,13 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=procd
|
PKG_NAME:=procd
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
||||||
PKG_SOURCE_DATE:=2020-12-04
|
PKG_SOURCE_DATE:=2020-12-12
|
||||||
PKG_SOURCE_VERSION:=6acc48c7a2faac48c534b8a5516500c270550a9e
|
PKG_SOURCE_VERSION:=7f12c89d0b99a2f04e91b2327e74c049f6362b67
|
||||||
PKG_MIRROR_HASH:=ee1a238a54fff4c71a6e52f092394b94dbcc488581e6fd3a1bb6da515ce1cbaf
|
PKG_MIRROR_HASH:=b71134d96a54327baae532415df430ad91c757c7862c736447f03bd22e2d5ec5
|
||||||
CMAKE_INSTALL:=1
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
@ -45,7 +45,7 @@ define Package/procd/Default
|
|||||||
SECTION:=base
|
SECTION:=base
|
||||||
CATEGORY:=Base system
|
CATEGORY:=Base system
|
||||||
DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_GLIBC:librt +libubox \
|
DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_GLIBC:librt +libubox \
|
||||||
+libubus +libblobmsg-json +libjson-c
|
+libubus +libblobmsg-json +libjson-c +jshn
|
||||||
TITLE:=OpenWrt system process manager
|
TITLE:=OpenWrt system process manager
|
||||||
USERID:=:dialout=20 :audio=29
|
USERID:=:dialout=20 :audio=29
|
||||||
endef
|
endef
|
||||||
|
@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=selinux-policy
|
PKG_NAME:=selinux-policy
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://git.defensec.nl/selinux-policy.git
|
PKG_SOURCE_URL:=https://git.defensec.nl/selinux-policy.git
|
||||||
PKG_VERSION:=0.3
|
PKG_VERSION:=0.4
|
||||||
PKG_MIRROR_HASH:=8f224e4e0ecb459648563862e26fcd5d4d113de5daa277363fc4316da5a05360
|
PKG_MIRROR_HASH:=6bf4df7df2e1a4f641e4068ec79b1f4921e29e531d5b76843f39c79470e646f8
|
||||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||||
PKG_BUILD_DEPENDS:=secilc/host policycoreutils/host
|
PKG_BUILD_DEPENDS:=secilc/host policycoreutils/host
|
||||||
|
|
||||||
@ -44,6 +44,7 @@ endef
|
|||||||
define Package/selinux-policy/install
|
define Package/selinux-policy/install
|
||||||
$(INSTALL_DIR) $(1)/etc/selinux/$(PKG_NAME)/contexts/files/
|
$(INSTALL_DIR) $(1)/etc/selinux/$(PKG_NAME)/contexts/files/
|
||||||
$(INSTALL_DIR) $(1)/etc/selinux/$(PKG_NAME)/policy/
|
$(INSTALL_DIR) $(1)/etc/selinux/$(PKG_NAME)/policy/
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/customizable_types $(1)/etc/selinux/$(PKG_NAME)/contexts/
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/file_contexts.subs_dist $(1)/etc/selinux/$(PKG_NAME)/contexts/files/
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/file_contexts.subs_dist $(1)/etc/selinux/$(PKG_NAME)/contexts/files/
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/file_contexts $(1)/etc/selinux/$(PKG_NAME)/contexts/files/
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/file_contexts $(1)/etc/selinux/$(PKG_NAME)/contexts/files/
|
||||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/policy.* $(1)/etc/selinux/$(PKG_NAME)/policy/
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/policy.* $(1)/etc/selinux/$(PKG_NAME)/policy/
|
||||||
|
@ -20,7 +20,7 @@ PKG_FIXUP:=autoreconf
|
|||||||
|
|
||||||
PKG_FLAGS:=nonshared
|
PKG_FLAGS:=nonshared
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=util-linux lzo zlib
|
PKG_BUILD_DEPENDS:=util-linux
|
||||||
|
|
||||||
PKG_LICENSE:=GPLv2
|
PKG_LICENSE:=GPLv2
|
||||||
PKG_LICENSE_FILES:=
|
PKG_LICENSE_FILES:=
|
||||||
|
2
rules.mk
2
rules.mk
@ -77,7 +77,7 @@ IS_PACKAGE_BUILD := $(if $(filter package/%,$(BUILD_SUBDIR)),1)
|
|||||||
|
|
||||||
OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH))
|
OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH))
|
||||||
|
|
||||||
ifeq ($(ARCH),powerpc)
|
ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be powerpc ))
|
||||||
FPIC:=-fPIC
|
FPIC:=-fPIC
|
||||||
else
|
else
|
||||||
FPIC:=-fpic
|
FPIC:=-fpic
|
||||||
|
@ -517,26 +517,29 @@ sub install_src {
|
|||||||
my $force = shift;
|
my $force = shift;
|
||||||
my $ret = 0;
|
my $ret = 0;
|
||||||
|
|
||||||
$feed = lookup_src($feed, $name);
|
my $select_feed = lookup_src($feed, $name);
|
||||||
unless ($feed) {
|
unless ($select_feed) {
|
||||||
$installed{$name} and return 0;
|
$installed{$name} and return 0;
|
||||||
$feed_src->{$name} or warn "WARNING: No feed for source package '$name' found\n";
|
$feed_src->{$name} or warn "WARNING: No feed for source package '$name' found\n";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# switch to the metadata for the selected feed
|
# switch to the metadata for the selected feed
|
||||||
get_feed($feed->[1]);
|
get_feed($select_feed->[1]);
|
||||||
my $src = $feed_src->{$name} or return 1;
|
my $src = $feed_src->{$name} or return 1;
|
||||||
|
|
||||||
# enable force flag if feed src line was declared with --force
|
# enable force flag if feed src line was declared with --force
|
||||||
if (exists($feed->[3]{force})) {
|
if (exists($select_feed->[3]{force})) {
|
||||||
$force = 1;
|
$force = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# If it's a core package and we don't want to override, just return
|
# If it's a core package and we don't want to override, just return
|
||||||
my $override = 0;
|
my $override = 0;
|
||||||
if (is_core_src($name)) {
|
if (is_core_src($name)) {
|
||||||
return 0 unless $force;
|
if (!$force) {
|
||||||
|
warn "Not overriding core package $name; use -f to force\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
$override = 1;
|
$override = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -554,12 +557,12 @@ sub install_src {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($override) {
|
if ($override) {
|
||||||
warn "Overriding core package '$name' with version from $feed->[1]\n";
|
warn "Overriding core package '$name' with version from $select_feed->[1]\n";
|
||||||
} else {
|
} else {
|
||||||
warn "Installing package '$name' from $feed->[1]\n";
|
warn "Installing package '$name' from $select_feed->[1]\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_src($feed, $src) == 0 or do {
|
do_install_src($select_feed, $src) == 0 or do {
|
||||||
warn "failed.\n";
|
warn "failed.\n";
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
@ -594,15 +597,15 @@ sub install_package {
|
|||||||
my $name = shift;
|
my $name = shift;
|
||||||
my $force = shift;
|
my $force = shift;
|
||||||
|
|
||||||
$feed = lookup_package($feed, $name);
|
my $select_feed = lookup_package($feed, $name);
|
||||||
unless ($feed) {
|
unless ($select_feed) {
|
||||||
$installed_pkg{$name} and return 0;
|
$installed_pkg{$name} and return 0;
|
||||||
$feed_vpackage->{$name} or warn "WARNING: No feed for package '$name' found\n";
|
$feed_vpackage->{$name} or warn "WARNING: No feed for package '$name' found\n";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# switch to the metadata for the selected feed
|
# switch to the metadata for the selected feed
|
||||||
get_feed($feed->[1]);
|
get_feed($select_feed->[1]);
|
||||||
my $pkg = $feed_vpackage->{$name} or return 1;
|
my $pkg = $feed_vpackage->{$name} or return 1;
|
||||||
return install_src($feed, $pkg->[0]{src}{name}, $force);
|
return install_src($feed, $pkg->[0]{src}{name}, $force);
|
||||||
}
|
}
|
||||||
@ -612,14 +615,12 @@ sub install_target_or_package {
|
|||||||
my $name = shift;
|
my $name = shift;
|
||||||
my $force = shift;
|
my $force = shift;
|
||||||
|
|
||||||
my $this_feed_target = lookup_target($feed, $name);
|
lookup_target($feed, $name) and do {
|
||||||
$this_feed_target and do {
|
return install_target($feed, $name);
|
||||||
return install_target($this_feed_target, $name);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
my $this_feed_src = lookup_src($feed, $name);
|
lookup_src($feed, $name) and do {
|
||||||
$this_feed_src and do {
|
return install_src($feed, $name, $force);
|
||||||
return install_src($this_feed_src, $name, $force);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return install_package($feed, $name, $force);
|
return install_package($feed, $name, $force);
|
||||||
|
229
target/linux/ath79/dts/qca9558_belkin_f9j1108-v2.dts
Normal file
229
target/linux/ath79/dts/qca9558_belkin_f9j1108-v2.dts
Normal file
@ -0,0 +1,229 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "qca955x.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Belkin F9J1108 v2 (AC1750 DB Wi-Fi)";
|
||||||
|
compatible = "belkin,f9j1108-v2", "qca,qca9558";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_system;
|
||||||
|
led-failsafe = &led_system;
|
||||||
|
led-running = &led_system;
|
||||||
|
led-upgrade = &led_system;
|
||||||
|
label-mac-device = ð1;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
usb {
|
||||||
|
label = "green:usb2";
|
||||||
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||||
|
trigger-sources = <&hub_port0>;
|
||||||
|
linux,default-trigger = "usbport";
|
||||||
|
};
|
||||||
|
|
||||||
|
status {
|
||||||
|
label = "amber:status";
|
||||||
|
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps-amber {
|
||||||
|
label = "amber:wps";
|
||||||
|
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps-blue {
|
||||||
|
label = "blue:wps";
|
||||||
|
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_system: system {
|
||||||
|
label = "blue:system";
|
||||||
|
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio-export {
|
||||||
|
compatible = "gpio-export";
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
usb2_power {
|
||||||
|
gpio-export,name = "usb2:power";
|
||||||
|
gpio-export,output = <1>;
|
||||||
|
gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "WPS button";
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "Reset button";
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual_flash {
|
||||||
|
compatible = "mtd-concat";
|
||||||
|
|
||||||
|
devices = <&fwpart1 &fwpart2>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
compatible = "openwrt,okli";
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x0 0x0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb_phy0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb0 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
hub_port0: port@1 {
|
||||||
|
reg = <1>;
|
||||||
|
#trigger-source-cells = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi {
|
||||||
|
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 = <0x000000 0x040000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@40000 {
|
||||||
|
label = "u-boot-env";
|
||||||
|
reg = <0x040000 0x010000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
fwpart1: partition@50000 {
|
||||||
|
label = "fwpart1";
|
||||||
|
reg = <0x050000 0xe20000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@e70000 {
|
||||||
|
label = "loader";
|
||||||
|
reg = <0xe70000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
fwpart2: partition@e80000 {
|
||||||
|
label = "fwpart2";
|
||||||
|
reg = <0xe80000 0x170000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
art: partition@ff0000 {
|
||||||
|
label = "art";
|
||||||
|
reg = <0xff0000 0x010000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
phy0: ethernet-phy@0 {
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
qca,ar8327-initvals = <
|
||||||
|
0x04 0x00080080 /* PORT0 PAD MODE CTRL */
|
||||||
|
0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
|
||||||
|
0x50 0xc737c737 /* LED_CTRL0 */
|
||||||
|
0x54 0x00000000 /* LED_CTRL1 */
|
||||||
|
0x58 0x00000000 /* LED_CTRL2 */
|
||||||
|
0x5c 0x0030c300 /* LED_CTRL3 */
|
||||||
|
0x7c 0x0000007e /* PORT0_STATUS */
|
||||||
|
0x94 0x0000007e /* PORT6 STATUS */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ð0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
mtd-mac-address = <&art 0x0>;
|
||||||
|
phy-handle = <&phy0>;
|
||||||
|
pll-data = <0xa6000000 0x00000101 0x00001616>;
|
||||||
|
|
||||||
|
gmac-config {
|
||||||
|
device = <&gmac>;
|
||||||
|
rgmii-enabled = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ð1 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
mtd-mac-address = <&art 0x0>;
|
||||||
|
mtd-mac-address-increment = <(-1)>;
|
||||||
|
pll-data = <0x03000101 0x00000101 0x00001616>;
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <1000>;
|
||||||
|
full-duplex;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
wifi@0,0 {
|
||||||
|
compatible = "qcom,ath10k";
|
||||||
|
reg = <0 0 0 0 0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&wmac {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
mtd-cal-data = <&art 0x1000>;
|
||||||
|
};
|
@ -100,6 +100,15 @@ ath79_setup_interfaces()
|
|||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0@eth0" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
|
"0@eth0" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
|
||||||
;;
|
;;
|
||||||
|
belkin,f9j1108-v2|\
|
||||||
|
tplink,archer-c5-v1|\
|
||||||
|
tplink,archer-c7-v1|\
|
||||||
|
tplink,archer-c7-v2|\
|
||||||
|
tplink,tl-wdr4900-v2|\
|
||||||
|
tplink,tl-wdr7500-v3)
|
||||||
|
ucidef_add_switch "switch0" \
|
||||||
|
"0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
|
||||||
|
;;
|
||||||
buffalo,bhr-4grv|\
|
buffalo,bhr-4grv|\
|
||||||
buffalo,wzr-hp-g450h)
|
buffalo,wzr-hp-g450h)
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
@ -309,14 +318,6 @@ ath79_setup_interfaces()
|
|||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
|
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
|
||||||
;;
|
;;
|
||||||
tplink,archer-c5-v1|\
|
|
||||||
tplink,archer-c7-v1|\
|
|
||||||
tplink,archer-c7-v2|\
|
|
||||||
tplink,tl-wdr4900-v2|\
|
|
||||||
tplink,tl-wdr7500-v3)
|
|
||||||
ucidef_add_switch "switch0" \
|
|
||||||
"0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
|
|
||||||
;;
|
|
||||||
tplink,archer-d50-v1)
|
tplink,archer-d50-v1)
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "1:wan"
|
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "1:wan"
|
||||||
|
@ -50,6 +50,24 @@ define Build/cybertan-trx
|
|||||||
-rm $@-empty.bin
|
-rm $@-empty.bin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/edimax-headers
|
||||||
|
$(eval edimax_magic=$(word 1,$(1)))
|
||||||
|
$(eval edimax_model=$(word 2,$(1)))
|
||||||
|
|
||||||
|
$(STAGING_DIR_HOST)/bin/edimax_fw_header -M $(edimax_magic) -m $(edimax_model)\
|
||||||
|
-v $(VERSION_DIST)$(firstword $(subst +, , $(firstword $(subst -, ,$(REVISION))))) \
|
||||||
|
-n "uImage" \
|
||||||
|
-i $(KDIR)/loader-$(DEVICE_NAME).uImage \
|
||||||
|
-o $@.uImage
|
||||||
|
$(STAGING_DIR_HOST)/bin/edimax_fw_header -M $(edimax_magic) -m $(edimax_model)\
|
||||||
|
-v $(VERSION_DIST)$(firstword $(subst +, , $(firstword $(subst -, ,$(REVISION))))) \
|
||||||
|
-n "rootfs" \
|
||||||
|
-i $@ \
|
||||||
|
-o $@.rootfs
|
||||||
|
cat $@.uImage $@.rootfs > $@
|
||||||
|
rm -rf $@.uImage $@.rootfs
|
||||||
|
endef
|
||||||
|
|
||||||
# This needs to make /tmp/_sys/sysupgrade.tgz an empty file prior to
|
# This needs to make /tmp/_sys/sysupgrade.tgz an empty file prior to
|
||||||
# sysupgrade, as otherwise it will implant the old configuration from
|
# sysupgrade, as otherwise it will implant the old configuration from
|
||||||
# OEM firmware when writing rootfs from factory.bin
|
# OEM firmware when writing rootfs from factory.bin
|
||||||
@ -390,6 +408,27 @@ define Device/avm_fritzdvbc
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += avm_fritzdvbc
|
TARGET_DEVICES += avm_fritzdvbc
|
||||||
|
|
||||||
|
define Device/belkin_f9j1108-v2
|
||||||
|
SOC := qca9558
|
||||||
|
DEVICE_VENDOR := Belkin
|
||||||
|
DEVICE_MODEL := F9J1108 v2 (AC1750 DB Wi-Fi)
|
||||||
|
IMAGE_SIZE := 14464k
|
||||||
|
DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct kmod-usb2 \
|
||||||
|
kmod-usb3 kmod-usb-ledtrig-usbport
|
||||||
|
LOADER_TYPE := bin
|
||||||
|
LOADER_FLASH_OFFS := 0x50000
|
||||||
|
COMPILE := loader-$(1).bin loader-$(1).uImage
|
||||||
|
COMPILE/loader-$(1).bin := loader-okli-compile
|
||||||
|
COMPILE/loader-$(1).uImage := append-loader-okli $(1) | pad-to 64k | \
|
||||||
|
lzma | uImage lzma
|
||||||
|
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49
|
||||||
|
IMAGES += factory.bin
|
||||||
|
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||||
|
append-rootfs | pad-rootfs | check-size | \
|
||||||
|
edimax-headers F9J1108v1 BR-6679BAC | pad-to $$$$(BLOCKSIZE)
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += belkin_f9j1108-v2
|
||||||
|
|
||||||
define Device/buffalo_bhr-4grv
|
define Device/buffalo_bhr-4grv
|
||||||
$(Device/buffalo_common)
|
$(Device/buffalo_common)
|
||||||
SOC := ar7242
|
SOC := ar7242
|
||||||
|
@ -14,8 +14,10 @@ actiontec,r1000h)
|
|||||||
ucidef_set_led_usbport "usb" "USB" "green:usb" "usb1-port1" "usb2-port1"
|
ucidef_set_led_usbport "usb" "USB" "green:usb" "usb1-port1" "usb2-port1"
|
||||||
;;
|
;;
|
||||||
adb,a4001n|\
|
adb,a4001n|\
|
||||||
|
adb,pdg-a4101n-a-000-1a1-ae|\
|
||||||
comtrend,ar-5315u|\
|
comtrend,ar-5315u|\
|
||||||
comtrend,vr-3032u|\
|
comtrend,vr-3032u|\
|
||||||
|
d-link,dsl-2750u-c1|\
|
||||||
huawei,hg253s-v2|\
|
huawei,hg253s-v2|\
|
||||||
nucom,r5010un-v2|\
|
nucom,r5010un-v2|\
|
||||||
sagem,fast-2704-v2)
|
sagem,fast-2704-v2)
|
||||||
@ -25,9 +27,8 @@ adb,a4001n1)
|
|||||||
ucidef_set_led_netdev "lan" "LAN" "green:eth" "eth0"
|
ucidef_set_led_netdev "lan" "LAN" "green:eth" "eth0"
|
||||||
ucidef_set_led_usbdev "usb" "USB" "green:3g" "1-1"
|
ucidef_set_led_usbdev "usb" "USB" "green:3g" "1-1"
|
||||||
;;
|
;;
|
||||||
adb,pdg-a4001n-a-000-1a1-ax)
|
adb,pdg-a4001n-a-000-1a1-ax|\
|
||||||
ucidef_set_led_netdev "lan" "LAN" "green:internet" "eth0.1"
|
technicolor,tg582n-telecom-italia)
|
||||||
ucidef_set_led_netdev "wan" "WAN" "green:adsl" "eth0.2"
|
|
||||||
ucidef_set_led_netdev "wlan0" "WIFI" "green:wifi" "wlan0"
|
ucidef_set_led_netdev "wlan0" "WIFI" "green:wifi" "wlan0"
|
||||||
ucidef_set_led_usbdev "usb1" "USB1" "green:service" "1-1"
|
ucidef_set_led_usbdev "usb1" "USB1" "green:service" "1-1"
|
||||||
ucidef_set_led_usbdev "usb2" "USB2" "red:service" "2-1"
|
ucidef_set_led_usbdev "usb2" "USB2" "red:service" "2-1"
|
||||||
@ -92,6 +93,10 @@ sercomm,h500-s-lowi|\
|
|||||||
sercomm,h500-s-vfes)
|
sercomm,h500-s-vfes)
|
||||||
ucidef_set_led_netdev "wan" "WAN" "green:internet" "eth0.2"
|
ucidef_set_led_netdev "wan" "WAN" "green:internet" "eth0.2"
|
||||||
;;
|
;;
|
||||||
|
technicolor,tg582n)
|
||||||
|
ucidef_set_led_netdev "wlan0" "WIFI" "green:wifi" "wlan0"
|
||||||
|
ucidef_set_led_usbdev "usb" "USB" "red:power" "1-1"
|
||||||
|
;;
|
||||||
telsey,cpva502plus)
|
telsey,cpva502plus)
|
||||||
ucidef_set_led_netdev "lan" "LAN" "amber:link" "eth0"
|
ucidef_set_led_netdev "lan" "LAN" "amber:link" "eth0"
|
||||||
;;
|
;;
|
||||||
|
@ -21,6 +21,7 @@ t-com,speedport-w-500v)
|
|||||||
adb,a4001n1|\
|
adb,a4001n1|\
|
||||||
adb,a4001n|\
|
adb,a4001n|\
|
||||||
adb,pdg-a4001n-a-000-1a1-ax|\
|
adb,pdg-a4001n-a-000-1a1-ax|\
|
||||||
|
adb,pdg-a4101n-a-000-1a1-ae|\
|
||||||
adb,av4202n|\
|
adb,av4202n|\
|
||||||
brcm,bcm963281tan|\
|
brcm,bcm963281tan|\
|
||||||
brcm,bcm96328avng|\
|
brcm,bcm96328avng|\
|
||||||
@ -31,12 +32,15 @@ comtrend,vr-3025u|\
|
|||||||
comtrend,vr-3025un|\
|
comtrend,vr-3025un|\
|
||||||
comtrend,vr-3026e|\
|
comtrend,vr-3026e|\
|
||||||
d-link,dsl-274xb-f1|\
|
d-link,dsl-274xb-f1|\
|
||||||
|
d-link,dsl-2750u-c1|\
|
||||||
d-link,dsl-275xb-d1|\
|
d-link,dsl-275xb-d1|\
|
||||||
huawei,echolife-hg622|\
|
huawei,echolife-hg622|\
|
||||||
huawei,echolife-hg655b|\
|
huawei,echolife-hg655b|\
|
||||||
nucom,r5010un-v2|\
|
nucom,r5010un-v2|\
|
||||||
sagem,fast-2504n|\
|
sagem,fast-2504n|\
|
||||||
sagem,fast-2704-v2|\
|
sagem,fast-2704-v2|\
|
||||||
|
technicolor,tg582n|\
|
||||||
|
technicolor,tg582n-telecom-italia|\
|
||||||
zyxel,p870hw-51a-v2)
|
zyxel,p870hw-51a-v2)
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
|
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
|
||||||
@ -96,6 +100,7 @@ huawei,echolife-hg556a-c)
|
|||||||
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0"
|
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0"
|
||||||
;;
|
;;
|
||||||
comtrend,ar-5315u|\
|
comtrend,ar-5315u|\
|
||||||
|
innacomm,w3400v6|\
|
||||||
observa,vh4032n|\
|
observa,vh4032n|\
|
||||||
sagem,fast-2704n)
|
sagem,fast-2704n)
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
|
@ -13,6 +13,7 @@ case "$(board_name)" in
|
|||||||
adb,a4001n|\
|
adb,a4001n|\
|
||||||
adb,a4001n1|\
|
adb,a4001n1|\
|
||||||
adb,pdg-a4001n-a-000-1a1-ax|\
|
adb,pdg-a4001n-a-000-1a1-ax|\
|
||||||
|
adb,pdg-a4101n-a-000-1a1-ae|\
|
||||||
brcm,bcm96328avng|\
|
brcm,bcm96328avng|\
|
||||||
brcm,bcm963281tan|\
|
brcm,bcm963281tan|\
|
||||||
bt,voyager-2110|\
|
bt,voyager-2110|\
|
||||||
@ -33,6 +34,8 @@ case "$(board_name)" in
|
|||||||
nucom,r5010un-v2|\
|
nucom,r5010un-v2|\
|
||||||
observa,vh4032n|\
|
observa,vh4032n|\
|
||||||
t-com,speedport-w-303v|\
|
t-com,speedport-w-303v|\
|
||||||
|
technicolor,tg582n|\
|
||||||
|
technicolor,tg582n-telecom-italia|\
|
||||||
telsey,cpva502plus|\
|
telsey,cpva502plus|\
|
||||||
telsey,cpva642|\
|
telsey,cpva642|\
|
||||||
telsey,magic|\
|
telsey,magic|\
|
||||||
|
@ -135,15 +135,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
partition@10000 {
|
partition@10000 {
|
||||||
reg = <0x010000 0xfe0000>;
|
reg = <0x010000 0xff0000>;
|
||||||
label = "linux";
|
label = "linux";
|
||||||
compatible = "brcm,bcm963xx-imagetag";
|
compatible = "brcm,bcm963xx-imagetag";
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@ff0000 {
|
|
||||||
reg = <0xff0000 0x010000>;
|
|
||||||
label = "nvram";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
141
target/linux/bcm63xx/dts/bcm6328-adb-pdg-a4101n-a-000-1a1-ae.dts
Normal file
141
target/linux/bcm63xx/dts/bcm6328-adb-pdg-a4101n-a-000-1a1-ae.dts
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "bcm6328.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "ADB P.DG A4101N A-000-1A1-AE";
|
||||||
|
compatible = "adb,pdg-a4101n-a-000-1a1-ae", "brcm,bcm6328";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_dsl_green;
|
||||||
|
led-failsafe = &led_dsl_green;
|
||||||
|
led-upgrade = &led_dsl_green;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys-polled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
poll-interval = <20>;
|
||||||
|
|
||||||
|
wifi {
|
||||||
|
label = "wifi";
|
||||||
|
gpios = <&pinctrl 12 1>;
|
||||||
|
linux,code = <KEY_WLAN>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&pinctrl 23 1>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
gpios = <&pinctrl 24 1>;
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led@31 {
|
||||||
|
label = "green:tel";
|
||||||
|
gpios = <&pinctrl 31 1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&leds {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&pinctrl_leds>;
|
||||||
|
|
||||||
|
led_dsl_green: led@3 {
|
||||||
|
reg = <3>;
|
||||||
|
active-low;
|
||||||
|
label = "green:dsl";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@9 {
|
||||||
|
reg = <9>;
|
||||||
|
active-low;
|
||||||
|
label = "green:wps";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@10 {
|
||||||
|
reg = <10>;
|
||||||
|
active-low;
|
||||||
|
label = "green:usb";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@11 {
|
||||||
|
reg = <11>;
|
||||||
|
active-low;
|
||||||
|
label = "green:internet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&hsspi {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
spi-max-frequency = <16666667>;
|
||||||
|
spi-tx-bus-width = <2>;
|
||||||
|
spi-rx-bus-width = <2>;
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
reg = <0x000000 0x010000>;
|
||||||
|
label = "cfe";
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@10000 {
|
||||||
|
reg = <0x010000 0xff0000>;
|
||||||
|
label = "linux";
|
||||||
|
compatible = "brcm,bcm963xx-imagetag";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
pinctrl_leds: leds {
|
||||||
|
function = "led";
|
||||||
|
pins = "gpio3", "gpio9", "gpio10",
|
||||||
|
"gpio11";
|
||||||
|
};
|
||||||
|
|
||||||
|
green_internet_switch {
|
||||||
|
gpio-hog;
|
||||||
|
gpios = <2 1>;
|
||||||
|
output-low;
|
||||||
|
line-name = "green:internet-switch";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
146
target/linux/bcm63xx/dts/bcm6328-d-link-dsl-2750u-c1.dts
Normal file
146
target/linux/bcm63xx/dts/bcm6328-d-link-dsl-2750u-c1.dts
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "bcm6328.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "D-Link DSL-2750U rev C1";
|
||||||
|
compatible = "d-link,dsl-2750u-c1", "brcm,bcm6328";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_power_green;
|
||||||
|
led-failsafe = &led_power_green;
|
||||||
|
led-running = &led_power_green;
|
||||||
|
led-upgrade = &led_power_green;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys-polled";
|
||||||
|
poll-interval = <20>;
|
||||||
|
|
||||||
|
wifi {
|
||||||
|
label = "wifi";
|
||||||
|
gpios = <&pinctrl 12 1>;
|
||||||
|
linux,code = <KEY_WLAN>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&pinctrl 23 1>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
gpios = <&pinctrl 24 1>;
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&hsspi {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
spi-max-frequency = <16666667>;
|
||||||
|
spi-tx-bus-width = <2>;
|
||||||
|
spi-rx-bus-width = <2>;
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
cfe@0 {
|
||||||
|
reg = <0x000000 0x010000>;
|
||||||
|
label = "cfe";
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
linux@10000 {
|
||||||
|
reg = <0x010000 0x7e0000>;
|
||||||
|
label = "linux";
|
||||||
|
compatible = "brcm,bcm963xx-imagetag";
|
||||||
|
};
|
||||||
|
|
||||||
|
nvram@7f0000 {
|
||||||
|
reg = <0x7f0000 0x010000>;
|
||||||
|
label = "nvram";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&leds {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&pinctrl_leds>;
|
||||||
|
|
||||||
|
led@1 {
|
||||||
|
reg = <1>;
|
||||||
|
active-low;
|
||||||
|
label = "green:inet";
|
||||||
|
};
|
||||||
|
|
||||||
|
led_power_green: led@4 {
|
||||||
|
reg = <4>;
|
||||||
|
active-low;
|
||||||
|
label = "green:power";
|
||||||
|
default-state = "on";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@7 {
|
||||||
|
reg = <7>;
|
||||||
|
active-low;
|
||||||
|
label = "red:inet";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@8 {
|
||||||
|
reg = <8>;
|
||||||
|
active-low;
|
||||||
|
label = "red:power";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@9 {
|
||||||
|
reg = <9>;
|
||||||
|
active-low;
|
||||||
|
label = "green:wps";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@10 {
|
||||||
|
reg = <10>;
|
||||||
|
active-low;
|
||||||
|
label = "green:usb";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@11 {
|
||||||
|
reg = <11>;
|
||||||
|
active-low;
|
||||||
|
label = "green:dsl";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
pinctrl_leds: leds {
|
||||||
|
function = "led";
|
||||||
|
pins = "gpio1", "gpio4", "gpio7",
|
||||||
|
"gpio8", "gpio9", "gpio10",
|
||||||
|
"gpio11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
118
target/linux/bcm63xx/dts/bcm6328-innacomm-w3400v6.dts
Normal file
118
target/linux/bcm63xx/dts/bcm6328-innacomm-w3400v6.dts
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "bcm6328.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Innacomm W3400V6";
|
||||||
|
compatible = "innacomm,w3400v6", "brcm,bcm6328";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_power_green;
|
||||||
|
led-failsafe = &led_power_red;
|
||||||
|
led-running = &led_power_green;
|
||||||
|
led-upgrade = &led_power_green;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys-polled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
poll-interval = <20>;
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
gpios = <&pinctrl 15 1>;
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&pinctrl 23 1>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&hsspi {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
spi-max-frequency = <16666667>;
|
||||||
|
spi-tx-bus-width = <2>;
|
||||||
|
spi-rx-bus-width = <2>;
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "brcm,bcm963xx-cfe-nor-partitions";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&leds {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&pinctrl_leds>;
|
||||||
|
|
||||||
|
led@1 {
|
||||||
|
reg = <1>;
|
||||||
|
active-low;
|
||||||
|
label = "green:inet";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@2 {
|
||||||
|
reg = <2>;
|
||||||
|
active-low;
|
||||||
|
label = "red:inet";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@3 {
|
||||||
|
reg = <3>;
|
||||||
|
active-low;
|
||||||
|
label = "green:dsl";
|
||||||
|
};
|
||||||
|
|
||||||
|
led_power_green: led@4 {
|
||||||
|
reg = <4>;
|
||||||
|
active-low;
|
||||||
|
label = "green:power";
|
||||||
|
default-state = "on";
|
||||||
|
};
|
||||||
|
|
||||||
|
led_power_red: led@5 {
|
||||||
|
reg = <5>;
|
||||||
|
active-low;
|
||||||
|
label = "red:power";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@11 {
|
||||||
|
reg = <11>;
|
||||||
|
active-low;
|
||||||
|
label = "green:wps";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
pinctrl_leds: leds {
|
||||||
|
function = "led";
|
||||||
|
pins = "gpio1", "gpio2", "gpio3",
|
||||||
|
"gpio4", "gpio5", "gpio11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
@ -0,0 +1,153 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "bcm6328.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Technicolor TG582n Telecom Italia";
|
||||||
|
compatible = "technicolor,tg582n-telecom-italia", "brcm,bcm6328";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_power_green;
|
||||||
|
led-failsafe = &led_power_green;
|
||||||
|
led-running = &led_power_green;
|
||||||
|
led-upgrade = &led_power_green;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys-polled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
poll-interval = <20>;
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&pinctrl 23 1>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
gpios = <&pinctrl 24 1>;
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&leds {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&pinctrl_leds>;
|
||||||
|
|
||||||
|
led@1 {
|
||||||
|
reg = <1>;
|
||||||
|
active-low;
|
||||||
|
label = "green:wifi";
|
||||||
|
};
|
||||||
|
|
||||||
|
led_power_green: led@4 {
|
||||||
|
reg = <4>;
|
||||||
|
active-low;
|
||||||
|
label = "green:power";
|
||||||
|
default-state = "on";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@5 {
|
||||||
|
reg = <5>;
|
||||||
|
active-low;
|
||||||
|
label = "green:adsl";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@7 {
|
||||||
|
reg = <7>;
|
||||||
|
active-low;
|
||||||
|
label = "red:wifi";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@8 {
|
||||||
|
reg = <8>;
|
||||||
|
active-low;
|
||||||
|
label = "red:power";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@11 {
|
||||||
|
reg = <11>;
|
||||||
|
active-low;
|
||||||
|
label = "green:internet";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@14 {
|
||||||
|
reg = <14>;
|
||||||
|
active-low;
|
||||||
|
label = "red:internet";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@18 {
|
||||||
|
reg = <18>;
|
||||||
|
active-low;
|
||||||
|
label = "red:service";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@19 {
|
||||||
|
reg = <19>;
|
||||||
|
active-low;
|
||||||
|
label = "green:service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&hsspi {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
spi-max-frequency = <16666667>;
|
||||||
|
spi-tx-bus-width = <2>;
|
||||||
|
spi-rx-bus-width = <2>;
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
reg = <0x000000 0x010000>;
|
||||||
|
label = "cfe";
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@10000 {
|
||||||
|
reg = <0x010000 0xff0000>;
|
||||||
|
label = "linux";
|
||||||
|
compatible = "brcm,bcm963xx-imagetag";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
pinctrl_leds: leds {
|
||||||
|
function = "led";
|
||||||
|
pins = "gpio1", "gpio4",
|
||||||
|
"gpio5", "gpio7",
|
||||||
|
"gpio8", "gpio11",
|
||||||
|
"gpio14", "gpio18",
|
||||||
|
"gpio19";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
166
target/linux/bcm63xx/dts/bcm6328-technicolor-tg582n.dts
Normal file
166
target/linux/bcm63xx/dts/bcm6328-technicolor-tg582n.dts
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "bcm6328.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Technicolor TG582n";
|
||||||
|
compatible = "technicolor,tg582n", "brcm,bcm6328";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_power_green;
|
||||||
|
led-failsafe = &led_power_green;
|
||||||
|
led-running = &led_power_green;
|
||||||
|
led-upgrade = &led_power_green;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys-polled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
poll-interval = <20>;
|
||||||
|
|
||||||
|
wifi {
|
||||||
|
label = "wifi";
|
||||||
|
gpios = <&pinctrl 15 1>;
|
||||||
|
linux,code = <KEY_WLAN>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&pinctrl 23 1>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
gpios = <&pinctrl 24 1>;
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&leds {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&pinctrl_leds>;
|
||||||
|
|
||||||
|
led@1 {
|
||||||
|
reg = <1>;
|
||||||
|
active-low;
|
||||||
|
label = "green:internet";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@2 {
|
||||||
|
reg = <2>;
|
||||||
|
active-low;
|
||||||
|
label = "red:wifi";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@3 {
|
||||||
|
reg = <3>;
|
||||||
|
active-low;
|
||||||
|
label = "green:wifi";
|
||||||
|
};
|
||||||
|
|
||||||
|
led_power_green: led@4 {
|
||||||
|
reg = <4>;
|
||||||
|
active-low;
|
||||||
|
label = "green:power";
|
||||||
|
default-state = "on";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@5 {
|
||||||
|
reg = <5>;
|
||||||
|
active-low;
|
||||||
|
label = "green:ethernet";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@7 {
|
||||||
|
reg = <7>;
|
||||||
|
active-low;
|
||||||
|
label = "red:internet";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@8 {
|
||||||
|
reg = <8>;
|
||||||
|
active-low;
|
||||||
|
label = "red:power";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@9 {
|
||||||
|
reg = <9>;
|
||||||
|
active-low;
|
||||||
|
label = "green:wps";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@10 {
|
||||||
|
reg = <10>;
|
||||||
|
active-low;
|
||||||
|
label = "red:wps";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@11 {
|
||||||
|
reg = <11>;
|
||||||
|
active-low;
|
||||||
|
label = "green:broadband";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&hsspi {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
spi-max-frequency = <16666667>;
|
||||||
|
spi-tx-bus-width = <2>;
|
||||||
|
spi-rx-bus-width = <2>;
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
reg = <0x000000 0x010000>;
|
||||||
|
label = "cfe";
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@10000 {
|
||||||
|
reg = <0x010000 0xff0000>;
|
||||||
|
label = "linux";
|
||||||
|
compatible = "brcm,bcm963xx-imagetag";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
pinctrl_leds: leds {
|
||||||
|
function = "led";
|
||||||
|
pins = "gpio1", "gpio2",
|
||||||
|
"gpio3", "gpio4",
|
||||||
|
"gpio5", "gpio7",
|
||||||
|
"gpio8", "gpio9",
|
||||||
|
"gpio10", "gpio11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
@ -237,6 +237,18 @@ define Device/adb_pdg-a4001n-a-000-1a1-ax
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += adb_pdg-a4001n-a-000-1a1-ax
|
TARGET_DEVICES += adb_pdg-a4001n-a-000-1a1-ax
|
||||||
|
|
||||||
|
define Device/adb_pdg-a4101n-a-000-1a1-ae
|
||||||
|
$(Device/bcm63xx)
|
||||||
|
DEVICE_VENDOR := ADB
|
||||||
|
DEVICE_MODEL := P.DG A4101N A-000-1A1-AE
|
||||||
|
IMAGES += sysupgrade.bin
|
||||||
|
CFE_BOARD_ID := 96328avngv
|
||||||
|
CHIP_ID := 6328
|
||||||
|
FLASH_MB := 16
|
||||||
|
DEVICE_PACKAGES := $(USB2_PACKAGES) $(B43_PACKAGES)
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += adb_pdg-a4101n-a-000-1a1-ae
|
||||||
|
|
||||||
define Device/adb_av4202n
|
define Device/adb_av4202n
|
||||||
$(Device/bcm63xx)
|
$(Device/bcm63xx)
|
||||||
DEVICE_VENDOR := ADB
|
DEVICE_VENDOR := ADB
|
||||||
@ -571,6 +583,19 @@ define Device/d-link_dsl-274xb-f1
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += d-link_dsl-274xb-f1
|
TARGET_DEVICES += d-link_dsl-274xb-f1
|
||||||
|
|
||||||
|
define Device/d-link_dsl-2750u-c1
|
||||||
|
$(Device/bcm63xx)
|
||||||
|
DEVICE_VENDOR := D-Link
|
||||||
|
DEVICE_MODEL := DSL-2750U
|
||||||
|
DEVICE_VARIANT := C1
|
||||||
|
IMAGES += sysupgrade.bin
|
||||||
|
CFE_BOARD_ID := 963281TAVNG
|
||||||
|
CHIP_ID := 6328
|
||||||
|
FLASH_MB := 8
|
||||||
|
DEVICE_PACKAGES := $(USB2_PACKAGES) $(B43_PACKAGES)
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += d-link_dsl-2750u-c1
|
||||||
|
|
||||||
define Device/d-link_dsl-275xb-d1
|
define Device/d-link_dsl-275xb-d1
|
||||||
$(Device/bcm63xx)
|
$(Device/bcm63xx)
|
||||||
DEVICE_VENDOR := D-Link
|
DEVICE_VENDOR := D-Link
|
||||||
@ -756,6 +781,18 @@ define Device/huawei_echolife-hg655b
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += huawei_echolife-hg655b
|
TARGET_DEVICES += huawei_echolife-hg655b
|
||||||
|
|
||||||
|
### Innacomm ###
|
||||||
|
define Device/innacomm_w3400v6
|
||||||
|
$(Device/bcm63xx)
|
||||||
|
DEVICE_VENDOR := Innacomm
|
||||||
|
DEVICE_MODEL := W3400V6
|
||||||
|
CFE_BOARD_ID := 96328ang
|
||||||
|
CHIP_ID := 6328
|
||||||
|
FLASH_MB := 8
|
||||||
|
DEVICE_PACKAGES := $(B43_PACKAGES)
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += innacomm_w3400v6
|
||||||
|
|
||||||
### Inteno ###
|
### Inteno ###
|
||||||
define Device/inteno_vg50
|
define Device/inteno_vg50
|
||||||
$(Device/bcm63xx)
|
$(Device/bcm63xx)
|
||||||
@ -1073,6 +1110,32 @@ define Device/t-com_speedport-w-500v
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += t-com_speedport-w-500v
|
TARGET_DEVICES += t-com_speedport-w-500v
|
||||||
|
|
||||||
|
### Technicolor ###
|
||||||
|
define Device/technicolor_tg582n
|
||||||
|
$(Device/bcm63xx)
|
||||||
|
DEVICE_VENDOR := Technicolor
|
||||||
|
DEVICE_MODEL := TG582n
|
||||||
|
IMAGES += sysupgrade.bin
|
||||||
|
CFE_BOARD_ID := DANT-1
|
||||||
|
CHIP_ID := 6328
|
||||||
|
FLASH_MB := 16
|
||||||
|
DEVICE_PACKAGES := $(USB2_PACKAGES) $(B43_PACKAGES)
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += technicolor_tg582n
|
||||||
|
|
||||||
|
define Device/technicolor_tg582n-telecom-italia
|
||||||
|
$(Device/bcm63xx)
|
||||||
|
DEVICE_VENDOR := Technicolor
|
||||||
|
DEVICE_MODEL := TG582n
|
||||||
|
DEVICE_VARIANT := Telecom Italia
|
||||||
|
IMAGES += sysupgrade.bin
|
||||||
|
CFE_BOARD_ID := DANT-V
|
||||||
|
CHIP_ID := 6328
|
||||||
|
FLASH_MB := 16
|
||||||
|
DEVICE_PACKAGES := $(USB2_PACKAGES) $(B43_PACKAGES)
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += technicolor_tg582n-telecom-italia
|
||||||
|
|
||||||
### Tecom ###
|
### Tecom ###
|
||||||
define Device/tecom_gw6000
|
define Device/tecom_gw6000
|
||||||
$(Device/bcm63xx-legacy)
|
$(Device/bcm63xx-legacy)
|
||||||
|
@ -0,0 +1,67 @@
|
|||||||
|
From 3c0e8e1259d223a1493c47f7e277d05b93909b6b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sieng Piaw Liew <liew.s.piaw@gmail.com>
|
||||||
|
Date: Mon, 2 Nov 2020 11:34:06 +0800
|
||||||
|
Subject: [PATCH 1/2] bcm63xx: add BQL support
|
||||||
|
|
||||||
|
Add Byte Queue Limits support to reduce/remove bufferbloat in bcm63xx target.
|
||||||
|
|
||||||
|
Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
|
||||||
|
---
|
||||||
|
bcm63xx_enet.c | 11 +++++++++++
|
||||||
|
1 file changed, 11 insertions(+)
|
||||||
|
|
||||||
|
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
|
||||||
|
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
|
||||||
|
@@ -423,9 +423,11 @@ static int bcm_enet_tx_reclaim(struct ne
|
||||||
|
{
|
||||||
|
struct bcm_enet_priv *priv;
|
||||||
|
int released;
|
||||||
|
+ unsigned int bytes;
|
||||||
|
|
||||||
|
priv = netdev_priv(dev);
|
||||||
|
released = 0;
|
||||||
|
+ bytes = 0;
|
||||||
|
|
||||||
|
while (priv->tx_desc_count < priv->tx_ring_size) {
|
||||||
|
struct bcm_enet_desc *desc;
|
||||||
|
@@ -461,10 +463,13 @@ static int bcm_enet_tx_reclaim(struct ne
|
||||||
|
if (desc->len_stat & DMADESC_UNDER_MASK)
|
||||||
|
dev->stats.tx_errors++;
|
||||||
|
|
||||||
|
+ bytes += skb->len;
|
||||||
|
dev_kfree_skb(skb);
|
||||||
|
released++;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ netdev_completed_queue(dev, released, bytes);
|
||||||
|
+
|
||||||
|
if (netif_queue_stopped(dev) && released)
|
||||||
|
netif_wake_queue(dev);
|
||||||
|
|
||||||
|
@@ -631,6 +636,8 @@ bcm_enet_start_xmit(struct sk_buff *skb,
|
||||||
|
desc->len_stat = len_stat;
|
||||||
|
wmb();
|
||||||
|
|
||||||
|
+ netdev_sent_queue(dev, skb->len);
|
||||||
|
+
|
||||||
|
/* kick tx dma */
|
||||||
|
enet_dmac_writel(priv, priv->dma_chan_en_mask,
|
||||||
|
ENETDMAC_CHANCFG, priv->tx_chan);
|
||||||
|
@@ -1051,6 +1058,8 @@ static int bcm_enet_open(struct net_devi
|
||||||
|
else
|
||||||
|
bcm_enet_adjust_link(dev);
|
||||||
|
|
||||||
|
+ netdev_reset_queue(dev);
|
||||||
|
+
|
||||||
|
netif_start_queue(dev);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
@@ -2281,6 +2290,8 @@ static int bcm_enetsw_open(struct net_de
|
||||||
|
enet_dmac_writel(priv, ENETDMAC_IR_PKTDONE_MASK,
|
||||||
|
ENETDMAC_IRMASK, priv->tx_chan);
|
||||||
|
|
||||||
|
+ netdev_reset_queue(dev);
|
||||||
|
+
|
||||||
|
netif_carrier_on(dev);
|
||||||
|
netif_start_queue(dev);
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
From 79bfb73319098bc4cb701139a6677dcdec99182f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sieng Piaw Liew <liew.s.piaw@gmail.com>
|
||||||
|
Date: Tue, 3 Nov 2020 08:14:35 +0800
|
||||||
|
Subject: [PATCH 2/2] bcm63xx: support xmit_more in BQL
|
||||||
|
|
||||||
|
Support bulking hardware TX queue by using xmit_more.
|
||||||
|
|
||||||
|
Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
|
||||||
|
---
|
||||||
|
bcm63xx_enet.c | 10 ++++++----
|
||||||
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
|
||||||
|
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
|
||||||
|
@@ -638,14 +638,16 @@ bcm_enet_start_xmit(struct sk_buff *skb,
|
||||||
|
|
||||||
|
netdev_sent_queue(dev, skb->len);
|
||||||
|
|
||||||
|
- /* kick tx dma */
|
||||||
|
- enet_dmac_writel(priv, priv->dma_chan_en_mask,
|
||||||
|
- ENETDMAC_CHANCFG, priv->tx_chan);
|
||||||
|
-
|
||||||
|
/* stop queue if no more desc available */
|
||||||
|
if (!priv->tx_desc_count)
|
||||||
|
netif_stop_queue(dev);
|
||||||
|
|
||||||
|
+ /* kick tx dma */
|
||||||
|
+ if(!netdev_xmit_more() || !priv->tx_desc_count)
|
||||||
|
+ enet_dmac_writel(priv, priv->dma_chan_en_mask,
|
||||||
|
+ ENETDMAC_CHANCFG, priv->tx_chan);
|
||||||
|
+
|
||||||
|
+
|
||||||
|
dev->stats.tx_bytes += skb->len;
|
||||||
|
dev->stats.tx_packets++;
|
||||||
|
ret = NETDEV_TX_OK;
|
||||||
|
@@ -2713,7 +2715,7 @@ static int bcm_enetsw_probe(struct platf
|
||||||
|
priv->irq_rx = irq_rx;
|
||||||
|
priv->irq_tx = irq_tx;
|
||||||
|
priv->rx_ring_size = BCMENET_DEF_RX_DESC;
|
||||||
|
- priv->tx_ring_size = BCMENET_DEF_TX_DESC;
|
||||||
|
+ priv->tx_ring_size = BCMENETSW_DEF_TX_DESC;
|
||||||
|
priv->dma_maxburst = BCMENETSW_DMA_MAXBURST;
|
||||||
|
|
||||||
|
pd = dev_get_platdata(&pdev->dev);
|
||||||
|
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.h
|
||||||
|
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.h
|
||||||
|
@@ -15,6 +15,7 @@
|
||||||
|
/* default number of descriptor */
|
||||||
|
#define BCMENET_DEF_RX_DESC 64
|
||||||
|
#define BCMENET_DEF_TX_DESC 32
|
||||||
|
+#define BCMENETSW_DEF_TX_DESC 48
|
||||||
|
|
||||||
|
/* maximum burst len for dma (4 bytes unit) */
|
||||||
|
#define BCMENET_DMA_MAXBURST 16
|
@ -1,6 +1,6 @@
|
|||||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
@@ -348,6 +348,482 @@ static struct board_info __initdata boar
|
@@ -348,6 +348,651 @@ static struct board_info __initdata boar
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -438,6 +438,49 @@
|
|||||||
+ },
|
+ },
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
|
+static struct board_info __initdata board_PDG_A4101N_A_000_1A1_AE = {
|
||||||
|
+ .name = "96328avngv",
|
||||||
|
+ .expected_cpu_id = 0x6328,
|
||||||
|
+
|
||||||
|
+ .has_pci = 1,
|
||||||
|
+ .has_ohci0 = 1,
|
||||||
|
+ .has_ehci0 = 1,
|
||||||
|
+ .num_usbh_ports = 1,
|
||||||
|
+
|
||||||
|
+ .has_enetsw = 1,
|
||||||
|
+ .enetsw = {
|
||||||
|
+ .used_ports = {
|
||||||
|
+ [0] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 1,
|
||||||
|
+ .name = "Port 1",
|
||||||
|
+ },
|
||||||
|
+ [1] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 2,
|
||||||
|
+ .name = "Port 2",
|
||||||
|
+ },
|
||||||
|
+ [2] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 3,
|
||||||
|
+ .name = "Port 3",
|
||||||
|
+ },
|
||||||
|
+ [3] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 4,
|
||||||
|
+ .name = "Port 4",
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+
|
||||||
|
+ .use_fallback_sprom = 1,
|
||||||
|
+ .fallback_sprom = {
|
||||||
|
+ .type = SPROM_BCM43225,
|
||||||
|
+ .pci_bus = 1,
|
||||||
|
+ .pci_dev = 0,
|
||||||
|
+ },
|
||||||
|
+};
|
||||||
|
+
|
||||||
+static struct board_info __initdata board_R5010UNV2 = {
|
+static struct board_info __initdata board_R5010UNV2 = {
|
||||||
+ .name = "96328ang",
|
+ .name = "96328ang",
|
||||||
+ .expected_cpu_id = 0x6328,
|
+ .expected_cpu_id = 0x6328,
|
||||||
@ -479,11 +522,137 @@
|
|||||||
+ .pci_bus = 1,
|
+ .pci_bus = 1,
|
||||||
+ .pci_dev = 0,
|
+ .pci_dev = 0,
|
||||||
+ },
|
+ },
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct board_info __initdata board_TG582N = {
|
||||||
|
+ .name = "DANT-1",
|
||||||
|
+ .expected_cpu_id = 0x6328,
|
||||||
|
+
|
||||||
|
+ .has_pci = 1,
|
||||||
|
+ .has_ohci0 = 1,
|
||||||
|
+ .has_ehci0 = 1,
|
||||||
|
+ .num_usbh_ports = 1,
|
||||||
|
+
|
||||||
|
+ .has_enetsw = 1,
|
||||||
|
+ .enetsw = {
|
||||||
|
+ .used_ports = {
|
||||||
|
+ [0] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 1,
|
||||||
|
+ .name = "Port 1",
|
||||||
|
+ },
|
||||||
|
+ [1] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 2,
|
||||||
|
+ .name = "Port 2",
|
||||||
|
+ },
|
||||||
|
+ [2] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 3,
|
||||||
|
+ .name = "Port 3",
|
||||||
|
+ },
|
||||||
|
+ [3] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 4,
|
||||||
|
+ .name = "Port 4",
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+
|
||||||
|
+ .use_fallback_sprom = 1,
|
||||||
|
+ .fallback_sprom = {
|
||||||
|
+ .type = SPROM_BCM43225,
|
||||||
|
+ .pci_bus = 1,
|
||||||
|
+ .pci_dev = 0,
|
||||||
|
+ },
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct board_info __initdata board_TG582N_TELECOM_ITALIA = {
|
||||||
|
+ .name = "DANT-V",
|
||||||
|
+ .expected_cpu_id = 0x6328,
|
||||||
|
+
|
||||||
|
+ .has_pci = 1,
|
||||||
|
+ .has_ohci0 = 1,
|
||||||
|
+ .has_ehci0 = 1,
|
||||||
|
+ .num_usbh_ports = 1,
|
||||||
|
+
|
||||||
|
+ .has_enetsw = 1,
|
||||||
|
+ .enetsw = {
|
||||||
|
+ .used_ports = {
|
||||||
|
+ [0] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 1,
|
||||||
|
+ .name = "Port 1",
|
||||||
|
+ },
|
||||||
|
+ [1] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 2,
|
||||||
|
+ .name = "Port 2",
|
||||||
|
+ },
|
||||||
|
+ [2] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 3,
|
||||||
|
+ .name = "Port 3",
|
||||||
|
+ },
|
||||||
|
+ [3] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 4,
|
||||||
|
+ .name = "Port 4",
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+
|
||||||
|
+ .use_fallback_sprom = 1,
|
||||||
|
+ .fallback_sprom = {
|
||||||
|
+ .type = SPROM_BCM43225,
|
||||||
|
+ .pci_bus = 1,
|
||||||
|
+ .pci_dev = 0,
|
||||||
|
+ },
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct board_info __initdata board_W3400V6 = {
|
||||||
|
+ .name = "96328ang",
|
||||||
|
+ .expected_cpu_id = 0x6328,
|
||||||
|
+
|
||||||
|
+ .has_pci = 1,
|
||||||
|
+
|
||||||
|
+ .has_enetsw = 1,
|
||||||
|
+ .enetsw = {
|
||||||
|
+ .used_ports = {
|
||||||
|
+ [0] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 1,
|
||||||
|
+ .name = "Port 1",
|
||||||
|
+ },
|
||||||
|
+ [1] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 2,
|
||||||
|
+ .name = "Port 2",
|
||||||
|
+ },
|
||||||
|
+ [2] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 3,
|
||||||
|
+ .name = "Port 3",
|
||||||
|
+ },
|
||||||
|
+ [3] = {
|
||||||
|
+ .used = 1,
|
||||||
|
+ .phy_id = 4,
|
||||||
|
+ .name = "Port 4",
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+
|
||||||
|
+ .use_fallback_sprom = 1,
|
||||||
|
+ .fallback_sprom = {
|
||||||
|
+ .type = SPROM_BCM4318,
|
||||||
|
+ .pci_bus = 1,
|
||||||
|
+ .pci_dev = 0,
|
||||||
|
+ },
|
||||||
+};
|
+};
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6328 */
|
#endif /* CONFIG_BCM63XX_CPU_6328 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -703,6 +1179,16 @@ static const struct board_info __initcon
|
@@ -703,6 +1348,20 @@ static const struct board_info __initcon
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6318 */
|
#endif /* CONFIG_BCM63XX_CPU_6318 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6328
|
#ifdef CONFIG_BCM63XX_CPU_6328
|
||||||
&board_96328avng,
|
&board_96328avng,
|
||||||
@ -496,26 +665,35 @@
|
|||||||
+ &board_dsl_274xb_f1,
|
+ &board_dsl_274xb_f1,
|
||||||
+ &board_FAST2704V2,
|
+ &board_FAST2704V2,
|
||||||
+ &board_PDG_A4001N_A_000_1A1_AX,
|
+ &board_PDG_A4001N_A_000_1A1_AX,
|
||||||
|
+ &board_PDG_A4101N_A_000_1A1_AE,
|
||||||
|
+ &board_TG582N,
|
||||||
|
+ &board_TG582N_TELECOM_ITALIA,
|
||||||
+ &board_R5010UNV2,
|
+ &board_R5010UNV2,
|
||||||
|
+ &board_W3400V6,
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6328 */
|
#endif /* CONFIG_BCM63XX_CPU_6328 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6338
|
#ifdef CONFIG_BCM63XX_CPU_6338
|
||||||
&board_96338gw,
|
&board_96338gw,
|
||||||
@@ -742,7 +1228,18 @@ static struct of_device_id const bcm963x
|
@@ -742,7 +1401,23 @@ static struct of_device_id const bcm963x
|
||||||
{ .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, },
|
{ .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, },
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6318 */
|
#endif /* CONFIG_BCM63XX_CPU_6318 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6328
|
#ifdef CONFIG_BCM63XX_CPU_6328
|
||||||
+ { .compatible = "adb,a4001n", .data = &board_A4001N, },
|
+ { .compatible = "adb,a4001n", .data = &board_A4001N, },
|
||||||
+ { .compatible = "adb,a4001n1", .data = &board_A4001N1, },
|
+ { .compatible = "adb,a4001n1", .data = &board_A4001N1, },
|
||||||
+ { .compatible = "adb,pdg-a4001n-a-000-1a1-ax", .data = &board_PDG_A4001N_A_000_1A1_AX, },
|
+ { .compatible = "adb,pdg-a4001n-a-000-1a1-ax", .data = &board_PDG_A4001N_A_000_1A1_AX, },
|
||||||
|
+ { .compatible = "adb,pdg-a4101n-a-000-1a1-ae", .data = &board_PDG_A4101N_A_000_1A1_AE, },
|
||||||
{ .compatible = "brcm,bcm96328avng", .data = &board_96328avng, },
|
{ .compatible = "brcm,bcm96328avng", .data = &board_96328avng, },
|
||||||
+ { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, },
|
+ { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, },
|
||||||
+ { .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, },
|
+ { .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, },
|
||||||
+ { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, },
|
+ { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, },
|
||||||
+ { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, },
|
+ { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, },
|
||||||
|
+ { .compatible = "d-link,dsl-2750u-c1", .data = &board_A4001N, },
|
||||||
|
+ { .compatible = "innacomm,w3400v6", .data = &board_W3400V6, },
|
||||||
+ { .compatible = "nucom,r5010un-v2", .data = &board_R5010UNV2, },
|
+ { .compatible = "nucom,r5010un-v2", .data = &board_R5010UNV2, },
|
||||||
+ { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, },
|
+ { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, },
|
||||||
+ { .compatible = "sercomm,ad1018", .data = &board_AD1018, },
|
+ { .compatible = "sercomm,ad1018", .data = &board_AD1018, },
|
||||||
+ { .compatible = "sercomm,ad1018-nor", .data = &board_AD1018, },
|
+ { .compatible = "sercomm,ad1018-nor", .data = &board_AD1018, },
|
||||||
|
+ { .compatible = "technicolor,tg582n", .data = &board_TG582N, },
|
||||||
|
+ { .compatible = "technicolor,tg582n-telecom-italia", .data = &board_TG582N_TELECOM_ITALIA, },
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6328 */
|
#endif /* CONFIG_BCM63XX_CPU_6328 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6338
|
#ifdef CONFIG_BCM63XX_CPU_6338
|
||||||
{ .compatible = "brcm,bcm96338gw", .data = &board_96338gw, },
|
{ .compatible = "brcm,bcm96338gw", .data = &board_96338gw, },
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
@@ -857,6 +857,32 @@ static struct board_info __initdata boar
|
@@ -1026,6 +1026,32 @@ static struct board_info __initdata boar
|
||||||
.force_duplex_full = 1,
|
.force_duplex_full = 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -33,7 +33,7 @@
|
|||||||
#endif /* CONFIG_BCM63XX_CPU_6338 */
|
#endif /* CONFIG_BCM63XX_CPU_6338 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1193,6 +1219,8 @@ static const struct board_info __initcon
|
@@ -1366,6 +1392,8 @@ static const struct board_info __initcon
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6338
|
#ifdef CONFIG_BCM63XX_CPU_6338
|
||||||
&board_96338gw,
|
&board_96338gw,
|
||||||
&board_96338w,
|
&board_96338w,
|
||||||
@ -42,7 +42,7 @@
|
|||||||
#endif /* CONFIG_BCM63XX_CPU_6338 */
|
#endif /* CONFIG_BCM63XX_CPU_6338 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6345
|
#ifdef CONFIG_BCM63XX_CPU_6345
|
||||||
&board_96345gw2,
|
&board_96345gw2,
|
||||||
@@ -1244,6 +1272,8 @@ static struct of_device_id const bcm963x
|
@@ -1422,6 +1450,8 @@ static struct of_device_id const bcm963x
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6338
|
#ifdef CONFIG_BCM63XX_CPU_6338
|
||||||
{ .compatible = "brcm,bcm96338gw", .data = &board_96338gw, },
|
{ .compatible = "brcm,bcm96338gw", .data = &board_96338gw, },
|
||||||
{ .compatible = "brcm,bcm96338w", .data = &board_96338w, },
|
{ .compatible = "brcm,bcm96338w", .data = &board_96338w, },
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
@@ -893,6 +893,19 @@ static struct board_info __initdata boar
|
@@ -1062,6 +1062,19 @@ static struct board_info __initdata boar
|
||||||
.name = "96345GW2",
|
.name = "96345GW2",
|
||||||
.expected_cpu_id = 0x6345,
|
.expected_cpu_id = 0x6345,
|
||||||
};
|
};
|
||||||
@ -20,7 +20,7 @@
|
|||||||
#endif /* CONFIG_BCM63XX_CPU_6345 */
|
#endif /* CONFIG_BCM63XX_CPU_6345 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1224,6 +1237,7 @@ static const struct board_info __initcon
|
@@ -1397,6 +1410,7 @@ static const struct board_info __initcon
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6338 */
|
#endif /* CONFIG_BCM63XX_CPU_6338 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6345
|
#ifdef CONFIG_BCM63XX_CPU_6345
|
||||||
&board_96345gw2,
|
&board_96345gw2,
|
||||||
@ -28,7 +28,7 @@
|
|||||||
#endif /* CONFIG_BCM63XX_CPU_6345 */
|
#endif /* CONFIG_BCM63XX_CPU_6345 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6348
|
#ifdef CONFIG_BCM63XX_CPU_6348
|
||||||
&board_96348r,
|
&board_96348r,
|
||||||
@@ -1277,6 +1291,8 @@ static struct of_device_id const bcm963x
|
@@ -1455,6 +1469,8 @@ static struct of_device_id const bcm963x
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6338 */
|
#endif /* CONFIG_BCM63XX_CPU_6338 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6345
|
#ifdef CONFIG_BCM63XX_CPU_6345
|
||||||
{ .compatible = "brcm,bcm96345gw2", .data = &board_96345gw2, },
|
{ .compatible = "brcm,bcm96345gw2", .data = &board_96345gw2, },
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
@@ -1092,6 +1092,275 @@ static struct board_info __initdata boar
|
@@ -1261,6 +1261,275 @@ static struct board_info __initdata boar
|
||||||
|
|
||||||
.has_ohci0 = 1,
|
.has_ohci0 = 1,
|
||||||
};
|
};
|
||||||
@ -276,7 +276,7 @@
|
|||||||
#endif /* CONFIG_BCM63XX_CPU_6348 */
|
#endif /* CONFIG_BCM63XX_CPU_6348 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1248,6 +1517,19 @@ static const struct board_info __initcon
|
@@ -1421,6 +1690,19 @@ static const struct board_info __initcon
|
||||||
&board_DV201AMR,
|
&board_DV201AMR,
|
||||||
&board_96348gw_a,
|
&board_96348gw_a,
|
||||||
&board_rta1025w_16,
|
&board_rta1025w_16,
|
||||||
@ -296,7 +296,7 @@
|
|||||||
#endif /* CONFIG_BCM63XX_CPU_6348 */
|
#endif /* CONFIG_BCM63XX_CPU_6348 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6358
|
#ifdef CONFIG_BCM63XX_CPU_6358
|
||||||
&board_96358vw,
|
&board_96358vw,
|
||||||
@@ -1295,15 +1577,29 @@ static struct of_device_id const bcm963x
|
@@ -1473,15 +1755,29 @@ static struct of_device_id const bcm963x
|
||||||
{ .compatible = "dynalink,rta770w", .data = &board_rta770w, },
|
{ .compatible = "dynalink,rta770w", .data = &board_rta770w, },
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6345 */
|
#endif /* CONFIG_BCM63XX_CPU_6345 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6348
|
#ifdef CONFIG_BCM63XX_CPU_6348
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <asm/addrspace.h>
|
#include <asm/addrspace.h>
|
||||||
#include <bcm63xx_board.h>
|
#include <bcm63xx_board.h>
|
||||||
#include <bcm63xx_cpu.h>
|
#include <bcm63xx_cpu.h>
|
||||||
@@ -1445,6 +1446,88 @@ static struct board_info __initdata boar
|
@@ -1614,6 +1615,88 @@ static struct board_info __initdata boar
|
||||||
.has_ehci0 = 1,
|
.has_ehci0 = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -97,7 +97,7 @@
|
|||||||
static struct board_info __initdata board_DWVS0 = {
|
static struct board_info __initdata board_DWVS0 = {
|
||||||
.name = "DWV-S0",
|
.name = "DWV-S0",
|
||||||
.expected_cpu_id = 0x6358,
|
.expected_cpu_id = 0x6358,
|
||||||
@@ -1469,6 +1552,238 @@ static struct board_info __initdata boar
|
@@ -1638,6 +1721,238 @@ static struct board_info __initdata boar
|
||||||
.has_ohci0 = 1,
|
.has_ohci0 = 1,
|
||||||
.has_ehci0 = 1,
|
.has_ehci0 = 1,
|
||||||
};
|
};
|
||||||
@ -336,7 +336,7 @@
|
|||||||
#endif /* CONFIG_BCM63XX_CPU_6358 */
|
#endif /* CONFIG_BCM63XX_CPU_6358 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1535,7 +1850,20 @@ static const struct board_info __initcon
|
@@ -1708,7 +2023,20 @@ static const struct board_info __initcon
|
||||||
&board_96358vw,
|
&board_96358vw,
|
||||||
&board_96358vw2,
|
&board_96358vw2,
|
||||||
&board_AGPFS0,
|
&board_AGPFS0,
|
||||||
@ -357,7 +357,7 @@
|
|||||||
#endif /* CONFIG_BCM63XX_CPU_6358 */
|
#endif /* CONFIG_BCM63XX_CPU_6358 */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1607,11 +1935,24 @@ static struct of_device_id const bcm963x
|
@@ -1785,11 +2113,24 @@ static struct of_device_id const bcm963x
|
||||||
{ .compatible = "alcatel,rg100a", .data = &board_96358vw2, },
|
{ .compatible = "alcatel,rg100a", .data = &board_96358vw2, },
|
||||||
{ .compatible = "brcm,bcm96358vw", .data = &board_96358vw, },
|
{ .compatible = "brcm,bcm96358vw", .data = &board_96358vw, },
|
||||||
{ .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, },
|
{ .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, },
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
@@ -1786,6 +1786,117 @@ static struct board_info __initdata boar
|
@@ -1955,6 +1955,117 @@ static struct board_info __initdata boar
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6358 */
|
#endif /* CONFIG_BCM63XX_CPU_6358 */
|
||||||
|
|
||||||
@ -118,7 +118,7 @@
|
|||||||
/*
|
/*
|
||||||
* all boards
|
* all boards
|
||||||
*/
|
*/
|
||||||
@@ -1865,6 +1976,12 @@ static const struct board_info __initcon
|
@@ -2038,6 +2149,12 @@ static const struct board_info __initcon
|
||||||
&board_nb4_fxc_r1,
|
&board_nb4_fxc_r1,
|
||||||
&board_spw303v,
|
&board_spw303v,
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6358 */
|
#endif /* CONFIG_BCM63XX_CPU_6358 */
|
||||||
@ -131,7 +131,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct of_device_id const bcm963xx_boards_dt[] = {
|
static struct of_device_id const bcm963xx_boards_dt[] = {
|
||||||
@@ -1955,6 +2072,10 @@ static struct of_device_id const bcm963x
|
@@ -2133,6 +2250,10 @@ static struct of_device_id const bcm963x
|
||||||
{ .compatible = "telsey,cpva642", .data = &board_CPVA642, },
|
{ .compatible = "telsey,cpva642", .data = &board_CPVA642, },
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6358 */
|
#endif /* CONFIG_BCM63XX_CPU_6358 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6362
|
#ifdef CONFIG_BCM63XX_CPU_6362
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <asm/addrspace.h>
|
#include <asm/addrspace.h>
|
||||||
#include <bcm63xx_board.h>
|
#include <bcm63xx_board.h>
|
||||||
#include <bcm63xx_cpu.h>
|
#include <bcm63xx_cpu.h>
|
||||||
@@ -1898,6 +1900,648 @@ static struct board_info __initdata boar
|
@@ -2067,6 +2069,648 @@ static struct board_info __initdata boar
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6362 */
|
#endif /* CONFIG_BCM63XX_CPU_6362 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -136,7 +136,7 @@
|
|||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
+static struct board_info __initdata board_DGND3700v1_3800B = {
|
+static struct board_info __initdata board_DGND3700v1_3800B = {
|
||||||
+ .name = "DGND3700v1_3800B",
|
+ .name = "U12L144T01",
|
||||||
+ .expected_cpu_id = 0x6368,
|
+ .expected_cpu_id = 0x6368,
|
||||||
+
|
+
|
||||||
+ .has_pci = 1,
|
+ .has_pci = 1,
|
||||||
@ -658,7 +658,7 @@
|
|||||||
* all boards
|
* all boards
|
||||||
*/
|
*/
|
||||||
static const struct board_info __initconst *bcm963xx_boards[] = {
|
static const struct board_info __initconst *bcm963xx_boards[] = {
|
||||||
@@ -1982,6 +2626,22 @@ static const struct board_info __initcon
|
@@ -2155,6 +2799,22 @@ static const struct board_info __initcon
|
||||||
&board_hg253s_v2,
|
&board_hg253s_v2,
|
||||||
&board_nb6,
|
&board_nb6,
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6362 */
|
#endif /* CONFIG_BCM63XX_CPU_6362 */
|
||||||
@ -681,7 +681,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct of_device_id const bcm963xx_boards_dt[] = {
|
static struct of_device_id const bcm963xx_boards_dt[] = {
|
||||||
@@ -2078,6 +2738,20 @@ static struct of_device_id const bcm963x
|
@@ -2256,6 +2916,20 @@ static struct of_device_id const bcm963x
|
||||||
{ .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, },
|
{ .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, },
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6362 */
|
#endif /* CONFIG_BCM63XX_CPU_6362 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_6368
|
#ifdef CONFIG_BCM63XX_CPU_6368
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
@@ -2542,6 +2542,273 @@ static struct board_info __initdata boar
|
@@ -2711,6 +2711,273 @@ static struct board_info __initdata boar
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6368 */
|
#endif /* CONFIG_BCM63XX_CPU_6368 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -274,7 +274,7 @@
|
|||||||
* all boards
|
* all boards
|
||||||
*/
|
*/
|
||||||
static const struct board_info __initconst *bcm963xx_boards[] = {
|
static const struct board_info __initconst *bcm963xx_boards[] = {
|
||||||
@@ -2642,6 +2909,15 @@ static const struct board_info __initcon
|
@@ -2815,6 +3082,15 @@ static const struct board_info __initcon
|
||||||
&board_VR3026e,
|
&board_VR3026e,
|
||||||
&board_WAP5813n,
|
&board_WAP5813n,
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6368 */
|
#endif /* CONFIG_BCM63XX_CPU_6368 */
|
||||||
@ -290,7 +290,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct of_device_id const bcm963xx_boards_dt[] = {
|
static struct of_device_id const bcm963xx_boards_dt[] = {
|
||||||
@@ -2754,6 +3030,14 @@ static struct of_device_id const bcm963x
|
@@ -2932,6 +3208,14 @@ static struct of_device_id const bcm963x
|
||||||
{ .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, },
|
{ .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, },
|
||||||
#endif /* CONFIG_BCM63XX_CPU_6368 */
|
#endif /* CONFIG_BCM63XX_CPU_6368 */
|
||||||
#ifdef CONFIG_BCM63XX_CPU_63268
|
#ifdef CONFIG_BCM63XX_CPU_63268
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||||
@@ -3066,6 +3066,22 @@ void __init board_bcm963xx_init(void)
|
@@ -3244,6 +3244,22 @@ void __init board_bcm963xx_init(void)
|
||||||
val &= MPI_CSBASE_BASE_MASK;
|
val &= MPI_CSBASE_BASE_MASK;
|
||||||
}
|
}
|
||||||
boot_addr = (u8 *)KSEG1ADDR(val);
|
boot_addr = (u8 *)KSEG1ADDR(val);
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
From: Yves-Alexis Perez <corsac@corsac.net>
|
|
||||||
Subject: [PATCH] usbnet: ipheth: fix connectivity with iOS 14
|
|
||||||
Date: Thu, 19 Nov 2020 18:24:39 +0100
|
|
||||||
Archived-At: <https://lore.kernel.org/stable/20201119172439.94988-1-corsac@corsac.net/>
|
|
||||||
List-Post: <mailto:stable@vger.kernel.org>
|
|
||||||
|
|
||||||
Starting with iOS 14 released in September 2020, connectivity using the
|
|
||||||
personal hotspot USB tethering function of iOS devices is broken.
|
|
||||||
|
|
||||||
Communication between the host and the device (for example ICMP traffic
|
|
||||||
or DNS resolution using the DNS service running in the device itself)
|
|
||||||
works fine, but communication to endpoints further away doesn't work.
|
|
||||||
|
|
||||||
Investigation on the matter shows that UDP and ICMP traffic from the
|
|
||||||
tethered host is reaching the Internet at all. For TCP traffic there are
|
|
||||||
exchanges between tethered host and server but packets are modified in
|
|
||||||
transit leading to impossible communication.
|
|
||||||
|
|
||||||
After some trials Matti Vuorela discovered that reducing the URB buffer
|
|
||||||
size by two bytes restored the previous behavior. While a better
|
|
||||||
solution might exist to fix the issue, since the protocol is not
|
|
||||||
publicly documented and considering the small size of the fix, let's do
|
|
||||||
that.
|
|
||||||
|
|
||||||
Tested-by: Matti Vuorela <matti.vuorela@bitfactor.fi>
|
|
||||||
Signed-off-by: Yves-Alexis Perez <corsac@corsac.net>
|
|
||||||
Link: https://lore.kernel.org/linux-usb/CAAn0qaXmysJ9vx3ZEMkViv_B19ju-_ExN8Yn_uSefxpjS6g4Lw@mail.gmail.com/
|
|
||||||
Link: https://github.com/libimobiledevice/libimobiledevice/issues/1038
|
|
||||||
Cc: stable@vger.kernel.org
|
|
||||||
---
|
|
||||||
drivers/net/usb/ipheth.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/usb/ipheth.c
|
|
||||||
+++ b/drivers/net/usb/ipheth.c
|
|
||||||
@@ -59,7 +59,7 @@
|
|
||||||
#define IPHETH_USBINTF_SUBCLASS 253
|
|
||||||
#define IPHETH_USBINTF_PROTO 1
|
|
||||||
|
|
||||||
-#define IPHETH_BUF_SIZE 1516
|
|
||||||
+#define IPHETH_BUF_SIZE 1514
|
|
||||||
#define IPHETH_IP_ALIGN 2 /* padding at front of URB */
|
|
||||||
#define IPHETH_TX_TIMEOUT (5 * HZ)
|
|
||||||
|
|
@ -1337,12 +1337,6 @@ static int ip17xx_aneg_done(struct phy_device *pdev)
|
|||||||
return 1; /* Return any positive value */
|
return 1; /* Return any positive value */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ip17xx_update_link(struct phy_device *pdev)
|
|
||||||
{
|
|
||||||
pdev->link = 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ip17xx_read_status(struct phy_device *pdev)
|
static int ip17xx_read_status(struct phy_device *pdev)
|
||||||
{
|
{
|
||||||
pdev->speed = SPEED_100;
|
pdev->speed = SPEED_100;
|
||||||
@ -1364,7 +1358,6 @@ static struct phy_driver ip17xx_driver[] = {
|
|||||||
.config_init = ip17xx_config_init,
|
.config_init = ip17xx_config_init,
|
||||||
.config_aneg = ip17xx_config_aneg,
|
.config_aneg = ip17xx_config_aneg,
|
||||||
.aneg_done = ip17xx_aneg_done,
|
.aneg_done = ip17xx_aneg_done,
|
||||||
.update_link = ip17xx_update_link,
|
|
||||||
.read_status = ip17xx_read_status,
|
.read_status = ip17xx_read_status,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,69 @@
|
|||||||
|
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||||
|
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||||
|
@@ -196,7 +196,7 @@ struct flash_info {
|
||||||
|
u16 page_size;
|
||||||
|
u16 addr_width;
|
||||||
|
|
||||||
|
- u16 flags;
|
||||||
|
+ u32 flags;
|
||||||
|
#define SECT_4K BIT(0) /* SPINOR_OP_BE_4K works uniformly */
|
||||||
|
#define SPI_NOR_NO_ERASE BIT(1) /* No erase command needed */
|
||||||
|
#define SST_WRITE BIT(2) /* use SST byte programming */
|
||||||
|
@@ -233,6 +233,10 @@ struct flash_info {
|
||||||
|
#define SPI_NOR_SKIP_SFDP BIT(13) /* Skip parsing of SFDP tables */
|
||||||
|
#define USE_CLSR BIT(14) /* use CLSR command */
|
||||||
|
#define SPI_NOR_OCTAL_READ BIT(15) /* Flash supports Octal Read */
|
||||||
|
+#define SPI_NOR_4BIT_BP BIT(17) /*
|
||||||
|
+ * Flash SR has 4 bit fields (BP0-3)
|
||||||
|
+ * for block protection.
|
||||||
|
+ */
|
||||||
|
|
||||||
|
/* Part specific fixup hooks. */
|
||||||
|
const struct spi_nor_fixups *fixups;
|
||||||
|
@@ -1983,6 +1987,9 @@ static int spi_nor_clear_sr_bp(struct sp
|
||||||
|
int ret;
|
||||||
|
u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
|
||||||
|
|
||||||
|
+ if (nor->flags & SNOR_F_HAS_4BIT_BP)
|
||||||
|
+ mask |= SR_BP3;
|
||||||
|
+
|
||||||
|
ret = read_sr(nor);
|
||||||
|
if (ret < 0) {
|
||||||
|
dev_err(nor->dev, "error while reading status register\n");
|
||||||
|
@@ -2335,7 +2342,7 @@ static const struct flash_info spi_nor_i
|
||||||
|
{ "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) },
|
||||||
|
{ "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) },
|
||||||
|
{ "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) },
|
||||||
|
- { "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K) },
|
||||||
|
+ { "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_4BIT_BP) },
|
||||||
|
{ "mx25u2033e", INFO(0xc22532, 0, 64 * 1024, 4, SECT_4K) },
|
||||||
|
{ "mx25u3235f", INFO(0xc22536, 0, 64 * 1024, 64,
|
||||||
|
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||||
|
@@ -5024,6 +5031,9 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||||
|
if (info->flags & USE_CLSR)
|
||||||
|
nor->flags |= SNOR_F_USE_CLSR;
|
||||||
|
|
||||||
|
+ if (info->flags & SPI_NOR_4BIT_BP)
|
||||||
|
+ nor->flags |= SNOR_F_HAS_4BIT_BP;
|
||||||
|
+
|
||||||
|
if (info->flags & SPI_NOR_NO_ERASE)
|
||||||
|
mtd->flags |= MTD_NO_ERASE;
|
||||||
|
|
||||||
|
--- a/include/linux/mtd/spi-nor.h
|
||||||
|
+++ b/include/linux/mtd/spi-nor.h
|
||||||
|
@@ -127,6 +127,7 @@
|
||||||
|
#define SR_BP0 BIT(2) /* Block protect 0 */
|
||||||
|
#define SR_BP1 BIT(3) /* Block protect 1 */
|
||||||
|
#define SR_BP2 BIT(4) /* Block protect 2 */
|
||||||
|
+#define SR_BP3 BIT(5) /* Block protect 3 */
|
||||||
|
#define SR_TB BIT(5) /* Top/Bottom protect */
|
||||||
|
#define SR_SRWD BIT(7) /* SR write protect */
|
||||||
|
/* Spansion/Cypress specific status bits */
|
||||||
|
@@ -243,6 +244,7 @@ enum spi_nor_option_flags {
|
||||||
|
SNOR_F_4B_OPCODES = BIT(6),
|
||||||
|
SNOR_F_HAS_4BAIT = BIT(7),
|
||||||
|
SNOR_F_HAS_LOCK = BIT(8),
|
||||||
|
+ SNOR_F_HAS_4BIT_BP = BIT(12),
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
@ -1,27 +0,0 @@
|
|||||||
--- a/include/linux/phy.h
|
|
||||||
+++ b/include/linux/phy.h
|
|
||||||
@@ -524,6 +524,12 @@ struct phy_driver {
|
|
||||||
/* Determines the negotiated speed and duplex */
|
|
||||||
int (*read_status)(struct phy_device *phydev);
|
|
||||||
|
|
||||||
+ /*
|
|
||||||
+ * Update the value in phydev->link to reflect the
|
|
||||||
+ * current link value
|
|
||||||
+ */
|
|
||||||
+ int (*update_link)(struct phy_device *phydev);
|
|
||||||
+
|
|
||||||
/* Clears any pending interrupts */
|
|
||||||
int (*ack_interrupt)(struct phy_device *phydev);
|
|
||||||
|
|
||||||
--- a/drivers/net/phy/phy_device.c
|
|
||||||
+++ b/drivers/net/phy/phy_device.c
|
|
||||||
@@ -1912,6 +1912,9 @@ int genphy_update_link(struct phy_device
|
|
||||||
if (bmcr & BMCR_ANRESTART)
|
|
||||||
goto done;
|
|
||||||
|
|
||||||
+ if (phydev->drv && phydev->drv->update_link)
|
|
||||||
+ return phydev->drv->update_link(phydev);
|
|
||||||
+
|
|
||||||
/* The link state is latched low so that momentary link
|
|
||||||
* drops can be detected. Do not double-read the status
|
|
||||||
* in polling mode to detect such short link drops.
|
|
@ -95,7 +95,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
}
|
}
|
||||||
|
|
||||||
netif_tx_start_all_queues(port->dev);
|
netif_tx_start_all_queues(port->dev);
|
||||||
@@ -5124,8 +5128,11 @@ static void mvpp2_mac_config(struct phyl
|
@@ -5125,8 +5129,11 @@ static void mvpp2_mac_config(struct phyl
|
||||||
mvpp2_port_enable(port);
|
mvpp2_port_enable(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,8 +32,7 @@ define Device/cznic_turris-omnia
|
|||||||
DEVICE_VENDOR := CZ.NIC
|
DEVICE_VENDOR := CZ.NIC
|
||||||
DEVICE_MODEL := Turris Omnia
|
DEVICE_MODEL := Turris Omnia
|
||||||
KERNEL_INSTALL := 1
|
KERNEL_INSTALL := 1
|
||||||
KERNEL := kernel-bin
|
KERNEL := kernel-bin | append-dtb
|
||||||
KERNEL_INITRAMFS := kernel-bin
|
|
||||||
DEVICE_PACKAGES := \
|
DEVICE_PACKAGES := \
|
||||||
mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
|
mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
|
||||||
wpad-basic-wolfssl kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
|
wpad-basic-wolfssl kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
|
||||||
|
@ -371,7 +371,6 @@
|
|||||||
xhci: xhci@1E1C0000 {
|
xhci: xhci@1E1C0000 {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
compatible = "mediatek,mt8173-xhci";
|
compatible = "mediatek,mt8173-xhci";
|
||||||
reg = <0x1e1c0000 0x1000
|
reg = <0x1e1c0000 0x1000
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "xiaomi,mir3p", "mediatek,mt7621-soc";
|
compatible = "xiaomi,mi-router-3-pro", "mediatek,mt7621-soc";
|
||||||
model = "Xiaomi Mi Router 3 Pro";
|
model = "Xiaomi Mi Router 3 Pro";
|
||||||
|
|
||||||
aliases {
|
aliases {
|
@ -3,6 +3,6 @@
|
|||||||
#include "mt7621_xiaomi_mi-router-4a-3g-v2.dtsi"
|
#include "mt7621_xiaomi_mi-router-4a-3g-v2.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "xiaomi,mir3g-v2", "mediatek,mt7621-soc";
|
compatible = "xiaomi,mi-router-3g-v2", "mediatek,mt7621-soc";
|
||||||
model = "Xiaomi Mi Router 3G v2";
|
model = "Xiaomi Mi Router 3G v2";
|
||||||
};
|
};
|
@ -4,7 +4,7 @@
|
|||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "xiaomi,mir3g", "mediatek,mt7621-soc";
|
compatible = "xiaomi,mi-router-3g", "mediatek,mt7621-soc";
|
||||||
model = "Xiaomi Mi Router 3G";
|
model = "Xiaomi Mi Router 3G";
|
||||||
|
|
||||||
aliases {
|
aliases {
|
@ -63,10 +63,6 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&xhci {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&spi0 {
|
&spi0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
@ -131,11 +131,3 @@
|
|||||||
&uart1 {
|
&uart1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&ehci {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&ohci {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
@ -93,14 +93,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&ehci {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&ohci {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&sdhci {
|
&sdhci {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
@ -97,11 +97,3 @@
|
|||||||
&uart1 {
|
&uart1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&ehci {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&ohci {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
@ -37,18 +37,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&ehci {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
ðernet {
|
ðernet {
|
||||||
mtd-mac-address = <&factory 0x28>;
|
mtd-mac-address = <&factory 0x28>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&ohci {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&state_default {
|
&state_default {
|
||||||
gpio {
|
gpio {
|
||||||
groups = "uart1", "p0led_an", "wdt";
|
groups = "uart1", "p0led_an", "wdt";
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user