mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-02 11:21:26 +08:00
kernel/tools/bundle.mjs --smp adds unkernel.kernel.smp.kwpatch: a bsdiff-style patch (kwdiff.mjs) from the bundle's kernel to the SMP build, after renumbering the base's function, global and type indices and moving its data addresses to the target's (kwremap.mjs, js/core/kremap.ts). With more than one CPU asked, loadKernelModule() and the CLI derive the SMP kernel from it (js/core/kpatch.ts, hashes checked); one CPU or a bundle without the section behaves as before. test/kpatch.test.ts round-trips synthetic data and, given KPATCH_UP and KPATCH_SMP, the real kernels.