Skip to content

Commit

Permalink
Improve readme readability
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamos82 committed Oct 4, 2023
1 parent 6eeb3e1 commit a6ea276
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

Expand Down
10 changes: 9 additions & 1 deletion docs/Building.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit a6ea276

Please sign in to comment.