Re: [OpenWrt-Devel] [PATCH] rt2800: Initialize max_txpower to MAX_G_TXPOWER and MAX_A_TXPOWER respectively
On Fri, May 18, 2012 at 6:21 PM, Tobias Diedrich ra...@tdiedrich.de wrote: So, maybe we should do it the safe way and just register a safe default of 20dBm for all channels? AFAIU that would cap you to 20dBm even if you are in a country that has higher limits (e.g. 27dBm in the US?). Not necessarily because the driver won't allow tx power adjustments at all if EEPROM_EIRP_MAX_TX_POWER is unused. For these devices we cannot rely on the tx power output at all and maybe it makes sense to register a max power of 0 just to tell mac80211/cfg80211 that no tx power adjustments are possible on these devices? Helmut ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] base-files-network: Avoid ifconfig down if the macaddr is not going to change
Avoid ifconfig down if the macaddr is not going to change. For wireless interfaces, downing the interface after hostapd has been started is unsupported and not guaranteed to work at all, but that is exactly was OpenWRT does right now (maybe not for netifd). And in this case it was alrady set by enable_mac80211 before hostapd was started, so it's not going to change in prepare_interface. Quoting Johannes Berg: Wow, ok, setting the interface down while the AP is up really isn't a valid use of it. I'm actually amazed that it ever works at all when you do this. Either this should be done the other way around, or hostapd needs to get some smarts about it. For example, with the start-AP function transition, I'm not sure even *beacon* after you do this... Signed-off-by: Tobias Diedrich ranma+open...@tdiedrich.de Index: package/base-files-network/files/lib/network/config.sh === --- package/base-files-network/files/lib/network/config.sh (revision 31774) +++ package/base-files-network/files/lib/network/config.sh (working copy) @@ -184,7 +184,11 @@ config_get mtu $config mtu [ -n $macaddr ] || config_get macaddr $config macaddr config_get txqueuelen $config txqueuelen - [ -n $macaddr ] $DEBUG ifconfig $iface down + local oldmacaddr + local uppermacaddr + oldmacaddr=`ifconfig $iface | head -1 | sed -e 's@.*HWaddr \([0-9A-F:]*\).*@\1@'` + uppermacaddr=`echo -n $macaddr | tr a-f A-F` + [ -n $macaddr -a $uppermacaddr != $oldmacaddr ] $DEBUG ifconfig $iface down $DEBUG ifconfig $iface ${macaddr:+hw ether $macaddr} ${mtu:+mtu $mtu} ${txqueuelen:+txqueuelen $txqueuelen} up [ $proto = none ] || ifconfig $iface 0.0.0.0 -- Tobias PGP: http://8ef7ddba.uguu.de ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files-network: Avoid ifconfig down if the macaddr is not going to change
On 2012-05-19 12:18 PM, Tobias Diedrich wrote: Avoid ifconfig down if the macaddr is not going to change. For wireless interfaces, downing the interface after hostapd has been started is unsupported and not guaranteed to work at all, but that is exactly was OpenWRT does right now (maybe not for netifd). And in this case it was alrady set by enable_mac80211 before hostapd was started, so it's not going to change in prepare_interface. Quoting Johannes Berg: Wow, ok, setting the interface down while the AP is up really isn't a valid use of it. I'm actually amazed that it ever works at all when you do this. Either this should be done the other way around, or hostapd needs to get some smarts about it. For example, with the start-AP function transition, I'm not sure even *beacon* after you do this... This code is no longer used by default (replaced by netifd), and will be removed at some point. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] anyone have a working recipe for kexec-booting from USB storage?
I really want to start testing some new/different firmwares but I don't really have an experimental router to do it on. Thus, I'd like to get my router (DIR-825) into a state where I can change what I boot and run with simply by swapping USB storage devices. That way I can have a working production USB stick that I can just pop in and am working in a known good configuration. When I want to experiment/upgrade test I build a new USB stick, pop it in and reboot. Disaster? No worries, just pop the working production stick back in and everything is back to where it was before experimenting. To do this though, I need a kexec-ing image I can flash to my router to become my boot loader. Anyone got one for an ar71xx? Somewhat related, Quentin Armitage proposed a block-extroot-kexec to do just this at https://lists.openwrt.org/pipermail/openwrt-devel/2010-April/006671.html. I wonder why it didn't even get a comment, nevermind not getting committed. Was there objection to it? I would really love to see the openwrt project itself producing bootloader flash images in addition to the traditional images they currently produce so that people wanting this feature didn't have to roll their own. Any chance of that happening? Cheers, b. signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Add support for SunPlus web camera
Hi boys, Im trying to compile OpenWrt backfire (trunk or stable) with support for GSPCA camera with spca1528 chipset (sunplus), exactly /ID 04fc:1528 Sunplus Technology Co., Ltd SPCA1527A/SPCA1528 SD card camera (webcam mode)/. I have two options: 1. Compile the GSPCA driver V4L version on this page http://moinejf.free.fr/. This works in my linux desktop PC's. But I dont know how to compile this driver for OpenWrt. 2. Use the patch published by Cezary Jackiewicz to add missing gspca video drivers. Im trying this option, so I have done: In my Ubuntu: 1. Download source code of stable Backfire version: svn checkout svn://svn.openwrt.org/openwrt/tags/backfire_10.03 2. Download standard config file wgethttp://downloads.openwrt.org/backfire/10.03/brcm47xx/OpenWrt.config mv OpenWrt.config .config 3. Edit //package/kernel/modules/video.mk /and add at the end of the file: define KernelPackage/video-gspca-konica TITLE:=konica webcam support KCONFIG:=CONFIG_USB_GSPCA_KONICA FILES:=$(LINUX_DIR)/drivers/media/video/gspca/gspca_konica.ko AUTOLOAD:=$(call AutoLoad,75,gspca_konica) $(call AddDepends/video-gspca) endef define KernelPackage/video-gspca-konica/description The Konica USB Camera Driver (konica) kernel module. endef $(eval $(call KernelPackage,video-gspca-konica)) define KernelPackage/video-gspca-spca1528 TITLE:=spca1528 webcam support KCONFIG:=CONFIG_USB_GSPCA_SPCA1528 FILES:=$(LINUX_DIR)/drivers/media/video/gspca/gspca_spca1528.ko AUTOLOAD:=$(call AutoLoad,75,gspca_spca1528) $(call AddDepends/video-gspca) endef define KernelPackage/video-gspca-spca1528/description The SPCA1528 USB Camera Driver (spca1528) kernel module. endef $(eval $(call KernelPackage,video-gspca-spca1528)) 4. /make menuconfig/ and select /* kmod-video-gspca-konica/ and /* kmod-video-gpsca-spca1528/ modules (with *) 5. /make/ (without any errors) 6. Flash my Asus WL-500gP with /bin/brcm47xx/openwrt-vrcm47xx-squashfs.trx/ 7. Install usb support and video support. 8. Connect my webcam 9. No luck: no /dev/videoX device created. If I connect my Philips PCVC730K web cam all works ok, /dev/video0 created and I can use it. Some suggestion? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] anyone have a working recipe for kexec-booting from USB storage?
Hi, 19.05.2012 18:10, Brian J. Murrell: [...] To do this though, I need a kexec-ing image I can flash to my router to become my boot loader. Anyone got one for an ar71xx? Yes. I sometimes use kexec to chain-boot debian from USB hard disk on wndr3800. I'm using backfire 10.03.1 slightly patched and customized for my specific needs. So generally it is doable, but not quite out-of-the-box apparently. Somewhat related, Quentin Armitage proposed a block-extroot-kexec to do just this at https://lists.openwrt.org/pipermail/openwrt-devel/2010-April/006671.html. I wonder why it didn't even get a comment, nevermind not getting committed. Was there objection to it? No idea. Anyway, most probably it won't work for ar71xx as is because of yet 2 issues (as of 10.03.1): First: --- arch/mips/kernel/machine_kexec.c.orig 2012-02-08 01:58:13.0 +0300 +++ arch/mips/kernel/machine_kexec.c2012-02-20 22:19:11.0 +0300 @@ -52,7 +52,7 @@ reboot_code_buffer = (unsigned long)page_address(image-control_code_page); - kexec_start_address = image-start; + kexec_start_address = (unsigned long) phys_to_virt(image-start); Second: drivers for onboard network stuff have to be compiled as modules and must NOT be loaded before kexecing, or otherwise kexec'ed system would crash at random points for some reason. Finally, IIRC kexec feature was not even enabled by default in the kernel in backfire (though I might be wrong). HTH Nikolai I would really love to see the openwrt project itself producing bootloader flash images in addition to the traditional images they currently produce so that people wanting this feature didn't have to roll their own. Any chance of that happening? 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
Re: [OpenWrt-Devel] [PATCH] base-files-network: Avoid ifconfig down if the macaddr is not going to change
For what it's worth, getting the mac address with iproute is trivial. ip -o link show dev $iface | awk '{print $13;}' On 5/19/12 4:18 AM, Tobias Diedrich wrote: Avoid ifconfig down if the macaddr is not going to change. For wireless interfaces, downing the interface after hostapd has been started is unsupported and not guaranteed to work at all, but that is exactly was OpenWRT does right now (maybe not for netifd). And in this case it was alrady set by enable_mac80211 before hostapd was started, so it's not going to change in prepare_interface. Quoting Johannes Berg: Wow, ok, setting the interface down while the AP is up really isn't a valid use of it. I'm actually amazed that it ever works at all when you do this. Either this should be done the other way around, or hostapd needs to get some smarts about it. For example, with the start-AP function transition, I'm not sure even *beacon* after you do this... Signed-off-by: Tobias Diedrich ranma+open...@tdiedrich.de Index: package/base-files-network/files/lib/network/config.sh === --- package/base-files-network/files/lib/network/config.sh(revision 31774) +++ package/base-files-network/files/lib/network/config.sh(working copy) @@ -184,7 +184,11 @@ config_get mtu $config mtu [ -n $macaddr ] || config_get macaddr $config macaddr config_get txqueuelen $config txqueuelen - [ -n $macaddr ] $DEBUG ifconfig $iface down + local oldmacaddr + local uppermacaddr + oldmacaddr=`ifconfig $iface | head -1 | sed -e 's@.*HWaddr \([0-9A-F:]*\).*@\1@'` + uppermacaddr=`echo -n $macaddr | tr a-f A-F` + [ -n $macaddr -a $uppermacaddr != $oldmacaddr ] $DEBUG ifconfig $iface down $DEBUG ifconfig $iface ${macaddr:+hw ether $macaddr} ${mtu:+mtu $mtu} ${txqueuelen:+txqueuelen $txqueuelen} up [ $proto = none ] || ifconfig $iface 0.0.0.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files-network: Avoid ifconfig down if the macaddr is not going to change
Philip Prindeville wrote: For what it's worth, getting the mac address with iproute is trivial. ip -o link show dev $iface | awk '{print $13;}' But I think you can't assume it's available. Also the oneliner above doesn't work: root@OpenWrt:/# ip -o link show dev wlan0 | awk '{print $13;}' DORMANT root@OpenWrt:/# ip -o link show dev wlan0 10: wlan0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc mq master br-lan state UP mode DORMANT qlen 32\link/ether 1c:af:f7:49:50:56 brd ff:ff:ff:ff:ff:ff And someone else pointed out that this script is now superseded by netifd anyway (Which seems to not exhibit this problem). -- Tobias PGP: http://8ef7ddba.uguu.de ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Revisited: [PROPOSAL] growing OpenWrt devel team
We talked about how this could be improved... we're more than a year down the road, and I'm not seeing much difference. Maybe we need to talk about this more? Or try harder? On 3/24/11 2:17 PM, Luka Perkov wrote: Dear OpenWrt developers and other openwrt-devel readers, first I would like to express my gratitude to the current OpenWrt developers for all the work they did to keep up and running this project on many embedded devices. You must have spent many long hours contributing to this project and not for example spending quality time with your girlfriends / boyfriends... :) But I must notice as occasional project participant that this project could benefit a lot more than it does now from people like myself. I say this mainly because of the large number of non replied patches posted on this list. That's why I have chosen this subject. Maybe there is a reason I am not aware of why OpenWrt is relatively closed community, but I think that involving some fresh blood in this project could help. At least with answering to the rejected patches. Surely, current OpenWrt developers would lose some time to help the new guys starting up, but in the long run it would be time well spent. Best of luck to the OpenWrt project, Luka Perkov ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PROPOSAL] growing OpenWrt devel team
On 3/28/11 2:51 PM, Florian Fainelli wrote: The answer I would give you now is: your contributions on ramips (and other) are more than welcome, and wait a bit more until you have proven to be a trustworthy contributor (I have no doubt you are) and you might get commit access. Probably one thing that we are missing is kind of a contributor guide something much more simple than the debian developper and social guide, but still something which explains how and when to become an OpenWrt commiter. Layne, Just out of curiosity, did either of these 2 things ever happen? -Philip ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] swconfig: List available switches
List available switches. As part of the usage message or when the switch name was mistyped, show the user a summary of switch devices available in the system. Signed-off-by: Tobias Diedrich ranma+open...@tdiedrich.de Index: package/swconfig/src/cli.c === --- package/swconfig/src/cli.c (revision 31813) +++ package/swconfig/src/cli.c (working copy) @@ -72,9 +72,15 @@ } static void +print_dev_summary(struct switch_dev *dev) +{ + printf(%s: %s(%s), ports: %d (cpu @ %d), vlans: %d\n, dev-dev_name, dev-alias, dev-name, dev-ports, dev-cpu_port, dev-vlans); +} + +static void list_attributes(struct switch_dev *dev) { - printf(%s: %s(%s), ports: %d (cpu @ %d), vlans: %d\n, dev-dev_name, dev-alias, dev-name, dev-ports, dev-cpu_port, dev-vlans); + print_dev_summary(dev); printf( --switch\n); print_attrs(dev-ops); printf( --vlan\n); @@ -84,6 +90,21 @@ } static void +list_switches(void) +{ + struct switch_dev *dev; + dev = swlib_connect(NULL); + if (!dev) + printf(No switches found\n); + while (dev) { + struct switch_dev *next = dev-next; + print_dev_summary(dev); + swlib_free(dev); + dev = dev-next; + } +} + +static void print_attr_val(const struct switch_attr *attr, const struct switch_val *val) { int i; @@ -168,6 +189,7 @@ print_usage(void) { printf(swconfig dev dev [port port|vlan vlan] (help|set key value|get key|load config|show)\n); + list_switches(); exit(1); } @@ -260,7 +282,8 @@ dev = swlib_connect(cdev); if (!dev) { - fprintf(stderr, Failed to connect to the switch\n); + fprintf(stderr, Failed to connect to the switch, available switches:\n); + list_switches(); return 1; } -- Tobias PGP: http://8ef7ddba.uguu.de ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] daemonlogger package Makefile (second attempt)
Any movement on this? I've posted the first section of a guide for building a software network tap based on OpenWRT and Daemonlogger at http://vinsec.blogspot.com, and I've already had significant interest from folks at Sourcefire, Mandiant, and elsewhere for the publication of this work to a much wider audience. It would be really convenient if I could tailor my HOWTO to software that already exists in the mainline OpenWRT distribution rather than having to lead folks through setting up the BuildRoot environment and rolling their own. This is not a patch in the purest sense; I am merely adding a Makefile to build daemonlogger as a native OpenWRT package. No existing files are modified by this patch. Does anyone have the time to review it for potential inclusion in the next stable release of Backfire? Thanks in advance, Robert Vineyard On 5/6/2012 3:19 AM, Robert Vineyard wrote: Daemonlogger is a packet logger and soft tap developed by Martin Roesch. This patch adds a Makefile to build it as an OpenWRT ipk package. Note: This patch is against trunk, but it also builds cleanly on Backfire. Signed-off-by: Robert Vineyardviney...@tuffmail.com --- Index: feeds/packages/net/daemonlogger/Makefile === --- feeds/packages/net/daemonlogger/Makefile(revision 0) +++ feeds/packages/net/daemonlogger/Makefile(revision 0) @@ -0,0 +1,44 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=daemonlogger +PKG_VERSION:=1.2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=463 +PKG_SOURCE_URL:=http://www.snort.org/downloads/ +PKG_CAT:=zcat +PKG_MD5SUM:=acb64aa6cd5777e297569f100b5c39ee + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/daemonlogger + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +libdnet + TITLE:=Software Network Tap + URL:=http://www.snort.org/snort-downloads/additional-downloads +endef + +CONFIGURE_VARS += \ + BUILD_CC=$(TARGET_CC) \ + HOSTCC=$(HOSTCC) + +MAKE_FLAGS := CCOPT=$(TARGET_CFLAGS) INCLS=-I. $(TARGET_CPPFLAGS) + +define Package/daemonlogger/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/daemonlogger $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,daemonlogger)) ___ 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-Users] [PATCH] daemonlogger package Makefile (second attempt)
On Sat, May 19, 2012 at 7:02 PM, Robert Vineyard viney...@tuffmail.com wrote: Any movement on this? I've posted the first section of a guide for building a software network tap based on OpenWRT and Daemonlogger at http://vinsec.blogspot.com, and I've already had significant interest from folks at Sourcefire, Mandiant, and elsewhere for the publication of this work to a much wider audience. Just reinstalled my development environment, once i get the WRT sources pulled down ill get on this and test it, if its good ill commit it for you. sometime later this evening most likely. It would be really convenient if I could tailor my HOWTO to software that already exists in the mainline OpenWRT distribution rather than having to lead folks through setting up the BuildRoot environment and rolling their own. This is not a patch in the purest sense; I am merely adding a Makefile to build daemonlogger as a native OpenWRT package. No existing files are modified by this patch. Does anyone have the time to review it for potential inclusion in the next stable release of Backfire? Thanks in advance, Robert Vineyard On 5/6/2012 3:19 AM, Robert Vineyard wrote: Daemonlogger is a packet logger and soft tap developed by Martin Roesch. This patch adds a Makefile to build it as an OpenWRT ipk package. Note: This patch is against trunk, but it also builds cleanly on Backfire. Signed-off-by: Robert Vineyardviney...@tuffmail.com --- Index: feeds/packages/net/daemonlogger/Makefile === --- feeds/packages/net/daemonlogger/Makefile (revision 0) +++ feeds/packages/net/daemonlogger/Makefile (revision 0) @@ -0,0 +1,44 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=daemonlogger +PKG_VERSION:=1.2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=463 +PKG_SOURCE_URL:=http://www.snort.org/downloads/ +PKG_CAT:=zcat +PKG_MD5SUM:=acb64aa6cd5777e297569f100b5c39ee + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/daemonlogger + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +libdnet + TITLE:=Software Network Tap + URL:=http://www.snort.org/snort-downloads/additional-downloads +endef + +CONFIGURE_VARS += \ + BUILD_CC=$(TARGET_CC) \ + HOSTCC=$(HOSTCC) + +MAKE_FLAGS := CCOPT=$(TARGET_CFLAGS) INCLS=-I. $(TARGET_CPPFLAGS) + +define Package/daemonlogger/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/daemonlogger $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,daemonlogger)) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-users mailing list openwrt-us...@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-users ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [OpenWrt-Users] [PATCH] daemonlogger package Makefile (second attempt)
On 5/19/2012 7:43 PM, Outback Dingo wrote: Just reinstalled my development environment, once i get the WRT sources pulled down ill get on this and test it, if its good ill commit it for you. sometime later this evening most likely. Excellent, most appreciated! Thanks, Robert Vineyard ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel