diff options
author | Marvin Borner | 2020-07-26 14:34:54 +0200 |
---|---|---|
committer | Marvin Borner | 2020-07-26 14:34:54 +0200 |
commit | d8410862be2f00bf2ce321bc28b8322f2de944a9 (patch) | |
tree | db7895b12b9a5896b63c5dcf7af8133150e3c858 | |
parent | 0de8165d440c549847a1c600558305b04a36a77e (diff) |
Added terminus font and config file
-rwxr-xr-x | run | 7 | ||||
-rw-r--r-- | src/config.h | 12 | ||||
-rw-r--r-- | src/main.c | 3 |
3 files changed, 19 insertions, 3 deletions
@@ -71,6 +71,11 @@ make_disk() { tar xf "spleen-$VERSION.tar.gz" mv spleen-"$VERSION"/*.psfu . rm -rf "spleen-$VERSION"* + + cp /usr/share/kbd/consolefonts/ter-p32b.psf.gz . && + cp /usr/share/kbd/consolefonts/ter-p32n.psf.gz . && + gunzip ter-p32* || echo "Terminus font not found!" + cd ../../ } @@ -94,8 +99,6 @@ make_build() { ./ext2util/ext2util -x build/disk.img -wf kernel.bin -i 5 >/dev/null rm kernel.bin - echo "Hello, world!" >disk/test.txt - mkdir -p mnt/ sudo mount build/disk.img mnt/ sudo cp -r disk/* mnt/ diff --git a/src/config.h b/src/config.h new file mode 100644 index 0000000..08779a7 --- /dev/null +++ b/src/config.h @@ -0,0 +1,12 @@ +// MIT License, Copyright (c) 2020 Marvin Borner +// General kernel config + +#ifndef CONFIG_H +#define CONFIG_H + +int MELVIX_VERSION = 0; + +#define FONT_PATH "/font/ter-p32n.psf" +//#define FONT_PATH "/font/spleen-16x32.psfu" + +#endif @@ -1,5 +1,6 @@ // MIT License, Copyright (c) 2020 Marvin Borner +#include "config.h" #include <boot.h> #include <def.h> #include <fs.h> @@ -27,7 +28,7 @@ void main(struct mem_info *mem_info, struct vid_info *vid_info) serial_install(); ls_root(); - gui_init("/font/spleen-16x32.psfu"); + gui_init(FONT_PATH); u32 c[] = { 0xff, 0xff, 0xff }; gui_write(0, 0, c, "Hello, world!"); |