All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] VExpress64: Migrate to Standard Boot
@ 2025-08-28 13:06 Said Nasibov
  2025-08-28 13:06 ` [RFC PATCH 1/2] bootmeth: implement semihosting (smh) boot method Said Nasibov
  2025-08-28 13:06 ` [RFC PATCH 2/2] vexpress64: replace distro boot with standard boot Said Nasibov
  0 siblings, 2 replies; 7+ messages in thread
From: Said Nasibov @ 2025-08-28 13:06 UTC (permalink / raw)
  To: u-boot
  Cc: trini, sjg, andre.przywara, peter.hoyes, david.hu2, michael.zhao2,
	marek.vasut+renesas, mkorpershoek, pbrobinson, ilias.apalodimas,
	m.schwan, quentin.schulz, rayagonda.kokatanur, tien.fong.chee,
	casey.connolly, patrick.rudolph, alif.zakuan.yuslaimi,
	boyan.karatotev, Oliver.Gaskell, duje, 1425075683, Said Nasibov

This patch series migrates the vexpress64 platform to use the standard
boot framework (bootstd), moving away from legacy distro boot logic. As
part of this migration, a new semihosting boot method (bootmeth_smh) is
introduced.

Patch 1 adds the new `bootmeth_smh` implementation.
Patch 2 enables `bootstd` by default on vexpress64 and selects the
semihosting bootmeth when bootstd is active.

Tested on FVP_Base_RevC with a Linux kernel.

Said Nasibov (2):
  bootmeth: implement semihosting (smh) boot method
  vexpress64: replace distro boot with standard boot

 arch/arm/Kconfig    |   3 +-
 boot/Kconfig        |  10 ++++
 boot/Makefile       |   1 +
 boot/bootmeth_smh.c | 113 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 126 insertions(+), 1 deletion(-)
 create mode 100644 boot/bootmeth_smh.c

--
2.34.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [RFC PATCH 1/2] bootmeth: implement semihosting (smh) boot method
  2025-08-28 13:06 [RFC PATCH 0/2] VExpress64: Migrate to Standard Boot Said Nasibov
@ 2025-08-28 13:06 ` Said Nasibov
  2025-08-28 17:34   ` Tom Rini
  2025-09-10 16:48   ` Andre Przywara
  2025-08-28 13:06 ` [RFC PATCH 2/2] vexpress64: replace distro boot with standard boot Said Nasibov
  1 sibling, 2 replies; 7+ messages in thread
From: Said Nasibov @ 2025-08-28 13:06 UTC (permalink / raw)
  To: u-boot
  Cc: trini, sjg, andre.przywara, peter.hoyes, david.hu2, michael.zhao2,
	marek.vasut+renesas, mkorpershoek, pbrobinson, ilias.apalodimas,
	m.schwan, quentin.schulz, rayagonda.kokatanur, tien.fong.chee,
	casey.connolly, patrick.rudolph, alif.zakuan.yuslaimi,
	boyan.karatotev, Oliver.Gaskell, duje, 1425075683, Said Nasibov

This commit introduces a new standard boot method that supports booting
via semihosting as provided by ARM FVP platforms.

Semihosting enables the virtual platform to access host-side files as if
they were block devices, which is particularly useful in early boot
development and simulation environments. It removes the need for physical
storage or networking when loading kernel components.

This method mirrors the distroboot logic for semihosting, which is the
default boot method for vexpress64 platform. The load_file_from_host
helper function is implemented to mirror behaviour of "load hostfs" u-boot
command, so it similarly sets filesize environment variable after loading a
file - this is useful for later commands.

This implementation is marked with BOOTMETH_GLOBAL so it is always
considered during bootflow scan without requiring a boot device.

Signed-off-by: Said Nasibov <said.nasibov@arm.com>
---
 boot/Kconfig        |  10 ++++
 boot/Makefile       |   1 +
 boot/bootmeth_smh.c | 113 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 124 insertions(+)
 create mode 100644 boot/bootmeth_smh.c

diff --git a/boot/Kconfig b/boot/Kconfig
index 2ff6f003738..fbd3f068908 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -936,6 +936,16 @@ config BOOTMETH_SCRIPT
          This provides a way to try out standard boot on an existing boot flow.
          It is not enabled by default to save space.

+config BOOTMETH_SMH
+       bool "Bootdev support for semihosting"
+       depends on SEMIHOSTING
+       select CMD_FDT
+       select BOOTMETH_GLOBAL
+       help
+         Enables support for booting via semihosting. This bootmeth reads
+         files including the kernel, device tree and ramdisk directly from
+         the host's filesystem.
+
 config UPL
        bool "upl - Universal Payload Specification"
        imply CMD_UPL
diff --git a/boot/Makefile b/boot/Makefile
index 3da6f7a0914..5bed9e66507 100644
--- a/boot/Makefile
+++ b/boot/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_$(PHASE_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o
 obj-$(CONFIG_$(PHASE_)BOOTMETH_SCRIPT) += bootmeth_script.o
 obj-$(CONFIG_$(PHASE_)CEDIT) += cedit.o
 obj-$(CONFIG_$(PHASE_)BOOTMETH_EFI_BOOTMGR) += bootmeth_efi_mgr.o
+obj-$(CONFIG_$(PHASE_)BOOTMETH_SMH) += bootmeth_smh.o

 obj-$(CONFIG_$(PHASE_)OF_LIBFDT) += fdt_support.o
 obj-$(CONFIG_$(PHASE_)FDT_SIMPLEFB) += fdt_simplefb.o
diff --git a/boot/bootmeth_smh.c b/boot/bootmeth_smh.c
new file mode 100644
index 00000000000..2ceb66900ed
--- /dev/null
+++ b/boot/bootmeth_smh.c
@@ -0,0 +1,113 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Bootmethod for booting using semihosting
+ *
+ * Copyright 2025 Arm Ltd.
+ * Written by Said Nasibov <said.nasibov@arm.com>
+ */
+
+#define LOG_CATEGORY UCLASS_BOOTSTD
+
+#include <bootmeth.h>
+#include <dm.h>
+#include <env.h>
+#include <fs.h>
+
+static int script_check(struct udevice *dev, struct bootflow_iter *iter)
+{
+       return 0;
+}
+
+static int load_file_from_host(const char *name_var, const char *addr_var)
+{
+       const char *filename = env_get(name_var);
+       const char *addr_str = env_get(addr_var);
+       ulong addr;
+       loff_t len;
+       int ret;
+
+       /* Mount hostfs (semihosting) */
+       ret = fs_set_blk_dev("hostfs", NULL, FS_TYPE_ANY);
+       if (ret)
+               return log_msg_ret("hostfs", ret);
+
+       if (!filename || !addr_str)
+               return log_msg_ret("env missing", -EINVAL);
+
+       addr = hextoul(addr_str, NULL);
+       if (!addr)
+               return log_msg_ret("invalid addr", -EINVAL);
+
+       /* Read file into memory */
+       ret = fs_read(filename, addr, 0, 0, &len);
+       if (ret)
+               return log_msg_ret("fs_read", ret);
+
+       /* Set filesize environment variable in hex */
+       char size_str[32];
+       sprintf(size_str, "%lx", (unsigned long)len);
+       env_set("filesize", size_str);
+
+       return 0;
+}
+
+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");
+
+       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");
+
+       bflow->state = BOOTFLOWST_READY;
+
+       return 0;
+}
+
+static int smh_boot(struct udevice *dev, struct bootflow *bflow)
+{
+       int ret = run_command("booti $kernel_addr_r ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};", 0);
+
+       return ret;
+}
+
+static int smh_bootmeth_bind(struct udevice *dev)
+{
+       struct bootmeth_uc_plat *plat = dev_get_uclass_plat(dev);
+
+       plat->desc = "semihosting";
+       plat->flags = BOOTMETHF_GLOBAL;
+
+       return 0;
+}
+
+static struct bootmeth_ops smh_bootmeth_ops = {
+       .check          = script_check,
+       .read_bootflow  = smh_read_bootflow,
+       .boot           = smh_boot,
+};
+
+static const struct udevice_id smh_bootmeth_ids[] = {
+       { .compatible = "u-boot,smh" },
+       {}
+};
+
+U_BOOT_DRIVER(bootmeth_0smh) = {
+       .name           = "bootmeth_smh",
+       .id             = UCLASS_BOOTMETH,
+       .of_match       = smh_bootmeth_ids,
+       .ops            = &smh_bootmeth_ops,
+       .bind       = &smh_bootmeth_bind,
+};
--
2.34.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC PATCH 2/2] vexpress64: replace distro boot with standard boot
  2025-08-28 13:06 [RFC PATCH 0/2] VExpress64: Migrate to Standard Boot Said Nasibov
  2025-08-28 13:06 ` [RFC PATCH 1/2] bootmeth: implement semihosting (smh) boot method Said Nasibov
@ 2025-08-28 13:06 ` Said Nasibov
  2025-09-10 16:48   ` Andre Przywara
  1 sibling, 1 reply; 7+ messages in thread
From: Said Nasibov @ 2025-08-28 13:06 UTC (permalink / raw)
  To: u-boot
  Cc: trini, sjg, andre.przywara, peter.hoyes, david.hu2, michael.zhao2,
	marek.vasut+renesas, mkorpershoek, pbrobinson, ilias.apalodimas,
	m.schwan, quentin.schulz, rayagonda.kokatanur, tien.fong.chee,
	casey.connolly, patrick.rudolph, alif.zakuan.yuslaimi,
	boyan.karatotev, Oliver.Gaskell, duje, 1425075683, Said Nasibov

This commit updates vexpress64 configs to default to standard boot, and
explicitly select bootmeth_smh when standard boot is enabled.

The distro boot related variables are deliberately not removed to preserve
compatibility with existing distro boot flows.

Signed-off-by: Said Nasibov <said.nasibov@arm.com>
---
 arch/arm/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5872455a0fe..527a865e4dc 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1413,7 +1413,8 @@ config ARCH_VEXPRESS64
        select MTD_NOR_FLASH if MTD
        select FLASH_CFI_DRIVER if MTD
        select ENV_IS_IN_FLASH if MTD
-       imply DISTRO_DEFAULTS
+       imply BOOTSTD_DEFAULTS
+       select BOOTMETH_SMH if BOOTSTD

 config TARGET_CORSTONE1000
        bool "Support Corstone1000 Platform"
--
2.34.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH 1/2] bootmeth: implement semihosting (smh) boot method
  2025-08-28 13:06 ` [RFC PATCH 1/2] bootmeth: implement semihosting (smh) boot method Said Nasibov
@ 2025-08-28 17:34   ` Tom Rini
  2025-09-10 16:48   ` Andre Przywara
  1 sibling, 0 replies; 7+ messages in thread
From: Tom Rini @ 2025-08-28 17:34 UTC (permalink / raw)
  To: Said Nasibov
  Cc: u-boot, sjg, andre.przywara, peter.hoyes, david.hu2,
	michael.zhao2, marek.vasut+renesas, mkorpershoek, pbrobinson,
	ilias.apalodimas, m.schwan, quentin.schulz, rayagonda.kokatanur,
	tien.fong.chee, casey.connolly, patrick.rudolph,
	alif.zakuan.yuslaimi, boyan.karatotev, Oliver.Gaskell, duje,
	1425075683

[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]

On Thu, Aug 28, 2025 at 02:06:56PM +0100, Said Nasibov wrote:

> This commit introduces a new standard boot method that supports booting
> via semihosting as provided by ARM FVP platforms.
> 
> Semihosting enables the virtual platform to access host-side files as if
> they were block devices, which is particularly useful in early boot
> development and simulation environments. It removes the need for physical
> storage or networking when loading kernel components.
> 
> This method mirrors the distroboot logic for semihosting, which is the
> default boot method for vexpress64 platform. The load_file_from_host
> helper function is implemented to mirror behaviour of "load hostfs" u-boot
> command, so it similarly sets filesize environment variable after loading a
> file - this is useful for later commands.
> 
> This implementation is marked with BOOTMETH_GLOBAL so it is always
> considered during bootflow scan without requiring a boot device.
> 
> Signed-off-by: Said Nasibov <said.nasibov@arm.com>
[snip]
> +       env_set("fdt_high", "0xffffffffffffffff");
> +       env_set("initrd_high", "0xffffffffffffffff");

Why do we need to do this? U-Boot should be able to move things if
needed, as there's good reason when it does this.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH 1/2] bootmeth: implement semihosting (smh) boot method
  2025-08-28 13:06 ` [RFC PATCH 1/2] bootmeth: implement semihosting (smh) boot method Said Nasibov
  2025-08-28 17:34   ` Tom Rini
@ 2025-09-10 16:48   ` Andre Przywara
  2025-09-11 15:58     ` Sean Anderson
  1 sibling, 1 reply; 7+ messages in thread
From: Andre Przywara @ 2025-09-10 16:48 UTC (permalink / raw)
  To: Said Nasibov
  Cc: u-boot, trini, sjg, peter.hoyes, david.hu2, michael.zhao2,
	marek.vasut+renesas, mkorpershoek, pbrobinson, ilias.apalodimas,
	m.schwan, quentin.schulz, rayagonda.kokatanur, tien.fong.chee,
	casey.connolly, patrick.rudolph, alif.zakuan.yuslaimi,
	boyan.karatotev, Oliver.Gaskell, duje, 1425075683, Sean Anderson

On Thu, 28 Aug 2025 14:06:56 +0100
Said Nasibov <said.nasibov@arm.com> wrote:

Hi Said,

thanks for posting this!

(quite a long CC: list, but missing the semihosting maintainer! ;-) Adding
Sean)

> This commit introduces a new standard boot method that supports booting
> via semihosting as provided by ARM FVP platforms.
> 
> Semihosting enables the virtual platform to access host-side files as if
> they were block devices, which is particularly useful in early boot

it's not really "block devices", but "on a filesystem"

> development and simulation environments. It removes the need for physical
> storage or networking when loading kernel components.
> 
> This method mirrors the distroboot logic for semihosting, which is the
> default boot method for vexpress64 platform. The load_file_from_host
> helper function is implemented to mirror behaviour of "load hostfs" u-boot
> command, so it similarly sets filesize environment variable after loading a
> file - this is useful for later commands.
> 
> This implementation is marked with BOOTMETH_GLOBAL so it is always
> considered during bootflow scan without requiring a boot device.

So I like that this exposes this to all platforms, but it seems to
inherit some VExpress specific choices. And while $fdtfile seems to be used
quite universally across the tree, $kernel_name and $ramdisk_name seem more
arbitrary. I guess they are fine, but would be curious to hear if someone
else has a pointer to prior art which sets file names for those components.

Also, when stdboot replaces distroboot in the next patch, this will
silently drop support for the Android boot images. I am personally fine
with this, but wonder if we should keep the current boot flow, to not
break existing users.

So either we add bootimg support here, protected by ARCH_VEXPRESS, or we
add it in a separate file, with some kind of platform specific callback?

> 
> Signed-off-by: Said Nasibov <said.nasibov@arm.com>
> ---
>  boot/Kconfig        |  10 ++++
>  boot/Makefile       |   1 +
>  boot/bootmeth_smh.c | 113 ++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 124 insertions(+)
>  create mode 100644 boot/bootmeth_smh.c
> 
> diff --git a/boot/Kconfig b/boot/Kconfig
> index 2ff6f003738..fbd3f068908 100644
> --- a/boot/Kconfig
> +++ b/boot/Kconfig
> @@ -936,6 +936,16 @@ config BOOTMETH_SCRIPT
>  	  This provides a way to try out standard boot on an existing boot flow.
>  	  It is not enabled by default to save space.
>  
> +config BOOTMETH_SMH
> +	bool "Bootdev support for semihosting"
> +	depends on SEMIHOSTING
> +	select CMD_FDT
> +	select BOOTMETH_GLOBAL
> +	help
> +	  Enables support for booting via semihosting. This bootmeth reads
> +	  files including the kernel, device tree and ramdisk directly from
> +	  the host's filesystem.
> +
>  config UPL
>  	bool "upl - Universal Payload Specification"
>  	imply CMD_UPL
> diff --git a/boot/Makefile b/boot/Makefile
> index 3da6f7a0914..5bed9e66507 100644
> --- a/boot/Makefile
> +++ b/boot/Makefile
> @@ -37,6 +37,7 @@ obj-$(CONFIG_$(PHASE_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o
>  obj-$(CONFIG_$(PHASE_)BOOTMETH_SCRIPT) += bootmeth_script.o
>  obj-$(CONFIG_$(PHASE_)CEDIT) += cedit.o
>  obj-$(CONFIG_$(PHASE_)BOOTMETH_EFI_BOOTMGR) += bootmeth_efi_mgr.o
> +obj-$(CONFIG_$(PHASE_)BOOTMETH_SMH) += bootmeth_smh.o
>  
>  obj-$(CONFIG_$(PHASE_)OF_LIBFDT) += fdt_support.o
>  obj-$(CONFIG_$(PHASE_)FDT_SIMPLEFB) += fdt_simplefb.o
> diff --git a/boot/bootmeth_smh.c b/boot/bootmeth_smh.c
> new file mode 100644
> index 00000000000..2ceb66900ed
> --- /dev/null
> +++ b/boot/bootmeth_smh.c
> @@ -0,0 +1,113 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Bootmethod for booting using semihosting
> + *
> + * Copyright 2025 Arm Ltd.
> + * Written by Said Nasibov <said.nasibov@arm.com>
> + */
> +
> +#define LOG_CATEGORY UCLASS_BOOTSTD
> +
> +#include <bootmeth.h>
> +#include <dm.h>
> +#include <env.h>
> +#include <fs.h>
> +
> +static int script_check(struct udevice *dev, struct bootflow_iter *iter)
> +{
> +	return 0;
> +}
> +
> +static int load_file_from_host(const char *name_var, const char *addr_var)
> +{
> +	const char *filename = env_get(name_var);
> +	const char *addr_str = env_get(addr_var);
> +	ulong addr;
> +	loff_t len;
> +	int ret;
> +
> +	/* Mount hostfs (semihosting) */
> +	ret = fs_set_blk_dev("hostfs", NULL, FS_TYPE_ANY);
> +	if (ret)
> +		return log_msg_ret("hostfs", ret);
> +
> +	if (!filename || !addr_str)
> +		return log_msg_ret("env missing", -EINVAL);
> +
> +	addr = hextoul(addr_str, NULL);
> +	if (!addr)
> +		return log_msg_ret("invalid addr", -EINVAL);
> +
> +	/* Read file into memory */
> +	ret = fs_read(filename, addr, 0, 0, &len);
> +	if (ret)
> +		return log_msg_ret("fs_read", ret);
> +
> +	/* Set filesize environment variable in hex */
> +	char size_str[32];
> +	sprintf(size_str, "%lx", (unsigned long)len);
> +	env_set("filesize", size_str);
> +
> +	return 0;
> +}
> +
> +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.

But in general this seems to work, though it is a bit silent, in that it
doesn't announce the files (successfully) loaded, as it did before.

Cheers,
Andre

> +
> +	bflow->state = BOOTFLOWST_READY;
> +
> +	return 0;
> +}
> +
> +static int smh_boot(struct udevice *dev, struct bootflow *bflow)
> +{
> +	int ret = run_command("booti $kernel_addr_r ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};", 0);
> +
> +	return ret;
> +}
> +
> +static int smh_bootmeth_bind(struct udevice *dev)
> +{
> +	struct bootmeth_uc_plat *plat = dev_get_uclass_plat(dev);
> +
> +	plat->desc = "semihosting";
> +	plat->flags = BOOTMETHF_GLOBAL;
> +
> +	return 0;
> +}
> +
> +static struct bootmeth_ops smh_bootmeth_ops = {
> +	.check		= script_check,
> +	.read_bootflow	= smh_read_bootflow,
> +	.boot		= smh_boot,
> +};
> +
> +static const struct udevice_id smh_bootmeth_ids[] = {
> +	{ .compatible = "u-boot,smh" },
> +	{}
> +};
> +
> +U_BOOT_DRIVER(bootmeth_0smh) = {
> +	.name		= "bootmeth_smh",
> +	.id		= UCLASS_BOOTMETH,
> +	.of_match	= smh_bootmeth_ids,
> +	.ops		= &smh_bootmeth_ops,
> +	.bind       = &smh_bootmeth_bind,
> +};


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH 2/2] vexpress64: replace distro boot with standard boot
  2025-08-28 13:06 ` [RFC PATCH 2/2] vexpress64: replace distro boot with standard boot Said Nasibov
@ 2025-09-10 16:48   ` Andre Przywara
  0 siblings, 0 replies; 7+ messages in thread
From: Andre Przywara @ 2025-09-10 16:48 UTC (permalink / raw)
  To: Said Nasibov
  Cc: u-boot, trini, sjg, peter.hoyes, david.hu2, michael.zhao2,
	marek.vasut+renesas, mkorpershoek, pbrobinson, ilias.apalodimas,
	m.schwan, quentin.schulz, rayagonda.kokatanur, tien.fong.chee,
	casey.connolly, patrick.rudolph, alif.zakuan.yuslaimi,
	boyan.karatotev, Oliver.Gaskell, duje, 1425075683

On Thu, 28 Aug 2025 14:06:57 +0100
Said Nasibov <said.nasibov@arm.com> wrote:

Hi,

> This commit updates vexpress64 configs to default to standard boot, and
> explicitly select bootmeth_smh when standard boot is enabled.
> 
> The distro boot related variables are deliberately not removed to preserve
> compatibility with existing distro boot flows.
> 
> Signed-off-by: Said Nasibov <said.nasibov@arm.com>
> ---
>  arch/arm/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 5872455a0fe..527a865e4dc 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1413,7 +1413,8 @@ config ARCH_VEXPRESS64
>  	select MTD_NOR_FLASH if MTD
>  	select FLASH_CFI_DRIVER if MTD
>  	select ENV_IS_IN_FLASH if MTD
> -	imply DISTRO_DEFAULTS
> +	imply BOOTSTD_DEFAULTS
> +	select BOOTMETH_SMH if BOOTSTD

This will not work, since the Juno board is also VEXPRESS64, but does not
feature semihosting. "make vexpress_aemv8a_juno_defconfig" consequently
produces warnings during configuration.

 	select BOOTMETH_SMH if BOOTSTD && SEMIHOSTING

should fix that.

Cheers,
Andre

>  config TARGET_CORSTONE1000
>  	bool "Support Corstone1000 Platform"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH 1/2] bootmeth: implement semihosting (smh) boot method
  2025-09-10 16:48   ` Andre Przywara
@ 2025-09-11 15:58     ` Sean Anderson
  0 siblings, 0 replies; 7+ messages in thread
From: Sean Anderson @ 2025-09-11 15:58 UTC (permalink / raw)
  To: Andre Przywara, Said Nasibov
  Cc: u-boot, trini, sjg, peter.hoyes, david.hu2, michael.zhao2,
	marek.vasut+renesas, mkorpershoek, pbrobinson, ilias.apalodimas,
	m.schwan, quentin.schulz, rayagonda.kokatanur, tien.fong.chee,
	casey.connolly, patrick.rudolph, alif.zakuan.yuslaimi,
	boyan.karatotev, Oliver.Gaskell, duje, 1425075683

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-09-11 15:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28 13:06 [RFC PATCH 0/2] VExpress64: Migrate to Standard Boot Said Nasibov
2025-08-28 13:06 ` [RFC PATCH 1/2] bootmeth: implement semihosting (smh) boot method Said Nasibov
2025-08-28 17:34   ` Tom Rini
2025-09-10 16:48   ` Andre Przywara
2025-09-11 15:58     ` Sean Anderson
2025-08-28 13:06 ` [RFC PATCH 2/2] vexpress64: replace distro boot with standard boot Said Nasibov
2025-09-10 16:48   ` Andre Przywara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.