-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support 5.x kernels #39
Support 5.x kernels #39
Conversation
See [this update](https://lkml.org/lkml/2019/1/4/418) which removed the type argument.
From linux kernel 5.0
Generic versions of scull_load and scull_unload
Based on original intent in LDD3 to use init_MUTEX() and the fact that this has been deprecated in favor of the [mutex type](https://elixir.bootlin.com/linux/latest/source/Documentation/locking/mutex-design.txt) rework the scull and scullc examples to show the latest mutex design suggestions.
Add basic eclipse cdt project based on the instructions in https://wiki.eclipse.org/HowTo_use_the_CDT_to_navigate_Linux_kernel_source
* First pass attempt to fix aio_read and aio_write functions with read_iter and write_iter functions. Implementation compiles but is not yet tested. See relevant articles: https://www.fclose.com/linux-kernels/572661/aio_read-and-aio_write-removed-linux-4-1/ https://lwn.net/Articles/636466/ https://www.kernel.org/doc/Documentation/filesystems/porting ` https://lwn.net/Articles/535034/ and patch reference at https://lwn.net/Articles/535178/ * Added a scull-shared folder which can be used with symlinks to avoid the need to copy code in multiple scull files. This was useful for the aio refactor since this code was shared across several scull implementations. * Deployed semaphore to mutex transition to remaining files which had not yet been refactored. * Fixed one time reference to work with new API * Fixed makefile to remove SUBDIRS reference and associated make warning.
More semaphore references converted to mutex
To test non blocking I/O on a device
The current implementation uses the same name for every device, which results in a kernel panic on attempts to unload. * Removed init_name on bus device since [this comment](https://elixir.bootlin.com/linux/v5.3.5/source/drivers/base/core.c#L2085) suggests static name devices should be converted. * Fix dev_set_name to use device name instead of hard-coded ldd0 for devices. * Add load of lddbus dependent module when starting sculld
Compile is now working for this module.
@martinezjavier I have included a rollup of changes I've made to support the course I taught last semester. I'm going to plan to keep this updated to support latest Ubuntu builds as well as builds on Buildroot and Yocto versions we use for the course. Let me know if you'd like any changes to these, or if you'd prefer I start a new repo instead. I think there are several open pull requests which are resolved by this one, I've put comments in those as well. |
@martinezjavier and @mbgg are you planning to keep this repository up to date going forward and, if so, would you like to include these commits or should I create a parallel project to track the commits for my class? |
@dwalkes sorry for not answering before and thanks a lot for the patches! I started this repo a decade ago when I was also teaching and haven't really had time to take care of it for years. Some time ago @mbgg mentioned that he was interested in keeping the repo up-do-date but he has also been busy. If you want I can include you as a collaborator as well or feel free to fork the project. For some reasons this repository seems to be referenced in different places so probably would make sense to do the former if you prefer that option. |
@martinezjavier thanks for the response!
That would be great, thanks. I'll still propose all my changes as pull requests from my class repository if you want to weigh in but I'll plan on updating at least once per year as long as I'm teaching my class. I think it makes more sense to keep this repository going rather than starting a new one as yours has been forked/starred most often and it was still the most up to date of the Linux Device Driver book source code I found when I started my class last year. |
@dwalkes Ok, great. I've invited you as a collaborator now, thanks! |
Thank you all guys for kernel 5.x update. I am a newbie of github and try to fix all of snull/sbull/short with timespec64 and jiq/jit/seq with timers. Wish you can try them and I am also going to teach my class next semester with these codes. I have not fully tried all, but I modified them based on a previous version from @martinezjavier and a current version from @dwalkes (cu-ecen-5013) |
@jypan-ccu thanks for your comments and for helping with updates. I have some cleanup I hope to do this weekend in preparation for the semester as well. As for your changes if you could fork this repo and then create a pull request from your fork this will be the easiest way for us to incorporate them. |
A rollup of changes from Advanced Embedded Software Development Fall 2019 semester, focusing on adding support for 5.x kernels, Ubuntu 18.04 native builds, 2018.05 Buildroot release, and warrior branch of Yocto project.
Summary of Changes