Slide 1

Slide 1 text

Let's contribute! Levente Kurusa Presented by Fedora Project Hungary Licensed under CC-BY-SA Linux Kernel

Slide 2

Slide 2 text

Topics 1. Quick introduction 2. Random configurations 3. Kernel testing a. Stable kernels b. RC kernels 4. Checkpatch patches

Slide 3

Slide 3 text

Quick introduction

Slide 4

Slide 4 text

Linux powers the world! Servers! The cloud! Desktop? Maybe this year? Open source contribution is always a big plus when it comes to job search! Linux is cool! Why not? Why?

Slide 5

Slide 5 text

86% say Linux advanced their career 93% of HR will recruit a Linux pro next year 75% already received a call this year! Interesting projects! Greater pay check! (+10% this year) Some statistics

Slide 6

Slide 6 text

First steps Fetch the Linux kernel source code For random configurations: linux-next http://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git For stable testing: linux-stable http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git For Rcs, simply clone down Linus' tree http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Slide 7

Slide 7 text

Eudyptula Challenge http://eudyptula-challenge.org/ Series of programming tasks Hard, but fun!

Slide 8

Slide 8 text

Linux-next The current state of the kernel Merged together by Stephen Rothwell An excellent opportunity to start Default configurations are tested

Slide 9

Slide 9 text

Linux-stable Collection of important patches to old kernel release Backports needed! Maintained by Greg KH and others Documentation/stable_kernel_rules.txt

Slide 10

Slide 10 text

Random configurations

Slide 11

Slide 11 text

Randomized configurations of the kernel Often have a lot of problems GCC warnings GCC errors kconfig errors/warnings They sometimes don't even boot Extremely useful! What are randconfigs?

Slide 12

Slide 12 text

$ make randconfig Completely nonsense config! Try to build it: $ make -j`nproc` Your first randconfig

Slide 13

Slide 13 text

Possible errors Undeclared functions Kconfig circular dependencies Boot failure Test in emulator!

Slide 14

Slide 14 text

Kernel testing

Slide 15

Slide 15 text

Run the latest kernel Quite easy! $ make defconfig $ make localmodconfig $ make -j`nproc` # make headers_install # make install # reboot

Slide 16

Slide 16 text

Actual testing If you test linux-stable ... and things break: Report it! ... if nothing breaks: Break it! (repeat) If you test linux-next ... it's risky to try on your computer

Slide 17

Slide 17 text

Actual testing I use my own tiny project. LATTE – Linux Automatic Testing Tool for Expert (https://github.com/levex/latte) Emulators are great. Benchmarks are also fun. perf

Slide 18

Slide 18 text

perf # perf list # perf record # perf report # perf stat -e

Slide 19

Slide 19 text

Sending your first patch ● Also known as: Checkpatch patches

Slide 20

Slide 20 text

Checkpatch? scripts/checkpatch.pl Checks for common errors in the patch ... and files with the --file switch Not just coding style, but bugs as well!

Slide 21

Slide 21 text

Getting maintainers scripts/get_maintainer.pl Gives you a list of maintainers for that particular patch or file ... or you can manually browse through the MAINTAINERS file

Slide 22

Slide 22 text

Creating the patch $ git reset --hard HEAD [work...] $ git diff [review work...] $ git commit -as $ git format-patch -1 … and then the hardest part

Slide 23

Slide 23 text

Sending it 9 out of 10 will fail this step git send-email Thunderbird and such can do it as well, but it's hard to configure them properly.

Slide 24

Slide 24 text

People on LKML are grumpy! Don't be afraid to ask RTFM Summary

Slide 25

Slide 25 text

Any questions? Licensed under CC-BY-SA @ilevex Contact: