Bringing a Twitter convo with @justincormack & @rn here.
I need to build an entire custom kernel, not just a module (why is covered below, but not the core issue). However, doing so means I need to rebuild the whole LinuxKit docker-for-mac image. This means things like transfused and sendtohost aren't there so bind mounts break, and the taskbar app constantly thinks linuxkit is starting for example.
I created linuxkit-for-mac to workaround the need to extract those binaries from the linuxkit iso distributed with docker-ce for mac and include them in a new image that can be embedded in a new linuxkit build. It's a horrible hack.
Ideally, if the docker-ce image layer used for the docker-ce builds could be published on docker hub, we could rebuild a first class LinuxKit not a half working one. Alternatively, if individual layers, like a transfused one could be published, so we could recreate it without the need to first extract it from the running image, that would help. Of course, fully open sourcing things like transfused would be nice too, but not required.
As for the why (don't get stuck here, my request is for people with a general need to rebuild LinuxKit), I need to enable wifi extensions, so I can use the mac80211_hwsim module. The specific kernel config differences needed are here. You'll note this can't all be done as modules. That said, I tried. I extracted the /proc/config.gz from the distributed LinuxKit image, and followed this test example to build the modules. Trying to insmod them resulted in signal errors because of numerous missing symbols. Things like CONFIG_WIRELESS and CONFIG_WLAN are not available as modules. There may be a way to get this working, but it doesn't solve the general problem, of people looking to rebuild a fully working LinuxKit. On Twitter, I suggested adding those kernel config options to the distributed kernel, but on review, that doesn't make sense, it's an edge case that crufts up the kernel for the majority of people who don't need it.
Bringing a Twitter convo with @justincormack & @rn here.
I need to build an entire custom kernel, not just a module (why is covered below, but not the core issue). However, doing so means I need to rebuild the whole LinuxKit docker-for-mac image. This means things like transfused and sendtohost aren't there so bind mounts break, and the taskbar app constantly thinks linuxkit is starting for example.
I created linuxkit-for-mac to workaround the need to extract those binaries from the linuxkit iso distributed with docker-ce for mac and include them in a new image that can be embedded in a new linuxkit build. It's a horrible hack.
Ideally, if the docker-ce image layer used for the docker-ce builds could be published on docker hub, we could rebuild a first class LinuxKit not a half working one. Alternatively, if individual layers, like a transfused one could be published, so we could recreate it without the need to first extract it from the running image, that would help. Of course, fully open sourcing things like transfused would be nice too, but not required.
As for the why (don't get stuck here, my request is for people with a general need to rebuild LinuxKit), I need to enable wifi extensions, so I can use the mac80211_hwsim module. The specific kernel config differences needed are here. You'll note this can't all be done as modules. That said, I tried. I extracted the /proc/config.gz from the distributed LinuxKit image, and followed this test example to build the modules. Trying to insmod them resulted in signal errors because of numerous missing symbols. Things like CONFIG_WIRELESS and CONFIG_WLAN are not available as modules. There may be a way to get this working, but it doesn't solve the general problem, of people looking to rebuild a fully working LinuxKit. On Twitter, I suggested adding those kernel config options to the distributed kernel, but on review, that doesn't make sense, it's an edge case that crufts up the kernel for the majority of people who don't need it.