apt-get install git build-essential
Last edited by xaos52 (2012-02-25 15:08:49)
thank you xaos!
Curious, How to best un-compile as well -
I have compiled Kernels with apt and want to completely remove all related files for some Kernels as no longer needed - for this I used aptitude. However, I noticed /lib/modules and /usr/share still have related files after this removal:
:~$ sudo aptitude remove linux-image-3.2.0-6.dmz.1-liquorix-686 linux-headers-3.2.0-5.dmz.1-liquorix-686
So, how does one complete a better clean-up if desired to remove all Kernel files after install?
As far as I know, you can not compile a kernel with apt nor aptitude. Both tools install the binary packages.
For removing a package completely use the command
sudo apt-get --purge remove <package name>
I am not sure if removing and purging a kernel removes the associated /lib/modules/kernel-version.
I would have to test if it does.
What I am sure of is that you can remove the directory manually with
sudo rm -rf /lib/modules/<kernel-version-you-want-to-remove>
Compiling allows you to test newer kernels that are not available as binary packages yet. Normally there is no advantage, except if you have brand new hardware that is not, or not well supported in the binary package yet.
I do not know if this is a bug or if it is a safety measure to prevent you from removing the modules inadvertently.
If you are sure you want these removed, then do:
sudo rm -rf /lib/modules/126.96.36.199.2-rt30... sudo apt-get --purge remove ....
sudo rm -rf linux sudo rm -rf .git
Last edited by xaos52 (2012-02-25 17:57:54)
This is a good lesson. But, I find it funny that we could compile kernel modules using aptitude such as the Broadcom in the past yet, they have no aptitude .deb setup which would invoke automatically as you've suggested. Break for menu and so on.....
Maybe Debian wouldn't do this but, perhaps in the future Crunch Bang could. It could be one of their MARKS.
Pretty awesome! I've now rolled my own kernel and am using it as we speak.
I did follow a slightly different procedure though, as git was unbearably slow for me (20-30KB/s).
I downloaded the most recent mainline 3.3 from kernel.org, unzipped it in a folder, put a terminal in that folder and then followed the commands you wrote
cp /boot/config-$(uname -r) .config make localmodconfig make -j4 deb-pkg
I just installed the deb packages by double-clicking them. A habit from the old days, I guess.
I wonder though, if you don't mind my asking, what does "cp /boot/config-$(uname -r) .config" actually do? Am I right in guessing it just copies the config of the currently installed kernel to the source directory? How does its presence/absence influence the make process?