[PATCH] dnsmasq: procd-ujail: workaround startup failure, when leasefile location is in /tmp

2021-10-18 Thread Bastian Bittorf
introduced with 44f694ba1bca1417d24e851c637c284f9f78c06d
("build: select procd-ujail if !SMALL_FLASH") dnsmasq fails
to startup when the leasefile is configured to be in /tmp,
which is just not suited for beeing a jail location.

With this patch we explicit call jail_mount_rw() for the
(now autocreated) leasedir and show a warning in syslog
for the special case when leasefile is in directory /tmp

without this patch, the syslog shows:
Thu Oct 14 18:32:38 2021 user.err : jail: 
creat(/tmp/ujail-lhNbFK/tmp/dhcp.leases) failed: Read-only file system
Thu Oct 14 18:32:38 2021 daemon.crit dnsmasq[1]: cannot open or create lease 
file /tmp/dhcp.leases: Read-only file system
Thu Oct 14 18:32:38 2021 daemon.crit dnsmasq[1]: FAILED to start up

This is v2 of the patch with a more correct description what is does.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=4085
Suggested-by: Daniel Golle 
Signed-off-by: Bastian Bittorf 
---
 .../services/dnsmasq/files/dnsmasq.init   | 19 ---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
b/package/network/services/dnsmasq/files/dnsmasq.init
index 3250b2179b..af2effdb26 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -616,7 +616,7 @@ dhcp_add() {
 
case $ra_management in
0)
-   # SLACC with DCHP for extended options
+   # SLACC with DHCP for extended options
xappend 
"--dhcp-range=$nettag::,constructor:$ifname,ra-stateless,ra-names"
;;
2)
@@ -816,7 +816,7 @@ dnsmasq_start()
 {
local cfg="$1"
local disabled user_dhcpscript
-   local resolvfile resolvdir localuse=0
+   local resolvfile resolvdir leasedir localuse=0
 
config_get_bool disabled "$cfg" disabled 0
[ "$disabled" -gt 0 ] && return 0
@@ -994,7 +994,11 @@ dnsmasq_start()
fi
 
config_get leasefile $cfg leasefile "/tmp/dhcp.leases"
-   [ -n "$leasefile" ] && [ ! -e "$leasefile" ] && touch "$leasefile"
+   [ -n "$leasefile" ] && {
+   leasedir="$( dirname "$leasefile" )" && mkdir -p "$leasedir"
+   [ ! -e "$leasefile" ] && touch "$leasefile"
+   }
+
config_get_bool cachelocal "$cfg" cachelocal 1
 
config_get_bool noresolv "$cfg" noresolv 0
@@ -1154,6 +1158,15 @@ dnsmasq_start()
procd_add_jail_mount $EXTRA_MOUNT $RFC6761FILE $TRUSTANCHORSFILE
procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir 
$user_dhcpscript
procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts 
/etc/ethers
+
+   [ -d "$leasedir" ] && {
+   [ "$leasedir" = '/tmp' ] && {
+   logger -t dnsmasq \
+   "consider using a more private directory for 
leasefile" \
+   "because jailing /tmp does not work: choose 
e.g. /tmp/dnsmasq/leasefile"
+   }
+   procd_add_jail_mount_rw $leasedir
+   }
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
 
procd_close_instance
-- 
2.30.2


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


Re: [PATCH] dnsmasq: procd-ujail: workaround startup failure, when leasefile location is in /tmp

2021-10-18 Thread Daniel Golle
On Mon, Oct 18, 2021 at 08:12:00AM +, Bastian Bittorf wrote:
> introduced with 44f694ba1bca1417d24e851c637c284f9f78c06d
> ("build: select procd-ujail if !SMALL_FLASH") dnsmasq fails
> to startup when the leasefile is configured to be in /tmp,
> which is just not suited for beeing a jail location.
> 
> With this patch we explicit call jail_mount_rw() for the
> (now autocreated) leasedir and show a warning in syslog
> for the special case when leasefile is in directory /tmp
> 
> without this patch, the syslog shows:
> Thu Oct 14 18:32:38 2021 user.err : jail: 
> creat(/tmp/ujail-lhNbFK/tmp/dhcp.leases) failed: Read-only file system
> Thu Oct 14 18:32:38 2021 daemon.crit dnsmasq[1]: cannot open or create lease 
> file /tmp/dhcp.leases: Read-only file system
> Thu Oct 14 18:32:38 2021 daemon.crit dnsmasq[1]: FAILED to start up
> 
> This is v2 of the patch with a more correct description what is does.
> 
> Ref: https://bugs.openwrt.org/index.php?do=details&task_id=4085
> Suggested-by: Daniel Golle 

I have neither Ack-ed nor suggested this change.
The problem here (according to the ticket) is the option resolvfile
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
which should be
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.d/resolv.conf.auto'
for things to work well by default.

Moving it back to /tmp (for which ever reason) will break things in
the way described here as then resolvdir == leasedir which causes
the problem.

Maybe we should just add a warning for that
("resolvfile and leasefile cannot be in the same directory, please
change your configuration.")


> Signed-off-by: Bastian Bittorf 
> ---
>  .../services/dnsmasq/files/dnsmasq.init   | 19 ---
>  1 file changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
> b/package/network/services/dnsmasq/files/dnsmasq.init
> index 3250b2179b..af2effdb26 100644
> --- a/package/network/services/dnsmasq/files/dnsmasq.init
> +++ b/package/network/services/dnsmasq/files/dnsmasq.init
> @@ -616,7 +616,7 @@ dhcp_add() {
>  
>   case $ra_management in
>   0)
> - # SLACC with DCHP for extended options
> + # SLACC with DHCP for extended options
>   xappend 
> "--dhcp-range=$nettag::,constructor:$ifname,ra-stateless,ra-names"
>   ;;
>   2)
> @@ -816,7 +816,7 @@ dnsmasq_start()
>  {
>   local cfg="$1"
>   local disabled user_dhcpscript
> - local resolvfile resolvdir localuse=0
> + local resolvfile resolvdir leasedir localuse=0
>  
>   config_get_bool disabled "$cfg" disabled 0
>   [ "$disabled" -gt 0 ] && return 0
> @@ -994,7 +994,11 @@ dnsmasq_start()
>   fi
>  
>   config_get leasefile $cfg leasefile "/tmp/dhcp.leases"
> - [ -n "$leasefile" ] && [ ! -e "$leasefile" ] && touch "$leasefile"
> + [ -n "$leasefile" ] && {
> + leasedir="$( dirname "$leasefile" )" && mkdir -p "$leasedir"
> + [ ! -e "$leasefile" ] && touch "$leasefile"
> + }
> +
>   config_get_bool cachelocal "$cfg" cachelocal 1
>  
>   config_get_bool noresolv "$cfg" noresolv 0
> @@ -1154,6 +1158,15 @@ dnsmasq_start()
>   procd_add_jail_mount $EXTRA_MOUNT $RFC6761FILE $TRUSTANCHORSFILE
>   procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir 
> $user_dhcpscript
>   procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts 
> /etc/ethers
> +
> + [ -d "$leasedir" ] && {
> + [ "$leasedir" = '/tmp' ] && {
> + logger -t dnsmasq \
> + "consider using a more private directory for 
> leasefile" \
> + "because jailing /tmp does not work: choose 
> e.g. /tmp/dnsmasq/leasefile"
> + }
> + procd_add_jail_mount_rw $leasedir
> + }
>   procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
>  
>   procd_close_instance
> -- 
> 2.30.2
> 

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


Re: [PATCH 21.02] mwlwifi: downgrade the 88W8964's firmware to 9.3.2.6 to prevent instability

2021-10-18 Thread Arınç ÜNAL
This patch can be closed as it doesn't provide a proper solution.

Arınç

On Thu, Jul 22, 2021 at 7:54 PM Arınç ÜNAL  wrote:
>
> Avoid 88W8964 firmware 9.3.2.12 for Wi-Fi instabilities it causes on Linksys 
> WRT3200ACM & WRT32X until fixes on master branch are backported to 
> openwrt-21.02.
>
> A lot of users, me included, with Linksys WRT32X & WRT3200ACM devices 
> experience often Wi-Fi cutouts on OpenWrt 21.02.0-rc3.
> Here are people who had issues with 9.3.2.12 on WRT3200ACM. They no longer 
> have the issue after installing OpenWrt 19.07 or downgrading to the 9.3.2.6 
> firmware.
> https://forum.openwrt.org/t/pre-compiled-updated-mwlwifi-drivers-for-stable-releases/3262/682
> https://forum.openwrt.org/t/pre-compiled-updated-mwlwifi-drivers-for-stable-releases/3262/688
> https://forum.openwrt.org/t/connectivity-issues-with-wifi/79003
> https://forum.openwrt.org/t/users-needed-to-test-wi-fi-stability-on-linksys-wrt3200acm-wrt32x-on-openwrt-21-02-0-rc3/101700/2
> https://forum.openwrt.org/t/users-needed-to-test-wi-fi-stability-on-linksys-wrt3200acm-wrt32x-on-openwrt-21-02-0-rc3/101700/14
> https://forum.openwrt.org/t/users-needed-to-test-wi-fi-stability-on-linksys-wrt3200acm-wrt32x-on-openwrt-21-02-0-rc3/101700/16
>
> I can confirm downgrading to 9.3.2.6 fixed the Wi-Fi cut-outs on my WRT32X.
> https://forum.openwrt.org/t/users-needed-to-test-wi-fi-stability-on-linksys-wrt3200acm-wrt32x-on-openwrt-21-02-0-rc3/101700
>
> Signed-off-by: Arınç ÜNAL 
> ---
>  package/kernel/mwlwifi/Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile
> index eb986dca03..0d0ac701d9 100644
> --- a/package/kernel/mwlwifi/Makefile
> +++ b/package/kernel/mwlwifi/Makefile
> @@ -15,9 +15,9 @@ PKG_LICENSE_FILES:=
>
>  PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
>  PKG_SOURCE_PROTO:=git
> -PKG_SOURCE_DATE:=2020-02-06
> -PKG_SOURCE_VERSION:=a2fd00bb74c35820dfe233d762690c0433a87ef5
> -PKG_MIRROR_HASH:=0eda0e774a87e58e611d6436350e1cf2be3de50fddde334909a07a15b0c9862b
> +PKG_SOURCE_DATE:=2019-08-18
> +PKG_SOURCE_VERSION:=747796b2f126df01c3c5442c607b4ea0497b1c6c
> +PKG_MIRROR_HASH:=11985b8132edd1db1001748b0fc6d915205b7bcaf2a7512a4befb5ef3cc83bb9
>
>  PKG_MAINTAINER:=Imre Kaloz 
>  PKG_BUILD_PARALLEL:=1
> --
> 2.25.1
>

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


[PATCH] bcm53xx: switch to the upstream DSA-based b53 driver

2021-10-18 Thread Rafał Miłecki
From: Rafał Miłecki 

1. Drop swconfig
2. Simplify network setup
3. Verify network config
4. Disable Buffalo WZR-900DHP for now - it misses ports definition

Signed-off-by: Rafał Miłecki 
---
 target/linux/bcm53xx/Makefile |  2 +-
 .../bcm53xx/base-files/etc/board.d/02_network | 80 +++
 .../etc/uci-defaults/03_dsa_migrate   | 23 ++
 target/linux/bcm53xx/config-5.10  | 19 -
 target/linux/bcm53xx/image/Makefile   |  1 +
 5 files changed, 49 insertions(+), 76 deletions(-)
 create mode 100644 
target/linux/bcm53xx/base-files/etc/uci-defaults/03_dsa_migrate

diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile
index 083f905096..921058d140 100644
--- a/target/linux/bcm53xx/Makefile
+++ b/target/linux/bcm53xx/Makefile
@@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/target.mk
 
 KERNELNAME:=zImage dtbs
 
-DEFAULT_PACKAGES += swconfig nvram \
+DEFAULT_PACKAGES += nvram \
osafeloader oseama otrx \
kmod-gpio-button-hotplug \
kmod-leds-gpio
diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network 
b/target/linux/bcm53xx/base-files/etc/board.d/02_network
index e02286027f..9308801b85 100644
--- a/target/linux/bcm53xx/base-files/etc/board.d/02_network
+++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network
@@ -9,74 +9,24 @@ bcm53xx_setup_interfaces()
 {
local board="$1"
 
-   # On BCM4708 / BCM4709(4) there are 3 Ethernet interfaces connected to 
3 switch
-   # ports. It's up to vendor which to use.
case "$board" in
-   tenda,ac9)
-   ucidef_add_switch "switch0" \
-   "1:lan" "2:lan" "3:lan" "4:lan" "8@eth0" "0:wan" 
"5@eth1"
-   ;;
-   buffalo,wxr-1900dhp| \
-   buffalo,wzr-1750dhp)
-   ucidef_add_switch "switch0" \
-   "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:wan:5" 
"5@eth0"
-   ;;
-   dlink,dir-885l | \
-   netgear,r7900 | \
-   netgear,r8000 | \
-   netgear,r8500)
-   # NVRAM specifies port 8 (eth2) - unsupported by OpenWrt b53
-   # Use port 5 (eth0) as workaround
-   ucidef_add_switch "switch0" \
-   "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0"
+   asus,rt-ac87u)
+   ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
;;
linksys,panamera)
-   ucidef_add_switch "switch1" \
-   "0:lan" "1:lan:7" "2:lan:4" "3:lan:8" "4:wan" "5t@eth0"
-   ;;
-   luxul,abr-4500-v1|\
-   luxul,xbr-4500-v1)
-   ucidef_add_switch "switch0" \
-   "0:wan" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5@eth0"
+   ucidef_set_interfaces_lan_wan "lan4 lan7 lan8 extsw" "wan"
;;
luxul,xap-1610-v1)
-   ucidef_add_switch "switch0" \
-   "0:lan" "1:lan" "5@eth0"
-   ucidef_set_interface_lan "eth0.1" "dhcp"
+   ucidef_set_interface_lan "poe lan" "dhcp"
;;
-   luxul,xwr-3150-v1)
-   ucidef_add_switch "switch0" \
-   "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "5@eth0"
+   meraki,mr32)
+   ucidef_set_interface_lan "poe" "dhcp"
;;
phicomm,k3)
-   ucidef_add_switch "switch0" \
-   "0:lan" "1:lan" "2:lan" "3:wan" "5@eth0"
+   ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
;;
*)
-   # NVRAM entries may contain unsorted ports, e.g. Netgear R6250 
uses
-   # vlan1ports=3 2 1 0 5*
-   # vlan2ports=4 5u
-   # and early Netgear R8000 was using
-   # vlan1ports=3 2 1 0 5 7 8*
-   # (the enclosing echo is needed to convert newline back to 
space)
-   vlan1ports="$(echo $(nvram get vlan1ports | tr " " "\n" | 
sort))"
-   vlan2ports="$(echo $(nvram get vlan2ports | tr " " "\n" | 
sort))"
-   if echo "$vlan1ports" | egrep -q "^1 2 3 4 5" && \
-  echo "$vlan2ports" | egrep -q "^0 5"; then
-   ucidef_add_switch "switch0" \
-   "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" 
"5t@eth0"
-   elif echo "$vlan1ports" | egrep -q "^1 2 3 5 7" && \
-echo "$vlan2ports" | egrep -q "^0 7"; then
-   ucidef_add_switch "switch0" \
-   "1:lan" "2:lan" "3:lan" "5:lan" "0:wan" 
"7t@eth1"
-   elif echo "$vlan1ports" | egrep -q "^0 1 2 3 5 7 8" && \
-echo "$vlan2ports" | egrep -q "^4 8"; then
-   ucidef_add_switch "switch0" \
-   "0:lan" "1:lan" "2:lan" "3:lan" "5:lan" "7:lan" 
"4:wan" "8t@eth2"
-   else
-   ucidef_add_switch "switch0" \
-

Re: RFC: toolchain for building eBPF modules within the OpenWrt build system

2021-10-18 Thread Florian Eckert



I'd suggest to require a preinstalled host toolchain for the time 
being.

How about requiring a preinstalled host toolchain by default, but
building it from source on buildbot?


I wouldn't make it dependent on whether openwrt compiles on the buildbot 
or not.

I am not using this build option CONFIG_BUILDBOT on my own builds.
Either use llvm from the buildhost (distribution), or let the openwrt 
buildsystem build its own llvm in the tool directory as you suggest.


@nbd thank you for looking at this, would have needed the ebpf before 
:-)


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


Re: RFC: toolchain for building eBPF modules within the OpenWrt build system

2021-10-18 Thread Felix Fietkau

On 2021-10-18 15:37, Florian Eckert wrote:


I'd suggest to require a preinstalled host toolchain for the time 
being.

How about requiring a preinstalled host toolchain by default, but
building it from source on buildbot?


I wouldn't make it dependent on whether openwrt compiles on the buildbot
or not.
I am not using this build option CONFIG_BUILDBOT on my own builds.
I'm definitely planning on having a separate option for it. What I meant 
in what I wrote above was to enable that option by default if 
CONFIG_BUILDBOT is set.



Either use llvm from the buildhost (distribution), or let the openwrt
buildsystem build its own llvm in the tool directory as you suggest.

@nbd thank you for looking at this, would have needed the ebpf before
:-)

You're welcome. I plan on pushing my first package using eBPF soon.

- Felix


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


Ubuntu 21.10 fails to compile OpenWrt 21.02 hosts tools (m4)

2021-10-18 Thread Hannu Nyman
I updated my buildhost to Ubuntu 21.10 and noticed that while it compiles 
master ok, the OpenWrt 21.02 build fails already at the tools build stage.


m4 is the failing tool.  Error log below.


I noticed that Rosen has recently updated m4 in master to 1.4.19, so I tested 
cherry-picking the 1.4.19 version update to openwrt-21.02, and it helps. m4 
again compiles  ;-)


Apparently the m4 version 1.4.19 in master contains some fixes for host gcc 
11, or something similar?




make[6]: Entering directory '/Openwrt/r7800-2102/build_dir/host/m4-1.4.18/lib'
depbase=`echo gl_avltree_oset.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2 
-I/Openwrt/r7800-2102/staging_dir/host/include  -MT gl_avltree_oset.o -MD -MP 
-MF $depbase.Tpo -c -o gl_avltree_oset.o gl_avltree_oset.c &&\

mv -f $depbase.Tpo $depbase.Po
depbase=`echo binary-io.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2 
-I/Openwrt/r7800-2102/staging_dir/host/include  -MT binary-io.o -MD -MP -MF 
$depbase.Tpo -c -o binary-io.o binary-io.c &&\

mv -f $depbase.Tpo $depbase.Po
depbase=`echo c-ctype.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2 
-I/Openwrt/r7800-2102/staging_dir/host/include  -MT c-ctype.o -MD -MP -MF 
$depbase.Tpo -c -o c-ctype.o c-ctype.c &&\

mv -f $depbase.Tpo $depbase.Po
depbase=`echo c-stack.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2 
-I/Openwrt/r7800-2102/staging_dir/host/include  -MT c-stack.o -MD -MP -MF 
$depbase.Tpo -c -o c-stack.o c-stack.c &&\

mv -f $depbase.Tpo $depbase.Po
In file included from /usr/include/signal.h:328,
 from ./signal.h:52,
 from c-stack.c:49:
c-stack.c:55:26: error: missing binary operator before token "("
   55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
  |  ^~~~
make[6]: *** [Makefile:1910: c-stack.o] Error 1
make[6]: Leaving directory '/Openwrt/r7800-2102/build_dir/host/m4-1.4.18/lib'
make[5]: *** [Makefile:1674: all] Error 2



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


Re: Ubuntu 21.10 fails to compile OpenWrt 21.02 hosts tools (m4)

2021-10-18 Thread Josef Schlehofer
Hi,

There are already two pull requests, which fixes this issue.

Reference:

[1] https://github.com/openwrt/openwrt/pull/4675 (21.02)

[2] https://github.com/openwrt/openwrt/pull/4674 (19.07)

Regards,

Josef

On 18. 10. 21 16:54, Hannu Nyman wrote:
> I updated my buildhost to Ubuntu 21.10 and noticed that while it
> compiles master ok, the OpenWrt 21.02 build fails already at the tools
> build stage.
>
> m4 is the failing tool.  Error log below.
>
>
> I noticed that Rosen has recently updated m4 in master to 1.4.19, so I
> tested cherry-picking the 1.4.19 version update to openwrt-21.02, and
> it helps. m4 again compiles  ;-)
>
> Apparently the m4 version 1.4.19 in master contains some fixes for
> host gcc 11, or something similar?
>
>
>
> make[6]: Entering directory
> '/Openwrt/r7800-2102/build_dir/host/m4-1.4.18/lib'
> depbase=`echo gl_avltree_oset.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2
> -I/Openwrt/r7800-2102/staging_dir/host/include  -MT gl_avltree_oset.o
> -MD -MP -MF $depbase.Tpo -c -o gl_avltree_oset.o gl_avltree_oset.c &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo binary-io.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2
> -I/Openwrt/r7800-2102/staging_dir/host/include  -MT binary-io.o -MD
> -MP -MF $depbase.Tpo -c -o binary-io.o binary-io.c &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo c-ctype.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2
> -I/Openwrt/r7800-2102/staging_dir/host/include  -MT c-ctype.o -MD -MP
> -MF $depbase.Tpo -c -o c-ctype.o c-ctype.c &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo c-stack.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> gcc  -I.   -I/Openwrt/r7800-2102/staging_dir/host/include   -O2
> -I/Openwrt/r7800-2102/staging_dir/host/include  -MT c-stack.o -MD -MP
> -MF $depbase.Tpo -c -o c-stack.o c-stack.c &&\
> mv -f $depbase.Tpo $depbase.Po
> In file included from /usr/include/signal.h:328,
>  from ./signal.h:52,
>  from c-stack.c:49:
> c-stack.c:55:26: error: missing binary operator before token "("
>    55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
>   |  ^~~~
> make[6]: *** [Makefile:1910: c-stack.o] Error 1
> make[6]: Leaving directory
> '/Openwrt/r7800-2102/build_dir/host/m4-1.4.18/lib'
> make[5]: *** [Makefile:1674: all] Error 2




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


Re: Ubuntu 21.10 fails to compile OpenWrt 21.02 hosts tools (m4)

2021-10-18 Thread Michal Vasilek

On 10/18/21 4:54 PM, Hannu Nyman wrote:
I noticed that Rosen has recently updated m4 in master to 1.4.19, so I 
tested cherry-picking the 1.4.19 version update to openwrt-21.02, and it 
helps. m4 again compiles  ;-)


Apparently the m4 version 1.4.19 in master contains some fixes for host 
gcc 11, or something similar?


This is probably because Ubuntu 21.10 has a new version of glibc which 
is not supported by 1.4.18, but is supported by 1.4.19.

https://lists.gnu.org/archive/html/bug-m4/2021-03/msg0.html

There are pull requests on GitHub to backport the m4 updates to stable 
branches:

https://github.com/openwrt/openwrt/pull/4675

https://github.com/openwrt/openwrt/pull/4674

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


Re: [PATCH] bcm53xx: switch to the upstream DSA-based b53 driver

2021-10-18 Thread Christian Lamparter
Hello,

On Mon, Oct 18, 2021 at 3:06 PM Rafał Miłecki  wrote:
> 1. Drop swconfig
> 2. Simplify network setup
> 3. Verify network config
> 4. Disable Buffalo WZR-900DHP for now - it misses ports definition
>

Nice! MR32's portion of a similar patch (the only change that has
remained... as the DTS is upstream)
in my staging-tree looks very similar.

> +   meraki,mr32)
> +   ucidef_set_interface_lan "poe"
> +   ;;

I opted not to set the dhcp mode as you did since zeroconf wasn't
supported by the udhcp (maybe that has changed?).
But yes, this should be good.

Reviewed-By: Christian Lamparter 

> Signed-off-by: Rafał Miłecki 
> ---
> diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile
> index 083f905096..921058d140 100644
> --- a/target/linux/bcm53xx/Makefile
> +++ b/target/linux/bcm53xx/Makefile
> @@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/target.mk
>
>  KERNELNAME:=zImage dtbs
>
> -DEFAULT_PACKAGES += swconfig nvram \
> +DEFAULT_PACKAGES += nvram \
^^^ See below in the config-5.10 / CONFIG_SWCONFIG=y

> diff --git a/target/linux/bcm53xx/config-5.10 
> b/target/linux/bcm53xx/config-5.10
> index 9d98e812bd..73cccf1d3a 100644
> --- a/target/linux/bcm53xx/config-5.10
> +++ b/target/linux/bcm53xx/config-5.10
> @@ -267,10 +282,6 @@ CONFIG_SPI_MASTER=y
>  CONFIG_SPI_MEM=y
>  CONFIG_SRCU=y
>  CONFIG_SWCONFIG=y

-CONFIG_SWCONFIG=y (it should be possible to remove this line too)

(Or does this symbol creep on back during kernel_*config? if so

# CONFIG_SWCONFIG is not set
)

Cheers,
Christian

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