You are not logged in.

#1 2026-02-23 21:51:52

shadefenseofficial
Member
Registered: 2026-02-23
Posts: 8

[SOLVED] Creating a custom kernel

Hello, I want to make an custom kernel for my pc, but I need instruction.

Currently, I am compiling the kernel. I am taking the Traditional compilation approach (as in the wiki). I am using a Mainline kernel.org kernel.
I want to know how to install the new kernel and make an initramfs.

Last edited by shadefenseofficial (2026-03-02 16:41:13)

Offline

#2 2026-02-24 00:33:18

loqs
Member
Registered: 2014-03-06
Posts: 18,796

Re: [SOLVED] Creating a custom kernel

Did something go wrong when you followed Traditional_compilation#Installation?

Offline

#3 2026-02-24 03:26:56

killertofus
Member
Registered: 2025-02-10
Posts: 166

Re: [SOLVED] Creating a custom kernel

why are you making a custom kernel?


I Have Linux Perl Can i Download Gnome???

Offline

#4 2026-02-24 04:14:51

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 493

Re: [SOLVED] Creating a custom kernel

shadefenseofficial wrote:

Hello, I want to make an custom kernel for my pc, but I need instruction.

Take PKGBUILD of the linux package, customize it: change pkgbase and pkgver suffix, update config and build the package. Then you can install it like any other linux-* package, initramfs will be generated automatically. You can have multiple kernels installed.
See also: Kernel/Arch build system.

Last edited by dimich (2026-02-24 04:15:53)

Offline

#5 2026-02-26 19:14:26

shadefenseofficial
Member
Registered: 2026-02-23
Posts: 8

Re: [SOLVED] Creating a custom kernel

dimich wrote:

Take PKGBUILD of the linux package, customize it: change pkgbase and pkgver suffix, update config and build the package. Then you can install it like any other linux-* package, initramfs will be generated automatically. You can have multiple kernels installed.

When I look at the PKGBUILD, I see the line url='https://github.com/archlinux/linux' and I want to know if I can make it point to a local directory becuase github is blocked where I'm at. Is that possible? How would I do it?

Offline

#6 2026-02-26 19:25:12

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 493

Re: [SOLVED] Creating a custom kernel

shadefenseofficial wrote:

When I look at the PKGBUILD, I see the line url='https://github.com/archlinux/linux' and I want to know if I can make it point to a local directory becuase github is blocked where I'm at. Is that possible? How would I do it?

"url=" specifies an URL stored in package metadata, i.e. displayed in package info.
To use custom sources you should change "source=" array. It can be path to archive or local bare repository. See PKGBUILD#Sources wiki.

Last edited by dimich (2026-02-26 19:25:49)

Offline

#7 2026-02-26 21:01:31

shadefenseofficial
Member
Registered: 2026-02-23
Posts: 8

Re: [SOLVED] Creating a custom kernel

dimich wrote:

"url=" specifies an URL stored in package metadata, i.e. displayed in package info.
To use custom sources you should change "source=" array. It can be path to archive or local bare repository.

Would kernel .org work?

Offline

#8 2026-02-26 21:41:02

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 493

Re: [SOLVED] Creating a custom kernel

shadefenseofficial wrote:

Would kernel .org work?

Any URL you can access should work, local filesystem as well. However, linux PKGBUILD also applies the patchset (second line in source array), so if that patchset is not compatible with your kernel version, or if you want to apply own out-of-tree patches, you have to edit PKGBUILD accordingly.

For mainline kernel it would be easier to take linux-mainline AUR package as the base.

It would be helpful if you explained why you want to "make an custom kernel for my pc", what problem are you trying to solve with this. Maybe there are better solutions.

Offline

#9 2026-02-26 21:49:40

shadefenseofficial
Member
Registered: 2026-02-23
Posts: 8

Re: [SOLVED] Creating a custom kernel

dimich wrote:

Any URL you can access should work, local filesystem as well. However, linux PKGBUILD also applies the patchset (second line in source array), so if that patchset is not compatible with your kernel version, or if you want to apply own out-of-tree patches, you have to edit PKGBUILD accordingly.

Thank you, this answers my question

Offline

#10 2026-02-27 11:58:23

Gabriel-Science
Member
From: Comet Observatory
Registered: 2026-02-25
Posts: 3

Re: [SOLVED] Creating a custom kernel

shadefenseofficial wrote:

Thank you, this answers my question

If it does, it would be preferable to add "[SOLVED]" in the post’s title :P !

Last edited by Gabriel-Science (2026-02-27 11:58:55)


An IFSCL fan

Offline

Board footer

Powered by FluxBB