Add numactl, rocm, amdgpu-pro and README

This commit is contained in:
Fraggle 2026-02-09 10:52:11 -04:00
commit 94e69cedc0
No known key found for this signature in database
16 changed files with 26421 additions and 0 deletions

92
README.md Normal file
View File

@ -0,0 +1,92 @@
# AMD ROCm / Pro ports for Venom Linux
Ports for **numactl**, **ROCm** (HIP, runtimes, udev), and **amdgpu-pro** (optional). Use with Venoms pkgbuild/scratch tooling.
---
## Whats in this repo
| Port | Purpose |
|------------|--------|
| **numactl** | NUMA libs/tools; required by ROCm. |
| **rocm** | ROCm platform to `/opt/rocm` + udev rules + render group (replaces a separate rocm-udev port). |
| **amdgpu-pro** | Optional. Pro installer to `/opt/amdgpu-pro`. |
---
## Prerequisites
- Venom Linux (or compatible system with **pkgbuild** and **scratch**).
- Build deps will be pulled by the ports: **autoconf**, **automake**, **libtool** (numactl); **eudev** (rocm); **bash**, **zstd** (amdgpu-pro). Install any missing system packages first if needed.
---
## Install steps
### 1. Get the ports
```bash
git clone https://git.fraggle.lol/fraggle/ports
cd ports
```
### 2. Build and install in this order
Use **`-i`** for initial installation of each port.
**Step 1 numactl**
```bash
cd numactl
sudo pkgbuild -i
cd ..
```
**Step 2 rocm**
```bash
cd rocm
sudo pkgbuild -i
cd ..
```
- The runfile is large; extraction can take several minutes. Packaging (xz) after “Build success” can take 515+ minutes. Let it finish.
**Step 3 (optional) amdgpu-pro**
```bash
cd amdgpu-pro
sudo pkgbuild -i
cd ..
```
**Rebuilding a port (already installed):** use **`-rcf`** when you are rebuilding a port that is already installed (e.g. after updating the spkgbuild or sources).
### 3. Use ROCm
- Ensure your user is in the **render** group (and **video** if you use it):
```bash
sudo usermod -a -G render,video $USER
```
- Log out and back in (or reboot).
- New shells get the ROCm environment from `/etc/profile.d/rocm.sh`. To use in the current shell:
```bash
source /etc/profile.d/rocm.sh
```
- Check the GPU:
```bash
rocminfo
```
---
## Summary
1. Clone this repo.
2. Build and install **numactl**, then **rocm**, then optionally **amdgpu-pro** (each: `sudo pkgbuild -i` from inside the port directory).
3. Add your user to **render** (and **video**), re-login, and source `rocm.sh` or open a new shell.

1
amdgpu-pro/.checksums Normal file
View File

@ -0,0 +1 @@
eedc2ed8ec12616da9cd22840a71daae2d39251e50b9479f81a054677ea66e6d amdgpu-install_6.4.60402-1_all.deb

23
amdgpu-pro/.pkgfiles Normal file
View File

@ -0,0 +1,23 @@
amdgpu-pro-6.4.60402-1
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/amdgpu-install/
-rwxr-xr-x root/root etc/amdgpu-install/amdgpu-setup.conf
drwxr-xr-x root/root etc/apt/
drwxr-xr-x root/root etc/apt/keyrings/
-rw-r--r-- root/root etc/apt/keyrings/rocm.gpg
drwxr-xr-x root/root etc/apt/preferences.d/
-rw-r--r-- root/root etc/apt/preferences.d/repo-radeon-pin-600
drwxr-xr-x root/root etc/apt/sources.list.d/
-rw-r--r-- root/root etc/apt/sources.list.d/amdgpu.list
-rw-r--r-- root/root etc/apt/sources.list.d/rocm.list
drwxr-xr-x root/root opt/
drwxr-xr-x root/root opt/amdgpu-pro/
drwxr-xr-x root/root opt/amdgpu-pro/bin/
-rwxr-xr-x root/root opt/amdgpu-pro/bin/amdgpu-install
drwxr-xr-x root/root opt/amdgpu-pro/share/
-rwxr-xr-x root/root opt/amdgpu-pro/share/AMDGPUPROEULA
-rw-r--r-- root/root opt/amdgpu-pro/share/amdgpu.list.template
drwxr-xr-x root/root opt/amdgpu-pro/share/orig/
-rw-r--r-- root/root opt/amdgpu-pro/share/orig/amdgpu.list
-rw-r--r-- root/root opt/amdgpu-pro/share/orig/rocm.list
-rw-r--r-- root/root opt/amdgpu-pro/share/rocm.list.template

2
amdgpu-pro/depends Normal file
View File

@ -0,0 +1,2 @@
bash
zstd

28
amdgpu-pro/spkgbuild Normal file
View File

@ -0,0 +1,28 @@
description="AMD Radeon Pro Software - proprietary OpenGL/Vulkan installer and support files."
homepage="https://www.amd.com/en/support/download/linux-drivers.html"
maintainer="Fraggle, fraggle at disroot dot org"
name=amdgpu-pro
version=6.4.60402
release=1
source="amdgpu-install_6.4.60402-1_all.deb::https://repo.radeon.com/amdgpu-install/6.4.2/ubuntu/jammy/amdgpu-install_6.4.60402-1_all.deb"
noextract="amdgpu-install_6.4.60402-1_all.deb"
build() {
mkdir -p pro_extract
cd pro_extract
ar x "$SRC"/amdgpu-install_6.4.60402-1_all.deb
if [ -f data.tar.zst ]; then
zstd -dqc data.tar.zst | tar xf -
elif [ -f data.tar.xz ]; then
tar xf data.tar.xz
else
tar xf data.tar.*
fi
mkdir -p $PKG/opt/amdgpu-pro/bin
[ -f usr/bin/amdgpu-install ] && install -Dm755 usr/bin/amdgpu-install $PKG/opt/amdgpu-pro/bin/amdgpu-install
[ -d usr/share/amdgpu-install ] && cp -a usr/share/amdgpu-install $PKG/opt/amdgpu-pro/share
[ -d etc ] && cp -a etc $PKG/
cd ..
rm -rf pro_extract
}

1
numactl/.checksums Normal file
View File

@ -0,0 +1 @@
0147c1923c791c75abeb2d34333364aeb3233cbe6e71ca002383a92737f081aa numactl-2.0.19.tar.gz

32
numactl/.pkgfiles Normal file
View File

@ -0,0 +1,32 @@
numactl-2.0.19-1
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/memhog
-rwxr-xr-x root/root usr/bin/migratepages
-rwxr-xr-x root/root usr/bin/migspeed
-rwxr-xr-x root/root usr/bin/numactl
-rwxr-xr-x root/root usr/bin/numademo
-rwxr-xr-x root/root usr/bin/numastat
drwxr-xr-x root/root usr/include/
-rw-r--r-- root/root usr/include/numa.h
-rw-r--r-- root/root usr/include/numacompat1.h
-rw-r--r-- root/root usr/include/numaif.h
drwxr-xr-x root/root usr/lib/
-rw-r--r-- root/root usr/lib/libnuma.a
lrwxrwxrwx root/root usr/lib/libnuma.so -> libnuma.so.1.0.0
lrwxrwxrwx root/root usr/lib/libnuma.so.1 -> libnuma.so.1.0.0
-rwxr-xr-x root/root usr/lib/libnuma.so.1.0.0
drwxr-xr-x root/root usr/lib/pkgconfig/
-rw-r--r-- root/root usr/lib/pkgconfig/numa.pc
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man2/
-rw-r--r-- root/root usr/share/man/man2/move_pages.2.gz
drwxr-xr-x root/root usr/share/man/man3/
-rw-r--r-- root/root usr/share/man/man3/numa.3.gz
drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/memhog.8.gz
-rw-r--r-- root/root usr/share/man/man8/migratepages.8.gz
-rw-r--r-- root/root usr/share/man/man8/migspeed.8.gz
-rw-r--r-- root/root usr/share/man/man8/numactl.8.gz
-rw-r--r-- root/root usr/share/man/man8/numastat.8.gz

3
numactl/depends Normal file
View File

@ -0,0 +1,3 @@
autoconf
automake
libtool

20
numactl/spkgbuild Normal file
View File

@ -0,0 +1,20 @@
description="NUMA policy support"
homepage="https://github.com/numactl/numactl"
maintainer="Fraggle, fraggle at disroot dot org"
name=numactl
version=2.0.19
release=1
source="$name-$version.tar.gz::https://github.com/numactl/numactl/archive/refs/tags/v$version.tar.gz"
build() {
cd $name-$version
# Release tarballs may have configure but miss build-aux; regenerate all
./autogen.sh
./configure \
--prefix=/usr \
--sysconfdir=/etc
make
make DESTDIR=$PKG install
}

3
rocm/.checksums Normal file
View File

@ -0,0 +1,3 @@
ac3667fdeedd1def31c3b88fb422fcbebb4bd6420a795e6c1660f158a561f6c7 70-rocm.rules
9b21184f13f245b038e291159535fd15d61d2561b1a9524651ac9cd39a907c0b rocm-installer_1.2.5.70200-25-43~22.04.run
1e6dfe365aae6c9dec4e69a94a040b19761279bdfad4a613357700956a5b76ed rocm.sh

26174
rocm/.pkgfiles Normal file

File diff suppressed because it is too large Load Diff

3
rocm/70-rocm.rules Normal file
View File

@ -0,0 +1,3 @@
# ROCm / AMD GPU - device access for compute (kfd) and render node
KERNEL=="kfd", SUBSYSTEM=="kfd", GROUP="render", MODE="0660"
KERNEL=="render", SUBSYSTEM=="drm", GROUP="render", MODE="0660"

2
rocm/depends Normal file
View File

@ -0,0 +1,2 @@
numactl
eudev

2
rocm/pre-install Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
getent group render >/dev/null || groupadd render

6
rocm/rocm.sh Normal file
View File

@ -0,0 +1,6 @@
# ROCm environment - source from /etc/profile.d/rocm.sh
export ROCM_PATH=/opt/rocm
export PATH="$ROCM_PATH/bin:$PATH"
export LD_LIBRARY_PATH="$ROCM_PATH/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export HIP_PLATFORM=amd
export HIP_VISIBLE_DEVICES=0

29
rocm/spkgbuild Normal file
View File

@ -0,0 +1,29 @@
description="AMD ROCm platform (HIP, runtimes, tools)"
homepage="https://rocm.docs.amd.com/"
maintainer="Fraggle, fraggle at disroot dot org"
name=rocm
version=7.2
release=1
source="rocm-installer_1.2.5.70200-25-43~22.04.run::https://repo.radeon.com/rocm/installer/rocm-runfile-installer/rocm-rel-7.2/ubuntu/22.04/rocm-installer_1.2.5.70200-25-43~22.04.run
rocm.sh
70-rocm.rules"
noextract="rocm-installer_1.2.5.70200-25-43~22.04.run"
build() {
mkdir -p $PKG/opt
echo "==> Extracting ROCm runfile (this may take several minutes)..."
bash "$SRC"/rocm-installer_*.run untar "$PKG/opt"
rocmdir=$(ls -d $PKG/opt/rocm-* 2>/dev/null | head -1)
if [ -z "$rocmdir" ]; then
echo "ERROR: ROCm extraction did not produce rocm-* directory" >&2
exit 1
fi
mv "$rocmdir" $PKG/opt/rocm
# Environment for new shells
install -Dm644 $SRC/rocm.sh $PKG/etc/profile.d/rocm.sh
# udev rules for GPU access (kfd, render)
install -Dm644 $SRC/70-rocm.rules $PKG/etc/udev/rules.d/70-rocm.rules
}