Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 232c8a3

Browse files
committed
Merge branch 'nightly' of https://github.com/ViktorPopp/Hexium into nightly
2 parents 4f56f0f + 96db5df commit 232c8a3

File tree

5 files changed

+63
-32
lines changed

5 files changed

+63
-32
lines changed

.github/workflows/make.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Makefile CI
2+
3+
on:
4+
push:
5+
branches: [ "nightly" ]
6+
pull_request:
7+
branches: [ "nitghly" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
submodules: 'recursive'
18+
19+
- name: Install Rust toolchain
20+
uses: actions-rs/toolchain@v1
21+
with:
22+
profile: minimal
23+
toolchain: nightly
24+
override: true
25+
target: x86_64-unknown-none
26+
components: rust-src
27+
28+
- name: Add rust-src
29+
run: rustup component add rust-src --toolchain nightly-2025-04-03-x86_64-unknown-linux-gnu
30+
31+
- name: Update Debian repositories
32+
run: sudo apt-get update
33+
34+
- name: Setup nasm
35+
run: sudo apt-get install -y nasm
36+
37+
- name: Install xorriso
38+
run: sudo apt-get install -y xorriso
39+
40+
- name: Install qemu
41+
run: sudo apt-get install qemu-system-x86
42+
43+
- name: Run make
44+
run: make
45+
46+
- uses: actions/upload-artifact@v4
47+
with:
48+
name: 'hexium.iso'
49+
path: 'hexium-x86_64.iso'

kernel/Cargo.lock

Lines changed: 1 addition & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kernel/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ bitflags = "2.9.1"
99
elf = { version = "0.7", default-features = false, features = ["nightly"] }
1010
flanterm = "0.0.2"
1111
limine = "0.5"
12-
lazy_static = { version = "1.0", features = ["spin_no_std"] }
1312
rustc-demangle = "0.1"
1413
spin = "0.10.0"
1514
talc = "4.4.3"

kernel/src/arch/x86_64/idt.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use core::{
99
marker::PhantomData,
1010
ops::{Index, IndexMut},
1111
};
12+
use spin::Lazy;
1213

1314
#[allow(dead_code)]
1415
#[repr(C, align(16))]
@@ -311,14 +312,14 @@ impl_handler_func_type!(HandlerFuncWithErrCode);
311312
impl_handler_func_type!(DivergingHandlerFunc);
312313
impl_handler_func_type!(DivergingHandlerFuncWithErrCode);
313314

314-
lazy_static::lazy_static! {
315-
static ref IDT: InterruptDescriptorTable = {
316-
let mut idt = InterruptDescriptorTable::new();
317-
idt.double_fault.set_handler_fn(exceptions::double_fault_handler);
318-
idt.page_fault.set_handler_fn(exceptions::page_fault_handler);
319-
idt
320-
};
321-
}
315+
static IDT: Lazy<InterruptDescriptorTable> = Lazy::new(|| {
316+
let mut idt = InterruptDescriptorTable::new();
317+
idt.double_fault
318+
.set_handler_fn(exceptions::double_fault_handler);
319+
idt.page_fault
320+
.set_handler_fn(exceptions::page_fault_handler);
321+
idt
322+
});
322323

323324
pub fn init() {
324325
IDT.load();

kernel/src/arch/x86_64/writer.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::util::option_to_c_void;
22
use core::{fmt, ptr};
3-
use spin::Mutex;
3+
use spin::{Lazy, Mutex};
44

55
pub struct FlantermContext(pub *mut flanterm::sys::flanterm_context);
66
unsafe impl Send for FlantermContext {}
@@ -45,11 +45,9 @@ pub fn init() {
4545
crate::trace!("Initialized Flanterm context");
4646
}
4747

48-
lazy_static::lazy_static! {
49-
pub static ref FLANTERM_CTX: Mutex<FlantermContext> =
50-
Mutex::new(FlantermContext(ptr::null_mut()));
51-
pub static ref WRITER: Mutex<FlantermWriter> = Mutex::new(FlantermWriter {});
52-
}
48+
pub static FLANTERM_CTX: Lazy<Mutex<FlantermContext>> =
49+
Lazy::new(|| Mutex::new(FlantermContext(ptr::null_mut())));
50+
pub static WRITER: Lazy<Mutex<FlantermWriter>> = Lazy::new(|| Mutex::new(FlantermWriter {}));
5351

5452
pub struct FlantermWriter {}
5553

0 commit comments

Comments
 (0)