geerlingguy / sbc-reviews

Jeff Geerling's SBC review data - Raspberry Pi, Radxa, Orange Pi, etc.
MIT License
350 stars 9 forks source link

Luckfox Core3566 #27

Open geerlingguy opened 7 months ago

geerlingguy commented 7 months ago

DSC04305

Basic information

Linux/system information

# output of `neofetch`
PASTE_HERE

# output of `uname -a`
PASTE_HERE

Benchmark results

CPU

Power

Disk

MANUFACTURER_AND_MODEL_OF_DISK_HERE

Benchmark Result
fio 1M sequential read TODO MB/s
iozone 1M random read TODO MB/s
iozone 1M random write TODO MB/s
iozone 4K random read TODO MB/s
iozone 4K random write TODO MB/s

curl https://raw.githubusercontent.com/geerlingguy/pi-cluster/master/benchmarks/disk-benchmark.sh | sudo bash

Run benchmark on any attached storage device (e.g. eMMC, microSD, NVMe, SATA) and add results under an additional heading. Download the script with curl -o disk-benchmark.sh [URL_HERE] and run sudo DEVICE_UNDER_TEST=/dev/sda DEVICE_MOUNT_PATH=/mnt/sda1 ./disk-benchmark.sh (assuming the device is sda).

Also consider running PiBenchmarks.com script.

Network

iperf3 results:

(Be sure to test all interfaces, noting any that are non-functional.)

GPU

Memory

tinymembench results:

Click to expand memory benchmark result ``` # Run the two commands below, then replace this code block with the full result. git clone https://github.com/rojaster/tinymembench.git && cd tinymembench && make ./tinymembench ```

sbc-bench results

Run sbc-bench and paste a link to the results here:

wget https://raw.githubusercontent.com/ThomasKaiser/sbc-bench/master/sbc-bench.sh
sudo /bin/bash ./sbc-bench.sh -r

Phoronix Test Suite

Results from pi-general-benchmark.sh:

geerlingguy commented 7 months ago

So far I went to the LUCKFOX WIKI, and on the Downloads page, I clicked on the Firmware link (which goes to this Google Drive. I went into Image, then downloaded 2023-09-13-debian-arm64-HDMI-lite.img and flashed it to a microSD card with Etcher.

I popped that into my PiTray mini, and got no indication it was going to boot (no Ethernet lights, no onboard red or green LED). I then popped it over to my Compute Module 4 IO Board and the red D1 power LED comes on... but not the green ACT LED. Nor is there any LED blinking for the Ethernet port.

I am wondering if either (a) I have dead hardware, or (b) I need a specialized image to use it with the CM4 IO Board?

Their Chinese wiki leads to a password-protected folder on Baidu, and seemingly the same or a similar set of images.

geerlingguy commented 7 months ago

Also exploring elsewhere, it seems like their Linux SDK is using Kernel 4.19 maybe? A bit old, most of the other RK3566 boards use 5.10 (which is old-ish, but not super old).

I am trying the non--lite HDMI image now to see if it fares any better.

It looks like their Wiki uses SDDiskTool, and I'm not sure but is that Windows-only? It seems like you wouldn't need that to flash an image, but I did notice a little checkbox in their screenshot for "SD Boot". Which I wonder if that indicates SDDiskTool does something funky to set up the boot partitions properly?

NeilHanlon commented 7 months ago

possibly a similar experience -- https://github.com/willpuckett/smote/blob/6f9e6339e61c5da8b65a63038e332f2684dc22da/posts/sbc.md?plain=1#L142-L150

Akkiesoft commented 7 months ago

Hi. I also have a Core3566(4GB Lite , No Wi-Fi).

SDDiskTool was needed to write the image to MicroSD. It seems to write the image to the MicroSD card while it does some tricks, but I haven't analyzed the details yet.

I tested with Debian/Ubuntu images made by Radxa for ROCK3 Model C, It can boot but MAC address didn't match luckfox's official image. I guess the DeviceTree is partially different.

geerlingguy commented 7 months ago

Also some efforts to get UEFI working on this little board: https://github.com/jaredmcneill/quartz64_uefi/pull/56

It looks like Ethernet, WiFi, and eMMC are not supported in that branch, though.

me-peng commented 7 months ago

The img provided by Luckfox is not actually in address order, but rather uses a file similar to a compressed package, which contains the BIN file (boot file) required for downloading the system and the system that needs to be burned to EMMC. The original operation method provided by RK is also the same

If you need to burn in a Linux environment, you can use the tools provided by RK to burn (this requires downloading the SDK provided by Luckfox and decompressing it in the tools Linux directory)

The PWR LED of Luckfox 3566 outputs an OD signal through the core voltage, without outputting a high level. The ACT LED is configured inside the core, and it cannot be output unless it is started to the core, which is also an OD signal

You can see if the 3.3V current required by the floor is too high, which makes the floor SD card unusable (the 3.3V output current of the core board is very low, and if the 3.3V current needs to be output from the core, it will cause the SD card to be unusable (the CM4 floor uses the 3.3V current of the core), which has been fed back to them. They said that the new board has been repaired)

abeisgoat commented 7 months ago

For anyone looking into this - I believe I got close to getting this board to boot from an SD which was written from Linux. My steps were...

  1. Follow the steps to download the ancient Ubuntu VM and build it.
  2. Use the RockChip wiki info about writing each img at the correct location including the idlboader, u-boot, etc.

Sadly I could not complete this loop as the VM would not build the img files without erroring, but I believe this is close to the process which would be involved.

Al1745 commented 7 months ago

I purchase the Luckfox Core3566 with 4Gb ram 32Gb eMMC and wifi. Waveshare CM4-IO base C baseboard (Rev02)

Using the RKDevTool I was able to write the 2023-09-13 debian arm64 HDMI 002.img to the on board eMMC as per the wiki.

I was also successful in flashing a micro SD card using the SDDisktool with image 2023-09-13 debian arm64 HDMI lite 006.img

I currently have the 2023-09-13 debian arm64 HDMI lite 006.img on the eMMC. After editing “/etc/apt/sources.list“ I had success in upgrading from Buster to Bullseye.

Welcome to Debian GNU/Linux 11 (bullseye) (GNU/Linux 4.19.232 aarch64) Linux linaro-alip 4.19.232 #1 SMP Wed Sep 13 10:33:16 CST 2023 aarch64

System information as of Mon Nov 27 10:58:28 EDT 2023

System load: 0.14 0.21 0.09 Up time: 2 min Memory usage: 2 % of 3888MB IP: 192.168.42.45 CPU temp: 24°C GPU temp: 24°C Usage of /: 10% of 26G

sorphin commented 7 months ago

Sadly I could not complete this loop as the VM would not build the img files without erroring, but I believe this is close to the process which would be involved.

I actually was able to build everything in the VM (not under virtualbox... under UTM, but anyway.. took a DAY).. I have one of these boards too and also saw in one of the amazon reviews someone claimed they grabbed the Orange PI Debian 12 image and threw it right on.. I'd sure like to know how.. heh. I've spent the night tonight digging into this and if i can get the orange pi image broken apart, might try flashing each partition... (I have the EMMC version).. alas none of the rockpi tools THEY included in the SDK (rkdevtool, rkimagemaker, afptool) will touch the orange pi image to try and unpack it, which means orange pi didn't do it this way (which is confirmed more or less by orange pi's github repo that shows how to build their images (but i haven't dug into that real far yet)..

Also, looking further down in the "SDK".. there's tons of docs (including rockchip HW docs, etc) and many other things.. it's like they took everything they got from Rockchip and dumped it into this VM image)

sorphin commented 7 months ago

I currently have the 2023-09-13 debian arm64 HDMI lite 006.img on the eMMC. After editing “/etc/apt/sources.list“ I had success in upgrading from Buster to Bullseye.

Welcome to Debian GNU/Linux 11 (bullseye) (GNU/Linux 4.19.232 aarch64) Linux linaro-alip 4.19.232 #1 SMP Wed Sep 13 10:33:16 CST 2023 aarch64

While that updated the distro, it's still the ancient 4.19 kernel... and doesn't solve the issue of switching to say ubuntu or arch or other OSes like the OP CM4 has available.. It seems that Luckfox has worked "hard' to "secure" this board to how THEY want it to run, but I don't play that way :-)

sorphin commented 7 months ago

I actually just ate my words.. I just flashed the Orange Pi CM4 image....and it booted successfully....

steps used: rkdeveloptool/rkdeveloptool db MiniLoaderAll.bin Downloading bootloader succeeded.

rkdeveloptool/rkdeveloptool wl 0x0 Orangepicm4_1.0.2_debian_bookworm_server_linux5.10.160/Orangepicm4_1.0.2_debian_bookworm_server_linux5.10.160.img

resulted in: Starting kernel ...

orangepicm4 login: orangepi (automatic login)


/ | _ _| / | \/ | || |
| | | | |
) | | | | | |\/| | || | | || |
/| | | |_| | | |_ | _/|_| |_| __|| || |_|

Welcome to Orange Pi 1.0.2 Bookworm with Linux 5.10.160-rockchip-rk356x

System load: 38% Up time: 0 min Memory usage: 8% of 1.93G IP:
CPU temp: 34°C Usage of /: 7% of 28G

orangepi@orangepicm4:~$


So, It just seems that the flasher (upgrade_tool_v2.3_mac/upgrade_tool) depends on some sort of tagging of the firmware image, so it's really only good for pushing the Loader in then don't use it to upload firmware or it'll just reject you.

and.. yes, gotta sort out networking now..

So far, any attempts to use the blikvm image flash, but won't boot.

The Orange Pi image at least is like Rpi OS and has a /boot with the dtb files.. so should be able to harvest them from the Luckfox image (appended to the kernel) and drop them in there, in theory.

Al1745 commented 7 months ago

Well that's interesting. I was able to flash the orangepi image (lite or desktop) to either a micro sd card or the on board emmc and boot up no problems. Wifi connectivity was gaind by using a USB wifi dongle.

sorphin commented 7 months ago

Well, the theory isn't reality... the dtb file from the core board panics the orange pi kernel.. guess that's no surprise.. since i have the source files, i should be able to recompile the device tree for 5.1.0, but now i have to set up a build env for that.. (smartly, orangepi uses docker instead of a massive VM, but still)

sorphin commented 7 months ago

And.. an update.. After arguing (more like changing the code) with the DTBs and the induced random crashes (I hate device tree stuff).. I have the Core3566 booting not only under Orange Pi Debian and Ubuntu, but the green led is a blinking AND networking is working. The Orange Pi CM4 and the Luckfox use 2 different network PHY chips.. the OPICM4 uses a YT8531C whereas Luckfox uses a Realtek RTL8211C. That's the source of the ethernet issues there were.

Proof:

root@orangepicm4:~# ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.94 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::162c:3f45:5220:76f4 prefixlen 64 scopeid 0x20 ether 00:00:a4:05:d0:bf txqueuelen 1000 (Ethernet) RX packets 90 bytes 8770 (8.7 KB) RX errors 0 dropped 14 overruns 0 frame 0 TX packets 62 bytes 5833 (5.8 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 41

root@orangepicm4:~# cat /boot/orangepiEnv.txt verbosity=4 bootlogo=false extraargs=cma=128M overlay_prefix=rk356x

fdtfile=rockchip/rk3566-orangepi-cm4-new.dtb

fdtfile=rockchip/core3566-hdmi-lp4x-v1-linux-new.dtb bootargs="earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0" rootdev=UUID="b4cc0980-05cf-4e57-9c71-711060ab194d" rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

orangepi@orangepicm4:~$ cat /proc/version Linux version 5.10.160-rockchip-rk356x (root@orangepi5) (aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1.0.2 SMP Thu Sep 21 20:03:38 CST 2023

abeisgoat commented 6 months ago

I actually just ate my words.. I just flashed the Orange Pi CM4 image....and it booted successfully....

steps used: rkdeveloptool/rkdeveloptool db MiniLoaderAll.bin Downloading bootloader succeeded.

rkdeveloptool/rkdeveloptool wl 0x0 Orangepicm4_1.0.2_debian_bookworm_server_linux5.10.160/Orangepicm4_1.0.2_debian_bookworm_server_linux5.10.160.img

I managed to just download the Orange Pi CM4 Arch image and flash it to an SD using normal Linux img writing utilities and it booted successfully, but as you say - missing ethernet, etc.

sorphin commented 6 months ago

I managed to just download the Orange Pi CM4 Arch image and flash it to an SD using normal Linux img writing utilities and it booted successfully, but as you say - missing ethernet, etc.

Right. This was to the emmc. Im still working out some kinks (sometimes it crashes/panics as loading the kernel on boot) and once it gets here, I'll be seeing if the tc358743 in the blikvm will work on it with the device tree I have. I guess once I have the issues sorted out in the coreg* dtb file, I'll put it in my repo and link it. Ethernet pulls 900+ Mbps both directions without issues.

costastf commented 4 months ago

@sorphin any update on this? Would love to get some help for a working solution.

schmooster commented 4 months ago

I also have a conundrum trying to get this same board to run a 720x720 square DSI[?] touchscreen - would be very nice to have parity with the rpi-CM4 images I am using (which work in the context). Similar experience with an Ubuntu rk3566 img which had no networking & I halted.

leromarinvit commented 2 months ago

Hi @sorphin, would you mind sharing your dts? I have a few of these boards lying around and would love to put them to use with a non-ancient kernel, and having something that mostly works as a starting point (even if it's not perfect) would be great.

dan-and commented 3 weeks ago

Hey @geerlingguy , There are updated images for the Core3566 on your mentioned baidu link from April 2024. What caught my eyes are special NPU versions.

It looks like it is nearly impossible to download a file from the baidu site if you aren't in China. So I did what I can do and created a mirror of it on archive.org. See: https://archive.org/details/2023-09-13-debian-arm64-DSI0.img

The updated images from baidu are: Core3566-ubuntu-HDMI-NPU.img - 2024-04-26 04:42 Debian-HDMI-NPU.img - 2024-02-02 08:04 Debian-HDMI-USB HOST.img - 2023-12-16 08:57 Debian10-HDMI-RTC.img - 2024-02-23 14:42