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:
csd4ni3l
2026-05-23 17:28:21 +02:00
parent f90d29340a
commit 7070b53355
16 changed files with 67 additions and 153 deletions
+20 -4
View File
@@ -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();