Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] cross-compile attempt
Date: Mon, 01 Aug 2016 15:49:58
Message-Id: 1741521.Dge7ti9OX5@dell_xps
In Reply to: Re: [gentoo-user] cross-compile attempt by Peter Humphrey
1 On Monday 01 Aug 2016 16:31:18 Peter Humphrey wrote:
2 > On Monday 01 Aug 2016 14:51:02 Mick wrote:
3 > > Given Andrew's steer I had another look and found this guide:
4 > >
5 > > https://wiki.gentoo.org/wiki/Project:AMD64/32-bit_Chroot_Guide
6 > >
7 > > Is this approach still valid, or have things moved on since this article
8 > > was authored (2012) and different configuration/approach is now
9 > > recommended?
10 >
11 > I use that method to maintain a 32-bit Atom box. I export its /usr/portage
12 > via NFS to a chroot on this i7 box and build packages in the chroot. Then I
13 > install from packages on the Atom.
14 >
15 > I'm sure it would be just as easy, or more so, to mount the whole Atom file
16 > system and work in it as though I had an i7 processor on the Atom file
17 > system. I may try that again. Meanwhile, here's my /etc/init.d/atom script.
18 > The mtab I copy in contains enough entries to forestall error messages:
19 >
20 > $ cat /etc/init.d/atom
21 > #!/sbin/openrc-run
22 > depend() {
23 > need localmount
24 > need bootmisc
25 > }
26 > start() {
27 > ebegin "Mounting 32-bit chroot dirs under /mnt/atom"
28 > mount -t proc /proc /mnt/atom/proc
29 > mount --rbind /dev /mnt/atom/dev
30 > mount --rbind /sys /mnt/atom/sys
31 > mount --rbind /var/tmp/portage /mnt/atom/var/tmp/portage
32 > mount -t nfs 192.168.1.2:/usr/portage/packages
33 > /mnt/atom/usr/portage/packages cp /etc/mtab.atom /mnt/atom/etc/mtab
34 > eend $? "Error mounting 32-bit chroot directories"
35 > }
36 > stop() {
37 > ebegin "Unmounting 32-bit /mnt/atom chroot dirs"
38 > rm /mnt/atom/etc/mtab
39 > umount -f /mnt/atom/var/tmp/portage
40 > umount -f /mnt/atom/sys/firmware/efi/efivars
41 > umount -f /mnt/atom/sys/fs/pstore
42 > umount -f /mnt/atom/sys/fs/cgroup/openrc
43 > umount -f /mnt/atom/sys/fs/cgroup/cpuset
44 > umount -f /mnt/atom/sys/fs/cgroup/cpu
45 > umount -f /mnt/atom/sys/fs/cgroup/cpuacct
46 > umount -f /mnt/atom/sys/fs/cgroup/freezer
47 > umount -f /mnt/atom/sys/fs/cgroup
48 > umount -f /mnt/atom/sys/kernel/config
49 > umount -f /mnt/atom/sys/kernel/debug
50 > umount -f /mnt/atom/dev/pts
51 > umount -f /mnt/atom/dev/shm
52 > umount -f /mnt/atom/dev/mqueue
53 > umount -f /mnt/atom/proc
54 > umount -f /mnt/atom/sys
55 > umount -f /mnt/atom/dev
56 > umount -f /mnt/atom/usr/portage/packages
57 > eend $? "Error unmounting 32-bit chroot directories"
58 > }
59 >
60 > Of course I haven't bothered with idiot-proofing it, as I'm the only one
61 > here.
62 >
63 > HTH.
64
65 Thank you Peter, I seem to have posted a few seconds before I received your
66 message. From what you're showing above I seem to have not performed a
67 correct mount of the chroot fs. I better rinse and repeat ...
68 --
69 Regards,
70 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] cross-compile attempt Mick <michaelkintzios@×××××.com>
Re: [gentoo-user] cross-compile attempt Neil Bothwick <neil@××××××××××.uk>