S.A.K.C. - SUSE Automated Kernel Compiler - Version 2.80
by, 24-Jun-2011 at 19:44 (16815 Views)
Introducing S.A.K.C. - SUSE Automated Kernel Compiler version 2.80 now with TURBO MODE COMPILE! With Turbo Compile Mode, you only compile the modules actually in use by your Kernel at the time of the compile. Typical compiler times will be reduced to 25% of normal. If you have never used sakc or ever compiled your own kernel before I would most likely skip the Turbo Mode until you understand more about just what this added feature is doing. S.A.K.C. works great with openSUSE 12.2 and 12.3! S.A.K.C. now works with the newly selected kernel default (by kernel.org) of tar.xz files as well as still supporting tar.bz2 files.
S.A.K.C. uses the following kernel configuration creator to achieve this new speed.
So, if this method is so fast, why not use it all of the time? Well, like most really good things, there is a downside. And that downside is any hardware you have not connected, turned on or otherwise have the kernel module loaded for it, will not work after a Turbo Compile. Of course, if this happens, use a regular compile, get ALL your devices working, and try Turbo Again. Here is one of the new screens you get that requests if you want to use Turbo Mode or switch to the kernel configuration menu:Code:chmod +x ./scripts/kconfig/streamline_config.pl ; ./scripts/kconfig/streamline_config.pl > ./config_strip ; mv ./config_strip ./.config
In addition, the kernel selection menu has been enhanced using color and you can now remove older kernel source files if you wish. If the bash script file S.A.K.R. is found, an option to run it will be presented, allowing you to remove kernel files already compiled with S.A.K.C. S.A.K.C. can now create KDE icon files on your desktop and in the Applications menu if allowed to. New settings for for icon file creation have been added.
I have added a simplified option selection menu to be sure of your options and who should select them:
And there is a new kernel configuration selection menu as well. Kernel config files contain info on how each kernel module will or will not be loaded or available to be loaded. Using Turbo Mode creates a smaller kernel config file. A new kernel .config edit and .config save option has also been added in version 2.80 for you to select.
So, how does S.A.K.C. 2.80 deal with the kernel config issues?
1. It creates a new Configs save folder ~/Kernel/Configs
2. It archives for future use your default /boot config file as config.sav
3. It saves each active kernel configuration in to ~/Kernel/Configs folder as config.sav.date.time
4. It creates a turbomode text file to note a Turbo Mode Compile was used last.
5. If you switch from Turbo Mode, back to standard the next, the archive config.sav file is used and the turbomode text file is removed.
6. After a Turbo Compile, reusing the existing Active config (which was the old normal) just keeps the turbo mode going
7. And finally, you may elect to use any previous saved kernel config. If it was from a Turbo Compile, your compile will also be as fast.
In order to start using the new kernel compile just Copy and Paste the text of this script into a text editor and save it as the file sakc in your home area bin folder (~/bin/sakc). The script is too large to be posted in a message here and is included in SUSE Paste.
Open the above Link in a new Tab. Select the Download option in the top right and then select Open With Kwrite or other text editor and then save the bash script text file as ~/bin/sakc. It is possible to directly download sakc using the following terminal command (You must delete or remove the old version first):
Code:rm ~/bin/sakcThis script must be marked executable to be used. Please run the following Terminal command:Code:wget -nc http://paste.opensuse.org/view/download/78302130 -O ~/bin/sakc
It is even possible to string all three of these commands together as one. Copy the following command, open up a terminal session, paste it in and press enter:Code:chmod +x ~/bin/sakc
To use sakc, download the latest kernel source files from ...Code:rm ~/bin/sakc ; wget -nc http://paste.opensuse.org/view/download/78302130 -O ~/bin/sakc ; chmod +x ~/bin/sakc
The Linux Kernel Archives
Into your downloads folder. Open up a terminal session, change to your downloads folder and run the command:
OR --- Open up a terminal session, Start sakc from anywhere and have it display a list of source files to select from to compile (Prefered Method):Code:sakc kernel_file_name.tar.xz
To make sure you can compile a kernel, I suggest you do the following (Shown using KDE instructions):Code:sakc
Open YaST / Software / Software Management - Select the View Button on the top left and pick Patterns. Now, you will see several Patterns listed and you want to select:
Then Press the Accept button on the bottom right and allow these applications to install.Code:Development [X] Base Development [X] Linux Kernel Development [X] C/C++ Development
If you would like the ability to create a kernel tarball (which sakc can use) for any released version of the Linux kernel back to 2.6.11 (2005) you can use my bash script called SuSE Git Tar Ball (S.G.T.B.) which you can find in this blog.
S.G.T.B. - SuSE Git Kernel Tarball Creator - Version 1.80 - Blogs - openSUSE Forums
When you compile a new kernel with SAKC, your new files will exist in four places and a new menu entry. I have not created an automatic way of getting rid of the old kernels yet. I first make sure to know and to not remove the active kernel version and I do not remove any kernels install by YaST.
1. Delete the ~/Downloads/linux-version.tar.bz2 Compressed kernel file: 75 MB
2. Delete the ~/Kernel/linux-version folder and all of the kernel source files: 7 GB
3. Delete the /lib/module/version-desktop folder and the kernel modules: 1.7 GB (Must be root to remove)
4. Delete three files in the /boot folder: 21 MB, called initrd-version, System.map-version & vmlunuz-version (Must Be root to remove)
5. Delete your entry(s) in the /boot/grub/menu.lst file for kernel version (Must be root to edit file)
To completely remove an unused kernel version compiled with SAKC, you must manually remove these files as listed above. All will include the exact kernel version number you no longer are using. Anyone using an SSD may find that you need to remove these files on a regular basis if you compile lots of kernel files.
This whole process has been automated so have a look here: S.A.K.R. - SUSE Automated Kernel Remover - Version 1.0.1
If you have any comments, problems or requests, please let me know.
Blogs: asroot : C.F.U. : FastBoot : fewrup : F.S.M. : H.I. : LNVHW : MMCHECK : N.S.F. : S.W.A.T. : S.A.S.I. : S.C.L.U. : S.K.I.M. : S.L.A.V.E. : S.L.R.C. : S.T.A.R.T. : SYSEdit : systemd