Jump to content

Efforts to develop firmware for Vontar KK Max 8gb/128gb"


gersones

Recommended Posts

Vontar KK Max 8gb/128gb:

H1bb3ee5bf5894ea8b7eb0829ca40e15bx.png

 

H8b82c352ce8b40b5882a497728da4ede8.jpg_6

 

 

Original Android 11 ROM image

 

Which tag do I put (required field) since there's no rk3566 available and the Armbian image that worked for me is the station-m3 ones?

 

DTB files:

01_dtbdump_rockchip,rk3566-box-demo-v10.dtb

(can't attach: "Sorry, an unknown server error occurred when uploading this file.

(Error code: -200)" message)

ok 02_dtbdump_rockchip,rk3566-box-demo-v10.dtb

ok 03_dtbdump_rockchip,rk3566-box-demo-v10.dtb 

*obtained using the extract-dtb tool

I don't know how to join these into a single .dtb to point at into the working Armbian /boot/extlinux/extlinux.conf file.

 

the only .dtb file that worked for me with the station-p2 (not posted here because it crashes and won't boot anymore if I made run "apt upgrade" which would be desirable) station-m3 image but only recognizes 4gb RAM:

rk3566-firefly-roc-pc.dtb

(idk if this is due a kernel's limitation or the hardware information contained in this .dtb file)

if somebody could tell me...

 

Loader file:

ok MiniLoaderAll.bin

 

uBoot file:

uboot.img

(can't attach: "Sorry, an unknown server error occurred when uploading this file.

(Error code: -200)" message)

 

Edited by gersones
forgot one dtb file
Link to comment
Share on other sites

3 hours ago, gersones said:

I don't know how to join these into a single .dtb to point at into the working Armbian /boot/extlinux/extlinux.conf file.


@gersones you have 1 device, and your android ROM have 3 different DTB's

so we conclude that your device has 3 different types, with variations that can be LAN or video, usb, some variations have.

 


now you will need to decompile the DTB file onto DTS.
On linux:
 

dtc -I dtb -O dts -o 01-android.dts 01-android.dtb

 

dtc -I dtb -O dts -o 02-android.dts 02-android.dtb

 

dtc -I dtb -O dts -o 03-android.dts 03-android.dtb

 

these 3 files will be necessary for the other users who will ask you for the armbian image and will not be able to run it, because their device is another one of these three. so let's do the total process for the 3 files.
 

post here the 3 decompiled dts files from android

Link to comment
Share on other sites

dts files

01_rk3566-box-demo-v10.dts

02_rk3566-box-demo-v10.dts

03_rk3566-box-demo-v10.dts

 

running the dtc command returned many warning messages like the one below, so I'm not sure if it worked...

Quote

dtc -I dtb -O dts -o 03_rk3566-box-demo-v10.dts 03_dtbdump_rockchip,rk3566-box-demo-v10.dtb

 

03_rk3566-box-demo-v10.dts: Warning (unit_address_vs_reg): /reserved-memory/linux,cma: node has a reg or ranges property, but no unit name
03_rk3566-box-demo-v10.dts: Warning (unit_address_vs_reg): /hdmi@fe0a0000/ports/port: node has a reg or ranges property, but no unit name
03_rk3566-box-demo-v10.dts: Warning (unit_address_format): /reserved-memory/drm-logo@00000000: unit name should not have leading 0s
03_rk3566-box-demo-v10.dts: Warning (unit_address_format): /reserved-memory/drm-cubic-lut@00000000: unit name should not have leading 0s
03_rk3566-box-demo-v10.dts: Warning (pci_device_reg): /pcie@fe260000/legacy-interrupt-controller: missing PCI reg property
03_rk3566-box-demo-v10.dts: Warning (avoid_unnecessary_addr_size): /dsi@fe060000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
03_rk3566-box-demo-v10.dts: Warning (avoid_unnecessary_addr_size): /dsi@fe070000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
03_rk3566-box-demo-v10.dts: Warning (unique_unit_address): /mipi-dphy@fe850000: duplicate unit-address (also used in node /video-phy@fe850000)
03_rk3566-box-demo-v10.dts: Warning (unique_unit_address): /reserved-memory/drm-logo@00000000: duplicate unit-address (also used in node /reserved-memory/drm-cubic-lut@00000000)
03_rk3566-box-demo-v10.dts: Warning (graph_child_address): /syscon@fdc60000/lvds/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
03_rk3566-box-demo-v10.dts: Warning (graph_child_address): /syscon@fdc60000/rgb/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
03_rk3566-box-demo-v10.dts: Warning (graph_child_address): /dsi@fe060000/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
03_rk3566-box-demo-v10.dts: Warning (graph_child_address): /dsi@fe070000/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
03_rk3566-box-demo-v10.dts: Warning (graph_child_address): /hdmi@fe0a0000/ports: graph node has single child node 'port', #address-cells/#size-cells are not necessary
03_rk3566-box-demo-v10.dts: Warning (graph_child_address): /edp@fe0c0000/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
03_rk3566-box-demo-v10.dts: Warning (graph_port): /hdmi@fe0a0000/ports/port: graph node unit address error

 

Link to comment
Share on other sites

42 minutes ago, gersones said:

running the dtc command returned many warning messages like the one below, so I'm not sure if it worked...


these warnings are only for being an android dts instead of a linux dts, nothing to worry about

now you have to work on these files, if your device has an sd card it is easier, because you will just put the dtb file inside the sd card and test it

 

16 hours ago, mmie4jbcu said:

As @hotnikq mentioned in his comment, please go through the links he shared. Feel free to ask here about any follow up questions.

To directly answer your question, dtb files are found usually under the dtb directory in the /boot directory. If you have written an armbian image onto a sdcard, you can insert in your computer and browse to where it is mounted. The dtb files for rockchip will be in /boot/dtb/rockchip directory.

The extlinux.conf file is used to define the path to kernel as well as the dtb file. In extlinux.conf, you can update the dtb path  to whatever dtb you want to use.

 

this is all you need to create this image,
first step:
Compile armbian on linux desktop station-p2 mainline https://docs.armbian.com/Developer-Guide_Build-Preparation/

dont forgot to do it with modified DTS file that you edit like the example

How?

SET the armbian compilator to build custom kernel
build,
When the compilator stop to modify your kernel:
drop the DTS inside the arch/arm64/boot/dts/rockchip folder that contains the DTS files

since the modified file is inside the folder you can acept the kernel modifications and Run the build for station-p2 and BOOOOOOM 

 

 

1 hour ago, gersones said:

the only .dtb file that worked for me with the station-p2

 

You will find it here https://github.com/armbian/linux-rockchip/tree/rk-5.10-rkr4/arch/arm64/boot/dts/rockchip 
or inside your armbian compilator folder arch/arm64/boot/dts/rockchip (better files)

 

you will need a lot of calm and patience to carry out the translations
 

How you can make this android DTS work on linux:
Like i said:

https://forum.armbian.com/topic/28841-efforts-to-develop-firmware-for-hk1-rbox-r2-4g64g/?do=findComment&comment=166788

 

On 6/16/2023 at 6:39 PM, hotnikq said:

Use this calculator to compare ports from original android HEX and set it up decimal number for linux...

 

Lets Start with an example:

 

On Vontar KK max Android DTS you have:

 

Quote

leds {
        compatible = "gpio-leds";
        status = "okay";

        power-green {
            gpios = <0x35 0x1b 0x01>;
            linux,default-trigger = "none";
            default-state = "off";
        };

        power-red {
            gpios = <0x35 0x1c 0x00>;               //////// 0x35 is a phandle for gpio@fdd60000 and 0x1c is the pin 0x00 is State
            linux,default-trigger = "none";
            default-state = "off";
        };
    };


        gpio@fdd60000 {
            compatible = "rockchip,gpio-bank";
            reg = <0x00 0xfdd60000 0x00 0x100>;
            interrupts = <0x00 0x21 0x04>;
            clocks = <0x31 0x2e 0x31 0x0c>;
            gpio-controller;
            #gpio-cells = <0x02>;
            gpio-ranges = <0x11b 0x00 0x00 0x20>;
            interrupt-controller;
            #interrupt-cells = <0x02>;
            phandle = <0x35>;                                             ////// 0x35 is the definition for phandle of  gpio@fdd60000
        };

aliases {
        gpio0 = "/pinctrl/gpio@fdd60000";             /////////   gpio@fdd60000  is the address for   gpio0

            }

 

and on Linux Rockchip:

Quote


    gpio0: gpio@fdd60000 {
            compatible = "rockchip,gpio-bank";
            reg = <0x0 0xfdd60000 0x0 0x100>;
            interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>;
            gpio-controller;
            gpio-ranges = <&pinctrl 0 0 32>;
            #gpio-cells = <2>;
            interrupt-controller;
            #interrupt-cells = <2>;
        };

 

The following example could be used to describe GPIO pins used as device enable
and bit-banged data signals:

    gpio1: gpio1 {
        gpio-controller;
        #gpio-cells = <2>;
    };
    [...]

    data-gpios = <&gpio1 12 0>,
             <&gpio1 13 0>,
             <&gpio1 14 0>,
             <&gpio1 15 0>;

In the above example, &gpio1 uses 2 cells to specify a gpio. The first cell is
a local offset to the GPIO line and the second cell represent consumer flags,
such as if the consumer desire the line to be active low (inverted) or open
drain. This is the recommended practice.

 

 

#define RK_PA0    0       
#define RK_PA1    1      
#define RK_PA2    2       
#define RK_PA3    3       
#define RK_PA4    4       
#define RK_PA5    5       
#define RK_PA6    6       
#define RK_PA7    7       
#define RK_PB0    8       
#define RK_PB1    9       
#define RK_PB2    10       
#define RK_PB3    11       
#define RK_PB4    12       
#define RK_PB5    13       
#define RK_PB6    14       
#define RK_PB7    15       

#define RK_PC0    16       
#define RK_PC1    17       
#define RK_PC2    18       
#define RK_PC3    19       
#define RK_PC4    20       
#define RK_PC5    21       
#define RK_PC6    22       
#define RK_PC7    23       

#define RK_PD0    24       
#define RK_PD1    25       
#define RK_PD2    26       
#define RK_PD3    27       
#define RK_PD4    28       
#define RK_PD5    29       
#define RK_PD6    30       
#define RK_PD7    31       

 

So we can do an Vontar KK MAX compatible:

Quote

  leds {
        compatible = "gpio-leds";
        status = "okay";

        power-green {
            gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
            linux,default-trigger = "none";
            default-state = "off";
        };

        power-red {
            gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
            linux,default-trigger = "none";
            default-state = "off";
        };
    };

    gpio0: gpio@fdd60000 {
            compatible = "rockchip,gpio-bank";
            reg = <0x0 0xfdd60000 0x0 0x100>;
            interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>;
            gpio-controller;
            gpio-ranges = <&pinctrl 0 0 32>;
            #gpio-cells = <2>;
            interrupt-controller;
            #interrupt-cells = <2>;
        };

 

 

 

do this again and again to adapt the devices in the station-p2 DTS FILE
many times in mainline you can do some tricks like disabling all usb

 

 

 

Edited by hotnikq
Link to comment
Share on other sites

Hints and tricks 

First MOD to do is:
Disabling all USB to test the station-p2 DTS 
if the boot happens, enable only the ones you believe work

how?
on station-p2 DTS inside your armbian compilator folder arch/arm64/boot/dts/rockchip

Quote

&usb2phy0_host {
    phy-supply = <&vcc5v0_usb_host>;
    status = "disabled";
};

&usb2phy0_otg {
    vbus-supply = <&vcc5v0_usb2_otg>;
    status = "disabled";
};

&usb2phy1_host {
    phy-supply = <&vcc5v0_usb_host>;
    status = "disabled";
};

&usb2phy1_otg {
    phy-supply = <&vcc5v0_usb_host>;
    status = "disabled";
};

&usb2phy1 {
    status = "disabled";
};

&usb_host0_ehci {
    status = "disabled";
};

&usb_host0_ohci {
    status = "disabled";
};

&usb_host1_ehci {
    status = "disabled";
};

&usb_host1_ohci {
    status = "disabled";
};

&usb_host1_xhci {
    status = "disabled";
};

 

On 6/20/2023 at 12:54 AM, ewww said:

@hotnikq yes!! disable all usb make it able to boot to user space

 

Edited by hotnikq
Link to comment
Share on other sites

1 hour ago, hotnikq said:

now you have to work on these files, if your device has an sd card it is easier, because you will just put the dtb file inside the sd card and test it

if none of the .dtb files make the system recognize 8gb, that means the kernel or its architecture is the limitation?

 

the 01.dtb crashed at boot (kernel panic)

the 02 and 03.dtb booted recognizing 4gb only but everything else (wifi, lan, audio and even usb 2.0 - didn't test bluetooth) seems to work.

though I did a nand-sata-install (don't remember exactly if this was the command) to the emmc but it didn't boot.

 

I reiterate that these were all tested on a armbian station-m3 (not station-p2, which booted with the rk3566-firefly-roc-pc.dtb but didn't allow me to update the packages in the system).

so are you sure I'll have to make the images with station-p2? (sorry but just want to make sure before I begin).

 

 

thanks for the instructions @hotnikq

this might take many weeks before I post again, okay?

have other work during week days and sometimes even during weekends.

this is just my "playing" time (still don't know if I'm enjoying it or just had nothing else to do lol)

Edited by gersones
forgot about usb 2
Link to comment
Share on other sites

36 minutes ago, gersones said:

03.dtb booted recognizing 4gb only but everything else (wifi, lan, audio - didn't test bluetooth) seems to work.

 

About RAM: the problem is the wrong miniloader.bin on internal MMC 
try flash a different image inside to miniloader.bin detect 8gb RAM

Start with this file

Convert to DTS

Translate it to Linux using the station P2 or M3 base DTS

Apply the example

And test it

 

36 minutes ago, gersones said:

I did a nand-sata-install (don't remember exactly if this was the command) to the emmc but it didn't boot.

 

this only works on original device from image
since you´re messing with different device, it doesn´t work

how can you do an internal MMC image:

all the files on this tutorial came from my device, you will need to extract your own files from your own device

 

6 hours ago, hotnikq said:

apply this method to decompile android image 
share the uBoot files, the miniloader.bin all on your topic

 

 

On 6/8/2023 at 7:16 PM, hotnikq said:

if you wanna do all that creepy again with other devices and images, (please do it on other devices) and topic


this is all you need to create this image,
first step:
Compile armbian on linux desktop

dont forgot to do it with modified DTS file: 

in this case DTB + DTS Files for you to edit because you want to help the community
 

any resemblance to this topic is mere adaptation

 

Mount that image virtual device like /media/armbian_boot

fdisk -l your-armbian-image-for-sd-card.img
mount -o loop your-armbian-image-for-sd-card.img /media/armbian_boot

if you can't "like WSL2"

sudo apt-get install kpartx
sudo kpartx -av your-armbian-image-for-sd-card.img
sudo mount -o loop /dev/mapper/loop0p1 /media/armbian_boot


Second Step:  prepare an sd card or usb flash dummy , can be anithing with 6gb

fdisk /dev/mmcblk1
N
default
default (lower this value to match the size of your root image)
T
1
W


third step: format that flash drive for ext4

mkfs.ext4 /dev/mmcblk1p1

 

fourth step: mount that clear partition and copy the entire virtual drive to the flash device

mount /dev/mmcblk1p1 /mnt

rsync -avx /media/armbian_boot /mnt

 

fifth Step: Edit your uuid From Armbian Boot config "uuid for /dev/mmcblk1p1"

blkid

nano -w /mnt/boot/extlinux/extlinux.conf

sync
umount /mnt


sixth step: make an hardware RAW.img from hardware flash drive with these parameters

sudo dd if=/dev/mmcblk1p1 of=~/root.img bs=4096 status=progress

PS: can be /dev/SDA" I do it on my h96max" so it's mmcblk1

 

now you have an ROOT IMAGE MADE BY YOURSELF!

 

 

On 6/8/2023 at 7:16 PM, hotnikq said:

Update.img
CREATE the Update Image on linux with the rockchip software.
Linux Pack Rockchip Firmware

 

On 6/8/2023 at 7:16 PM, hotnikq said:

Linux_Pack_Firmware/rockdev$ ./mkupdate.sh 

 

Now you create an 2 step trick image for internal MMC
use it like this tutorial: 

 

 

On 6/20/2023 at 9:44 PM, hotnikq said:

This is an internal mmc trick 2-step image!
You no longer need to solder an SD-card Reader like the creepy Release Version v0.5 BETA that i made.
 

and since it's not my device, this tutorial is marked as untested  ✖️
until an adventurous soul arises

How to use it:
- install RKDevTool Drivers Rockchip
- Use RkDevTool v2.86

 

Step 1:
H96MAX 8GB RK3566 UPDATE.img

Extract this file.xz with 7zip

Extract this file.tar with 7zip

Connect Your device:
How? press the back button with a toothpick and connect male to male USB to you computer.

Flash the Update Image on entire device as an Upgrade Firmware

After Complete ! ! Disconect your device ! !

 

step1.jpg

and because I'm lazy and I don't want to work on that damn FIT image anymore. You will need to do a second step:

 

Step 2:

Reconnect Your device:
How? press the back button with a toothpick and connect male to male USB to you computer.

Debian12 Kernel6 ROOT image for H96MAX RK3566
Flash the armbian extracted ROOT image inside the MMC root partition

how: 

on RkDevTool v2.86

double click the number on table
set Address on 0x0000A000

set Name on root
select the root file to flash on the "..." the dot right side of the table........
mark, Write by address
after flash, it's done, use HDMI and USB3.0 to create user and password, regular armbian install...

 

step2.jpg

 

 

 

Edited by hotnikq
Link to comment
Share on other sites

13 hours ago, gersones said:

though I did a nand-sata-install (don't remember exactly if this was the command) to the emmc but it didn't boot.


the armbian nand-sata-install just work on original device from your armbian build.

To work in a TVbox you will need to follow this tutorial.

or follow my tutorial to create an flash image, it's slow to create but faster to recovery the device.

Link to comment
Share on other sites

20 hours ago, ufsm said:

 

@ufsm

Thanks so much

Unfortunately, none recognized 8gb of ram BUT they'd worked* (updates included, except for the linux-headers-* and/or linux-image-*, because it says there's no space left in the disk (partition I believe)).

Xfce worked almost perfectly (only superficial tests) while in Gnome there are micro stuttering (only tested these) but I think it's because the box's hardware is weak.

*no sound while station-m3 have sound

 

 

@hotnikq

Thanks for complementary instructions.

I'll try to do the tutorials asap.

 

One more thing guys: using the tool I mentioned to extract the .dtb files from boot.img is okay or do I have to use the imgRePackerRK_107 once more on boot.img (because I did it and it generated a "dtb" (no extension) and "dtb.cfg".

Edited by gersones
correction
Link to comment
Share on other sites

On 7/7/2023 at 5:43 PM, hotnikq said:

some armbian builds
https://disk.yandex.ru/d/Bt5wObnYekq8FQ
not mine, i just found

thanks, @hotnikq

Unfortunately, again, only 4gb were recognized.

I think I'll just give up for now. Maybe I'll try to build from zero someday but I just can't deal with the learning process right now.

When done, I'll post the results here.

Thank you

Edited by gersones
Link to comment
Share on other sites

@Energokom

Unfortunately, I didn't find any and forcing a "apt full-upgrade" will break the box from booting.

I just gave up. If it has only 4GB of RAM and was sold in a deceptive way, considering the performance as a desktop (watching Youtube videos in the browser), I wouldn't disagree that both CPU/GPU are made the same way and present low performance (for a box "capable" to play "8k" content).

I'd just use it for playing (server lab/testing) and things like that.

Edited by gersones
Link to comment
Share on other sites

26 minutes ago, Energokom said:

Help this TV box to create an arbian with a kernel 6.x

 

Use a Linux Ubuntu 22.04 to build

And 

Windows 10 machine to burn images

 

Follow this instructions

 

And to build a mainline image.

Follow this instructions

 

Since i don't have this machine, I can't.

 

 

Edited by hotnikq
Link to comment
Share on other sites

Hello.

Here are in this thread I post Armbian 24.5.0 Bookworm images that should be compatible with Vontar KK MAX.

Also added remarks about dualboot for ex. if we want to make untouched Android and at the same time boot only from SD-Card.

Also added recommendations for installation on eMMC.

Edited by Deoptim
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