Videostrong KII Pro (videostrong-kii-pro)/U-Boot as primary bootloader

This page documents possible ways to get mainline U-Boot to run as the primary bootloader and thus upgrade from U-Boot 2015.01.

Prerequisites

 * A way to recover

FIPs
It uses 4 Nanya NT5CB256M16DP-EK RAM chips.

Boards using the same SoC with known FIPs

 * WeTek Play 2 (uses the same RAM chips)
 * WeTek Hub (?)
 * Amlogic P200 (?)
 * Amlogic P201 (?)

How to build

 * Create a work directory
 * Patch and build U-Boot

Building and bundling the FIP

 * Get the binaries required to build the FIP (BL2, BL31, ...) and meson-tools, and install ARM Trusted Firmware utilities
 * Build  from meson-tools
 * Build TF-A's BL31 port (if you want a libre BL31 implementation (as seen in the example UART log below), optional)
 * Build the FIP

How to boot

 * Write to an SD card
 * On the set-top box, boot postmarketOS and erase the eMMC THIS WILL WIPE EVERYTHING. BE SURE THAT YOU HAVE A BACKUP
 * Power off
 * Insert the SD card where you wrote the U-Boot binary
 * Power on

Contributors

 * F