Re: What is the fastest way to build and boot a kernel (Manoj)
___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
Code Soldier1 writes: > Hi, > > Can someone suggest what is the fastest way to build a minimal kernel > and boot. For example if I am working on TCP and would like to make a > small change and reboot, what is the fastest way, I rather not build > the whole kernel. > > Thanks FWIW, check this out if you want to have a setup to make incremental changes to your kernel and test them out quickly. It describes a quick and easy setup to test kernel changes on an emulator without acutally rebooting your machine (helps with initial testing) http://www.mycpu.org/kernel-n00b-howto/ I use this setup for testing out small/quick changes. As mentioned earlier in this thread, compilation for incremental changes should not take long. HTH. -- Manoj ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
Joe Smith writes: > In cases where IP rights are an issue Very few maintainers are lawyers. They cannot make that assertion. The administrative rules are simple, both for submitters and maintainers. They have to be. Bjørn ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Thu, Apr 20, 2017 at 10:50 AM, Bjørn Mork wrote: > Joe Smith writes: >> On Thu, Apr 20, 2017 at 9:31 AM, Alexander Kapshuk >> wrote: >> >>> then you just add a line saying:: >>> >>> Signed-off-by: Random J Developer >>> >>> using your real name (sorry, no pseudonyms or anonymous contributions.) >> >> How does anyone know what my real name is. > > No one does. It's up to you to make sure your name is real :) > > An example of what might otherwise happen: > https://lwn.net/Articles/194729/ > > > > Bjørn Excellent example but please note this " For this reason, people contributing code which demonstrates *deep knowledge of undocumented hardware* will often be asked just how they came by that knowledge. Verifying the answer can be difficult, however. Our defenses are thin, but it is hard to see how they could be improved without killing the process entirely." In cases where IP rights are an issue I can understand requiring someone to reveal their true identity. Other than that I don't see any reason not to accept an enhancement or bug fix to Linux Kernel coming from an anonymous source. If there is an IP issue, the submitter could reveal their identity to a select group of people or not as the submitter did in this case. If we need to really enforce this requirement then one would have to sign a legal document -- Some software contributions do require that. -- JS ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
Joe Smith writes: > On Thu, Apr 20, 2017 at 9:31 AM, Alexander Kapshuk > wrote: > >> then you just add a line saying:: >> >> Signed-off-by: Random J Developer >> >> using your real name (sorry, no pseudonyms or anonymous contributions.) > > How does anyone know what my real name is. No one does. It's up to you to make sure your name is real :) An example of what might otherwise happen: https://lwn.net/Articles/194729/ Bjørn ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Thu, Apr 20, 2017 at 9:31 AM, Alexander Kapshuk wrote: > On Thu, Apr 20, 2017 at 7:20 PM, Code Soldier1 wrote: >> On Thu, Apr 20, 2017 at 1:21 AM, Sébastien Masson >> wrote: >>> >>> On 2017-04-19 20:26, Code Soldier1 wrote: On Wed, Apr 19, 2017 at 3:32 AM, Tobin C. Harding wrote: > > On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: > [snip] > > Why the moniker? Why not ? unlike most people today I value my privacy. >>> >>> >>> Hi! >>> >>> In my opinion, the point is not really about privacy. Although, I >>> understand you concern. >>> >>> As a kernel developer, the source code you will write will be subject to >>> copyright matters and, if you want to contribute, you will have to give your >>> agreement to this. >>> This is only possible using your real name. >>> >>> I am inviting you to read: Documentation/process/submitting-patches.rst in >>> this regard. >>> >>> Of course, as long as you do not submit source code, it does not really >>> matter. It may be more a question of "consistency". >>> >>> BR, >>> Sebastien. >> >> I completely agree with you. If I decide to submit code and there is a >> requirement, I will have to make a choice. BTW how would anyone verify >> if I am really Joe Smith and I have not just created an email account >> ? >> >> I just looked at the kernel that I am working with and it does not >> have the file you pointed out to me. I read the first file and it does >> not say anything about username neither did anyone objected when I >> posted on netdev. >> >> ubuntu-server:~/linux/linux-stable-v4.9.9/Documentation$ find . -name >> \*patches\* -print >> ./hwmon/submitting-patches >> ./applying-patches.txt >> ./devicetree/bindings/submitting-patches.txt >> >> >> >> >> -- >> CS1 >> >> ___ >> Kernelnewbies mailing list >> Kernelnewbies@kernelnewbies.org >> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/plain/Documentation/SubmittingPatches?id=refs/tags/v4.9.23 > > 11) Sign your work > -- > > To improve tracking of who did what, especially with patches that can > percolate to their final resting place in the kernel through several > layers of maintainers, we've introduced a "sign-off" procedure on > patches that are being emailed around. > > The sign-off is a simple line at the end of the explanation for the > patch, which certifies that you wrote it or otherwise have the right to > pass it on as an open-source patch. The rules are pretty simple: if you > can certify the below: > > Developer's Certificate of Origin 1.1 > ^ > > By making a contribution to this project, I certify that: > > (a) The contribution was created in whole or in part by me and I > have the right to submit it under the open source license > indicated in the file; or > > (b) The contribution is based upon previous work that, to the best > of my knowledge, is covered under an appropriate open source > license and I have the right under that license to submit that > work with modifications, whether created in whole or in part > by me, under the same open source license (unless I am > permitted to submit under a different license), as indicated > in the file; or > > (c) The contribution was provided directly to me by some other > person who certified (a), (b) or (c) and I have not modified > it. > > (d) I understand and agree that this project and the contribution > are public and that a record of the contribution (including all > personal information I submit with it, including my sign-off) is > maintained indefinitely and may be redistributed consistent with > this project or the open source license(s) involved. > > then you just add a line saying:: > > Signed-off-by: Random J Developer > > using your real name (sorry, no pseudonyms or anonymous contributions.) How does anyone know what my real name is. I can just have an account that says I am Random J Developer and my email is x...@gmail.com. Just like the example. I can even change the name that appears on the email, I have just changed mine to Joe Smith. Anyways let's not spend time on this and concentrate on the technical stuff. If I submit code I will find out. -- CS1 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Thu, Apr 20, 2017 at 7:20 PM, Code Soldier1 wrote: > On Thu, Apr 20, 2017 at 1:21 AM, Sébastien Masson > wrote: >> >> On 2017-04-19 20:26, Code Soldier1 wrote: >>> >>> On Wed, Apr 19, 2017 at 3:32 AM, Tobin C. Harding wrote: On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: [snip] Why the moniker? >>> >>> >>> Why not ? unlike most people today I value my privacy. >> >> >> Hi! >> >> In my opinion, the point is not really about privacy. Although, I >> understand you concern. >> >> As a kernel developer, the source code you will write will be subject to >> copyright matters and, if you want to contribute, you will have to give your >> agreement to this. >> This is only possible using your real name. >> >> I am inviting you to read: Documentation/process/submitting-patches.rst in >> this regard. >> >> Of course, as long as you do not submit source code, it does not really >> matter. It may be more a question of "consistency". >> >> BR, >> Sebastien. > > I completely agree with you. If I decide to submit code and there is a > requirement, I will have to make a choice. BTW how would anyone verify > if I am really Joe Smith and I have not just created an email account > ? > > I just looked at the kernel that I am working with and it does not > have the file you pointed out to me. I read the first file and it does > not say anything about username neither did anyone objected when I > posted on netdev. > > ubuntu-server:~/linux/linux-stable-v4.9.9/Documentation$ find . -name > \*patches\* -print > ./hwmon/submitting-patches > ./applying-patches.txt > ./devicetree/bindings/submitting-patches.txt > > > > > -- > CS1 > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/plain/Documentation/SubmittingPatches?id=refs/tags/v4.9.23 11) Sign your work -- To improve tracking of who did what, especially with patches that can percolate to their final resting place in the kernel through several layers of maintainers, we've introduced a "sign-off" procedure on patches that are being emailed around. The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below: Developer's Certificate of Origin 1.1 ^ By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. then you just add a line saying:: Signed-off-by: Random J Developer using your real name (sorry, no pseudonyms or anonymous contributions.) ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Thu, Apr 20, 2017 at 1:21 AM, Sébastien Masson wrote: > > On 2017-04-19 20:26, Code Soldier1 wrote: >> >> On Wed, Apr 19, 2017 at 3:32 AM, Tobin C. Harding wrote: >>> >>> On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: >>> [snip] >>> >>> Why the moniker? >> >> >> Why not ? unlike most people today I value my privacy. > > > Hi! > > In my opinion, the point is not really about privacy. Although, I > understand you concern. > > As a kernel developer, the source code you will write will be subject to > copyright matters and, if you want to contribute, you will have to give your > agreement to this. > This is only possible using your real name. > > I am inviting you to read: Documentation/process/submitting-patches.rst in > this regard. > > Of course, as long as you do not submit source code, it does not really > matter. It may be more a question of "consistency". > > BR, > Sebastien. I completely agree with you. If I decide to submit code and there is a requirement, I will have to make a choice. BTW how would anyone verify if I am really Joe Smith and I have not just created an email account ? I just looked at the kernel that I am working with and it does not have the file you pointed out to me. I read the first file and it does not say anything about username neither did anyone objected when I posted on netdev. ubuntu-server:~/linux/linux-stable-v4.9.9/Documentation$ find . -name \*patches\* -print ./hwmon/submitting-patches ./applying-patches.txt ./devicetree/bindings/submitting-patches.txt -- CS1 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On 2017-04-19 20:26, Code Soldier1 wrote: > On Wed, Apr 19, 2017 at 3:32 AM, Tobin C. Harding wrote: >> On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: >> [snip] >> >> Why the moniker? > > Why not ? unlike most people today I value my privacy. Hi! In my opinion, the point is not really about privacy. Although, I understand you concern. As a kernel developer, the source code you will write will be subject to copyright matters and, if you want to contribute, you will have to give your agreement to this. This is only possible using your real name. I am inviting you to read: Documentation/process/submitting-patches.rst in this regard. Of course, as long as you do not submit source code, it does not really matter. It may be more a question of "consistency". BR, Sebastien. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Wed, Apr 19, 2017 at 3:32 AM, Tobin C. Harding wrote: > On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: > [snip] > > Why the moniker? Why not ? unlike most people today I value my privacy. -- CS1 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: > Can someone suggest what is the fastest way to build a minimal kernel > and boot. For example if I am working on TCP and would like to make a > small change and reboot, what is the fastest way, I rather not build > the whole kernel. To add to the already great list of advice (some of which I could have used earlier in my life), I have found that virtual machines can be very useful. In particular, there are tools [1] that allow you to run a linux kernel within a virtual machine that shares your filesystem. You can use a quite minimal kernel configuration, and the resulting build times are around 5 seconds for incremental builds, and booting your new kernel in a virtual machine happens in mere seconds. Stephen [1]: https://github.com/g2p/vido ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
>> On Wed, Apr 19, 2017 at 6:49 AM, wrote: >> On Wed, 19 Apr 2017 20:32:31 +1000, "Tobin C. Harding" said: >> On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: >> [snip] >> >> Why the moniker? >>Could be worse. "Code Cannon Fodder", for example And this is what happens when you slap the code with a flying trout: https://paste.debian.net/928354/ Pay attention to the build times. Yes this is a pre-compiled kernel but that last build was 0m3.720s which I think we can safely say is fast enough for most of us :) ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
>> On Tue, Apr 18, 2017 at 11:59 AM, Code Soldier1 wrote: >> Hi, >> Can someone suggest what is the fastest way to build a minimal kernel >> and boot. Two ways to build a minimal kernel. Try make localmodconfig or make tinyconfig and see what fits your needs best. If this is still not what you need then you have to tweak things using make menuconfig ( can be a real pain in the butt... :) >> For example if I am working on TCP and would like to make a >> small change and reboot, what is the fastest way, I rather not build >> the whole kernel. Stay away from make menuconfig after the initial compile. The first time you use make menuconfig it will create .config for you. As long as you do not mess with the .config you can simply run make and should be able to build just the file(s) you changed. Keep in mind somethings are statically linked in to the kernel, meaning 'built-in' and if you touch those may trigger a full compile. To get a faster compile/build use make parallel build with -j option. Where -j is the number of processors available to you. For eg: make -j4 Also compile for the target architecture only: make ARCH= -jN UML ( User mode linux ) I have found is faster for reasons yet to be comprehended by me :) Hope this helps and monikers are good, whats wrong with slap that code with a flying trout eh ? Aruna > Thanks > > -- > CS1 > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Wed, 19 Apr 2017 20:32:31 +1000, "Tobin C. Harding" said: > On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: > [snip] > > Why the moniker? Could be worse. "Code Cannon Fodder", for example pgpv0BFLq0gT5.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: [snip] Why the moniker? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On 18 April 2017 at 11:04, Code Soldier1 wrote: > Thanks a lot Greg and Peter. Hello, Top-posting is frowned upon in the Linux Kernel mailing lists. Please use the interleaved style instead, as described in this Wikipedia article: https://en.wikipedia.org/wiki/Posting_style#Placement_of_replies > On Tue, Apr 18, 2017 at 10:44 AM, Greg KH wrote: >> On Tue, Apr 18, 2017 at 10:38:52AM -0700, Code Soldier1 wrote: >>> Hi Greg, >>> >>> No I did not know about 'make localmodconfig'. Can you kindly explain. >> >> Did you look at the help in the kernel makefile: >> >> make help >> will show you what the different options do. >> >> localmodconfig makes a kernel configuration based on your system and the >> modules loaded, which is much smaller than the "full distribution" >> kernel build, for all hardware in the world, which you don't usually >> want for your own development. >> >> There's also a whole book, free online, Linux Kernel in a Nutshell, that >> describes how to configure, build, and boot a custom kernel, that might >> help you out. >> >>> As far as the change is concerned I am planning to change a few things >>> and experiment, so there is nothing specific. >> >> Then experiment away and see how it goes! >> >> good luck, >> >> greg k-h > To add to what Greg said, disabling the staging drivers config option in the .config file speeds up the entire process. To do this, just comment out the CONFIG_STAGING line in that file. > > > -- > CS1 > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies Guru Das Srinagesh. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
Thanks a lot Greg and Peter. On Tue, Apr 18, 2017 at 10:44 AM, Greg KH wrote: > On Tue, Apr 18, 2017 at 10:38:52AM -0700, Code Soldier1 wrote: >> Hi Greg, >> >> No I did not know about 'make localmodconfig'. Can you kindly explain. > > Did you look at the help in the kernel makefile: > > make help > will show you what the different options do. > > localmodconfig makes a kernel configuration based on your system and the > modules loaded, which is much smaller than the "full distribution" > kernel build, for all hardware in the world, which you don't usually > want for your own development. > > There's also a whole book, free online, Linux Kernel in a Nutshell, that > describes how to configure, build, and boot a custom kernel, that might > help you out. > >> As far as the change is concerned I am planning to change a few things >> and experiment, so there is nothing specific. > > Then experiment away and see how it goes! > > good luck, > > greg k-h -- CS1 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Tue, Apr 18, 2017 at 10:38:52AM -0700, Code Soldier1 wrote: > Hi Greg, > > No I did not know about 'make localmodconfig'. Can you kindly explain. Did you look at the help in the kernel makefile: make help will show you what the different options do. localmodconfig makes a kernel configuration based on your system and the modules loaded, which is much smaller than the "full distribution" kernel build, for all hardware in the world, which you don't usually want for your own development. There's also a whole book, free online, Linux Kernel in a Nutshell, that describes how to configure, build, and boot a custom kernel, that might help you out. > As far as the change is concerned I am planning to change a few things > and experiment, so there is nothing specific. Then experiment away and see how it goes! good luck, greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Tue, Apr 18, 2017 at 7:38 PM, Code Soldier1 wrote: > Hi Greg, > > No I did not know about 'make localmodconfig'. Can you kindly explain. > As far as the change is concerned I am planning to change a few things > and experiment, so there is nothing specific. Check this out: https://lwn.net/Articles/660404/ > > Thanks, > > On Tue, Apr 18, 2017 at 9:07 AM, Greg KH wrote: >> On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: >>> Hi, >>> >>> Can someone suggest what is the fastest way to build a minimal kernel >>> and boot. For example if I am working on TCP and would like to make a >>> small change and reboot, what is the fastest way, I rather not build >>> the whole kernel. >> >> Why would you need to rebuild the whole kernel? What did you change >> that required everything to be rebuilt? >> >> And a working kernel can normally be built, from scratch, in just a few >> minutes. You do know about 'make localmodconfig' right? >> >> thanks, >> >> greg k-h > > > > -- > CS1 > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- Peter ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
Hi Greg, No I did not know about 'make localmodconfig'. Can you kindly explain. As far as the change is concerned I am planning to change a few things and experiment, so there is nothing specific. Thanks, On Tue, Apr 18, 2017 at 9:07 AM, Greg KH wrote: > On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: >> Hi, >> >> Can someone suggest what is the fastest way to build a minimal kernel >> and boot. For example if I am working on TCP and would like to make a >> small change and reboot, what is the fastest way, I rather not build >> the whole kernel. > > Why would you need to rebuild the whole kernel? What did you change > that required everything to be rebuilt? > > And a working kernel can normally be built, from scratch, in just a few > minutes. You do know about 'make localmodconfig' right? > > thanks, > > greg k-h -- CS1 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is the fastest way to build and boot a kernel
On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: > Hi, > > Can someone suggest what is the fastest way to build a minimal kernel > and boot. For example if I am working on TCP and would like to make a > small change and reboot, what is the fastest way, I rather not build > the whole kernel. Why would you need to rebuild the whole kernel? What did you change that required everything to be rebuilt? And a working kernel can normally be built, from scratch, in just a few minutes. You do know about 'make localmodconfig' right? thanks, greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies