Hello Genodians
We have an tool that can read / write the environment of U-BOOT. On Genode 25.05 reading / writing works without any problems.
The relevant part of the config looks as follows:
<start name="usdhc" caps="150" ram="16M"> <binary name="imx8mq_sd_card"/> <provides> <service name="Block"/> </provides> <config report="yes"> <default-policy device="mmcblk1boot0" writeable="yes"/> </config> <route> <any-service> <parent/> </any-service> </route> </start>
<start name="uboot_tool" caps="100" ram="16M"> <route> <service name="Block"> <child name="usdhc"/> </service> <any-service> <parent/> </any-service> </route> </start>
When switching to Genode 25.08 or sculpt-25.10 there is the following error when trying to write:
[init -> uboot_tool] Error: failed to read environment data WRITE block=7680 count=128
Read access still works.
How do I need to update the policy to allow write access to the U-BOOT partition?
For normal partitions it adding the default policy as described in the release notes for Genode 25.08 was sufficient.
Kind regards, Pirmin
Hello Pirmin,
When switching to Genode 25.08 or sculpt-25.10 there is the following error when trying to write:
[init -> uboot_tool] Error: failed to read environment data WRITE block=7680 count=128
Read access still works.
How do I need to update the policy to allow write access to the U-BOOT partition?
Ideally the U-Boot partition should not have to be treated differently. That being said, I have never attempted to alter U-Boot from within Genode.
I would start by instrumenting '_create_session()' in [1] and check in partiticular how 'view.writeable' is determined.
[1] repos/os/src/lib/genode_c_api/block.cc
Best regards Josef
Hello Josef
Thanks for the quick reply.
On 2025-11-28 12:02, Josef Söntgen wrote:
Hello Pirmin,
When switching to Genode 25.08 or sculpt-25.10 there is the following error when trying to write:
[init -> uboot_tool] Error: failed to read environment data WRITE block=7680 count=128
Read access still works.
How do I need to update the policy to allow write access to the U-BOOT partition?
Ideally the U-Boot partition should not have to be treated differently. That being said, I have never attempted to alter U-Boot from within Genode.
I would start by instrumenting '_create_session()' in [1] and check in partiticular how 'view.writeable' is determined.
[1] repos/os/src/lib/genode_c_api/block.cc
After some further discussions internally, a colleague pointed out, that now the start offset and size can be specified in the Block session. This is normally done by part_block.
As the component handling the environment is connected directly to the Block device driver in this example, this information is probably missing.
If this doesn't help, I will continue with your suggestion.
Best regards and a nice weekend, Pirmin