Now do a chroot into the development_rootfs:
# chroot /opt/i586-gentoo-uclibc-linux /bin/bash --login |
Load the chroot environment variables:
# env-update # source /etc/profile |
Attention: starting from now every command you type will be performed into the chroot'ed environment. So, if you use ssh to access on you development computer, you need to repeat the commands above. You need to be sure that /proc/ and /usr/portage/ are bound under the development_rootfs. Then you must assure that environment is loaded using env-update and loading /etc/profile. To avoid repeating this commands each time you log into your building server i suggest to use screen, further information on http://www.gnu.org/software/screen/.
Change the file /etc/make.conf to fit you requirements. You can use the editor you like, here we are using nano console editor:
# nano -w /etc/make.conf |
On a vortex86 system, we used this kind of flags:
# These settings were set by the catalyst build script
# that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
USE="bitmap-fonts minimal uclibc mmx -opengl"
CHOST="i586-gentoo-linux-uclibc"
CFLAGS="-march=i586 -Os -pipe -fomit-frame-pointer -mmmx"
CXXFLAGS="${CFLAGS}"
FEATURES="buildpkg"
UCLIBC_CPU="586MMX" |
Some USE flags showed below need a better explanation:
USE flag minimal: Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)
USE flag uclibc: Enable uclibc specific patches and build or link uclibc
USE flag mmx: Adds support for optimizations for Pentium MMX and Athlon class processors
FEATURES environment variable: to create prebuilt packages of every single package you install.
Type the following commands to be use that the symbolic link /etc/make.profile points to usr/portage/profiles/uclibc/x86 :
# rm /etc/make.profile # ln -s /usr/portage/profiles/uclibc/x86 /etc/make.profile |
Start the bootstrap script: use the -pv options to see first what emerge are going to do:
# cd /usr/portage/scripts # ./bootstrap.sh -p -v # ./bootstrap.sh |
If during the bootstrap you see a message like this: "Failure compiling uclibc (gcc-config error: Could not run/locate "gcc")?" , perform this workaround:
# gcc-config 1 # source /etc/profile # ./bootstrap.sh |
Now emerge the system special target into our development_rootfs:
# emerge -e system |
While i'm writing this document it seems there are some problems, one of these problem regards python, in case you have a message like this: !!! ERROR: dev-python/python-fchksum-1.7.1 failed., use this workaround:
# emerge python # emerge -e system |
Another problem regards the groff ebuild, it's impossibile to compile it during the emerge -e system, this problem is reported on the Gentoo's bugzilla at this url: http://bugs.gentoo.org/show_bug.cgi?id=98187. Since at the time i'm writing this document the bug is still unresolved, the only workaround is to mask the ebuild, this can be performed adding the following line to the file /etc/portage/profile/package.provided (replace groff-1.19-r2 with your correct version), if the file doesn't exist create it:
sys-apps/groff-1.19.1-r2 |
If the command emerge -e system finish properly, this means that your development_rootfs is ready, so we can step over to the creation of the embedded_rootfs..