mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] startup: add semihosting filesystem automount
@ 2025-05-27 21:03 Ahmad Fatoum
  2025-06-02 11:48 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-05-27 21:03 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

From: Ahmad Fatoum <ahmad@a3f.at>

For more convenient use of the semihosting file system, let's add an
automount when the file system is enabled.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 common/startup.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/startup.c b/common/startup.c
index bbe905141efc..c9e99d47fbd7 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -57,6 +57,7 @@ static int mount_root(void)
 	mount("none", "ramfs", "/", NULL);
 	mkdir("/dev", 0);
 	mkdir("/tmp", 0);
+	mkdir("/mnt", 0);
 	mount("none", "devfs", "/dev", NULL);
 
 	if (IS_ENABLED(CONFIG_FS_EFIVARFS) && efi_is_payload()) {
@@ -69,6 +70,11 @@ static int mount_root(void)
 		mount("none", "pstore", "/pstore", NULL);
 	}
 
+	if (IS_ENABLED(CONFIG_FS_SMHFS)) {
+		mkdir("/mnt/smhfs", 0);
+		automount_add("/mnt/smhfs", "mount -t smhfs /dev/null /mnt/smhfs");
+	}
+
 	return 0;
 }
 fs_initcall(mount_root);
-- 
2.39.5




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

end of thread, other threads:[~2025-06-02 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-27 21:03 [PATCH] startup: add semihosting filesystem automount Ahmad Fatoum
2025-06-02 11:48 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox