Provide armv7 as architecture
Created by: ollieparanoid
The full hostspecs from arch_to_hostspec()
:
case "$1" in
aarch64) echo "aarch64-alpine-linux-musl" ;;
armel) echo "armv5-alpine-linux-musleabi" ;;
armhf) echo "armv6-alpine-linux-muslgnueabihf" ;;
armv7) echo "armv7-alpine-linux-musleabihf" ;;
ppc) echo "powerpc-alpine-linux-musl" ;;
ppc64) echo "powerpc64-alpine-linux-musl" ;;
ppc64le) echo "powerpc64le-alpine-linux-musl" ;;
s390x) echo "s390x-alpine-linux-musl" ;;
x86) echo "i586-alpine-linux-musl" ;;
x86_64) echo "x86_64-alpine-linux-musl" ;;
*) echo "unknown" ;;
esac
@MartijnBraam said in in the channel some time back, that we would get a good speed improvement (and also smaller binaries due to thumb2) when also providing binaries for armv7 instead of "armhf" which is armv6 only. I think especially older devices with limited CPU power and RAM, such as the rx51 (N900) would benefit from this change.
This needs to be done upstream in Alpine. It has already been proposed to switch to armv7+thumb2 only in 2015 - but no one responded to that thread and they did not change it. Please note that this is not what we want for postmarketOS, because then we could not support phones with an armv6/armhf only chip!
If you want to try your luck with this, dear reader, I suggest the following:
- Please read the whole list first!
- Make sure that you have some time for this. While it does not matter that much when working on pmOS, if you start something half-way and then never coming back (we'd rather have that than no contributions!), I think it is important to not do that with our upstream friends. Invest some time and make sure this actually goes through, if you want to take this. Otherwise upstream might get frustrated by our community and that is not what we want - after all we're proposing a big change for them here.
- Run
pmbotstrap chroot
to get a native Alpine Linux chroot (unless you have it already installed in some other way) - Clone the aports repository and run scripts/bootstrap.sh with
armv7
as parameter to see whether bootstrapping the base system works or not - Fix it up until it does work and upstream your fixes. Please ask in this ticket or in the channel if you need help with that.
- Only after you have the bootstrapping process working, contact the alpine developers.
- I recommend answering that mail thead -- but make sure, that you're proposing armv7 as additional architecture instead or replacing armhf - you could describe our use case with old phones there, if you want to. Mention that the bootstrapping process runs through and that you are willing to help with setting that architecture up.
- If you do not get a response to that thread within a week, ask in
#alpine-devel
and link to the e-mail you have sent. - Help them until we can actually ship this feature
- After all that is done and armv7 actually is a thing in Alpine, we'd need to adjust the deviceinfo files to make use of armv7. You could do that in a PR, but that step is so easy compared to the rest - if you got that far, you might as well let someone else take it from there.
Please report your progress in this ticket.