blob: 382623810e94b7304f872ad92e325d25a287c1af [file] [log] [blame]
swissChilie00e88a2021-05-30 17:54:26 -07001Building Bluejay
2================
3
4Bluejay uses the home-grown ``Jmk`` build system, which is basically just a GNU
5m4 script that generates makefiles from ``Jmk`` files --- makefiles with some
6custom macros.
7
8To build a fresh clone of Bluejay the first thing you will need to do is run
9``bin/jmk`` to generate your makefiles for you. You should get some output like
10this:
11
12.. code-block::
13
14 Processing ./boot/initrd/Jmk
15 Processing ./src/kernel/dri/ata_pio/Jmk
16 Processing ./src/kernel/dri/ahci/Jmk
17 Processing ./src/kernel/dri/pci/Jmk
18 Processing ./src/kernel/Jmk
19 Processing ./src/mkinitrd/Jmk
20 Processing ./src/lisp/Jmk
21
22Then just build using ``src/kernel/Makefile``. There are a few additional
23targets for your convenience:
24
25- ``qemu`` builds and launches the kernel using QEMU's SeaBIOS
26- ``qemu-iso`` builds a GRUB ISO and launches using QEMU
27- ``install`` builds a GRUB ISO and installs it to ``boot/bluejay.iso``
28- ``debug`` launches kernel in QEMU and launches GDB in the terminal.
29- ``debug-wait`` launches kernel in QEMU and starts a GDB server on ``localhost:1234``.
30 This is recommended if you want to debug since you can connect to it from vscode or
31 any other IDE. ``.vscode/launch.json`` is set up to work with this so you can debug
32 the kernel very easily.
33
34In order to build Bluejay you will need the following dependencies::
35
36 gcc gcc-multilib nasm qemu-system-i386 make m4 python3 awk
37
38There are some additional dependencies for building a GRUB ISO but I don't
swissChili4418ca52021-06-14 17:36:00 -070039remember them at the time of writing.