Commit Graph
9 Commits
Author SHA1 Message Date
DcraftBgandBananymous 77796dd317 driver-install: implemented a simple installer 2026-05-20 17:52:19 +03:00
DcraftBgandBananymous f1a72cc9da Kernel: Implemented banos - a WIP C driver API
Banos is a stable WIP C driver API that is supposed to provide a simple
interface to interact with the kernel and load the modules dynamically.
It is WIP and atm this just implements module loading with a custom
banos_install syscall. Banos will not try to substitute parts of the
kernel instead it will just expose kernel functionality via a stable
BINARY API. Meaning binaries (should) remain forward and backward
compatible on a binary level.

Banos modules work similarly to those in linux, you expose symbols via
BANOS_EXPORT which allows you to export a name + addr paired symbol.
It puts it in the .banos-export section. Drivers provide metadata about
themselves in the REQUIRED .banos-driver section. Symbols are resolved
at runtime. The kernel exposes the driver functionality via the same
.banos-export export mechanism.

Banos modules are elf RELOCATABLE files (object files) which have
partial linking (only banos symbols should remain). Modules will
eventually define dependencies, will export symbols and will allow you
to build a complex object hierarchy.

This patch adds the banos_install syscall which takes in the driver
image to install and may only be executed by super users. The API
doesn't validate already loaded modules, as thats something the
userspace MAY choose to keep track of. Multi-instance functionality
shall be implemented via driver specific behaviuor (exposed in the dev
filesystem or some other means).

Modules are supposed to allow you to alter kernel behavior and extend
it, allowing you to create filesystems, drivers, networking
modifications, schedulers, probers, and more (hopefully) whilst
remaining binary compatible with any version of the kernel (again,
hopefully).
2026-05-20 17:52:19 +03:00
DcraftBgandBananymous 718379ce3b Kernel: moved read/write_from_user out of Process 2026-05-20 17:52:19 +03:00
DcraftBgandBananymous 1fcd72e578 Kernel: replaced is_partition/storage with kind 2026-05-15 21:37:18 +03:00
DcraftBgandBananymous 16967cd9c0 Kernel: Replace is_* with kind field
Replaced the is_* virtual functions with a kind field instead
2026-05-15 21:23:12 +03:00
DcraftBgandBananymous 647d6a273d Kernel: Changed stat values from func to be field
- Removed virtual functions for all of the stat stuff.
This did however introduce some issues, mainly with /proc
becoming out of sync if you changed your ID. I propose we
do the linux thing and just have a stat update function
which is optional, but allows dynamic updates of stat fields
for cases such as those in uid/gid in /proc.
- Simplified the API, although still kind of annoying
it is a bit simpler.
- Moved some of the FS structure from having the FS inode inside
the in memory inode to a Serialise <-> Deserialise model where
Inodes are deserialised from disk into in memory ones and then
back into on disk ones when it comes time for syncing.
This makes it semantically better in my opinion, as it explicitly
separates disk and non-disk functionality.
2026-05-15 20:49:04 +03:00
DcraftBgandBananymous b8dc199738 Kernel: Fix ByteRingBuffer->back() 2026-05-04 20:26:02 +03:00
DcraftBgandBananymous f527aca9d0 LibC: add strcasestr to string.h 2026-04-19 17:52:21 +03:00
DcraftBgandBananymous 5fce3b64cc LibC: implemented strptime (partially) 2026-04-17 21:05:58 +03:00