genodelabs / goa

Tool for streamlining the development of Genode applications
GNU Affero General Public License v3.0
19 stars 18 forks source link

accessing externally provided ROM modules #55

Closed trimpim closed 10 months ago

trimpim commented 1 year ago

This allows access to ROM modules that are provided from outside of the project. The feature is activated as in the code snippet below:

<requires>
    <rom label="name_of_rom"/>
</requires>

To provide the ROM a lx_fs and a fs_rom component are started. A file with the name name_of_rom is expected in the sub directory roms.

jschlatow commented 1 year ago

@trimpim Thanks for your contribution. Please have a look at my comments in commit 279f156.

Would you be interested in implementing a similar mechanism for Report service requirements as well?

trimpim commented 1 year ago

@jschlatow I just pushed 3 fixup commits.

nfeske commented 1 year ago

Thanks for this very useful addition to Goa!

As a minor suggestion, could we rename "roms" to "rom" to stay consistent with the naming throughout Genode?

We usually don't name things in plural (e.g., depot "image" instead of "images") with "src/drivers" being the only exception (which will hopefully rectified down the road - https://github.com/genodelabs/genode/issues/4420#issuecomment-1438629544).

trimpim commented 1 year ago

@nfeske is 8df4759 what you had in mind?

trimpim commented 1 year ago

@jschlatow about your question regarding implementing the same for the Report service. I currently have too many other things on my open list. Therefore I'm able to do this in the foreseeable future.

nfeske commented 1 year ago

@nfeske is https://github.com/genodelabs/goa/commit/8df47590b904c0ea596fa8cdaabba3831a9fd2e1 what you had in mind?

Almost. The directory var/roms/ should be var/rom/. The start_roms_provider function should be named start_rom_provider. The name of the example comes to mind (which coincidentally only accesses one external ROM anyway). It'd probably be best to grep and find for roms to get all places covered.

trimpim commented 1 year ago

@nfeske and @jschlatow c0e070f adds the actual file for the test. It didn't get added as before, as the var directory is in .gitignore but it is required for the test.

jschlatow commented 1 year ago

@trimpim thanks a lot for the fixups. I have two more comments:

trimpim commented 12 months ago

@jschlatow happy to help.

jschlatow commented 10 months ago

Merged to staging as 2f54345

ssumpf commented 10 months ago
[init -> external_rom -> report_rom]   <input>
[init -> external_rom -> report_rom]    <hello value="Genodians"/>
[init -> external_rom -> report_rom]   </input

just out of curiosity does any one know why the last > of the output is always missing (e.g. </intput or </empty)?

trimpim commented 10 months ago

@ssumpf to me this sounds like it is related to https://github.com/genodelabs/genode/issues/4985

jschlatow commented 10 months ago

@ssumpf to me this sounds like it is related to genodelabs/genode#4985

Exactly!