Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filesystem support for qemu #4911

Closed
jhedberg opened this issue Nov 13, 2017 · 7 comments
Closed

Filesystem support for qemu #4911

jhedberg opened this issue Nov 13, 2017 · 7 comments
Labels
area: File System Feature Request A request for a new feature

Comments

@jhedberg
Copy link
Member

I'd like to be able to do something like "make run FS=/some/host/path" and have the directory structure under /some/host/path become available inside qemu as persistent storage that can be accessed using the Zephyr file system APIs.

@jhedberg jhedberg added area: File System Feature Request A request for a new feature labels Nov 13, 2017
@andrewboie
Copy link
Contributor

(01:14:40 PM) Anas: any idea if there is a way to emulate internal flash of an mcu with qemu? (#4911)
(01:18:02 PM) apboie: Anas: I know you can pass a disk image file to QEMU to use
(01:18:35 PM) apboie: -drive option
(01:18:59 PM) apboie: but that may or may not work, probably emulates a SATA device or something, not some memory-mapped flash
(01:21:01 PM) leandro.pereira: you can pass different interface types
(01:21:39 PM) leandro.pereira: -drive if=pflash,file=/path/to/some/flash/image.img
(01:22:08 PM) leandro.pereira: (not sure if pflash is what you're looking for, though.)
(01:25:18 PM) apboie: that seems the right ballpark

@carlescufi
Copy link
Member

N/A

@mglettig
Copy link

@carlescufi @andrewboie What is the status on this topic? We try to achieve the same thing. So far we managed to mount a little FS filesystem on QEMU_X86. But we strugle on how to put data from the host system to the guest system (QEMU). I think the drive parameter would be the right approach but I can't see how to use it so that it gets detected by Zephyr.

@carlescufi
Copy link
Member

@mglettig this is supported in native_posix instead, maybe that would be a solution for you?

@yashi
Copy link
Collaborator

yashi commented Jun 12, 2021

@mglettig, it's quite easy to create a genlittlefs tool using its library. You can point to a generated file system image when you run qemu instance.

@mglettig
Copy link

mglettig commented Jun 14, 2021

@mglettig this is supported in native_posix instead, maybe that would be a solution for you?

Good idea. Unfortunately this is not possible in my case due to this bug here: #34226 So I'm currently stuck with QEMU.

@yashi This sounds very promising. How can I point to the generated file system image from QEMU? And how will my Zephyr application find this filesystem image so I can mount the Little FS filesystem? Any hints would be welcome.

@yashi
Copy link
Collaborator

yashi commented Jun 15, 2021

@mglettig Oops, I meant native_posix instance, zephyr.exe. Not qemu. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: File System Feature Request A request for a new feature
Projects
None yet
Development

No branches or pull requests

5 participants