You are not logged in.

#1 2017-10-23 02:27:21

ktechmidas
Member
Registered: 2017-10-07
Posts: 5

Building a kernel on a different machine

I have a quite old Arch laptop that I need to try another kernel for, am I right in thinking I can just pull the .config for the current running Arch kernel and use that on a faster (Ubuntu) machine to compile a new kernel with my requirements in?

Is there anything else I need to do? Once I have run make I need to use modules_install, but obviously want it to pull the modules from the old Arch laptop and not actually install the kernel on the Ubuntu laptop, just give me the .img files I need to copy over.

Last edited by ktechmidas (2017-10-23 02:27:37)

Offline

#2 2017-10-23 07:54:55

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: Building a kernel on a different machine

First of all, I recommend using make localmodconfig against the default arch .config. This will greatly reduce the build time, and building everything enabled in arch config is totally pointless for a kernel used on single system.

You could also use distcc to speed up compilation on the slower machine, by distributing the build with your faster machine.

If you want to build the kernel on the faster machine, I think the best solution would be installing arch on VM on it, and using makepkg to build packages for the kernel and headers. That way you could just copy the built packages over to your arch system, and installing them with pacman would put the kernel image and modules to correct location, and take care of building the initramfs.

If you want to build the kernel on ubuntu, I think you'd probably be fine just copying the kernel image, and the directory with installed modules to appropriate locations on your arch system, and running mkinitcpio after that. However I can't guarantee you wouldn't encounter some unexpected issues due to the build system being different.

Offline

Board footer

Powered by FluxBB