build
There are two possibilities :
- You are building Stanix on itself (self building).
- You are building Stanix from another OS (e.g. GNU/Linux or any other Unix-like OS) (cross-building). In both cases the process is similar.
[!NOTE] If building from Windows, use WSL.
Required software
To build Stanix, you need the following software.
gitgccldarandas(tcc, or any other C compiler with GNU extensions, might work, but is untested)makenasmcoreutilsgdisk(for hdd images)mtools(for hdd images)xorriso(for iso images)
Required software for cross-compiling
If cross-compiling from an OS other than Stanix, you will also need the following software to build a cross-compiler.
- a C and C++ compiler (e.g.
gccandg++) MPC(libmpc-dev)GMP(libgmp-dev)MPFR(libmpfr-dev)bisonflextexinfo- a shell (e.g.
sh,bash,dash,ksh, …) coreutilsmake
On Ubuntu you can get everything by running
sudo apt install build-essential bison flex texinfo libmpc-dev libgmp-dev libmpfr-dev nasm xorriso gdisk mtools
Cloning
First, clone the repository.
git clone https://github.com/tayoky/stanix --recurse-submodules
cd stanix
Compiling
Run ./tinx.sh --host=x86_64-stanix install and then run :
./tinx.sh run scripts/build-hdd-image.shFor hdd image../tinx.sh run scripts/build-iso-image.shFor iso image../tinx.sh run scripts/qemu.shTo test the image in QEMU.
[!NOTE]
Compiling the cross toolchain the first time (that contains GCC) may take some time.
[!NOTE]
Supported values for--hostarex86_64-stanix,i386-stanixandaarch64-stanix
[!NOTE]
Generated images can be found inbuild/images
[!NOTE] Do
./tinx.sh run scripts/qemu.sh --helpto see every options of the QEMU wrapper.
Installing programs
Any program you want to install must be installed into build/sysroot.
You can install most packages by doing
./tinx.sh --host=x86_64-stanix package-name
For exemple to install the Doom shareware you can do
./tinx.sh --host=x86_64-stanix doom-shareware
Then you can rebuild the image.
A list of ports is available here.