Jump to content

[SOLVED] Fix Eth or Wifi on T95z Plus


Tomas Catone

Recommended Posts

Loving this project.  Hats off to Balbes150 and all.  I can't fathom the effort it has taken to get to here!

 

I have a Sunvell T95Z plus with a S912 processor.  I can boot Armbian_20.02.0-rc1.037_Aml-s9xxx_bionic_current_5.5.0-rc6_desktop_20200205 from SD card.

 

Using any of the following dtb files:

Meson-gxm-vega-s96

Meson-gxm-khadas-vim2

Meson-gxm-nexbox-a1

Meson-gxm-q201

Meson-gxm-q200

 

All seem to work and boot to the desktop and play the test video.  But I am hitting the common ethernet and wifi failure. 


 

Meson8b-dwmac c9410000.ethernet eth0: no phy at addr -1
Meson8b-dwmac c9410000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)

 

Can anyone point me to how I can adjust or patch the dtb file to fit the chipset on this box?  OR - is there a different image I should start with that has a better likely hood of working out of the box? 

 

Or is there a place I can find archeive versions?  I found that someone is having good luck with Armbian_5.90_Aml-s905_Ubuntu_bionic_default_5.1.0_desktop_20190701. 

 

Or - instructions for extracting dtb or other details from booting into Android? 

 

Thanks a ton in advance

 

Still searching the forum but if anyone has some pointers or breadcrumbs are appreciated!

 

Link to comment
Share on other sites

I don't know if you will have any better luck, but I would suggest you try the latest build (Oct 14, 2020 with kernel 5.9.0) that supports your CPU.  See the first post of the following thread for the install instructions.  Note that the instructions for this latest build are different than what you have previously installed (use of extlinux.conf instead of uEnv.txt, and the need to copy u-boot-xxxx to u-boot.ext) but otherwise the procedure to install is the same.

https://forum.armbian.com/topic/12162-single-armbian-image-for-rk-aml-aw-aarch64-armv8

 

Link to comment
Share on other sites

Thanks SteeMan.

 

Honestly I downloaded 20.11 stuff but couldn't find any amlogics stuff.  I had read earlier in the blog the ongoing troubles with amlogics as a manufacturer so somehow I decided it wasn't supported anymore??  But obviously I am just WRONG.

 

I am new here so I only get one post/day so - here is what I learned today. 

 

So I downloaded Armbian_20.10_Arm-64_bullseye_current_5.9.0_desktop and have Bullseye booting just fine.  Running through all the dtb files.  But still having the same problem - it is not recognizing my ethernet or wifi card.  

 

I also downloaded Armbian_20.10_Arm-64_focal_current_5.9.0_desktop and tried to boot but got an error - ATAGS support not compiled in - hanging  ### Please RESET the board ###

 

I opened up the box and I think the networking card is a AP6225.  

 

Any chance you can point me towards editing or building my own network config file or adding a driver with a thumb drive?

USB tether from my cell phone?  

 

Thanks

Link to comment
Share on other sites

Since I don't have a box that is anything like what you have, I can't provide any more than generic advice.  But given what you are reporting, your problem lies in there not being a compatible dtb for your hardware.  The dtb file is what maps the hardware to the linux kernel.  In searching the forums I ran across the following post that may be of help to you.  While it was for a 5.3 kernel, that is recent enough that it may still be relevant.

 

Link to comment
Share on other sites

12 hours ago, Tomas Catone said:

Honestly I downloaded 20.11 stuff but couldn't find any amlogics stuff.  I had read earlier in the blog the ongoing troubles with amlogics as a manufacturer so somehow I decided it wasn't supported anymore??  But obviously I am just WRONG.

You were both wrong and right.  The build I pointed you to is the last build that supports Amlogic cpus.  As of now there is no one supporting amlogic cpus for android tv boxes going forward in the armbian tv community.  So if you get your box working as you need it, there will be no future kernel updates for you as it currently stands, unless some other developers pick up from where balbes150 left off.

Link to comment
Share on other sites

Thanks SteeMan!

 

I am still new - so still only one post a day but Gio Giogio I have found a bunch of info

 

But I am still having difficulties with the ethernet.  I now get it to work some times.  SteeMan - thanks for pointing me to the intel on building my own .dtb file.  I downloaded the one the OP made and had high hopes since it sounded like we have the same TV box.  But it won't actually finish booting.  But I haven't had much time to work on this project lately.

 

My next question - I am getting close on the ethernet problem I think.  It has worked for a short time... intermittently...  - so I want to move onto a few other questions. 

  1. Can I view this Armbian box via RDP on my Linux laptop?  Or is RDP really a Windows protocal? 
  2. Can I install Teamviewer on the Armbian box?
  3. When I did the firmware update step - I rebooted and did that again thinking maybe you have to do it multiple times?  Bad idea/Good idea?
  4. Based on what you taught me above - I should make sure to lock the kernel?

 

Okay - thanks again for your help!

 

Link to comment
Share on other sites

23 hours ago, Tomas Catone said:

Can I view this Armbian box via RDP on my Linux laptop?  Or is RDP really a Windows protocal? 

 

There is support for RDP on linux.

 

23 hours ago, Tomas Catone said:

Can I install Teamviewer on the Armbian box?

Don't know as I have never used that product, but generally if there is a debian/ubuntu build of a package it should work.

 

23 hours ago, Tomas Catone said:

When I did the firmware update step - I rebooted and did that again thinking maybe you have to do it multiple times?  Bad idea/Good idea?

What firmware update step are you talking about?  There is no firmware update step in any of the instructions for installing armbian tv on an android tv box that I am aware of.

 

23 hours ago, Tomas Catone said:

Based on what you taught me above - I should make sure to lock the kernel?

I'm not sure what you mean by lock the kernel.

 

 

Link to comment
Share on other sites

Thanks @SteeMan !!

 

Still learning.  I was getting a quick error when enabling RDP inside the Armbian config.  Updated everything and reinstalled xrdp and the error went away.  A couple of reboots later and now RDP is working!!!  Success!!

 

I have installed Teamviewer Host.  They have a .deb install file for ARM-32 (no 64 bit file available) so installation wasn't hard.  Not working exactly right yet... but wrenching on it but it lost priority now that RDP is working...

 

When will I be able to post more than 1x a day?  Or a link?  It deleted my link in my earlier post.  Just asking.

 

"Firmware" is inside Armbian config but after looking at it more closely it is "apt update and apt upgrade".  So I am doing it recursively until it says there is nothing more to upgrade.  Hope that doesn't mess anything up.

 

"Freeze" inside Armbian config says it will disable the Armbian kernel upgrade.  Sounds wise since 20.11 doesn't support Amlogics cpu.  Agreed?


Interesting tidbit - I changed the background to one of the blue xfce mice but for some reason it only stays for a little while and then goes back to the grey penguin.  Reboot brings back the blue for a little while.  Just odd. 

 

Other progress:  I tested almost all Amlogic .dtb device tree files .  I appreciate the link to the work of @mumpitzstuff on compiling dtb files.  I compiled the one he used for my tv box - but it didn't work.  Then I tried pasting together a file of my own from a couple of stock dtb files - but that didn't fix anything.  The meson-gxm-vega-s96.dtb file is what I am using and it has working ethernet so that is what I NEED.  Meson-gxm-q200-n1.dtb shows a wifi symbol in the top left corner after boot but my mouse and keyboard don't work.  Meson-gxm-beelink-gt1 seems to have working Bluetooth.  I might work more on compiling my own dtb file but at this point I am moving onto Samba setup and Plex setup.  I think my homebrew dtb file idea is missing the actual drivers for the chips so even after defining the device tree I still need to somewhere somehow add the drivers?

 

Well - that is the update for today.  Seem to be inching towards my goal. 

 

Any tips/tricks or ideas are appreciated. 

 

@Gio Giogio - sorry - I can't post links so the one I sent you got auto-deleted above.  But have a look for reddit getting_armbian_to_boot_on_sunvell_t95z_plus and I bet you can use that to get over the first hurdles. 

 

Thanks again! 

 

 

Link to comment
Share on other sites

29.11.2020 в 07:06, Tomas Catone сказал:

 

@Gio Giogio - sorry - I can't post links so the one I sent you got auto-deleted above.  But have a look for reddit getting_armbian_to_boot_on_sunvell_t95z_plus and I bet you can use that to get over the first hurdles. 

 

Thanks again! 

 

 

Thank you but I tried it all.
Can you send me the link in the mail?

gio577397645@gmail.com

Link to comment
Share on other sites

Hi again,

 

I have made it over some more hurdles but haven't had as much time to devote to this project.  Shoutout to @balbes150 - still can't believe I am close to having a linux media server on a tv box that was just collecting dust before.

 

Anyway - I have found that the eth0 port is just flaky.  Using the same .dtb file sometimes the port works and sometimes it doesn't.  I can watch the lights on the router during boot up and see that it is not going to work if no lights switch on during boot up.  But if I just reboot and let it boot into Android - Android works every time.  Then after letting Android boot - most times if I boot back into Armbian - the lights start flashing and eth0 works.  I haven't figured out what causes or when it fails.  Any insight is appreciated.

 

I have given up on wifi on this box at this time as it is not immediately needed - but with the above problem it leads me to believe that my dtb file testing may have not given me accurate data.  Meaning there may be a better dtb file for me that didn't work during my testing because of the above craziness. 

 

Anyway - moving on from that.  I have been reformatting and starting all over whenever I get too stuck.  In my recent testing - I keep getting an RDP desktop that is just not 100% right.  Immediately you notice there is no background.  You can not change that in settings either.  I can start any 1 application but there is no way to have more than 1 open at a time.  Any insight on this is appreciated too.

 

Next question - I am trying to get Plex server up and running.  I think I have most things figured out but I can't get my library from my external drive to be added.  I believe it is a permission issue and I have found guides on using facl command (sudo setfacl -m u:plex:rx /media/ExternalUSBDrive/)  .  I added the command facl but it still doesn't work.  I am thinking there is an easier way to do this so if you happen to have any tips or tricks I would appreciate that too.

 

Okay - to summarize my questions - any tips, tricks, search terms - anything is appreciated.

  1.  Flaky eth0 port.  Reasons? Anything I can do post boot to get it recognized?
  2. RDP without real desktop?  Reinstall xrdp?  Ideas?
  3. External drive mounting permissions?
  4. Bonus - Confirm that I should "Freeze" inside the "Armbian Config" tools since 20.11 is the last version to support Amlogics CPUs?

As always - Any advice is appreciated!

Regards,

 

Link to comment
Share on other sites

Update

Regarding #2 above - mark that solved I guess.

 

I rebuilt my entire setup (again) and this time I did not try to RDP into the server until after I had completely updated it all.

First I did "Firmware" update from the Armbian Config and rebooted.

Next I did

>sudo apt update

>sudo apt upgrade

Rebooted

 

And now RDP seems to be working just fine!!

 

 

Regards

Link to comment
Share on other sites

Not sure anyone is following along but I thought I'd mark this closed so here is a summary of my questions/solutions.

  1.  Flaky eth0 port.  Reasons? Anything I can do post boot to get it recognized?
    • Never really found an answer.  Using the correct dtb file is required but then sometimes the port doesn't work at reboot just to make things interesting.  With this T95z Plus I had the best luck with "meson-gxm-vega-s96.dtb"
  2. RDP without real desktop?  Reinstall xrdp?  Ideas?
    • I rebuilt my SD card and started all over.   The problem went away.
  3. External drive mounting permissions?
    • Found answers on Plex forums for this.  Root of the issue is that Plex runs under it's own "User" and by default doesn't have r/w permission to the drives.  I am not sure if I can post reddit links - but google something like "linux mounting usb drive plex server" and I bet you get close enough.
  4. Bonus - Confirm that I should "Freeze" inside the "Armbian Config" tools since 20.11 is the last version to support Amlogics CPUs?
    • No replies on this.  Still don't know.  I am thinking of making a backup of my SD card at intervals for a just in case.
  5. Previous question - How do you enable wifi on the T95z Plus
    • I never got this working.  I wrenched and tested and spent hours testing all the .dtb files but...  Later I learned that my testing was probably not even valid since for some reason even the correct .dtb file would at times not enable the eth0 port - so logic says that the correct dtb for the wifi might sometimes not enable it as well...

@balbes150 and @SteeMan- Thanks again for all of your advice, wizardry and hard work to bring this retired android box back from the recycle bin.   At this point though - I have a working Android server booting Armbian_20.10_Arm-64_bullseye_current_5.9.0_desktop running Plex Media Server  with attached USB eternal drive with Music and Movies.  I boot it "headless" essentially as I don't have the HDMI plugged in - unless I need to troubleshoot the boot.  I do most things via ssh - for example currently using ssh  to make a complete backup of the drive for safe keeping.  Plex is remarkably "snappy" on the machine and we use FireStick 4ks and tablets throughout the house to watch content with few issues.  I haven't tested multiple simultaneous streams yet but I will.

 

Thanks again!

   

 

Link to comment
Share on other sites

  • Tomas Catone changed the title to [SOLVED] Fix Eth or Wifi on T95z Plus

@Tomas Catone,

 

Thanks for coming back and sharing a detailed summary of your results.  I am glad you were able to get it (mostly?) working.  Even if it took you a lot of time and hassle.  I hope it stays working a long time for you.

 

However, if I may make a suggestion, at some point you may start looking for another device.  At that point, perhaps consider using the Armbian officially supported devices list as a starting point for research.  You could save yourself a lot of time and hassle that way, and end up with a much better supported device, in most cases for a very long period of time (on mainline).  This is the approach I have always taken and I never struggle with these sorts of problems (I have a Cubietruck which has ran absolutely flawless for a number of years now).  Unless you just like to tinker, of course.  ;)  I also enjoy a good tinker now and again, however even with Supported boards I have plenty of tinkering to do, but it's usually productive tinkering instead of just getting things to work in the first place...

 

Just a thought, to keep in mind longer term...

 

Cheers!

Link to comment
Share on other sites

Thanks @TRS-80 - I hate when people abandon their post... I am sure I am guilty of it in the past too but... 

I also appreciate the link.  I might be looking for a "real" answer some day. 

 

But yes - this project was all about picking something out of my dusty tech recycle bin.  I am a sucker for a struggle...  I started this idea with an old PogoPlug...  Got some form of Debian on that now I think...  Had SAMBA running on that for a while.  That was a struggle.  Was eyeing my out of work old Raspberry Pi gen 1 when I found this site.   I am glad I did because honestly - my current results are working and useful.  Using rsync I just did a full backup of my external drive to another external drive that I will keep offline and the speed was really not bad.  

 

I know I wrote solved - but any chance you know an easy way to compress my sd card to an image to save as a backup?  Can I compress this from this 32GB card and easily copy it to a 16GB card since I didn't use all the space? 

 

Thanks again,

Link to comment
Share on other sites

40 minutes ago, Tomas Catone said:

I hate when people abandon their post

 

https://xkcd.com/979/

 

40 minutes ago, Tomas Catone said:

this project was all about picking something out of my dusty tech recycle bin.

 

Always an admirable goal.  :thumbup:

 

40 minutes ago, Tomas Catone said:

any chance you know an easy way to compress my sd card to an image to save as a backup?  Can I compress this from this 32GB card and easily copy it to a 16GB card since I didn't use all the space? 

 

Well, I am only a low to (at best) medium level wizard in my own right.  Having said that, I think maybe something like dd[0] and then your choice of compression software.  There is usually some tradeoff on the latter in terms of time spent compressing vs how much compression they will achieve, but I don't use them enough to be able to tell you offhand "use setting X" as being the sweet spot in terms of cost/benefit (but I vaguely recall reading those sort of articles before, so I feel like they should exist if you look for them).

 

But above way results in a "pretty big" image no matter what.  Maybe you don't mind and prefer just to have a complete, known working image.  However I personally usually think about backups more in terms of reproducible systems.  In other words, starting from base Debian/Armbian stable (or whatever), install x, y, z packages, clone dotfiles or other configs from personal git repos, run some Makefile (and/or Dockerfile(s), and/or config manager like Ansible, etc.) which will re-create a system to a (more or less) known working state.  Then you just need to mount your data (which I feel should always be kept separate) somehow and boom you are off to the races.  Which takes some setting up initially but worth it in the end (IMO).  Well, that's how I go about it, anyway.  This way has advantage of not requiring to store the whole entire system, applications, etc. but rather just some few text files and configs.  But it is more complex (straight dd + compress being much simpler).

 

However in light of all you had to go through to get this working, maybe "reproducible config" way is not the best idea in this case.  Image will be easier.  Especially going forward on an unsupported platform, there are no guarantees you will even be able to find all the software again later.  So maybe not such a bad idea just to make an image.  But this is another reason why I stick to Supported Devices.  Because I have a sort of generalized workflow that I follow across all my machines (desktops, servers, laptops) so that works for me.  And dealing with the odd device would just be too much hassle from my point of view.  Mainly just because that would be outside my already established workflow.  But that's just different strokes for different folks.  ;)

 

I am sure there are some other ways, too, just need to find one that suits you I suppose.

 

[0] If you do this, make sure you image the whole device, not just particular partition(s).  Eg. /dev/sdb instead of /dev/sdb1 (or whatever).  I would also make some checksums while I was at it.

Edited by TRS-80
clarify
Link to comment
Share on other sites

I found the answer.  It was easy and worked great.  So to refresh and reframe.

Q: How do you copy your working SD card to a different SD card and in my case a smaller SD card using linux. 

 

A:  I did this on my Linux laptop running PopOS.  True credit goes to the folks at this website HERE and the creator of the shrink command HERE.  I started with my working 32GB SD card.  I checked the total usage and it was less than 12GB so here is how I cloned the card to fit on my 16GB SD card:

 

First copy the full contents of the SD card to your laptop

sudo dd bs=4M if=/dev/sXX of=armbianbackup.img

Of course you need to determine where your SD card is on your laptop with fdisk -l and you can name your image whatever you want.

This took some time - in my case about 15 minutes.   But this will make a full image of both partitions of your SD card.

 

Next you need to install the "pishrink" command.  It was written for Raspberry pi development but it simply takes the unused space out of an image file.  To install the command:

 

wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
chmod +x pishrink.sh
sudo mv pishrink.sh /usr/local/bin

 

This takes only a few seconds. 

 

Next use the command to shrink your backup image you made above.

 

sudo pishrink.sh armbianbackup.img

 

This took me more than 10 minutes but I think less than 30. (I had other chores going on)

It finished without problem.  I then used Popsicle to burn the resulting image to my smaller 16GB SD card.  Popped it into my T95z box and it booted right up with all my existing configurations, user, password etc.  (Popsicle by the way is similar to Etcher.  Just the default in PopOS)

 

Thought I would share how simple the answer is! 

 

Hate to sound like a broken record but Armbian on this old android box is slick and very powerful.  I just did a Plex stress test and played a movie on all the tablets and Fire-sticks I had laying around in the house.  I had 5 concurrent streams going with zero issues.  Our content is older movie dvd backup rips so bandwidth per stream is between 4-5 MB/s.  All Plex clients are wirelessly attached to the ISP provided Wi-Fi router/modem but I didn't meet any limitation there either.  I am still trying to wrap my head around this.  This little box draws 5v at 2 amp max?  I know to say 10watt does not include conversion in-efficiency but that is still simply amazing. 

 

Thanks again gang for all the help.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines