Re: Reducing kernel compilation time
On Mon, 26 Sep 2011 01:41:10 - Cam Hutchison c...@xdna.net wrote: David Witbrodt dawit...@sbcglobal.net writes: (My goal was to produce a kernel that boots without an initrd; most people will not share that goal.) I would have thought that most people would share that goal, since building an initrd is useful for only two reasons I can think of: ... 2) You have a complex method of getting the root filesystem mounted - perhaps encrypted LVM on top of a network block device, etc, etc, etc. I use a simple (relative to your example, at least) setup, with an unencrypted boot and everything else on top of LVM on top of an encrypted PV. Is there some way to do this without an initrd? The docs, such as they are, generally recommend using an initrd for booting from encrypted storage, even when not dealing with the sort of complexity you describe, e.g.: http://www.debian-administration.org/articles/577 Since most people who are building their own kernels probably do not have either of these requirements, building without an initrd would make things a lot simpler. I looked into building an initrd with my kernel builds, but it just made things more complicated and I could not see the point. Is there some other reason to use an initrd when building your own customized kernels? suspend / resume from disk should really be done via an initrd; from the docs: (c) The kernel should be configured with CONFIG_BLK_DEV_INITRD=y, which will allow you to run the resume binary out of an iniramfs/initrd image. [It is possible to use the suspend tools without any initramfs/initrd images, but it's dangerous and will not be documented here.] Celejar -- foffl.sourceforge.net - Feeds OFFLine, an offline RSS/Atom aggregator mailmin.sourceforge.net - remote access via secure (OpenPGP) email ssuds.sourceforge.net - A Simple Sudoku Solver and Generator -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110928102315.acf833bc7cd52bae1e60d...@gmail.com
Re: Reducing kernel compilation time
Cam Hutchison: (My goal was to produce a kernel that boots without an initrd; most people will not share that goal.) I would have thought that most people would share that goal, since building an initrd is useful for only two reasons I can think of: I regularly built custom kernels for a few years and in the beginning, I avoided initrds as well. But nowadays you don't have to do very much to get it working. You just enable it in the kernel config and the rest is done automatically (I use deb-pkg). J. -- I like my Toyota RAV4 because of the commanding view of the traffic jams. [Agree] [Disagree] http://www.slowlydownward.com/NODATA/data_enter2.html signature.asc Description: Digital signature
Re: (Results) Re: Reducing kernel compilation time
On Sun, Sep 25, 2011 at 4:21 PM, Camaleón noela...@gmail.com wrote: On Sat, 24 Sep 2011 14:22:33 +, Camaleón wrote: Okay, let's get the numbers. I followed Sven and Stephen's advice so I: - Used make localmodconfig to generate the .config file - Appended CONCURRENCY_LEVEL=2 to make-kpkg - Added CONFIG_MATOM=y (just in case...) - Removed the aforementioned CONFIG_LGUEST_GUEST, CONFIG_LGUEST and CONFIG_PARAVIRT_SPINLOCKS options from the .config file This compilation round started at 18:56 and when I came back (at 21:05) the process was already finished... So what time it took? I should have used time to monitor the proccess (my bad) but the generated .deb file says it was last changed and modified at 20:07. If I were you, I'd use make menuconfig to set/unset the values that you set manually. You can find them with /MATOM (for CONFIG_MATOM) with the menuconfig screen. If you'd like to find out what's probably the fastest that you can compile a kernel on your netbook make defconfig will give you a pretty small (and almost certainly useless for your purposes) kernel config. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=SxUvKia5v_=akFq=qajkzk-nd9-qgsgjuo-qb5e1jl...@mail.gmail.com
Re: Reducing kernel compilation time
On Sun, Sep 25, 2011 at 5:13 PM, Stan Hoeppner s...@hardwarefreak.com wrote: On 9/25/2011 11:02 AM, Camaleón wrote: On Sun, 25 Sep 2011 10:18:53 -0500, Stan Hoeppner wrote: Simply go through all the hardware and deselect anything that's not inside that netbook. Of all the network interface cards you'll only need one (or two depending on whether that netbook has an RJ45 port in addition to the wireless NIC). You'll only need one of the dozens of IDE/SATA drivers. You won't need any of the SCSI/RAID or legacy block drivers, though you will need SCSI disk and SCSI CDROM, as libata needs those, as Stephen and I recently discussed. That's easy to say but hard to get and so much for a trial/error test. It's definitely more difficult for non-hardwarefreaks. But honestly, if one isn't a hardwarefreak s/he really has no business rolling his/her own kernel. The entire concept of an operating system kernel is to abstract the hardware from user applications. This concept is over 40 years old. Some 90+% of the Linux kernel code deals with programming and communicating with the hardware. So you really need to know a bit about hardware if you're going to roll your own kernels. Whilst I agree that being a hardware freak might make choosing the right kernel config settings, it's not a must. I've been compiling kernels for a while and I'm definitely not a hardware freak; in fact, one of the most satisfying aspects of my job for the last eight or nine years is that I haven't seen a server room (unless I'm moonlighting in an SME) and don't have to deal with hardware except when I ask the hardware boys and girls to change a failing disk or ram module or check the cabling or install/remove a box or ... Over the years, I've never had the need to compile a kernel and this is my 4 kernel compilation in one month... but now I'm making these tests just for fun because all these compilations were aimed to debug the staging wifi drivers but the latest kernel (3.1-rc7, which I tried yesterday) neither worked. One of the biggest problems I see people having with both wired and wireless ethernet controllers is not getting the firmware loaded. Recall the big row on this list about the Realtek 8111/8168 etc? Debian didn't included the firmware in the Debian kernel tree due to Realtek ambiguity on the source license. Thus I recommend to anyone rolling a kernel to use a vanilla/pristine tarball which includes all the firmware blobs, and to build the blobs into your kernel. Also, build fixed hardware drivers into the kernel, not as modules. Fixed meaning non-removable, as in soldered to the system board, such as SATA, wireless ethernet, USB, etc in your netbook. The option to build firmware into the kernel is: CONFIG_FIRMWARE_IN_KERNEL=y Description: http://cateee.net/lkddb/web-lkddb/FIRMWARE_IN_KERNEL.html The only downside is that this adds a few kilobytes to your kernel binary. In my experience this is easier than the recommended way to include firmware, and it's foolproof as long as the firmware is in the source tree. Most are. +1 The catee site above is very useful to find out what various kernel config settings are. But you can also get that info by choosing help for an entry in menuconfig. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=swggkctnhofpfphfyuoeog1nsajdrckyeyemreyokx...@mail.gmail.com
Re: Reducing kernel compilation time
On Sun, Sep 25, 2011 at 7:26 PM, Stephen Powell zlinux...@wowway.com wrote: I will continue to use and recommend kernel-package. But I'm not going to argue with those who wish to use make deb-pkg. It's all a question of habit. If I need to have a package, I use make-dpkg on Debian distribs and rpmbuild on Red Hat distribs. If I don't need a package, I use make. I could start using make deb-pkg (why not make deb or make dpkg?!) and make rpm - and I might in the future - but this is working for me and this is what I'm now used to. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=sxycq-jn5msebnvuzdr0rlw3po8+jsyumguhuh+x8m...@mail.gmail.com
Re: Reducing kernel compilation time
On Sun, 25 Sep 2011 16:13:58 -0500, Stan Hoeppner wrote: On 9/25/2011 11:02 AM, Camaleón wrote: (...) Simply go through all the hardware and deselect anything that's not inside that netbook. Of all the network interface cards you'll only need one (or two depending on whether that netbook has an RJ45 port in addition to the wireless NIC). You'll only need one of the dozens of IDE/SATA drivers. You won't need any of the SCSI/RAID or legacy block drivers, though you will need SCSI disk and SCSI CDROM, as libata needs those, as Stephen and I recently discussed. That's easy to say but hard to get and so much for a trial/error test. It's definitely more difficult for non-hardwarefreaks. I'd say it is so for anyone that never has compiled his/her own kernel. First time is always hard, regardless the task you have in hands. But honestly, if one isn't a hardwarefreak s/he really has no business rolling his/her own kernel. The entire concept of an operating system kernel is to abstract the hardware from user applications. This concept is over 40 years old. Some 90+% of the Linux kernel code deals with programming and communicating with the hardware. So you really need to know a bit about hardware if you're going to roll your own kernels. As I said earlier, I never had a deep reason to compile my own kernel until now, that my wifi card stopped from working since kernel 2.6.39, that is, since 3.0.0 branch and upwards. The involved function that has been added to the wifi driver has been detected and I was given a workaround but I still need to be able to test another things and that involves adding debug trace for the stating drivers, which involves a kernel compilation. Do an lspci and write down all the hardware you have in there. The strip out all the drivers you don't have. If you're unsure, ask. I'm using Sven's advice (in join with Stephen's one), I find it a very good approach. Pick your poison. My point is simply that you need to know what hardware is in the machine so you can include the drivers you need and leave out those you don't. Yes, I know that, but is not an easy task, even for not-so-newbie people. Over the years, I've never had the need to compile a kernel and this is my 4 kernel compilation in one month... but now I'm making these tests just for fun because all these compilations were aimed to debug the staging wifi drivers but the latest kernel (3.1-rc7, which I tried yesterday) neither worked. One of the biggest problems I see people having with both wired and wireless ethernet controllers is not getting the firmware loaded. (...) Not related to this problem, I guess. I'm in talks with one of the driver devels that kindly is helping me to track this. The option to build firmware into the kernel is: CONFIG_FIRMWARE_IN_KERNEL=y Description: http://cateee.net/lkddb/web-lkddb/FIRMWARE_IN_KERNEL.html The only downside is that this adds a few kilobytes to your kernel binary. In my experience this is easier than the recommended way to include firmware, and it's foolproof as long as the firmware is in the source tree. Most are. Good to know. But that would still leave out the closed source drivers or proprietary blob, right? Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.26.11.10...@gmail.com
Re: Reducing kernel compilation time
On Sun, Sep 25, 2011 at 9:41 PM, Cam Hutchison c...@xdna.net wrote: David Witbrodt dawit...@sbcglobal.net writes: (My goal was to produce a kernel that boots without an initrd; most people will not share that goal.) I would have thought that most people would share that goal, since building an initrd is useful for only two reasons I can think of: 1) You are building a distro kernel that needs to run on many different types of machines, since you don't know what modules would need to be built in to find the root filesystem. 2) You have a complex method of getting the root filesystem mounted - perhaps encrypted LVM on top of a network block device, etc, etc, etc. Since most people who are building their own kernels probably do not have either of these requirements, building without an initrd would make things a lot simpler. I looked into building an initrd with my kernel builds, but it just made things more complicated and I could not see the point. Is there some other reason to use an initrd when building your own customized kernels? 3) AFAIK, a initrd is needed for selinux. AFAIK! It's definitely the case with upstart and systemd; I've never tried using selinux without an initrd on RHEL 5 or an older Fedora, so it's maybe not the case with sysvinit; although I can't see, off-hand, why it would work in the latter case if it fails in the former two. 4) If you have /usr on its own partition and don't want to have some non-fatal errors and warning, you have to mount it in the initrd. http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken [5) On Ubuntu, if you have /var on its own partition and don't want ureadahead to fail (or have to turn it off), you have to mount it in the initrd.] -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=SynmvR3aK7nsayX4+yjMtV0=CHbRc+CATtkwXpdCKdF=a...@mail.gmail.com
Re: Reducing kernel compilation time
* Stephen Powell [110924 14:13 -0400]: On Sat, 24 Sep 2011 12:18:47 -0400 (EDT), Camaleón wrote: What do you mean by kernel-package? Debian's vanilla kernel? kernel-package is the name of a Debian package, as in aptitude install kernel-package Isn't [1] the proper way to build Debian kernels? [1] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html Elimar -- Alles was viel bedacht wird ist bedenklich!;-) Friedrich Nietzsche -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110925074224.ga2...@samweis.home.lxtec.de
Re: Reducing kernel compilation time
On 9/24/2011 6:55 PM, Stephen Powell wrote: On Sat, 24 Sep 2011 17:15:51 -0400 (EDT), Stan Hoeppner wrote: 5 hours? Did you say 5 hours? I have a 10 year old dual Mendocino 550 machine with only 384MB of PC100 that takes about 30 minutes to compile my custom kernels using make -j2. I'd guess you're including the kitchen sink. Don't build the hundreds of driver modules your machines won't ever use. That is the key to reducing build time. +1 Absolutely, Stan. Building a lean and mean kernel, one which only contains what the machine needs, is where the big savings are. But configuring the kernel to do that takes time. And it is easy to make a mistake. For example, I've learned from experience that I need SCSI support in my kernel, even though I have no SCSI adapter in my machine. So much stuff emulates SCSI now, or uses SCSI protocols in communication. I'd bet that omitting the SCSI layer hamstrung many folks who tried to use libata for the first time. It got me too. :) It forced me to go and read up on how libata works, so it wasn't all bad. -- Stan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4e7ede11.5060...@hardwarefreak.com
Re: Reducing kernel compilation time
On 9/25/2011 2:42 AM, Elimar Riesebieter wrote: * Stephen Powell [110924 14:13 -0400]: On Sat, 24 Sep 2011 12:18:47 -0400 (EDT), Camaleón wrote: What do you mean by kernel-package? Debian's vanilla kernel? kernel-package is the name of a Debian package, as in aptitude install kernel-package Isn't [1] the proper way to build Debian kernels? [1] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html As has already been discussed, this is the new recommended way to build a Debian kernel. The instructions on that page 'silently' changed not terribly that long ago. The build instructions on that page used to tell us to use 'make-kpkg'. Note that this new method make KDEB_PKGVERSION=custom.1.0 deb-pkg did not exist in the days of 2.6.18 to 2.6.21, which is when these command line examples were written. IIRC this deb-pkg method was introduced in kernel 2.6.32 or 2.6.34. It is included in the pristine kernel kernel source tarball. Thus you don't have to install any Debian kernel building packages on your system in order to build a custom kernel. This is likely one of the reasons this is the recommended method now, since most everything you need is in the vanilla tarball. -- Stan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4e7ee1ca.10...@hardwarefreak.com
Re: Reducing kernel compilation time
On Sat, Sep 24, 2011 at 2:20 PM, Stephen Powell zlinux...@wowway.com wrote: On Sat, 24 Sep 2011 13:56:35 -0400 (EDT), Tom H wrote: CONCURRENCY_LEVEL=$(getconf _NPROCESSORS_ONLN) although getconf _NPROCESSORS_ONLN on an atom's probably 1; but you never know... You can also pass INSTALL_MOD_STRIP=1 to make-kpkg so that the make modules_install step strips out debugging information (if this isn't done by default). Thanks for the tips, Tom! I believe I'll incorporate one or both of those tips during the next revision of my kernel-building web page. You're very welcome. Should kernel-package ever be EOLd you could look into the fakeroot debian/rules... way of compiling a kernel that both the Debian and Ubuntu kernel teams seem to be promoting if you use their sources. From what little I've read about this method, it doesn't seem to have the equivalent of make-kpg's kernel_image target so it might have the same deficiency as make deb-pkg from your perspective... I was re-reading the make-kpkg to see whether there were targets with or without debugging symbols and found kernel_debug: kernel_debug This target produces a Debian package containing the debugging symbols for the modules contained in the corresponding image package. The basic idea here is to keep the space in /lib/mod- ules/kver under control, since this could be on a root parti- tion with space restrictions. So, if you create a linux-image package with debug info stripped out, you can later create a package with just the unstripped modules rather than recompile a complete package. The man page doesn't specify where these modules would be installed. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=swyo0xv8qoss_rzasytauho064v0mf93p8m+p_axum...@mail.gmail.com
Re: Reducing kernel compilation time
On Sat, 24 Sep 2011 14:13:57 -0400, Stephen Powell wrote: On Sat, 24 Sep 2011 12:18:47 -0400 (EDT), Camaleón wrote: What do you mean by kernel-package? Debian's vanilla kernel? kernel-package is the name of a Debian package, as in aptitude install kernel-package It is not a kernel. It is a collection of scripts, configuration files, etc. that are intended to aid in the process of compiling a kernel and building a Debian binary kernel package. The make-kpkg command is one of the scripts in the kernel-package package. Ah, then yes :-) In fact, I already have a set of tools installed (along with fakeroot, that kernel-package) because I'm following Debian Installation Guide instructions: http://d-i.alioth.debian.org/manual/en.i386/ch08s06.html (there is a little bug there. --revision= string has to start with a number or it won't compile...) No, sources have to be from upstream. kernel-package can be used with official Debian kernel source packages or with pristine kernel sources acquired directly from upstream. When using upstream kernel sources directly, one cannot use the Debian package version in the --revision option, since there is no Debian package version. You have to make one up. Other than that, it works just fine for upstream kernel sources. I've done it before, and for similar reasons as you. Yes, yes... that's what I have been doing. Then I can try your suggestion, in addition with the new make localmodconfig that is running right now. Yes... I've already¹ walked through that link, and it's fantastic for Debian starters, very well explained with detailed steps (have you considered adding it into Debian's wiki, or at least -if not the full article- a link to it?) ¹I noticed you pointed to it in another thread where someone asked for something similar ;-) The Debian kernel team seems to think that kernel-package should be considered deprecated. (Although, as far as I know, the author of kernel-package does not share that opinion.) Therefore, I'm not sure that my kernel-building stuff would be welcome in the official wiki. The kernel team encourages the use of make deb-pkg. But I personally don't like make deb-pkg because of its one size fits all build philosophy. For example, it always produces a headers package, and I often don't need a headers package. With kernel-package, I only get the packages that I ask for. And since your goal is to reduce kernel compilation time, I would think that you would not want extra packages produced that you don't need. That takes additional time. I also found very easy to compile a new kernel from whatever source by using the mentioned package, and in fact, it is suggested in the install manual so they better remove the current instructions if want people use another method but until then, I will keep using it :-P If you decide to try kernel-package, make sure that you apply the patch file listed in the web page. It won't work properly with a version 3 kernel unless you do. Hum... you mean the one for EDID? I've compiled 3 kernels just fine and had to do nothing special :-? Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.25.11.53...@gmail.com
Re: Reducing kernel compilation time
On Sun, 25 Sep 2011 03:42:24 -0400 (EDT), Elimar Riesebieter wrote: Isn't [1] the proper way to build Debian kernels? [1] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html That depends on your definition of proper. The kernel handbook, not surprisingly, is maintained by the Debian kernel team. The Debian kernel team is responsible for producing the official Debian stock binary kernels as well as making any Debian customization to the pristine kernel sources that they deem necessary or desirable. If your definition of proper means the way the kernel team currently recommends, then yes. However, with apologies to cat lovers, there's an old American saying: There's more than one way to skin a cat. The method documented on my web page is the historic method, and was also the method used by the Debian kernel team to create official Debian stock kernel images up through and including Sarge. The kernel team departed from the historic method of producing stock kernels with Etch, it seems. As I said in an earlier post, I still prefer the historic method because I find it more flexible. For example, when using make deb-pkg, three binary packages are produced: a linux-image-* package, a linux-headers-* package, and a linux-libc6-dev package. In most cases, I only need and want the linux-image-* package. With make deb-pkg, it doesn't appear that there is any way to suppress the creation of the unneeded packages. With make-kpkg, I only get the packages that I ask for. Another benefit of the historic method is that header packages are rarely needed. If the entire kernel source tree is already installed, header packages should not be needed, since the kernel headers are included as part of the kernel source. The historic method of creating kernel module binary packages takes advantage of this fact and therefore does not require a separate headers package. The new way of creating kernel modules requires a headers package, even if the entire kernel source tree is already installed. This is all explained in my web page, which, for reference, is http://users.wowway.com/~zlinuxman/Kernel.htm But, to each his own. Whatever floats your boat, man. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/980275088.2101929.1316953277845.javamail.r...@md01.wow.synacor.com
Re: Reducing kernel compilation time
On Sun, Sep 25, 2011 at 7:53 AM, Camaleón noela...@gmail.com wrote: In fact, I already have a set of tools installed (along with fakeroot, that kernel-package) because I'm following Debian Installation Guide instructions: http://d-i.alioth.debian.org/manual/en.i386/ch08s06.html There's also the kernel handbook: http://kernel-handbook.alioth.debian.org/ch-common-tasks.html -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=Sy-c34jQLGu=aYg4oAdk9i2R=g8vqktudoefksy5jh...@mail.gmail.com
Re: Reducing kernel compilation time
On Sun, 25 Sep 2011 07:53:59 -0400 (EDT), Camaleón wrote: Stephen Powell wrote: If you decide to try kernel-package, make sure that you apply the patch file listed in the web page. It won't work properly with a version 3 kernel unless you do. Hum... you mean the one for EDID? I've compiled 3 kernels just fine and had to do nothing special :-? No, I mean ... - If you are using kernel-package version 12.036+nmu1 with a Linux version 3 kernel source package, there is a patch you will need to apply, especially if CONFIG_LGUEST is set in the kernel config file or you need to build doc or headers packages. The patch is available here. To apply the patch, issue the following sequence of commands: cd /usr/share/kernel-package ... (download the patch file to the current directory) patch -p1 linuxv3.diff This is an unofficial patch: it is not provided by or endorsed by the upstream author or the Debian package maintainer. - Follow the link on the word here in the above text in my web page. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/255335842.2101986.1316953836438.javamail.r...@md01.wow.synacor.com
Re: Reducing kernel compilation time
On Sun, 25 Sep 2011 08:30:36 -0400, Stephen Powell wrote: On Sun, 25 Sep 2011 07:53:59 -0400 (EDT), Camaleón wrote: Stephen Powell wrote: If you decide to try kernel-package, make sure that you apply the patch file listed in the web page. It won't work properly with a version 3 kernel unless you do. Hum... you mean the one for EDID? I've compiled 3 kernels just fine and had to do nothing special :-? No, I mean ... - If you are using kernel-package version 12.036+nmu1 with a Linux version 3 kernel source package, there is a patch you will need to apply, especially if CONFIG_LGUEST is set in the kernel config file or you need to build doc or headers packages. The patch is available here. To apply the patch, issue the following sequence of commands: cd /usr/share/kernel-package ... (download the patch file to the current directory) patch -p1 linuxv3.diff This is an unofficial patch: it is not provided by or endorsed by the upstream author or the Debian package maintainer. - Follow the link on the word here in the above text in my web page. Ah, that (the missing documentation folder). Yes, that's something I noticed too late the first time I run the compilation, it stopped at the middle of the task but googling around a bit I could discover the cause. In brief: CONFIG_LGUEST_GUEST=n CONFIG_LGUEST=n CONFIG_PARAVIRT_SPINLOCKS=n Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.25.12.57...@gmail.com
Re: Reducing kernel compilation time
On Sun, 25 Sep 2011 08:25:19 -0400, Tom H wrote: On Sun, Sep 25, 2011 at 7:53 AM, Camaleón noela...@gmail.com wrote: In fact, I already have a set of tools installed (along with fakeroot, that kernel-package) because I'm following Debian Installation Guide instructions: http://d-i.alioth.debian.org/manual/en.i386/ch08s06.html There's also the kernel handbook: http://kernel-handbook.alioth.debian.org/ch-common-tasks.html It seems there is more than one oficial version on how to bake a cake (something that's very common in the FLOSS world) so I applied the first I found which by the way, it worked fine. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.25.13.06...@gmail.com
Re: Reducing kernel compilation time
On Sat, 24 Sep 2011 16:15:51 -0500, Stan Hoeppner wrote: On 9/24/2011 9:22 AM, Camaleón wrote: (...) I don't need nothing special, just to be able to boot the system, test the staging drivers and then remove/compile a new kernel again so wasting the less time in the process would be great :-) Any trick? 5 hours? Did you say 5 hours? Yes Stan, I said five hours. I have a 10 year old dual Mendocino 550 machine with only 384MB of PC100 that takes about 30 minutes to compile my custom kernels using make -j2. Marvellous. I'd guess you're including the kitchen sink. Don't build the hundreds of driver modules your machines won't ever use. That is the key to reducing build time. Fair enough, but I wonder what to include in the recipe. If I put too much salt or leave the oven for many hours at the maximun temperature I'll get a pastiche nobody will be able to eat... So I'm afraid I'll wait for your super-customized .config file to use it in my netbook, feel free to send it to my inbox when it's ready :-) Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.25.14.30...@gmail.com
Re: Reducing kernel compilation time
On Sun 25 Sep 2011 at 08:21:17 -0400, Stephen Powell wrote: [Snipped: Some advantages of using kernel-package] But, to each his own. Whatever floats your boat, man. Indeed, but the deck is stacked against kernel-package when it is associated with 'deprecated' in the minds of users. It may not suit the Kernel Team for their use but I've happily and successfully compiled kernels with it for many years without it giving me any problems. Kernel-package was promoted as the Debian way when I first came into contact with it and its creator was active in debian-user with advice. If there is a proper or official Debian position on compiling a kernel it could be inferred from this civilised discussion at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599208 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110925142709.GA6253@desktop
Re: Reducing kernel compilation time
From: Camaleón noela...@gmail.com Sent: Sun, September 25, 2011 10:30:30 AM Subject: Re: Reducing kernel compilation time I'd guess you're including the kitchen sink. Don't build the hundreds of driver modules your machines won't ever use. That is the key to reducing build time. Fair enough, but I wonder what to include in the recipe. If I put too much salt or leave the oven for many hours at the maximun temperature I'll get a pastiche nobody will be able to eat... So I'm afraid I'll wait for your super-customized .config file to use it in my netbook, feel free to send it to my inbox when it's ready :-) He cannot. Everyone needs a different '.config' if they are trying to customize for their own personal hardware. My own experience with this involved spending an entire day in January 2010 tracking down which options I could disable. I also changed most 'M' options to 'Y' so that drivers would be built directly into the kernel instead of as a separate loadable module. (My goal was to produce a kernel that boots without an initrd; most people will not share that goal.) Sven Joachim's suggestion to create a new '.config' using 'make localmonconfig' should mostly have the desired effect, the result could then be fine-tuned. If that option had existed when I was learning about this, it would have saved me many, many hours! Good luck! Dave W. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1316963813.47885.yahoomai...@web82102.mail.mud.yahoo.com
Re: Reducing kernel compilation time
On 9/25/2011 9:30 AM, Camaleón wrote: Fair enough, but I wonder what to include in the recipe. If I put too much salt or leave the oven for many hours at the maximun temperature I'll get a pastiche nobody will be able to eat... Have you used make-menuconfig? Simply go through all the hardware and deselect anything that's not inside that netbook. Of all the network interface cards you'll only need one (or two depending on whether that netbook has an RJ45 port in addition to the wireless NIC). You'll only need one of the dozens of IDE/SATA drivers. You won't need any of the SCSI/RAID or legacy block drivers, though you will need SCSI disk and SCSI CDROM, as libata needs those, as Stephen and I recently discussed. Do an lspci and write down all the hardware you have in there. The strip out all the drivers you don't have. If you're unsure, ask. And be patient with yourself. Nearly everyone who embarks on the roll your own journey trips a few times along the way, and has a steep learning curve in the beginning. So I'm afraid I'll wait for your super-customized .config file to use it in my netbook, feel free to send it to my inbox when it's ready:-) Don't hold your breath. :) -- Stan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4e7f465d.6090...@hardwarefreak.com
Re: Reducing kernel compilation time
On 9/25/2011 10:16 AM, David Witbrodt wrote: If that option had existed when I was learning about this, it would have saved me many, many hours! But then you wouldn't have learned as much. Easier is not always better, even though it often seems so. -- Stan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4e7f4851.1070...@hardwarefreak.com
Re: Reducing kernel compilation time
On Sun, 25 Sep 2011 08:16:53 -0700, David Witbrodt wrote: From: Camaleón noela...@gmail.com Sent: Sun, September 25, 2011 10:30:30 AM Subject: Re: Reducing kernel compilation time I'd guess you're including the kitchen sink. Don't build the hundreds of driver modules your machines won't ever use. That is the key to reducing build time. Fair enough, but I wonder what to include in the recipe. If I put too much salt or leave the oven for many hours at the maximun temperature I'll get a pastiche nobody will be able to eat... So I'm afraid I'll wait for your super-customized .config file to use it in my netbook, feel free to send it to my inbox when it's ready :-) He cannot. Everyone needs a different '.config' if they are trying to customize for their own personal hardware. (...) Ains... I should have said it was a joke but I hoped the devil smily :-) was just going to be enough. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.25.15.52...@gmail.com
Re: Reducing kernel compilation time
On Sun, 25 Sep 2011 10:18:53 -0500, Stan Hoeppner wrote: On 9/25/2011 9:30 AM, Camaleón wrote: Fair enough, but I wonder what to include in the recipe. If I put too much salt or leave the oven for many hours at the maximun temperature I'll get a pastiche nobody will be able to eat... Have you used make-menuconfig? Nope. I first used the current .config located at /boot, that way I could not fail. Simply go through all the hardware and deselect anything that's not inside that netbook. Of all the network interface cards you'll only need one (or two depending on whether that netbook has an RJ45 port in addition to the wireless NIC). You'll only need one of the dozens of IDE/SATA drivers. You won't need any of the SCSI/RAID or legacy block drivers, though you will need SCSI disk and SCSI CDROM, as libata needs those, as Stephen and I recently discussed. That's easy to say but hard to get and so much for a trial/error test. Do an lspci and write down all the hardware you have in there. The strip out all the drivers you don't have. If you're unsure, ask. I'm using Sven's advice (in join with Stephen's one), I find it a very good approach. And be patient with yourself. Nearly everyone who embarks on the roll your own journey trips a few times along the way, and has a steep learning curve in the beginning. Over the years, I've never had the need to compile a kernel and this is my 4 kernel compilation in one month... but now I'm making these tests just for fun because all these compilations were aimed to debug the staging wifi drivers but the latest kernel (3.1-rc7, which I tried yesterday) neither worked. So I'm afraid I'll wait for your super-customized .config file to use it in my netbook, feel free to send it to my inbox when it's ready:-) Don't hold your breath. :) Ha! I knew it :-) Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.25.16.02...@gmail.com
Re: Reducing kernel compilation time
From: Stan Hoeppner s...@hardwarefreak.com Sent: Sun, September 25, 2011 11:27:13 AM Subject: Re: Reducing kernel compilation time If that option had existed when I was learning about this, it would have saved me many, many hours! But then you wouldn't have learned as much. Easier is not always better, even though it often seems so. I take your point. I was actually reading about every single kernel option in a .config file, though, so the time I was thinking would have been saved would only have had to do with arriving more quickly at my custom .config, not on the learning about the options. But I fully agree with the truism: easier is not always better. DW -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1316970512.93510.yahoomai...@web82105.mail.mud.yahoo.com
(Results) Re: Reducing kernel compilation time
On Sat, 24 Sep 2011 14:22:33 +, Camaleón wrote: (...) Any trick? Yes, I got many useful tricks, a big thanks to all. Okay, let's get the numbers. I followed Sven and Stephen's advice so I: - Used make localmodconfig to generate the .config file - Appended CONCURRENCY_LEVEL=2 to make-kpkg - Added CONFIG_MATOM=y (just in case...) - Removed the aforementioned CONFIG_LGUEST_GUEST, CONFIG_LGUEST and CONFIG_PARAVIRT_SPINLOCKS options from the .config file This compilation round started at 18:56 and when I came back (at 21:05) the process was already finished... Wow, I didn't expect that. So what time it took? I should have used time to monitor the proccess (my bad) but the generated .deb file says it was last changed and modified at 20:07. If that's true (which results in ~1 hour of compilation time) I can consider myself very much fortunate :-) Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.25.20.21...@gmail.com
Re: Reducing kernel compilation time
On 9/25/2011 11:02 AM, Camaleón wrote: On Sun, 25 Sep 2011 10:18:53 -0500, Stan Hoeppner wrote: On 9/25/2011 9:30 AM, Camaleón wrote: Fair enough, but I wonder what to include in the recipe. If I put too much salt or leave the oven for many hours at the maximun temperature I'll get a pastiche nobody will be able to eat... Have you used make-menuconfig? Nope. I first used the current .config located at /boot, that way I could not fail. Simply go through all the hardware and deselect anything that's not inside that netbook. Of all the network interface cards you'll only need one (or two depending on whether that netbook has an RJ45 port in addition to the wireless NIC). You'll only need one of the dozens of IDE/SATA drivers. You won't need any of the SCSI/RAID or legacy block drivers, though you will need SCSI disk and SCSI CDROM, as libata needs those, as Stephen and I recently discussed. That's easy to say but hard to get and so much for a trial/error test. It's definitely more difficult for non-hardwarefreaks. But honestly, if one isn't a hardwarefreak s/he really has no business rolling his/her own kernel. The entire concept of an operating system kernel is to abstract the hardware from user applications. This concept is over 40 years old. Some 90+% of the Linux kernel code deals with programming and communicating with the hardware. So you really need to know a bit about hardware if you're going to roll your own kernels. Do an lspci and write down all the hardware you have in there. The strip out all the drivers you don't have. If you're unsure, ask. I'm using Sven's advice (in join with Stephen's one), I find it a very good approach. Pick your poison. My point is simply that you need to know what hardware is in the machine so you can include the drivers you need and leave out those you don't. And be patient with yourself. Nearly everyone who embarks on the roll your own journey trips a few times along the way, and has a steep learning curve in the beginning. Over the years, I've never had the need to compile a kernel and this is my 4 kernel compilation in one month... but now I'm making these tests just for fun because all these compilations were aimed to debug the staging wifi drivers but the latest kernel (3.1-rc7, which I tried yesterday) neither worked. One of the biggest problems I see people having with both wired and wireless ethernet controllers is not getting the firmware loaded. Recall the big row on this list about the Realtek 8111/8168 etc? Debian didn't included the firmware in the Debian kernel tree due to Realtek ambiguity on the source license. Thus I recommend to anyone rolling a kernel to use a vanilla/pristine tarball which includes all the firmware blobs, and to build the blobs into your kernel. Also, build fixed hardware drivers into the kernel, not as modules. Fixed meaning non-removable, as in soldered to the system board, such as SATA, wireless ethernet, USB, etc in your netbook. The option to build firmware into the kernel is: CONFIG_FIRMWARE_IN_KERNEL=y Description: http://cateee.net/lkddb/web-lkddb/FIRMWARE_IN_KERNEL.html The only downside is that this adds a few kilobytes to your kernel binary. In my experience this is easier than the recommended way to include firmware, and it's foolproof as long as the firmware is in the source tree. Most are. So I'm afraid I'll wait for your super-customized .config file to use it in my netbook, feel free to send it to my inbox when it's ready:-) Don't hold your breath. :) Ha! I knew it :-) Not all of us are humor impaired. :) -- Stan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4e7f9996.50...@hardwarefreak.com
Re: Reducing kernel compilation time
On Sun, 25 Sep 2011 10:27:09 -0400 (EDT), Brian a...@cityscape.co.uk wrote: Indeed, but the deck is stacked against kernel-package when it is associated with 'deprecated' in the minds of users. It may not suit the Kernel Team for their use but I've happily and successfully compiled kernels with it for many years without it giving me any problems. Kernel-package was promoted as the Debian way when I first came into contact with it and its creator was active in debian-user with advice. If there is a proper or official Debian position on compiling a kernel it could be inferred from this civilised discussion at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599208 I read the above bug report. Did you notice the quote from Manoj Srivastava, the upstream author and Debian package maintainer of kernel-package? (I have taken the liberty of editing it to correct typos.) - Indeed. Since the team of developers in question has never been involved in the development of kernel-package, why do they get a say in deciding that the package is deprecated? I, and a lot of other people, still use kernel-package every day, and the upstream make deb-pkg route does not allow one to make kernel-headers, for instance, nor does it allow one to override or replace parts of the build system or otherwise influence the packages created. The stripped down build in deb package creator is by far not a drop in replacement of kernel package. manoj - Since Manoj wrote this on October 5, 2010, some improvements have been made to make deb-pkg; but make deb-pkg is still not as full-featured or as flexible as make-kpkg. More importantly, Manoj obviously does not consider kernel-package to be deprecated and still uses it himself on a regular basis. As long as Manoj continues to support it, and as long as it offers me the flexibility that I desire and make deb-pkg doesn't, I will continue to use and recommend kernel-package. But I'm not going to argue with those who wish to use make deb-pkg. If it meets their needs, and they want to use it, fine. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/378607842.2110586.1316993197410.javamail.r...@md01.wow.synacor.com
Re: Reducing kernel compilation time
David Witbrodt dawit...@sbcglobal.net writes: (My goal was to produce a kernel that boots without an initrd; most people will not share that goal.) I would have thought that most people would share that goal, since building an initrd is useful for only two reasons I can think of: 1) You are building a distro kernel that needs to run on many different types of machines, since you don't know what modules would need to be built in to find the root filesystem. 2) You have a complex method of getting the root filesystem mounted - perhaps encrypted LVM on top of a network block device, etc, etc, etc. Since most people who are building their own kernels probably do not have either of these requirements, building without an initrd would make things a lot simpler. I looked into building an initrd with my kernel builds, but it just made things more complicated and I could not see the point. Is there some other reason to use an initrd when building your own customized kernels? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/6334.4e7fd836.76...@getafix.xdna.net
Re: Reducing kernel compilation time
I would build only the relevant kernel *module*, I want to play with (or imported from linux-next): http://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage HTH On Sat, Sep 24, 2011 at 4:22 PM, Camaleón noela...@gmail.com wrote: Hello, I had to compile the latest upstream kernel sources to make some debugging with my wifi drivers (from staging) and discovered that compilation took ~5 hours. That's much for testing purposes. Compilation takes place in a netbook governed by Intel's Atom N455 with 2 GiB of RAM and I would like to reduce the compilation time. I'm using the same .config file I have for the current Debian stock kernel (to avoid missing some modules I may need) and just added CONFIG_MATOM=y but it takes almost the same time. I don't need nothing special, just to be able to boot the system, test the staging drivers and then remove/compile a new kernel again so wasting the less time in the process would be great :-) Any trick? Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.24.14.22...@gmail.com -- Mathieu -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/ca+7wuswkjzpsajr1jy_czewuz8s9zyyebnkmkkb-a0elyh3...@mail.gmail.com
Re: Reducing kernel compilation time
On Sat, 24 Sep 2011 16:26:34 +0200, Mathieu Malaterre wrote: On Sat, Sep 24, 2011 at 4:22 PM, Camaleón noela...@gmail.com wrote: (...) I don't need nothing special, just to be able to boot the system, test the staging drivers and then remove/compile a new kernel again so wasting the less time in the process would be great :-) Any trick? I would build only the relevant kernel *module*, I want to play with (or imported from linux-next): http://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage I'll give it a whirl, but reducing kernel compilation time is still something I would like to have. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.24.14.43...@gmail.com
Re: Reducing kernel compilation time
On 2011-09-24 16:22 +0200, Camaleón wrote: I had to compile the latest upstream kernel sources to make some debugging with my wifi drivers (from staging) and discovered that compilation took ~5 hours. That's much for testing purposes. Compilation takes place in a netbook governed by Intel's Atom N455 with 2 GiB of RAM and I would like to reduce the compilation time. I'm using the same .config file I have for the current Debian stock kernel (to avoid missing some modules I may need) and just added CONFIG_MATOM=y but it takes almost the same time. I don't need nothing special, just to be able to boot the system, test the staging drivers and then remove/compile a new kernel again so wasting the less time in the process would be great :-) Any trick? Plug in any hardware that you intend to use with your netbook and then run make localmodconfig. This works from Linux 2.6.32 onwards¹. Sven ¹ http://kernelnewbies.org/Linux_2_6_32#head-11f54cdac41ad6150ef817fd68597554d9d05a5f -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/874o02hsun@turtle.gmx.de
Re: Reducing kernel compilation time
On Sat, 24 Sep 2011 10:22:33 -0400 (EDT), Camaleón wrote: I had to compile the latest upstream kernel sources to make some debugging with my wifi drivers (from staging) and discovered that compilation took ~5 hours. That's much for testing purposes. Compilation takes place in a netbook governed by Intel's Atom N455 with 2 GiB of RAM and I would like to reduce the compilation time. I'm using the same .config file I have for the current Debian stock kernel (to avoid missing some modules I may need) and just added CONFIG_MATOM=y but it takes almost the same time. I don't need nothing special, just to be able to boot the system, test the staging drivers and then remove/compile a new kernel again so wasting the less time in the process would be great :-) Any trick? Hello, Camaleón. I'm not familiar with the capabilities of your hardware, but if you have multiple CPUs (cores) available, and you're using kernel-package, you can make use of the environment variable CONCURRENCY_LEVEL to set the number of simultaneous compile tasks. For example, CONCURRENCY_LEVEL=2 make-kpkg ... if you have a dual-core processor. You seem to have enough RAM to support that. Note that there is a patch you will need for kernel-package if you're using a version 3 kernel. See my kernel-building web page for details. http://users.wowway.com/~zlinuxman/Kernel.htm If you have a quad-core machine, you can set CONCURRENCY_LEVEL to 4. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/109735586.2090397.1316880067341.javamail.r...@md01.wow.synacor.com
Re: Reducing kernel compilation time
On Sat, 24 Sep 2011 17:18:08 +0200, Sven Joachim wrote: On 2011-09-24 16:22 +0200, Camaleón wrote: (...) I don't need nothing special, just to be able to boot the system, test the staging drivers and then remove/compile a new kernel again so wasting the less time in the process would be great :-) Any trick? Plug in any hardware that you intend to use with your netbook and then run make localmodconfig. This works from Linux 2.6.32 onwards¹. ¹ http://kernelnewbies.org/Linux_2_6_32#head-11f54cdac41ad6150ef817fd68597554d9d05a5f I'll test that, it sounds very good :-) (I guess that CONFIG_MATOM=y still needs to be manually added, right?) I hope that by cherry picking kernel modules compilation time is reduced significantly. I'll report back how it went, thanks. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.24.16.04...@gmail.com
Re: Reducing kernel compilation time
On Sat, 24 Sep 2011 12:01:07 -0400, Stephen Powell wrote: On Sat, 24 Sep 2011 10:22:33 -0400 (EDT), Camaleón wrote: (...) I don't need nothing special, just to be able to boot the system, test the staging drivers and then remove/compile a new kernel again so wasting the less time in the process would be great :-) Any trick? Hello, Camaleón. I'm not familiar with the capabilities of your hardware, but if you have multiple CPUs (cores) available, and you're using kernel-package, you can make use of the environment variable CONCURRENCY_LEVEL to set the number of simultaneous compile tasks. What do you mean by kernel-package? Debian's vanilla kernel? No, sources have to be from upstream. I already have compiled and installed a vanilla kernel from Debian sources but wifi driver fails at the same point than Debian's stock kernel. I need to try the greatest and latest kernel source (3.1-rc7). For example, CONCURRENCY_LEVEL=2 make-kpkg ... if you have a dual-core processor. You seem to have enough RAM to support that. Note that there is a patch you will need for kernel-package if you're using a version 3 kernel. See my kernel-building web page for details. http://users.wowway.com/~zlinuxman/Kernel.htm If you have a quad-core machine, you can set CONCURRENCY_LEVEL to 4. Yes... I've already¹ walked through that link, and it's fantastic for Debian starters, very well explained with detailed steps (have you considered adding it into Debian's wiki, or at least -if not the full article- a link to it?) ¹I noticed you pointed to it in another thread where someone asked for something similar ;-) Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.09.24.16.18...@gmail.com
Re: Reducing kernel compilation time
On 2011-09-24 18:04 +0200, Camaleón wrote: On Sat, 24 Sep 2011 17:18:08 +0200, Sven Joachim wrote: Plug in any hardware that you intend to use with your netbook and then run make localmodconfig. This works from Linux 2.6.32 onwards¹. I'll test that, it sounds very good :-) (I guess that CONFIG_MATOM=y still needs to be manually added, right?) If the currently running kernel does not have it (i.e. you still run a Debian kernel), then yes. Sven -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87ty81hq09@turtle.gmx.de
Re: Reducing kernel compilation time
On Sat, Sep 24, 2011 at 12:01 PM, Stephen Powell zlinux...@wowway.com wrote: On Sat, 24 Sep 2011 10:22:33 -0400 (EDT), Camaleón wrote: I had to compile the latest upstream kernel sources to make some debugging with my wifi drivers (from staging) and discovered that compilation took ~5 hours. That's much for testing purposes. Compilation takes place in a netbook governed by Intel's Atom N455 with 2 GiB of RAM and I would like to reduce the compilation time. I'm using the same .config file I have for the current Debian stock kernel (to avoid missing some modules I may need) and just added CONFIG_MATOM=y but it takes almost the same time. I don't need nothing special, just to be able to boot the system, test the staging drivers and then remove/compile a new kernel again so wasting the less time in the process would be great :-) I'm not familiar with the capabilities of your hardware, but if you have multiple CPUs (cores) available, and you're using kernel-package, you can make use of the environment variable CONCURRENCY_LEVEL to set the number of simultaneous compile tasks. For example, CONCURRENCY_LEVEL=2 make-kpkg ... CONCURRENCY_LEVEL=$(getconf _NPROCESSORS_ONLN) although getconf _NPROCESSORS_ONLN on an atom's probably 1; but you never know... You can also pass INSTALL_MOD_STRIP=1 to make-kpkg so that the make modules_install step strips out debugging information (if this isn't done by default). -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=Szv0Ff9N=fsyfciy+-ervy5pplf_irmftg4poswplc...@mail.gmail.com
Re: Reducing kernel compilation time
On Sat, 24 Sep 2011 12:18:47 -0400 (EDT), Camaleón wrote: What do you mean by kernel-package? Debian's vanilla kernel? kernel-package is the name of a Debian package, as in aptitude install kernel-package It is not a kernel. It is a collection of scripts, configuration files, etc. that are intended to aid in the process of compiling a kernel and building a Debian binary kernel package. The make-kpkg command is one of the scripts in the kernel-package package. No, sources have to be from upstream. kernel-package can be used with official Debian kernel source packages or with pristine kernel sources acquired directly from upstream. When using upstream kernel sources directly, one cannot use the Debian package version in the --revision option, since there is no Debian package version. You have to make one up. Other than that, it works just fine for upstream kernel sources. I've done it before, and for similar reasons as you. Yes... I've already¹ walked through that link, and it's fantastic for Debian starters, very well explained with detailed steps (have you considered adding it into Debian's wiki, or at least -if not the full article- a link to it?) ¹I noticed you pointed to it in another thread where someone asked for something similar ;-) The Debian kernel team seems to think that kernel-package should be considered deprecated. (Although, as far as I know, the author of kernel-package does not share that opinion.) Therefore, I'm not sure that my kernel-building stuff would be welcome in the official wiki. The kernel team encourages the use of make deb-pkg. But I personally don't like make deb-pkg because of its one size fits all build philosophy. For example, it always produces a headers package, and I often don't need a headers package. With kernel-package, I only get the packages that I ask for. And since your goal is to reduce kernel compilation time, I would think that you would not want extra packages produced that you don't need. That takes additional time. If you decide to try kernel-package, make sure that you apply the patch file listed in the web page. It won't work properly with a version 3 kernel unless you do. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1610419885.2091849.1316888037313.javamail.r...@md01.wow.synacor.com
Re: Reducing kernel compilation time
On Sat, 24 Sep 2011 13:56:35 -0400 (EDT), Tom H wrote: CONCURRENCY_LEVEL=$(getconf _NPROCESSORS_ONLN) although getconf _NPROCESSORS_ONLN on an atom's probably 1; but you never know... You can also pass INSTALL_MOD_STRIP=1 to make-kpkg so that the make modules_install step strips out debugging information (if this isn't done by default). Thanks for the tips, Tom! I believe I'll incorporate one or both of those tips during the next revision of my kernel-building web page. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1203183261.2091906.1316888418264.javamail.r...@md01.wow.synacor.com
Re: Reducing kernel compilation time
On Sat, 2011-09-24 at 20:20 +, debian-user-digest-requ...@lists.debian.org wrote: CONCURRENCY_LEVEL=2 I didn't read the thread, just one mail. For my 2.1 GHz dual-core Athlon CONCURRENCY_LEVEL does minimal reduce compiling time. I suspect that consequently reducing unneeded stuff would be much more time reducing, unfortunately it takes a lot of time to edit such a basic config. I never did and still suffer when compiling a kernel and regarding to my audio needs I need to build kernels very often. Fortunately I'm able to use my computer, while building a kernel, unfortunately it might take an hour, before I know, that something fishy does stop building the kernel and this could happen 3 or 4 times again, before a kernel will be build. Yep, it's a PITA, OTOH, for other OSs there's no possibility to build a kernel that fits to personal needs. Live is a PITA ;) -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1316897087.4933.65.camel@debian
Re: Reducing kernel compilation time
On 9/24/2011 9:22 AM, Camaleón wrote: Hello, I had to compile the latest upstream kernel sources to make some debugging with my wifi drivers (from staging) and discovered that compilation took ~5 hours. That's much for testing purposes. Compilation takes place in a netbook governed by Intel's Atom N455 with 2 GiB of RAM and I would like to reduce the compilation time. I'm using the same .config file I have for the current Debian stock kernel (to avoid missing some modules I may need) and just added CONFIG_MATOM=y but it takes almost the same time. I don't need nothing special, just to be able to boot the system, test the staging drivers and then remove/compile a new kernel again so wasting the less time in the process would be great :-) Any trick? 5 hours? Did you say 5 hours? I have a 10 year old dual Mendocino 550 machine with only 384MB of PC100 that takes about 30 minutes to compile my custom kernels using make -j2. I'd guess you're including the kitchen sink. Don't build the hundreds of driver modules your machines won't ever use. That is the key to reducing build time. -- Stan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4e7e4887.3090...@hardwarefreak.com
Re: Reducing kernel compilation time
On Sat, 2011-09-24 at 22:44 +0200, Ralf Mardorf wrote: On Sat, 2011-09-24 at 20:20 +, debian-user-digest-requ...@lists.debian.org wrote: CONCURRENCY_LEVEL=2 I didn't read the thread, just one mail. For my 2.1 GHz dual-core Athlon CONCURRENCY_LEVEL does minimal reduce compiling time. I suspect that consequently reducing unneeded stuff would be much more time reducing, unfortunately it takes a lot of time to edit such a basic config. I never did and still suffer when compiling a kernel and regarding to my audio needs I need to build kernels very often. Fortunately I'm able to use my computer, while building a kernel, unfortunately it might take an hour, before I know, that something fishy does stop building the kernel and this could happen 3 or 4 times again, before a kernel will be build. Yep, it's a PITA, OTOH, for other OSs there's no possibility to build a kernel that fits to personal needs. Live is a PITA ;) An example spinymouse@debian:/boot$ cat config-2.6.39.1 | grep TABLET CONFIG_INPUT_TABLET=y CONFIG_TABLET_USB_ACECAD=m CONFIG_TABLET_USB_AIPTEK=m CONFIG_TABLET_USB_GTCO=m # CONFIG_TABLET_USB_HANWANG is not set CONFIG_TABLET_USB_KBTAB=m CONFIG_TABLET_USB_WACOM=m I would like to have a tablet, but I don't have got a tablet. When building this kernel, one time something unneeded was build as part of the kernel and 5 times an unneeded module was build. Just one unneded thingy wasn't build. You can grep anything else and you will see, that you build tons of unneeded stuff. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1316898460.5414.2.camel@debian
Re: Reducing kernel compilation time
On 9/24/2011 11:01 AM, Stephen Powell wrote: On Sat, 24 Sep 2011 10:22:33 -0400 (EDT), Camaleón wrote: Intel's Atom N455 I'm not familiar with the capabilities of your hardware, but if you have multiple CPUs (cores) The Atom 455 is a single core 64/32 bit CPU with HyperThreading, 1.66GHz, 512KB L2 cache, single channel DDR2/3 interface. http://ark.intel.com/products/49491 I would guess that 64 bit gcc would probably run a bit faster than 32 bit gcc on this chip, with twice as many GPRs available. Give that a shot if you're not doing so already. -- Stan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4e7e4bfd.6020...@hardwarefreak.com
Re: Reducing kernel compilation time
On Sat, 24 Sep 2011 17:15:51 -0400 (EDT), Stan Hoeppner wrote: 5 hours? Did you say 5 hours? I have a 10 year old dual Mendocino 550 machine with only 384MB of PC100 that takes about 30 minutes to compile my custom kernels using make -j2. I'd guess you're including the kitchen sink. Don't build the hundreds of driver modules your machines won't ever use. That is the key to reducing build time. +1 Absolutely, Stan. Building a lean and mean kernel, one which only contains what the machine needs, is where the big savings are. But configuring the kernel to do that takes time. And it is easy to make a mistake. For example, I've learned from experience that I need SCSI support in my kernel, even though I have no SCSI adapter in my machine. So much stuff emulates SCSI now, or uses SCSI protocols in communication. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/868903406.2094701.1316908513981.javamail.r...@md01.wow.synacor.com