OE4T / meta-tegra

BSP layer for NVIDIA Jetson platforms, based on L4T
MIT License
397 stars 220 forks source link

NVS compilation error, kirkstone #1628

Open intera91 opened 1 month ago

intera91 commented 1 month ago
/kernel-source/nvidia/drivers/misc/nvs/nvs_timestamp.c:25:16: error: implicit d$
claration of function 'timespec_to_ns'; did you mean 'timespec64_to_ns'? [-Werror=implicit-function-declaration]
|    25 |         return timespec_to_ns(&ts);
|       |                ^~~~~~~~~~~~~~
|       |                timespec64_to_ns
| cc1: all warnings being treated as errors
ichergui commented 1 month ago

Hi @intera91 Could you please share the steps you followed until having the issue ?

intera91 commented 1 month ago

Just a simple bitbake virtual/kernel after enabling CONFIG_NVS in the kernel as we have an ICM20689 in our production board that is connected to SPI

ichergui commented 1 month ago

I will take a look and will get back to you

madisongh commented 1 month ago

It would help to know which branch you're using, but I'm guessing it's one of the L4T R35.x-based branches with the 5.10 kernel...

The old 32-bit timespec structure, and related functions, were removed in (I think) the 5.6 kernel - part of fixing the Y2038 problem in the kernel. I suspect that NVIDIA just hasn't updated that driver for 5.10, since it's not part of the stock kernel configuration for L4T. Try patching the driver to use timespec64_to_ns instead; since we're a 64-bit architecture, timespecs even pre-5.6 should have been mapped into timespec64s anyway.

ETA: I just noticed that you do mention "kirkstone" in the title, so my guess was right.