This change updates the architecture handling in the indocker and rebuildkernel and improves the logic for cross-compilation by ensuring the best architecture/cross-compilation combo is used when building the kernel.
It also makes the tool work on macOS.