Yesterday late in the evening I managed to boot from usb. What I did was burn Armbian-unofficial_24.11.0-trunk_Armsom-sige5_noble_vendor_6.1.75_minimal to a USB drive, replace the dtb with the one from Android and boot with the commands "usb start" and "run bootcmd_usb0".
I couldn't get ROC's image nor Multiboot (with the replaced dtb) to boot this way.
EDIT: Installed it to eMMC and ran sbc-bench - results https://0x0.st/Xvsr.bin
When I plug in the HDMI, it crashes Will have to investigate.
dwhdmi-rockchip 27da0000.hdmi: i2c read err!
@Hqnicolas
The VPU isn't working, sadly. I tried the image from @hzdm, but the HDMI behaviour that I outlined is still present. Also, I can't reboot with "sudo reboot" properly, but don't remember if that was the case previously.
About the NPU - I'm not sure, but I think it was working, when I ran sbc-bench - https://0x0.st/Xvsr.bin
Here's some info on the mainlining efforts - https://gitlab.collabora.com/hardware-enablement/rockchip-3588/notes-for-rockchip-3576/-/blob/main/mainline-status.md?ref_type=heads
Hi all.
When I saw this page (thanks @Hqnicolas) - looked at the specs of this board, and looked at its price ($85) - I knew I had to try to install Linux on it.
First things first - I did an Android backup.
====================================
1. Turned on Android box. I connected it to the local network
2. Turn on developer mode. Turn on debugging.
3. On the Linux computer, run
$ adb connect 192.168.0.20:5555
$ adb root
$ adb shell
rk3576_box:/ # cat /proc/partitions | grep mmcblk
179 0 122142720 mmcblk2
179 1 4096 mmcblk2p1
179 2 4096 mmcblk2p2
179 3 4096 mmcblk2p3
179 4 4096 mmcblk2p4
179 5 4096 mmcblk2p5
179 6 1024 mmcblk2p6
179 7 65536 mmcblk2p7
179 8 98304 mmcblk2p8
179 9 393216 mmcblk2p9
179 10 393216 mmcblk2p10
179 11 65536 mmcblk2p11
179 12 512 mmcblk2p12
179 13 1024 mmcblk2p13
179 14 4194304 mmcblk2p14
179 15 116905440 mmcblk2p15
179 32 4096 mmcblk2boot0
179 64 4096 mmcblk2boot1
rk3576_box:/ # exit
adb pull /dev/block/mmcblk2 /home/user/full-big.iso
Next - using the dd utility, reduce the resulting file to 6Gb, since the image takes 120Gb
dd if=/home/user/full-big.iso of=/home/user/H96_MAX_M9_RK3576-android-full.iso bs=512 count=11895122
Getting the dtb file
-----------------------
$binwalk --signature --term full_mini
Find the largest Flattened device tree.
DECIMAL HEXADECIMAL DESCRIPTION
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
………………..……
55363843 0x34CC903 Unix path: /sys/kernel/debug/%pd/%s
55438666 0x34DED4A Unix path: /lib/firmware/updates/6.1.57
55440137 0x34DF309 Unix path: /dev/disk/by-id/ may cause data corruption
55466136 0x34E5898 Neighborly text, "NeighborAdvertisements6ip6t_REJECT: ECHOREPLY is not supported"
55496752 0x34ED030 Unix path: /sys/kernel/debug/rk628/2-0050/hdmitx_color_bar
55555249 0x34FB4B1 Unix path: /sys/kernel/debug/rk628/2-0050/dsi_color_bar
55760043 0x352D4AB Unix path: /sys/kernel/debug/%s
55760097 0x352D4E1 Unix path: /sys/kernel/debug/%pd/%s
55846910 0x35427FE Neighborly text, "Neighborenabling vblank on crtc %u, ret: %d"
55855620 0x3544A04 Unix path: /lib/firmware/6.1.57
55878704 0x354A430 Unix path: /sys/firmware/devicetree/base
55913424 0x3552BD0 Unix path: /sys/kernel/debug/rk628/2-0050/scaler_color_bar
55913634 0x3552CA2 Unix path: /sys/kernel/debug/rk628/2-0050/gvi_color_bar
56002822 0x3568906 Neighborly text, "neighbor %.2x%.2x.%pM lostrward_delay_timer"
56003414 0x3568B56 Neighborly text, "NeighboraversalTime"
56031712 0x356F9E0 Unix path: /sys/kernel/debug/rk628/2-0050/dsi_color_bar
56031782 0x356FA26 Unix path: /sys/kernel/debug/rk628/2-0050/gvi_color_bar
56538119 0x35EB407 MySQL ISAM compressed data file Version 3
58589623 0x37E01B7 mcrypt 2.2 encrypted data, algorithm: blowfish-448, mode: CBC, keymode: 8bit
58682916 0x37F6E24 ASCII cpio archive (SVR4 with no CRC), file name: "dev", file name length: "0x00000004", file size: "0x00000000"
58683032 0x37F6E98 ASCII cpio archive (SVR4 with no CRC), file name: "dev/console", file name length: "0x0000000C", file size: "0x00000000"
58683156 0x37F6F14 ASCII cpio archive (SVR4 with no CRC), file name: "root", file name length: "0x00000005", file size: "0x00000000"
58683272 0x37F6F88 ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!", file name length: "0x0000000B", file size: "0x00000000"
58782120 0x380F1A8 Intel x86 or x64 microcode, pf_mask 0xf4401f01, 2001-09-12, rev 0x30000000, size 1
58888000 0x3828F40 AES S-Box
58888256 0x3829040 AES Inverse S-Box
63311872 0x3C61000 gzip compressed data, from Unix, last modified: 1970-01-01 00:00:00 (null date)
64777216 0x3DC6C00 Flattened device tree, size: 262377 bytes, version: 17
65039872 0x3E06E00 PC bitmap, Windows 3.x format,, 220 x 110 x 8
65046528 0x3E08800 PC bitmap, Windows 3.x format,, 220 x 110 x 8
65053184 0x3E0A200 PC bitmap, Windows 3.x format,, 220 x 110 x 8
65059840 0x3E0BC00 PC bitmap, Windows 3.x format,, 220 x 110 x 8
65066496 0x3E0D600 PC bitmap, Windows 3.x format,, 220 x 110 x 8
65073152 0x3E0F000 PC bitmap, Windows 3.x format,, 220 x 110 x 8
^C
~$
~$dd if=full_1_mini of=h96-m9_original.dtb bs=1 skip=64777216 count=262377
~$dtc -O dts h96-m9_original.dtb -o h96-m9_original.dts
How to burn an Android image to a box:
==================================
Press the reset button. Turn on the power.
$rkdeveloptool db RK3576_MiniLoaderAll.bin
$rkdeveloptool wl 0x0 full_mini
cc @El308
Armbian
=====================
Copy the file h96-m9.csc directory to the directory build/config/boards/
Create build/packages/blobs/h96-m9/ directory and copy h96-m9_original.dtb file into it
Run the build
------------------
build debian 12 DESKTOP
./compile.sh BOARD=h96-m9 BRANCH=vendor BUILD_MINIMAL=no DEB_COMPRESS=xz KERNEL_CONFIGURE=no RELEASE=noble KERNEL_GIT=shallow BUILD_DESKTOP=yes DESKTOP_APPGROUPS_SELECTED= DESKTOP_ENVIRONMENT=gnome DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base
Installing
----------------
Press the reset button. Turn on the power.
$rkdeveloptool db RK3576_MiniLoaderAll.bin
$rkdeveloptool wl 0x0 Armbian-unofficial_24.8.0-trunk_H96-m9_noble_vendor_6.1.75_gnome_desktop-test_1.img
Warning! This build has a very important drawback. After flashing, the reset button stops working. Without it it will be difficult to flash the console. If you don't have a console cable - don't flash with this firmware yet. I'll be working on finalizing it now. Wait for a while.
If you have a console cable and you need to install another image.
1. Connect the console cable.
2. Start the console.
3. At the same time try to stop loading by pressing ctrl+c in the console. It may not work the first time.
3. Enter in the u-boot console
part uuid mmc 0:1 partuuid
4. Reboot the box.
5. Flash
$rkdeveloptool db RK3576_MiniLoaderAll.bin
$rkdeveloptool wl 0x0 Armbian-unofficial_24.8.0-trunk_H96-m9_noble_vendor_6.1.75_gnome_desktop-test_1.img
Test debian 12 DESKTOP and debian 12 server.
==================================================
It works
-----------
1. USB2.0 and USB3.0 are working
2. WiFi6 works: router shows 11ax 1x1 80 MHz
Not working
-----------
1. Reset button in UBOOT
2. When turning off the box, the lights are still on. Probably - it is not really turned off.
3. video acceleration does not work.
Tests
==============
$ glmark2-es2-wayland
-----------------------------
MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)
libEGL warning: egl: failed to create dri2 screen
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: llvmpipe (LLVM 17.0.6, 128 bits)
GL_VERSION: OpenGL ES 3.2 Mesa 24.0.9-0ubuntu0.1
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0
Surface Size: 800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 85 FrameTime: 11.857 ms
[build] use-vbo=true: FPS: 86 FrameTime: 11.747 ms
[texture] texture-filter=nearest: FPS: 128 FrameTime: 7.842 ms
[texture] texture-filter=linear: FPS: 120 FrameTime: 8.345 ms
[texture] texture-filter=mipmap: FPS: 104 FrameTime: 9.689 ms
[shading] shading=gouraud: FPS: 63 FrameTime: 15.886 ms
[shading] shading=blinn-phong-inf: FPS: 58 FrameTime: 17.303 ms
[shading] shading=phong: FPS: 51 FrameTime: 19.827 ms
[shading] shading=cel: FPS: 50 FrameTime: 20.407 ms
[bump] bump-render=high-poly: FPS: 42 FrameTime: 24.208 ms
[bump] bump-render=normals: FPS: 108 FrameTime: 9.273 ms
[bump] bump-render=height: FPS: 99 FrameTime: 10.157 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 58 FrameTime: 17.272 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 34 FrameTime: 30.001 ms
[pulsar] light=false:quads=5:texture=false: FPS: 96 FrameTime: 10.481 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 21 FrameTime: 48.463 ms
[desktop] effect=shadow:windows=4: FPS: 50 FrameTime: 20.021 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 59 FrameTime: 17.063 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 66 FrameTime: 15.303 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 50 FrameTime: 20.203 ms
[ideas] speed=duration: FPS: 48 FrameTime: 20.963 ms
[jellyfish] <default>: FPS: 37 FrameTime: 27.768 ms
[terrain] <default>: FPS: 2 FrameTime: 558.207 ms
[shadow] <default>: FPS: 50 FrameTime: 20.170 ms
[refract] <default>: FPS: 8 FrameTime: 127.994 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 80 FrameTime: 12.594 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 63 FrameTime: 15.980 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 85 FrameTime: 11.845 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 67 FrameTime: 14.929 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 54 FrameTime: 18.690 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 49 FrameTime: 20.822 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 50 FrameTime: 20.299 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 47 FrameTime: 21.386 ms
=======================================================
glmark2 Score: 61
=======================================================
First of all, you need to solve the problem with non-working reset button in U-boot.
If possible, enable USB booting. This can be very useful if the emmc chip fails over time.
Thanks for the links to RK3576_MiniLoaderAll.bin and the firefly repository.
The firefly image in u-boot has the reset button working. Will have to look at their u-boot build settings.
You will need a custom uboot to make it
I don't know if the factory make the android bootloader USB friendly
That's why we are here
that's why you need a custom DTS,
Android DTB = Kernel 4.19 ≠ Mainline DTB = Kernel 6+
I want to train an LLM to do this DTS translation
it's too boring
You will need to create files like this
using armson siege5 as rk3576 base config
and this dts overlays as a start point
GPU is only doing 3D graphics.
Media applications are accelerated by VPU, which is a totally different part of the chip. I think gstreamer is already quite capable of using the v4l2 interface to profit of media acceleration drivers already in mainline kernel (namely hantro and rkvdec for rk3318, both accelerating h.264, vp8, vp9 and hevc, but some codecs still have partial support on rockchip64 armbian branch).
Ffmpeg needs to be built with patches and in a custom way because kernel interface for codecs has been made "stable" very recently (I guess in kernel 5.19).
Also mpv has the capability to use hardware video decoding via v4l2, but still need a custom build because it uses in turn ffmpeg. There is this old thread where I provided a custom build binary of mpv, but it was for ubuntu hirsute and debian bullseye; surely it would require some adaptations and tinker if you want to run on newer distros.
Accelarerating youtube in a browser is a whole different story. I don't know what is the current status (maybe @usual user has some clues?), but surely it is much more challenging than standalone video playing.
Hello, I'm pleased to announce that rk3318 CSC configuration has been accepted into mainline kernel!.
This means that next Armbian release (probably August) will provide regular kernel upgrades offered by Armbian ecosystem via normal apt upgrade command.
Until then, please stay stick to the usual manual upgrade!
But there is something more: new update for the rk3318/rk3328 images!
Most important changes:
Kernel upgraded to version v5.18.6
Memory clock set to 667 MHz (was 333 MHz), providing a nice boost in general, desktop and GPU performance; despite this works fine on my board I always warn you to test images first via sdcard
Introduces MGLRU patches from @yuzhaogoogle (you can read about here and search google for more details), which should provide much snappier experience especially on low-memory devices
You can find the images and deb packages for upgrades browsing the directory pointed on first page as usual.
You can visit the Armbian MGLRU topic, if you have questions about the features or kernel issues (like crash dumps which involve kswapd, for example)
@cmuki
Assuming the boot you provided is from the original image, I think there is no extra questions to ask: if the ddrbin says that you have 2048 megabytes, that is so.
The ddrbin, which is the first piece of code that is executed at all and initializes the board DDR memory, is the most reliable source from this point of view.
Going on with the bootstrap phase, u-boot says the same:
U-Boot 2017.09-gaa00306-201224-dirty #foxluo (Jan 19 2021 - 14:31:53 +0800)
PreSerial: 2, raw, 0xff130000
DRAM: 2 GiB
And obviously even the linux android kernel also detects 2 gigabytes of total RAM:
[ 0.000000] Memory: 1955884K/2064384K available (14910K kernel code, 2056K rwdata, 8884K rodata, 3968K init, 2806K bss, 75732K reserved, 32768K cma-reserved)
That's it, fake hardware specs; the manufacturer altered the Android image somehow to show fake specs and maybe something is wrong with the DDR chips too (are they have been reprinted? are they just fake chips or not really connected to the board? who knows...)