11_Building - quantum/esos GitHub Wiki
Read This First
Building ESOS from source is not required for installing/using ESOS; you may download ESOS installer packages from our downloads page which contain a pre-built disk image and everything you need to create a ESOS USB flash drive. If you'd still like to build ESOS from source, just for fun, or for developing ESOS, or to enable certain features (eg, special target drivers, ZFS, etc.) please continue...
Build Prerequisites
Here is a list of the build host system requirements:
- A recent release, of a modern x86-64 Linux distribution (64-bit Linux is required since ESOS uses only 64-bit kernel/programs).
- All of the typical software development packages (eg, GCC, GNU Make, Autoconf, Libtool, etc.) are required.
- A USB flash drive that is at least 4 GB -- not really required for building, but needed to install the ESOS "distribution" on (see 12_Installation after completing the build).
- Git is required to pull the source down to your machine.
- The configure script will check for all of the required tools/utilities that are used directly by the ESOS Makefile.
- Other tools, libraries, etc. that are required by the packages/projects that ESOS uses should be caught by those project's configure scripts.
- Some free disk space for building, probably around 20 GB to be safe.
- A lot of time! Unfortunately, several larger projects (GCC, Linux kernel, glibc, etc.) are required that take quite a while to compile.
- Internet connectivity; packages are fetched from the dist. file repository.
Using Red Hat Enterprise Linux (or CentOS) 7.3 Server x86_64 as your build host:
- Standard/basic install, defaults for everything.
- yum groupinstall "Development tools"
- yum install lsscsi kpartx libxslt bc wget gettext dosfstools
Using Fedora 23 Desktop Edition x86_64 as your build host:
- Standard/basic install, defaults for everything.
- yum groupinstall "Development tools"
- yum install wget lsscsi kpartx libxslt gettext-devel dosfstools
Using Ubuntu 12.04.2 LTS x86_64 as your build host:
- Standard/basic install, defaults for everything.
- apt-get install build-essential
- apt-get install git autoconf gawk flex bison gcc-multilib unzip libtinfo-dev libtool lsscsi kpartx libxslt1-dev groff gettext xsltproc pkg-config autopoint zip dosfstools
Using openSUSE Leap >=15 x86_64 as your build host:
- Standard/basic install, defaults for everything.
- zypper install -t pattern "devel_C_C++"
- zypper install -t pattern "devel_kernel"
- zypper install git kpartx libxslt dosfstools
Using SUSE Linux Enterprise Desktop 11.4 x86_64 as your build host:
- Standard/basic install, defaults for everything.
- zypper install -t pattern "devel_C_C++"
- zypper install -t pattern "linux_kernel_devel"
- zypper install git kpartx libxslt dosfstools
Using SUSE Linux Enterprise Server 12 x86_64 as your build host:
- Standard/basic install, defaults for everything.
- zypper install -t pattern "SDK-C-C++"
- zypper install git kpartx libxslt1 groff-full dosfstools
Building ESOS
Pull down the sources from GitHub:
git clone https://github.com/quantum/esos.git
cd esos
If building the bleeding edge ESOS (unstable):
git checkout master
If building the stable branch of ESOS:
git checkout 3.x.x
Generate the configure script:
autoconf
After you have generated the configure script above, you then need to run the configure script. There are several build-time options for ESOS (see choices with --help) or stick with the defaults:
./configure
Next, a special symbolic link is needed for the following steps, this must be done with root privileges:
sudo make symlink
The first phase of the build process will fetch, extract, and build everything needed for the chroot environment (adjust 'make' parallel jobs to your liking, be sure to use absolute path to 'make' program in this step):
/usr/bin/make -j5 -w -Otarget > /tmp/bootstrap.out 2>&1
If building the stable branch of ESOS (3.x.x) the "chroot_build.sh" script handles setting up the chroot environment and taking it down, adjust 'make' parallel jobs to your liking:
sudo ./chroot_build.sh -j5 -w -Orecurse > /tmp/chroot.out 2>&1
You can now cleanup the "/tools" symlink since it is no longer needed:
sudo rm /tools
After everything has been built, you will then need to create the disk image file (requires root privileges):
sudo make image
You may now optionally create a package distribution (tarball) file if you desire:
make pkg_dist
These are the same steps that the Buildbot host/software uses to create the packages that are available on the downloads page.
Next Steps
Once you have successfully built your ESOS image/package, you can now move on to the 12_Installation wiki page which will describe the install process. If you have any problems/questions building ESOS, please post to the esos-users Google Group.