You are not logged in.

#1 2019-05-30 11:32:07

oz
Member
Registered: 2004-05-20
Posts: 102

Building an Arch 5.0.19 kernel

Kernel 5.1 has been a real buggy for me so I'm sticking with the 5.0 series for now. I would like to build the current 5.0.19 which is not in the Arch repository. What's the best way to do that? I know how to build the kernel the traditional way but then I won't get a package that can be managed by pacman.

I know how to build using "asp update linux" etc but that only gets the latest 5.1 kernel, not what I want. Is there an easy way to pull the PKGBUILD and related files for the 5.0.13 Arch kernel then update that to 5.0.19?

Offline

#2 2019-05-30 12:19:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: Building an Arch 5.0.19 kernel

There's an even easier way, just get the built package from the archive (assuming you don't still have it in your own cache).

EDIT: ooh, you want 5.0.19, yes that was never in the repos.  Still use asp, and just update the pkgver and _srcname to what you need.

Last edited by Trilby (2019-05-30 12:22:22)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-05-30 12:29:47

oz
Member
Registered: 2004-05-20
Posts: 102

Re: Building an Arch 5.0.19 kernel

Trilby wrote:

There's an even easier way, just get the built package from the archive (assuming you don't still have it in your own cache).

EDIT: ooh, you want 5.0.19, yes that was never in the repos.  Still use asp, and just update the pkgver and _srcname to what you need.

I forgot to mention that I tried asp and updating the pkgver but it failed. I don't believe that 5.0.19 is in the Arch git source archive at all.

Offline

#4 2019-05-30 12:41:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: Building an Arch 5.0.19 kernel

oz wrote:

I forgot to mention that I tried asp and updating the pkgver but it failed.

How did it fail?

oz wrote:

I don't believe that 5.0.19 is in the Arch git source archive at all.

There is no "Arch git source archive".  PKGBUILDs retrieve source files directly from upstream - in this case kernel.org.

Last edited by Trilby (2019-05-30 12:41:11)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2019-05-30 13:15:12

oz
Member
Registered: 2004-05-20
Posts: 102

Re: Building an Arch 5.0.19 kernel

Trilby wrote:

There is no "Arch git source archive".  PKGBUILDs retrieve source files directly from upstream - in this case kernel.org.

Does it?

source=(
  "$_srcname::git+https://git.archlinux.org/linux.git?signed#tag=v$_srcver"

Offline

#6 2019-05-30 13:25:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: Building an Arch 5.0.19 kernel

Arch does mirror upstream repos for some packages but that line isn't in the PKGBUILD I get from asp.  Where did you get that PKGBUILD?

EDIT: oops, asp seems to be giving me old PKGBUILDs for some reason (edit 2: I hadn't run `asp update`).  The current one does pull from the arch mirror repo.  In any case, you can change that to kernel.org sources.

Last edited by Trilby (2019-05-30 13:30:21)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2019-05-30 13:27:18

oz
Member
Registered: 2004-05-20
Posts: 102

Re: Building an Arch 5.0.19 kernel

Trilby wrote:

Arch does mirror upstream repos for some packages but that line isn't in the PKGBUILD I get from asp.  Where did you get that PKGBUILD?

Just "asp update linux" and "asp checkout linux". That's the PKGBUILD I just got.

Offline

#8 2019-05-30 13:55:00

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: Building an Arch 5.0.19 kernel

https://git.archlinux.org/svntogit/pack … f613ed1795

That's the PKGBUILD used for 5.0.13-arch1 , the last 5.0.x kernel arch had.

The extra/linux changelog indicates several things were changed for the 5.1 kernel, starting with 5.0.13 seems a better choice.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#9 2019-05-31 10:34:50

loqs
Member
Registered: 2014-03-06
Posts: 17,378

Re: Building an Arch 5.0.19 kernel

git clone git://git.archlinux.org/svntogit/packages.git --single-branch --branch "packages/linux
cd packages/trunk/
git checkout db9609721c9fc71343c17c9e460cc1f613ed1795

git diff of changes I made

diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index f2f36bf..edb62d2 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -4,17 +4,17 @@
 
 pkgbase=linux               # Build stock -ARCH kernel
 #pkgbase=linux-custom       # Build kernel with a different name
-_srcver=5.0.13-arch1
+_srcver=5.0.19
 pkgver=${_srcver//-/.}
 pkgrel=1
 arch=(x86_64)
-url="https://git.archlinux.org/linux.git/log/?h=v$_srcver"
+url="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=v$_srcver"
 license=(GPL2)
 makedepends=(xmlto kmod inetutils bc libelf git)
 options=('!strip')
-_srcname=archlinux-linux
+_srcname=linux
 source=(
-  "$_srcname::git+https://git.archlinux.org/linux.git?signed#tag=v$_srcver"
+  "$_srcname::git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git?signed#tag=v$_srcver"
   config         # the main kernel config file
   60-linux.hook  # pacman hook for depmod
   90-linux.hook  # pacman hook for initramfs regeneration

Offline

#10 2019-05-31 11:53:09

oz
Member
Registered: 2004-05-20
Posts: 102

Re: Building an Arch 5.0.19 kernel

loqs wrote:

git diff of changes I made

Works, sweet, thanks! I was working on the same thing but couldn't get the kernel.org git to work right.

Offline

Board footer

Powered by FluxBB