Quote from: Brati on May 18, 2026, 04:52:36 PMI am developing a Yocto 5.0 (Scarthgap) Linux image for the A64-OLinuXino-2Ge16G-IND board and have encountered a critical issue with warm reboot that I have been unable to resolve.The issue is most likely not TF-A, since BL31 successfully hands off to U-Boot at 0x4a000000. A64 warm-reset problems are often caused by SPL/DRAM/clock state not being fully reinitialized after reboot.
Issue:
The board hangs on every reboot (warm reset and cold reset) after the following boot log line:
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x4a000000
INFO: SPSR = 0x3c9
[HANG - no U-Boot output]
First cold power-on always works correctly. The hang occurs every time after any reboot command.
Setup:
- Board: A64-OLinuXino-2Ge16G-IND
- U-Boot: 2024.01 (mainline, from Yocto Scarthgap / poky)
- TF-A: 2.10.4 with SUNXI_PSCI_USE_NATIVE=1 SUNXI_PSCI_USE_SCPI=1
- Crust SCP: v0.6.0 (a64-olinuxino_defconfig)
- Kernel: Linux 6.6.85
- Boot device: SD card (mmcblk0)
What I have tried:
- Added Crust SCP firmware (scp.bin embedded in U-Boot SPL)
- Added R_WDOG fix for A64 in reset_cpu() in board.c
- Added PLL6 lock timeout in clock_init_safe() in clock_sun6i.c
- TF-A rebuilt with LOG_LEVEL=40 - confirmed BL31 completes successfully and hands off to U-Boot at 0x4a000000
- U-Boot freezes before printing a single character
The hang is confirmed to be between BL31 exit and U-Boot's first UART output.
Question:
Can anyone please share which U-Boot version and if any specific patches you use in your Olimage builds for the A64-OLinuXino to make reboot work correctly?
Any guidance would be greatly appreciated.
Best regards,
Bratiranjan Acharya
bratiranjan12@gmail.com
#!/bin/sh
python -c '
import struct, zlib, os, sys
p = "/sys/class/block/nand/size"
if not os.path.exists(p):
print "Error"
sys.exit(1)
with open(p, "r") as f:
t = int(f.read().strip())
L = [("bootloader", 2048, 32768), ("env", 34816, 4096), ("rootfs", 38912, t - 36864)]
e = ""
for idx, (n, st, sz) in enumerate(L):
if idx == 0:
l1 = struct.pack("<BBB5sII", 0, 0, 3, "\x00" * 5, st, 0)
else:
l1 = struct.pack("<QII", 0, st, 0)
e += l1 + struct.pack("<I4sQ", sz, "DISK", 0) + n.ljust(16, "\x00") + "\x00" * 16
b = (struct.pack("<II8s", 0, 0x100, "softw311") + e).ljust(1024, "\x00")
out = ""
for i in range(4):
c = b[:17] + struct.pack("B", i) + b[18:]
out += struct.pack("<I", zlib.crc32(c[4:]) & 0xffffffff) + c[4:]
with open("nand_part.bin", "wb") as f:
f.write(out)
print "Done"
'
dd if=nand_part.bin of=/dev/nand bs=1k count=4
sleep 1
sync
sleep 1
sync
sleep 1
blockdev --rereadpt /dev/nand
sleep 2
blockdev --rereadpt /dev/nand
sleep 2
blockdev --rereadpt /dev/nand
sleep 2
umount /dev/nandc
mkfs.ext4 /dev/nandc
tune2fs -o journal_data_writeback /dev/nandc
tune2fs -O ^has_journal /dev/nandc
e2fsck -f /dev/nandc
mkdir /mnt/nandroot
mount /dev/nandc /mnt/nandroot
tar --exclude=/proc/* \
--exclude=/sys/* \
--exclude=/dev/* \
--exclude=/tmp/* \
--exclude=/run/* \
--exclude=/mnt/* \
--exclude=/media/* \
--exclude=/var/log/* \
--exclude=/var/tmp/* \
-cf - / | (cd /mnt/nandroot && tar -xf -)
cat << 'EOF' > /mnt/nandroot/etc/fstab
/dev/nandc / ext4 defaults,noatime,nodiratime,commit=60 0 1
tmpfs /tmp tmpfs defaults,noatime,mode=1777,size=64M 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755,size=32M 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777,size=32M 0 0
EOF
umount /mnt/nandroot
rmdir /mnt/nandroot
mkdir -p /mnt/sdboot
mount /dev/mmcblk0p1 /mnt/sdboot
mkdir -p /mnt/nandboot
mount /dev/nanda /mnt/nandboot
cp /mnt/sdboot/uImage /mnt/nandboot/
cp /mnt/sdboot/script.bin /mnt/nandboot/
umount /mnt/sdboot
rmdir /mnt/sdboot
umount /mnt/nandboot
rmdir /mnt/nandboot
cat << 'EOF' > u-boot.txt
baudrate=115200
bootdelay=1
console=ttyS0,115200
loglevel=8
machid=102a
nand_root=/dev/nandc
init=/sbin/init
setargs=setenv bootargs console=${console} root=${nand_root} rootwait init=${init} loglevel=${loglevel}
boot_normal=fatload nand 0:0 0x44000000 uImage; bootm 0x44000000
bootcmd=run setargs boot_normal
EOF
python -c "
import zlib, struct
with open('u-boot.txt', 'r') as f:
lines = [line.strip() for line in f if line.strip()]
data = '\x00'.join(lines) + '\x00'
target_size = 131072 - 4
data = data.ljust(target_size, '\x00')
crc = zlib.crc32(data) & 0xffffffff
header = struct.pack('<I', crc)
with open('env.bin', 'wb') as f:
f.write(header + data)
print('env.bin reafy! filesize:', len(header + data))
"
sudo dd if=env.bin of=/dev/nandb bs=1k
sync
rm env.bin u-boot.txt
echo "All done! Now power off the board, remove SD card and next time it will boot Linux from NAND!"
I spent about two nights trying to program the iCE40HX1K-EVB using my RPi 4 with no success, checking connections, switching pins on the RPi.

Quote from: Roman on June 06, 2026, 08:09:08 PMCould you tell which revisions of the board you have?
Quote from: mossroy on May 14, 2026, 10:36:02 PMI've described a different procedure to install Debian 13 on my A64-OLinuXino-2Ge8G-IND boards: https://blog.mossroy.fr/2026/05/14/debian-13-sur-a64-olinuxino-2ge8g-ind/ (it's written in French).
Quote from: Roman on May 10, 2026, 09:05:36 PMNow it boots as expected untill "Starting kernel ..."
[ 2.836347] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 2.847404] sun50i-a64-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[ 2.856795] sun50i-a64-r-pinctrl 1f02c00.pinctrl: supply vcc-pl not found, using dummy regulator
[ 2.866685] sunxi-rsb 1f03400.rsb: RSB running at 4000000 Hz
[ 2.877472] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 2.891691] sun50i-a64-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 2.900359] dw-apb-uart 1c28000.serial: Error applying setting, reverse things back
[ 2.909301] dw-apb-uart 1c28000.serial: Error applying setting, reverse things back
[ 2.981557] clk: Disabling unused clocks