Working with i686
The Redox Build system now supports building for multiple processor architectures in the same directory tree. Building for i686
or aarch64
only requires that you set the ARCH
Make variable to the correct value. Normally, you would do this in .config, but you can also do this temporarily in the environment (export ARCH=i686
) or you can use build.sh.
FIRST TIME BUILD
Bootstrap Pre-Requisites And Fetch Sources
Follow the instructions for running bootstrap.sh to set up your environment - Building Redox or Podman Build.
Install Emulator Package
The i386 emulator is not installed by bootstrap.sh
. You can add it like this:
(Pop!_OS/Ubuntu/Debian)
sudo apt-get install qemu-system-i386
Config Values
Before your first build, be sure to set the ARCH
variable in .config to your architecture type, in this case i686
. You can change several other configurable settings, such as the filesystem contents, etc. See Configuration Settings.
Add packages to the filesystem.
You can add programs to the filesystem by following the instructions here.
ADVANCED USERS
For more details on the build process, please read Advanced Build.
Compiling The Entire Redox Project
Now we have:
- fetched the sources
- set the
ARCH
toi686
- selected a filesystem config, e.g.
desktop
- tweaked the settings to our liking
- possibly added our very own source/binary package to the filesystem
We are ready to build the entire Redox Operating System Image.
Building an image for emulation
cd ~/tryredox/redox
time make all
will make the target, e.g. build/i686/desktop/hardrive.img
, which you can run with an emulator. See Running Redox.
Building Redox Live CD/USB Image for i686
cd ~/tryredox/redox
time make live
will make the target build/i686/desktop/livedisk.iso
, which can be copied to a USB drive or CD for booting or installation. See Running Redox on real hardware.
Give it a while. Redox is big.
The two main targets, e.g. build/i686/desktop/harddrive.img
and
build/i686/desktop/livedisk.iso
, do the following:
- fetch some sources for the core tools from the redox-os gitlab servers, then builds them; as it progressively cooks each package, it fetches the respective package's source and builds it
- creates a few empty files holding different parts of the final image filesystem
- using the newly built core tools, it builds the non-core packages into one of those filesystem parts
- fills the remaining filesystem parts appropriately with stuff built by the core tools to help boot Redox
- merges the the different filesystem parts into a final Redox Operating System image ready to run in Qemu or be written to a USB drive or CD.
Cleaning Previous Build Cycles
Cleaning Intended For Rebuilding Core Packages And Entire System
When you need to rebuild core-packages like relibc, gcc and related tools, clean the entire previous build cycle with:
cd ~/tryredox/redox/
rm -rf prefix/i686-unknown-redox/relibc-install/ cookbook/recipes/gcc/{build,sysroot,stage*} build/i686/*/{harddrive.img,livedisk.iso}
Cleaning Intended For Only Rebuilding Non-Core Package(s)
If you're only rebuilding a non-core package, you can partially clean the previous build cycle just enough to force the rebuilding of the Non-Core Package:
cd ~/tryredox/redox/
rm build/i686/*/{fetch.tag,harddrive.img}
Running Redox
Running The Redox Desktop
To run Redox, do:
make qemu
This should open up a Qemu window, booting to Redox.
If it does not work, try:
make qemu kvm=no # we disable KVM
or:
make qemu iommu=no
If this doesn't work either, you should go open an issue.
Running The Redox Console Only
We disable to GUI desktop by passing "vga=no". The following disables the graphics support and welcomes you with the Redox console:
make qemu vga=no
It is advantageous to run the console in order to capture the output from the non-gui applications. It helps to debug applications and share the console captured logs with other developers in the redox community.
Running The Redox Console With A Qemu Tap For Network Testing
Expose Redox to other computers within a LAN. Configure Qemu with a "TAP" which will allow other computers to test Redox client/server/networking capabilities.
Join the Redox chat if this is something you are interested in pursuing.
Note
If you encounter any bugs, errors, obstructions, or other annoying things, please report the issue. Thanks!