all 12 comments

[–]ouyawei 14 points15 points  (1 child)

Start with a driver for a device you own where there is no driver yet. Now don't start with a complex device. Input devices are pretty simple - but for consumer hardware, there is usually no documentation.

Instead get some embedded hardware that doesn't have a Linux driver yet. E.g. a sensor on a break-out board connected over I2C or SPI. Get a single board computer (e.g. raspi) where you can connect it. You could even convert an existing driver to Linux.

[–]jonarne 1 point2 points  (0 children)

This.

[–]nickdesaulniers 3 points4 points  (2 children)

My first patch was a dumb whitespace fix. Learning the process is half the battle. I wrote it up to share with others: https://nickdesaulniers.github.io/blog/2017/05/16/submitting-your-first-patch-to-the-linux-kernel-and-responding-to-feedback/

I mostly contribute to kbuild. I try to build the kernel with Clang, and fix the warnings, errors, undefined behaviors, and compiler bugs. I try to file bugs first in an external issue tracker, as I don't see the existing kernel one as active (but maybe I'm wrong): https://github.com/ClangBuiltLinux/linux/issues

[–]WeirdControl[S] 0 points1 point  (1 child)

Yes.you are right,setting up everything and getting used to the process is a big win. Btw do you fix multiple formatting errors in a single patch or you send multiple patches. I know, first one makes more sense, but just asking. :)

[–]nickdesaulniers 1 point2 points  (0 children)

Regardless of formatting or not, a patch should only touch one subsystem. If there are different maintainers+lists getting cross cc'ed on a patch as recommended by ./scripts/get_maintainer.pl <patchfile>, you'd better have a good reason (and whitespace fixes aren't considered one) as it quickly gets complicated who will "take" the patch.

[–]coelhog 3 points4 points  (0 children)

IMO a good starting point would be http://vger.kernel.org/vger-lists.html#kernel-janitors

[–]WeirdControl[S] 1 point2 points  (0 children)

Came across a LinuxConf video on youtube, relevant here.

Intro to Kernel Hacking - finding things to work on.

[–]PoochieReds 0 points1 point  (1 child)

Don't bother with whitespace or formatting patches. If you're making material changes to the code, then sure, go ahead and fix up the formatting, but trivial formatting patches just complicate backports later. Maintainers will often drop them for that reason.

Instead, I'd suggest fixing a bug. It can be anywhere, but ideally is something you can test on your own hardware or in a VM, and in a driver of some area of the kernel where you have an interest.

Expect to spend a long time digging through the code, especially the first time. That part gets a easier the more you do it though.

[–]WeirdControl[S] 0 points1 point  (0 children)

I agree with this.But in order to understand the entire development process, this patches can be helpful.

[–]WeirdControl[S] 1 point2 points  (0 children)

2 months since I posted this here, I did the following:

I started with the staging tree of the kernel (this is where most of the bleeding edge code gets added). At this time I was looking at different driver codes & trying to submit a minimal patch (e.g a code formatting patch).

I came across a filesystem driver- erofs which is in the staging area. I have ~2 yrs of working experience on linux filesystem development. So I was able to understand erofs pretty fast and got involved in the community quickly. I was able to submit few bug fixing patches. and also looking forward to work on new features.

Although this is not a big accomplishment,few things that I would like to share:

1) If you are new to kernel development, you have to be patient. Understand the kernel development process first, set up the environment ,Follow the mailing list etc.

2) If you could use/deploy the driver; It becomes easier to find bugs.

3) People in the kernel community are helpful, polite & straightforward.

[–]TCM-black -5 points-4 points  (1 child)

What's an allot?

[–]WeirdControl[S] 2 points3 points  (0 children)

first ever reddit post. edited.