Hello fellow Sunxi forum members,
Some may know me from previous Armbian adventures, primarily Orange Pi Zero 3... but I have jumped brands for a change of scenery (but not SoC).
When researching H61X based boards for the Zero 2 and Zero 3 development we were doing in another thread, I found the Sipeed LonganPi 3H, which is a relatively new board that took a while to find. My first impressions are that is really well made, and packs a lot in to the Raspberry Pi Zero style profile (although it also has a daughter board). It was shipped quickly in a nice quality hard plastic storage case and.. best of all.. it has two hardware buttons.. so I can reset! (very useful when you are rebooting endlessly).
You can find a review of the board here:
https://www.cnx-software.com/2023/12/29/sipeed-longan-pi3h-a-raspberry-pi-zero-sized-board-with-gigabit-ethernet-wifi-6-hdmi-and-usb-ports/
There has been some great development on GitHub here (and the documentation on their site is also good)
https://github.com/sipeed/LonganPi-3H-SDK
https://wiki.sipeed.com/hardware/en/longan/h618/lpi3h/1_intro.html
I basically started this thread as I thought I would look outside of the Orange Pi's I had and see if I could get the SDK build working in the Armbian framework. It should be noted that the SDK builds are standalone and use slightly dated uboot and kernel, but I was keen to at least get the builds working in Armbian so I can start iterating and improving.
I want it to be very clearly known that I am just migrating the great work from the above Sipeed GitHub repo (their scripts work really cleanly), and will slowly work through issues that I identify as I go. Currently I have migrated all the patches over (named the same as the original repo) until a clean/bootable build is achieved and then I will look at cleaning up the patch structure (although, in all honesty I prefer the numeric patch ordering to what exists currently in the sunxi patching directories.. but that's another discussion).
My preliminary porting work to the Armbian build framework can be found here and is configured to only support edge with a wip board configuration for the Longan Pi 3H.
https://github.com/pixdrift/armbian_build/tree/longanpi_3h
Status:
- The Armbian build completely cleanly for both the uboot (held back) and mainline kernel builds for 6.7.2 kernel.
- Of the patches from the SDK repository, roughly 10 don't currently apply (not as bad as it sounds)
- I have made some minor updates to two patches, and added comments for all problematic/failing patches
- Many of the patches are related to CPU Frequency scaling, and I expect these are failing because CPU frequency patches are already in Armbian (I will confirm in future)
- The build currently boots a separate boot partition, and that boot partition is using MBR (not GPT) as I had issues with the boot loader locating the GPT partition (haven't looked closely at this)
The good news is.. I have the board booting, with 6.7.2 and I get serial output for the boot. The bad news is, it immediately and abruptly decides that the GPU has hit a temperature threshold and shuts down the device (corrupting the FS in the process). On subsequent reboots, fsck is launched to repair the filesystem and GPU hits temperature threshold.
On investigation, I don't believe the GPU is actually hot, it's just the configuration has an issue and it's likely reporting a very high temperature value. I will try and confirm this as it may be a patch not applied correctly for GPU?
The following is the log from the serial output
First boot:
===========
U-Boot SPL 2024.01-rc2-armbian (Jan 24 2024 - 11:15:42 +0000)
DRAM: 4096 MiB
Trying to boot from MMC1
NOTICE: BL31: v2.10.0 (debug):armbian
NOTICE: BL31: Built : 10:42:19, Jan 24 2024
NOTICE: BL31: Detected Allwinner H616 SoC (1823)
NOTICE: BL31: Found U-Boot DTB at 0x4a083600, model: LonganPi 3H
INFO: ARM GICv2 driver initialized
INFO: Configuring SPC Controller
INFO: PMIC: Probing AXP305 on RSB
ERROR: RSB: set run-time address: 0x10003
INFO: Could not init RSB: -65539
INFO: BL31: Platform setup done
INFO: BL31: Initializing runtime services
INFO: BL31: cortex_a53: CPU workaround for erratum 855873 was applied
INFO: BL31: cortex_a53: CPU workaround for erratum 1530924 was applied
INFO: PSCI: Suspend is unavailable
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x4a000000
INFO: SPSR = 0x3c9
INFO: Changed devicetree.
U-Boot 2024.01-rc2-armbian (Jan 24 2024 - 11:15:42 +0000) Allwinner Technology
CPU: Allwinner H616 (SUN50I)
Model: LonganPi 3H
DRAM: 4 GiB
Core: 48 devices, 19 uclasses, devicetree: separate
WDT: Not starting watchdog@30090a0
MMC: mmc@4020000: 0, mmc@4022000: 1
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...
In: serial@5000000
Out: serial@5000000
Err: serial@5000000
Net: eth0: ethernet@5020000
Unknown command 'usb' - try 'help'
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
3259 bytes read in 1 ms (3.1 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
129 bytes read in 1 ms (126 KiB/s)
30310 bytes read in 5 ms (5.8 MiB/s)
Working FDT set to 4fa00000
Failed to load '/dtb/allwinner/overlay/-fixup.scr'
18400262 bytes read in 762 ms (23 MiB/s)
23103496 bytes read in 957 ms (23 MiB/s)
Moving Image from 0x40080000 to 0x40200000, end=41880000
## Loading init Ramdisk from Legacy Image at 4ff00000 ...
Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 18400198 Bytes = 17.5 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
Booting using the fdt blob at 0x4fa00000
Working FDT set to 4fa00000
Loading Ramdisk to 48e73000, end 49fff3c6 ... OK
Loading Device Tree to 0000000048e03000, end 0000000048e72fff ... OK
Working FDT set to 48e03000
Starting kernel ...
done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
[ 2.498172] thermal thermal_zone0: gpu-thermal: critical temperature reached, shutting down
[ 2.506572] reboot: HARDWARE PROTECTION shutdown (Temperature too high)
[ 2.519090] reboot: Power down
done.
Second boot:
============
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
[ 2.475525] thermal thermal_zone0: gpu-thermal: critical temperature reached, shutting down
Begin: Will now [ 2.484056] reboot: HARDWARE PROTECTION shutdown (Temperature too high)
check root file system ... fsck from util-linux [ 2.495463] reboot: Power down
2.38.1
Next steps:
I am currently running on coffee fumes.. but when I my cognition returns, I plan to work through the remaining patches I have flagged as problematic in series.armbian in my branch. Potentially from there I will reach out to the Sipeed developers if I can't find anything obvious that is causing the above temperature issues . If that fails, I will look to hack up the image to disable the thermal protection code that is shutting the board down so I can boot and get more information about this issue (but this obviously risks the board being damaged).
Asking for assistance:
If you have any idea what might be causing the temp issue (ie. where to look) drop a message. I am sure I will get to it eventually when I have time, but assistance on where to focus my attention (which module/configuration components) would be a great help. That being said, I haven't looked at any of the currently failing patches so may be a quick fix!
If you have one of these boards (even if you aren't a developer) please sign up to the Armbian forums and let me know, it's always great to have other people available for testing