Jump to content

CSC Armbian for RK3318/RK3328 TV box boards


jock

Recommended Posts

For my H96 Max 4GB 64GB box, the Debian Buster minimal - legacy kernel (Built date 2021-04-16) boots up fine after burning it to the emmc using the multitool image. Wired connection works fine, but the wifi does not work (the interface shows up, but nmtui is unable to connect to access point).

 

But other images (Debian Buster minimal - mainline kernel, and Ubuntu Focal desktop [xfce], built date 2021-05-30) does not boot (I think). Specifically, after burning to emmc with multitool image, when I plug the box in, HDMI output remains dark.

 

I saw on the forum that some people managed to get the exact same box to boot.

 

I'll appreciate any help with trouble shooting to figure out what I am doing wrong.

Link to comment
Share on other sites

14 minutes ago, serat said:

For my H96 Max 4GB 64GB box, the Debian Buster minimal - legacy kernel (Built date 2021-04-16) boots up fine after burning it to the emmc using the multitool image. Wired connection works fine, but the wifi does not work (the interface shows up, but nmtui is unable to connect to access point).

 

But other images (Debian Buster minimal - mainline kernel, and Ubuntu Focal desktop [xfce], built date 2021-05-30) does not boot (I think). Specifically, after burning to emmc with multitool image, when I plug the box in, HDMI output remains dark.

 

I saw on the forum that some people managed to get the exact same box to boot.

 

I'll appreciate any help with trouble shooting to figure out what I am doing wrong.

Hello. At the bottom of the first post there are some useful things you can share to help you.

In particular, serial logs and photos of the board are important, because H96 Max is just the market name, but the board hardware often differs.

Link to comment
Share on other sites

Hi,

 

Newbie here. I have an old CloudGate TV Box. It's an RK3188 based unit that I want to try an repurpose for Home Automation.

 

I downloaded the multitool image, used BalenaEtcher to burn it to an SD Card. Popped the SD Card into the TV Box and turned it on.

 

Unfortunately it just booted into the standard Android OS not the multitool. If I use the file explorer on the box it can see the SD Card and the files on it.

 

Am I missing a step? Or is there something I need to do to boot from SD?

 

thanks.

Link to comment
Share on other sites

7 hours ago, camsaway said:

@jock - Thanks for this work. I've played some more and it seems that if I jump straight to burning the Armbian image to my SD Card then it boots from SD happily. No HDMI output but if I SSH and I can get to the logon.

So this feels like it might be a problem with the image I've downloaded of the multi-tool. I've tried downloading again from the link at the start of this post but still the same issue. Can you post another image of the multi-tool and an MD5/SHA signature so I can validate my download?

In the previous post you stated your box is an rk3188 box, this is the thread for rk3318.

If your box is an rk3318, please provide as many as possible of the things described in the first post (logs, photos, original dtb), otherwise it is impossible to help.

HDMI issues are common if cable is cheap, or the monitor less non usual resolution (like 1920x1200, for example)

 

Link to comment
Share on other sites

15 hours ago, jock said:

In the previous post you stated your box is an rk3188 box, this is the thread for rk3318.

If your box is an rk3318, please provide as many as possible of the things described in the first post (logs, photos, original dtb), otherwise it is impossible to help.

HDMI issues are common if cable is cheap, or the monitor less non usual resolution (like 1920x1200, for example)

 

:rolleyes:Sorry - you are right. With all the searching, didn't realise I had stumbled on an RK3318 post. My box is RK3188.

I will use the images from @balbes150 but can you point me to a tool like multitool but for RK3188?

Link to comment
Share on other sites

I had missed this thread thinking it was only about RK3318 devices, but do I understand it correctly if I say it's for RK3328 devices as well? 

I have a H96 Max Plus RK3328 4/64 box that I've been fighting with for a while. I mostly have had problems with the WiFi.

Reading through this thread seems to show that the ap6330 WiFi I have isn't impossible after all. I've mostly had problems finding a good dtb, that includes it. 

Would there be a chance that this would work on my box? 

Link to comment
Share on other sites

6 hours ago, curse said:

I had missed this thread thinking it was only about RK3318 devices, but do I understand it correctly if I say it's for RK3328 devices as well? 

I have a H96 Max Plus RK3328 4/64 box that I've been fighting with for a while. I mostly have had problems with the WiFi.

Reading through this thread seems to show that the ap6330 WiFi I have isn't impossible after all. I've mostly had problems finding a good dtb, that includes it. 

Would there be a chance that this would work on my box? 

Yeah, you're right: the thread title is a bit misleading, because rk3318 and rk3328 are fundamentally the same chip.

It is so because I have no rk3328 to work on, so can't guarantee and test anything on that. People reported that the images works as well on rk3328 boards, so you're invited to try and report if it works for you.

There are good chances that the images works fine, and ap6330 is well supported in mainline kernel, including bluetooth!

Link to comment
Share on other sites

Sweet. I'll do some testing and get back to you. 

 

Edit

Testing done. 

Most things seem to work. 

Ethernet OK

HDMI Video out OK

HDMI Audio Ok

Bluetooth Audio OK

 

However, I don't seem to be able to connect to WiFi. Odd since Bluetooth and WiFi is the same chip. Armbian-Config and nmcli see it, it also shows the available networks but when trying to connect. No luck. 

rk3318-config says that I have a Broadcom BCM4335/AmPac AP6334 chip. 

Somehow the WiFi times out after 90 seconds and after it has asked me twice for the password, which I know is correct. 

Also, no network settings icon is visible near the clock where the sound and Bluetooth icons are. 

No Web Browser seems to be installed, though the menu item for Web Browser is there. No problem since I had ethernet and could install a Web Browser (and without ethernet or wifi, there is no need for a browser) 

So... H96 Max plus (written with a '+'). RK3328. 4GB RAM and 64GB eMMC. Confirmed mostly working. 

 

Next edit

The version I tried was: Armbian 21.08 - Ubuntu Focal desktop [xfce] - mainline kernel 5.10.41 - Build date: 2021-05-30

Edited by curse
Link to comment
Share on other sites

@curse

Sorry for the late answer, but I just spot the post edit right now.

 

wlan and bluetooth, despite being on the same chip, are connected to the SoC in different ways: wlan is connected via high-speed sdio bus, bluetooth via common UART; also they are physically different chip parts that just share some things (the radio part), so it may happen that one work and the other does not.

 

Since rk3318-config correctly reports the right chip, it is attached to the right sdio bus.

Now there there may be some board peculiarities that does not make it work.

 

In the first post of this thread there are some good things that help in debugging, in particular if you can provide photos of the board and the original firmware or the original dtb I can inspect it and try solve the issue.

If you can spot some marking/signatures on the board, you can see if there is a match in rk3318-conf when it asks for "led/gpio configuration".

 

At the moment there are just two supported boards: YK_RK3328 (found on my HK1 Max) and X88_PRO_B ( @lucky62's box); maybe yours is a different one that require some minor adjustment to make wifi work.

Link to comment
Share on other sites

I saw at the previous page that @Gausushad the same box and the same WiFi problem.

It looks like it should work, but just don't connect. 

@easybhad gotten it to work for Libreelec, he said in a post over there, so it should be possible.

I took a backup of the eMMC yesterday, so I have the original ROM available. I also extracted the dtb a few months ago but it's on my desktop Linux computer at home in Spain and I'm currently in Sweden visiting family I haven't seen in almost two years(pre-pandemic), but I can probably figure out how to do it on my MacBook or on Windows from the original ROM.

Or perhaps it's easier to install xubuntu in VirtualBox... 

Thanks for the help so far @jock. At least I have come further than before. 

Link to comment
Share on other sites

By using this script -> extract-dtb

I managed to extract some dtb files on my mac from the tvbox-backup file Multitool created.

I assume that you @jock know more than me about dtb files, any of them that are more interesting than the others?

./extract_dtb.py tvbox-backup
Dumped 00_kernel, start=0 end=9267808
Dumped 01_dtbdump_rockchip,rk3328-evb.dtb, start=9267808 end=10316384
Dumped 02_dtbdump_rockchip,rk3328-evb.dtb, start=10316384 end=11364960
Dumped 03_dtbdump_rockchip,rk3328-evb.dtb, start=11364960 end=12413536
Dumped 04_dtbdump_rockchip,rk3328-evb.dtb, start=12413536 end=76546112
Dumped 05_dtbdump_Rockchip_RK3128h_liantong_board.dtb, start=76546112 end=117966848
Dumped 06_dtbdump_rockchip,rk3328-box-avb.dtb, start=117966848 end=160110592

 

Edit

I managed to make dts files from all except 00_kernel. Looking through them, it looks like the 6th is the most interesting.

It's the only one with any mention of wireless or wlan. (the relevant parts, copy/pasted)

wireless-bluetooth {

			uart0-gpios {
				rockchip,pins = <0x01 0x0a 0x00 0x7e>;
				phandle = <0x99>;
			};
		};

--------------------------------------------------------
	wireless-bluetooth {
		compatible = "bluetooth-platdata";
		uart_rts_gpios = <0x71 0x0a 0x01>;
		pinctrl-names = "default\0rts_gpio";
		pinctrl-0 = <0x98>;
		pinctrl-1 = <0x99>;
		BT,power_gpio = <0x71 0x15 0x00>;
		BT,wake_host_irq = <0x71 0x1a 0x00>;
		status = "okay";
	};

	wireless-wlan {
		compatible = "wlan-platdata";
		rockchip,grf = <0x1c>;
		wifi_chip_type = "ap6330";
		sdio_vref = <0x708>;
		WIFI,host_wake_irq = <0x71 0x13 0x00>;
		status = "okay";
	};

------------------------------------------------------

uart0_gpios = "/pinctrl/wireless-bluetooth/uart0-gpios";

 

06_dtbdump_rockchip,rk3328-box-avb.dts

Edited by curse
Looked at the dts files and added the 6th.
Link to comment
Share on other sites

@curse

I'm looking into the dtb and everything seems to be in place.

I see that the dtb tells the wifi chip is ap6330, but rk3318-box detects ap6334. They are two different chips, could you please try to change wlan-ap6334 to wlan-ap6330 in /boot/armbianEnv.txt file?

I see there are many clones here and there, maybe some cloned the wrong id.

 

edit: photos of the board and logs (dmesg) are still particularly appreciated

 

edit2: BTW the behaviour you are describing is often related to a wrong nvram.

First restore wlan-ap6334 in /boot/armbianEnv.txt, then download this file and write over the existing /lib/firmware/brcm/brcmfmac4334-sdio.rockchip,rk3318-box.txt file.

You may even try this other version to see if it works and/or has better performance.

Link to comment
Share on other sites

Restored wlan-ap6334 to wlan-ap6330, then tried without changing firmware txt, then tried with the first, then with the second, with a reboot between the different changes. Still no luck on the wifi.

Adding the dmesg and also the output from a journalctl command nmcli told me to try yesterday.

 

nmcli connection up TP-Link_Guest_DC24 --ask
Passwords or encryption keys are required to access the wireless network 'TP-Link_Guest_DC24'.
Password (802-11-wireless-security.psk): •••••••••
Passwords or encryption keys are required to access the wireless network 'TP-Link_Guest_DC24'.
Password (802-11-wireless-security.psk): •••••••••
Error: Connection activation failed: Secrets were required, but not provided
Hint: use 'journalctl -xe NM_CONNECTION=3428676b-6d74-424f-bd6e-de783780a395 + NM_DEVICE=wlan0' to get more details.

 

I haven't opened the box yet, so no photos, but I can probably do that during the week.

With some luck I can continue to tinker some tomorrow, then probably Monday, I'll travel on to my mom's place (am visiting my sister now), where I won't have easy access to ethernet for the box, only WiFi, and slightly more problematic to download test files to it, but I'll manage. I guess I can use the good old manual way with a USB stick :)

Thanks for all the help so far @jock

dmesg.txt NM_CONNECTION.txt

Link to comment
Share on other sites

@curse

I think I spot the issue: from dmesg I see that the brcmfmac driver is using the standard nvram file, but the standard nvram does not work because it is for BCM4334 and not for AP6334.

This time I propose you to paste this file over /lib/firmware/brcm/brcmfmac4330-sdio.txt, reboot and try again.

 

If the problem is that one, it is very strange because the driver is supposed to find automatically the right nvram file, it has always worked that way but for some reason this time does not.

Link to comment
Share on other sites

I think I have messed some things up, now it doesn't find the Wi-Fi at all. Oh well. I'll start fresh with a clean install tomorrow or the day after, fix the changes and get back to you. 

Should I start with ap6330 or ap6334 in /boot/armbianEnv.txt?

Should I change to any of the lib/firmware/brcm/brcmfmac4334-sdio.rockchip,rk3318-box.txt before I change the lib/firmware/brcm/brcmfmac4330-sdio.txt? 

 

Link to comment
Share on other sites

12 hours ago, curse said:

I think I have messed some things up, now it doesn't find the Wi-Fi at all. Oh well. I'll start fresh with a clean install tomorrow or the day after, fix the changes and get back to you. 

Should I start with ap6330 or ap6334 in /boot/armbianEnv.txt?

Should I change to any of the lib/firmware/brcm/brcmfmac4334-sdio.rockchip,rk3318-box.txt before I change the lib/firmware/brcm/brcmfmac4330-sdio.txt? 

 

Stick with the autodetected (ap6334).

Just follow the instructions in this last post: https://forum.armbian.com/topic/17597-csc-armbian-for-rk3318-tv-box-boards/?do=findComment&comment=127240

Link to comment
Share on other sites

Hello,

just a few words to thank You. I have a HK1-MAX and was sitting in a drawer for a couple of years after worked as TV box until I upgraded with another one.

So... I followed all the steps and worked like a charm. Just the rk3318-config is missing but I don't know if is necessary.

I installed PI-hole and works fine.

Thank You a lot

Link to comment
Share on other sites

has there been any new stuff found for the HK1 Max (RK3318) and i have the android 10 build for it along with a version for h96 max as well i hope the dtb data on mine can be looked at.

my wifi chip is marked on the shield as hk6334q

and the board silkscreen says it is an RK3328_Board with 4GB ram and 64GB and the default 6334 autodetect wifi driver seems to work.

should i use legacy , mainline , development ?

my vfd clock screen won't work all i get is the red blue led

also the remote doesn't work either...

bluetooth and wifi seems good for the most part.

could the vfd and remote be added into the dtb for rk3318-box (HK1 Max , and boards marked as rk3328 / H96 Max (RK3318)

the hk1 max circle pcb is green and does not include an optical audio jack so some dtb files might not have it enabled because it is un-populated on the pcb.

and the hk1 max was labeled on the packaging and on the puck box as rk3318 and rk3328 on the pcb sticker and silkscreen and the barcode label says hk1 max rk3328 4G 64G and 6334q

so is there any other stuff needed other than the dtb? i'll have to dump it soon...

 

Link to comment
Share on other sites

here is the firmware for h96 max based on rk3318/rk3328 avb board

https://drive.google.com/file/d/1uSf2JjMyGuIveo4mqA9m0z_IFA-fn5-Y/view?usp=sharing

magisk not needed comes pre rooted with su in /system/xbin (Android 10)

 

and here is the firmware that came on my hk1 max.

https://drive.google.com/file/d/1lDCOKQFPolZF9DKtISKvlYuSdqbgC7ea/view?usp=sharing

can't remember if it is pre rooted but these two files are the exact ones that the dtb dumps came from using extract_dtb on the Boot.img file for both of them.

 

Hope This Helps.

Edited by RetroFan90
new link
Link to comment
Share on other sites

here are the photos for my device

for some odd reason the heatsink was not making contact to the cpu and the cpu is marked

RK3318

SBAKU28043 2039
9F22126 000

And the board silkscreen says :

YX_RK3328_8D4_V1.0
2019.01.15

and the info sticker says : 
3318 D011?

QC2 4+64+6334Q

and the Wi-Fi can says :

HK6334Q

J318234M

2006

and the other silkscreen marking is :

..2047

NCSD

 

Sorry For The Wall Of Text, But I Hope This Helps.

Images Taken With An iPad mini Wifi on iOS 9.3.5 in HDR

HK6334Q Wi-Fi.JPG

MaskROM Pins.JPG

NCSD(..2047).JPG

RK3318 CPU.JPG

YX_RK3328_8D4_V1.0(2019.01.15).JPG

3318 D011(QC2_4+64+6334Q).JPG

Edited by RetroFan90
Added Camera Info For Photos Shown.
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