Hardware, Software, and Wetware on the Bleeding Edge

LicheePi Console 4A Kernel Build

I’ve been dissatisfied with the default kernel builds that Sipeed has provided for the LicheePi Console. The original kernel it shipped with didn’t even recognise the NVMe SSD (which cost about half of the rest of the laptop put together), and the new kernel installed from the RevyOS repository on the other hand didn’t have proper support for the battery monitor, so if I used that I’d have support for the SSD but be flying blind with battery levels. I’d been trying to figure out how to merge the two, but fortunately a new kernel build was released a couple weeks ago that supported both. Irritatingly however, the kernel also has a simple flag CONFIG_HIDRAW disabled. This is required to allow the use of USB FIDO2 2FA keys like those made by Yubico, which I’ve begun using on all services that support them. I don’t know why many kernels for SBCs disable this, which is recommended to be enabled anyway. I had to wrangle this out of the DietPi maintainers for the Quartz64.

So now I tried to rebuild the kernel to add that silly flag in. Building the kernel natively does not appear to be supported. I tried to do this at first, attempting to do things as I used to back in x86/amd64 land and then got a weird error about the zicsr extensions not being supported by the compiler. These appear to be privileged instructions: of course the kernel would need to use them. I don’t know why the compiler / assembler would bother disabling them. You either support the architecture or you don’t, and supporting it means you should be able to assemble all the instructions defined by the architecture. I could not figure out how to work around this nonsense and so have fallen back into cross compiling it on my amd64 laptop the way Sipeed says I should. We’ll see how this goes.

Leave a comment