From a6ea27614b01fa9734d0f00767a414fbb7358542 Mon Sep 17 00:00:00 2001 From: Ivan Gualandri Date: Wed, 4 Oct 2023 16:30:57 +0100 Subject: [PATCH] Improve readme readability --- README.md | 16 ++++++++++------ docs/Building.md | 10 +++++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4b6a047..ced0c65 100644 --- a/README.md +++ b/README.md @@ -51,18 +51,20 @@ These are the packages required to build and run it: * mtools * Gcc cross compiler or Clang -## Compiling and Running the OS +To build _Dreamos64_, a toolchain that supports the target architecture is required, it can be either `gcc` (in our case `x86-64`) or `clang` installed. + +A complete guide on how to build the `gcc` cross-compiler, can be found [here](https://github.com/dreamos82/Osdev-Notes/blob/master/99_Appendices/E_Cross_Compilers.md), for `DreamOS64` the target architecture will be `x86-64`. -To build _Dreamos64_, you need to have one `gcc` compiled to support the target architecture (in our case `x86-64`) or `clang` toolchain installed, a complete guide on how to build the `gcc` cross-compiler, can be found [here](https://github.com/dreamos82/Osdev-Notes/blob/master/99_Appendices/E_Cross_Compilers.md), for `DreamOS64` the target architecture will be `x86-64`. +For `clang` we just need to install the `llvm`and the `lld` packages (the exact package name depends on the distribution used).. + +## Compiling and Running the OS -For `clang` having the toolchain and the `lld` packages installed should be enough. +For a complete guide on how to build _DreamOS64_ and the parameters that are availables is in the docs folder: [docs/Building.md](docs/Building.md). ### Build the OS Before building the os we need to copy a PSF font (either v1 or v2) in the fonts folder, and change its name to `default.psf` (even if we are building with framebuffer off). -A complete guide on how to build _DreamOS64_ and the parameters that are availables is in the docs folder: [docs/Building.md](docs/Building.md). - Once all the parameters in `build/Config.mk` are set, to build just type: ```bash @@ -74,16 +76,18 @@ It will use the default goal `build` and produce a bootable iso in the `dist/` f ## Run and Debug To launch the OS in qemu just use: + ```bash make run ``` Instead if we type: + ```bash make debug ``` -It will compile the OS with the debug symbols enabled, all the output logging information will sent to stdio. +It will compile the OS with the debug symbols enabled, all the output logging information will be sent to stdio. Finally: diff --git a/docs/Building.md b/docs/Building.md index c40f91f..98d51ae 100644 --- a/docs/Building.md +++ b/docs/Building.md @@ -1,9 +1,17 @@ # Build configuration -DreamOS can be built using either `gcc` or `clang` toolchain. +DreamOS can be built using either `gcc` or `clang` toolchain. This is controlled by the `TOOLCHAIN` variable, inside the Config.mk file, the accepted values are: `gcc` or `clang`. +## PSF Font + +The OS should be able to support both v1 and v2 PSF files. If running on linux there are a lot of PSF files available in: `/usr/share/consolefonts`. + +They are stored compressed as `.gz` files, before using them with dreamos make sure to uncompress it. Then it has to be copied in the `$FONTS` folder and renamed as `default.psf` + +If curious to know the version of the psf used, or explore the psf there is a handy tool for linux called _gdbfed_ to tinker with the fonts. The sources are available [here](https://github.com/andrewshadura/gbdfed) + ## Compilation The following flags have to be properly set before building the os: