* Need help building a driver: mt7621-pci @ 2020-10-19 16:20 Deepak R Varma 2020-10-19 17:01 ` [Outreachy kernel] " Julia Lawall 0 siblings, 1 reply; 7+ messages in thread From: Deepak R Varma @ 2020-10-19 16:20 UTC (permalink / raw) To: outreachy-kernel; +Cc: mh12gx2825 Hello, I have made a change to drivers/staging/mt7621-pci/pci-mt7621.c file and now trying to build to ensure the driver builds fine. However, this file doesn't get included in the build process. I tried looking for driver dependencies and am not able to locate RALINK in my driver tree [in menuconfig] to enable it. Can you please suggest what may be wrong here? Thank you, Deepak. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] Need help building a driver: mt7621-pci 2020-10-19 16:20 Need help building a driver: mt7621-pci Deepak R Varma @ 2020-10-19 17:01 ` Julia Lawall 2020-10-19 17:17 ` Deepak R Varma 2020-10-19 19:18 ` Matthew Wilcox 0 siblings, 2 replies; 7+ messages in thread From: Julia Lawall @ 2020-10-19 17:01 UTC (permalink / raw) To: Deepak R Varma; +Cc: outreachy-kernel On Mon, 19 Oct 2020, Deepak R Varma wrote: > Hello, > I have made a change to drivers/staging/mt7621-pci/pci-mt7621.c file and > now trying to build to ensure the driver builds fine. However, this file > doesn't get included in the build process. > > I tried looking for driver dependencies and am not able to locate RALINK > in my driver tree [in menuconfig] to enable it. > > Can you please suggest what may be wrong here? A colleague of mine, Paul Gazzillo, makes a tool called klocalizer that figures out how to compile Linux kernel files. It suggests: make.cross ARCH=mips olddefconfig; make.cross ARCH=mips clean drivers/staging/mt7621-pci/pci-mt7621.o You can look at this blog about cross compilation: https://nishkadg.github.io/2019/07/25/make-cross.html If you want to try klocalizer yourself, the code is here: https://github.com/paulgazz/kmax julia ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] Need help building a driver: mt7621-pci 2020-10-19 17:01 ` [Outreachy kernel] " Julia Lawall @ 2020-10-19 17:17 ` Deepak R Varma 2020-10-19 19:18 ` Matthew Wilcox 1 sibling, 0 replies; 7+ messages in thread From: Deepak R Varma @ 2020-10-19 17:17 UTC (permalink / raw) To: Julia Lawall; +Cc: outreachy-kernel On Mon, Oct 19, 2020 at 07:01:50PM +0200, Julia Lawall wrote: > > > On Mon, 19 Oct 2020, Deepak R Varma wrote: > > > Hello, > > I have made a change to drivers/staging/mt7621-pci/pci-mt7621.c file and > > now trying to build to ensure the driver builds fine. However, this file > > doesn't get included in the build process. > > > > I tried looking for driver dependencies and am not able to locate RALINK > > in my driver tree [in menuconfig] to enable it. > > > > Can you please suggest what may be wrong here? > > A colleague of mine, Paul Gazzillo, makes a tool called klocalizer that > figures out how to compile Linux kernel files. It suggests: > > make.cross ARCH=mips olddefconfig; make.cross ARCH=mips clean drivers/staging/mt7621-pci/pci-mt7621.o > > You can look at this blog about cross compilation: > > https://nishkadg.github.io/2019/07/25/make-cross.html > > If you want to try klocalizer yourself, the code is here: > > https://github.com/paulgazz/kmax > > julia > Thank you very much. I will review these and let you know. Deepak. > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/alpine.DEB.2.22.394.2010191858240.2781%40hadrien. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] Need help building a driver: mt7621-pci 2020-10-19 17:01 ` [Outreachy kernel] " Julia Lawall 2020-10-19 17:17 ` Deepak R Varma @ 2020-10-19 19:18 ` Matthew Wilcox 2020-10-20 3:38 ` Deepak R Varma 1 sibling, 1 reply; 7+ messages in thread From: Matthew Wilcox @ 2020-10-19 19:18 UTC (permalink / raw) To: Julia Lawall; +Cc: Deepak R Varma, outreachy-kernel On Mon, Oct 19, 2020 at 07:01:50PM +0200, Julia Lawall wrote: > On Mon, 19 Oct 2020, Deepak R Varma wrote: > > Hello, > > I have made a change to drivers/staging/mt7621-pci/pci-mt7621.c file and > > now trying to build to ensure the driver builds fine. However, this file > > doesn't get included in the build process. > > > > I tried looking for driver dependencies and am not able to locate RALINK > > in my driver tree [in menuconfig] to enable it. > > > > Can you please suggest what may be wrong here? > > A colleague of mine, Paul Gazzillo, makes a tool called klocalizer that > figures out how to compile Linux kernel files. It suggests: > > make.cross ARCH=mips olddefconfig; make.cross ARCH=mips clean drivers/staging/mt7621-pci/pci-mt7621.o It's useful for drivers to build on all architectures by depending on COMPILE_TEST. You will probably have to provide a lot of dummy interfaces; the only requirement is that the code build, not work, since it almost certainly needs to access hardware that only exists on the Mediatek platform. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] Need help building a driver: mt7621-pci 2020-10-19 19:18 ` Matthew Wilcox @ 2020-10-20 3:38 ` Deepak R Varma 2020-10-20 11:32 ` Matthew Wilcox 0 siblings, 1 reply; 7+ messages in thread From: Deepak R Varma @ 2020-10-20 3:38 UTC (permalink / raw) To: Matthew Wilcox; +Cc: Julia Lawall, outreachy-kernel On Mon, Oct 19, 2020 at 08:18:03PM +0100, Matthew Wilcox wrote: > On Mon, Oct 19, 2020 at 07:01:50PM +0200, Julia Lawall wrote: > > On Mon, 19 Oct 2020, Deepak R Varma wrote: > > > Hello, > > > I have made a change to drivers/staging/mt7621-pci/pci-mt7621.c file and > > > now trying to build to ensure the driver builds fine. However, this file > > > doesn't get included in the build process. > > > > > > I tried looking for driver dependencies and am not able to locate RALINK > > > in my driver tree [in menuconfig] to enable it. > > > > > > Can you please suggest what may be wrong here? > > > > A colleague of mine, Paul Gazzillo, makes a tool called klocalizer that > > figures out how to compile Linux kernel files. It suggests: > > > > make.cross ARCH=mips olddefconfig; make.cross ARCH=mips clean drivers/staging/mt7621-pci/pci-mt7621.o > > It's useful for drivers to build on all architectures by depending > on COMPILE_TEST. You will probably have to provide a lot of dummy > interfaces; the only requirement is that the code build, not work, > since it almost certainly needs to access hardware that only exists on > the Mediatek platform. Thank you. Tried a couple of times with different selections however, not able to get across this error: make[4]: *** No rule to make target 'drivers/staging/mt7621-pci/pci-mt7621.o'. Stop. make[3]: *** [scripts/Makefile.build:475: __build] Error 2 make[2]: *** [scripts/Makefile.build:500: drivers/staging] Error 2 make[1]: *** [Makefile:1777: drivers] Error 2 make: *** [Makefile:335: __build_one_by_one] Error 2 It looks like a generic error message and lot of possibilities while I try to explore it myself. Any quick suggestion on what is wrong will be time saving. Thank you, Deepak. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] Need help building a driver: mt7621-pci 2020-10-20 3:38 ` Deepak R Varma @ 2020-10-20 11:32 ` Matthew Wilcox 2020-10-20 11:52 ` Deepak R Varma 0 siblings, 1 reply; 7+ messages in thread From: Matthew Wilcox @ 2020-10-20 11:32 UTC (permalink / raw) To: Deepak R Varma; +Cc: Julia Lawall, outreachy-kernel On Tue, Oct 20, 2020 at 09:08:36AM +0530, Deepak R Varma wrote: > On Mon, Oct 19, 2020 at 08:18:03PM +0100, Matthew Wilcox wrote: > > It's useful for drivers to build on all architectures by depending > > on COMPILE_TEST. You will probably have to provide a lot of dummy > > interfaces; the only requirement is that the code build, not work, > > since it almost certainly needs to access hardware that only exists on > > the Mediatek platform. > > Thank you. Tried a couple of times with different selections however, > not able to get across this error: > > make[4]: *** No rule to make target > 'drivers/staging/mt7621-pci/pci-mt7621.o'. Stop. > make[3]: *** [scripts/Makefile.build:475: __build] Error 2 > make[2]: *** [scripts/Makefile.build:500: drivers/staging] Error 2 > make[1]: *** [Makefile:1777: drivers] Error 2 > make: *** [Makefile:335: __build_one_by_one] Error 2 > > It looks like a generic error message and lot of possibilities while I > try to explore it myself. Any quick suggestion on what is wrong will > be time saving. You need to go to the Kconfig file and change: - depends on RALINK + depends on RALINK || COMPILE_TEST Then you'll need to add dummy definitions of various things to make it build. Commit 171a9bae68c72f2d1260c3825203760856e6793b shows me doing horrible things to the Octeon driver to make it build on any platform. It's a mixture of adding structs that I copied from elsewhere and making random #defines. There's no hard-and-fast rule about how to make things build for COMPILE_TEST, you're just trying to make things build so that changes across the tree (eg to common APIs) get picked up by the build bots. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] Need help building a driver: mt7621-pci 2020-10-20 11:32 ` Matthew Wilcox @ 2020-10-20 11:52 ` Deepak R Varma 0 siblings, 0 replies; 7+ messages in thread From: Deepak R Varma @ 2020-10-20 11:52 UTC (permalink / raw) To: Matthew Wilcox; +Cc: Julia Lawall, outreachy-kernel On Tue, Oct 20, 2020 at 12:32:22PM +0100, Matthew Wilcox wrote: > On Tue, Oct 20, 2020 at 09:08:36AM +0530, Deepak R Varma wrote: > > On Mon, Oct 19, 2020 at 08:18:03PM +0100, Matthew Wilcox wrote: > > > It's useful for drivers to build on all architectures by depending > > > on COMPILE_TEST. You will probably have to provide a lot of dummy > > > interfaces; the only requirement is that the code build, not work, > > > since it almost certainly needs to access hardware that only exists on > > > the Mediatek platform. > > > > Thank you. Tried a couple of times with different selections however, > > not able to get across this error: > > > > make[4]: *** No rule to make target > > 'drivers/staging/mt7621-pci/pci-mt7621.o'. Stop. > > make[3]: *** [scripts/Makefile.build:475: __build] Error 2 > > make[2]: *** [scripts/Makefile.build:500: drivers/staging] Error 2 > > make[1]: *** [Makefile:1777: drivers] Error 2 > > make: *** [Makefile:335: __build_one_by_one] Error 2 > > > > It looks like a generic error message and lot of possibilities while I > > try to explore it myself. Any quick suggestion on what is wrong will > > be time saving. > > You need to go to the Kconfig file and change: > > - depends on RALINK > + depends on RALINK || COMPILE_TEST > > Then you'll need to add dummy definitions of various things to make it > build. Commit 171a9bae68c72f2d1260c3825203760856e6793b shows me doing > horrible things to the Octeon driver to make it build on any platform. > It's a mixture of adding structs that I copied from elsewhere and > making random #defines. There's no hard-and-fast rule about how to make > things build for COMPILE_TEST, you're just trying to make things build > so that changes across the tree (eg to common APIs) get picked up by > the build bots. This is really very useful information. I will definitely attempt this once I am done with the current patch work on a different driver. Thank you very much Matthew. Deepak. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-10-20 11:52 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-10-19 16:20 Need help building a driver: mt7621-pci Deepak R Varma 2020-10-19 17:01 ` [Outreachy kernel] " Julia Lawall 2020-10-19 17:17 ` Deepak R Varma 2020-10-19 19:18 ` Matthew Wilcox 2020-10-20 3:38 ` Deepak R Varma 2020-10-20 11:32 ` Matthew Wilcox 2020-10-20 11:52 ` Deepak R Varma
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.