How to use pkgsrc on Solaris

From NetBSD Wiki

Jump to: navigation, search
This page should use cross references to avoid duplicate content. Please help us by cleaning it up. :)

Document status: DRAFT

In this article I will document how to transform a Solaris 10 x86 core installation into a pkgsrc-powered desktop system. The Solaris core installation does not include any X11, GNOME or GNU utilites. We will use modular X.org from pkgsrc. The guide assumes that the reader has some prior experience using Solaris and pkgsrc.


Contents

[edit] Installation

Begin by installing a Solaris 10 x86 core system (roughly 900MB). I used the 11/06 release when writing this guide. When done, mount the Solaris DVD and install the following extra packages:

  • SUNWhea SunOS Header Files
  • SUNWtoo SUNWtoo Programming Tools
  • SUNWsprot Solaris Bundled tools
  • SUNWbzip The bzip compression utility
  • SUNWarc Lint Libraries (usr)
  • SUNWlibmr Math Library Lint Files (Root)
  • SUNWlibm Math & Microtasking Library Headers & Lint Files (Usr)
  • SUNWdoc Documentation Tools
  • SUNWman On-Line Manual Pages
  • SUNWxcu4 XCU4 Utilities
  • SUNWscpr Source Compatibility, (Root)
  • SUNWscpu Source Compatibility, (Usr)

These packages are required if you intend to use modular-xorg-server from pkgsrc:

  • SUNWdfbh Dumb Frame Buffer Header Files
  • SUNWaudh Audio Header Files (don't ask why!)
# mount -F hsfs /dev/dsk/c1t1d0p0 /mnt
# cd /mnt/Solaris10/Product
# cp -r SUNW... /var/spool/pkg
# pkgadd

To see which SUNW packages are already installed, use the /usr/bin/pkginfo command.

[edit] Compiler setup

Now you need a compiler. You have a couple of options:

  • Use my prebuilt compiler kit, available from http://notyet
  • Install SUNWgcc from the Solaris DVD
  • Install Sun Studio 10
  • Install gcc from Sunfreeware.com
  • [advanced] Bootstrap your own gcc, using one of the above

[edit] pkgsrc

Got a compiler? Good! Let's download and bootstrap pkgsrc.

grap pkgsrc.tar.gz from ftp://ftp.NetBSD.org/pub/pkgsrc/current/ and untar to /usr.

# cd /usr/pkgsrc/bootstrap
# env CFLAGS=-O2 CC=/usr/local/gcc4/bin/gcc ./bootstrap

[coffee break]

Now we can tune /usr/pkg/etc/mk.conf. I use the following additional settings:

CFLAGS+=-O2
CXXFLAGS+=-O2
CC=/usr/local/gcc4/bin/gcc
CXX=/usr/local/gcc4/bin/g++
X11_TYPE=modular
PKG_DEVELOPER=yes
PKG_DEFAULT_OPTIONS+=freetype truetype mmx subpixel official-mozilla-branding

At this point you're free to install whatever packages you like.

[edit] Installing modular X.org from pkgsrc

Packages needed for modular X.org are:

  • meta-pkgs/modular-xorg-fonts
    • xxx: fonts/mkfontdir needs a hack that I have not yet committed
  • meta-pkgs/modular-xorg-apps
  • x11/modular-xorg-server
    • xxx: needs some hacks that have not yet been committed (--disable-dri, libdrm, driproto KDSETMODE ioctl, vtname /dev/fb)
  • x11/xf86-input-keyboard
  • x11/xf86-input-mouse
  • x11/xf86-video-vesa (or pick a suitable driver for your card)
  • x11/xterm

Now run /usr/pkg/bin/Xorg -configure, which should work. Move the generated configuration file to /etc/X11/xorg.conf. Now you can attempt to start the server, by running Xorg with no arguments. If you get a picture, but the mouse isn't working, try to set your mouse device to "/dev/kdmouse" and the protocol to "PS/2" in xorg.conf.

TODO: write about installing firefox, desktop stuff, ...

Personal tools