Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I compile aarch32 packages on aarch64 gentoo system?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Tue Jul 30, 2019 1:34 am    Post subject: How can I compile aarch32 packages on aarch64 gentoo system? Reply with quote

Does anyone know?
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Tue Jul 30, 2019 2:42 am    Post subject: Reply with quote

You can create a system inside a chroot (download stage3 tarball, bind mounts, etc., just like how you would do it when installing a new system, but without ever booting into it).

Or you can use crossdev, which will get you something like armv7a-unknown-linux-gnueabihf-emerge, which you you can use to build packages.

Assuming your AArch64 system is compatible with AArch32 (can run all the instructions), going the chroot way would be the easiest.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Tue Jul 30, 2019 2:45 am    Post subject: Reply with quote

Etal wrote:
You can create a system inside a chroot (download stage3 tarball, bind mounts, etc., just like how you would do it when installing a new system, but without ever booting into it).

Or you can use crossdev, which will get you something like armv7a-unknown-linux-gnueabihf-emerge, which you you can use to build packages.

Assuming your AArch64 system is compatible with AArch32 (can run all the instructions), going the chroot way would be the easiest.


How am I able to install x86 packages on x86_64 systems? Those packages involve neither chroot nor crossdev.
Back to top
View user's profile Send private message
Phoenix591
Guru
Guru


Joined: 17 Sep 2007
Posts: 487

PostPosted: Tue Jul 30, 2019 7:51 am    Post subject: Reply with quote

crocket wrote:

How am I able to install x86 packages on x86_64 systems? Those packages involve neither chroot nor crossdev.

Multilib, which requires special support in gcc and other important programs (eg, the -m32 flag to tell it to produce 32 bit output, which isn't present on aarch64)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54325
Location: 56N 3W

PostPosted: Tue Jul 30, 2019 12:12 pm    Post subject: Reply with quote

crocket,

It depends on your hardware. On AArch64, the 32 bit instruction set is optional.
If your hardware lacks 32 bit support, your only options are cross compiling or a QEMU chroot.

Given a 32 bit instruction set, a 32 bit chroot works too, since the hardware can execute 32 bit instructions.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54325
Location: 56N 3W

PostPosted: Tue Jul 30, 2019 12:13 pm    Post subject: Reply with quote

Moved from Portage & Programming to Gentoo on ARM.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Tue Jul 30, 2019 2:03 pm    Post subject: Reply with quote

NeddySeagoon wrote:
crocket,

It depends on your hardware. On AArch64, the 32 bit instruction set is optional.
If your hardware lacks 32 bit support, your only options are cross compiling or a QEMU chroot.

Given a 32 bit instruction set, a 32 bit chroot works too, since the hardware can execute 32 bit instructions.


Do you mean I can just tack multilib eclass to media-libs/raspberrypi-userland?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54325
Location: 56N 3W

PostPosted: Tue Jul 30, 2019 2:38 pm    Post subject: Reply with quote

crocket,

No. There is no multilib on arm64. Multilib requires on disk filesystem layout support.
Its common on amd64 but nobody does it on arm64.

You should be able to make a 32 bit chroot on a 64 bit raspberry pi and chroot into it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Tue Jul 30, 2019 9:56 pm    Post subject: Reply with quote

NeddySeagoon wrote:
crocket,

No. There is no multilib on arm64. Multilib requires on disk filesystem layout support.
Its common on amd64 but nobody does it on arm64.

You should be able to make a 32 bit chroot on a 64 bit raspberry pi and chroot into it.


Or, crossdev
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54325
Location: 56N 3W

PostPosted: Tue Jul 30, 2019 10:27 pm    Post subject: Reply with quote

crocket,

Yes, crossdev is one way to get a cross toolchain.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum