Re: [OpenWrt-Devel] Special features request!

2019-07-17 Thread Rich Brown
Hi,

Thanks for writing to us about OpenWrt. I think you misunderstand the right 
place to ask your questions. Please accept our advice for a good way to 
proceed. Here is how I understand your request:

1) You are looking to modify the base OpenWrt release. This seems to be an 
interesting set of features.

2) You do not presently have the technical skills (or enough time) to do this 
work yourself, so you are looking for someone to help.

3) Once you have a sense of how much work these tasks will require, you will 
crowd-fund the project.

The OpenWrt developer and admin lists (that you wrote to) are not the proper 
place to ask these questions. A better place to ask would be to post a note to 
the OpenWrt Forum (forum.openwrt.org ) in the 
Developer category to see if there is interest from someone who would be 
willing to work with you to create an estimate and the desired software 
modifications.

Best regards,

Rich Brown

> On Jul 17, 2019, at 9:13 PM, SkullFace  wrote:
> 
> Hi
> 
> 
> I would like to ask openwrt team to add some special features that i need.
> 
> I will use crowd funding to collect the money!
> 
> 1-I need full control over Lantiq xDsl firmware using both GUI and CLI.
> 
> 2-I want to override Line Config enforced by DSLAM/DLM, [SNR, Power, 
> Interleaving, G.INP, BitSwap, Vectoring, Rate Adaptationetc].
> 
> 3-more advanced, stable and configurable VPN clients/Servers, Proxy 
> Client/Servers, Obfuscating Proxy clients/Servers.
> 
> 4-Advanced Luci Addons for CLI only packages.
> 
> 5-Stable per user bandwidth monitor and limiter.
> 
> 6-Per user speed limit/propriety.
> 
> 7-Support for other unsupported  xDsl Chips
> 
> 8-Support for the wide spead ISP routers.
> 
> So i wanted to publish a Patreon page to cover the costs, however i cant 
> complete and publish the page without knowing the money required to finish 
> these tasks and/or hire more programmers to help finish the tasks quicker.
> 
> How much money is required to accomplish the tasks 1-3?! and how much time is 
> needed?
> 
> Thanks
> 
> 
> 
> ___
> openwrt-adm mailing list
> openwrt-...@lists.openwrt.org
> http://lists.infradead.org/mailman/listinfo/openwrt-adm

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


[OpenWrt-Devel] [PATCHv2] toolchain: Remove powerpc64 libc restriction

2019-07-17 Thread Rosen Penev
Starting with version 1.1.15, musl supports powerpc64.

There are no known users of powerpc64 yet.

This is effectively a revert of 0de93311e1575ab6f8e9e90b5023b6fb2cedcf1f

Signed-off-by: Rosen Penev 
---
 v2: Add missing entries
 toolchain/Config.in | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index 95087b7078..faff3c8fbb 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -238,7 +238,6 @@ comment "C Library"
 choice
prompt "C Library implementation" if TOOLCHAINOPTS
default LIBC_USE_UCLIBC if arc
-   default LIBC_USE_GLIBC if powerpc64
default LIBC_USE_MUSL
help
  Select the C library implementation.
@@ -257,7 +256,7 @@ choice
config LIBC_USE_MUSL
select USE_MUSL
bool "Use musl"
-   depends on !(arc || powerpc64)
+   depends on !arc
 
 endchoice
 
@@ -275,7 +274,6 @@ config GDB
  Enable if you want to build the gdb.
 
 config USE_GLIBC
-   default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN 
&& (powerpc64)
bool
 
 config USE_UCLIBC
@@ -283,7 +281,7 @@ config USE_UCLIBC
bool
 
 config USE_MUSL
-   default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN 
&& !(arc || powerpc64)
+   default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN 
&& !(arc)
bool
 
 config SSP_SUPPORT
-- 
2.17.1


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


[OpenWrt-Devel] [PATCH] linux-atm: Add missing headers

2019-07-17 Thread Rosen Penev
This fixes compilation with -Werror=implicit-function-declaration.

Signed-off-by: Rosen Penev 
---
 package/network/utils/linux-atm/Makefile  |  2 +-
 .../linux-atm/patches/700-musl-include.patch  | 30 +++
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 
package/network/utils/linux-atm/patches/700-musl-include.patch

diff --git a/package/network/utils/linux-atm/Makefile 
b/package/network/utils/linux-atm/Makefile
index f2ad888e4e..c74febcbbc 100644
--- a/package/network/utils/linux-atm/Makefile
+++ b/package/network/utils/linux-atm/Makefile
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=linux-atm
 PKG_VERSION:=2.5.2
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
diff --git a/package/network/utils/linux-atm/patches/700-musl-include.patch 
b/package/network/utils/linux-atm/patches/700-musl-include.patch
new file mode 100644
index 00..2b2268d8ac
--- /dev/null
+++ b/package/network/utils/linux-atm/patches/700-musl-include.patch
@@ -0,0 +1,30 @@
+--- a/src/include/atmd.h
 b/src/include/atmd.h
+@@ -10,6 +10,7 @@
+ 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ 
+--- a/src/lib/unix.c
 b/src/lib/unix.c
+@@ -8,6 +8,7 @@
+ 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+--- a/src/sigd/kernel.c
 b/src/sigd/kernel.c
+@@ -8,6 +8,7 @@
+ 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ 
-- 
2.17.1


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


[OpenWrt-Devel] [PATCH] ppp: Add missing headers

2019-07-17 Thread Rosen Penev
Fixes compilation with -Werror=implicit-function-declaration.

Patch submitted upstream: https://github.com/paulusmack/ppp/pull/124

Signed-off-by: Rosen Penev 
---
 package/network/services/ppp/Makefile |  2 +-
 .../services/ppp/patches/700-musl.patch   | 22 +++
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 package/network/services/ppp/patches/700-musl.patch

diff --git a/package/network/services/ppp/Makefile 
b/package/network/services/ppp/Makefile
index c8016dc619..7f266e126b 100644
--- a/package/network/services/ppp/Makefile
+++ b/package/network/services/ppp/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ppp
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/paulusmack/ppp
diff --git a/package/network/services/ppp/patches/700-musl.patch 
b/package/network/services/ppp/patches/700-musl.patch
new file mode 100644
index 00..70fad9ef99
--- /dev/null
+++ b/package/network/services/ppp/patches/700-musl.patch
@@ -0,0 +1,22 @@
+From bbe58b9f83ba197d1cca1ca4338214e35f6131c8 Mon Sep 17 00:00:00 2001
+From: Rosen Penev 
+Date: Tue, 2 Jul 2019 12:53:12 -0700
+Subject: [PATCH] pppd.h: Add missing headers
+
+---
+ pppd/pppd.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/pppd/pppd.h b/pppd/pppd.h
+index 6e3743fd..b3470571 100644
+--- a/pppd/pppd.h
 b/pppd/pppd.h
+@@ -50,6 +50,8 @@
+ #define __PPPD_H__
+ 
+ #include /* for FILE */
++#include/* for encrypt */
++#include/* for setkey */
+ #include/* for NGROUPS_MAX */
+ #include /* for MAXPATHLEN and BSD4_4, if 
defined */
+ #include /* for u_int32_t, if defined */
-- 
2.17.1


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


[OpenWrt-Devel] [PATCH] util-linux: Fix widechar check

2019-07-17 Thread Rosen Penev
Patch is an upstream backport.

Fixes compilation when -Werror=implicit-function-declaration is passed.

Signed-off-by: Rosen Penev 
---
 package/utils/util-linux/Makefile |  2 +-
 .../util-linux/patches/010-stdlib.h.patch | 26 +++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 package/utils/util-linux/patches/010-stdlib.h.patch

diff --git a/package/utils/util-linux/Makefile 
b/package/utils/util-linux/Makefile
index 261a9615ef..3ce6354ec3 100644
--- a/package/utils/util-linux/Makefile
+++ b/package/utils/util-linux/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=util-linux
 PKG_VERSION:=2.34
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.34
diff --git a/package/utils/util-linux/patches/010-stdlib.h.patch 
b/package/utils/util-linux/patches/010-stdlib.h.patch
new file mode 100644
index 00..49745c7dc7
--- /dev/null
+++ b/package/utils/util-linux/patches/010-stdlib.h.patch
@@ -0,0 +1,26 @@
+From 1632856ef19efb50c57c939b82a9ff712b3c0b09 Mon Sep 17 00:00:00 2001
+From: Florian Weimer 
+Date: Fri, 5 Jul 2019 17:20:27 +0200
+Subject: [PATCH] build-sys: Include  in ./configure wchar_t test
+
+Without #include , this configure check fails for strict
+C99/C11 compilers which do not support implicit function declarations
+(which are a C90 feature removed from C99).
+
+Signed-off-by: Karel Zak 
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index a840e20ee..997b6388c 100644
+--- a/configure.ac
 b/configure.ac
+@@ -752,6 +752,7 @@ UL_REQUIRES_COMPILE([widechar], [[
+   #include 
+   #include 
+   #include 
++  #include 
+   ]], [[
+ wchar_t wc;
+ wint_t w;
-- 
2.17.1


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


[OpenWrt-Devel] [PATCH] toolchain: Remove powerpc64 libc restriction

2019-07-17 Thread Rosen Penev
Starting with version 1.1.15, musl supports powerpc64.

There are no known users of powerpc64 yet.

Signed-off-by: Rosen Penev 
---
 toolchain/Config.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index 95087b7078..9ca711e29a 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -238,7 +238,6 @@ comment "C Library"
 choice
prompt "C Library implementation" if TOOLCHAINOPTS
default LIBC_USE_UCLIBC if arc
-   default LIBC_USE_GLIBC if powerpc64
default LIBC_USE_MUSL
help
  Select the C library implementation.
@@ -257,7 +256,7 @@ choice
config LIBC_USE_MUSL
select USE_MUSL
bool "Use musl"
-   depends on !(arc || powerpc64)
+   depends on !arc
 
 endchoice
 
-- 
2.17.1


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


[OpenWrt-Devel] Special features request!

2019-07-17 Thread SkullFace

Hi


I would like to ask openwrt team to add some special features that i need.

I will use crowd funding to collect the money!

1-I need full control over Lantiq xDsl firmware using both GUI and CLI.

2-I want to override Line Config enforced by DSLAM/DLM, [SNR, Power, 
Interleaving, G.INP, BitSwap, Vectoring, Rate Adaptationetc].


3-more advanced, stable and configurable VPN clients/Servers, Proxy 
Client/Servers, Obfuscating Proxy clients/Servers.


4-Advanced Luci Addons for CLI only packages.

5-Stable per user bandwidth monitor and limiter.

6-Per user speed limit/propriety.

7-Support for other unsupported  xDsl Chips

8-Support for the wide spead ISP routers.

So i wanted to publish a Patreon page to cover the costs, however i cant 
complete and publish the page without knowing the money required to 
finish these tasks and/or hire more programmers to help finish the tasks 
quicker.


How much money is required to accomplish the tasks 1-3?! and how much 
time is needed?


Thanks



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


Re: [OpenWrt-Devel] [PATCH] ramips: mt7621: Add new device AsiaRF AP7621-NV1

2019-07-17 Thread mail
Hi Daniel,

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Daniel Danzberger
> Sent: Dienstag, 16. Juli 2019 12:31
> To: openwrt-devel@lists.openwrt.org
> Cc: Daniel Danzberger 
> Subject: [OpenWrt-Devel] [PATCH] ramips: mt7621: Add new device AsiaRF
> AP7621-NV1
> 
> SoC:Mediatek MT7621A
> CPU:4x 880Mhz
> Cache:  32 KB I-Cache and 32 KB D-Cach
> 256 KB L2 Cache (shared by Dual-Core)
> RAM:DDR3 512MB 16bits BUS
> FLASH:  16MB
> Switch: Mediatek Gigabit Switch (2 x LAN, 1 x WAN)
> POE:(1x PD, 2x PSE)
> USB:1x 3.0
> PCI:3x Mini PCIe (3 USB2.0 + 2 x UIM interface)
> GPS:Quectel L70B
> SIM:2 Slots
> BTN:Reset
> LED:- Power
> - Ethernet
> - Wifi
> - USB
> UART:  UART is present as Pads with throughholes on the PCB.
>  They are located on left side.
>3.3V - RX - GND - TX / 57600-8N1
>3.3V is the square pad
> 
> Installation
> 
> The stock image is a modified openwrt and can be overflashed via
> sysupgrade -F
> 
> Signed-off-by: Daniel Danzberger 
> ---
>  target/linux/ramips/base-files/etc/board.d/02_network |  3 +++
> target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts  |  9 +
>  target/linux/ramips/image/mt7621.mk   | 10 ++
>  3 files changed, 22 insertions(+)
>  create mode 100644 target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
> 
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index c3b7cd4390..c348b91a36 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -228,6 +228,9 @@ ramips_setup_interfaces()
>   asiarf,ap7621-001)
>   ucidef_add_switch "switch0" "0:lan" "4:wan" "6@eth0"
>   ;;
> + asiarf,ap7621-nv1)
> + ucidef_add_switch "switch0" "0:wan" "2:lan" "3:lan"
> "6@eth0"
> + ;;
>   asiarf,awapn2403)
>   ucidef_add_switch "switch0" \
>   "0:lan" "1:wan" "6@eth0"
> diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
> b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
> new file mode 100644
> index 00..93af3950d2
> --- /dev/null
> +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
> @@ -0,0 +1,9 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> +
> +/dts-v1/;
> +#include "mt7621_asiarf_ap7621-001.dts"

Please create a DTSI, e.g. mt7621_asiarf_ap7621.dtsi, for the includes.

> +
> +/ {
> + compatible = "asiarf,ap7621-nv1", "mediatek,mt7621-soc";
> + model = "AsiaRF AP7621-NV1";
> +};
> diff --git a/target/linux/ramips/image/mt7621.mk
> b/target/linux/ramips/image/mt7621.mk
> index e2928c80ce..1eb1a4cb99 100644
> --- a/target/linux/ramips/image/mt7621.mk
> +++ b/target/linux/ramips/image/mt7621.mk
> @@ -106,6 +106,16 @@ define Device/asiarf_ap7621-001  endef
> TARGET_DEVICES += asiarf_ap7621-001
> 
> +define Device/asiarf_ap7621-nv1
> +  MTK_SOC := mt7621
> +  IMAGE_SIZE := $(ralink_default_fw_size_16M)

Please use the precise size of the firmware partition, I think it would be 
16000k.

Best

Adrian Schmutzler

> +  DEVICE_VENDOR := AsiaRF
> +  DEVICE_MODEL := AP7621-NV1
> +  DEVICE_PACKAGES := \
> + kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 endef
> TARGET_DEVICES +=
> +asiarf_ap7621-nv1
> +
>  define Device/asus_rt-ac57u
>MTK_SOC := mt7621
>DEVICE_VENDOR := ASUS
> --
> 2.20.1
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


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 2/2] gemini: Enable flash boot on reference design type

2019-07-17 Thread Linus Walleij
The flash layout on the Storlink reference design for Gemini
is using 2 MB flash for the kernel, and it also insists on
overwriting the partition table with default values on every
boot. The same is true for the SQ201. This poses a problem
on recent OpenWrt firmware as the base zImage is bigger
than 2 MB.

At the same time there is a ramdisk partition of 6 MB that we
don't really need. The partition table looks like this:

Creating 7 MTD partitions on "3000.flash":
0x-0x00016000 : "BOOT"
0x0012-0x0032 : "Kern"
0x0032-0x0092 : "Ramdisk"
0x0092-0x00f2 : "Application"
0x00f2-0x00f4 : "VCTL"
0x00f4-0x00fe : "CurConf"
0x00fe-0x0100 : "FIS directory"

On boot the "Kern" partition is copied to RAM @0x0160
and the "Ramdisk" partition is copied to RAM @0x0080.
Then the kernel is executed.

The idea with this patch is to extend the "Kern" partition
with the "Ramdisk" partition to get a full 8 MB to use
for the kernel. Then we put the OpenWrt JFFS2 rootfs
inside the "Application" partition.

We create a small assembly loop that we prepend to the
"Kern" image that will copy the "Kern" from 0x016
and the "Ramdisk" from 0x0080 and put them in
consecutive space at 0x0040 and execute it from
there, using "Application" as rootfs.

We generate 3 main files:
- zImage - contains the assembly bootstrap loop and
  the first part of the generated kernel image
- rd.gz - contains the second part of the generated
  kernel image
- hddapp.tgz - contains the root filesystem

On the SQ201 I flash these manually using the native boot
loader PLATO, "Y" alternative for the zImage, "R" for
the rd.gz image and "A" for hddapp.tgz.

This works fine and I can now boot to prompt on the SQ201
with nothing but flash.

Signed-off-by: Linus Walleij 
---
 target/linux/gemini/image/Makefile| 31 ++-
 ...11-ARM-dts-Fix-up-SQ201-flash-access.patch |  2 +-
 2 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/target/linux/gemini/image/Makefile 
b/target/linux/gemini/image/Makefile
index ebcff633ea8a..d6e7ba47e8f8 100644
--- a/target/linux/gemini/image/Makefile
+++ b/target/linux/gemini/image/Makefile
@@ -7,6 +7,10 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
+define Build/copy-kernel
+   $(MAKE) -C copy-kernel CROSS_COMPILE=$(TARGET_CROSS)
+endef
+
 # Cook a "WRGG" image, this board is apparently one in the D-Link
 # WRGG family and uses the exact same firmware format as other
 # D-Link devices.
@@ -76,18 +80,29 @@ endef
 
 # Create the default image format used by the StorLink reference design
 # SL93512r, Raidsonic NAS4220B and Itian Square One SQ201
-# with the squashfs and overlay inside the "rd.gz" file.
-# We pad it out to 6144K which is the size of the initramfs partition.
+# with the squashfs and overlay inside the "application" partition.
+#
+# These devices have a hard-coded partition table that the boot loader
+# constantly reflashes back, so we need to work around it like this:
 #
-# The "application" partition is just blank. You can put anything
-# there when using OpenWRT. We just use that to create the
-# "sysupgrade" firmware image.
+# 0x0012-0x0032 : "Kern" - small copy routine and first
+# part of the kernel goes here
+# 0x0032-0x0092 : "Ramdisk" - second part of the kernel and
+# some padding goes here
+# 0x0092-0x00f2 : "Application" - rootfs goes here
 define Build/storlink-default-images
mkdir -p $@.tmp
 
-   mv $@ $@.tmp/rd.gz
-   dd if=/dev/zero of=$@.tmp/hddapp.tgz bs=6144k count=1
-   cp $(IMAGE_KERNEL) $@.tmp/zImage
+   $(call Build/copy-kernel)
+   # "App" partition is the rootfs
+   mv $@ $@.tmp/hddapp.tgz
+   # 256 bytes copy routine
+   dd if=copy-kernel/copy-kernel.bin of=$@.tmp/zImage
+   $(call Image/pad-to,$@.tmp/zImage,512)
+   # Copy first part of the kernel into zImage
+   dd if=$(IMAGE_KERNEL) of=$@.tmp/zImage bs=1 seek=512 count=2096640
+   # Put the rest of the kernel into the "ramdisk"
+   dd if=$(IMAGE_KERNEL) of=$@.tmp/rd.gz bs=1 skip=2096640 count=6144k 
conv=sync
cp ./ImageInfo-$(1) $@.tmp/ImageInfo
 
sed -i -e "s/DATESTR/`date +%Y%m%d $(if $(SOURCE_DATE_EPOCH),--date 
"@$(SOURCE_DATE_EPOCH)")`/g" $@.tmp/ImageInfo
diff --git 
a/target/linux/gemini/patches-4.19/0011-ARM-dts-Fix-up-SQ201-flash-access.patch 
b/target/linux/gemini/patches-4.19/0011-ARM-dts-Fix-up-SQ201-flash-access.patch
index 7517d62ed31c..578e970c0fd9 100644
--- 
a/target/linux/gemini/patches-4.19/0011-ARM-dts-Fix-up-SQ201-flash-access.patch
+++ 
b/target/linux/gemini/patches-4.19/0011-ARM-dts-Fix-up-SQ201-flash-access.patch
@@ -20,7 +20,7 @@ Signed-off-by: Linus Walleij 
  
chosen {
 -  bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw 

[OpenWrt-Devel] [PATCH 1/2] gemini: Add copy-kernel utility package

2019-07-17 Thread Linus Walleij
This package just contains a small Gemini-only assembler
bootstrap loop to copy the kernel from the two fragments
(previously zImage at 0x0160 and initramdisk at 0x0080)
into one big zImage of up to 8 MB at 0x0040.

It will be built on demand from the Gemini image Makefile.

Signed-off-by: Linus Walleij 
---
 .../linux/gemini/image/copy-kernel/.gitignore |  1 +
 .../linux/gemini/image/copy-kernel/Makefile   | 32 +
 .../gemini/image/copy-kernel/copy-kernel.S| 45 +++
 3 files changed, 78 insertions(+)
 create mode 100644 target/linux/gemini/image/copy-kernel/.gitignore
 create mode 100644 target/linux/gemini/image/copy-kernel/Makefile
 create mode 100644 target/linux/gemini/image/copy-kernel/copy-kernel.S

diff --git a/target/linux/gemini/image/copy-kernel/.gitignore 
b/target/linux/gemini/image/copy-kernel/.gitignore
new file mode 100644
index ..e5939dfd9c2d
--- /dev/null
+++ b/target/linux/gemini/image/copy-kernel/.gitignore
@@ -0,0 +1 @@
+copy-kernel.bin
diff --git a/target/linux/gemini/image/copy-kernel/Makefile 
b/target/linux/gemini/image/copy-kernel/Makefile
new file mode 100644
index ..155c35968c68
--- /dev/null
+++ b/target/linux/gemini/image/copy-kernel/Makefile
@@ -0,0 +1,32 @@
+#
+# Makefile for Gemin kernel copy stub
+#
+# Copyright (C) 2019 Linus Walleij 
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+
+AS := $(CROSS_COMPILE)as
+OBJCOPY:= $(CROSS_COMPILE)objcopy
+
+BIN_FLAGS  := -O binary -S
+
+all: copy-kernel.bin
+
+# Don't build dependencies, this may die if $(CC) isn't gcc
+dep:
+
+install:
+
+%.o : %.S
+   $(AS) $(ASFLAGS) -k -o $@ $<
+
+%.bin: %.o
+   $(OBJCOPY) $(BIN_FLAGS) $< $@
+
+mrproper: clean
+
+clean:
+   rm -f copy-kernel.bin copy-kernel.o
diff --git a/target/linux/gemini/image/copy-kernel/copy-kernel.S 
b/target/linux/gemini/image/copy-kernel/copy-kernel.S
new file mode 100644
index ..a287e40defb6
--- /dev/null
+++ b/target/linux/gemini/image/copy-kernel/copy-kernel.S
@@ -0,0 +1,45 @@
+   // Arm assembly to copy the Gemini kernel on Storlink reference
+   // designs and derived devices with the same flash layout and
+   // boot loader.
+   //
+   // This will execute at 0x0160
+   //
+   // Copies the kernel from two fragments (originally zImage
+   // and initramdisk) to 0x0040 making space for a kernel
+   // image of up to 8 MB except for these 512 bytes used for
+   // this bootstrap.
+   //
+   // 0x01600200 .. 0x017f -> 0x0040 .. 0x005ffdff
+   // 0x0080 .. 0x00df -> 0x005ffe00 .. 0x00bffdff
+
+   // Memory used for this bootstrap
+   .equ BOOT_HEADROOM, 0x200
+
+   .global _start // Stand-alone assembly code
+_start:
+   mov r1, #0x0160
+   mov r2, #0x0040
+   mov r3, #0x0020
+   add r1, r1, #BOOT_HEADROOM
+   sub r3, r3, #BOOT_HEADROOM
+copyloop1:
+   ldr r0, [r1]
+   str r0, [r2]
+   add r1, r1, #4
+   add r2, r2, #4
+   sub r3, r3, #4
+   cmp r3, #0
+   bne copyloop1
+   mov r1, #0x0080
+   mov r3, #0x0060
+copyloop2:
+   ldr r0, [r1]
+   str r0, [r2]
+   add r1, r1, #4
+   add r2, r2, #4
+   sub r3, r3, #4
+   cmp r3, #0
+   bne copyloop2
+   mov r0, #0x0040
+   // Let's go
+   mov pc, r0
-- 
2.21.0


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


[OpenWrt-Devel] [PATCH] gemini: Fix up flash accesses

2019-07-17 Thread Linus Walleij
The SL93512r and the NAS4220B have Redboot partition
tables (rely on these) and need to boot from mtdblock3.
Add two patches from upstream to fix this.

Signed-off-by: Linus Walleij 
---
 ...-Switch-to-redboot-partition-parsing.patch | 104 ++
 ...dts-gemini-Mount-root-from-mtdblock3.patch |  36 ++
 2 files changed, 140 insertions(+)
 create mode 100644 
target/linux/gemini/patches-4.19/0022-RM-dts-gemini-Switch-to-redboot-partition-parsing.patch
 create mode 100644 
target/linux/gemini/patches-4.19/0023-ARM-dts-gemini-Mount-root-from-mtdblock3.patch

diff --git 
a/target/linux/gemini/patches-4.19/0022-RM-dts-gemini-Switch-to-redboot-partition-parsing.patch
 
b/target/linux/gemini/patches-4.19/0022-RM-dts-gemini-Switch-to-redboot-partition-parsing.patch
new file mode 100644
index ..12c899ea3020
--- /dev/null
+++ 
b/target/linux/gemini/patches-4.19/0022-RM-dts-gemini-Switch-to-redboot-partition-parsing.patch
@@ -0,0 +1,104 @@
+From cad2161e64aca9e1c94fd11b0d0f7b53c9e80de0 Mon Sep 17 00:00:00 2001
+From: Linus Walleij 
+Date: Fri, 12 Jul 2019 22:57:11 +0200
+Subject: [PATCH 1/2] ARM: dts: gemini: Switch to redboot partition parsing
+
+This switches the kernel to parse the Redboot partitions
+in the SL93512r and the NAS4220B properly using the
+right compatible string instead of using hard-coded
+partitions.
+
+Signed-off-by: Linus Walleij 
+---
+ arch/arm/boot/dts/gemini-nas4220b.dts | 35 +++
+ arch/arm/boot/dts/gemini-sl93512r.dts | 35 +++
+ 2 files changed, 8 insertions(+), 62 deletions(-)
+
+--- a/arch/arm/boot/dts/gemini-nas4220b.dts
 b/arch/arm/boot/dts/gemini-nas4220b.dts
+@@ -81,37 +81,10 @@
+   /* 16MB of flash */
+   reg = <0x3000 0x0100>;
+ 
+-  partition@0 {
+-  label = "RedBoot";
+-  reg = <0x 0x0002>;
+-  read-only;
+-  };
+-  partition@2 {
+-  label = "Kernel";
+-  reg = <0x0002 0x0030>;
+-  };
+-  partition@32 {
+-  label = "Ramdisk";
+-  reg = <0x0032 0x0060>;
+-  };
+-  partition@92 {
+-  label = "Application";
+-  reg = <0x0092 0x0060>;
+-  };
+-  partition@f2 {
+-  label = "VCTL";
+-  reg = <0x00f2 0x0002>;
+-  read-only;
+-  };
+-  partition@f4 {
+-  label = "CurConf";
+-  reg = <0x00f4 0x000a>;
+-  read-only;
+-  };
+-  partition@fe {
+-  label = "FIS directory";
+-  reg = <0x00fe 0x0002>;
+-  read-only;
++  partitions {
++  compatible = "redboot-fis";
++  /* Eraseblock at 0xfe */
++  fis-index-block = <0x1fc>;
+   };
+   };
+ 
+--- a/arch/arm/boot/dts/gemini-sl93512r.dts
 b/arch/arm/boot/dts/gemini-sl93512r.dts
+@@ -143,37 +143,10 @@
+   /* 16MB of flash */
+   reg = <0x3000 0x0100>;
+ 
+-  partition@0 {
+-  label = "BOOT";
+-  reg = <0x 0x0002>;
+-  read-only;
+-  };
+-  partition@12 {
+-  label = "Kern";
+-  reg = <0x0002 0x0030>;
+-  };
+-  partition@32 {
+-  label = "Ramdisk";
+-  reg = <0x0032 0x0060>;
+-  };
+-  partition@92 {
+-  label = "Application";
+-  reg = <0x0092 0x0060>;
+-  };
+-  partition@f2 {
+-  label = "VCTL";
+-  reg = <0x00f2 0x0002>;
+-  read-only;
+-  };
+-  partition@f4 {
+-  label = "CurConf";
+-  reg = <0x00f4 0x000a>;
+-  read-only;
+-  };
+-  partition@fe {
+-

[OpenWrt-Devel] [PATCH] gemini: Fix up some confused pin config on SL93512r

2019-07-17 Thread Linus Walleij
Upstream patch fixing the errors in the device tree.

Signed-off-by: Linus Walleij 
---
 ...-gemini-Fix-up-confused-pin-settings.patch | 54 +++
 1 file changed, 54 insertions(+)
 create mode 100644 
target/linux/gemini/patches-4.19/0024-ARM-dts-gemini-Fix-up-confused-pin-settings.patch

diff --git 
a/target/linux/gemini/patches-4.19/0024-ARM-dts-gemini-Fix-up-confused-pin-settings.patch
 
b/target/linux/gemini/patches-4.19/0024-ARM-dts-gemini-Fix-up-confused-pin-settings.patch
new file mode 100644
index ..9ae2a79cbf50
--- /dev/null
+++ 
b/target/linux/gemini/patches-4.19/0024-ARM-dts-gemini-Fix-up-confused-pin-settings.patch
@@ -0,0 +1,54 @@
+From 384ec5ed82845c2c81968743dde4a758f572c11b Mon Sep 17 00:00:00 2001
+From: Linus Walleij 
+Date: Sat, 13 Jul 2019 11:52:29 +0200
+Subject: [PATCH] ARM: dts: gemini: Fix up confused pin settings
+
+The SL93512r board has its pin muxing set up for the wrong
+ASIC: SL3516 instead of SL3512 that it is using. Fix it
+up and reference the right GPIO for the WPS button.
+
+Signed-off-by: Linus Walleij 
+---
+ arch/arm/boot/dts/gemini-sl93512r.dts | 19 +++
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+--- a/arch/arm/boot/dts/gemini-sl93512r.dts
 b/arch/arm/boot/dts/gemini-sl93512r.dts
+@@ -36,8 +36,8 @@
+   wakeup-source;
+   linux,code = ;
+   label = "WPS";
+-  /* Conflict with NAND flash */
+-  gpios = < 17 GPIO_ACTIVE_LOW>;
++  /* Conflicts with TVC and extended flash */
++  gpios = < 0 GPIO_ACTIVE_LOW>;
+   };
+ 
+   button-setup {
+@@ -153,17 +153,20 @@
+   syscon: syscon@4000 {
+   pinctrl {
+   /*
+-   * gpio0egrp cover line 16 used by HD LED
+-   * gpio0fgrp cover line 17, 18 used by wireless 
LED and reset button
+-   * gpio0hgrp cover line 21, 22 used by MDIO for 
Marvell PHY
+-   * gpio0kgrp cover line 31 used by USB LED
++   * gpio0agrp cover line 0, used by WPS button
++   * gpio0fgrp cover line 16 used by HD LED
++   * gpio0ggrp cover line 17, 18 used by wireless 
LAN LED and
++   * reset button OR USB ID select on 17 and USB 
VBUS select
++   * on 18. (Confusing.)
++   * gpio0igrp cover line 21, 22 used by MDIO for 
Marvell PHY
+*/
+   gpio0_default_pins: pinctrl-gpio0 {
+   mux {
+   function = "gpio0";
+-  groups = "gpio0egrp",
++  groups = "gpio0agrp",
+   "gpio0fgrp",
+-  "gpio0hgrp";
++  "gpio0ggrp",
++  "gpio0igrp";
+   };
+   };
+   /*
-- 
2.21.0


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


[OpenWrt-Devel] [PATCH] ath79: ar9330: add missing watchdog node

2019-07-17 Thread Petr Štetiar
It was reported in FS#2385, that Carambola2 doesn't currently have
working watchdog so fix it by adding watchdog node.

Ref: FS#2385
Signed-off-by: Petr Štetiar 
---
 target/linux/ath79/dts/ar9330.dtsi | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/target/linux/ath79/dts/ar9330.dtsi 
b/target/linux/ath79/dts/ar9330.dtsi
index 603b16581ce8..64c135405b97 100644
--- a/target/linux/ath79/dts/ar9330.dtsi
+++ b/target/linux/ath79/dts/ar9330.dtsi
@@ -86,6 +86,16 @@
#clock-cells = <1>;
};
 
+   wdt: wdt@18060008 {
+   compatible = "qca,ar7130-wdt";
+   reg = <0x18060008 0x8>;
+
+   interrupts = <4>;
+
+   clocks = < ATH79_CLK_AHB>;
+   clock-names = "wdt";
+   };
+
rst: reset-controller@1806001c {
compatible = "qca,ar7100-reset";
reg = <0x1806001c 0x4>;
-- 
2.17.1


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


[OpenWrt-Devel] [PATCH 1/2] treewide: sysupgrade: get rid of platform_nand_pre_upgrade()

2019-07-17 Thread Rafał Miłecki
From: Rafał Miłecki 

1) nand_do_upgrade() is always called by a target code
2) nand_do_upgrade() starts with calling platform_nand_pre_upgrade()

It means there is no need for the platform_nand_pre_upgrade() callback
at all. All code that was present there could bo moved & simplly called
by a target right before the nand_do_upgrade().

Signed-off-by: Rafał Miłecki 
---
 .../ar71xx/base-files/lib/upgrade/platform.sh | 73 ++-
 .../base-files/lib/upgrade/platform.sh| 34 +++--
 .../base-files/lib/upgrade/platform.sh| 14 +---
 .../ipq806x/base-files/lib/upgrade/zyxel.sh   |  2 +
 .../base-files/lib/upgrade/platform.sh|  5 +-
 .../ramips/base-files/lib/upgrade/platform.sh | 17 +
 .../ramips/base-files/lib/upgrade/ubnt.sh |  2 +
 .../rb532/base-files/lib/upgrade/platform.sh  |  5 +-
 8 files changed, 64 insertions(+), 88 deletions(-)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 5de7af667f..6898c0e0c2 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -746,36 +746,35 @@ platform_check_image() {
return 1
 }
 
-platform_nand_pre_upgrade() {
-   local board=$(board_name)
+platform_do_upgrade_mikrotik_rb() {
+   CI_KERNPART=none
+   local fw_mtd=$(find_mtd_part kernel)
+   fw_mtd="${fw_mtd/block/}"
+   [ -n "$fw_mtd" ] || return
+   mtd erase kernel
+   tar xf "$1" sysupgrade-routerboard/kernel -O | nandwrite -o "$fw_mtd" -
+
+   nand_do_upgrade "$1"
+}
 
-   case "$board" in
-   rb*)
-   CI_KERNPART=none
-   local fw_mtd=$(find_mtd_part kernel)
-   fw_mtd="${fw_mtd/block/}"
-   [ -n "$fw_mtd" ] || return
-   mtd erase kernel
-   tar xf "$1" sysupgrade-routerboard/kernel -O | nandwrite -o 
"$fw_mtd" -
+platform_do_upgrade_nokia() {
+   case "$(fw_printenv -n dualPartition)" in
+   imgA)
+   fw_setenv dualPartition imgB
+   fw_setenv ActImg NokiaImageB
;;
-   wi2a-ac200i)
-   case "$(fw_printenv -n dualPartition)" in
-   imgA)
-   fw_setenv dualPartition imgB
-   fw_setenv ActImg NokiaImageB
-   ;;
-   imgB)
-   fw_setenv dualPartition imgA
-   fw_setenv ActImg NokiaImageA
-   ;;
-   esac
-   ubiblock -r /dev/ubiblock0_0 2>/dev/null >/dev/null
-   rm -f /dev/ubiblock0_0
-   ubidetach -d 0 2>/dev/null >/dev/null
-   CI_UBIPART=ubi_alt
-   CI_KERNPART=kernel_alt
+   imgB)
+   fw_setenv dualPartition imgA
+   fw_setenv ActImg NokiaImageA
;;
esac
+   ubiblock -r /dev/ubiblock0_0 2>/dev/null >/dev/null
+   rm -f /dev/ubiblock0_0
+   ubidetach -d 0 2>/dev/null >/dev/null
+   CI_UBIPART=ubi_alt
+   CI_KERNPART=kernel_alt
+
+   nand_do_upgrade "$1"
 }
 
 platform_do_upgrade() {
@@ -859,6 +858,14 @@ platform_do_upgrade() {
nbg6716|\
r6100|\
rambutan|\
+   wndr3700v4|\
+   wndr4300)
+   nand_do_upgrade "$1"
+   ;;
+   mr18|\
+   z1)
+   merakinand_do_upgrade "$1"
+   ;;
rb-411|\
rb-411u|\
rb-433|\
@@ -890,21 +897,17 @@ platform_do_upgrade() {
rb-2011uias-2hnd|\
rb-2011uias-2hnd-r2|\
rb-sxt2n|\
-   rb-sxt5n|\
-   wi2a-ac200i|\
-   wndr3700v4|\
-   wndr4300)
-   nand_do_upgrade "$1"
-   ;;
-   mr18|\
-   z1)
-   merakinand_do_upgrade "$1"
+   rb-sxt5n)
+   platform_do_upgrade_mikrotik_rb "$1"
;;
uap-pro|\
unifi-outdoor-plus)
MTD_CONFIG_ARGS="-s 0x18"
default_do_upgrade "$1"
;;
+   wi2a-ac200i)
+   platform_do_upgrade_nokia "$1"
+   ;;
wp543|\
wpe72)
platform_do_upgrade_compex "$1"
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index a5e39c280c..dac773d2fe 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -47,12 +47,22 @@ zyxel_do_upgrade() {
 platform_do_upgrade() {
case "$(board_name)" in
8dev,jalapeno |\
-   alfa-network,ap120c-ac |\
avm,fritzbox-7530 |\
avm,fritzrepeater-3000 |\
qxwlan,e2600ac-c2)
nand_do_upgrade "$1"
;;
+   alfa-network,ap120c-ac)
+  

[OpenWrt-Devel] [PATCH 2/2] base-files: drop support for the platform_nand_pre_upgrade()

2019-07-17 Thread Rafał Miłecki
From: Rafał Miłecki 

No target uses it anymore. All code from that callback was moved into
the platform_do_upgrade().

Signed-off-by: Rafał Miłecki 
---
 package/base-files/Makefile  | 2 +-
 package/base-files/files/lib/upgrade/nand.sh | 4 
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 7c63d3ef44..49254a3680 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
 include $(INCLUDE_DIR)/feeds.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=204
+PKG_RELEASE:=205
 PKG_FLAGS:=nonshared
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
diff --git a/package/base-files/files/lib/upgrade/nand.sh 
b/package/base-files/files/lib/upgrade/nand.sh
index 9f258a82c5..fbc2b5c19a 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -282,10 +282,6 @@ nand_upgrade_tar() {
 nand_do_upgrade() {
local file_type=$(identify $1)
 
-   if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then
-   platform_nand_pre_upgrade "$1"
-   fi
-
[ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs"
 
case "$file_type" in
-- 
2.21.0


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


Re: [OpenWrt-Devel] [PATCH] ar71xx: enable QCA955x SGMII fixup on Mikrotik wAP AC

2019-07-17 Thread Petr Štetiar
Etienne Champetier  [2019-07-16 21:17:43]:

Hi,

> Saw that you applied it to master, I just tested the patch on 19.07, works 
> fine
> Do you want me to send the patch again, or can you just cherry-pick it ?
> (git cherry-pick 2a7519e29d6cbbe1eb73623ef35add0ef596fb5f)

 git cherry-pick -x 2a7519e29d6cbbe1eb73623ef35add0ef596fb5f

as this is preferred.

-- ynezz

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


[OpenWrt-Devel] [PATCH] layerscape: sysupgrade: get rid of platform_pre_upgrade()

2019-07-17 Thread Rafał Miłecki
From: Rafał Miłecki 

1) RAMFS_COPY_BIN and RAMFS_COPY_DATA can be defined at top of the file
   like it's done for all other targets.
2) fw_printenv.lock can be created one step later in the
   platform_do_upgrade(). It seems to be working well on many other
   targets.

Signed-off-by: Rafał Miłecki 
---
 .../base-files/lib/upgrade/platform.sh  | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh 
b/target/linux/layerscape/base-files/lib/upgrade/platform.sh
index 1c924997e6..8236a12bea 100644
--- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh
+++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh
@@ -1,8 +1,11 @@
-
 #!/bin/sh
 #
 # Copyright 2015-2019 Traverse Technologies
 #
+
+RAMFS_COPY_BIN="/usr/sbin/fw_printenv /usr/sbin/fw_setenv /usr/sbin/ubinfo 
/bin/echo"
+RAMFS_COPY_DATA="/etc/fw_env.config /var/lock/fw_printenv.lock"
+
 platform_do_upgrade_traverse_nandubi() {
bootsys=$(fw_printenv bootsys | awk -F= '{{print $2}}')
newbootsys=2
@@ -39,6 +42,10 @@ platform_check_image() {
 platform_do_upgrade() {
local board=$(board_name)
 
+   # Force the creation of fw_printenv.lock
+   mkdir -p /var/lock
+   touch /var/lock/fw_printenv.lock
+
case "$board" in
traverse,ls1043v | \
traverse,ls1043s)
@@ -49,11 +56,3 @@ platform_do_upgrade() {
;;
esac
 }
-platform_pre_upgrade() {
-   # Force the creation of fw_printenv.lock
-   mkdir -p /var/lock
-   touch /var/lock/fw_printenv.lock
-
-   export RAMFS_COPY_BIN="/usr/sbin/fw_printenv /usr/sbin/fw_setenv 
/usr/sbin/ubinfo /bin/echo ${RAMFS_COPY_BIN}"
-   export RAMFS_COPY_DATA="/etc/fw_env.config /var/lock/fw_printenv.lock 
${RAMFS_COPY_DATA}"
-}
-- 
2.21.0


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