diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index d98a35295..ce455d112 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -12,11 +12,11 @@ jobs: steps: - name: Download LLVM run: | - Invoke-WebRequest -Uri "https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.2/llvm-project-17.0.2.src.tar.xz" -OutFile llvm.tar.xz - $hash = (Get-FileHash llvm.tar.xz).Hash + $llvmurl = "https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.5/llvm-project-17.0.5.src.tar.xz" + Invoke-WebRequest -Uri $llvmurl -OutFile llvm.tar.xz unxz llvm.tar.xz tar -x --strip-components=1 -f llvm.tar - echo "hash=$hash" >> $env:GITHUB_OUTPUT + echo "hash=$llvmurl" >> $env:GITHUB_OUTPUT id: download - name: Generate cache keys run: echo "dist=${{ runner.os }}-llvm-${{ steps.download.outputs.hash }}" >> $env:GITHUB_OUTPUT diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e8450305b..94344ccd3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,8 +28,8 @@ endif() if(OB_BUILD_LLVM) ExternalProject_Add(llvm - URL https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.2/llvm-project-17.0.2.src.tar.xz - URL_HASH SHA256=351562b14d42fcefcbf00cc1f327680a1062bbbf67a1e1ca6acb64c473b06394 + URL https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.5/llvm-project-17.0.5.src.tar.xz + URL_HASH SHA256=95d7eff82945cf05c16a1851d7b391fc2da726b87c1138125e3b6e4d300ab834 DOWNLOAD_NO_PROGRESS true CMAKE_ARGS -Wno-dev CMAKE_CACHE_ARGS ${LLVM_OPTS} diff --git a/src/kernel/Cargo.toml b/src/kernel/Cargo.toml index e448d54bd..4fc89f4f4 100644 --- a/src/kernel/Cargo.toml +++ b/src/kernel/Cargo.toml @@ -23,6 +23,7 @@ param = { path = "../param" } serde = { version = "1.0", features = ["derive"] } serde_yaml = "0.9" sha1 = "0.10" +sysinfo = "0.29.10" termcolor = "1.2.0" thiserror = "1.0" tls = { path = "../tls" } diff --git a/src/kernel/src/main.rs b/src/kernel/src/main.rs index 50bba5818..f90eca351 100644 --- a/src/kernel/src/main.rs +++ b/src/kernel/src/main.rs @@ -22,6 +22,7 @@ use std::path::PathBuf; use std::process::ExitCode; use std::sync::Arc; use std::time::SystemTime; +use sysinfo::{CpuExt, System, SystemExt}; mod arch; mod arnd; @@ -117,7 +118,9 @@ fn main() -> ExitCode { // Show basic infomation. let mut log = info!(); + let hwinfo = System::new_all(); + // Init information writeln!(log, "Starting Obliteration Kernel.").unwrap(); writeln!(log, "System directory : {}", args.system.display()).unwrap(); writeln!(log, "Game directory : {}", args.game.display()).unwrap(); @@ -126,9 +129,15 @@ fn main() -> ExitCode { writeln!(log, "Debug dump directory: {}", v.display()).unwrap(); } + // Param information writeln!(log, "Application Title : {}", param.title()).unwrap(); writeln!(log, "Application ID : {}", param.title_id()).unwrap(); + // Hardware information + writeln!(log, "Operating System : {} {}", hwinfo.long_os_version().unwrap_or_else(|| "Unknown OS".to_string()), hwinfo.kernel_version().unwrap_or_else(|| "Unknown Kernel".to_string())).unwrap(); + writeln!(log, "CPU Information : {}", hwinfo.cpus()[0].brand()).unwrap(); + writeln!(log, "Memory Available : {}/{} MB", hwinfo.available_memory()/1048576, hwinfo.total_memory()/1048576).unwrap(); // Convert Bytes to MB + print(log); // Initialize foundations.