amdgpu: add to MODULES and (re)generate initramfs

This commit is contained in:
Daniel Langbein 2021-05-24 16:11:06 +02:00
parent 855bfc0571
commit eebc63de0b
5 changed files with 58 additions and 7 deletions

View File

@ -0,0 +1,27 @@
## arg 1: the new package version
post_install() {
holo apply
if ! mkinitcpio -P; then
echo "Failed to generate initramfs. Please run 'mkinitcpio -P' manually. (This is normal during initial system installation).";
return 1;
fi
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
holo apply
if ! mkinitcpio -P; then
echo "Failed to generate initramfs."
return 1
fi
}
## arg 1: the old package version
post_remove() {
holo apply
if ! mkinitcpio -P; then
echo "Failed to generate initramfs."
return 1
fi
}

View File

@ -2,7 +2,7 @@
_pkgname=gpu-amdgpu
_reponame=arch
pkgname="de-p1st-$_pkgname"
pkgver=0.0.1
pkgver=0.0.2
pkgrel=1
pkgdesc="AMDGPU"
arch=('any')
@ -19,5 +19,18 @@ depends+=(vulkan-radeon)
depends+=(libva-mesa-driver)
# "HW-vide-acceleration: VDPAU"
depends+=(mesa-vdpau)
# holo
depends+=('holo' 'base') # without base "holo apply" may fail on initial system installation
makedepends=('git')
provides=('de-p1st-gpu') # implicitly provides $pkgname
install='.install'
source=("git+${url}.git")
sha256sums=('SKIP')
package() {
cd "${_reponame}/pkg/${pkgname}"
# 10$pkgname as this shall be applied before de-p1st-mkinitcpio
install -Dm0544 mkinitcpio.conf.holoscript "$pkgdir"/usr/share/holo/files/10"$pkgname"/etc/mkinitcpio.conf.holoscript
}

View File

@ -22,10 +22,14 @@ From gentoo wiki one should use AMDGPU e.g. for:
* run `vainfo` and `vdpauinfo` as non-root
**TODO**: archwiki -> kernel-mode-setting -> early-kms-start
For AMDGPU: in /etc/mkinitcpio.conf include "amdgpu" in MODULES=(...).
Otherwise Xorg might not start properly.
* `amdgpu` module
* see also: https://wiki.archlinux.org/title/AMDGPU#Loading
* The amdgpu kernel module is supposed to load automatically
on system boot.
* It is possible it loads, but late, after the X server requires it.
In this case:
* Include "amdgpu" in MODULES=(...) of `/etc/mkinitcpio.conf`
```shell
# "DRI driver for 3D acceleration"

View File

@ -0,0 +1,6 @@
#!/bin/sh
# stdin: default config
# stdout: modified config
# add amdgpu to MODULES array
sed 's|^MODULES=(|MODULES=(amdgpu |'

View File

@ -2,7 +2,7 @@
_pkgname=mkinitcpio
_reponame=arch
pkgname="de-p1st-$_pkgname"
pkgver=0.0.7
pkgver=0.0.8
pkgrel=1
pkgdesc="mkinitcpio configuration"
arch=('any')
@ -17,5 +17,6 @@ sha256sums=('SKIP')
package() {
cd "${_reponame}/pkg/${pkgname}"
install -Dm0544 mkinitcpio.conf.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/mkinitcpio.conf.holoscript
# 11$pkgname as this shall be applied after de-p1st-gpu-amdgpu
install -Dm0544 mkinitcpio.conf.holoscript "$pkgdir"/usr/share/holo/files/11"$pkgname"/etc/mkinitcpio.conf.holoscript
}