-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-kernel support #12
Comments
I've minimized the https://github.com/rehosting/linux/compare/v4.10...min_4.10?expand=1 Still needs testing. |
With these kernel changes the test suite hangs 😦 |
Tracked things down to a crash in proc_map.
The test suite does not handle this sort of failure well, I had to hack up the test suite to preserve the tmp directory, then run the container manually and run |
@jamcleod gave me a lot of great details on limitations we might see trying to handle our rust-based dependencies. Some of that discussion might be worthwhile to add here or in another issue. I took a stab at porting @AndrewFasano's min_4.10 branch to 2.6 here: https://github.com/rehosting/linux/tree/min_2.6 It doesn't currently compile with linux_builder as that has GCC 11 and this requires GCC 3 or 4 as far as I can tell. |
Tracked down the hang to be caused by a bug in penguin_plugin proc map and fixed it with https://github.com/rehosting/penguin_plugins/commit/b87a34789be64d8aa2e6294ea46b3eab3665fc36. Tests are (so far) passing - will force push to |
I renamed what was I created a penguin PR to switch to the new kernel version. |
Split into 3 issues, first of which is done when we merge the penguin PR. I'm un-assigning myself from the other 2 |
Open question here: what's the best way to maintain a patch series for multiple kernel versions? Should we:
We're currently doing option 1, but kind of like option 2 (especially if we ever support fully dynamic kernel selection and JIT building) but it would definitely have more setup to make it work. We'd need to change our patch series so each patch is more stand-alone and then figure out which kernel versions they don't apply to and fix those conflicts. |
I think option 1 is reasonable, but if we wanted to follow closer to option 2 we could consider building off of an existing architecture for something like this. In particular, buildroot might be perfect for this. They maintain patches for the linux kernel, build buildroot and other packages we might want, and would likely also give us helpful test images. |
Are there many patches in buildroot? Not sure if I'm missing something, but it seems like that one you linked to is for an exact kernel version ( |
Buildroot has lots of patches for lots of targets. Look in any /board/[TARGET]/patches folder and you'll see. For example, this one for the beaglebone that adjusts something: https://github.com/buildroot/buildroot/blob/master/board/beaglebone/patches/linux/0001-keep-jtag-clock-alive-for-debugger.patch It even has board specific extended linux configurations per board. See: https://github.com/buildroot/buildroot/blob/master/board/beaglebone/extlinux.conf To your question on patches that apply to a range of versions: that's not functionality I can think of anyone other than us wanting so naturally it doesn't exist here, but I don't think it's that hard to build. Buildroot builds targets based off of a config. That config can specify things like the kernel version and a config for that kernel and such. We can also adjust the patch directory that is being used. So we could maintain a script that updated those two values and kept patches for a series of kernels in one directory and others in a different directory and choose the right set as necessary. The other thing I like about their patches is that they're typically named like commits and they have a folder of all the changes. |
Switching to buildroot seems like a fairly heavyweight change. I'm all for avoiding reinventing the wheel, but it seems like we'd be introducing a lot of complexity and still need to implement the feature we want. Maybe there are other advantages to buildroot that I'm not tracking though. Perhaps we just stick with option 1 for now? Though I'm just worried that we'll improve an existing commit on a branch like 4.10 main and then have a hard time tracking that we'd need to also update the patch for other kernel versions. For example if we support kernels 2, 3, 4, 5, and 6 it will be a pain to move changes between kernel versions, even if the same commits apply cleanly. We also don't have any history when we rebase and force push a branch (but we don't really want to keep all the cruft in the linux repo as that makes it harder to port). We currently have 12 patches which could reasonably be squashed down to 10 independent chunks of logic that we could port around (though the first 2 are dependencies for the others):
It seems like at least some of these require no changes across 2.6 and 4.10 (e.g., rehosting/linux@455368e and rehosting/linux@12347fe) while others do. If we just had a folder of patches with a subfolder for each of these, we could mark patches as applying to ranges of kernel commits (at hashes or versions) and then we'd have the history of patch changes and could use more standard git practices. |
I've temporarily disabled builds of our 6.7 kernel. But our 6.7 kernel is important and I don't want us to forget about it. In a few weeks when our dev pace slows down, I'd like to get our 4.10 changes synced with 6.7 and re-enable 6.7.Instead of maintaining a complex custom kernel for one version (4.10), we should minimize our patches and try porting them to multiple kernel versions.
Tasks:
The text was updated successfully, but these errors were encountered: