Need help building a driver: mt7621-pci
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.
Quoted 9 lines · Deepak R Varma
Hello,
I have made a change todrivers/staging/mt7621-pci/pci-mt7621.cfile 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
Quoted 21 lines · Julia Lawall
Quoted 9 lines · Deepak R Varma
Hello,
I have made a change todrivers/staging/mt7621-pci/pci-mt7621.cfile 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.oYou can look at this blog about cross compilation:
Quoted 8 lines
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.
Quoted 4 lines
Signature · 3 lines
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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/alpine.DEB.2.22.394.2010191858240.2781%40hadrien.
Quoted 9 lines · Julia Lawall
Quoted 8 lines · Deepak R Varma
Hello,
I have made a change todrivers/staging/mt7621-pci/pci-mt7621.cfile 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.
Quoted 6 lines
Quoted 1 line
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.
Quoted 15 lines · Matthew Wilcox
Quoted 14 lines · Julia Lawall
Quoted 9 lines · Deepak R Varma
Hello,
I have made a change todrivers/staging/mt7621-pci/pci-mt7621.cfile 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:
Quoted 7 lines
Quoted 1 line
make.cross ARCH=mips olddefconfig; make.cross ARCH=mips clean
drivers/staging/mt7621-pci/pci-mt7621.oIt'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.
Quoted 17 lines · Deepak R Varma
Quoted 5 lines · Matthew Wilcox
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
Quoted 3 lines
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.
Quoted 27 lines · Matthew Wilcox
Quoted 17 lines · Deepak R Varma
Quoted 5 lines · Matthew Wilcox
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 2Quoted 3 lines
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
Kconfigfile and change:(quoted diff) +1
-1- depends on RALINK + depends on RALINK || COMPILE_TEST
Quoted 8 lines
Then you'll need to add dummy definitions of various things to make it build. Commit
171a9bae68c72f2d1260c3825203760856e6793bshows 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 forCOMPILE_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.