7fbe289767
build and publish packages / distcc-avahi-aarch64 (push) Successful in 56s
build and publish packages / lmcp-any (push) Successful in 8s
build and publish packages / lmcp-debian (push) Successful in 5s
build and publish packages / claude-his-any (push) Successful in 7s
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Successful in 10m12s
build and publish packages / claude-his-debian (push) Successful in 6s
build and publish packages / libva-v4l2-request-fourier-aarch64 (push) Successful in 12s
build and publish packages / mpv-fourier-aarch64 (push) Successful in 1m1s
130 lines
4.1 KiB
Bash
130 lines
4.1 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=1
|
|
pkgdesc='Pinebook Pro kernel (mmind/linux-rockchip v7.0 + OC OPP + PBP DTS tweaks)'
|
|
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"
|
|
'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'
|
|
'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')
|
|
|
|
_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; }"
|