Re: [OpenWrt-Devel] Enabling a config option based on selected target
Hi Angus, look here: https://homeproj.cesnet.cz/projects/besip/repository/entry/Trunk/OpenWrt/besip/Makefile into dependencies of besip-lite package (latest entries). Is it what you are searching for? With regards, Lukas Dne 16.8.2011 01:45, Angus Gratton napsal(a): I've been porting OpenWRT to run on the ZipIt Z2[1] handhelds. For usability purposes the system needs to load a larger console font a valid keymap at boot time. To make this work seamlessly, I'd ideally like the config system to enable BUSYBOX_CONFIG_LOADFONT BUSYBOX_CONFIG_LOADKMAP automatically when the user selects the ZipIt subtarget. Is that possible? I can't seem to get there using DEPENDS or DEFAULT_PACKAGES in target.mk, they only seem to work with whole packages. I also tried the DEPENDS: @ syntax described here[2] but it didn't seem to work, gave me a circular dependencies error! Does anyone have any advice or places to look? Sorry if the answer is somewhere obvious, I'm fairly new to buildroot. Thanks very much, Angus [1] https://github.com/projectgus/openwrt-zipit [2] http://wiki.openwrt.org/doc/devel/dependencies ___ 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] Buil package and exec (platform-depend) command on target dir
Hi all, It is possible during package compiling to exec some command (platform depend) on target dir? es. I want to launch luac (lua compiler) during my package compile. Rgds -- Filippo Sallemi ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Add support for a noname router from DX
This patch adds full support for this router: http://www.dealextreme.com/p/portable-wireless-n-3g-router-cdma2000-evdo-td-scdma-hspa-wcdma-45639 This is a resubmit of my previous patch against current trunk. I have adjusted mtd partitioning so that built-in dwc_otgusb would fit in and cleaned up some unneeded stuff. Patch attached. Signed-off-by: Andrew 'Necromant' Andrianov necrom...@necromant.ath.cx Regards, Andrewdiff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index 405e7c4..df2c3cf 100644 --- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -50,7 +50,8 @@ case $FIRMWARE in rt-n15 | \ v22rw-2x2 | \ wcr150gn | \ - whr-g300n) + whr-g300n | \ + unbranded-3gn) rt2x00_eeprom_extract factory 0 272 ;; diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 33ce13c..a1b1174 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -55,6 +55,9 @@ ramips_board_name() { *WZR-AGL300NH) name=wzr-agl300nh ;; + *Unbranded 3GN router from DX) + name=unbranded-3gn + ;; *) name=generic ;; diff --git a/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h b/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h index 8571f7a..9c16f34 100644 --- a/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h +++ b/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h @@ -33,4 +33,5 @@ enum ramips_mach_type { RAMIPS_MACH_FONERA20N, /* La Fonera 2.0N */ RAMIPS_MACH_HW550_3G, /* Aztech HW550-3G */ RAMIPS_MACH_MOFI3500_3GN, /* MoFi Network MOFI3500-3GN */ + RAMIPS_MACH_UNBRANDED_3GN, /* Unbranded 3GN router from DX */ }; diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig b/target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig index c24670e..bfdc915 100644 --- a/target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig +++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig @@ -43,6 +43,11 @@ config RT305X_MACH_MOFI3500_3GN select RALINK_DEV_GPIO_BUTTONS select RALINK_DEV_GPIO_LEDS +config RT305X_MACH_UNBRANDED_3GN + bool Unbranded 3gn with 4 megs flash + default n + + config RT305X_MACH_NW718 bool Netcore NW718 default y diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile b/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile index cf72456..814ad07 100644 --- a/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile +++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile @@ -16,9 +16,11 @@ obj-$(CONFIG_RT305X_MACH_F5D8235_V2)+= mach-f5d8235-v2.o obj-$(CONFIG_RT305X_MACH_FONERA20N) += mach-fonera20n.o obj-$(CONFIG_RT305X_MACH_HW550_3G) += mach-hw550-3g.o obj-$(CONFIG_RT305X_MACH_MOFI3500_3GN) += mach-mofi3500-3gn.o +obj-$(CONFIG_RT305X_MACH_UNBRANDED_3GN) += mach-noname-3gn.o obj-$(CONFIG_RT305X_MACH_NW718) += mach-nw718.o obj-$(CONFIG_RT305X_MACH_PWH2004) += mach-pwh2004.o obj-$(CONFIG_RT305X_MACH_RT_G32_REVB) += mach-rt-g32-revb.o obj-$(CONFIG_RT305X_MACH_V22RW_2X2) += mach-v22rw-2x2.o obj-$(CONFIG_RT305X_MACH_WCR150GN) += mach-wcr150gn.o obj-$(CONFIG_RT305X_MACH_WHR_G300N) += mach-whr-g300n.o + diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-noname-3gn.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-noname-3gn.c new file mode 100644 index 000..b9a5b2b --- /dev/null +++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-noname-3gn.c @@ -0,0 +1,149 @@ +/* + * Unbranded router from DX board support + * (http://www.dealextreme.com/p/portable-wireless-n-3g-router-cdma2000-evdo-td-scdma-hspa-wcdma-45639) + * This router is also known to be rebranded and sold by a number of local vendors + * in several countries. + * + * Copyright (C) 2011 Andrew Andrianov necrom...@necromant.ath.cx + * Based on MOFI3500-3N code by + * Copyright (C) 2011 Layne Edwards ledward...@gmail.com + * + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include linux/init.h +#include linux/platform_device.h +#include linux/mtd/mtd.h +#include linux/mtd/partitions.h +#include linux/mtd/physmap.h + +#include asm/mach-ralink/machine.h +#include asm/mach-ralink/dev-gpio-buttons.h +#include asm/mach-ralink/dev-gpio-leds.h +#include asm/mach-ralink/rt305x.h +#include asm/mach-ralink/rt305x_regs.h + +#include devices.h + + +#define UNBRADED_3GN_GPIO_LED_3G 9 +#define UNBRADED_3GN_GPIO_LED_GATEWAY 11 +#define UNBRADED_3GN_GPIO_LED_AP 12 +#define UNBRADED_3GN_GPIO_LED_STATION 13 +#define UNBRADED_3GN_GPIO_LED_WPS 14 + +#define
[OpenWrt-Devel] [PATCH][RT305X] Fix dwc_otg compilation bug with newer kernel
Required to compile dwc_otg with newer 2.6.39 kernel Prerequirements: All Layne Edwards' dwc_otg patches applied. Signed-off-by: Andrew 'Necromant' Andrianov necrom...@necromant.ath.cx Regards, Andrewdiff --git a/target/linux/ramips/files/drivers/usb/dwc_otg/dwc_otg_hcd.c b/target/linux/ramips/files/drivers/usb/dwc_otg/dwc_otg_hcd.c index e3e3ee8..77e8a89 100644 --- a/target/linux/ramips/files/drivers/usb/dwc_otg/dwc_otg_hcd.c +++ b/target/linux/ramips/files/drivers/usb/dwc_otg/dwc_otg_hcd.c @@ -52,6 +52,8 @@ #include asm/mach-ralink/lm.h +#define bitmap u.hs.DeviceRemovable + #include dwc_otg_driver.h #include dwc_otg_hcd.h #include dwc_otg_regs.h ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 1/1] alix2: upstream platform patch
Add support for Ed Wildgoose's alix platform driver plus my enhancement to add GPIO soft button support. Redux: fix parameters for gpio_keys, add hotplug button script. Signed-off-by: Philip Prindeville phil...@redfish-solutions.com Index: target/linux/generic/patches-2.6.39/041-alix_platform.patch === --- target/linux/generic/patches-2.6.39/041-alix_platform.patch (revision 0) +++ target/linux/generic/patches-2.6.39/041-alix_platform.patch (revision 0) @@ -0,0 +1,502 @@ +From: Ed Wildgoose g...@wildgooses.com +Date: Wed, 3 Aug 2011 00:52:36 + (+1000) +Subject: This new driver replaces the old PCEngines Alix 2/3 LED driver with a new +X-Git-Tag: next-20110812~1^2~75 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git;a=commitdiff_plain;h=2cd7b3e8f8078c214c93a2c60cb845500c92df4a;hp=dc849eae35bbf651ab3ee459f5683e1ff780413d + +This new driver replaces the old PCEngines Alix 2/3 LED driver with a new +driver that controls the LEDs through the leds-gpio driver. The old +driver accessed GPIOs directly, which created a conflict and prevented +also loading the cs5535-gpio driver to read other GPIOs on the Alix board. + With this new driver, we hook into leds-gpio which in turn uses GPIO to +control the LEDs and therefore it's possible to control both the LEDs and +access onboard GPIOs + +Driver is moved to platform/geode and any other geode initialisation +modules should move here also. + +This driver is inspired by leds-net5501.c by Alessandro Zummo. + +Ideally, leds-net5501.c should also be moved to platform/geode. +Additionally the driver relies on parts of the patch: 7f131cf3ed (leds: +leds-alix2c - take port address from MSR) by Daniel Mack to perform +detection of the Alix board. + +Signed-off-by: Ed Wildgoose ker...@wildgooses.com +Cc: Alessandro Zummo a.zu...@towertech.it +Cc: Daniel Mack dan...@caiaq.de +Reviewed-by: Grant Likely grant.lik...@secretlab.ca +Cc: Ingo Molnar mi...@elte.hu +Cc: Thomas Gleixner t...@linutronix.de +Cc: H. Peter Anvin h...@zytor.com +Cc: Richard Purdie rpur...@rpsys.net +Signed-off-by: Andrew Morton a...@linux-foundation.org +--- + +diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig +index f1833e3..d18e7a2 100644 +--- a/arch/x86/Kconfig b/arch/x86/Kconfig +@@ -2073,6 +2073,20 @@ config OLPC_XO15_SCI + - AC adapter status updates + - Battery status updates + ++config ALIX ++ bool PCEngines ALIX System Support (LED setup) ++ select GPIOLIB ++ ---help--- ++This option enables system support for the PCEngines ALIX. ++At present this just sets up LEDs for GPIO control on ++ALIX2/3/6 boards. However, other system specific setup should ++get added here. ++ ++Note: You must still enable the drivers for GPIO and LED support ++(GPIO_CS5535 LEDS_GPIO) to actually use the LEDs ++ ++Note: You have to set alix.force=1 for boards with Award BIOS. ++ + endif # X86_32 + + config AMD_NB +diff --git a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile +index 021eee9..8d87439 100644 +--- a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile +@@ -1,6 +1,7 @@ + # Platform specific code goes here + obj-y += ce4100/ + obj-y += efi/ ++obj-y += geode/ + obj-y += iris/ + obj-y += mrst/ + obj-y += olpc/ +diff --git a/arch/x86/platform/geode/Makefile b/arch/x86/platform/geode/Makefile +new file mode 100644 +index 000..07c9cd0 +--- /dev/null b/arch/x86/platform/geode/Makefile +@@ -0,0 +1 @@ ++obj-$(CONFIG_ALIX)+= alix.o +diff --git a/arch/x86/platform/geode/alix.c b/arch/x86/platform/geode/alix.c +new file mode 100644 +index 000..f3f01e2 +--- /dev/null b/arch/x86/platform/geode/alix.c +@@ -0,0 +1,141 @@ ++/* ++ * System Specific setup for PCEngines ALIX. ++ * At the moment this means setup of GPIO control of LEDs ++ * on Alix.2/3/6 boards. ++ * ++ * ++ * Copyright (C) 2008 Constantin Baranov co...@mimas.ru ++ * Copyright (C) 2011 Ed Wildgoose ker...@wildgooses.com ++ * ++ * TODO: There are large similarities with leds-net5501.c ++ * by Alessandro Zummo a.zu...@towertech.it ++ * In the future leds-net5501.c should be migrated over to platform ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 ++ * as published by the Free Software Foundation. ++ */ ++ ++#include linux/kernel.h ++#include linux/init.h ++#include linux/io.h ++#include linux/string.h ++#include linux/leds.h ++#include linux/platform_device.h ++#include linux/gpio.h ++ ++#include asm/geode.h ++ ++static int force = 0; ++module_param(force, bool, 0444); ++/* FIXME: Award bios is not automatically detected as Alix platform */ ++MODULE_PARM_DESC(force, Force detection as ALIX.2/ALIX.3 platform); ++ ++static struct gpio_led alix_leds[] = { ++ { ++ .name = alix:1, ++ .gpio = 6, ++
[OpenWrt-Devel] [RT305X] dwc_otg question.
Hello, all I've just patched the latest kernel to work with dwc_otg driver, thanks to Layne Edwards' patches. Everything works fine except one: I'm getting high CPU loads and unresponsiveness when a 3g modem is plugged into a usb 2.0 hub, which, in turn, is plugged into the router. Bringing up ppp connection and sending AT commands back and forth on the second virtual ttyUSB causes hangups and watchdog reboots. Logging in via ssh is sometimes impossible when 3g is up: dropbear eats up about 60% CPU and does nothing. Typing reboot will never reboot the system, unless you take of all usb devices: it just hangs bringing down loopback interface. Setting pti_enable module parameter to 1 helps a little, but it's still mostly unusable. However, when I plug the modem directly in the router... Everything works fine, incl. proper reboots. Is that likely a bug dwc_otg or just a broken hub ?(works fine on my desktop, though) I'll try to get a hub on different chipset tomorrow and post the results. USB descriptor dumps of the hub follow: necromant@ilwyn:~$ sudo lsusb -vv -s 2:10 [sudo] password for necromant: Bus 002 Device 010: ID 1a40:0101 TERMINUS TECHNOLOGY INC. USB-2.0 4-Port HUB Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 1 Single TT bMaxPacketSize064 idVendor 0x1a40 TERMINUS TECHNOLOGY INC. idProduct 0x0101 USB-2.0 4-Port HUB bcdDevice1.11 iManufacturer 0 iProduct1 USB 2.0 Hub iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes3 Transfer TypeInterrupt Synch Type None Usage Type Data wMaxPacketSize 0x0001 1x 1 bytes bInterval 12 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 4 wHubCharacteristic 0x Ganged power switching Ganged overcurrent protection TT think time 8 FS bits bPwrOn2PwrGood 50 * 2 milli seconds bHubContrCurrent100 milli Ampere DeviceRemovable0x00 PortPwrCtrlMask0xff Hub Port Status: Port 1: .0503 highspeed power enable connect Port 2: .0100 power Port 3: .0100 power Port 4: .0100 power Device Qualifier (for other device speed): bLength10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 0 Full speed (or root) hub bMaxPacketSize064 bNumConfigurations 1 Device Status: 0x0001 Self Powered ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] PATCH: Buffalo WZR-HP-G300NH2 support
The following patch adds preliminary support for the Buffalo WZR-HP-G300NH2. Here is the current state: * Ethernet switch (AR8316) is functional. eth1 is not connected, so the WAN port is simulated using a vlan. * pci wlan (AR9280 Rev:2), is functional. * flash, obviously, is functional. It is nearly identical to the setup used in the AG300H and the code could easily be shared between the two. * GPIO switches, except for the AOSS button * A single LED, the diagnostic button, is functional. * USB is functional The other LEDs and possibly the AOSS button are connected to GPIOs of the wireless mac. nbd kindly offered to look into exposing the ath9k GPIOs so that we can have a complete GPIO implementation. Many thanks to KanjiMonster and nbd for helping me find my way through the OpenWRT source. This patch applies cleanly to r28009. Boot log: http://pastebin.com/SVzMn1gi Please let me know if there is anything which I have overlooked. -M Index: target/linux/ar71xx/files/arch/mips/ar71xx/Makefile === --- target/linux/ar71xx/files/arch/mips/ar71xx/Makefile (revision 28009) +++ target/linux/ar71xx/files/arch/mips/ar71xx/Makefile (working copy) @@ -63,5 +63,6 @@ obj-$(CONFIG_AR71XX_MACH_WRT160NL) += mach-wrt160nl.o obj-$(CONFIG_AR71XX_MACH_WRT400N) += mach-wrt400n.o obj-$(CONFIG_AR71XX_MACH_WZR_HP_G300NH) += mach-wzr-hp-g300nh.o +obj-$(CONFIG_AR71XX_MACH_WZR_HP_G300NH2) += mach-wzr-hp-g300nh2.o obj-$(CONFIG_AR71XX_MACH_WZR_HP_AG300H) += mach-wzr-hp-ag300h.o obj-$(CONFIG_AR71XX_MACH_ZCN_1523H) += mach-zcn-1523h.o Index: target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h === --- target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h (revision 28009) +++ target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h (working copy) @@ -64,6 +64,7 @@ AR71XX_MACH_WRT400N, /* Linksys WRT400N */ AR71XX_MACH_WZR_HP_AG300H, /* Buffalo WZR-HP-AG300H */ AR71XX_MACH_WZR_HP_G300NH, /* Buffalo WZR-HP-G300NH */ + AR71XX_MACH_WZR_HP_G300NH2, /* Buffalo WZR-HP-G300NH2 */ AR71XX_MACH_EAP7660D, /* Senao EAP7660D */ AR71XX_MACH_ZCN_1523H_2, /* Zcomax ZCN-1523H-2-xx */ AR71XX_MACH_ZCN_1523H_5, /* Zcomax ZCN-1523H-5-xx */ Index: target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig === --- target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig (revision 28009) +++ target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig (working copy) @@ -154,6 +154,16 @@ select RTL8366_SMI default y +config AR71XX_MACH_WZR_HP_G300NH2 + bool Buffalo WZR-HP-G300NH2 board support + select SOC_AR724X + select AR71XX_DEV_M25P80 + select AR71XX_DEV_GPIO_BUTTONS + select AR71XX_DEV_AP91_PCI if PCI + select AR71XX_DEV_LEDS_GPIO + select AR71XX_DEV_USB + default y + config AR71XX_MACH_WP543 bool Compex WP543/WPJ543 board support select SOC_AR71XX Index: target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh2.c === --- target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh2.c (revision 0) +++ target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh2.c (revision 0) @@ -0,0 +1,221 @@ +/* + * Buffalo WZR-HP-G300NH2 board support + * + * Copyright (C) 2011 Felix Fietkau n...@openwrt.org + * Copyright (C) 2011 Mark Deneen mden...@gmail.com + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include linux/platform_device.h +#include linux/mtd/mtd.h +#include linux/mtd/partitions.h +#include linux/mtd/concat.h + +#include asm/mips_machine.h +#include asm/mach-ar71xx/ar71xx.h +#include asm/mach-ar71xx/gpio.h + +#include machtype.h +#include devices.h +#include dev-ap91-pci.h +#include dev-gpio-buttons.h +#include dev-leds-gpio.h +#include dev-m25p80.h +#include dev-usb.h + + +#define WZRHPG300NH2_MAC_OFFSET 0x20c +#define WZRHPG300NH2_KEYS_POLL_INTERVAL 20 /* msecs */ +#define WZRHPG300NH2_KEYS_DEBOUNCE_INTERVAL (3 * WZRHPG300NH2_KEYS_POLL_INTERVAL) + +#ifdef CONFIG_MTD_PARTITIONS +static struct mtd_partition wzrhpg300nh2_flash_partitions[] = { + { + .name = u-boot, + .offset = 0, + .size = 0x004, + .mask_flags = MTD_WRITEABLE, + }, { + .name = u-boot-env, + .offset = 0x004, + .size = 0x001, + .mask_flags = MTD_WRITEABLE, + }, { + .name = art, + .offset = 0x005, + .size = 0x001, + .mask_flags = MTD_WRITEABLE, + }, { + .name = kernel, + .offset = 0x006, + .size = 0x010, + }, { + .name = rootfs, + .offset = 0x016, + .size = 0x1e9, + }, { + .name = user_property, + .offset = 0x1ff, + .size = 0x001, + .mask_flags = MTD_WRITEABLE, + }, { + .name = firmware, + .offset = 0x006, + .size = 0x1f9, + } +}; + +#endif /*
[OpenWrt-Devel] Kernel Modules not copying over.
Hi all, With the latest trunk version when i used make kernel_menuconfig and enable couple module using M to be dynamic i don't see these modules copying over to /lib/module/2.6.39.2 folder any idea why is not working? I known this uses to work about 2 years ago. Thanks, Pawel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [RT305X] dwc_otg question.
On Tue, 16 Aug 2011 22:51:26 +0400, Andrew wrote: Hello, all I've just patched the latest kernel to work with dwc_otg driver, thanks to Layne Edwards' patches. Everything works fine except one: I'm getting high CPU loads and unresponsiveness when a 3g modem is plugged into a usb 2.0 hub, which, in turn, is plugged into the router. Bringing up ppp connection and sending AT commands back and forth on the second virtual ttyUSB causes hangups and watchdog reboots. Logging in via ssh is sometimes impossible when 3g is up: dropbear eats up about 60% CPU and does nothing. Typing reboot will never reboot the system, unless you take of all usb devices: it just hangs bringing down loopback interface. Setting pti_enable module parameter to 1 helps a little, but it's still mostly unusable. However, when I plug the modem directly in the router... Everything works fine, incl. proper reboots. Is that likely a bug dwc_otg or just a broken hub ?(works fine on my desktop, though) I'll try to get a hub on different chipset tomorrow and post the results. USB descriptor dumps of the hub follow: necromant@ilwyn:~$ sudo lsusb -vv -s 2:10 [sudo] password for necromant: Bus 002 Device 010: ID 1a40:0101 TERMINUS TECHNOLOGY INC. USB-2.0 4-Port HUB Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 1 Single TT bMaxPacketSize0 64 idVendor 0x1a40 TERMINUS TECHNOLOGY INC. idProduct 0x0101 USB-2.0 4-Port HUB bcdDevice 1.11 iManufacturer 0 iProduct 1 USB 2.0 Hub iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0001 1x 1 bytes bInterval 12 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 4 wHubCharacteristic 0x Ganged power switching Ganged overcurrent protection TT think time 8 FS bits bPwrOn2PwrGood 50 * 2 milli seconds bHubContrCurrent 100 milli Ampere DeviceRemovable 0x00 PortPwrCtrlMask 0xff Hub Port Status: Port 1: .0503 highspeed power enable connect Port 2: .0100 power Port 3: .0100 power Port 4: .0100 power Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 0 Full speed (or root) hub bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0001 Self Powered Andrew, I haven't done much testing with the dwc otg driver and an external hub. I have a few hubs, and I will do some testing. I'm interested to see your results as well. Is your 3G modem perhaps an USB 1.1 device? If so, you may want to use a multi-TT hub for best performance. Regards, Layne ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PATCH: Buffalo WZR-HP-G300NH2 support
On 2011-08-16 11:51 AM, Mark Deneen wrote: The following patch adds preliminary support for the Buffalo WZR-HP-G300NH2. Here is the current state: * Ethernet switch (AR8316) is functional. eth1 is not connected, so the WAN port is simulated using a vlan. * pci wlan (AR9280 Rev:2), is functional. * flash, obviously, is functional. It is nearly identical to the setup used in the AG300H and the code could easily be shared between the two. * GPIO switches, except for the AOSS button * A single LED, the diagnostic button, is functional. * USB is functional The other LEDs and possibly the AOSS button are connected to GPIOs of the wireless mac. nbd kindly offered to look into exposing the ath9k GPIOs so that we can have a complete GPIO implementation. Many thanks to KanjiMonster and nbd for helping me find my way through the OpenWRT source. This patch applies cleanly to r28009. Boot log: http://pastebin.com/SVzMn1gi Please let me know if there is anything which I have overlooked. Looks mostly fine to me on a first quick look (aside from some whitespace vs tab issues). Before we accept this, I want to split out the mtd concat code from WZR-HP-AG300H, so that the mach file for this device can share it without adding more unnecessary code duplication. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Kernel Modules not copying over.
Hi Pawel, this is an intended behavior of OpenWrt. You should not select something to be build as an module in make kernel_menuconfig. all modules should be build by a kmod package in packages/kernel/modules/. The modules build in a kmod package are added into the /lib/module/uname -r directory if the package is installed or if it is directly included into the firmware. If you need some kernel module do make menuconfig and select it if it is there or add a module to packages/kernel/modules/. Hauke On 08/16/2011 09:42 PM, Pawel Pastuszak wrote: Hi all, With the latest trunk version when i used make kernel_menuconfig and enable couple module using M to be dynamic i don't see these modules copying over to /lib/module/2.6.39.2 http://2.6.39.2 folder any idea why is not working? I known this uses to work about 2 years ago. Thanks, Pawel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Add support for a noname router from DX
Hi Andrew, This patch adds full support for this router: http://www.dealextreme.com/p/portable-wireless-n-3g-router-cdma2000-evdo-td-scdma-hspa-wcdma-45639 This is a resubmit of my previous patch against current trunk. I have adjusted mtd partitioning so that built-in dwc_otgusb would fit in and cleaned up some unneeded stuff. Patch attached. The patch looks good. However 'Unbranded-3G' is not a descriptive name, and the router has a model number: WS-WR512N1. See the label on the back of the device: http://www.dealextreme.com/photogallery.dx/sku.45639~seQ.2 Please replace the 'unbranded' stuff with something according to the model number, and resubmit the patch. Thanks, Gabor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH][RT305X] Fix dwc_otg compilation bug with newer kernel
2011.08.16. 18:49 keltezéssel, Andrew írta: Required to compile dwc_otg with newer 2.6.39 kernel Prerequirements: All Layne Edwards' dwc_otg patches applied. A modified version of Layne Edwards' patches are in the OpenWrt repository already [1], and the driver compiles for 2.6.39 as-is. Regards, Gabor 1. https://dev.openwrt.org/changeset/27997 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Kernel Modules not copying over.
Hi Hauke, sorry for snatching in. If you need some kernel module do make menuconfig and select it if it is there or add a module to packages/kernel/modules/. Hauke So what would be the most convenient way to submit changes (i.e. patches) in packages/kernel/modules/ ? This mailing list, or opening a ticket, or anything else? It happened that I created a patch in i2c.mk about 2 months ago and submitted it on june 22nd in this mailing list. I also opened a ticket with the patch attached, about a week later. So far both without any progress. I don't want to be annoying, I know developers are quite busy. Just thought, since you mentioned this topic, I might get a hint how to get such patches applied. Take care Hartmut ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Buffalo WHR-HP-G300N initial support
The initial support for the Buffalo WHR-HP-G300N box. The code was confirmed to boot and run, but not tested in depth. Known problem: iw phy phy0 info shows: Coverage class: 0 (up to 0m) Available Antennas: TX 0 RX 0 Signed-off-by: Yoichi Shinoda shin...@jaist.ac.jp --- Index: target/linux/ar71xx/files/arch/mips/ar71xx/mach-whr-hp-g300n.c === --- target/linux/ar71xx/files/arch/mips/ar71xx/mach-whr-hp-g300n.c (revision 0) +++ target/linux/ar71xx/files/arch/mips/ar71xx/mach-whr-hp-g300n.c (revision 0) @@ -0,0 +1,171 @@ +/* + * Buffalo WHR-HP-G300N board support + * + * based on ... + * + * TP-LINK TL-WR741ND board support + * + * Copyright (C) 2009-2010 Gabor Juhos juh...@openwrt.org + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include linux/mtd/mtd.h +#include linux/mtd/partitions.h + +#include asm/mach-ar71xx/ar71xx.h + +#include machtype.h +#include devices.h +#include dev-m25p80.h +#include dev-ap91-pci.h +#include dev-gpio-buttons.h +#include dev-leds-gpio.h + +#defineWHRHPG300N_GPIO_LED_SECURITY0 +#defineWHRHPG300N_GPIO_LED_DIAG1 +#defineWHRHPG300N_GPIO_LED_ROUTER 6 + +#defineWHRHPG300N_GPIO_BTN_ROUTER_ON 7 +#defineWHRHPG300N_GPIO_BTN_ROUTER_AUTO 8 +#defineWHRHPG300N_GPIO_BTN_RESET 11 +#defineWHRHPG300N_GPIO_BTN_AOSS12 + +#defineWHRHPG300N_KEYS_POLL_INTERVAL 20 /* msecs */ +#define WHRHPG300N_KEYS_DEBOUNCE_INTERVAL (3 * WHRHPG300N_KEYS_POLL_INTERVAL) + +#define WHRHPG300N_MAC_OFFSET 0x20c + +#ifdef CONFIG_MTD_PARTITIONS +static struct mtd_partition whrhpg300n_partitions[] = { + { + .name = u-boot, + .offset = 0, + .size = 0x03e000, + .mask_flags = MTD_WRITEABLE, + }, { + .name = u-boot-env, + .offset = 0x03e000, + .size = 0x002000, + }, { + .name = kernel, + .offset = 0x04, + .size = 0x0e, + }, { + .name = rootfs, + .offset = 0x12, + .size = 0x2c, + }, { + .name = NVRAM, + .offset = 0x3e, + .size = 0x01, + }, { + .name = ART, + .offset = 0x3f, + .size = 0x01, + .mask_flags = MTD_WRITEABLE, + }, { + .name = firmware, + .offset = 0x04, + .size = 0x3a, + } +}; +#endif /* CONFIG_MTD_PARTITIONS */ + +static struct flash_platform_data whrhpg300n_flash_data = { +#ifdef CONFIG_MTD_PARTITIONS + .parts = whrhpg300n_partitions, + .nr_parts = ARRAY_SIZE(whrhpg300n_partitions), +#endif +}; + +static struct gpio_led whrhpg300n_leds_gpio[] __initdata = { + { + .name = whr_hp_g300n:orange:security, + .gpio = WHRHPG300N_GPIO_LED_SECURITY, + .active_low = 1, + }, { + .name = whr_hp_g300n:red:diag, + .gpio = WHRHPG300N_GPIO_LED_DIAG, + .active_low = 1, + }, { + .name = whr_hp_g300n:green:router, + .gpio = WHRHPG300N_GPIO_LED_ROUTER, + .active_low = 1, + } +}; + +static struct gpio_keys_button whrhpg300n_gpio_keys[] __initdata = { + { + .desc = reset, + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = WHRHPG300N_KEYS_DEBOUNCE_INTERVAL, + .gpio = WHRHPG300N_GPIO_BTN_RESET, + .active_low = 1, + }, { + .desc = aoss/wps, + .type = EV_KEY, + .code = KEY_WPS_BUTTON, + .gpio = WHRHPG300N_GPIO_BTN_AOSS, + .debounce_interval = WHRHPG300N_KEYS_DEBOUNCE_INTERVAL, + .active_low = 1, + }, { + .desc = router_on, + .type = EV_KEY, + .code = BTN_2, + .gpio = WHRHPG300N_GPIO_BTN_ROUTER_ON, + .debounce_interval = WHRHPG300N_KEYS_DEBOUNCE_INTERVAL, + .active_low = 1, + }, { + .desc = router_auto, + .type =
Re: [OpenWrt-Devel] [RT305X] dwc_otg question.
On Tue, 16 Aug 2011 16:15:19 -0500, Layne Edwards ledwa...@astrumtech.net wrote: Andrew, I haven't done much testing with the dwc otg driver and an external hub. I have a few hubs, and I will do some testing. I'm interested to see your results as well. Is your 3G modem perhaps an USB 1.1 device? If so, you may want to use a multi-TT hub for best performance. Regards, Layne That's funny. I've popped in an old 1.1 hub instead of a newer one... And guess what: everything works flawlessly. Unfortunately, the only 2.0 hubs i have here are based on the same chip, so I can't tell if it's the hub or dwc_otg that's buggy. As the last test I've popped the modem in 1.1 hub in it, in turn, to the 2.0 hub... And again everything worked fine. I'll test some different hubs once I get to the lab this weekend (Hopefully theyare on a different chip). What conserns the modem - it's a qualcom-based modem vendor=0x5c6 product=0x15 Here goes a descriptor dump: Bus 007 Device 005: ID 05c6:0015 Qualcomm, Inc. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 idVendor 0x05c6 Qualcomm, Inc. idProduct 0x0015 bcdDevice0.00 iManufacturer 1 Qualcomm, Incorporated iProduct2 Qualcomm CDMA Technologies MSM iSerial 3 Data Interface bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 108 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber2 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk (Zip) iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x08 EP 8 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber3 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol255 Vendor Specific Protocol iInterface 3 Data Interface Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes3 Transfer TypeInterrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 128 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol255 Vendor Specific Protocol iInterface 3 Data Interface Endpoint Descriptor: bLength 7 bDescriptorType 5