Re: [PATCHv2 3/4] scripts/clean-package.sh: remove useless cat

2020-07-11 Thread Alberto Bursi



On 12/07/20 01:38, Paul Spooren wrote:

Hi,

On 11.07.20 08:45, Rosen Penev wrote:

Found with shellcheck.

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

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index 4b536c8a48..03e49df3e7 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -8,13 +8,13 @@ IFS=$'\n'
  echo "File/directory not found"
  exit 1
  }
-cat "$1" | (
+(
  cd "$2" || exit 1
  while read -r entry; do
  [ -n "$entry" ] || break
  [ ! -d "$entry" ] || [ -L "$entry" ] && rm -f "$entry"
  done
-)
+) < "$1"
  sort -r "$1" | (
  cd "$2" || exit 1
  while read -r entry; do
I'd be curious whats wrong here, do you mind adding the SC numbers to 
future improvements?




It's said in the commit title, "remove useless cat"
which is a kind of well-known topic for shell experts.

"The purpose of cat is to concatenate (or "catenate") files. If it's 
only one file, concatenating it with nothing at all is a waste of time, 
and costs you a process."


From "Useless Use of Cat Award"
http://porkmail.org/era/unix/award.html

-Alberto

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


RE: [OpenWrt-Devel] [PATCH] ramips: add support for netgear r6020

2020-07-11 Thread mail
> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Evan Jobling
> Sent: Freitag, 5. Juni 2020 08:28
> To: openwrt-devel@lists.openwrt.org
> Cc: yn...@true.cz; m...@adrianschmutzler.de
> Subject: [OpenWrt-Devel] [PATCH] ramips: add support for netgear r6020

Hi,

in the meantime, this device has been merged (based on somebody else's PR):

https://github.com/openwrt/openwrt/commit/edbc8e5512dccc2e0b6925258e34b3f21d66679c

Best

Adrian

> 
> Hi,
> 
> It seems that the older patches got put into patchwork, and assigned to Petr
> Štetiar?
> Apologies for the mess I created.
> I tried to put those patches to superseded?
> 
> Responses to feedback on my original patches, as well as the patch at the
> end.
> Additional feedback and requests for changes/tests welcome.
> 
> >Typically, frequency can be raised with substantial gains in read speed.
> 
> I can increase if required.
> Not sure how fast is reasonable/required?
> 
> At this stage I would rather not set up an oscilloscope to experiment with
> how fast I can push it?
> 
> Datasheet of flash ic is 80MHz or so?
> Not sure how fast the mt7628an can go?
> 
> >> mtd-mac-address = <&nvram 0x100b0>;
> >
> >Are these necessary, or will the address be correct if you just drop them?
> 
> It appears I need this line for the ethernet, otherwise random mac address is
> created.
> 
> >
> >Despite, can you please check whether there are addresses in factory 0x28,
> 0x2e, 0xe000, 0xe006, 0x4, 0x8004?
> >
> >Which addresses are assigned on OEM firmware (lan, wan, 2g, 5g)?
> 
> You would like me to flash the OEM firmware, look at MAC addresses?
> All the devices I have on hand are flashed to openwrt.
> I can flash latest factory firmware?
> 
> I have it set up to be same mac address on wired and wlan.
> It is the same one that is written on the device sticker.
> The bootloader uses that mac address on the lan hardware.
> 
> >> ucidef_set_led_wlan "wlan2g" "WiFi 2.4GHz"
> "$boardname:green:wlan2g" "phy0tpt"
> >
> >Please use a DTS trigger instead (for both 2g and 5g).
> 
> I don't understand.  R6120 lines look similar?
> Do I need to remove the 2g/5g lines?
> I tried to search for some documentation. I found [1], [2] ?
> 
> >The old PR has been closed quite some time ago due to inactivity. If there is
> new progress now, it would be fine to just open a new PR by the "new
> author".
> 
> Is patch via email acceptable?
> Alternatively,
> I would need to create github account, and do pull request there?
> 
> I'm assuming keeping the same thread at this stage is the best way forward?
> I understand the subject should have been something like
> "Subject: [PATCH] ramips: add support for netgear r6020"
> 
> Cheers,
> Evan.
> 
> [1] https://openwrt.org/docs/guide-user/base-system/led_configuration
> [2]
> https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/leds
> -gpio.txt
> 
> From 8a2cf974be374612e8ea32d2182226d542ebbcdf Mon Sep 17 00:00:00
> 2001
> From: Evan Jobling 
> Date: Sat, 30 May 2020 20:39:47 +1000
> Subject: [PATCH] ramips: add support for netgear r6020
> 
> Signed-off-by: Evan Jobling 
> ---
>  .../ramips/dts/mt7628an_netgear_r6020.dts | 144 ++
>  target/linux/ramips/image/mt76x8.mk   |  24 +++
>  .../mt76x8/base-files/etc/board.d/01_leds |   5 +
>  .../mt76x8/base-files/etc/board.d/02_network  |   1 +
>  4 files changed, 174 insertions(+)
>  create mode 100644 target/linux/ramips/dts/mt7628an_netgear_r6020.dts
> 
> diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6020.dts
> b/target/linux/ramips/dts/mt7628an_netgear_r6020.dts
> new file mode 100644
> index 00..717fdde3fa
> --- /dev/null
> +++ b/target/linux/ramips/dts/mt7628an_netgear_r6020.dts
> @@ -0,0 +1,144 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/;
> +
> +#include "mt7628an.dtsi"
> +
> +#include 
> +#include 
> +
> +/ {
> +   compatible = "netgear,r6020", "mediatek,mt7628an-soc";
> +   model = "Netgear  R6020 (AC750)";
> +
> +   aliases {
> +   led-boot = &led_power;
> +   led-failsafe = &led_power;
> +   led-running = &led_power;
> +   led-upgrade = &led_power;
> +   };
> +
> +   keys {
> +   compatible = "gpio-keys";
> +
> +   reset {
> +   label = "reset";
> +   gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
> +   linux,code = ;
> +   };
> +   };
> +
> +   leds {
> +   compatible = "gpio-leds";
> +
> +   lan {
> +   label = "r6020:green:lan";
> +   gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
> +   };
> +
> +   led_power: power {
> +   label = "r6020:green:power";
> +   gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
> +   };
> +
> +   wlan {
> +   label = "r6

Re: [PATCHv2 3/4] scripts/clean-package.sh: remove useless cat

2020-07-11 Thread Paul Spooren

Hi,

On 11.07.20 08:45, Rosen Penev wrote:

Found with shellcheck.

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

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index 4b536c8a48..03e49df3e7 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -8,13 +8,13 @@ IFS=$'\n'
echo "File/directory not found"
exit 1
  }
-cat "$1" | (
+(
cd "$2" || exit 1
while read -r entry; do
[ -n "$entry" ] || break
[ ! -d "$entry" ] || [ -L "$entry" ] && rm -f "$entry"
done
-)
+) < "$1"
  sort -r "$1" | (
cd "$2" || exit 1
while read -r entry; do
I'd be curious whats wrong here, do you mind adding the SC numbers to 
future improvements?


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


RE: [OpenWrt-Devel] [PATCH] .gitignore: ignore all .config* files

2020-07-11 Thread mail
Hi,

since nobody else took care so far:

In my opinion, this does not solve a problem with OpenWrt, but with your 
particular use case.

However, we cannot cover each individual use case in our default settings.
Despite, it would be relatively easy to either keep that change locally or just 
not add the relevant files when doing a commit.

(Personally, I have 10+ files in my OpenWrt root I just never touch when 
working with git.)

So, I'm marking this a Rejected.

I hope you don't feel repelled and continue to contribute to the project.

Best

Adrian

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Catrinel Catrinescu
> Sent: Dienstag, 10. März 2020 13:33
> To: Adrian Schmutzler ; openwrt-
> de...@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] .gitignore: ignore all .config* files
> 
> Hi Adrian
> 
> After successful testing, I always save the .config files, attaching the 
> revision
> number, like .config_r12345.
> 
> And it is a cosmetic replacement too.
> 
> 
> Thanks
> Catrinel
> 
> 
> -Original Message-
> From: Adrian Schmutzler 
> Sent: Tuesday, 10 March 2020 13:26
> To: Catrinel Catrinescu ; openwrt-devel@lists.openwrt.org
> Subject: RE: [OpenWrt-Devel] [PATCH] .gitignore: ignore all .config* files
> 
> > -Original Message-
> > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> > On Behalf Of c...@80211.de
> > Sent: Dienstag, 10. März 2020 13:02
> > To: openwrt-devel@lists.openwrt.org
> > Cc: Catrinel Catrinescu 
> > Subject: [OpenWrt-Devel] [PATCH] .gitignore: ignore all .config* files
> 
> Why is this necessary (-> commit message)?
> 
> Or is it just a cosmetic replacement of two lines by one? (In that case, I'd
> prefer the specific lines).
> 
> Best
> 
> Adrian
> 
> >
> > From: Catrinel Catrinescu 
> >
> > Signed-off-by: Catrinel Catrinescu 
> > ---
> >  .gitignore | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/.gitignore b/.gitignore
> > index 6549af83be..edffba9c05 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -3,8 +3,7 @@
> >  .*.swp
> >  /env
> >  /dl
> > -/.config
> > -/.config.old
> > +/.config*
> >  /bin
> >  /build_dir
> >  /staging_dir
> > --
> > 2.17.1
> >
> >
> > ___
> > 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


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


[PATCH 1/1] RFC: Add STUN enable/disable, STUN host&port menu options to luci-app-upnp

2020-07-11 Thread Aaron Tiensivu
Pretty straightforward. The /etc/init.d/miniupnpd already picks up
these values if you populate them with UCI or within the /etc/config
text file.
This just exposes them to the web interface.

I've read submission guidelines and if I have done something in error,
let me know.


--- a/www/luci-static/resources/view/upnp/upnp.js 2020-07-11
16:52:19.61773 -0400
+++ b/www/luci-static/resources/view/upnp/upnp.js 2020-07-11
16:53:46.096604388 -0400
@@ -167,6 +167,15 @@
  o = s.taboption('advanced', form.Value, 'upnp_lease_file', _('UPnP
lease file'))
  o.placeholder = '/var/run/miniupnpd.leases'

+ s.taboption('advanced', form.Flag, 'use_stun', _('Use STUN')).default = '0'
+
+ o = s.taboption('advanced', form.Value, 'stun_host', _('STUN host'))
+ o.placeholder = 'stun.stunprotocol.org'
+
+ o = s.taboption('advanced', form.Value, 'stun_port', _('STUN port'))
+ o.datatype= 'uinteger'
+ o.placeholder = 3478
+
  s = m.section(form.GridSection, 'perm_rule', _('MiniUPnP ACLs'),
  _('ACLs specify which external ports may be redirected to which
internal addresses and ports'))


patch-luci-app-upnp-add-STUN-git-20.172.67167-b397549.patch
Description: Binary data
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCHv2 1/4] scripts/clean-package.sh: exit in case cd fails

2020-07-11 Thread Rosen Penev
Found with shellcheck.

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

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index 035725625d..cbd12d8799 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -9,14 +9,14 @@ IFS=$'\n'
exit 1
 }
 cat "$1" | (
-   cd "$2"
+   cd "$2" || exit 1
while read entry; do
[ -n "$entry" ] || break
[ ! -d "$entry" ] || [ -L "$entry" ] && rm -f "$entry"
done
 )
 sort -r "$1" | (
-   cd "$2"
+   cd "$2" || exit 1
while read entry; do
[ -n "$entry" ] || break
[ -d "$entry" ] && rmdir "$entry" > /dev/null 2>&1
-- 
2.26.2


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


[PATCHv2 3/4] scripts/clean-package.sh: remove useless cat

2020-07-11 Thread Rosen Penev
Found with shellcheck.

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

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index 4b536c8a48..03e49df3e7 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -8,13 +8,13 @@ IFS=$'\n'
echo "File/directory not found"
exit 1
 }
-cat "$1" | (
+(
cd "$2" || exit 1
while read -r entry; do
[ -n "$entry" ] || break
[ ! -d "$entry" ] || [ -L "$entry" ] && rm -f "$entry"
done
-)
+) < "$1"
 sort -r "$1" | (
cd "$2" || exit 1
while read -r entry; do
-- 
2.26.2


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


openwrt-devel@lists.openwrt.org

2020-07-11 Thread Rosen Penev
-a is not well defined.

Signed-off-by: Rosen Penev 
---
 v2: rebased
 scripts/clean-package.sh | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index 03e49df3e7..ccbb486eea 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -1,13 +1,14 @@
 #!/usr/bin/env bash
 IFS=$'\n'
-[ -n "$1" -a -n "$2" ] || {
+
+if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0  "
exit 1
-}
-[ -f "$1" -a -d "$2" ] || {
+fi
+if [ ! -f "$1" ] || [ ! -d "$2" ]; then
echo "File/directory not found"
exit 1
-}
+fi
 (
cd "$2" || exit 1
while read -r entry; do
-- 
2.26.2


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


[PATCHv2 2/4] scripts/clean-package.sh: use read -r

2020-07-11 Thread Rosen Penev
read will mangle backslashes.

Found with shellcheck.

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

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index cbd12d8799..4b536c8a48 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -10,14 +10,14 @@ IFS=$'\n'
 }
 cat "$1" | (
cd "$2" || exit 1
-   while read entry; do
+   while read -r entry; do
[ -n "$entry" ] || break
[ ! -d "$entry" ] || [ -L "$entry" ] && rm -f "$entry"
done
 )
 sort -r "$1" | (
cd "$2" || exit 1
-   while read entry; do
+   while read -r entry; do
[ -n "$entry" ] || break
[ -d "$entry" ] && rmdir "$entry" > /dev/null 2>&1
done
-- 
2.26.2


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


[PATCH 2/2] libcxx: update to 10.0.0

2020-07-11 Thread Rosen Penev
Switched to upstream tarballs.

Switched to libcxxabi as using libsupc++ is quite wonky.

Fixed description.

Removed patches. The fixes are cosmetic.

Added ssp patch. This one is needed for i386 and powerpc under musl.

Compile tested every C++ package in the tree with the exception of
several boost packages. There's something broken with boost.

Ran tested with gerbera.

Signed-off-by: Rosen Penev 
---
 package/libs/libcxx/Makefile| 18 +--
 package/libs/libcxx/files/g++-libcxx|  4 +--
 package/libs/libcxx/patches/010-cxx17.patch | 14 -
 package/libs/libcxx/patches/010-ssp.patch   | 13 
 package/libs/libcxx/patches/020-fixes.patch | 35 -
 5 files changed, 24 insertions(+), 60 deletions(-)
 delete mode 100644 package/libs/libcxx/patches/010-cxx17.patch
 create mode 100644 package/libs/libcxx/patches/010-ssp.patch
 delete mode 100644 package/libs/libcxx/patches/020-fixes.patch

diff --git a/package/libs/libcxx/Makefile b/package/libs/libcxx/Makefile
index 8343cbb427..3809bea651 100644
--- a/package/libs/libcxx/Makefile
+++ b/package/libs/libcxx/Makefile
@@ -7,19 +7,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libcxx
-PKG_VERSION:=9.0.1
-PKG_RELEASE:=4
+PKG_VERSION:=10.0.0
+PKG_RELEASE:=1
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://git.llvm.org/git/libcxx
-PKG_SOURCE_VERSION:=2076f539f410805ef88692b9c0ce0a0b882a7680
-PKG_MIRROR_HASH:=d527880a18dec9109575c76717cf5288fb91c11381b9d261cae2e5bebcbdab2e
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz
+PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION)
+PKG_HASH:=270f8a3f176f1981b0f6ab8aa556720988872ec2b48ed3b605d0ced8d09156c7
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).src
 
 PKG_MAINTAINER:=Rosen Penev 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
 
 PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=libcxxabi
 CMAKE_BINARY_SUBDIR:=build
 
 include $(INCLUDE_DIR)/package.mk
@@ -34,12 +35,11 @@ define Package/libcxx
 endef
 
 define Package/libcxx/description
-  LLVM C++ library targeting C++11 and above
+  libc++ is an implementation of the C++ standard library, targeting C++11, 
C++14 and above.
 endef
 
 CMAKE_OPTIONS += \
-   -DLIBCXX_CXX_ABI="libsupc++" \
-   
-DLIBCXX_CXX_ABI_INCLUDE_PATHS="$(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/include/c++/$(CONFIG_GCC_VERSION);$(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/include/c++/$(CONFIG_GCC_VERSION)/$(REAL_GNU_TARGET_NAME)"
 \
+   -DLIBCXX_CXX_ABI="libcxxabi" \
-DLIBCXX_ENABLE_ASSERTIONS=OFF \
-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
diff --git a/package/libs/libcxx/files/g++-libcxx 
b/package/libs/libcxx/files/g++-libcxx
index 81ca46eb0e..88b3e7da01 100755
--- a/package/libs/libcxx/files/g++-libcxx
+++ b/package/libs/libcxx/files/g++-libcxx
@@ -13,7 +13,7 @@ do
-static) [ "$WRAPPER_LIBS" != "-lc -lgcc_s -lssp_nonshared -lgcc_eh" ] 
&& WRAPPER_LIBS="-lc -lgcc_s -lssp_nonshared -lgcc_eh" ;;
esac
 done
-[ "$WRAPPER_INCLIB" = "Y" ] && WRAPPER_OPTIONS="-nodefaultlibs $WRAPPER_LIBDIR 
-lc++ -lsupc++ $WRAPPER_LIBS"
+[ "$WRAPPER_INCLIB" = "Y" ] && WRAPPER_OPTIONS="-nodefaultlibs $WRAPPER_LIBDIR 
-lc++ -lc++abi $WRAPPER_LIBS"
 
-exec CXX -fno-builtin -nostdinc++ -DGCC_HASCLASSVISIBILITY 
"$WRAPPER_INCLUDEDIR" "$@" $WRAPPER_OPTIONS
+exec CXX -nostdinc++ -DGCC_HASCLASSVISIBILITY "$WRAPPER_INCLUDEDIR" "$@" 
$WRAPPER_OPTIONS
 
diff --git a/package/libs/libcxx/patches/010-cxx17.patch 
b/package/libs/libcxx/patches/010-cxx17.patch
deleted file mode 100644
index dceec9d4f3..00
--- a/package/libs/libcxx/patches/010-cxx17.patch
+++ /dev/null
@@ -1,14 +0,0 @@
 a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -524,9 +524,9 @@ remove_flags(-Wno-pedantic -pedantic-err
- if (LIBCXX_HAS_MUSL_LIBC OR LIBCXX_TARGETING_CLANG_CL)
-   # musl's pthread implementations uses volatile types in their structs which 
is
-   # not a constexpr in C++11 but is in C++14, so we use C++14 with musl.
--  set(LIBCXX_STANDARD_VER c++14 CACHE STRING "internal option to change build 
dialect")
-+  set(LIBCXX_STANDARD_VER c++2a CACHE STRING "internal option to change build 
dialect")
- else()
--  set(LIBCXX_STANDARD_VER c++11 CACHE STRING "internal option to change build 
dialect")
-+  set(LIBCXX_STANDARD_VER c++2a CACHE STRING "internal option to change build 
dialect")
- endif()
- add_compile_flags_if_supported(-std=${LIBCXX_STANDARD_VER})
- add_compile_flags_if_supported("/std:${LIBCXX_STANDARD_VER}")
diff --git a/package/libs/libcxx/patches/010-ssp.patch 
b/package/libs/libcxx/patches/010-ssp.patch
new file mode 100644
index 00..c9dc90c7f2
--- /dev/null
+++ b/package/libs/libcxx/patches/010-ssp.patch
@@ -0,0 +1,13 @@
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -760,6 +760,10 @@ function(cxx_link_system_libraries target)
+ target_link_libraries(${target} PRIVATE atomic)
+   endif()
+ 
++  if (LIBCXX_HAS_MUSL_LIBC)
++target

[PATCH 1/2] libcxxabi: add

2020-07-11 Thread Rosen Penev
This will be used for libcxx.

libcxxabi is needed as libsupc++ is not good enough for libcxx. It uses
GCC specific stuff which causes failed compilation for some packages.
There are also runtime issues, most notably with cxxopts where the
program just crashes.

Reference: https://github.com/gerbera/gerbera/issues/795

Signed-off-by: Rosen Penev 
---
 v2: Added extra description.
 package/libs/libcxxabi/Makefile | 71 +
 1 file changed, 71 insertions(+)
 create mode 100644 package/libs/libcxxabi/Makefile

diff --git a/package/libs/libcxxabi/Makefile b/package/libs/libcxxabi/Makefile
new file mode 100644
index 00..90547561b2
--- /dev/null
+++ b/package/libs/libcxxabi/Makefile
@@ -0,0 +1,71 @@
+
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libcxxabi
+PKG_VERSION:=10.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz
+PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION)
+PKG_HASH:=e71bac75a88c9dde455ad3f2a2b449bf745eafd41d2d8432253b2964e0ca14e1
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).src
+
+PKG_MAINTAINER:=Rosen Penev 
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_BINARY_SUBDIR:=build
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libcxxabi
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=LLVM lib++abi
+  URL:=https://libcxxabi.llvm.org/
+  DEPENDS:=+libpthread
+  BUILDONLY:=1
+endef
+
+define Package/libcxxabi/description
+  libc++abi is a new implementation of low level support for a standard C++ 
library.
+endef
+
+CMAKE_OPTIONS += \
+   -DLIBCXXABI_ENABLE_EXCEPTIONS=ON \
+   -DLIBCXXABI_ENABLE_PEDANTIC=OFF \
+   -DLIBCXXABI_ENABLE_PIC=ON \
+   -DLIBCXXABI_ENABLE_WERROR=OFF \
+   -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \
+   -DLIBCXXABI_USE_COMPILER_RT=OFF \
+   -DLIBCXXABI_ENABLE_THREADS=ON \
+   -DLIBCXXABI_HAS_PTHREAD_API=ON \
+   -DLIBCXXABI_INCLUDE_TESTS=OFF \
+   -DLIBCXXABI_LIBDIR_SUFFIX="" \
+   -DLIBCXXABI_INSTALL_LIBRARY=ON \
+   -DLIBCXXABI_ENABLE_SHARED=OFF \
+   -DLIBCXXABI_LIBCXX_SRC_DIR=$(BUILD_DIR)/libcxx-$(PKG_VERSION).src \
+   
-DLIBCXXABI_LIBCXX_INCLUDES=$(BUILD_DIR)/libcxx-$(PKG_VERSION).src/include
+
+TARGET_CXXFLAGS += -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+define Build/Prepare
+   $(MAKE) -C $(TOPDIR)/package/libs/libcxx prepare
+   $(call Build/Prepare/Default)
+endef
+
+define Build/InstallDev
+   $(call Build/InstallDev/cmake,$(1))
+   $(INSTALL_DIR) $(1)/usr/include/
+   $(INSTALL_DATA) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/
+endef
+
+$(eval $(call BuildPackage,libcxxabi))
-- 
2.26.2


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


Re: [OpenWrt-Devel] [PATCH 1/2] libcxxabi: add

2020-07-11 Thread Rosen Penev
On Sat, Jul 11, 2020 at 4:49 AM Petr Štetiar  wrote:
>
> Rosen Penev  [2020-06-06 11:52:22]:
>
> > This will be used for libcxx.
> >
> > Signed-off-by: Rosen Penev 
>
> Please add more verbose commit description, mainly answer to "Why this should
> be included?" question.
Done. Sent patches.
>
> -- ynezz

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


Re: AW: 'tr' character class support?

2020-07-11 Thread Jordan Geoghegan



On 2020-07-11 06:08, Magnus Kroken wrote:

Hi

On 11.07.2020 09:18, Thomas Endt wrote:

--- Config-defaults.in.orig Fri Jul 10 21:03:57 2020
+++ Config-defaults.in  Fri Jul 10 21:03:22 2020
@@ -837,7 +837,7 @@
  default y
   config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
  bool
-   default n
+   default y
   config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
  bool
  default n


What impact on busybox package size does this have?



I did a comparison, which gave about a 500 byte increase to the 
compressed package:


r13779+11-9362ea1661

Default config:
-rw-r--r-- 1 openwrt openwrt 208372 Jul 11 13:54 
bin/packages/mips_24kc/base/busybox_1.31.1-1_mips_24kc.ipk


With CONFIG_BUSYBOX_CONFIG_FEATURE_TR_CLASSES=y
-rw-r--r-- 1 openwrt openwrt 208868 Jul 11 14:06 
bin/packages/mips_24kc/base/busybox_1.31.1-1_mips_24kc.ipk


With CONFIG_BUSYBOX_CONFIG_FEATURE_TR_CLASSES=y and 
CONFIG_BUSYBOX_CONFIG_FEATURE_TR_EQUIV=y
-rw-r--r-- 1 openwrt openwrt 208895 Jul 11 14:08 
bin/packages/mips_24kc/base/busybox_1.31.1-1_mips_24kc.ipk


For the record, a POSIX compliant tr requires both 
CONFIG_BUSYBOX_CONFIG_FEATURE_TR_CLASSES=y and 
CONFIG_BUSYBOX_CONFIG_FEATURE_TR_EQUIV=y.


I'd say that difference is acceptable, but for similar issues in the 
future there remains the question of how desirable POSIX compliance is 
in OpenWrt, and what sacrifices are reasonable to achieve it. Is there 
a decision, goalr or mindset on this? I'm not a 4/32 fanatic and 
accept that minimum requirements will increase over time, but I still 
value the flexibility of OpenWrt (such as the ability to run on 
relatively small devices). Making tr compliant when it's there anyway 
and has this small cost is good. OTOH, a proper POSIX system requires 
e.g. a working C compiler, which I think is an absurd minimum to set 
for OpenWrt given how useful and flexible it is in its current state.


Regards,
Magnus Kroken


Hi Magnus,

I agree about having to make certain sacrifices in order to remain 
usable on smaller devices, the only reason I brought it up was due to 
the dangerous way in which 'tr' was configured to ignore character 
classes and treat all characters literally, rather than at least 
printing an error. I'm glad to see you've decided to re-enable tr POSIX 
stuff. Thanks :)


I'm not sure if there's any interest in making use of tr+classes for 
base system scripts, but I'd be happy to go through and start cleaning 
stuff up if there is interest.


Attached please find a patch for 
"package/network/services/hostapd/files/hostapd.sh"



Regards,

Jordan Geoghegan





--- hostapd.sh.orig	Sat Jul 11 11:16:06 2020
+++ hostapd.sh	Sat Jul 11 11:17:25 2020
@@ -37,7 +37,7 @@
 }
 
 hostapd_append_wpa_key_mgmt() {
-	local auth_type_l="$(echo $auth_type | tr 'a-z' 'A-Z')"
+	local auth_type_l="$(echo $auth_type | tr '[:lower:]' '[:upper:]')"
 
 	case "$auth_type" in
 		psk|eap)
@@ -1048,7 +1048,7 @@
 	append network_data "phase2=\"$phase2proto$auth\"" "$N$T"
 ;;
 			esac
-			append network_data "eap=$(echo $eap_type | tr 'a-z' 'A-Z')" "$N$T"
+			append network_data "eap=$(echo $eap_type | tr '[:lower:]' '[:upper:]')" "$N$T"
 		;;
 	esac
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] elfutils: update to 0.180

2020-07-11 Thread Rosen Penev
Refreshed patches.

Signed-off-by: Rosen Penev 
---
 package/libs/elfutils/Makefile  | 4 ++--
 package/libs/elfutils/patches/100-musl-compat.patch | 2 +-
 package/libs/elfutils/patches/110-no-cdefs.patch| 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
index e6868c56f4..f2b25d2c36 100644
--- a/package/libs/elfutils/Makefile
+++ b/package/libs/elfutils/Makefile
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=elfutils
-PKG_VERSION:=0.179
+PKG_VERSION:=0.180
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
-PKG_HASH:=25a545566cbacaa37ae6222e58f1c48ea4570f53ba991886e2f5ce96e22a23a2
+PKG_HASH:=b827b6e35c59d188ba97d7cf148fa8dc6f5c68eb6c5981888dfdbb758c0b569d
 
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca 
 PKG_LICENSE:=GPL-3.0-or-later
diff --git a/package/libs/elfutils/patches/100-musl-compat.patch 
b/package/libs/elfutils/patches/100-musl-compat.patch
index 374e832d3f..508ff9e946 100644
--- a/package/libs/elfutils/patches/100-musl-compat.patch
+++ b/package/libs/elfutils/patches/100-musl-compat.patch
@@ -24,7 +24,7 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
  #include 
 --- a/libdw/libdw_alloc.c
 +++ b/libdw/libdw_alloc.c
-@@ -147,5 +147,5 @@ __attribute ((noreturn)) attribute_hidde
+@@ -152,5 +152,5 @@ __attribute ((noreturn)) attribute_hidde
  __libdw_oom (void)
  {
while (1)
diff --git a/package/libs/elfutils/patches/110-no-cdefs.patch 
b/package/libs/elfutils/patches/110-no-cdefs.patch
index a7216c141e..f95625a913 100644
--- a/package/libs/elfutils/patches/110-no-cdefs.patch
+++ b/package/libs/elfutils/patches/110-no-cdefs.patch
@@ -39,9 +39,9 @@ Signed-off-by: Rosen Penev 
  
  /* Standard ELF types.  */
  
-@@ -4007,6 +4007,8 @@ enum
- #define R_NDS32_TLS_TPOFF 102
- #define R_NDS32_TLS_DESC  119
+@@ -4103,6 +4103,8 @@ enum
+ #define R_ARC_TLS_LE_S9   0x4a
+ #define R_ARC_TLS_LE_32   0x4b
  
 -__END_DECLS
 +#ifdef __cplusplus
-- 
2.26.2


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


Re: [PATCHv2] libjson-c: fix pkgconfig file

2020-07-11 Thread Rosen Penev
On Sat, Jul 11, 2020 at 5:03 AM Petr Štetiar  wrote:
>
> Rosen Penev  [2020-07-04 18:09:32]:
>
> Hi,
>
> > Removed now pointless CFLAGS.
>
> ...
>
> > -TARGET_CFLAGS += $(FPIC) -Wno-implicit-fallthrough
> > -HOST_CFLAGS += -Wno-implicit-fallthrough
>
> Why is $(FPIC) pointless now?
It's already default. See:

https://github.com/json-c/json-c/blob/master/CMakeLists.txt#L118
>
> -- ynezz

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


[PATCH] libroxml: switch to CMake

2020-07-11 Thread Rosen Penev
Added patch to fix compilation with gcc10.

Fixed license information.

Fix ABI_VERSION.

Signed-off-by: Rosen Penev 
---
 package/libs/libroxml/Makefile| 26 +--
 package/libs/libroxml/patches/010-gcc10.patch | 11 
 2 files changed, 24 insertions(+), 13 deletions(-)
 create mode 100644 package/libs/libroxml/patches/010-gcc10.patch

diff --git a/package/libs/libroxml/Makefile b/package/libs/libroxml/Makefile
index f60312b1ed..0fb1e3e71f 100644
--- a/package/libs/libroxml/Makefile
+++ b/package/libs/libroxml/Makefile
@@ -9,36 +9,36 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libroxml
 PKG_VERSION:=3.0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.libroxml.net/pool/v3.x
 PKG_HASH:=ed6d68d1bceabf98e5e76907411e2e4d93b2dbd48479ab41dede851f59dad6a3
+
 PKG_MAINTAINER:=Felix Fietkau 
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=License.txt
 
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
-PKG_LICENSE:=LGPL-2.1+
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libroxml
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Minimum, easy-to-use, C implementation for xml file parsing
   URL:=http://www.libroxml.net/
-  ABI_VERSION:=3.0.2
+  ABI_VERSION:=2
 endef
 
-CONFIGURE_ARGS += \
-   --enable-shared \
-   --enable-static \
-   --disable-roxml
-
-define Build/InstallDev
-   $(INSTALL_DIR) $(1)
-   $(CP) $(PKG_INSTALL_DIR)/* $(1)/
-endef
+CMAKE_OPTIONS += \
+   -DBUILD_TESTING=OFF \
+   -DCONFIG_XML_FILE=OFF \
+   -DCONFIG_XML_EDIT=OFF \
+   -DCONFIG_XML_COMMIT=OFF \
+   -DCONFIG_XML_XPATH=OFF
 
 define Package/libroxml/install
$(INSTALL_DIR) $(1)/usr/lib
diff --git a/package/libs/libroxml/patches/010-gcc10.patch 
b/package/libs/libroxml/patches/010-gcc10.patch
new file mode 100644
index 00..3c4fee6533
--- /dev/null
+++ b/package/libs/libroxml/patches/010-gcc10.patch
@@ -0,0 +1,11 @@
+--- a/src/roxml_mem.h
 b/src/roxml_mem.h
+@@ -14,7 +14,7 @@
+ 
+ #include "roxml_internal.h"
+ 
+-memory_cell_t head_cell;
++extern memory_cell_t head_cell;
+ 
+ /** \brief alloc memory function
+  *
-- 
2.26.2


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


Re: [PATCH v2] mvebu: add support for MACCHIATObin Single Shot

2020-07-11 Thread Alexandra Alth
Yes you can. 

Will provide the flashing instruction for it

Thanks a lot
Alexandra 

Von meinem iPhone gesendet

> Am 11.07.2020 um 16:42 schrieb m...@adrianschmutzler.de:
> 
> 
>> 
>> From: Alexandra Alth [mailto:alexan...@alth.de] 
>> Sent: Samstag, 11. Juli 2020 15:31
>> To: Tomasz Maciej Nowak 
>> Cc: m...@adrianschmutzler.de; openwrt-devel@lists.openwrt.org
>> Subject: Re: [PATCH v2] mvebu: add support for MACCHIATObin Single Shot
>> 
>> I can confirm that the provided image from TMN is working on my Singleshot 
>> right out of the box.
> 
> So, can we add
> 
> Tested-by: Alexandra Alth 
> 
> to the patch?
> 
> Despite, this is essentially adding support for a "new" device, so I would be 
> happy if one of you could add specifications and (updated) flashing 
> instructions either here or as part of a v3.
> 
> Best
> 
> Adrian

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


RE: [PATCH v2] mvebu: add support for MACCHIATObin Single Shot

2020-07-11 Thread mail
> From: Alexandra Alth [mailto:alexan...@alth.de] 
> Sent: Samstag, 11. Juli 2020 15:31
> To: Tomasz Maciej Nowak 
> Cc: m...@adrianschmutzler.de; openwrt-devel@lists.openwrt.org
> Subject: Re: [PATCH v2] mvebu: add support for MACCHIATObin Single Shot
>
> I can confirm that the provided image from TMN is working on my Singleshot 
> right out of the box.

So, can we add

Tested-by: Alexandra Alth 

to the patch?

Despite, this is essentially adding support for a "new" device, so I would be 
happy if one of you could add specifications and (updated) flashing 
instructions either here or as part of a v3.

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


[RFC PATCH v2 0/1] Introduce mtd splitter for ELF kernel loader

2020-07-11 Thread Sander Vanheule
Currently, there appears to be no mtd splitter that works with a
firmware partition starting with an ELF kernel loader. Devices using a
loader must provide manual splits, possibly increasing the maintenance
effort for these devices.

This splitter may for example be used with the TP-Link CPE devices that
use a plain ELF loader or OKLI loader, but currently require a fixed
partition layout. Some examples are CPE510 and CPE610 devices.

Support is provided for 32-bit and 64-bit platforms, as well as
different rootfs types. This splitter has been tested on the TP-Link
EAP245v1 (32-bit platform with squashfs root).

Changes since v1:
  - Fix whitespace issues
  - Rename elf_header.class* to elf_header.elf*
  - Use stack for elf header instead of vmalloc
mtdsplit_tplink uses a much larger header on the stack, so using
vmalloc doesn't seem justified.

Sander Vanheule (1):
  kernel: mtdsplit: support ELF loader splitting

 .../files/drivers/mtd/mtdsplit/Kconfig|   5 +
 .../files/drivers/mtd/mtdsplit/Makefile   |   1 +
 .../files/drivers/mtd/mtdsplit/mtdsplit_elf.c | 196 ++
 3 files changed, 202 insertions(+)
 create mode 100644 
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_elf.c

-- 
2.26.2


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


[RFC PATCH v2 1/1] kernel: mtdsplit: support ELF loader splitting

2020-07-11 Thread Sander Vanheule
To parse the ELF kernel loader, a minimal ELF parser is used that can
handle both ELF32 or ELF64 class loaders. The splitter assumes that the
kernel is always located before the rootfs, whether it is embedded in
the loader or not. If the kernel is located after the rootfs on the
firmware partition, then the rootfs splitter will include it in the
dynamically created rootfs_data partition and the kernel will be
corrupted.

The kernel image is preferably embedded inside the ELF loader, so the
end of the loader equals the end of the kernel partition. This is due to
the way mtd_find_rootfs_from searches for the the rootfs:
- if the kernel image is embedded in the loader, the appended rootfs may
  follow the loader immediately, within the same erase block.
- if the kernel image is not embedded in the loader, but placed at some
  offset behind the loader (OKLI-style loader), the rootfs must be
  aligned to an erase-block after the loader and kernel image.

Includes some suggestions by Julien Dusser.

Signed-off-by: Sander Vanheule 
Tested-by: Julien Dusser 
---
 .../files/drivers/mtd/mtdsplit/Kconfig|   5 +
 .../files/drivers/mtd/mtdsplit/Makefile   |   1 +
 .../files/drivers/mtd/mtdsplit/mtdsplit_elf.c | 196 ++
 3 files changed, 202 insertions(+)
 create mode 100644 
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_elf.c

diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig 
b/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig
index 0447df585c..3b7e23af33 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig
@@ -79,3 +79,8 @@ config MTD_SPLIT_JIMAGE_FW
bool "JBOOT Image based firmware partition parser"
depends on MTD_SPLIT_SUPPORT
select MTD_SPLIT
+
+config MTD_SPLIT_ELF_FW
+   bool "ELF loader firmware partition parser"
+   depends on MTD_SPLIT_SUPPORT
+   select MTD_SPLIT
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile 
b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile
index d3634e78db..8671628e7c 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile
@@ -12,3 +12,4 @@ obj-$(CONFIG_MTD_SPLIT_EVA_FW) += mtdsplit_eva.o
 obj-$(CONFIG_MTD_SPLIT_WRGG_FW) += mtdsplit_wrgg.o
 obj-$(CONFIG_MTD_SPLIT_MINOR_FW) += mtdsplit_minor.o
 obj-$(CONFIG_MTD_SPLIT_JIMAGE_FW) += mtdsplit_jimage.o
+obj-$(CONFIG_MTD_SPLIT_ELF_FW) += mtdsplit_elf.o
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_elf.c 
b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_elf.c
new file mode 100644
index 00..620a5429ab
--- /dev/null
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_elf.c
@@ -0,0 +1,196 @@
+/*
+ *  MTD splitter for ELF loader firmware partitions
+ *
+ *  Copyright (C) 2020 Sander Vanheule 
+ *
+ *  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.
+ *
+ *  To parse the ELF kernel loader, a minimal ELF parser is used that can
+ *  handle both ELF32 or ELF64 class loaders. The splitter assumes that the
+ *  kernel is always located before the rootfs, whether it is embedded in the
+ *  loader or not. If the kernel is located after the rootfs on the firmware
+ *  partition, then the rootfs splitter will include it in the dynamically
+ *  created rootfs_data partition and the kernel will be corrupted.
+ *
+ *  The kernel image is preferably embedded inside the ELF loader, so the end
+ *  of the loader equals the end of the kernel partition. This is due to the
+ *  way mtd_find_rootfs_from searches for the the rootfs:
+ *  - if the kernel image is embedded in the loader, the appended rootfs may
+ *follow the loader immediately, within the same erase block.
+ *  - if the kernel image is not embedded in the loader, but placed at some
+ *offset behind the loader (OKLI-style loader), the rootfs must be
+ *aligned to an erase-block after the loader and kernel image.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "mtdsplit.h"
+
+#define ELF_NR_PARTS   2
+
+#define ELF_MAGIC  0x7f454c46 /* 0x7f E L F */
+#define ELF_CLASS_32   1
+#define ELF_CLASS_64   2
+
+struct elf_header_ident {
+   uint32_t magic;
+   uint8_t class;
+   uint8_t data;
+   uint8_t version;
+   uint8_t osabi;
+   uint8_t abiversion;
+   uint8_t pad[7];
+};
+
+struct elf_header_32 {
+   uint16_t type;
+   uint16_t machine;
+   uint32_t version;
+   uint32_t entry;
+   uint32_t phoff;
+   uint32_t shoff;
+   uint32_t flags;
+   uint16_t ehsize;
+   uint16_t phentsize;
+   uint16_t phnum;
+   uint16_t shentsize;
+   uint16_t shnum;
+   uint16_t shstrndx;
+};
+
+struct elf_

Re: [OpenWrt-Devel] [PATCH v6] ramips: add support for JS76x8 series DEV boards

2020-07-11 Thread Petr Štetiar
Robinson Wu  [2020-04-07 16:36:52]:

Hi,

> +&pinctrl {
> + state_default: pinctrl0 {
> + gpio {
> + ralink,group = "gpio","p3led_an","p4led_an",
> + "pwm0","pwm1","refclk","wdt","wled_an";
> + ralink,function = "gpio";
> + };
> +
> + p0led {
> + ralink,group = "p0led_an";
> + ralink,function = "p0led_an";
> + };
> +
> + p1led {
> + ralink,group = "p1led_an";
> + ralink,function = "p1led_an";
> + };
> +
> + p2led {
> + ralink,group = "p2led_an";
> + ralink,function = "p2led_an";
> + };
> +
> + pwm_2_3 {
> + ralink,group = "uart2";
> + ralink,function = "pwm";
> + };
> + };
> +
> + uart2 {
> + uart2 {
> + ralink,group = "spis";
> + ralink,function = "pwm_uart2";
> + };
> + };

this block looks weird

> +&spi0 {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <4000>;
> + m25p,chunked-io = <32>;
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + label = "u-boot";
> + reg = <0x0 0x3>;
> + read-only;
> + };
> +
> + partition@3 {
> + label = "u-boot-env";
> + reg = <0x3 0x1>;
> + read-only;
> + };
> +
> + factory: partition@4 {
> + label = "factory";
> + reg = <0x4 0x1>;
> + read-only;
> + };
> +
> + firmware: partition@5 {
> + compatible = "denx,uimage";

missing reg property

> + label = "firmware";
> + };
> + };
> + };
> +
> + spidev@1 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + compatible = "linux,spidev";
> + reg = <1>;
> + spi-max-frequency = <4000>;
> + };

Remove this, it's going to produce kernel warning.

> --- a/target/linux/ramips/image/mt76x8.mk
> +++ b/target/linux/ramips/image/mt76x8.mk
> @@ -140,6 +140,36 @@ define Device/iptime_a604m
>  endef
>  TARGET_DEVICES += iptime_a604m
>  

whitespace issue

> +define Device/jotale_js76x8-16m
> +  MTK_SOC := mt7628an
> +  IMAGE_SIZE := 16064k
> +  DEVICE_VENDOR := Jotale
> +  DEVICE_MODEL := JS76x8
> +  DEVICE_VARIANT := 16M
> +  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
> +endef
> +TARGET_DEVICES += jotale_js76x8-16m
> +
> +define Device/jotale_js76x8-32m
> +  MTK_SOC := mt7628an
> +  IMAGE_SIZE := 32448k
> +  DEVICE_VENDOR := Jotale
> +  DEVICE_MODEL := JS76x8
> +  DEVICE_VARIANT := 32M
> +  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
> +endef
> +TARGET_DEVICES += jotale_js76x8-32m
> +
> +define Device/jotale_js76x8-8m
> +  MTK_SOC := mt7628an
> +  IMAGE_SIZE := 7872k
> +  DEVICE_VENDOR := Jotale
> +  DEVICE_MODEL := JS76x8
> +  DEVICE_VARIANT := 8M
> +  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
> +endef
> +TARGET_DEVICES += jotale_js76x8-8m
> +

Be DRY, use some common Device and just change IMAGE_SIZE and DEVICE_VARIANT.

> @@ -186,6 +189,9 @@ ramips_setup_macs()
>   mercury,mac1200r-v2)
>   wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory_info 0xd)" 
> 1)
>   ;;
> + jotale,js76x8-16m|\
> + jotale,js76x8-32m|\
> + jotale,js76x8-8m|\

Wrong alphabetic sorting here

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


Re: [PATCH] ramips: consolidate recipes with uimage_padhdr

2020-07-11 Thread Bjørn Mork
Tested-by: Bjørn Mork 

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


Re: [OpenWrt-Devel] [PATCH] dnsmasq: Ignore carrier status for bridge interfaces

2020-07-11 Thread Petr Štetiar
Reuben Dowle  [2020-01-20 20:41:29]:

Hi,

> The information in this email communication (inclusive of attachments) is
> confidential to 4RF Limited and the intended recipient(s). If you are not
> the intended recipient(s), please note that any use, disclosure,
> distribution or copying of this information or any part thereof is strictly
> prohibited and that the author accepts no liability for the consequences of
> any action taken on the basis of the information provided.

IANAL, but I don't like this. Please resend for example from personal/scratch
email with proper From: or such, but without this additional footer. Thanks.

-- ynezz

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


Re: AW: 'tr' character class support?

2020-07-11 Thread Magnus Kroken

Hi

On 11.07.2020 09:18, Thomas Endt wrote:

--- Config-defaults.in.orig Fri Jul 10 21:03:57 2020
+++ Config-defaults.in  Fri Jul 10 21:03:22 2020
@@ -837,7 +837,7 @@
  default y
   config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
  bool
-   default n
+   default y
   config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
  bool
  default n


What impact on busybox package size does this have?



I did a comparison, which gave about a 500 byte increase to the 
compressed package:


r13779+11-9362ea1661

Default config:
-rw-r--r-- 1 openwrt openwrt 208372 Jul 11 13:54 
bin/packages/mips_24kc/base/busybox_1.31.1-1_mips_24kc.ipk


With CONFIG_BUSYBOX_CONFIG_FEATURE_TR_CLASSES=y
-rw-r--r-- 1 openwrt openwrt 208868 Jul 11 14:06 
bin/packages/mips_24kc/base/busybox_1.31.1-1_mips_24kc.ipk


With CONFIG_BUSYBOX_CONFIG_FEATURE_TR_CLASSES=y and 
CONFIG_BUSYBOX_CONFIG_FEATURE_TR_EQUIV=y
-rw-r--r-- 1 openwrt openwrt 208895 Jul 11 14:08 
bin/packages/mips_24kc/base/busybox_1.31.1-1_mips_24kc.ipk


For the record, a POSIX compliant tr requires both 
CONFIG_BUSYBOX_CONFIG_FEATURE_TR_CLASSES=y and 
CONFIG_BUSYBOX_CONFIG_FEATURE_TR_EQUIV=y.


I'd say that difference is acceptable, but for similar issues in the 
future there remains the question of how desirable POSIX compliance is 
in OpenWrt, and what sacrifices are reasonable to achieve it. Is there a 
decision, goalr or mindset on this? I'm not a 4/32 fanatic and accept 
that minimum requirements will increase over time, but I still value the 
flexibility of OpenWrt (such as the ability to run on relatively small 
devices). Making tr compliant when it's there anyway and has this small 
cost is good. OTOH, a proper POSIX system requires e.g. a working C 
compiler, which I think is an absurd minimum to set for OpenWrt given 
how useful and flexible it is in its current state.


Regards,
Magnus Kroken

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


Re: [PATCH] utils: fix check_pid_path to work with deleted file as well

2020-07-11 Thread Petr Štetiar
Karel Kočí  [2020-07-02 12:49:56]:

Hi,

> check_pid_patch is checking if process with given PID and executable
> path is running. If this code fails the rest of the code can be
> convinced that program is no longer running and possibly spawns new
> instance that can collide with already running one. This behavior was
> reproduced with hostapd.
> 
> Symbolic link exe in process subdirectory in /proc points to original
> executable. The problem is that it reads as original path plus string
> ' (deleted)' if file is removed. The process is still running but
> original file is no longer available on files system.
> 
> This behavior is triggered not only when file is removed (unlinked) but
> also when file is replaced. This happens clearly on package update. In
> general this happens any time all references (hard links) to file are
> removed from file system.
> 
> This is not ultimate fix as exe link points to any last reference on
> file system with preference for original one. The problem is if there
> are multiple references and the original one is removed. This can be
> reproduced just by copying executable (hard linking) and unlinking the
> original one. In such case exe link would point to copy and not to
> original deleted one.

thanks, applied. Next time please send it with "[PATCH netifd] ..." subject as
otherwise it's not clear where to apply this.

-- ynezz

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


[PATCH v3] ath79: add support for gl-e750

2020-07-11 Thread Luochongjun
The gl-e750 is a portable travel router that gives you safe access to
the internet while traveling.

Specifications:
- SoC: Qualcomm Atheros AR9531 (650MHz)
- RAM: 128 MB DDR2
- Flash: 16 MB SPI NOR (W25Q128FVSG) + 128 MB SPI NAND (GD5F1GQ4UFYIG)
- Ethernet: 10/100: 1xLAN
- Wireless: QCA9531 2.4GHz (bgn) + QCA9887 5GHz (ac)
- USB: 1x USB 2.0 port
- Switch: 1x switch
- Button: 1x reset button
- OLED Screen: 128*64 px

MAC addresses based on vendor firmware:
LAN *:a0 art 0x0
2.4GHz *:a1 art 0x1002
5GHz *:a2 art calculated from art 0x0 + 2

Flash firmware:
Since openwrt's kernel already exceeds 2MB, upgrading from the official
version of GL-inet (v3.100) using the sysupgrade command will break the
kernel image. Users who are using version 3.100 can only upgrade via
uboot. The official guidance for GL-inet is as follows:
https://docs.gl-inet.com/en/3/troubleshooting/debrick/

In the future, GL-inet will modify the firmware to support the sysupgrade
command, so users will be able to upgrade directly with the sysupgrade
command in future releases.

OLED screen control:
OLED controller is connected to QCA9531 through serial port, and can send
instructions to OLED controller directly through serial port.
Refer to the links below for a list of supported instructions:
https://github.com/gl-inet/GL-E750-MCU-instruction

Signed-off-by: Luochongjun 
---
 target/linux/ath79/dts/qca9531_glinet_gl-e750.dts  | 139 +
 target/linux/ath79/image/nand.mk   |  18 +++
 .../ath79/nand/base-files/etc/board.d/02_network   |   3 +-
 .../etc/hotplug.d/ieee80211/10-fix-wifi-mac|   5 +
 4 files changed, 164 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-e750.dts

diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts 
b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
new file mode 100644
index 000..1fc96bc
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
@@ -0,0 +1,139 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include 
+#include 
+
+#include "qca953x.dtsi"
+
+/ {
+   compatible = "glinet,gl-e750", "qca,qca9531";
+   model = "GL.iNet GL-E750";
+
+   aliases {
+   label-mac-device = ð0;
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   pinctrl-names = "default";
+   pinctrl-0 = <&jtag_disable_pins>;
+
+   reset {
+   label = "reset";
+   linux,code = ;
+   gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+   };
+
+   switch {
+   label = "switch";
+   linux,code = ;
+   gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+   };
+   };
+
+   gpio-export {
+   compatible = "gpio-export";
+
+   gpio_lte_power {
+   gpio-export,name = "lte_power";
+   gpio-export,output = <1>;
+   gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+   };
+};
+};
+
+&pcie0 {
+   status = "okay";
+};
+
+&uart {
+   status = "okay";
+};
+
+&usb0 {
+   status = "okay";
+};
+
+&usb_phy {
+   status = "okay";
+};
+
+&spi {
+   status = "okay";
+   num-cs = <2>;
+
+   flash@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <2500>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x4>;
+   read-only;
+   };
+
+   partition@4 {
+   label = "u-boot-env";
+   reg = <0x4 0x1>;
+   };
+
+   art: partition@5 {
+   label = "art";
+   reg = <0x5 0x1>;
+   read-only;
+   };
+
+   partition@6 {
+   label = "kernel";
+   reg = <0x6 0x40>;
+   };
+
+   partition@46 {
+   label = "reserved";
+   reg = <0x46 0xba>;
+   };
+   };
+   };
+
+   flash@1 {
+   compatible = "spi-nand";
+   reg = <1>;
+   spi-max-frequency = <2500>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+  

Re: [OpenWrt-Devel] [PATCH] ltq-vmmc: update permission handling

2020-07-11 Thread Petr Štetiar
Sebastian Kemper  [2020-06-09 19:18:55]:

> This commit addresses two permission issues.
> 
> 1. The firmware is currently just copied. It can end up with o= on the
>device (this is the case for voice_ar9_firmware.bin for instance).
>Instead of copying it the Makefile is changed to use the macro
>"$(INSTALL_DATA)" in order for the file to be world-readable.
> 2. A configuration file /etc/config/vmmc is added and the init script
>updated accordingly, to allow changing the group of the device nodes.
>Like this applications running as non-root may access the device
>nodes after the user changes the configuration to the appropriate
>group (for instance "asterisk"). Currently asterisk users update
>init scripts to fix the permissions. With a configuration option the
>user experience is easier and more straight-forward.

Thanks, merged just the 1. into my staging tree as discussed in the GitHub PR.

-- ynezz

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


Re: [PATCH] mvebu: fix support for Marvell 8040 MACCHIATOBin

2020-07-11 Thread Tomasz Maciej Nowak
Hi.

W dniu 10.07.2020 o 10:28, Adrian Schmutzler pisze:
> Between kernels 4.20 and 5.0, a new variant of this board has been
> introduced ("Single Shot"), and the existing one has been renamed
> with the appendix "Double Shot". [1]
> This also adjusted the first compatible in the list:
> 
> marvell,armada8040-mcbin -> marvell,armada8040-mcbin-doubleshot
> 
> This patch updates the OpenWrt implementation of this device by
> adjusting the relevant references to that compatible (i.e., our
> board name).
> 
> To still provide support for 4.19 with our setup, this adds a
> small patch to change the compatible there as well.
> 
> [1] 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b1f0bbe2700051886b954192b6c1751233fe0f52
> 
> Cc: Tomasz Maciej Nowak 
> Signed-off-by: Adrian Schmutzler 

Aside from missing change in U-Boot environment setup, Reviewed-by: Tomasz 
Maciej Nowak 

> ---
>  .../cortexa72/base-files/etc/board.d/02_network|  2 +-
>  .../cortexa72/base-files/lib/upgrade/platform.sh   |  6 +++---
>  target/linux/mvebu/image/cortexa72.mk  |  2 +-
>  .../260-align-mcbin-compatible-with-5.4.patch  | 14 ++
>  4 files changed, 19 insertions(+), 5 deletions(-)
>  create mode 100644 
> target/linux/mvebu/patches-4.19/260-align-mcbin-compatible-with-5.4.patch
> 
> diff --git a/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network 
> b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
> index 080e32ada3..32053d74e8 100755
> --- a/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
> +++ b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
> @@ -11,7 +11,7 @@ board_config_update
>  board=$(board_name)
>  
>  case "$board" in
> -marvell,armada8040-mcbin)
> +marvell,armada8040-mcbin-doubleshot)
>   ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2"
>   ;;
>  marvell,armada8040-db)
> diff --git a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh 
> b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh
> index 2428de08c4..75d2933f05 100755
> --- a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh
> @@ -9,7 +9,7 @@ REQUIRE_IMAGE_METADATA=1
>  
>  platform_check_image() {
>   case "$(board_name)" in
> - marvell,armada8040-mcbin)
> + marvell,armada8040-mcbin-doubleshot)
>   platform_check_image_sdcard "$1"
>   ;;
>   *)
> @@ -20,7 +20,7 @@ platform_check_image() {
>  
>  platform_do_upgrade() {
>   case "$(board_name)" in
> - marvell,armada8040-mcbin)
> + marvell,armada8040-mcbin-doubleshot)
>   platform_do_upgrade_sdcard "$1"
>   ;;
>   *)
> @@ -30,7 +30,7 @@ platform_do_upgrade() {
>  }
>  platform_copy_config() {
>   case "$(board_name)" in
> - marvell,armada8040-mcbin)
> + marvell,armada8040-mcbin-doubleshot)
>   platform_copy_config_sdcard
>   ;;
>   esac
> diff --git a/target/linux/mvebu/image/cortexa72.mk 
> b/target/linux/mvebu/image/cortexa72.mk
> index 50233540ed..6e52109237 100644
> --- a/target/linux/mvebu/image/cortexa72.mk
> +++ b/target/linux/mvebu/image/cortexa72.mk
> @@ -24,6 +24,6 @@ define Device/marvell_macchiatobin
>DEVICE_ALT0_MODEL := Armada 8040 Community Board
>DEVICE_PACKAGES += kmod-i2c-mux-pca954x
>DEVICE_DTS := armada-8040-mcbin
> -  SUPPORTED_DEVICES := marvell,armada8040-mcbin
> +  SUPPORTED_DEVICES := marvell,armada8040-mcbin-doubleshot 
> marvell,armada8040-mcbin
>  endef
>  TARGET_DEVICES += marvell_macchiatobin
> diff --git 
> a/target/linux/mvebu/patches-4.19/260-align-mcbin-compatible-with-5.4.patch 
> b/target/linux/mvebu/patches-4.19/260-align-mcbin-compatible-with-5.4.patch
> new file mode 100644
> index 00..53e34300db
> --- /dev/null
> +++ 
> b/target/linux/mvebu/patches-4.19/260-align-mcbin-compatible-with-5.4.patch
> @@ -0,0 +1,14 @@
> +--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
>  b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
> +@@ -10,8 +10,9 @@
> + #include 
> + 
> + / {
> +-model = "Marvell 8040 MACCHIATOBin";
> +-compatible = "marvell,armada8040-mcbin", "marvell,armada8040",
> ++model = "Marvell 8040 MACCHIATOBin Double-shot";
> ++compatible = "marvell,armada8040-mcbin-doubleshot",
> ++"marvell,armada8040-mcbin", "marvell,armada8040",
> + "marvell,armada-ap806-quad", "marvell,armada-ap806";
> + 
> + chosen {
> 

Regards

-- 
TMN

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


Re: [PATCH v2] mvebu: add support for MACCHIATObin Single Shot

2020-07-11 Thread Tomasz Maciej Nowak
W dniu 10.07.2020 o 20:04, m...@adrianschmutzler.de pisze:
> Hi,
> 
>> -Original Message-
>> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
>> On Behalf Of Tomasz Maciej Nowak
>> Sent: Freitag, 10. Juli 2020 19:35
>> To: openwrt-devel@lists.openwrt.org
>> Cc: Alexandra Alth 
>> Subject: [PATCH v2] mvebu: add support for MACCHIATObin Single Shot
>>
>> The currently supported Double Shot variant provides dts which is not
>> entirely compatible with Single Shot variant. The symptoms are that SFP
>> ports are not working. To remedy this, add two images to distinguish both
>> boards, wich have proper dtb assigned.
>>
>> Reported-by: Alexandra Alth 
>> Signed-off-by: Tomasz Maciej Nowak 
>> ---
>>
>> v1 -> v2
>> - Rebase onto "mvebu: fix support for Marvell 8040 MACCHIATOBin".
>> - Add missing cases for network, sysupgrade and U-Boot environment
>>   location.
>> - Fix Double Shot case in U-Boot evironment location.
> 
> thanks for updating.
> 
> Does the state of your v1 indicate that this is _not_ tested on device?

Yes, unless Alexandra or someone else will test it. But given that Alexandra 
has tested snapshot image with dtb extracted from Debian, it should work. The 
missing bits were only userspace configuration and that's irrelevant to the 
reported problem.

Alexandra, I uploaded images with proposed changes:
https://tmn505.github.io/openwrt/openwrt-mvebu-cortexa72-marvell_macchiatobin-singleshot-ext4-sdcard.img.gz
https://tmn505.github.io/openwrt/openwrt-mvebu-cortexa72-marvell_macchiatobin-singleshot-squashfs-sdcard.img.gz
https://tmn505.github.io/openwrt/openwrt-mvebu-cortexa72-marvell_macchiatobin-singleshot-initramfs-kernel.bin

Please test them. If You want to compile images Yourself, use this tree:
https://github.com/tmn505/openwrt/tree/mvebu

and please report results here.

> 
>>
>>  package/boot/uboot-envtools/files/mvebu   |  3 ++-
>>  .../base-files/etc/board.d/02_network |  3 ++-
>>  .../base-files/lib/upgrade/platform.sh|  9 ++---
>>  target/linux/mvebu/image/cortexa72.mk | 20 +--
>>  4 files changed, 28 insertions(+), 7 deletions(-)
>>
>> diff --git a/package/boot/uboot-envtools/files/mvebu
>> b/package/boot/uboot-envtools/files/mvebu
>> index 72e2df5d1982..8ed1f87ead46 100644
>> --- a/package/boot/uboot-envtools/files/mvebu
>> +++ b/package/boot/uboot-envtools/files/mvebu
>> @@ -24,7 +24,8 @@ globalscale,espressobin|\  globalscale,espressobin-
>> emmc|\  globalscale,espressobin-v7|\  globalscale,espressobin-v7-emmc|\
>> -marvell,armada8040-mcbin)
>> +marvell,armada8040-mcbin-doubleshot|\
>> +marvell,armada8040-mcbin-singleshot)
>>  ubootenv_add_uci_config "/dev/mtd0" "0x3f" "0x1"
>> "0x1" "1"
> 
> Oh, I overlooked that part. I will move the doubleshot change to my patch.

Happens to all of us.

> 
> Best
> 
> Adrian
> 

Regards

-- 
TMN

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


Re: [PATCHv2] libjson-c: fix pkgconfig file

2020-07-11 Thread Petr Štetiar
Rosen Penev  [2020-07-04 18:09:32]:

Hi,

> Removed now pointless CFLAGS.

...

> -TARGET_CFLAGS += $(FPIC) -Wno-implicit-fallthrough
> -HOST_CFLAGS += -Wno-implicit-fallthrough

Why is $(FPIC) pointless now?

-- ynezz

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


Re: [OpenWrt-Devel] [PATCH 1/2] libcxxabi: add

2020-07-11 Thread Petr Štetiar
Rosen Penev  [2020-06-06 11:52:22]:

> This will be used for libcxx.
> 
> Signed-off-by: Rosen Penev 

Please add more verbose commit description, mainly answer to "Why this should
be included?" question.

-- ynezz

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


arc770 and ath25 bump marked as deferred

2020-07-11 Thread mail
Hi,

since nobody seemed to be interested in continuing, I just marked my kernel 
bump patches for arc770 (RFT) and ath25 (broken) as deferred, so they don't 
crowd patchwork any longer.

https://patchwork.ozlabs.org/project/openwrt/patch/20200413103352.7429-1-freif...@adrianschmutzler.de/

https://patchwork.ozlabs.org/project/openwrt/list/?series=169991&state=*

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 1/4] scripts/clean-package.sh: exit in case cd fails

2020-07-11 Thread Petr Štetiar
Rosen Penev  [2019-12-29 19:48:24]:

Please rebase, the series doesn't apply anymore.

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


Re: [OpenWrt-Devel] [PATCH] mtd_get_mac_ascii Return first occurence of $key.

2020-07-11 Thread Petr Štetiar
varga...@gmail.com  [2019-11-26 14:10:03]:

Hi,

> From: Gabor Varga 
> 
>  For example on Asus RT-AC65P router (and the identical Asus RT-AC85P)
>  the et1macaddr string has multiple occurences in u-boot-env partition.
>  So, the mtd_get_mac_ascii cannot determine the WAN MAC address
>  (called from /etc/board.d/02_network script), and with default 
>  configuration the WAN and LAN MAC addresses are swapped.
> 
> Signed-off-by: Gabor Varga 
> ---
>  package/base-files/files/lib/functions/system.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/base-files/files/lib/functions/system.sh 
> b/package/base-files/files/lib/functions/system.sh
> index c4dc3cc3a9..067157f53f 100644
> --- a/package/base-files/files/lib/functions/system.sh
> +++ b/package/base-files/files/lib/functions/system.sh
> @@ -72,7 +72,7 @@ mtd_get_mac_ascii() {
>   return
>   fi
>  
> - mac_dirty=$(strings "$part" | sed -n 's/^'"$key"'=//p')
> + mac_dirty=$(strings "$part" | sed -n '1,/'"$key"'=/s/^'"$key"'=//p')

 $ echo -e "abc=moo\nabc=foo" | ( export key=abc; sed -n 's/^'"$key"'=//p' )
 moo
 foo

 $ echo -e "abc=moo\nabc=foo" | ( export key=abc; sed -n 
'1,/'"$key"'=/s/^'"$key"'=//p' )
 moo
 foo

Seems to not work as expected.

-- ynezz

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


RE: [PATCH v2] ath79: add support for gl-e750

2020-07-11 Thread mail
> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Luochongjun
> Sent: Samstag, 11. Juli 2020 10:59
> To: openwrt-devel@lists.openwrt.org
> Cc: Luochongjun 
> Subject: [PATCH v2] ath79: add support for gl-e750
> 
> The gl-e750 is a portable travel router that gives you safe access to the
> internet while traveling.
> 
> Specifications:
> - SoC: Qualcomm Atheros AR9531 (650MHz)
> - RAM: 128 MB DDR2
> - Flash: 16 MB SPI NOR (W25Q128FVSG) + 128 MB SPI NAND
> (GD5F1GQ4UFYIG)
> - Ethernet: 10/100: 1xLAN
> - Wireless: QCA9531 2.4GHz (bgn) + QCA9887 5GHz (ac)
> - USB: 1x USB 2.0 port
> - Switch: 1x switch
> - Button: 1x reset button
> - OLED Screen: 128*64 px
> 
> MAC addresses based on vendor firmware:
> LAN *:a0 art 0x0
> 2.4GHz *:a1 art 0x1002
> 5GHz *:a2 art calculated from art 0x0 + 2
> 
> Flash firmware:
> Since openwrt's kernel already exceeds 2MB, upgrading from the official
> version of GL-inet (v3.100) using the sysupgrade command will break the
> kernel image. Users who are using version 3.100 can only upgrade via uboot.
> The official guidance for GL-inet is as follows:
> https://docs.gl-inet.com/en/3/troubleshooting/debrick/
> 
> In the future, GL-inet will modify the firmware to support the sysupgrade
> command, so users will be able to upgrade directly with the sysupgrade
> command in future releases.
> 
> OLED screen control:
> OLED controller is connected to QCA9531 through serial port, and can send
> instructions to OLED controller directly through serial port.
> Refer to the links below for a list of supported instructions:
> https://github.com/gl-inet/GL-E750-MCU-instruction

a few nitpicks still below.

> 
> Signed-off-by: Luochongjun 
> ---
>  target/linux/ath79/dts/qca9531_glinet_gl-e750.dts  | 140
> +
>  target/linux/ath79/image/nand.mk   |  18 +++
>  .../ath79/nand/base-files/etc/board.d/02_network   |   3 +
>  .../etc/hotplug.d/ieee80211/10-fix-wifi-mac|   8 ++
>  4 files changed, 169 insertions(+)
>  create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
> 
> diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
> b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
> new file mode 100644
> index 000..aba2087
> --- /dev/null
> +++ b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
> @@ -0,0 +1,140 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/;
> +
> +#include 
> +#include 
> +
> +#include "qca953x.dtsi"
> +
> +/ {
> + compatible = "glinet,gl-e750", "qca,qca9531";
> + model = "GL.iNet GL-E750";
> +
> + aliases {
> + label-mac-device = ð0;
> + };
> +
> + keys {
> + compatible = "gpio-keys";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&jtag_disable_pins>;
> +
> + reset {
> + label = "reset";
> + linux,code = ;
> + gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
> + };
> +
> + switch {
> + label = "switch";
> + linux,code = ;
> + gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
> + };
> + };
> +
> + gpio-export {
> + compatible = "gpio-export";
> + #size-cells = <0>;

I think size-cells can be dropped here, at least this is frequently done.

> +
> + gpio_lte_power {
> + gpio-export,name = "lte_power";
> + gpio-export,output = <1>;
> + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
> + };
> +  };
> +};
> +
> +&pcie0 {
> + status = "okay";
> +};
> +
> +&uart {
> + status = "okay";
> +};
> +
> +&usb0 {
> + status = "okay";
> +};
> +
> +&usb_phy {
> + status = "okay";
> +};
> +
> +&spi {
> + status = "okay";
> + num-cs = <2>;
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <2500>;
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + label = "u-boot";
> + reg = <0x0 0x4>;
> + read-only;
> + };
> +
> + partition@4 {
> + label = "u-boot-env";
> + reg = <0x4 0x1>;
> + };
> +
> + art: partition@5 {
> + label = "art";
> + reg = <0x5 0x1>;
> + read-only;
> + };
> +
> + partition@6 {
> + label = "kernel";
> + reg = <0x6 0x40

RE: RE: [PATCH] ath79: add support for gl-e750

2020-07-11 Thread mail
> BTW: Would the following DTS statement work for your device _instead_ of the 
> code in 10-fix-wifi-mac:
> 
> &pcie0 {
> status = "okay";
> 
> wifi@0,0 {
> compatible = "qcom,ath10k";
> reg = <0x 0 0 0 0>;
> mtd-mac-address = <&art 0x0>;
> mtd-mac-address-increment = <2>;
> };
> };
> --->I added the above configuration to the DTS file, and the MAC address was 
> not set correctly, so I will keep the current MAC address setting method.

Okay.

> 
> If that's caused by ð1 being enabled in device tree, you can try to put 
> the following in DTS:
>
> ð1 {
> compatible = "syscon", "simple-mfd";
> };
> --->As you said, after I added the above configuration to DTS, the system 
> only generated eth0 and it worked.

Okay, fine.

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


[PATCH] firmware-utils: mkfwimage: fix memcpy and strncpy usage

2020-07-11 Thread Petr Štetiar
Firmware is binary blob, so there are barely any NULL terminated strings
expected, so we should probably convert all chars into u8 types, and
after that it's clear, that using strcpy doesn't make sense anymore.

This is rather theoretical stuff, but `uint8_t name[PART_NAME_LENGTH]`
means, that you can supply PART_NAME_LENGTH sized name, not
PART_NAME_LENGTH-1 name when NULL terminated.

Ref: https://github.com/openwrt/openwrt/pull/2274
Fixes: 04cb651376f9 ("firmware-utils: mkfwimage: fix more errors reported by 
gcc-6/7/9")
Cc: Chen Minqiang 
Signed-off-by: Petr Štetiar 
---
 tools/firmware-utils/src/fw.h| 15 ---
 tools/firmware-utils/src/mkfwimage.c | 18 +-
 tools/firmware-utils/src/utils.h | 11 +++
 3 files changed, 28 insertions(+), 16 deletions(-)
 create mode 100644 tools/firmware-utils/src/utils.h

diff --git a/tools/firmware-utils/src/fw.h b/tools/firmware-utils/src/fw.h
index 53a92a573c73..778143d2c42b 100644
--- a/tools/firmware-utils/src/fw.h
+++ b/tools/firmware-utils/src/fw.h
@@ -19,6 +19,7 @@
 #ifndef FW_INCLUDED
 #define FW_INCLUDED
 
+#include 
 #include 
 
 #define MAGIC_HEADER   "OPEN"
@@ -30,16 +31,16 @@
 #define PART_NAME_LENGTH 16
 
 typedef struct header {
-   char magic[MAGIC_LENGTH];
-   char version[256];
+   uint8_t magic[MAGIC_LENGTH];
+   uint8_t version[256];
u_int32_t crc;
u_int32_t pad;
 } __attribute__ ((packed)) header_t;
 
 typedef struct part {
-   char magic[MAGIC_LENGTH];
-   char name[PART_NAME_LENGTH];
-   char pad[12];
+   uint8_t magic[MAGIC_LENGTH];
+   uint8_t name[PART_NAME_LENGTH];
+   uint8_t pad[12];
u_int32_t memaddr;
u_int32_t index;
u_int32_t baseaddr;
@@ -54,13 +55,13 @@ typedef struct part_crc {
 } __attribute__ ((packed)) part_crc_t;
 
 typedef struct signature {
-   char magic[MAGIC_LENGTH];
+   uint8_t magic[MAGIC_LENGTH];
u_int32_t crc;
u_int32_t pad;
 } __attribute__ ((packed)) signature_t;
 
 typedef struct signature_rsa {
-   char magic[MAGIC_LENGTH];
+   uint8_t magic[MAGIC_LENGTH];
 // u_int32_t crc;
unsigned char rsa_signature[256];
u_int32_t pad;
diff --git a/tools/firmware-utils/src/mkfwimage.c 
b/tools/firmware-utils/src/mkfwimage.c
index ff9011a0c48f..591ce44a7883 100644
--- a/tools/firmware-utils/src/mkfwimage.c
+++ b/tools/firmware-utils/src/mkfwimage.c
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include "fw.h"
+#include "utils.h"
 
 typedef struct fw_layout_data {
u_int32_t   kern_start;
@@ -204,21 +205,20 @@ static void write_header(void* mem, const char *magic, 
const char* version)
header_t* header = mem;
memset(header, 0, sizeof(header_t));
 
-   memcpy(header->magic, magic, MAGIC_LENGTH);
-   strncpy(header->version, version, sizeof(header->version));
-   header->crc = htonl(crc32(0L, (unsigned char *)header,
-   sizeof(header_t) - 2 * sizeof(u_int32_t)));
+   FW_MEMCPY_STR(header->magic, magic);
+   FW_MEMCPY_STR(header->version, version);
+   header->crc = htonl(crc32(0L, (uint8_t*) header,
+   sizeof(header_t) - 2 * sizeof(u_int32_t)));
header->pad = 0L;
 }
 
-
 static void write_signature(void* mem, u_int32_t sig_offset)
 {
/* write signature */
signature_t* sign = (signature_t*)(mem + sig_offset);
memset(sign, 0, sizeof(signature_t));
 
-   memcpy(sign->magic, MAGIC_END, MAGIC_LENGTH);
+   FW_MEMCPY_STR(sign->magic, MAGIC_END);
sign->crc = htonl(crc32(0L,(unsigned char *)mem, sig_offset));
sign->pad = 0L;
 }
@@ -229,7 +229,7 @@ static void write_signature_rsa(void* mem, u_int32_t 
sig_offset)
signature_rsa_t* sign = (signature_rsa_t*)(mem + sig_offset);
memset(sign, 0, sizeof(signature_rsa_t));
 
-   memcpy(sign->magic, MAGIC_ENDS, MAGIC_LENGTH);
+   FW_MEMCPY_STR(sign->magic, MAGIC_ENDS);
 // sign->crc = htonl(crc32(0L,(unsigned char *)mem, sig_offset));
sign->pad = 0L;
 }
@@ -259,8 +259,8 @@ static int write_part(void* mem, part_data_t* d)
munmap(addr, d->stats.st_size);
 
memset(p->name, 0, PART_NAME_LENGTH);
-   memcpy(p->magic, MAGIC_PART, MAGIC_LENGTH);
-   memcpy(p->name, d->partition_name, PART_NAME_LENGTH);
+   FW_MEMCPY_STR(p->magic, MAGIC_PART);
+   FW_MEMCPY_STR(p->name, d->partition_name);
 
p->index = htonl(d->partition_index);
p->data_size = htonl(d->stats.st_size);
diff --git a/tools/firmware-utils/src/utils.h b/tools/firmware-utils/src/utils.h
new file mode 100644
index ..11ec7400690c
--- /dev/null
+++ b/tools/firmware-utils/src/utils.h
@@ -0,0 +1,11 @@
+#include 
+#include 
+
+#pragma once
+
+#define FW_MEMCPY_STR(dst, src)\
+   do {\
+   size_t slen = strlen(src);

[PATCH v2] ath79: add support for gl-e750

2020-07-11 Thread Luochongjun
The gl-e750 is a portable travel router that gives you safe access to
the internet while traveling.

Specifications:
- SoC: Qualcomm Atheros AR9531 (650MHz)
- RAM: 128 MB DDR2
- Flash: 16 MB SPI NOR (W25Q128FVSG) + 128 MB SPI NAND (GD5F1GQ4UFYIG)
- Ethernet: 10/100: 1xLAN
- Wireless: QCA9531 2.4GHz (bgn) + QCA9887 5GHz (ac)
- USB: 1x USB 2.0 port
- Switch: 1x switch
- Button: 1x reset button
- OLED Screen: 128*64 px

MAC addresses based on vendor firmware:
LAN *:a0 art 0x0
2.4GHz *:a1 art 0x1002
5GHz *:a2 art calculated from art 0x0 + 2

Flash firmware:
Since openwrt's kernel already exceeds 2MB, upgrading from the official
version of GL-inet (v3.100) using the sysupgrade command will break the
kernel image. Users who are using version 3.100 can only upgrade via
uboot. The official guidance for GL-inet is as follows:
https://docs.gl-inet.com/en/3/troubleshooting/debrick/

In the future, GL-inet will modify the firmware to support the sysupgrade
command, so users will be able to upgrade directly with the sysupgrade
command in future releases.

OLED screen control:
OLED controller is connected to QCA9531 through serial port, and can send
instructions to OLED controller directly through serial port.
Refer to the links below for a list of supported instructions:
https://github.com/gl-inet/GL-E750-MCU-instruction

Signed-off-by: Luochongjun 
---
 target/linux/ath79/dts/qca9531_glinet_gl-e750.dts  | 140 +
 target/linux/ath79/image/nand.mk   |  18 +++
 .../ath79/nand/base-files/etc/board.d/02_network   |   3 +
 .../etc/hotplug.d/ieee80211/10-fix-wifi-mac|   8 ++
 4 files changed, 169 insertions(+)
 create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-e750.dts

diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts 
b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
new file mode 100644
index 000..aba2087
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
@@ -0,0 +1,140 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include 
+#include 
+
+#include "qca953x.dtsi"
+
+/ {
+   compatible = "glinet,gl-e750", "qca,qca9531";
+   model = "GL.iNet GL-E750";
+
+   aliases {
+   label-mac-device = ð0;
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   pinctrl-names = "default";
+   pinctrl-0 = <&jtag_disable_pins>;
+
+   reset {
+   label = "reset";
+   linux,code = ;
+   gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+   };
+
+   switch {
+   label = "switch";
+   linux,code = ;
+   gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+   };
+   };
+
+   gpio-export {
+   compatible = "gpio-export";
+   #size-cells = <0>;
+
+   gpio_lte_power {
+   gpio-export,name = "lte_power";
+   gpio-export,output = <1>;
+   gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+   };
+};
+};
+
+&pcie0 {
+   status = "okay";
+};
+
+&uart {
+   status = "okay";
+};
+
+&usb0 {
+   status = "okay";
+};
+
+&usb_phy {
+   status = "okay";
+};
+
+&spi {
+   status = "okay";
+   num-cs = <2>;
+
+   flash@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <2500>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x4>;
+   read-only;
+   };
+
+   partition@4 {
+   label = "u-boot-env";
+   reg = <0x4 0x1>;
+   };
+
+   art: partition@5 {
+   label = "art";
+   reg = <0x5 0x1>;
+   read-only;
+   };
+
+   partition@6 {
+   label = "kernel";
+   reg = <0x6 0x40>;
+   };
+
+   partition@46 {
+   label = "reserved";
+   reg = <0x46 0xba>;
+   };
+   };
+   };
+
+   flash@1 {
+   compatible = "spi-nand";
+   reg = <1>;
+   spi-max-frequency = <2500>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+

AW: 'tr' character class support?

2020-07-11 Thread Thomas Endt
> -Ursprüngliche Nachricht-
> Von: openwrt-devel  Im
> Auftrag von Jordan Geoghegan
> Gesendet: Samstag, 11. Juli 2020 06:22


> --- Config-defaults.in.orig Fri Jul 10 21:03:57 2020
> +++ Config-defaults.in  Fri Jul 10 21:03:22 2020
> @@ -837,7 +837,7 @@
>  default y
>   config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
>  bool
> -   default n
> +   default y
>   config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
>  bool
>  default n

What impact on busybox package size does this have?


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


AW: 'tr' character class support?

2020-07-11 Thread Thomas Endt
> -Ursprüngliche Nachricht-
> Von: openwrt-devel  Im
> Auftrag von Jordan Geoghegan
> Gesendet: Samstag, 11. Juli 2020 02:16


> Is a couple kb of space worth such a loss in portability (not to mention
> deviating heavily from POSIX)?

If you ask the guys with 4/32 devices the answer can only be YES.


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