[OpenWrt-Devel] [PATCH 2/2] wireguard.sh: run through shellcheck

2020-01-05 Thread Rosen Penev
Missing local variables and quoting fixes.

Signed-off-by: Rosen Penev 
---
 package/network/utils/wireguard-tools/Makefile |  2 +-
 .../network/utils/wireguard-tools/files/wireguard.sh   | 10 +++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/package/network/utils/wireguard-tools/Makefile 
b/package/network/utils/wireguard-tools/Makefile
index 2f6d307094..3336353af1 100644
--- a/package/network/utils/wireguard-tools/Makefile
+++ b/package/network/utils/wireguard-tools/Makefile
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=wireguard-tools
 
 PKG_VERSION:=1.0.20191226
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
diff --git a/package/network/utils/wireguard-tools/files/wireguard.sh 
b/package/network/utils/wireguard-tools/files/wireguard.sh
index 4bea67e033..5a81bcc1fb 100644
--- a/package/network/utils/wireguard-tools/files/wireguard.sh
+++ b/package/network/utils/wireguard-tools/files/wireguard.sh
@@ -68,7 +68,7 @@ proto_wireguard_setup_peer() {
[ "${persistent_keepalive}" ] && echo 
"PersistentKeepalive=${persistent_keepalive}"
} >> "${wg_cfg}"
 
-   if [ ${route_allowed_ips} -ne 0 ]; then
+   if [ "${route_allowed_ips}" -ne 0 ]; then
for allowed_ip in ${allowed_ips}; do
case "${allowed_ip}" in
*:*/*)
@@ -95,7 +95,11 @@ proto_wireguard_setup() {
 
local private_key
local listen_port
+   local addresses
local mtu
+   local fwmark
+   local ip6prefix
+   local nohostroute
 
config_load network
config_get private_key "${config}" "private_key"
@@ -126,7 +130,7 @@ proto_wireguard_setup() {
config_foreach proto_wireguard_setup_peer "wireguard_${config}"
 
# apply configuration file
-   ${WG} setconf ${config} "${wg_cfg}"
+   ${WG} setconf "${config}" "${wg_cfg}"
WG_RETURN=$?
 
rm -f "${wg_cfg}"
@@ -162,7 +166,7 @@ proto_wireguard_setup() {
if [ "${nohostroute}" != "1" ]; then
wg show "${config}" endpoints | \
sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \
-   while IFS=$'\t ' read -r key address port; do
+   while IFS="$(printf '\t')" read -r address port; do
[ -n "${port}" ] || continue
proto_add_host_dependency "${config}" "${address}"
done
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] wireguard.sh: batch file writes

2020-01-05 Thread Rosen Penev
Speeds up config generation.

Signed-off-by: Rosen Penev 
---
 v3: Fix title
 v2: Added PKG_RELEASE bump.
 .../utils/wireguard-tools/files/wireguard.sh  | 64 +--
 1 file changed, 30 insertions(+), 34 deletions(-)

diff --git a/package/network/utils/wireguard-tools/files/wireguard.sh 
b/package/network/utils/wireguard-tools/files/wireguard.sh
index 4c811c6ba9..4bea67e033 100644
--- a/package/network/utils/wireguard-tools/files/wireguard.sh
+++ b/package/network/utils/wireguard-tools/files/wireguard.sh
@@ -42,33 +42,31 @@ proto_wireguard_setup_peer() {
config_get endpoint_port "${peer_config}" "endpoint_port"
config_get persistent_keepalive "${peer_config}" "persistent_keepalive"
 
-   echo "[Peer]" >> "${wg_cfg}"
-   echo "PublicKey=${public_key}" >> "${wg_cfg}"
-   if [ "${preshared_key}" ]; then
-   echo "PresharedKey=${preshared_key}" >> "${wg_cfg}"
-   fi
-   for allowed_ip in $allowed_ips; do
-   echo "AllowedIPs=${allowed_ip}" >> "${wg_cfg}"
-   done
-   if [ "${endpoint_host}" ]; then
-   case "${endpoint_host}" in
-   *:*)
-   endpoint="[${endpoint_host}]"
-   ;;
-   *)
-   endpoint="${endpoint_host}"
-   ;;
-   esac
-   if [ "${endpoint_port}" ]; then
-   endpoint="${endpoint}:${endpoint_port}"
-   else
-   endpoint="${endpoint}:51820"
+   {
+   echo "[Peer]"
+   echo "PublicKey=${public_key}"
+   [ "${preshared_key}" ] && echo "PresharedKey=${preshared_key}"
+   for allowed_ip in $allowed_ips; do
+   echo "AllowedIPs=${allowed_ip}"
+   done
+   if [ "${endpoint_host}" ]; then
+   case "${endpoint_host}" in
+   *:*)
+   endpoint="[${endpoint_host}]"
+   ;;
+   *)
+   endpoint="${endpoint_host}"
+   ;;
+   esac
+   if [ "${endpoint_port}" ]; then
+   endpoint="${endpoint}:${endpoint_port}"
+   else
+   endpoint="${endpoint}:51820"
+   fi
+   echo "Endpoint=${endpoint}"
fi
-   echo "Endpoint=${endpoint}" >> "${wg_cfg}"
-   fi
-   if [ "${persistent_keepalive}" ]; then
-   echo "PersistentKeepalive=${persistent_keepalive}" >> 
"${wg_cfg}"
-   fi
+   [ "${persistent_keepalive}" ] && echo 
"PersistentKeepalive=${persistent_keepalive}"
+   } >> "${wg_cfg}"
 
if [ ${route_allowed_ips} -ne 0 ]; then
for allowed_ip in ${allowed_ips}; do
@@ -119,14 +117,12 @@ proto_wireguard_setup() {
 
umask 077
mkdir -p "${wg_dir}"
-   echo "[Interface]" > "${wg_cfg}"
-   echo "PrivateKey=${private_key}" >> "${wg_cfg}"
-   if [ "${listen_port}" ]; then
-   echo "ListenPort=${listen_port}" >> "${wg_cfg}"
-   fi
-   if [ "${fwmark}" ]; then
-   echo "FwMark=${fwmark}" >> "${wg_cfg}"
-   fi
+   {
+   echo "[Interface]"
+   echo "PrivateKey=${private_key}"
+   [ "${listen_port}" ] && echo "ListenPort=${listen_port}"
+   [ "${fwmark}" ] && echo "FwMark=${fwmark}"
+   } > "${wg_cfg}"
config_foreach proto_wireguard_setup_peer "wireguard_${config}"
 
# apply configuration file
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] scripts/env: use read -r instead of read

2020-01-05 Thread Rosen Penev
read mangles backslashes.

Found with shellcheck.

Signed-off-by: Rosen Penev 
---
 scripts/env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/env b/scripts/env
index 848850a778..c81fbf8ddc 100755
--- a/scripts/env
+++ b/scripts/env
@@ -42,7 +42,7 @@ ask_bool() {
local VAL
 
echo -n "$* ($defstr): "
-   read VAL
+   read -r VAL
case "$VAL" in
y*|Y*) val=0;;
n*|N*) val=1;;
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/4] scripts/env: use command -v instead of which

2020-01-05 Thread Rosen Penev
Simpler and built in to the shell.

Found with shellcheck.

Signed-off-by: Rosen Penev 
---
 scripts/env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/env b/scripts/env
index 7bfca58c5d..563f39c1cf 100755
--- a/scripts/env
+++ b/scripts/env
@@ -57,7 +57,7 @@ env_init() {
if [ -z "$CREATE" ]; then
[ -d "$ENVDIR" ] || exit 0
fi
-   [ -x "$(which git 2>/dev/null)" ] || error "Git is not installed"
+   command -v git || error "Git is not installed"
mkdir -p "$ENVDIR" || error "Failed to create the environment directory"
cd "$ENVDIR" || error "Failed to switch to the environment directory"
[ -d .git ] || { 
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] scripts/env: exit in case of failure to cd

2020-01-05 Thread Rosen Penev
Found with shellcheck.

Signed-off-by: Rosen Penev 
---
 scripts/env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/env b/scripts/env
index 19cfa13841..848850a778 100755
--- a/scripts/env
+++ b/scripts/env
@@ -147,7 +147,7 @@ env_clear() {
else
rm -rf "$BASEDIR/files" "$BASEDIR/.config"
fi
-   cd "$BASEDIR"
+   cd "$BASEDIR" || exit 1
rm -rf "$ENVDIR"
 }
 
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] scripts/env: replace \! with !

2020-01-05 Thread Rosen Penev
The latter is more standard. The former throws an error under
shellcheck.

Signed-off-by: Rosen Penev 
---
 scripts/env | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/env b/scripts/env
index 563f39c1cf..19cfa13841 100755
--- a/scripts/env
+++ b/scripts/env
@@ -73,7 +73,7 @@ env_init() {
 }
 
 env_sync_data() {
-   [ \! -L "$BASEDIR/.config" ] && [ -f "$BASEDIR/.config" ] && mv 
"$BASEDIR/.config" "$ENVDIR"
+   [ ! -L "$BASEDIR/.config" ] && [ -f "$BASEDIR/.config" ] && mv 
"$BASEDIR/.config" "$ENVDIR"
git add .
git add -u
 }
@@ -195,7 +195,7 @@ env_new() {
git checkout -b "$1" "$from"
if [ -f "$BASEDIR/.config" ] || [ -d "$BASEDIR/files" ]; then
if ask_bool 1 "Do you want to start your configuration 
repository with the current configuration?"; then
-   if [ -d "$BASEDIR/files" ] && [ \! -L "$BASEDIR/files" 
]; then
+   if [ -d "$BASEDIR/files" ] && [ ! -L "$BASEDIR/files" 
]; then
mkdir -p "$ENVDIR/files"
shopt -s dotglob
mv "$BASEDIR/files/"* "$ENVDIR/files/" 
2>/dev/null
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] scripts/mkits.sh: fix improper string and array concatenation

2020-01-05 Thread Rosen Penev
Found with shellcheck.

Signed-off-by: Rosen Penev 
---
 scripts/mkits.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index 53b9ec5f20..c09e537dbd 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -43,7 +43,7 @@ do
k ) KERNEL=$OPTARG;;
o ) OUTPUT=$OPTARG;;
v ) VERSION=$OPTARG;;
-   * ) echo "Invalid option passed to '$0' (options:$@)"
+   * ) echo "Invalid option passed to '$0' (options:$*)"
usage;;
esac
 done
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] scripts/mkits.sh: add missing quotes

2020-01-05 Thread Rosen Penev
Found with shellcheck.

Signed-off-by: Rosen Penev 
---
 scripts/mkits.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index def3d3c7c2..53b9ec5f20 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -55,7 +55,7 @@ if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z 
"${LOAD_ADDR}" ] || \
usage
 fi
 
-ARCH_UPPER=$(echo $ARCH | tr '[:lower:]' '[:upper:]')
+ARCH_UPPER=$(echo "$ARCH" | tr '[:lower:]' '[:upper:]')
 
 # Conditionally create fdt information
 if [ -n "${DTB}" ]; then
@@ -115,4 +115,4 @@ ${FDT_NODE}
 };"
 
 # Write .its file to disk
-echo "$DATA" > ${OUTPUT}
+echo "$DATA" > "${OUTPUT}"
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] scripts/mkits.sh: switch from bash to sh

2020-01-05 Thread Rosen Penev
This no longer needs bash.

Signed-off-by: Rosen Penev 
---
 scripts/mkits.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index c09e537dbd..62cfc21c6b 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 #
 # Licensed under the terms of the GNU GPL License version 2 or later.
 #
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/4] scripts/mkits.sh: replace echo -e with printf

2020-01-05 Thread Rosen Penev
echo flags are not POSIX. printf does the same with added \n.

Signed-off-by: Rosen Penev 
---
 scripts/mkits.sh | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index 32a978e18d..def3d3c7c2 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -15,18 +15,18 @@
 #
 
 usage() {
-   echo "Usage: $(basename $0) -A arch -C comp -a addr -e entry" \
-   "-v version -k kernel [-D name -d dtb] -o its_file"
-   echo -e "\t-A ==> set architecture to 'arch'"
-   echo -e "\t-C ==> set compression type 'comp'"
-   echo -e "\t-c ==> set config name 'config'"
-   echo -e "\t-a ==> set load address to 'addr' (hex)"
-   echo -e "\t-e ==> set entry point to 'entry' (hex)"
-   echo -e "\t-v ==> set kernel version to 'version'"
-   echo -e "\t-k ==> include kernel image 'kernel'"
-   echo -e "\t-D ==> human friendly Device Tree Blob 'name'"
-   echo -e "\t-d ==> include Device Tree Blob 'dtb'"
-   echo -e "\t-o ==> create output file 'its_file'"
+   printf "Usage: %s -A arch -C comp -a addr -e entry -v version"\
+"-k kernel [-D name -d dtb] -o its_file" "$(basename $0)"
+   printf "\n\t-A ==> set architecture to 'arch'"
+   printf "\n\t-C ==> set compression type 'comp'"
+   printf "\n\t-c ==> set config name 'config'"
+   printf "\n\t-a ==> set load address to 'addr' (hex)"
+   printf "\n\t-e ==> set entry point to 'entry' (hex)"
+   printf "\n\t-v ==> set kernel version to 'version'"
+   printf "\n\t-k ==> include kernel image 'kernel'"
+   printf "\n\t-D ==> human friendly Device Tree Blob 'name'"
+   printf "\n\t-d ==> include Device Tree Blob 'dtb'"
+   printf "\n\t-o ==> create output file 'its_file'\n"
exit 1
 }
 
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] scripts/flashing/flash.sh: Add missing quotes

2020-01-05 Thread Rosen Penev
These are in if statements (where they should be), and echo output that is
not piped to anything. These should be safe.

Found with shellcheck.

Signed-off-by: Rosen Penev 
---
 scripts/flashing/flash.sh | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/flashing/flash.sh b/scripts/flashing/flash.sh
index 3499581ef4..7f2cdf5db9 100755
--- a/scripts/flashing/flash.sh
+++ b/scripts/flashing/flash.sh
@@ -20,8 +20,8 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 #
 
-if [ -z "$1" ] || [ ! -f $1 ] || [ -z $2 ]; then
-echo Usage: $0 firmware vendor
+if [ -z "$1" ] || [ ! -f "$1" ] || [ -z "$2" ]; then
+echo Usage: "$0" firmware vendor
 cat << EOF
 IMPORTANT:
 Notes for Linksys / Asus WL500gx router: 
@@ -52,15 +52,15 @@ fi
 if [ "$2" = "asus" ]; then
 echo Confirming IP address setting...
 echo -en "get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null\nquit\n" | tftp 
192.168.1.1
-echo Flashing 192.168.1.1 using $1...
+echo Flashing 192.168.1.1 using "$1"...
 echo -en "binary\nput $1 ASUSSPACELINK\nquit\n" | tftp 192.168.1.1
 echo Please wait until leds stops flashing. 
 elif [ "$2" = "linksys" ]; then
-echo Flashing 192.168.1.1 using $1...
+echo Flashing 192.168.1.1 using "$1"...
 echo -en "rexmt 1\ntrace\nbinary\nput $1\nquit\n" | tftp 192.168.1.1
 echo Please wait until power led stops flashing. Do not poweroff! Then you can 
login via telnet 192.168.1.1.
 elif [ "$2" = "toshiba" ]; then
-echo Flashing 192.168.10.1 using $1...
+echo Flashing 192.168.10.1 using "$1"...
 echo -en "rexmt 1\ntrace\nbinary\nput $1\nquit\n" | tftp 192.168.10.1
 echo Unit will automatically reboot within 5 minutes.  Do not power off.  Then 
you can login via telnet 192.168.10.1.
 fi
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] scripts/flashing/flash.sh: Switch to /bin/sh

2020-01-05 Thread Rosen Penev
The script no longer uses any features that necessitate bash.

Also removed trailing whitespace.

Signed-off-by: Rosen Penev 
---
 scripts/flashing/flash.sh | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/flashing/flash.sh b/scripts/flashing/flash.sh
index aea1bf1568..6266a49dc1 100755
--- a/scripts/flashing/flash.sh
+++ b/scripts/flashing/flash.sh
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
 #
-# tftp flash script for wireless routers 
+# tftp flash script for wireless routers
 #
 # Copyright (C) 2004 by Oleg I. Vdovikin 
 # Copyright (C) 2005 by Waldemar Brodkorb 
@@ -24,10 +24,10 @@ if [ -z "$1" ] || [ ! -f "$1" ] || [ -z "$2" ]; then
 echo Usage: "$0" firmware vendor
 cat << EOF
 IMPORTANT:
-Notes for Linksys / Asus WL500gx router: 
+Notes for Linksys / Asus WL500gx router:
be sure you have set boot_wait to yes. Power on your router
after executing this script.
- 
+
 Notes for Asus WL500g router:
be sure POWER led is flashing (If this is not the case
poweroff the device, push the reset button & power on
@@ -54,7 +54,7 @@ echo Confirming IP address setting...
 printf "get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null\nquit\n" | tftp 192.168.1.1
 echo Flashing 192.168.1.1 using "$1"...
 printf "binary\nput %s ASUSSPACELINK\nquit\n" "$1" | tftp 192.168.1.1
-echo Please wait until leds stops flashing. 
+echo Please wait until leds stops flashing.
 elif [ "$2" = "linksys" ]; then
 echo Flashing 192.168.1.1 using "$1"...
 printf "rexmt 1\ntrace\nbinary\nput %s\nquit\n" "$1" | tftp 192.168.1.1
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] scripts/flashing/flash.sh: switch from echo -en to printf

2020-01-05 Thread Rosen Penev
echo flags are an extension and not available with sh. printf does the
same as -en.

Signed-off-by: Rosen Penev 
---
 scripts/flashing/flash.sh | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/flashing/flash.sh b/scripts/flashing/flash.sh
index 7f2cdf5db9..aea1bf1568 100755
--- a/scripts/flashing/flash.sh
+++ b/scripts/flashing/flash.sh
@@ -51,16 +51,16 @@ EOF
 fi
 if [ "$2" = "asus" ]; then
 echo Confirming IP address setting...
-echo -en "get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null\nquit\n" | tftp 
192.168.1.1
+printf "get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null\nquit\n" | tftp 192.168.1.1
 echo Flashing 192.168.1.1 using "$1"...
-echo -en "binary\nput $1 ASUSSPACELINK\nquit\n" | tftp 192.168.1.1
+printf "binary\nput %s ASUSSPACELINK\nquit\n" "$1" | tftp 192.168.1.1
 echo Please wait until leds stops flashing. 
 elif [ "$2" = "linksys" ]; then
 echo Flashing 192.168.1.1 using "$1"...
-echo -en "rexmt 1\ntrace\nbinary\nput $1\nquit\n" | tftp 192.168.1.1
+printf "rexmt 1\ntrace\nbinary\nput %s\nquit\n" "$1" | tftp 192.168.1.1
 echo Please wait until power led stops flashing. Do not poweroff! Then you can 
login via telnet 192.168.1.1.
 elif [ "$2" = "toshiba" ]; then
 echo Flashing 192.168.10.1 using "$1"...
-echo -en "rexmt 1\ntrace\nbinary\nput $1\nquit\n" | tftp 192.168.10.1
+printf "rexmt 1\ntrace\nbinary\nput %s\nquit\n" "$1" | tftp 192.168.10.1
 echo Unit will automatically reboot within 5 minutes.  Do not power off.  Then 
you can login via telnet 192.168.10.1.
 fi
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] scripts/gen_image_generic.sh: use /bin/sh

2020-01-05 Thread Rosen Penev
This has nothing bash specific.

Signed-off-by: Rosen Penev 
---
 scripts/gen_image_generic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 527ca5bacc..5162be11dd 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 # Copyright (C) 2006-2012 OpenWrt.org
 set -e -x
 if [ $# -ne 5 ] && [ $# -ne 6 ]; then
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] scripts/gen_image_generic.sh: replace -o with if/&

2020-01-05 Thread Rosen Penev
-o is not well defined.

Found with shellcheck.

Signed-off-by: Rosen Penev 
---
 scripts/gen_image_generic.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 2c57d56f07..527ca5bacc 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -1,10 +1,10 @@
 #!/usr/bin/env bash
 # Copyright (C) 2006-2012 OpenWrt.org
 set -e -x
-[ $# == 5 -o $# == 6 ] || {
+if [ $# -ne 5 ] && [ $# -ne 6 ]; then
 echo "SYNTAX: $0 
 []"
 exit 1
-}
+fi
 
 OUTPUT="$1"
 KERNELSIZE="$2"
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400

2020-01-05 Thread mail
Hi Enrico,

> -Original Message-
> From: Enrico Mioso [mailto:mrkiko...@gmail.com]
> Sent: Dienstag, 17. September 2019 19:59
> To: m...@adrianschmutzler.de
> Cc: Filip Moc ; openwrt-devel@lists.openwrt.org
> Subject: RE: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-
> MR6400
> 
> Thanks! I'll take a look now.
> Still, something should be interestingly wrong here:
> 
> root@OpenWrt:/# swconfig dev switch0 show|grep -i link
>  link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
>  link: port:1 link:up speed:100baseT full-duplex auto
>  link: port:2 link:down
>  link: port:3 link:down
>  link: port:4 link:down
> root@OpenWrt:/#

I've just unearthed this topic in my mailbox and tried a port myself based on 
your V2 patch.

You will find the updated version in a branch of my staging repo here:
https://git.openwrt.org/?p=openwrt/staging/adrian.git;a=shortlog;h=refs/heads/mr6400

(Most recent patch there.)

Despite several minor issues (sorting, rebase, etc.) I've also addressed the 
following major issues:
1. Use gpio-export again instead of gpio-hog, so LTE can be switched on/off
2. Added adb-enablemodem
3. Removed the phy-swap in DTS. This is not present in the mach-file for 
mr6400, only in the one for the fritzbox 4020 you took as blueprint.
4. Adjusted ports 2 vs. 3 in 02_network based on your assessment. This will 
most probably be wrong again now, as this might be influenced by the phy-swap.
5. LAN/WAN LEDs still won't work properly, as at least one will need to be 
changed to ucidef_set_led_switch, and I cannot check that without the device.

Best

Adrian


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] hostapd: disable ft_psk_generate_local for non-PSK networks

2020-01-05 Thread David Bauer
Without this commit, ft_psk_generate_local is enabled for non-PSK
networks by default. This breaks 802.11r for EAP networks.

Disable ft_psk_generate_local by default for non-PSK networks resolves
this misbehavior.

Reported-by: Martin Weinelt 
Signed-off-by: David Bauer 
Tested-by: Martin Weinelt 
---
 package/network/services/hostapd/files/hostapd.sh | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 4bf6a6c971..3d4e57db25 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -510,10 +510,18 @@ hostapd_set_bss_options() {
json_get_vars mobility_domain ft_psk_generate_local 
ft_over_ds reassociation_deadline

set_default mobility_domain "$(echo "$ssid" | md5sum | 
head -c 4)"
-   set_default ft_psk_generate_local 1
set_default ft_over_ds 1
set_default reassociation_deadline 1000
 
+   case "$auth_type" in
+   psk|sae|psk-sae)
+   set_default ft_psk_generate_local 1
+   ;;
+   *)
+   set_default ft_psk_generate_local 0
+   ;;
+   esac
+
append bss_conf "mobility_domain=$mobility_domain" "$N"
append bss_conf 
"ft_psk_generate_local=$ft_psk_generate_local" "$N"
append bss_conf "ft_over_ds=$ft_over_ds" "$N"
-- 
2.24.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [sdwalker/sdwalker.github.io] 9a4ea2: This week's update

2020-01-05 Thread Stephen Walker
  Branch: refs/heads/master
  Home:   https://github.com/sdwalker/sdwalker.github.io
  Commit: 9a4ea277be13410f72ab6a36931401cbb886960f
  
https://github.com/sdwalker/sdwalker.github.io/commit/9a4ea277be13410f72ab6a36931401cbb886960f
  Author: Stephen Walker 
  Date:   2020-01-05 (Sun, 05 Jan 2020)

  Changed paths:
M uscan/index-18.06.html
M uscan/index-19.07.html
M uscan/index.html

  Log Message:
  ---
  This week's update



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Google Summer of Code - ideas wanted

2020-01-05 Thread Andreas Bräu
Hi there,

I wish you all the best for 2020!

We're planning to apply for Google Summer of Code (GSoC) again. GSoC is
a program by Google to bring student developers into Open Source projects.
tl;dr: Google pays students for 3 months in summer developing software
for an open source project. Therefore we need to collect ideas for
possible projects. People from the projects will act as mentors for
students. If you want to know more about that, please visit
https://summerofcode.withgoogle.com/

Freifunk acts as umbrella organization since 2008 for several projects
like OpenWRT, ninux, qaul.net, guifi.net, retroshare, wlan slowenija,
altermundi.net, ...

To apply as organization we need a list of project ideas, we collect at
https://projects.freifunk.net. Now it's the best time to update or add
ideas. This can be done via github:
https://github.com/freifunk/projects.freifunk.net-contents

The application period will start on January 14. The best case would be
if you add your ideas until this deadline :) You can find the complete
timeline at https://summerofcode.withgoogle.com/how-it-works/#timeline

If you know people within your community that would be interested in
mentoring projects, feel free to distribute this email. Also, if you
know students that would be interested in doing projects for one of our
organizations, please tell them!

If you have any questions, just send me an email!

Best regards,

Andi



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/5] Remove kernel 4.9 targets and kernel 4.9 support

2020-01-05 Thread mail
> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Adrian Schmutzler
> Sent: Sonntag, 5. Januar 2020 17:38
> To: openwrt-devel@lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH 0/5] Remove kernel 4.9 targets and kernel
> 4.9 support
> 

Patch 4/5 is too big for the list. You will find the complete patchset in my 
staging repo:
https://git.openwrt.org/?p=openwrt/staging/adrian.git;a=shortlog;h=refs/heads/remove49


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips: Fix sysupgrade for Xiaomi mir3g

2020-01-05 Thread mail
Hi,

> When I use sysupgrade in 18.06 it executes the platform_check_image() 
> functions which calls nand_do_platform_check("mir3g", 
> "/tmp/openwrt-19.07-ramips-mt7621-xiaomi_mir3g-squashfs-sysupgrade.bin") 
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ramips/base-files/lib/upgrade/platform.sh;h=ffdc5e73e0ede286c10396810954a230c8ea32fc;hb=refs/heads/openwrt-18.06#l296
> The nand_do_platform_check() function is located here: 
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/base-files/files/lib/upgrade/nand.sh;h=42f488c118fab514de7d2aee78bc431f7b8be157;hb=refs/heads/openwrt-18.06#l317
> It calls this: 
> local control_length=`(tar xf $tar_file sysupgrade-$board_name/CONTROL 
> -O | wc -c) 2> /dev/null` 
> which expands to 
> tar xf 
> /tmp/openwrt-19.07-ramips-mt7621-xiaomi_mir3g-squashfs-sysupgrade.bin 
> sysupgrade-mir3g/CONTROL 
> This file does not exists: 
> sysupgrade-mir3g/CONTROL 
> But this is there: 
> sysupgrade-xiaomi_mir3g/CONTROL 

I see. I wasn't aware that the "old" sysupgrade was effectively using the 
device node name here.

> The system does not find it and aborts. 
> The control_length is set to 0 and we expect the file_type detection to 
> work, but it does not because the ubi is inside the tar. 
> The sysupgrade in 19.07 supports the SUPPORTED_DEVICES, the sysupgrade 
> in 18.06 does not support the metadata fully. 
> When we do the board rename between 19.07 and master it is fine, but we 
> should not rename the board between 18.06 and 19.07. 

Since ramips in 19.07 is mixed anyway, I have no objections left.

Best

Adrian 


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips: Fix sysupgrade for Xiaomi mir3g

2020-01-05 Thread Hauke Mehrtens
On 1/5/20 5:37 PM, m...@adrianschmutzler.de wrote:
> Hi Hauke,
> 
>> -Original Message-
>> From: Hauke Mehrtens [mailto:ha...@hauke-m.de]
>> Sent: Sonntag, 5. Januar 2020 15:18
>> To: openwrt-devel@lists.openwrt.org
>> Cc: m...@adrianschmutzler.de; d...@kresin.me; Hauke Mehrtens
>> 
>> Subject: [PATCH] ramips: Fix sysupgrade for Xiaomi mir3g
>>
>> Without this change sysupgrade from 18.06 to 19.07 is only possible with the 
>> -
>> F option.
>> In OpenWrt 18.06 the nand_do_platform_check() function is called with the
>> board name mir3g only, if the tar does not use mir3g it will fail.
>> OpenWrt 19.07 and later support the metadata with the supported_devices
>> attribute to allow renaming. Do the renaming of the target between 19.07
>> and master like it is done for some other boards.
>>
>> I tested the following sysupgrades successfully without -F
>> 18.06 -> 19.07
>> 19.07 -> master
>> master -> 19.07
>>
>> Signed-off-by: Hauke Mehrtens 
>> ---
>>  target/linux/ramips/image/mt7621.mk | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/target/linux/ramips/image/mt7621.mk
>> b/target/linux/ramips/image/mt7621.mk
>> index 7eb59188fb..39017a48e1 100644
>> --- a/target/linux/ramips/image/mt7621.mk
>> +++ b/target/linux/ramips/image/mt7621.mk
>> @@ -269,7 +269,7 @@ define Device/xiaomi_mir3p  endef  TARGET_DEVICES
>> += xiaomi_mir3p
>>
>> -define Device/xiaomi_mir3g
>> +define Device/mir3g
>>DTS := MIR3G
>>BLOCKSIZE := 128k
>>PAGESIZE := 2048
>> @@ -282,12 +282,12 @@ define Device/xiaomi_mir3g
>>IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
>>DEVICE_TITLE := Xiaomi Mi Router 3G
>>SUPPORTED_DEVICES += R3G
>> -  SUPPORTED_DEVICES += mir3g
>> +  SUPPORTED_DEVICES += xiaomi,mir3g
> 
> I do not really understand this patch, as still the names will be the same, 
> but just the order will change. If you really rely on the first name to be 
> mir3g, you could achieve this much easier by just using:

OpenWrt 18.06 does not support the SUPPORTED_DEVICES fully. I only added
xiaomi,mir3g there to allow a downgrade from master to 19.07, which is
not so important.

> SUPPORTED_DEVICES := mir3g R3G xiaomi,mir3g
> 
> With that, you would not have to change the device node name at all.

When I use sysupgrade in 18.06 it executes the platform_check_image()
functions which calls nand_do_platform_check("mir3g",
"/tmp/openwrt-19.07-ramips-mt7621-xiaomi_mir3g-squashfs-sysupgrade.bin")
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ramips/base-files/lib/upgrade/platform.sh;h=ffdc5e73e0ede286c10396810954a230c8ea32fc;hb=refs/heads/openwrt-18.06#l296

The nand_do_platform_check() function is located here:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/base-files/files/lib/upgrade/nand.sh;h=42f488c118fab514de7d2aee78bc431f7b8be157;hb=refs/heads/openwrt-18.06#l317

It calls this:
local control_length=`(tar xf $tar_file sysupgrade-$board_name/CONTROL
-O | wc -c) 2> /dev/null`

which expands to
tar xf
/tmp/openwrt-19.07-ramips-mt7621-xiaomi_mir3g-squashfs-sysupgrade.bin
sysupgrade-mir3g/CONTROL

This file does not exists:
sysupgrade-mir3g/CONTROL
But this is there:
sysupgrade-xiaomi_mir3g/CONTROL
The system does not find it and aborts.

The control_length is set to 0 and we expect the file_type detection to
work, but it does not because the ubi is inside the tar.

The sysupgrade in 19.07 supports the SUPPORTED_DEVICES, the sysupgrade
in 18.06 does not support the metadata fully.

When we do the board rename between 19.07 and master it is fine, but we
should not rename the board between 18.06 and 19.07.

Hauke



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] kernel: remove obsolete kernel version switches

2020-01-05 Thread Adrian Schmutzler
After kernel 4.9 has been removed, this removes all (now obsolete)
kernel version switches that deal with versions before 4.14.

Package kmod-crypto-iv is empty now and thus removed entirely.

Signed-off-by: Adrian Schmutzler 
---
 include/netfilter.mk  | 26 +++
 .../linux/files/sysctl-tcp-bbr-k4_9.conf  |  5 ---
 package/kernel/linux/modules/block.mk |  3 +-
 package/kernel/linux/modules/crypto.mk| 32 +--
 package/kernel/linux/modules/fs.mk|  2 +-
 package/kernel/linux/modules/iio.mk   |  6 ++--
 package/kernel/linux/modules/lib.mk   | 16 +-
 package/kernel/linux/modules/netdevices.mk|  4 +--
 package/kernel/linux/modules/netfilter.mk |  2 +-
 package/kernel/linux/modules/netsupport.mk| 22 -
 package/kernel/linux/modules/other.mk | 20 ++--
 package/kernel/linux/modules/sound.mk | 14 
 package/kernel/linux/modules/usb.mk   | 14 +++-
 package/kernel/linux/modules/video.mk |  4 +--
 package/kernel/linux/modules/w1.mk|  2 +-
 package/kernel/linux/modules/wireless.mk  |  3 +-
 package/kernel/linux/modules/wpan.mk  |  5 ++-
 package/kernel/rtl8812au-ct/Makefile  |  2 +-
 18 files changed, 69 insertions(+), 113 deletions(-)
 delete mode 100644 package/kernel/linux/files/sysctl-tcp-bbr-k4_9.conf

diff --git a/include/netfilter.mk b/include/netfilter.mk
index 009f3502ee..d06ace8e49 100644
--- a/include/netfilter.mk
+++ b/include/netfilter.mk
@@ -185,7 +185,7 @@ $(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_RT, 
$(P_V6)ip6t_rt))
 
 # kernel only
 $(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT, $(P_XT)nf_nat),))
-$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_REDIRECT, 
$(P_XT)nf_nat_redirect, ge 3.19.0),))
+$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_REDIRECT, 
$(P_XT)nf_nat_redirect),))
 $(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_IPV4, 
$(P_V4)nf_nat_ipv4),))
 $(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_MASQUERADE_IPV4, 
$(P_V4)nf_nat_masquerade_ipv4, lt 4.18),))
 
@@ -261,8 +261,8 @@ $(eval $(call 
nf_add,IPT_DEBUG,CONFIG_NETFILTER_XT_TARGET_TRACE, $(P_XT)xt_TRACE
 # tproxy
 
 $(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_MATCH_SOCKET, 
$(P_XT)xt_socket))
-$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4, 
ge 4.10))
-$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6, 
ge 4.10))
+$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4))
+$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6))
 $(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_TARGET_TPROXY, 
$(P_XT)xt_TPROXY))
 $(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4, 
ge 4.18))
 $(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6, 
ge 4.18))
@@ -273,8 +273,8 @@ $(eval $(call 
nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED))
 # tee
 
 $(eval $(call nf_add,IPT_TEE,CONFIG_NETFILTER_XT_TARGET_TEE, $(P_XT)xt_TEE))
-$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, 
$(P_V4)nf_dup_ipv4, ge 4.3),))
-$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, 
$(P_V6)nf_dup_ipv6, ge 4.3),))
+$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, 
$(P_V4)nf_dup_ipv4),))
+$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, 
$(P_V6)nf_dup_ipv6),))
 
 # u32
 
@@ -338,12 +338,10 @@ $(eval $(if $(NF_KMOD),$(call 
nf_add,NFT_CORE,CONFIG_NF_TABLES, $(P_XT)nf_tables
 $(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_INET, 
$(P_XT)nf_tables_inet, lt 4.17),))
 $(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_EXTHDR, 
$(P_XT)nft_exthdr),))
 $(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_META, 
$(P_XT)nft_meta),))
-$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_NUMGEN, 
$(P_XT)nft_numgen, ge 4.9.0),))
+$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_NUMGEN, 
$(P_XT)nft_numgen),))
 $(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CT, $(P_XT)nft_ct),))
-$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_RBTREE, 
$(P_XT)nft_set_rbtree, ge 4.9.0),))
-$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_RBTREE, 
$(P_XT)nft_rbtree, lt 4.9.0),))
-$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_HASH, 
$(P_XT)nft_set_hash, ge 4.9.0),))
-$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_HASH, 
$(P_XT)nft_hash, lt 4.9.0),))
+$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_RBTREE, 
$(P_XT)nft_set_rbtree),))
+$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_HASH, 
$(P_XT)nft_set_hash),))
 $(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_COUNTER, 
$(P_XT)nft_counter),))
 $(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LOG, 
$(P_XT)nft_log),))
 $(eval $(if 

[OpenWrt-Devel] [PATCH 0/5] Remove kernel 4.9 targets and kernel 4.9 support

2020-01-05 Thread Adrian Schmutzler
This removes support for the remaining three kernel 4.9 targets, and
after that for the now "unused" kernel 4.9 support.

The targets seem to be not maintained anymore, for two of them there
were even patches available to bump them to 4.14, but nobody even
attempted to test them.

Support will stay in the 18.06 branch, so device can be used there
until the branch is EOL.

After the three targets are removed, no 4.9 targets remains, and we
can remove support for that kernel version as well and save a small
amount of time for maintaining it.

While at it, also remove several kernel version switches not required
anymore, also some which have been overlooked during earlier kernel
removals.


This submission is mainly for providing review time, I plan to merge
it somewhat after the next 19.07/18.06 release have been made.


Am I supposed to copy the old targets somewhere?
There is https://github.com/openwrt/targets, but this is much older
than the last target removal. Despite, it won't help much without the
current packages etc. anyway. So, I'd just remove them, they are
preserved in history anyway ...

Adrian Schmutzler (5):
  ar7: remove unmaintained target
  ixp4xx: remove unmaintained target
  orion: remove unmaintained target
  kernel: remove support for kernel 4.9
  kernel: remove obsolete kernel version switches

 include/kernel-version.mk |2 -
 include/netfilter.mk  |   26 +-
 package/boot/apex/Makefile|   62 -
 .../boot/apex/patches/001-compile_fix.patch   |   20 -
 .../100-openwrt_nslu2_armeb_config.patch  |   23 -
 .../120-openwrt_nslu2_16mb_armeb_config.patch |   23 -
 .../140-openwrt_fsg3_armeb_config.patch   |   23 -
 .../apex/patches/150-limit_ram_to_64mb.patch  |   22 -
 .../160-openwrt_nas100d_armeb_config.patch|   20 -
 package/firmware/ixp4xx-microcode/Makefile|   59 -
 .../ixp4xx-microcode/src/IxNpeMicrocode.h |  148 -
 .../firmware/ixp4xx-microcode/src/LICENSE.IPL |   27 -
 package/kernel/acx-mac80211/Makefile  |2 +-
 package/kernel/ar7-atm/Config.in  |   22 -
 package/kernel/ar7-atm/Makefile   |  100 -
 .../090-no-date-time.patch|   11 -
 .../patches-D7.04.03.00/100-compile_fix.patch |  768 ---
 .../110-interrupt_fix.patch   |   37 -
 .../120-no_dumb_inline.patch  |   11 -
 .../130-powercutback.patch|   44 -
 .../patches-D7.04.03.00/140-debug_mode.patch  |   16 -
 .../150-tasklet_mode.patch|   11 -
 .../160-module-params.patch   |  589 --
 .../170-bus_id_removal.patch  |   19 -
 .../180-git_headers_include.patch |   39 -
 .../190-2.6.32_proc_fixes.patch   |   92 -
 .../patches-D7.04.03.00/200-2.6.37_args.patch |   32 -
 .../210-3.3-remove-smp_lock.h.patch   |   33 -
 .../220-3.10-update_proc_code.patch   | 2945 -
 .../230-compile_fixes.patch   |   44 -
 .../patches-D7.04.03.00/240-3.18_fixes.patch  |   38 -
 .../patches-D7.04.03.00/250-4.1_fixes.patch   |   20 -
 .../260-fix_function_signatures.patch |   63 -
 .../090-no-date-time.patch|   11 -
 .../patches-D7.05.01.00/100-compile_fix.patch |  808 ---
 .../110-interrupt_fix.patch   |   37 -
 .../120-no_dumb_inline.patch  |   11 -
 .../130-powercutback.patch|   44 -
 .../patches-D7.05.01.00/140-debug_mode.patch  |   16 -
 .../150-tasklet_mode.patch|   11 -
 .../160-module-params.patch   |  675 ---
 .../170-bus_id_removal.patch  |   19 -
 .../180-git_headers_include.patch |   39 -
 .../190-2.6.32_proc_fixes.patch   |   92 -
 .../patches-D7.05.01.00/200-2.6.37_args.patch |   32 -
 .../210-3.3-remove-smp_lock.h.patch   |   33 -
 .../220-3.10-update_proc_code.patch   | 3082 --
 .../patches-D7.05.01.00/240-3.18_fixes.patch  |   38 -
 .../patches-D7.05.01.00/250-4.1_fixes.patch   |   20 -
 .../260-fix_function_signatures.patch |   63 -
 package/kernel/avila-wdt/Makefile |   34 -
 package/kernel/avila-wdt/src/Makefile |1 -
 package/kernel/avila-wdt/src/avila-wdt.c  |  231 -
 .../linux/files/sysctl-tcp-bbr-k4_9.conf  |5 -
 package/kernel/linux/modules/block.mk |3 +-
 package/kernel/linux/modules/crypto.mk|   32 +-
 package/kernel/linux/modules/fs.mk|2 +-
 package/kernel/linux/modules/iio.mk   |6 +-
 package/kernel/linux/modules/lib.mk   |   16 +-
 package/kernel/linux/modules/netdevices.mk|4 +-
 package/kernel/linux/modules/netfilter.mk |2 +-
 package/kernel/linux/modules/netsupport.mk|   22 +-
 package/kernel/linux/modules/other.mk |   20 +-
 package/kernel/linux/modules/sound.mk |   33 +-
 package/kernel/linux/modules/usb.mk  

[OpenWrt-Devel] [PATCH 3/5] orion: remove unmaintained target

2020-01-05 Thread Adrian Schmutzler
This target is still on kernel 4.9, and it looks like there is no
active maintainer for this target anymore.
Remove the code and all the packages which are only used by this target.

To add this target to OpenWrt again port it to a recent and supported
kernel version.

Signed-off-by: Adrian Schmutzler 
---
 target/linux/orion/Makefile   |  24 -
 .../orion/base-files/etc/board.d/02_network   |  15 -
 .../orion/base-files/etc/hotplug.d/usb/10-usb |  54 --
 .../orion/base-files/lib/preinit/01_sysinfo   |  12 -
 target/linux/orion/config-4.9 | 246 
 .../base-files/etc/uci-defaults/09_hardware   |  54 --
 .../base-files/lib/upgrade/platform.sh|  38 --
 target/linux/orion/generic/target.mk  |  14 -
 target/linux/orion/harddisk/config-default|  38 --
 target/linux/orion/harddisk/target.mk |  15 -
 target/linux/orion/image/Makefile |  12 -
 target/linux/orion/image/generic.mk   | 237 
 target/linux/orion/image/harddisk.mk  |  57 --
 .../000-arm_openwrt_machtypes.patch   |   8 -
 .../100-wrt350nv2_openwrt_partition_map.patch |  32 -
 .../101-wnr854t_partition_map.patch   |  25 -
 .../patches-4.9/200-dt2_board_support.patch   | 562 --
 .../patches-4.9/210-wn802t_support.patch  |  73 ---
 18 files changed, 1516 deletions(-)
 delete mode 100644 target/linux/orion/Makefile
 delete mode 100755 target/linux/orion/base-files/etc/board.d/02_network
 delete mode 100644 target/linux/orion/base-files/etc/hotplug.d/usb/10-usb
 delete mode 100644 target/linux/orion/base-files/lib/preinit/01_sysinfo
 delete mode 100644 target/linux/orion/config-4.9
 delete mode 100644 
target/linux/orion/generic/base-files/etc/uci-defaults/09_hardware
 delete mode 100644 
target/linux/orion/generic/base-files/lib/upgrade/platform.sh
 delete mode 100644 target/linux/orion/generic/target.mk
 delete mode 100644 target/linux/orion/harddisk/config-default
 delete mode 100644 target/linux/orion/harddisk/target.mk
 delete mode 100644 target/linux/orion/image/Makefile
 delete mode 100644 target/linux/orion/image/generic.mk
 delete mode 100644 target/linux/orion/image/harddisk.mk
 delete mode 100644 
target/linux/orion/patches-4.9/000-arm_openwrt_machtypes.patch
 delete mode 100644 
target/linux/orion/patches-4.9/100-wrt350nv2_openwrt_partition_map.patch
 delete mode 100644 
target/linux/orion/patches-4.9/101-wnr854t_partition_map.patch
 delete mode 100644 target/linux/orion/patches-4.9/200-dt2_board_support.patch
 delete mode 100644 target/linux/orion/patches-4.9/210-wn802t_support.patch

diff --git a/target/linux/orion/Makefile b/target/linux/orion/Makefile
deleted file mode 100644
index 994c37ea6a..00
--- a/target/linux/orion/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Copyright (C) 2008-2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-include $(TOPDIR)/rules.mk
-
-ARCH:=arm
-BOARD:=orion
-BOARDNAME:=Marvell Orion
-FEATURES:=broken rtc
-SUBTARGETS:=generic harddisk
-MAINTAINER:=Imre Kaloz 
-
-KERNEL_PATCHVER:=4.9
-
-include $(INCLUDE_DIR)/target.mk
-
-KERNELNAME:=zImage
-
-DEFAULT_PACKAGES += kmod-ath9k wpad-basic kmod-rtc-isl1208 uboot-envtools
-
-$(eval $(call BuildTarget))
diff --git a/target/linux/orion/base-files/etc/board.d/02_network 
b/target/linux/orion/base-files/etc/board.d/02_network
deleted file mode 100755
index ab74bf3713..00
--- a/target/linux/orion/base-files/etc/board.d/02_network
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-. /lib/functions/uci-defaults.sh
-
-board_config_update
-
-if grep -q lan1 /proc/net/dev; then
-   ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
-else
-   ucidef_set_interface_lan "eth0"
-fi
-
-board_config_flush
-
-exit 0
diff --git a/target/linux/orion/base-files/etc/hotplug.d/usb/10-usb 
b/target/linux/orion/base-files/etc/hotplug.d/usb/10-usb
deleted file mode 100644
index 2ae0f73bdc..00
--- a/target/linux/orion/base-files/etc/hotplug.d/usb/10-usb
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2009-2010 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-usb_led=''
-usb_device=''
-
-led_set_attr() {
-   [ -f "/sys/class/leds/$1/$2" ] && echo "$3" > "/sys/class/leds/$1/$2"
-}
-
-usb_led_set_timer() {
-   led_set_attr "${usb_led}" 'trigger' 'timer'
-   led_set_attr "${usb_led}" 'delay_on' "$1"
-   led_set_attr "${usb_led}" 'delay_off' "$2"
-}
-
-usb_led_on() {
-   led_set_attr "${usb_led}" 'trigger' 'none'
-   led_set_attr "${usb_led}" 'brightness' 255
-}
-
-usb_led_off() {
-   led_set_attr "${usb_led}" 'trigger' 'none'
-   led_set_attr "${usb_led}" 'brightness' 0
-}
-
-get_usb_led() {
-   . /lib/functions.sh
-
-   case "$(board_name)" in
-'Linksys WRT350N v2')
-   

Re: [OpenWrt-Devel] [PATCH] ramips: Fix sysupgrade for Xiaomi mir3g

2020-01-05 Thread mail
Hi Hauke,

> -Original Message-
> From: Hauke Mehrtens [mailto:ha...@hauke-m.de]
> Sent: Sonntag, 5. Januar 2020 15:18
> To: openwrt-devel@lists.openwrt.org
> Cc: m...@adrianschmutzler.de; d...@kresin.me; Hauke Mehrtens
> 
> Subject: [PATCH] ramips: Fix sysupgrade for Xiaomi mir3g
> 
> Without this change sysupgrade from 18.06 to 19.07 is only possible with the -
> F option.
> In OpenWrt 18.06 the nand_do_platform_check() function is called with the
> board name mir3g only, if the tar does not use mir3g it will fail.
> OpenWrt 19.07 and later support the metadata with the supported_devices
> attribute to allow renaming. Do the renaming of the target between 19.07
> and master like it is done for some other boards.
> 
> I tested the following sysupgrades successfully without -F
> 18.06 -> 19.07
> 19.07 -> master
> master -> 19.07
> 
> Signed-off-by: Hauke Mehrtens 
> ---
>  target/linux/ramips/image/mt7621.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/linux/ramips/image/mt7621.mk
> b/target/linux/ramips/image/mt7621.mk
> index 7eb59188fb..39017a48e1 100644
> --- a/target/linux/ramips/image/mt7621.mk
> +++ b/target/linux/ramips/image/mt7621.mk
> @@ -269,7 +269,7 @@ define Device/xiaomi_mir3p  endef  TARGET_DEVICES
> += xiaomi_mir3p
> 
> -define Device/xiaomi_mir3g
> +define Device/mir3g
>DTS := MIR3G
>BLOCKSIZE := 128k
>PAGESIZE := 2048
> @@ -282,12 +282,12 @@ define Device/xiaomi_mir3g
>IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
>DEVICE_TITLE := Xiaomi Mi Router 3G
>SUPPORTED_DEVICES += R3G
> -  SUPPORTED_DEVICES += mir3g
> +  SUPPORTED_DEVICES += xiaomi,mir3g

I do not really understand this patch, as still the names will be the same, but 
just the order will change. If you really rely on the first name to be mir3g, 
you could achieve this much easier by just using:

SUPPORTED_DEVICES := mir3g R3G xiaomi,mir3g

With that, you would not have to change the device node name at all.

Best

Adrian

>DEVICE_PACKAGES := \
>   kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
> wpad-basic \
>   uboot-envtools
>  endef
> -TARGET_DEVICES += xiaomi_mir3g
> +TARGET_DEVICES += mir3g
> 
>  define Device/mt7621
>DTS := MT7621
> --
> 2.20.1


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X

2020-01-05 Thread Piotr Dymacz

Hi Adrian, Tom,

On 05.01.2020 16:57, m...@adrianschmutzler.de wrote:

-Original Message-
From: Tom Psyborg [mailto:pozega.tomis...@gmail.com]
Sent: Sonntag, 5. Januar 2020 16:33
To: m...@adrianschmutzler.de
Cc: Hauke Mehrtens ; OpenWrt Development List
; Koen Vandeputte

Subject: Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X

On 05/01/2020, m...@adrianschmutzler.de 
wrote:
> Hi,
>
>> -Original Message-
>> From: openwrt-devel [mailto:openwrt-devel-
boun...@lists.openwrt.org]
>> On Behalf Of Hauke Mehrtens
>> Sent: Samstag, 4. Januar 2020 18:26
>> To: m...@adrianschmutzler.de; 'OpenWrt Development List' > de...@lists.openwrt.org>
>> Cc: 'Koen Vandeputte' 
>> Subject: Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X
>>
>> On 1/3/20 1:53 PM, m...@adrianschmutzler.de wrote:
>> > Hi Hauke,
>> >
>> >> -Original Message-
>> >> From: openwrt-devel [mailto:openwrt-devel-
>> boun...@lists.openwrt.org]
>> >> On Behalf Of Hauke Mehrtens
>> >> Sent: Donnerstag, 28. November 2019 19:42
>> >> To: Adrian Schmutzler ; 'OpenWrt
>> >> Development List' 
>> >> Cc: 'Koen Vandeputte' 
>> >> Subject: Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X
>> >>
>> >> On 11/28/19 7:11 PM, Adrian Schmutzler wrote:
>> >>> Hi Hauke,
>> >>>
>>  The following are still on kernel 4.9:
>>   * ar7
>>   * ixp4xx
>>   * orion
>> >>>
>> >>> There are patches (actually from you, May 2019) on the list which
>> >>> claim to bump ar7 and orion to 4.14:
>> >>>
>> >>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107337
>> >>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107339
>> >>>
>> >>> I haven't looked closer, just in case you forgot about them ;-)
>> >>
>> >> Nobody reported that they are working so I never applied them. I
>> >> do not have the hardware, I just made them compile.
>> >
>> > Since there was no response of any kind from a third party, I've
>> > just
>> marked the two patchsets as "Deferred" in the patchwork, so we get a
>> little more overview there. I hope that's okay for you.
>>
>> Yes fine with me, we should probably drop these targets soon.
>>
>> Hauke
>
> I think it's time to remove the three targets and kernel 4.9 support
> as well after the release has been made. Or does keeping kernel 4.9 in
> master (even without targets) make it easier to support 18.06 branch?
>
> Best
>
> Adrian
>

This LTS version will receive updates for another 3 years, why do you want to
remove it?


Next release will be kernel 4.19 or 5.4 only, and the respective targets are 
still at 4.9. So, they haven't been included in 19.07 (4.14 only) and won't be 
included in future releases unless someone updates them. At the moment, it 
looks like nobody will update them.

So, we plan to remove these targets now, as they are effectively unmaintained. 
Those who still want to use them can have the 4.9 version in 18.06 stable 
branch until that one is EOL.

In both cases, updating or removing the targets, there will be no need to keep 
kernel support if no targets are left. Thus, we can save time for maintaining 
that kernel version.


They can also be moved here:
https://github.com/openwrt/targets

--
Cheers,
Piotr



Best

Adrian


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X

2020-01-05 Thread mail
> -Original Message-
> From: Tom Psyborg [mailto:pozega.tomis...@gmail.com]
> Sent: Sonntag, 5. Januar 2020 16:33
> To: m...@adrianschmutzler.de
> Cc: Hauke Mehrtens ; OpenWrt Development List
> ; Koen Vandeputte
> 
> Subject: Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X
> 
> On 05/01/2020, m...@adrianschmutzler.de 
> wrote:
> > Hi,
> >
> >> -Original Message-
> >> From: openwrt-devel [mailto:openwrt-devel-
> boun...@lists.openwrt.org]
> >> On Behalf Of Hauke Mehrtens
> >> Sent: Samstag, 4. Januar 2020 18:26
> >> To: m...@adrianschmutzler.de; 'OpenWrt Development List'  >> de...@lists.openwrt.org>
> >> Cc: 'Koen Vandeputte' 
> >> Subject: Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X
> >>
> >> On 1/3/20 1:53 PM, m...@adrianschmutzler.de wrote:
> >> > Hi Hauke,
> >> >
> >> >> -Original Message-
> >> >> From: openwrt-devel [mailto:openwrt-devel-
> >> boun...@lists.openwrt.org]
> >> >> On Behalf Of Hauke Mehrtens
> >> >> Sent: Donnerstag, 28. November 2019 19:42
> >> >> To: Adrian Schmutzler ; 'OpenWrt
> >> >> Development List' 
> >> >> Cc: 'Koen Vandeputte' 
> >> >> Subject: Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X
> >> >>
> >> >> On 11/28/19 7:11 PM, Adrian Schmutzler wrote:
> >> >>> Hi Hauke,
> >> >>>
> >>  The following are still on kernel 4.9:
> >>   * ar7
> >>   * ixp4xx
> >>   * orion
> >> >>>
> >> >>> There are patches (actually from you, May 2019) on the list which
> >> >>> claim to bump ar7 and orion to 4.14:
> >> >>>
> >> >>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107337
> >> >>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107339
> >> >>>
> >> >>> I haven't looked closer, just in case you forgot about them ;-)
> >> >>
> >> >> Nobody reported that they are working so I never applied them. I
> >> >> do not have the hardware, I just made them compile.
> >> >
> >> > Since there was no response of any kind from a third party, I've
> >> > just
> >> marked the two patchsets as "Deferred" in the patchwork, so we get a
> >> little more overview there. I hope that's okay for you.
> >>
> >> Yes fine with me, we should probably drop these targets soon.
> >>
> >> Hauke
> >
> > I think it's time to remove the three targets and kernel 4.9 support
> > as well after the release has been made. Or does keeping kernel 4.9 in
> > master (even without targets) make it easier to support 18.06 branch?
> >
> > Best
> >
> > Adrian
> >
> 
> This LTS version will receive updates for another 3 years, why do you want to
> remove it?

Next release will be kernel 4.19 or 5.4 only, and the respective targets are 
still at 4.9. So, they haven't been included in 19.07 (4.14 only) and won't be 
included in future releases unless someone updates them. At the moment, it 
looks like nobody will update them.

So, we plan to remove these targets now, as they are effectively unmaintained. 
Those who still want to use them can have the 4.9 version in 18.06 stable 
branch until that one is EOL.

In both cases, updating or removing the targets, there will be no need to keep 
kernel support if no targets are left. Thus, we can save time for maintaining 
that kernel version.

Best

Adrian


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X

2020-01-05 Thread Tom Psyborg
On 05/01/2020, m...@adrianschmutzler.de  wrote:
> Hi,
>
>> -Original Message-
>> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
>> On Behalf Of Hauke Mehrtens
>> Sent: Samstag, 4. Januar 2020 18:26
>> To: m...@adrianschmutzler.de; 'OpenWrt Development List' > de...@lists.openwrt.org>
>> Cc: 'Koen Vandeputte' 
>> Subject: Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X
>>
>> On 1/3/20 1:53 PM, m...@adrianschmutzler.de wrote:
>> > Hi Hauke,
>> >
>> >> -Original Message-
>> >> From: openwrt-devel [mailto:openwrt-devel-
>> boun...@lists.openwrt.org]
>> >> On Behalf Of Hauke Mehrtens
>> >> Sent: Donnerstag, 28. November 2019 19:42
>> >> To: Adrian Schmutzler ; 'OpenWrt
>> >> Development List' 
>> >> Cc: 'Koen Vandeputte' 
>> >> Subject: Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X
>> >>
>> >> On 11/28/19 7:11 PM, Adrian Schmutzler wrote:
>> >>> Hi Hauke,
>> >>>
>>  The following are still on kernel 4.9:
>>   * ar7
>>   * ixp4xx
>>   * orion
>> >>>
>> >>> There are patches (actually from you, May 2019) on the list which
>> >>> claim to bump ar7 and orion to 4.14:
>> >>>
>> >>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107337
>> >>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107339
>> >>>
>> >>> I haven't looked closer, just in case you forgot about them ;-)
>> >>
>> >> Nobody reported that they are working so I never applied them. I do
>> >> not have the hardware, I just made them compile.
>> >
>> > Since there was no response of any kind from a third party, I've just
>> marked the two patchsets as "Deferred" in the patchwork, so we get a
>> little
>> more overview there. I hope that's okay for you.
>>
>> Yes fine with me, we should probably drop these targets soon.
>>
>> Hauke
>
> I think it's time to remove the three targets and kernel 4.9 support as well
> after the release has been made. Or does keeping kernel 4.9 in master (even
> without targets) make it easier to support 18.06 branch?
>
> Best
>
> Adrian
>

This LTS version will receive updates for another 3 years, why do you
want to remove it?

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips: Fix sysupgrade for Xiaomi mir3g

2020-01-05 Thread Hauke Mehrtens
On 1/5/20 3:17 PM, Hauke Mehrtens wrote:
> Without this change sysupgrade from 18.06 to 19.07 is only possible with
> the -F option.
> In OpenWrt 18.06 the nand_do_platform_check() function is called with
> the board name mir3g only, if the tar does not use mir3g it will fail.
> OpenWrt 19.07 and later support the metadata with the supported_devices
> attribute to allow renaming. Do the renaming of the target between 19.07
> and master like it is done for some other boards.
> 
> I tested the following sysupgrades successfully without -F
> 18.06 -> 19.07
> 19.07 -> master
> master -> 19.07
> 
> Signed-off-by: Hauke Mehrtens 
> ---
>  target/linux/ramips/image/mt7621.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

This should only go into 19.07 and not into master.

Hauke

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: Fix sysupgrade for Xiaomi mir3g

2020-01-05 Thread Hauke Mehrtens
Without this change sysupgrade from 18.06 to 19.07 is only possible with
the -F option.
In OpenWrt 18.06 the nand_do_platform_check() function is called with
the board name mir3g only, if the tar does not use mir3g it will fail.
OpenWrt 19.07 and later support the metadata with the supported_devices
attribute to allow renaming. Do the renaming of the target between 19.07
and master like it is done for some other boards.

I tested the following sysupgrades successfully without -F
18.06 -> 19.07
19.07 -> master
master -> 19.07

Signed-off-by: Hauke Mehrtens 
---
 target/linux/ramips/image/mt7621.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/ramips/image/mt7621.mk 
b/target/linux/ramips/image/mt7621.mk
index 7eb59188fb..39017a48e1 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -269,7 +269,7 @@ define Device/xiaomi_mir3p
 endef
 TARGET_DEVICES += xiaomi_mir3p
 
-define Device/xiaomi_mir3g
+define Device/mir3g
   DTS := MIR3G
   BLOCKSIZE := 128k
   PAGESIZE := 2048
@@ -282,12 +282,12 @@ define Device/xiaomi_mir3g
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
   DEVICE_TITLE := Xiaomi Mi Router 3G
   SUPPORTED_DEVICES += R3G
-  SUPPORTED_DEVICES += mir3g
+  SUPPORTED_DEVICES += xiaomi,mir3g
   DEVICE_PACKAGES := \
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \
uboot-envtools
 endef
-TARGET_DEVICES += xiaomi_mir3g
+TARGET_DEVICES += mir3g
 
 define Device/mt7621
   DTS := MT7621
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X

2020-01-05 Thread Hauke Mehrtens
On 1/5/20 2:43 PM, m...@adrianschmutzler.de wrote:
> On 11/28/19 7:11 PM, Adrian Schmutzler wrote:
>> Hi Hauke,
>>
>>> The following are still on kernel 4.9:
>>>  * ar7
>>>  * ixp4xx
>>>  * orion
>>
>> There are patches (actually from you, May 2019) on the list which
>> claim to bump ar7 and orion to 4.14:
>>
>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107337
>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107339
>>
>> I haven't looked closer, just in case you forgot about them ;-)
>
> Nobody reported that they are working so I never applied them. I do
> not have the hardware, I just made them compile.

 Since there was no response of any kind from a third party, I've
 just
>>> marked the two patchsets as "Deferred" in the patchwork, so we get a
>>> little more overview there. I hope that's okay for you.
>>>
>>> Yes fine with me, we should probably drop these targets soon.
>>>
>>> Hauke
>>
>> I think it's time to remove the three targets and kernel 4.9 support as well
>> after the release has been made. Or does keeping kernel 4.9 in master (even
>> without targets) make it easier to support 18.06 branch?

No, it does not help me to have kernel 4.9 is master for maintaining 18.06.

> I've prepared a staging branch for that (completely untested at the moment):
> https://git.openwrt.org/?p=openwrt/staging/adrian.git;a=shortlog;h=refs/heads/remove49

Thank you.

Before applying this please send this to the public mailing list.

> For orion, I have some grep matches in uboot-kirkwood and 
> kernel/linux/modules/usb.mk I'm not sure about, so I haven't touched those 
> yet.

The orion part in usb.mk is also used by mvebu:
https://cateee.net/lkddb/web-lkddb/USB_EHCI_HCD_ORION.html

uboot-kirkwood probably also uses some orion parts in the kirkwood target.

I think kmod-crypto-iv is empty now.

There are also some checks in include/netfilter.mk which can be removed now.

This file can also be removed:
package/kernel/linux/files/sysctl-tcp-bbr-k4_9.conf


Hauke



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X

2020-01-05 Thread mail
> > >> On 11/28/19 7:11 PM, Adrian Schmutzler wrote:
> > >>> Hi Hauke,
> > >>>
> >  The following are still on kernel 4.9:
> >   * ar7
> >   * ixp4xx
> >   * orion
> > >>>
> > >>> There are patches (actually from you, May 2019) on the list which
> > >>> claim to bump ar7 and orion to 4.14:
> > >>>
> > >>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107337
> > >>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107339
> > >>>
> > >>> I haven't looked closer, just in case you forgot about them ;-)
> > >>
> > >> Nobody reported that they are working so I never applied them. I do
> > >> not have the hardware, I just made them compile.
> > >
> > > Since there was no response of any kind from a third party, I've
> > > just
> > marked the two patchsets as "Deferred" in the patchwork, so we get a
> > little more overview there. I hope that's okay for you.
> >
> > Yes fine with me, we should probably drop these targets soon.
> >
> > Hauke
> 
> I think it's time to remove the three targets and kernel 4.9 support as well
> after the release has been made. Or does keeping kernel 4.9 in master (even
> without targets) make it easier to support 18.06 branch?
> 

I've prepared a staging branch for that (completely untested at the moment):
https://git.openwrt.org/?p=openwrt/staging/adrian.git;a=shortlog;h=refs/heads/remove49

For orion, I have some grep matches in uboot-kirkwood and 
kernel/linux/modules/usb.mk I'm not sure about, so I haven't touched those yet.

Best

Adrian


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X

2020-01-05 Thread mail
Hi,

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Hauke Mehrtens
> Sent: Samstag, 4. Januar 2020 18:26
> To: m...@adrianschmutzler.de; 'OpenWrt Development List'  de...@lists.openwrt.org>
> Cc: 'Koen Vandeputte' 
> Subject: Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X
> 
> On 1/3/20 1:53 PM, m...@adrianschmutzler.de wrote:
> > Hi Hauke,
> >
> >> -Original Message-
> >> From: openwrt-devel [mailto:openwrt-devel-
> boun...@lists.openwrt.org]
> >> On Behalf Of Hauke Mehrtens
> >> Sent: Donnerstag, 28. November 2019 19:42
> >> To: Adrian Schmutzler ; 'OpenWrt
> >> Development List' 
> >> Cc: 'Koen Vandeputte' 
> >> Subject: Re: [OpenWrt-Devel] Kernel version for OpenWrt 20.X
> >>
> >> On 11/28/19 7:11 PM, Adrian Schmutzler wrote:
> >>> Hi Hauke,
> >>>
>  The following are still on kernel 4.9:
>   * ar7
>   * ixp4xx
>   * orion
> >>>
> >>> There are patches (actually from you, May 2019) on the list which
> >>> claim to bump ar7 and orion to 4.14:
> >>>
> >>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107337
> >>> https://patchwork.ozlabs.org/project/openwrt/list/?series=107339
> >>>
> >>> I haven't looked closer, just in case you forgot about them ;-)
> >>
> >> Nobody reported that they are working so I never applied them. I do
> >> not have the hardware, I just made them compile.
> >
> > Since there was no response of any kind from a third party, I've just
> marked the two patchsets as "Deferred" in the patchwork, so we get a little
> more overview there. I hope that's okay for you.
> 
> Yes fine with me, we should probably drop these targets soon.
> 
> Hauke

I think it's time to remove the three targets and kernel 4.9 support as well 
after the release has been made. Or does keeping kernel 4.9 in master (even 
without targets) make it easier to support 18.06 branch?

Best

Adrian


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH procd 3/4] system: sysupgrade: rework firmware validation

2020-01-05 Thread Petr Štetiar
Hauke Mehrtens  [2020-01-04 20:41:44]:

> > +   vjson_error(err, "unhandled error");
>
> In which case is this returned, aren't there specific error handlers in
> call cases now and vjson_parse() would overwrite it again?

It should be returned in unhandled cases, in case I've missed to handle
something or the code would behave in a way I didn't anticipated.

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH procd 3/4] system: sysupgrade: rework firmware validation

2020-01-05 Thread Hauke Mehrtens
On 1/5/20 11:40 AM, Petr Štetiar wrote:
> Hauke Mehrtens  [2020-01-04 20:41:44]:
> 
> Hi,
> 
> thanks for the review!
> 
>> Please annotate the function with:
>> __attribute__ ((format (printf, 2, 3)));
> 
> Done.
> 
>>> +   va_start(va, fmt);
>>> +   r = vsnprintf(buf+r, sizeof(buf)-r, fmt, va);
>>
>> Please check here for truncation:
>>
>> rv = vsnprintf(buf+r, sizeof(buf)-r, fmt, va);
>> if (rv < 0 || rv >=  sizeof(buf)-r ) {
> 
> I think, that it's better to get truncated message to 256B (if we hit this
> corner cases, we can increase the buffer), then "vsnprintf error".

Fine with me, but please NULL terminate the string, or use
"sizeof(buf) - r - 1" as the size as you already NULL the string before.

> 
>>> +   blobmsg_add_object(, jsobj);
>>> +   json_object_put(jsobj);
>>> +   return VJSON_SUCCESS;
>>> +   }
>>> +
>>> +   return vjson_error(err, "failed to parse JSON: %s (%d)",
>>> +  json_tokener_error_desc(json_tokener_get_error(tok)),
>>> +  json_tokener_get_error(tok));
>>
>> Why don't you free it here too json_object_put()?
> 
> It should be NULL, json_tokener_parse_ex returns object only in case it
> returns json_tokener_success.

Ok

Hauke

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH procd 3/4] system: sysupgrade: rework firmware validation

2020-01-05 Thread Petr Štetiar
Hauke Mehrtens  [2020-01-04 20:41:44]:

Hi,

thanks for the review!

> Please annotate the function with:
> __attribute__ ((format (printf, 2, 3)));

Done.

> > +   va_start(va, fmt);
> > +   r = vsnprintf(buf+r, sizeof(buf)-r, fmt, va);
>
> Please check here for truncation:
>
> rv = vsnprintf(buf+r, sizeof(buf)-r, fmt, va);
> if (rv < 0 || rv >=  sizeof(buf)-r ) {

I think, that it's better to get truncated message to 256B (if we hit this
corner cases, we can increase the buffer), then "vsnprintf error".

> > +   blobmsg_add_object(, jsobj);
> > +   json_object_put(jsobj);
> > +   return VJSON_SUCCESS;
> > +   }
> > +
> > +   return vjson_error(err, "failed to parse JSON: %s (%d)",
> > +  json_tokener_error_desc(json_tokener_get_error(tok)),
> > +  json_tokener_get_error(tok));
> 
> Why don't you free it here too json_object_put()?

It should be NULL, json_tokener_parse_ex returns object only in case it
returns json_tokener_success.

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 2/2] ath79: Remove mtd cfi_cmdset_0002 status check patches

2020-01-05 Thread Tokunori Ikegami
Currently the patch only changes break to use goto statement instead.
But not necessary acutually since the ret value checked after the for loop.
So it is okay for the break case before changed by the patch also.

This patch only reverts the following commit partially.
  https://github.com/openwrt/openwrt/commit/ddc11c3932c7b7b7df7d5fbd48f207e7
Note: The changes are mainly applied into the linux kernel upstream.

Signed-off-by: Tokunori Ikegami 
Cc: Koen Vandeputte 
---
 .../403-mtd_fix_cfi_cmdset_0002_status_check.patch | 62 --
 .../403-mtd_fix_cfi_cmdset_0002_status_check.patch | 62 --
 2 files changed, 124 deletions(-)
 delete mode 100644 
target/linux/ath79/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch
 delete mode 100644 
target/linux/ath79/patches-4.19/403-mtd_fix_cfi_cmdset_0002_status_check.patch

diff --git 
a/target/linux/ath79/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch
 
b/target/linux/ath79/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch
deleted file mode 100644
index 4ef2303769..00
--- 
a/target/linux/ath79/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch
+++ /dev/null
@@ -1,62 +0,0 @@
 a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -1641,7 +1641,7 @@ static int __xipram do_write_oneword(str
-   }
- 
-   if (chip_good(map, adr, datum))
--  break;
-+  goto enable_xip;
- 
-   /* Latency issues. Drop the lock, wait a while and retry */
-   UDELAY(map, chip, adr, 1);
-@@ -1658,6 +1658,8 @@ static int __xipram do_write_oneword(str
-   goto retry;
-   }
-   }
-+
-+ enable_xip:
-   xip_enable(map, chip, adr);
-  op_done:
-   if (mode == FL_OTP_WRITE)
-@@ -2236,7 +2238,6 @@ static int cfi_amdstd_panic_write(struct
-   return 0;
- }
- 
--
- /*
-  * Handle devices with one erase region, that only implement
-  * the chip erase command.
-@@ -2304,7 +2305,7 @@ static int __xipram do_erase_chip(struct
-   }
- 
-   if (chip_good(map, adr, map_word_ff(map)))
--  break;
-+  goto op_done;
- 
-   if (time_after(jiffies, timeo)) {
-   printk(KERN_WARNING "MTD %s(): software timeout\n",
-@@ -2328,6 +2329,7 @@ static int __xipram do_erase_chip(struct
-   }
-   }
- 
-+ op_done:
-   chip->state = FL_READY;
-   xip_enable(map, chip, adr);
-   DISABLE_VPP(map);
-@@ -2401,7 +2403,7 @@ static int __xipram do_erase_oneblock(st
- 
-   if (chip_good(map, adr, map_word_ff(map))) {
-   xip_enable(map, chip, adr);
--  break;
-+  goto op_done;
-   }
- 
-   if (time_after(jiffies, timeo)) {
-@@ -2427,6 +2429,7 @@ static int __xipram do_erase_oneblock(st
-   }
-   }
- 
-+ op_done:
-   chip->state = FL_READY;
-   DISABLE_VPP(map);
-   put_chip(map, chip, adr);
diff --git 
a/target/linux/ath79/patches-4.19/403-mtd_fix_cfi_cmdset_0002_status_check.patch
 
b/target/linux/ath79/patches-4.19/403-mtd_fix_cfi_cmdset_0002_status_check.patch
deleted file mode 100644
index 702e2a5b09..00
--- 
a/target/linux/ath79/patches-4.19/403-mtd_fix_cfi_cmdset_0002_status_check.patch
+++ /dev/null
@@ -1,62 +0,0 @@
 a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -1640,7 +1640,7 @@ static int __xipram do_write_oneword(str
-   }
- 
-   if (chip_good(map, adr, datum))
--  break;
-+  goto enable_xip;
- 
-   /* Latency issues. Drop the lock, wait a while and retry */
-   UDELAY(map, chip, adr, 1);
-@@ -1657,6 +1657,8 @@ static int __xipram do_write_oneword(str
-   goto retry;
-   }
-   }
-+
-+ enable_xip:
-   xip_enable(map, chip, adr);
-  op_done:
-   if (mode == FL_OTP_WRITE)
-@@ -2235,7 +2237,6 @@ static int cfi_amdstd_panic_write(struct
-   return 0;
- }
- 
--
- /*
-  * Handle devices with one erase region, that only implement
-  * the chip erase command.
-@@ -2303,7 +2304,7 @@ static int __xipram do_erase_chip(struct
-   }
- 
-   if (chip_good(map, adr, map_word_ff(map)))
--  break;
-+  goto op_done;
- 
-   if (time_after(jiffies, timeo)) {
-   printk(KERN_WARNING "MTD %s(): software timeout\n",
-@@ -2327,6 +2328,7 @@ static int __xipram do_erase_chip(struct
-   }
-   }
- 
-+ op_done:
-   chip->state = FL_READY;
-   xip_enable(map, chip, adr);
-   DISABLE_VPP(map);
-@@ -2399,7 +2401,7 @@ static int __xipram do_erase_oneblock(st
-   }
- 
-   if (chip_good(map, adr, map_word_ff(map)))
--   

[OpenWrt-Devel] [PATCH v2 0/2] Remove mtd cfi_cmdset_0002 status check patches

2020-01-05 Thread Tokunori Ikegami
The following commit changes are mainly applied into the linux kernel upstream.
  
https://github.com/openwrt/openwrt/commit/ddc11c3932c7b7b7df7d5fbd48f207e77619eaa7

So it is not necessary to remain current patches and remove them.

Tokunori Ikegami (2):
  ar71xx: Remove mtd cfi_cmdset_0002 status check patch
  ath79: Remove mtd cfi_cmdset_0002 status check patches

 .../403-mtd_fix_cfi_cmdset_0002_status_check.patch | 62 --
 .../403-mtd_fix_cfi_cmdset_0002_status_check.patch | 62 --
 .../403-mtd_fix_cfi_cmdset_0002_status_check.patch | 62 --
 3 files changed, 186 deletions(-)
 delete mode 100644 
target/linux/ar71xx/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch
 delete mode 100644 
target/linux/ath79/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch
 delete mode 100644 
target/linux/ath79/patches-4.19/403-mtd_fix_cfi_cmdset_0002_status_check.patch

-- 
2.11.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 1/2] ar71xx: Remove mtd cfi_cmdset_0002 status check patch

2020-01-05 Thread Tokunori Ikegami
Currently the patch only changes break to use goto statement instead.
But not necessary acutually since the ret value checked after the for loop.
So it is okay for the break case before changed by the patch also.

This patch only reverts the following commit partially.
  
https://github.com/openwrt/openwrt/commit/ddc11c3932c7b7b7df7d5fbd48f207e77619eaa7
Note: The changes are mainly applied into the linux kernel upstream.

Signed-off-by: Tokunori Ikegami 
Cc: Koen Vandeputte 
---
 .../403-mtd_fix_cfi_cmdset_0002_status_check.patch | 62 --
 1 file changed, 62 deletions(-)
 delete mode 100644 
target/linux/ar71xx/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch

diff --git 
a/target/linux/ar71xx/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch
 
b/target/linux/ar71xx/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch
deleted file mode 100644
index 4ef2303769..00
--- 
a/target/linux/ar71xx/patches-4.14/403-mtd_fix_cfi_cmdset_0002_status_check.patch
+++ /dev/null
@@ -1,62 +0,0 @@
 a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -1641,7 +1641,7 @@ static int __xipram do_write_oneword(str
-   }
- 
-   if (chip_good(map, adr, datum))
--  break;
-+  goto enable_xip;
- 
-   /* Latency issues. Drop the lock, wait a while and retry */
-   UDELAY(map, chip, adr, 1);
-@@ -1658,6 +1658,8 @@ static int __xipram do_write_oneword(str
-   goto retry;
-   }
-   }
-+
-+ enable_xip:
-   xip_enable(map, chip, adr);
-  op_done:
-   if (mode == FL_OTP_WRITE)
-@@ -2236,7 +2238,6 @@ static int cfi_amdstd_panic_write(struct
-   return 0;
- }
- 
--
- /*
-  * Handle devices with one erase region, that only implement
-  * the chip erase command.
-@@ -2304,7 +2305,7 @@ static int __xipram do_erase_chip(struct
-   }
- 
-   if (chip_good(map, adr, map_word_ff(map)))
--  break;
-+  goto op_done;
- 
-   if (time_after(jiffies, timeo)) {
-   printk(KERN_WARNING "MTD %s(): software timeout\n",
-@@ -2328,6 +2329,7 @@ static int __xipram do_erase_chip(struct
-   }
-   }
- 
-+ op_done:
-   chip->state = FL_READY;
-   xip_enable(map, chip, adr);
-   DISABLE_VPP(map);
-@@ -2401,7 +2403,7 @@ static int __xipram do_erase_oneblock(st
- 
-   if (chip_good(map, adr, map_word_ff(map))) {
-   xip_enable(map, chip, adr);
--  break;
-+  goto op_done;
-   }
- 
-   if (time_after(jiffies, timeo)) {
-@@ -2427,6 +2429,7 @@ static int __xipram do_erase_oneblock(st
-   }
-   }
- 
-+ op_done:
-   chip->state = FL_READY;
-   DISABLE_VPP(map);
-   put_chip(map, chip, adr);
-- 
2.11.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel