Jump to content

Ambian TV box rk3528


bigpolyrenta

Recommended Posts

there is no open source support for rk3528 there yet, so no chance to get anything working - warpme has started to work on it for the minimyth2 project, but even that is in very early stages and i think still very far to be really useable ... so no way to run armbian or linux on such boxes currently ...

Link to comment
Share on other sites

Have a box with rk3528 here and did some work some weeks ago, mainly to get a kernel and multitool running on it.

It works, but I didn't publish an image for it yet (only available in source code), plus my board does not want to boot from sdcard and had no time and no will to further study it better.

Link to comment
Share on other sites

I was able to run Armbian on DQ08.

You need to use .dtb from Android (you can find it in boot partition). And use the Armbian build for hinlink-h28k:

 

./compile.sh build BOARD=hinlink-h28k BRANCH=legacy BUILD_DESKTOP=yes BUILD_MINIMAL=no DESKTOP_ENVIRONMENT=mate DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base EXPERT=yes KERNEL_GIT=shallow RELEASE=jammy

 

Somehow it works. But you need more changes in the config to make it work better.

After changes in device tree and linux-rk35xx-legacy.config: I have Lima (GPU driver for Mali-450) working, HDMI working, TV-out working, TV-audio working. But I can't get HDMI-audio to work (there is a driver, but still no sound).

Link to comment
Share on other sites

The DQ08 board has working serial console @1500000bps, where one can see the u-boot and kernel log.

Can't wait for wiping this android spyware from eMMC and installing Debian 🤩

U-Boot SPL board init
U-Boot SPL 2017.09-g0fbedd0675-230404 #zyf (Apr 11 2023 - 09:25:18)
...
U-Boot 2017.09 (Aug 08 2023 - 02:31:42 +0800)
Model: Rockchip RK3528 Evaluation Board
Bootdev(atags): mmc 0
MMC0: HS400 Enhanced Strobe, 200Mhz
PartType: EFI
Android 13.0, Build 2023.3, v2
boot mode: None
Device is: UNLOCKED
DTB: rk-kernel.dtb
Model: Rockchip RK3528 DEMO1 LP4 V10 Board
...
Hit key to stop autoboot('CTRL+C'):  0
ANDROID: reboot reason: "(none)"
Vboot=0, AVB images, AVB verify
read_is_device_unlocked() ops returned that device is UNLOCKED
avb_slot_verify.c:763: ERROR: vbmeta: Error verifying vbmeta image: OK_NOT_SIGNED
...
Booting Linux on physical CPU 0x0000000000 [0x410fd034]M
Linux version 5.10.157 (user@epyc) (Android (8490178, based on r450784d) clang version 14.0.6 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6), LLD 14.0.6) #1 SMP PREEMPT Mon Aug 7 22:09:04 CST
Machine model[[0m: Rockchip RK3528 DEMO1 LP4 V10 Board
...
wlan_platdata_parse_dt: wifi_chip_type = rtl8822cs
wlan_platdata_parse_dt: 5nable wifi power control.
wlan_platdata_parse_dt: wifi power controled by gpio.
wlan_platdata_parse_dt: WIFI,poweren_gpio = 106 flags = 0.
wlan_platdata_parse_dt: WIFI,host_wake_irq = 107, flags = 0.

bluetooth_platdata_parse_dt: get property: uart_rts_gpios = 98.
bluetooth_platdata_parse_dt: get property: BT,reset_gpio = 114.
bluetooth_platdata_parse_dt: get property: BT,wake_host_irq = 113.
...
mmc0: new ultra high speed SDR104 SDIO card at address 0001

mmc2: new HS440 Enhanced strobe MMC card at address 0001
mmcblk2: mmc2:0001 95"000 58.7 GiB

dhd_os_open_image: /vendor/etc/firmware/fw_bcm4335b0_ag.bin (607578 bytes) open success
dhd_os_open_image: /vendor/etc/firmware/nvram_bcm4335.txt (2675 bytes) open success
NVRAM version: SEMCO B62_G3_VID:3388 (4335B0) - FW171.24.16_03/19
dhdsdio_write_vars: Download, Upload and coopare of NVRAM succeeded.

 

Link to comment
Share on other sites

1 hour ago, blust0ne said:

Could you share the changes for HDMI working.

My DQ08 can be booted , but  HDMI console does not work.

Yes, I am preparing all my hacks and patches for publication on github. I will also describe the problems I encountered, some of which I solved. I'm tired of this problem with HDMI audio, maybe someone else can solve it.

 

I don't know why HDMI didn't work for you. I have a problem that sometimes HDMI doesn't work after boot, but I did not look for the reason, because this rarely happens to me.

Link to comment
Share on other sites

33 minutes ago, jpegqs said:

 

I don't know why HDMI didn't work for you. I have a problem that sometimes HDMI doesn't work after boot,

https://4pda.to/forum/index.php?showtopic=1072221&st=200#entry125174444

 

 

 

What is your board revision, I have the last one.

 

vontar R3 the original  - pcb FX-RK3528-D4  

DQ08 with pcb FX-RK3528-D4   - low cost wifi version

DQ08 with pcb FX-RX3528-D4   - low cost wifi and remove PMIC

 

Edited by blust0ne
Link to comment
Share on other sites

I share the monitor between my computer and TV-box. I connect power to the TV-box and switch to HDMI from the TV-box through the monitor menu.

 

If I boot from a USB flash drive (you need the correct build of U-Boot written on the EMMC), then I always manage to switch the monitor to see the Armbian boot logo, or even the logo from U-Boot, then HDMI always works.

 

If I boot from an SD card, Armbian boots much faster and I don't have much time to switch the monitor to the TV-box. It seems to me that HDMI does not work when Armbian does not see the connected monitor at some boot stage. I believe this is a problem similar to the one described in this thread.

 

I did not open the DQ08 box because I don't see how to do this without damaging the case. I also have the H96MAX M1 (on the same chip) that I opened.

 

I also don’t understand what multitool you are talking about, I haven't used it. I used rkflashtool.

Link to comment
Share on other sites

I have DQ08 with pcb FX-RX3528-D4.

 

The original u-boot for android (when android boot image correct) enable the HDMI for logo display.

 

ANDROID: fdt overlay OK

vdd_logic init 900000 uV

vdd_cpu init 953000 uV

Warn: can't find phy driver

Warn: can't find phy driver

Model: Rockchip RK3528 DEMO1 LP4 V10 Board

Rockchip UBOOT DRM driver version: v1.0.1

VOP have 2 active VP

vp0 have layer nr:3[0 2 3 ], primary plane: 2

vp1 have layer nr:2[8 9 ], primary plane: 9

disp info 0, type:11, id:0

use default hdmi phy table

 

*** pause with ctrl+c  and insert microsd  (h28k armbian image installed)

       and mmc rescan and then run bootcmd_mmc0  the hdmi working..   mainline kernel does not work with this method ( miniarch 6.4 / 6.5 kernels)

 

So, I make android boot  image with armbian kernel, initrd and android recovery image by https://github.com/cfig/Android_boot_image_editor.

 

I can boot on eMMC with HDMI enabled.

 

the partition  looks 

 

Number Start (sector) End (sector) Size Code Name

1 8192 16383 4.0 MiB FFFF security

2 16384 24575 4.0 MiB FFFF uboot

3 24576 32767 4.0 MiB FFFF trust

4 32768 40959 4.0 MiB FFFF misc

5 40960 49151 4.0 MiB FFFF dtbo

6 49152 51199 1024.0 KiB FFFF vbmeta

7 51200 255999 100.0 MiB 8300 boot

8 256000 460799 100.0 MiB 8300 recovery

9 460800 122142686 58.0 GiB 8300

 

I manually copied the kernel , initrd and rootfs to eMMC.

Edited by blust0ne
Link to comment
Share on other sites

I think it's good to keep preinstalled Android because Android contains the settings and firmware needed to use the hardware. I see no point in rewriting Android when you can boot from an SD card.

 

14 minutes ago, blust0ne said:

The original u-boot for android enable the HDMI for logo display.


I think this is due to a buggy code that initializes HDMI to display the logo. It doesn't work if the logo can't be found. Not only that, it can (pseudo-randomly) crash in U-Boot if it can't find the logo. I solved this problem with a patch to U-Boot.

 

Spoiler


diff --git a/drivers/video/drm/rockchip_display.c b/drivers/video/drm/rockchip_display.c
index d95d77b..8a58cc4 100644
--- a/drivers/video/drm/rockchip_display.c
+++ b/drivers/video/drm/rockchip_display.c
@@ -1169,6 +1169,17 @@ static int load_bmp_logo(struct logo_info *logo, const char *bmp_name)
 	if (!header)
 		return -ENOMEM;
 
+#if 1
+	logo->width = logo->height = 256; logo->bpp = 24;
+	dst_size = logo->width * logo->height * logo->bpp >> 3;
+	dst = get_display_buffer(dst_size);
+	if (!dst) { ret = -ENOMEM; goto free_header; }
+	memset(dst, 127, dst_size);
+	logo->offset = logo->ymirror = 0; logo->mem = dst;
+	memcpy(&logo_cache->logo, logo, sizeof(*logo));
+	flush_dcache_range((ulong)dst, ALIGN((ulong)dst + dst_size, CONFIG_SYS_CACHELINE_SIZE));
+	goto free_header;
+#endif
 	len = rockchip_read_resource_file(header, bmp_name, 0, RK_BLK_SIZE);
 	if (len != RK_BLK_SIZE) {
 		ret = -EINVAL;

 

 

This patch creates a gray square instead of a logo.

Link to comment
Share on other sites

1 hour ago, jpegqs said:

If I boot from a USB flash drive (you need the correct build of U-Boot written on the EMMC),

 

The rk3528's u-boot with correct android boot image can enable the HDMI.

And then the kernel show this message

                inno-hdmi-phy ffe00000.hdmiphy: phy had been powered up

,     hdmi working..

 

        /*
         * reg0xe9 default value is 0xe4, reg0xea is 0x50.
         * if phy had been set in uboot, one of them will be different.
         */
        if ((inno_read(inno, 0xe9) != 0xe4 || inno_read(inno, 0xea) != 0x50)) {
                dev_info(inno->dev, "phy had been powered up\n");
                inno->phy->power_count = 1;
 

In my guess,

rk3528 u-boot can enable the hdmi,

but rk3528's kernel code does not enable the hdmi yet.

 

Link to comment
Share on other sites

This may be related to specific devices. One person wrote to me that it works for him.

 

Last week I did some tests. A cheap Chinese TV (on the common v59 controller) and a small no-name display for Raspberry Pi do not work. But it works with the ASUS monitor. And both work after booting the TV-box with the connected ASUS monitor.

Link to comment
Share on other sites

13 hours ago, jpegqs said:

Last week I did some tests. A cheap Chinese TV (on the common v59 controller) and a small no-name display for Raspberry Pi do not work. But it works with the ASUS monitor. And both work after booting the TV-box with the connected ASUS monitor.

 

If you try to add this patch:

https://github.com/armbian/build/pull/5723

Link to comment
Share on other sites

The patch you suggest checking applies to code that doesn't exist in the 5.10 kernel.

 

I don't understand exactly how this works. I was able to connect a 10 year old LG monitor. But it didn't work when I connected it to the TV-box and turned on the TV-box. It worked when I first turned on the TV-box, and then after a few seconds I connected HDMI from the turned on monitor. But you can simply turn on the monitor after turning on the TV box. Preinstalled Android from this TV-box always sees HDMI connection, so this is a software problem.

Link to comment
Share on other sites

9 hours ago, jpegqs said:

But you can simply turn on the monitor after turning on the TV box.

That's it works.

But it is necessary to turn on the monitor button every time after turning on the TV box.

 

9 hours ago, jpegqs said:

so this is a software problem.

How to fix it?

Edited by Energokom
Link to comment
Share on other sites

I can guess that at the beginning of initialization the driver checks for an HDMI connection, if there is a connection, then some error occurs in the driver. If HDMI is connected after, then the error no longer occurs. I don't know where the problem code might be.

Link to comment
Share on other sites

So, I got this to boot from USB on an HK1 RBOX with a rk3528. It was a very cheap android TV box, I believe it was like $20 shipped. I compiled my own Ubuntu kernel and went through a bunch of manual entries and probing parameters and I'm convinced that if I can get the time to work on it, I can make this work on this particular box from an sdcard without the end user doing anything except flashing a .img to it *hopefully*, keeping the original system completely intact. Hopefully I'll get time, but if someone else has this box then I'm posting to say that it's 100% possible to run Linux, but I can't say if everything is 100% working or not yet. Bootscripts seem to be giving me trouble, so right now I'm doing everything manually every step of the way until I can look into it. Some of the hints I used came from jpegqs, and the rest was just poking around for correct parameters. I kept the factory installed uboot on the device, which has an interrupt mode, and from there you can go through and check a lot of things. I'll post back here if I ever get around to making a simple sdcard image

Link to comment
Share on other sites

I compiled the rk3528 linux image from the rk3588 linux sdk ,Rockchip's official linux sdk image can be burned to emmc using factorytool.  I've only compiled the base linux firmware, I'm still learning how to modify and debug the rest.

20240130_164559.jpg

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