Add a config.mk file where global variables can be modified, add aarch64

interrupts with IRQ and syscalls, make phys_to_virt checked, recreate
stack on aarch64, make serial console finally line wrap and have max
height correctly, add U64Buf for when i need number debug, rename mouse
and keyboard files to kmi and merge them, add non-working pl050 support
This commit is contained in:
csd4ni3l
2026-05-16 23:43:13 +02:00
parent 812d4cf6d4
commit 2a73c3aeb4
30 changed files with 979 additions and 278 deletions
+18
View File
@@ -1,5 +1,23 @@
use std::env;
use std::fs;
use std::path::PathBuf;
fn main() {
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
let timer_frequency_hz = env::var("TIMER_FREQUENCY_HZ").unwrap_or_else(|_| "1000".to_string());
let out_dir = PathBuf::from("src");
fs::write(
out_dir.join("config.rs"),
format!(r#"pub const TIMER_FREQUENCY_HZ: usize = {timer_frequency_hz};"#),
)
.unwrap();
println!("cargo:rerun-if-env-changed=KARCH");
println!("cargo:rerun-if-env-changed=TIMER_FREQUENCY_HZ");
println!("cargo:rerun-if-env-changed=OUTPUT");
// Tell cargo to pass the linker script to the linker..
println!("cargo:rustc-link-arg=-Tlinker-{arch}.ld");
// ..and to re-run if it changes.