Skip to content
Hayashi Naoyuki edited this page Aug 23, 2022 · 4 revisions

The OpenSolaris Porting Project

A goal of this project is to port OpenSolaris in some architectures.
Most of source code is from illumos Project.

Supported Hardware

Currently supported hardware is:

End of Support:

How to build

Build environment

GNU make and GCC are used for building on Linux.
Building is not supported on OpenSolaris because of incompatible changes.

Following packages are required on openSUSE Leap 15.4.

zypper install git-core gcc gcc-c++ make bison flex perl-XML-Parser libopenssl-devel  \
    liblz4-devel bzip2 patch zlib-devel ncurses-devel ksh ed mkisofs dtc \
    autoconf u-boot-tools libtirpc-devel libbsd-devel tar gzip xz

Otherwise you can build with a docker container.
See https://github.com/n-hys/illumos-build

Getting the source

git clone --recursive -b osport/v2021.07 https://github.com/n-hys/illumos-gate.git

Setting the environment

You need to edit the following configuration files.

usr/src/mk/config.mk

variable default value description
ROOT /data/proto/root_$(MACH) build output directory. This directory is used as root directory when booting from NFS.
PIC_BASE /tmp/solaris/$(MACH)/pic output directory for temporary files

Building

Run make in the usr/src directory.
It takes 13 minutes on my Threadripper 1950X machine.

debug build

for aarch64

make -C usr/src tools MACH=aarch64
make -C usr/src -j MACH=aarch64

release build

for RISC-V

make -C usr/src tools MACH=riscv64
make -C usr/src -j MACH=riscv64 RELEASE_BUILD=""

rebuild

sudo rm -rf /data/proto/root_aarch64/* /tmp/solaris/
make -C usr/src -j clobber MACH=aarch64
make -C usr/src -j MACH=aarch64

How to install

Overview

There is no installer. You can install to a storage device by following the steps below.

  1. Boot from the network (DHCP/BOOTP + TFTP + NFSv3)
  2. Partition a disk. (if required)
  3. Initialize a file system (zfs).
  4. Extract a tar ball.
  5. (poweroff)
  6. Boot from the disk.

Preparing network boot environment

See Network boot.

Booting from network

See Hardware pages.

Installing

You can work with shell when booting from the network.
You need to initialize the file system and extract a tar ball.
The following example installs to /dev/dsk/c1t0d0s0.

devfsadm
zpool create -f -o altroot=/mnt   rpool /dev/dsk/c1t0d0s0
zfs create rpool/ROOT
zfs create rpool/ROOT/illumos
gtar -o -xf /var/illumos.tar.gz -C /mnt/rpool/ROOT/illumos --warning=no-timestamp
chown -R dladm:netadm  /mnt/rpool/ROOT/illumos/etc/dladm
chown -R netadm:netadm /mnt/rpool/ROOT/illumos/etc/ipadm
chown -R netadm:netadm /mnt/rpool/ROOT/illumos/etc/nwam
mkdir -p /mnt/rpool/ROOT/illumos/etc/zfs
zfs unmount -a
zpool export rpool
zpool import -o cachefile=/tmp/zpool.cache -o altroot=/mnt rpool
cp /tmp/zpool.cache /mnt/rpool/ROOT/illumos/etc/zfs/
zfs unmount -a
zpool set bootfs=rpool/ROOT/illumos rpool
zpool set cachefile="" rpool
zfs set mountpoint=none   rpool
zfs set mountpoint=legacy rpool/ROOT
zfs set mountpoint=/           rpool/ROOT/illumos
zpool export rpool

Booting from disk

See Hardware pages.