mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
amdgpu: add to MODULES and (re)generate initramfs
This commit is contained in:
parent
855bfc0571
commit
eebc63de0b
27
pkg/de-p1st-gpu-amdgpu/.install
Normal file
27
pkg/de-p1st-gpu-amdgpu/.install
Normal 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
|
||||
}
|
@ -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
|
||||
}
|
@ -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
|
||||
* `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`
|
||||
|
||||
For AMDGPU: in /etc/mkinitcpio.conf include "amdgpu" in MODULES=(...).
|
||||
Otherwise Xorg might not start properly.
|
||||
|
||||
```shell
|
||||
# "DRI driver for 3D acceleration"
|
||||
|
6
pkg/de-p1st-gpu-amdgpu/mkinitcpio.conf.holoscript
Normal file
6
pkg/de-p1st-gpu-amdgpu/mkinitcpio.conf.holoscript
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
# stdin: default config
|
||||
# stdout: modified config
|
||||
|
||||
# add amdgpu to MODULES array
|
||||
sed 's|^MODULES=(|MODULES=(amdgpu |'
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user