mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 14:44:26 +02:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user