mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2024-11-23 08:20:00 +00:00
Support RetroFlag GPiCASE2W RPiZero2 aarch64 (#1947)
This commit is contained in:
parent
7a8c073510
commit
bec997a880
@ -14,6 +14,10 @@ PKG_TOOLCHAIN="manual"
|
||||
|
||||
[ "${DISTRO}" = "Lakka" ] && PKG_DEPENDS_TARGET+=" Python3 distutilscross:host" || true
|
||||
|
||||
if [ "${DISTRO}" = "Lakka" ]; then
|
||||
PKG_ARCH+=" aarch64"
|
||||
fi
|
||||
|
||||
pre_make_target() {
|
||||
if [ "${DISTRO}" = "Lakka" ]; then
|
||||
export PYTHONXCPREFIX="${SYSROOT_PREFIX}/usr"
|
||||
|
@ -12,6 +12,10 @@ PKG_DEPENDS_TARGET="toolchain colorzero"
|
||||
PKG_LONGDESC="A simple interface to everyday GPIO components used with Raspberry Pi."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
if [ "${DISTRO}" = "Lakka" ]; then
|
||||
PKG_ARCH+=" aarch64"
|
||||
fi
|
||||
|
||||
pre_make_target() {
|
||||
if [ "${DISTRO}" = "Lakka" ]; then
|
||||
export PYTHONXCPREFIX="${SYSROOT_PREFIX}/usr"
|
||||
|
@ -2,7 +2,7 @@ PKG_NAME="gpicase_safeshutdown"
|
||||
PKG_VERSION="1.0"
|
||||
PKG_ARCH="arm aarch64"
|
||||
if [ "${DEVICE}" != "RPi4-GPICase2" ]; then
|
||||
# for GPICase & Pi02GPi
|
||||
# for GPICase & Pi02GPi & RPiZero2-GPiCASE2W
|
||||
PKG_DEPENDS_TARGET="Python3 gpiozero colorzero"
|
||||
else
|
||||
# for RPi4-GPICase2
|
||||
@ -19,7 +19,7 @@ makeinstall_target() {
|
||||
|
||||
post_install() {
|
||||
if [ "${DEVICE}" != "RPi4-GPICase2" ]; then
|
||||
# for GPICase & Pi02GPi
|
||||
# for GPICase & Pi02GPi & RPiZero2-GPiCASE2W
|
||||
enable_service gpicase-safeshutdown.service
|
||||
rm -v ${INSTALL}/usr/bin/safeshutdown_gpicase2.py
|
||||
rm -v ${INSTALL}/usr/lib/systemd/system/gpicase2-safeshutdown.service
|
||||
|
@ -8,6 +8,9 @@ PKG_TOOLCHAIN="manual"
|
||||
|
||||
post_install() {
|
||||
if [ "${PROJECT}" = "RPi" ] && [ "${DEVICE}" = "GPICase" -o "${DEVICE}" = "Pi02GPi" ]; then
|
||||
# In case of "${DEVICE}" = "RPiZero2-GPiCASE2W"
|
||||
# HDMI is disabled by KMS(vc4-kms-v3d) in distroconfig.txt.
|
||||
# Therefore, it doesn't use "disable-hdmi.service".
|
||||
enable_service disable-hdmi.service
|
||||
fi
|
||||
}
|
||||
|
@ -47,6 +47,9 @@ pre_make_target() {
|
||||
Pi02GPi)
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=rpi3"
|
||||
;;
|
||||
RPiZero2-GPiCASE2W)
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=rpi3_64-mesa"
|
||||
;;
|
||||
RPi4*)
|
||||
PKG_MAKE_OPTS_TARGET+=" platform=rpi4_64-mesa FORCE_GLES3=1"
|
||||
;;
|
||||
|
@ -23,11 +23,11 @@ fi
|
||||
|
||||
if [ "${PROJECT}" = "RPi" ]; then
|
||||
PKG_DEPENDS_TARGET+=" rpi_disable_hdmi_service disable_wifi_powersave RPi.GPIO"
|
||||
if [ "${DEVICE}" != "GPICase" -a "${DEVICE}" != "Pi02GPi" ] ; then
|
||||
if [ "${DEVICE}" != "GPICase" -a "${DEVICE}" != "Pi02GPi" -a "${DEVICE}" != "RPiZero2-GPiCASE2W" ] ; then
|
||||
PKG_DEPENDS_TARGET+=" wii-u-gc-adapter wiringPi mk_arcade_joystick_rpi joycond"
|
||||
fi
|
||||
|
||||
if [ "${DEVICE}" = "GPICase" -o "${DEVICE}" = "Pi02GPi" -o "${DEVICE}" = "RPi4-GPICase2" ]; then
|
||||
if [ "${DEVICE}" = "GPICase" -o "${DEVICE}" = "Pi02GPi" -o "${DEVICE}" = "RPi4-GPICase2" -o "${DEVICE}" = "RPiZero2-GPiCASE2W" ]; then
|
||||
PKG_DEPENDS_TARGET+=" gpicase_safeshutdown"
|
||||
if [ "${DEVICE}" = "GPICase" -o "${DEVICE}" = "Pi02GPi" ]; then
|
||||
PKG_DEPENDS_TARGET+=" gpicase_change_audio_device"
|
||||
@ -35,7 +35,7 @@ if [ "${PROJECT}" = "RPi" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${DEVICE}" != "Switch" -a "${DEVICE}" != "GPICase" -a "${DEVICE}" != "Pi02GPi" ]; then
|
||||
if [ "${DEVICE}" != "Switch" -a "${DEVICE}" != "GPICase" -a "${DEVICE}" != "Pi02GPi" -a "${DEVICE}" != "RPiZero2-GPiCASE2W" ]; then
|
||||
PKG_DEPENDS_TARGET+=" xbox360_controllers_shutdown"
|
||||
fi
|
||||
|
||||
|
@ -266,7 +266,7 @@ makeinstall_target() {
|
||||
fi
|
||||
|
||||
# GPICase
|
||||
if [ "${PROJECT}" = "RPi" ] && [ "${DEVICE}" = "GPICase" -o "${DEVICE}" = "Pi02GPi" ]; then
|
||||
if [ "${PROJECT}" = "RPi" ] && [ "${DEVICE}" = "GPICase" -o "${DEVICE}" = "Pi02GPi" -o "${DEVICE}" = "RPiZero2-GPiCASE2W" ]; then
|
||||
sed -i -e 's|^input_menu_toggle_gamepad_combo =.*|input_menu_toggle_gamepad_combo = "4"|' ${INSTALL}/etc/retroarch.cfg
|
||||
sed -i -e 's|^menu_driver =.*|menu_driver = "rgui"|' ${INSTALL}/etc/retroarch.cfg
|
||||
echo 'audio_device = "default:CARD=Headphones"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
@ -281,7 +281,7 @@ makeinstall_target() {
|
||||
echo 'video_scale_integer = "true"' >> ${INSTALL}/etc/retroarch.cfg
|
||||
fi
|
||||
|
||||
if [ "${DEVICE}" = "Pi02GPi" ]; then
|
||||
if [ "${DEVICE}" = "Pi02GPi" -o "${DEVICE}" = "RPiZero2-GPiCASE2W" ]; then
|
||||
echo 'input_player1_analog_dpad_mode = "3"' >> $INSTALL/etc/retroarch.cfg
|
||||
fi
|
||||
fi
|
||||
|
@ -0,0 +1,34 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
# This file has been created using the following as a reference:
|
||||
# https://github.com/tsoliman/Retroflag-GPi-case
|
||||
#
|
||||
# Thanks @tsoliman !
|
||||
|
||||
# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!
|
||||
|
||||
arm_64bit=1
|
||||
kernel=kernel.img
|
||||
|
||||
# Enable DRM VC4 V3D driver
|
||||
dtoverlay=vc4-kms-v3d,nohdmi
|
||||
dtoverlay=vc4-kms-dpi-generic,hactive=640,hfp=20,hsync=2,hbp=20
|
||||
dtparam=vactive=480,vfp=1,vsync=1,vbp=2,rgb666-padhi
|
||||
dtparam=clock-frequency=19200000
|
||||
extra_transpose_buffer=2
|
||||
disable_fw_kms_setup=1
|
||||
|
||||
disable_pvt=1
|
||||
disable_overscan=1
|
||||
|
||||
dtoverlay=audremap,pins_18_19,swap_lr
|
||||
disable_audio_dither=1
|
||||
audio_pwm_mode=2
|
||||
|
||||
# Disable the ACT LED on the Pi Zero
|
||||
dtparam=act_led_trigger=none
|
||||
dtparam=act_led_activelow=on
|
||||
|
||||
boot_delay=0
|
||||
|
7156
projects/RPi/devices/RPiZero2-GPiCASE2W/linux/linux.aarch64.conf
Normal file
7156
projects/RPi/devices/RPiZero2-GPiCASE2W/linux/linux.aarch64.conf
Normal file
File diff suppressed because it is too large
Load Diff
12
projects/RPi/devices/RPiZero2-GPiCASE2W/options
Normal file
12
projects/RPi/devices/RPiZero2-GPiCASE2W/options
Normal file
@ -0,0 +1,12 @@
|
||||
################################################################################
|
||||
# Device defaults
|
||||
################################################################################
|
||||
|
||||
# NOOBS supported hex versions (legacy)
|
||||
NOOBS_HEX="1040,1041,2082"
|
||||
|
||||
# NOOBS supported model versions
|
||||
NOOBS_SUPPORTED_MODELS='"Pi 3"'
|
||||
|
||||
# Specific to GPICase
|
||||
CEC_FRAMEWORK_SUPPORT="no"
|
@ -0,0 +1,25 @@
|
||||
diff --git a/udev/Microsoft X-Box 360 pad.cfg b/udev/Microsoft X-Box 360 pad.cfg
|
||||
index aec5472..26eb188 100644
|
||||
--- a/udev/Microsoft X-Box 360 pad.cfg
|
||||
+++ b/udev/Microsoft X-Box 360 pad.cfg
|
||||
@@ -4,16 +4,16 @@ input_driver = "udev"
|
||||
input_vendor_id = "1118"
|
||||
input_product_id = "654"
|
||||
|
||||
-input_b_btn = "0"
|
||||
-input_y_btn = "2"
|
||||
+input_b_btn = "1"
|
||||
+input_y_btn = "3"
|
||||
input_select_btn = "6"
|
||||
input_start_btn = "7"
|
||||
input_up_btn = "h0up"
|
||||
input_down_btn = "h0down"
|
||||
input_left_btn = "h0left"
|
||||
input_right_btn = "h0right"
|
||||
-input_a_btn = "1"
|
||||
-input_x_btn = "3"
|
||||
+input_a_btn = "0"
|
||||
+input_x_btn = "2"
|
||||
input_l_btn = "4"
|
||||
input_r_btn = "5"
|
||||
input_l2_axis = "+2"
|
@ -48,7 +48,7 @@
|
||||
if [ "${DISTRO}" != "Lakka" ]; then
|
||||
echo "${DEVICE} ${ARCH} not supported on ${DISTRO}!"
|
||||
exit 1
|
||||
elif [ "${DEVICE}" = "RPi3" ]; then
|
||||
elif [ "${DEVICE}" = "RPi3" -o "${DEVICE}" = "RPiZero2-GPiCASE2W" ]; then
|
||||
TARGET_CPU="cortex-a53"
|
||||
elif [ "${DEVICE:0:4}" = "RPi4" ]; then
|
||||
TARGET_CPU="cortex-a72"
|
||||
|
Loading…
Reference in New Issue
Block a user