# TH1520 coreboot + OpenSBI + EDK2 firmware

> **Warning: A cooling fan or heat dissipation device is required.**
> Default frequency is 1.84 GHz.
> Risk of hardware damage; proceed with caution.

All four images use coreboot, OpenSBI and EDK2. DDR initialization is
native coreboot code. There is no U-Boot SPL or runtime in these images.

| Board | RAM recovery | Normal firmware |
| --- | --- | --- |
| Lichee Pi 4A | lpi4a-ram-recovery.bin | lpi4a-emmc-boot0.bin |

Recovery images are 1 MiB; normal images are 2 MiB. Use the matching
board image. These builds support the dual-rank 8/16 GiB DDR profiles.
Capacity comes from physical address probes, not the DTB memory size.
Both profiles start AON and verify CPU rail voltage before 1848 MHz.

## Install

Verify the files with `sha256sum -c SHA256SUMS`.

Connect USB-C. Hold BOOT, tap RESET, then release BOOT. BootROM should
appear as USB `2345:7654` and be listed by `fastboot devices`.

For LPi4A:

```sh
fastboot -S 0 flash ram lpi4a-ram-recovery.bin
fastboot reboot
fastboot -s lpi4a-recovery getvar product
fastboot -s lpi4a-recovery -S 0 flash emmcboot0 lpi4a-emmc-boot0.bin
fastboot -s lpi4a-recovery reboot
```

Wait for the recovery device to reconnect and confirm its product
before flashing. BootROM `flash ram` does not write persistent media.
The storage write reads back the image for verification. LPi4A keeps
the final 8 KiB of boot0 for MAC records. eMMC boot selection is preserved.

Normal firmware has a 10-second countdown: Enter continues boot,
F2 opens setup, F9 opens USB Fastboot and F12 opens the boot menu.
The raw `emmcboot0` update commands above run in RAM Recovery.
