Hit a wall with linux device drivers by Jonathan Corbet

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ggodw000
Member
Member
Posts: 396
Joined: Wed Nov 18, 2015 3:04 pm
Location: San Jose San Francisco Bay Area
Contact:

Hit a wall with linux device drivers by Jonathan Corbet

Post by ggodw000 »

https://www.oreilly.com/library/view/li ... 596005903/
I followed examples can not get past initial hello example.
Starting scull driver examples, code samples are deficient so I looked around above url to see complete source for scull driver but none.

Has anyone studied this book before and wrote the driver in the example?
Or any other device driver book (newer) that has complete code examples?
Thanks.,
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
ggodw000
Member
Member
Posts: 396
Joined: Wed Nov 18, 2015 3:04 pm
Location: San Jose San Francisco Bay Area
Contact:

Re: Hit a wall with linux device drivers by Jonathan Corbet

Post by ggodw000 »

looks like I managed to locate through web search on github:

https://github.com/starpos/scull

However there seems to be a serious build problems building with 5.x kernel when it is written for 2.6 kernel. I will try 4.x kernel.
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
nullplan
Member
Member
Posts: 1790
Joined: Wed Aug 30, 2017 8:24 am

Re: Hit a wall with linux device drivers by Jonathan Corbet

Post by nullplan »

Linux has no stable internal kernel API or ABI. Therefore, modules written for 2.6 do not necessarily work for anything else. You are going to have to get the source code for the version the examples were written for. Having an upgrade guide would be nice, but I know of no such thing.
Carpe diem!
Post Reply