Gentoo Archives: gentoo-embedded

From: Ed W <lists@××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] Mixed arch chroot to optimise building in qemu
Date: Sat, 25 Sep 2021 12:47:09
Message-Id: 3bafaa14-1350-5f45-32aa-23313aa6fc06@wildgooses.com
In Reply to: Re: [gentoo-embedded] Mixed arch chroot to optimise building in qemu by Peter Stuge
1 On 23/09/2021 23:35, Peter Stuge wrote:
2 > I've built armv7a images using the armv7a-hardfloat-linux-gnueabi-emerge
3 > command installed by crossdev with the toolchain after setting up
4 > etc/portage/ in that root as needed.
5 >
6 > That cross emerge cross compiles. :)
7
8
9 What level of breakage do you see these days? Are there any common packages which fail?
10
11 I'm trying to keep things simple and standard between my native generated images and the cross
12 compiled ones. So the qemu-chroot is nice.
13
14
15 As per your previous email, it seems like the /usr/armv7-xxx and /usr/x86_64-pc-linux-gnu/armv7-xx
16 dirs contain a complete "fanken-compiler" (ie cross compiler) that I could use directly inside the
17 arm chroot. The bits I need to solve are only:
18
19 - Setting the binaries to use (could use bits of the crossdev-emerge script)
20
21 - How to insert it into the chroot (my preference is to use portage with "ROOT=/my-chroot emerge
22 crossdev-xxx" since that tracks the files and could be upgraded easily in the future)
23
24 - Getting required bits of libc from the host into the chroot, probably copy files manually. Could
25 do some horrible emerge thing here...
26
27
28 On top of the that it seems straightforward to get binutils and bash to be compiled natively/static
29 and insert that into the chroot. This should get me a chroot with native toolchain, that will
30 crosscompile to armv7a... Need to figure the last steps now
31
32
33 Ed W