[PATCH openwrt-19.07] feeds: add freifunk feed

2020-11-05 Thread Daniel Golle
Read the freifunk packages, that have been moved from the LuCI feed
into its own feed in January 2019.
Use openwrt-19.07 branch of that repository for openwrt-19.07.

Signed-off-by: Sven Roederer 
(cherry picked from commit 221f97ff4737f012c90feb086bc1c2ed86c6001b)
Signed-off-by: Daniel Golle 
---
Due to popular demand. Untested.

 feeds.conf.default | 1 +
 1 file changed, 1 insertion(+)

diff --git a/feeds.conf.default b/feeds.conf.default
index 42c2b0ba3b..ad32ec8f4e 100644
--- a/feeds.conf.default
+++ b/feeds.conf.default
@@ -2,3 +2,4 @@ src-git packages 
https://git.openwrt.org/feed/packages.git;openwrt-19.07
 src-git luci https://git.openwrt.org/project/luci.git;openwrt-19.07
 src-git routing https://git.openwrt.org/feed/routing.git;openwrt-19.07
 src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-19.07
+src-git freifunk https://github.com/freifunk/openwrt-packages.git;openwrt-19.07
-- 
2.29.2


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


[PATCH 2/2] target: select procd-seccomp if kernel support is present

2020-11-07 Thread Daniel Golle
Install ld-preload hooks allowing to add seccomp filters for arbitrary
services if kernel support for seccomp is present.

Signed-off-by: Daniel Golle 
---
 include/target.mk | 5 +
 1 file changed, 5 insertions(+)

diff --git a/include/target.mk b/include/target.mk
index 7a74aceb59..d8cb0e6e58 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -41,6 +41,11 @@ ifeq ($(CONFIG_SMALL_FLASH),)
 DEFAULT_PACKAGES+=procd-ujail
 endif
 
+# include seccomp ld-preload hooks if kernel supports it
+ifneq ($(CONFIG_KERNEL_SECCOMP),)
+DEFAULT_PACKAGES+=procd-seccomp
+endif
+
 # For the basic set
 DEFAULT_PACKAGES.basic:=
 # For nas targets
-- 
2.29.2


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


[PATCH 1/2] target: select procd-ujail if !SMALL_FLASH

2020-11-07 Thread Daniel Golle
Add procd-ujail to DEFAULT_PACKAGES if not building for
space-constraint (FEATURES:=small_flash) targets.

Signed-off-by: Daniel Golle 
---
 include/target.mk | 5 +
 1 file changed, 5 insertions(+)

diff --git a/include/target.mk b/include/target.mk
index a2e76f8149..7a74aceb59 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -36,6 +36,11 @@ else
 DEFAULT_PACKAGES+=busybox procd
 endif
 
+# include ujail on systems with enough storage
+ifeq ($(CONFIG_SMALL_FLASH),)
+DEFAULT_PACKAGES+=procd-ujail
+endif
+
 # For the basic set
 DEFAULT_PACKAGES.basic:=
 # For nas targets
-- 
2.29.2


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


[PATCH 0/2] enable procd security features by default

2020-11-07 Thread Daniel Golle
Hi all!

A while ago we have added some useful kernel features to !SMALL_FLASH
devices[1]. To make more use of that by default in a way which will
make exploiting potential vulnerabilities in OpenWrt's services much
harder, it'd be great to also have procd-ujail as well as procd-seccomp
installed by default, adding about 38kB to squashfs rootfs.

As it was reverted after it (actually something else) had broken the
build, I've extensively tested ujail on x86/64, ath79/generic,
ramips/mt7621, malta/mips64be and armvirt/64.

Previous problems on MIPS64 systems (originating from a very strange
compiler bug, but I was able to work around it) are fixed now, thanks
to help from Roman Kuzmitskii (@damex).

I must admit that I have no means to do any tests on PPC platforms and
in order to avoid similar unexpected problems, it'd be great if someone
with PPC hardware could test-run, simply by installing procd-ujail and
procd-seccomp to their system and checking if everything still works as
expected after a reboot (if there are problems you would notice dnsmasq
and ntpd not coming up, as those would be jailed by default in case of
/sbin/ujail being found).

Please report back and voice any concens, it'd be great to have this
included in OpenWrt 20.xx (xx == 11?)

[1]: commit fcb41decf6 ("config: enable some useful features on !SMALL_FLASH 
devices")


Daniel Golle (2):
  target: select procd-ujail if !SMALL_FLASH
  target: select procd-seccomp if kernel support is present

 include/target.mk | 10 ++
 1 file changed, 10 insertions(+)

-- 
2.29.2


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


[PATCH] uqmi: use UUCP-style locking on control device

2020-11-24 Thread Daniel Golle
Use UUCP-style locking to avoid interfering with running commands, eg.
by running 'ifup wwan' while 'ifdown wwan' has not completed yet,
multiple parallel instances of uqmi would occur and mess things up.

Signed-off-by: Daniel Golle 
---
 package/network/utils/uqmi/Makefile   |   2 +-
 .../utils/uqmi/files/lib/netifd/proto/qmi.sh  | 107 +++---
 2 files changed, 68 insertions(+), 41 deletions(-)

diff --git a/package/network/utils/uqmi/Makefile 
b/package/network/utils/uqmi/Makefile
index 68958a3729..da54ba0f46 100644
--- a/package/network/utils/uqmi/Makefile
+++ b/package/network/utils/uqmi/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uqmi
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git
diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh 
b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
index a6c785eb56..f8e64371ae 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -28,16 +28,19 @@ proto_qmi_init_config() {
proto_config_add_defaults
 }
 
-proto_qmi_setup() {
+qmi_setup() {
local interface="$1"
+   local device="$2"
local dataformat connstat plmn_mode mcc mnc
-   local device apn auth username password pincode delay modes pdptype
+   local apn auth username password pincode delay modes pdptype
local profile dhcp dhcpv6 autoconnect plmn timeout mtu 
$PROTO_DEFAULT_OPTIONS
local ip4table ip6table
local cid_4 pdh_4 cid_6 pdh_6
local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6
 
-   json_get_vars device apn auth username password pincode delay modes
+   flock -x 1000 || return -1000
+
+   json_get_vars apn auth username password pincode delay modes
json_get_vars pdptype profile dhcp dhcpv6 autoconnect plmn ip4table
json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS
 
@@ -45,35 +48,8 @@ proto_qmi_setup() {
 
[ "$metric" = "" ] && metric="0"
 
-   [ -n "$ctl_device" ] && device=$ctl_device
-
-   [ -n "$device" ] || {
-   echo "No control device specified"
-   proto_notify_error "$interface" NO_DEVICE
-   proto_set_available "$interface" 0
-   return 1
-   }
-
[ -n "$delay" ] && sleep "$delay"
 
-   device="$(readlink -f $device)"
-   [ -c "$device" ] || {
-   echo "The specified control device does not exist"
-   proto_notify_error "$interface" NO_DEVICE
-   proto_set_available "$interface" 0
-   return 1
-   }
-
-   devname="$(basename "$device")"
-   devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)"
-   ifname="$( ls "$devpath"/net )"
-   [ -n "$ifname" ] || {
-   echo "The interface could not be found."
-   proto_notify_error "$interface" NO_IFACE
-   proto_set_available "$interface" 0
-   return 1
-   }
-
[ -n "$mtu" ] && {
echo "Setting MTU to $mtu"
/sbin/ip link set dev $ifname mtu $mtu
@@ -409,9 +385,50 @@ proto_qmi_setup() {
}
 }
 
+proto_qmi_setup() {
+   local device lock ret
+   json_get_vars device
+
+   [ -n "$ctl_device" ] && device=$ctl_device
+
+   [ -n "$device" ] || {
+   echo "No control device specified"
+   proto_notify_error "$interface" NO_DEVICE
+   proto_set_available "$interface" 0
+   return 1
+   }
+
+   device="$(readlink -f $device)"
+   [ -c "$device" ] || {
+   echo "The specified control device does not exist"
+   proto_notify_error "$interface" NO_DEVICE
+   proto_set_available "$interface" 0
+   return 1
+   }
+
+   devname="$(basename "$device")"
+   devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)"
+   ifname="$( ls "$devpath"/net )"
+   [ -n "$ifname" ] || {
+   echo "The interface could not be found."
+   proto_notify_error "$interface" NO_IFACE
+   proto_set_available "$interface" 0
+   return 1
+   }
+   lock="/var/lock/..LCK.$(basename "$device")"
+   {
+   qmi_setup "$1" "$device"
+   } 1000>"$l

Re: [PATCH 0/2] enable procd security features by default

2020-11-26 Thread Daniel Golle
On Thu, Nov 26, 2020 at 05:43:53PM +0100, Petr Štetiar wrote:
> Daniel Golle  [2020-11-07 14:17:12]:
> 
> Hi,
> 
> > Please report back
> 
> testing now the latest master on rtl8382 booted from initramfs and seeing 
> following:
> 
>  Thu Nov 26 14:45:35 2020 user.notice dnsmasq: DNS rebinding protection is 
> active, will discard upstream RFC1918 responses!
>  Thu Nov 26 14:45:36 2020 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
>  Thu Nov 26 14:45:42 2020 user.err : jail: pivot_root(/tmp/ujail-CgOmPF, 
> /tmp/ujail-CgOmPF/old) failed: Invalid argument
>  Thu Nov 26 14:45:42 2020 daemon.info procd: Instance dnsmasq::cfg01411c s in 
> a crash loop 14 crashes, 0 seconds since last crash
>  Thu Nov 26 14:45:45 2020 user.notice dnsmasq: DNS rebinding protection is 
> active, will discard upstream RFC1918 responses!
>  Thu Nov 26 14:45:45 2020 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
>  Thu Nov 26 14:45:46 2020 user.err : jail: pivot_root(/tmp/ujail-kfIjBM, 
> /tmp/ujail-kfIjBM/old) failed: Invalid argument
>  Thu Nov 26 14:45:46 2020 daemon.info procd: Instance dnsmasq::cfg01411c s in 
> a crash loop 15 crashes, 0 seconds since last crash

Should be fixed in latest master by
commit 7fd3c68137ee0fa4c9f5e7b6f993bd09005f7964
Author: Daniel Golle 
Date:   Fri Nov 27 01:00:31 2020 +0100

initramfs: switch to tmpfs to fix ujail
...


Examples for 3 ways of using ujail in openwrt base which should be
tested on all platforms:
dnsmasq: namespaces
busybox-ntpd: capabilities
umdns: seccomp filter

(plus uxc to manage OCI run-time containers with procd)

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


Re: [PATCH] hostapd: enable airtime policy for the -basic variants

2020-11-27 Thread Daniel Golle
On Wed, Nov 25, 2020 at 11:03:48PM +, Rui Salvaterra wrote:
> Airtime policy configuration is extremely useful in multiple BSS scenarios.
> Since nowadays most people configure both private and guest networks (at
> least), it makes sense to enable it by default, except for the most limited
> of the variants.
> 
> Size of the hostapd-basic-openssl binary (mipsel 24Kc -O2):
> 543944 bytes (airtime policy disabled)
> 548040 bytes (airtime policy enabled)
> 
> Signed-off-by: Rui Salvaterra 
Acked-by: Daniel Golle 

Are there any new UCI options to be added to make use of this?

> ---
> The -mesh variants are basically -full with extra mesh functionality, so they
> already have airtime policy enabled by default.
> 
>  package/network/services/hostapd/files/hostapd-basic.config | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/network/services/hostapd/files/hostapd-basic.config 
> b/package/network/services/hostapd/files/hostapd-basic.config
> index 947e2fa200..33c38192b1 100644
> --- a/package/network/services/hostapd/files/hostapd-basic.config
> +++ b/package/network/services/hostapd/files/hostapd-basic.config
> @@ -384,7 +384,7 @@ CONFIG_TLS=internal
>  #CONFIG_OWE=y
>  
>  # Airtime policy support
> -#CONFIG_AIRTIME_POLICY=y
> +CONFIG_AIRTIME_POLICY=y
>  
>  # Override default value for the wpa_disable_eapol_key_retries configuration
>  # parameter. See that parameter in hostapd.conf for more details.
> -- 
> 2.29.2
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [RFC PATCH 0/4] mac80211: Update to version 5.10-rc6

2020-12-02 Thread Daniel Golle
On Wed, Dec 02, 2020 at 08:56:50PM +0300, Andrey Jr. Melnikov wrote:
> Adrian Schmutzler  wrote:
> > [-- multipart/signed, encoding 7bit, 56 lines --]
> 
> > > > Hauke Mehrtens (4):
> > > >   mac80211: Update to version 5.8.18-test2
> > > >   mac80211: Update to version 5.9.11-test3
> > > >   mac80211: Update to version 5.10-rc6-test5
> > > Can you squash these three commints into one?
> 
> > Having each major version separate might be helpful to track changes more 
> > easily ...
> 
> What is the intermediate commits for in this case? Can't see any reason to
> enalgre git history.

Having them can be nice for bisecting in case of trouble.

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


Re: [PATCH] ramips: Adds support for Comfast CF-E538AC

2020-12-03 Thread Daniel Golle
Hi Sven,

On Thu, Dec 03, 2020 at 06:56:47AM +0100, Sven Danner wrote:
> From: Sven Danner 
>  
> Comfast CF-E538AC is a wall mounted access point with an additional
> Ethernet LAN access port. It supports 802.11AC Wave2 MU-MIMO.
>  
> Serial port access for debricking requires simple soldering of 4 pins.
>  
> Device specifications:
> * SoC: MT7620DA @ 580MHz
> * RAM: 64MiB DDR2
> * Flash: 8iB SPI
> * Wireless 2.4GHz (SoC): b/g/n
> * Wireless 5Ghz (MT7612E): n/ac, 2x2 MU-MINO
> * Ethernet connection back (RTL8211F - port 4): 1× 1GbE, 802.3af PoE
> * Ethernet connection front (RTL8211F - port 5): 1× 1GbE
>  
> Flashing instructions:
> * Upgrade using stock web interface's update feature
>  
> Debricking:
> * Serial port can be soldered on top PCB (marked as 1)
>   (1: VCC, 2: GND, 3: TX, 4: RX)
>     * Use 3.3V, 115200 baud, 8N1
> * Recovery only possible via TFTP
> * Modified U-Boot environment does not allow recovery via serial
>   data transfer (will not commit it to flash)
> * Bootloader will show a menu for 1 seconds
> * Select 2: Load system code then write to Flash via TFTP.
>  
> Signed-off-by: Sven Danner 
> ---
> This is my third submission.
> I hope I have successfully incorporated any feedback
> that I have received and am following the right format.
> Apologies for any inconvenience caused.
>  
> A couple of notes:
> This speed (which 47 of 68 mt7620a devices use) comes straight
> from the stock firmware's DTS file:
>  spi-max-frequency = <1000>;
> At this point I rather not increase it unless necessary.
>  
> This line was suggested to be dropped, but every device
> in /target/linux/ramips/image/mt7620.mk
> is defining that as well:
> +  SUPPORTED_DEVICES += cf-e538ac
> I have left it in for this submission.

Please remove it as it is not needed. Most devices have this in order
to allow upgrading from an older version of OpenWrt. As you are adding
a new device, there are no existing devices already running OpenWrt we
would need to take care of.

> 
> I have still defined LED white:wifi so it will
> appear in LuCI for users
> as the device drivers seem to automatically
> create 4 LEDs in /sys/class/leds
> that are not physically connected:
> 
> mt76-phy0
> rt2800soc-phy1::quality
> rt2800soc-phy1::assoc
> rt2800soc-phy1::radio
>  
> I appreciate all feedback, please be kind and assume
> honest mistakes not maliciousness.

It looks like your email submission got mangled by some email client
which doesn't keep white-space as is. All the tabs became 4 spaces
which means the patch won't apply like this :(
Please use git-send-email, or, in case you really cannot, attach the
output of git-format-patch.

Is there already a device wiki page where I can see dmesg output of
the device booting OpenWrt?

> ---
>  
>  .../ramips/dts/mt7620a_comfast_cf-e538ac.dts  | 149 ++
>  target/linux/ramips/image/mt7620.mk   |  10 ++
>  .../mt7620/base-files/etc/board.d/01_leds |   3 +
>  .../mt7620/base-files/etc/board.d/02_network  |   4 +
>  4 files changed, 166 insertions(+)
>  create mode 100644 target/linux/ramips/dts/mt7620a_comfast_cf-e538ac.dts
> diff --git a/target/linux/ramips/dts/mt7620a_comfast_cf-e538ac.dts 
> b/target/linux/ramips/dts/mt7620a_comfast_cf-e538ac.dts
> new file mode 100644
> index 00..6ccf06531d
> --- /dev/null
> +++ b/target/linux/ramips/dts/mt7620a_comfast_cf-e538ac.dts
> @@ -0,0 +1,149 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> +#include "mt7620a.dtsi"
> +
> +#include 
> +#include 
> +
> +/ {
> +    compatible = "comfast,cf-e538ac", "ralink,mt7620a-soc";
> +    model = "Comfast CF-E538AC";
> +
> +    aliases {
> +        led-boot = &led_wifi;
> +        led-failsafe = &led_wifi;
> +        led-running = &led_wifi;
> +        led-upgrade = &led_wifi;
> +    };
> +
> +    chosen {
> +        bootargs = "console=ttyS0,115200";
> +    };
> +
> +    leds {
> +        compatible = "gpio-leds";
> +
> +        led_wifi: wifi {
> +            label = "white:wifi";
> +            gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
> +        };
> +    };
> +
> +    keys {
> +        compatible = "gpio-keys";
> +
> +        reset {
> +            label = "reset";
> +            gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
> +            linux,code = ;
> +        };
> +    };
> +};
> +
> +&gpio0 {
> +    status = "okay";
> +};
> +
> +&gpio3 {
> +    status = "okay";
> +};
> +
> +&spi0 {
> +    status = "okay";
> +
> +    flash@0 {
> +        compatible = "jedec,spi-nor";
> +        reg = <0>;
> +        spi-max-frequency = <1000>;
> +
> +        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>;
> +          

[PATCH 2/2] mac80211: also make use of wpa_supplicant's getpid ubus method

2020-12-07 Thread Daniel Golle
Use the new 'getpid' method of hostapd instead of querying procd for
the PID of hostapd.

Signed-off-by: Daniel Golle 
---
 package/kernel/mac80211/Makefile  | 2 +-
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 8448350acf..2eb5c17515 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=mac80211
 
 PKG_VERSION:=5.8-1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.8/
 PKG_HASH:=19b4174d89bf11ee221458e11f1e8dace26558498774b823051156f522d2036b
 
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh 
b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 6ca12084cf..46e51b05ac 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -1019,8 +1019,8 @@ drv_mac80211_setup() {
if [ "$no_reload" != "0" ]; then
add_ap=1
ubus wait_for hostapd
+   local hostapd_pid=$(ubus call hostapd getpid | 
jsonfilter -l 1 -e @.pid)
ubus call hostapd config_add 
"{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}"
-   local hostapd_pid=$(ubus call service list '{"name": 
"wpad"}' | jsonfilter -l 1 -e "@['wpad'].instances['hostapd'].pid")
wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 
1
fi
ret="$?"
-- 
2.29.2


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


[PATCH 1/2] hostapd: run as user 'network'

2020-12-07 Thread Daniel Golle
Granting capabilities CAP_NET_ADMIN and CAP_NET_RAW allows running
hostapd and wpa_supplicant without root priviledges.
Add ubus acl allowing the necessary ubus interactions for the 'network'
user running hostapd/wpa_supplicant.
To still allow netifd to acquire the PID of wpa_supplicant and hostapd
introduce a new ubus method 'getpid' for both of them and make use of
that instead of querying procd (which will not work, as procd will
return the PID of ujail)

Signed-off-by: Daniel Golle 
---
 package/network/services/hostapd/Makefile |  9 ++--
 .../network/services/hostapd/files/hostapd.sh |  2 +-
 .../network/services/hostapd/files/wpad.init  | 16 ++
 .../network/services/hostapd/files/wpad.json  | 22 +++
 .../services/hostapd/files/wpad_acl.json  | 10 +
 .../services/hostapd/src/src/ap/ubus.c| 16 ++
 .../hostapd/src/wpa_supplicant/ubus.c | 16 ++
 7 files changed, 88 insertions(+), 3 deletions(-)
 create mode 100644 package/network/services/hostapd/files/wpad.json
 create mode 100644 package/network/services/hostapd/files/wpad_acl.json

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index 61b2a548ef..386c17f99d 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=18
+PKG_RELEASE:=19
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
@@ -149,6 +149,7 @@ define Package/hostapd/Default
   TITLE:=IEEE 802.1x Authenticator
   URL:=http://hostap.epitest.fi/
   DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
+  USERID:=network=101:network=101
   PROVIDES:=hostapd
   CONFLICTS:=$(HOSTAPD_PROVIDERS)
   HOSTAPD_PROVIDERS+=$(1)
@@ -232,6 +233,7 @@ define Package/wpad/Default
   SUBMENU:=WirelessAPD
   TITLE:=IEEE 802.1x Auth/Supplicant
   DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
+  USERID:=network=101:network=101
   URL:=http://hostap.epitest.fi/
   PROVIDES:=hostapd wpa-supplicant
   CONFLICTS:=$(HOSTAPD_PROVIDERS) $(SUPPLICANT_PROVIDERS)
@@ -346,6 +348,7 @@ define Package/wpa-supplicant/Default
   TITLE:=WPA Supplicant
   URL:=http://hostap.epitest.fi/wpa_supplicant/
   DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
+  USERID:=network=101:network=101
   PROVIDES:=wpa-supplicant
   CONFLICTS:=$(SUPPLICANT_PROVIDERS)
   SUPPLICANT_PROVIDERS+=$(1)
@@ -597,10 +600,12 @@ define Install/supplicant
 endef
 
 define Package/hostapd-common/install
-   $(INSTALL_DIR) $(1)/lib/netifd $(1)/etc/rc.button 
$(1)/etc/hotplug.d/ieee80211 $(1)/etc/init.d
+   $(INSTALL_DIR) $(1)/etc/capabilities $(1)/etc/rc.button 
$(1)/etc/hotplug.d/ieee80211 $(1)/etc/init.d $(1)/lib/netifd  
$(1)/usr/share/acl.d
$(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/netifd/hostapd.sh
$(INSTALL_BIN) ./files/wpad.init $(1)/etc/init.d/wpad
$(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps
+   $(INSTALL_DATA) ./files/wpad_acl.json $(1)/usr/share/acl.d
+   $(INSTALL_DATA) ./files/wpad.json $(1)/etc/capabilities
 endef
 
 define Package/hostapd/install
diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 41b04e6029..781a34028a 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -1365,6 +1365,7 @@ wpa_supplicant_run() {
_wpa_supplicant_common "$ifname"
 
ubus wait_for wpa_supplicant
+   local supplicant_pid=$(ubus call wpa_supplicant getpid | jsonfilter -l 
1 -e @.pid)
ubus call wpa_supplicant config_add "{ \
\"driver\": \"${_w_driver:-wext}\", \"ctrl\": \"$_rpath\", \
\"iface\": \"$ifname\", \"config\": \"$_config\" \
@@ -1376,7 +1377,6 @@ wpa_supplicant_run() {
 
[ "$ret" != 0 ] && wireless_setup_vif_failed WPA_SUPPLICANT_FAILED
 
-   local supplicant_pid=$(ubus call service list '{"name": "wpad"}' | 
jsonfilter -l 1 -e "@['wpad'].instances['supplicant'].pid")
wireless_add_process "$supplicant_pid" "/usr/sbin/wpa_supplicant" 1
 
return $ret
diff --git a/package/network/services/hostapd/files/wpad.init 
b/package/network/services/hostapd/files/wpad.init
index 3198e9801f..6c60d539a2 100644
--- a/package/network/services/hostapd/files/wpad.init
+++ b/package/network/services/hostapd/files/wpad.init
@@ -9,17 +9,33 @@ NAME=wpad
 start_service() {
if [ -x "/usr/sbin/hostapd" ]; then
mkdir -p /var/run/hostapd
+   chown network:network /var/run/hostapd
procd_open_instance hostapd
procd_set

Re: [PATCH 1/2] hostapd: run as user 'network'

2020-12-07 Thread Daniel Golle
On Mon, Dec 07, 2020 at 08:57:05PM +0100, Hauke Mehrtens wrote:
> On 12/7/20 7:14 PM, Daniel Golle wrote:
> > Granting capabilities CAP_NET_ADMIN and CAP_NET_RAW allows running
> > hostapd and wpa_supplicant without root priviledges.
> > Add ubus acl allowing the necessary ubus interactions for the 'network'
> > user running hostapd/wpa_supplicant.
> > To still allow netifd to acquire the PID of wpa_supplicant and hostapd
> > introduce a new ubus method 'getpid' for both of them and make use of
> > that instead of querying procd (which will not work, as procd will
> > return the PID of ujail)
> > 
> > Signed-off-by: Daniel Golle 
> > ---
> >   package/network/services/hostapd/Makefile |  9 ++--
> >   .../network/services/hostapd/files/hostapd.sh |  2 +-
> >   .../network/services/hostapd/files/wpad.init  | 16 ++
> >   .../network/services/hostapd/files/wpad.json  | 22 +++
> >   .../services/hostapd/files/wpad_acl.json  | 10 +
> >   .../services/hostapd/src/src/ap/ubus.c| 16 ++
> >   .../hostapd/src/wpa_supplicant/ubus.c | 16 ++
> >   7 files changed, 88 insertions(+), 3 deletions(-)
> >   create mode 100644 package/network/services/hostapd/files/wpad.json
> >   create mode 100644 package/network/services/hostapd/files/wpad_acl.json
> > 
> > diff --git a/package/network/services/hostapd/Makefile 
> > b/package/network/services/hostapd/Makefile
> > index 61b2a548ef..386c17f99d 100644
> > --- a/package/network/services/hostapd/Makefile
> > +++ b/package/network/services/hostapd/Makefile
> > @@ -7,7 +7,7 @@
> >   include $(TOPDIR)/rules.mk
> >   PKG_NAME:=hostapd
> > -PKG_RELEASE:=18
> > +PKG_RELEASE:=19
> >   PKG_SOURCE_URL:=http://w1.fi/hostap.git
> >   PKG_SOURCE_PROTO:=git
> > @@ -149,6 +149,7 @@ define Package/hostapd/Default
> > TITLE:=IEEE 802.1x Authenticator
> > URL:=http://hostap.epitest.fi/
> > DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
> > +  USERID:=network=101:network=101
> 
> Do we have some central uid assignment or at least a list of all used uids?

I grep for 'USERID:=' in all feeds to find out existing assignments
and try to use the same UID/GID values as assigned in FreeBSD (which
does have a central uid/gid allocation scheme)
I vaguely remember a discussion about that some years ago and I'm not
sure what we have concluded back then...

> We should prevent that someone uses 101 on some other package.

Actually UID and GID 101 are defined for the user 'network' in the
base-files package (among with user 'daemon' and user 'ftp', why ever).

> Do you plan to add more services under the network user?

I must admit the choice to use the existing 'network' user was kinda
arbitrary. Unless it would make things really much much easier while
not loosing a lot of security I'd always have a seperate user for
each service.

Potential candidates are:
netifd: in it's current form netifd is not easily restricted, as it
touches a lot of sysctl which isn't covered by capabilities nor can
we chown files in /proc/sys, it launches protocol handler processes
which need priviledges, ...
pppd: would traditionally run as the 'uucp' user, giving it access to
modem chardevs. As it is lauched by netifd rather than being a
procd service we'd have to think of a way that netifd can leverage
procd's jail feautres.
The same applies for odhcpd and odhcp6c, both would be easy to contain
(eg. using seccomp in addition to running non-root with only the
necessary capabilities), but currently netifd's built-in process
management can't do that for us.


> 
> > PROVIDES:=hostapd
> > CONFLICTS:=$(HOSTAPD_PROVIDERS)
> > HOSTAPD_PROVIDERS+=$(1)
> > @@ -232,6 +233,7 @@ define Package/wpad/Default
> > SUBMENU:=WirelessAPD
> > TITLE:=IEEE 802.1x Auth/Supplicant
> > DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
> > +  USERID:=network=101:network=101
> > URL:=http://hostap.epitest.fi/
> > PROVIDES:=hostapd wpa-supplicant
> > CONFLICTS:=$(HOSTAPD_PROVIDERS) $(SUPPLICANT_PROVIDERS)
> > @@ -346,6 +348,7 @@ define Package/wpa-supplicant/Default
> > TITLE:=WPA Supplicant
> > URL:=http://hostap.epitest.fi/wpa_supplicant/
> > DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
> > +  USERID:=network=101:network=101
> > PROVIDES:=wpa-supplicant
> > CONFLICTS:=$(SUPPLICANT_PROVIDERS)
> > SUPPLICANT_PROVIDERS+=$(1)
> > @@ -597,10 +600,12 @@ define Install/supplicant
> >   endef
> >  

Re: [PATCH] ustream-ssl: openssl: fix bio memory leak

2020-12-08 Thread Daniel Golle
On Mon, Nov 02, 2020 at 09:53:28AM +0800, serial115...@outlook.com wrote:
> From: Pan Chen 
> 
> free memory of bio method when ustream be freed

Looked good on the first view, but doesn't compile:
ustream-io-openssl.c: In function 's_ustream_free':
ustream-io-openssl.c:45:17: error: dereferencing pointer to incomplete type 
'BIO' {aka 'struct bio_st'}
  BIO_meth_free(b->method);
   ^~

This is due to type BIO being opaque. We may have to keep a reference
of the ustream method in order to be able to free it.


> 
> Signed-off-by: Pan Chen 
> ---
>  openssl_bio_compat.h | 7 +++
>  ustream-io-openssl.c | 1 +
>  2 files changed, 8 insertions(+)
> 
> diff --git a/openssl_bio_compat.h b/openssl_bio_compat.h
> index 9355c86..39a0455 100644
> --- a/openssl_bio_compat.h
> +++ b/openssl_bio_compat.h
> @@ -28,6 +28,13 @@ static inline BIO_METHOD *BIO_meth_new(int type, const 
> char *name)
>   return bm;
>  }
>  
> +static inline void BIO_meth_free(BIO_METHOD *bm)
> +{
> + if (bm != NULL) {
> + free(bm);
> + }
> +}
> +
>  #endif /* OPENSSL_VERSION_NUMBER */
>  
>  #endif /* OPENSSL_BIO_COMPAT_H */
> diff --git a/ustream-io-openssl.c b/ustream-io-openssl.c
> index 606ed4a..c9d7fae 100644
> --- a/ustream-io-openssl.c
> +++ b/ustream-io-openssl.c
> @@ -42,6 +42,7 @@ s_ustream_free(BIO *b)
>   BIO_set_data(b, NULL);
>   BIO_set_init(b, 0);
>   BIO_clear_flags(b, ~0);
> + BIO_meth_free(b->method);
>   return 1;
>  }
>  
> -- 
> 2.24.1.windows.2
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [PATCH ustream] ustream-openssl: fix bio memory leak

2020-12-09 Thread Daniel Golle
On Wed, Dec 09, 2020 at 05:44:48PM +0100, Petr Štetiar wrote:
> Eneas U de Queiroz  [2020-12-09 13:06:45]:
> 
> Hi,
> 
> > Using the patch by Pan Chen as inspiration, this avoids a memory leak by
> > using a global BIO_METHOD pointer that doesn't ordinarily need to be
> > freed.
> 
> this sounds weird, how is global pointer avoiding memory leaks? :-)

Well, it moves it from "definitely lost" to "still reachable" when
looking at it with valgrind. We will still have to free it as well,
and that could be done just like in the original patch.

> 
> > CC: Pan Chen 
> > 
> > Signed-off-by: Eneas U de Queiroz 
> > 
> > ---
> > Run-tested with a WRT-3200ACM, running uclient_fetch and uhttpd.
> > I have not run it with valgrind or any other debugger.
> 
> how do you otherwise verify the correctness? :-) FYI this is my work in 
> progress[1].
> 
> 1. 
> https://gitlab.com/ynezz/openwrt-ustream-ssl/-/commit/807ce1de752e021802a563783dfa580950746a0c
> 
> Cheers,
> 
> Petr
> 
> ___
> 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


[PATCH 1/3] kernel: update and clean kernel keyring options

2020-12-12 Thread Daniel Golle
Add KERNEL_KEYS_REQUEST_CACHE option.
'tristate' (ie. module builds) are not valid in Config-kernel.in, hence
remove tristate KERNEL_ENCRYPTED_KEYS. It will be readded as a kernel
module in a follow-up commit.

Fixes: 39d817cf38 ("Add config symbols for kernel keyring support")
Signed-off-by: Daniel Golle 
---
 config/Config-kernel.in | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index 1cd9da4d12..b5eba78719 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -531,23 +531,23 @@ if KERNEL_DEVTMPFS
 endif
 
 config KERNEL_KEYS
-bool "Enable kernel access key retention support"
-default n
+   bool "Enable kernel access key retention support"
+   default n
 
 config KERNEL_PERSISTENT_KEYRINGS
-bool "Enable kernel persistent keyrings"
-depends on KERNEL_KEYS
-default n
+   bool "Enable kernel persistent keyrings"
+   depends on KERNEL_KEYS
+   default n
+
+config KERNEL_KEYS_REQUEST_CACHE
+   bool "Enable temporary caching of the last request_key() result"
+   depends on KERNEL_KEYS
+   default n
 
 config KERNEL_BIG_KEYS
-bool "Enable large payload keys on kernel keyrings"
-depends on KERNEL_KEYS
-default n
-
-config KERNEL_ENCRYPTED_KEYS
-tristate "Enable keys with encrypted payloads on kernel keyrings"
-depends on KERNEL_KEYS
-default n
+   bool "Enable large payload keys on kernel keyrings"
+   depends on KERNEL_KEYS
+   default n
 
 #
 # CGROUP support symbols
-- 
2.29.2


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


[PATCH 2/3] kernel: package kmod-keys-encrypted and kmod-keys-trusted

2020-12-12 Thread Daniel Golle
Add kernel module packages for handling encrypted and TPM trusted
keys on the kernel chain.

Signed-off-by: Daniel Golle 
---
 package/kernel/linux/modules/other.mk | 41 +++
 1 file changed, 41 insertions(+)

diff --git a/package/kernel/linux/modules/other.mk 
b/package/kernel/linux/modules/other.mk
index 41de6ac2ba..421b1b536c 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -1103,6 +1103,47 @@ endef
 $(eval $(call KernelPackage,echo))
 
 
+define KernelPackage/keys-encrypted
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=encrypted keys on kernel keyring
+  DEPENDS:=@KERNEL_KEYS +kmod-crypto-cbc +kmod-crypto-hmac +kmod-crypto-rng \
+   +kmod-crypto-sha256 +kmod-keys-trusted
+  KCONFIG:=CONFIG_ENCRYPTED_KEYS
+  FILES:=$(LINUX_DIR)/security/keys/encrypted-keys/encrypted-keys.ko
+  AUTOLOAD:=$(call AutoLoad,01,encrypted-keys,1)
+endef
+
+define KernelPackage/keys-encrypted/description
+   This module provides support for create/encrypting/decrypting keys
+   in the kernel.  Encrypted keys are kernel generated random numbers,
+   which are encrypted/decrypted with a 'master' symmetric key. The
+   'master' key can be either a trusted-key or user-key type.
+   Userspace only ever sees/stores encrypted blobs.
+endef
+
+$(eval $(call KernelPackage,keys-encrypted))
+
+
+define KernelPackage/keys-trusted
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=TPM trusted keys on kernel keyring
+  DEPENDS:=@KERNEL_KEYS +kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha1 
+kmod-tpm
+  KCONFIG:=CONFIG_TRUSTED_KEYS
+  FILES:=$(LINUX_DIR)/security/keys/trusted.ko
+  AUTOLOAD:=$(call AutoLoad,01,trusted-keys,1)
+endef
+
+define KernelPackage/keys-trusted/description
+   This module provides support for creating, sealing, and unsealing
+   keys in the kernel. Trusted keys are random number symmetric keys,
+   generated and RSA-sealed by the TPM. The TPM only unseals the keys,
+   if the boot PCRs and other criteria match.  Userspace will only ever
+   see encrypted blobs.
+endef
+
+$(eval $(call KernelPackage,keys-trusted))
+
+
 define KernelPackage/tpm
   SUBMENU:=$(OTHER_MENU)
   TITLE:=TPM Hardware Support
-- 
2.29.2


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


[PATCH 3/3] kernel: enable kernel keyring by default on !SMALL_FLASH

2020-12-12 Thread Daniel Golle
Enable CONFIG_KEYS by default on systems which are not flash-space
constraint.

Adds about 50kB to vmlinux on ath79/generic (~18kB compressed)

Signed-off-by: Daniel Golle 
---
 config/Config-kernel.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index b5eba78719..3f013aa2b2 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -532,7 +532,7 @@ endif
 
 config KERNEL_KEYS
bool "Enable kernel access key retention support"
-   default n
+   default !SMALL_FLASH
 
 config KERNEL_PERSISTENT_KEYRINGS
bool "Enable kernel persistent keyrings"
-- 
2.29.2


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


Re: [PATCH] procd: add info json output

2020-12-14 Thread Daniel Golle
Hi Florian,

On Mon, Dec 14, 2020 at 01:36:27PM +0100, Florian Eckert wrote:
> By adding the extra command `info` it is now possible to retrieve all
> relevant data from a procd started service directly via the init script.
> 
> Until now, you have to query the ubus with the command:
> ubus call service list '{"name":"","verbose":true}'
> 
> With this change, the init script is now used with the command:
> /etc/init.d/ info
> 
> Signed-off-by: Florian Eckert 
> ---
>  package/base-files/files/etc/rc.common |  5 +
>  package/system/procd/files/procd.sh| 14 ++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/package/base-files/files/etc/rc.common 
> b/package/base-files/files/etc/rc.common
> index f39b69464e..c7fde31d41 100755
> --- a/package/base-files/files/etc/rc.common
> +++ b/package/base-files/files/etc/rc.common
> @@ -121,6 +121,7 @@ extra_command "enabled" "Check if service is started on 
> boot"
>   extra_command "running" "Check if service is running"
>   extra_command "status" "Service status"
>   extra_command "trace" "Start with syscall trace"
> + extra_command "info" "Dump service info as json"
>  
>   . $IPKG_INSTROOT/lib/functions/procd.sh
>   basescript=$(readlink "$initscript")
> @@ -173,6 +174,10 @@ extra_command "enabled" "Check if service is started on 
> boot"
>   _procd_status "$(basename ${basescript:-$initscript})" 
> "$1"
>   fi
>   }
> +
> + info() {
> + _procd_info "$(basename ${basescript:-$initscript})"
> + }
>  }
>  
>  ALL_COMMANDS="${ALL_COMMANDS} ${EXTRA_COMMANDS}"
> diff --git a/package/system/procd/files/procd.sh 
> b/package/system/procd/files/procd.sh
> index d86b7219da..1969cdf973 100644
> --- a/package/system/procd/files/procd.sh
> +++ b/package/system/procd/files/procd.sh
> @@ -474,6 +474,20 @@ _procd_status() {
>   fi
>  }
>  
> +_procd_info() {
> + local service="$1"
> + local data
> +
> + data=$(_procd_ubus_call list | jsonfilter -e '@["'"$service"'"]')
> + [ -z "$data" ] && { echo "not found"; return 3; }
> +
> + json_init
> + json_add_string name "$service"
> + json_add_boolean verbose "1"
> + json_add_string name "$service"

This line seems to be a duplicate of the identical line above.
Adding the field twice doesn't make sense.



> + _procd_ubus_call list
> +}
> +
>  procd_open_data() {
>   local name="$1"
>   json_set_namespace procd __procd_old_cb
> -- 
> 2.20.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


Re: [PATCH] mvebu/cortexa53: add targz rootfs feature

2020-12-14 Thread Daniel Golle
On Mon, Dec 14, 2020 at 10:10:32PM +0100, Josef Schlehofer wrote:
> 
> On 14. 12. 20 21:59, Paul Spooren wrote:
> > The rootfs is required to create rootfs Docker containers. With this
> > feature enable a new runtime test can happen for the aarch64_cortex-a53
> > architecture.
> >
> > CC: Josef Schlehofer 
> > Signed-off-by: Paul Spooren 
> Acked-by: Josef Schlehofer 

Erm, NACK. Why add this to a random target? Wouldn't it be smarter to
use the rootfs of armvirt/32 instead?

> > ---
> >  target/linux/mvebu/cortexa53/target.mk | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/target/linux/mvebu/cortexa53/target.mk 
> > b/target/linux/mvebu/cortexa53/target.mk
> > index fe89d08ffa..10080c0b8f 100644
> > --- a/target/linux/mvebu/cortexa53/target.mk
> > +++ b/target/linux/mvebu/cortexa53/target.mk
> > @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
> >  ARCH:=aarch64
> >  BOARDNAME:=Marvell Armada 3700LP (ARM64)
> >  CPU_TYPE:=cortex-a53
> > -FEATURES+=ext4
> > +FEATURES+=ext4 targz
> >  DEFAULT_PACKAGES+=e2fsprogs ethtool mkf2fs partx-utils
> >  
> >  KERNELNAME:=Image dtbs
> 



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


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


Re: [PATCH] pkg_hash: pkg_hash_check_unresolved: fix segfault

2020-12-24 Thread Daniel Golle
Thanks a lot. Applied.

On Thu, Dec 24, 2020 at 04:10:17PM +0800, Yousong Zhou wrote:
> Signed-off-by: Yousong Zhou 
> ---
>  libopkg/pkg_hash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c
> index 879c0ec..dbed3fe 100644
> --- a/libopkg/pkg_hash.c
> +++ b/libopkg/pkg_hash.c
> @@ -263,7 +263,7 @@ pkg_hash_check_unresolved(pkg_t *maybe)
>   if (unresolved) {
>   res = 1;
>   tmp = unresolved;
> - while (tmp)
> + while (*tmp)
>   free(*(tmp++));
>   free(unresolved);
>   }

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


Re: [RFC PATCH v2 1/3] ramips: add support for the RT6855A SoC

2020-12-28 Thread Daniel Golle
On Mon, Dec 28, 2020 at 02:16:29PM +0100, Adrian Schmutzler wrote:
> Hi,
> 
> some additional (general) remarks below.
> 
> > -Original Message-
> > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> > On Behalf Of Rafaël Carré
> > Sent: Montag, 28. Dezember 2020 01:25
> > To: openwrt-devel@lists.openwrt.org
> > Cc: Rafaël Carré 
> > Subject: [RFC PATCH v2 1/3] ramips: add support for the RT6855A SoC
> > 
> > Add Linksys WAP300N target
> > 
> > Signed-off-by: Rafaël Carré 
> > ---
> > Changes since v1:
> > - Use OpenWrt .dts (CONFIG_MIPS_RAW_APPENDED_DTB)
> > - clean up rt6855a.mk
> > - add case/esac in /etc/board.d/*
> > - tidy up config-5.4
> > 
> >  target/linux/ramips/Makefile  |   2 +-
> >  target/linux/ramips/dts/rt6855a.dtsi  | 190 ++
> >  .../ramips/dts/rt6855a_linksys_wap300n.dts|  22 ++
> >  target/linux/ramips/image/Makefile|   1 +
> >  target/linux/ramips/image/rt6855a.mk  |  12 +
> >  .../rt6855a/base-files/etc/board.d/01_leds|  17 +
> >  .../rt6855a/base-files/etc/board.d/02_network |  17 +
> >  .../base-files/etc/board.d/03_gpio_switches   |  16 +
> >  target/linux/ramips/rt6855a/config-5.4| 344 ++
> >  .../ramips/rt6855a/profiles/00-default.mk |  17 +
> >  target/linux/ramips/rt6855a/target.mk |  15 +
> >  11 files changed, 652 insertions(+), 1 deletion(-)  create mode 100644
> > target/linux/ramips/dts/rt6855a.dtsi
> >  create mode 100644 target/linux/ramips/dts/rt6855a_linksys_wap300n.dts
> >  create mode 100644 target/linux/ramips/image/rt6855a.mk
> >  create mode 100755 target/linux/ramips/rt6855a/base-
> > files/etc/board.d/01_leds
> >  create mode 100755 target/linux/ramips/rt6855a/base-
> > files/etc/board.d/02_network
> >  create mode 100755 target/linux/ramips/rt6855a/base-
> > files/etc/board.d/03_gpio_switches
> >  create mode 100644 target/linux/ramips/rt6855a/config-5.4
> >  create mode 100644 target/linux/ramips/rt6855a/profiles/00-default.mk
> >  create mode 100644 target/linux/ramips/rt6855a/target.mk
> > 
> > diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile
> > index c3d118b2ab..f03118c1aa 100644
> > --- a/target/linux/ramips/Makefile
> > +++ b/target/linux/ramips/Makefile
> > @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk  ARCH:=mipsel
> > BOARD:=ramips  BOARDNAME:=MediaTek Ralink MIPS
> > -SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883
> > +SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883 rt6855a
> >  FEATURES:=squashfs gpio
> > 
> >  KERNEL_PATCHVER:=5.4
> > diff --git a/target/linux/ramips/dts/rt6855a.dtsi
> > b/target/linux/ramips/dts/rt6855a.dtsi
> > new file mode 100644
> > index 00..76cd3da568
> > --- /dev/null
> > +++ b/target/linux/ramips/dts/rt6855a.dtsi
> > @@ -0,0 +1,190 @@
> > +// SPDX-License-Identifier: GPL-2.0
> 
> Please add /dts-v1/; here, with empty line before and after.
> 
> > +/ {
> > +   #address-cells = <1>;
> > +   #size-cells = <1>;
> > +   compatible = "ralink,rt6855a-soc";
> > +
> > +   cpus {
> > +   cpu@0 {
> > +   compatible = "mips,mips34Kc";
> > +   };
> > +   };
> > +
> > +   cpuintc: cpuintc {
> > +   #address-cells = <0>;
> > +   #interrupt-cells = <1>;
> > +   interrupt-controller;
> > +   compatible = "mti,cpu-interrupt-controller";
> > +   };
> > +
> > +   palmbus@1fb0 {
> > +   compatible = "palmbus";
> > +   reg = <0x1fb0 0xe>;
> > +   ranges = <0x0 0x1fb0 0x10>;
> > +
> > +   #address-cells = <1>;
> > +   #size-cells = <1>;
> > +
> > +   sysc@800 {
> > +   compatible = "ralink,rt6855a-sysc";
> > +   reg = <0x800 0x100>;
> > +   };
> > +
> > +   intc: intc@4 {
> > +   compatible = "ralink,rt6855a-intc";
> > +   reg = <0x4 0x100>;
> > +
> > +   interrupt-controller;
> > +   #interrupt-cells = <1>;
> > +
> > +   interrupt-parent = <&cpuintc>;
> > +   };
> > +
> > +   memc@300 {
> > +   compatible = "ralink,rt6855a-memc", "ralink,rt3050-
> > memc";
> > +   reg = <0x300 0x100>;
> > +   };
> > +
> > +   watchdog@f0100 {
> > +   compatible = "ralink,rt6855a-wdt";
> > +   reg = <0xf0100 0x10>;
> > +   };
> > +
> > +   uart: uart@f {
> > +   compatible = "ns8250";
> > +   reg = <0xf 0x30>;
> > +   interrupts = <0>;
> > +
> > +   clock-frequency = <921600>;
> > +
> > +   reg-io-width = <4>;
> > +   reg-shift = <2>;
> > +   no-loopback-test;
> > +
> > +   status = "okay";
> > +
> > +   interrupt-parent = <&intc>;
> > +   };
> > +
> > +   gdma: 

Re: [PATCH] state: check return value of chown

2021-01-02 Thread Daniel Golle
On Sat, Jan 02, 2021 at 10:01:36PM +0800, yehol...@outlook.com wrote:
> From: Ye Holmes 
> 
> Output warning in case changing the ownership of ubus' home
> directory has failed. Besides, this avoids treating unused
> result warning as error by GCC (with glibc-2.31, version 10.2):
> 
> procd-2020-12-12-7f12c89d/state.c: In function 'state_enter':
> procd-2020-12-12-7f12c89d/state.c:147:4: error: ignoring
>   return value of 'chown' declared with attribute
>   'warn_unused_result' [-Werror=unused-result]
>   147 |chown(p->pw_dir, p->pw_uid, p->pw_gid);
>   |^~
> 
> Signed-off-by: Ye Holmes 
> ---
>  state.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/state.c b/state.c
> index 44f56c6..d68776f 100644
> --- a/state.c
> +++ b/state.c
> @@ -144,7 +144,8 @@ static void state_enter(void)
>   if (p) {
>   LOG("- ubus -\n");
>   mkdir(p->pw_dir, 0755);
> - chown(p->pw_dir, p->pw_uid, p->pw_gid);
> + if (chown(p->pw_dir, p->pw_uid, p->pw_gid))
> + fprintf(stderr, "Failed to change ownership for 
> %s\n", p->pw_dir);

Please let's not have a custom error message for cases which
practically never occur. If we would really cover all that, around
80% of the size of executables like procd would be error messages.
Imho an assertion is the right thing to do here.

>   } else {
>   LOG("- ubus (running as root!) -\n");
>   }
> -- 
> 2.25.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


Re: [PATCH] state: check return value of chown

2021-01-04 Thread Daniel Golle
On Mon, Jan 04, 2021 at 05:08:22PM -, Karl Palsson wrote:
> 
> Daniel Golle  wrote:
> > On Sat, Jan 02, 2021 at 10:01:36PM +0800, yehol...@outlook.com
> > wrote:
> 
> > > - chown(p->pw_dir, p->pw_uid, p->pw_gid);
> > > + if (chown(p->pw_dir, p->pw_uid, p->pw_gid))
> > > + fprintf(stderr, "Failed to change ownership for 
> > > %s\n", p->pw_dir);
> > 
> > Please let's not have a custom error message for cases which
> > practically never occur. If we would really cover all that,
> > around 80% of the size of executables like procd would be error
> > messages. Imho an assertion is the right thing to do here.
> > 
> 
> Do we compile with assertions enabled?

Interesting point actually: I just checked, assertions are compiled
into code unless NDEBUG is defined which we don't. Could be an idea for
tiny targets to do so...

> 
> Sincerely,
> Karl Palsson




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


Re: [PATCH v2 1/2] mac80211: add 802.11ad-support

2021-01-04 Thread Daniel Golle
Hi Paul,
Hi Gary,

On Mon, Jan 04, 2021 at 08:27:49PM +0300, Paul Fertser wrote:
> From: Gary Cooper 
> 
> This adds some logic to properly populate defaults in /etc/config/wireless
> and support for WPA*-GCMP. TP-Link AD7200, Mikrotik WAP60g, LHGG-60ad, etc

I've split this thing up a bit more and merged it with what lynxis
already had in his staging tree.
Plus missing PKG_RELEASE bumps added where needed.

Please review and test the 80211ad branch of my staging tree:
https://git.openwrt.org/?p=openwrt/staging/dangole.git;a=shortlog;h=refs/heads/80211ad


Cheers


Daniel


> 
> Signed-off-by: Gary Cooper 
> ---
>  package/base-files/files/sbin/wifi | 1 +
>  package/kernel/mac80211/files/lib/wifi/mac80211.sh | 6 ++
>  package/network/services/hostapd/files/hostapd.sh  | 8 
>  3 files changed, 15 insertions(+)
> 
> diff --git a/package/base-files/files/sbin/wifi 
> b/package/base-files/files/sbin/wifi
> index a8b4451c60..75759b94f3 100755
> --- a/package/base-files/files/sbin/wifi
> +++ b/package/base-files/files/sbin/wifi
> @@ -79,6 +79,7 @@ wifi_fixup_hwmode() {
>   case "$hwmode" in
>   11bg) hwmode=bg;;
>   11a) hwmode=a;;
> + 11ad) hwmode=ad;;
>   11b) hwmode=b;;
>   11g) hwmode=g;;
>   11n*)
> diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh 
> b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
> index c0fbfbe5a8..3e99f06693 100644
> --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
> +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
> @@ -88,6 +88,12 @@ detect_mac80211() {
>   iw phy "$dev" info | grep -q 'VHT Capabilities' && 
> htmode="VHT80"
>   }
>  
> + iw phy "$dev" info | grep -q '\* 5 MHz \[' && {
> + mode_band="ad"
> + channel=$(iw phy "$dev" info | grep '\* 5 MHz \[' | 
> grep '(disabled)' -v -m 1 | sed 's/[^[]*\[\|\|\].*//g')
> + iw phy "$dev" info | grep -q 'Capabilities:' && 
> htmode="HT20"
> + }
> +
>   [ -n "$htmode" ] && ht_capab="set 
> wireless.radio${devidx}.htmode=$htmode"
>  
>   path="$(mac80211_phy_to_path "$dev")"
> diff --git a/package/network/services/hostapd/files/hostapd.sh 
> b/package/network/services/hostapd/files/hostapd.sh
> index 80e1f7cedf..883b7e0e05 100644
> --- a/package/network/services/hostapd/files/hostapd.sh
> +++ b/package/network/services/hostapd/files/hostapd.sh
> @@ -1312,6 +1312,14 @@ wpa_supplicant_add_network() {
>   ;;
>   esac
>  
> + case "$wpa_cipher" in
> + GCMP)
> + append network_data "pairwise=GCMP" "$N$T"
> + append network_data "group=GCMP" "$N$T"
> + ;;
> + *) ;;
> + esac
> +
>   [ "$mode" = mesh ] || {
>   case "$wpa" in
>   1)
> -- 
> 2.20.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


Re: [PATCH v2 1/2] mac80211: add 802.11ad-support

2021-01-05 Thread Daniel Golle
Hi Adrian,

On Tue, Jan 05, 2021 at 01:26:34PM +0100, Adrian Schmutzler wrote:
> > A few remarks on the device-support part:
> 
> Or lets just merge the current crappy state ...

Whooops, sorry for that. I didn't notice your reply in my inbox while
working on the 11ad stuff with lynxis.
I've addressed most of your comments in a follow-up commit.


Cheers


Daniel

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


[PATCH 1/2 iwinfo] iwinfo: add support for GCMP cipher

2021-01-05 Thread Daniel Golle
Extend support for WPA ciphers by GCMP which is required for 802.11ad.
Breaks ABI as ciphers now needs to be a field of 16 bits instead of 8.

Signed-off-by: Daniel Golle 
---
 include/iwinfo.h   | 7 ---
 include/iwinfo/utils.h | 2 +-
 iwinfo_cli.c   | 3 +++
 iwinfo_lua.c   | 3 +++
 iwinfo_nl80211.c   | 5 +++--
 iwinfo_utils.c | 9 ++---
 6 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/include/iwinfo.h b/include/iwinfo.h
index 5e64294..ac70997 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -38,7 +38,8 @@
 #define IWINFO_CIPHER_WEP104 (1 << 5)
 #define IWINFO_CIPHER_AESOCB (1 << 6)
 #define IWINFO_CIPHER_CKIP   (1 << 7)
-#define IWINFO_CIPHER_COUNT  8
+#define IWINFO_CIPHER_GCMP   (1 << 8)
+#define IWINFO_CIPHER_COUNT  9
 
 #define IWINFO_KMGMT_NONE(1 << 0)
 #define IWINFO_KMGMT_8021x   (1 << 1)
@@ -164,8 +165,8 @@ struct iwinfo_freqlist_entry {
 struct iwinfo_crypto_entry {
uint8_t enabled;
uint8_t wpa_version;
-   uint8_t group_ciphers;
-   uint8_t pair_ciphers;
+   uint16_t group_ciphers;
+   uint16_t pair_ciphers;
uint8_t auth_suites;
uint8_t auth_algs;
 };
diff --git a/include/iwinfo/utils.h b/include/iwinfo/utils.h
index 98b9c89..1fa4f52 100644
--- a/include/iwinfo/utils.h
+++ b/include/iwinfo/utils.h
@@ -54,7 +54,7 @@ struct iwinfo_hardware_entry * iwinfo_hardware(struct 
iwinfo_hardware_id *id);
 int iwinfo_hardware_id_from_mtd(struct iwinfo_hardware_id *id);
 
 void iwinfo_parse_rsn(struct iwinfo_crypto_entry *c, uint8_t *data, uint8_t 
len,
- uint8_t defcipher, uint8_t defauth);
+ uint16_t defcipher, uint8_t defauth);
 
 struct uci_section *iwinfo_uci_get_radio(const char *name, const char *type);
 void iwinfo_uci_free(void);
diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index 0332bc2..ed62da8 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -158,6 +158,9 @@ static char * format_enc_ciphers(int ciphers)
if (ciphers & IWINFO_CIPHER_CCMP)
pos += sprintf(pos, "CCMP, ");
 
+   if (ciphers & IWINFO_CIPHER_GCMP)
+   pos += sprintf(pos, "GCMP, ");
+
if (ciphers & IWINFO_CIPHER_WRAP)
pos += sprintf(pos, "WRAP, ");
 
diff --git a/iwinfo_lua.c b/iwinfo_lua.c
index 58a5537..abe848b 100644
--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -61,6 +61,9 @@ static char * iwinfo_crypto_print_ciphers(int ciphers)
if (ciphers & IWINFO_CIPHER_CCMP)
pos += sprintf(pos, "CCMP, ");
 
+   if (ciphers & IWINFO_CIPHER_GCMP)
+   pos += sprintf(pos, "GCMP, ");
+
if (ciphers & IWINFO_CIPHER_WRAP)
pos += sprintf(pos, "WRAP, ");
 
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 2b2a043..07cd916 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1582,10 +1582,11 @@ static struct {
{ "WEP-40",  IWINFO_CIPHER_WEP40 },
{ "NONE",IWINFO_CIPHER_NONE },
{ "TKIP",IWINFO_CIPHER_TKIP },
-   { "CCMP",IWINFO_CIPHER_CCMP }
+   { "CCMP",IWINFO_CIPHER_CCMP },
+   { "GCMP",IWINFO_CIPHER_GCMP }
 };
 
-static void parse_wpa_ciphers(const char *str, uint8_t *ciphers)
+static void parse_wpa_ciphers(const char *str, uint16_t *ciphers)
 {
int i;
size_t l;
diff --git a/iwinfo_utils.c b/iwinfo_utils.c
index b4f98a9..d071997 100644
--- a/iwinfo_utils.c
+++ b/iwinfo_utils.c
@@ -285,7 +285,7 @@ int iwinfo_hardware_id_from_mtd(struct iwinfo_hardware_id 
*id)
return (id->vendor_id && id->device_id) ? 0 : -1;
 }
 
-static void iwinfo_parse_rsn_cipher(uint8_t idx, uint8_t *ciphers)
+static void iwinfo_parse_rsn_cipher(uint8_t idx, uint16_t *ciphers)
 {
switch (idx)
{
@@ -312,9 +312,12 @@ static void iwinfo_parse_rsn_cipher(uint8_t idx, uint8_t 
*ciphers)
*ciphers |= IWINFO_CIPHER_WEP104;
break;
 
+   case 8:
+   *ciphers |= IWINFO_CIPHER_GCMP;
+   break;
+
case 6:  /* AES-128-CMAC */
case 7:  /* No group addressed */
-   case 8:  /* GCMP */
case 9:  /* GCMP-256 */
case 10: /* CCMP-256 */
case 11: /* BIP-GMAC-128 */
@@ -325,7 +328,7 @@ static void iwinfo_parse_rsn_cipher(uint8_t idx, uint8_t 
*ciphers)
 }
 
 void iwinfo_parse_rsn(struct iwinfo_crypto_entry *c, uint8_t *data, uint8_t 
len,
- uint8_t defcipher, uint8_t defauth)
+ uint16_t defcipher, uint8_t defauth)
 {
uint16_t i, count;
uint8_t wpa_version = 0;
-- 
2.30.0


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


[PATCH 2/2 rpcd] iwinfo: add support for 802.11ad and GCMP

2021-01-05 Thread Daniel Golle
Add support for 802.11ad hardware mode as well as the GCMP WPA chipher
(which is commonly used with 802.11ad).

Signed-off-by: Daniel Golle 
---
 iwinfo.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/iwinfo.c b/iwinfo.c
index 1849196..a09f251 100644
--- a/iwinfo.c
+++ b/iwinfo.c
@@ -199,6 +199,9 @@ rpc_iwinfo_add_encryption(const char *name, struct 
iwinfo_crypto_entry *e)
if (ciph & IWINFO_CIPHER_CCMP)
blobmsg_add_string(&buf, NULL, "ccmp");
 
+   if (ciph & IWINFO_CIPHER_GCMP)
+   blobmsg_add_string(&buf, NULL, "gcmp");
+
if (ciph & IWINFO_CIPHER_WRAP)
blobmsg_add_string(&buf, NULL, "wrap");
 
@@ -271,6 +274,9 @@ rpc_iwinfo_call_hwmodes(const char *name)
{
c = blobmsg_open_array(&buf, name);
 
+   if (modes & IWINFO_80211_AD)
+   blobmsg_add_string(&buf, NULL, "ad");
+
if (modes & IWINFO_80211_AC)
blobmsg_add_string(&buf, NULL, "ac");
 
-- 
2.30.0


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


Re: [PATCH 1/2 iwinfo] iwinfo: add support for GCMP cipher

2021-01-05 Thread Daniel Golle
On Tue, Jan 05, 2021 at 03:52:40PM +0100, Ansuel Smith wrote:
> >
> > Extend support for WPA ciphers by GCMP which is required for 802.11ad.
> > Breaks ABI as ciphers now needs to be a field of 16 bits instead of 8.
> >
> 
> If this gets accepted and we are changing the ABI, can we also add my
> changes for the wifi channel analysis feature?

If you ask me, definitely yes, that's very good and useful work.

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


Re: [PATCH] base-files: sysupgrade: store status of system-services

2021-01-09 Thread Daniel Golle
On Sat, Jan 09, 2021 at 01:56:13PM +0200, Reiner Karlsberg wrote:
> Am 09.01.2021 um 13:28 schrieb Stijn Segers:
> 
> > Currently all services get enabled during image creation. This can cause
> > issues after upgrade with services explicitly disabled by the user.
> > With this created list sourced by a simple uci-defaults script the state
> > can be restored automatically.
> 
> Pls, do _NOT_ make this default.
> There might be other entities, besides me, who already have
> implemented methods to work around unnecessary enabled services.
> I.e. to disable service in uci-defaults, like I do.
> Auto-restore service state will break existing code.

Also note that ImageBuilder allows to generate images having
certain services installed but disabled using the
DISABLED_SERVICES=" ..." parameter.

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


Re:

2021-01-12 Thread Daniel Golle
Hi Etan,

On Tue, Jan 12, 2021 at 01:22:16PM +0100, Etan Kissling (IC) via openwrt-devel 
wrote:
> The sender domain has a DMARC Reject/Quarantine policy which disallows
> sending mailing list messages using the original "From" header.
> 
> To mitigate this problem, the original message has been wrapped
> automatically by the mailing list software.

> Date: Tue, 12 Jan 2021 13:22:16 +0100
> From: "Etan Kissling (IC)" 
> To: openwrt-devel@lists.openwrt.org
> Subject: [PATCH] nf-conntrack: allow querying conntrack info in nfqueue
> X-Mailer: Apple Mail (2.3654.40.0.2.32)
> 
> This allows libnetfilter_queue to access connection tracking information
> by requesting NFQA_CFG_F_CONNTRACK. Connection tracking information is
> provided in the NFQA_CT attribute.
> CONFIG_NETFILTER_NETLINK_GLUE_CT enables the interaction between
> nf_queue and nf_conntrack_netlink. Without this option, trying to access
> connection tracking information results in "Operation not supported".

Unfortunately your contribution got mangled by your mailer
program and cannot be applied like that:

checking file package/kernel/linux/modules/netfilter.mk
patch:  malformed patch at line 17: CONFIG_NETFILTER_NETLINK_GLUE_CT=3Dy

(all three patches show mangled new-lines and other kinds of
white-space corruption)

Try sending directly using `git send-email` or use a MUA which doesn't
mangle things.

If both of the above is not an option, you may attach the output of
git format-patch as files to an email to the mailinglist. Do this only
as a last resort, as it will limit the amount of people reviewing and
hence makes it less likely for the patches to make it in.


Cheers


Daniel



> 
> Signed-off-by: Etan Kissling 
> ---
>  package/kernel/linux/modules/netfilter.mk | 2 +-
>  target/linux/generic/config-5.4   | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/kernel/linux/modules/netfilter.mk 
> b/package/kernel/linux/modules/netfilter.mk
> index aacf5948b1..b46fcebc08 100644
> --- a/package/kernel/linux/modules/netfilter.mk
> +++ b/package/kernel/linux/modules/netfilter.mk
> @@ -1002,7 +1002,7 @@ $(eval $(call KernelPackage,nfnetlink-queue))
>  define KernelPackage/nf-conntrack-netlink
>TITLE:=Connection tracking netlink interface
>FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
> -  KCONFIG:=CONFIG_NF_CT_NETLINK CONFIG_NF_CONNTRACK_EVENTS=y
> +  KCONFIG:=CONFIG_NF_CT_NETLINK CONFIG_NF_CONNTRACK_EVENTS=y 
> CONFIG_NETFILTER_NETLINK_GLUE_CT=y
>AUTOLOAD:=$(call AutoProbe,nf_conntrack_netlink)
>$(call AddDepends/nfnetlink,+kmod-ipt-conntrack)
>  endef
> diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
> index 9006c63ecf..15d235fea5 100644
> --- a/target/linux/generic/config-5.4
> +++ b/target/linux/generic/config-5.4
> @@ -3672,6 +3672,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y
>  # CONFIG_NF_CONNTRACK_ZONES is not set
>  # CONFIG_NF_CT_NETLINK is not set
>  # CONFIG_NF_CT_NETLINK_TIMEOUT is not set
> +# CONFIG_NF_CT_NETLINK_HELPER is not set
>  # CONFIG_NF_CT_PROTO_DCCP is not set
>  # CONFIG_NF_CT_PROTO_GRE is not set
>  # CONFIG_NF_CT_PROTO_SCTP is not set
> -- 
> 2.21.1 (Apple Git-122.3)
> 
> 
> 

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


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


Re:

2021-01-12 Thread Daniel Golle
Hi Etan,

patches look good now, they apply cleanly and don't break the build :)

One minor comment below:

On Wed, Jan 13, 2021 at 01:02:05AM +0100, Etan Kissling via openwrt-devel wrote:
> The sender domain has a DMARC Reject/Quarantine policy which disallows
> sending mailing list messages using the original "From" header.
> 
> To mitigate this problem, the original message has been wrapped
> automatically by the mailing list software.

> Date: Wed, 13 Jan 2021 01:02:05 +0100
> From: Etan Kissling 
> To: openwrt-devel@lists.openwrt.org
> Subject: [PATCH] hostapd: add multicast_to_unicast and per_sta_vif
> User-Agent: Microsoft-MacOutlook/16.44.20121301
> 
> This allows configuration of multicast_to_unicast and per_sta_vif options.
> - multicast_to_unicast requests multicast-to-unicast conversion.
> - per_sta_vif assigns each station its own AP_VLAN interface.
> 
> Signed-off-by: Etan Kissling 
> ---
>  package/network/services/hostapd/Makefile   |  2 +-
>  .../network/services/hostapd/files/hostapd.sh   | 17 -
>  2 files changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/package/network/services/hostapd/Makefile 
> b/package/network/services/hostapd/Makefile
> index f57b072974..a6d56d1433 100644
> --- a/package/network/services/hostapd/Makefile
> +++ b/package/network/services/hostapd/Makefile
> @@ -7,7 +7,7 @@
>  include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=hostapd
> -PKG_RELEASE:=23
> +PKG_RELEASE:=24
>  
>  PKG_SOURCE_URL:=http://w1.fi/hostap.git
>  PKG_SOURCE_PROTO:=git
> diff --git a/package/network/services/hostapd/files/hostapd.sh 
> b/package/network/services/hostapd/files/hostapd.sh
> index 7d9ee5121e..4184926d19 100644
> --- a/package/network/services/hostapd/files/hostapd.sh
> +++ b/package/network/services/hostapd/files/hostapd.sh
> @@ -331,6 +331,10 @@ hostapd_common_add_bss_config() {
>   config_add_array airtime_sta_weight
>   config_add_int airtime_bss_weight airtime_bss_limit
>  
> + config_add_boolean multicast_to_unicast
> +
> + config_add_boolean per_sta_vif
> +

Please do not create extra lines (and newlines) for those booleans.


>   config_add_array hostapd_bss_options
>  }
>  
> @@ -480,7 +484,8 @@ hostapd_set_bss_options() {
>   acct_server acct_secret acct_port acct_interval \
>   bss_load_update_period chan_util_avg_period sae_require_mfp \
>   multi_ap multi_ap_backhaul_ssid multi_ap_backhaul_key 
> skip_inactivity_poll \
> - airtime_bss_weight airtime_bss_limit airtime_sta_weight
> + airtime_bss_weight airtime_bss_limit airtime_sta_weight \
> + multicast_to_unicast per_sta_vif
>  
>   set_default isolate 0
>   set_default maxassoc 0
> @@ -942,6 +947,16 @@ hostapd_set_bss_options() {
>   json_for_each_item append_operator_icon operator_icon
>   fi
>  
> + set_default multicast_to_unicast 0
> + if [ "$multicast_to_unicast" -gt 0 ]; then
> + append bss_conf "multicast_to_unicast=$multicast_to_unicast" 
> "$N"
> + fi
> +
> + set_default per_sta_vif 0
> + if [ "$per_sta_vif" -gt 0 ]; then
> + append bss_conf "per_sta_vif=$per_sta_vif" "$N"
> + fi
> +
>   json_get_values opts hostapd_bss_options
>   for val in $opts; do
>   append bss_conf "$val" "$N"
> -- 
> 2.21.1 (Apple Git-122.3)
> 
> 
> 
> 

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


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


Re:

2021-01-17 Thread Daniel Golle
On Thu, Jan 14, 2021 at 02:29:31PM +0100, Etan Kissling via openwrt-devel wrote:
> The sender domain has a DMARC Reject/Quarantine policy which disallows
> sending mailing list messages using the original "From" header.
> 
> To mitigate this problem, the original message has been wrapped
> automatically by the mailing list software.

> Date: Thu, 14 Jan 2021 14:29:31 +0100
> From: Etan Kissling 
> To: openwrt-devel@lists.openwrt.org
> Subject: [PATCH 19.07] nf-conntrack: allow querying conntrack info in
>  nfqueue
> User-Agent: Microsoft-MacOutlook/16.45.21011103
> 
> This allows libnetfilter_queue to access connection tracking information
> by requesting NFQA_CFG_F_CONNTRACK. Connection tracking information is
> provided in the NFQA_CT attribute.
> CONFIG_NETFILTER_NETLINK_GLUE_CT enables the interaction between
> nf_queue and nf_conntrack_netlink. Without this option, trying to access
> connection tracking information results in "Operation not supported".
> 
> Backport from master.

I think backporting all this is ok, but please add references to the
corresponding commit in master (or `git cherry-pick -x`, if possible).


> 
> Signed-off-by: Etan Kissling 
> ---
>  package/kernel/linux/modules/netfilter.mk | 2 +-
>  target/linux/generic/config-4.14  | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/kernel/linux/modules/netfilter.mk 
> b/package/kernel/linux/modules/netfilter.mk
> index 53188eab5a..c1db9aa203 100644
> --- a/package/kernel/linux/modules/netfilter.mk
> +++ b/package/kernel/linux/modules/netfilter.mk
> @@ -1013,7 +1013,7 @@ $(eval $(call KernelPackage,nfnetlink-queue))
>  define KernelPackage/nf-conntrack-netlink
>TITLE:=Connection tracking netlink interface
>FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
> -  KCONFIG:=CONFIG_NF_CT_NETLINK CONFIG_NF_CONNTRACK_EVENTS=y
> +  KCONFIG:=CONFIG_NF_CT_NETLINK CONFIG_NF_CONNTRACK_EVENTS=y 
> CONFIG_NETFILTER_NETLINK_GLUE_CT=y
>AUTOLOAD:=$(call AutoProbe,nf_conntrack_netlink)
>$(call AddDepends/nfnetlink,+kmod-ipt-conntrack)
>  endef
> diff --git a/target/linux/generic/config-4.14 
> b/target/linux/generic/config-4.14
> index d54ede9efd..25b3de9f18 100644
> --- a/target/linux/generic/config-4.14
> +++ b/target/linux/generic/config-4.14
> @@ -3252,6 +3252,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y
>  # CONFIG_NF_CONNTRACK_ZONES is not set
>  # CONFIG_NF_CT_NETLINK is not set
>  # CONFIG_NF_CT_NETLINK_TIMEOUT is not set
> +# CONFIG_NF_CT_NETLINK_HELPER is not set
>  # CONFIG_NF_CT_PROTO_DCCP is not set
>  # CONFIG_NF_CT_PROTO_GRE is not set
>  # CONFIG_NF_CT_PROTO_SCTP is not set
> -- 
> 2.21.1 (Apple Git-122.3)
> 
> 
> 
> 

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


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


Re: Job board support on openwrt.org?

2021-01-22 Thread Daniel Golle
Hi Philip,

On Fri, Jan 22, 2021 at 11:23:42AM -0700, Philip Prindeville wrote:
> Hi,
> 
> Is anyone interested in adding a page to the openwrt.org site about 
> developers willing to do commercial work?
> 
> It could be as simple as:
> 
> * name
> * email address
> * mobile (if wanted)
> * packages/platforms/architectures you maintain or have competence in
> * whether you're available full-time, part-time, or currently unavailable
> 
> Might be useful for matching up devs with work.

While I like the idea and would probably benefit from it myself, I'm
a bit sceptical when it comes to making OpenWrt.org an institution
certifying developers. Too much trouble was caused over having
'@openwrt.org' addresses and I doubt we are able to handle the
moderation needs (think: classic fraud, fishing, ...) of such a thing
if it is even a wiki, ie. free to edit for all.
Things like a wiki with only volunteer moderation somehow work because
there is little to no commercial interest in manipulation and it is
usually easy to recognize (ie. classic spam). In the moment that we
change that, we have to be prepared to also face a different quality
of manipulation attempts.

Just my 2 cents...

> 
> Just an idea to help our community prosper.
> 
> Thanks,
> 
> -Philip
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: ntpd problem if procd-ujail is enabled

2021-01-27 Thread Daniel Golle
On Wed, Jan 27, 2021 at 05:17:48PM +0100, e9hack wrote:
> Hi,
> 
> if procd-ujail is enabled, /etc/hotplug.d/25-dnsmasqsec isn't executed after 
> time synchronization.

It should be executed (i've tried), but as user 'ntp', hence the added
ACLs. I've recently reworked support for non-root hotplug calls via
ubus, please see my staging tree and let me know if the last 3 commits
in my staging tree fix that for you:

[1/3] procd: add hotplug-call dispatcher ubus objects
[2/3] busybox: sysntpd: make use of new ubus hotplug.ntp...
[3/3] dnsmasq: switch to ubus-based hotplug call master

https://git.openwrt.org/?p=openwrt/staging/dangole.git;a=summary



> 
> Regards,
> Hartmut
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [PATCH 0/2] enable procd security features by default

2021-02-09 Thread Daniel Golle
Hi!

On Tue, Feb 09, 2021 at 10:28:32AM +0100, Petr Štetiar wrote:
> 
> Daniel Golle  [2020-11-07 14:17:12]:
> 
> Hi,
> 
> > Please report back
> 
> FYI just noticed following on imx6q latest master:

Thank you for reporting! This indeed looks like a problem.

> 
>  user.notice firewall: Reloading firewall due to ifup of wan (eth0)
>  user.err : jail: failed to clone/fork: Invalid argument
>  user.err : jail: failed to clone/fork: Invalid argument
>  user.err : jail: failed to clone/fork: Invalid argument
>  user.err : jail: failed to clone/fork: Invalid argument
>  user.err : jail: failed to clone/fork: Invalid argument
>  user.err : jail: failed to clone/fork: Invalid argument

What you are seeing here is the return value of the clone() call,
indicating that it has failed. As it doesn't fail on other similar
ARM-32 targets (I'm testing myself on ipq4xxx), I assume that imx6
is lacking some kernel features.

From CLONE(2) man page:
...
 EINVAL CLONE_NEWIPC was specified in the flags mask, but the kernel was not 
configured with the CONFIG_SYSVIPC and CONFIG_IPC_NS options.
 EINVAL CLONE_NEWNET was specified in the flags mask, but the kernel was not 
configured with the CONFIG_NET_NS option.
 EINVAL CLONE_NEWPID was specified in the flags mask, but the kernel was not 
configured with the CONFIG_PID_NS option.
 EINVAL CLONE_NEWUSER was specified in the flags mask, but the kernel was not 
configured with the CONFIG_USER_NS option.
 EINVAL CLONE_NEWUTS was specified in the flags mask, but the kernel was not 
configured with the CONFIG_UTS_NS option.
...
(among a lot of other possible reasons for EINVAL, but all those should
occur equally on my testing platforms as well)


Can you share the output of

ubus call container get_features

and if that looks all good, maybe check the running kernel (ie. build
with kmod-ikconfig and look at /proc/config.gz).

If you haven't arrived at something obvious at that point, I guess the
next thing I'd do is testing if `runc` works, ie. pull a random small
docker container and see if that starts.

Last imx6 hardware I touched was SolidRun's CuBox and that's a while
ago, I have vague memories of giving it away to a friend to run Kodi...


Cheers


Daniel

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


Re: [PATCH] mpc85xx-p1010: add Kernel 5.10 support

2021-02-16 Thread Daniel Golle
On Tue, Feb 16, 2021 at 11:48:04PM +0100, David Bauer wrote:
> Tested on: Sophos RED 15W
> 
> The TP-Link WL-WDR4900 needs to be disabled when 5.10 becomes the
> default kernel.

That's sad. Why?

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


Re: [PATCH 5/5] mediatek: fix bpi-r64 default switch config

2021-02-24 Thread Daniel Golle
On Wed, Feb 24, 2021 at 09:10:39PM +0200, Oskari Lemmela wrote:
> bananapi r64 uses mediatek,mt753x gsw switch device.
> configure network defaults accordingly.
> 
> Signed-off-by: Oskari Lemmela 
> ---
>  target/linux/mediatek/image/mt7622.mk   | 6 --
>  .../linux/mediatek/mt7622/base-files/etc/board.d/02_network | 3 ++-
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/target/linux/mediatek/image/mt7622.mk 
> b/target/linux/mediatek/image/mt7622.mk
> index 1d1c2f8a80..50d319ba5c 100644
> --- a/target/linux/mediatek/image/mt7622.mk
> +++ b/target/linux/mediatek/image/mt7622.mk
> @@ -6,7 +6,8 @@ define Device/bpi_bananapi-r64
>DEVICE_MODEL := Banana Pi R64
>DEVICE_DTS := mt7622-bananapi-bpi-r64
>SUPPORTED_DEVICES := bananapi,bpi-r64
> -  DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk
> +  DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk \
> + swconfig

This will be obsolete with 5.10 and using DSA where the previous
defaults are just fine.
Let's not introduce swconfig now just to drop it again in a few days
when Linux 5.10 support will be in openwrt.git as well.

The other 4 patches look good, I'll merge them after a round of
testing.

>  endef
>  TARGET_DEVICES += bpi_bananapi-r64
>  
> @@ -17,7 +18,8 @@ define Device/bpi_bananapi-r64-rootdisk
>DEVICE_DTS_DIR := ../dts
>SUPPORTED_DEVICES := bananapi,bpi-r64
>DEVICE_PACKAGES := kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
> - mkf2fs e2fsprogs kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk
> + mkf2fs e2fsprogs kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk \
> + swconfig
>IMAGES := sysupgrade-emmc.bin.gz
>IMAGE/sysupgrade-emmc.bin.gz := sysupgrade-emmc | gzip | append-metadata
>  endef
> diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network 
> b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
> index 3a409c8ec9..88a22dfb74 100755
> --- a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
> +++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
> @@ -11,7 +11,8 @@ mediatek_setup_interfaces()
>   case $board in
>   bananapi,bpi-r64-rootdisk|\
>   bananapi,bpi-r64)
> - ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" wan
> + ucidef_add_switch "switch0" \
> +   "1:lan" "2:lan" "3:lan" "4:lan" "6u@eth0" 
> "0:wan" "5u@eth1"
>   ;;
>   mediatek,mt7622-rfb1)
>   ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
> -- 
> 2.25.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


Re: [PATCH] tools: add xxd (from vim)

2021-03-01 Thread Daniel Golle
Hi Petr,

On Mon, Mar 01, 2021 at 09:12:46AM +0100, Petr Štetiar wrote:
> Daniel Golle  [2021-02-28 19:26:07]:
> 
> Hi Daniel,
> 
> > U-Boot requires xxd to create the default environment from an external file
> > as done in uboot-mediatek.
> 
> it's not essential package for everyone, so why are you forcing everyone to
> download Vim now? Can't you solve it as host dependency in that package?
> 
> > Build xxd (only, not the rest of vim) as part of tools to make sure it is
> > present on the buildhost.
> 
> Why not Emacs? :-) I mean, this Vim tarball is 12M (D'oh!), can't this be
> fixed by xxd from Busybox for example? Or by other means, like including the
> small sources in the tree directly?

Busybox is built for the target, not on the host.

> 
> FYI we're likely going to demand swig[1] soon as host dependency and not
> building it as tool, because it would be support and maintenance nightmare.
> Maybe this could be an option for this case as well?
> 
> 1. 
> https://lists.infradead.org/pipermail/openwrt-devel/2021-February/033654.html

There already is a host build of vim, however, it's on packages repo.
I didn't want to import all of that to the main repo, but just build
xxd, which neither has the dependencies nor the build-complexity of
vim, but it's mery a single C file which didn't change in 20 years.

Hence yes, maybe it's ok to duplicate the source file to avoid
downloading vim on the host system.


> 
> Cheers,
> 
> Petr

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


Re: [PATCH 0/6] firmware-utils/ptgen: improvements

2021-03-03 Thread Daniel Golle
Hi Oskari,

On Tue, Mar 02, 2021 at 09:42:05PM +0200, Oskari Lemmela wrote:
>  - Clean compile warnings 
>  - Fix GPT guid and EFI System Partition naming
>  - Add support for hybrid MBR partitions
>  - Use LBA addressing for GPT and don't leave
>gaps between partitions.
>  - use hybrid partitions for mt7622 image generation 
> 
> Oskari Lemmela (6):
>   firmware-utils/ptgen: fix compile warnings
>   firmware-utils/ptgen: fix partition guid and name
>   firmware-utils/ptgen: add support for hybrid MBR
>   firmware-utils/ptgen: change GPT to LBA addressing
>   mediatek: mt7622: use ptgen generated MBR header
>   mediatek: mt7622: change image generation


Thank you for this great work! I've tested it extensively on my local
device and I'm happy we got rid of yet another blob :)
Pushed.


Cheers


Daniel

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


Re: [PATCH 0/2] Fix OpenWrt images in current U-boot

2021-03-04 Thread Daniel Golle
Hi Robert,

On Thu, Mar 04, 2021 at 12:37:20PM +0100, Robert Marko wrote:
> U-boot will reject the nodes with @ for the address since
> commit:
> https://gitlab.denx.de/u-boot/u-boot/-/commit/79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4
> 
> This in turn will cause the failure to boot with OpenWrt
> generated images.
> 
> So, to rectify that simply replace @ with -.

I've pulled your patches into my staging tree and also covered the
recently added additions to mkits.sh (rootfs@1, initrd@1).
I tested on the BPi-R64 and Linksys E8450 devices (U-Boot 2020.10).
Neither the new block/partitions/fit.c parser nor oldschool
drivers/mtd/mtdsplit/fit.c rely on that '@' sign, so things should
be fine equally for all platforms using mkits.sh in some way or
another.

Is the dash '-' symbol the recommened separator to be used for
enumarated image nodes? Just not to introduce the next 'smart' (but
practically unneeded, at least for) convention which will then
later on again need to be fixed before anyone ever adds more than
one image of each type (which isn't actually supported anywhere,
not in mkits.sh, neither anywhere else in the build system).

Of course, it would be very nice to use the fancy features FIT can
offer such as having a single image with several DTB nodes and letting
the bootloader choose the right one for the board. (quite some work
on the build-system would be needed for that).

Or bundling additional squashfs blobs which are overlay-mounted
on top of the regular rootfs eg. for localization or community mesh
firmware.
I'm already working on that and if more platforms switch to use the fit
partition parser and start using `mkimage -E`-style (_external data_)
FIT images including the rootfs or initrd as FIT sub-images instead of
writing rootfs at (from bootloader perspective) arbitrary,
platform-specific location into the flash or compiling the initrd as
object into the kernel (not cool for ImageBuilder...).

However, even with all those cool features in mind, I still don't see
the point of supporting **enumerated** images with a name-prefix, let
it be kernel-1, kernel1, kernel_1, kernel#1 or whatever.
If we ever support multi-dtb or multi-kernel images, then the names
should be more meaningful, eg. kernel-mvebu-cortexa72 and
kernel-mediatek-mt7622 along with several names DTBs, eg.
dtb-mt7622-linksys-e8450, dtb-marvell-macchiatobin-doubleshot and
potentially a lot of devices, all supported by that single image.
When flashing such an image to a device, we could drop the uneeded
sub-images (ie. not matching selected config). (anyone interested?)



Cheers



Daniel


> 
> Robert Marko (2):
>   scripts: mktish.sh: replace @ with - in nodes
>   build: use config-1 instead of config@1 as default
> 
>  include/image-commands.mk | 2 +-
>  include/image.mk  | 2 +-
>  scripts/mkits.sh  | 8 
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> -- 
> 2.29.2
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [PATCH procd] inittab: detect active console from kernel if no console= specified

2021-03-07 Thread Daniel Golle
Hi Mathew,


On Fri, Mar 05, 2021 at 12:54:15AM +, Mathew McBride wrote:
> The default serial console can be set in the device tree
> using the linux,stdout-path parameter (or equivalent from ACPI).
> 
> This is important for universal booting (EFI/EBBR) on ARM platforms
> where the default console can be different (e.g ttyS0 vs ttyAMA0).

Thank you for your patch, this was on my todo-list as well.


Cheers


Daniel

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


Re: [PATCH opkg] libopkg: pkg_hash: prefer original packages to satisfy dependencies

2021-03-12 Thread Daniel Golle
On Sat, Mar 13, 2021 at 02:00:40AM +0100, Matthias Schiffer wrote:
> When one package "provides" another non-virtual package, prefer to use
> the original package instead of the providing package.
> 
> Example:
> 
> Consider packages "foo" and "bar", where "foo" provides "bar".
> The current code will sort all candidates by name and use the last entry
> by default, so "foo" would be used to satisfy a dependency on "bar".
> Change the logic to prefer the actual package "bar" in this case.
> 

Reviewed-by: Daniel Golle 

> Signed-off-by: Matthias Schiffer 
> ---
>  libopkg/pkg_hash.c | 14 --
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c
> index dbed3febfbbe..a07a25ec1e0b 100644
> --- a/libopkg/pkg_hash.c
> +++ b/libopkg/pkg_hash.c
> @@ -284,6 +284,7 @@ pkg_t 
> *pkg_hash_fetch_best_installation_candidate(abstract_pkg_t * apkg,
>   int nmatching = 0;
>   int wrong_arch_found = 0;
>   int arch_priority;
> + int good_pkg_score = 0;
>   pkg_vec_t *matching_pkgs;
>   abstract_pkg_vec_t *matching_apkgs;
>   abstract_pkg_vec_t *provided_apkg_vec;
> @@ -409,9 +410,18 @@ pkg_t 
> *pkg_hash_fetch_best_installation_candidate(abstract_pkg_t * apkg,
>   for (i = 0; i < matching_pkgs->len; i++) {
>   pkg_t *matching = matching_pkgs->pkgs[i];
>   if (constraint_fcn(matching, cdata)) {
> - opkg_msg(DEBUG, "Candidate: %s %s.\n",
> -  matching->name, pkg_get_string(matching, 
> PKG_VERSION));
> + int score = 1;
> + if (strcmp(matching->name, apkg->name) == 0)
> + score++;

++score;

As you are not using the return value, no need for post-increment.
The compiler should be able to recognize and optmize that away by now
though, so probably it doesn't matter.

> +
> + opkg_msg(DEBUG, "Candidate: %s %s (score %d).\n",
> +  matching->name, pkg_get_string(matching, 
> PKG_VERSION),
> +  score);
> + if (score < good_pkg_score)
> + continue;
> +
>   good_pkg_by_name = matching;
> + good_pkg_score = score;
>   /* It has been provided by hand, so it is what user 
> want */
>   if (matching->provided_by_hand == 1)
>   break;
> -- 
> 2.30.2
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: RT3662 NAND support

2021-03-18 Thread Daniel Golle
Hi Andreas,

On Thu, Mar 18, 2021 at 10:42:35PM +0100, Andreas Böhler wrote:
> Hi,
> 
> I'm trying to add support for an older ZWave bridge, the MiCasaVerde Vera
> Lite (similar or equal to SERCOMM NA300). It's based on RT3662, 64MB RAM and
> 32MB NAND flash - and this is where I'm currently stuck. The rt3883.dtsi
> does not define a NAND controller and I'm unsure whether there actually is a
> suitable driver.
> 
> How can I best find/add a NAND driver for RT3662, or is it not worth the
> effort?

Good question, especially without the datasheet or any piece of code to
look at. If you are up for a lot of hard work, a starting point could
be here:

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

MT7620 was the successor of those SoCs, I would guess the NAND
controller is probably very similar to this one. MT7621 is a more
different design of NAND controller which came after, and as you can
see in the PR, the "old" MT7620 NAND was never cleaned up nor merged
into OpenWrt. For you it could still be worth the shot, if you find the
full datasheet of RT3662 somewhere you can compare with MT7620 (which
is easy to find).


Cheers


Daniel


> 
> Thanks
> 
> 
> ___
> 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


[PATCH] mwlwifi: remove target dependency

2021-03-21 Thread Daniel Golle
Users complained that building images for various mvebu Linksys devices
fails when using the ImageBuilder, it complains about the package
'mwlwifi-firmware-88w8964' not being found.

Turns out the package builds fine in mvebu/cortex-a9 images build, but
isn't built at all for arm/cortex-a9 packages. This is because we are
using the SDK for bcm53xx/generic to build packages for arm/cortex-a9,
hence the dependency for @TARGET_mvebu fails.

Remove the target dependency as kmod-mwlwifi as well as firmware
packages actually build fine on all platforms (and people might even
want to use Marvell mPCIe Wifi on non-mvebu platforms).
As a result, the missing 'mwlwifi-firmware-'* packages should become
available for arm/cortex-a9 (and all other platforms).

Signed-off-by: Daniel Golle 
---
See also:
https://forum.openwrt.org/t/recent-imagebuilder-build-issues-for-wrt3200acm-on-master/91802

 package/kernel/mwlwifi/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile
index 648c826ccb..14973d0010 100644
--- a/package/kernel/mwlwifi/Makefile
+++ b/package/kernel/mwlwifi/Makefile
@@ -28,7 +28,7 @@ include $(INCLUDE_DIR)/package.mk
 define KernelPackage/mwlwifi
   SUBMENU:=Wireless Drivers
   TITLE:=Marvell 88W8864/88W8897/88W8964/88W8997 wireless driver
-  DEPENDS:=+kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT 
@PCI_SUPPORT @TARGET_mvebu
+  DEPENDS:=+kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT 
@PCI_SUPPORT
   FILES:=$(PKG_BUILD_DIR)/mwlwifi.ko
   AUTOLOAD:=$(call AutoLoad,50,mwlwifi)
 endef
@@ -54,7 +54,7 @@ define Package/mwlwifi-firmware-default
   SECTION:=firmware
   CATEGORY:=Firmware
   TITLE:=Marvell $(1) firmware
-  DEPENDS:=+kmod-mwlwifi @TARGET_mvebu
+  DEPENDS:=+kmod-mwlwifi
 endef
 
 define Package/mwlwifi-firmware/install
-- 
2.31.0


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


Re: [PATCH] procd: Adding support to detect Pantavisor Container Platform

2021-03-22 Thread Daniel Golle
On Mon, Mar 22, 2021 at 03:38:25PM +0530, Gaurav Pathak wrote:
> Hi John,
> 
> I missed your message, seems like it didn't land in inbox or spam folder of 
> my e-mail.
> 
> >   as it runs a custom modified version
> > of LXC
> 
>   > I assume that if this is a custom downstream version then the change 
> is 
>   > not applicable for merge into upstream owrt. please explain what 
> "custom 
>   > version" means.
> 
> > John
> 
> Actually, we don't use a custom version of lxc, we use the upstream stable 
> lxc.
> The reason for this patch is that the hardcoded mount of /dev prevents our 
> way of usage of openwrt in containers.

In that case I believe the best is to revert the patch which applies a
Pantavisor-specific hack to detect if running inside a container and
switch to a method which works for all users of LXC equally (like it
is has already been done for Docker, see container.h in procd sources).

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


Re: [PATCH] procd: Adding support to detect Pantavisor Container Platform

2021-03-22 Thread Daniel Golle
On Mon, Mar 22, 2021 at 05:00:06PM +0530, Gaurav Pathak wrote:
> On Mon, Mar 22, 2021 at 10:42:25AM +0000, Daniel Golle wrote:
> > On Mon, Mar 22, 2021 at 03:38:25PM +0530, Gaurav Pathak wrote:
> > >   > I assume that if this is a custom downstream version then the change 
> > > is 
> > >   > not applicable for merge into upstream owrt. please explain what 
> > > "custom 
> > >   > version" means.
> > > 
> > > Actually, we don't use a custom version of lxc, we use the upstream 
> > > stable lxc.
> > > The reason for this patch is that the hardcoded mount of /dev prevents 
> > > our way of usage of openwrt in containers.
> > 
> > In that case I believe the best is to revert the patch which applies a
> > Pantavisor-specific hack to detect if running inside a container and
> > switch to a method which works for all users of LXC equally (like it
> > is has already been done for Docker, see container.h in procd sources).
> > 
> We tried to use the existing implementation that is in is_container() without 
> any modification,
> but the key difference is that we use a container to run a full system 
> container rather than just a "normal" app container,
> the current logic is correct when we use openwrt as an app container in our 
> lxc based pantavisor,
> but it will do too much for the containers on our system that are suppose to 
> run like the "main OS", like our pv-root plaforms.

The logic in container.h is made for exactly that (ie. full-system
container rather than App container). If you are using unmodified LXC
this should work without problems as LXC sets an environment variabel
(container=lxc) and we do detect the presence of that environment
variable in container.h.

Hence the easiest way would be you just use that existing mechanism
(ie. just go with LXC defaults which do set that env variable) as that
would not require any Pantavisor-specific hacks in our codebase.

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


Re: [PATCH] build: artifacts add dependency for builded images

2021-03-22 Thread Daniel Golle
On Mon, Mar 22, 2021 at 04:44:47PM +0200, Oskari Lemmelä wrote:
> Hi,
> 
> On 21.3.2021 11.55, Paul Spooren wrote:
> > On Sat Mar 20, 2021 at 10:58 PM HST, Oskari Lemmela wrote:
> > > Add possibility to use images and initramfs in artifacts.
> > > 
> > > Signed-off-by: Oskari Lemmela 
> > > ---
> > Hi, could you please elaborate on your use-case?
> 
> One use case is build full sdcard image for Bananapi R64.
> 
> Currently fit and initramfs images need to be copied over
> tftp/serial after booting from sdcard.

You can also just append the initramfs to the sdcard image, btw.
With these changes things will become easier and more accessible
to users who don't know how to use 'dd'.

Are you planning to also post a patch to make use of this change
to generate a full SD card image (ie. incl. initramfs as well as
sysupgrade image)?


Cheers


Daniel


> 
> Oskari
> 
> > 
> > > include/image.mk | 6 --
> > > 1 file changed, 4 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/include/image.mk b/include/image.mk
> > > index 29df0938bc..8b7b2b9740 100644
> > > --- a/include/image.mk
> > > +++ b/include/image.mk
> > > @@ -478,6 +478,7 @@ define Device/Build/initramfs
> > > $$(if $$(CONFIG_JSON_OVERVIEW_IMAGE_INFO),
> > > $(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,))
> > > $(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare
> > > + $(1)-images: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
> > > $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE):
> > > $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
> > > cp $$^ $$@
> > > @@ -570,6 +571,7 @@ define Device/Build/image
> > > $(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json, \
> > > $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX))
> > > $(eval $(call Device/Export,$(KDIR)/tmp/$(call
> > > DEVICE_IMG_NAME,$(1),$(2)),$(1)))
> > > + $(3)-images: $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX)
> > > ROOTFS/$(1)/$(3) := \
> > > $(KDIR)/root.$(1)$$(strip \
> > > @@ -628,7 +630,7 @@ endef
> > > define Device/Build/artifact
> > > $$(_TARGET): $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)
> > > $(eval $(call Device/Export,$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1)))
> > > - $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE)
> > > + $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE)
> > > $(2)-images
> > > @rm -f $$@
> > > $$(call concat_cmd,$(ARTIFACT/$(1)))
> > > @@ -651,7 +653,7 @@ define Device/Build
> > > $$(call Device/Build/image,$$(fs),$$(image),$(1)
> > > $$(eval $$(foreach artifact,$$(ARTIFACTS), \
> > > - $$(call Device/Build/artifact,$$(artifact
> > > + $$(call Device/Build/artifact,$$(artifact),$(1
> > > endef
> > > --
> > > 2.25.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


Re: [PATCH] mwlwifi: remove target dependency

2021-03-22 Thread Daniel Golle
On Mon, Mar 22, 2021 at 03:22:25PM +, Imre Kaloz wrote:
> Hi Daniel,
> 
> FWIW in my opinion we should get back to this topic as soon as you have a 
> mwlwifi supported card up and running on any other platform. Right now this 
> would introduce a change just to make a different platform's SDK usable for a 
> purpose which would get a straight "no" from the developer community if a 
> user would have proposed it.
> 

This change makes mwlwifi usable also on mvebu. I does not right now,
people fail to build images for e.g. WRT3200ACM using the ImageBuilder,
see link to forums below as well as commit description.

> I'm against this change (not that it matters ever since you've stripped 
> maintainer roles in the name of democracy).

Do you have another idea then how we can get the issue resolved?
(I prefer not having to make any changes on the buildbots)

As you are the author of the driver, your opinion sure does matter, and
I do see you as being responsible for it even if that fact is not
reflected technically in the form of access control rules as it used to
be before 2017. I could have obviously just commited that (rather
trivial) change, but I thought it might be good to reach out and see if
anyone has objections (because you wouldn't add dependencies just for
the modest amount of fun in doing so, usually)


Cheers


Daniel


> 
> 
> Imre
> 
> 
> From: Daniel Golle 
> Sent: Sunday, March 21, 2021 22:17
> To: openwrt-devel@lists.openwrt.org
> Cc: Imre Kaloz
> Subject: [PATCH] mwlwifi: remove target dependency
> 
> Users complained that building images for various mvebu Linksys devices
> fails when using the ImageBuilder, it complains about the package
> 'mwlwifi-firmware-88w8964' not being found.
> 
> Turns out the package builds fine in mvebu/cortex-a9 images build, but
> isn't built at all for arm/cortex-a9 packages. This is because we are
> using the SDK for bcm53xx/generic to build packages for arm/cortex-a9,
> hence the dependency for @TARGET_mvebu fails.
> 
> Remove the target dependency as kmod-mwlwifi as well as firmware
> packages actually build fine on all platforms (and people might even
> want to use Marvell mPCIe Wifi on non-mvebu platforms).
> As a result, the missing 'mwlwifi-firmware-'* packages should become
> available for arm/cortex-a9 (and all other platforms).
> 
> Signed-off-by: Daniel Golle 
> ---
> See also:
> https://forum.openwrt.org/t/recent-imagebuilder-build-issues-for-wrt3200acm-on-master/91802
> 
>  package/kernel/mwlwifi/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile
> index 648c826ccb..14973d0010 100644
> --- a/package/kernel/mwlwifi/Makefile
> +++ b/package/kernel/mwlwifi/Makefile
> @@ -28,7 +28,7 @@ include $(INCLUDE_DIR)/package.mk
>  define KernelPackage/mwlwifi
>SUBMENU:=Wireless Drivers
>TITLE:=Marvell 88W8864/88W8897/88W8964/88W8997 wireless driver
> -  DEPENDS:=+kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT 
> @PCI_SUPPORT @TARGET_mvebu
> +  DEPENDS:=+kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT 
> @PCI_SUPPORT
>FILES:=$(PKG_BUILD_DIR)/mwlwifi.ko
>AUTOLOAD:=$(call AutoLoad,50,mwlwifi)
>  endef
> @@ -54,7 +54,7 @@ define Package/mwlwifi-firmware-default
>SECTION:=firmware
>CATEGORY:=Firmware
>TITLE:=Marvell $(1) firmware
> -  DEPENDS:=+kmod-mwlwifi @TARGET_mvebu
> +  DEPENDS:=+kmod-mwlwifi
>  endef
> 
>  define Package/mwlwifi-firmware/install
> --
> 2.31.0
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [PATCH] procd: Adding support to detect Pantavisor Container Platform

2021-03-22 Thread Daniel Golle
On Mon, Mar 22, 2021 at 09:09:03PM +0530, Gaurav Pathak wrote:
> On Mon, Mar 22, 2021 at 11:53:35AM +0000, Daniel Golle wrote:
> > On Mon, Mar 22, 2021 at 05:00:06PM +0530, Gaurav Pathak wrote:
> > > On Mon, Mar 22, 2021 at 10:42:25AM +, Daniel Golle wrote:
> > > > On Mon, Mar 22, 2021 at 03:38:25PM +0530, Gaurav Pathak wrote:
> > > > >   > I assume that if this is a custom downstream version then the 
> > > > > change is 
> > > > >   > not applicable for merge into upstream owrt. please explain 
> > > > > what "custom 
> > > > >   > version" means.
> > > > > 
> > > > > Actually, we don't use a custom version of lxc, we use the upstream 
> > > > > stable lxc.
> > > > > The reason for this patch is that the hardcoded mount of /dev 
> > > > > prevents our way of usage of openwrt in containers.
> > > > 
> > > > In that case I believe the best is to revert the patch which applies a
> > > > Pantavisor-specific hack to detect if running inside a container and
> > > > switch to a method which works for all users of LXC equally (like it
> > > > is has already been done for Docker, see container.h in procd sources).
> > > > 
> > > We tried to use the existing implementation that is in is_container() 
> > > without any modification,
> > > but the key difference is that we use a container to run a full system 
> > > container rather than just a "normal" app container,
> > > the current logic is correct when we use openwrt as an app container in 
> > > our lxc based pantavisor,
> > > but it will do too much for the containers on our system that are suppose 
> > > to run like the "main OS", like our pv-root plaforms.
> > 
> > The logic in container.h is made for exactly that (ie. full-system
> > container rather than App container). If you are using unmodified LXC
> > this should work without problems as LXC sets an environment variabel
> > (container=lxc) and we do detect the presence of that environment
> > variable in container.h.
> > 
> > Hence the easiest way would be you just use that existing mechanism
> > (ie. just go with LXC defaults which do set that env variable) as that
> > would not require any Pantavisor-specific hacks in our codebase.
> 
> I agree, but the thing is, we have a custom "init" called pantavisor, which 
> is responsible for spawning different containers. 
> We treat containers running at root level different than containers running 
> at application level (fully privileged and unprivileged).
> We provide control to the platform inside container running at root level to 
> become host OS (as main OS, OpenWRT in our case) but want 
> the LXC to do the mounting and not the Platform itself. So, pantavisor (init) 
> ignores "container=lxc" environment for the root (fully privileged) 
> container but passes that environment to the containers running at 
> application level.
> 

Thank you for the detailed explenation. In this case, I think the
solution we have in place now and which detects the presence of the
'/pantavisor' file is probably the best we can do.

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


Re: [PATCH] mwlwifi: remove target dependency

2021-03-22 Thread Daniel Golle
On Mon, Mar 22, 2021 at 11:14:39PM +0100, Hauke Mehrtens wrote:
> On 3/21/21 10:17 PM, Daniel Golle wrote:
> > Users complained that building images for various mvebu Linksys devices
> > fails when using the ImageBuilder, it complains about the package
> > 'mwlwifi-firmware-88w8964' not being found.
> > 
> > Turns out the package builds fine in mvebu/cortex-a9 images build, but
> > isn't built at all for arm/cortex-a9 packages. This is because we are
> > using the SDK for bcm53xx/generic to build packages for arm/cortex-a9,
> > hence the dependency for @TARGET_mvebu fails.
> > 
> > Remove the target dependency as kmod-mwlwifi as well as firmware
> > packages actually build fine on all platforms (and people might even
> > want to use Marvell mPCIe Wifi on non-mvebu platforms).
> > As a result, the missing 'mwlwifi-firmware-'* packages should become
> > available for arm/cortex-a9 (and all other platforms).
> 
> Does this happen for the kmod or only for the firmware package? If this only
> happens for the firmware package, does it help to add this to the package
> Makefile:
> PKG_FLAGS:=nonshared

It's only the firmware package missing as the kmods are built in phase1.

> 
> I think we only have this problems with the packages build by the 2. phase
> build bot which is shared between different targets with the same CPU. When
> we make it nonshared it should be build together with the target. We had a
> similar problems with the mtd package some time ago.

Yes, adding PKG_FLAGS:=nonshared would solve the problem (and shouldn't
affect the anyway nonshared kmod build in the same package Makefile).
I forgot about that one...

> 
> We should check if there are more places with similar problem.

Other potentially affected packages which do have target dependencies
set but do not have PKG_FLAGS:=nonshared set:

network/utils/ltq-dsl-base
firmware/cypress-nvram

All other non-kmod core packages seem to have nonshared set in case
they got target dependencies.


Cheers


Daniel

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


Re: ujail: bug or feature ?

2021-03-26 Thread Daniel Golle
On Fri, Mar 26, 2021 at 09:32:33AM +0100, e9hack wrote:
> Hi,
> 
> a program run by ujail gets a PID of 1. The real PID is different. If such a 
> program generates a PID file by its own and the PID from that file is used by 
> a script that is not run by ujail, then any operation will be performed with 
> the wrong PID, which is the PID of /sbin/procd in the real world.
> 
> Is this the expected behaviour?

Yes, this is expected behaviour as the program run by ujail ends up in
a new PID namespace (so that it cannot "see" other running processes).
If this presents a problem to your use-case, I can add an option to
have a the process live in the root PID namespace instead (ie. trade
some isolation for interoperatibility).

> 
> Regards,
> Hartmut
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: ujail: bug or feature ?

2021-03-26 Thread Daniel Golle


On Fri, Mar 26, 2021 at 10:54:32AM +0100, e9hack wrote:
> Am 26.03.2021 um 10:17 schrieb Daniel Golle:
> > On Fri, Mar 26, 2021 at 09:32:33AM +0100, e9hack wrote:
> > > Hi,
> > > 
> > > a program run by ujail gets a PID of 1. The real PID is different. If 
> > > such a program generates a PID file by its own and the PID from that file 
> > > is used by a script that is not run by ujail, then any operation will be 
> > > performed with the wrong PID, which is the PID of /sbin/procd in the real 
> > > world.
> > > 
> > > Is this the expected behaviour?
> > 
> > Yes, this is expected behaviour as the program run by ujail ends up in
> > a new PID namespace (so that it cannot "see" other running processes).
> > If this presents a problem to your use-case, I can add an option to
> > have a the process live in the root PID namespace instead (ie. trade
> > some isolation for interoperatibility).
> > 
> 
> I use a modified init script for dnsmasq and let dnsmasq generate the PID 
> file. Another script is using this PID file and this doesn't work as I 
> switched to ujail. I have changed it now. The PID file is generated via 
> "procd_set_param pidfile ...".

`procd_set_param pidfile` should work with ujail, however, it will give
you the PID of `ujail` rather than the PID of the jailed process.
There also a jail parameter `pidfile` which writes a pidfile for the
jailed process itself which I introduced for use with `uxc`, however,
I haven't included that in procd.sh for jailed services yet, because
there was no need for that until now.
(signals other than SIGKILL are forwarded to the jailed process, ujail
instance terminates in case of jailed process terminating, ... so in
most cases you are fine when using the PID of the corresponding ujail
process)

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


Re: ujail: bug or feature ?

2021-03-26 Thread Daniel Golle
On Fri, Mar 26, 2021 at 01:06:33PM +0100, e9hack wrote:
> Am 26.03.2021 um 12:09 schrieb Daniel Golle:
> > 
> > On Fri, Mar 26, 2021 at 10:54:32AM +0100, e9hack wrote:
> > > Am 26.03.2021 um 10:17 schrieb Daniel Golle:
> > > > On Fri, Mar 26, 2021 at 09:32:33AM +0100, e9hack wrote:
> > > > > Hi,
> > > > > 
> > > > > a program run by ujail gets a PID of 1. The real PID is different. If 
> > > > > such a program generates a PID file by its own and the PID from that 
> > > > > file is used by a script that is not run by ujail, then any operation 
> > > > > will be performed with the wrong PID, which is the PID of /sbin/procd 
> > > > > in the real world.
> > > > > 
> > > > > Is this the expected behaviour?
> > > > 
> > > > Yes, this is expected behaviour as the program run by ujail ends up in
> > > > a new PID namespace (so that it cannot "see" other running processes).
> > > > If this presents a problem to your use-case, I can add an option to
> > > > have a the process live in the root PID namespace instead (ie. trade
> > > > some isolation for interoperatibility).
> > > > 
> > > 
> > > I use a modified init script for dnsmasq and let dnsmasq generate the PID 
> > > file. Another script is using this PID file and this doesn't work as I 
> > > switched to ujail. I have changed it now. The PID file is generated via 
> > > "procd_set_param pidfile ...".
> > 
> > `procd_set_param pidfile` should work with ujail, however, it will give
> > you the PID of `ujail` rather than the PID of the jailed process.
> > There also a jail parameter `pidfile` which writes a pidfile for the
> > jailed process itself which I introduced for use with `uxc`, however,
> > I haven't included that in procd.sh for jailed services yet, because
> > there was no need for that until now.
> > (signals other than SIGKILL are forwarded to the jailed process, ujail
> > instance terminates in case of jailed process terminating, ... so in
> > most cases you are fine when using the PID of the corresponding ujail
> > process)
> > 
> 
> I'm sending to one dnsmasq instance SIGUSR1 via a cron job every 6 hours. I 
> didn't really verify the PID, but I did check for the result in the log file.

Yes, that should work fine even if you actually send SIGUSR1 to ujail,
as the signal is then being forwarded (and neither you nor procd need
to know anything special about this being a jailed process).

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


Re: [PATCH 2/3] ramips/mt7621: drop the timer recalibration patch

2021-03-30 Thread Daniel Golle
On Tue, Mar 30, 2021 at 10:52:35PM +0100, Rui Salvaterra wrote:
> Hi, Ilya,
> 
> On Tue, 30 Mar 2021 at 20:56, Ilya Lipnitskiy  
> wrote:
> >
> > "config MIPS_CPS_CPUIDLE" has "select GENERIC_CLOCKEVENTS_BROADCAST if
> > SMP", so it doesn't seem necessary to force it in a dedicated patch.
> 
> Oh, indeed?
> 
> *goes to look*
> 
> Crap, don't know how I missed it [1]. Thanks for the heads-up!
> 
> > Can we drop 202-generic-clockevents-broadcast.patch if the CPUIDLE
> > change gets accepted?
> 
> We can and we should. :) I'll wait for Daniel's call, since he already
> marked the series as being reviewed on Patchwork. I can either send a
> follow-up patch, or respin a v2 of the series.

Respin please as I haven't merged it yet.


Cheers


Daniel

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


Re: [PATCH 4/4] mediatek: mt7622: add snand support for bananapi bpi-r64

2021-04-05 Thread Daniel Golle
Hi Oskari,

Thank you for submitting this patch series.
Generally it looks very good, please see some minor comments inline:

On Mon, Apr 05, 2021 at 08:53:17PM +0300, Oskari Lemmela wrote:
> Signed-off-by: Oskari Lemmela 
> ---
>  package/boot/uboot-mediatek/Makefile  |  12 +
>  .../403-add-bananapi_bpi-r64_defconfigs.patch | 275 --
>  .../404-add-bananapi-bpi-r64-snand.patch  |  34 +++
>  target/linux/mediatek/image/mt7622.mk |   6 +-
>  .../115-dts-bpi64-add-snand-support.patch |  57 
>  .../115-dts-bpi64-add-snand-support.patch |  57 
>  6 files changed, 421 insertions(+), 20 deletions(-)
>  create mode 100644 
> package/boot/uboot-mediatek/patches/404-add-bananapi-bpi-r64-snand.patch
>  create mode 100644 
> target/linux/mediatek/patches-5.10/115-dts-bpi64-add-snand-support.patch
>  create mode 100644 
> target/linux/mediatek/patches-5.4/115-dts-bpi64-add-snand-support.patch
> 
> diff --git a/package/boot/uboot-mediatek/Makefile 
> b/package/boot/uboot-mediatek/Makefile
> index 1fb67321ed..329555ad70 100644
> --- a/package/boot/uboot-mediatek/Makefile
> +++ b/package/boot/uboot-mediatek/Makefile
> @@ -54,6 +54,17 @@ define U-Boot/mt7622_bananapi_bpi-r64-sdmmc
>DEPENDS:=+trusted-firmware-a-mt7622-sdmmc-2ddr
>  endef
>  
> +define U-Boot/mt7622_bananapi_bpi-r64-snand
> +  NAME:=BananaPi R64 (SNAND)
> +  UBOOT_CONFIG:=mt7622_bananapi_bpi-r64-snand
> +  BUILD_DEVICES:=bananapi_bpi-r64
> +  BUILD_SUBTARGET:=mt7622
> +  UBOOT_IMAGE:=u-boot.fip
> +  BL2_BOOTDEV:=snand
> +  BL2_DDRBLOB:=2
> +  DEPENDS:=+trusted-firmware-a-mt7622-snand-2ddr
> +endef
> +
>  define U-Boot/mt7623a_unielec_u7623
>NAME:=UniElec U7623 (mt7623)
>BUILD_DEVICES:=unielec_u7623-emmc unielec_u7623-02-emmc-512m-legacy
> @@ -79,6 +90,7 @@ endef
>  UBOOT_TARGETS := \
>   mt7622_bananapi_bpi-r64-emmc \
>   mt7622_bananapi_bpi-r64-sdmmc \
> + mt7622_bananapi_bpi-r64-snand \
>   mt7622_linksys_e8450 \
>   mt7622_rfb1 \
>   mt7623n_bpir2 \
> diff --git 
> a/package/boot/uboot-mediatek/patches/403-add-bananapi_bpi-r64_defconfigs.patch
>  
> b/package/boot/uboot-mediatek/patches/403-add-bananapi_bpi-r64_defconfigs.patch
> index 0421392305..5ed77c8c5d 100644
> --- 
> a/package/boot/uboot-mediatek/patches/403-add-bananapi_bpi-r64_defconfigs.patch
> +++ 
> b/package/boot/uboot-mediatek/patches/403-add-bananapi_bpi-r64_defconfigs.patch
> @@ -1,6 +1,6 @@
>  --- /dev/null
>  +++ b/configs/mt7622_bananapi_bpi-r64-sdmmc_defconfig
> -@@ -0,0 +1,144 @@
> +@@ -0,0 +1,157 @@
>  +CONFIG_ARM=y
>  +CONFIG_POSITION_INDEPENDENT=y
>  +CONFIG_ARCH_MEDIATEK=y
> @@ -34,7 +34,7 @@
>  +CONFIG_LED_GPIO=y
>  +CONFIG_LOGLEVEL=7
>  +CONFIG_LOG=y
> -+CONFIG_DEFAULT_FDT_FILE="mt7622-bananapi-bpi-r64"
> ++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7622-bananapi-bpi-r64.dtb"
>  +CONFIG_SYS_PROMPT="MT7622> "
>  +CONFIG_CMD_BOOTMENU=y
>  +CONFIG_CMD_BOOTP=y
> @@ -42,6 +42,7 @@
>  +CONFIG_CMD_CACHE=y
>  +CONFIG_CMD_CDP=y
>  +CONFIG_CMD_DHCP=y
> ++CONFIG_CMD_DM=y
>  +CONFIG_CMD_DNS=y
>  +CONFIG_CMD_ECHO=y
>  +CONFIG_CMD_ENV_READMEM=y
> @@ -59,6 +60,7 @@
>  +CONFIG_CMD_LINK_LOCAL=y
>  +# CONFIG_CMD_MBR is not set
>  +CONFIG_CMD_MMC=y
> ++CONFIG_CMD_MTD=y
>  +CONFIG_CMD_PCI=y
>  +CONFIG_CMD_SF_TEST=y
>  +CONFIG_CMD_PING=y
> @@ -67,6 +69,9 @@
>  +CONFIG_CMD_SMC=y
>  +CONFIG_CMD_TFTPBOOT=y
>  +CONFIG_CMD_TFTPSRV=y
> ++CONFIG_CMD_UBI=y
> ++CONFIG_CMD_UBI_RENAME=y
> ++CONFIG_CMD_UBIFS=y
>  +CONFIG_CMD_ASKENV=y
>  +CONFIG_CMD_PART=y
>  +# CONFIG_CMD_PSTORE is not set
> @@ -80,6 +85,7 @@
>  +CONFIG_CMD_UUID=y
>  +CONFIG_DISPLAY_CPUINFO=y
>  +CONFIG_DM_MMC=y
> ++CONFIG_DM_MTD=y
>  +CONFIG_DM_REGULATOR=y
>  +CONFIG_DM_REGULATOR_FIXED=y
>  +CONFIG_DM_REGULATOR_GPIO=y
> @@ -115,6 +121,9 @@
>  +CONFIG_DM_ETH=y
>  +CONFIG_MEDIATEK_ETH=y
>  +CONFIG_PCI=y
> ++CONFIG_MTD=y
> ++CONFIG_MTD_UBI_FASTMAP=y
> ++CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-nand0:512k(bl2),2048k(fip),-(ubi)"
>  +CONFIG_DM_PCI=y
>  +CONFIG_PCIE_MEDIATEK=y
>  +CONFIG_PINCTRL=y
> @@ -133,6 +142,10 @@
>  +CONFIG_MMC_MTK=y
>  +CONFIG_MMC_SUPPORTS_TUNING=y
>  +CONFIG_SUPPORT_EMMC_BOOT=y
> ++CONFIG_SPI=y
> ++CONFIG_DM_SPI=y
> ++CONFIG_MTK_SPI_NAND=y
> ++CONFIG_MTK_SPI_NAND_MTD=y
>  +CONFIG_SYSRESET_WATCHDOG=y
>  +CONFIG_WDT_MTK=y
>  +CONFIG_LZO=y
> @@ -147,12 +160,12 @@
>  +CONFIG_USB_STORAGE=y
>  --- /dev/null
>  +++ b/bananapi_bpi-r64-sdmmc_env
> -@@ -0,0 +1,60 @@
> +@@ -0,0 +1,82 @@
>  +ipaddr=192.168.1.1
>  +serverip=192.168.1.254
>  +loadaddr=0x4007ff28
> -+bootcmd=run boot_sdmmc
>  +bootargs=root=/dev/mmcblk1p65
> ++bootcmd=run boot_sdmmc
>  +bootconf=config-mt7622-bananapi-bpi-r64-pcie1
>  +bootconf_pcie=config-mt7622-bananapi-bpi-r64-pcie1
>  +bootconf_sata=config-mt7622-bananapi-bpi-r64-sata
> @@ -172,9 +185,10 @@
>  +bootmenu_3=Boot recovery system from SD card.=run boot_recovery ; run 
> bootmenu_confirm_return
>  +bootmenu_4=Load production system via TFTP then write to SD card.=setenv 
> noboot 1 ; run boot_tftp_production ; setenv noboot ; run

Re: [PATCH 3/4] mediatek: mt7622: add ubi support for bananapi bpi-r64

2021-04-05 Thread Daniel Golle


On Mon, Apr 05, 2021 at 08:38:13PM +0200, Adrian Schmutzler wrote:
> Hi,
> 
> > -Original Message-
> > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> > On Behalf Of Oskari Lemmela
> > Sent: Montag, 5. April 2021 19:53
> > To: openwrt-devel@lists.openwrt.org
> > Cc: Oskari Lemmela 
> > Subject: [PATCH 3/4] mediatek: mt7622: add ubi support for bananapi bpi-r64
> 
> Patches 3 and 4 lack a commit message. That's mandatory.
> 
> An additional comment below.
> 
> > 
> > Signed-off-by: Oskari Lemmela 
> > ---
> >  package/boot/uboot-envtools/files/mediatek| 14 ++--
> >  .../mt7622/base-files/lib/upgrade/platform.sh | 34 +--
> >  2 files changed, 34 insertions(+), 14 deletions(-)
> > 
> > diff --git a/package/boot/uboot-envtools/files/mediatek
> > b/package/boot/uboot-envtools/files/mediatek
> > index 50269c9500..85d7db206d 100644
> > --- a/package/boot/uboot-envtools/files/mediatek
> > +++ b/package/boot/uboot-envtools/files/mediatek
> > @@ -21,9 +21,17 @@ case "$board" in
> > . /lib/upgrade/common.sh
> > export_bootdevice
> > export_partdevice rootdev 0
> > -   local envdev=/dev/$(get_partition_by_name $rootdev ubootenv)
> > -   ubootenv_add_uci_config "$envdev" "0x0" "0x8" "0x8" "1"
> > -   ubootenv_add_uci_config "$envdev" "0x8" "0x8" "0x8"
> > "1"
> > +   case "$rootdev" in
> > +   mmc*)
> > +   local envdev=/dev/$(get_partition_by_name $rootdev
> > ubootenv)
> > +   ubootenv_add_uci_config "$envdev" "0x0" "0x8"
> > "0x8" "1"
> > +   ubootenv_add_uci_config "$envdev" "0x8" "0x8"
> > "0x8" "1"
> > +   ;;
> > +   ubi*)
> > +   ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000"
> > "0x1f000" "1"
> > +   ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000"
> > "0x1f000" "1"
> > +   ;;
> > +   esac
> 
> Are you sure these globs will work in each and every case?

This switch statement is inside the case handling bpi-r64 (which is
not obvious from looking at the patch without context).
It does handle all three cases (eMMC, SD Card, SPI-NAND) for the
BPi-R64 properly.

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


Re: Regression in auto-mounting mtd squashfs partitions

2021-04-10 Thread Daniel Golle
On Sat, Apr 10, 2021 at 04:04:28PM +0200, Felix Fietkau wrote:
> Hi Daniel,
> 
> it seems to me that your commit 2809d744 ("kernel: support FIT
> partition parser on mtdblock devices") is causing a regression in
> mounting squashfs rootfs when CONFIG_FIT_PARTITION is enabled.
> The following workaround fixes it, but maybe you can make a better fix,
> since you're more familiar with the code.

No, I just forgot that we are also making assumptions about the mtdblock
device minor number in our own patches...
The fix looks good to me and certainly won't break devices that are
actually making of the new external-data FIT images (as ROOT_DEV is
then set by the FIT block partition parser in a generic way and no
'rootfs' MTD partition exists in that case).

Acked-by: Daniel Golle 

> 
> - Felix
> 
> --- a/drivers/mtd/mtdcore.c
> +++ b/drivers/mtd/mtdcore.c
> @@ -699,9 +699,13 @@ int add_mtd_device(struct mtd_info *mtd)
>   if (!strcmp(mtd->name, "rootfs") &&
>   IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) &&
>   ROOT_DEV == 0) {
> + unsigned int index = mtd->index;
>   pr_notice("mtd: device %d (%s) set to be root filesystem\n",
> mtd->index, mtd->name);
> - ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, mtd->index);
> +#ifdef CONFIG_FIT_PARTITION
> + index <<= 1;
> +#endif
> + ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index);
>   }
>  
>   return 0;
> 
> 
> 
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: umdns bug

2021-04-10 Thread Daniel Golle
Hi Nick,

On Sat, Apr 10, 2021 at 01:31:21PM +0200, Nick wrote:
> There is an error in the current umds project: "UMDNS: does not start on
> master with seccomp"
> https://bugs.openwrt.org/index.php?do=details&task_id=3355
> 
> It is affecting several other projects that make use of umdns.
> Is someone working on it?

Thank you for bringing this to my attention.
I have (hopefully) fixed the issue with
commit 00a85a1634 ("umdns: add missing syscalls to seccomp filter"),
at least on my Aarch64 test boards it works now.
More/other syscalls may be needed on different architectures, see
the commit description of the fix mentioned above for instructions on
how to find them.


Cheers


Daniel


> 
> Bests,
> Nick
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [PATCH v2 3/4] mediatek: mt7622: add ubi support for bananapi bpi-r64

2021-04-10 Thread Daniel Golle
On Sat, Apr 10, 2021 at 08:16:07PM +0300, Oskari Lemmela wrote:
> Default to nand upgrade if root device is not mmc block device.
> Change default uboot environment same way.
> 
> Signed-off-by: Oskari Lemmela 
> ---
>  package/boot/uboot-envtools/files/mediatek| 14 ++--
>  .../mt7622/base-files/lib/upgrade/platform.sh | 34 +--

Please split this into two commits, one covering uboot-envtools only
and one another one covering the changes in target/linux/mediatek.

Apart from that looks very good now.

>  2 files changed, 34 insertions(+), 14 deletions(-)
> 
> diff --git a/package/boot/uboot-envtools/files/mediatek 
> b/package/boot/uboot-envtools/files/mediatek
> index e1304ddffd..f2992c66ca 100644
> --- a/package/boot/uboot-envtools/files/mediatek
> +++ b/package/boot/uboot-envtools/files/mediatek
> @@ -21,9 +21,17 @@ bananapi,bpi-r64)
>   . /lib/upgrade/common.sh
>   export_bootdevice
>   export_partdevice rootdev 0
> - local envdev=/dev/$(get_partition_by_name $rootdev ubootenv)
> - ubootenv_add_uci_config "$envdev" "0x0" "0x8" "0x8" "1"
> - ubootenv_add_uci_config "$envdev" "0x8" "0x8" "0x8" "1"
> + case "$rootdev" in
> + mmc*)
> + local envdev=/dev/$(get_partition_by_name $rootdev ubootenv)
> + ubootenv_add_uci_config "$envdev" "0x0" "0x8" "0x8" "1"
> + ubootenv_add_uci_config "$envdev" "0x8" "0x8" "0x8" 
> "1"
> + ;;
> + *)
> + ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" 
> "1"
> + ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" 
> "1"
> + ;;
> + esac
>   ;;
>  buffalo,wsr-2533dhp2)
>   ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x2"
> diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh 
> b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
> index 2c1460650f..cdae06e630 100755
> --- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
> @@ -10,16 +10,24 @@ platform_do_upgrade() {
>   bananapi,bpi-r64)
>   export_bootdevice
>   export_partdevice rootdev 0
> - local fitpart=$(get_partition_by_name $rootdev "production")
> - [ "$fitpart" ] || return 1
> - dd if=/dev/zero of=/dev/$fitpart bs=4096 count=1 2>/dev/null
> - blockdev --rereadpt /dev/$rootdev
> - get_image "$1" | dd of=/dev/$fitpart
> - blockdev --rereadpt /dev/$rootdev
> - local datapart=$(get_partition_by_name $rootdev "rootfs_data")
> - [ "$datapart" ] || return 0
> - dd if=/dev/zero of=/dev/$datapart bs=4096 count=1 2>/dev/null
> - echo $datapart > /tmp/sysupgrade.datapart
> + case "$rootdev" in
> + mmc*)
> + local fitpart=$(get_partition_by_name $rootdev 
> "production")
> + [ "$fitpart" ] || return 1
> + dd if=/dev/zero of=/dev/$fitpart bs=4096 count=1 
> 2>/dev/null
> + blockdev --rereadpt /dev/$rootdev
> + get_image "$1" | dd of=/dev/$fitpart
> + blockdev --rereadpt /dev/$rootdev
> + local datapart=$(get_partition_by_name $rootdev 
> "rootfs_data")
> + [ "$datapart" ] || return 0
> + dd if=/dev/zero of=/dev/$datapart bs=4096 count=1 
> 2>/dev/null
> + echo $datapart > /tmp/sysupgrade.datapart
> + ;;
> + *)
> + CI_KERNPART="fit"
> + nand_do_upgrade "$1"
> + ;;
> + esac
>   ;;
>   buffalo,wsr-2533dhp2)
>   local magic="$(get_magic_long "$1")"
> @@ -87,7 +95,11 @@ platform_copy_config_mmc() {
>  platform_copy_config() {
>   case "$(board_name)" in
>   bananapi,bpi-r64)
> - platform_copy_config_mmc
> + export_bootdevice
> + export_partdevice rootdev 0
> + if echo $rootdev | grep -q mmc; then
> + platform_copy_config_mmc
> + fi
>   ;;
>   esac
>  }
> -- 
> 2.25.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


Re: Regression: commit 2809d0000744 ("kernel: support FIT partition parser on mtdblock devices") breaks mtd-concat

2021-04-12 Thread Daniel Golle
On Mon, Apr 12, 2021 at 10:45:14PM +0800, DENG Qingfang wrote:
> After the commit, devices with mtd-concat such as HC5962 no longer work.
> Several "sysfs: cannot create duplicate filename '/devices/..." warnings
> can be seen in kernel log.

I'm working on it, currently preparing to reproduce this be also
playing with mtd-concat.

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


Re: Regression: commit 2809d0000744 ("kernel: support FIT partition parser on mtdblock devices") breaks mtd-concat

2021-04-12 Thread Daniel Golle
On Mon, Apr 12, 2021 at 06:03:30PM +0200, Koen Vandeputte wrote:
> 
> On 12.04.21 17:31, Daniel Golle wrote:
> > On Mon, Apr 12, 2021 at 10:45:14PM +0800, DENG Qingfang wrote:
> > > After the commit, devices with mtd-concat such as HC5962 no longer work.
> > > Several "sysfs: cannot create duplicate filename '/devices/..." warnings
> > > can be seen in kernel log.
> > I'm working on it, currently preparing to reproduce this be also
> > playing with mtd-concat.
> 
> Should it help :-)
> 
> https://pastebin.com/raw/d069j7wS

Should be fixed by e9c8c834de ("kernel: fix deferred mtdblock registration").
Thanks for reporting!


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


Re: [PATCH] ramips: mt7621: HW-NAT typo fix

2021-04-16 Thread Daniel Golle
On Fri, Apr 16, 2021 at 03:44:06PM +0300, Lucian Cristian wrote:
> This fixes Hardware Offload on MT7621

I have already applied the fix for it in pending-5.10:

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=7f703716ae0e4cb4810eff37605b7594cef1edb8

For the future, and to still give you review:
You shouldn't modify patches in backport-* as they represent commits in
linux.git and for sake of maintainability it's good to keep them
exactly as present in linux.git history so we can easily spot and
remove them once they trickly down into linux-stable).


Cheers


Daniel


> 
> Signed-off-by: Lucian Cristian 

> diff --git 
> a/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch
>  
> b/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch
> index 82e3ddec3f..660ac77dce 100644
> --- 
> a/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch
> +++ 
> b/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch
> @@ -127,7 +127,7 @@ Signed-off-by: Pablo Neira Ayuso 
>  +
>  +static const struct rhashtable_params mtk_flow_ht_params = {
>  +.head_offset = offsetof(struct mtk_flow_entry, node),
> -+.head_offset = offsetof(struct mtk_flow_entry, cookie),
> ++.key_offset = offsetof(struct mtk_flow_entry, cookie),
>  +.key_len = sizeof(unsigned long),
>  +.automatic_shrinking = true,
>  +};

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


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


Re: [PATCH] ramips: mt7621: HW-NAT typo fix

2021-04-17 Thread Daniel Golle
On Sat, Apr 17, 2021 at 11:58:12AM -0700, Ilya Lipnitskiy wrote:
> On Fri, Apr 16, 2021 at 6:06 AM Daniel Golle  wrote:
> >
> > On Fri, Apr 16, 2021 at 03:44:06PM +0300, Lucian Cristian wrote:
> > > This fixes Hardware Offload on MT7621
> >
> > I have already applied the fix for it in pending-5.10:
> >
> > https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=7f703716ae0e4cb4810eff37605b7594cef1edb8
> >
> > For the future, and to still give you review:
> > You shouldn't modify patches in backport-* as they represent commits in
> > linux.git and for sake of maintainability it's good to keep them
> > exactly as present in linux.git history so we can easily spot and
> > remove them once they trickly down into linux-stable).
> Not to nitpick, but if you mean torvalds/linux.git, then lots of
> patches in backport-5.10 are breaking this rule. For instance, all the
> recent mediatek offload work is still only in netdev/net-next.git, to
> be (hopefully) merged into torvalds/linux.git when the next merge
> window opens. Also, this particular fix has been submitted and will
> likely also be in net-next.git imminently:
> https://lore.kernel.org/linux-arm-kernel/20210417072905.207032-1-dqf...@gmail.com/.
> 
> In addition to that, I would like to submit another fix to OpenWrt
> that is already in net-next.git, but now I'm confused - do I put it in
> pending-5.10 or backports-5.10? Please advise.

If it already made it to net-next chances are 99% that it will be in
linux.git soon and then make it's way to linux-stable.
Hence I'd put the patch in backports-5.10.
Only stuff you grab from upstream lists/patchwork or submitted yourself
but hasn't been accepted yet should go into pending-5.10.

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


[OpenWrt-Devel] [PATCH] modules: package l2tp_ip6.ko in kmod-l2tp-ip6

2015-04-30 Thread Daniel Golle
The L2TPv3-over-IPv6 kernel module wasn't included in any package.
Create a new package and make it depend on kmod-ipv6 and kmod-l2tp.
root@OpenWrt:~# modinfo /lib/modules/3.18.11/l2tp_ip6.ko 
module: /lib/modules/3.18.11/l2tp_ip6.ko
license:GPL
depends:ipv6,l2tp_core

The module doesn't have a Kconfig symbol of it's own and is being
built if both, CONFIG_L2TP_IP and CONFIG_IPV6 are set, see

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a32e0eec7042b21ccb52896cf715e3e2641fed93

Signed-off-by: Daniel Golle 
---
 package/kernel/linux/modules/netsupport.mk | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 547e429..799e2dd 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -908,6 +908,21 @@ endef
 
 $(eval $(call KernelPackage,l2tp-ip))
 
+define KernelPackage/l2tp-ip6
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=L2TP IP6 encapsulation for L2TPv3
+  DEPENDS:=+kmod-l2tp +kmod-ipv6
+  KCONFIG:=CONFIG_L2TP_IP
+  FILES:=$(LINUX_DIR)/net/l2tp/l2tp_ip6.ko
+  AUTOLOAD:=$(call AutoLoad,33,l2tp_ip6)
+endef
+
+define KernelPackage/l2tp-ip6/description
+ Kernel modules for L2TP IP6 encapsulation for L2TPv3
+endef
+
+$(eval $(call KernelPackage,l2tp-ip6))
+
 
 define KernelPackage/sctp
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
-- 
2.3.7
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] modules: package l2tp_ip6.ko in kmod-l2tp-ip6

2015-05-02 Thread Daniel Golle
r45593 includes l2tp_ip6 in the kmod-l2tp-ip package.
This is not feasible for several reasons:
 - in a given setup one usually uses either l2tp_ip or
   l2tp_ip6, but never both
 - l2tp_ip doesn't depend on ipv6
 - versioning of kmod-l2tp-ip doesn't indicate that it
   now does include support for L2TP-over-IPv6

I did waste some thoughts and actually my inital approach
to include l2tp_ip6 looked very much like what was applied
in r45593. However, there might be people making use of
kmod-l2tp-ip on devices not having the resources to also
include kmod-ipv6, and we usually prefer the most atomic
packaging possible.

Signed-off-by: Daniel Golle 
---
 package/kernel/linux/modules/netsupport.mk | 23 +++
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 7ec3d29..e920509 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -895,11 +895,11 @@ $(eval $(call KernelPackage,l2tp-eth))
 
 define KernelPackage/l2tp-ip
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
-  TITLE:=L2TP IP + IPv6 encapsulation for L2TPv3
-  DEPENDS:=+kmod-l2tp +kmod-ipv6
+  TITLE:=L2TP IP encapsulation for L2TPv3
+  DEPENDS:=+kmod-l2tp
   KCONFIG:=CONFIG_L2TP_IP
-  FILES:=$(LINUX_DIR)/net/l2tp/l2tp_ip.ko $(LINUX_DIR)/net/l2tp/l2tp_ip6.ko
-  AUTOLOAD:=$(call AutoLoad,33,l2tp_ip l2tp_ip6)
+  FILES:=$(LINUX_DIR)/net/l2tp/l2tp_ip.ko
+  AUTOLOAD:=$(call AutoLoad,33,l2tp_ip)
 endef
 
 define KernelPackage/l2tp-ip/description
@@ -908,6 +908,21 @@ endef
 
 $(eval $(call KernelPackage,l2tp-ip))
 
+define KernelPackage/l2tp-ip6
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=L2TP IPv6 encapsulation for L2TPv3
+  DEPENDS:=+kmod-l2tp +kmod-ipv6
+  KCONFIG:=CONFIG_L2TP_IP
+  FILES:=$(LINUX_DIR)/net/l2tp/l2tp_ip6.ko
+  AUTOLOAD:=$(call AutoLoad,33,l2tp_ip6)
+endef
+
+define KernelPackage/l2tp-ip6/description
+ Kernel modules for L2TP IP6 encapsulation for L2TPv3
+endef
+
+$(eval $(call KernelPackage,l2tp-ip6))
+
 
 define KernelPackage/sctp
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
-- 
2.3.7
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] modules: package l2tp_ip6.ko in kmod-l2tp-ip6

2015-05-03 Thread Daniel Golle
Hi Steven,

On Sun, May 03, 2015 at 10:28:16AM +0200, Steven Barth wrote:
> On 02.05.2015 13:33, Daniel Golle wrote:
> >r45593 includes l2tp_ip6 in the kmod-l2tp-ip package.
> >This is not feasible for several reasons:
> >  - in a given setup one usually uses either l2tp_ip or
> >l2tp_ip6, but never both
> I disagree here, if you e.g. use a hostname and resolve that before
> connecting this would dynamically resolve to either IPv6 or IPv4.

Given that there are the right support-tools around iproute2 to
resolve the hostname and pick the right local address, this is
indeed a valid scenario I didn't consider (due to the lack of
tools actually doing the magic).
For now I've been using L2TP with pre-configured addresses and
predictable use of either address family.

(see: https://gist.github.com/dangowrt/a1b816b509a8def28c0e )

Anyway, I get that argument, but it could still be solved by
adding +IPV6:kmod-l2tp-ip6 as a dependency to kmod-l2tp-ip.

If it's really about the packaging overhead, it would also
be possible to only include l2tp_ip6.ko in FILES if IPV6 is set,
thus getting rid of the kmod-ipv6 dependency on non-IPv6 systems.

In the long-run, I dream about native L2TPv3 integration in
netifd using netlink, just like GRE tunnels are supported in

http://git.openwrt.org/?p=project/netifd.git;a=blob;f=system-linux.c

That could then take care of resolving hostnames, adding host-
routes and all that...

What are you using to setup pseudo-wires in OpenWrt after

https://github.com/openwrt/packages/commit/08ae49377644067d2ad3e004f7fc1644e128b6c4

?


> >  - l2tp_ip doesn't depend on ipv6
> True, I'm not sure if it makes sense to have IPv6 as an external module any
> longer since its been a while and its enabled by default anyway. I guess
> after the CC branch we might want to enable it in the default kernel config
> and remove the module packaging. This would also save some space in the end.

There are still many cases where people use ImageBuilder to have a
firmware without IPv6, so they can use the space for other things.
I don't like that approach either and only know about it because
these systems then don't respond to IPv6 link-local multicast ping
which is one of my most used tools in my personal maintainance
toolbox...

So I generally agree, but it's something to happen in the future
which hasn't happened yet...
And won't we one day package IPv4 as an optional module instead then?

> >  - versioning of kmod-l2tp-ip doesn't indicate that it
> >now does include support for L2TP-over-IPv6
> Versioning is based on the kernel, so I don't think I get this argument.

Right, the fact that versioning is based on the kernel is exactly the
problem here. Imagine that I'm using a 3.14-based locally maintained
OpenWrt branch and provide updates via a feed. Now some user asked me
for l2tp_ip6 support and I'd like to tell her, "yes, it's available now.
Go ahead an install kmod-...".
Now the user already got kmod-l2tp-ip installed, so opkg won't re-install
the package as it believes it's up-to-date. I guess that should explain
it.


Cheers


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


[OpenWrt-Devel] [PATCH] generic/4.0: update to 4.0.1

2015-05-03 Thread Daniel Golle
Also refresh one patch.

Signed-off-by: Daniel Golle 
---
 include/kernel-version.mk|  4 ++--
 .../generic/patches-4.0/773-bgmac-add-srab-switch.patch  | 12 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index de20fef..9067272 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,10 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .11
-LINUX_VERSION-4.0 =
+LINUX_VERSION-4.0 = .1
 
 LINUX_KERNEL_MD5SUM-3.18.11 = 2def91951c9cedf7896efb864e0c090c
-LINUX_KERNEL_MD5SUM-4.0 = a86916bd12798220da9eb4a1eec3616d
+LINUX_KERNEL_MD5SUM-4.0.1 = ea7fc80310be8a5b43b2c6dfa5c4169f
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/generic/patches-4.0/773-bgmac-add-srab-switch.patch 
b/target/linux/generic/patches-4.0/773-bgmac-add-srab-switch.patch
index 0a8b451..b883d73 100644
--- a/target/linux/generic/patches-4.0/773-bgmac-add-srab-switch.patch
+++ b/target/linux/generic/patches-4.0/773-bgmac-add-srab-switch.patch
@@ -12,7 +12,7 @@ Signed-off-by: Hauke Mehrtens 
  #include 
  
  static const struct bcma_device_id bgmac_bcma_tbl[] = {
-@@ -1432,6 +1433,17 @@ static void bgmac_mii_unregister(struct
+@@ -1538,6 +1539,17 @@ static void bgmac_mii_unregister(struct
mdiobus_free(mii_bus);
  }
  
@@ -30,9 +30,9 @@ Signed-off-by: Hauke Mehrtens 
  /**
   * BCMA bus ops
   **/
-@@ -1551,6 +1563,16 @@ static int bgmac_probe(struct bcma_devic
-   goto err_dma_free;
-   }
+@@ -1664,6 +1676,16 @@ static int bgmac_probe(struct bcma_devic
+   net_dev->hw_features = net_dev->features;
+   net_dev->vlan_features = net_dev->features;
  
 +  if ((ci->id == BCMA_CHIP_ID_BCM4707 ||
 +   ci->id == BCMA_CHIP_ID_BCM53018) &&
@@ -47,7 +47,7 @@ Signed-off-by: Hauke Mehrtens 
err = register_netdev(bgmac->net_dev);
if (err) {
bgmac_err(bgmac, "Cannot register net device\n");
-@@ -1577,6 +1599,10 @@ static void bgmac_remove(struct bcma_dev
+@@ -1690,6 +1712,10 @@ static void bgmac_remove(struct bcma_dev
  {
struct bgmac *bgmac = bcma_get_drvdata(core);
  
@@ -60,7 +60,7 @@ Signed-off-by: Hauke Mehrtens 
netif_napi_del(&bgmac->napi);
 --- a/drivers/net/ethernet/broadcom/bgmac.h
 +++ b/drivers/net/ethernet/broadcom/bgmac.h
-@@ -457,6 +457,9 @@ struct bgmac {
+@@ -462,6 +462,9 @@ struct bgmac {
bool has_robosw;
  
bool loopback;
-- 
2.3.7
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Archer VR200v GPL code

2015-05-04 Thread Daniel Golle
Hi!

Looks like the Firmware of the Archer VR200v is based on Linux.
http://www.tp-link.de/support/download/?model=Archer+VR200v&version=V1

binwalk Archer_VR200vv1_0.8.0_0.14_up_boot\(150331\)_2015-03-31_09.02.51.bin 

DECIMAL   HEXADECIMAL DESCRIPTION

20992 0x5200  uImage header, header size: 64 bytes, header CRC: 
0x2E017C71, created: Tue Mar 31 02:52:56 2015, image size: 37472 bytes, Data 
Address: 0xA040, Entry Point: 0xA040, data CRC: 0x103D4E73, OS: Linux, 
CPU: MIPS, image type: Firmware Image, compression type: lzma, image name: 
"u-boot image"
21056 0x5240  LZMA compressed data, properties: 0x5D, 
dictionary size: 8388608 bytes, uncompressed size: 99532 bytes
66048 0x10200 uImage header, header size: 64 bytes, header CRC: 
0xBEC297, created: Fri Oct 25 09:26:06 2013, image size: 41781 bytes, Data 
Address: 0x0, Entry Point: 0x0, data CRC: 0xBECBCEC2, OS: Linux, CPU: MIPS, 
image type: Multi-File Image, compression type: lzma, image name: "GPHY 
Firmware"
66120 0x10248 LZMA compressed data, properties: 0x5D, 
dictionary size: 8388608 bytes, uncompressed size: 131200 bytes
1320960x20400 LZMA compressed data, properties: 0x5D, 
dictionary size: 8388608 bytes, uncompressed size: 3913720 bytes
1442304   0x160200Squashfs filesystem, little endian, version 4.0, 
compression:lzma, size: 8816203 bytes,  643 inodes, blocksize: 131072 bytes, 
created: Tue Mar 31 03:01:11 2015


I cannot find the sourcecode on http://www.tp-link.de/support/gpl/

Please release GPL sourcecode allowing to reproducibly verify license 
compliance for the released binary firmware version 2015-03-31_09.02.51.


Thank you!


Best regards


Daniel Golle
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Intermittent Ethernet failure

2015-05-04 Thread Daniel Golle
Hi Bill!


On Mon, May 04, 2015 at 05:53:21PM -0700, Bill wrote:
> I have finally been able to reproduce the problem here at home by setting up
> a bridge and leaving it alone for a few days. When it failed, this is what
> dmesg told me:
> [  409.38] eth0: link up (100Mbps/Full duplex)
> 
> [  409.38] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
> 
> [  423.38] eth0: link down
> 
> [  424.38] eth0: link up (100Mbps/Full duplex)
> 
> [  560.38] eth0: link down
> 
> [ 1674.38] eth0: link up (100Mbps/Full duplex)
> 
> [ 1680.38] eth0: link down
...

This very much looks like a known issue:

https://dev.openwrt.org/ticket/19085

https://dev.openwrt.org/ticket/19579



Cheers


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


[OpenWrt-Devel] [PATCH] netsupport: l2tp-ip: only depend on IPv6 if IPv6 support is enabled

2015-05-05 Thread Daniel Golle
Before r45593 kmod-l2tp-ip did not depend on kmod-ipv6.
With r45593 support for L2TP IPv6 encapsulation was added and
included in the kmod-l2tp-ip package. This change also
added the dependency to kmod-ipv6 to kmod-l2tp-ip, regardless
of whether the user chose to generally include IPv6 support
or not.
Change this so L2TP over IPv6 and the resulting dependency
to kmod-ipv6 is only included in kmod-l2tp-ip if IPv6 support
is enabled.

Signed-off-by: Daniel Golle 
---
 package/kernel/linux/modules/netsupport.mk | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 7ec3d29..4483581 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -895,11 +895,13 @@ $(eval $(call KernelPackage,l2tp-eth))
 
 define KernelPackage/l2tp-ip
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
-  TITLE:=L2TP IP + IPv6 encapsulation for L2TPv3
-  DEPENDS:=+kmod-l2tp +kmod-ipv6
+  TITLE:=L2TP IP encapsulation for L2TPv3
+  DEPENDS:=+kmod-l2tp +IPV6:kmod-ipv6
   KCONFIG:=CONFIG_L2TP_IP
-  FILES:=$(LINUX_DIR)/net/l2tp/l2tp_ip.ko $(LINUX_DIR)/net/l2tp/l2tp_ip6.ko
-  AUTOLOAD:=$(call AutoLoad,33,l2tp_ip l2tp_ip6)
+  FILES:= \
+   $(LINUX_DIR)/net/l2tp/l2tp_ip.ko \
+   $(if $(CONFIG_IPV6),$(LINUX_DIR)/net/l2tp/l2tp_ip6.ko)
+  AUTOLOAD:=$(call AutoLoad,33,l2tp_ip $(if $(CONFIG_IPV6),l2tp_ip6))
 endef
 
 define KernelPackage/l2tp-ip/description
-- 
2.3.7
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/3] procd: add support for seccomp on ARM

2015-05-16 Thread Daniel Golle
This series adds support for syscall tracing and seccomp
filters on the ARM architecture to procd.

Daniel Golle (3):
  trace: add support for ARM architecture
  jail: add support for ARM architecture
  jail: respect byte order when setting AUDIT_ARCH

 jail/seccomp-bpf.h | 14 +-
 trace/trace.c  |  2 ++
 2 files changed, 15 insertions(+), 1 deletion(-)

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


[OpenWrt-Devel] [PATCH 1/3] trace: add support for ARM architecture

2015-05-16 Thread Daniel Golle
Signed-off-by: Daniel Golle 
---
 trace/trace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/trace/trace.c b/trace/trace.c
index d70957d..5941f90 100644
--- a/trace/trace.c
+++ b/trace/trace.c
@@ -42,6 +42,8 @@
 # define EF_REG2   8
 # endif
 #define reg_syscall_nr (EF_REG2 / 4)
+#elif defined(__arm__)
+#define reg_syscall_nr _offsetof(struct user, regs.uregs[7])
 #else
 #error tracing is not supported on this architecture
 #endif
-- 
2.4.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] jail: add support for ARM architecture

2015-05-16 Thread Daniel Golle
SECCOMP_FILTER isn't supported on ARM OABI.
Thus enable seccomp support in jail only for EABI.
thumb might work as well as it apparently implies EABI, but
yet doesn't set __ARM_EABI__.

The REG_SYSCALL macro seems to be an unused left-over.
However, it's defined for other architectures as well.

Signed-off-by: Daniel Golle 
---
 jail/seccomp-bpf.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/jail/seccomp-bpf.h b/jail/seccomp-bpf.h
index 1cc2908..40fe7b9 100644
--- a/jail/seccomp-bpf.h
+++ b/jail/seccomp-bpf.h
@@ -68,6 +68,9 @@ struct seccomp_data {
 #elif defined(__mips__)
 # define REG_SYSCALL   regs[2]
 # define ARCH_NR   AUDIT_ARCH_MIPSEL
+#elif defined(__arm__) && (defined(__ARM_EABI__) || defined(__thumb__))
+# define REG_SYSCALL   regs.uregs[7]
+# define ARCH_NR   AUDIT_ARCH_ARM
 #else
 # warning "Platform does not support seccomp filter yet"
 # define REG_SYSCALL   0
-- 
2.4.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] jail: respect byte order when setting AUDIT_ARCH

2015-05-16 Thread Daniel Golle
AUDIT_ARCH on ARM and MIPS differs depending on the byte order.
Thus set AUDIT_ARCH to the respective endian-specific variants.

Signed-off-by: Daniel Golle 
---
 jail/seccomp-bpf.h | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/jail/seccomp-bpf.h b/jail/seccomp-bpf.h
index 40fe7b9..82c0669 100644
--- a/jail/seccomp-bpf.h
+++ b/jail/seccomp-bpf.h
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #ifndef PR_SET_NO_NEW_PRIVS
@@ -67,10 +68,18 @@ struct seccomp_data {
 # define ARCH_NR   AUDIT_ARCH_X86_64
 #elif defined(__mips__)
 # define REG_SYSCALL   regs[2]
-# define ARCH_NR   AUDIT_ARCH_MIPSEL
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+#  define ARCH_NR  AUDIT_ARCH_MIPSEL
+# else
+#  define ARCH_NR  AUDIT_ARCH_MIPS
+# endif
 #elif defined(__arm__) && (defined(__ARM_EABI__) || defined(__thumb__))
 # define REG_SYSCALL   regs.uregs[7]
-# define ARCH_NR   AUDIT_ARCH_ARM
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+#  define ARCH_NR  AUDIT_ARCH_ARM
+# else
+#  define ARCH_NR  AUDIT_ARCH_ARMEB
+# endif
 #else
 # warning "Platform does not support seccomp filter yet"
 # define REG_SYSCALL   0
-- 
2.4.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] uClibc: add signal info for seccomp related SIGSYS

2015-05-17 Thread Daniel Golle
uClibc doesn't define signal info for the SIGSYS signal which is issued
in case of hitting a syscall prohibited by seccomp.
This is sad as it makes debugging seccomp filter policies impossible on
some architectures (at least ARM and PowerPC, maybe also others) which
do not coincidentally set si_value.sival_int as the syscall number.

To fix this, import the definitions and macros needed from glibc.

Signed-off-by: Daniel Golle 
---
 .../995-add-sigsys-to-siginfo_t-union.patch| 145 +
 1 file changed, 145 insertions(+)
 create mode 100644 
toolchain/uClibc/patches-0.9.33.2/995-add-sigsys-to-siginfo_t-union.patch

diff --git 
a/toolchain/uClibc/patches-0.9.33.2/995-add-sigsys-to-siginfo_t-union.patch 
b/toolchain/uClibc/patches-0.9.33.2/995-add-sigsys-to-siginfo_t-union.patch
new file mode 100644
index 000..4894a56
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/995-add-sigsys-to-siginfo_t-union.patch
@@ -0,0 +1,145 @@
+Index: uClibc/libc/sysdeps/linux/common/bits/siginfo.h
+===
+--- uClibc.orig/libc/sysdeps/linux/common/bits/siginfo.h
 uClibc/libc/sysdeps/linux/common/bits/siginfo.h
+@@ -104,6 +104,14 @@ typedef struct siginfo
+   long int si_band;   /* Band event for SIGPOLL.  */
+   int si_fd;
+ } _sigpoll;
++
++  /* SIGSYS.  */
++  struct
++{
++  void *_call_addr;   /* Calling user insn.  */
++  int _syscall;   /* Triggering system call number.  */
++  unsigned int _arch; /* AUDIT_ARCH_* of syscall.  */
++} _sigsys;
+   } _sifields;
+   } siginfo_t;
+ 
+@@ -122,6 +130,9 @@ typedef struct siginfo
+ # define si_addr  _sifields._sigfault.si_addr
+ # define si_band  _sifields._sigpoll.si_band
+ # define si_fd_sifields._sigpoll.si_fd
++# define si_call_addr _sifields._sigsys._call_addr
++# define si_syscall   _sifields._sigsys._syscall
++# define si_arch  _sifields._sigsys._arch
+ 
+ 
+ /* Values for `si_code'.  Positive values are reserved for kernel-generated
+Index: uClibc/libc/sysdeps/linux/alpha/bits/siginfo.h
+===
+--- uClibc.orig/libc/sysdeps/linux/alpha/bits/siginfo.h
 uClibc/libc/sysdeps/linux/alpha/bits/siginfo.h
+@@ -98,6 +98,14 @@ typedef struct siginfo
+   int si_band;/* Band event for SIGPOLL.  */
+   int si_fd;
+ } _sigpoll;
++
++  /* SIGSYS.  */
++  struct
++{
++  void *_call_addr;   /* Calling user insn.  */
++  int _syscall;   /* Triggering system call number.  */
++  unsigned int _arch; /* AUDIT_ARCH_* of syscall.  */
++} _sigsys;
+   } _sifields;
+   } siginfo_t;
+ 
+@@ -116,6 +124,9 @@ typedef struct siginfo
+ # define si_addr  _sifields._sigfault.si_addr
+ # define si_band  _sifields._sigpoll.si_band
+ # define si_fd_sifields._sigpoll.si_fd
++# define si_call_addr _sifields._sigsys._call_addr
++# define si_syscall   _sifields._sigsys._syscall
++# define si_arch  _sifields._sigsys._arch
+ 
+ 
+ /* Values for `si_code'.  Positive values are reserved for kernel-generated
+Index: uClibc/libc/sysdeps/linux/ia64/bits/siginfo.h
+===
+--- uClibc.orig/libc/sysdeps/linux/ia64/bits/siginfo.h
 uClibc/libc/sysdeps/linux/ia64/bits/siginfo.h
+@@ -103,6 +103,14 @@ typedef struct siginfo
+   long int si_band;   /* Band event for SIGPOLL.  */
+   int si_fd;
+ } _sigpoll;
++
++  /* SIGSYS.  */
++  struct
++{
++  void *_call_addr;   /* Calling user insn.  */
++  int _syscall;   /* Triggering system call number.  */
++  unsigned int _arch; /* AUDIT_ARCH_* of syscall.  */
++} _sigsys;
+   } _sifields;
+   } siginfo_t;
+ 
+@@ -121,6 +129,9 @@ typedef struct siginfo
+ # define si_addr  _sifields._sigfault.si_addr
+ # define si_band  _sifields._sigpoll.si_band
+ # define si_fd_sifields._sigpoll.si_fd
++# define si_call_addr _sifields._sigsys._call_addr
++# define si_syscall   _sifields._sigsys._syscall
++# define si_arch  _sifields._sigsys._arch
+ 
+ # ifdef __USE_GNU
+ #  define si_imm  _sifields._sigfault._si_imm
+Index: uClibc/libc/sysdeps/linux/mips/bits/siginfo.h
+===
+--- uClibc.orig/libc/sysdeps/linux/mips/bits/siginfo.h
 uClibc/libc/sysdeps/linux/mips/bits/siginfo.h
+@@ -107,6 +107,14 @@ typedef struct siginfo
+   __uid_t si_uid; /* Real user ID of sending process.  */
+   sigval_t si_sigval; /* Signal value.  */
+ } _rt;
++
++  /* SIGSYS.  */
++  struct
++{
++  void *_call_addr;   /* Calling user insn.  */
++  int _syscall;   /* Triggering system call number.  */
++  uns

[OpenWrt-Devel] [PATCH] generic/4.0: update to 4.0.4

2015-05-19 Thread Daniel Golle
Update kernel sources and refresh some patches.

Signed-off-by: Daniel Golle 
---
 include/kernel-version.mk  | 4 ++--
 ...2-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch | 7 +--
 target/linux/generic/patches-4.0/102-ehci_hcd_ignore_oc.patch  | 4 ++--
 target/linux/generic/patches-4.0/304-mips_disable_fpu.patch| 4 ++--
 .../generic/patches-4.0/411-mtd-partial_eraseblock_write.patch | 3 +--
 target/linux/generic/patches-4.0/650-pppoe_header_pad.patch| 4 ++--
 target/linux/generic/patches-4.0/653-disable_netlink_trim.patch| 2 +-
 target/linux/generic/patches-4.0/655-increase_skb_pad.patch| 2 +-
 .../linux/generic/patches-4.0/656-skb_reduce_truesize-helper.patch | 2 +-
 target/linux/generic/patches-4.0/721-phy_packets.patch | 6 +++---
 .../generic/patches-4.0/820-usb_add_usb_find_device_by_name.patch  | 2 +-
 11 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 9067272..4da9918 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,10 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .11
-LINUX_VERSION-4.0 = .1
+LINUX_VERSION-4.0 = .4
 
 LINUX_KERNEL_MD5SUM-3.18.11 = 2def91951c9cedf7896efb864e0c090c
-LINUX_KERNEL_MD5SUM-4.0.1 = ea7fc80310be8a5b43b2c6dfa5c4169f
+LINUX_KERNEL_MD5SUM-4.0.4 = 71d8b666438e6b59f103e9384889c15a
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git 
a/target/linux/generic/patches-4.0/072-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch
 
b/target/linux/generic/patches-4.0/072-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch
index 39cf048..62e9379 100644
--- 
a/target/linux/generic/patches-4.0/072-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch
+++ 
b/target/linux/generic/patches-4.0/072-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch
@@ -17,11 +17,9 @@ Fixes: eb64e2923a886 ("bgmac: leave interrupts disabled as 
long as there is work
  drivers/net/ethernet/broadcom/bgmac.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/drivers/net/ethernet/broadcom/bgmac.c 
b/drivers/net/ethernet/broadcom/bgmac.c
-index de77d3a..21e3c38 100644
 --- a/drivers/net/ethernet/broadcom/bgmac.c
 +++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1260,7 +1260,7 @@ static int bgmac_poll(struct napi_struct *napi, int 
weight)
+@@ -1260,7 +1260,7 @@ static int bgmac_poll(struct napi_struct
  
/* Poll again if more events arrived in the meantime */
if (bgmac_read(bgmac, BGMAC_INT_STATUS) & (BGMAC_IS_TX0 | BGMAC_IS_RX))
@@ -30,6 +28,3 @@ index de77d3a..21e3c38 100644
  
if (handled < weight) {
napi_complete(napi);
--- 
-1.8.4.5
-
diff --git a/target/linux/generic/patches-4.0/102-ehci_hcd_ignore_oc.patch 
b/target/linux/generic/patches-4.0/102-ehci_hcd_ignore_oc.patch
index fbe7568..4da579c 100644
--- a/target/linux/generic/patches-4.0/102-ehci_hcd_ignore_oc.patch
+++ b/target/linux/generic/patches-4.0/102-ehci_hcd_ignore_oc.patch
@@ -31,7 +31,7 @@ Signed-off-by: Florian Fainelli 
&ehci->regs->intr_enable); /* Turn On Interrupts */
 --- a/drivers/usb/host/ehci-hub.c
 +++ b/drivers/usb/host/ehci-hub.c
-@@ -630,7 +630,7 @@ ehci_hub_status_data (struct usb_hcd *hc
+@@ -633,7 +633,7 @@ ehci_hub_status_data (struct usb_hcd *hc
 * always set, seem to clear PORT_OCC and PORT_CSC when writing to
 * PORT_POWER; that's surprising, but maybe within-spec.
 */
@@ -40,7 +40,7 @@ Signed-off-by: Florian Fainelli 
mask = PORT_CSC | PORT_PEC | PORT_OCC;
else
mask = PORT_CSC | PORT_PEC;
-@@ -992,7 +992,7 @@ int ehci_hub_control(
+@@ -995,7 +995,7 @@ int ehci_hub_control(
if (temp & PORT_PEC)
status |= USB_PORT_STAT_C_ENABLE << 16;
  
diff --git a/target/linux/generic/patches-4.0/304-mips_disable_fpu.patch 
b/target/linux/generic/patches-4.0/304-mips_disable_fpu.patch
index 2485830..080afa3 100644
--- a/target/linux/generic/patches-4.0/304-mips_disable_fpu.patch
+++ b/target/linux/generic/patches-4.0/304-mips_disable_fpu.patch
@@ -49,7 +49,7 @@ v2: incorporated changes suggested by Jonas Gorski
select OF
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -286,7 +286,7 @@ OBJCOPYFLAGS   += --remove-section=.regin
+@@ -292,7 +292,7 @@ OBJCOPYFLAGS   += --remove-section=.regin
  head-y := arch/mips/kernel/head.o
  
  libs-y+= arch/mips/lib/
@@ -60,7 +60,7 @@ v2: incorporated changes suggested by Jonas Gorski
  core-y += arch/mips/
 --- a/arch/mips/include/asm/fpu.h
 +++ b/arch/mips/include/asm/fpu.h
-@@ -211,8 +211,10 @@ static inline int init_fpu(void)
+@@ -212,8 +212,10 @@ static inline int init_fpu(void)
/* Restore FR

[OpenWrt-Devel] [PATCH] musl: update to version 1.1.9

2015-05-21 Thread Daniel Golle
The fixes previously contained in 001-git-2015-03-28.patch are all part
of the upstream release, thus the patch can be removed.
All other patches apply cleanly.

Signed-off-by: Daniel Golle 
---
 toolchain/musl/Config.version   |  2 +-
 toolchain/musl/common.mk|  2 +-
 toolchain/musl/patches/001-git-2015-03-28.patch | 93 -
 3 files changed, 2 insertions(+), 95 deletions(-)
 delete mode 100644 toolchain/musl/patches/001-git-2015-03-28.patch

diff --git a/toolchain/musl/Config.version b/toolchain/musl/Config.version
index 57b5bd0..c560c60 100644
--- a/toolchain/musl/Config.version
+++ b/toolchain/musl/Config.version
@@ -3,6 +3,6 @@ if USE_MUSL
 config MUSL_VERSION
string
depends on USE_MUSL
-   default "1.1.7"
+   default "1.1.9"
 
 endif
diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index c67be2a..f4a34e4 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -11,7 +11,7 @@ PKG_NAME:=musl
 PKG_VERSION:=$(call qstrip,$(CONFIG_MUSL_VERSION))
 PKG_RELEASE=1
 
-PKG_MD5SUM:=6fe9fc4d99a7d321432b3e179c138d73
+PKG_MD5SUM:=14e8c5ac74f887d53256b3dcaf9b4aaa
 
 PKG_SOURCE_URL:=http://www.musl-libc.org/releases
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/toolchain/musl/patches/001-git-2015-03-28.patch 
b/toolchain/musl/patches/001-git-2015-03-28.patch
deleted file mode 100644
index 85f0441..000
--- a/toolchain/musl/patches/001-git-2015-03-28.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff --git a/arch/aarch64/bits/alltypes.h.in b/arch/aarch64/bits/alltypes.h.in
-index 99f1654..d56abda 100644
 a/arch/aarch64/bits/alltypes.h.in
-+++ b/arch/aarch64/bits/alltypes.h.in
-@@ -16,6 +16,8 @@ TYPEDEF unsigned int nlink_t;
- TYPEDEF float float_t;
- TYPEDEF double double_t;
- 
-+TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
-+
- TYPEDEF long time_t;
- TYPEDEF long suseconds_t;
- 
-diff --git a/include/float.h b/include/float.h
-index c6429d3..713aadb 100644
 a/include/float.h
-+++ b/include/float.h
-@@ -1,6 +1,10 @@
- #ifndef _FLOAT_H
- #define _FLOAT_H
- 
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
- int __flt_rounds(void);
- #define FLT_ROUNDS (__flt_rounds())
- 
-@@ -41,4 +45,8 @@ int __flt_rounds(void);
- 
- #include 
- 
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif
-diff --git a/src/network/inet_pton.c b/src/network/inet_pton.c
-index 4496b47..d36c368 100644
 a/src/network/inet_pton.c
-+++ b/src/network/inet_pton.c
-@@ -39,14 +39,15 @@ int inet_pton(int af, const char *restrict s, void 
*restrict a0)
-   for (i=0; ; i++) {
-   if (s[0]==':' && brk<0) {
-   brk=i;
--  ip[i]=0;
-+  ip[i&7]=0;
-   if (!*++s) break;
-+  if (i==7) return 0;
-   continue;
-   }
-   for (v=j=0; j<4 && (d=hexval(s[j]))>=0; j++)
-   v=16*v+d;
-   if (j==0) return 0;
--  ip[i] = v;
-+  ip[i&7] = v;
-   if (!s[j] && (brk>=0 || i==7)) break;
-   if (i==7) return 0;
-   if (s[j]!=':') {
-diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
-index 4cdaa1e..978dd87 100644
 a/src/regex/regcomp.c
-+++ b/src/regex/regcomp.c
-@@ -839,7 +839,7 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, 
const char *s)
-   s--;
-   break;
-   default:
--  if (isdigit(*s)) {
-+  if (!ere && (unsigned)*s-'1' < 9) {
-   /* back reference */
-   int val = *s - '0';
-   node = tre_ast_new_literal(ctx->mem, BACKREF, 
val, ctx->position);
-@@ -847,7 +847,7 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, 
const char *s)
-   } else {
-   /* extension: accept unknown escaped char
-  as a literal */
--  node = tre_ast_new_literal(ctx->mem, *s, *s, 
ctx->position);
-+  goto parse_literal;
-   }
-   ctx->position++;
-   }
-@@ -1700,6 +1700,11 @@ tre_copy_ast(tre_mem_t mem, tre_stack_t *stack, 
tre_ast_node_t *ast,
-   *result = tre_ast_new_literal(mem, min, max, pos);
-   if (*result == NULL)
- status = REG_ESPACE;
-+  else {
-+tre_literal_t *p = (*result)->obj;
-+p->class = lit->class;
-+p->neg_classes = lit->neg_classes;
-+  }
- 
-   if (pos > *max_pos)
- *max_pos = pos;
-- 
2.4.0
___

Re: [OpenWrt-Devel] Chaos Calmer 15.05-rc1

2015-05-21 Thread Daniel Golle
Hi Thomas,

On Thu, May 21, 2015 at 12:37:35PM +, thomas.lan...@lantiq.com wrote:
> I checked the downloads, e.g here 
> http://downloads.openwrt.org/chaos_calmer/15.05-rc1/lantiq/xrx200/
> and saw that only one image per subtarget is built.
> As the image-creation is tied to the profiles, the buildbot probably need to 
> build for each profile.
> 
> John: Do you know if it is possible to add a "generic" profile to build all 
> images in one run?
> Or why it is necessary to select a specific model for the build?

Having a generic profile was not intended in the way image creation
was previously implemented.
This is a known problem on all device-tree-based targets and the reason
for framework changes which would by now allow doing this properly.

Targets will have to pick-up the new image building code Felix
introduced in r43907 (which was improved a lot since and was already
used to replace the old approach for quite some boards)

However, having it implemented for all boards in 15.05 is not
realistic imho. Thus the final build will hopefully run for each
profile. (John, Kaloz: will it?)


Cheers


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


[OpenWrt-Devel] [PATCH] procd: update sources

2015-05-22 Thread Daniel Golle
Adds seccomp support in procd also for ARM-based systems.

Signed-off-by: Daniel Golle 
---
 package/system/procd/Makefile | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 758f0a4..a9f1059 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=procd
-PKG_VERSION:=2015-05-05
+PKG_VERSION:=2015-05-22
 
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://nbd.name/luci2/procd.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=a6afa72f192f6efe8374d0f0c77fb2a545225a92
+PKG_SOURCE_VERSION:=4574087e5ab6e5bb2758b4da85d0916ff5bd2329
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 CMAKE_INSTALL:=1
 
@@ -77,12 +77,12 @@ config PROCD_ZRAM_TMPFS
 config PROCD_JAIL_SUPPORT
bool
default y
-   depends on (mips || mipsel || i386 || x86_64) && PROCD_SECCOMP_SUPPORT
+   depends on (arm || armeb || mips || mipsel || i386 || x86_64) && 
PROCD_SECCOMP_SUPPORT
 
 config PROCD_SECCOMP_SUPPORT
bool
default y
-   depends on (mips || mipsel || i386 || x86_64) && !TARGET_uml && 
@KERNEL_SECCOMP
+   depends on (arm || armeb || mips || mipsel || i386 || x86_64) && 
!TARGET_uml && @KERNEL_SECCOMP
 endmenu
 endef
 
-- 
2.4.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] musl: update to version 1.1.9

2015-05-23 Thread Daniel Golle
Plus changes up to 2015-05-22 to fix ldso related regression on PPC.

Signed-off-by: Daniel Golle 
---
 toolchain/musl/Config.version   |   2 +-
 toolchain/musl/common.mk|   2 +-
 toolchain/musl/patches/001-git-2015-03-28.patch |  93 
 toolchain/musl/patches/001-git-2015-05-22.patch | 682 
 4 files changed, 684 insertions(+), 95 deletions(-)
 delete mode 100644 toolchain/musl/patches/001-git-2015-03-28.patch
 create mode 100644 toolchain/musl/patches/001-git-2015-05-22.patch

diff --git a/toolchain/musl/Config.version b/toolchain/musl/Config.version
index 57b5bd0..c560c60 100644
--- a/toolchain/musl/Config.version
+++ b/toolchain/musl/Config.version
@@ -3,6 +3,6 @@ if USE_MUSL
 config MUSL_VERSION
string
depends on USE_MUSL
-   default "1.1.7"
+   default "1.1.9"
 
 endif
diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index c67be2a..f4a34e4 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -11,7 +11,7 @@ PKG_NAME:=musl
 PKG_VERSION:=$(call qstrip,$(CONFIG_MUSL_VERSION))
 PKG_RELEASE=1
 
-PKG_MD5SUM:=6fe9fc4d99a7d321432b3e179c138d73
+PKG_MD5SUM:=14e8c5ac74f887d53256b3dcaf9b4aaa
 
 PKG_SOURCE_URL:=http://www.musl-libc.org/releases
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/toolchain/musl/patches/001-git-2015-03-28.patch 
b/toolchain/musl/patches/001-git-2015-03-28.patch
deleted file mode 100644
index 85f0441..000
--- a/toolchain/musl/patches/001-git-2015-03-28.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff --git a/arch/aarch64/bits/alltypes.h.in b/arch/aarch64/bits/alltypes.h.in
-index 99f1654..d56abda 100644
 a/arch/aarch64/bits/alltypes.h.in
-+++ b/arch/aarch64/bits/alltypes.h.in
-@@ -16,6 +16,8 @@ TYPEDEF unsigned int nlink_t;
- TYPEDEF float float_t;
- TYPEDEF double double_t;
- 
-+TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
-+
- TYPEDEF long time_t;
- TYPEDEF long suseconds_t;
- 
-diff --git a/include/float.h b/include/float.h
-index c6429d3..713aadb 100644
 a/include/float.h
-+++ b/include/float.h
-@@ -1,6 +1,10 @@
- #ifndef _FLOAT_H
- #define _FLOAT_H
- 
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
- int __flt_rounds(void);
- #define FLT_ROUNDS (__flt_rounds())
- 
-@@ -41,4 +45,8 @@ int __flt_rounds(void);
- 
- #include 
- 
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif
-diff --git a/src/network/inet_pton.c b/src/network/inet_pton.c
-index 4496b47..d36c368 100644
 a/src/network/inet_pton.c
-+++ b/src/network/inet_pton.c
-@@ -39,14 +39,15 @@ int inet_pton(int af, const char *restrict s, void 
*restrict a0)
-   for (i=0; ; i++) {
-   if (s[0]==':' && brk<0) {
-   brk=i;
--  ip[i]=0;
-+  ip[i&7]=0;
-   if (!*++s) break;
-+  if (i==7) return 0;
-   continue;
-   }
-   for (v=j=0; j<4 && (d=hexval(s[j]))>=0; j++)
-   v=16*v+d;
-   if (j==0) return 0;
--  ip[i] = v;
-+  ip[i&7] = v;
-   if (!s[j] && (brk>=0 || i==7)) break;
-   if (i==7) return 0;
-   if (s[j]!=':') {
-diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
-index 4cdaa1e..978dd87 100644
 a/src/regex/regcomp.c
-+++ b/src/regex/regcomp.c
-@@ -839,7 +839,7 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, 
const char *s)
-   s--;
-   break;
-   default:
--  if (isdigit(*s)) {
-+  if (!ere && (unsigned)*s-'1' < 9) {
-   /* back reference */
-   int val = *s - '0';
-   node = tre_ast_new_literal(ctx->mem, BACKREF, 
val, ctx->position);
-@@ -847,7 +847,7 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, 
const char *s)
-   } else {
-   /* extension: accept unknown escaped char
-  as a literal */
--  node = tre_ast_new_literal(ctx->mem, *s, *s, 
ctx->position);
-+  goto parse_literal;
-   }
-   ctx->position++;
-   }
-@@ -1700,6 +1700,11 @@ tre_copy_ast(tre_mem_t mem, tre_stack_t *stack, 
tre_ast_node_t *ast,
-   *result = tre_ast_new_literal(mem, min, max, pos);
-   if (*result == NULL)
- status = REG_ESPACE;
-+  else {
-+tre_literal_t *p = (*result)->obj;
-+p->class = lit->class;
-+p->neg_classes = lit->neg_classes;
-+  }
- 
-   if (pos > *max_pos)
- 

[OpenWrt-Devel] [PATCH v2] generic/4.0: update to 4.0.4

2015-05-23 Thread Daniel Golle
Update kernel sources and refresh some patches.

Signed-off-by: Daniel Golle 
---
v2: rebase on current HEAD since r45711 broke the patch.

 include/kernel-version.mk  | 4 ++--
 ...2-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch | 7 +--
 target/linux/generic/patches-4.0/102-ehci_hcd_ignore_oc.patch  | 4 ++--
 target/linux/generic/patches-4.0/304-mips_disable_fpu.patch| 4 ++--
 .../generic/patches-4.0/411-mtd-partial_eraseblock_write.patch | 3 +--
 target/linux/generic/patches-4.0/650-pppoe_header_pad.patch| 4 ++--
 target/linux/generic/patches-4.0/653-disable_netlink_trim.patch| 2 +-
 target/linux/generic/patches-4.0/655-increase_skb_pad.patch| 2 +-
 .../linux/generic/patches-4.0/656-skb_reduce_truesize-helper.patch | 2 +-
 target/linux/generic/patches-4.0/721-phy_packets.patch | 6 +++---
 .../generic/patches-4.0/820-usb_add_usb_find_device_by_name.patch  | 2 +-
 11 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 6e4a563..3bb52c5 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,10 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .14
-LINUX_VERSION-4.0 = .1
+LINUX_VERSION-4.0 = .4
 
 LINUX_KERNEL_MD5SUM-3.18.14 = cb6f534b8ba52f1fed7979824a1b
-LINUX_KERNEL_MD5SUM-4.0.1 = ea7fc80310be8a5b43b2c6dfa5c4169f
+LINUX_KERNEL_MD5SUM-4.0.4 = 71d8b666438e6b59f103e9384889c15a
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git 
a/target/linux/generic/patches-4.0/072-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch
 
b/target/linux/generic/patches-4.0/072-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch
index 39cf048..62e9379 100644
--- 
a/target/linux/generic/patches-4.0/072-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch
+++ 
b/target/linux/generic/patches-4.0/072-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch
@@ -17,11 +17,9 @@ Fixes: eb64e2923a886 ("bgmac: leave interrupts disabled as 
long as there is work
  drivers/net/ethernet/broadcom/bgmac.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/drivers/net/ethernet/broadcom/bgmac.c 
b/drivers/net/ethernet/broadcom/bgmac.c
-index de77d3a..21e3c38 100644
 --- a/drivers/net/ethernet/broadcom/bgmac.c
 +++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1260,7 +1260,7 @@ static int bgmac_poll(struct napi_struct *napi, int 
weight)
+@@ -1260,7 +1260,7 @@ static int bgmac_poll(struct napi_struct
  
/* Poll again if more events arrived in the meantime */
if (bgmac_read(bgmac, BGMAC_INT_STATUS) & (BGMAC_IS_TX0 | BGMAC_IS_RX))
@@ -30,6 +28,3 @@ index de77d3a..21e3c38 100644
  
if (handled < weight) {
napi_complete(napi);
--- 
-1.8.4.5
-
diff --git a/target/linux/generic/patches-4.0/102-ehci_hcd_ignore_oc.patch 
b/target/linux/generic/patches-4.0/102-ehci_hcd_ignore_oc.patch
index fbe7568..4da579c 100644
--- a/target/linux/generic/patches-4.0/102-ehci_hcd_ignore_oc.patch
+++ b/target/linux/generic/patches-4.0/102-ehci_hcd_ignore_oc.patch
@@ -31,7 +31,7 @@ Signed-off-by: Florian Fainelli 
&ehci->regs->intr_enable); /* Turn On Interrupts */
 --- a/drivers/usb/host/ehci-hub.c
 +++ b/drivers/usb/host/ehci-hub.c
-@@ -630,7 +630,7 @@ ehci_hub_status_data (struct usb_hcd *hc
+@@ -633,7 +633,7 @@ ehci_hub_status_data (struct usb_hcd *hc
 * always set, seem to clear PORT_OCC and PORT_CSC when writing to
 * PORT_POWER; that's surprising, but maybe within-spec.
 */
@@ -40,7 +40,7 @@ Signed-off-by: Florian Fainelli 
mask = PORT_CSC | PORT_PEC | PORT_OCC;
else
mask = PORT_CSC | PORT_PEC;
-@@ -992,7 +992,7 @@ int ehci_hub_control(
+@@ -995,7 +995,7 @@ int ehci_hub_control(
if (temp & PORT_PEC)
status |= USB_PORT_STAT_C_ENABLE << 16;
  
diff --git a/target/linux/generic/patches-4.0/304-mips_disable_fpu.patch 
b/target/linux/generic/patches-4.0/304-mips_disable_fpu.patch
index 2485830..080afa3 100644
--- a/target/linux/generic/patches-4.0/304-mips_disable_fpu.patch
+++ b/target/linux/generic/patches-4.0/304-mips_disable_fpu.patch
@@ -49,7 +49,7 @@ v2: incorporated changes suggested by Jonas Gorski
select OF
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -286,7 +286,7 @@ OBJCOPYFLAGS   += --remove-section=.regin
+@@ -292,7 +292,7 @@ OBJCOPYFLAGS   += --remove-section=.regin
  head-y := arch/mips/kernel/head.o
  
  libs-y+= arch/mips/lib/
@@ -60,7 +60,7 @@ v2: incorporated changes suggested by Jonas Gorski
  core-y += arch/mips/
 --- a/arch/mips/include/asm/fpu.h
 +++ b/arch/mips/include/asm/fpu.h
-@@ -211,8 +211,10 @@ static inline int init_fpu(void)
+@@ -212,8 +212,

[OpenWrt-Devel] [PATCH] netifd: bump to current HEAD

2015-05-24 Thread Daniel Golle
This introduces a new config parameter "no-proto-task" useful for
xl2tpd.

Signed-off-by: Daniel Golle 
---
 package/network/config/netifd/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/config/netifd/Makefile 
b/package/network/config/netifd/Makefile
index 839b5b1..c943e69 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netifd
-PKG_VERSION:=2015-05-19
+PKG_VERSION:=2015-05-23
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=http://git.openwrt.org/project/netifd.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=9936bbfb3c8f6e39a3bc1f2418180caaca476aaa
+PKG_SOURCE_VERSION:=c68587663ef18fa87841be0a5281264361fab411
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MAINTAINER:=Felix Fietkau 
 # PKG_MIRROR_MD5SUM:=
-- 
2.4.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] musl: update to version 1.1.9

2015-05-25 Thread Daniel Golle
Patch to 2015-05-25 to fix ldso related regressions on PPC and MIPS.

Signed-off-by: Daniel Golle 
---
 toolchain/musl/Config.version   |   2 +-
 toolchain/musl/common.mk|   2 +-
 toolchain/musl/patches/001-git-2015-03-28.patch |  93 ---
 toolchain/musl/patches/001-git-2015-05-25.patch | 805 
 4 files changed, 807 insertions(+), 95 deletions(-)
 delete mode 100644 toolchain/musl/patches/001-git-2015-03-28.patch
 create mode 100644 toolchain/musl/patches/001-git-2015-05-25.patch

diff --git a/toolchain/musl/Config.version b/toolchain/musl/Config.version
index 57b5bd0..c560c60 100644
--- a/toolchain/musl/Config.version
+++ b/toolchain/musl/Config.version
@@ -3,6 +3,6 @@ if USE_MUSL
 config MUSL_VERSION
string
depends on USE_MUSL
-   default "1.1.7"
+   default "1.1.9"
 
 endif
diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index c67be2a..f4a34e4 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -11,7 +11,7 @@ PKG_NAME:=musl
 PKG_VERSION:=$(call qstrip,$(CONFIG_MUSL_VERSION))
 PKG_RELEASE=1
 
-PKG_MD5SUM:=6fe9fc4d99a7d321432b3e179c138d73
+PKG_MD5SUM:=14e8c5ac74f887d53256b3dcaf9b4aaa
 
 PKG_SOURCE_URL:=http://www.musl-libc.org/releases
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/toolchain/musl/patches/001-git-2015-03-28.patch 
b/toolchain/musl/patches/001-git-2015-03-28.patch
deleted file mode 100644
index 85f0441..000
--- a/toolchain/musl/patches/001-git-2015-03-28.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff --git a/arch/aarch64/bits/alltypes.h.in b/arch/aarch64/bits/alltypes.h.in
-index 99f1654..d56abda 100644
 a/arch/aarch64/bits/alltypes.h.in
-+++ b/arch/aarch64/bits/alltypes.h.in
-@@ -16,6 +16,8 @@ TYPEDEF unsigned int nlink_t;
- TYPEDEF float float_t;
- TYPEDEF double double_t;
- 
-+TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
-+
- TYPEDEF long time_t;
- TYPEDEF long suseconds_t;
- 
-diff --git a/include/float.h b/include/float.h
-index c6429d3..713aadb 100644
 a/include/float.h
-+++ b/include/float.h
-@@ -1,6 +1,10 @@
- #ifndef _FLOAT_H
- #define _FLOAT_H
- 
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
- int __flt_rounds(void);
- #define FLT_ROUNDS (__flt_rounds())
- 
-@@ -41,4 +45,8 @@ int __flt_rounds(void);
- 
- #include 
- 
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif
-diff --git a/src/network/inet_pton.c b/src/network/inet_pton.c
-index 4496b47..d36c368 100644
 a/src/network/inet_pton.c
-+++ b/src/network/inet_pton.c
-@@ -39,14 +39,15 @@ int inet_pton(int af, const char *restrict s, void 
*restrict a0)
-   for (i=0; ; i++) {
-   if (s[0]==':' && brk<0) {
-   brk=i;
--  ip[i]=0;
-+  ip[i&7]=0;
-   if (!*++s) break;
-+  if (i==7) return 0;
-   continue;
-   }
-   for (v=j=0; j<4 && (d=hexval(s[j]))>=0; j++)
-   v=16*v+d;
-   if (j==0) return 0;
--  ip[i] = v;
-+  ip[i&7] = v;
-   if (!s[j] && (brk>=0 || i==7)) break;
-   if (i==7) return 0;
-   if (s[j]!=':') {
-diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
-index 4cdaa1e..978dd87 100644
 a/src/regex/regcomp.c
-+++ b/src/regex/regcomp.c
-@@ -839,7 +839,7 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, 
const char *s)
-   s--;
-   break;
-   default:
--  if (isdigit(*s)) {
-+  if (!ere && (unsigned)*s-'1' < 9) {
-   /* back reference */
-   int val = *s - '0';
-   node = tre_ast_new_literal(ctx->mem, BACKREF, 
val, ctx->position);
-@@ -847,7 +847,7 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, 
const char *s)
-   } else {
-   /* extension: accept unknown escaped char
-  as a literal */
--  node = tre_ast_new_literal(ctx->mem, *s, *s, 
ctx->position);
-+  goto parse_literal;
-   }
-   ctx->position++;
-   }
-@@ -1700,6 +1700,11 @@ tre_copy_ast(tre_mem_t mem, tre_stack_t *stack, 
tre_ast_node_t *ast,
-   *result = tre_ast_new_literal(mem, min, max, pos);
-   if (*result == NULL)
- status = REG_ESPACE;
-+  else {
-+tre_literal_t *p = (*result)->obj;
-+p->class = lit->class;
-+p->neg_classes = lit->neg_classes;
-+  }
- 
-   if (pos > *max_pos)
- 

Re: [OpenWrt-Devel] [PATCH 3/6] kernel: add stmmac as a new kernel package

2015-05-29 Thread Daniel Golle
Please note that the sunxi and oxnas targets already use stmmac.

However, in your patch the selected config symbols do not apply to
stmmac in general but are specific to the hardware you are using.
Please either make the module depend on the target platforms
it is meant to be used on or fix it so it actually covers the generic
case.

On Tue, May 26, 2015 at 02:27:54PM -0700, Mathieu Olivari wrote:
> Signed-off-by: Mathieu Olivari 
> ---
>  package/kernel/linux/modules/netdevices.mk | 21 +
>  1 file changed, 21 insertions(+)
> 
> diff --git a/package/kernel/linux/modules/netdevices.mk 
> b/package/kernel/linux/modules/netdevices.mk
> index 9dd18f3..62fd949 100644
> --- a/package/kernel/linux/modules/netdevices.mk
> +++ b/package/kernel/linux/modules/netdevices.mk
> @@ -811,6 +811,27 @@ endef
>  $(eval $(call KernelPackage,vmxnet3))
>  
>  
> +define KernelPackage/stmmac
> +  SUBMENU:=$(NETWORK_DEVICES_MENU)
> +  TITLE:=STMicro 10/100/1000 Ethernet driver
> +  DEPENDS:=+kmod-mii +kmod-ptp
> +  KCONFIG:=CONFIG_NET_VENDOR_STMICRO=y \
> +   CONFIG_STMMAC_ETH \
> +   CONFIG_STMMAC_PLATFORM=y \
> +   CONFIG_STMMAC_DEBUG_FS=y \
> +   CONFIG_STMMAC_DA=y \
> +   CONFIG_DWMAC_IPQ806X=y
> +  FILES:=$(LINUX_DIR)/drivers/net/ethernet/stmicro/stmmac/stmmac.ko
> +  AUTOLOAD:=$(call AutoLoad,50,stmmac.ko)
> +endef
> +
> +define KernelPackage/stmmac/description
> +  Kernel module for STMicroelectronics 10/100/1000 Ethernet driver
> +endef
> +
> +$(eval $(call KernelPackage,stmmac))
> +
> +
>  define KernelPackage/spi-ks8995
>SUBMENU:=$(NETWORK_DEVICES_MENU)
>TITLE:=Micrel/Kendin KS8995 Ethernet switch control
> -- 
> 2.1.4
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] malta: add default network configuration

2015-05-30 Thread Daniel Golle
I didn't figure out how to achieve this using uci-defaults-new.sh,
so use old-school uci-defaults script as that's what is used on
realview as well.

Signed-off-by: Daniel Golle 
---
 target/linux/malta/base-files/etc/uci-defaults/02-network | 6 ++
 1 file changed, 6 insertions(+)
 create mode 100644 target/linux/malta/base-files/etc/uci-defaults/02-network

diff --git a/target/linux/malta/base-files/etc/uci-defaults/02-network 
b/target/linux/malta/base-files/etc/uci-defaults/02-network
new file mode 100644
index 000..e90ecbe
--- /dev/null
+++ b/target/linux/malta/base-files/etc/uci-defaults/02-network
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+. /lib/functions/uci-defaults.sh
+
+ucidef_set_interface_loopback
+ucidef_set_interface_raw "lan" "eth0" "dhcp"
-- 
2.4.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] folder for snapshot builds missing for ipq806x

2015-06-01 Thread Daniel Golle
Hi!

Someone with the needed access rights, please make sure all buildbot
targets also have their folder on downloads.openwrt.org

Looks like at least ipq806x is missing and cannot upload the packages
made:

http://buildbot.openwrt.org:8010/builders/ipq806x/builds/17/steps/shell_11/logs/stdio


Cheers


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


[OpenWrt-Devel] automated builds with hardening features enabled

2015-06-11 Thread Daniel Golle
Hi!

Thinking about how we could improve automated QA, I was wondering if
we could have buildbot also run builds with hardening features enabled?

For the beginning, it'd be enough if every 10th build would have SSP,
seccomp/jails, RELRO, ... as well as LXC-related features enabled.
Then we could have broken_packages_hardened/* and package maintainers
could get aware that stuff breaks if hardening is enabled.
In a way, the same could be applied for debugging (CONFIG_DEBUG) as
well as localization (BUILD_NLS), but I reckon it makes sense to
start-off with all sorts of hardening features enabled.

What do you think?
Could tasks to build hardened snapshots for all targets be dispatched
by buildbot.openwrt.org?
Who'd want to donate a buildslave for that?


Cheers


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


Re: [OpenWrt-Devel] Chaos Calmer 15.05-rc2

2015-06-14 Thread Daniel Golle
On Sat, Jun 13, 2015 at 04:21:55PM +0200, Steven Barth wrote:
> ** Highlights since Barrier Breaker **
> ...
> * Platform and Driver Support
> ...
> - New sunxi target for AllWinner A10/A13/A20 family and various boards

Please also mention:
 - New oxnas target for Oxford/PLXTECH NAS782x family and various boards


Cheers


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


[OpenWrt-Devel] [PATCH] oxnas: change file extension of u-boot+initramfs image

2015-06-14 Thread Daniel Golle
The *u-boot-initramfs* images are not ITB/FIT images but are rather
supposed to be loaded to RAM and jumped-into.
To avoid confusion, change the file extension from itb to bin.

Signed-off-by: Daniel Golle 
---
 target/linux/oxnas/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/oxnas/image/Makefile 
b/target/linux/oxnas/image/Makefile
index 2660a9b..de6c4db 100644
--- a/target/linux/oxnas/image/Makefile
+++ b/target/linux/oxnas/image/Makefile
@@ -38,7 +38,7 @@ define Image/BuildKernel/Template
$(CP) $(KDIR)/fit-$(1)-initramfs.itb 
$(BIN_DIR)/$(IMG_PREFIX)-$(1)-fit-uImage-initramfs.itb
if [ -e "$(KDIR)/u-boot.bin" ]; then \
( dd if=$(KDIR)/u-boot.bin bs=128k conv=sync ; dd 
if=$(KDIR)/fit-$(1)-initramfs.itb bs=128k conv=sync ) \
-   > $(BIN_DIR)/$(IMG_PREFIX)-$(1)-u-boot-initramfs.itb; \
+   > $(BIN_DIR)/$(IMG_PREFIX)-$(1)-u-boot-initramfs.bin; \
fi
  endif
 
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] ar71xx: add 4.0 support

2015-06-15 Thread Daniel Golle
On Mon, Jun 15, 2015 at 06:15:58PM +0300, Roman Yeryomin wrote:
> On 14 June 2015 at 20:15, Roman Yeryomin  wrote:
> > Tested on UAP-PRO
> >
> 
> Please discard this, it's broken because of 45954.
> I will send rebased version.

Yes, I saw that and manually fixed it to test on TL-WDR3500.
Apart from the breakage introduced by r45954 (which was trivial to fix)
everything seems to work well.

Thanks for the good work!


Cheers


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


[OpenWrt-Devel] [PATCH] kernel: mitigate cgroups config dependency changes

2015-06-16 Thread Daniel Golle
Memory Resource Controller no longer depends on Resource counters since
Kernel version 4.0.

Signed-off-by: Daniel Golle 
---
 config/Config-kernel.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index cc8df5a..86753ca 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -300,7 +300,7 @@ if KERNEL_CGROUPS
config KERNEL_MEMCG
bool "Memory Resource Controller for Control Groups"
default n
-   depends on KERNEL_RESOURCE_COUNTERS
+   depends on KERNEL_RESOURCE_COUNTERS || LINUX_4_0
help
  Provides a memory resource controller that manages both 
anonymous
  memory and page cache. (See Documentation/cgroups/memory.txt)
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Renaming trunk to Dxx Dxx ?

2015-06-16 Thread Daniel Golle
On Tue, Jun 16, 2015 at 03:58:34PM +0300, Hannu Nyman wrote:
> Please rename trunk to Dxxx Dxxx something.
> 
> It is a bit confusing when both trunk and CC15.05 claim to be Chaos Calmer.
> The clear identification of the two got more important now when trunk has
> started to use musl, and trunk and CC start to deviate further.
> 
> I considered patching trunk's include/toplevel.mk and etc/banner in my own
> build to something imaginary, but it would much better if the official new
> name gets assigned (or should I say designated?) soon.

After the heated debate about concerning naming the next release, maybe the
spelled-out release name should be configurable in menuconfig?

Some Freifunk groups apparently consider running
find | while read f; do
sed -i 's/Designated Driver/Dirty Diamond/' "$f";
done

libreCMC also defined spelled-out names for their releases:
https://librecmc.org/librecmc/wiki?name=releases


Cheers


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


[OpenWrt-Devel] [PATCH v2] kernel: mitigate cgroups config dependency changes

2015-06-17 Thread Daniel Golle
Memory Resource Controller no longer depends on Resource counters since
Kernel version 4.0. 
3.18 is the only still supported version needing Resource counters for
MEMCG, thus declare the dependency only for that version.

Signed-off-by: Daniel Golle 
---
 config/Config-kernel.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index cc8df5a..2572bf4 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -300,7 +300,7 @@ if KERNEL_CGROUPS
config KERNEL_MEMCG
bool "Memory Resource Controller for Control Groups"
default n
-   depends on KERNEL_RESOURCE_COUNTERS
+   depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18
help
  Provides a memory resource controller that manages both 
anonymous
  memory and page cache. (See Documentation/cgroups/memory.txt)
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] SSL/TLS crypto library headaches

2015-06-28 Thread Daniel Golle
Hi everybody!

I believe we all agree that the world is a mess.
Thus it's not very surprising that the currente state of crypto-
libraries *and their packaging* is just as messy as everything else.
However, especially in case of those libraries, one might want to be
very careful and choose a single system-wide implementation and
configuration.
In OpenWrt we currently favour mbedTLS/PolarSSL but also provide
cyassl, OpenSSL and GnuTLS.
As most packages need to be linked against one specific library at
build time, this is either configurable in the build system (like for
curl, see [1]) or provide several build variants, one foreach crypto-
backend supported by the package (like ustream-ssl, see [2]).
Using build-variants is feasible in case the number of variants is low
enough to maintain. In case of curl, which allows the selection of
various features at compile time, that would result in v = 2^f * t
where v is the total number of build-variants, f the number of boolean
feature decissions (enable/disable) and t the number of supported
crypto-libraries. Most likely not all combinations will result in a
successful build or usable binaries...
In either way, packages making use of libraries (like libcurl or
libustream-ssl) will either have to accept build-time choices made
for those libraries (like in case of libcurl) or select a specific
variant to depend on (like in case of libustream-polarssl) and maybe
by itself provide variants of the package for each upstream cryptolib
available (like uhttpd does, see [3]).

I thus suggest to fix the mess by selecting a *single* implementation
at build-time, similar to how we allow different C++ standard libraries
to be selected, see [4].
In that way, packages can depend on $(TLS_DEPENDS) and provide some
ifdefery around CONFIG_USE_MBEDTLS, CONFIG_USE_GNUTLS, ...
It's notable that this would also allow to build most packages made
to be linked with OpenSSL against libgnutls-openssl without having
to change sources as GnuTLS provides some drop-in headers for
source-level compatibility with OpenSSL.

An alternative may be to provide automatic packaging templates and
allow packages to declare which crypto-backends they support and
auto-generate variants as well as CONFIGURE_ARGS, ... and templates
for packages making use of them further downstream on the dependency
graph.

I'd appreciate to be pointed at any previous discussion on that topic
and would like to know the opinion of other developers.


Cheers


Daniel

 1: https://dev.openwrt.org/browser/trunk/package/network/utils/curl/Config.in
 2: https://dev.openwrt.org/browser/trunk/package/libs/ustream-ssl/Makefile
 3: 
https://dev.openwrt.org/browser/trunk/package/network/services/uhttpd/Makefile#L65
 4: https://dev.openwrt.org/browser/trunk/include/uclibc%2B%2B.mk#L8
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] kernel: add Ricoh RS5C372 RTC module support

2015-07-14 Thread Daniel Golle
Signed-off-by: Daniel Golle 
---
 package/kernel/linux/modules/other.mk | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/package/kernel/linux/modules/other.mk 
b/package/kernel/linux/modules/other.mk
index 473f063..b4907f4 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -643,6 +643,21 @@ endef
 
 $(eval $(call KernelPackage,rtc-pt7c4338))
 
+define KernelPackage/rtc-rs5c372
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Ricoh RS5C372A/B (and compatbile) RTC support
+  DEPENDS:=@RTC_SUPPORT +kmod-i2c-core
+  KCONFIG:=CONFIG_RTC_DRV_RS5C372
+  FILES:=$(LINUX_DIR)/drivers/rtc/rtc-rs5c372.ko
+  AUTOLOAD:=$(call AutoProbe,rtc-rs5c372)
+endef
+
+define KernelPackage/rtc-rs5c372/description
+ Kernel module for Ricoh R2025S/D, RS5C372A, RS5C372B, RV5C386
+ and RV5C387A RTC chips
+endef
+
+$(eval $(call KernelPackage,rtc-rs5c372))
 
 define KernelPackage/mtdtests
   SUBMENU:=$(OTHER_MENU)
-- 
2.4.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] mvebu: add support for BUFFALO LS42x

2015-07-14 Thread Daniel Golle
This adds support for the BUFFALO LinkStation LS421DE aka. LS-M 88f6710
aka. Yanagi, a dual-bay SATA-II gigE NAS box featuring the Marvell
Armada-370 88F6710 SoC. It comes with 512 MB NAND flash, a tiny 1 MB
SPI NOR flash for U-Boot and 512 MB DDR SDRAM. It got an on-board
USB 3.0 host controller wired to a USB 3.0 socket at the front as
well as the in-SoC USB 2.0 host wired to a port on the back of the
device.
Still missing/not working:
 * poweroff/reset
 * Wake-on-LAN
 * easy and non-intrusive way to flash via factory ROM

Signed-off-by: Daniel Golle 
---
 target/linux/mvebu/base-files/etc/diag.sh  |   3 +
 target/linux/mvebu/base-files/lib/mvebu.sh |   3 +
 .../arm/boot/dts/armada-370-buffalo-yanagi.dts | 383 +
 target/linux/mvebu/image/Makefile  |   1 +
 .../patches-4.0/006-build_buffalo_yanagi_dts.patch |  14 +
 target/linux/mvebu/profiles/buffalo.mk |  23 ++
 6 files changed, 427 insertions(+)
 create mode 100644 
target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-yanagi.dts
 create mode 100644 
target/linux/mvebu/patches-4.0/006-build_buffalo_yanagi_dts.patch
 create mode 100644 target/linux/mvebu/profiles/buffalo.mk

diff --git a/target/linux/mvebu/base-files/etc/diag.sh 
b/target/linux/mvebu/base-files/etc/diag.sh
index 6534ac3..53c45a3 100644
--- a/target/linux/mvebu/base-files/etc/diag.sh
+++ b/target/linux/mvebu/base-files/etc/diag.sh
@@ -9,6 +9,9 @@ get_status_led() {
armada-xp-linksys-mamba)
status_led="mamba:white:power"
;;
+   armada-370-buffalo-yanagi)
+   status_led="yanagi:white:power"
+   ;;
esac
 }
 
diff --git a/target/linux/mvebu/base-files/lib/mvebu.sh 
b/target/linux/mvebu/base-files/lib/mvebu.sh
index 3edfa6b..1c6b0fa 100755
--- a/target/linux/mvebu/base-files/lib/mvebu.sh
+++ b/target/linux/mvebu/base-files/lib/mvebu.sh
@@ -19,6 +19,9 @@ mvebu_board_detect() {
*"Globalscale Mirabox")
name="mirabox"
;;
+   *"BUFFALO LS42x")
+   name="armada-370-buffalo-yanagi"
+   ;;
*"Marvell Armada 370 Reference Design")
name="armada-370-rd"
;;
diff --git 
a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-yanagi.dts 
b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-yanagi.dts
new file mode 100644
index 000..16f5a8f
--- /dev/null
+++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-yanagi.dts
@@ -0,0 +1,383 @@
+/*
+ * Device Tree file for BUFFALO YANAGI board found in LinkStation LS42x
+ *  all information found via visual inspection of the board and wild
+ *  guessing/probing.
+ *
+ * Copyright (C) 2015, Daniel Golle 
+ * Copyright (C) 2013, Arnaud EBALARD 
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include 
+#include 
+#include "armada-370.dtsi"
+
+/ {
+   model = "BUFFALO LS42x&quo

[OpenWrt-Devel] [PATCH 3/3] uboot-envtools: add support for BUFFALO LS42x

2015-07-14 Thread Daniel Golle
Signed-off-by: Daniel Golle 
---
 package/boot/uboot-envtools/files/mvebu | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/boot/uboot-envtools/files/mvebu 
b/package/boot/uboot-envtools/files/mvebu
index 13b48fd..bed3b23 100644
--- a/package/boot/uboot-envtools/files/mvebu
+++ b/package/boot/uboot-envtools/files/mvebu
@@ -20,6 +20,9 @@ armada-385-linksys-caiman|armada-385-linksys-cobra)
 armada-xp-linksys-mamba)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4" "0x2"
;;
+armada-370-buffalo-yanagi)
+   ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1" "0x1"
+   ;;
 esac
 
 config_load ubootenv
-- 
2.4.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Chaos Calmer 15.05-rc3

2015-07-16 Thread Daniel Golle
On Thu, Jul 16, 2015 at 04:39:58PM +0200, Steven Barth wrote:
> The OpenWrt developers are proud to announce the third release candidate of 
> OpenWrt Chaos Calmer.
> ...
> ** Improvements since RC 2 **
> * brcmfmac: support for BCM43602
> * mt76: updated version with new firmware support, TX & DMA fixes
> * Updated 3.18 to 3.18.18
> * Fixed image builder generation
> * Various security updates (e.g. openssl, curl)
> * Minor fixes

Great to see we are getting close to the final!

I noticed that though package lists are now signed, the device-specific
binaries (ie. *sysupgrade*, *factory*, ...) are still not signed.
For the final release, it would be great to also have those files
signed, e.g. by signing the already created md5sums and sha256sums.

just my 2 cents...
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Chaos Calmer 15.05 package build failures in SDK

2015-07-16 Thread Daniel Golle
On Thu, Jul 16, 2015 at 04:39:58PM +0200, Steven Barth wrote:
> The OpenWrt developers are proud to announce the third release candidate of 
> OpenWrt Chaos Calmer.
> ...
>  CHAOS CALMER (15.05 RC3)

I also noticed that the SDK is still broken:
 * feeds.conf.default is missing
   git-src base git://git.openwrt.org/15.05/openwrt.git
 * glib2 build fails with
   
/usr/src/OpenWrt-SDK-15.05-rc3-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/msgfmt
 -o af.mo af.po
   
/usr/src/OpenWrt-SDK-15.05-rc3-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/msgfmt:
 error while loading shared libraries: libtinfo.so.5: cannot open shared object 
file: No such file or directory
   breaking build of all dependent packages.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Chaos Calmer 15.05 package build failures in SDK

2015-07-16 Thread Daniel Golle
On Thu, Jul 16, 2015 at 07:06:34PM +0200, Daniel Golle wrote:
> On Thu, Jul 16, 2015 at 04:39:58PM +0200, Steven Barth wrote:
> > The OpenWrt developers are proud to announce the third release candidate of 
> > OpenWrt Chaos Calmer.
> > ...
> >  CHAOS CALMER (15.05 RC3)
> 
> I also noticed that the SDK is still broken:
>  * feeds.conf.default is missing
>git-src base git://git.openwrt.org/15.05/openwrt.git
>  * glib2 build fails with
>
> /usr/src/OpenWrt-SDK-15.05-rc3-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/msgfmt
>  -o af.mo af.po
>
> /usr/src/OpenWrt-SDK-15.05-rc3-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/msgfmt:
>  error while loading shared libraries: libtinfo.so.5: cannot open shared 
> object file: No such file or directory
>breaking build of all dependent packages.
  * gdbm breaks with some weird autotools version mismatch
  make[6]: Entering directory 
'/usr/src/OpenWrt-SDK-15.05-rc3-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/gdbm-1.11/po'
  *** error: gettext infrastructure mismatch: using a Makefile.in.in from 
gettext version 0.18 but the autoconf macros are from gettext version 0.19
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


  1   2   3   4   5   6   7   8   9   10   >