diff options
author | boogie | 2023-09-02 00:21:11 +0200 |
---|---|---|
committer | boogie | 2023-09-02 00:21:11 +0200 |
commit | 73b8fe671109e9727873e0ac0ca88a5b75c2262a (patch) | |
tree | 7ccc6f8f9c80eaa5d6b04fccf80e8087f39710ba | |
parent | 38b63a86267f80bfa8d0c6fa576b4b461cf792c7 (diff) | |
download | aur-73b8fe671109e9727873e0ac0ca88a5b75c2262a.tar.gz |
remove mali libraries and depend external firmware
use new radxa repo
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 102 | ||||
-rwxr-xr-x | libmali | 19 | ||||
-rwxr-xr-x | libmaliw | 18 | ||||
-rw-r--r-- | mali_csffw.bin | bin | 0 -> 270336 bytes |
5 files changed, 42 insertions, 117 deletions
@@ -10,31 +10,19 @@ pkgbase = linux-radxa-rkbsp5-bin makedepends = grep makedepends = mkinitcpio makedepends = sed + noextract = linux-rockchip.git#branch=main noextract = linux.preset noextract = extract-vmlinux noextract = extlinux.arch.template - noextract = libmali-valhall-g610-g6p0-wayland-gbm.so - noextract = libmali-valhall-g610-g6p0-x11-gbm.so - noextract = mali_csffw.bin - noextract = libmali - noextract = libmaliw options = !strip + source = git+https://github.com/radxa-pkg/linux-rockchip.git#branch=main source = linux.preset source = extract-vmlinux source = extlinux.arch.template - source = libmali_g610_wayland.so::https://github.com/JeffyCN/mirrors/raw/9869c5a8aa0c103efac5a5d5eefe03468a6b8396/lib/aarch64-linux-gnu/libmali-valhall-g610-g6p0-wayland-gbm.so - source = libmali_g610_x.so::https://github.com/JeffyCN/mirrors/raw/9869c5a8aa0c103efac5a5d5eefe03468a6b8396/lib/aarch64-linux-gnu/libmali-valhall-g610-g6p0-x11-gbm.so - source = https://github.com/JeffyCN/mirrors/raw/488f49467f5b4adb8ae944221698e9a4f9acb0ed/firmware/g610/mali_csffw.bin - source = libmali - source = libmaliw + sha512sums = SKIP sha512sums = 03cdaa19ff754c1b16cbfe8b08d38fed2f21c688a6e00d331ca53c4ef937c1cd3fdcfca2241d136238f220a87f3da04c1e6e192d262b4505f8bff3ddcbc8b9ad sha512sums = ba6edcd5f56a4c3e865578eabf1e1311b8e5e7babffdb0f84b99971238505ca27eba506f2723638129ef6558eba95f7e4fd2e07b40e5a4de716e5de90d1cbe79 sha512sums = b09481badcc35acc5455b97545e87c706c5cb326e1b80237b2435d821c3c45002b44538095f3c5f3cfc720acf55bc27d97b0290e5cffa5acbdbaf0c2314f2d1b - sha512sums = b42aa015773c3fc713e2e70fa39673049709d77a8492506605f54f84842a3fe5269986318dc74a99e674ebe0b11efd597f1f6087b0f348ac21b97a83824c6865 - sha512sums = d819e88ce1ffc5b5c8ec6759e504f14d16dae02bdca1eb7abdb560033981d4e342d360a7ce3f8b8240f0caaa88b9dc666ed8fd218bebbdbb439d1eb52f18488a - sha512sums = fbcc7d4954a35d0c15a942f0fcb55d6423c3d2263b29a575f26a17d5e4acc75897bed46d89b2504934427078b8628691fbb4a872a2b6eb658192aa856eab9460 - sha512sums = 49299ae1f06c78746e6ef5768c1850a433ed0dcaac833ef8d060783d63d37022b4b6ada6630f7a2089a4c3a176408fce5237f79e1171a63593ce58c0c8a2228f - sha512sums = 459d7b1f02983a3fd82b4aadaf753e2b23f634f1d1d8299f5067cd8edcda152d374f3b07be859e70bb293d62e74d7e6b65df1cf389be46318cfc4d4fd8e4d3af pkgname = linux-radxa-rkbsp5-bin pkgdesc = Precompiled Linux kernel image based on 5.10.x BSP published by RADXA targetting rk3399 based rock4 and rk3588 based rock5 boards @@ -44,11 +32,11 @@ pkgname = linux-radxa-rkbsp5-bin depends = mkinitcpio>=0.7 depends = grep depends = gzip + depends = mali-valhall-g610-firmware optdepends = crda: to set the correct wireless channels of your country provides = linux=5.10.110 provides = linux-rkbsp conflicts = linux - conflicts = libmali backup = etc/mkinitcpio.d/linux-radxa-rkbsp5.preset pkgname = linux-radxa-rkbsp5-bin-headers @@ -6,55 +6,42 @@ _kernel=linux-radxa-rkbsp5 pkgver=5.10.110 pkgbase=$_kernel-bin pkgname=($pkgbase $pkgbase-headers) -blobcommit="9869c5a8aa0c103efac5a5d5eefe03468a6b8396" -fwcommit="488f49467f5b4adb8ae944221698e9a4f9acb0ed" pkgrel=4 arch=('aarch64') url="https://github.com/radxa/kernel" -_repourl="https://github.com/radxa/apt/raw/gh-pages/bullseye-stable/" license=('GPL2') options=('!strip') makedepends=('binutils' 'tar' 'grep' 'mkinitcpio' 'sed') pkgdesc="Precompiled Linux kernel package based on 5.10.x BSP kernel published by RADXA targetting rk3399 based rock4 and rk3588 based rock5 boards" source=( + git+https://github.com/radxa-pkg/linux-rockchip.git#branch=main "linux.preset" "extract-vmlinux" "extlinux.arch.template" - "libmali_g610_wayland.so::https://github.com/JeffyCN/mirrors/raw/${blobcommit}/lib/aarch64-linux-gnu/libmali-valhall-g610-g6p0-wayland-gbm.so" - "libmali_g610_x.so::https://github.com/JeffyCN/mirrors/raw/${blobcommit}/lib/aarch64-linux-gnu/libmali-valhall-g610-g6p0-x11-gbm.so" - "https://github.com/JeffyCN/mirrors/raw/${fwcommit}/firmware/g610/mali_csffw.bin" - "libmali" - "libmaliw" ) -sha512sums=('03cdaa19ff754c1b16cbfe8b08d38fed2f21c688a6e00d331ca53c4ef937c1cd3fdcfca2241d136238f220a87f3da04c1e6e192d262b4505f8bff3ddcbc8b9ad' +sha512sums=('SKIP' + '03cdaa19ff754c1b16cbfe8b08d38fed2f21c688a6e00d331ca53c4ef937c1cd3fdcfca2241d136238f220a87f3da04c1e6e192d262b4505f8bff3ddcbc8b9ad' 'ba6edcd5f56a4c3e865578eabf1e1311b8e5e7babffdb0f84b99971238505ca27eba506f2723638129ef6558eba95f7e4fd2e07b40e5a4de716e5de90d1cbe79' - 'b09481badcc35acc5455b97545e87c706c5cb326e1b80237b2435d821c3c45002b44538095f3c5f3cfc720acf55bc27d97b0290e5cffa5acbdbaf0c2314f2d1b' - 'b42aa015773c3fc713e2e70fa39673049709d77a8492506605f54f84842a3fe5269986318dc74a99e674ebe0b11efd597f1f6087b0f348ac21b97a83824c6865' - 'd819e88ce1ffc5b5c8ec6759e504f14d16dae02bdca1eb7abdb560033981d4e342d360a7ce3f8b8240f0caaa88b9dc666ed8fd218bebbdbb439d1eb52f18488a' - 'fbcc7d4954a35d0c15a942f0fcb55d6423c3d2263b29a575f26a17d5e4acc75897bed46d89b2504934427078b8628691fbb4a872a2b6eb658192aa856eab9460' - '49299ae1f06c78746e6ef5768c1850a433ed0dcaac833ef8d060783d63d37022b4b6ada6630f7a2089a4c3a176408fce5237f79e1171a63593ce58c0c8a2228f' - '459d7b1f02983a3fd82b4aadaf753e2b23f634f1d1d8299f5067cd8edcda152d374f3b07be859e70bb293d62e74d7e6b65df1cf389be46318cfc4d4fd8e4d3af') + 'b09481badcc35acc5455b97545e87c706c5cb326e1b80237b2435d821c3c45002b44538095f3c5f3cfc720acf55bc27d97b0290e5cffa5acbdbaf0c2314f2d1b') noextract=("${source[@]##*/}") prepare() { cd "$srcdir" - rm -rf $(find -mindepth 1 -maxdepth 1 -type d) - - mkdir -p debs - cd debs + rm -rf debs + rm -rf image + mkdir -p debs + cd "linux-rockchip" + local _tag=$(git describe --tags) + # get the latest image version from debian repo - local _latest=$(curl -Lk ${_repourl}db/packages.db | grep -oa "pool/main/l/linux-5.10-rock-5-latest.*" | sort -r | head -1) - curl -L "${_repourl}${_latest}" -o latest.deb - ar x "latest.deb" - tar -m -xf control.tar.gz - _imagever=$(cat control | grep -o linux-image-[A-Za-z0-9\.\-]*) - _version=${_imagever#linux-image-} - echo $_version > ../version - rm -rf * + local _image=$(curl -Lk https://github.com/radxa-pkg/linux-rockchip/releases/expanded_assets/$_tag | grep -oa linux-image-5\.10\.110[0-9a-zA-Z._-]* | sort -r | head -1) + echo $_image | grep -oa 5.10.110-[0-9]*-[a-zA-Z0-9]* | sort | head -1 > ../version + echo $_image | grep -oa 5.10.110-[0-9]*-[a-zA-Z0-9]* | sort -r | head -1 > ../preversion + echo $_tag > ../tag } pkgver(){ @@ -65,17 +52,20 @@ pkgver(){ _package-bin() { pkgdesc="Precompiled Linux kernel image based on 5.10.x BSP published by RADXA targetting rk3399 based rock4 and rk3588 based rock5 boards" - depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7' 'grep' 'gzip') + depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7' 'grep' 'gzip' 'mali-valhall-g610-firmware') optdepends=('crda: to set the correct wireless channels of your country') backup=("etc/mkinitcpio.d/$_kernel.preset") provides=("linux=${pkgver}" "linux-rkbsp") - conflicts=('linux' 'libmali') - + conflicts=('linux') + cd "$srcdir/debs" local _version="$(<../version)" + local _preversion="$(<../preversion)" + local _tag="$(<../tag)" # download & extract image deb - local _imagedeb=$(curl -Lk ${_repourl}db/packages.db | grep -oa "pool.*linux-image-$_version.*\.deb" | sort -r | head -1) - curl -L "${_repourl}${_imagedeb}" -o image.deb + local _image_url="https://github.com/radxa-pkg/linux-rockchip/releases/download/$_tag/linux-image-${_preversion}_${_version}_arm64.deb" + + curl -L "${_image_url}" -o image.deb ar x "image.deb" mkdir -p ../image tar -m -xf data.tar.xz -C ../image @@ -88,12 +78,8 @@ _package-bin() { # copy dtbs mkdir -p "$pkgdir/boot/dtbs/$_kernel" - cp -raf "usr/lib/linux-image-${_version}/." "$pkgdir/boot/dtbs/$_kernel" + cp -raf "usr/lib/linux-image-${_preversion}/." "$pkgdir/boot/dtbs/$_kernel" - # move rockchip/overlay directory to rockchip/overlays which is the common place for git and bin package - mv "${pkgdir}/boot/dtbs/$_kernel/rockchip/overlay" "${pkgdir}/boot/dtbs/$_kernel/rockchip/overlays" | true - - # install extlinux template install -Dm755 ../extlinux.arch.template "$pkgdir/boot/extlinux/extlinux.arch.template" @@ -101,12 +87,12 @@ _package-bin() { cp -r lib "$pkgdir/usr/lib" # copy kernel, bootlaoder can not load compressed kernels - ../extract-vmlinux "boot/vmlinuz-${_version}" > "$pkgdir/usr/lib/modules/$_version/vmlinuz" + ../extract-vmlinux "boot/vmlinuz-${_preversion}" > "$pkgdir/usr/lib/modules/$_preversion/vmlinuz" # sed expression for following substitutions local _subst=" s|%PKGBASE%|$_kernel|g - s|%KERNVER%|$_version|g + s|%KERNVER%|$_preversion|g " # install mkinitcpio preset file @@ -114,24 +100,8 @@ _package-bin() { install -Dm644 /dev/stdin "$pkgdir/etc/mkinitcpio.d/$_kernel.preset" # used by mkinitcpio to name the kernel - echo "$_kernel" | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules/$_version/pkgbase" - - cd $srcdir - # install the firmware - install -Dm755 mali_csffw.bin $pkgdir/usr/lib/firmware/mali_csffw.bin - - # install blob drivers - for d in x wayland; do - install -Dm755 libmali_g610_$d.so $pkgdir/usr/lib/libmali/libmali_g610_$d.so - install -dm755 $pkgdir/usr/lib/libmali/$d - for l in libEGL.so libEGL.so.1 libgbm.so.1 libGLESv2.so libGLESv2.so.2 libGLESv2_CM.so libOpenCL.so.1; do - ln -s ../libmali_g610_$d.so $pkgdir/usr/lib/libmali/$d/$l; - done - done - - # install the helper scripts - install -Dm755 libmali $pkgdir/usr/bin/libmali - install -Dm755 libmaliw $pkgdir/usr/bin/libmaliw + echo "$_kernel" | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules/$_preversion/pkgbase" + } _package-bin-headers() { @@ -140,11 +110,15 @@ _package-bin-headers() { conflicts=('linux-headers') cd "$srcdir/debs" + local _version="$(<../version)" - + local _preversion="$(<../preversion)" + local _tag="$(<../tag)" + # download & extract image deb + local _header_url="https://github.com/radxa-pkg/linux-rockchip/releases/download/$_tag/linux-headers-${_preversion}_${_version}_arm64.deb" + # download & extract header deb - local _headersdeb=$(curl -Lk ${_repourl}db/packages.db | grep -oa "pool.*linux-headers-$_version.*\.deb" | sort -r | head -1) - curl -L "${_repourl}${_headersdeb}" -o headers.deb + curl -L "${_header_url}" -o headers.deb ar x "headers.deb" mkdir -p ../headers tar -m -xf data.tar.xz -C ../headers @@ -152,13 +126,13 @@ _package-bin-headers() { cd "$srcdir/headers" - install -dm755 "$pkgdir/usr/lib/modules/$_version" + install -dm755 "$pkgdir/usr/lib/modules/$_preversion" # copy headers - cp -r "usr/src/linux-headers-$_version" "$pkgdir/usr/lib/modules/$_version/build" + cp -r "usr/src/linux-headers-$_preversion" "$pkgdir/usr/lib/modules/$_preversion/build" # add real version for building modules and running depmod from hook - echo "$_version" | - install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules/$_version/build/version" + echo "$_preversion" | + install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules/$_preversion/build/version" } for _p in "${pkgname[@]}"; do diff --git a/libmali b/libmali deleted file mode 100755 index 42c536bb19a0..000000000000 --- a/libmali +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -APP=$(which $1) -ARGS=${@:2} -HASRPATH=$(chrpath -l $APP | grep -o /usr/lib) -export LIBGL_DEEPBIND=0 -export LD_LIBRARY_PATH="/usr/lib/gl4es:/usr/lib/libmali/x:$LD_LIBRARY_PATH" -export LD_PRELOAD="/usr/lib/libdri2to3.so:$LD_PRELOAD" -# linux linker loads the shared libs in the order of 1. RPATH of the elf, then LD_LIBRARY_PATH -# if a binary has RPATH pointed out to /usr/lib, then this causes system GL libraries to load -# in such a case we load the app directly with linker ommitting the rpath of /usr/lib -echo $HASRPATH -if [ -z $HASRPATH ] -then - echo "Running ${APP} on X with libmali" - exec $APP $ARGS -else - echo "Running ${APP} on X with libmali using linker" - exec /lib/ld-linux-aarch64.so.1 --inhibit-rpath :/usr/lib $APP $ARGS -fi diff --git a/libmaliw b/libmaliw deleted file mode 100755 index 03f667ad50b6..000000000000 --- a/libmaliw +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -APP=$(which $1) -ARGS=${@:2} -HASRPATH=$(chrpath -l $APP | grep -o /usr/lib) -export LIBGL_DEEPBIND=0 -export LD_LIBRARY_PATH="/usr/lib/gl4es:/usr/lib/libmali/wayland:$LD_LIBRARY_PATH" -# linux linker loads the shared libs in the order of 1. RPATH of the elf, then LD_LIBRARY_PATH -# if a binary has RPATH pointed out to /usr/lib, then this causes system GL libraries to load -# in such a case we load the app directly with linker ommitting the rpath of /usr/lib -echo $HASRPATH -if [ -z $HASRPATH ] -then - echo "Running ${APP} on Wayland with libmali" - exec $APP $ARGS -else - echo "Running ${APP} on Wayland with libmali using linker" - exec /lib/ld-linux-aarch64.so.1 --inhibit-rpath :/usr/lib $APP $ARGS -fi diff --git a/mali_csffw.bin b/mali_csffw.bin Binary files differnew file mode 100644 index 000000000000..94655e423a3d --- /dev/null +++ b/mali_csffw.bin |