Gentoo PPC

From PowerPC Kernel Archives

Installation notes for Gentoo/ppc

WARNING: These instructions are not maintained and they are probably way out of date.

This pulls (in my opinion) all of the useful commands out of the Gentoo PPC installation manual. I can read shell commands faster than prose, and I figure such is the case with at least some others as well. I don't recommend using this without first having read the manual (multiple times?). Sometimes I reference specific devices or interfaces that obviously need to be changed for each system. If I've missed something or copied something incorrectly, feel free to add or correct it.

swapon /dev/hda3
mkdir /mnt/gentoo
mount /dev/hda4 /mnt/gentoo
(date)
cd /mnt/gentoo #commands are relative to this directory from now on

lynx http://www.gentoo.org/main/en/mirrors.xml # get stage & portage snapshot
tar xvjpf stage?-*.tar.bz2
tar xvjf portage-*.tar.bz2 -C usr

nano -w etc/make.conf # CFLAGS, CXFLAGS, MAKEOPTS
cp -L /etc/resolve.conf etc

mount -t proc none /mnt/gentoo/proc

chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile

emerge sync
nano -w /etc/make.conf # USE="X aac alsa altivec apache2 avi dvd ethereal -gnome gtk gtk2 imap -kde mpeg mysql netboot ncurses opengl pam readline ssl xine"

# if you want to limit glibc locales:
mkdir /etc/portage
echo "sys-libs/glibc userlocales" >> /etc/portage/package.use
nano -w /etc/locales.build

# use something like:
en_US/ISO-8859-1
en_US.UTF-8/UTF-8
de_DE/ISO-8859-1
de_DE@euro/ISO-8859-15

emerge -pv system # pretend
emerge -f system # fetch
emerge system

emerge development-sources
cd /usr/src/linux
cp arch/ppc/configs/pmac_defconfig .config
make menuconfig

#activate:
Code maturity level options --->
  [*] Prompt for development and/or incomplete code/drivers

File systems --->
  Pseudo Filesystems --->
    [*] /proc file system support
    [ ] /dev file system support (OBSOLETE)
    [ ]   Automatically mount at boot
    [*] Virtual memory file system support (former shm fs)

(Select one or more of the following options as needed by your system)
  <*> Reiserfs support
  <*> Ext3 journalling file system support
  <*> Second extended fs support
  <*> XFS filesystem support

Macintosh Device Drivers --->
  [ ] Support for ADB raw keycodes

Character devices --->
  [ ] Enhanced RTC

General setup --->
  [*] Support for /dev/rtc

File Systems --->
  [*] HFS Support

make all && make modules_install

cp vmlinux /boot/vmlinux-2.6.9
cp System.map /boot/System.map-2.6.9
cp .config /boot/config-2.6.9

nano -w /etc/modules.autoload.d/kernel-2.6
#add things like:
airport
sungem

modules-update
emerge udev #instead of devfs

nano -w /etc/fstab

echo hostname > /etc/hostname
echo homenet > /etc/dnsdomainname
rc-update add domainname default

nano -w /etc/conf.d/net
rc-update add net.eth0 default

cd /etc/init.d
ln -s net.eth net.eth1
rc-update add net.eth1 default

nano -w /etc/hosts

passwd

nano -w /etc/rc.conf

emerge metalog # or syslog-ng or sysklogd
rc-update add metalog default

emerge vixie-cron # or dcron or fcron
rc-update add vixie-cron default

(emerge slocate)

emerge dhcpcd


exit #the chroot
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile

emerge -u yaboot

exit
yabootconfig --chroot /mnt/gentoo
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile

ybin -v

exit
umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo
reboot

useradd -m -G users,wheel,audio -s /bin/bash tmcnulty
passwd tmcnulty