[OpenWrt-Devel] how to apply driver patch to the kernel

abhinav narain abhinavnarain10 at gmail.com
Fri Oct 7 03:26:59 CEST 2011


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+openwrt at gmail.com
> wrote:

> Hi,
>
> On 6 October 2011 20:55, abhinav narain <abhinavnarain10 at 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 at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20111006/7d6f8124/attachment.html>


More information about the openwrt-devel mailing list