Jump to content

CSC Armbian for RK322x TV box boards


jock

Recommended Posts

20 minutes ago, Luís Hansen said:

 

Yup, totally agreed.

The thing is that I'm returning my non-reliable version and trying to get a realizable version.

What board versions should I look after if I'm looking for reliability?

Or would you say my best option would be to actually use a wifi range extender and plug in an Ethernet cable?

 

I use Ubiquiti on my house, I really tried the best stability on wireless - don't get me wrong, wireless protocol is something incredible, but if you look for something reliable, ethernet cable is your best friend. Even stock box, sometimes lose packges, and for streaming this is a pain in the **s... As a TI professional, I recoment you never use wiifi range extender also.

Link to comment
Share on other sites

3 hours ago, Luís Hansen said:

 

Yup, totally agreed.

The thing is that I'm returning my non-reliable version and trying to get a realizable version.

What board versions should I look after if I'm looking for reliability?

Or would you say my best option would be to actually use a wifi range extender and plug in an Ethernet cable?

Reliability about what? You still didn't mention what you want to do with such hardware.

 

Tv boxes are not reliable almost by definition, especially if you look into the basket of the cheapest ones.

They are made with cheapest components available on the market, sometimes with scrap components that did not pass the conformance tests for "proper" products, sometimes with fake components too.

If you need something reliable, it is much better to go and find a serious SBC officially supported by armbian; tv boxes can't be officially supported by armbian by statement because, as you can see, it is a hardware mess and sometimes poor board designs.

 

What we do here is having fun reverse engineering things, but serious projects require serious hardware.

 

About the last question, wireless is totally out of question if you need any kind of network stability

 

 

Link to comment
Share on other sites

1 hour ago, jock said:

Reliability about what? You still didn't mention what you want to do with such hardware.

 

Tv boxes are not reliable almost by definition, especially if you look into the basket of the cheapest ones.

They are made with cheapest components available on the market, sometimes with scrap components that did not pass the conformance tests for "proper" products, sometimes with fake components too.

If you need something reliable, it is much better to go and find a serious SBC officially supported by armbian; tv boxes can't be officially supported by armbian by statement because, as you can see, it is a hardware mess and sometimes poor board designs.

 

What we do here is having fun reverse engineering things, but serious projects require serious hardware.

 

About the last question, wireless is totally out of question if you need any kind of network stability

 

 


I think I know why he is trying to use tv boxes, not exacly why I mean, but I have a idea, and its the price. You see, here in BRZ, tv boxes are very cheap, you can find one in the local scrappy sometimes, or even people selling for less then 10-20 USD a used one, almost same price as a brand new ESP32... A Pi Zero I think costs almost 40 USD...

But you are right, this tv boxes all are used components, all fab data on then is from 13 or 12, 10 year old chips, all with solder flux still under them. It's not reliable, specially with wireless. That's why I told him to use ethernet. I have the first one running here for almost 1 month running home-assistant, that is pretty nice. The only brick wall I hit is this limit on 1GB ram, I swaped very DDR3 chips, even with 4 bit ones, and also buyed another box that came with single 2Gig module, called LPDDR2, even discovered that its used on many many phones, I had a Asus Zenphone 2 board laying around and took a look, and find on LPDDR2 Hynix Haha

Unfortunately I still stuck with 1GB xD I think that must be related with you said - hardcoded on the bootloader without source code... 

Edited by Felipe Triana
more info
Link to comment
Share on other sites

1 hour ago, Voidbert said:

Greetings, @jock!

According to the page for these TV boxes, a maintainer is needed. I went on the IRC chat offering my help and I was told you are already maintaining these boards. Is there any way I can help in this project?

Hello, hmm that's an error in that page: tv boxes cannot be maintained as official armbian boards, so there could not be official user support, help and debugging.

Instead they are supported by community, so this forum is the place where support and development happens.

 

Feel free to join and propose patches, ideas and advancements.

Link to comment
Share on other sites

I have a question: is possible to enable network-boot for those boxes ? Do they boot in EFI mode ? How do they get proper ethernet drivers ?

I read from main page:

"

Boot device order:
 

With Armbian also comes mainline U-boot.

If you install Armbian or just the bootloader in the eMMC or the Jump Start on internal NAND, the bootloader will look for valid bootable images in this order:


External SD Card

External USB Stick in OTG Port

Internal eMMC
"

Should I re-compile U-boot ? Any pointers ?

 

Link to comment
Share on other sites

@Vittorio Mori

Good afternoon Vittorio
Somewhere in this same 3ad I already posted the boot seguence of those boxes. Posts are so many that maybe you didn't find it.
It doesn't exist a mbr or uefi , instead buried in the soc itself there is a tiny bootstrap that involves ddr ram and few others things. This is called loader mode
If for any reason not even the initializer is present in the emmc or nand, well we have a mode that is called maskrom mode. Since this is buried into the soc, those box are UNBRICKABLE since at least " something.." is still able to boot.


 

Quote

The bootstrapping code (the MASKROM loader) lives in the SoC ROM.

If no bootable medium is found or none contains a valid bootloader, the bootstrapping code initializes the USB in device mode (OTG). In this mode, it is possible to download firmware (second stage bootloader) to the SoC via USB OTG. The actual transfer uses a special RockChip MASKROM bootloader protocol.

 



Once the loader is started then the control is passed to u-boot itself

Here you can have an idea of the flowchart

http://opensource.rock-chips.com/wiki_Boot_option


 

Edited by fabiobassa
Link to comment
Share on other sites

If anyone needs it, as a convenience, I leave here a google drive link for an Armbian "bullseye-minimal" image for the 322x box with FreePbx16 & Asterisk18 compiled in.

Took a whole afternoon of compiling code to make it work.

It's a .gz image you can restore via MultiTool.

root password: freepbx
Freepbx login: admin/freepbx

Hardware .dtb is left vanilla to boot on any platform -  use rk322x-config to configure proper cpu/ddr/storage/led speed.

Gets IP from DHCP, you can of course use armbian-configure to use wifi or whatever.

ODBC connector compiled and included for mysql, codec g729 compiled and included.

It's working quite well with softphones ad Yealink VOIP DECT phones, on a couple of pjsip trunks. I expect it to work well with at least 8/10 extensions, maybe more.

Interface is quite heavy for my taste (node.js ....) but it seems it's  the "new normal" we have to adapt to.

It's 2 gigs in size.

https://drive.google.com/file/d/1PYuakmA-9JNVmJ3VOYE7GFQBo6dqN-8t/view?usp=sharing

all credits to @jock for creating the original Debian Bullseye image.

Link to comment
Share on other sites

Hello Vittorio

thank you so much for this effort.
Effectively nas, pbx,adblockers ,vpn' s are the best ever applications for those boxes
I run several pbxes on rk322x , but ALWAYS have found freepbx , even on x86 or 64 very heavy, caotic, too way customized . I run mostly pure asterisk 13  ( or 16 it depends which is shipped with debian itself) with the old, ugly digium GUI interface.
The interface is lightweight since uses static contents and js files and when I need something more customized, I do it in extensions.conf by hand

Maybe we can discuss in private for some improvements ( I think to billing solutions) so we can leave free the 3ad for more hardware/kernel related problems

Link to comment
Share on other sites

Hi everyone,

i've try the steps, but when try to boot with multitool, the blue led blink and i suspect that the device reboot continuolsy , i've seen for some ms, the interface on screen and after black screen.

there are many other option?

Usb-to-usb don't work, i don't see the device on usb list.

Link to comment
Share on other sites

hello! H96 box finally arrived so i might hit the other thread soon. scishion box is working flawlessly at the moment running armbian, klipper/mainsail for my 3d printer, and it also serves as my mqtt server/bridge, resource usage is about 2-10% while printing. i agree, if going for production deployment go with serious and supported sbc. i keep the tv box as non critical part of my home network apart from the time i used it as my main router, http cache and squidguard it did work for about half a year and only broke down when it got wet. it does work thanks to @jock and @fabiobassa.Unfortunately the production of this box is quite unpredictable since the hardware is not fix, they just put whatever is the cheapest available parts at the time of production. anyways, a good rule of thumb when dealing with these boxes is the first post, it gets updated as more and more people submit findings, its the power of the community. like i said back then, if it works it only consumes 10 watts and it can do a ton of crazy stuff.

 

edit: typo stuff

Edited by Seth
Link to comment
Share on other sites

22 hours ago, Vittorio Mori said:

I have a question: is possible to enable network-boot for those boxes ? Do they boot in EFI mode ? How do they get proper ethernet drivers ?

Network boot should be already enabled, but with the current setup it engages only when no other boot options lead to a successful boot; ie. when sdcard, internal flash and external USB don't provide a valid booting partition.

I really never tried it, but should be brought on via regular PXE/DHCP, I guess a TFTP server is needed.

You may try to force u-boot into network boot removing any partition from its sight; a serial adapter though is essential to debug.

Link to comment
Share on other sites

1 hour ago, Backdoor said:

Hi everyone,

i've try the steps, but when try to boot with multitool, the blue led blink and i suspect that the device reboot continuolsy , i've seen for some ms, the interface on screen and after black screen.

there are many other option?

Usb-to-usb don't work, i don't see the device on usb list.

The blue led blinking is totally right: it means the kernel is alive and not freezed.

multitool is also accessible via ssh via link-local fixed IP address and via DHCP obtained IP address.

 

Of course if it is bootlooping you won't be able to do anything.

Link to comment
Share on other sites

Greetings, @jock! It's the guy that would like to help out with these community maintained TV boxes. Sorry for the delay, but I'm only allowed 1 post and 0 messages a day on this forum. Is there any other way to reach you (I was told you don't use IRC frequently) or to increase my limit?

 

In terms of suggestions, I have some to present. I could even help out in the process:

  • Getting the broken multitool link working again (https://users.armbian.com/jock/rk322x/multitool.img.xz -> https://users.armbian.com/jock/rk322x/multitool/multitool.img.xz) on the information page (https://www.armbian.com/rk322x-tv-box/). I know the file is in the post that started this forum thread, but that might be best for new users.
  • Debian bullseye builds. Debian is great for mini servers, and if someone is installing it now, they'd probably like to get the newest version for longer support (LTS support for older versions ends sooner, requiring moving to a new one if you want to secure your system). Also, some prefer the Debian package release cycle to the Ubuntu one. I can help out the builds (my CPU for sure won't be happy, but I'd be pleased to help out)!
  • Considering wayland as a suggestion for those who wish for graphical acceleration. It is still slow, but I have experienced better performance with the lima driver on the 5.15 kernel than on X11.

Also, congratulations on the project! Things like wifi work flawlessly out of the box, something I can't say for all laptops when I install Linux.

Link to comment
Share on other sites

Hello @Voidbert welcome in this crazy adventure on tvboxes.
You will gain the right to publish every time you want once you get some " reputation" on the forum. It is automatic and gained with more posts and interaction

The ideal would be that in the " market" of the country where you live could have sure access to newest boards with ecmp and other hardware different from the ones we actually own.
We have gret great experience on the hardware of shishion ( named piano v88 ) , sardine ( yep this is commercial name ) , chiptrip ( mx4 vr / vn / r ) , rk329q but up to revision 3.0
Thought we lack hardware such as newest ecmp and newest r329q that seem to have different behaviour on booting and/or flashing into internal memory

Welcome aboard


 

Link to comment
Share on other sites

@fabiobassaThe board I own is a Dolamee D5 and it has some interesting properties, but nothing out of the ordinary that the current software can't handle (for example, a 1.2GHz CPU because it's a fanless box). Other than that, what I know doesn't work is the TV remote and maybe (?) HDMI audio (I didn't test it thoroughly, it just wasn't working out of the box with sway). I could try and figure those out. I'm guessing the remote may need a driver and I've never written one before. My most advanced "kernel-esque" skill is writing to a linear frame buffer, so I hope it's not too hard.

image.thumb.png.7f2728822f512cad0afe9799665a6b67.png

 

On the topic of buying new hardware, I'm sorry but that's not a commitment I'm willing to make right now. Initially, I though this project was unmaintained (according to the webpage) and wanted to help out the best I could (providing builds, helping out in the forum, etc., basically, terminal support for these boards until something deep in the kernel eventually breaks and I don't know how to fix it). It turns out there are actually amazing people keeping this project alive, so my ways of helping are fewer, but, still like initially, I am still not invested enough (at least for now) to buy new hardware. Also, my developer experience is mostly higher level, so, even if I got new hardware, I would likely be unable to do much other than testing other people's work.

Link to comment
Share on other sites

3 hours ago, Voidbert said:

I think this rk322x-tv-box page on the website is what should be removed.  I'm not actually sure why that page exists.  There generally aren't pages on the main website for specific tv boxs.  There must be some historic reason this one exists that I don't know about.  @jock would you be opposed to getting rid of that page, leaving the forums as the sole source of information?

Link to comment
Share on other sites

48 minutes ago, SteeMan said:

I think this rk322x-tv-box page on the website is what should be removed.  I'm not actually sure why that page exists.  There generally aren't pages on the main website for specific tv boxs.  There must be some historic reason this one exists that I don't know about.  @jock would you be opposed to getting rid of that page, leaving the forums as the sole source of information?

Actually I have no opposition on removing the page.

Image links have already been removed, so there is no real reason to keep the page still there.

There still are the installation instructions, but it is much better to keep them in one place and this thread is better.

I can't do it by myself because I've been locked out by two-factor authentication plugin on wordpress website just now 😛

 

edit: maybe the page has not been removed for SEO reasons... we should ask @Werner if it is possible to put a 301 Redirect that send the user to the main armbian page or to this forum thread...

Link to comment
Share on other sites

@Voidbert At the moment, as @fabiobassasaid, there is some interest in expanding compatibility with eMCP boards and also investigating the R29 boards blank HDMI issue.

If you open your box maybe you could take a look to which board you have.

About the remote, there is no need for a kernel driver, just use the common ir-keytable utilities or lirc...

 

Link to comment
Share on other sites

8 hours ago, jock said:

Actually I have no opposition on removing the page.

Image links have already been removed, so there is no real reason to keep the page still there.

There still are the installation instructions, but it is much better to keep them in one place and this thread is better.

I can't do it by myself because I've been locked out by two-factor authentication plugin on wordpress website just now 😛

 

edit: maybe the page has not been removed for SEO reasons... we should ask @Werner if it is possible to put a 301 Redirect that send the user to the main armbian page or to this forum thread...

@Igor

Link to comment
Share on other sites

Changed redirrect from https://www.armbian.com/rk322x-tv-box/ -> to this thread.

what about? https://www.armbian.com/xt-q8l-v10/ 

 

14 hours ago, Voidbert said:

Debian bullseye builds. Debian is great for mini servers, and if someone is installing it now, they'd probably like to get the newest version for longer support (LTS support for older versions ends sooner, requiring moving to a new one if you want to secure your system). Also, some prefer the Debian package release cycle to the Ubuntu one. I can help out the builds (my CPU for sure won't be happy, but I'd be pleased to help out)!

 

Support for this hardware comes from Armbian so this Debian / Ubuntu analogy has little point here as in high level software packages LTS and relatinship aren't that important - if you can't boot the board or if its unstable, when some feature doesn't work - this is what we try to fix here. But I do agree there are reasons for both, Debian and Ubuntu package relations. This diff is important to some people, so Armbian tends to support them both since the day one. I would anyway enabled full package for all hw, but resources we have are already way to small to play this big.

Link to comment
Share on other sites

I spent this morning trying out things in my Dolamee D5 and these are my conclusions:

  • HDMI audio and AV audio are working! This box also supports SP/DIF audio (which is detected and appears as an output device in ALSA) but I have no devices to test that on. On the note of audio, you can't control the volume of any of the internal devices (HDMI, spdif and analog) using alsamixer. Because this is a TV box, could it have been designed so that the volume is changed on the TV? On the other hand, the included remote has volume buttons (that worked under Android).
  • The remote is working with ir-keytable (no changes needed)! I mentioned that it wasn't working on a previous post because my first attempt was unsuccessful (a few months ago) when I installed an older image (legacy kernel) and limited myself to running the auto configuration tool (didn't run ir-keytable manually).
  • I couldn't open the TV box up (this box uses plastic tabs that I couldn't remove). I didn't want to drill through some (maybe safe?) places (likely plastic holders for the board) fearing damaging the board. Though, it is likely an eMMC system, as it boots flawlessly on the newer kernels. @fabiobassa said
    Quote

    we lack hardware such as newest ecmp and newest r329q

and I don't know if this matters, but this box is from 2016 (at least the 1GB RAM model; mine is a 2GB model and was bought 2017, though I don't know when it was released). Is there the possibility of it being an eMCP model, when the product listing (https://web.archive.org/web/20160924063015/http://www.dolamee.com/dolamee-d5-comes-with-rockchip-rk3229-cpu-and-android-5-1-os/) lists eMMC?

 

Also, @Igor, what do you mean by "the resources we have" in this sentence?

Quote

I would anyway enabled full package for all hw, but resources we have are already way to small to play this big

Are you talking about human resources for testing and development or actual hardware for building all the images? I can help with either.

Link to comment
Share on other sites

2 hours ago, Voidbert said:

Are you talking about human resources for testing and development

 

Human resources primarily for project management, business development and similar non technical tasks which would improve conditions for development ... 

 

2 hours ago, Voidbert said:

or actual hardware for building all the images?


We have several hundred dedicated CPU cores and around 1 TB memory for CI. We also have several dedicated storage machines / mirrors. If if double all numbers, I could say we are good, otherwise its survivable not even critical. If we keep project support expansion under control, images count low. 

 

2 hours ago, Voidbert said:

I can help with either.

 

This is some general list of roles that are needed:

https://forum.armbian.com/staffapplications/

 

I assume you are familiar with this FAQ? For expanding  / changing TV boxes section we currently only have means / task for small forum rearrangements. Planning and leading changes is time consuming ... If you got an idea, join here https://docs.armbian.com/Community_IRC/ 

Link to comment
Share on other sites

On 7/10/2022 at 3:13 PM, jock said:

Network boot should be already enabled, but with the current setup it engages only when no other boot options lead to a successful boot; ie. when sdcard, internal flash and external USB don't provide a valid booting partition.

I really never tried it, but should be brought on via regular PXE/DHCP, I guess a TFTP server is needed.

You may try to force u-boot into network boot removing any partition from its sight; a serial adapter though is essential to debug.


Thanks for your suggestion.

Much to my amazement network boot works pretty well: I managed to boot Alpine Linux via a modified init script that gets its rootfs from an AoE target.

I did all the debugging via tcpdump fron another system, avoiding using a serial console, and zapped the mmbclk2 partition via the usual fdisk utility.

U-boot properly started making a BOOTP/PXE/DHCP broadcast request.

I post here my findings: first the dnsmasq.conf file (tftp+dhcp all in one) - Mac address redacted, insert the one from the box you want to boot


--- dnsmasq.conf


interface=br0
bogus-priv
filterwin2k
no-resolv
localise-queries
no-negcache
no-hosts
dhcp-authoritative
listen-address=192.168.111.128
dhcp-option=3,192.168.111.1
dhcp-option=6,192.168.111.1
server=192.168.111.1
dhcp-range=interface=br0,192.168.111.35,192.168.111.40,infinite
enable-tftp
tftp-root=/var/tftp

dhcp-host=ee:58:f3:XX:XX:XX,set:d01,192.168.111.35,cazzillo,infinite
cname=set:d01,cazzillo

--- end of dnsmasq.conf

 

This assumes dns+router ad 192.168.111.1, and "cuts off" 5 IPs from 192.168.111.35 to 192.168.111.40.

U-boot requests the following file:

 

/var/tftp/pxelinux.cfg/01-ee-58-f3-XX-XX-XX

As its PXELINUX config, i.e.:

  FDT /rk322x-box.dtb
  LINUX /kernel.img
  INITRD /initramfs-rk322x
  APPEND modloop=/modloop-rk322x modules=loop,squashfs,sd-mod,usb-storage,aoe ip=dhcp

 

In the tftp root (/var/tftp) I've put the kernel, (alpine, modded by me) initrd, .dtb file, edited  "/var/tftp/pxelinux.cfg/01-ee-58-f3-XX-XX-XX" and it booted!

Pretty impressive.

 

I've not dwelled into armbian because I am not into systemd, which is the "init" of Debian derivatives.
I won't touch it with a 10-foot pole, but shouldn't be too hard to make it boot.
 


 

Link to comment
Share on other sites

Hello!
I have a RK322X TV box with NAND chip.
With multitool, I installed Armbian by following the topic instructions. Everything worked.
I'm doing several tests on the SO and I have a question if I need to do a new clean installation of Armbian, can I just use Multitool, select the option "Burn Armbian image via steP-nand" and rewrite the image? Or I have to restore the Android image first and then reflash with Armbian?
Sorry for my bad english.

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