[RFC PATCH 1/2] bootmeth: implement semihosting (smh) boot method

Sean Anderson sean.anderson at seco.com
Thu Sep 11 17:58:53 CEST 2025


On 9/10/25 12:48, Andre Przywara wrote:
>> +static int smh_read_bootflow(struct udevice *dev, struct bootflow *bflow)
>> +{
>> +	int ret;
>> +
>> +	ret = load_file_from_host("kernel_name", "kernel_addr_r");
>> +	if (ret)
>> +		return log_msg_ret("kernel", ret);
>> +
>> +	env_set("fdt_high", "0xffffffffffffffff");
>> +	env_set("initrd_high", "0xffffffffffffffff");
> 
> As Tom already mentioned, this seems a bit of cargo cult, carried on from
> generation to generation, we should drop this.
> 
>> +
>> +	ret = load_file_from_host("fdtfile", "fdt_addr_r");
>> +	if (ret) {
>> +		ret = run_command("fdt move $fdtcontroladdr $fdt_addr_r;", 0);
>> +		if (ret)
>> +			return log_msg_ret("fdt move", ret);
>> +	}
>> +
>> +	load_file_from_host("ramdisk_name", "ramdisk_addr_r");
> 
> Should we support running without an initramfs? So when this call fails,
> we just use "-" for the second booti parameter.

Personally, I don't use separate FDTs or initramfses at all. It seems like this
flow will break FITs that include their own devicetrees (if they differ from U-Boot's).

--Sean



More information about the U-Boot mailing list