You are not logged in.

#1 2024-05-10 19:02:24

webcapcha
Member
Registered: 2019-02-14
Posts: 167

I need an assistant to build a kernel with a patch from lore.kernel.or

I've reported a bug https://bugzilla.kernel.org/show_bug.cgi?id=218789 and looks like a fix is proposed.

To test it I need a custom kernel with this fix. I've tried to build a kernel few days ago, different patch for different bug and no luck.

I saw wiki page but in my case I need more detailed instruction lol. Can someone assist? Ideally to build it by myself.


Ukrainian

Offline

#2 2024-05-10 19:11:39

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: I need an assistant to build a kernel with a patch from lore.kernel.or

https://wiki.archlinux.org/title/Arch_build_system

Just add the patch to the source array and add a patch step in the prepare function of the linux package.  Should be easy.

Offline

#3 2024-05-10 19:29:18

webcapcha
Member
Registered: 2019-02-14
Posts: 167

Re: I need an assistant to build a kernel with a patch from lore.kernel.or

Well as I said I saw that wiki page and it doesn't help. lol And not easy

The start question what is patch in my case https://lore.kernel.org/linux-acpi/4926 … @kreacher/  Should I just copy a code from the link? Or manually modify files with changes. How to name the patch file if it's matter.

Last edited by webcapcha (2024-05-10 19:29:54)


Ukrainian

Offline

#4 2024-05-10 19:30:03

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

Re: I need an assistant to build a kernel with a patch from lore.kernel.or

linux-6.8.9.arch1 with https://lore.kernel.org/linux-acpi/4926 … @kreacher/ applied:
https://drive.google.com/file/d/1rWIHI1 … sp=sharing linux-6.8.9.arch1-2.1-x86_64.pkg.tar.zst
https://drive.google.com/file/d/1zx8ucB … sp=sharing linux-headers-6.8.9.arch1-2.1-x86_64.pkg.tar.zst
Edit:
diff of changes I made to the PKGBUILD:

diff --git a/PKGBUILD b/PKGBUILD
index 33d67c9..a06b7ff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
 
 pkgbase=linux
 pkgver=6.8.9.arch1
-pkgrel=2
+pkgrel=2.1
 pkgdesc='Linux'
 url='https://github.com/archlinux/linux'
 arch=(x86_64)
@@ -17,13 +17,6 @@ makedepends=(
   python
   tar
   xz
-
-  # htmldocs
-  graphviz
-  imagemagick
-  python-sphinx
-  python-yaml
-  texlive-latexextra
 )
 options=(
   !debug
@@ -34,6 +27,7 @@ _srctag=v${pkgver%.*}-${pkgver##*.}
 source=(
   https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign}
   $url/releases/download/$_srctag/linux-$_srctag.patch.zst{,.sig}
+  '4926735.31r3eYUQgx@kreacher.patch::https://lore.kernel.org/linux-acpi/4926735.31r3eYUQgx@kreacher/raw'
   config  # the main kernel config file
 )
 validpgpkeys=(
@@ -46,11 +40,13 @@ sha256sums=('f905f1238ea7a8e85314bacf283302e8097006010d25fcea726d0de0ea5bc9b6'
             'SKIP'
             '7a212eedb9fe3da99d6d5b63eb5f28c10ee4333e4d42ea1bb3842a15d3107bef'
             'SKIP'
+            'd7d5ac49f262d9ecc7ae2f0c48f6bb90a713617f156d87abd32e0b0d01b8f647'
             '4f1967a107ebdec0d5bbbb7d18ac1d61d40c0c9394d823b8fc52c8908a33b879')
 b2sums=('0305b6636a4e382855a2804cedc3984f1e891b26b24412e3533b1f29a07459d39be5121d4618da20098623290e922d502b7ac1b774f39e732f23a778a4b5b5be'
         'SKIP'
         '4b7fce0c3be10e51f45d4b9730dadeaff4881a42021ea31dfe6d33f73fb2f37d2a89e66d98b39b78a5b6052673d75de187faa4e8011ce0b25716786916f653fb'
         'SKIP'
+        'c82bc23c35cdb9a86618ceb654381fc6e6ae26afb5d5b8f50729af49725787cee352bbc647abc6fb784d3a848c2a85c19b2375bf5c31ed0eb8f051ba3618059b'
         '29477484662cecdd0563bda6354b35cd8d90d90b099c13ba24f15e76d0a69f61b2b9df2e58be3fc7464975e728efc23be7b6432b2afc741ed721a7e8d3370fab')
 
 export KBUILD_BUILD_HOST=archlinux
@@ -87,7 +83,6 @@ build() {
   cd $_srcname
   make all
   make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1
-  make htmldocs
 }
 
 _package() {
@@ -212,29 +207,9 @@ _package-headers() {
   ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
 }
 
-_package-docs() {
-  pkgdesc="Documentation for the $pkgdesc kernel"
-
-  cd $_srcname
-  local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
-
-  echo "Installing documentation..."
-  local src dst
-  while read -rd '' src; do
-    dst="${src#Documentation/}"
-    dst="$builddir/Documentation/${dst#output/}"
-    install -Dm644 "$src" "$dst"
-  done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
-
-  echo "Adding symlink..."
-  mkdir -p "$pkgdir/usr/share/doc"
-  ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
-}
-
 pkgname=(
   "$pkgbase"
   "$pkgbase-headers"
-  "$pkgbase-docs"
 )
 for _p in "${pkgname[@]}"; do
   eval "package_$_p() {

Last edited by loqs (2024-05-10 19:33:09)

Offline

#5 2024-05-10 19:33:00

webcapcha
Member
Registered: 2019-02-14
Posts: 167

Re: I need an assistant to build a kernel with a patch from lore.kernel.or

Well thanks for building a package for me.

I'm still want to solve the original question though. I have a few bugs to report and looks like every time I will stuck with this patches to be applies somehow


Ukrainian

Offline

#6 2024-05-10 19:39:58

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

Re: I need an assistant to build a kernel with a patch from lore.kernel.or

My edit came at the same time as you replied.  If that does not help, please provide more details about what went wrong when you built a custom kernel.

Offline

#7 2024-05-10 20:00:49

webcapcha
Member
Registered: 2019-02-14
Posts: 167

Re: I need an assistant to build a kernel with a patch from lore.kernel.or

The questions are:

1. here is a link to the patch   '4926735.31r3eYUQgx@kreacher.patch::https://lore.kernel.org/linux-acpi/4926735.31r3eYUQgx@kreacher/raw' how to draw it up? I see the first part is message id the second is the link. Is it always looks like this?
2. Where to get sha256sums and b2sums. Well I know how to get the sum for files within terminal. I mean how to get sums for particular patch? On what file I have to calculate it.
3. I got an error

    linux-6.8.9.tar ... FAILED (unknown public key 38DBBDC86092693E)
    linux-v6.8.9-arch1.patch.zst ... FAILED (unknown public key B8AC08600F108CDF)
==> ERROR: One or more PGP signatures could not be verified!

Ukrainian

Offline

#8 2024-05-10 20:20:42

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

Re: I need an assistant to build a kernel with a patch from lore.kernel.or

webcapcha wrote:

1. here is a link to the patch   '4926735.31r3eYUQgx@kreacher.patch::https://lore.kernel.org/linux-acpi/4926735.31r3eYUQgx@kreacher/raw' how to draw it up? I see the first part is message id the second is the link. Is it always looks like this?

The format above is needed when you want to rename a file locally.  Without the rename the file would be downloaded to 4926735.31r3eYUQgx@kreacher which does not have the .patch extension so would not automatically be applied by the PKGBUILD.

webcapcha wrote:

2. Where to get sha256sums and b2sums. Well I know how to get the sum for files within terminal. I mean how to get sums for particular patch? On what file I have to calculate it.

The checksums array entries match to the source array entries so you add it in the same position in that array as you add the patch in the sources array or use `makepkg -g >> PKGBUILD` or `updpkgsums`  as covered in step 2 of Applying_patches

webcapcha wrote:

3. I got an error

    linux-6.8.9.tar ... FAILED (unknown public key 38DBBDC86092693E)
    linux-v6.8.9-arch1.patch.zst ... FAILED (unknown public key B8AC08600F108CDF)
==> ERROR: One or more PGP signatures could not be verified!

Signing keys need to be in the keyring of the user running makepkg

gpg --import keys/pgp/*.asc

GnuPG#Import_a_public_key

Last edited by loqs (2024-05-10 20:21:18)

Offline

Board footer

Powered by FluxBB