Open alain-lclark opened 1 year ago
Hi Alain, I've recently discovered this issue as well. What's happening is that the seL4CP tool uses the kernel_device_frames
array in the kernel ELF to know which device untypeds are not available to the user. Now what's happening with a release build of the kernel is that the compiler is doing optimisations and has decided to instead remove the array all together and I assume inline the accesses. This means that the symbol is gone by the time seL4CP reads the final kernel ELF.
So, how do we fix this? Fortunately there is instead a configuration file outputted by the kernel that contains the same data essentially and we can instead read from this instead of inspecting the kernel ELF. I'm waiting for https://github.com/seL4/seL4/pull/1061 to go through first, and then should be able to make a PR here with the fix.
I'm going to be on leave soon for a couple weeks and so if you need an urgent solution, this one line change to the kernel will also work: https://github.com/Ivan-Velickovic/seL4/commit/4542369ef353d325482ced8ddca235a750f2e35b.
Hi Ivan. It's not urgent. Just wanted to log the error. For now, I'm happy with debug builds. Thanks for the quick reply.
No worries, thanks for reporting it!
I'm trying to build the zcu102 hello example with SEL4CP_CONFIG set to "release" but it fails with the error message:
I can build a "debug" binary w/o any issue.
I'm using Nataliya Korovkina's docker file. I'm using the latest sel4cp sources (commit 192c223).
The command I'm using:
The output prior to the error message:
I'm getting a similar error message for other platforms (e.g., Odroid-C2).