Re: [OpenWrt-Devel] [PATCH] sysctl: read settings from /etc/sysctl.d/*.conf

2015-05-27 Thread Jonathan Thibault
You might want to adjust the hotplug script too.

On 27/05/15 05:23 AM, Stefan Tomanek wrote:
> This changes makes it possible to store custom settings
> in individual files inside the directory /etc/sysctl.d/,
> which take precedence over /etc/sysctl.conf.
>
> Signed-off-by: Stefan Tomanek 
> ---
>  package/base-files/files/etc/init.d/sysctl |4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/package/base-files/files/etc/init.d/sysctl 
> b/package/base-files/files/etc/init.d/sysctl
> index 36e29ea..2dfbaf7 100755
> --- a/package/base-files/files/etc/init.d/sysctl
> +++ b/package/base-files/files/etc/init.d/sysctl
> @@ -3,5 +3,7 @@
>  
>  START=11
>  start() {
> - [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
> + for CONF in /etc/sysctl.conf /etc/sysctl.d/*.conf; do
> + [ -f "$CONF" ] && sysctl -p "$CONF" -e >&-
> + done
>  }
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] octeon: Allow sysupgrade restore on ER

2018-11-12 Thread Jonathan Thibault
This is a very simple patch that completes sysupgrade functionality on 
UBNT ER8.


Default layout leaves about 128MB free on the kernel partition so there 
is plenty of space for temporary config backups.



diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config 
b/target/linux/octeon/base-files/lib/preinit/79_move_config

index ec63d9f5ff..d50bac081b 100644
--- a/target/linux/octeon/base-files/lib/preinit/79_move_config
+++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
@@ -10,6 +10,11 @@ move_config() {
[ -f /mnt/sysupgrade.tgz ] && mv -f 
/mnt/sysupgrade.tgz /

umount /mnt
;;
+   er)
+   mount -t vfat /dev/mmcblk0p1 /mnt
+   [ -f /mnt/sysupgrade.tgz ] && mv -f 
/mnt/sysupgrade.tgz /

+   umount /mnt
+   ;;
esac
 }

diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh

index cd49c0da36..2a2136f196 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -28,6 +28,11 @@ platform_copy_config() {
cp -af "$CONF_TAR" /mnt/
umount /mnt
;;
+   er)
+   mount -t vfat /dev/mmcblk0p1 /mnt
+   cp -af "$CONF_TAR" /mnt/
+   umount /mnt
+   ;;
esac
 }


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


Re: [OpenWrt-Devel] [PATCH] octeon: Allow sysupgrade restore on ER

2018-11-13 Thread Jonathan Thibault

On 12/11/18 03:45 PM, Stijn Tintel wrote:

On 12/11/18 17:56, Jonathan Thibault wrote:

This is a very simple patch that completes sysupgrade functionality on
UBNT ER8.

Default layout leaves about 128MB free on the kernel partition so
there is plenty of space for temporary config backups.


diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config
b/target/linux/octeon/base-files/lib/preinit/79_move_config
index ec63d9f5ff..d50bac081b 100644
--- a/target/linux/octeon/base-files/lib/preinit/79_move_config
+++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
@@ -10,6 +10,11 @@ move_config() {
 [ -f /mnt/sysupgrade.tgz ] && mv -f
/mnt/sysupgrade.tgz /
 umount /mnt
 ;;
+   er)
+   mount -t vfat /dev/mmcblk0p1 /mnt
+   [ -f /mnt/sysupgrade.tgz ] && mv -f
/mnt/sysupgrade.tgz /
+   umount /mnt
+   ;;

Please order the options alphabetically.

 esac
  }

diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh
b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index cd49c0da36..2a2136f196 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -28,6 +28,11 @@ platform_copy_config() {
 cp -af "$CONF_TAR" /mnt/
 umount /mnt
 ;;
+   er)
+   mount -t vfat /dev/mmcblk0p1 /mnt
+   cp -af "$CONF_TAR" /mnt/
+   umount /mnt
+   ;;

Same here.

 esac
  }


Thanks,
Stijn

No problem.  I actually matched the order that was already in the file 
but I'll fix that as well and resubmit.



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


[OpenWrt-Devel] [PATCH v2] octeon: Allow sysupgrade restore on ER

2018-11-13 Thread Jonathan Thibault
This is a very simple patch that completes sysupgrade functionality on 
UBNT ER8.


Default layout leaves about 128MB free on the kernel partition so there 
is plenty of space for temporary config backups.


This version checks board names in alphabetical order.


diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config 
b/target/linux/octeon/base-files/lib/preinit/79_move_config

index ec63d9f5ff..470cbfe005 100644
--- a/target/linux/octeon/base-files/lib/preinit/79_move_config
+++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
@@ -5,6 +5,11 @@ move_config() {
. /lib/functions.sh

case "$(board_name)" in
+   er)
+   mount -t vfat /dev/mmcblk0p1 /mnt
+   [ -f /mnt/sysupgrade.tgz ] && mv -f 
/mnt/sysupgrade.tgz /

+   umount /mnt
+   ;;
erlite)
mount -t vfat /dev/sda1 /mnt
[ -f /mnt/sysupgrade.tgz ] && mv -f 
/mnt/sysupgrade.tgz /
diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh

index cd49c0da36..009eae7a2c 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -23,6 +23,11 @@ platform_get_rootfs() {

 platform_copy_config() {
case "$(board_name)" in
+   er)
+   mount -t vfat /dev/mmcblk0p1 /mnt
+   cp -af "$CONF_TAR" /mnt/
+   umount /mnt
+   ;;
erlite)
mount -t vfat /dev/sda1 /mnt
cp -af "$CONF_TAR" /mnt/
@@ -62,12 +67,12 @@ platform_do_upgrade() {

[ -b "${rootfs}" ] || return 1
case "$board" in
-   erlite)
-   kernel=sda1
-   ;;
er)
kernel=mmcblk0p1
;;
+   erlite)
+   kernel=sda1
+   ;;
*)
return 1
esac
@@ -82,8 +87,8 @@ platform_check_image() {
local board=$(board_name)

case "$board" in
-   erlite | \
-   er)
+   er | \
+   erlite)
local tar_file="$1"
local kernel_length=`(tar xf $tar_file 
sysupgrade-$board/kernel -O | wc -c) 2> /dev/null`
local rootfs_length=`(tar xf $tar_file 
sysupgrade-$board/root -O | wc -c) 2> /dev/null`




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


[OpenWrt-Devel] [PATCH] Allow VLAN filtering if needed.

2018-11-15 Thread Jonathan Thibault

Greetings,

I would like to propose enabling CONFIG_BRIDGE_VLAN_FILTERING on OpenWRT 
releases.


This allows us to use the bridge as a managed switch and gracefully 
handle mixed tagged and untagged frames. Prior to this, the only 
alternative was creating one bridge per vlan which quickly becomes a 
nightmare and still won't let you mix both tagged and untagged frames on 
the physical port without some complex ebtables magic.


This is in line with the notion that OpenWRT is the network go-to swiss 
army knife when you need a nice set-and-forget, low maintenance box to 
handle a specific task.


Current builds of the ip-bridge package already fully support this 
feature so the only requirement is enabling the kernel config.


This is disabled by default so existing bridge configurations will not 
be affected.  This patch only gives the ability to turn it on with an 
'ip link' command.  If there is interest, I could look into making the 
feature accessible via uci configuration.


It causes about 3.1% hit on raw bridging speed, which is relatively 
trivial considering that I had to use 300 byte packets to strain the CPU 
enough to notice a slowdown at all.  The ER8 would chug along at wire 
speed otherwise, and that's using only one core.  Since the typical 
bridge use case on OpenWRT is wireless, I doubt it would be noticeable 
at all.


With BRIDGE_VLAN_FILTERING

iperf -u -c 192.168.1.105 -b 1G -l 300

Client connecting to 192.168.1.105, UDP port 5001
Sending 300 byte datagrams, IPG target: 2.24 us (kalman adjust)
UDP buffer size:  208 KByte (default)

[  3] local 192.168.1.12 port 58045 connected with 192.168.1.105 port 5001
[ ID] Interval   Transfer Bandwidth
[  3]  0.0-10.0 sec   977 MBytes   820 Mbits/sec
[  3] Sent 3414986 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   811 MBytes   680 Mbits/sec   0.000 ms 
581210/3414986 (0%)


Without BRIDGE_VLAN_FILTERING

iperf -u -c 192.168.1.105 -b 1G -l 300

Client connecting to 192.168.1.105, UDP port 5001
Sending 300 byte datagrams, IPG target: 2.24 us (kalman adjust)
UDP buffer size:  208 KByte (default)

[  3] local 192.168.1.12 port 36645 connected with 192.168.1.105 port 5001
[ ID] Interval   Transfer Bandwidth
[  3]  0.0-10.0 sec   977 MBytes   820 Mbits/sec
[  3] Sent 3414990 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   836 MBytes   701 Mbits/sec   0.000 ms 
493950/3414990 (0%)


In terms of kernel size, it uses 16KB (6753K vs 6737K on ER8) so a 
0.002% hit.  The exact 16KB is probably just due to how the kernel is 
compressed.



diff --git a/target/linux/generic/config-4.14 
b/target/linux/generic/config-4.14

index aa227ec6bf..a385fe3f24 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -623,7 +623,7 @@ CONFIG_BRIDGE=y
 # CONFIG_BRIDGE_EBT_STP is not set
 # CONFIG_BRIDGE_EBT_T_FILTER is not set
 # CONFIG_BRIDGE_EBT_T_NAT is not set
-# CONFIG_BRIDGE_EBT_VLAN is not set
+CONFIG_BRIDGE_EBT_VLAN=y
 CONFIG_BRIDGE_IGMP_SNOOPING=y
 # CONFIG_BRIDGE_NETFILTER is not set
 # CONFIG_BRIDGE_NF_EBTABLES is not set
diff --git a/target/linux/generic/config-4.9 
b/target/linux/generic/config-4.9

index 83abfdc8ff..6bcb82adec 100644
--- a/target/linux/generic/config-4.9
+++ b/target/linux/generic/config-4.9
@@ -598,7 +598,7 @@ CONFIG_BRIDGE=y
 CONFIG_BRIDGE_IGMP_SNOOPING=y
 # CONFIG_BRIDGE_NETFILTER is not set
 # CONFIG_BRIDGE_NF_EBTABLES is not set
-# CONFIG_BRIDGE_VLAN_FILTERING is not set
+CONFIG_BRIDGE_VLAN_FILTERING=y
 # CONFIG_BROADCOM_PHY is not set
 CONFIG_BROKEN_ON_SMP=y
 # CONFIG_BSD_DISKLABEL is not set



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


[OpenWrt-Devel] [PATCHv2] Allow VLAN filtering if needed.

2018-11-15 Thread Jonathan Thibault

Greetings,

I would like to propose enabling CONFIG_BRIDGE_VLAN_FILTERING on OpenWRT 
releases.


This allows us to use the bridge as a managed switch and gracefully 
handle mixed tagged and untagged frames. Prior to this, the only 
alternative was creating one bridge per vlan which quickly becomes a 
nightmare and still won't let you mix both tagged and untagged frames on 
the physical port without some complex ebtables magic.


This is in line with the notion that OpenWRT is the network go-to swiss 
army knife when you need a nice set-and-forget, low maintenance box to 
handle a specific task.


Current builds of the ip-bridge package already fully support this 
feature so the only requirement is enabling the kernel config.


This is disabled by default so existing bridge configurations will not 
be affected.  This patch only gives the ability to turn it on with an 
'ip link' command.  If there is interest, I could look into making the 
feature accessible via uci configuration.


It causes about 3.1% hit on raw bridging speed, which is relatively 
trivial considering that I had to use 300 byte packets to strain the CPU 
enough to notice a slowdown at all.  The ER8 would chug along at wire 
speed otherwise, and that's using only one core.  Since the typical 
bridge use case on OpenWRT is wireless, I doubt it would be noticeable 
at all.


With BRIDGE_VLAN_FILTERING

iperf -u -c 192.168.1.105 -b 1G -l 300

Client connecting to 192.168.1.105, UDP port 5001
Sending 300 byte datagrams, IPG target: 2.24 us (kalman adjust)
UDP buffer size:  208 KByte (default)

[  3] local 192.168.1.12 port 58045 connected with 192.168.1.105 port 5001
[ ID] Interval   Transfer Bandwidth
[  3]  0.0-10.0 sec   977 MBytes   820 Mbits/sec
[  3] Sent 3414986 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   811 MBytes   680 Mbits/sec   0.000 ms 
581210/3414986 (0%)


Without BRIDGE_VLAN_FILTERING

iperf -u -c 192.168.1.105 -b 1G -l 300

Client connecting to 192.168.1.105, UDP port 5001
Sending 300 byte datagrams, IPG target: 2.24 us (kalman adjust)
UDP buffer size:  208 KByte (default)

[  3] local 192.168.1.12 port 36645 connected with 192.168.1.105 port 5001
[ ID] Interval   Transfer Bandwidth
[  3]  0.0-10.0 sec   977 MBytes   820 Mbits/sec
[  3] Sent 3414990 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   836 MBytes   701 Mbits/sec   0.000 ms 
493950/3414990 (0%)


In terms of kernel size, it uses 16KB (6753K vs 6737K on ER8) so a 
0.002% hit.  The exact 16KB is probably just due to how the kernel is 
compressed.


---

v2: Enable the right CONFIG_ on 4.14.  Thanks Felix for pointing out my 
silliness :)


diff --git a/target/linux/generic/config-4.14 
b/target/linux/generic/config-4.14

index 97207cf2eb..7d4750f461 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -627,7 +627,7 @@ CONFIG_BRIDGE=y
 CONFIG_BRIDGE_IGMP_SNOOPING=y
 # CONFIG_BRIDGE_NETFILTER is not set
 # CONFIG_BRIDGE_NF_EBTABLES is not set
-# CONFIG_BRIDGE_VLAN_FILTERING is not set
+CONFIG_BRIDGE_VLAN_FILTERING=y
 # CONFIG_BROADCOM_PHY is not set
 CONFIG_BROKEN_ON_SMP=y
 # CONFIG_BSD_DISKLABEL is not set
diff --git a/target/linux/generic/config-4.9 
b/target/linux/generic/config-4.9

index 979028f04a..860b39b428 100644
--- a/target/linux/generic/config-4.9
+++ b/target/linux/generic/config-4.9
@@ -598,7 +598,7 @@ CONFIG_BRIDGE=y
 CONFIG_BRIDGE_IGMP_SNOOPING=y
 # CONFIG_BRIDGE_NETFILTER is not set
 # CONFIG_BRIDGE_NF_EBTABLES is not set
-# CONFIG_BRIDGE_VLAN_FILTERING is not set
+CONFIG_BRIDGE_VLAN_FILTERING=y
 # CONFIG_BROADCOM_PHY is not set
 CONFIG_BROKEN_ON_SMP=y
 # CONFIG_BSD_DISKLABEL is not set


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


[OpenWrt-Devel] [PATCH] Add generic actions to sched-core

2018-11-16 Thread Jonathan Thibault

Greetings,

Next in my series of 'OpenWRT as a network swiss army knife' patches, I 
suggest having the ability to accept/drop frames with TC as part of 
sched-core.  This can be useful in cases where you need very fast (if 
simplistic) packet filtering.  I believe they are basic enough to be 
considered 'core' functionality.


Alternatively they could be packaged in kmod-sched since they aren't 
used oftené. At 9304 bytes (on octeon), I'm not sure it makes much of a 
difference.


diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk

index f94c20d861..d822a93f1b 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -716,7 +716,7 @@ $(eval $(call KernelPackage,mppe))


 SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard 
$(LINUX_DIR)/net/sched/*.ko))
-SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf 
cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit
+SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf 
cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred 
act_skbedit

 SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark sch_netem
 SCHED_MODULES_EXTRA = $(filter-out 
$(SCHED_MODULES_FILTER),$(SCHED_MODULES))
 SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter 
$(SCHED_MODULES_CORE),$(SCHED_MODULES)))

@@ -739,6 +739,7 @@ define KernelPackage/sched-core
CONFIG_NET_CLS_ROUTE4 \
CONFIG_NET_CLS_TCINDEX \
CONFIG_NET_CLS_U32 \
+   CONFIG_NET_ACT_GACT \
CONFIG_NET_ACT_MIRRED \
CONFIG_NET_ACT_SKBEDIT \
CONFIG_NET_EMATCH=y \


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


Re: [OpenWrt-Devel] [PATCHv2] Allow VLAN filtering if needed.

2018-11-21 Thread Jonathan Thibault

On 21/11/18 09:13 AM, Daniel Golle wrote:

Hi!

On Thu, Nov 15, 2018 at 07:58:07PM +0100, Daniel Golle wrote:

Hi Jonathan,

On Thu, Nov 15, 2018 at 11:12:54AM -0500, Jonathan Thibault wrote:

Greetings,

I would like to propose enabling CONFIG_BRIDGE_VLAN_FILTERING on OpenWRT
releases.

I've suggested that already about a year ago. Now that a significant
amount of targets uses DSA this is even more needed and I think we
should enable it now before the 2019 release is coming up.

I'm about to merge this into master with my SoB added as you didn't
sign off the patch (which is so trivial that in practise this doesn't
matter). Find it in my staging tree [1] and raise your voice in case
of any concerns. Otherwise I'll merge it by the end of the week.
That's perfectly fine.  I'm just happy it's getting merged, OpenWRT just 
got more useful.


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


[OpenWrt-Devel] [PATCH v2] Add generic actions to sched-core

2018-11-28 Thread Jonathan Thibault
Greetings,

Next in my series of 'OpenWRT as a network swiss army knife' patches, I
suggest having the ability to accept/drop frames with TC as part of
sched-core.  This can be useful in cases where you need very fast (if
simplistic) packet filtering.  I believe they are basic enough to be
considered 'core' functionality.

Alternatively they could be packaged in kmod-sched since they aren't
used often. At 9304 bytes (on octeon), I'm not sure it makes much of a
difference.

---
v2: Used git send-email to avoid patch mangling.
---
 package/kernel/linux/modules/netsupport.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index f94c20d861..d822a93f1b 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -716,7 +716,7 @@ $(eval $(call KernelPackage,mppe))
 
 
 SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard 
$(LINUX_DIR)/net/sched/*.ko))
-SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_fw 
cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit
+SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_fw 
cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit
 SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark sch_netem
 SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
 SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter 
$(SCHED_MODULES_CORE),$(SCHED_MODULES)))
@@ -739,6 +739,7 @@ define KernelPackage/sched-core
CONFIG_NET_CLS_ROUTE4 \
CONFIG_NET_CLS_TCINDEX \
CONFIG_NET_CLS_U32 \
+   CONFIG_NET_ACT_GACT \
CONFIG_NET_ACT_MIRRED \
CONFIG_NET_ACT_SKBEDIT \
CONFIG_NET_EMATCH=y \
-- 
2.12.2


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


[OpenWrt-Devel] [PATCH v3] octeon: Allow sysupgrade restore on ER

2018-11-28 Thread Jonathan Thibault
This is a very simple patch that completes sysupgrade functionality on UBNT
ER8.

Default layout leaves about 128MB free on the kernel partition so there is
plenty of space for temporary config backups.

---
v2: checks board name in alphabetical order
v3: used git send-email to avoid patch mangling
---
 target/linux/octeon/base-files/lib/preinit/79_move_config |  5 +
 target/linux/octeon/base-files/lib/upgrade/platform.sh| 15 ++-
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config 
b/target/linux/octeon/base-files/lib/preinit/79_move_config
index ec63d9f5ff..470cbfe005 100644
--- a/target/linux/octeon/base-files/lib/preinit/79_move_config
+++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
@@ -5,6 +5,11 @@ move_config() {
. /lib/functions.sh
 
case "$(board_name)" in
+   er)
+   mount -t vfat /dev/mmcblk0p1 /mnt
+   [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz 
/
+   umount /mnt
+   ;;
erlite)
mount -t vfat /dev/sda1 /mnt
[ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz 
/
diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index cd49c0da36..009eae7a2c 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -23,6 +23,11 @@ platform_get_rootfs() {
 
 platform_copy_config() {
case "$(board_name)" in
+   er)
+   mount -t vfat /dev/mmcblk0p1 /mnt
+   cp -af "$CONF_TAR" /mnt/
+   umount /mnt
+   ;;
erlite)
mount -t vfat /dev/sda1 /mnt
cp -af "$CONF_TAR" /mnt/
@@ -62,12 +67,12 @@ platform_do_upgrade() {
 
[ -b "${rootfs}" ] || return 1
case "$board" in
-   erlite)
-   kernel=sda1
-   ;;
er)
kernel=mmcblk0p1
;;
+   erlite)
+   kernel=sda1
+   ;;
*)
return 1
esac
@@ -82,8 +87,8 @@ platform_check_image() {
local board=$(board_name)
 
case "$board" in
-   erlite | \
-   er)
+   er | \
+   erlite)
local tar_file="$1"
local kernel_length=`(tar xf $tar_file sysupgrade-$board/kernel 
-O | wc -c) 2> /dev/null`
local rootfs_length=`(tar xf $tar_file sysupgrade-$board/root 
-O | wc -c) 2> /dev/null`
-- 
2.12.2


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


Re: [OpenWrt-Devel] [PATCH v2] Add generic actions to sched-core

2018-12-04 Thread Jonathan Thibault

On 03/12/18 01:37 AM, John Crispin wrote:

Hi,

sched-core is dependet on by these 2 packages and should only contain 
features required by them
package/network/utils/iproute2/Makefile: DEPENDS:=+kmod-sched-core 
+(PACKAGE_devlink||PACKAGE_rdma):libmnl
package/network/config/qos-scripts/Makefile:  DEPENDS:=+tc 
+kmod-sched-core +kmod-sched-connmark +kmod-ifb +iptables 
+iptables-mod-ipopt +iptables-mod-conntrack-extra
John 
Does anyone have objections to putting generic actions in kmod-sched as 
I alternatively suggested then?  I don't mind resubmitting patches as I 
learn the ropes but I don't want to get on people's nerves by generating 
too much noise.


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


[OpenWrt-Devel] [PATCH v4 1/2] Evaluate board names in alphabetical order

2018-12-04 Thread Jonathan Thibault
---
 target/linux/octeon/base-files/lib/upgrade/platform.sh | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index cd49c0da36..6d258dbb0f 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -62,12 +62,12 @@ platform_do_upgrade() {
 
[ -b "${rootfs}" ] || return 1
case "$board" in
-   erlite)
-   kernel=sda1
-   ;;
er)
kernel=mmcblk0p1
;;
+   erlite)
+   kernel=sda1
+   ;;
*)
return 1
esac
@@ -82,8 +82,8 @@ platform_check_image() {
local board=$(board_name)
 
case "$board" in
-   erlite | \
-   er)
+   er | \
+   erlite)
local tar_file="$1"
local kernel_length=`(tar xf $tar_file sysupgrade-$board/kernel 
-O | wc -c) 2> /dev/null`
local rootfs_length=`(tar xf $tar_file sysupgrade-$board/root 
-O | wc -c) 2> /dev/null`
-- 
2.12.2


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


[OpenWrt-Devel] [PATCH v4 2/2] Allow sysupgrade restore on ER

2018-12-04 Thread Jonathan Thibault
---
 target/linux/octeon/base-files/lib/preinit/79_move_config | 5 +
 target/linux/octeon/base-files/lib/upgrade/platform.sh| 5 +
 2 files changed, 10 insertions(+)

diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config 
b/target/linux/octeon/base-files/lib/preinit/79_move_config
index ec63d9f5ff..470cbfe005 100644
--- a/target/linux/octeon/base-files/lib/preinit/79_move_config
+++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
@@ -5,6 +5,11 @@ move_config() {
. /lib/functions.sh
 
case "$(board_name)" in
+   er)
+   mount -t vfat /dev/mmcblk0p1 /mnt
+   [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz 
/
+   umount /mnt
+   ;;
erlite)
mount -t vfat /dev/sda1 /mnt
[ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz 
/
diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index 6d258dbb0f..009eae7a2c 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -23,6 +23,11 @@ platform_get_rootfs() {
 
 platform_copy_config() {
case "$(board_name)" in
+   er)
+   mount -t vfat /dev/mmcblk0p1 /mnt
+   cp -af "$CONF_TAR" /mnt/
+   umount /mnt
+   ;;
erlite)
mount -t vfat /dev/sda1 /mnt
cp -af "$CONF_TAR" /mnt/
-- 
2.12.2


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


[OpenWrt-Devel] [PATCH v4 0/2] Allow sysupgrade restore on ER

2018-12-04 Thread Jonathan Thibault
This is a very simple patch that completes sysupgrade functionality on UBNT
ER8.

Default layout leaves about 128MB free on the kernel partition so there is
plenty of space for temporary config backups.

Jonathan Thibault (2):
  Evaluate board names in alphabetical order
  Allow sysupgrade restore on ER

---
v2: checks board name in alphabetical order
v3: used git send-email to avoid patch mangling
v4: split into two patches
---
 target/linux/octeon/base-files/lib/preinit/79_move_config |  5 +
 target/linux/octeon/base-files/lib/upgrade/platform.sh| 15 ++-
 2 files changed, 15 insertions(+), 5 deletions(-)

-- 
2.12.2


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


Re: [OpenWrt-Devel] [PATCH v4 2/2] Allow sysupgrade restore on ER

2018-12-04 Thread Jonathan Thibault

On 04/12/18 04:53 PM, Petr Štetiar wrote:


Please try to follow DRY principles and don't copy&paste the same code over
again. I mean something like this:

  er_move_config() {
  local dev="$1"
  mount -t vfat "$dev" /mnt
  [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz /
  umount /mnt
  }

  move_config() {
  . /lib/functions.sh

  case "$(board_name)" in
 er)
 er_move_config /dev/mmcblk0p1
 ;;
 erlite)
 er_move_config /dev/sda1
 ;;
 esac
  }
No problem.  I was thinking along those lines too initially but as this 
isn't my code I was trying my best to match what's already there and not 
step on any toes.  Same for the board_name eval order.  I had matched 
what was already in the file until it was requested that I put them in 
order.


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


[OpenWrt-Devel] [PATCH v5 1/2] Evaluate board names in alphabetical order

2018-12-06 Thread Jonathan Thibault
---
 target/linux/octeon/base-files/lib/upgrade/platform.sh | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index cd49c0da36..6d258dbb0f 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -62,12 +62,12 @@ platform_do_upgrade() {
 
[ -b "${rootfs}" ] || return 1
case "$board" in
-   erlite)
-   kernel=sda1
-   ;;
er)
kernel=mmcblk0p1
;;
+   erlite)
+   kernel=sda1
+   ;;
*)
return 1
esac
@@ -82,8 +82,8 @@ platform_check_image() {
local board=$(board_name)
 
case "$board" in
-   erlite | \
-   er)
+   er | \
+   erlite)
local tar_file="$1"
local kernel_length=`(tar xf $tar_file sysupgrade-$board/kernel 
-O | wc -c) 2> /dev/null`
local rootfs_length=`(tar xf $tar_file sysupgrade-$board/root 
-O | wc -c) 2> /dev/null`
-- 
2.12.2


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


[OpenWrt-Devel] [PATCH v5 0/2] Allow sysupgrade restore on ER

2018-12-06 Thread Jonathan Thibault
This is a very simple patch that completes sysupgrade functionality on UBNT
ER8.

Default layout leaves about 128MB free on the kernel partition so there is
plenty of space for temporary config backups.

Jonathan Thibault (2):
  Evaluate board names in alphabetical order
  Allow sysupgrade restore on ER

---
v2: checks board name in alphabetical order
v3: used git send-email to avoid patch mangling
v4: split into two patches
v5: get rid of code reduncancy

Jonathan Thibault (2):
  Evaluate board names in alphabetical order
  Allow sysupgrade restore on ER

 .../octeon/base-files/lib/preinit/79_move_config   | 15 ++---
 .../octeon/base-files/lib/upgrade/platform.sh  | 25 +++---
 2 files changed, 29 insertions(+), 11 deletions(-)

-- 
2.12.2


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


[OpenWrt-Devel] [PATCH v5 2/2] Allow sysupgrade restore on ER

2018-12-06 Thread Jonathan Thibault
---
 target/linux/octeon/base-files/lib/preinit/79_move_config | 15 ---
 target/linux/octeon/base-files/lib/upgrade/platform.sh| 15 ---
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config 
b/target/linux/octeon/base-files/lib/preinit/79_move_config
index ec63d9f5ff..8c379a3276 100644
--- a/target/linux/octeon/base-files/lib/preinit/79_move_config
+++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
@@ -1,14 +1,23 @@
 #!/bin/sh
 # Copyright (C) 2014 OpenWrt.org
 
+er_move_config() {
+   local dev="$1"
+
+   mount -t vfat "$dev" /mnt
+   [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz /
+   umount /mnt
+}
+
 move_config() {
. /lib/functions.sh
 
case "$(board_name)" in
+   er)
+   er_move_config /dev/mmcblk0p1
+   ;;
erlite)
-   mount -t vfat /dev/sda1 /mnt
-   [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz 
/
-   umount /mnt
+   er_move_config /dev/sda1
;;
esac
 }
diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index 6d258dbb0f..a38a2a362a 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -21,12 +21,21 @@ platform_get_rootfs() {
fi
 }
 
+er_platform_copy_config() {
+   local dev="$1"
+
+   mount -t vfat "$dev" /mnt
+   cp -af "$CONF_TAR" /mnt/
+   umount /mnt
+}
+
 platform_copy_config() {
case "$(board_name)" in
+   er)
+   er_platform_copy_config /dev/mmcblk0p1
+   ;;
erlite)
-   mount -t vfat /dev/sda1 /mnt
-   cp -af "$CONF_TAR" /mnt/
-   umount /mnt
+   er_platform_copy_config /dev/sda1
;;
esac
 }
-- 
2.12.2


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


[OpenWrt-Devel] [PATCH] enable vlan filtering.

2014-12-11 Thread Jonathan Thibault
This is quite useful when you want to encapsulate l2 into a vpn and
other things of that nature.

I've called the package containing the 'bridge' command bridge2 (from
iproute2) to avoid conflicting with old package 'bridge' which should
really be called 'bridge-utils' and which provides 'brctl'.

It could be called 'iproute2-bridge' or something else, I'll let
maintainers decide what is best.

Maybe since brctl is now provided by busybox, there's no real need for
the original 'bridge' package.

diff --git a/package/kernel/linux/modules/netsupport.mk
b/package/kernel/linux/modules/netsupport.mk
index fc85e22..542462b 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -86,7 +86,8 @@ define KernelPackage/bridge
   DEPENDS:=+kmod-stp
   KCONFIG:= \
CONFIG_BRIDGE \
-   CONFIG_BRIDGE_IGMP_SNOOPING=y
+   CONFIG_BRIDGE_IGMP_SNOOPING=y \
+   CONFIG_BRIDGE_VLAN_FILTERING=y
   FILES:=$(LINUX_DIR)/net/bridge/bridge.ko
   AUTOLOAD:=$(call AutoLoad,11,bridge)
 endef
diff --git a/package/network/utils/iproute2/Makefile
b/package/network/utils/iproute2/Makefile
index fc47159..98cc8fd 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -53,6 +53,11 @@ $(call Package/iproute2/Default)
   TITLE:=General netlink utility frontend
 endef
 
+define Package/bridge2
+$(call Package/iproute2/Default)
+  TITLE:=Bridge configuration utility
+endef
+
 define Package/ss
 $(call Package/iproute2/Default)
   TITLE:=Socket statistics utility
@@ -122,6 +127,11 @@ define Package/genl/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
 endef
 
+define Package/bridge2/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/
+endef
+
 define Package/ss/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
@@ -131,4 +141,5 @@ $(eval $(call BuildPackage,ip))
 $(eval $(call BuildPackage,ip-full))
 $(eval $(call BuildPackage,tc))
 $(eval $(call BuildPackage,genl))
+$(eval $(call BuildPackage,bridge2))
 $(eval $(call BuildPackage,ss))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] iproute2: add VLAN filtering + bridge control.

2014-12-15 Thread Jonathan Thibault
Made changes suggested by Felix.

I'll try to put together a preliminary report on how much bloat this add
to the kernel  Though this might not be that needed for home use, I
think it really adds to OpenWRT's usefulness as a set-and-forget network
wonder-appliance.


diff --git a/package/kernel/linux/modules/netsupport.mk
b/package/kernel/linux/modules/netsupport.mk
index 8671df1..68ccc6c 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -86,7 +86,8 @@ define KernelPackage/bridge
   DEPENDS:=+kmod-stp
   KCONFIG:= \
CONFIG_BRIDGE \
-   CONFIG_BRIDGE_IGMP_SNOOPING=y
+   CONFIG_BRIDGE_IGMP_SNOOPING=y \
+   CONFIG_BRIDGE_VLAN_FILTERING=y
   FILES:=$(LINUX_DIR)/net/bridge/bridge.ko
   AUTOLOAD:=$(call AutoLoad,11,bridge)
 endef
diff --git a/package/network/utils/iproute2/Makefile
b/package/network/utils/iproute2/Makefile
index f6d2801..95014c8 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -58,6 +58,11 @@ $(call Package/iproute2/Default)
   TITLE:=General netlink utility frontend
 endef
 
+define Package/iproute2-bridge
+$(call Package/iproute2/Default)
+  TITLE:=Bridge configuration utility
+endef
+
 define Package/ss
 $(call Package/iproute2/Default)
   TITLE:=Socket statistics utility
@@ -130,6 +135,11 @@ define Package/genl/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
 endef
 
+define Package/iproute2-bridge/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/
+endef
+
 define Package/ss/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
@@ -139,4 +149,5 @@ $(eval $(call BuildPackage,ip))
 $(eval $(call BuildPackage,ip-full))
 $(eval $(call BuildPackage,tc))
 $(eval $(call BuildPackage,genl))
+$(eval $(call BuildPackage,iproute2-bridge))
 $(eval $(call BuildPackage,ss))
diff --git a/target/linux/generic/config-3.10
b/target/linux/generic/config-3.10
index 5df8901..b4a4c80 100644
--- a/target/linux/generic/config-3.10
+++ b/target/linux/generic/config-3.10
@@ -441,7 +441,7 @@ CONFIG_BRIDGE=y
 CONFIG_BRIDGE_IGMP_SNOOPING=y
 # CONFIG_BRIDGE_NETFILTER is not set
 # CONFIG_BRIDGE_NF_EBTABLES is not set
-# CONFIG_BRIDGE_VLAN_FILTERING is not set
+CONFIG_BRIDGE_VLAN_FILTERING=y
 # CONFIG_BROADCOM_PHY is not set
 CONFIG_BROKEN_ON_SMP=y
 # CONFIG_BSD_DISKLABEL is not set
diff --git a/target/linux/generic/config-3.13
b/target/linux/generic/config-3.13
index 79261d8..ecf6ad7 100644
--- a/target/linux/generic/config-3.13
+++ b/target/linux/generic/config-3.13
@@ -474,7 +474,7 @@ CONFIG_BRIDGE=y
 CONFIG_BRIDGE_IGMP_SNOOPING=y
 # CONFIG_BRIDGE_NETFILTER is not set
 # CONFIG_BRIDGE_NF_EBTABLES is not set
-# CONFIG_BRIDGE_VLAN_FILTERING is not set
+CONFIG_BRIDGE_VLAN_FILTERING=y
 # CONFIG_BROADCOM_PHY is not set
 CONFIG_BROKEN_ON_SMP=y
 # CONFIG_BSD_DISKLABEL is not set
diff --git a/target/linux/generic/config-3.14
b/target/linux/generic/config-3.14
index 9485ea1..1510ffb 100644
--- a/target/linux/generic/config-3.14
+++ b/target/linux/generic/config-3.14
@@ -486,7 +486,7 @@ CONFIG_BRIDGE=y
 CONFIG_BRIDGE_IGMP_SNOOPING=y
 # CONFIG_BRIDGE_NETFILTER is not set
 # CONFIG_BRIDGE_NF_EBTABLES is not set
-# CONFIG_BRIDGE_VLAN_FILTERING is not set
+CONFIG_BRIDGE_VLAN_FILTERING=y
 # CONFIG_BROADCOM_PHY is not set
 CONFIG_BROKEN_ON_SMP=y
 # CONFIG_BSD_DISKLABEL is not set
diff --git a/target/linux/generic/config-3.18
b/target/linux/generic/config-3.18
index e0e2a0b..20cfc06 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -510,7 +510,7 @@ CONFIG_BRIDGE=y
 CONFIG_BRIDGE_IGMP_SNOOPING=y
 # CONFIG_BRIDGE_NETFILTER is not set
 # CONFIG_BRIDGE_NF_EBTABLES is not set
-# CONFIG_BRIDGE_VLAN_FILTERING is not set
+CONFIG_BRIDGE_VLAN_FILTERING=y
 # CONFIG_BROADCOM_PHY is not set
 CONFIG_BROKEN_ON_SMP=y
 # CONFIG_BSD_DISKLABEL is not set
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] iproute2: bump version to v3.18.0, add package for bridge program

2015-01-05 Thread Jonathan Thibault
It'd probably be nice to add vlan filtering support to the bridge utility.

I submitted a patch to do so earlier

https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/030024.html

On 30/12/14 11:17 PM, Russell Senior wrote:
> Signed-off-by: Russell Senior 
>
> ---
>  package/network/utils/iproute2/Makefile  | 15 +--
>  package/network/utils/iproute2/patches/300-ip_tiny.patch | 15 ---
>  2 files changed, 21 insertions(+), 9 deletions(-)
>
> diff --git a/package/network/utils/iproute2/Makefile 
> b/package/network/utils/iproute2/Makefile
> index 9aea05e..13b240e 100644
> --- a/package/network/utils/iproute2/Makefile
> +++ b/package/network/utils/iproute2/Makefile
> @@ -8,12 +8,12 @@
>  include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=iproute2
> -PKG_VERSION:=3.17.0
> +PKG_VERSION:=3.18.0
>  PKG_RELEASE:=1
>  
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
>  PKG_SOURCE_URL:=http://kernel.org/pub/linux/utils/net/iproute2/
> -PKG_MD5SUM:=b741a02c6dda5818d18011d572874493
> +PKG_MD5SUM:=6f6ad51a7880460e103367b16057
>  PKG_BUILD_PARALLEL:=1
>  PKG_LICENSE:=GPL-2.0
>  
> @@ -63,6 +63,11 @@ $(call Package/iproute2/Default)
>TITLE:=Socket statistics utility
>  endef
>  
> +define Package/ip-bridge
> +$(call Package/iproute2/Default)
> +  TITLE:=Bridge utility from iproute2
> +endef
> +
>  ifeq ($(BUILD_VARIANT),tiny)
>IP_CONFIG_TINY:=y
>  endif
> @@ -135,8 +140,14 @@ define Package/ss/install
>   $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
>  endef
>  
> +define Package/ip-bridge/install
> + $(INSTALL_DIR) $(1)/usr/sbin
> + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/
> +endef
> +
>  $(eval $(call BuildPackage,ip))
>  $(eval $(call BuildPackage,ip-full))
>  $(eval $(call BuildPackage,tc))
>  $(eval $(call BuildPackage,genl))
>  $(eval $(call BuildPackage,ss))
> +$(eval $(call BuildPackage,ip-bridge))
> diff --git a/package/network/utils/iproute2/patches/300-ip_tiny.patch 
> b/package/network/utils/iproute2/patches/300-ip_tiny.patch
> index 5b0d56c..3620120 100644
> --- a/package/network/utils/iproute2/patches/300-ip_tiny.patch
> +++ b/package/network/utils/iproute2/patches/300-ip_tiny.patch
> @@ -1,6 +1,6 @@
>  --- a/ip/Makefile
>  +++ b/ip/Makefile
> -@@ -15,6 +15,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
> +@@ -16,6 +16,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
>   CFLAGS += -DHAVE_SETNS
>   endif
>   
> @@ -14,7 +14,7 @@
>   ALLOBJ=$(IPOBJ) $(RTMONOBJ)
>   SCRIPTS=ifcfg rtpr routel routef
>   TARGETS=ip rtmon
> -@@ -42,7 +49,7 @@ else
> +@@ -43,7 +50,7 @@ else
>   
>   ip: static-syms.o
>   static-syms.o: static-syms.h
> @@ -25,7 +25,7 @@
>   sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char 
> \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; 
> \
>  --- a/ip/ip.c
>  +++ b/ip/ip.c
> -@@ -66,29 +66,41 @@ static const struct cmd {
> +@@ -69,30 +69,42 @@ static const struct cmd {
>   int (*func)(int argc, char **argv);
>   } cmds[] = {
>   { "address",do_ipaddr },
> @@ -44,6 +44,7 @@
>   { "link",   do_iplink },
>  +#ifndef IPROUTE2_TINY
>   { "l2tp",   do_ipl2tp },
> + { "fou",do_ipfou },
>  +#endif
>   { "tunnel", do_iptunnel },
>   { "tunl",   do_iptunnel },
> @@ -69,7 +70,7 @@
>   };
>  --- a/lib/utils.c
>  +++ b/lib/utils.c
> -@@ -627,6 +627,7 @@ const char *rt_addr_n2a(int af, int len,
> +@@ -629,6 +629,7 @@ const char *rt_addr_n2a(int af, const vo
>   case AF_INET:
>   case AF_INET6:
>   return inet_ntop(af, addr, buf, buflen);
> @@ -77,7 +78,7 @@
>   case AF_IPX:
>   return ipx_ntop(af, addr, buf, buflen);
>   case AF_DECnet:
> -@@ -635,6 +636,7 @@ const char *rt_addr_n2a(int af, int len,
> +@@ -637,6 +638,7 @@ const char *rt_addr_n2a(int af, const vo
>   memcpy(dna.a_addr, addr, 2);
>   return dnet_ntop(af, &dna, buf, buflen);
>   }
> @@ -85,7 +86,7 @@
>   default:
>   return "???";
>   }
> -@@ -710,6 +712,7 @@ const char *format_host(int af, int len,
> +@@ -712,6 +714,7 @@ const char *format_host(int af, int len,
>   case AF_INET6:
>   len = 16;
>   break;
> @@ -93,7 +94,7 @@
>   case AF_IPX:
>   len = 10;
>   break;
> -@@ -720,6 +723,7 @@ const char *format_host(int af, int len,
> +@@ -722,6 +725,7 @@ const char *format_host(int af, int len,
>   len = 2;
>   break;
>   #endif
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] octeon: Add MMC support for EdgeRouter ER8

2015-03-18 Thread Jonathan Thibault
This adds in-kernel support for the octeon mmc controller so that
Ubiquiti ER8 are now bootable from their internal storage.

Aimed at the BB branch but should work on trunk as well.

Pay attention to the change in default value for bb_size in
octeon_mmc.c, default was too large (256KB) and caused devm_kzalloc() to
fail.  Otherwise, those are all patches released by Cavium themselves
and adapted to BB.
diff --git a/target/linux/octeon/config-default b/target/linux/octeon/config-default
index f83daac..f6c0e27 100644
--- a/target/linux/octeon/config-default
+++ b/target/linux/octeon/config-default
@@ -139,6 +139,10 @@ CONFIG_MIPS_L1_CACHE_SHIFT=7
 # CONFIG_MIPS_MACHINE is not set
 CONFIG_MIPS_MT_DISABLED=y
 CONFIG_MIPS_PGD_C0_CONTEXT=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_OCTEON=y
+# CONFIG_MMC_TIFM_SD is not set
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MODULES_USE_ELF_RELA=y
 # CONFIG_MTD_CFI_INTELEXT is not set
diff --git a/target/linux/octeon/patches-3.10/0012-MIPS-octeon-add-semaphore-to-serialize-bootbus-access.patch b/target/linux/octeon/patches-3.10/0012-MIPS-octeon-add-semaphore-to-serialize-bootbus-access.patch
new file mode 100644
index 000..6650c5b
--- /dev/null
+++ b/target/linux/octeon/patches-3.10/0012-MIPS-octeon-add-semaphore-to-serialize-bootbus-access.patch
@@ -0,0 +1,25 @@
+diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
+index a42110e..01130e9 100644
+--- a/arch/mips/cavium-octeon/setup.c
 b/arch/mips/cavium-octeon/setup.c
+@@ -51,6 +51,9 @@ extern void pci_console_init(const char *arg);
+
+ static unsigned long long MAX_MEMORY = 512ull << 20;
+
++DEFINE_SEMAPHORE(octeon_bootbus_sem);
++EXPORT_SYMBOL(octeon_bootbus_sem);
++
+ struct octeon_boot_descriptor *octeon_boot_desc_ptr;
+
+ struct cvmx_bootinfo *octeon_bootinfo;
+diff --git a/arch/mips/include/asm/octeon/octeon.h b/arch/mips/include/asm/octeon/octeon.h
+index 0415965..de9f74e 100644
+--- a/arch/mips/include/asm/octeon/octeon.h
 b/arch/mips/include/asm/octeon/octeon.h
+@@ -335,4 +335,6 @@ void octeon_irq_set_ip4_handler(octeon_irq_ip4_handler_t);
+
+ extern void octeon_fixup_irqs(void);
+
++extern struct semaphore octeon_bootbus_sem;
++
+ #endif /* __ASM_OCTEON_OCTEON_H */
diff --git a/target/linux/octeon/patches-3.10/0013-MIPS-OCTEON-Update-octeon-model.h-code-for-new-SoCs.patch b/target/linux/octeon/patches-3.10/0013-MIPS-OCTEON-Update-octeon-model.h-code-for-new-SoCs.patch
new file mode 100644
index 000..c4d7347
--- /dev/null
+++ b/target/linux/octeon/patches-3.10/0013-MIPS-OCTEON-Update-octeon-model.h-code-for-new-SoCs.patch
@@ -0,0 +1,105 @@
+diff --git a/arch/mips/include/asm/octeon/octeon-model.h b/arch/mips/include/asm/octeon/octeon-model.h
+index e2c122c..35d7cbd 100644
+--- a/arch/mips/include/asm/octeon/octeon-model.h
 b/arch/mips/include/asm/octeon/octeon-model.h
+@@ -45,6 +45,7 @@
+  */
+ 
+ #define OCTEON_FAMILY_MASK	0x0000
++#define OCTEON_PRID_MASK	0x00ff
+ 
+ /* Flag bits in top byte */
+ /* Ignores revision in model checks */
+@@ -63,6 +64,46 @@
+ #define OM_MATCH_6XXX_FAMILY_MODELS	0x4000
+ /* Match all cnf7XXX Octeon models. */
+ #define OM_MATCH_F7XXX_FAMILY_MODELS	0x8000
++/* Match all cn7XXX Octeon models. */
++#define OM_MATCH_7XXX_FAMILY_MODELS 0x1000
++#define OM_MATCH_FAMILY_MODELS		(OM_MATCH_5XXX_FAMILY_MODELS |	\
++	 OM_MATCH_6XXX_FAMILY_MODELS |	\
++	 OM_MATCH_F7XXX_FAMILY_MODELS | \
++	 OM_MATCH_7XXX_FAMILY_MODELS)
++/*
++ * CN7XXX models with new revision encoding
++ */
++
++#define OCTEON_CN73XX_PASS1_0	0x000d9700
++#define OCTEON_CN73XX		(OCTEON_CN73XX_PASS1_0 | OM_IGNORE_REVISION)
++#define OCTEON_CN73XX_PASS1_X	(OCTEON_CN73XX_PASS1_0 | \
++ OM_IGNORE_MINOR_REVISION)
++
++#define OCTEON_CN70XX_PASS1_0	0x000d9600
++#define OCTEON_CN70XX_PASS1_1	0x000d9601
++#define OCTEON_CN70XX_PASS1_2	0x000d9602
++
++#define OCTEON_CN70XX_PASS2_0	0x000d9608
++
++#define OCTEON_CN70XX		(OCTEON_CN70XX_PASS1_0 | OM_IGNORE_REVISION)
++#define OCTEON_CN70XX_PASS1_X	(OCTEON_CN70XX_PASS1_0 | \
++ OM_IGNORE_MINOR_REVISION)
++#define OCTEON_CN70XX_PASS2_X	(OCTEON_CN70XX_PASS2_0 | \
++ OM_IGNORE_MINOR_REVISION)
++
++#define OCTEON_CN71XX		OCTEON_CN70XX
++
++#define OCTEON_CN78XX_PASS1_0	0x000d9500
++#define OCTEON_CN78XX_PASS1_1	0x000d9501
++#define OCTEON_CN78XX_PASS2_0	0x000d9508
++
++#define OCTEON_CN78XX		(OCTEON_CN78XX_PASS1_0 | OM_IGNORE_REVISION)
++#define OCTEON_CN78XX_PASS1_X	(OCTEON_CN78XX_PASS1_0 | \
++ OM_IGNORE_MINOR_REVISION)
++#define OCTEON_CN78XX_PASS2_X	(OCTEON_CN78XX_PASS2_0 | \
++ OM_IGNORE_MINOR_REVISION)
++
++#define OCTEON_CN76XX		(0x000d9540 | OM_CHECK_SUBMODEL)
+ 
+ /*
+  * CNF7XXX models with new revision encoding
+@@ -217,6 +258,10 @@
+ #define OCTEON_CN3XXX		(OCTEON_CN58XX_PASS1_0 | OM_MATCH_PREVIOUS_MODELS | OM_IGNORE_REVISION)
+ #define OCTEON_CN5XXX		(OCTEON_CN58XX_PASS1_0 | OM_MATCH_5XXX_FAMILY_MODELS)
+ #define OCTEON_CN6XXX		(OCTEON_CN63XX_PASS1_0 | OM_MATCH_6XXX_FAMILY_MODELS)

Re: [OpenWrt-Devel] [PATCH] octeon: Add MMC support for EdgeRouter ER8

2015-03-18 Thread Jonathan Thibault
On 18/03/15 09:53 AM, John Crispin wrote:
> Hi Jonathan, nice one, i saw the patch on the lmo mailing list and had
> this on my todo list for the next days, will give it a shot later on
> my ER8. do you fancy also sending a version that we can apply to trunk
> ? John
Here you go.
diff --git a/target/linux/octeon/config-3.18 b/target/linux/octeon/config-3.18
index e68292f..032146e 100644
--- a/target/linux/octeon/config-3.18
+++ b/target/linux/octeon/config-3.18
@@ -148,6 +148,10 @@ CONFIG_MIPS_L1_CACHE_SHIFT_7=y
 # CONFIG_MIPS_MACHINE is not set
 # CONFIG_MIPS_PARAVIRT is not set
 CONFIG_MIPS_PGD_C0_CONTEXT=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_OCTEON=y
+# CONFIG_MMC_TIFM_SD is not set
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MODULES_USE_ELF_RELA=y
 # CONFIG_MTD_CFI_INTELEXT is not set
diff --git 
a/target/linux/octeon/patches-3.18/130-MIPS-octeon-add-semaphore-to-serialize-bootbus-access.patch
 
b/target/linux/octeon/patches-3.18/130-MIPS-octeon-add-semaphore-to-serialize-bootbus-access.patch
new file mode 100644
index 000..6650c5b
--- /dev/null
+++ 
b/target/linux/octeon/patches-3.18/130-MIPS-octeon-add-semaphore-to-serialize-bootbus-access.patch
@@ -0,0 +1,25 @@
+diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
+index a42110e..01130e9 100644
+--- a/arch/mips/cavium-octeon/setup.c
 b/arch/mips/cavium-octeon/setup.c
+@@ -51,6 +51,9 @@ extern void pci_console_init(const char *arg);
+
+ static unsigned long long MAX_MEMORY = 512ull << 20;
+
++DEFINE_SEMAPHORE(octeon_bootbus_sem);
++EXPORT_SYMBOL(octeon_bootbus_sem);
++
+ struct octeon_boot_descriptor *octeon_boot_desc_ptr;
+
+ struct cvmx_bootinfo *octeon_bootinfo;
+diff --git a/arch/mips/include/asm/octeon/octeon.h 
b/arch/mips/include/asm/octeon/octeon.h
+index 0415965..de9f74e 100644
+--- a/arch/mips/include/asm/octeon/octeon.h
 b/arch/mips/include/asm/octeon/octeon.h
+@@ -335,4 +335,6 @@ void octeon_irq_set_ip4_handler(octeon_irq_ip4_handler_t);
+
+ extern void octeon_fixup_irqs(void);
+
++extern struct semaphore octeon_bootbus_sem;
++
+ #endif /* __ASM_OCTEON_OCTEON_H */
diff --git 
a/target/linux/octeon/patches-3.18/140-MIPS-OCTEON-Update-octeon-model.h-code-for-new-SoCs.patch
 
b/target/linux/octeon/patches-3.18/140-MIPS-OCTEON-Update-octeon-model.h-code-for-new-SoCs.patch
new file mode 100644
index 000..c4d7347
--- /dev/null
+++ 
b/target/linux/octeon/patches-3.18/140-MIPS-OCTEON-Update-octeon-model.h-code-for-new-SoCs.patch
@@ -0,0 +1,105 @@
+diff --git a/arch/mips/include/asm/octeon/octeon-model.h 
b/arch/mips/include/asm/octeon/octeon-model.h
+index e2c122c..35d7cbd 100644
+--- a/arch/mips/include/asm/octeon/octeon-model.h
 b/arch/mips/include/asm/octeon/octeon-model.h
+@@ -45,6 +45,7 @@
+  */
+ 
+ #define OCTEON_FAMILY_MASK0x0000
++#define OCTEON_PRID_MASK  0x00ff
+ 
+ /* Flag bits in top byte */
+ /* Ignores revision in model checks */
+@@ -63,6 +64,46 @@
+ #define OM_MATCH_6XXX_FAMILY_MODELS   0x4000
+ /* Match all cnf7XXX Octeon models. */
+ #define OM_MATCH_F7XXX_FAMILY_MODELS  0x8000
++/* Match all cn7XXX Octeon models. */
++#define OM_MATCH_7XXX_FAMILY_MODELS 0x1000
++#define OM_MATCH_FAMILY_MODELS(OM_MATCH_5XXX_FAMILY_MODELS |  
\
++   OM_MATCH_6XXX_FAMILY_MODELS |  \
++   OM_MATCH_F7XXX_FAMILY_MODELS | \
++   OM_MATCH_7XXX_FAMILY_MODELS)
++/*
++ * CN7XXX models with new revision encoding
++ */
++
++#define OCTEON_CN73XX_PASS1_0 0x000d9700
++#define OCTEON_CN73XX (OCTEON_CN73XX_PASS1_0 | OM_IGNORE_REVISION)
++#define OCTEON_CN73XX_PASS1_X (OCTEON_CN73XX_PASS1_0 | \
++   OM_IGNORE_MINOR_REVISION)
++
++#define OCTEON_CN70XX_PASS1_0 0x000d9600
++#define OCTEON_CN70XX_PASS1_1 0x000d9601
++#define OCTEON_CN70XX_PASS1_2 0x000d9602
++
++#define OCTEON_CN70XX_PASS2_0 0x000d9608
++
++#define OCTEON_CN70XX (OCTEON_CN70XX_PASS1_0 | OM_IGNORE_REVISION)
++#define OCTEON_CN70XX_PASS1_X (OCTEON_CN70XX_PASS1_0 | \
++   OM_IGNORE_MINOR_REVISION)
++#define OCTEON_CN70XX_PASS2_X (OCTEON_CN70XX_PASS2_0 | \
++   OM_IGNORE_MINOR_REVISION)
++
++#define OCTEON_CN71XX OCTEON_CN70XX
++
++#define OCTEON_CN78XX_PASS1_0 0x000d9500
++#define OCTEON_CN78XX_PASS1_1 0x000d9501
++#define OCTEON_CN78XX_PASS2_0 0x000d9508
++
++#define OCTEON_CN78XX (OCTEON_CN78XX_PASS1_0 | OM_IGNORE_REVISION)
++#define OCTEON_CN78XX_PASS1_X (OCTEON_CN78XX_PASS1_0 | \
++   OM_IGNORE_MINOR_REVISION)
++#define OCTEON_CN78XX_PASS2_X (OCTEON_CN78XX_PASS2_0 | \
++   OM_IGNORE_MINOR_REVISION)
++
++#define OCTEON_CN76XX (0x000d9540 | OM_CHECK_SUBMODEL)
+ 
+ /*
+  * CNF7XXX models with new revision encoding
+@@ -217,6 +258,10 @@
+ #define OCTEON_CN3XXX (OCTEON_CN58XX_PASS1_0 | 
OM_MATCH_PREVIOUS_MODELS | O

Re: [OpenWrt-Devel] Port labels for DSA targets/devices

2020-04-20 Thread Jonathan Thibault

On 2020-04-20 3:42 p.m., m...@adrianschmutzler.de wrote:

Hi all,

recently, ramips/mt7621 has switched to DSA and mvebu [1] and kirkwood [2] are 
waiting for it.

On ramips, port names have mostly been chosen to be lanX (lan1, lan2, ...) and 
wan.

On other targets using DT files from kernel, there doesn't seem to be a particular rule. Sometimes 
the same pattern is used, sometimes "wan" is replaced by "internet" and for 
kirkwood, we had two cases where ethernetX was used for lan ports.

Being a pedantic person, this bothers me. Despite, having the conversion on 
several targets now seems to be a good chance to agree on a guideline for this 
_before_ it is done differently everywhere across OpenWrt.

Currently, I see the following options:

1. Stick to what the kernel does:
Where the kernel defines names, just use them. Add them to 02_network and have 
them exposed to the user.
For "our" targets, we will still have to decide. For other targets, just do 
what similar devices have done (though kernel might be inconsistent there even for 
related devices).
Adjusting them in kernel seems no option, as we've learned from Linksys 
nicknames discussion that labels might be considered ABI.
This will be the cheapest way.

2. Use a common scheme
We may define a common scheme, e.g. the lanX and wan names as used on 
ramips/mt7621 after bump to 5.4.
That will require to change corresponding DTS files with other names from 
kernel and keep those patches forever. They will be trivial to make and very 
easy to rebase/refresh, but we have to keep them.
On the plus side: User experience (for most users) will be improved. While 
there still is inconsistency between swconfig and DSA, at least DSA won't have 
subspecies then. So, the average user could expect a lan port to be called 
lan1, lan2, ... etc. instead of having to look it up. Our user-space config 
files (board.d) would be easier/more unified.
Of course, some advanced users switching between distros (where this is 
possible) would have changing interface names, but a lot else will change for 
them as well.

3. Care for vendor names
In particular cases, e.g. for EdgeRouter X [3], we are currently using labels 
following the vendor scheme (eth0 to eth4 instead of lan0 to lan4).
This could represent an additional option, both in case of using scheme 2 or 
for our own targets if we stick to scheme 1.
This would break the "unified user experience" as in scheme 2, but would fulfill 
"what the user expects from vendor", like we do it for MAC address, LED behavior etc.

Personally, I have a preference for 2 (and am unsure about 3), as to me the 
user experience is the most valuable asset in this context and I do not want to 
have to stick to some name the kernel have agreed on in a single case 10 years 
ago (exaggerating here, no offense ...).


While I don't have any strong opinion, I believe that from a 'product' 
standpoint, it may be best to just match the actual port name when 
available.  The main drawback to this would be when we have the same 
image for devices that have different labels though I am not sure how 
often that actually happens.


From a management perspective, having names that make it obvious that 
you are dealing with DSA ports (swXpY) would likely make most sense. 
Edgerouter X is a good example of this.  Calling ports ethX leads to 
confusion because it makes the port sound like an ethernet device when 
in reality it is a switch port.


I think trying to standardize to wan/lanX names could lead to 
unnecessary confusion and pain in the long run.




Please share your thoughts.

Best

Adrian

[1] https://github.com/openwrt/openwrt/pull/2935
[2] https://github.com/openwrt/openwrt/pull/2944
[3] 
https://github.com/openwrt/openwrt/commit/5acd1ed0be0d78847cd7d9d5599526f59babaf4d


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




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


Re: [OpenWrt-Devel] OpenWRT downloads susceptible to MITM attacks?

2013-04-12 Thread Jonathan Thibault
Space is still kind of precious on most devices, the fact that it fits
doesn't mean that most people would want it as a default option.

I would suggest making sha-2 digests and files available through https
but leaving it to the user to make their own checks and take their own
risks in failing to do so.

Jonathan

On 11/04/13 07:56 PM, Peter Lawler wrote:
> On 12/04/13 08:35, Manuel Munz wrote:
>> On 11.04.2013 23:10, Peter Lawler wrote:
>>>
>>> Given the place that OpenWRT sits in people's networks, I would
>>> strongly
>>> encourage the development team to consider moving the download
>>> system to
>>> forcing HTTPS connections and ditching MD5 for SHA-2.
>>>
>>> Regards,
>>>
>>> Pete.
>>
>> I agree with most of what you said and think this should be done. But
>> not with that https should be enforced. One upgrade path for me and many
>> others is to wget a new image. wget in busybox does not support ssl, so
>> we would be forced to install the full wget + ssl libs just for this
>> task.
>>
>> Regards, soma
>
> That's a very good point that, with apologies, I'd not considered at
> 6AM, because of (a) lack of coffee (b) the boxen I have myself ;)
>
> I guess this sort of raises the questions whether systems that are
> known to have sufficient flash should be built with wget + ssl by
> default, as well as luci-ssl?
>
> They're always the first thing I throw on and having them downloaded
> over http does seem a bit self defeating.
>
> Regards,
>
> Pete.
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [OpenWrt-Devel] should syslog-ng[3] terminate build-in syslog?

2012-12-31 Thread Jonathan Thibault
I think the 'sanest' way to do this would be to have a
/etc/init.d/logger script start the logger instead of /etc/init.d/boot
and having the install script for whatever syslog package gets added
later on do:  '/etc/init.d/logger disable'

That's a core architecture change of course, but not much bigger than
adding the check suggested below.

On 31/12/12 09:36 AM, Brian J. Murrell wrote:
> On 12-12-31 09:12 AM, Bastian Bittorf wrote:
>> the best way to solve this problem is IMHO to
>> write an startup-script for both and delete it from "/etc/init.d/boot"
>> so the "busybox"-logger simply gets overwritten when you install
>> "syslog-ng3".
> So are you proposing that the syslog-ng3 post-install script edit
> /etc/init.d/boot?  IMHO, that's a no-no.  One given package should not
> touch another package's files.
>
> Surely it would be better to simply have a "switch" in the
> /etc/init.d/boot script that would check for the presence of a superior
> syslogd and packages like syslog-ng3 would set the switch to announce
> that a superior syslogd is installed so the syslogd that
> /etc/init.d/boot starts won't be started.
>
>> I'm unsure if the call in "/etc/init.d/rcS" it tooo hardcoded:
>>
>> # [ -x /usr/bin/logger ] && LOGGER="logger -s -p 6 -t sysinit"
> Yeah, that should be more along the lines of:
>
> [ -x /usr/bin/logger ] && [ ! -f /etc/superior_syslogger ]  \
>   LOGGER="logger -s -p 6 -t sysinit"
>
> Where syslog-ng3 (and any other syslogger package) has the file
> "/etc/superior_logger" in it's manifest.
>
> Cheers,
> b.
>
>
>
>
> ___
> 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


[OpenWrt-Devel] [PATCH] fix dhcp ignore in dnsmasq init script

2009-05-04 Thread Jonathan Thibault
Hello gang,

I noticed that when adding 'option ignore 1' to an interface in 
/etc/config/dhcp, the interface is indeed added to the dnsmasq command line as 
a -2 param, which is correct, but the --dhcp-range also get appended to the 
command line, which causes dnsmasq to fail.  If no range is provided for the 
interface in /etc/conf/dhcp, the --dhcp-range is added anyway for that 
interface using the values from the previous dhcp-enabled interface.

Basically, if ignore is set to 1, it should not go through the range 
configuration part of the script.  Here's a simple patch to solve the problem.  
I am not entirely privy to the script so there might be something I'm missing 
Maybe we shouldn't return 0 right away for reasons I'm not aware of in some 
special cases.  If so, be sure to point them out and ignore my nonsense.

Singed-off-by: FinboySlick 

Index: package/dnsmasq/files/dnsmasq.init
===
--- package/dnsmasq/files/dnsmasq.init  (revision 15606)
+++ package/dnsmasq/files/dnsmasq.init  (working copy)
@@ -216,7 +216,7 @@
DNS_SERVERS="$DNS_SERVERS $dnsserver"
}
 
-   append_bool "$cfg" ignore "-2 $ifname"
+   append_bool "$cfg" ignore "-2 $ifname" && return 0
 
config_get proto "$net" proto
[ static = "$proto" ] || return 0

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


[OpenWrt-Devel] A few goodies for 8.09.1

2009-12-02 Thread Jonathan Thibault
Greetings,

I've backported the Geode GX/LX (ALIX) Watchdog timer to run on Kamikaze
8.09.1, also have an update to the phidget21 library and its webservice,
a small utility by me to control phidgets over tcp, libcelt-0.7.0 (for
low latency audio encoding) and hopefully soon a tool to stream CELT
audio as well.  I know how to submit svn patches but does the same apply
when one submits for an existing release?

They should all build on trunk, obviously, but since I took care of
backporting them, I'd be grateful to see them added to the existing
release package list.

Anyway, let me know how you want those (if at all) and I'll send them in
whatever is deemed the appropriate way.

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


Re: [OpenWrt-Devel] Refactoring base-files

2011-02-05 Thread Jonathan Thibault
On 05/02/11 06:26 AM, Bastian Bittorf wrote:
> The next step can be:
> - make an official coding-style (at the moment much is mixed)
> - make an offical way, how to solve typical problems in scripts
> - make "base-files (experimental)" which can be selected in menuconfig
>   and i will maintain it. if people select it, they know the risk
> - vote for or against it
> - refactoring/refactoring/refactoring and try new concepts/ideas
> 
> Thanks for your time,
> Bastian

Overall, I think you have a good idea and it seems you are motivated enough
to put in the necessary work.  That said, I think what you are trying to do
would be best achieved with some sort of fork where you would distribute and
support your own binary builds but remain compatible with the package
repository for non-devs.  Distribute a patch to trunk for devs and see if
you can keep up.  If your work really does improve things, chances are
you will gather some help along the way.

If you feel you really can manage a faster/better/smaller base image, I don't
see why people wouldn't want to use it.  I'd certainly give it a shot.
Even better if this is transparent to the typical OpenWRT user.

The whole point here is that:
1- Devs are unlikely to want to manage arbitrary changes you've made.
2- It's futile to try and change the way someone else works.  If you really
feel you can do it better, do it and see how it goes.  It's not realistic
to expect people to believe in your idea before it has proved itself.

As an example:  Faster boot times are somewhat irrelevant to 95% of current
OpenWRT users.  Yet in some of my projects, they would be a major upside.
If your changes provide that without inconveniencing me in other ways I'll
certainly support them.  For that though, there ought to be a convenient
way for me to try them like subscribing to your git/svn branch or better yet,
downloading a ready-made image for my device.

Basically, you're at that stage where you need to build critical mass for
your ideas.  Merely arguing for them didn't get you the results you expected
so go ahead and push forward with just implementing them on your own.  If
they improve someone else's experience, they'll support you.  As it stands,
your best chance to have 'official' changes is for you to become authoritative
in the matter.  That means your own 'official' patchset/distro.

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


Re: [OpenWrt-Devel] [PATCH 2/2] geode: add additional companion chip drivers to alix2 and geos

2011-05-29 Thread Jonathan Thibault
On 30/05/11 01:05 AM, Philip Prindeville wrote:
> Yeah, I noticed that just after I sent it... just redid the patch.
> 
> On 5/29/11 10:02 PM, Nathan Williams wrote:
>> On Sun, 2011-05-29 at 21:41 -0700, Philip Prindeville wrote:
>>> Use EHCI, not UHCI usb module.
>>
>> kmod-usb2 is EHCI (USB 2.0).  Not kmod-usb-ehci.
>> You need kmod-usb-ohci instead of kmod-usb-uhci for CS553x USB 1.1
>> support.
>>
>> Regards,
>> Nathan
>>

While on topic, I had a patch for the geode hardware watchdog timer if it's not 
already in there.

Let me know if you think it's a worthy addition.

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


Re: [OpenWrt-Devel] [PATCH 2/2] geode: add additional companion chip drivers to alix2 and geos

2011-06-06 Thread Jonathan Thibault
On 30/05/11 03:47 AM, Philip Prindeville wrote:
> On 5/29/11 11:25 PM, Jonathan Thibault wrote:
>> On 30/05/11 01:05 AM, Philip Prindeville wrote:
>>> Yeah, I noticed that just after I sent it... just redid the patch.
>>>
>>> On 5/29/11 10:02 PM, Nathan Williams wrote:
>>>> On Sun, 2011-05-29 at 21:41 -0700, Philip Prindeville wrote:
>>>>> Use EHCI, not UHCI usb module.
>>>> kmod-usb2 is EHCI (USB 2.0).  Not kmod-usb-ehci.
>>>> You need kmod-usb-ohci instead of kmod-usb-uhci for CS553x USB 1.1
>>>> support.
>>>>
>>>> Regards,
>>>> Nathan
>>>>
>> While on topic, I had a patch for the geode hardware watchdog timer if it's 
>> not already in there.
>>
>> Let me know if you think it's a worthy addition.
>>
>> Jonathan
> Send it along and I'll test it.
Heh, after reading your patch carefully, I just noticed that yours
pretty much renders mine obsolete.  It was more of a backport package to
8.09 since geode wdt drivers weren't in the kernel back then.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel