You are not logged in.
What is best environment to mess around with kernel? Which distro or, if virtually, on which virtual emulator?
I tried to build a 3.2.5 on Arch installed in virtualbox (since I didn't want to mess up my installed arch on computer) and it is taking forever to compile...
I was reading somewhere that some people are able to compile kernel in few minutes. I am wonder how they did it, just because of good computer specs?
Last edited by kdar (2012-02-09 14:30:11)
Offline
I compile my kernel on Arch, in a "real" installation (e.g. not a virtual machine). You should probably compile in a clean chroot, but I've never bothered for kernel compilation.
Kernel compilation can take a relatively long time, depending on the number of config options you've got set, but it can be speeded up by adding in a -j3 (or whatever number suits your processor best) to the make parameters.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
If you strip the kernel of some stuff that you don't need, you can compile it much faster (because it's smaller).
Offline
ccache is what you're searching for.
IIRC that works if you repeatedly recompile the same thing. The first compile won't be faster.
Offline
Nowadays I'm kinda interested in ARM Linux kernel hacking. I use this guide as the starting point:
http://balau82.wordpress.com/2010/03/22 … -emulator/
No fancy stuffs needed, so I can built the kernel in less that 10 minutes.
Offline
@anta40
Thanks for posting that link, I am in the process of starting some ArchArm Kernel tweaking, and trying to figure out how to build a full arm compiler on my x86 machine for my many ArchArm devices.
Offline
TheLemonMan wrote:ccache is what you're searching for.
IIRC that works if you repeatedly recompile the same thing. The first compile won't be faster.
If you do some serious kernel hacking you'll recompile it once a minute heh
Offline
I will give ccache a try. I am pretty sure I will have to compile it a lot this semester.
@anta40
Thanks as well. I been tinkering with Pandaboard lately, while I am in school, but it would be nice to emulate it at home on regular desktop pc, I have heard of Qemu but haven't tried it yet.
Last edited by kdar (2012-02-09 21:34:12)
Offline
The distro you use doesn't matter, since you'll be doing it in a terminal anyway. However, since most distros expect you to manually install a custom kernel, makepkg and PKGBUILDs seem pretty sweet.
Offline
ccache helped a lot. Now it takes 5-10 min to recompile if I make some little change.
Speak about kernel hacking and creating new system calls.. Does anyone know any good tutorials or examples? The only ones I see are the printk("Hello world").
Offline
Try "Linux Kernel Development (Robert Love)". It's good.
Offline
That actually what I have. We use it for our class. But I find his writing a bit like overview, it isn't* bad... but he doesn't seem to go into deep detail.
Last edited by kdar (2012-02-10 20:45:44)
Offline
Why do I get this when I try to call _syscall1(long,mynewcall,int,i) in test C file (from user space) for my new system call:
In file included from testmynewcall.c:5:0:
testmynewcall.h:5:9: error: macro names must be identifiers
testmynewcall.h:8:16: error: unknown type name ‘mynewcall’
testmynewcall.h:8:30: error: unknown type name ‘i’
-- Got it working
Last edited by kdar (2012-02-13 16:14:33)
Offline
Nowadays I'm kinda interested in ARM Linux kernel hacking. I use this guide as the starting point:
http://balau82.wordpress.com/2010/03/22 … -emulator/No fancy stuffs needed, so I can built the kernel in less that 10 minutes.
For ARM with Qemu.
You had to create your own file-system somehow?
Last edited by kdar (2012-02-13 16:14:44)
Offline