Jump to content

Efforts to develop firmware for Lemfo HK1 RBOX K8S 4G/64G


Panda

Recommended Posts

Hello People, I Bring to you the Lemfo HK1 RBOX K8S 4G/64G.

 

This box came with Android 13 and can be rooted easy, follow some specs of the box:

 

Processor: Rockchip RK3528

GPU: Mali 450

Memory: 4Gb (micron)

Storage: 64Gb (eMMC 5.1 Samsung)

Network: PHY Integrated stmmac-0:02 Driver RK630 100Mbps

Wireless: 5G driver: rtl8822cs on gpio

Bluetooth: 5.1

USB 3.0: 01 5Gbps

USB 2.0: 01

HDMI: 01

TV-Out: 01

Power: 5v 2A

Aliexpress link: Lemfo HK1 Rbox K8S 

 

What is Working:

HDMI: partial (read bellow)

Network: partial (read bellow)

Bluetooth: no

Wifi: no

USB 3.0: yes

Sound: yes over HDMI

 

Obs:

You need to use hinlink-ht2 image, but no wireless, nor ethernet, only HDMI work, and you need to turn on monitor around 15 seconds after turn on the TVBox

 

I get the FDT from Android, and this FDT with hilink-ht2 images boot without HDMI, but with network, if you boot with hinlink-ht2 make the initial configs and start the desktop you can replace the rk-3528-hinlink-ht2.dtb with the android FDT and the box will boot, wait around 30 seconds and turn on the monitor and you have the HDMI and network working.

 

I have build the image with xfce and include some drivers (mail450, RK630, rtl8822cs) and enable some DRM options (under test yet)

 

I Have the Andoid boot partition dump, and other partions, I will share the files later (need some dropbox os gdrive to share)

 

I have attached the Android.DTB and dmesg from android and armbian, if someone want take a look.

 

Any help and sugestion will be great!

 

Some pictures of the board:

 

 upper.thumb.jpeg.1bfb58b49305912fce7164c33e2e0836.jpeglower.thumb.jpeg.b06854035bf1744881c8266f07dd1a0f.jpeglower-detail.thumb.jpeg.041d0f1b38551896291fa6682dae332e.jpegboard-top.thumb.jpeg.f2b850819c0885fd23fca7f34d862f51.jpegWhatsAppImage2024-08-04at19_43_15.thumb.jpeg.5bc61d92e91116f7642c9cb97c11454c.jpegboardname.thumb.jpeg.6465f4ad31b7197611ddad849ee282ad.jpegboard-emmc.thumb.jpeg.bf382841617487a5bd534e533e21a2af.jpegboard-up-chip-1.thumb.jpeg.9b62b9240a7db6636460cdf9af8c6043.jpegboard-RS232.thumb.jpeg.fc49d998b928aec904f414d547d650f8.jpegboardnetwork.thumb.jpeg.d5964d9505009f2f151cf0ccbf59d9c2.jpegboard-bottom-detail-chip.thumb.jpeg.f7917f359e3c2d45eb0e2dae9ef4bd5c.jpegLemfo-Desktop.thumb.jpeg.efa7838d5b0b48ba8bbc145f04294fb6.jpegLemfoNeofetch.thumb.jpeg.9dd583d923c19f4bbb28e5023db2e355.jpeg

Lemfo-hk1rbox-k8s.dtb android_dmesg.log linux_dmesg.log linux-syslog

Edited by Panda
Link to comment
Share on other sites

Do you want update android ? or flash Armbian to emmc?

 

I had a small chat with Lemfo and they do not share an Android image to reflash the device. I'm waitting my USB-A Male Male arrive, so I can dump the entire firmware from device, soon I get the dumped firmware I can share. what I have done is dump the emmc using ADB, but I'm not sure if it can be used to flash the device. If you want to try I can share the image.

 

About flashing armbian to EMMC I do not recomend since it's not full working on SD Card yet and you can brick you device.

 

Regards

Panda

Link to comment
Share on other sites

News from the front... 🙂

 

HDMI 90% Operational now, Mali with lima drivers working well, now the Frame Buffer is working, so you can turn your monitor 10 seconds after the box.

 

IR remote controller working (Unbelievable, but it's true)

 

I'm struggling to make Wifi and bluetooth work, bluetooth is detected and appear on rfkill, but when you try to enable rfkill unblock and the interface disappear until your block again on rfkill, but cannot be enabled, any suggestion?

 

Wifi is detected but rfkill not bring the device up, I get the erro -237 when iw try to set powermanagent on wireless-platdata. (No ideas of how to procced)

 

What is making me crazy is the need to power the monitor 10 seconds of the box. I search over the internet, and try to change the eid on armbianArgs.txt, try to set framebuffer to 1024x768, but nothing work. Any advice?

 

I will continue to poke the kernel and the dtb to try to solve the issues, so if someone can share some ideas or docs, please, this will help a lot.

 

Regards

Panda

Link to comment
Share on other sites

@Hacktarus13 I'm Currently travelling without access to the box, I'm returning next week, so I will start to it poke again.

 

About the "opensource", I believe it's not opensource once the RK3528 was developed only for TvBox, even in the Rockchip site you didn't found any information about the processor or any board.

 

I only found information in 2 sites about a press release of RK3528 where they say it's for TvBox, 

 

Even the Chinese have issues with the RK3528 for a lack of information.

 

Best Regards

Panda

Link to comment
Share on other sites

On 8/21/2024 at 5:25 AM, Hacktarus13 said:

And there is an "opensource" device which use RK3528, the Radxa Rock 2F

 

You can use the Radxa Rock 2F as a base,
remove all USB ports from DTS/DTB by commenting the code inside DTS text
remove wifi/bluetooth by commenting the code inside DTS text

check for the EMMC0 EMMC1 EMMC2 SDHCI device boot position
compile the armbian for Radxa Rock 2F
and test it 

Link to comment
Share on other sites

I'm returning from my travel, and start to poke again the board, and I'm very disappointed,  my first objective is to use the box like a ThinClient, I have a big server at home with several VM. But after putting armbian running OK in the box the connection is very very very slow, I start to think it's an armbian problem, so, I return to Android and make some tests, and is even worse.

 

It is impossible to use? No it is not, but you have several Lag for pointer and keyboard the image is OK no lag at all using 1920x1080, with 4k we have several image lagging.

 

I'm using Ethernet, if I use wifi it's impossible to use, many lag in Android.

 

So SAD, my plan will not gonna work, but I will keep poking the board just for fun.

 

What is working:

 

HDMI with sound (4k and bellow)

Remote Controller

Ethernet

The clock (more or less)

GPU

 

What is not working:

 

When you boot there is no image you need turn on the monitor in the exact moment or connect over network and restart X

Some GPIO power (I see some errors in DMESG)

WIFI (I believe is missing firmware or GPIO power)

Bluetooth (detected, but when you try to enable disappear, RFKILL put in locked state)

 

 

I don't know how to share my progress using github ( I only use git clone, I'm not a programmer), if someone share some documents or give some directions I can share without problem.

 

I want to try to write armbian to emmc, I have the USB cable, but I don't know how to backup the android to restore in case of failure (and be sure, it will failure)

 

Any help are welcome.

 

Regards

Panda

 

Link to comment
Share on other sites

4 hours ago, Panda said:

I want to try to write armbian to emmc, I have the USB cable, but I don't know how to backup the android to restore in case of failure (and be sure, it will failure)

 


FYI flashing to EMMC causes a u-boot loop that's impossible to break out of. i was lucky enough to find an android image that works and flashed it back with AndroidTool to get the box working again. Not sure if it's expecting a specific partition structure or what. I did not go too far into it. 

I built an image with rk3528-evb3-lp4x-v10.dtb that seemed to work somewhat. 

Link to comment
Share on other sites

Here is what you need to do:

  1. Chain from uboot to GRUB, so that you can download kernel and initrd through HTTP. If you are OK with tftp speed, you can skip this. 
    1. Create a file called minimal-grub.cfg
      insmod efinet
      insmod net
      
      net_bootp
      configfile (http,192.168.60.118)/grub/grub.cfg

       

    2. Generate grub image
      grub-mkimage -D rk3399-firefly.dtb -o grubnet.efi -O arm64-efi -p /boot/grub --config=./minimal-grub.cfg tftp http efinet normal configfile linux video video_fb video_colors videoinfo all_video help archelp terminal terminfo gettext gfxmenu gfxterm_background gfxterm_menu gfxterm net boot reboot part_gpt part_msdos ext2 msdospart

       

    3. load grub from u-boot 
      bootcmd=load mmc 0:1 ${kernel_addr_r} grub/grubnet.efi; bootefi ${kernel_addr_r}

       

  2. Host your grub.cfg at http://192.168.60.118/grub/grub.cfg. Modify IP address according to your setup. Don't forget to change minimal-grub.cfg file.  My grub.cfg looks like this 
    set menu_visible=false
    set timeout=0
    
    set kern_param='ip=dhcp console=tty0 console=ttyS2,1500000 no_console_suspend consoleblank=0 net.ifnames=0 plymouth.ignore-serial-consoles nbd_server=192.168.60.118'
    set default='KDE Live'
    
    insmod http
    menuentry 'KDE' {
    	linux	    (http,$server_ip)/firefly/vmlinuz-6.11.5-edge-rockchip64 boot=squashfs root=kde $kern_param
    	devicetree  (http,$server_ip)/firefly/rk.dtb
    }

     

  3. Run your nbd server, my looks like this 
    [generic]
    	group = nbd
    	includedir = /etc/nbd-server/conf.d
    	allowlist = true
    
    [kde.squashfs]
    	exportname = /nas/pve/armbian/squash/kde.squashfs
    	name = armbian_fs
    	readonly = true
    	cow = true
    	chunksize = 128M
    	maxconnections = 100
    
    [kde.overlay]
    	exportname = /nas/pve/armbian/squash/kde.overlay
    	readonly = false
    	chunksize = 128M
    	maxconnections = 100

     

  4. Prepare your squashfs image and overlay image. Squashfs image is your normal rootfs, you can even copy it from say Ubuntu liveCD iso. Overlay image is an empty ext4 image. I create it like this 
    dd if=/dev/zero of=kde.overlay bs=4M count=0 seek=1000
    mkfs.ext4 kde.overlay
    chmod oa+w kde.overlay 
    mkdir rw
    mount kde.overlay rw/
    mkdir rw/work rw/upper
    umount rw

     

Now you are all set. My own testing shows it's faster than NFS root. I can see KDE programs launch faster with my naked eyes.

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