Best way to get kernel linux-headers on PX2?


I am looking for a way to inlude linux-headers on PX2, as I have some drivers which I need to compile.
And these drivers need the linux-headers to be present.

Do I need to cross-compile it first and then put it on the image?

I think this command won’t work:
sudo apt-get install linux-headers-$(uname -r)

Couldn’t try it out, because PX2 not by hand right now.

Dear maxlein,

Could you please see below link for your question? Thanks.