After configuring the vendor uBoot to chainload into a newer uBoot-compile with JustEnoughUEFI compiled in, you can just launch the standard Debian Arm64/UEFI install iso on many/most(?) popular SOCs.
W.r.t. GPIOs, I agree, that delegating that to an e.g. Arduino connected via USB/UART or one of the available internal(often RTC), or external(HDMI/VGA) I2C connections as an I2C slave is the preferred solution.