💾 Archived View for vierkantor.com › xukut › install.gmi captured on 2024-08-31 at 11:33:44. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-05-10)
-=-=-=-=-=-=-
Here's how you can install XukutOS on your computer:
At the moment, XukutOS is being developed only on those two systems.
A Raspberry Pi 3 will probably also work, since qemu is supposed to emulate that computer.
If you would like to use another system, please see the contributing instructions instead. :-)
There are no official binaries yet, you can contact me if you want them though.
If you want to compile XukutOS for aarch64, make sure you have binutils (GCC and GDB are recommended too) for aarch64-elf. You'll also need a recent version of Python to run the Lisp-to-assembly converter.
Here's a quick guide to obtaining a cross-compiler for aarch64 on a Unix-y system. For our purposes, not needing a C compiler, we'll only make binutils and GDB. Because we use a couple of coding tricks, it's a specially patched version of binutils, available as a git repository here:
ssh://git@vierkantor.com:21224/binutils-gdb
These steps are a summary of the guide on the OSDev wiki. If any step gives you an error, the OSDev wiki should give you a lot more information.
https://wiki.osdev.org/GCC_Cross-Compiler
First, ensure you have everything required to compile binutils. The OSDev wiki has a nice table. Basically, if you have a recent version of Python 3 (including development libraries!) and you can already compile stuff using `configure; make; sudo make install', you'll have enough to build binutils.
Now we'll obtain the patched version of the binutils-gdb repository (helpfully bundled for us!) Please don't hurt my server by downloading the whole version history, only get the latest commit as follows:
git clone --depth 1 ssh://git@vierkantor.com:21224/binutils-gdb
Make a new folder next to `binutils-gdb' to put the build artifacts in:
mkdir binutils-gdb-build cd binutils-gdb-build
Next step is to configure the build scripts, in order to produce object files for the correct machines. The OSDev wiki suggests to set a `PREFIX' environment variable too, but we'll assume that you have the ability to install binaries to `/usr/local' (and that you trust the Makefile won't screw up the system).
export TARGET=aarch64-elf # export PREFIX="$HOME/.local" # Default is `/usr/local'. # Uncomment the above line (and modify if needed) if you don't have the ability to install binaries to `/usr/local'. # In any case, make sure "$PREFIX/bin" is on your PATH. ../binutils-gdb/configure --target=$TARGET # --prefix="$PREFIX" # Uncomment the end of the previous line if you uncommented the `export PREFIX=' line above.
The final step is to compile binutils and gdb. This will take a few minutes (or many minutes, if your computer is not so fast).
make # When I tried parallel compilation with `make -j', there were stuck processes that ate all memory. make install # or `sudo make install' if needed
Check that everything got installed correctly:
hash -r type aarch64-elf-as # output should look like `aarch64-elf-as is /usr/local/bin/aarch64-elf-as' type aarch64-elf-gdb # output should look like `aarch64-elf-gdb is /usr/local/bin/aarch64-elf-gdb' # If it worked correctly, the non-cross compilers should not be replaced: type as # output should look like `as is /usr/bin/as'
Get the source from the official git repository:
ssh://git@vierkantor.com:21224/xukut
Running `make' will build XukutOS and launch it in QEMU. To prepare binaries for using in a Raspberry Pi, run `make kernel8.img'.
The simplest way to start XukutOS in QEMU is simply to run the `make' command in the source folder. More precisely, make `kernel8.elf' and run `qemu-system-aarch64 -machine raspi3 -cpu cortex-a72 -kernel kernel8.elf'.
Debugging is similar: run the `make kever' command in the source folder, or add `-S -s' to the `qemu-system-aarch64' command; then start `aarch64-elf-gdb -x gdb-os'. `gdb-os' is a file with commands that make GDB communicate with QEMU during debugging.
Copy the following files from a RasPi boot disk to the root directory of a new SD card: (You probably only need a subset of these files, but this works for me at least.)
bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb bcm2708-rpi-cm.dtb bcm2708-rpi-zero.dtb bcm2708-rpi-zero-w.dtb bcm2709-rpi-2-b.dtb bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb bcm2710-rpi-cm3.dtb bcm2711-rpi-4-b.dtb bootcode.bin fixup4cd.dat fixup4.dat fixup4db.dat fixup4x.dat fixup_cd.dat fixup.dat fixup_db.dat fixup_x.dat start4cd.elf start4db.elf start4.elf start4x.elf start_cd.elf start_db.elf start.elf start_x.elf
Make `kernel8.img' as described above and add it to the SD card. Put it in your RasPi and boot, and it should start.
Not much actually, you will just get a monocolored screen if everything went well.
User interface is still under development.