Jump to content

CSC Armbian for RK322x TV box boards


jock

Recommended Posts

On 10/16/2021 at 1:44 AM, tommy said:

Your cutting edge armbian can achieve PSX full 60fps speed in retroarch


Hello Tommy!

 

Did you achieve this through retroarch on linux, or through a lakka-self-compited-img...?
It's been almost 2 years, lol, so I don't know if you made any progress but in any case, would you be willing to share whatever image you have working best? 

I am working with the k5.15 and it's been great for many things. Retroarch doesn't seem to be one of them, tho. Maybe I need to tweak it a lot and should not expect it to work great at install, tho...

 

Thanks!

Link to comment
Share on other sites

Hi, guys.

 

Finally got mxq4 Fleco booting with Armbian, but the internal wifi chip (r8723as) is not working.

The wifi chip is identified as 02c4:8723.

 

No hdmi output with hdmi-to-usb device. Didn't test other hdmi devices.

Overlays applied: emmc, led-conf2. Leds are working, with blue led shining when the device boots with Armbian.

 

Tried patching the kernel to add the device id to r8723bs driver with result the interface wlan0 without the ability to bring up the interface.

Someone has done this similar work before.

 

Attached is the dts from Android tv, kernel 3.10 and system diagnosis information.

 

Screenshot_2023-06-24_11-07-32.png

device-tree-mxq4k.dts

Edited by mydeardiary
Added system diagnosis and hdmi status
Link to comment
Share on other sites

vor 1 Stunde schrieb mydeardiary:

Tried patching the kernel to add the device id to r8723bs

But RTL8723as is not 8723bs , you should not mix them . 

 

8723as has definitive a diffirent firmware than bs https://kernel.googlesource.com/pub/scm/linux/kernel/git/jes/linux/+/rtl8xxxu-8188eu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h

 

many of the RTL 8723xx are part of Kernel 5 , it should be detect by linux automaticly with the right firmware/driver combination

 

have you check the chip by open the box ? maybe its a 8723ds (bs and ds have same format and pinout ) ,8723as has a diffirent board format so its very unusal that this board have another print extra for this 8723as format

 

 

 

 

Edited by RaptorSDS
Link to comment
Share on other sites

@mydeardiary hello, as @RaptorSDS said, rtl8723as and rtl8723bs are two different chips and require different drivers and firmwares.

rtl8723as driver is not in the linux kernel and looks like quite difficult to find a suitable driver.

 

Libreelec folks did some adaptation for the rtl8723au: https://github.com/dtechsrv/LibreELEC-AML/pull/24

Link to comment
Share on other sites

On 6/24/2023 at 5:13 AM, ArkhanLK said:
On 10/16/2021 at 11:44 AM, tommy said:

Your cutting edge armbian can achieve PSX full 60fps speed in retroarch


Hello Tommy!

 

Did you achieve this through retroarch on linux, or through a lakka-self-compited-img...?
It's been almost 2 years, lol, so I don't know if you made any progress but in any case, would you be willing to share whatever image you have working best? 

I am working with the k5.15 and it's been great for many things. Retroarch doesn't seem to be one of them, tho. Maybe I need to tweak it a lot and should not expect it to work great at install, tho...

 

Thanks!


 

Quote

 

At the current stage of this RK332X armbian, PSX emulator could achieve 60 fps on the current/edge kernel because of the great work of Jock, contributors, and Linux graphic library devs.

 

Kernel 5.15 may be work but you need to update your system first. It is best to try on current / edge build. Ubuntu seems to be a little better than Debian.

 

1. use "armbian-config" command to freeze your kernel update and config max cpu freq. to 1.3 GHz (or more if has any)

2. $ sudo apt update    , $ sudo apt upgrade

3. install retroarch to get the necessary library is the easiest way.  $ sudo apt install retroarch

4. build or download aarch64 cores. It is best to build your own core by https://github.com/libretro/libretro-super

5. Retroarch config video renders multi-core and fullscreen to increase speed.

6. PSX core on aarch64 needs the new build to have neon 64bit to be fast.

 

Hope you enjoy gaming on this amazing armbian tv box.

 

 

Sorry, I thought it is RK33xx, but this forum is RK322X. It is 32bit arm CPU. RK32xx is a slower than 33xx. I'm not use 32xx box anymore. For 32xx, the legacy 4.X kernel is faster for this CPU but it hard to find require library now. I'm not test current kernel on 322x that could archive 60 fps. You may try the above instruction but arm 32bit core instead that may be work for you.

 

 

Edit: I just tested it on my 322x box. Ubuntu Edge kernel works. Retroarch with pcsx-rearmed armv7 core plays PSX game for 60 fps without problem.

 

 

Edited by tommy
RK322X not RK33XX
Link to comment
Share on other sites

50 minutes ago, jock said:
20 hours ago, tommy said:

Edit: I just tested it on my 322x box. Ubuntu Edge kernel works. Retroarch with pcsx-rearmed armv7 core plays PSX game for 60 fps without problem.

Sorry, just to be clear (I'm curious...): you tried the latest Ubuntu Lunar with edge 6.3 kernel you can download from https://github.com/armbian/community  ?

Yes, it is. This link -> https://github.com/armbiankappa/os/releases/download/23.8.0-trunk.56/Armbian_23.8.0-trunk.56_Rk322x-box_lunar_edge_6.3.8_xfce_desktop.img.xz

Link to comment
Share on other sites

On 6/24/2023 at 10:44 PM, tommy said:

Edit: I just tested it on my 322x box. Ubuntu Edge kernel works. Retroarch with pcsx-rearmed armv7 core plays PSX game for 60 fps without problem.

 

Ok, so just like out of the blue, you burned that img, installed retroarch, and pcsx ran 60fps?

Damn.

 

Edit: if you changed anything, I'd like to know your settings. Would you share?

Edited by ArkhanLK
Link to comment
Share on other sites

On 6/24/2023 at 1:03 PM, RaptorSDS said:

But RTL8723as is not 8723bs , you should not mix them . 

 

8723as has definitive a diffirent firmware than bs https://kernel.googlesource.com/pub/scm/linux/kernel/git/jes/linux/+/rtl8xxxu-8188eu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h

 

many of the RTL 8723xx are part of Kernel 5 , it should be detect by linux automaticly with the right firmware/driver combination

 

have you check the chip by open the box ? maybe its a 8723ds (bs and ds have same format and pinout ) ,8723as has a diffirent board format so its very unusal that this board have another print extra for this 8723as format

 

I don't have a clue, but the driver used within Android os is 8723as.

Here is the photo of wifi chip.

Spoiler

IMG_2023-06-26-10-19-28-017-edited.thumb.jpg.7c4541a2b9ba0b14e4d2df8d654a830b.jpg

 

On 6/25/2023 at 3:46 AM, jock said:

Libreelec folks did some adaptation for the rtl8723au: https://github.com/dtechsrv/LibreELEC-AML/pull/24

Great. There is still a hope to get this 8723as wifi chip works within Armbian.

Link to comment
Share on other sites

On 6/25/2023 at 3:46 AM, jock said:

Libreelec folks did some adaptation for the rtl8723au: https://github.com/dtechsrv/LibreELEC-AML/pull/24

Got no success compiling rtl8723AU driver from the mentioned pull request inside linux 6.3.8 source tree with arm gnueabihf toolchain 11.3 from developer.arm.com website.

 

Spoiler
builder@buildserver ~/playground/linux-6.3.8/drivers/staging/rtl8723AU $ time make CONFIG_RTL8723AU=m -C $KSRC M=$PWD 
make: Entering directory '/home/builder/playground/linux-6.3.8'
  CC [M]  /home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU/core/rtw_cmd.o
In file included from /home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU/core/rtw_cmd.c:23:
/home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU/include/osdep_service.h: In function ‘_init_timer’:
/home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU/include/osdep_service.h:959:15: error: ‘_timer’ {aka ‘struct timer_li
st’} has no member named ‘data’
  959 |         ptimer->data = (unsigned long)cntx;
      |               ^~
/home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU/include/osdep_service.h:960:9: error: implicit declaration of functio
n ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
  960 |         init_timer(ptimer);
      |         ^~~~~~~~~~
      |         _init_timer
/home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU/core/rtw_cmd.c: In function ‘rtw_cmd_thread’:
/home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU/include/osdep_service.h:850:31: error: implicit declaration of functi
on ‘complete_and_exit’ [-Werror=implicit-function-declaration]
  850 |         #define thread_exit() complete_and_exit(NULL, 0)
      |                               ^~~~~~~~~~~~~~~~~
/home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU/core/rtw_cmd.c:595:9: note: in expansion of macro ‘thread_exit’
  595 |         thread_exit();
      |         ^~~~~~~~~~~
/home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU/core/rtw_cmd.c:597:1: error: control reaches end of non-void function
 [-Werror=return-type]
  597 | }
      | ^
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:252: /home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU/core/rtw_cmd.o] Error 1
make: *** [Makefile:2025: /home/builder/playground/linux-6.3.8/drivers/staging/rtl8723AU] Error 2
make: Leaving directory '/home/builder/playground/linux-6.3.8'

 

 

The source driver is attached. Any help is appreciated.

rtl8723AU-pr24.tar.gz

Link to comment
Share on other sites

Hello friends,

 

There was some interest in running Retropie on this box in this thread. I've done some basic work getting one of the boxes I own to run Retropie, and have a basic patch that helps Retropie identify that the CPU is ARM. https://retropie.org.uk/forum/topic/34337/rk322x-box-armbian-build-report-collab

 

If there are tests / whatever folks here might find helpful, let me know. I'm not sure how long I'll be keeping this box.

Link to comment
Share on other sites

Hello guys!

 

I have this H96 Mini V8 RK3228A tv box without an SD card slot. I flashed the newest armbian on it. It worked, but every time the screen updated I got these weird green line flashing. MEL18_20230628_224526882.thumb.jpg.5cc56738e4ac46a54b0598c6334da61f.jpg

 

So I figured maybe it's just some driver issue because somebody successfully used armbian with this board, so I tried flashing older versions. 

 

Older versions still had this issue, but now I got a bigger problem: I can't flash anything else now, because the button doesn't boot it into maskrom mode, and I'm stuck on some old minimal version armbian that can't even boot up properly!

 

MEL18_20230628_224634671.thumb.jpg.9fffcae2873b92d5fcd73c2aa3cca96a.jpg

 

It seems my only option left is to find the clock pin on the emmc if that's possible, or to erase the emmc completely with that broken Linux. I already tried fdisk and mkfs commands to try to erase it, it just say command not found.  

 

This is where I need your help guys. Here are some photos of the emmc chip and of the board.

 

IMG_20230628_224126.thumb.jpg.f215916af5d235366a2be633bdb8c1af.jpgMEL18_20230628_224300459.thumb.jpg.764a20e27452238e0e9e86dad0b82e52.jpgMEL18_20230628_224232413.thumb.jpg.e0313044a285f48dbc5c3313ab00bb4b.jpg

 

By the way I already figured out the green line issue, it only does this at 4k resolution, if I plug in the HDMI after powering it on, it starts at a lower resolution

 

Link to comment
Share on other sites

On 6/27/2023 at 11:16 AM, baryon said:

Retropie on this box in this thread

 

Hey, that's very nice! I am trying exactly to have it as an option for retro games. I have tried libreelec/kodi with IAGL, but not much luck there. I am trying Retroarch on itself but still am struggling... So, for me to try the retropie, do you have a compiled image? Or how would I got about it?

Thanks once more!

Link to comment
Share on other sites

@jock help stuck on Write LBA from file (76%) then I retry flashing now all img says "Write LBA failed!" I have rk3229 device.

specs: 8gb storage 1gb ram

 

img file name I flashed: Armbian_23.05.0-trunk-e33842ef2_Rk322x-box_lunar_edge_6.2.9_minimal.img

code I used: ./rkdeveloptool wl 0x0 image.img

my device on lsusb: Bus 001 Device 003: ID 2207:320b Fuzhou Rockchip Electronics Company RK3228/RK3229 in Mask ROM mode

edit: I think if I remember correctly at first I'm in loader mode but I think after flashing I am now in maskrom mode and now I don't need to toothpick the reset button.

edit 2: I replaced my rk322x_loader_v1.10.238_256.bin which I got from different source and replaced it with the loader provided in page 1 it has the same size 185kb but I can flash again now any img file to 100% but now when I power my device only black screen.

edit 3: I am not sure if I have nand, emmc or emcp so I attached these images. atm I can only unscrew 2 screws.

355806627_790485319377402_1509678092335884682_n.jpg

355828922_820206056131542_778916654031226447_n.jpg

Edited by mcs
Link to comment
Share on other sites

update: I was able to cut the plastic where the screw is attached and now managed to open the back cover.

hey guys here I attached my device's front and back with each including zoomed view. I also Included here it's lsusb information. I hope in this way I can contribute to the rk322x community.


I found out that my device is actually rk3228a says on a sticker on the board and not rk3229 but in lsusb it says RK3228/RK3229

edit: the board is R329Q _ V3.1
 

rk3228a_front.jpg

rk3228a_front_zoom.jpg

rk3228a_back.jpg

rk3228a_back_zoom.jpg

lsusb.png

Edited by mcs
Link to comment
Share on other sites

12 hours ago, mcs said:

edit 3: I am not sure if I have nand, emmc or emcp so I attached these images. atm I can only unscrew 2 screws.

 

This is essential, since nand is supported only with legacy 4.4 kernel. That's clearly and boldly stated in the first page.

That board is perfectly supported, but probably it is more convenient for you to run a fresh mainline kernel from sd card than an ancient legacy kernel from nand.

Link to comment
Share on other sites

okay so I currently don't have an SD card to use but I have usb flash drive so @jock do I have emmc or nand base on my board? I am unsure so I skipped the Nand bootloader upgrade as per your instruction and did the Installation (without SD card, board with eMMC)

I tried to use USB flash drive at first - flashed the multitool in the first page and some images but won't work.


I am completely new and still trying to understand and learn everything. I really don't have an idea on what to do next.

Edited by mcs
Link to comment
Share on other sites

summary of what I've done:

 

Installation (via SD card):
Flashed using etcher - USB flash drive:
multitool.img

tried flashing lunar edge

-both didn't work


Installation (without SD card, board with eMMC):

rkdeveloptool db:
rk322x_loader_v1.10.238_256

rkdeveloptool wl 0x0:

Armbian_23.05.0-trunk-e33842ef2_Rk322x-box_lunar_edge_6.2.9_minimal.img
Armbian_22.02.0-trunk_Rk322x-box_bullseye_legacy_4.4.194_minimal.img
Armbian_23.5.1_Rk322x-box_bookworm_current_6.1.30_minimal.img

-All Write LBA from file (100%) but black screen

Link to comment
Share on other sites

hello @fabiobassa based on jock's reply just above I just want to confirm for what I understood I can use main kernel images on SD card and legacy only on the internal storage.

I just found an SD card :D and jock suggested to run the mainline kernels than the legacy kernels which are ancient.

also I don't need to flash the u-boot-main.img if I have sdcard right?

Edited by mcs
Link to comment
Share on other sites

On 6/28/2023 at 8:35 PM, ArkhanLK said:

Or how would I got about it?

https://retropie.org.uk/docs/Manual-Installation/ -- use this process, build takes 4-5 hours, and has the bonus of giving you a free stress test to see how it will handle the most intensive games

 

https://retropie.org.uk/forum/topic/34337/rk322x-box-armbian-build-report-collab -- you have to patch/edit a couple files to get it to build right, as this is a new hardware config

 

Still poking around seeing how Dreamcast works. Been having some compile issues.

Link to comment
Share on other sites

hey guys is "Install Jump start on NAND" in multitool the same as flashing u-boot-main.img.xz the method without SD card?

"installing u-boot-main.img makes the installed system unbootable because it is missing the NAND driver." is that bad?

also in the alternative instructions on NAND:

Choose "Install Jump Start for Armbian" menu option is it the same with "Install Jump Start on NAND"?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines