You are not logged in.

#1 2010-12-09 11:43:30

ElderSnake
Member
From: Australia
Registered: 2010-12-09
Posts: 97

Newbie to Compiling - Kernel Source folder

Hi everyone, I'm fairly new to Arch Linux and I'm absolutely loving it, it feels like the perfect distro to me.

I have a quick question which I feel is easy to answer yet no matter how I search, I can never see a definitive answer - so basically I compiled my own custom kernel today in Arch which I'm running on right now.

Everything is running great, though the only real reason I did it was for the learning experience. My question is, I compiled the kernel in my home directory, and what is left over now is the source folder itself which is around 600mb and I'm running a little short on space at the moment and I'm wondering, can I safely just delete this folder? Or, even after installing the kernel is it still somehow depending on this folder?

I thought maybe like some program compiles I have done previously I could get rid of the source/build directory after completion but I'm sure I saw the Catalyst build module utilizing my kernel folder during it's build, so I'm not so sure now lol.

Thanks in advance, I know I'm probably missing something completely. I'm happy to learn in any case.

Last edited by ElderSnake (2010-12-09 11:46:08)


Arch Linux - Intel E5200 Desktop (MATE GTK3)  | Fedora 25 - ASUS Core-i7 Optimus Laptop

Offline

#2 2010-12-09 12:23:33

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Newbie to Compiling - Kernel Source folder

Yes you can safely delete it, it was only used to create the kernel26 package. smile

Edit: this is assuming you used a kernel pkgbuild to create your own kernel package?

Last edited by litemotiv (2010-12-09 12:29:15)


ᶘ ᵒᴥᵒᶅ

Offline

#3 2010-12-09 13:19:18

ElderSnake
Member
From: Australia
Registered: 2010-12-09
Posts: 97

Re: Newbie to Compiling - Kernel Source folder

Thank you, yes that is correct smile


Arch Linux - Intel E5200 Desktop (MATE GTK3)  | Fedora 25 - ASUS Core-i7 Optimus Laptop

Offline

#4 2010-12-09 14:01:50

kcirick
Member
Registered: 2010-06-21
Posts: 364

Re: Newbie to Compiling - Kernel Source folder

@ElderSnake: If you're recompiling your own kernel for educational purposes, you might want to try compiling/installing your own kernel the old fashion way (i.e. not using pkgbuild), because if you can do that, you can do this on any linux distro

Just my two cents

Offline

#5 2010-12-09 22:22:04

ElderSnake
Member
From: Australia
Registered: 2010-12-09
Posts: 97

Re: Newbie to Compiling - Kernel Source folder

Hi, I think you're absolutely right, in fact I was planning too but I guess in the end as I am actually using this system I thought I'd try do it this way for the pacman integration, but certainly sometime I should do it the manual way (though it doesn't seem much harder).

Also on a side note, I installed v86d for the framebuffer support with Splashy, but when I update my mkinitcpio for my new kernel it says 'v86d' module not found during the rebuild process, but if I do it for my original kernel there is no issue. I guess I assumed any new modules I installed would automatically point to my current running kernel (the new one). But doesn't seem so.

Any ideas?

Last edited by ElderSnake (2010-12-09 22:22:36)


Arch Linux - Intel E5200 Desktop (MATE GTK3)  | Fedora 25 - ASUS Core-i7 Optimus Laptop

Offline

#6 2010-12-10 01:10:09

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: Newbie to Compiling - Kernel Source folder

IIRC if you need to build modules, then you shouldn't delete the source directory that you have used to build you kernel.

If you do "make headers_install" then I think you can then delete the source directory. You'll want to specify the headers directory though (something like make INSTALL_HDR_PATH=blah headers_install) so that you can easily find the folder and delete when you upgrade your kernel. PKGBUILD makes life a lot easier and puts headers where you expect them to be on an Arch install. What I used to do was just keep the source where it was. Luckily I had plenty of space.


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#7 2010-12-10 02:48:50

ElderSnake
Member
From: Australia
Registered: 2010-12-09
Posts: 97

Re: Newbie to Compiling - Kernel Source folder

I see, thank you very much.

I already deleted the source folder lol, but if it becomes a problem, well I can just redo it (have my .config saved after all), on a dual core machine I have to say the compiling of the kernel doesn't really take very long.

Last edited by ElderSnake (2010-12-10 02:49:38)


Arch Linux - Intel E5200 Desktop (MATE GTK3)  | Fedora 25 - ASUS Core-i7 Optimus Laptop

Offline

#8 2010-12-10 15:43:16

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: Newbie to Compiling - Kernel Source folder

The kernel takes much less time to compile when you select only the modules you need. The default kernel shipped with any distribution is filled with every possible module that could be useful for someone. It takes me just a few minutes to compile usually with config that I have slowly developed over the years to include literally as little as possible tongue


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#9 2010-12-10 23:01:28

ElderSnake
Member
From: Australia
Registered: 2010-12-09
Posts: 97

Re: Newbie to Compiling - Kernel Source folder

Very nice wink

Actually that could bring me to another quick question, which I ought to know but I'm just not completely sure.

I took out whatever I came across in the kernel config that I figured I wouldn't need, anything with a <*> so they would not be built in, but there were many things left on the 'M', for module. I assumed this just left a little code for supporting an external module for whatever part if I ever needed it and it was mostly worth removing the inbuilt modules.

Is it worth taking out the module supports as well? Or is it not much difference?

Last edited by ElderSnake (2010-12-10 23:03:21)


Arch Linux - Intel E5200 Desktop (MATE GTK3)  | Fedora 25 - ASUS Core-i7 Optimus Laptop

Offline

#10 2010-12-10 23:13:36

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Newbie to Compiling - Kernel Source folder

ElderSnake wrote:

Is it worth taking out the module supports as well?

All the M entries will be compiled, so definitely yes. smile


ᶘ ᵒᴥᵒᶅ

Offline

#11 2010-12-10 23:15:21

ElderSnake
Member
From: Australia
Registered: 2010-12-09
Posts: 97

Re: Newbie to Compiling - Kernel Source folder

Wow you Arch people are fast tongue

Anyway, thanks very much!


Arch Linux - Intel E5200 Desktop (MATE GTK3)  | Fedora 25 - ASUS Core-i7 Optimus Laptop

Offline

#12 2010-12-11 09:12:24

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: Newbie to Compiling - Kernel Source folder

Run "lsmod" while using the default kernel to see which modules you are using. This will help to make sure you don't deselect a module you will probably be needing!


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

Board footer

Powered by FluxBB