Jump to content

CSC Armbian for RK3318/RK3328 TV box boards


jock

Recommended Posts

This world of tvboxes is a jungle, where every morning a gazelle wakes up and have to run to survive ...we know the rest of the story !!!

The effort of bringing a form of " stability " on  them was not easy and only possible because @jock and myself had some spare board to play with , autopsy and personally even lobotomizing since i found TONS of emmc faulty on hk1 circle tvbox, so I removed with hot air and now working only from SD.
That is the reason we GREATLY thank every single user that is willing to test this work and help us to go every day better,  but the road to have distros  in some official and certified manner is still long.

Link to comment
Share on other sites

Hello, today I did a new testing and found some issues...


First of all - I observed, that even the u-boot was loading the kernel from USB, the system was booting from internal eMMC. It was caused by fact, that partition on USB has the same UUID as partition in eMMC (the same image flashed to both).

So the this line in armbianEnv.txt is ambiguous: rootdev=UUID=b6483914-35c7-4017-962a-71ed0843eacc

Not big issue - I changed the UUID on the USB by gparted and updated the armbianEnv.txt accordingly. Then I was able to boot from USB. Not really issue, but I spent quite long time to find the cause of not booting from USB... I can imagine that Multitool will change the partition UUID (and armbianEnv.txt) automatically after flashing image.. :D

 

Bigger problem is, that WIFI is not working. Problem is the same as before, wifi is detected, but not working...

This was previously solved by providing extra overlays. Last time I was not testing complete new builds - I was installing just uboot, dtb, and kernel DEBs and probably DTB was not replaced (similarly as uboot). Uboot I was replacing later manually.

 

usb_boot_serial_dmesg.log

 

Last problem was with Focal Desktop image - first boot is ok - steps done:

  • root password entered (twice)
  • user name, pwd and real name entered
  • GUI started
  • rk3318-config executed (no wifi message - switch ext bus on)
  • restart

After restart the box is looping trying to start GUI without success. Serial console was accessible - in the syslog I saw some errors of lightdm. I dont remember exactly, but some package for authentication was missing... I repeated this 3-4 times, starting from USB or internal eMMC with the same result... Currently I have no logs (deleted by mistake). I must flash the Focal again... Now I have the minimal buster flashed.

 

Please help - first with wifi.. :-)
Problem with wifi is in both...

 

Link to comment
Share on other sites

Hello @lucky62,

let's start with the solvable things:

- the wifi: it does not work for the same reason as before, the symlink is missing. I was sure I pushed the symlink to the firmware repository, but it seems I forgot :unsure: Just create the symlink the same way as before and it should work again. Also run again rk3318-config because it needs to add the proper overlay for ap6330, so also bluetooth should work

- The desktop environment, yes, it is an issue I'm having too: sometimes it boots and sometimes it gets stuck in a loop. Looking into X.org does not give any real clues about, it does not fail with any error but just shuts down. It is something that happens on rk322x boxes too. Need to ask core developers if they know something about. A workaround I found is to switch to another virtual console (ALT + F2, for example), log in as root, launch armbian-config and then disable and enable back the desktop environment. There have been heavy changes lately in the way armbian handles the desktop environment, so maybe we're hitting some sort of bug

- The UUID... well, here there's is nothing we really can do :D Actually the multitool does not change the UUID of the freshly installed system, it does not do anything on the freshly installed system because it is not its task do that, and it may break the installed system that may do some assumption about the UUID of the rootfs. The USB boot feature was made under the assumption that you may want to boot a different image or another kind of image (like the multitool); actually the very same happens with sd card boot too... so there is no real solution to this except having u-boot alter the kernel command line and putting there the rootfs of the real booting device, but that means guess which partition is the rootfs. I don't really want  to deal with that. <_<

 

Link to comment
Share on other sites

Sorry for delay, I had no time...

23 hours ago, jock said:

Ok I updated the images, the missing firmware symlink for Ap6330 should be there now. No other progress for now.

Thanks for you great work. Just the question - why AP6330 is used via symlink and not directly?... It is not criticism, just interest... :-)

 

On 5/4/2021 at 11:39 PM, jock said:

The desktop environment, yes, it is an issue I'm having too: sometimes it boots and sometimes it gets stuck in a loop. Looking into X.org does not give any real clues about, it does not fail with any error but just shuts down.

My observation was that this is not the issue of Xorg but lightdm... Yes, there is no error in the Xorg log. But in the syslog I saw something.

 

On 5/4/2021 at 11:39 PM, jock said:

A workaround I found is to switch to another virtual console (ALT + F2, for example)

This was not possible, because after switching to another textual console system was switched shortly back to graphical console due to X restart. Only serial console on the UART was usable.

 

Last question I have - why the USB key is not recognized by uboot when it is in the USB3 port?... Not necessary to solve this, just for info. When the system is started, then USB3 is working. Not sure about the speed.

Link to comment
Share on other sites

19 minutes ago, lucky62 said:

Thanks for you great work. Just the question - why AP6330 is used via symlink and not directly?... It is not criticism, just interest... :-)

It's just the nvram firmware part. It contains calibration and configuration data and often this data depends on the antenna.

ap6330 in reality is a combo chip made of bcm4330 wifi + another broadcom chip for bluetooth.

brcmfmac driver (the broadcom wifi kernel driver) looks for that a file with that contains the chip name and the board name (bcm4330 + rk3318-box).

The symlink is there to reuse the generic ap6330 calibration data.

 

25 minutes ago, lucky62 said:

This was not possible, because after switching to another textual console system was switched shortly back to graphical console due to X restart. Only serial console on the UART was usable.

Usually after a number of tries, the systemd service gives up. There is also the ssh option too.

 

26 minutes ago, lucky62 said:

Last question I have - why the USB key is not recognized by uboot when it is in the USB3 port?

I didn't tried it so much, but usually the bad things that happen in u-boot are due to poor on non-existent drivers. I don't know the actualy quality of the dwc3 driver, but the dwc2 is indeed a bit hacky. Don't expect it to work fairly well soon.

The linux kernel instead has properly written and tested drivers, yet the USB3 driver is still not perfect.

Link to comment
Share on other sites

On 5/4/2021 at 10:46 PM, lucky62 said:

After restart the box is looping trying to start GUI without success. Serial console was accessible - in the syslog I saw some errors of lightdm. I dont remember exactly, but some package for authentication was missing... I repeated this 3-4 times, starting from USB or internal eMMC with the same result... 

 

I noticed the same behaviour till today. Today I've tried to pinpoint the problem with lightdm (console boot and then -> startx worked ok), but after apt upgrade of lightdm (lightdm --version -> 1.30.0) the problem is gone, desktop starts cleanly each reboot.

Link to comment
Share on other sites

Thanks for answers. Regarding the looping X - I have some logs.

In the sysylog you can see that lightdm is failing to start.

In the service status there are some details... I catched service status few times, because it is restarting an each time in the different state...

 

syslog-lightdm-errors.loglightdm-service-status.log

 

Edit: posted few seconds after kruzer...

Link to comment
Share on other sites

I have a Q2 Mini Rk3318 box and installed this image: Armbian 21.08 - Ubuntu Focal desktop [xfce] - mainline kernel 5.10.34.

 

It works well on the first boot, but when doing the second boot, the system starts and before loading the desktop it is in black screen with the blinking cursor in the upper left corner.

Link to comment
Share on other sites

1 hour ago, Tucano2000 said:

I have a Q2 Mini Rk3318 box and installed this image: Armbian 21.08 - Ubuntu Focal desktop [xfce] - mainline kernel 5.10.34.

 

It works well on the first boot, but when doing the second boot, the system starts and before loading the desktop it is in black screen with the blinking cursor in the upper left corner.

Yes it is a known problem of lightdm. A couple of posts above @kruzer suggested to do an upgrade of the package. If you are able to run apt update && apt upgrade this issue will probably be fixed.

 

Anyway I'm very glad the image works for you. If you have the chance to post some photos of the board and have a link to the original firmware would be great for better support.

Don't forget ro run rk3318-config too.

Link to comment
Share on other sites

Quote

Yes it is a known problem of lightdm. A couple of posts above @kruzer suggested to do an upgrade of the package. If you are able to run apt update && apt upgrade this issue will probably be fixed.

Thanks for this tip !!!

Quote

Anyway I'm very glad the image works for you. If you have the chance to post some photos of the board and have a link to the original firmware would be great for better support.

Don't forget ro run rk3318-config too.

 

I have the firmware image here that I extract with the Android Tool:

 

After that, my device bricked yesterday, when I tried to put the RK3328 firmware. :( ... I did a stupid method !!!

 

Now I can't get it to be recognized by USB, even if I press the button with the toothpick inside the AV connector.

 

I took some pictures of the pcb and as it only has a badge chip, I can't do the EMMC pin to force the Maskroom mode. I didn't find anyone who did this for this box. I'm a little lost.

 

 

 

b4UKU3n.jpg

 

wQ28M8E.jpg

 

Pnd2CP1.png

Link to comment
Share on other sites

@Tucano2000

Ah, installing the rk3328 firmware was indeed a bad move. Despite that, I looked at the firmware parts you put on the remote drive and they look like being corrupted/empty to me.  Tried to open dtb, resource and kernel with an hex editor and they are filled with dummy bytes.

 

Did you try to put the multitool on a sdcard and try to boot it? If the bootloader you installed on eMMC is corrupted, the SoC will try to boot from sdcard (but not USB) and the multitool will allow you to recover or install armbian again.

 

If the multitool does not boot, I'm afraid your only option is finding the eMMC clock pin and shorting it to ground to force maskrom mode. I have no such board, so I have no experience with that unfortunately.

 

If you have a serial adapter it may be worthy connecting it to understand what's going on.

Link to comment
Share on other sites

Quote

Did you try to put the multitool on a sdcard and try to boot it? If the bootloader you installed on eMMC is corrupted, the SoC will try to boot from sdcard (but not USB) and the multitool will allow you to recover or install armbian again.

 

Yes. I did here on this link a Multitool backup image and resend Android Tool image again but I don't know if it work.  The mmcblk2boot files I get with dd command.  The dtb and dts files (don't works here) I got using Termux on Android. I don't know if this will interest you.

 

 

 

Quote

If the multitool does not boot, I'm afraid your only option is finding the eMMC clock pin and shorting it to ground to force maskrom mode. I have no such board, so I have no experience with that unfortunately.

 

I soldered a wire to the ground and placed a 1k ohm resistor on the other end to look for the eMMC clock pin. I don't know if I should use a lower value to be able to find it. But my concern is to cause a short and burn some port on the chip. I don't know what the technique is to look for

 

 

 

Quote

If you have a serial adapter it may be worthy connecting it to understand what's going on.

 

 

 I don't know this method. You could put a link here showing how I should proceed to achieve this. 

 

 

 

Edit: Include comment about mmcblk2boot, dtb and dts files.

 

Link to comment
Share on other sites

1 hour ago, Tucano2000 said:

Yes. I did here on this link a Multitool backup image and resend Android Tool image again but I don't know if it work.  The mmcblk2boot files I get with dd command.  The dtb and dts files (don't works here) I got using Termux on Android. I don't know if this will interest you.

I mean: did you try again, after bricking the board, to run the multitool from sdcard?

 

1 hour ago, Tucano2000 said:

 I don't know this method. You could put a link here showing how I should proceed to achieve this. 

You need a serial adapter (USB-to-TTL or RS-232-to-TLL) for that, boards usually have debug serial pads in rows of 3 of 4 holes where the serial adapter wires can be soldered to send and receive characters.

Looking at the board photos, I think the four vertical pads in the left-bottom corner of the first photo are probably the serial pads. Commonly they are GND, Tx, Rx and 3v3, but the order changes. 3v3 must not be used, but if you connect the adapter GND to the GND of the board, Rx of the adapter to Tx of the board and Tx of the adapter to Rx of the board you can send and receive message on your computer. This is pretty a must have.

Link to comment
Share on other sites

Quote

I mean: did you try again, after bricking the board, to run the multitool from sdcard?

 

No, I got Multitool backup files, dtb, dts, Android Tool Image before bricking when original Android yet was installed. This links are with this files.

Multitool don't work more after bricking.  Now here show red led, no more blue led blinking and no image to TV/Monitor (hdmi) when power on tv box using Multitool on SD card.

 

Quote

You need a serial adapter (USB-to-TTL or RS-232-to-TLL) for that, boards usually have debug serial pads in rows of 3 of 4 holes where the serial adapter wires can be soldered to send and receive characters.

Looking at the board photos, I think the four vertical pads in the left-bottom corner of the first photo are probably the serial pads. Commonly they are GND, Tx, Rx and 3v3, but the order changes. 3v3 must not be used, but if you connect the adapter GND to the GND of the board, Rx of the adapter to Tx of the board and Tx of the adapter to Rx of the board you can send and receive message on your computer. This is pretty a must have.

 

It must be a few days before I get one. In the meantime, I'm going to look for it and maybe someone got it and posted it somewhere how to force maskroom mode. Thanks.

 

Link to comment
Share on other sites

@Tucano2000

 

Quote

I soldered a wire to the ground and placed a 1k ohm resistor on the other end to look for the eMMC clock pin. I don't know if I should use a lower value to be able to find it. But my concern is to cause a short and burn some port on the chip. I don't know what the technique is to look for

This is a very aggressive way to find the exact  clock-pin of emmc and also very DANGEROUS. Luckly throught 1k resistor the current will be quite low, but the possibility to destroy some cmos part is still HIGH. The only way to be sure that you managing the righ emmc clock point is discovering it  with an OSCILLOSCOPE , as I did the very first time i managed to find on my board, but again unfortunately my board is different from yours !!!!!!!

And as @jock already said , is needed more debug informations. Without a UART log we are pretty blind :( and also trying to help you is at the moment hard because lack of infos ( wrong ddrbin ? wrong trust-os?? wrong u-boot??? )

Link to comment
Share on other sites

4 hours ago, Tucano2000 said:

Multitool don't work more after bricking.  Now here show red led, no more blue led blinking and no image to TV/Monitor (hdmi) when power on tv box using Multitool on SD card.

Hmm, if Multitool does not boot I'm afraid the ddrbin (the very first piece of code) does not like the DDR memories and is just stopping the whole thing from booting.

The serial adapter will tell you and the only way out, in this case, is forcing maskrom mode.

Link to comment
Share on other sites

@Tucano2000 After half a day realized that your question was related to the backup image your posted on yandex :D Sorry, today I was a bit sleepy and I misunderstood the post. I will check tomorrow, but the dtb and dts already contain most of the useful data!

 

Link to comment
Share on other sites

On 5/6/2021 at 11:14 PM, hexdump said:

problems with lightdm on arm systems ring a bell for me: can you maybe try to install and use the slick-greeter for lightdm instead of the default one? this solved some trouble for me and maybe it helps in this case too?

I tried this, I tried also unity-greeter - but problem was not fixed. After installation of greeter the link in alternatives was not updated, so I changed it manually by editing link (update-alternatives says that there is only one option). But seems that still default greeter was used - without success. To be sure, this is about Focal Desktop build.

 

Debian Buster minimal is ok (Desktop was installed by armbian-config).

Link to comment
Share on other sites

Hi all.,

 

Hoping you can help me with something.

 

I recently bought this tvbox (H96Max rk8813) and I want to run focal on this. 

 

I have followed the steps provided in the first post but after I flash the image the device does not boot. 

I see nothing.. I have waited like 5 minutes maybe I need to wait longer?

 

I have tried the desktop image. 

 

To be clear The Multitool works just fine. I had created a backup of the mmc (and I can restore this backup as well) 

 

It is just that the system won't boot when I flash the image. 

 

(the device is running android 10 / not rooted) 

 

any help is appreciated 

Link to comment
Share on other sites

9 hours ago, Dragao said:

I have followed the steps provided in the first post but after I flash the image the device does not boot. 

I see nothing.. I have waited like 5 minutes maybe I need to wait longer?

 

No, 5 minutes is lot of time.. You must see the focal starting sequence.

From which device are you booting? (internal eMMC, SD Card or USB?)

Link to comment
Share on other sites

10 hours ago, Dragao said:

Hi all.,

 

Hoping you can help me with something.

 

I recently bought this tvbox (H96Max rk8813) and I want to run focal on this. 

 

I have followed the steps provided in the first post but after I flash the image the device does not boot. 

I see nothing.. I have waited like 5 minutes maybe I need to wait longer?

 

I have tried the desktop image. 

 

To be clear The Multitool works just fine. I had created a backup of the mmc (and I can restore this backup as well) 

 

It is just that the system won't boot when I flash the image. 

 

(the device is running android 10 / not rooted) 

 

any help is appreciated 

Hello,

as @lucky62 said, 5 minutes is too much time. Usually after 10/15 seconds you already have some logging on the HDMI monitor.

In the first thread page, at the bottom, there is a list of useful things you can provide to help in debugging.

 

Just to be sure, did you try the Focal desktop image with mainline or legacy kernel? Trying the other options can add further hints that may help understanding.

Link to comment
Share on other sites

As the Multitool is flashing to internal eMMC I am trying to boot from there. (SD card ejected as the instruction is telling me :) )

 

I used the focal desktop given in the first post.  (which is a Mainline)

 

I do have a hard time in finding other focal images. I have found another one but that one did not boot either .

 

 

Is there a way of telling if I have a mainline or legacy ? 

 

Link to comment
Share on other sites

2 hours ago, Dragao said:

As the Multitool is flashing to internal eMMC I am trying to boot from there. (SD card ejected as the instruction is telling me :) )

It is better to write the distro image to the SD card and boot from SD. Then there is no risk, that your device will be bricked.

 

 

Link to comment
Share on other sites

1 hour ago, lucky62 said:

It is better to write the distro image to the SD card and boot from SD. Then there is no risk, that your device will be bricked.

 

 

yes, but the Multitool does not do that :) 

 

Besides with writing to an SD I have to set the correct dtb / uboot which is not a hard thing but with Multitool this is perhaps done directly/automatically.

 

 

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