e9bc6ebd27
Sibling to kernel-agent PR #7 (which lands the vb2_dma_resv RFC v2 series under patches/subsystem/media/videobuf2/ and updates fleet/fresnel.yaml to include them). This PR carries the same three patches in the build-tree-ready form for the linux-fresnel-fourier PKGBUILD. Background: Markus iterated v2 locally on boltzmann reaching pkgrel=14 since the 2026-05-09 bootstrap published 7.0-1. v2 attaches the V4L2 producer fence at device_run in slept-OK context per Dufresne's v1 review on linux-media. Drivers opted in here: hantro + rockchip-rga. Changes: - pkgrel 1 -> 14 - pkgdesc adds '+ vb2_dma_resv RFC v2' - source array gains 3 new local patch files (scope-tagged comments point to where they live in marfrit/kernel-agent) - sha256sums extended to 11 SKIP entries No prepare() edit needed — the existing for-loop applies every *.patch in $srcdir, so the 4/5/6 patches get picked up automatically. config unchanged (verified diff vs boltzmann's local pkgrel=14 tree). Pre-built artifacts: linux-fresnel-fourier-7.0-14-aarch64.pkg.tar.zst and linux-fresnel-fourier-headers-7.0-14-aarch64.pkg.tar.zst already exist on boltzmann at /home/mfritsche/src/kernel-agent-bootstrap/ build/marfrit-packages/arch/linux-fresnel-fourier/ — will be signed and published via marfrit-publish-arch after this PR merges (no fresh compile needed; the artifacts were built locally during the iteration loop that reached pkgrel=14).
135 lines
4.5 KiB
Bash
135 lines
4.5 KiB
Bash
# Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
|
#
|
|
# linux-fresnel-fourier — overclocked + DTS-tweaked Pinebook Pro kernel
|
|
# baselined on mmind/linux-rockchip v7.0.
|
|
#
|
|
# Coexists with linux-eos-arm; ships its own /boot/{Image,dtbs}-fresnel-fourier
|
|
# paths. Extlinux entry adds itself as a parallel boot option; user picks at
|
|
# u-boot menu. Reverting = boot the linux-eos-arm entry.
|
|
|
|
pkgbase=linux-fresnel-fourier
|
|
pkgname=("$pkgbase" "$pkgbase-headers")
|
|
pkgver=7.0
|
|
pkgrel=14
|
|
pkgdesc='Pinebook Pro kernel (mmind/linux-rockchip v7.0 + OC OPP + PBP DTS tweaks + vb2_dma_resv RFC v2)'
|
|
arch=(aarch64)
|
|
url='https://git.reauktion.de/marfrit/kernel-agent'
|
|
license=(GPL-2.0-only)
|
|
makedepends=(
|
|
bc cpio gettext kmod libelf pahole perl python tar xz
|
|
ccache
|
|
uboot-tools dtc
|
|
)
|
|
options=('!strip')
|
|
source=(
|
|
"https://git.kernel.org/torvalds/t/linux-${pkgver}.tar.gz"
|
|
# board/pinebook-pro
|
|
'0001-arm64-dts-rk3399-pinebook-pro-add-OC-OPP-tables-1704-2184.patch'
|
|
'0002-arm64-dts-rk3399-pinebook-pro-enable-hdmi-sound.patch'
|
|
'0003-arm64-dts-rk3399-pinebook-pro-spi1-max-freq-10MHz.patch'
|
|
# subsystem/media/videobuf2/dma-resv-release-fence (RFC v2, in kernel-agent)
|
|
'0004-media-videobuf2-add-opt-in-dma_resv-producer-fence-h.patch'
|
|
'0005-media-hantro-attach-dma_resv-release-fence-at-device.patch'
|
|
'0006-media-rockchip-rga-attach-dma_resv-release-fence-at-.patch'
|
|
'config' # snapshot of fresnel /usr/lib/modules/6.19.10-1-eos-arm/build/.config
|
|
'linux-fresnel-fourier.preset'
|
|
'extlinux-add.hook'
|
|
'extlinux-add.sh'
|
|
)
|
|
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
|
|
|
|
_kernver=${pkgver}.0-fresnel-fourier
|
|
_srcdir=linux-${pkgver}
|
|
|
|
prepare() {
|
|
cd "${_srcdir}"
|
|
|
|
echo ":: applying patches"
|
|
for p in "${srcdir}"/*.patch; do
|
|
echo " $(basename "$p")"
|
|
patch -Np1 -i "$p"
|
|
done
|
|
|
|
echo ":: writing config"
|
|
cp "${srcdir}/config" .config
|
|
|
|
# Force EXTRAVERSION suffix so the kernel version string and module dir
|
|
# become ${_kernver} — keeps them disjoint from linux-eos-arm.
|
|
scripts/config --set-str LOCALVERSION "-fresnel-fourier"
|
|
scripts/config -d LOCALVERSION_AUTO
|
|
|
|
echo ":: olddefconfig (accept new symbols sensibly)"
|
|
make olddefconfig
|
|
|
|
make -s kernelrelease > version
|
|
echo ":: kernel release: $(<version)"
|
|
}
|
|
|
|
build() {
|
|
cd "${_srcdir}"
|
|
unset LDFLAGS
|
|
# Native build only — no distcc per kernel-agent policy
|
|
# (feedback_kernel_agent_no_distcc.md). ccache stays.
|
|
export CC="ccache gcc"
|
|
export HOSTCC="ccache gcc"
|
|
make ${MAKEFLAGS:--j$(nproc)} Image modules dtbs
|
|
}
|
|
|
|
_package() {
|
|
pkgdesc='Pinebook Pro overclocked kernel (fresnel-fourier baseline)'
|
|
depends=(coreutils kmod mkinitcpio uboot-tools)
|
|
optdepends=('linux-firmware: firmware images needed for some devices')
|
|
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
|
|
|
cd "${_srcdir}"
|
|
local _kver
|
|
_kver=$(<version)
|
|
|
|
install -Dm644 arch/arm64/boot/Image \
|
|
"${pkgdir}/boot/Image-fresnel-fourier"
|
|
|
|
# DTBs into a private tree to avoid clobbering linux-eos-arm
|
|
install -d "${pkgdir}/boot/dtbs-fresnel-fourier/rockchip"
|
|
cp -a arch/arm64/boot/dts/rockchip/*.dtb \
|
|
"${pkgdir}/boot/dtbs-fresnel-fourier/rockchip/"
|
|
|
|
ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="${pkgdir}/usr" \
|
|
INSTALL_MOD_STRIP=1 modules_install
|
|
rm -f "${pkgdir}/usr/lib/modules/${_kver}/"{source,build}
|
|
|
|
install -Dm644 "${srcdir}/${pkgbase}.preset" \
|
|
"${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
|
|
|
install -Dm755 "${srcdir}/extlinux-add.hook" \
|
|
"${pkgdir}/usr/share/libalpm/hooks/95-${pkgbase}-extlinux.hook"
|
|
install -Dm755 "${srcdir}/extlinux-add.sh" \
|
|
"${pkgdir}/usr/share/libalpm/scripts/${pkgbase}-extlinux"
|
|
}
|
|
|
|
_package-headers() {
|
|
pkgdesc='Headers and scripts for the linux-fresnel-fourier kernel'
|
|
depends=(pahole)
|
|
|
|
cd "${_srcdir}"
|
|
local _kver _builddir
|
|
_kver=$(<version)
|
|
_builddir="${pkgdir}/usr/lib/modules/${_kver}/build"
|
|
|
|
install -Dt "${_builddir}" -m644 .config Makefile Module.symvers System.map vmlinux version
|
|
install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
|
|
|
|
cp -a scripts "${_builddir}"
|
|
install -Dt "${_builddir}/arch/arm64" -m644 arch/arm64/Makefile
|
|
cp -a arch/arm64/include "${_builddir}/arch/arm64/"
|
|
cp -a include "${_builddir}/"
|
|
|
|
find . -name 'Kbuild' -exec install -Dm644 {} "${_builddir}/{}" \;
|
|
find . -name 'Kconfig*' -exec install -Dm644 {} "${_builddir}/{}" \;
|
|
|
|
install -d "${pkgdir}/usr/src"
|
|
ln -sr "${_builddir}" "${pkgdir}/usr/src/${pkgbase}"
|
|
}
|
|
|
|
eval "package_${pkgbase}() { _package; }"
|
|
eval "package_${pkgbase}-headers() { _package-headers; }"
|