Building cypress broadcom drivers for Xavier NX using backports

I am trying to build the Xavier NX kernel and include the cypress fmac drivers. Since the kernel version is 4-9 I have to use backports to build the driver modules. But I keep getting errors when building the relevant “.ko” files.

I am mainly following this tutorial to build the l4t kernel image:
[NVIDIA Xavier - Kernel]

But after building the image when try to cross-compile cypress driver/backports modules, the make fails. Can somebody explain if the $CROSS_COMPILE variable should be same for both building the kernel image and cypress driver modules. And why do cypress modules make keeps failing?
The cypress README file is attached here : README (21.2 KB)

You can find the cypress driver package here:

Any help in this regard is welcome!

I can’t answer why the driver build is failing if it is a backport. A backport often depends on other features which the older kernel does not have, or else the features may have changed.

So far as the $CROSS_COMPILE goes, this is required any time you are using a host of a different architecture to build a kernel for another architecture. A PC is typically x86_64/amd64 (or variant), while Jetsons are arm64/aarch64. If you compile directly on a Jetson, then much of that complication can be ignored (e.g., you’d never specify ARCH or CROSS_COMPILE when building a kernel for a Jetson while using a Jetson, but you would always specify those when building a kernel for a Jetson from a PC).

The real test is to find out if you can first build with no modifications while using a configuration which exactly matches your running Jetson. If that works, then you could work on the backport. If the configuration is correct, but you get errors, then you would need to post exact errors…but it may not have a simple answer since you could end up going down a long chain of missing dependencies the current kernel does not support. In the best case the kernel driver is new, but does not require any new dependencies.