Update patches to function more generically by expanding @DEVICE@ and @TARGET_CPU@.

This commit is contained in:
fewtarius 2023-02-13 17:17:55 -05:00
parent 7dab212140
commit 717976484d
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
5 changed files with 11 additions and 9 deletions

4
.gitignore vendored
View file

@ -49,7 +49,9 @@ repo
local.conf
sx05re-kodi*.log
packages/sx05re/experimental/
projects/Anbernic
RG353P
RG503
release/

View file

@ -22,8 +22,8 @@ diff -rupN mupen64plus.orig/Makefile mupen64plus/Makefile
- CPUFLAGS += -mtune=cortex-a53
- GLES = 1
+ CPUFLAGS += -march=armv8-a -mtune=cortex-a72.cortex-a53
+ else ifneq (,$(findstring RK3588,$(platform)))
+ CPUFLAGS += -march=armv8-a -mtune=cortex-a76.cortex-a55
+ else ifneq (,$(findstring @DEVICE@,$(platform)))
+ CPUFLAGS += -march=armv8-a -mtune=@TARGET_CPU@
endif
else ifneq (,$(findstring RK3288,$(platform)))
CPUFLAGS += -march=armv7ve -mtune=cortex-a17 -mfloat-abi=hard -mfpu=neon-vfpv4

View file

@ -6,14 +6,14 @@ diff -rupN mupen64plus.orig/Makefile mupen64plus/Makefile
COREFLAGS += -DOS_LINUX
ASFLAGS = -f elf -d ELF_TYPE
+
+# Rockchip RK3566 / RK3588
+# Rockchip @DEVICE@
+else ifneq (,$(findstring RK,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ LDFLAGS += -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined -ldl
+
+ ifneq (,$(findstring RK3588,$(platform)))
+ ifneq (,$(findstring RK3588,$(platform)))
+ CPUFLAGS += -march=armv8-a -mtune=cortex-a76.cortex-a55
+ ifneq (,$(findstring @DEVICE@,$(platform)))
+ ifneq (,$(findstring @DEVICE@,$(platform)))
+ CPUFLAGS += -march=armv8-a -mtune=@TARGET_CPU@
+ else ifneq (,$(findstring RK3566,$(platform)))
+ CPUFLAGS += -march=armv8-a -mtune=cortex-a55
+ GLES = 1

View file

@ -12,7 +12,7 @@ diff -rupN yabasanshiro.orig/yabause/src/libretro/Makefile yabasanshiro/yabause/
+ USE_AARCH64_DRC = 1
DYNAREC_DEVMIYAX = 1
- FLAGS += -march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72.cortex-a53 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad
+ FLAGS += -march=armv8-a+crc -mcpu=cortex-a76 -mtune=cortex-a76.cortex-a55
+ FLAGS += -march=armv8-a+crc -mcpu=cortex-a76 -mtune=@TARGET_CPU@
# Rpi4 (64-bit)
else ifeq ($(platform), rpi4)

View file

@ -184,7 +184,7 @@ if [ -d "${SOURCES}/${PKG_NAME}" -o -d "${PKG_DIR}/sources" ] || pkg_call_exists
if grep -qE '^GIT binary patch$|^rename from|^rename to' ${i}; then
cat ${i} | git apply --directory=$(echo "${PKG_BUILD}" | cut -f1 -d\ ) -p1 --verbose --whitespace=nowarn --unsafe-paths >&${VERBOSE_OUT}
else
cat ${i} | patch -d $(echo "${PKG_BUILD}" | cut -f1 -d\ ) -p1 >&${VERBOSE_OUT}
cat ${i} | sed -s -e "s#@TARGET_CPU@#${TARGET_CPU}#g" -e "s#@DEVICE@#${DEVICE}#g" | patch -d $(echo "${PKG_BUILD}" | cut -f1 -d\ ) -p1 >&${VERBOSE_OUT}
fi
fi
done