Skip to content

Build Requirements

Tyson Key edited this page Oct 14, 2019 · 5 revisions

Note on Python 3.x

At this time, it's not possible to use Python 3.x, on Linux, or FreeBSD, to drive CML2 (the infrastructure that generates make menuconfig, from configuration files), so Python 2.7 is mandatory (enforced by the #!/usr/bin/env python2.7 "shebang" line), if you want to rebuild the Orion kernel.

As an experiment, the 2to3 utility was run on the code in contrib/cml2, which fixed some syntax problems, and the resulting scripts will do the build process to the stage where it can detect GCC, and attempt to build (at least on FreeBSD, but the compiler architecture isn't properly-detected), but because too much is changed, and deprecated, major refactoring is necessary, in order to reach make menuconfig. The evidence of this process is present in the repository, but is not part of the current version of CML2.

It was also necessary to use VIM's :retab, and :retab! commands, to correct indentation - since this is non-invasive, and improves the quality, it was integrated into the master branch.

FreeBSD 12.0 (x86-64)

To build Orion, on a new FreeBSD installation, it is necessary to install AutoMake, AutoConf, BASH, GCC, GMake, Git, and Python 2.7, and their dependencies. Using pkg install will provide binary versions of these, with their dependencies resolved.

Python 3.0 is not supported, as noted, earlier.

At this time, the default BSD Make cannot be used to build Orion, and the Makefiles require several BASH-specific features, in order to work, but the GCC 9.0 toolchain will now begin to build the kernel, on x86-64 systems.

Cross-compilation for 64-bit PowerPC

A fairly-old version (6.4.0) of a 64-bit PowerPC-targetted, GCC-based cross-compiler is available, from the FreeBSD Packages Collection, which can begin compiling the kernel, on a x86-64 (virtual) machine, and may be an interesting avenue to explore, for working on the PowerPC codebase, without access to PowerPC hardware, for some contributors.

This toolchain is available in the powerpc64-gcc package, and will be used, if the PowerPC-64 Basic Architecture is enabled, in gmake menuconfig.

The 64-bit compiler doesn't currently work properly, with the 32-bit PowerPC codebase, due to unsupported options, although it will seem to build, and a handful of ELF 64-bit MSB relocatable, 64-bit PowerPC or cisco 7500, version 1 (FreeBSD), not stripped binaries, which are incompatible with 32-bit CPUs will be generated.

Ubuntu Linux 19.04 (x86-64)

Presently, Orion is developed on an x86-64 machine, using Ubuntu 19.04, GCC 8.3.0, and Python 2.7.16, which is higher than the versions used by original Pistachio developers, although this works for building the entirety of the userland (barring user/apps/bench/pingpong, which has always failed to link, with ld: -f may not be used without -shared, although we don't intend to use it), and much of the kernel will compile, and link, ignoring regressions introduced during the course of development.

A "native" cross-compiler is not currently used, with this configuration, and cross-compilers to other architectures have not been tested, under Ubuntu.