Jump to content

CSC Armbian for RK322x TV box boards


jock

Recommended Posts

22 hours ago, javaxsousa said:

I have an Mxqpro 5g and, i've already tried several different images including multitool and cards and it always loads on the android boot screen, it ignores the card's boot, my processor is the rk3228 and the memory  is of the EMCP type (TYD0GH221644RC) 8G/1gRAM, I could load the rk322x_loader_v1.10.256.bin image as described in page via usb cable without sd card

The armbian standard image is not supposed to boot from sdcard if stock android is installed.

Multittool instead is supposed to always boot from sdcard, so it is strange.

Anyway, if you can enter maskrom mode and load the loader image, then you could make a backup and erase the emmc to test an armbian image via sdcard. Instructions are on first page in "for expert" paragraph.

Link to comment
Share on other sites

I try these commands but without success

lsusb

Bus 001 Device 016: ID 2207:320b Fuzhou Rockchip Electronics Company RK3228/RK3229 in Mask ROM mode

 

rkdeveloptool  rfi
Read Flash Info failed!

 

rkdeveloptool  rci
Read Chip Info failed!

 

/upgrade_tool

List of rockusb connected
DevNo=1 Vid=0x2207,Pid=0x320b,LocationID=161    Mode=Maskrom
Found 1 rockusb,Select input DevNo,Rescan press <R>,Quit press <Q>:

 

/upgrade_tool ul rk322x_loader_v1.10.256.bin
Program Data in /home/administrador/Downloads/rk3228/rkbin/tools
Loading loader...
Support Type:RK322A    Loader ver:2.56    Loader Time:2021-03-13 16:06:57
Download Boot Fail

 

 

Link to comment
Share on other sites

well after trying a lot, I managed to record an image of armbian on the tvbox sd, but I accidentally recorded a different bootloader  as rk3288, and now I can't, even pressing the button that is on the av output as I did before entering maskmode mode. could it be that did I brick the box?

Link to comment
Share on other sites

@javaxsousa I see you put a lot of effort to try and brick your board, and apparently you finally did:

  • upgrade_tool ul: very bad idea, it is clearly specified that it is only for NAND boards, you have eMCP and you HAVE NOT to do that
  • uploading rk3288 bootloader? Very bad idea, this probably bricked your box

 

If you don't have a serial to TTY usb adapter, no logs hence we don't know what is your current board state.

If your board does not enter anymore maskrom mode on boot and you don't know which one is the eMMC clock pad to short it to ground, then I'm afraid you're stuck.

 

 

Link to comment
Share on other sites

@javaxsousa thanks for spotting the eMMC clock on your board.

Of course, once you boot the board, then you need to unshort the clock pin otherwise the eMMC will be gated.

 

it is important that you run rkdeveloptool db <loader.bin> (not upgrade_tool and not the ul command) first to be able to run rkdeveloptool ef after.

 

Still logging via serial UART is very useful.

 

Your board also is a R29 which is known to have issues with HDMI that have not been sorted out (ie: HDMI, for some reason does not work).

 

If you see a blinking led when you run the multitool from sdcard, then the multitool is running fine but you don't see anything because HDMI just does not work. You may access it via SSH though.

Link to comment
Share on other sites

well, I understood your tip, but I think I brick the EMCP (as in my model the ram is together with the flash), I tried in several ways to access the emcp, but so far without success!!, that can help me, to find out where is the serial I'm grateful, because so far I haven't found out, to see what's really happening.

 

I have another almost identical tvbox, just change the EMCP model, but the orange or yellow led is blinking when booting with multitool, and I don't access via ssh because the network card is not activated

Link to comment
Share on other sites

3 minutes ago, javaxsousa said:

I have another almost identical tvbox, just change the EMCP model, but the orange or yellow led is blinking when booting with multitool, and I don't access via ssh because the network card is not activated

 

You need the latest multitool which has been updated a month or so. If your release is older, there is no ssh support.

Link to comment
Share on other sites

17 hours ago, MattWestB said:

@javaxsousa look on the under side of the PCB and if its 2 pads near the CPU. (i uoload this Photos of my tv box)

My version was having it and it was the RX and TX for the system console.

 

Is the LED blinking then booting multitool ?

 

(yes, the yellow blink, but, i modfify file from (rk3228xxx.dtb), the red and yellow is up (not blinking)

 

If not you are still in brick mode. 

 

tvboxoutside.png

tvboxoutside0.png

fronttvbox.png

Link to comment
Share on other sites

4 minutes ago, fabiobassa said:

@javaxsousa

please excuse me but i don't understand.. where

"
I meant to replace rk322x.dtb with rk3228a-box.dtb in settings"

in multitool ?

yes in multitool, on TARGET file

 

my configuration of extlinux.conf

  LINUX /kernel.img
  FDT /rk3228a-box.dtb
  APPEND boot=PARTUUID=00628e24-01 root=PARTUUID=00628e24-02 rootwait console=ttyS2,115200 verbose=1 consoleblank=0


in image?

where ?????????????????????????????????????????

 

Link to comment
Share on other sites

@javaxsousa

multitool is made for being the MOST COMPATIBLE WITH ALL boxes around.
is a minimal set of things JUST TO LET THINGS WORK and is not guaranteed that it works always because newer and newer boxes are coming around, but it should work in most cases, at least until now

Multitool must be left as it is !!!!!!!! don't change nothing and nowhere is said to change dtb in multitool

What you should do is connect a 2 dollars usb-ttl converter and report here the most complete log of booting

without we are blind !!!

Link to comment
Share on other sites

3 minutes ago, fabiobassa said:

@javaxsousa

multitool is made for being the MOST COMPATIBLE WITH ALL boxes around.
is a minimal set of things JUST TO LET THINGS WORK and is not guaranteed that it works always because newer and newer boxes are coming around, but it should work in most cases, at least until now

Multitool must be left as it is !!!!!!!! don't change nothing and nowhere is said to change dtb in multitool

What you should do is connect a 2 dollars usb-ttl converter and report here the most complete log of booting

without we are blind !!!

I know what you said, but as I posted above, the photo of my tvbox boards, I couldn't find the pins to connect a serial converter, if I knew where it was I would have already done that

Link to comment
Share on other sites

i have a TV BOX Tanix TX2.
I already use LibreELEC 9.2 for TX2, i configured asound.conf and MPD for playing music trought my DAC with the optical cable.

But i would like to try to install Armbian_21.05.1_Rk322x-box_buster_current_5.10.34_minimal.
i would like to boot from SD, i wouldn't modify my flash or bootloader.
I tried to burn this image Armbian_21.05.1_Rk322x-box_buster_current_5.10.34_minimal to SD card, but it doesn't start. do you think i need to use Multitool?

Link to comment
Share on other sites

Hi all,

I just switched back from LE to armbian for my box. There is one question regarding /dev/zram1, it is almost full so that I can do nothing even apt update. I know there is option to disable zram log which will write log files to /var/log directory within the NAND storage. Is it safe for NAND lifetime if log files are written to NAND instead of zram?

Link to comment
Share on other sites

Hello, I own a lot of those MXqpro/4K boxes: I am thinking of re-purposing them to become a "one-channel" DVR viewers (from network streams made with FFMPEG).

The project Multitool/Armbian is working exactly as it should on these boxes, but I have some troubles because Armbian is simply...too big for what I need, and I find it difficult to deal with, thanks to systemd.

There is a way to make a stripped-down version of armbian (or maybe just a kernel & minimal binaries/libs) that has FFMPEG/MPV with hardware decoding enabled and a  dumb/programmable startup script like the ancient AUTOEXEC.BAT in DOS ? 

Maybe starting with "multitool" (that boots a minimal rockchip 4.4 kernel) ?

Something like LIbreElec, but without kodi and with FFMPEG/MPV instead. Maybe even statically linked (ffmpeg is already there, MPV & rockchip libs are not).

LibreELEC is maybe the right thing, but it's "overlay" structure is somewhat obscure to deal with, and I don't want to boot from an SD card.

I have a lot of experience in assembling x86_64 stuff for other minimal linux projects (Alpine Linux in particular), but those Debian Linuxes with systemd and all the nonsensical junk put me down, they are an endless loop of dependency nightmares when you try to modify the smallest of things.

Maybe someone can point me in the right direction ?
 

Link to comment
Share on other sites

@Vittorio Mori

Ciao Vittorio, buongiorno e benvenuto
I will answer in a straight manner don't consider it rude 😄 but just the answer of someone that loosed sleep trying to achieve the same as you.

 

Quote

There is a way to make a stripped-down version of armbian


Yes ! You have to go trought the whole compile method and then build your buildroot stripping down what is un-needed.
Now the problem is that used to exist a rockchip buildroot method described on github and i don t find anymore it

 

Quote

that has FFMPEG/MPV with hardware decoding enabled


NO !! Unfortunately you still have to go trought the compilation method enabling compile fmpeg with some tweaking as described

here 

with this 3 " magic" flags 
 

 --enable-rkmpp \
  --enable-version3 \
  --enable-libdrm \



or even on this same post at the beginning where @jock says as to enable to HW acceleration with some script
 

Quote

to become a "one-channel" DVR viewers

 

I did it but was a PITA !!!
hope you get your goal


 

Link to comment
Share on other sites

9 hours ago, Vittorio Mori said:


I have a lot of experience in assembling x86_64 stuff for other minimal linux projects (Alpine Linux in particular), but those Debian Linuxes with systemd and all the nonsensical junk put me down, they are an endless loop of dependency nightmares when you try to modify the smallest of things.

Maybe someone can point me in the right direction ?

Sorry if I am straight as well as @fabiobassa, but the only "nonsensical junk" here is part of your post.

I don't want to endorse systemd in any way, but from what you say it is clear that you don't know what systemd is supposed to do.

The "core" systemd functionality is the same as System V Init and later Upstart Init System and stop, nothing more.

There are several good things that come with systemd, let me tell you a couple of them:

  • it solves the "dependency nightmares" in a quite elegant and automatic way: you specify what your service needs and systemd will compute the order in which services should be run
  • it will boot the services in parallel, to speed up the boot

Both of these things were not addressed by older init systems.

And here I mark stop talking about systemd; the internet is full of resources if you want to know what you talk about.

 

About Armbian, there is an already built Debian Bullseye Minimal image for rk322x that provides a full operating system with just the minimal libraries and executables needed to let the hardware work and just a little bit more to have a working server-oriented instance.

Armbian scripts can be customized (and so are the package lists) and built by yourself, but I guess you didn't study any of the documentation pages and PDF provided before come ranting here.

 

Link to comment
Share on other sites

On 4/15/2022 at 12:04 PM, fabiobassa said:

@Vittorio Moriuongiorno e benvenuto
Grazie, buongiorno a te.

I will answer in a straight manner don't consider it rude 😄 but just the answer of someone that loosed sleep trying to achieve the same as you.

 

No problem, I appreciate it.

 

I did it but was a PITA !!!
hope you get your goal


It was a PITA indeed, but I hacked away a solution that fits my bill, it's far from perfection, and I had to deal with some systemd nonsense, but hey, I paid 11€ each for those boxes, I am happy with the results.

Technically speaking, I have a PC that works as a video-encoder, an Alpine Linux box that uses Intel Quicksync to encode 4 el-cheapo USB HDMI video grabbers. FFMPEG encodes them in an "srt" url (haivision protocol, the best streming portocol ever invented).

The rockchip boxes are programmed as clients: the ffmpeg version that's included in the "install_media" script is ancient/obsolete and does not understand srt urls, so I got the armhf statically-linked version from https://johnvansickle.com/ffmpeg/, will be enough, since I'm using just the network part, not the encoding.

Then I grab the mpeg-ts stream from the network and pipe it into mpv, something like:

ffmpeg -hide_banner -loglevel panic   -re -i srt://192.168.111.40:64000 -map 0:v -map 0:a -c:v copy -c:a copy -r 60 -f mpegts - | mpv --hwdec=rkmpp -vo=gpu --gpu-api=opengl --gpu-context=drm --opengl-es=yes --audio-device=alsa/hdmi:CARD=DWI2SHDMI,DEV=0  --volume-max=400 --volume=400 --really-quiet=yes  -

I've put this line into a script that is run from systemd at boot, disabled X, and the things basically work as expected.

Things I've noticed:

- pulseaudio has a very high cpu usage, it's another highly inefficient and bloated crapware - another masterpiece by Poettering, systemd author. I just avoid it and call alsa device directly.

- Audio is very low, but mpv can raise it to an acceptable level with the "volume" parameters. Analog stereo works too: you can select the device from the mpv list:

mpv --audio-device=help

- sometimes the GPU HW decoder fails to start the first time mpv starts, but works the second time it's launched. Another quirk from quirky/dirt cheap devices.

- Wifi works, but it's also quite heavy in CPU usage, and has an extremely limited range, so I just use the ethernet cable.

And that's it for now. In the future I am thinking of modifying your "multitool" image for doing those operations in a more "barebone" environment: the multistrap approach seems the way to go from what I have in mind. Packages & kernel are there, and should be not too painful to include them in the build script.

18 hours ago, jock said:

Armbian scripts can be customized (and so are the package lists) and built by yourself, but I guess you didn't study any of the documentation pages and PDF provided before come ranting here.


Ti consiglio un po' di pasta Fissan per la fichetta infiammata che ti ritrovi. Sono 30 anni che faccio il sistemista, ho studiato tutto di tutto, e voi fichette dell'opensource siete tutte uguali: alla MINIMA VENTILATA critica sparate a zero "inniorantiiii studiatteeee". Capisco che magari proprio non c'avete una vita e che i vostri progettini sono tutto per voi, ma datevi una cazzo di calmata. Ho solo detto che systemd mi fa schifo (e farebbe schifo a chiunque capisca un minimo di Unix, con sti blocchetti  a-la SYSTEM.INI di windows95) e ti sei inalberato manco fossi Torvalds. Vai tranquillo che mi compilo tutto quello che mi devo compilare, "boss".
 






 

 

Link to comment
Share on other sites

1 hour ago, Vittorio Mori said:

Ti consiglio un po' di pasta Fissan per la fichetta infiammata che ti ritrovi. Sono 30 anni che faccio il sistemista, ho studiato tutto di tutto, e voi fichette dell'opensource siete tutte uguali: alla MINIMA VENTILATA critica sparate a zero "inniorantiiii studiatteeee". Capisco che magari proprio non c'avete una vita e che i vostri progettini sono tutto per voi, ma datevi una cazzo di calmata. Ho solo detto che systemd mi fa schifo (e farebbe schifo a chiunque capisca un minimo di Unix, con sti blocchetti  a-la SYSTEM.INI di windows95) e ti sei inalberato manco fossi Torvalds. Vai tranquillo che mi compilo tutto quello che mi devo compilare, "boss".

First, this is an english forum. The urge you need to insult me in italian makes me think I hit some hot spot.

Second, it is quite funny you become angry because I stated about a couple of advantages of systemd 😅 And I really don't give a shit about systemd; me neither liked it at first.

 

Maybe you got so angry just because you really are an ignorant (did you really read the documentation? AUTOEXEC.BAT... really? Have you ever heard about rc.local?) but believe you're the master of everything, you can go back to the manhole you came from.

Link to comment
Share on other sites

Hi all!

How are you? I am here again because we continue with our project to give schools an option with tv boxes as and cheap computer.

 

@fabiobassaand @jock

 

Last year I bricked a tv box because it has a emcp chip and I did not read carefully your instructions.

 

Now I am here again with another box that I bought to validade the project but I think it came with an emcp module again.

I was not able to find a datasheet to confirm that. Perhaps you could help me.

Follow bellow the image.

And I am trying to boot this box with an SD with multitool and that does not boot. It stays on black screen. (I have tested the sd on another box and it works fine and this box is booting android fine too.)

 

Tks a lot!

 

IMG_20220415_093138039.thumb.jpg.bbe089add9d2ea6d4638b4de74a71ade.jpg

 

 

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