Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Linux kernel simple tasks for newbies or anybody who wants to enter to kernel development
The below list of tasks for Linux kernel is in completely arbitrary order by
complexness, tree wideness, etc.
1. GCC warning: dubious: x | !y: `git grep -n ' | !'`
2. Check for possibility to use %*ph: `git grep -n -i '%02x[ :-]%02x[ :-]%02x'`
3. Any of custom code that implements already provided extensions described in printk-formats.rst
4. driver_override_store() unification (manipulation with strings)
5. Run `codespell` across drivers and subsystems
6. Fix ioremap(..., 0) [size = 0] across architectures, now some return NULL, some return address, some may even have leaks
7. Common helper to search for magic inside BIOS region: `git grep -n -i ' = .*0xf0000[^0-9a-f]'`
8. Handling "(null)" (string!) inside the kernel, no generic for it present: `git grep -n '"(null)"'`
9. Avoid include kernel.h in the other headers and in some cases *.c files: `git grep -n -w '#include <linux/kernel.h>'``
10. Unify vdso2c.[ch] for at least x86 and sparc under scripts/vdso/
11. Fix the driver ->probe() when DEBUG_SHIRQ is enabled
12. Extension to print "Enable/Disable", "On/Off", "Yes/No", etc. Perhaps 2D array of capitalized words and then %pY/%py with a modifier, one of 'YyNnOoEeDd' (Nn and Dd basically aliases to Yy and Ee respectively), for example, %pyy: 'yes', %pYy: 'Yes', %pYY: 'YES' and so on. Also needs a common type (bool, int, unsigned int?) to pass as a pointer to. The counterpart is kstrtobool(). Do we need '01' to be added? Also %pY/%py just to print 'Y' or 'N' as can be used in sysfs. `git grep -n -w '%sable'`, `git grep -n -i '%s.*yes.*no`, etc.
13. for_each_pci_vga() macro implementation and use: `git grep -n -C3 PCI_CLASS_DISPLAY_VGA` (also see discussion https://www.spinics.net/lists/platform-driver-x86/msg22659.html)
14. Ideally headers in platform_data (include/linux/platform_data/*.h) must not include functionality stuff like kernel.h (also see 9. above), ioport.h (timer-ixp4xx.h) or alike
15. Get rid of legacy platform data. In many cases platform data may be replaced by corresponding lookup tables (GPIO, regulator, PWM, etc) and software nodes. Look for candidates by analyzing contents of include/linux/platform_data/*.h. The example is in `git log -- drivers/mfd/intel_quark_i2c_gpio.c`.
16. Replace custom implementations of sort() / sort_r(). Can be partially found with help of `git grep -n -w swap`.
17. Convert struct dw_dma_platform_data to software node and update all users.
First of all, before starting the job, do evaluation on the following topics
(use score 0 -- I have never ever knowledge in the area, 10 -- I'm an expert!)
1/ C language
2/ make, shell
3/ Git Version Control System (from user perspective)
4/ Linux kernel building / configuring
5/ Linux kernel internals in general
(like knowing what subsystems are, how they are related to each other, etc)
6/ contributing to or participating in open source projects (which ones?)
Helpful links to learn about above topics:
1/
2/ http://opensourceforu.com/2012/06/gnu-make-in-detail-for-beginners/
3/ https://git-scm.com/book/en/v2
4/ https://kernelnewbies.org/KernelBuild
5/
6/
Second, choose the area you would prefer to begin with
(Nobody can cover entire kernel, so better to focus on few topics)
For example, I can help with the following topics:
- generic library functions (lib/ in kernel source tree has a lot of examples)
- generic architectural code (which architecture? x86?)
- enabling drivers for ACPI based platforms
- drivers for GPIO, pin control, SPI, I2C, DMA, PWM devices and so on
- sensor support (drivers for IIO)
Most of the mentioned stuff might require hardware on hand, so, it would
be nice if you can test on the real devices the modified code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment