This is an old revision of the document!
Table of Contents
How-to chroot into Gentoo
Files needed
- stage3-ppc-uclibc-2005.0 or stage3-ppc-uclibc-2006.1 (not recommended).
Installing steps
ln -s /mnt/HD_a2/bzip2 /mnt/HD_a2/bzcat
mkdir /mnt/HD_a2/gentoo
cd /mnt/HD_a2/gentoo
/mnt/HD_a2/bzcat stage3-ppc-uclibc-2005.0.tar.bz2 | /mnt/HD_a2/tar -xvpf -
cd /mnt/HD_a2/gentoo/usr
/mnt/HD_a2/bzcat portage-latest.tar.bz2 | /mnt/HD_a2/tar -xvf -
mount -o bind /dev /mnt/HD_a2/gentoo/dev
mount -t proc none /mnt/HD_a2/gentoo/proc
cp /etc/resolv.conf /mnt/HD_a2/gentoo/etc/
/mnt/HD_a2/chroot /mnt/HD_a2/gentoo /bin/bash
env-update && source /etc/profile
/etc/make.conf
CFLAGS="-Os -pipe -mcpu=603e -mtune=603e" CHOST="powerpc-pc-linux-uclibc" CXXFLAGS="-Os -pipe -mcpu=603e -mtune=603e" USE="-*" ACCEPT_KEYWORDS="~ppc" RSYNC_EXCLUDEFROM="/etc/portage/rsync_excludes" SYNC="rsync://rsync1.ee.gentoo.org/gentoo-portage" GENTOO_MIRRORS="http://ftp.linux.ee/pub/gentoo/distfiles ftp://ftp.linux.ee/pub/gentoo/distfiles"
/etc/portage/rsync_excludes
- app-accessibility/ - metadata/cache/app-accessibility/ - app-emulation/ - metadata/cache/app-emulation/ - app-laptop/ - metadata/cache/app-laptop/ - app-office/ - metadata/cache/app-office/ - app-pda/ - metadata/cache/app-pda/ - dev-games/ - metadata/cache/dev-games/ - games-*/ - metadata/cache/games-*/ - gnome-*/ - metadata/cache/gnome-*/ - kde-*/ - metadata/cache/kde-*/ - rox-*/ - metadata/cache/rox-*/ - media-tv/ - metadata/cache/media-tv/ - media-video/ - metadata/cache/media-video/ - sci-*/ - metadata/cache/sci-*/ - x11-*/ - metadata/cache/x11-*/ - xfce-*/ - metadata/cache/xfce-*/
Cleaning portage
cd /usr/portage
rm -r `gawk '{ printf(”%s ”,$2) }' /etc/portage/rsync_excludes`
Testing
USE=unicode emerge links
chrooting
If you have exited from chroot environment after installing gentoo chroot or if you have rebooted your DSM-G600 then you need following commands to enter chroot environment.
mount -o bind /dev /mnt/HD_a2/gentoo/dev
mount -t proc none /mnt/HD_a2/gentoo/proc
/mnt/HD_a2/chroot /mnt/HD_a2/gentoo /bin/bash