[OpenWrt-Devel] Problem with ath9k, mac80211 modules becoming permanent after couple of insmod/rmmod
hi, I have kept a modified mac80211.ko, ath9k.ko file in /lib/modules/temp/ . I am using Backfire [Openwrt] for development. And I want to use these while I run some of my userland code (which automates the task of unloading old modules and inserting the new ones) . It seems that for first time, when I do : rm mac80211 rm ath9k insmod /lib/modules/temp/mac80211.ko insmod /lib/modules/temp/ath9k.ko Everything is fine but when I redo opkg install my package in Openwrt 2 times, the ath9k, mac80211 kernel modules start showing [permanent] in the lsmod output and hence cannot be unloaded. lsmod output : ath9k 87776 0 [permanent] ath9k_common1216 1 ath9k ath9k_hw 338448 2 ath9k,ath9k_common ath14224 3 ath9k,ath9k_common,ath9k_hw mac80211 230400 1 ath9k,[permanent] Can someone please tell me what goes wrong ? (2) I am unable to uninstall the modified module( I think its modified one) as it becomes permanent. I don't see modprobe showing the path of the currently running module in Openwrt, is there some other way to find the path ? -Abhinav Narain ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Usage of skb control buffer in ath9k mac layer
hi, I have upgraded from trunk (aug built) to backfire. I was getting the rssi value, length of the mpdu captured etc from the driver to mac80211 using the control buffer. mac80211 version i was using before( compat-wireless-2011-08-26) had enough unused bytes to get all of this, but the mac80211 version used in backfire (or the one i am using with backfire) has all the bytes already used. In this case, how will it be possible to get the data from ath9k driver to mac80211 subsystem. Also, I wanted to know what are the fields u8 chains; s8 chain_signal[4]; used by the version compat-wireless-2011-11-15 indicating ? I don't see them being printed in iw output also ? Can someone please help. -Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] finding module dependencies.
thanks, I will try that. Abhinav On Tue, Mar 20, 2012 at 10:52 PM, Philip Prindeville philipp_s...@redfish-solutions.com wrote: On 3/20/12 5:56 PM, abhinav narain wrote: hi, I am modifying mac80211. but when I reboot the router, I get a set of erros which is due to module dependencies. lsmod shows : ath9k as the only dependency and I am removing the module before inserting the modified mac80211 module. The only other way I to fix this is to remove all the modules before inserting the modified mac80211 module. But the problem is lsmod shows only the number of modules which are dependent on a particular module than showing the listing also (for few entries) and I am not able to figure out which are these modules. Can someone please help to find out how to fix this Try adding: CONFIG_BUSYBOX_CONFIG_MODINFO=y to your config, rebuilt and reboot. Then try modinfo modname to see what its dependencies are. ___ 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] finding module dependencies.
hi, I am modifying mac80211. but when I reboot the router, I get a set of erros which is due to module dependencies. lsmod shows : ath9k as the only dependency and I am removing the module before inserting the modified mac80211 module. The only other way I to fix this is to remove all the modules before inserting the modified mac80211 module. But the problem is lsmod shows only the number of modules which are dependent on a particular module than showing the listing also (for few entries) and I am not able to figure out which are these modules. Can someone please help to find out how to fix this ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] logging the number of retransmissions at mac layer
hi, I am working on openwrt main trunk (frozen in ~aug) I am trying to get the stats about number of retransmissions at mac layer from ath9k drivers but I can't get where to look for.. The information is not given by debugfs. I looked at iw code which uses netlink interface, but couldn't actually get what it was doing. Can someone give hints/idea ? Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] using systemtap
hi, I can't find package for systemtap for OpenWrt, is it available ? I looked at trunk and Kamikaze but were not present in packages folder. I am working on a copy of trunk (~august build), currently. I couldn't find any docs related to it, any comments ? Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] listening 80211 n beacons on netgear router
hi, I have been running Openwrt router (netgear). I have used the command : iw phy phy1 set channel 40 ht40+/ht40-/ht20 But I have not been able to hear n beacons. Is it that tcpdump can't decipher n beacons ? I went through code and saw PRINT_HT_RATES and ieee80211_htrates[] are defined. Though in the function print_chaninfo, there are only, a,b ,g taken care of ? How can I get to know a beacon is of n protocol ? Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] problem with phyX interface
hi, At many times, I set the phy0 interface on the router and on running tcpdump or my sniffer on it, gives me the following error : phy0: That device is not up How should i get rid of this error, for final deployment of my tool, as the interface fails even after creation using iw command. Kindly help, Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Problem connecting to ath9k driver using ioctl call
hi, I make an ioctl call with SIOCGIWPRIV and it fails. I have included : #includelinux/wireless.h The pcap code makes the same call to the driver in enter_rfmon_mode_wext() defined in pcap-linux.c for sniffing. The compat-wireless-2011-08-10 driver has the header file in compat../include/linux/wireless.h My ioctl call to the driver FAILS ! Also, if this is defined in the compat folder, I am sure this should work with ath9k driver...else it won't be defined in wireless.h ? I can't find how pcap is using the same call to the driver and able to sniff. ioctl call with SIOCGIWPRIV parameter works i guess with pcap. The ioctl call with SIOCIWFIRSTPRIV also fails. Can someone please suggest what I should be doing to make this call work ? My goal is to read the radiotap headers and the rest of the headers using raw sockets. I am not familiar with netlink interface and can see pcap can read the information without using it, hence I am interested in using ioctl calls. Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] calling ioctl with SIOCGIWPRIV parameter; sniffing on monitor mode
hi, I am using netgear routers. model: WNDR3700v2 I want to set the wireless interface (ath9k) in monitor mode to sniff the traffic. I am doing the following : 1. Opening a raw socket socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)) 2. making the following ioctl call to connect to device. Device is mon.wlan0 ( wlan in monitor mode, hostap uses this) ioctl(in_fd, SIOCGIFINDEX, ifr) ; 3. binding the socket struct sockaddr_ll sll; memset(sll, 0, sizeof(sll)); sll.sll_family= AF_PACKET; sll.sll_ifindex = ifr.ifr_ifindex; sll.sll_protocol = htons(ETH_P_ALL); if (0 bind(in_fd, (struct sockaddr *) sll, sizeof(sll) 4. setting the following options setsockopt(in_fd, SOL_SOCKET, SO_RCVBUF, skbsz, sizeof(skbsz)) getsockopt(in_fd, SOL_SOCKET, SO_RCVBUF, skbsz, (socklen_t*)skbsz_l) setsockopt(in_fd, SOL_SOCKET, SO_RCVTIMEO, rto, sizeof(rto) Checking tcpdump and later *pcap library *reveals they also call ioctil with the following parameter SIOCGIWPRIV . On execution of the program, i get an error that device does not support private calls. The same happen when I do an ioctl call with SIOCIWFIRSTPRIV. When I ignore making these two calls, I am getting results different from tcpdump. Can someone hint on : 1.Why they are failing ? and how to fix them ? 2. Are they necessary to set the mode in monitor mode ? 3. Any other calls I should be making ? Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] radiotap headers length
hi, I am sniffing in monitor mode on a netgear WNDR3700v2 router. I am reading from a raw socket in monitor mode. But I cannot make sense of the data, as there are variable length radiotap headers, variable length mac headers. I found out these going through pcap code. 1. Can someone tell if Atheros has a defined header length for radio tap headers ? 2. Assuming Mac header is just after radiotap header. Will it be right to assume, all the data packets will have 30 byte length and management packets 24 bytes of Mac header length ? Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] calling ioctl with SIOCGIWPRIV parameter; sniffing on monitor mode
hi, Ok. I will look into iw. I am wondering how does pcap sniff on Atheros driver then ? On Wed, Nov 16, 2011 at 1:55 PM, Jo-Philipp Wich x...@subsignal.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, SIOCGIWPRIV is part of the deprecated wext api which is not fully supported by ath9k. Use nl80211. See wireless.kernel.org for details, also check the source code of the iw utility. ~ Jow -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7EBzIACgkQdputYINPTPM5wQCfZSchjO6rK6CveGSeCvCMM7aK 8gIAoJWvAiuFc1MuVOP68+xKaCgJQOuf =+VaH -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
[OpenWrt-Devel] modifying sk_buff
hi, I am trying to add a header in driver ath9k. I am doing it by adding the header by using skb_put(..) and increment the skb-data pointer. Then adding the usual skb content after it by using skb_put(). I finally call netif_rx() to push the skb to upper layers, and can see a notification that it is executing. But when I read the data in user space by opening a raw socket on phy1 ( using iw phy phy1interface type monitor) which is setting wlan1 to monitor mode, I dont see the default values i am setting in sk_buff. I am doing all this in ath_rx_tasklet() in recv.c in compat../drivers/ ...ath9k. I have a doubt. ath_rx_tasklet() calls the function ieee80211_rx() is called, which calls ieee80211_rx_monitor() which in documentation says returns a clean skb without radiotap headers. Is it that my header are removed by this ieee80211_rx_monitor() ? I am turning the* is_monitoring *flag to true in the driver, so will this function affect the addition of extra headers in sk_buff ? Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] modifying sk_buff
When I comment the call to ieee80211_rx_monitor() in ieee80211_rx() and recompile the driver, my router keeps rebooting. On Fri, Nov 11, 2011 at 8:56 PM, abhinav narain abhinavnarai...@gmail.comwrote: hi, I am trying to add a header in driver ath9k. I am doing it by adding the header by using skb_put(..) and increment the skb-data pointer. Then adding the usual skb content after it by using skb_put(). I finally call netif_rx() to push the skb to upper layers, and can see a notification that it is executing. But when I read the data in user space by opening a raw socket on phy1 ( using iw phy phy1interface type monitor) which is setting wlan1 to monitor mode, I dont see the default values i am setting in sk_buff. I am doing all this in ath_rx_tasklet() in recv.c in compat../drivers/ ...ath9k. I have a doubt. ath_rx_tasklet() calls the function ieee80211_rx() is called, which calls ieee80211_rx_monitor() which in documentation says returns a clean skb without radiotap headers. Is it that my header are removed by this ieee80211_rx_monitor() ? I am turning the* is_monitoring *flag to true in the driver, so will this function affect the addition of extra headers in sk_buff ? Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] printk() and browser
The following errors (o/p of dmesg) iptable_raw:Unknow symbol xt_hook_link (err 0) iptable_raw:Unknow symbol ipt_alloc_initial_table (err 0) iptable_raw:Unknow symbol xt_hook_unlink (err 0) xt_NOTRACK: Unknow symbol xt_register_target (err 0) xtconntrack: Unknown symbol xt_register_match(err0) xtconntrack: Unknown symbol xt_unregister_match(err0) How do you expect that someone would be able to help you when you don't specify: * Your hardware (box vendor, box model, hw revision, e.t.c.). Vendor : Netgear Box Model : wndr3700v2 * Type and version of the firmware you use. Is it at least OpenWRT? If is it then do you use pre-compiled image downloaded from somewhere/someone? If you're building it yourself - do you use released version of OpenWRT of stick with SVN trunk? What build configuration do you use? I am using OpenWrt . Checking out from git repo. * You wrote that you're modifying the driver for past few days. What is the driver you're modifying? What are your goals? Why do you wand to modify something? I am modifying ath9k driver, of Atheros. Goals: I want to add some data in sk_buff in driver and retrieve it in userspace. * You wrote that you can't connect to internet. I assume that you're trying to connect to the internet using the router with the firmware you have built containing some modifications to some unspecified driver. Is that a case? yes. modifications to the ath9k driver. * What are the exact symptoms of can't connect to internet? Had you tried to ssh/telnet into the box and diagnose the connection problems from there? I tried ssh. * You wrote that I am just doing opkg install ath9k_2.6.39.4+..ipk. When are you just doing it? What do you want to achieve by executing this command? After the router is booted up, I do the following rmmod ath9k opkg install modified driver insmod ath9k ifconfig wlan0 up ifconfig wlan1 up I don't see the above messages. When I reboot, I get the errors. -- Best regards, Alexey Loukianov mailto:mooro...@mail.ru System Engineer,Mob.:+7(926)218-1320 *nix Specialist ___ 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] setting the promiscuous mode for driver
hi, I want to sniff all the packets from the network. I am setting sc-sc_ah-is_monitoring = true; in ath9k_start() but this gets set to false in in ath9k_config(..). using the flag : IEEE80211_CONF_CHANGE_MONITOR Both the functions are defined in main.c in compat../drivers/net/wireless/ath/ath9k I have the following doubts : 1. this flag is not used anywhere and I don't get how should i set *changed *so that this flag is set. 2. If I force ah-is_monitoring to true, before this, I am not sure how the driver will behave as other things might go wrong elsewhere 3. When I install the modified driver, the interfaces mon.wlan0, mon.wlan1 are renamed to wlan-00, wlan11 !! the flag is_monitoring flag is set to true on unless I reboot the router. On reboot, its again set to false. Though I had set the changed flag to : changed= changed | IEEE80211_CONF_CHANGE_MONITOR to set it to true in ath9k_start() function. Please suggest how to set the monitoring mode, programmatically in the driver ? to sniff all packets in the network Abhinav - - Also, I have doubt in setting the monitor mode using iwconfig. The usual mode of the device is Master( using iwconfig ) When, I use the following commands : $ifconfig wlan0 down $iwconfig wlan0 mode monitor $ifconfig wlan0 up The router reboots on the last command, and the wlan0 still shows monitor mode(iwconfig output) The browser interface also shows Master mode. A user space ioctl call : ioctl(sd, SIOCSIWMODE, wrq) gives me an error : DEvice or resource ready. the radio interface is not configure. There is a mon.wlan0, mon.wlan1 (in Monitor mode) interfaces in iwconfig output. Shall i use them to create a raw socket and sniff on it ? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] monitor mode
I want to set the monitor mode on in the driver programmatically as there are some other things i am doing for which the driver is required to be in the monitor mode. I wanted to be sure if (is_monitoring, defined in ath_hw) is the correct flag to be set. Is it right to set the *changed* variable by using IEEE80211_CONF_CHANGE_MONITOR, as written before. Abhinav On Wed, Nov 2, 2011 at 9:48 AM, Jo-Philipp Wich x...@subsignal.org wrote: Hi, you're supposed to use iw with modern mac80211. To spawn a real monitor interface: iw phy phy0 interface add mon0 type monitor; ifconfig mon0 up See also http://wireless.kernel.org/en/users/Documentation/iw It is certainly not required to recompile the driver. The mon.wlanX devices are cooked monitor interfaces required by hostapd to communicate with the driver. ~ Jow ___ 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] monitor mode
I am modifying data in skbuff structure, so it will be convenient for me to set the things in the driver itself than use Netlink. What do you think ? Abhinav On Wed, Nov 2, 2011 at 4:28 PM, Jo-Philipp Wich x...@subsignal.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Then simply do the same nl80211 api calls (netlink messages) that iw uses, its easy. Wext (the api that iwconfig uses) is deprecated and will disappear soon - - so you should do yourself a favor and avoid it. ~ Jow -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6xqAcACgkQdputYINPTPPaUwCfQbmgdktpRugNBfUZ3bBNJqX3 KWAAnRL6NAsDLKpbPHjFclZ113kHyDey =3qc7 -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] monitor mode
hi, I want to sniff all the packets from the network. I am setting sc-sc_ah-is_monitoring = true; in ath9k_start() but this gets set to false in in ath9k_config(..). using the flag : IEEE80211_CONF_CHANGE_MONITOR Both the functions are defined in main.c in compat../drivers/net/wireless/ath/ath9k I have the following doubts : 1. this flag is not used anywhere and I don't get how should i set *changed *so that this flag is set. 2. If I force ah-is_monitoring to true, before this, I am not sure how the driver will behave as other things might go wrong elsewhere Please suggest how to set the monitoring mode. Also, I have doubt in setting the monitor mode using iwconfig. The usual mode of the device is Master( using iwconfig ) When, I use the following commands : $ifconfig wlan0 down $iwconfig wlan0 mode monitor $ifconfig wlan0 up The router reboots on the last command, and the wlan0 still shows monitor mode(iwconfig output) The browser interface also shows Master mode. A user space ioctl call : ioctl(sd, SIOCSIWMODE, wrq) gives me an error : DEvice or resource ready. the radio interface is not configure. There is a mon.wlan0, mon.wlan1 (in Monitor mode) interfaces in iwconfig output. Shall i use them to create a raw socket and sniff on it ? Abhinav Narain ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] printk() and browser
I am just doing opkg install ath9k_2.6.39.4+..ipk Do i need to install some other packages on which ath9k driver depends also Somewhere I read it mught be a symbol table issue. Any guesses might be useful. Please help. Abhinav On Mon, Oct 17, 2011 at 8:40 PM, abhinav narain abhinavnarai...@gmail.comwrote: I have figure the problem, but I don't know the solution. Please if someone can tell me about why the following errors are given on dmesg. iptable_raw:Unknow symbol xt_hook_link (err 0) iptable_raw:Unknow symbol ipt_alloc_initial_table (err 0) iptable_raw:Unknow symbol xt_hook_unlink (err 0) xt_NOTRACK: Unknow symbol xt_register_target (err 0) xtconntrack: Unknown symbol xt_register_match(err0) xtconntrack: Unknown symbol xt_unregister_match(err0) There are a lot of such errors on dmesg, when i compile the following lines of code in at_rx_tasklet() in recv.c static int ai=0; if (ai==0) { printk(abhinav\n); ai++ ;} I think i have to do some macro unset or something else ? Can anyone please help... whoever is trying to patch the kernel Abhinav On Mon, Oct 17, 2011 at 6:38 PM, abhinav narain abhinavnarai...@gmail.com wrote: hi, I am modifying the driver for past few days and noticed something today. Though my modifications are seen on the command line, I have one thing going extremely worn i realized today. The vanilla installation of the firmware on the router is perfect. I am able to browse the internet, but when I even do a printk() in the tasklet function (just once by using a condition), my laptop is unable to connect to the Internet ! What can be going wrong ? /etc/resolv.conf is the same for both the cases : search lan nameserver 127.0.0.1 Please help. Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] printk() and browser
but why is the unknown symbol error ? coming ... the browser is unable to connect ? pings are not working ? how else can I say that the code I modify is working correct ? Please help On Tue, Oct 18, 2011 at 6:18 AM, Florian Fainelli flor...@openwrt.orgwrote: Hello, On Tuesday 18 October 2011 06:08:17 abhinav narain wrote: I am just doing opkg install ath9k_2.6.39.4+..ipk Do i need to install some other packages on which ath9k driver depends also Somewhere I read it mught be a symbol table issue. Any guesses might be useful. Please help . Your printk() slows down the entire system and nothing is responsive? Abhinav On Mon, Oct 17, 2011 at 8:40 PM, abhinav narain abhinavnarai...@gmail.comwrote: I have figure the problem, but I don't know the solution. Please if someone can tell me about why the following errors are given on dmesg. iptable_raw:Unknow symbol xt_hook_link (err 0) iptable_raw:Unknow symbol ipt_alloc_initial_table (err 0) iptable_raw:Unknow symbol xt_hook_unlink (err 0) xt_NOTRACK: Unknow symbol xt_register_target (err 0) xtconntrack: Unknown symbol xt_register_match(err0) xtconntrack: Unknown symbol xt_unregister_match(err0) There are a lot of such errors on dmesg, when i compile the following lines of code in at_rx_tasklet() in recv.c static int ai=0; if (ai==0) { printk(abhinav\n); ai++ ;} I think i have to do some macro unset or something else ? Can anyone please help... whoever is trying to patch the kernel Abhinav On Mon, Oct 17, 2011 at 6:38 PM, abhinav narain abhinavnarai...@gmail.com wrote: hi, I am modifying the driver for past few days and noticed something today. Though my modifications are seen on the command line, I have one thing going extremely worn i realized today. The vanilla installation of the firmware on the router is perfect. I am able to browse the internet, but when I even do a printk() in the tasklet function (just once by using a condition), my laptop is unable to connect to the Internet ! What can be going wrong ? /etc/resolv.conf is the same for both the cases : search lan nameserver 127.0.0.1 Please help. Abhinav -- Florian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] printk() and browser
As i said, the following errors shoot up on dmesg : iptable_raw:Unknow symbol xt_hook_link (err 0) iptable_raw:Unknow symbol ipt_alloc_initial_table (err 0) iptable_raw:Unknow symbol xt_hook_unlink (err 0) xt_NOTRACK: Unknow symbol xt_register_target (err 0) xtconntrack: Unknown symbol xt_register_match(err0) xtconntrack: Unknown symbol xt_unregister_match(err0) I don't understand why ? Abhinav On Tue, Oct 18, 2011 at 6:25 AM, abhinav narain abhinavnarai...@gmail.comwrote: but why is the unknown symbol error ? coming ... the browser is unable to connect ? pings are not working ? how else can I say that the code I modify is working correct ? Please help On Tue, Oct 18, 2011 at 6:18 AM, Florian Fainelli flor...@openwrt.orgwrote: Hello, On Tuesday 18 October 2011 06:08:17 abhinav narain wrote: I am just doing opkg install ath9k_2.6.39.4+..ipk Do i need to install some other packages on which ath9k driver depends also Somewhere I read it mught be a symbol table issue. Any guesses might be useful. Please help . Your printk() slows down the entire system and nothing is responsive? Abhinav On Mon, Oct 17, 2011 at 8:40 PM, abhinav narain abhinavnarai...@gmail.comwrote: I have figure the problem, but I don't know the solution. Please if someone can tell me about why the following errors are given on dmesg. iptable_raw:Unknow symbol xt_hook_link (err 0) iptable_raw:Unknow symbol ipt_alloc_initial_table (err 0) iptable_raw:Unknow symbol xt_hook_unlink (err 0) xt_NOTRACK: Unknow symbol xt_register_target (err 0) xtconntrack: Unknown symbol xt_register_match(err0) xtconntrack: Unknown symbol xt_unregister_match(err0) There are a lot of such errors on dmesg, when i compile the following lines of code in at_rx_tasklet() in recv.c static int ai=0; if (ai==0) { printk(abhinav\n); ai++ ;} I think i have to do some macro unset or something else ? Can anyone please help... whoever is trying to patch the kernel Abhinav On Mon, Oct 17, 2011 at 6:38 PM, abhinav narain abhinavnarai...@gmail.com wrote: hi, I am modifying the driver for past few days and noticed something today. Though my modifications are seen on the command line, I have one thing going extremely worn i realized today. The vanilla installation of the firmware on the router is perfect. I am able to browse the internet, but when I even do a printk() in the tasklet function (just once by using a condition), my laptop is unable to connect to the Internet ! What can be going wrong ? /etc/resolv.conf is the same for both the cases : search lan nameserver 127.0.0.1 Please help. Abhinav -- Florian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] printk() and browser
hi, I am modifying the driver for past few days and noticed something today. Though my modifications are seen on the command line, I have one thing going extremely worn i realized today. The vanilla installation of the firmware on the router is perfect. I am able to browse the internet, but when I even do a printk() in the tasklet function (just once by using a condition), my laptop is unable to connect to the Internet ! What can be going wrong ? /etc/resolv.conf is the same for both the cases : search lan nameserver 127.0.0.1 Please help. Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] printk() and browser
I have figure the problem, but I don't know the solution. Please if someone can tell me about why the following errors are given on dmesg. iptable_raw:Unknow symbol xt_hook_link (err 0) iptable_raw:Unknow symbol ipt_alloc_initial_table (err 0) iptable_raw:Unknow symbol xt_hook_unlink (err 0) xt_NOTRACK: Unknow symbol xt_register_target (err 0) xtconntrack: Unknown symbol xt_register_match(err0) xtconntrack: Unknown symbol xt_unregister_match(err0) There are a lot of such errors on dmesg, when i compile the following lines of code in at_rx_tasklet() in recv.c static int ai=0; if (ai==0) { printk(abhinav\n); ai++ ;} I think i have to do some macro unset or something else ? Can anyone please help... whoever is trying to patch the kernel Abhinav On Mon, Oct 17, 2011 at 6:38 PM, abhinav narain abhinavnarai...@gmail.comwrote: hi, I am modifying the driver for past few days and noticed something today. Though my modifications are seen on the command line, I have one thing going extremely worn i realized today. The vanilla installation of the firmware on the router is perfect. I am able to browse the internet, but when I even do a printk() in the tasklet function (just once by using a condition), my laptop is unable to connect to the Internet ! What can be going wrong ? /etc/resolv.conf is the same for both the cases : search lan nameserver 127.0.0.1 Please help. Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] how to apply driver patch to the kernel
Ok. I have them as modules, not in one binary. So, this won't work i believe. But thanks for the information. Abhinav On Mon, Oct 10, 2011 at 1:25 AM, harish badrinath harishbadrin...@gmail.com wrote: Hello, @Harish : I am not sure how to trigger monolithic kernel, but i dont get any output of strings ... because vmlinux does not exist monolithic kernel ? option My way of saying .. if you compiled everything you needed into the kernel binary instead of compiling it as (optional) modules. strings vmlinux | grep abhinav Note: vmlinux is not vmlinuz .. find . -name vmlinux -exec strings {} \; | grep -i LINUX find . -name *.ko -exec strings {} \; | grep -i LINUX replace linux with your name or other notable string. Of course this assumes that you are doing this from openrwrt build root, in other words $PWD should be openwrt build root directory. ___ 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] how to apply driver patch to the kernel
yes I was deploying the firmware again on the machine after doing make package/mac80211/update. Also, there was no info on packages page that one has to do make package/mac80211/compile ? I was interested in knowing do I have to change anything in makefiles if I add another header file in the folder as a part of patch ? or is it that if a corresponding .c file is present, its .h file is taken by default(as in usual make) ? Abhinav On Mon, Oct 10, 2011 at 4:00 PM, Adam Porter porter.a...@gmail.com wrote: Are you building a new firmware image after recompiling mac80211? Rebuilding one package does not update the firmware image. Besides, using whole firmware images is a slow process... why not use the kmod-ath9k package (which is updated after you rebuild the package) and install it via opkg? Built packages are located in your bin/ dir. On Mon, Oct 10, 2011 at 8:30 AM, abhinav narain abhinavnarai...@gmail.com wrote: Ok. I have them as modules, not in one binary. So, this won't work i believe. But thanks for the information. Abhinav On Mon, Oct 10, 2011 at 1:25 AM, harish badrinath harishbadrin...@gmail.com wrote: Hello, @Harish : I am not sure how to trigger monolithic kernel, but i dont get any output of strings ... because vmlinux does not exist monolithic kernel ? option My way of saying .. if you compiled everything you needed into the kernel binary instead of compiling it as (optional) modules. strings vmlinux | grep abhinav Note: vmlinux is not vmlinuz .. find . -name vmlinux -exec strings {} \; | grep -i LINUX find . -name *.ko -exec strings {} \; | grep -i LINUX replace linux with your name or other notable string. Of course this assumes that you are doing this from openrwrt build root, in other words $PWD should be openwrt build root directory. ___ 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 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] modifying source code in OpenWrt
I am adding the following lines to the code : static void __exit ath9k_exit(void) { is_ath9k_unloaded = true; ath_ahb_exit(); ath_pci_exit(); ath_rate_control_unregister(); printk(KERN_INFO %s:* I added this* Driver unloaded\n, dev_info); * printk(KERN_INFO abhinav init );* } module_exit(ath9k_exit); I don't even get these printk(() output on dmesg ! when i do : rmmod ath9k.o I am following exactly what you have said above. I am not doing package/mac80211/{clean,compile} after package/mac80211/update and loading the image on the router. Please help, I am out of creativity of trying anything new on this thing. Abhinav On Fri, Oct 7, 2011 at 4:09 PM, Adam Porter porter.a...@gmail.com wrote: Hi, I'm not sure what Jonas is referencing when he says that quilt does not work in mac80211. It works fine. # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update Your patch will be there. I've been making compat-wireless patches out of Trunk all day. On Fri, Oct 7, 2011 at 10:58 AM, abhinav narain abhinavnarai...@gmail.com wrote: When I modify the files in the following folder and make deliberate syntax errors and then do a make $make package/mac80211/{clean,compile} V=99 folder : openwrt/src/klatch/*build_dir*/*toolchain-mips_r2_gcc* -4.5-linaro_uClibc-0.9.32/linux-2.6.39.4/drivers/net/wireless/ath/ath9k I don't get any compilation errors ! I tried modifying and writing syntactically wrong code in other folder also, but no compilation errors, openwrt/src/klatch/*build_dir*/*linux-ar71xx_generic* /linux-2.6.39.4/drivers/net/wireless/ath/ath9k. Which source file shall i make changes to ? Does Openwrt take the files directly from dl/ folder and untars it every time it compiles ? Please help in resolving the issue Abhinav ___ 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 mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] modifying source code in OpenWrt
On Sun, Oct 9, 2011 at 7:26 AM, Felix Fietkau n...@openwrt.org wrote: On 2011-10-09 10:49 AM, abhinav narain wrote: I am adding the following lines to the code : static void __exit ath9k_exit(void) { is_ath9k_unloaded = true; ath_ahb_exit(); ath_pci_exit(); ath_rate_control_unregister(); printk(KERN_INFO %s:*I added this* Driver unloaded\n, dev_info); * printk(KERN_INFO abhinav init );* } module_exit(ath9k_exit); I don't even get these printk(() output on dmesg ! when i do : rmmod ath9k.o I am following exactly what you have said above. I am not doing package/mac80211/{clean,**compile} after package/mac80211/update and loading the image on the router. Please help, I am out of creativity of trying anything new on this thing. You're probably editing in the wrong place. OpenWrt does not use mac80211 or ath9k from build_dir/linux-ar71xx_**generic/linux-2.6.39.4. What you're interested in is in build_dir/linux-ar71xx_**generic/compat-wireless-*/ I want to modify compat wireless driver. this is what documentation I am following http://wiki.openwrt.org/doc/devel/patches . More precisely this : # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update After above I copy the image on the router. The changes are reflected in the code in build_dir/linux-ar71xx/compat../drivers/net/...ath9k/init.c I suggest you read up on how to use quilt for managing patches on packages, the OpenWrt package that this build dir belongs to is package/mac80211. After you modify it, don't run make package/mac80211/clean, that'll throw away all of your modifications :) I am running mac80211/update as the last command before uploading the image on router. I think that should be it, but I don't get printk() outputs. Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] how to apply driver patch to the kernel
Hi, Jonas, Adam, Harish. so I have got a printk() msg on dmesg but only doing the following : modifying the tar in dl/ folder and deleting the build_dir directory. make package/mac80211/{clean,compile} Now it definitely compiles my modifications I have written the following note to tell I am doing right things without ambiguity as told by you all. @Adam, As you can see, I am modifying the build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ Hence I am modifying at the right place, I suppose ( as suggested by you. # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update I do a make package/mac80211/update in openwrt/src/klash (same where update is done) I get the patch code in the build_dir/compat-wireless/ /ath9k But, I did not get the printk() message in the dmesg. @Harish : I am not sure how to trigger monolithic kernel, but i dont get any output of strings ... because vmlinux does not exist monolithic kernel ? option strings vmlinux | grep abhinav Note: vmlinux is not vmlinuz .. @Jonas: i kept the patch in package/mac80211/patches/ with latest serial no. in the list of patches Applied make package/mac80211/{clean,compile} This will fetch the compat source from dl/ and apply new patches. But i did not get the printk() by this method. I am surprized why these things are not working. I am copying the factory.img, sometimes doing: sysupgrade -n -v -d 30 open...-sysupgrade.bin To copy this on router and still the code changes were not reflected while testing the dmesg output! Can any of you guess where am I going wrong in the above process... As i have to write and test actual code and it will be tedious to put things everytime in dl/ as tarball. Abhinav On Sun, Oct 9, 2011 at 2:31 AM, harish badrinath harishbadrin...@gmail.comwrote: On Sun, Oct 9, 2011 at 9:55 AM, abhinav narain abhinavnarai...@gmail.com wrote: hi, your method does not work. I tried doing this by adding a printk() line to module_exit() in ath9k in the file init.c The dmesg does not show any output of the changed line. Are you sure that (a) The code is compiled into the kernel (b) The code is lying in the exec path of the kernel and it is executed before a panic/something similar. it it is (a) You should probably mess with make files. if it is (b) Try adding the code in a different place or try adding printk's in arch/foo folder and then (re)generate your patch. It took me a lot of time to figure this out. Any help please ? On Thu, Oct 6, 2011 at 4:19 PM, Jonas Gorski jonas.gorski+open...@gmail.com wrote: Hi, On 6 October 2011 20:55, abhinav narain abhinavnarai...@gmail.com wrote: hi, This is my first experience with writing a patch/using git. I need some specific answers to get it working mac80211 is actually a bit tricky since quilt doesn't work. I'd recommend cloning the appropriate tag from https://github.com/mcgrof/compat-wireless, then applying the OpenWrt patches on top of it (with e.g. git apply - don't forget to commit, but all as one should be fine). Then you can create patches you can put into package/mac80211/patches/ (they should come last). a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h index c03949e..0b31c10 100644 --- a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h The base is wrong, it should be a/drivers/net/... . without the compat-wireless... . @@ -122,9 +122,14 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, /***/ My questing is : 0) should index line be present in the patch ? It doesn't hurt, but it doesn't help either, patch ignores it when applying them. For a working patch the ---/+++ lines and the changes are enough, everything else is just fluff. 1) Where should I place this patch file ? in package/mac80211/patches/ (where all patches are). 2) What are the set of easiest commands to get this patch to be applied/compile ? Copy the patch to the location above, do a make package/mac80211/{clean,compile} I saw Quilt http://wiki.openwrt.org/doc/devel/patches The asked to do make package/example/update V=99 Now I don't know what this example should be to use this command ? Not for mac80211/compat-wireless, so just ignore it ;) Regards Jonas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt
Re: [OpenWrt-Devel] how to apply driver patch to the kernel
yes, already. On Sun, Oct 9, 2011 at 11:25 PM, Murat Sezgin sezginmu...@gmail.com wrote: Did you try to increase the printk debug level in run time? echo 8 /proc/sys/kernel/printk Murat On Oct 9, 2011, at 18:47, abhinav narain abhinavnarai...@gmail.com wrote: Hi, Jonas, Adam, Harish. so I have got a printk() msg on dmesg but only doing the following : modifying the tar in dl/ folder and deleting the build_dir directory. make package/mac80211/{clean,compile} Now it definitely compiles my modifications I have written the following note to tell I am doing right things without ambiguity as told by you all. @Adam, As you can see, I am modifying the build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ Hence I am modifying at the right place, I suppose ( as suggested by you. # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update I do a make package/mac80211/update in openwrt/src/klash (same where update is done) I get the patch code in the build_dir/compat-wireless/ /ath9k But, I did not get the printk() message in the dmesg. @Harish : I am not sure how to trigger monolithic kernel, but i dont get any output of strings ... because vmlinux does not exist monolithic kernel ? option strings vmlinux | grep abhinav Note: vmlinux is not vmlinuz .. @Jonas: i kept the patch in package/mac80211/patches/ with latest serial no. in the list of patches Applied make package/mac80211/{clean,compile} This will fetch the compat source from dl/ and apply new patches. But i did not get the printk() by this method. I am surprized why these things are not working. I am copying the factory.img, sometimes doing: sysupgrade -n -v -d 30 open...-sysupgrade.bin To copy this on router and still the code changes were not reflected while testing the dmesg output! Can any of you guess where am I going wrong in the above process... As i have to write and test actual code and it will be tedious to put things everytime in dl/ as tarball. Abhinav On Sun, Oct 9, 2011 at 2:31 AM, harish badrinath harishbadrin...@gmail.com harishbadrin...@gmail.com wrote: On Sun, Oct 9, 2011 at 9:55 AM, abhinav narain abhinavnarai...@gmail.comabhinavnarai...@gmail.com wrote: hi, your method does not work. I tried doing this by adding a printk() line to module_exit() in ath9k in the file init.c The dmesg does not show any output of the changed line. Are you sure that (a) The code is compiled into the kernel (b) The code is lying in the exec path of the kernel and it is executed before a panic/something similar. it it is (a) You should probably mess with make files. if it is (b) Try adding the code in a different place or try adding printk's in arch/foo folder and then (re)generate your patch. It took me a lot of time to figure this out. Any help please ? On Thu, Oct 6, 2011 at 4:19 PM, Jonas Gorski jonas.gorski%2bopen...@gmail.comjonas.gorski+open...@gmail.com wrote: Hi, On 6 October 2011 20:55, abhinav narain abhinavnarai...@gmail.com abhinavnarai...@gmail.com wrote: hi, This is my first experience with writing a patch/using git. I need some specific answers to get it working mac80211 is actually a bit tricky since quilt doesn't work. I'd recommend cloning the appropriate tag from https://github.com/mcgrof/compat-wireless https://github.com/mcgrof/compat-wireless, then applying the OpenWrt patches on top of it (with e.g. git apply - don't forget to commit, but all as one should be fine). Then you can create patches you can put into package/mac80211/patches/ (they should come last). a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h index c03949e..0b31c10 100644 --- a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h The base is wrong, it should be a/drivers/net/... . without the compat-wireless... . @@ -122,9 +122,14 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, /***/ My questing is : 0) should index line be present in the patch ? It doesn't hurt, but it doesn't help either, patch ignores it when applying them. For a working patch the ---/+++ lines and the changes are enough, everything else is just fluff. 1) Where should I place this patch file ? in package/mac80211/patches/ (where all patches are). 2) What are the set of easiest commands to get this patch to be applied/compile ? Copy the patch to the location above, do a make package/mac80211/{clean,compile} I saw Quilt http://wiki.openwrt.org/doc
[OpenWrt-Devel] no output of printk
I have made a patch to just do a printk(KERN_INFO ... ); in ath9k_tasklet(). shall I use any other KERN_ALERT etc options instead ? But I don't see any output on stdout when I install the image on netgear router. It does not have anything in 'cat /var/log/message' also. Am I missing something ? The patch applied successfully, so I hope there is no need to include kernel/printk.h in the main.c file and recompile the image? Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] how to apply driver patch to the kernel
hi, your method does not work. I tried doing this by adding a printk() line to module_exit() in ath9k in the file init.c The dmesg does not show any output of the changed line. It took me a lot of time to figure this out. Any help please ? On Thu, Oct 6, 2011 at 4:19 PM, Jonas Gorski jonas.gorski+open...@gmail.com wrote: Hi, On 6 October 2011 20:55, abhinav narain abhinavnarai...@gmail.com wrote: hi, This is my first experience with writing a patch/using git. I need some specific answers to get it working mac80211 is actually a bit tricky since quilt doesn't work. I'd recommend cloning the appropriate tag from https://github.com/mcgrof/compat-wireless, then applying the OpenWrt patches on top of it (with e.g. git apply - don't forget to commit, but all as one should be fine). Then you can create patches you can put into package/mac80211/patches/ (they should come last). a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h index c03949e..0b31c10 100644 --- a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h The base is wrong, it should be a/drivers/net/... . without the compat-wireless... . @@ -122,9 +122,14 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, /***/ My questing is : 0) should index line be present in the patch ? It doesn't hurt, but it doesn't help either, patch ignores it when applying them. For a working patch the ---/+++ lines and the changes are enough, everything else is just fluff. 1) Where should I place this patch file ? in package/mac80211/patches/ (where all patches are). 2) What are the set of easiest commands to get this patch to be applied/compile ? Copy the patch to the location above, do a make package/mac80211/{clean,compile} I saw Quilt http://wiki.openwrt.org/doc/devel/patches The asked to do make package/example/update V=99 Now I don't know what this example should be to use this command ? Not for mac80211/compat-wireless, so just ignore it ;) Regards Jonas ___ 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] modifying source code in OpenWrt
When I modify the files in the following folder and make deliberate syntax errors and then do a make $make package/mac80211/{clean,compile} V=99 folder : openwrt/src/klatch/*build_dir*/*toolchain-mips_r2_gcc* -4.5-linaro_uClibc-0.9.32/linux-2.6.39.4/drivers/net/wireless/ath/ath9k I don't get any compilation errors ! I tried modifying and writing syntactically wrong code in other folder also, but no compilation errors, openwrt/src/klatch/*build_dir*/*linux-ar71xx_generic* /linux-2.6.39.4/drivers/net/wireless/ath/ath9k. Which source file shall i make changes to ? Does Openwrt take the files directly from dl/ folder and untars it every time it compiles ? Please help in resolving the issue Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] modifying source code in OpenWrt
I am sorry but I am new to OpenWrt and have doubts not cleared for days. Are you referring to http://wiki.openwrt.org/doc/devel/patches Adding kernel patches subsection ? I haven't found any other related documentation actually. Also, I want to include a bunch of .h header files where i am defining my own structures. Which Makefiles should I add this file ? I don't want to pollute the OpenWrt tree by adding these files in the current tree. Can I give somewhere the location from where these files can be fixed ? There is no documentation on this. PS: According to you I should do : cd build_dir/linux-*/linux-2.* modify the ath9k driver here then, make target/linux/update V=99 and then move the linux-ar71xx image to the router for testing ! ! I hope I got this right. Abhinav On Fri, Oct 7, 2011 at 4:17 PM, Adam Porter porter.a...@gmail.com wrote: To address your actual question (sorry, I meant for the first reply to be in your other thread, though it is related), when you make clean a package it will remove the source from build_dir and extract the tarball from dl. So, if you make any changes to the extracted and patched source directly in the build_dir and then make clean, your changes are deleted. You should use the quilt process documented in the wiki; it has tips for recompiling a package to test your changes without having to make clean. Also, please try the quilt steps I posted in the first reply... they should work, and using quilt to do this will make your life much easier :) On Fri, Oct 7, 2011 at 10:58 AM, abhinav narain abhinavnarai...@gmail.com wrote: When I modify the files in the following folder and make deliberate syntax errors and then do a make $make package/mac80211/{clean,compile} V=99 folder : openwrt/src/klatch/*build_dir*/*toolchain-mips_r2_gcc* -4.5-linaro_uClibc-0.9.32/linux-2.6.39.4/drivers/net/wireless/ath/ath9k I don't get any compilation errors ! I tried modifying and writing syntactically wrong code in other folder also, but no compilation errors, openwrt/src/klatch/*build_dir*/*linux-ar71xx_generic* /linux-2.6.39.4/drivers/net/wireless/ath/ath9k. Which source file shall i make changes to ? Does Openwrt take the files directly from dl/ folder and untars it every time it compiles ? Please help in resolving the issue Abhinav ___ 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 mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] how to apply driver patch to the kernel
hi, This is my first experience with writing a patch/using git. I need some specific answers to get it working I have written a patch for ath9k driver using git. The git root directory where i initiated the project is compat-wireless-2011-08-10. I did a git diff 001-ath9k.patch and the patch file has headers like : diff --git a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h *index c03949e..0b31c10 100644* --- a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h @@ -122,9 +122,14 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, /***/ My questing is : 0) should *index* line be present in the patch ? 1) *Where *should I place this patch file ? 2) What are the *set* of easiest commands to get this patch to be applied/compile ? I saw Quilt http://wiki.openwrt.org/doc/devel/patches The asked to do make package*/example/*update V=99 Now I don't know what this *example *should be to use this command ? Please help. Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] doubt on ath9k_rx_tasklet/ ath9k_tasklet
hi, I am writing a patch for netgear router model : wndr3700v2 w/ atheros chipset. I am using the compat-wireless driver I have modified the ath9k_rx_tasklet to get some information from the rx_status structure. this is defined in htc_drv_txrx.c I am not sure this is the file I should modify for router functionality to be accessed or ath9k_tasklet in main.c to access the router functionality. what the difference between the htc tasklet and the usual tasklet names ? Both the tasklet do similar function of filling data structures, but why are there two of them ? If someone can explain whats the difference and IF I am modifying the right file ? Also, if I want to include my own header file, Where should I keep it ? The Makefile doesn't have any statement to include the header files ! Should I keep it in the ath/ath9k folder ? Is there somewhere I can just give the path where to search the files while building OpenWrt ? Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] how to apply driver patch to the kernel
Thanks ! I got a compilation error. I have another doubt about compilation process. I have a folder with files which solve my purpose and want the functions in them to be used in the patch. Copying the whole folder into ath9k folder doesn't seem right. How can i include the path of the folder i created in command line or somewhere else, so that i can have access to these functions ? The Makefiles don't have *include* statements, strangely : Can I pass any flag like : -I /home/me/src/ to the following ? make /packages/{clean,compile} V=99 Actually, the folder has header files that are used in patch and also in userspace program to use the functionality added by patch PS : I have statements like following in patch: #include abc.h #ifdef GHI .. .. Abhinav On Thu, Oct 6, 2011 at 4:19 PM, Jonas Gorski jonas.gorski+open...@gmail.com wrote: Hi, On 6 October 2011 20:55, abhinav narain abhinavnarai...@gmail.com wrote: hi, This is my first experience with writing a patch/using git. I need some specific answers to get it working mac80211 is actually a bit tricky since quilt doesn't work. I'd recommend cloning the appropriate tag from https://github.com/mcgrof/compat-wireless, then applying the OpenWrt patches on top of it (with e.g. git apply - don't forget to commit, but all as one should be fine). Then you can create patches you can put into package/mac80211/patches/ (they should come last). a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h index c03949e..0b31c10 100644 --- a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h The base is wrong, it should be a/drivers/net/... . without the compat-wireless... . @@ -122,9 +122,14 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, /***/ My questing is : 0) should index line be present in the patch ? It doesn't hurt, but it doesn't help either, patch ignores it when applying them. For a working patch the ---/+++ lines and the changes are enough, everything else is just fluff. 1) Where should I place this patch file ? in package/mac80211/patches/ (where all patches are). 2) What are the set of easiest commands to get this patch to be applied/compile ? Copy the patch to the location above, do a make package/mac80211/{clean,compile} I saw Quilt http://wiki.openwrt.org/doc/devel/patches The asked to do make package/example/update V=99 Now I don't know what this example should be to use this command ? Not for mac80211/compat-wireless, so just ignore it ;) Regards Jonas ___ 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