Open depau opened 10 years ago
As the script pulls from the Arch User Repository and Arch does not officially support ARM, substantial hoops would have to be jumped through to get cross-compiling in a qemu ARM chroot to work.
1) Arch doesn't support ARM, and you need the ARM bins for the chroot. 2) The script checks the PKGBUILDS, which state target architure(s). 3) The qemu-user-static package isn't in the official repos (it's in the AUR). 4) How will the addition of emulation through qemu affect RAM usage?
That last one might be a show-stopper. The script runs fine on my DO droplet which only has 512MB of RAM. By pushing all builds through a qemu chroot instead of a normal chroot, builds could fail due to RAM starvation. It's one thing if building the package itself takes more RAM than you have (eg, the kernel). The script isn't designed to pile on to those requirements.
It'd be far easier to adjust the script to run inside an ARM environment.
1) Abstract the target architectures so that something other than x86_64 and i686 can be used. 2) Fudge the PKGBUILD's arch() array for unsupported architectures before the script checks it. 3) Adjust logic for the possibility of only doing one architecture.
There might be other things I can't think of right now. Even if the script doesn't officially support ARM because its target distro doesn't support ARM, doesn't mean I would be opposed to changes that facilitate it. I think the second list can be pulled off without affecting the original Intel side of the equation.
Got it.
Crosscompile packages for ARM -> Allow Compilation on Foreign Architectures
The script should also take care of the cross-compilation of armv7h packages if requested (e.g. you want to create an ALARM repository), or compile for ARM if running on an ARM device. You could also use qemu to emulate an ARM chroot (which is probably the fastest option).