Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amiberry: fix for Amlogic-ne and improve #1185

Merged
merged 1 commit into from
May 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
61 changes: 32 additions & 29 deletions packages/sx05re/emulators/amiberry/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

PKG_NAME="amiberry"
PKG_VERSION="fc0645c51ce095f3f46c4faa70f9afab71d49526"
PKG_ARCH="aarch64 arm"
PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/midwan/amiberry"
PKG_URL="https://github.com/midwan/amiberry.git"
Expand All @@ -14,40 +15,42 @@ PKG_EE_UPDATE=no

pre_configure_target() {
cd ${PKG_BUILD}
export SYSROOT_PREFIX=${SYSROOT_PREFIX}
local DEVICE_PLATFORMS=('aarch64' 'arm')

case ${DEVICE} in
Amlogic-old)
if [ $ARCH == "arm" ]; then
AMIBERRY_PLATFORM="AMLGX"
else
AMIBERRY_PLATFORM="a64"
fi
case "${DEVICE}" in
'Amlogic-old')
DEVICE_PLATFORMS=('a64' 'AMLGX')
;;
Amlogic-ng|Amlogic-ogu)
if [ $ARCH == "arm" ]; then
AMIBERRY_PLATFORM="AMLG12B"
else
AMIBERRY_PLATFORM="n2"
fi
'Amlogic-ng'|'Amlogic-ne'|'Amlogic-ogu')
DEVICE_PLATFORMS=('n2' 'AMLG12B')
;;
'OdroidGoAdvance'|'GameForce')
DEVICE_PLATFORMS=('oga' 'RK3326')
;;
'RK356x'|'OdroidM1')
DEVICE_PLATFORMS=('a64' 'a64')
;;
*)
echo "Refuse to build ${PKG_NAME} for device ${DEVICE}!" >&2
false
;;
esac
local AMIBERRY_PLATFORM
case "${ARCH}" in
'aarch64')
AMIBERRY_PLATFORM="${DEVICE_PLATFORMS[0]}"
;;
'arm')
AMIBERRY_PLATFORM="${DEVICE_PLATFORMS[1]}"
;;
*)
echo "Refuse to build ${PKG_NAME} for arch ${ARCH}!" >&2
false
;;
esac

if [ "$DEVICE" == "OdroidGoAdvance" ] || [ "$DEVICE" == "GameForce" ]; then
if [ $ARCH == "arm" ]; then
AMIBERRY_PLATFORM="RK3326"
else
AMIBERRY_PLATFORM="oga"
fi

fi

if [ "$DEVICE" == "RK356x" ] || [ "$DEVICE" == "OdroidM1" ]; then
AMIBERRY_PLATFORM="a64"
fi

sed -i "s|AS = as|AS \?= as|" Makefile
PKG_MAKE_OPTS_TARGET+=" all PLATFORM=${AMIBERRY_PLATFORM} SDL_CONFIG=${SYSROOT_PREFIX}/usr/bin/sdl2-config"
sed -i "s|AS = as|AS \?= as|" Makefile
PKG_MAKE_OPTS_TARGET+=" all PLATFORM=${AMIBERRY_PLATFORM} SDL_CONFIG=${SYSROOT_PREFIX}/usr/bin/sdl2-config"
}

makeinstall_target() {
Expand Down