First, a quick disclaimer: I’m not a regular kernel contributor, so my repository may contain daft stuff as I’m learning along the way. Also, I’m push-force’ing branches on this repository, so it is unstable ground - in a quicksand sense. But beyond this, happy that it can be useful.
About shutdown & reboot support, my understanding is that part of the needed support comes from SBI level. From memory the support was added in SBI spec v0.3.
Then , opensbi will have to implement this API, and the kernel to use it. I have not yet rebuilt the u-boot and opensbi which came with the board, so I do not know the current status.
FWIW, here is my /etc/modules, as for some reason not all applicable modules get automatically loaded:
Not everything may be necessary.
Lastly on the topic of the source code, I completely neglected
.config generation. My basis is Debian sid’s kernel config (which itself is not bootable on the unmatched), plus bits from the one of the kernel on the board’s sdcard (
/proc/config*), plus what I put my hands in. I guess I should look into adding bits to defconfig.
About the errors:
I have not looked into the
gpio-poweroff error message: my guess is that something outside of devicetree is already registering that GPIO, duplicating a declaration present in the devicetree.
I looked a tiny bit into the
DMA mask not set errors, but they make no sense to me:
- what is the meaning of DMA for an i2c chip ? I guess there is none.
- what is the meaning of DMA for a subfunction of a chip, when the main chip driver does not have DMA ?
- I believe my devicetree changes for these subfunction look like the examples in
Documentation/devicetree/bindings, which do not mention DMA.
so I’m not sure what direction the fix should go.