/* Check the SPL header for the "sunxi" variant. If found: parse values that might have been passed by the loader ("fel" utility), and update the environment accordingly.  */
static void parse_spl_header(const uint32_t spl_addr)
/* Check the SPL header for the "sunxi" variant. If found: parse values that might have been passed by the loader ("fel" utility), and update the environment accordingly.  */
static void parse_spl_header(const uint32_t spl_addr)
{
	struct boot_file_head *spl = get_spl_header(SPL_ENV_HEADER_VERSION);
	if (spl == INVALID_SPL_HEADER)
		return;
	if (!spl->fel_script_address)
		return;
	if (spl->fel_uEnv_length != 0) {
		himport_r(&env_htab, (char *)(uintptr_t)spl->fel_script_address,
			  spl->fel_uEnv_length, '\n', H_NOCLEAR, 0, 0, NULL);
		return;
	}
	env_set_hex("fel_scriptaddr", spl->fel_script_address);
}