alarm/kodi-rpi-git to 19.0rc1.56993.276744019d-2

Make package more cross-model friendly by using -mcpu=cortex-a53
rather than -mcpu=cortex-a72 in the *FLAGS as well as the ffmpeg
patch.
This commit is contained in:
graysky 2021-01-26 07:04:11 -05:00
parent 11150d7f79
commit abbce8b232
3 changed files with 15 additions and 12 deletions

View file

@ -1,7 +1,7 @@
From 666fd7f69f684d7dd23b1ee665b0902e29953b76 Mon Sep 17 00:00:00 2001 From 666fd7f69f684d7dd23b1ee665b0902e29953b76 Mon Sep 17 00:00:00 2001
From: graysky <graysky@archlinux.us> From: graysky <graysky@archlinux.us>
Date: Sat, 12 Dec 2020 09:29:51 -0500 Date: Sat, 12 Dec 2020 09:29:51 -0500
Subject: [PATCH] mcpu=cortex-a72 for RPi4 application to ffmpeg Subject: [PATCH] mcpu=cortex-xxx application to ffmpeg
Get build system to patch ffmpeg source removing the -march= flag Get build system to patch ffmpeg source removing the -march= flag

View file

@ -72,7 +72,7 @@ source=(
sysusers.conf sysusers.conf
tmpfiles.conf tmpfiles.conf
use-mcpu-avoiding-march-and-mtune.patch use-mcpu-avoiding-march-and-mtune.patch
0001-mcpu-cortex-a72-for-RPi4-application-to-ffmpeg.patch 0001-mcpu-cortex-application-to-ffmpeg.patch
0002-Revert-jsonrpc-remove-ambiguous-and-duplicate-Player.patch 0002-Revert-jsonrpc-remove-ambiguous-and-duplicate-Player.patch
) )
backup=(boot/kodi.config.txt) backup=(boot/kodi.config.txt)
@ -103,8 +103,8 @@ sha256sums=('17182d6d88f9d3e4d695d3f44730f49dc8e13d4fef4e2f5c72bdcc9b80683b13'
'b38e0bbef7faac2b82fed550a0c19b0d4e7f6737d5321d4fd8f216b80f8aee8a' 'b38e0bbef7faac2b82fed550a0c19b0d4e7f6737d5321d4fd8f216b80f8aee8a'
'f521b98232e5035b7cada46cf03975b8d753e93d0802bf22913fceed769f9d96' 'f521b98232e5035b7cada46cf03975b8d753e93d0802bf22913fceed769f9d96'
'9c5e79ed8719cd032a3b17dac585aeff28a198e37af1da9af68ef1b86bab4d18' '9c5e79ed8719cd032a3b17dac585aeff28a198e37af1da9af68ef1b86bab4d18'
'444c84ff62d178db3c74473e422fb4b58e1540ac767dce100337d2df588eb68e' '16d6c79ff3a3d3653f21d77a36326a0335c8cec49a9c06dbc2de0ed143e50a9f'
'05a140fa6da5ba0576611e31f2ed2e5d56255c480e58be4854db154d611b29da' '76eafede11af936bb554932b2be71ce91d4bf1c07107d847500ebbf3ff7d7245'
'1816a6442574e46731a045227e4d4d8c09e2e2668ae271c63af051a0647c59a2') '1816a6442574e46731a045227e4d4d8c09e2e2668ae271c63af051a0647c59a2')
prepare() { prepare() {
cd "xbmc-$_commit" cd "xbmc-$_commit"
@ -117,7 +117,7 @@ prepare() {
tools/depends/target/ffmpeg/0002-use-mcpu-avoiding-march-and-mtune.patch tools/depends/target/ffmpeg/0002-use-mcpu-avoiding-march-and-mtune.patch
# patch kodi build system to apply the patch we just copied over # patch kodi build system to apply the patch we just copied over
patch -Np1 -i ../0001-mcpu-cortex-a72-for-RPi4-application-to-ffmpeg.patch patch -Np1 -i ../0001-mcpu-cortex-application-to-ffmpeg.patch
# this causes issues for the official iOS app which are not yet addressed # this causes issues for the official iOS app which are not yet addressed
# see: https://github.com/xbmc/Official-Kodi-Remote-iOS/issues/95 # see: https://github.com/xbmc/Official-Kodi-Remote-iOS/issues/95
@ -144,10 +144,13 @@ build() {
CXXFLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS}"
if [[ $CARCH = "armv7h" ]]; then if [[ $CARCH = "armv7h" ]]; then
export CFLAGS+=" -mcpu=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard" # we use -mcpu=cortex-a53 rather than cortex-a72 to maximize RPi 3B and RPi 4B/400 compatibility
# in a single package which is consistent with how LibreELEC is currently built, see:
# https://github.com/LibreELEC/LibreELEC.tv/commit/8e6605f6da56f25a00272b1cbacb93d40200153f#commitcomment-46341034
export CFLAGS+=" -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard"
export CXXFLAGS="${CFLAGS}" export CXXFLAGS="${CFLAGS}"
elif [[ $CARCH = "aarch64" ]]; then elif [[ $CARCH = "aarch64" ]]; then
export CFLAGS+=" -mcpu=cortex-a72+crc" export CFLAGS+=" -mcpu=cortex-a53+crc"
export CXXFLAGS="${CFLAGS}" export CXXFLAGS="${CFLAGS}"
fi fi
@ -182,7 +185,7 @@ build() {
} }
package_kodi-rpi-git() { package_kodi-rpi-git() {
pkgdesc="Media player and entertainment hub for Raspberry Pi 4, gbm fork" pkgdesc="Media player and entertainment hub for Raspberry Pi 3/4/400, gbm fork"
depends=( depends=(
'desktop-file-utils' 'hicolor-icon-theme' 'mesa' 'python-pycryptodomex' 'desktop-file-utils' 'hicolor-icon-theme' 'mesa' 'python-pycryptodomex'
'python-pillow' 'python-simplejson' 'xorg-xdpyinfo' 'python-pillow' 'python-simplejson' 'xorg-xdpyinfo'
@ -231,7 +234,7 @@ package_kodi-rpi-git() {
} }
package_kodi-rpi-git-eventclients() { package_kodi-rpi-git-eventclients() {
pkgdesc="Kodi Event Clients for Raspberry Pi 4, gbm fork" pkgdesc="Kodi Event Clients for Raspberry Pi 3/4/400, gbm fork"
provides=("kodi-eventclients=${pkgver}") provides=("kodi-eventclients=${pkgver}")
replaces=('kodi-eventclients-rbp4-git') replaces=('kodi-eventclients-rbp4-git')
conflicts=('kodi-eventclients' 'kodi-eventclients-rbp4-git' 'kodi-rpi-eventclients' 'kodi-rpi-legacy-eventclients') conflicts=('kodi-eventclients' 'kodi-eventclients-rbp4-git' 'kodi-rpi-eventclients' 'kodi-rpi-legacy-eventclients')
@ -254,7 +257,7 @@ package_kodi-rpi-git-eventclients() {
} }
package_kodi-rpi-git-tools-texturepacker() { package_kodi-rpi-git-tools-texturepacker() {
pkgdesc="Kodi Texturepacker Tool for Raspberry Pi 4, gbm fork" pkgdesc="Kodi Texturepacker Tool for Raspberry Pi 3/4/400, gbm fork"
depends=('libpng' 'giflib' 'libjpeg-turbo' 'lzo') depends=('libpng' 'giflib' 'libjpeg-turbo' 'lzo')
replaces=('kodi-tools-texturepacker-rbp4-git') replaces=('kodi-tools-texturepacker-rbp4-git')
conflicts=('kodi-tools-texturepacker' 'kodi-tools-texturepacker-rbp4-git' 'kodi-rpi-tools-texturepacker' 'kodi-rpi-legacy-tools-texturepacker') conflicts=('kodi-tools-texturepacker' 'kodi-tools-texturepacker-rbp4-git' 'kodi-rpi-tools-texturepacker' 'kodi-rpi-legacy-tools-texturepacker')
@ -271,7 +274,7 @@ package_kodi-rpi-git-tools-texturepacker() {
} }
package_kodi-rpi-git-dev() { package_kodi-rpi-git-dev() {
pkgdesc="Kodi dev files for Raspberry Pi 4, gbm fork" pkgdesc="Kodi dev files for Raspberry Pi 3/4/400, gbm fork"
depends=('kodi') depends=('kodi')
replaces=('kodi-dev-rbp4-git') replaces=('kodi-dev-rbp4-git')
conflicts=('kodi-dev-rbp4-git' 'kodi-rpi-dev' 'kodi-rpi-legacy-dev') conflicts=('kodi-dev-rbp4-git' 'kodi-rpi-dev' 'kodi-rpi-legacy-dev')

View file

@ -31,7 +31,7 @@ index 8569a60..0d3aafb 100755
case $cpu in case $cpu in
armv*) armv*)
- cpuflags="-march=$cpu" - cpuflags="-march=$cpu"
+ cpuflags="-mcpu=cortex-a72" + cpuflags="-mcpu=cortex-a53"
subarch=$(echo $cpu | sed 's/[^a-z0-9]//g') subarch=$(echo $cpu | sed 's/[^a-z0-9]//g')
;; ;;
*) *)