Re: [OpenWrt-Devel] Packages were found, but none compatible with the architectures configured

2009-10-20 Thread ZioPRoTo (Saverio Proto)
> # opkg install kmod-sched
> Collected errors:
>  * Packages were found, but none compatible with the architectures configured

I had the same problem with weekend upgrading some packages on same
devices running 8.09.1 tag, and packages were compiled using the trunk
toolchain.

I don't know exactly if this is your case, but for example the Atheros
target changed architecture name from "mips" to
"atheros_uClibc-0.9.30.1".

So if your firmware was compiled before the target name change, and
you are now compiling the packages with a recent toolchain, the opkg
will fail its check because it thinks you are installing a package for
a wrong target.

I have no idea if this only applies for the Atheros target or also for
other targets.

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


Re: [OpenWrt-Devel] Packages were found, but none compatible with the architectures configured

2009-10-20 Thread edgar . soldin
I recall having similar issues when using a recent trunk compiled image 
(after the kernel upgrade) and trying to use a kmod package from the 
8.09.1 repository ... I guess it's the kernel version.


ede

On 20.10.2009 12:33, ZioPRoTo (Saverio Proto) wrote:

# opkg install kmod-sched
Collected errors:
  * Packages were found, but none compatible with the architectures configured


I had the same problem with weekend upgrading some packages on same
devices running 8.09.1 tag, and packages were compiled using the trunk
toolchain.

I don't know exactly if this is your case, but for example the Atheros
target changed architecture name from "mips" to
"atheros_uClibc-0.9.30.1".

So if your firmware was compiled before the target name change, and
you are now compiling the packages with a recent toolchain, the opkg
will fail its check because it thinks you are installing a package for
a wrong target.

I have no idea if this only applies for the Atheros target or also for
other targets.

Saverio
___
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] bcm63xx_enet: update upstream fixes

2009-10-20 Thread Guillaume LECERF
Hi all,

This patch integrates
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ec1652af18ef02c7c6ceeabb64f56f16eaf40ae9
to 060-bcm63xx_enet_upstream_fixes.patch .

Signed-off-by: Guillaume LECERF 

-- 
Guillaume LECERF
GeeXboX developer - www.geexbox.org
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] bcm63xx_enet: update upstream fixes (with the patch)

2009-10-20 Thread Guillaume LECERF
With the patch this time.

-- 
Guillaume LECERF
GeeXboX developer - www.geexbox.org
Index: target/linux/brcm63xx/patches-2.6.30/060-bcm63xx_enet_upstream_fixes.patch
===
--- target/linux/brcm63xx/patches-2.6.30/060-bcm63xx_enet_upstream_fixes.patch	(revision 18097)
+++ target/linux/brcm63xx/patches-2.6.30/060-bcm63xx_enet_upstream_fixes.patch	(working copy)
@@ -8,6 +8,15 @@
  
  #include 
  #include "bcm63xx_enet.h"
+@@ -91,7 +90,7 @@
+ 		if (enet_readl(priv, ENET_IR_REG) & ENET_IR_MII)
+ 			break;
+ 		udelay(1);
+-	} while (limit-- >= 0);
++	} while (limit-- > 0);
+ 
+ 	return (limit < 0) ? 1 : 0;
+ }
 @@ -321,7 +320,7 @@
  		if (len < copybreak) {
  			struct sk_buff *nskb;
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] firewall/iptables

2009-10-20 Thread Ugur DOGRU


This patch is for firewall/iptables. Most of it is to fix some hush 
script problems.

Adds also some SPI rule to firewall script.


diff -ruN package/firewall/files/20-firewall 
package-after/firewall/files/20-firewall
--- package/firewall/files/20-firewall2009-10-06 15:41:25.0 
+0300
+++ package-after/firewall/files/20-firewall2009-10-20 
13:51:40.0 +0300

@@ -4,8 +4,8 @@
[ "$ifname" == "lo" ] && exit 0

load_zones() {
-local name
-local network
+ name=
+ network=
config_get name $1 name
config_get network $1 network
[ -z "$network" ] && network=$name
@@ -20,17 +20,18 @@

[ ifup = "$ACTION" ] && {
for z in $ZONE; do
-local loaded
+ loaded=
config_get loaded core loaded
-[ -n "$loaded" ] && addif "$INTERFACE" "$ifname" "$z"
+[ -n "$loaded" ] && [ -n "$z" ] && addif "$INTERFACE" "$ifname" 
"$z"

done
}

[ ifdown = "$ACTION" ] && {
-local up
-config_get up "$INTERFACE" up
+up=

for z in $ZONE; do
-[ "$up" == "1" ] && delif "$INTERFACE" "$ifname" "$z"
+ up=
+config_get up $z up
+[ "$up" == "1" ] && [ -n "$z" ] && delif "$INTERFACE" "$ifname" 
"$z"

done
}
diff -ruN package/firewall/files/uci_firewall.sh 
package-after/firewall/files/uci_firewall.sh
--- package/firewall/files/uci_firewall.sh2009-10-06 
15:41:25.0 +0300
+++ package-after/firewall/files/uci_firewall.sh2009-10-20 
14:37:52.0 +0300

@@ -24,7 +24,7 @@
NOTRACK_DISABLED=

find_item() {
-local item="$1"; shift
+item="$1"; shift
for i in "$@"; do
[ "$i" = "$item" ] && return 0
done
@@ -42,13 +42,14 @@
}

create_zone() {
-local exists
-   
+exists=

+
[ "$1" == "loopback" ] && return

-config_get exists $ZONE_LIST $1
+eval_ZONE_LIST=$(eval "echo $ZONE_LIST")
+config_get exists $eval_ZONE_LIST $1
[ -n "$exists" ] && return
-config_set $ZONE_LIST $1 1
+config_set $eval_ZONE_LIST $1 1

$IPTABLES -N zone_$1
$IPTABLES -N zone_$1_MSSFIX
@@ -67,11 +68,12 @@
}

addif() {
-local network="$1"
-local ifname="$2"
-local zone="$3"
+network="$1"
+ifname="$2"
+zone="$3"

-local n_if n_zone
+n_if=
+n_zone=
config_get n_if core "${network}_ifname"
config_get n_zone core "${network}_zone"
[ -n "$n_zone" ] && {
@@ -101,9 +103,9 @@
}

delif() {
-local network="$1"
-local ifname="$2"
-local zone="$3"
+network="$1"
+ifname="$2"
+zone="$3"

logger "removing $network ($ifname) from firewall zone $zone"
$IPTABLES -D input -i "$ifname" -j zone_$zone
@@ -123,8 +125,8 @@
}

load_synflood() {
-local rate=${1:-25}
-local burst=${2:-50}
+rate=${1:-25}
+burst=${2:-50}
echo "Loading synflood protection"
$IPTABLES -N syn_flood
$IPTABLES -A syn_flood -p tcp --syn -m limit --limit $rate/second 
--limit-burst $burst -j RETURN

@@ -133,8 +135,8 @@
}

fw_set_chain_policy() {
-local chain=$1
-local target=$2
+chain=$1
+target=$2
[ "$target" == "REJECT" ] && {
$IPTABLES -A $chain -j reject
target=DROP
@@ -220,9 +222,9 @@
}

fw_zone() {
-local name
-local network
-local masq
+name=
+network=
+masq=

config_get name $1 name
config_get network $1 network
@@ -238,18 +240,18 @@
}

fw_rule() {
-local src
-local src_ip
-local src_mac
-local src_port
-local src_mac
-local dest
-local dest_ip
-local dest_port
-local proto
-local icmp_type
-local target
-local ruleset
+src=
+src_ip=
+src_mac=
+src_port=
+src_mac=
+dest=
+dest_ip=
+dest_port=
+proto=
+icmp_type=
+target=
+ruleset=

config_get src $1 src
config_get src_ip $1 src_ip
@@ -265,14 +267,18 @@

src_port_first=${src_port%-*}
src_port_last=${src_port#*-}
-[ "$src_port_first" -ne "$src_port_last" ] && { \
-src_port="$src_port_first:$src_port_last"; }
+if [ -n "$src_port_last" ] ; then
+[ "$src_port_first" -ne "$src_port_last" ] && {
+src_port="$src_port_first:$src_port_last"; }
+fi

dest_port_first=${dest_port%-*}
dest_port_last=${dest_port#*-}
-[ "$dest_port_first" -ne "$dest_port_last" ] && { \
-dest_port="$dest_port_first:$dest_port_last"; }
-   
+if [ -n "$dest_port_last" ] ; then

+[ "$dest_port_first" -ne "$dest_port_last" ] && {
+dest_port="$dest_port_first:$dest_port_last"; }
+fi
+
ZONE=input
TARGET=$target
[ -z "$target" ] && target=DROP
@@ -280,15 +286,14 @@
[ -n "$src" -a -n "$dest" ] && ZONE=zone_${src}_forward
[ -n "$dest" ] && TARGET=zone_${dest}_$target
add_rule() {
-$IPTABLES -I $ZONE 1 \
-${proto:+-p $proto} \
-${icmp_type:+--icmp-type $icmp_type} \
-${src_ip:+-s $src_ip} \
-${src_port:+--sport $src_port} \
-${src_mac:+-m mac --ma

Re: [OpenWrt-Devel] [PATCH] firewall/iptables

2009-10-20 Thread Malte S. Stretz
On Tuesday 20 October 2009 14:58:49 Ugur DOGRU wrote:
> This patch is for firewall/iptables. Most of it is to fix some hush
> script problems.
>[...]

As most other init/hotplug scripts don't work with hush as well, I wonder why 
you went for the firewall only :)

What you "fixed" are actually not problems in the scripts, but workarounds for 
hush-limitations and un-localizing variables is prone to breaking some stuff 
(I fixed one such issue earlier this year).  The eval-code you used for 
assigning variables looks fishy as well but I never worked with hush so maybe 
PITAresque stuff like this is needed. Maybe you should just add the 50k and 
use ash instead?

Cheers,
Malte

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


Re: [OpenWrt-Devel] [PATCH] firewall/iptables

2009-10-20 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Malte.

> [...]
> Maybe you should just add the 50k and use ash instead?

As far as I know is "hush" a requirement of the platform (no mmu) and I
think "ash" does not work on non-mmu + non-fork platforms.

~ JoW
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrd2scACgkQdputYINPTPN//gCeJk490y55LpSJKQP++wghzZ6K
Tv4AniggWzPOQT1RSAdy314bwXyP1TqJ
=W339
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] firewall/iptables

2009-10-20 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi.

What about "emulating" local with something like the following?

  local() { eval "$1=''"; }

This way you can keep the current scripts and handle the not-implemented
local gracefully.

~ JoW
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrd29IACgkQdputYINPTPND4ACaArek5LSOYNkoNV1FFpmK81lb
GzEAn1f9SPvnwPucGRp/Y2PT58WItq7C
=rKsF
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] firewall/iptables

2009-10-20 Thread Florian Fainelli
Hi,

On Tuesday 20 October 2009 17:48:34 Jo-Philipp Wich wrote:
> Hi.
>
> What about "emulating" local with something like the following?
>
>   local() { eval "$1=''"; }
>
> This way you can keep the current scripts and handle the not-implemented
> local gracefully.

I definitively prefer that solution, anytime hush makes more progress towards 
having local variables support or ash finally works on no-mmu systems this 
"hack" can be removed.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] firewall/iptables

2009-10-20 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The following function supports multiple args like the original "local".

if ! type "local" >/dev/null; then
local() {
for _v in $*; do eval "$_v=''"; done
}
fi


If you add that to /etc/profile (is that supported by hush?) then it
should be available system wide, in any script.


~ JoW
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrd5AoACgkQdputYINPTPP2RwCgjlMDgHn/slP2BbQ+488LpzwN
GOIAnik/wOoQCFG7p9m7NXbKd3SZdIIs
=eQjM
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] firewall/iptables

2009-10-20 Thread Felix Fietkau
Jo-Philipp Wich wrote:
> The following function supports multiple args like the original "local".
> 
> if ! type "local" >/dev/null; then
>   local() {
>   for _v in $*; do eval "$_v=''"; done
>   }
> fi
> 
> 
> If you add that to /etc/profile (is that supported by hush?) then it
> should be available system wide, in any script.
/etc/functions.sh would be a better place, imho. I think /etc/profile is
not automatically sourced by shell scripts. This function doesn't
currently cover all scripts, it needs to handle things like
local var="value"
as well without inserting extra = characters.

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


Re: [OpenWrt-Devel] [PATCH] firewall/iptables

2009-10-20 Thread Ugur Dogru

hi Malte,

I forgot to say that, this is for ubicom32 cpu that has no mmu, and other 
no-mmu cpu's,
there is no memory concern. 

this will not be the end of hush scripts changes, others are on the way.

"eval" may be fishy for ash, i don't know. May be making a global "switch" 
mechanism between ash/hush
is the solution to "isolate" different behaviour of shells.

regards
ugur

-Original Message-
From: openwrt-devel-boun...@lists.openwrt.org on behalf of Malte S. Stretz
Sent: Tue 20.10.2009 16:51
To: OpenWrt Development List
Subject: Re: [OpenWrt-Devel] [PATCH] firewall/iptables
 
On Tuesday 20 October 2009 14:58:49 Ugur DOGRU wrote:
> This patch is for firewall/iptables. Most of it is to fix some hush
> script problems.
>[...]

As most other init/hotplug scripts don't work with hush as well, I wonder why 
you went for the firewall only :)

What you "fixed" are actually not problems in the scripts, but workarounds for 
hush-limitations and un-localizing variables is prone to breaking some stuff 
(I fixed one such issue earlier this year).  The eval-code you used for 
assigning variables looks fishy as well but I never worked with hush so maybe 
PITAresque stuff like this is needed. Maybe you should just add the 50k and 
use ash instead?

Cheers,
Malte

-- 
   
___
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] [PATCH] firewall/iptables

2009-10-20 Thread Ugur DOGRU


Good idea. but, not sure that "type" supported by hush.

ugur

Jo-Philipp Wich wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The following function supports multiple args like the original "local".

if ! type "local" >/dev/null; then
local() {
for _v in $*; do eval "$_v=''"; done
}
fi


If you add that to /etc/profile (is that supported by hush?) then it
should be available system wide, in any script.


~ JoW
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrd5AoACgkQdputYINPTPP2RwCgjlMDgHn/slP2BbQ+488LpzwN
GOIAnik/wOoQCFG7p9m7NXbKd3SZdIIs
=eQjM
-END PGP SIGNATURE-
___
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] [PATCH] firewall/iptables

2009-10-20 Thread Bayram Kurumahmut

Latest busybox version is 1.15.2 and includes local builtin implemented. You 
can check the following link: http://busybox.net/.

As noted, in the present time, hush is a must for nommu processors like we 
have: ubicom32.

Bayram

-Original Message-
From: openwrt-devel-boun...@lists.openwrt.org on behalf of Florian Fainelli
Sent: Tue 10/20/2009 09:03
To: openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH] firewall/iptables
 
Hi,

On Tuesday 20 October 2009 17:48:34 Jo-Philipp Wich wrote:
> Hi.
>
> What about "emulating" local with something like the following?
>
>   local() { eval "$1=''"; }
>
> This way you can keep the current scripts and handle the not-implemented
> local gracefully.

I definitively prefer that solution, anytime hush makes more progress towards 
having local variables support or ash finally works on no-mmu systems this 
"hack" can be removed.
___
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