From: Peter Humphrey <peter@prh.myzen.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] cross-compile attempt
Date: Mon, 01 Aug 2016 16:31:18 +0100 [thread overview]
Message-ID: <7280559.BLtsgQ0YyM@peak> (raw)
In-Reply-To: <2788057.PL0PvVn3Vb@dell_xps>
On Monday 01 Aug 2016 14:51:02 Mick wrote:
> Given Andrew's steer I had another look and found this guide:
>
> https://wiki.gentoo.org/wiki/Project:AMD64/32-bit_Chroot_Guide
>
> Is this approach still valid, or have things moved on since this article
> was authored (2012) and different configuration/approach is now
> recommended?
I use that method to maintain a 32-bit Atom box. I export its /usr/portage
via NFS to a chroot on this i7 box and build packages in the chroot. Then I
install from packages on the Atom.
I'm sure it would be just as easy, or more so, to mount the whole Atom file
system and work in it as though I had an i7 processor on the Atom file
system. I may try that again. Meanwhile, here's my /etc/init.d/atom script.
The mtab I copy in contains enough entries to forestall error messages:
$ cat /etc/init.d/atom
#!/sbin/openrc-run
depend() {
need localmount
need bootmisc
}
start() {
ebegin "Mounting 32-bit chroot dirs under /mnt/atom"
mount -t proc /proc /mnt/atom/proc
mount --rbind /dev /mnt/atom/dev
mount --rbind /sys /mnt/atom/sys
mount --rbind /var/tmp/portage /mnt/atom/var/tmp/portage
mount -t nfs 192.168.1.2:/usr/portage/packages /mnt/atom/usr/portage/packages
cp /etc/mtab.atom /mnt/atom/etc/mtab
eend $? "Error mounting 32-bit chroot directories"
}
stop() {
ebegin "Unmounting 32-bit /mnt/atom chroot dirs"
rm /mnt/atom/etc/mtab
umount -f /mnt/atom/var/tmp/portage
umount -f /mnt/atom/sys/firmware/efi/efivars
umount -f /mnt/atom/sys/fs/pstore
umount -f /mnt/atom/sys/fs/cgroup/openrc
umount -f /mnt/atom/sys/fs/cgroup/cpuset
umount -f /mnt/atom/sys/fs/cgroup/cpu
umount -f /mnt/atom/sys/fs/cgroup/cpuacct
umount -f /mnt/atom/sys/fs/cgroup/freezer
umount -f /mnt/atom/sys/fs/cgroup
umount -f /mnt/atom/sys/kernel/config
umount -f /mnt/atom/sys/kernel/debug
umount -f /mnt/atom/dev/pts
umount -f /mnt/atom/dev/shm
umount -f /mnt/atom/dev/mqueue
umount -f /mnt/atom/proc
umount -f /mnt/atom/sys
umount -f /mnt/atom/dev
umount -f /mnt/atom/usr/portage/packages
eend $? "Error unmounting 32-bit chroot directories"
}
Of course I haven't bothered with idiot-proofing it, as I'm the only one
here.
HTH.
--
Rgds
Peter
next prev parent reply other threads:[~2016-08-01 15:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-31 18:40 [gentoo-user] cross-compile attempt Mick
2016-07-31 20:15 ` Jeremi Piotrowski
2016-07-31 20:18 ` Andrew Savchenko
2016-07-31 22:31 ` Mick
2016-08-01 13:51 ` Mick
2016-08-01 15:31 ` Peter Humphrey [this message]
2016-08-01 15:49 ` Mick
2016-08-01 16:21 ` Mick
2016-08-02 8:46 ` Peter Humphrey
2016-08-02 11:56 ` Neil Bothwick
2016-08-03 0:26 ` [gentoo-user] " Ian Zimmerman
2016-08-03 8:20 ` Neil Bothwick
2016-08-03 17:26 ` james
2016-08-03 20:11 ` R0b0t1
2016-07-31 20:36 ` [gentoo-user] " james
2016-08-01 15:23 ` waltdnes
2016-08-01 15:46 ` [gentoo-user] Re: [was cross-compile attempt] 32bit chroot Mick
2016-08-01 16:19 ` waltdnes
2016-08-01 16:32 ` Mick
2016-08-01 17:57 ` Mick
2016-08-01 21:21 ` Mick
2016-08-01 23:11 ` Jeremi Piotrowski
2016-08-02 4:33 ` waltdnes
2016-08-02 5:29 ` Mick
2016-08-02 9:22 ` Peter Humphrey
2016-08-02 14:33 ` Neil Bothwick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7280559.BLtsgQ0YyM@peak \
--to=peter@prh.myzen.co.uk \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox