mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 14:44:26 +02:00
Remove unneccessary debug, increase kernel heap to 64mb, add a global
build_and_run script, fix build.rs sometimes using the wrong architecture, add badapple ELF and change default font size to 1 for it to work, improve framebuffer errors, remove unnecessary commands from make and improve debug filtering
This commit is contained in:
+20
-4
@@ -3,15 +3,25 @@ use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
||||
let arch = std::env::var("TARGET")
|
||||
.unwrap_or_else(|_| {
|
||||
std::env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_else(|_| "x86_64".to_string())
|
||||
})
|
||||
.split('-')
|
||||
.next()
|
||||
.unwrap()
|
||||
.to_string();
|
||||
|
||||
let timer_frequency_hz = env::var("TIMER_FREQUENCY_HZ").unwrap_or_else(|_| "1000".to_string());
|
||||
let karch = env::var("KARCH").unwrap_or_else(|_| "x86_64".to_string());
|
||||
let karch = env::var("KARCH").unwrap_or_else(|_| arch.clone());
|
||||
|
||||
let out_dir = PathBuf::from("src");
|
||||
fs::write(
|
||||
out_dir.join("config.rs"),
|
||||
format!("pub const TIMER_FREQUENCY_HZ: usize = {timer_frequency_hz};\npub const KARCH: &str = \"{karch}\";"),
|
||||
format!(
|
||||
"pub const TIMER_FREQUENCY_HZ: usize = {timer_frequency_hz};\n\
|
||||
pub const KARCH: &str = \"{karch}\";"
|
||||
),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -19,7 +29,13 @@ fn main() {
|
||||
|
||||
fs::write(
|
||||
out_dir.join("assets.rs"),
|
||||
format!("pub static INIT_ELF: &[u8] = include_bytes!(\"../../../../../assets/{karch}/init\");\npub static DOOM_WAD: &[u8] = include_bytes!(\"../../../../../assets/doom1.wad\");\npub static DOOM_ELF: &[u8] = include_bytes!(\"../../../../../assets/{karch}/doomgeneric\");\npub static HELLOWORLD_ELF: &[u8] = include_bytes!(\"../../../../../assets/{karch}/helloworld.elf\");"),
|
||||
format!(
|
||||
"pub static INIT_ELF: &[u8] = include_bytes!(\"../../../../../assets/{karch}/init\");\n\
|
||||
pub static DOOM_WAD: &[u8] = include_bytes!(\"../../../../../assets/doom1.wad\");\n\
|
||||
pub static DOOM_ELF: &[u8] = include_bytes!(\"../../../../../assets/{karch}/doomgeneric\");\n\
|
||||
pub static HELLOWORLD_ELF: &[u8] = include_bytes!(\"../../../../../assets/{karch}/helloworld.elf\");\n\
|
||||
pub static BADAPPLE_ELF: &[u8] = include_bytes!(\"../../../../../assets/{karch}/badapple\");"
|
||||
),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user