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

Orange Pi 4 LTS support #1686

Open
soda-pop-ice-cream opened this issue Apr 20, 2022 · 31 comments
Open

Orange Pi 4 LTS support #1686

soda-pop-ice-cream opened this issue Apr 20, 2022 · 31 comments

Comments

@soda-pop-ice-cream
Copy link

soda-pop-ice-cream commented Apr 20, 2022

Hello!
It's possible to add support of Orange Pi 4 LTS board? It's same Orange Pi 4, but with diffirent WiFi + BT chip(CDW 20U5622-00 instead of AP6256)
On Lakka website listed literally all RK3399 boards except it. I tested all provided RK3399 boards images with no luck(and sorry for generating some network load).
I had luck booting up image for ROCKPro64 board from Batocera, and everything works except WiFi and BT.
I have UART and would be glad to test images and provide logs.

Se121d90af825407fa85f8d9dc5482d2cy

@slowpokefarm
Copy link

slowpokefarm commented May 25, 2022

+1 to this. Original Orange Pi 4 seems not to be even available for purchase anymore with only LTS version left on the market.

@Ntemis
Copy link
Collaborator

Ntemis commented Jun 10, 2022

Unfortunately orange pi dont send R&D boards to our team so we cant fix this

@Ntemis Ntemis closed this as completed Jun 10, 2022
@slowpokefarm
Copy link

I have contacted Orange Pi customer support about this issue with Pi 4 LTS drivers and they responded positively about them willing to help to resolve it. They also mentioned they have contacted Lakka team and @Ntemis specifically. Please tell if there is some progress with this issue in case they actually did contact anyone.
I kind of already regret getting LTS boards for Lakka.

@Ntemis
Copy link
Collaborator

Ntemis commented Jun 27, 2022

@slowpokefarm can you come over to lakka channel over discord/retroarch ?
I don't remember been ever contacted by them for the Orange Pi 4 or any board
Also you sure CDW 20U5622-00 is even supported by linux?

@dmrlawson dmrlawson reopened this Jul 3, 2022
@dmrlawson dmrlawson self-assigned this Jul 3, 2022
@dmrlawson
Copy link
Collaborator

@slowpokefarm @soda-pop-ice-cream please could you have a go with this image?

https://nightly.builds.lakka.tv/members/dmrlawson/Lakka-RK3399.aarch64-4.2-devel-20220717183455-62320b3-orangepi-4-lts.img.gz

I expect that sound/WiFi/ethernet/Bluetooth do not work yet, but other things should

@soda-pop-ice-cream
Copy link
Author

@dmrlawson thank you! I tested it and results so far:
Sound - work!
WIFI - doesn't work
Bluetooth - doesn't work
Ethernet - ethernet port itself works, it has link, but can't acquire IP-addres with DHCP(dispaying 169.254.. IP-address). I tried adding some random ip from my router subnet as static via connman but sadly it didn't work too, even after i manually added default route

So, i tested some random snes, nes, megadrive games, even with shaders, and everything emulation-related works. Some logs:

dmesg.log
boot.log
connman.log
log-2021-10-29-09.24.32.zip

@slowpokefarm
Copy link

I have tested the latest available image on nightly list, the results are similar to those of @soda-pop-ice-cream

Networking doesn't work, neither wireless nor wired. eth0 interface receives wrong IP address, network doesn't work after setting a valid address manually.

Bluetooth doesn't work.

@dmrlawson
Copy link
Collaborator

@slowpokefarm @soda-pop-ice-cream please would you try out this build?

https://nightly.builds.lakka.tv/members/dmrlawson/Lakka-RK3399.aarch64-5.0-devel-20221016235533-cc0fbe3-orangepi-4-lts.img.gz

Ethernet is working for me now, I'll try to get the wifi/bt going next.

I get a black screen with mupen64plus. Dolphin works but is slow.

@soda-pop-ice-cream
Copy link
Author

@dmrlawson doesn't boot for me:

U-Boot TPL 2022.10 (Oct 16 2022 - 23:39:53)                                  
sdram_init: DDR3 - 666MHz failed!                                            
rk3399_dmc_init DRAM init failed -22                                         
Missing DTB

@dmrlawson
Copy link
Collaborator

@dmrlawson doesn't boot for me:

U-Boot TPL 2022.10 (Oct 16 2022 - 23:39:53)                                  
sdram_init: DDR3 - 666MHz failed!                                            
rk3399_dmc_init DRAM init failed -22                                         
Missing DTB

Hm, sorry about that. Maybe I linked the wrong version. Will check tonight.

@dmrlawson
Copy link
Collaborator

@soda-pop-ice-cream I just flashed the image at the link I posted above to a fresh SD card and it worked. Would you mind trying again?

@soda-pop-ice-cream
Copy link
Author

Well, I tried 2 different SD cards, had no luck on both. Previous build that you provided in july boots just fine on both of them.

@dmrlawson
Copy link
Collaborator

Very strange. Thank you very much for trying again.

The only thing I can think of at the moment is to get more data. @Ntemis did you have one of these?

@Ntemis
Copy link
Collaborator

Ntemis commented Oct 19, 2022 via email

@Ntemis
Copy link
Collaborator

Ntemis commented Oct 19, 2022 via email

@dmrlawson
Copy link
Collaborator

@soda-pop-ice-cream I suspect one of two things:

  • Somehow the image didn't flash properly. What process are you using?
  • Your emmc has changed somehow, going by this thread: http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=4982
    • Have you installed armbian to the internal storage at some point?
    • It sounds like even when that's the case the official images can still boot from sd. I guess we'd need to figure out what's different :-|

Could you try the older image you tried before and reported working? If this no longer works I think it's option two. If it does and the new image doesn't work when flashed with the same process I've no idea what's going on.

@slowpokefarm
Copy link

Is there any progress on this? I can't test the latest image at the moment since I'm away from hardware, just wanted to know if anyone tested it since October.

@dmrlawson
Copy link
Collaborator

Is there any progress on this? I can't test the latest image at the moment since I'm away from hardware, just wanted to know if anyone tested it since October.

The patches to make it build with ethernet support are merged into the Lakka-v5.x branch. It boots for Ntemis and me but not soda-pop-ice-cream for some unknown reason.

I recently managed to build the wifi/bt drivers (or at least part of them) but haven't had any success getting them to work yet.

We don't have nightly builds for v5 yet but when we do I'll make sure we're building for it.

@slowpokefarm
Copy link

I'm finally able to test the build, which image should I try?

@ToKe79
Copy link
Collaborator

ToKe79 commented Jan 31, 2023

you can check latest devel build with orange-pi4-lts in the file name.

@slowpokefarm
Copy link

you can check latest devel build with orange-pi4-lts in the file name.

Ethernet works, no wifi/bluetooth, mupen64plus and PPSSPP show black screen only. Do I need to test anything else?

@slowpokefarm
Copy link

slowpokefarm commented Apr 16, 2023

Did some more testing with 22030304 build, I was able to run Dolphin with GameCube ROM exactly once and it was running smoothly without any issues or FPS drops. After that one time it always ended with black screen again with bad_ps_OGL_0.txt file created in Dump containing the following:

Details

#version 310 es

#define FORCE_EARLY_Z layout(early_fragment_tests) in



#define ATTRIBUTE_LOCATION(x)
#define FRAGMENT_OUTPUT_LOCATION(x)
#define FRAGMENT_OUTPUT_LOCATION_INDEXED(x, y)
#define UBO_BINDING(packing, x) layout(packing, binding = x)
#define SAMPLER_BINDING(x) layout(binding = x)
#define TEXEL_BUFFER_BINDING(x) layout(binding = x)
#define SSBO_BINDING(x) layout(binding = x)
#define IMAGE_BINDING(format, x) layout(format, binding = x)

#define VARYING_LOCATION(x)







#extension GL_OES_texture_buffer : enable
#extension GL_EXT_blend_func_extended : enable

#extension GL_EXT_shader_framebuffer_fetch: enable
#define FB_FETCH_VALUE real_ocol0
#define FRAGMENT_INOUT inout

precision highp float;
precision highp int;
precision highp sampler2DArray;
precision highp usamplerBuffer;
precision highp sampler2DMS;
precision highp image2DArray;
#define API_OPENGL 1
#define float2 vec2
#define float3 vec3
#define float4 vec4
#define uint2 uvec2
#define uint3 uvec3
#define uint4 uvec4
#define int2 ivec2
#define int3 ivec3
#define int4 ivec4
#define frac fract
#define lerp mix
SAMPLER_BINDING(0) uniform sampler2DMSArray samp0;
VARYING_LOCATION(0) in float3 v_tex0;
FRAGMENT_OUTPUT_LOCATION(0) out float ocol0;

void main()
{
  int layer = int(v_tex0.z);
  int3 coords = int3(int2(gl_FragCoord.xy), layer);
  ocol0 = texelFetch(samp0, coords, 0).r;
  for (int i = 1; i < 4; i++)
    ocol0 = min(ocol0, texelFetch(samp0, coords, i).r);
}
0:49(29): error: illegal use of reserved word `sampler2DMSArray'
0:49(29): error: syntax error, unexpected ERROR_TOK
\00
Dolphin Version: Dolphin [HEAD] 2f4b0f7
Video Backend: OpenGL ES

I also was able to run a lot of more lightweight cores for NES, SNES, GBA etc without any issues.
I also was able to run PPSSPP core with x2 resolution without any fps drops or other issues.
I also tried to run Mupen64Plus-next core with N64 roms but each time Lakka was restarting without leaving any logs.

EDIT: The issue with dolphin blackout seems to be a bug in the emulator according to following threads:

  1. https://gitlab.freedesktop.org/mesa/mesa/-/issues/8405
  2. OGL: Only specify precision for sampler2DMSArray when it is defined dolphin-emu/dolphin#11628

I suppose provided fix will reach upstream and dolphin will work but I still have no idea what could cause it to run once without issues.

EDIT 2: Tried running ps2 emulation with Play!, performance is expectedly poor. Is PCSX2 available to test with lakka?
PS1 emulation works with no issues under any provided emulator, especially PCSX reARMed.

@slowpokefarm
Copy link

Small update - I switched off MSAA for dolphin and it works with orange pi 4 lts under lakka devbuild v5.x.
Mupen64Plus-next does not work both on pi 3 lts and pi 4 lts. Always restarts lakka without producing any logs or dumps.

Ethernet works, wi-fi and bluetooth don't work.

@gordaogameplay
Copy link

Hello, it's been a while since the topic had any related progress, I've had an orangepi 4 LTS board for a long time, and this month I started using it again but wanting to use the emulation resources. When searching on the internet I found Lakka, but their website does not have a specific image for orangepi 4 lts, so I found this topic. Has anyone had any progress on a fully functional image?

@Ntemis Ntemis closed this as completed Feb 5, 2024
@gordaogameplay
Copy link

gordaogameplay commented Feb 5, 2024

https://nightly.builds.lakka.tv/2024-02-02_5.x/RK3399.aarch64/Lakka-RK3399.aarch64-devbuild-v5.x-20240202-0acbf0c-orangepi-4-lts.img.gz

Thanks @Ntemis, But, is it normal for the screen to go black and the Orange Pi to not show any blinking LEDs, indicating that something is being done by the system?

Edit: 30 minutes have passed after inserting the microSD with this image, and the screen connected to the orangepi 4 LTS is still black. and the LEDs do not blink. It's normal? I'm going to leave orangepi connected in this state to test if it will start at some point, I believe it is taking a while to create partitions and the like, just like the other LAKKA distros do.

@gordaogameplay
Copy link

https://nightly.builds.lakka.tv/2024-02-02_5.x/RK3399.aarch64/Lakka-RK3399.aarch64-devbuild-v5.x-20240202-0acbf0c-orangepi-4-lts.img.gz

this img still not working, nothing happens when i turn on my orangepi 4 with th SD card =( any solution?

@Ntemis Ntemis reopened this Feb 6, 2024
@Ntemis
Copy link
Collaborator

Ntemis commented Feb 6, 2024

will test this when i find some time

@gordaogameplay
Copy link

will test this when i find some time

Thanks a lot, i appreciate so much!

@gouchi
Copy link
Member

gouchi commented Apr 9, 2024

What is the status on the port ?

Can you make a test with latest nightly ?

Thank you.

@Ntemis
Copy link
Collaborator

Ntemis commented May 23, 2024

@gordaogameplay If you don't test stable 5.0 then i have to shut this down, i give you 4 days until monday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants