Andy-Python-Programmer / aero

Aero is a new modern, experimental, UNIX-like operating system following the monolithic kernel design. Supporting modern PC features such as long mode, 5-level paging, and SMP (multicore), to name a few.

Home Page:https://aero.andypy.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

creating kernel "modules"

YusufKhan-gamedev opened this issue · comments

How would I access the kernel interfaces with kernel privileges (i.e. make a kernel module) in aero?

For a simple hello world kernel module example which is directly linked into a modules section in the kernel itself:

  1. Create a new in src/aero_kernel/src/drivers/, we will call it hello.rs
  2. Register the init module function.
fn hello_init() {
    log::debug!("Hello, World from Aero kernel module!");
}

// register the module init function :^)
aero_kernel::module_init!(hello_init);
  1. Profit

For a simple hello world kernel module example which is directly linked into a modules section in the kernel itself:

1. Create a new in `src/aero_kernel/src/drivers/`, we will call it `hello.rs`

2. Register the init module function.
fn hello_init() {
    log::debug!("Hello, World from Aero kernel module!");
}

// register the module init function :^)
aero_kernel::module_init!(hello_init);
3. Profit

How would I load the kernel module on runtime?

How would I load the kernel module on runtime?

Currently we don't support loading kernel modules at runtime yet. Though soon I could implement support for it.