Merken

Linux Kernel Development for Newbies

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
OK hello everybody had I am monitoring and last year I started to have the idea of the participating embedded in the development of the Linux kernel and and uh government good with lot knowledge boxes and so I decided to give a presentation to show this with everyone a quick show of hands who has really using Linux OK have to who has ever compiled their own calendar good as anybody already contributed to the common what at greater thing that but it's there I think so in and about what wrong to 15 those 25 years ago actually in the 19 91 linux-kernel earlier has been solids that's wrote this e-mail to newsgroup for announcing his projects that in and he said it would be just a small project just all the nothing big and professional and actually now all in the year 2015 it's now probably 1 of the most important of projects components and because it actually runs everywhere in millions of computers and um and and although he said that back then it's just a hobby nowadays the contributors look like this this is a list of contributors in the 314 kernel and as you can see the most of of the number 1 is entailed use return you see a lot of the companies you know don't see economical heal somehow they don't contribute to the kernel at least pretend that and but you also see on the 2nd Reading but there are developers without affiliation and the full range of developers which other QuickDraw opment could find find out who those who did we'll develop really to which company belongs to or the companies said that they don't they don't want to publish that they contribute to the Linux kernel parts as you can see that the 2nd most and maybe even if you think about the 4th rank and there is still a big amount of of obvious um contributing to move through the Linux kernel and although it's quite professional now we need for the development there are new developers needed and yeah of course if they exist they learned before the go to company how to contribute to the Linux kernel is always a plus and so what on should you start that coming then of course if you have a back in the kernel on and you find this on your computer that you do probably 1 of except and and so this what could be 1 of motivation the number simple motivation is just that uh that's you 1 of you that you you you you you and show the world that you can do this and so what sets of my thing if you can say that you contribute to the Linux kernel although it or even if you just contributed a few patches that and maybe your
motivation is just to play tricks on you colleagues there is for example kernel modules called Proneural and so if you install this on your computer everybody that who opens an MP 3 on the computer will get this famous song of Greek athletes so maybe this is also you integration thoughts and and also what will happen if you become a contributed to the experiments bridall of patches and the industry will you will notice that and if you show that you can do good work you yet they will get in touch with you and maybe if you wanna get a job there then this is that is 1 way to do this and and on the other hand if you contribute to the Linux kernel you help the whole community on the on the planet who uses this software and it's uh it's also a nice to know that your software will run on a lot of big machines all the data centers around the planet and will also affect everyone in their everyday life so what what so there are actually 2 required to countries contribute to the Linux kernel well there are mainly 2 when skills you would need 1 of course there's knowing knowing that this was control system how to to deal with a lot of great limits How can help to create patches the this is mandatory ends there's an optional and required special skills which is the C programming language and that actually you don't have to know C to contribute to the kernel there are also people who who just expelling air also all Orphic documentation and stuff like that so you don't have to be in advanced the developer to contribute patches to the current that I but usually when you do yet when you want to contribute to the Linux kernel is the question is what do you want to do so you have to find out what should be a task when you when you start developing because usually I mean as I mentioned before maybe you see that's a part of kind was really bad documented and the development the really spend a lot of time uh showing how how certain 1 you works so maybe a 1 1 option is to to when you see that the part badly documented and you have a hard time to find out how it really works you can contribute to the documentation and and other everyone who also use the same part of the gun or maybe you have a new gadgets and so it doesn't really work sometimes this is really simple sometimes the kernel actually would already knows how to how to deal with a certain device for example if you have some use these gadgets and the latest generation there is already driver but the driver doesn't know that it also supports this thing so they're easy patches so that he can contribute to the Linux kernel just by telling the Linux kernel yeah this driver actually also works for the gadget with this use the idea that
Boris I said before maybe you have a contract and you will you wanna find you you find out when they find out how it out you know what the actual buckets and fix it them and there's another opportunity also to to and get better skills in C programming is just by reading the code do coach review and so the quality of the common pretty good that so you learn new stuff when you read it spots and then sometimes you find that when you read it and then you can the infectious and fix this but other parts of the new experiments are not so uh well written and when you read this stuff you already noticed that there are parts that can be really refactored or parts that can be matched so refactoring the coaches also the possibility there and that let's say you already found to task and and I don't know if you could you you you you when trade at the patch for the kernel than that the bequest
in his whole to something about the general idea is in this 1st you close the kernel source then you do your comments that you did you change the code you create comments and depending on how complex of this stuff is that you doing you really must repeat this step you straight several comments sometimes just 1 comment that in the end if you run into strips once is taking a patch and the other 1 is determining how which maintenance are responsible for the code and OK the 1st step following the source there is In this talk has get repository on GitHub blocks this is not the right source for developing the Linux kernel and sending patches to linear store waltz uh get top repository wire pull request won't be except and of various become adults all domain and there are also as has its own repository but when you develop patches it should be against the limits next repository which is the maintained by a great problem so this is the very long idea the URL and it's about 1 . 7 gigabytes of but you have lot of but then you have the history of the Linux kernel that to version of 0 . 1 or something like that so of source code and history and what you would get is a structure like this and this is directories in the domain of Main directory and yeah you can see that there are still there stuff like here I don't because but and like directories with architecture dependent stuff and this is probably not so important for when you start developing staff of the no what device drivers are in this directory cryptographic functions this is a very nice directory the documentation there is a lot of stuff explained even what you would expect to how to set up I think but also no the we how to fall or something out purine and client client to say so some patches and stuff like that and this is 1 of the largest directories the drivers these power and the device drivers so for all the USB stuff BCI stuff and so all these things there are there are other drivers in this directory the file system logic is fly to Europe and memory manager when this next directory is not for the for the for the for the good drivers for network cards for this would look the logic for example the implementation of TCP is in there the and then you have some system and stuff like that that and when you search for here in this in this directory for to do files you want to find in this case the 64 or maybe this is a little bit on this so this this number and so a lot of developers created 2 files and this approach from what they wanted to and what they actually don't want to do and what other people there to do so if you're looking for a task for conic programming you can look into with do size and there are often quite a lot of quite a lot of nice task to start with but when you get a bit of stuff and time when you there's this nice coding style 5 bands that are just a summary for that you use tap inventions line verb is about 80 characters the term I think about at the characters because nowadays is not so that streams are large enough to to show more than educate characters and sometimes it doesn't make sense to break uh just at 80 characters and just so this just to be compliant to the coast becoming style so you can get up to the moment Monday or whatever but if you have more characters in 1 line there's probably was something wrong with the code and is trying to express too much in 1 single line and you should break it should break the line and is and another advice is writing clean code there was a nice talk yesterday by uh Lauren Mitchell I think about how to create patches and what you have to remember when you write patches for open source projects and I would recommend to to watch this you again that but in general you keep should keep in mind that they these people don't want any junk in their in their source codes and that these people have to understand to what you're doing and why you're doing it and that's why they should accept your actually if you should really try to to right good codes and if you do a lot of comments the plenty stuff into several if you do a lot of people and lot of patches systems that kiss suffering in in the in the individual commits to let the people see you how old how you will fault walls and this also if you provide new coach you should the code should be that should not trade compiler warnings because they are really annoying and yeah that's and sometimes the compiler warning really is the warning is just as notice and you should really fix what become warning says face and the you should I think it's a bad idea to just grab the Linux kernel look for which which part of the code generates a compiler warnings and just fix the combiner warnings because just fixing the compiler warning that if exit is sometimes pretty easy you just have to cut costs and an integer into integer with 46 that's or something like that but when you're not in need you don't know the details of the code you actually don't know why the compiler warning actually
arises so I would recommend not to say on the 1st month 1st task I choose the fixing compiler warnings because it can be dangerous there and it's when you create patches it can be I would recommend you just creates a very simple patches in the beginning just to get to know the workflow to find out how it works so there was a project called the kernel genitals that they still have a website but that's I think it's from 19 in the 2009 and not changed things there and a list some some tasks that should be done and at the beginning I chose the task to to modify time comparison so this difference is the time counter in the Linux kernel and when you have this raw comparisons with the region variable you can get arithmetical errors which was so it was to propose that all these all these all these comparisons should be modified to use this function which is safe against these kind of arrows and the 1st thing I did was just fixing some occurrences of this stuff and 3rd after while and a few people are some people people that notice that I sent a lot of patches and ventilation in e-mail and sent me the the regular expression and told me I you know you can use this regular expression to pass the linear source code and fix all all all of this stuff and so they really notice when you when you contribute stuff like that the all this in is that you quite nice example also but it's just the various tiny change in the in the source code but it makes sense it's I mean for the bentonite if the maintainer gets this patch you can immunity OK what is what what should this you and actually when you just see this modification this end-to-end an L it's not it's not clear why that's why the way you should include this change so so you should always take care when you create a commitments messages which in this case here that you really in the 1st line of the commit message explains what you're doing and more not exactly what you doing but why you're doing it so the 1st line should should should should include the information why is this change in what and why should maintain include your patch and June to the source and then you have a free line and a longer text describing the stuff sometimes you don't need it sometimes really important that included because otherwise nobody will get twice what you're trying to do with with with 0 the modification that another thing about this comment messages this let's use starts becoming messages will usually with modular cure unifying this is the fact that the modified and 3rd yeah this directory and you usually concludes that so when you look at the whole history of golgi block you can easily see which part of the was changed by which commits and thing about that commit messages is um part of blame it's called the this signed off by line so when you are you are creating patch you must always include in your the Committee line which is saying signed off by and new name and your e-mail address them and and because any modification in the kernel any person changes but there's a bit in the kernel such as a bit in the kernel this is is registered by such as signed off by a line there there also attested by being and stuff like that so you know and if you send this stuff to e-mail to e-mail list and other people have or have checked you codes they will send you an e-mail saying signed off by a novel about somebody else at the end you can it in your commit message to show other people that these are the people also at the beginning you agree with the code that can as and actually were nowadays that expression suffered a level of and there was a lot of new stuff like like unit testing and stuff like that there and this is not so much time in the in the Linux kernel it's sometimes even possible that you group created the patch and just check if copy of it compiles and then send it to maintain it to in the in the source code because sometimes you modify codes that you don't have default for hardware that you don't have and so that's it's not possible for you to test that what's as long as you really there are sure that have hatched does not create an arrow it's fine not really needed to run the code just true to catch the age-adjusted compiled code is of course this is not true for big changes for the changes really hard to to assume that the code is fine without really running at what they're for 1 one-liners 1 9 modifications as but the problem and once you've created your patch you can around the catch check patch script against and the Czech patch scripts that can be of wider and this is 1 of the of the 1 1 1 of our 1st patches these modifications with the comparison of of difference and so you had an R was used to used to my own coding style so those of so the script 1 of the the things that trip does this checking decoding silent as you can see here there's a space missing meanwhile already changed my personal coding style to match with the kernel coding style so it tells you these these these it tells you these symbols and that our coding style errors but it also checks more complex stuff like that brocade functions that way if you if they use they
give it gives a warning and tells you know this is deprecated you should choose another function and that would also sometimes happens this year but you the need for ghosts to include the side line in your comment message and it also check stuff like that them and let's assume assume I think you know have created to purchase and you may be even precedents for your hardware so if you have the the software and you randomly checked batch scripts and everything is fine then especially in the very beginning I would say OK and go away from a good Computer go outside the core go for a walk or whatever and then come back and have a look at the code again and check if it's really gets that there is no and benefits if you can refactor it to make a little little bit better so as to make it easier for the maintain to see how this patchwork and if everything is fine with that with the patch you can run the it get to maintain a so that a script against and what would this we will do it would check all the files that are touched by attacked by by a patch and find out who is the maintain of this file and will print this list for the and stuff like that here and there's quite a low number of of of maintenance themselves just these because the data to Europe and the if you touch the needed for animals the network stack for example that you will get a quite a long list of but I do and if I just include the main out of the 5 most important people and sent and they should be the mayor and but you should always includes the mailing lists which is here the mailing list for all the network devices and be completes the Linux kernel many men in this so this last mailing this is really huge there are hundreds of patches going we're going there every day and I wouldn't recommend to assist subscribe to this Melissa just look at the archives there but he that this dispatch to the maintenance and there is actually a special function that you you don't you do poorly press or something like that with our power works for the Linux kernel you can configure and I think you should configure their he gets to do this for you because what from what I heard that there are a lot of problems with you know programs they introduce line-breaks somewhere or suggest scramble with the with a patch and so it means that the people won't get the right at the correct and so setting up then it for that there are patches on this is how to for this online and as if you just have to to tell the system as in the case of 0 and the parts within and patch then and then you where the mets and depending on how many people are interested in in in this part of the Linux kernel you will get you other quite quickly or not so quickly that it and yeah if you if you do if you start with that 1 line is really that it's quite likely that you patch will be accepted and if you do bigger modifications it's quite likely that they come back to you and say I OK I don't I don't like this part where you do this maybe some people even say OK that's the transport is what you doing that box if you start with the simple patches and it's quite likely that the accepted the new them and it's a here that yeah that doesn't only help you when you therefore it even if you if you don't want to come and then discarded contributed it doesn't really help you if you do just need do just once or twice the fun because you learn how to combine development works and a wondered aloud at work this big kernel crash that frequently and so I decided OK must find out how to fix it and it was in some catching function of the Linux kernel and and when you learn to to create patches for the Linux kernel you learn what information that you should provide to maintain and to to help them to fix fix stuff and so I got in in touch with the maintainer so I use this get maintain a script to find out who is responsible for for this slide and then and there yet he was David's holds at right at and he was really helpful so we fix it this this stuff within 1 week and so as you probably know there are only 2 things and computers to help thinking of the signs ones has invalidation government wants menacing things and here it was cast investigation and something else that yeah I mean and that this was 1 of my precious little so I reviewed some coach country you I in the DNS resolver uh so just read the code and special something is up there at and I found out that there is a 1 of my 1 error right and the so I created the patch no it wasn't really my best day because actually the patch that I created their work include the inverse of but so I I think the off-by-one error you and introduce brought here so this was a little bit embarrassing to to be honest and some and I sent this mail to it dispatched to the uh to some mailing lists and it within a few minutes I got in the various things off by 1 or so for that immediately so of course this is embarrassing and the parts from a lot of people that they are actually afraid to contribute to the Linux kernel because is that in the press there is a lot of bad news and sometimes there are people who are not so nice things and and and child at you and uh there also there's also community and the within the Linux kernel community you don't wanna 1 so harsh discussions what I always
think when I get new medicine but like that's the on the controlled get away from the will not come back become half an hour later and try to see what is the real sort of criticism what is actually a wrong with you so you're you're patch and how can I fixes and yeah you shouldn't really you should really shocked that because this is leading nowhere there and then yeah there is 1st of all of them and they did this and this great source of information in the documentation for the faults there is also the common these websites and they have a great information about the developing developing the labeling of and have this and they are really they're really nice people there are either no hundreds of people and know was talking and so when you sense that women when you go there you can ask questions and they're very helpful and yeah when you have questions about code you can ask them and sometimes also if if you no it's not directly about colds if you are asking how I wanna modify this part and there is a dependency on another part of the problem will how should I how should I start doing this and so there are really nice and helpful there and there is maybe some of you know this there's this Linux inside and it's book was quite a light source for example there's a description of what are the 1st steps that the king of the Linux kernel also to initialize part where are and how does it to memory management and stuff like that so this is a nice sauce to find out how stuff works in the current that yeah I think that's already at the the any
questions trust the you of all all anonymously has that I the moon I'm not sure I don't think so because they always have the possibility of that you have read in the year that so long as all all all that I have to repeat it for the for the for the video again so there's no way to submit to the real patches and anonymously what's I mean you can create a picture you could get greatest fake identity or they can create a fake e-mail addresses and the sense sense of like that but but I don't know if it's really so sometimes in the vectors is that this there are 2 unknowns because you couldn't really find out from the e-mail addresses of aware of this if this person is there is a as a professional 100 which are much but in general and no it's not possible to do this and yeah that I have but what why would you we do not have a positive answer but it be that it is it is is it all all right the I will I usually just create new branches here and there I create a new patch thousands of years and then nice synthesis of knowledge and so I try to manage the the communication about the patches in my e-mail program in different sub for us to keep track what patches are accepted in which 1 of the and you know I do this but yeah from the code just create new branches and because I had the this kernel is also quite big so if you go copy those those at repository that you would get a lot of this space wasted it the world this is the what that the because he was 1 of the dude with the container refactoring it's not to get into the conflict with other people that this is actually quite apart from this level you have to try to create a good codes and so that the management really can understand you folks coat quite quickly and so that you you your stuff is included the quickly in the in the kernel before familiar everything exchanges and but I think that there are also I mean there are also other repositories for I think that for example network guys have their own repository and their changes on interview with all stuff and depending on the properties change there might be different repositories that you should there no but then you can send them in this mailing list there our there are hundreds of humans anyway so if you announce this this hands the above upper we book but anyone but yeah I mean if you I don't know a whole we you changes should I mean you should also try to drink could just the small changes and if you created big modifications is less likely that they are accepted because they destroy everything and I remember the story that once some guy and years ago some guy change a big part of the network stack and the than a week after his e-mail address there was a problem with this stuff and the merit address was deactivated so the account was the activated and the person was gone and they had to do with the size of the smaller is the more likely it is that the acceptance and and I also give this presentation somewhere else and they are somebody came to me after the talk and told me that he created a whole boss a implementation of a robust the best that let us write the administering Linux right now doesn't support and you don't need that he was just
afraid to send it to the Linux kernel mailing list because you have that's it from the press that that there is always had such a hard discussion and so I think this is really not necessary and you shouldn't really have a big a there shouldn't be a big barrier to come to contribute to the Linux kernel and I think the come new reduces the nicer source for for help that and the and also with what is the use of all the it will also I don't know if you all in all it was 1 of the that you know in and advanced I it is you then there is the unit testing for America I think right now in the heart the pattern in which the literature you some actually to be honest I don't use it's been nobody is I just have him as well as here quite often there's that's if if it wants it works so that's the only that's and useful for device rivals this probably right lots and yeah which ideas do I use of life depends on it maybe next so because of maybe just or I think that the idea is not really so important for for developing the code and because I don't know when he delivered the conventional look in the documentation for them or invent some some some cross-references in the C code there is a nice website which I can't remember right now we can look up where is a certain function decorated and to the the I am and acts as far as we are not free electrons but yeah that the who would be the same as the 1 I mean of course you can contribute that patches I wouldn't do this in the very beginning of the so called because so much but of course I mean if you if you have a great patch and it really makes sense to include it and fix the stuff for today reflect the stuff in that way then it will be accepted that's that's not the problem but that the more you touch the more you break it can break and then you have to take him that of the the fact that that doesn't always do 1 thing in 1 commits and 1 thing and what have and said don't mess stuff stuff together right this 1st of to we all of the the and the move and in the last residue the 1st this released every roughly 6 week something like that and moves actually I think it's quite fast the to be honest I don't freely I uh I I can't I can't tell you timeline but I think within a few weeks or a month that will be in the main line current so do you have any and in which it 1 of the that in the news all the other that so it shouldn't take long maybe a few weeks maybe a very few months but this appears to be fast enhanced I can also recommend so there are on you tube there are a lot of videos of regret crawl Hartmann there where he explained except explains exactly how it works and even those that writes the patch during the presentation and sends it out and they can nicely see how that really works I wanted to recommend that if you they had to to watch this video but that was before I ahead and much
Stereometrie
Kernel <Informatik>
Offene Menge
Quader
Zahlenbereich
Computer
Computerunterstütztes Verfahren
Kombinatorische Gruppentheorie
Computeranimation
Kernel <Informatik>
Metropolitan area network
Spannweite <Stochastik>
Freeware
Rangstatistik
Total <Mathematik>
Vorlesung/Konferenz
Zusammenhängender Graph
Softwareentwickler
E-Mail
Güte der Anpassung
Mailing-Liste
Patch <Software>
Software
Menge
Mereologie
Projektive Ebene
Maschinenschreiben
Kernel <Informatik>
Regulärer Ausdruck
Computer
Code
Kernel <Informatik>
Rechenzentrum
Task
Virtuelle Maschine
Task
Prozess <Informatik>
Software
Regelkreis
Inverser Limes
Vorlesung/Konferenz
Softwareentwickler
Optimierung
Programmiersprache
Videospiel
Integral
Konfiguration <Informatik>
Design by Contract
Patch <Software>
Generator <Informatik>
Druckertreiber
Mereologie
BORIS <Programm>
Router
Bit
Komponententest
Momentenproblem
Compiler
Adressraum
Gruppenkeim
Versionsverwaltung
Hinterlegungsverfahren <Kryptologie>
Raum-Zeit
Kernel <Informatik>
Metropolitan area network
Streaming <Kommunikationstechnik>
Arithmetischer Ausdruck
Client
Kryptologie
Gruppe <Mathematik>
Skript <Programm>
Dateiverwaltung
Vorlesung/Konferenz
E-Mail
Default
Gerade
Lineares Funktional
Hardware
Datennetz
Dokumentenserver
Güte der Anpassung
Ausnahmebehandlung
p-Block
Quellcode
Linearisierung
Softwarewartung
Ganze Zahl
Ablöseblase
Projektive Ebene
Information
Verzeichnisdienst
Ext-Funktor
Message-Passing
Fehlermeldung
Subtraktion
Stab
Mathematisierung
Schaltnetz
Zahlenbereich
Implementierung
Term
Mathematische Logik
Code
Task
Domain-Name
Zeitrichtung
Inverser Limes
Softwareentwickler
Optimierung
Speicher <Informatik>
Datenstruktur
Leistung <Physik>
Kegelschnitt
Schaltwerk
Open Source
Mailing-Liste
Paarvergleich
Physikalisches System
Elektronische Publikation
Chipkarte
Regulärer Ausdruck
Patch <Software>
System F
Druckertreiber
Mereologie
Codierung
Programmierstil
Computerarchitektur
Speicherverwaltung
Offene Menge
Maschinenschreiben
Web Site
Bit
Quader
Schaltnetz
Systemzusammenbruch
Zahlenbereich
Keller <Informatik>
Computerunterstütztes Verfahren
Extrempunkt
Code
Eins
Kernel <Informatik>
Metropolitan area network
Deskriptive Statistik
Spezielle Funktion
Reelle Zahl
Vorzeichen <Mathematik>
Software
Total <Mathematik>
Direkte numerische Simulation
Skript <Programm>
Vorlesung/Konferenz
Optimierung
Softwareentwickler
E-Mail
Gerade
Leistung <Physik>
Lineares Funktional
Torus
Datennetz
Mailing-Liste
Quellcode
Elektronische Publikation
Arbeitsplatzcomputer
Quick-Sort
Packprogramm
Rechenschieber
Softwarewartung
Patch <Software>
Rechter Winkel
Mereologie
Resolvente
Speicherverwaltung
Information
Stapelverarbeitung
Message-Passing
Fehlermeldung
Telekommunikation
Web Site
Subtraktion
Komponententest
Adressraum
Mathematisierung
Versionsverwaltung
Keller <Informatik>
Implementierung
Kombinatorische Gruppentheorie
Code
Raum-Zeit
Kernel <Informatik>
Videokonferenz
Übergang
Weg <Topologie>
Datenmanagement
Mustersprache
Nichtunterscheidbarkeit
Vorlesung/Konferenz
Optimierung
E-Mail
Hilfesystem
Gerade
Feuchteleitung
Lineares Funktional
Videospiel
Datennetz
Dokumentenserver
Spider <Programm>
Logiksynthese
Kategorie <Mathematik>
Verzweigendes Programm
Mailing-Liste
Quellcode
Vektorraum
Kontextbezogenes System
Hoax
Patch <Software>
Rechter Winkel
Benutzerschnittstellenverwaltungssystem
Residuum
Mereologie
Codierung
Offene Menge
Software
Freeware
Vorlesung/Konferenz
Computeranimation

Metadaten

Formale Metadaten

Titel Linux Kernel Development for Newbies
Serientitel FrOSCon 2015
Teil 70
Anzahl der Teile 80
Autor Schölling, Manuel
Lizenz CC-Namensnennung 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
DOI 10.5446/19594
Herausgeber Free and Open Source software Conference (FrOSCon) e.V.
Erscheinungsjahr 2015
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract This talk presents a step by step guide for Linux kernel development. Manuel Schölling

Ähnliche Filme

Loading...