my ordeal with rockpi4 and Penta Sata Hat + Tower


Recommended Posts

I had bought the kit because I got attracted by its compact size. I had problems with my old media pc so good opportunity to tackle something new.

I thought, my requirements for a media server would be quite low/easy to fulfill:

  • smooth playback of 1080p movies
  • clean multichannel sound
  • access to firefox

 

After testing all avaliable images on the rockpi, it was clear, that actually only LE offers exciting movie enjoyment. I had to realize, that my ideas are quite demanding after all.

So it was clear, I had to get the driver from radxa working on LE.

 

Why?

well, hardware design of rockpi4 with extension HATs is somehow stupid. The flat cable needs to go from plugged board below systemboard to HAT above system board, so sdcard could not be changed any more.

Spoiler

SDcard-weird01.JPG.699fd7fb1a628971c2e9934151def512.JPG

 

and as shown here:

 

Spoiler

SDcard-weird02.thumb.JPG.dcb8181034ad778b1e877b48982fd3ba.JPG

 

sd-card cannot be used together with the tower. Only emmc-support for boot. But emmc module is not exchangeable.

That is why I had to start this odyssey.

 

I tested the driver with officially supported images:

  • on debian (linaro) the driver could be installed and the fan runs. Neither button nor display works.
  • on ubuntu driver install scripts tells, that nothing has to be done, but nothing works ootb. No fan, no button, no display
  • on armbian or LE the install script reffers to the git archive.

 

I started with self compiled LE, but I'm not skilled to port lowlevel libraries to unknown system. Quite hard going

 

Then I discovered posting of PetrozPL and JackR. Both scripts worked on armbian - well, I had some problems, getting into it, but ...

anyway: trying the scripts on LE showed - no way. LE has no bash and busybox does not support arrays ...

 

So I researched, how I could drive the fan using only tools avaliable at LE. Unfortunately LE has no reasonable interpreter for scripting. Only python :(

I never wrote a line in python before!

 

I first had to check, whether the kernel of LE supports fan control. LE has no dtb-overlay support for rockpi. So had to change dtb manually like this:

  • copy dtb-file to writable location
  • decompile with dtc -I dtb -O dts -o rk3399-rock-pi-4a.dtb rk3399-rock-pi-4a.dts
  • find sections named pwm@ff420000 and pwm@ff420010
  • change status "disabled" into status = "okay"
  • recompile dts with dtc -O dtb -o rk3399-rock-pi-4a.dtb -b O -@ rk3399-rock-pi-4a.dts
  • copy dtb file back to original location (/flash)

 

After reboot, fan works as with armbian - so I could write my fan-driver. Now system was ready to assemble the tower.

I tested the driver with all other test images. Had to change code to work with older python releases and had some troubles with the button. But now driver runs stable and - as far as I can judge so far, where my driver does not run, other drivers will fail too.

 

Well, my work with LE had the background, that I could get multiboot into play. But that seems pretty impossible.

So I startet again researching, what could fulfill my ideas.

  • Multimedia legacy - kodi works, movies are enjoyable. But no button support
  • armbian current - no kodi, vlc works fine. Fan control works with button support
  • debian/ubuntu - Fancontrol works with button support, but video playback is disgusting
  • twisterOS - kodi works, movies are enjoyable, but no fan, no button

 

I like twisterOS and the gimmick with the circles, but the text was unreadable for me. So I tweaked the gimmick and now I have it usable on my desktop as well on plain armbian. Using armbian instead of twisterOS has the benefit, that I don't have to flood the boot media with rubbish I never use (like openoffice and all that gaming stuff)

 

Actually my armbian current looks like this:

Spoiler

armbian-desktop01.jpg.06830600a1bd342d39cdb6d28bcbdad0.jpg

 

or a bit busy with firefox:

Spoiler

armbian-desktop02.jpg.1f22908bbddea28b162eca59455aa633.jpg

 

So the open jobs (next steps) are:

  • get multiboot into play (then I could use LE together with armbian)
  • get another kernel on twisteros, that supports pwm - then I could use twisteros
  • get a recent kodi on current armbian, then I could forget about all others

 

Link to post
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

Thanks for sharing your experience, it should be helpful to someone sooner or later.  :thumbup:

 

I was also looking for RK3399 based NAS solution (for a long time) and even piter75 (RK3399 dev here) and some other guys in IRC were very keen on RockPi 4.  And reading about the company and doing more research, I could see why.  I was ready to buy one, but at that time, those Penta SATA HATs were unavailable.  So I kept looking around...

 

Eventually I ended up with a ROCKPro64 because, unlike all other RK3399 based solutions, it comes with a standard PCIe slot.  Therefore no need for special SATA HAT from the vendor, you can use almost any off the shelf and widely available standard PCIe to SATA adapter card instead.  Not only now, but in the future should something break (i.e., how long will these special SATA HATs be available?  Not only from Radxa but others with similar solutions?).

Link to post
Share on other sites

2 minutes ago, lanefu said:

How's that been working for you?

 

Well I'm embarrassed to say I haven't had time to get further than physically setting up the hardware and installing ZFS.  Did not even create pools or do any real migration of data or anything else yet, really.  :(  So personally, no first hand feedback to report, sadly.

 

However in this thread, a few people report quite reliable and long term usage without problems.  Which is what encouraged me to pull the trigger in the first place.

 

4 minutes ago, lanefu said:

What SATA card are you using?

 

A few different ones are discussed in the above linked thread, I also posted my research there at the time.  There is some supported hardware info on Pine wiki as well (of course not being listed there does not mean it won't work).  I would steer clear of the card they sell in their shop however (I read several bad reports about it).

Link to post
Share on other sites

Am 1.6.2021 um 00:29 schrieb TRS-80:

I was ready to buy one, but at that time, those Penta SATA HATs were unavailable.

A quick look showed available packages from alipollin and tabius

Availability changes - but *afaik* unavailable does not mean out of production - especially on tabius it was out of stock and few days later in stock again.

 

I have a 2GB rockpi variant in the nas - and in the beginning (default installation) it freezes after serving some movies. I thought about small memory or possible issues with zram-logging - not sure. My driver generates frequent log messages, so stresses zram logging by far ...

So I removed zram and zram logging and never had an issue again.

 

Actually I'm thinking about connecting a relay to an gpio pin ...

So I'm researching same issue like you

Link to post
Share on other sites

some more feedback about stumbling around NAS and mediaplayer ...

 

I was running rockpi4 and penta-sata-tower with armbian current, whereas the mediaplayer is a rockpi4 with armbian legacy multimedia. As I already wrote, NAS got frozen sometimes watching movies :(

When it happened 3 out of 5 times, I kicked armbian from the NAS and startet testing official images from radxa. I started with ubuntu focal server.

 

Streaming works pretty stable - no freezes any more. But - ubuntu wasn't able to shutdown the NAS. Very anoying, as I had to unplug power stage to turn of the NAS. I did some more tests and found out, that shutdown on ubuntu works having the hat connected but no drives attached.

As soon as I attach the drives, no more shutdown.

 

So I checked official debian - but that behaves the same.

 

Hm, on armbian shutdown worked without issue. So I started to build a server image of armbian.

Long time tests have to show, whether I could get a system that does not freeze ...

 

On the mediaplayer front I did lot of testings too.

Lately I thought, that LE has the best player support, but that's not true. I have few movies with VC-1 codec and armbian legacy multimedia is the only one, that plays the movies some kind of acceptable (stil some freezes, but overall experience is more than movie than diashow).

 

But change between kodi and desktop is unusable for me (my beamer screen misses about 10% on top and bottom, so no menubar ...). That was the trigger to start searching for alternatives. Sadly I had to realize, that there was none - so I had to develop one on my own.

 

With all that testing, I killed two sdcards and an emmc :(

... but I almoust met my expectations.

 

 

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...
 Share

2 2