11 11
balbes150

Armbian for TV box rk3328

Recommended Posts

2 minutes ago, balbes150 said:

run SD + USB ?

Yes I searched the forum for T9 but came up empty. Somehow I stumbled upon the post about SD+USB. That way I've gotten it to boot Armbian_5.72_Rk3328-tv_Ubuntu_bionic_default_4.4.154_desktop_20190123 but no eth0. I'll dig around rk3328-t9-android.dtb & see what I can find

 

Share this post


Link to post
Share on other sites

I made a few adjustments to the device tree for my XT-RX4B-V02 based box. The intermediate results look promising:

  • wifi (RTL8723CS) basically works
  • memory perf:
  armbian@rk3328:~$ dd if=/dev/zero of=/tmp/testfile bs=1M count=1000
  1000+0 records in
  1000+0 records out
  1048576000 bytes (1.0 GB, 1000 MiB) copied, 1.70386 s, 615 MB/s

... this was within an x11vnc session, on multiple tests I constantly get values greater than 550MB/s (The board has 4GB DDR3/1600 ram)

 

Notes

I never experienced stability issues. As the mounted "heatsink" is more than dubious, I lowered the temp limits just to stay on the safe side. Scaling down the cpu-frequency on temp limit works flawlessly.


The voltage settings used in Android are slightly lower than the ones in use. I had no time to test, might improve temps a bit.

 

There are still a number of issues, maybe someone around could kick in?

  • Wifi client: Connect using nmtui is fine, but how to auto-connect on system start?
    The adapter chooses a random mac on boot. I think assigning a static one would help - I just did not find a proper way of doing so...
  • dmesg tells me that there are still a number of device tree issues that might prevent the gpu from working properly.
  • Bluetooth (RTL8723CS) does not work yet (while usb bluetooth dongle is fine). I got the impression (might be wrong) that chip support will still take some time, but I'd like to get the device tree right and don't know how to prove that I got pins/uart/device tree settings right.
  • @balbes150 lsmod tells me 8723cs and 8723ds get loaded. Removing 8723ds.ko helps - what would be the right way of dealing with such situation?

OT side notes:

Best

rk3328-box-RX4B-V02-WIP190129.dts

Share this post


Link to post
Share on other sites

Thanks @mb16

 

What are the specs on your box? And, which img are you using?

 

I tried your dts on my A5XMax (with 8723bs wifi chip) box and I notice

 

1.  Wifi still does not work, but at least it shows up in ifconfig.  The wlan0 device is not active, and nmtui cannot see it.

    This is still an improvement from before when it did not show up in ifconfig.

2.  8723bs,8723cs,8723ds modules all show up in lsmod. I blacklisted 8723cs and 8723ds in /etc/modprobe.d/blacklist.conf and now they don't show up. This does not improve or worsen the behavior as far as I can see.

3.  I see some files with wrong path in dmesg, particularly /system/etc/wifi/wifi_efuse_8723bs.map and /data/wifimac.txt . These probably need to be changed in the sources. I created soft links /system/etc/wifi to /lib/firmware/rkwifi and put a efuse.map I found in the android vendor partition, but that did not help.

4.  Do you still see wifi related errors in dmesg? I have a couple of bad one maybe related to using your (wrong for me) settings in the dts. How did you come up with this dts?

[   15.194686] RTW: ERROR HalPwrSeqCmdParsing: Fail to polling Offset[0x5f8]=ea
[   15.194703] RTW: ERROR CardDisableRTL8723BSdio: run RF OFF flow fail!
[   15.200474] RTW: rtw_regsty_chk_target_tx_power_valid return _FALSE for band:0, path:0, rs:0, t:-1

 

5.  With your dts, running on vnc I see memory write test  showing 643MB/s !!!!!!

% dd if=/dev/zero of=/tmp/testfile bs=1M count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 1.63081 s, 643 MB/s

Can you tell us a bit about how you came up with this dts, especially the wifi settings?

 

thanks

Share this post


Link to post
Share on other sites

I've got a rk3328 box (h96 max plus) and tried image Armbian_5.72_Rk3328-tv_Debian_stretch_default_4.4.154_20190123

 

I tried to burned the image to tf card (sandisk and kingston, FYI) with dd under linux and "balenaEtcher" under windows, 

 

but each time,it stopped booting with the same message.

 

the message is like this( more details in screenshot):

 

Being: Running /scripts/local-blocks .,.. done

 

Gave up waiting for root file system device.

 

...

 

Alert! LABEL=ROOTFS dose no exist. Dropping to a shell

 

btw. I've tried serveral differnt dtb files, with no luck

 

can anyone give me a hint what the problem might be

Share this post


Link to post
Share on other sites

UPDATE !!!

 

After a couple of shutdown/reboots, Wifi is working now on the A5XMAX with mb16 s dts in the above post. Im not sure what changed, but the 2 error messages mentioned above are gone. I do have the android efuse.map in there and have blacklisted 8723cs, and 8723ds, but I am not sure  these are needed. And I used nmtui to create the wifi profile.  It boots up and connects automatically now.   I am using 4.4.154_desktop_20190115.img

 

BT is still not working, but this is major progress !!!!  Running under a simple vnc the dd memory write test is showing 660 MB/s  with CPU freq at 1296 Mhz. So the dram parameters in mb16 s dts are great !

 

Thanks @mb16and @balbes150

:beer:

 

Share this post


Link to post
Share on other sites
4 hours ago, nathanwz said:

can anyone give me a hint what the problem might be

I have one of these, in the simple shell ls -l /dev/block will show at best mmcblk1 (the emmc),

(almost) never the sd card

I think it's something to do with the regulator,,  pwm does not seem to work,,

the android dtb seem to use simpleReg vrs rk805-regulator

I did a "hack" bypassing gpio, barely works, lots of errors in dmesg

(regulator errors,, boots and runs from sd)

The other method is to copy rootfs to a usb stick, rename the partitions (e2label)

Share this post


Link to post
Share on other sites
5 hours ago, wdtz said:

I have one of these, in the simple shell ls -l /dev/block will show at best mmcblk1 (the emmc),

(almost) never the sd card

I think it's something to do with the regulator,,  pwm does not seem to work,,

the android dtb seem to use simpleReg vrs rk805-regulator

I did a "hack" bypassing gpio, barely works, lots of errors in dmesg

(regulator errors,, boots and runs from sd)

The other method is to copy rootfs to a usb stick, rename the partitions (e2label)

yes.  when I list my /dev directory, I did not find any sd card.

 

so, when you say "copy rootfs to a usb stick, rename the partitions (e2label)" ,

do you mean I should copy the rootfs partition of the image file to a usb stick? what about boot partition?

Share this post


Link to post
Share on other sites
26 minutes ago, nathanwz said:

yes.  when I list my /dev directory, I did not find any sd card.

 

so, when you say "copy rootfs to a usb stick, rename the partitions (e2label)" ,

do you mean I should copy the rootfs partition of the image file to a usb stick? what about boot partition?

No need to copy and rename anything. Write the image to two media SD card and USB flash drive. Then connect both media at the same time to the TV box and turn on. It is recommended to check all variants of DTB (you only need to edit the file " extlinux.conf " on SD card).

Share this post


Link to post
Share on other sites

Now the A5X works with integrated wifi!

 

First of all: thx @balbes150 @armar @mb16 !!

- I use Armbian_5.68_Rk3328-tv_Debian_stretch_default_4.4.154_20190110.img.xz
- download the dts file from mb16 post above.
- compile it to dtb file
(install device tree compiler to be able to do that: sudo apt-get install device-tree-compiler; you will probably need to use "-W no-unit_address_vs_reg" command with it to proceed)
- copy the dtb file to your sd card where all other dtbs are and use it as startup
- boot your box
- lsmod will now show 8723bs
- nmtui directly listed my wifi network; configure it for your needs
- now with every startup you have wifi

Share this post


Link to post
Share on other sites

Updated 5.73 images.

Added dtb to work with a frequency of 1500. Enabled by default dtb with the maximum frequency and the memory speed (rk3328-a5x-1500.dtb).

Share this post


Link to post
Share on other sites
(edited)

I can't get Arbian to boot on my Scishion V88 Piano box.  I can get it to boot with the latest LibreElec nightly.  Ethernet even works.  I didn't try wifi.  Can I copy the dtb from LibreElec and use it to boot Armbian?   Just copy it into the /dtb directory on Armbian, update extlinux.conf and boot?  i see LibreElec and Armbian are both using the same kernel version so I'm thinking this should work.  Can anyone confirm?  Only one way to find out I guess.  I'll try this weekend and report back but if someone has experience with this, it would be appreciated.

 

Thanks,

Rob

Edited by rob0809
Updated info.

Share this post


Link to post
Share on other sites
4 hours ago, rob0809 said:

I can't get Arbian to boot on my Scishion V88 Piano box.  I can get it to boot with the latest LibreElec nightly.  Ethernet even works.  I didn't try wifi.  Can I copy the dtb from LibreElec and use it to boot Armbian?   Just copy it into the /dtb directory on Armbian, update extlinux.conf and boot?  i see LibreElec and Armbian are both using the same kernel version so I'm thinking this should work.  Can anyone confirm?  Only one way to find out I guess.  I'll try this weekend and report back but if someone has experience with this, it would be appreciated.

You may need to try changing another u-boot on the SD card. In this topic there is information, that this helped launch system in a similar situation.

Share this post


Link to post
Share on other sites
On 1/31/2019 at 4:34 AM, armar said:

UPDATE !!!

 

After a couple of shutdown/reboots, Wifi is working now on the A5XMAX with mb16 s dts in the above post. Im not sure what changed, but the 2 error messages mentioned above are gone

On 1/31/2019 at 9:52 PM, slaven said:

Now the A5X works with integrated wifi! 

 

First of all: thx @balbes150 @armar @mb16 !!

- I use Armbian_5.68_Rk3328-tv_Debian_stretch_default_4.4.154_20190110.img.xz
- download the dts file from mb16 post above.
- compile it to dtb file
(install device tree compiler to be able to do that: sudo apt-get install device-tree-compiler; you will probably need to use "-W no-unit_address_vs_reg" command with it to proceed)
- copy the dtb file to your sd card where all other dtbs are and use it as startup
- boot your box
- lsmod will now show 8723bs
- nmtui directly listed my wifi network; configure it for your needs
- now with every startup you have wifi

 

Congrats to @slaven and @armar!!! Good job @mb16 !! Can you tell me the version of A5X? A5X Plus (2/16) or a5X Max (4/32)?

Share this post


Link to post
Share on other sites
1 hour ago, CarlosPiles said:

 

Congrats to @slaven and @armar!!! Good job @mb16 !! Can you tell me the version of A5X? A5X Plus (2/16) or a5X Max (4/32)?

Mine is the A5X Max 4/32

 

https://www.geekbuying.com/item/A5X-MAX-RK3328-4GB-32GB-TV-Box-388745.html

 

Share this post


Link to post
Share on other sites
15 hours ago, balbes150 said:

Updated 5.73 images.

Added dtb to work with a frequency of 1500. Enabled by default dtb with the maximum frequency and the memory speed (rk3328-a5x-1500.dtb).

On my A5X MAX box I got hangs twice with rk3328-a5x-1500.dtb (while installing programs using apt install) so I moved back to rk3328-a5x.dtb and things seem fine.

 

@balbes150 does 5.73 include the media-script installs by @JMCC ? Or do we still need to run the media-script ?

Share this post


Link to post
Share on other sites
16 minutes ago, armar said:

On my A5X MAX box I got hangs twice with rk3328-a5x-1500.dtb (while installing programs using apt install) so I moved back to rk3328-a5x.dtb and things seem fine.

Any improvement on the responsiveness of the desktop?

Share this post


Link to post
Share on other sites
21 minutes ago, amirul said:

Any improvement on the responsiveness of the desktop?

I dont think so. Window movement is still not very fluid especially under some load. I find my use of lower resolution under vnc is much better.

The memory bandwidth also did not change much with increasing the cpu frequency, which I guess is to be expected. Not much overall gain with it and a couple of potential hangs, so I went back to 1296. Having builtin wifi working on bootup is great.

Share this post


Link to post
Share on other sites

Processors rk3328 powerful and require a good cooling system. You have not changed the housing and no fan. Therefore, the system heats up very quickly and reaches the adjustment temperature (70-80 in the dtb mx10 and 75-85 files on the a5x files). Here I described the test results when playing 4K video. After the addition of a normal cooling system (and USB fan), the temperature did not exceed 50-55 degrees under maximum load.

 

 

Share this post


Link to post
Share on other sites
9 hours ago, CarlosPiles said:

Now I am working on the Armbian installation into MX10's EMMC. I will keep you informed. 

 

Everything has long been done-run the script "install.sh" and the system will be installed in eMMC. I checked for MVR9.

 

4 hours ago, armar said:

does 5.73 include the media-script installs by

No

Share this post


Link to post
Share on other sites
14 minutes ago, balbes150 said:

 

Everything has long been done-run the script "install.sh" and the system will be installed in eMMC. I checked for MVR9.

I know,  but not working out-of-the-box for mx10,  as in mx10 SD is /dev/blkmmc0 and internas eMMC is /dev/blkmmc2

Ddbr ran perfectly and I will try to merge the Ddbr media detection into install.sh to get an universal installer which autodetect blkmmcX as ddbr does. 

Any warning about not damaging the loader? 

Share this post


Link to post
Share on other sites
35 minutes ago, CarlosPiles said:

I know,  but not working out-of-the-box for mx10,  as in mx10 SD is /dev/blkmmc0 and internas eMMC is /dev/blkmmc2

Ddbr ran perfectly and I will try to merge the Ddbr media detection into install.sh to get an universal installer which autodetect blkmmcX as ddbr does. 

Any warning about not damaging the loader? 

You've tried the latest images ? Everything is fixed. Before starting the installation, you need to run the script to create an MBR (this is described in the documentation).

 

https://github.com/150balbes/Build-Armbian/blob/master/packages/bsp/rk3328-tv/install.sh

Share this post


Link to post
Share on other sites

Launched the latest image on MVR9 (with native dtb), desktop 1080. A USB fan is installed. Media script (with asoc driver) is installed in the system. Launched browser (chromium, the usual , not accelerated). Funny, when working in windowed video playback mode, the video slows down noticeably, but switch to full-screen mode and .... video automatically switches itself to 1080 (where available on YouTube) and turns the video without brakes to full screen. Console UART running temperature monitoring, video 1080 temperature is around 60-65. If you move the mouse down to stick out the control panel YouTube, the temperature immediately begins to rise. I'm removing the panel, dropping back to 60-65. If you hold the panel and wait for the temperature 70-there is no smoothness of the video (slows down), remove the panel , decreases and again everything is smooth.
If the video goes below 1080 (if there are no such options on the current video), the temperature drops and can drop to 45-50.
Let me remind you, in the default DTB for MVR9, the temperature settings are first stage 70, second 80, cutting off at 110.

By the way, on MVR9 the fan from USB turns off with the program shutdown of the TV box (via the menu item in Armbian), and turns on when you turn on and start the system. No need to pull the USB connector. :)

Launched on MX10 (with fan, resolution 1080 and dtb a5x-1500), the browser also in full screen YouTube works without brakes, but sometimes falls.

Share this post


Link to post
Share on other sites
6 hours ago, armar said:

I dont think so. Window movement is still not very fluid especially under some load. I find my use of lower resolution under vnc is much better.

The memory bandwidth also did not change much with increasing the cpu frequency, which I guess is to be expected. Not much overall gain with it and a couple of potential hangs, so I went back to 1296. Having builtin wifi working on bootup is great.

Ok thanks for the feedback. I think I'll give the rk3328 path a rest now and just use the s912 boxes I have, their performance with 5.72 is very usable.

Share this post


Link to post
Share on other sites
1 hour ago, balbes150 said:

You've tried the latest images ? Everything is fixed. Before starting the installation, you need to run the script to create an MBR (this is described in the documentation).

 

https://github.com/150balbes/Build-Armbian/blob/master/packages/bsp/rk3328-tv/install.sh

Working with 5.68 image. I found it more stable than 5.71. None of them work with remote commander to switch mx10 on. I will give a try to 5.73.

Share this post


Link to post
Share on other sites
2 hours ago, balbes150 said:

Before starting the installation, you need to run the script to create an MBR (this is described in the documentation).

Do you mean running make-mbr.sh from boot partición?  Can you provide a link to that documentation?   

Share this post


Link to post
Share on other sites
1 hour ago, CarlosPiles said:

Do you mean running make-mbr.sh from boot partición?  Can you provide a link to that documentation?    

 

Share this post


Link to post
Share on other sites

I also noticed that the installation of media script helps in the browser. Before installation, when you try to play full screen at a resolution of 1080 were noticeable braking and friezes, after installing the script-the browser began to work without brakes and normally shows video from YouTube in full screen at a resolution of 1080.

Share this post


Link to post
Share on other sites
On 1/31/2019 at 2:05 AM, armar said:

Can you tell us a bit about how you came up with this dts, especially the wifi settings?

Glad to read I seem to have created something useful.

 

My box is a scishion ai one alike one, MXQ pro max labeled box. The board is labeled TX-RX4B-V02.

 

My workflow:

  • Used adb to read the device tree directory from the box running android.
  • Converted to android.dts file using dtc.
  • For armbian used the ...box.dtb because the device could boot using that one.
  • Converted dtb to dts using the "sorted" option of dtc for comparison (a).
  • Converted dtb to dts without the "sorted" option for optimization (b).
  • Used a merge utility (meld) to compare (a) against android.dts
  • Put the found differences into (b), used dtc to compile.

Too easy :)

 

Now, compare and merge... Using dtc to decompile a dtb to text format means there is no symbolic info - names as found in the kernel sources .dts(i) files 
and rockchip documentation are not available. Its just like reading and trying to understand a compiled app from a debugger listing without symbols.
Reading the kernel documentation regarding the device tree mechanism turned out to be very helpful.

 

I think this kind of workflow is suitable for proof of concept. It is really not suitable for anything else.

 

Its very easy to make mistakes. Easy to detect if the device refuses to boot, but there are many more possibilities.

 

Reading things like ... "did not work... suddenly did... then stopped to work again...":

This can mean pin settings (called pad nowadays, ok) might be wrong.
Reset or chip enable signals of peripheral chips are wired to soc gpios. If the mapping of those gpios to driver functions is wrong - anything can (and will) happen.

 

Regarding dram settings

These numbers count in pico seconds. And a pico second is a dammed short time. The right values depend on used chips and pcb layout and must be
set very carefully. Just using the values suitable for one board with an other... might work - or not - or temporary.

 

Regarding the wifi chip

The soc pads wired to the 8723 on my pcb differ from the standard ones and an other mmc peripheral of the soc is used for sdio connection. 
It might well be, that other pcb's are wired the same way and that 8723bs and 8723cs are mostly compatible.


 

Share this post


Link to post
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...
11 11