How to install kernel headers

已查看 41 次
跳至第一个未读帖子

moreno...@gmail.com

未读,
2018年4月16日 08:28:532018/4/16
收件人 Alt-F
Hello,

I'm trying to port the NDAS driver at github.com/iocellnetworks/ndas4linux and one of the prerequisites are the kernel headers one would normally install with something like apt-get install linux-headers-$(uname -r)

Since that's not an option (or is it?) how can I get the kernel headers on my DNS320 running Alt-F 1.0 ?

I'm working in parallel on a Ubuntu PC (the source code needs to be ported for kernel 4.x.x anyway) and there I have the headers under /usr/src/include

Thank you for your help

Moreno

João Cardoso

未读,
2018年4月16日 20:22:102018/4/16
收件人 Alt-F


On Monday, 16 April 2018 13:28:53 UTC+1, moreno floris wrote:
Hello,

I'm trying to port the NDAS driver at github.com/iocellnetworks/ndas4linux and one of the prerequisites are the kernel headers one would normally install with something like apt-get install linux-headers-$(uname -r)

Since that's not an option (or is it?) how can I get the kernel headers on my DNS320 running Alt-F 1.0 ?

Install the dev-bundle and make packages. Then you have to compile *all* required packages...

There are no *-dev or *-devel packages in Alt-F because the boxes are so under powered, some 50 to 100 times slower than a PC, that a simple 1minute compile on a PC takes around an hour on the box... that has been discussed some years ago under another topic. Cross compile, there is a recent Topic under that and a ticket and wiki that also addresses some issues

moreno...@gmail.com

未读,
2018年4月26日 04:08:272018/4/26
收件人 Alt-F
Thank you for your answer Joao

Forgive me but I'm a little lost about the "cross compile" thing: do you think I might be able to do the porting directly on the NAS or should I cross-compile everything on a PC and then flash the custom firmware?

Maybe I misled you when I said that I was working on Ubuntu in parallel. They are two distinct projects, I was hoping that once I learn on the PC all the necessary modifications to compile the old driver on 4.x kernel I could replicate the steps on the NAS (since working on a PC is much faster and they both have kernel 4.x anyway). On the NAS however I got stuck at the first step because I don't have the /usr/src/linux-header$(uname -r) folder

Thank you for your support

Moreno

João Cardoso

未读,
2018年4月26日 13:05:282018/4/26
收件人 Alt-F


On Thursday, 26 April 2018 09:08:27 UTC+1, moreno.flori wrote:
Thank you for your answer Joao

Forgive me but I'm a little lost about the "cross compile" thing: do you think I might be able to do the porting directly on the NAS or should I cross-compile everything on a PC

Cross compiling is the right track. See the wiki "How to build Alt-F".
 
and then flash the custom firmware?

Probably you don't need to flash it, just create a disk-installable package or kernel module.



Maybe I misled you when I said that I was working on Ubuntu in parallel. They are two distinct projects, I was hoping that once I learn on the PC all the necessary modifications to compile the old driver on 4.x kernel

Yes, start that way.
If it is an old device driver (NDAS? I had one such thing years ago, (MEDIATEC?) and always had problem using it in linux. Fortunately it also had a plain ethernet stack.

I could replicate the steps on the NAS

You can't replicate that experience. The NAS is a linux embedded device with its own peculiarities and limitations, it's not a full blown desktop linux with development tools.
回复全部
回复作者
转发
0 个新帖子