You are not logged in.

#1 2018-02-10 20:40:56

hexag
Member
Registered: 2018-02-10
Posts: 1

Custom PKGBUILD with linux-git - Trying to compile 4.15 with ROCm

Hi all,

Trying to patch this, but with AUR kernel-git, instead 4.9. Intended result is having ROCm drivers with 4.15 kernel, for AMD Vega.

diff --git a/PKGBUILD b/PKGBUILD
index ae5e7b0..c135a8f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,16 +5,16 @@
 # Contributor: misc <tastky@gmail.com>
 # Contributor: NextHendrix <cjones12 at sheffield.ac.uk>

-pkgbase=linux-git
-_srcname=linux
-pkgver=4.9.r0.g69973b8
+pkgbase=linux-rocm
+_srcname=ROCK-Kernel-Driver
+pkgver=roc.1.5.0.r0.g757f29e928f0
 pkgrel=1
 arch=('i686' 'x86_64')
 url="http://www.kernel.org/"
 license=('GPL2')
 makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'libelf')
 options=('!strip')
-source=('git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git'
+source=('git+https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver.git'
         # the main kernel config files
         'config' 'config.x86_64'
         # standard config files for mkinitcpio ramdisk
diff --git a/linux-git.preset b/linux-rocm.preset
similarity index 100%
rename from linux-git.preset
rename to linux-rocm.preset

I edited the patch to look like this:

diff --git a/PKGBUILD b/PKGBUILD
index ae5e7b0..c135a8f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,16 +5,16 @@
 # Contributor: misc <tastky@gmail.com>
 # Contributor: NextHendrix <cjones12 at sheffield.ac.uk>

-pkgbase=linux-git
-_srcname=linux
-pkgver=4.15rc9.r1.g0d665e7b109d
+pkgbase=linux-rocm
+_srcname=ROCK-Kernel-Driver
+pkgver=roc.1.5.0.r0.g757f29e928f0
 pkgrel=1
 arch=('i686' 'x86_64')
 url="http://www.kernel.org/"
 license=('GPL2')
 makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'libelf')
 options=('!strip')
-source=('git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi$
+source=('git+https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver.git'
         # the main kernel config files
         'config' 'config.x86_64'
         # standard config files for mkinitcpio ramdisk
diff --git a/linux-git.preset b/linux-rocm.preset
similarity index 100%
rename from linux-git.preset
rename to linux-rocm.preset

Running

 makepkg -sf 

Results in this error message:

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  UPD     include/config/kernel.release
  DESCEND  objtool
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
scripts/kconfig/conf  --olddefconfig Kconfig
#
# configuration written to .config
#
==> Starting pkgver()...
fatal: No tags can describe '2691bd0b3c79b717951e7a0fdbe7e5cbac951bb5'.
Try --always, or create some tags.
==> ERROR: pkgver is not allowed to be empty.
==> ERROR: pkgver() generated an invalid version: 

Thanks all!

Offline

#2 2018-02-10 20:56:32

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

Re: Custom PKGBUILD with linux-git - Trying to compile 4.15 with ROCm

-source=('git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git'
+source=('git+https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver.git'

Removing the mainline source tree and replacing it with one which does not contain any tags results in this error.  Does the source tree you switched to contain 4.15?
Edit:
The repo you switched to does contain tags why git describe fails needs more investigation.  The tree does not contain 4.14 or 4.15 though unless you mean the fkxamd/drm-next-wip which is somewhere between 4.14 and 4.17

Last edited by loqs (2018-02-10 21:28:59)

Offline

Board footer

Powered by FluxBB