0016

Gentoo on iBook G4 (Powerbook6,5)

Installation

Since Void Linux for PPC has been discontinued, I decided to install Gentoo on my iBook since it's the only Linux distribution that supports this architecture. Although I failed several times during the installation process, I eventually managed to get it up and running.

The correct order of installation on Gentoo to get a fully operable XFCE desktop using Xorg, including the installation of the ATI R200 series graphics cards drivers and firmware, on an iBook G4 is as follows:

  1. Boot the Gentoo installation media and configure the network connection.
  2. Partition the hard drive and format the partitions with the appropriate filesystems (such as ext4).
  3. Install the Gentoo base system using the Stage 3 tarball.
  4. Configure the system by setting the hostname, timezone, and other system-wide settings.
  5. Install the kernel sources and configure the kernel with the necessary drivers and settings for your hardware..
  6. Install wifi driver (sys-firmware/b43-firmware).
  7. Install and configure the bootloader (such as GRUB).
  8. Install the necessary firmware and drivers for your graphics card, such as the ATI R200 series graphics cards (may need to recompile the kernel).
  9. Install Mesa Amber, typically after the kernel and before Xorg.
  10. Add the following environment variable by putting the variable as a single line script in /etc/profile.d/mesa-amber.sh
    1. export __GLX_VENDOR_LIBRARY_NAME=amber
  11. Install Xorg and configure it to use the appropriate graphics driver for your card.
  12. Install x11-drivers/xf86-video-ati after installation of Xorg.
  13. Install the SLiM display manager to start Xorg automatically at boot.
  14. Install dev-lang/rust-bin.
  15. Install the XFCE desktop environment and its dependencies.
  16. Configure the XFCE desktop environment to your liking, including the panel, themes, and other settings.
  17. Install any additional software packages you need, such as a web browser, text editor, or media player.

Note: The order of installation may vary depending on your hardware and specific requirements. It is always recommended to consult the Gentoo documentation for more information on the installation process.

Files

The most important files during the install are the make.conf and the kernel configuration. These are attached to this blog post as a starting points. The make.conf I have adapted from this Youtube video by WindowsG Electronics.

make.conf

# every ${link} that isnt COMMON_FLAGS adds a possibility to break compiling stuff
# disable them on a per package, or even global, base if neeeded 
# order: least risky to most risky 
COMMON_FLAGS="-mcpu=7450 -O3 -maltivec -mabi=altivec -fno-strict-aliasing -pipe -fuse-linker-plugin ${NOCOMMON} ${IPAPTA} ${SEMINTERPOS} ${DEVIRTLTO}"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
LDFLAGS='-Wl,-O3 -Wl,--as-needed ${COMMON_FLAGS}'
IPAPTA="-fipa-pta"
SEMINTERPOS="-fno-semantic-interposition"
DEVIRTLTO="-fdevirtualize-at-ltrans"
# GRAPHITE="-fgraphite-identity -floop-nest-optimize"
NOCOMMON="-fno-common"
# FLTO="-flto=${NTHREADS}"
NTHREADS="2"
MAKEOPTS="-j2"

# enable when too many masked packages by ~ppc 
# ACCEPT_KEYWORDS="~ppc"

PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"

# add "lto pgo graphite" to USE for faster bins (but longer compile times)
USE="-systemd -bluetooth gtk qt -kde -gnome -emacs -xemacs \
     -cups -smartcard -accessibility -cjk -clamv -nvidia -vulkan -nvenc\
    css dvd dvb dvdr ieee1394 ios ipod lm-sensors wifi X elogind wifi \
    gtk3 xorg"

LC_MESSAGES=C

INPUT_DEVICES="libinput"
VIDEO_CARDS="radeon fbdev r200"

GENTOO_MIRRORS="https://ftp.halifax.rwth-aachen.de/gentoo/"
GRUB_PLATFORMS="ieee1275"

make.conf

kernel config

For the kernel configuration I had to figure out a little. I have disabled all wired and wireless network interfaces apart from the one inside the iBook. Additionally, this kernel configuration does not use the framebuffer driver. kernel_config.txt

Notes

During the first uses I had an issue with a lagging desktop environment, which rendered it unusable. I used the following command to fix this issue:

$ xfconf-query -c xfwm4 -p /general/vblank_mode -s off

Next Post Previous Post