Merge pull request #65 from fewtarius/dev

Roll back amiberry changes
This commit is contained in:
fewtarius 2022-04-16 21:42:56 -04:00 committed by GitHub
commit 3ab2358824
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 90 deletions

View file

@ -11,16 +11,16 @@ PKG_LONGDESC="Amiberry is an optimized Amiga emulator for ARM-based boards."
GET_HANDLER_SUPPORT="git"
PKG_TOOLCHAIN="make"
PKG_GIT_CLONE_BRANCH="master"
PKG_PATCH_DIRS+="${DEVICE}"
pre_configure_target() {
cd ${PKG_BUILD}
export SYSROOT_PREFIX=${SYSROOT_PREFIX}
if [[ "${DEVICE}" =~ RG351 ]]
if [[ "${DEVICE}" =~ RG552 ]]
then
AMIBERRY_PLATFORM="PLATFORM=RG351x"
else
AMIBERRY_PLATFORM="PLATFORM=${DEVICE}"
AMIBERRY_PLATFORM="PLATFORM=n2"
elif [[ "${DEVICE}" =~ RG351 ]]
then
AMIBERRY_PLATFORM="PLATFORM=oga"
fi
sed -i "s|AS = as|AS \?= as|" Makefile

View file

@ -1 +0,0 @@
RG351P

View file

@ -1,40 +0,0 @@
diff -rupN amiberry.orig/Makefile amiberry/Makefile
--- amiberry.orig/Makefile 2022-04-16 16:23:12.481980516 -0400
+++ amiberry/Makefile 2022-04-16 16:43:06.900834913 -0400
@@ -228,30 +228,14 @@ else ifeq ($(PLATFORM),a64)
else ifeq ($(PLATFORM),x86-64)
CPPFLAGS += -DUSE_RENDER_THREAD
-# RK3288 e.g. Asus Tinker Board
-# RK3328 e.g. PINE64 Rock64
-# RK3399 e.g. PINE64 RockPro64
-# RK3326 e.g. Odroid Go Advance - 32-bit userspace
-else ifneq (,$(findstring RK,$(PLATFORM)))
- CPPFLAGS += $(CPPFLAGS32) $(NEON_FLAGS)
+# Anbernic RG351x
+else ifeq ($(PLATFORM),RG351x)
+ CPUFLAGS += -DTARGET_LINUX_ARMv8 -frename-registers
+ CFLAGS += -mcpu=cortex-a35 -mtune=cortex-a35 -Ofast -ffast-math $(CPUFLAGS)
+ CPPFLAGS = -mcpu=cortex-a35 -mtune=cortex-a35 -Ofast -ffast-math $(CPUFLAGS) -DUSE_RENDER_THREAD
+ AARCH64 = 1
HAVE_NEON = 1
- ifneq (,$(findstring RK33,$(PLATFORM)))
- CPUFLAGS = -mfloat-abi=hard -mfpu=neon-fp-armv8
- ifneq (,$(findstring RK3399,$(PLATFORM)))
- CPUFLAGS += -mcpu=cortex-a72
- else ifneq (,$(findstring RK3328,$(PLATFORM)))
- CPUFLAGS += -mcpu=cortex-a53
- CPPFLAGS += -DUSE_RENDER_THREAD
- else ifneq (,$(findstring RK3326,$(PLATFORM)))
- CPUFLAGS += -mcpu=cortex-a35
- CPPFLAGS += -DUSE_RENDER_THREAD
- endif
- else ifneq (,$(findstring RK3288,$(PLATFORM)))
- CPUFLAGS = -mcpu=cortex-a17 -mfloat-abi=hard -mfpu=neon-vfpv4
- CPPFLAGS += -DUSE_RENDER_THREAD
- endif
-
# sun8i Allwinner H2+ / H3 like Orange PI, Nano PI, Banana PI, Tritium, AlphaCore2, MPCORE-HUB
else ifeq ($(PLATFORM),sun8i)
CPUFLAGS = -mcpu=cortex-a7 -mfpu=neon-vfpv4

View file

@ -1 +0,0 @@
RG351P

View file

@ -1,40 +0,0 @@
diff -rupN amiberry.orig/Makefile amiberry/Makefile
--- amiberry.orig/Makefile 2022-04-16 16:23:12.481980516 -0400
+++ amiberry/Makefile 2022-04-16 16:40:16.168972077 -0400
@@ -228,30 +228,14 @@ else ifeq ($(PLATFORM),a64)
else ifeq ($(PLATFORM),x86-64)
CPPFLAGS += -DUSE_RENDER_THREAD
-# RK3288 e.g. Asus Tinker Board
-# RK3328 e.g. PINE64 Rock64
-# RK3399 e.g. PINE64 RockPro64
-# RK3326 e.g. Odroid Go Advance - 32-bit userspace
-else ifneq (,$(findstring RK,$(PLATFORM)))
- CPPFLAGS += $(CPPFLAGS32) $(NEON_FLAGS)
+# Anbernic RG552
+else ifeq ($(PLATFORM),RG552)
+ CPUFLAGS += -DTARGET_LINUX_ARMv8 -frename-registers
+ CFLAGS += -march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72 $(CPUFLAGS)
+ CPPFLAGS = -march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72 $(CPUFLAGS) -DUSE_RENDER_THREAD
+ AARCH64 = 1
HAVE_NEON = 1
- ifneq (,$(findstring RK33,$(PLATFORM)))
- CPUFLAGS = -mfloat-abi=hard -mfpu=neon-fp-armv8
- ifneq (,$(findstring RK3399,$(PLATFORM)))
- CPUFLAGS += -mcpu=cortex-a72
- else ifneq (,$(findstring RK3328,$(PLATFORM)))
- CPUFLAGS += -mcpu=cortex-a53
- CPPFLAGS += -DUSE_RENDER_THREAD
- else ifneq (,$(findstring RK3326,$(PLATFORM)))
- CPUFLAGS += -mcpu=cortex-a35
- CPPFLAGS += -DUSE_RENDER_THREAD
- endif
- else ifneq (,$(findstring RK3288,$(PLATFORM)))
- CPUFLAGS = -mcpu=cortex-a17 -mfloat-abi=hard -mfpu=neon-vfpv4
- CPPFLAGS += -DUSE_RENDER_THREAD
- endif
-
# sun8i Allwinner H2+ / H3 like Orange PI, Nano PI, Banana PI, Tritium, AlphaCore2, MPCORE-HUB
else ifeq ($(PLATFORM),sun8i)
CPUFLAGS = -mcpu=cortex-a7 -mfpu=neon-vfpv4

View file

@ -23,9 +23,16 @@ then
fi
find_gamepad() {
GAMEPAD=$(grep -b4 $(readlink ${DEVICE_CONTROLLER_DEV} | sed "s#^.*/##") /proc/bus/input/devices | awk 'BEGIN {FS="\""}; /Name/ {printf $2}')
sed -i "s|joyport1_friendlyname=.*|joyport1_friendlyname=${GAMEPAD}|" "$AMIBERRY_TMP_CONFIG"
echo "Gamepad used $GAMEPAD" >> "$AMIBERRY_LOG"
# Search for connected gamepads based s0 and extract the name to $GAMEPAD
for file in /tmp/joypads/*.cfg; do
EE_GAMEPAD=$(cat "$file" | grep input_device| cut -d'"' -f 2)
ES_EE_GAMEPAD=$(printf %q "$EE_GAMEPAD")
if cat /proc/bus/input/devices | grep -Ew -A 4 -B 1 "Name=\"${ES_EE_GAMEPAD}" | grep "js0" > /dev/null; then
sed -i "s|joyport1_friendlyname=.*|joyport1_friendlyname=${EE_GAMEPAD}|" "$AMIBERRY_TMP_CONFIG"
echo "Gamepad used $EE_GAMEPAD" >> "$AMIBERRY_LOG"
break;
fi
done
}
# Set SDL audio driver to alsa