V0rt3x667 / ArchyPie-Setup

A Clone of RetroPie for Arch Based Systems
GNU General Public License v3.0
31 stars 9 forks source link

rpi4 flags ? #8

Closed Yannovitch closed 2 years ago

Yannovitch commented 2 years ago

Hello,

First, many thanks for your script ! Exactly what I was looking for ! Unfortunately, on my raspberry pi 4, the system is not recognized as rpi4 (in the flags), just as "system : ()" As such, there are some emulators requiring "!all rpi4" I can't install. Could you indicate me how to reinstall or tune the raspberry pi for the flags to be recognized ?

Best regards,

Yann

V0rt3x667 commented 2 years ago

Hi Yann, thanks for testing the script and reporting the error. Could you please type the following command in a terminal and then report the number returned by the echo command?

rev="0x$(sed -n '/^Revision/s/^.: (.)/\1/p' < /proc/cpuinfo)" && cpu=$((($rev >> 12) & 15)) && echo $cpu

Thanks

V0rt3x667 commented 2 years ago

Sorry just realised Arch Linux does not have the cpuinfo command by default! The package python-py-cpuinfo is required. I will add this to the dependencies list for ArchyPie. Please update your script and test. Thanks

V0rt3x667 commented 2 years ago

Apologies I have got ahead of myself. I need to look into this further. I will get back to you ASAP. Thanks

V0rt3x667 commented 2 years ago

Hi, commit a75e202dc4e9de835eded8d75bbdf119b132831d will fix the issue. I have tested on my rpi2, the flags showed as rpi3 but now work as expected. Please update the script and test again. Thanks.

V0rt3x667 commented 2 years ago

Closing as fixed.

Yannovitch commented 1 year ago

Hello, Thanks for adding the commit. I had the time to try again. It's better, but still, I think that the rpi4 should have the videocore flag too, no ? Moreover, wouldn't it be better to install what we can with AUR rather than compiling so much from source ?

V0rt3x667 commented 1 year ago

Hi Yann,

Thanks for your feedback. Regarding the videocore flag, I am unaware if this is set in Retropie as well. I don't have a rpi4 to test with but can try to simulate a rpi3b+ in QEMU. I will test and get back to you. All software in the AUR is compiled from source as well so it will not save any time. Plus it is awkward to run makepkg in the script as it will not run as root until it is required for package installation.

Ideally I would like to provide binary packages like Retropie does for the ARM platform. However, at present I do not have the infrastructure in place to host precompiled packages.

I will look into the first issue ASAP.

Regards


From: Yann Kempf @.> Sent: 09 October 2022 22:52 To: V0rt3x667/ArchyPie-Setup @.> Cc: V0rt3x667 @.>; State change @.> Subject: Re: [V0rt3x667/ArchyPie-Setup] rpi4 flags ? (Issue #8)

Hello, Thanks for adding the commit. I had the time to try again. It's better, but still, I think that the rpi4 should have the videocore flag too, no ? Moreover, wouldn't it be better to install what we can with AUR rather than compiling so much from source ?

— Reply to this email directly, view it on GitHubhttps://github.com/V0rt3x667/ArchyPie-Setup/issues/8#issuecomment-1272635513, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGCDK5SCZ6MDAU4ICUUYMVDWCM5BDANCNFSM55YOAAWQ. You are receiving this because you modified the open/close state.Message ID: @.***>

V0rt3x667 commented 1 year ago

Hi Yann,

I have looked into this further and Retropie does not set the videocore flag for the Raspberry Pi 4. The relevant function is below for further information.

function get_rpi_video() { local pkgconfig="/opt/vc/lib/pkgconfig"

if [[ -z "$__has_kms" ]]; then
    # in chroot, use kms by default for rpi4 target
    [[ "$__chroot" -eq 1 ]] && isPlatform "rpi4" && __has_kms=1
    # detect driver via inserted module / platform driver setup
    [[ -d "/sys/module/vc4" ]] && __has_kms=1
fi

if [[ "$__has_kms" -eq 1 ]]; then
    __platform_flags+=(mesa kms)
    if [[ -z "$__has_dispmanx" ]]; then
        # in a chroot, unless __has_dispmanx is set, default to fkms (adding dispmanx flag)
        [[ "$__chroot" -eq 1 ]] && __has_dispmanx=1
        # if running fkms driver, add dispmanx flag
        [[ "$(ls -A /sys/bus/platform/drivers/vc4_firmware_kms/*.firmwarekms 2>/dev/null)" ]] && __has_dispmanx=1
    fi
    [[ "$__has_dispmanx" -eq 1 ]] && __platform_flags+=(dispmanx)
else
    __platform_flags+=(videocore dispmanx)
fi

# set pkgconfig path for vendor libraries
export PKG_CONFIG_PATH="$pkgconfig"

}

Regards


From: Yann Kempf @.> Sent: 09 October 2022 22:52 To: V0rt3x667/ArchyPie-Setup @.> Cc: V0rt3x667 @.>; State change @.> Subject: Re: [V0rt3x667/ArchyPie-Setup] rpi4 flags ? (Issue #8)

Hello, Thanks for adding the commit. I had the time to try again. It's better, but still, I think that the rpi4 should have the videocore flag too, no ? Moreover, wouldn't it be better to install what we can with AUR rather than compiling so much from source ?

— Reply to this email directly, view it on GitHubhttps://github.com/V0rt3x667/ArchyPie-Setup/issues/8#issuecomment-1272635513, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGCDK5SCZ6MDAU4ICUUYMVDWCM5BDANCNFSM55YOAAWQ. You are receiving this because you modified the open/close state.Message ID: @.***>