Gentoo Prefix Bootstrap Process for armv7
1.
Bootstrapping on arm
Introduction
Note:
This guide is explicitly written as a quick reference guide to getting
Gentoo Prefix installed and running on the Genesi Efika MX Open Client.
|
Here we are going to exploit binary packages to speed up the process. A
certain level of trust is required here because you are using binary
packages built by someone other than you. The binary packages are hosted
on my personal server, built by myself.
Bootstrapping
The first step is to choose a path to install into. We refer
to this path as "Prefix path", stored in the variable
EPREFIX. Some suggestion for your Prefix path is
$HOME/gentoo. Make sure your EPREFIX is less than
69 chars, because that is how large the EPREFIX is of the
binpkgs. Whatever you chose, make sure you set it in your environment:
Code Listing 1.1: Export EPREFIX variable |
$ export EPREFIX="$HOME/gentoo"
|
Next, add the following paths in your soon to be Prefix to
your PATH environment.
$EPREFIX/bin,
$EPREFIX/usr/bin,
$EPREFIX/tmp/bin and
$EPREFIX/tmp/usr/bin.
Adding these paths makes sure that they will be available
later on in the process.
Code Listing 1.2: Add Prefix and utility paths to your PATH |
$ export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:/usr/bin:/bin:$PATH"
|
Now the path is set, start with downloading the bootstrap
script from
http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/scripts/bootstrap-prefix.sh?format=txt.
From the directory where the bootstrap script was stored execute
the following commands:
Code Listing 1.3: Use the bootstrap script |
$ chmod 755 bootstrap-prefix.sh
$ ./bootstrap-prefix.sh $EPREFIX tree_arm
$ ./bootstrap-prefix.sh $EPREFIX portage
|
Note: This is only assuming that your host has recent bash/python as
deps for portage. If not, you will need to refer to the more in-depth
instructions at http://prefix.gentoo.org/ . For the purpose
of this guide, the Efika MX will have recent bash/python. |
The script will setup the $EPREFIX
directory, download a portage tree snapshot, unpack it and
download and install portage. Afterwards it will try to setup
some sane defaults.
Next, build up the system.
Code Listing 1.4: emerge system |
$ FEATURES="-collision-protect" emerge -avg system
|
Note: You should see 70 packages being installed, 69 of which are
binaries (binpkgs). The one package build from source is portage itself
because it hardcodes your UID/GID. Luckily, portage doesn't take too
long to merge. |
To use your bootstrapped Prefix environment, you best start a
shell from the Prefix, such that your path and other
environment variables are set correctly. To facilitate in
this, a small helper script can be created by the bootstrap
script.
Code Listing 1.5: Creating a start-script |
$ cd $EPREFIX/usr/portage/scripts
$ ./bootstrap-prefix.sh $EPREFIX startscript
|
After running this, a script startprefix will be
present in $EPREFIX. You can freely move the script to
e.g. your homedir for convenience. Running the script will
drop you into a Prefix shell, where for example emerge
is directly at your disposal. Enjoy your Prefix!
Now, you have all the system packages that were compiled at the time
of this writing. If you choose to, you can sync the tree and emerge
other tools that you might need from there. Be warned, there will not
be binpkgs except for the system set.
Code Listing 1.6: Updating the tree |
$ emerge --sync
|
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-2.5 license. The Gentoo Name and Logo Usage Guidelines apply.
|