CSC Armbian for RK322X TV Boxes


Recommended Posts

On 4/25/2020 at 1:27 PM, Maker39 said:

ps Maybe because of these settings the image recorded by Multitool did not load?

I think the mmc-hs200 option blocked the kernel from recognizing the internal flash, so probably yes.

 

11 hours ago, Alex83 said:

How is the performance with your images and do we really get gpu acceleration for videos? Is it working with h265 too? 

It depends. On legacy kernel there are all the modules and options active in the kernel, but the compilation and installation of the video drivers (armsoc) and software (kodi, mpv, etc...) is demanded to the users at the moment.

 

On mainline kernel the driver for hardware video decoding is there, but lima driver is not yet working with X11 and still the user require to compile kodi, mpv or whatever.

6 hours ago, paulml said:

Btw will using the multitool write anything in the internal NAND? I’m actually hesitant to use it now fearing I might not be able to use future method of writing to NAND if you guys do eventually succeed in making it.

Yes, it partially supports the internal NAND at the moment. You can write images on NAND, but they won't work because the NAND has a different layout organization. We are working on a solution we will make public soon.

 

 

 

Link to post
Share on other sites
Donate and support the project!

Hello guys, finally, after a huge and time consuming effort, me and @fabiobassa have a working method for installing Armbian on NAND devices!

 

The method is called steP-nand (Ste Puttane di NAND) and is available as an option in the multitool only for boxes equipped with NANDs.

 

What you need:

  • a fresh copy of the multitool
  • a fresh copy of the armbian images
  • installation instructions

Everything can be found in the first page of the thread.

Enjoy!

Link to post
Share on other sites

Fine ! :thumbup:

I tried the new Multitool and new images.

1. Multitool problem with mmcblk2 on (Iconbit XDS16 and XDS8)  blue board marked T95N-RK3229_512X4-20170803_V1.5) solved!

2. Trouble with

Armbian_20.05.0-trunk_Rk322x-box_focal_legacy_4.4.194_desktop

Armbian_20.05.0-trunk_Rk322x-box_buster_legacy_4.4.194_minimal

stop at "random: nonblocking pool is initialized"

Solved after edit device tree (for me is hk1mini ) As said @jock You can change status="disabled" into status="okay" in dwmmc@30020000

 

So far, that's all I have.

Later, I’ll probably try to heap all the information on these Tv-boxes, maybe they will need a separate dtb for them.

These boxes are common in Russia and CIS countries.  In Europe is excusive apparently :)

Link to post
Share on other sites

@nokirunner
Believe me the name is reaaaallllyyyy appropriate, after days and days of trial and errors

of course it works on emmc and  ( if you have) on nand boards

@Maker39

well, with all those different commercial name, brands marked on circuits,   and producers I am afraid some days will come out someone saying " ON MY BOARD NOT WORKING" but I guess we can say that 85/90% of total cases are now covered.

New hardware disposition/arrangments are to be studied ( seriously hope not, lol )

Link to post
Share on other sites
44 minutes ago, Mark Khevin Rogacion said:

@jock thanks for the hardwork. Tried steP-nand but device isn't booting. Any idea? Monitor was black, I can only see weak red/blue led for a couple of minutes.

Yes, I have an idea: rkdeveloptool ef wiped out the internal bootloader, so it must be restored.

 

I attached a couple of binary files in this post. Do the procedure with the first one (V2.51), then if not successful try the second one.

 

  • Detach all the cables from the board, remove the sdcard also.
  • Connect the Male-to-male cable to the OTG port and then connect to an USB2 port of the computer.
  • Calling lsusb you should see a device with ID 2207:320b. If so good, we're in maskrom mode.
  • Call rkdeveloptool db loader.bin - change loader.bin with the filename of the loader you want to use. It should take a couple of seconds
  • Wait for 10 seconds, then call rkdeveloptool rfi - this command should reply immediately and should tell you sensible informations about the flash memory you have: its total size in megabytes, its page size, access timing and vendor. You should not get senseless informations, like a total size of 0 megabytes or zero access timing. If so, restart the procedure and try the other loader.
  • Call rkdeveloptool ul loader.bin - again change loader.bin accordingly. Should terminate immediately.
  • Wait 5 seconds and then call rkdeveloptool rd
  • Now wait for a minute. If you're lucky, armbian will boot automatically, otherwise detach all the cables and do again the steP-nand installation
  • If still does not work, repeat the procedure using the other loader

 

Try this and let me know if it worked. If it didn't we will try another procedure.

 

 

 

RK322XMiniLoaderAll_V2.51_spectek_en_ddr2_rd_odt_180703.bin MiniLoaderAll_unknown.bin

Link to post
Share on other sites

Hi @Mark Khevin Rogacion, what worked for me multiple times from complete soft bricked state (once I did rkdeveloptool ef and the other time was when I wrote a legacy image to my NAND) was with AndroidTool 2.51 and a copy of the original firmware. Key is the workable firmware and watch out for whether it is NAND or eMMC. 

 

As long as you can get the device to be USB recognized you should be fine. In some cases you would need to press the reset switch inside the AV port, but in a worst case scenario you would need to short the NAND or eMMC pin. I found a picture on which chip and pins to short on forum.freaktab.com. From my attempts, I could not get the firmware to install via rkdeveloptool once I destroyed the bootloader, it showed completed but did not boot.

 

Hi @jock, @fabiobassa, @knaerzche, just wanted to say a very very big thank you for your work. This has certainly kept me sane and entertained during these crazy times, as well as busy.

 

If you want me to try anything, I have 2 x Scishion V88 4K RK3229 (MX4VR-01) devices with NAND and I am okay to go experiment with losing my bootloader :-)

Link to post
Share on other sites

@Ztrawberry

Ty for joining us in this crazy crazy adventure in these more crazy crazy days !

Unless there is some physical damage those board are quite unbricable thanks to bootroom ( maskrom) mode .

Ty for your offer but we already have those mx4vr both 01 and 02

 

What we REALLY would appreciate now is someone willing to rewrite the driver for ssv6x5x WiFi ( we have the one for ssv6051, we need the dual band ) !!!

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

Yes, I have an idea: rkdeveloptool ef wiped out the internal bootloader, so it must be restored.

 

I attached a couple of binary files in this post. Do the procedure with the first one (V2.51), then if not successful try the second one.

 

  • Detach all the cables from the board, remove the sdcard also.
  • Connect the Male-to-male cable to the OTG port and then connect to an USB2 port of the computer.
  • Calling lsusb you should see a device with ID 2207:320b. If so good, we're in maskrom mode.
  • Call rkdeveloptool db loader.bin - change loader.bin with the filename of the loader you want to use. It should take a couple of seconds
  • Wait for 10 seconds, then call rkdeveloptool rfi - this command should reply immediately and should tell you sensible informations about the flash memory you have: its total size in megabytes, its page size, access timing and vendor. You should not get senseless informations, like a total size of 0 megabytes or zero access timing. If so, restart the procedure and try the other loader.
  • Call rkdeveloptool ul loader.bin - again change loader.bin accordingly. Should terminate immediately.
  • Wait 5 seconds and then call rkdeveloptool rd
  • Now wait for a minute. If you're lucky, armbian will boot automatically, otherwise detach all the cables and do again the steP-nand installation
  • If still does not work, repeat the procedure using the other loader

 

Try this and let me know if it worked. If it didn't we will try another procedure.

 

 

 

RK322XMiniLoaderAll_V2.51_spectek_en_ddr2_rd_odt_180703.bin 176.33 kB · 2 downloads MiniLoaderAll_unknown.bin 138.33 kB · 1 download

 

It worked for me, finally armbian is on the nand, it seems to run well!
Thank you so much guys 

Link to post
Share on other sites

Tried the steP-Nand and it worked in 1 try (since I never erase nand before nor use Jump Start tool).

 

Playing around with it now and I just noticed that my mac address changes with every reboot. This was actually the same as "respeaker" image before running in sd card.

 

But I actually solved this (fixed mac address) when I tried the "LE_bootloader_Armbian_20.05.0-trunk_Rk322x-box_buster_current_5.5.16_minimal.img" on sd card.

 

Not sure if reason for change/problem is because of the 5.5.16 kernel before compared to legacy 4.4.194 kernel now? Any ideas on how to fix?

 

Also, worst case scenario, can I still boot from sd card to use previous image (like before to have fixed mac addr) after having flashed the nand with multitool? Do I just have to restore flash using multitool?

 

Very glad to be able to tinker with this during lockdown. Thanks for all the work!

Edited by paulml
Link to post
Share on other sites

@Ztrawberry thanks for the input. I was able to figure out the test points of the board and I have an RK box with nand inside.

 

@jock yes indeed it wiped out everything. Flashing the loader (RK322x 2.51 and unknown) didn't provide positive result.


But I was able to get it installed on nand by performing these steps:

• Flashed stock android firmware (using RKBatchTool on windows)
• Downloaded the multitool image, used etcher to burn it to my sd card.
• Booted multitool and backed up my current android firmware
• Plugged my SD card again to my windows PC and mounted the SD Card partitions using Ext2 Volume Manager
• Placed the Armbian OS to the image folder in the fat partition of the SD Card
• Booted multitool again and installed Armbian to rknand0 using steP-nand
• Shut down the box after writing succeeded
• removed the SD Card
• replugged the box's power cable
• armbian now installed

 

I think, for us to be able to install and boot from nand, the android bootloader should be retained. 

 

I'm now happy with this box. :)
Thanks to this forum especially to @jock and @fabiobassa

Link to post
Share on other sites

@paulml

the problem of erratic mac was solved in mainline uboot
since on those "lovely" nands we use the legacy uboot we have the problem since the mac address usually is set in vendor partition or/and folder of android

Is planned to patch again the uboot ( yes, patch over patch) but try consider that have nand working was a big effort and ARTIFACT so may be following this other strategy can help :

1) log in via ssh into board at his actual ip ( it should have one via dhcp , whatever it is) and take note of actual mac (ifconfig will tell you )

2) on the cli digit nmtui  ( this is the cli interface to network-manager)

3) go to edit a connection , you must MOVE with TAB KEY ON KEYBOARD across the fields

4) you probabily will have more than one wired connection ( 1...2 and so on)
4) delete the interfaces that DOESN'T CORRESPOND AT actual mac
6) edit the one that has a correspondent mac to ifconfig, actual mac 
7) there is a fiels named ETHERNET and a " show"  by clicking on that tab you will have a new field: cloned mac address

well just digit in that field the same mac address you have in the upper field eth0 ( xx:xx:xx:xx:xx:xx)

then go to the end and click ok, then back then quit

this whole procedure can be also made in graphical environment if you have desktop by calling the edit connection on network-manager. in this way you will have a stable mac address over reboot

remember to DELETE eventual interface that doesn't correspond to ACTUAL mac 
With nmtui you can also join a wifi with appropriate interface ( wifi and NOT p2p )


@Mark Khevin Rogacion

yes you right , erasing with ef was an un-needed step but now no more mistakes: people with original android on nand must ONLY boot and call steP-nand tool  and everything will be ok



 

Link to post
Share on other sites
10 hours ago, paulml said:

Playing around with it now and I just noticed that my mac address changes with every reboot. This was actually the same as "respeaker" image before running in sd card.

That's an issue with the u-boot shipped along the Multitool, missing some patches. I updated the Multitool, so on next installations the MAC address will be stable.

 

In the meantime, to fix the current NAND installations you can download legacy-uboot.img and install it:

sudo dd if=legacy-uboot.img of=/dev/rknand0 bs=4M seek=1 conv=sync,fsync

 

Link to post
Share on other sites

@jock  I must say rk322x-config is ingeniously invented !!! :thumbup:

It turned out that it is very simple to change the configuration through it.

I made two dtb for my Iconbit put in /boot/dtb-4.4.194-rk322x and voila ;)

In device tree changed :

dwmmc@30020000 status "okay"

wireless-wlan   wifi_chip_type = "8723cs" (for XDS16)

leds 

led_red     linux,default-trigger = "heartbeat"

led_blue    linux,default-trigger = "mmc1"  ( for wifi activity indication)
 

Spoiler

rk322x-config.JPG.948fb857b8734fbd26645b23bca9dd62.JPG

 

rk3229-box-XDS8.dts rk3229-box-XDS8.dtb rk3229-box-XDS16.dts rk3229-box-XDS16.dtb

Link to post
Share on other sites

@Maker39

Very glad you find it useful!

Could you please tell me the output of this command:

cat "/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1/modalias"

Since you got a 8723cs I can make the script autodetect the wifi chip and automatically enable the right module.

Link to post
Share on other sites

Wifi rtl8703bs

root@rk322x-box:~# cat "/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1/modalias"
sdio:c07v024CdB703
ps Here's another, it may come in handy

rtl8189etv

sdio:c07v024Cd8179
ssv6051

sdio:c07v3030d3030

 

Link to post
Share on other sites

 I think me out of game :(

When trying to copy a 2GB file via WIFI, at first the speed dropped to 20Kb/s and the box with ssv6051 drop out connect.

No firmware now helps. Armbian starts but ssv6051 is no longer available.

root@rk322x-box:~# cat "/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1/modalias"
cat: '/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1/modalias': No such file or directory

I'll try later to flash the factory android, but it seems to me it will not help

Link to post
Share on other sites
Posted (edited)

Hey,

 

I got the same message:

 

root@rk322x-box:~# cat "/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1/modalias"
cat: '/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1/modalias': No such file or directory

Actually I tried to adapt the Device-tree with:

sudo rk322x-config 

and tried v884k box since I have a V88mini4k. The device hasn't boot again. So I reflashed to NAND again the legacy-kernel-Ubuntu-image.

 

Any ideas if it's the rk322x-box profile or the rk3229-scishion-modelx?

 

Can you provide some summary which profile is used for which chipset? - With my box the wifi didn't work at the first boot. There is a wifi-symbol in the corner, but it does not find any wifi-networks there.

 

UPDATE: I used now the rk322x-box (generic profile) and the desktop environment bootet again. Playing an H264-1080p file was lagging like the GPU-accellerating is not working. - So I guess either with the profile a problem or in general with the GPU-accelleration. In the first post it said GPU accelleration is working with leagacy-kernel 4.xx

 

So any ideas how I get wifi/bluetooth and GPU-accelleration working?

Edited by Alex83
Update since the post
Link to post
Share on other sites
59 minutes ago, Alex83 said:

I got the same message:

root@rk322x-box:~# cat "/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1/modalias" cat: '/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1/modalias': No such file or directory

 

I got this after WIFI chip fully dead (confirmed by loading factory Android).

IMHO this may indicate that the system does not see the sdio device.

What kind of WIFI module do you have on board ?

Link to post
Share on other sites

I have a ssv6051p chipset

 

This is exactly my device

 

So, now I tried the following profiles which don't bring up the device again:

 

rk3229-box-a95xr1
rk3229-box-v884k
rk3229-box-hk1mini

The only profile which worked out (but without wifi) is rk322x-box (Generic RK322x TV Box board) and now I am a bit bored of waitng after new NAND-flashing after each failure and I guess the NAND-flash doesn't like to get programmed so often before it finally breaks at some point. I also thought about to try Android 8.1 from the link in my post, but would love to get both working Android 8.1 and Armbian.

 

My device has 1GB RAM / 8GB ROM.

 

Maybe the "...mxq-..." profiles could work or the "...modelx", but I am slowly a bit scared about new flashings.

Link to post
Share on other sites

@Alex83

if NONE of profiles with name " rk3229" brings life to your board is simply because your boad probabily isn't a 3229 but a 3228a or 3228b
The rk322x-box (Generic RK322x TV Box board) because it is just generic

The mxq you have is a 3228 with ssv6051 so try any of the other combinantions but with 3228 in name and yes nands don't like to many rewrites but you cannot imagine ANDROID how much stress them ;)

p.s did you try the moltipurpose tool and steP-nand tool to help you identify the board ?

Link to post
Share on other sites

@Alex83

I try to explain what happened.

The wifi device is attached to the SDIO bus, which is disabled in the generic device tree that is loaded at first boot, that's why the command does not work. In the next release of the images I will fix this.

 

When you called rk322x-config, you choose boards which have no support for nand, so at next reboot it has been disabled and the system was not able to boot anymore. Objectively, at the current stage the user is unaware of this important information making the selection. I'm already addressing this issue providing more info to the rk322x-config script that prevents this kind of mistakes.

You could restore the system boot using the Multitool, getting a shell, mounting the armbian partition on rknand0 and then removing the fdtfile= line from /boot/armbianEnv.txt

Anyway you could try the mxq-pro-4k box which has NAND and SSV6051 support, you should have no more surprises.

 

Unfortunately, on legacy kernel, wifi requires some kernel module juggling (ie: blacklisting and whitelisting). I would really like to fix this at root, but I only have boards with ssv6051/ssv6256 chips and the worst offenders are the realtek modules, so heading into kernel modules which I can't test is a jump in the dark.

 

About hardware acceleration, all the kernel modules are there, just the software is not compiled to use it. Video players that come with debian/ubuntu are not aware about rockchip acceleration. At this stage you need to compile things by yourself unfortunately. I will take a look to the Mediascript for RK3288 that maybe can be used for a proof of concept, but I don't know how much can be used for RK322x

Link to post
Share on other sites

Hello, images have been updated in first page, coming with a more detailed rk322x-config script that will prevent future NAND/eMMC mistakes and provides some more info about the board.

Also mainline kernel has been pushed to 5.6 and now an Ubuntu Focal image is also proposed, albeit having a very slow desktop experience and requires the user to uninstall chrony package which is broken and prevents date and time synchronization from network.

Link to post
Share on other sites
Posted (edited)

I just want to share the UART pinouts for the board posted in the first page. ChipTrip MX4/Schishion V88.

 

This is the underside of the board, HDMI port pointing to yourself, to the right of the DDR RAM.

 

bfcmjg6.jpg

 

And this is the board. Looks the same as the green one posted in the first page.

 

ebDrRTR.jpg

 

 

I'm still having trouble though with booting to Multitool where the board will just hang up after booting to the GPL and doing nothing, the screen will go blank.

Edited by Zim_256
Link to post
Share on other sites

@Zim_256 very glad you shared the serial ports on this board! Chiptrip board designers always hide serials somewhere on these boards.

 

After showing the GPL the Multitool just unmounts the FAT partition and scans for the flash devices, which should be quite easy task and the screen should definitely not go blank.

Could you scroll the GPL with up and down keys?

Are you sure the SD Card is fine?

 

Since you got the serial, you could also see what happens in dmesg

 

edit: would you mind to share the commercial name of the tv box?

Link to post
Share on other sites
On 5/1/2020 at 8:41 PM, fabiobassa said:

@Alex83

if NONE of profiles with name " rk3229" brings life to your board is simply because your boad probabily isn't a 3229 but a 3228a or 3228b
The rk322x-box (Generic RK322x TV Box board) because it is just generic

The mxq you have is a 3228 with ssv6051 so try any of the other combinantions but with 3228 in name and yes nands don't like to many rewrites but you cannot imagine ANDROID how much stress them ;)

p.s did you try the moltipurpose tool and steP-nand tool to help you identify the board ?

 

@fabiobassa: Indeed it is an RK3229 device with 1GB/8GB and NAND-Storage with SSV6051 wireless chipset.

 

Unfortunately since the last apt update && apt upgrade there is a new problem:

 

root@rk322x-v88-mini ~ > sudo apt autoremove
Paketlisten werden gelesen... Fertig
Abh�ngigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
2 nicht vollst�ndig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zus�tzlich benutzt.
console-data (2:1.12-8) wird eingerichtet ...
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121, <STDIN> line 18.
Looking for keymap to install:
console-data/keymap/full doesn't exist
Benutzung: install-keymap [ Keymap_Datei | NONE | KERNEL ]
dpkg: Fehler beim Bearbeiten des Paketes console-data (--configure):
 �installiertes console-data-Skript des Paketes post-installation�-Unterprozess gab den Fehlerwert 1 zur�ck
dpkg: Abh�ngigkeitsprobleme verhindern Konfiguration von console-common:
 console-common h�ngt ab von console-data; aber:
  Paket console-data ist noch nicht konfiguriert.

dpkg: Fehler beim Bearbeiten des Paketes console-common (--configure):
 Abh�ngigkeitsprobleme - verbleibt unkonfiguriert
Fehler traten auf beim Bearbeiten von:
 console-data
 console-common

 

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

I just want to share the UART pinouts for the board posted in the first page. ChipTrip MX4/Schishion V88.

 

This is the underside of the board, HDMI port pointing to yourself, to the right of the DDR RAM.

 

bfcmjg6.jpg

 

And this is the board. Looks the same as the green one posted in the first page.

 

ebDrRTR.jpg

 

 

I'm still having trouble though with booting to Multitool where the board will just hang up after booting to the GPL and doing nothing, the screen will go blank.

Did you use the remote control in multitool oder used an extenal USB-Keyboard? It just works to select with external keyboard. So do you see the GPL or does the screen go black?

Link to post
Share on other sites
  • jock changed the title to CSC Armbian for RK322X TV Boxes
  • Igor pinned this topic