开发者

Linux network driver port to ARM

开发者 https://www.devze.com 2023-03-26 18:51 出处:网络
I have a Linux network driver that was originally written for 2.4 kernel. It works perfect. I want to port it to kernel 2.6.31 and then to ARM Linux with same kernel i.e. 2.6.31. I have actually done

I have a Linux network driver that was originally written for 2.4 kernel. It works perfect.

I want to port it to kernel 2.6.31 and then to ARM Linux with same kernel i.e. 2.6.31. I have actually done some minor changes to the driver so that it is able to compile under kernel 2.6.31 and it also loads and unloads without crashing. It also cross compiles for the ARM Linux. But I am unable to test it on ARM so far.

Ho开发者_高级运维w do I check that the driver is fully compatible with the target kernel, and what considerations shall be made to make it compatible with ARM.

The driver is a virtual network device driver.

Thanks in advance.


Maybe you could use Qemu ( http://wiki.qemu.org/Main_Page) to emulate an ARM platform to be able to test your driver.


You cannot check the driver like that - you have to consider the API changes within 2.6.x series kernel. The changes are quite significant and the overall of the API's from the 2.4 series which is not currently in use.

I would suggest you to go here to the Amazon book store for this book in particular. The book is called 'Essential Linux Device Drivers', by Sreekrishnan Venkateswaran. A very well detailed explanation that will be your guidance in ensuring it works properly.

Since you mentioned the device driver is a network, presumably char device (You're not accessing it in blocks), well, the good news is that the 2.6.x series kernel APIs for the character devices are significantly easier and more centralized to focus on - in fact a lot of the framework is already in place in which the author of said book explains very clearly.

By the way, the book focusses on the latter 2.6.x series after 2.6.19, so this will help you clue in on what needs to be done to ensure your driver works.

You did not specify the ARM chipset you're targetting?

As for testing... well.. perhaps the best way to do this, this is dependant on how you answer the above question to you regarding ARM chipset - if its ARMv6, then perhaps, a cheap android handset that you can easily unlock and root, and pop the kernel in there and see what happens - sorry for sounding contrived but that's the best thing I can think of and that's what pops into my head, to enable you to test it out for ease of testing :)

PS: A lot of cheap ARMv6 handsets would have kernel 2.6.32 running Froyo if that's of any help!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号