Skip to content

Building from Source

Manuel Mendez edited this page Nov 18, 2015 · 5 revisions

Overview

The build system of MistifyOS is based on a combination of the Buildroot Linux system creation software and a compilation environment provided by Crosstool-NG.

Using the Buildroot frameworks, we assemble a complete MistifyOS OS image from the source code of all its components, and provide the result in various formats - Initrd, ISO image, EXT2 image and so-on.

Requirements for building MistifyOS

To compile MistifyOS from source, the Buildroot-based environment requires the following to be installed. We recommend that a Ubuntu 14.04 environment be used.

OS Build Dependencies

The following Ubuntu 14.04 packages are required to operate the MistifyOS Buildroot environment:

  • autoconf
  • bc
  • bison
  • flex
  • g++
  • gawk
  • gcc
  • git
  • gperf
  • libtool
  • make
  • mercurial
  • ncurses-dev
  • openssh-server
  • pv
  • subversion
  • texinfo
  • unzip
  • xz-utils

Initiating a MistifyOS build

  1. Use git to clone the mistify-os repository: git clone https://github.com/mistifyio/mistify-os.git

  2. cd to the mistify-os checkout and run: ./buildmistify

At this point, the buildmistify script will begin cloning the various supporting sub-components (Crosstool-NG, the MistifyOS Buildroot fork, Go-lang), setting up the Buildroot environment, and begin the long compilation processes involved in generating an operating environment from scratch.

If the Crosstool-NG environment has not yet been compiled, buildmistify will do that. Any subsequent runs of buildmistify will reuse the Crosstool-NG environment - it is meant to be "compile once, use many".

Build products

By default, the result of a successful Buildroot run will produce two files:

  • A netbootable kernel
  • A compressed MistifyOS Initrd (the OS image itself)

The path to these files will be given at the completion of a Buildroot run.

Buildroot can be configured to also produce ISO-9660, EXT2, and other image formats.