Re: [OpenWrt-Devel] [PATCH] Edimax BR6104KP profile with rootfs on a USB drive
> regarding WL-700gE, I couldn't yet find where exactly it does what you > describe, but I didn't yet have time to spend more time on it. It's not in the Svn (the code there just does a minimal install and then expects you to change the init file to do something else, which is explained in some web pages). The alternative was discussed in this mailing-list a few months ago (by yours truly). The patch below is the hack I use right now. Stefan Index: package/base-files/files/sbin/mount_root === --- package/base-files/files/sbin/mount_root(révision 13122) +++ package/base-files/files/sbin/mount_root(copie de travail) @@ -2,15 +2,66 @@ # Copyright (C) 2006 OpenWrt.org . /etc/functions.sh +echo mount_root >>/tmp/stef + jffs2_ready () { mtdpart="$(find_mtd_part rootfs_data)" magic=$(hexdump $mtdpart -n 4 -e '4/1 "%02x"') [ "$magic" != "deadc0de" ] } +### Try to mount some drive. +mount_drive () { +for m in jbd ext3; do +echo "mount_drive $m" >>/tmp/stef +insmod "$m" >>/tmp/stef 2>&1 +done + +rootdev="$1" + +COUNTER=0 +while [ ! -b "$rootdev" ] && [ $COUNTER -lt 10 ]; do +echo "mount sleep for $rootdev" >>/tmp/stef +sleep 1 +let COUNTER=COUNTER+1 +done + +mount "$rootdev" /mnt && [ -x /mnt/sbin/init ] && { +echo "mounted $rootdev" >>/tmp/stef +. /bin/firstboot +pivot /mnt /rom +exit +} +} + +mount_ide () { +echo mount_ide >>/tmp/stef +for m in ide-core aec62xx ide-generic ide-disk; do +insmod "$m" >>/tmp/stef 2>&1 +done +mount_drive "/dev/hde1" +} + +mount_usb () { +echo mount_usb >>/tmp/stef +# ehci-hcd is for USB2, ohci-hcd and uhci-hcd are both for USB1 but only +# one of them works. For WRTSL54GS, it's ohci, for WL700gE it's uhci. +for m in usbcore ohci-hcd uhci-hcd ehci-hcd scsi_mod sd_mod usb-storage; do +echo "mount_usb $m" >>/tmp/stef +insmod "$m" >>/tmp/stef 2>&1 +done +mount_drive "/dev/sda1" +} + +mount_usb +mount_ide + +### If no drve, mount the JFFS2 partition or a ramdisk. grep rootfs_data /proc/mtd >/dev/null 2>/dev/null && { +echo mount_root-11 >>/tmp/stef . /bin/firstboot mtd unlock rootfs_data +echo mount_root-12 >>/tmp/stef jffs2_ready && { echo "switching to jffs2" mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2 && \ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] madwifi AP to AP WDS (wds_add)
There's no handling of WDS from AP-to-AP in OpenWRT's wireless config file for madwifi (wds_add). This patch tries to fix this. Example: # Router1 - Wireless MAC 00:11:11:11:11:01 config 'wifi-iface' option 'device' 'wifi0' option 'network' 'lan' option 'mode' 'ap' option 'wds' '1' option 'ssid' 'guifi.net-test-radio0' option 'wds_add0' '00:11:11:11:11:02' option 'wds_add1' '00:11:11:11:11:03' # Router2 - Wireless MAC 00:11:11:11:11:02 config 'wifi-iface' option 'device' 'wifi0' option 'network' 'lan' option 'mode' 'ap' option 'wds' '1' option 'ssid' 'guifi.net-test-radio0' option 'wds_add0' '00:11:11:11:11:01' # Router2 - Wireless MAC 00:11:11:11:11:03 config 'wifi-iface' option 'device' 'wifi0' option 'network' 'lan' option 'mode' 'ap' option 'wds' '1' option 'ssid' 'guifi.net-test-radio0' option 'wds_add0' '00:11:11:11:11:01' New WDS interfaces will be created for each radio: Router1: ath0 ath0.wds0# WDS to Router2 ath0.wds1# WDS to Router3 Router2: ath0 ath0.wds0# WDS to Router1 Router3: ath0 ath0.wds0# WDS to Router1 Signed-off-by: Joan Llopart Index: package/madwifi/files/lib/wifi/madwifi.sh === --- package/madwifi/files/lib/wifi/madwifi.sh (revision 13122) +++ package/madwifi/files/lib/wifi/madwifi.sh (working copy) @@ -287,6 +287,19 @@ [ -n "$ssid" ] && iwconfig "$ifname" essid on iwconfig "$ifname" essid "$ssid" set_wifi_up "$vif" "$ifname" + + cont=0 + config_get "wds_add$cont" "$vif" "wds_add$cont" + eval wds_add=\$"wds_add$cont" + while [ $wds_add ] + do + iwpriv "$ifname" wds_add "$wds_add" + ifconfig "$ifname.wds$cont" up + cont=$((cont+1)) + config_get "wds_add$cont" "$vif" "wds_add$cont" + eval wds_add=\$"wds_add$cont" + done + case "$mode" in ap) config_get_bool isolate "$vif" isolate 0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] 150-netfilter_imq.patch & kernel 2.6.27.x
Alexandros C. Couloumbis wrote: > patch 150-netfilter_imq.patch is no longer needed for kernels >=2.6.27 > as IMQ is included in the kernel > please scratch this out, the above statement is false, a mistake. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] fix patches-2.6.27/130-netfilter_ipset.patch
the asm/semaphore.h --> linux/semaphore.h transaction Signed-off-by: Alexandros C. Couloumbis diff -Nrub patches-2.6.27/130-netfilter_ipset.patch.old patches-2.6.27/130-netfilter_ipset.patch --- patches-2.6.27/130-netfilter_ipset.patch.old2008-11-04 12:16:54.0 +0200 +++ patches-2.6.27/130-netfilter_ipset.patch2008-11-04 12:18:35.0 +0200 @@ -1164,7 +1164,7 @@ +#include +#include +#include -+#include ++#include +#include +#include + ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] 150-netfilter_imq.patch & kernel 2.6.27.x
patch 150-netfilter_imq.patch is no longer needed for kernels >=2.6.27 as IMQ is included in the kernel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] clean 100-netfilter_layer7 patch
the following patch separates the openwrt patch changes from the vanilla layer7 kernel patch in order to make the upgrade process easier and cleaner. tested against layer7 vanilla kernel-2.6.22-2.6.24-layer7-2.17.patch & kernel-2.6.25-layer7-2.20.patch on a 2.6.27.4 openwrt kernel. Signed-off-by: Alexandros C. Couloumbis diff -Nrub linux-2.6.27.4.old/net/netfilter/nf_conntrack_standalone.c linux-2.6.27.4/net/netfilter/nf_conntrack_standalone.c --- linux-2.6.27.4.old/net/netfilter/nf_conntrack_standalone.c 2008-11-04 11:55:18.0 +0200 +++ linux-2.6.27.4/net/netfilter/nf_conntrack_standalone.c 2008-11-04 11:56:44.0 +0200 @@ -162,7 +162,12 @@ return -ENOSPC; #endif - if (seq_printf(s, "use=%u\n", atomic_read(&ct->ct_general.use))) +#if defined(CONFIG_NETFILTER_XT_MATCH_LAYER7) || defined(CONFIG_NETFILTER_XT_MATCH_LAYER7_MODULE) + if(ct->layer7.app_proto) + if(seq_printf(s, "l7proto=%s ", ct->layer7.app_proto)) + return -ENOSPC; +#endif + if (seq_printf(s, "asdfuse=%u\n", atomic_read(&ct->ct_general.use))) return -ENOSPC; return 0; diff -Nrub linux-2.6.27.4.old/net/netfilter/xt_layer7.c linux-2.6.27.4/net/netfilter/xt_layer7.c --- linux-2.6.27.4.old/net/netfilter/xt_layer7.c2008-11-04 11:55:18.0 +0200 +++ linux-2.6.27.4/net/netfilter/xt_layer7.c2008-11-04 11:56:44.0 +0200 @@ -395,7 +395,7 @@ return count; } -static int +static bool match(const struct sk_buff *skbin, const struct net_device *in, const struct net_device *out, @@ -403,7 +403,7 @@ const void *matchinfo, int offset, unsigned int protoff, - int *hotdrop) + bool *hotdrop) { /* sidestep const without getting a compiler warning... */ struct sk_buff * skb = (struct sk_buff *)skbin; @@ -547,7 +547,7 @@ return (pattern_result ^ info->invert); } -static int check(const char *tablename, +static bool check(const char *tablename, const void *inf, const struct xt_match *match, void *matchinfo, @@ -558,9 +558,9 @@ if (nf_ct_l3proto_try_module_get(match->family) < 0) { printk(KERN_WARNING "can't load conntrack support for " "proto=%d\n", match->family); -return 0; +return false; } - return 1; + return true; } static void ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel