At the moment the build script would not be able to support building images with a kernel archtiecture different from what the build machine is running so its certain this won’t work.
The build script is a lot less magic than you think. Grep the code for i386, i686 and amd64. There is nothing that makes it platform specific In essence, it combines Debian packages in commands in useful ways. Everything script does could also be done manually. So there is no inherent limitation. If there is a limitation, it would be one of for example [grml-]debootstrap. Not one of the build script.
However debootstrap can do this if the build script supports passing the “–foreign” option.
The options available for crossbuilding:
Example of Debootsrap’s foreign option:
https://github.com/Whonix/Whonix/blob/master/build-steps.d/1300_create-raw-image is of interest here. It runs
grml-debootstrap, which internally uses
debootstrap. So during
1300_create-raw-image runs, the command invocation line of
grml-debootstrap is of interest here.
[grml-deboostrap is a tool that can create Debian raw images.
debootstrap is a tool that can install Debian into folders.]
So in summary, if grml-deboostrap can do, then Whonix’s build script can
Extra parameters passed to the debootstrap command.
You can inject what’s being passed to
--debopt through the following variable. Example.
whonix_build_debopt+=" --verbose "