bionade24 / abs_cd

CI/CD for the Arch build system with webinterface.
https://abs-cd.oscloud.info
GNU Affero General Public License v3.0
72 stars 4 forks source link

Cross-compilation support #9

Open djmattyg007 opened 3 years ago

djmattyg007 commented 3 years ago

As per my reddit comment, it would be great if this project could support cross-compilation for ARM devices:

https://www.reddit.com/r/archlinux/comments/kkqgj2/abs_cd_a_cicd_for_archlinux_packages_with/gh3yarr/?context=3

bionade24 commented 3 years ago

Things we probably need to achieve this:

  1. Second cotainer for diffrent arch with diffrent settings (but what with diffrent architectures?) or a general x-compile container?
  2. Selection which architectures should be built per package.
  3. Diffrent buid log views for diffrent arches. Probably in a Tab-Like style?
bionade24 commented 3 years ago

@djmattyg007 Do you have any better guide than https://archlinuxarm.org/forum/viewtopic.php?t=6163 how to make real-cross-compiling with Archlinux? This post is ancient and would force me to reinvent somethings like his prefixes for pacman.

bionade24 commented 3 years ago

I also wonder if it makes still sense to support i686. If no one complains, I only would care about ARM.

bionade24 commented 3 years ago

Current plan: Make one optional container for supporting 'aarch64' 'armv7h' 'armv6h' via cross-compiling. This means 3 sysroots with special wrapped pacman (and a completely new dependency check resolve mechanism if packages differ on arches because pyalpm in the abs_cd container can't do that?)

Seems like it's way more complicated than I expected. I know understand while people just distcc despite it's taking 2 hours instead of 10 minutes ;)

djmattyg007 commented 3 years ago

@djmattyg007 Do you have any better guide than archlinuxarm.org/forum/viewtopic.php?t=6163 how to make real-cross-compiling with Archlinux? This post is ancient and would force me to reinvent somethings like his prefixes for pacman.

Could you make use of this?

http://crosstool-ng.github.io/

Does anything here help?

https://wiki.archlinux.org/index.php/Cross-compiling_tools_package_guidelines

I also wonder if it makes still sense to support i686. If no one complains, I only would care about ARM.

Personally I only care about supporting the 64-bit Raspberry Pi 4 (which I think is aarch64).

bionade24 commented 3 years ago

Could you make use of this?

http://crosstool-ng.github.io/

Does anything here help?

https://wiki.archlinux.org/index.php/Cross-compiling_tools_package_guidelines

I already know both things you mentioned. Of course we need crosstool-ng as a software, but it's only for building x-sysroots, not arch-sysroots explicitly. The Arch wiki article only covers creating PKGBUILD files for cross-compiling toolchains, not even x-compiling itself. What we need are one sysroot per ARM arch and one wrapped pacman per Arm architecture like in the forum post. At least that's the only way to go, that I currently know of. Thx for your help.

bionade24 commented 3 years ago

@djmattyg007 My current goal on this is to create a makepkg container (like the one existing in the makepkg dir of my project for x86_64) with a setup like mentioned in the AlArm forum post above, but I doubt I find time for it next week. Would be super cool if you could try it, too. aarch64 support only would be sufficient for the beginning, we still can other arches later. Just ask if you have any further questions.

Edit: Explanation which container should be used a base.

bionade24 commented 1 month ago

https://wiki.archlinux.org/title/QEMU#Chrooting_into_arm/arm64_environment_from_x86_64