<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Run Zephyr OS for qemu_x86 and access guest Filesystem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75655/run-zephyr-os-for-qemu_x86-and-access-guest-filesystem</link><description>Hi, 
 We&amp;#39;re developing with Zephyr OS on nrf9160 and recently added SD Card support. We build our application also for qemu_x86 for testing purposes and would like to add some kind of filesystem support to basically fake the contents of the SD Card. Ideally</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Jun 2021 12:25:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75655/run-zephyr-os-for-qemu_x86-and-access-guest-filesystem" /><item><title>RE: Run Zephyr OS for qemu_x86 and access guest Filesystem</title><link>https://devzone.nordicsemi.com/thread/315130?ContentTypeID=1</link><pubDate>Mon, 14 Jun 2021 12:25:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01df1f2d-4b78-4d39-8036-ba806a74dd16</guid><dc:creator>n.marty</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/simoniversen"&gt;Simon&lt;/a&gt; I found a workaround process which gives me some basic testing abilities.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;use the cmake function &amp;quot;generate_inc_file_for_target&amp;quot;&lt;/li&gt;
&lt;li&gt;include resulting hex values in application and use the data in init function at startup&lt;/li&gt;
&lt;li&gt;write data to littleFS file using default file api&lt;/li&gt;
&lt;li&gt;the application can now use this file and I am able to run my tests&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So currently my limitation is that I am only able to modify files during build time. For my current testing purposes this is ok, not perfect but ok.&lt;br /&gt;I&amp;#39;m still watching &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/4911"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/4911&lt;/a&gt; and I&amp;#39;m still hoping to find a solution to be able to read/write files during runtime from outside qemu without having to implement some special features in the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Run Zephyr OS for qemu_x86 and access guest Filesystem</title><link>https://devzone.nordicsemi.com/thread/315077?ContentTypeID=1</link><pubDate>Mon, 14 Jun 2021 10:12:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e5bd2f3-796c-4bdf-9f03-c6c75044ec57</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Hello Marty,&lt;/p&gt;
&lt;p&gt;Sorry for the delay on this. Have you made any progress, or does the questions still stand?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Run Zephyr OS for qemu_x86 and access guest Filesystem</title><link>https://devzone.nordicsemi.com/thread/312419?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 14:05:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0ee9f06-3b2a-43e5-80cd-fbb2e08ab4e3</guid><dc:creator>n.marty</dc:creator><description>&lt;p&gt;Hi Simon&lt;/p&gt;
&lt;p&gt;Thank you for your efforts.&lt;br /&gt;&lt;br /&gt;In the meantime i managed to enable a LittleFS partition in qemu_x86 and&amp;nbsp; the zepyhr file system shell. This allows me to access the filesystem with special uart commands (see here: &lt;a href="https://docs.zephyrproject.org/latest/samples/subsys/shell/fs/README.html"&gt;https://docs.zephyrproject.org/latest/samples/subsys/shell/fs/README.html&lt;/a&gt;). Making the uart accessible from outside qemu was not a big deal (see here: &lt;a href="https://fadeevab.com/how-to-setup-qemu-output-to-console-and-automate-using-shell-script/"&gt;https://fadeevab.com/how-to-setup-qemu-output-to-console-and-automate-using-shell-script/&lt;/a&gt;). &lt;br /&gt;This interface now allows me to interact with files but it is very inefficient when I try to write large files in the magnitude of&amp;nbsp; a megabyte. &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The second approach which I am investigating is to use&amp;nbsp; &amp;quot;-drive&amp;quot; Parameter when executing qemu in order to make my data accessible to the Zephyr Guest OS. There was this issue here, which looks really similar to what I would like to achieve: &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/4911"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/4911&lt;/a&gt;. Unfortunately it was closed some time ago and never got resolved. &lt;br /&gt;I&amp;#39;m struggling to understand how this drive Parameter works and how the Zephyr Guest OS can make use of this. &lt;br /&gt;Is this going to be some peripheral device for Zephyr OS, any idea?&lt;br /&gt;&lt;br /&gt;The third idea is to somehow write data to the LittleFS partition before the Zephyr OS inside QEMU is booting. This way it would look like there was already a file and I can use that for my tests. Currently each time when I start Zephyr in qemu, the LittleFS partition is empty again. Any idea on how to achieve that?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Run Zephyr OS for qemu_x86 and access guest Filesystem</title><link>https://devzone.nordicsemi.com/thread/312202?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 16:58:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d35b27c6-3986-43f6-8682-bb3e94570483</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I don&amp;#39;t have a good overview of this. I&amp;#39;ve asked internally and currently waiting for an answer.&lt;/p&gt;
&lt;p&gt;You could also try to ask in any of the places here:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/guides/getting-help.html#asking-for-help"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/guides/getting-help.html#asking-for-help&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t get help, I will put off some time and look into this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>