Compare commits
2 Commits
0df671c3fc
...
76f070af8b
| Author | SHA1 | Date | |
|---|---|---|---|
| 76f070af8b | |||
| 2f0e09b9bc |
@@ -0,0 +1,10 @@
|
|||||||
|
[build]
|
||||||
|
target = "x86_64-kernel"
|
||||||
|
target-dir = "build/target"
|
||||||
|
|
||||||
|
[unstable]
|
||||||
|
build-std = ["core", "compiler_builtins"]
|
||||||
|
build-std-features = ["compiler-builtins-mem"]
|
||||||
|
|
||||||
|
[env]
|
||||||
|
RUST_TARGET_PATH = { value = "kernel", relative = true }
|
||||||
+15
-1
@@ -1 +1,15 @@
|
|||||||
/target
|
# Build output directories
|
||||||
|
/build/
|
||||||
|
/target/
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
*.o
|
||||||
|
*.bin
|
||||||
|
*.iso
|
||||||
|
*.img
|
||||||
|
*.elf
|
||||||
|
*.efi
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Rust specific
|
||||||
|
Cargo.lock
|
||||||
|
|||||||
Generated
+1
-1
@@ -9,7 +9,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
|
checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "foundryos_kernel"
|
name = "kernel"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"limine",
|
"limine",
|
||||||
|
|||||||
+18
@@ -8,3 +8,21 @@ resolver = "2"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
opt-level = "z"
|
||||||
|
debug = true
|
||||||
|
debug-assertions = true
|
||||||
|
overflow-checks = true
|
||||||
|
lto = false
|
||||||
|
incremental = false
|
||||||
|
codegen-units = 1
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
opt-level = "z"
|
||||||
|
debug = false
|
||||||
|
debug-assertions = false
|
||||||
|
overflow-checks = false
|
||||||
|
lto = true
|
||||||
|
incremental = false
|
||||||
|
codegen-units = 1
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -1,5 +1,11 @@
|
|||||||
|
# Timeout in seconds that Limine will use before automatically booting.
|
||||||
timeout: 1
|
timeout: 1
|
||||||
|
|
||||||
|
# The entry name that will be displayed in the boot menu.
|
||||||
/foundry-os
|
/foundry-os
|
||||||
|
# We use the Limine boot protocol.
|
||||||
protocol: limine
|
protocol: limine
|
||||||
kernel_path: boot()/boot/kernel
|
|
||||||
|
# Path to the kernel to boot. boot():/ represents the partition on which limine.conf is located.
|
||||||
|
kernel_path: boot():/boot/kernel
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
{
|
|
||||||
"llvm-target": "x86_64-unknown-none",
|
|
||||||
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
|
|
||||||
"arch": "x86_64",
|
|
||||||
"target-endian": "little",
|
|
||||||
"target-pointer-width": "64",
|
|
||||||
"target-c-int-width": "32",
|
|
||||||
"os": "none",
|
|
||||||
"executables": true,
|
|
||||||
"linker-flavor": "ld.lld",
|
|
||||||
"linker": "rust-lld",
|
|
||||||
"panic-strategy": "abort",
|
|
||||||
"disable-redzone": true,
|
|
||||||
"features": "-mmx,-sse,+soft-float",
|
|
||||||
"relocation-model": "static",
|
|
||||||
"code-model": "kernel",
|
|
||||||
"pre-link-args": {
|
|
||||||
"ld.lld": [
|
|
||||||
"--script=linker/linker.ld",
|
|
||||||
"-nostdlib",
|
|
||||||
"--no-dynamic-linker",
|
|
||||||
"-static",
|
|
||||||
"--no-pie",
|
|
||||||
"--gc-sections",
|
|
||||||
"--build-id=none",
|
|
||||||
"-z", "max-page-size=0x1000"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[build]
|
|
||||||
target = "../customos"
|
|
||||||
target-dir = "./target"
|
|
||||||
|
|
||||||
[unstable]
|
|
||||||
build-std = ["core", "compiler_builtins"]
|
|
||||||
build-std-features = ["compiler-builtins-mem"]
|
|
||||||
+8
-1
@@ -1,7 +1,14 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "foundryos_kernel"
|
name = "kernel"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
limine = "0.3.1"
|
limine = "0.3.1"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = []
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "kernel"
|
||||||
|
path = "src/main.rs"
|
||||||
+8
-6
@@ -1,7 +1,9 @@
|
|||||||
|
use std::process::Command;
|
||||||
|
use std::{env, path::Path};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
// Tell cargo to rerun if these files change
|
||||||
// Tell cargo to pass the linker script to the linker..
|
println!("cargo:rerun-if-changed=src");
|
||||||
println!("cargo:rustc-link-arg=-Tlinker-{arch}.ld");
|
println!("cargo:rerun-if-changed=linker.ld");
|
||||||
// ..and to re-run if it changes.
|
println!("cargo:rerun-if-changed=../config/limine.conf");
|
||||||
println!("cargo:rerun-if-changed=linker-{arch}.ld");
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
Signature: 8a477f597d28d172789f06886806bc55
|
|
||||||
# This file is a cache directory tag created by cargo.
|
|
||||||
# For information about cache directory tags see https://bford.info/cachedir/
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
2c12b06536f46cd1
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
{"rustc":5637828655848808591,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[16831489395241507197,"build_script_build",false,2449660372133931133]],"local":[{"RerunIfChanged":{"output":"../customos/debug/build/compiler_builtins-7ff902764ead3159/output","paths":["build.rs","configure.rs"]}}],"rustflags":[],"config":0,"compile_kind":0}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
This file has an mtime of when this was started.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"$message_type":"diagnostic","message":"Error loading target specification: Could not find specification for target \"../customos\". Run `rustc --print target-list` for a list of built-in targets","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: Error loading target specification: Could not find specification for target \"../customos\". Run `rustc --print target-list` for a list of built-in targets\u001b[0m\n\n"}
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
85b0379a2e964349
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
{"rustc":5637828655848808591,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[16831489395241507197,"build_script_build",false,15090704965883138604],[4566724075159146729,"build_script_build",false,12086878114467551400]],"local":[{"RerunIfChanged":{"output":"../customos/debug/build/foundryos_kernel-15da3dc5b1d972d1/output","paths":["linker-x86_64.ld"]}}],"rustflags":[],"config":0,"compile_kind":0}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
This file has an mtime of when this was started.
|
|
||||||
@@ -1,151 +0,0 @@
|
|||||||
cargo::rerun-if-changed=build.rs
|
|
||||||
cargo::rerun-if-changed=configure.rs
|
|
||||||
cargo::rustc-check-cfg=cfg(__ashldi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__ashlsi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__ashrdi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__ashrsi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__bswapsi2, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__bswapdi2, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__bswapti2, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__divdi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__divsi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__divmoddi4, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__divmodsi4, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__divmodsi4, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__divmodti4, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__lshrdi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__lshrsi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__moddi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__modsi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__muldi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__udivdi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__udivmoddi4, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__udivmodsi4, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__udivsi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__umoddi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__umodsi3, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas1_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas1_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas1_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas1_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas2_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas2_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas2_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas2_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas4_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas4_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas4_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas4_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas8_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas8_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas8_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas8_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas16_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas16_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas16_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_cas16_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd1_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd1_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd1_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd1_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd2_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd2_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd2_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd2_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd4_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd4_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd4_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd4_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd8_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd8_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd8_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd8_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr1_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr1_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr1_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr1_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr2_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr2_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr2_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr2_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr4_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr4_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr4_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr4_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr8_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr8_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr8_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr8_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor1_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor1_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor1_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor1_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor2_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor2_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor2_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor2_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor4_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor4_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor4_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor4_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor8_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor8_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor8_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor8_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset1_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset1_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset1_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset1_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset2_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset2_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset2_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset2_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset4_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset4_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset4_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset4_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset8_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset8_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset8_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset8_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp1_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp1_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp1_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp1_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp2_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp2_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp2_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp2_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp4_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp4_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp4_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp4_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp8_relax, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp8_acq, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp8_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(__aarch64_swp8_acq_rel, values("optimized-c"))
|
|
||||||
cargo::rustc-check-cfg=cfg(target_feature, values("vis3"))
|
|
||||||
cargo::rustc-check-cfg=cfg(feature, values("checked"))
|
|
||||||
cargo::rustc-check-cfg=cfg(assert_no_panic)
|
|
||||||
cargo::rustc-check-cfg=cfg(f16_enabled)
|
|
||||||
cargo::rustc-check-cfg=cfg(f128_enabled)
|
|
||||||
cargo::rustc-cfg=f16_enabled
|
|
||||||
cargo::rustc-cfg=f128_enabled
|
|
||||||
cargo:rustc-check-cfg=cfg(intrinsics_enabled)
|
|
||||||
cargo:rustc-check-cfg=cfg(arch_enabled)
|
|
||||||
cargo:rustc-check-cfg=cfg(optimizations_enabled)
|
|
||||||
cargo:rustc-check-cfg=cfg(feature, values("unstable-public-internals"))
|
|
||||||
cargo:rustc-cfg=intrinsics_enabled
|
|
||||||
cargo:rustc-cfg=arch_enabled
|
|
||||||
cargo:rustc-check-cfg=cfg(optimizations_enabled)
|
|
||||||
cargo:rustc-check-cfg=cfg(x86_no_sse)
|
|
||||||
cargo:rustc-env=CFG_CARGO_FEATURES=["compiler-builtins", "core", "default", "mem", "rustc-dep-of-std"]
|
|
||||||
cargo:rustc-env=CFG_OPT_LEVEL=0
|
|
||||||
cargo:rustc-env=CFG_TARGET_FEATURES=["x87"]
|
|
||||||
cargo:rustc-cfg=feature="unstable-intrinsics"
|
|
||||||
cargo:compiler-rt=/home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/compiler-rt
|
|
||||||
cargo::rustc-check-cfg=cfg(feature, values("mem-unaligned"))
|
|
||||||
cargo:rustc-cfg=feature="mem-unaligned"
|
|
||||||
cargo::rustc-check-cfg=cfg(thumb)
|
|
||||||
cargo::rustc-check-cfg=cfg(thumb_1)
|
|
||||||
cargo::rustc-check-cfg=cfg(kernel_user_helpers)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/../customos/debug/build/compiler_builtins-7ff902764ead3159/out
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
This file has an mtime of when this was started.
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
cargo:rustc-link-arg=-Tlinker-x86_64.ld
|
|
||||||
cargo:rerun-if-changed=linker-x86_64.ld
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/../customos/debug/build/foundryos_kernel-15da3dc5b1d972d1/out
|
|
||||||
@@ -9,9 +9,10 @@ ENTRY(kmain)
|
|||||||
/* process. */
|
/* process. */
|
||||||
PHDRS
|
PHDRS
|
||||||
{
|
{
|
||||||
text PT_LOAD;
|
limine_requests PT_LOAD;
|
||||||
rodata PT_LOAD;
|
text PT_LOAD;
|
||||||
data PT_LOAD;
|
rodata PT_LOAD;
|
||||||
|
data PT_LOAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
@@ -22,6 +23,18 @@ SECTIONS
|
|||||||
/* that is the beginning of the region. */
|
/* that is the beginning of the region. */
|
||||||
. = 0xffffffff80000000;
|
. = 0xffffffff80000000;
|
||||||
|
|
||||||
|
/* Define a section to contain the Limine requests and assign it to its own PHDR */
|
||||||
|
|
||||||
|
.limine_requests : {
|
||||||
|
KEEP(*(.limine_requests_start))
|
||||||
|
KEEP(*(.limine_requests))
|
||||||
|
KEEP(*(.limine_requests_end))
|
||||||
|
} :limine_requests
|
||||||
|
|
||||||
|
/* Move to the next memory page for .text */
|
||||||
|
|
||||||
|
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||||
|
|
||||||
.text : {
|
.text : {
|
||||||
*(.text .text.*)
|
*(.text .text.*)
|
||||||
} :text
|
} :text
|
||||||
@@ -38,12 +51,6 @@ SECTIONS
|
|||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
*(.data .data.*)
|
*(.data .data.*)
|
||||||
|
|
||||||
/* Place the sections that contain the Limine requests as part of the .data */
|
|
||||||
/* output section. */
|
|
||||||
KEEP(*(.requests_start_marker))
|
|
||||||
KEEP(*(.requests))
|
|
||||||
KEEP(*(.requests_end_marker))
|
|
||||||
} :data
|
} :data
|
||||||
|
|
||||||
/* NOTE: .bss needs to be the last thing mapped to :data, otherwise lots of */
|
/* NOTE: .bss needs to be the last thing mapped to :data, otherwise lots of */
|
||||||
@@ -60,4 +67,4 @@ SECTIONS
|
|||||||
*(.eh_frame*)
|
*(.eh_frame*)
|
||||||
*(.note .note.*)
|
*(.note .note.*)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
[toolchain]
|
|
||||||
channel = "nightly"
|
|
||||||
targets = ["rust-src", "llvm-tools-preview", "rustfmt", "clippy"]
|
|
||||||
components = []
|
|
||||||
@@ -51,6 +51,7 @@ unsafe extern "C" fn kmain() -> ! {
|
|||||||
#[panic_handler]
|
#[panic_handler]
|
||||||
fn rust_panic(_info: &core::panic::PanicInfo) -> ! {
|
fn rust_panic(_info: &core::panic::PanicInfo) -> ! {
|
||||||
hcf();
|
hcf();
|
||||||
|
// loop {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hcf() -> ! {
|
fn hcf() -> ! {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{"rustc_fingerprint":10191676143533991604,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.87.0-nightly (827a0d638 2025-02-18)\nbinary: rustc\ncommit-hash: 827a0d638dabc9a22c56f9c37a557568f86ac76c\ncommit-date: 2025-02-18\nhost: x86_64-unknown-linux-gnu\nrelease: 1.87.0-nightly\nLLVM version: 20.1.0\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/zxq5/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\nfmt_debug=\"full\"\noverflow_checks\npanic=\"unwind\"\nproc_macro\nrelocation_model=\"pic\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"x87\"\ntarget_has_atomic\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nub_checks\nunix\n","stderr":""},"16938275954012004043":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.a\n/home/zxq5/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\noff\n___\ndebug_assertions\nfmt_debug=\"full\"\noverflow_checks\npanic=\"abort\"\nproc_macro\nrelocation_model=\"static\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_feature=\"x87\"\ntarget_has_atomic\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"none\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nub_checks\n","stderr":"warning: target feature `sse2` must be enabled to ensure that the ABI of the current target can be implemented correctly\n |\n = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!\n = note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344>\n\nwarning: dropping unsupported crate type `dylib` for target `../customos`\n\nwarning: dropping unsupported crate type `cdylib` for target `../customos`\n\nwarning: dropping unsupported crate type `proc-macro` for target `../customos`\n\nwarning: 4 warnings emitted\n\n"}},"successes":{}}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Signature: 8a477f597d28d172789f06886806bc55
|
|
||||||
# This file is a cache directory tag created by cargo.
|
|
||||||
# For information about cache directory tags see https://bford.info/cachedir/
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
7de8642d21f1fe21
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
{"rustc":5637828655848808591,"features":"[\"compiler-builtins\", \"core\", \"default\", \"mem\", \"rustc-dep-of-std\"]","declared_features":"[\"c\", \"cc\", \"compiler-builtins\", \"core\", \"default\", \"mangled-names\", \"mem\", \"no-asm\", \"no-f16-f128\", \"public-test-deps\", \"rustc-dep-of-std\"]","target":5408242616063297496,"profile":15657897354478470176,"path":1296201966205883023,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/compiler_builtins-96bb72fd3eed954b/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
|
||||||
BIN
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
This file has an mtime of when this was started.
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
a81848289b37bda7
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
{"rustc":5637828655848808591,"features":"[]","declared_features":"[]","target":5408242616063297496,"profile":8731458305071235362,"path":11588123521703303381,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/foundryos_kernel-4c0b4334571dcf0e/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
|
||||||
BIN
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
This file has an mtime of when this was started.
|
|
||||||
Binary file not shown.
BIN
Binary file not shown.
-6
@@ -1,6 +0,0 @@
|
|||||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/debug/build/compiler_builtins-96bb72fd3eed954b/build_script_build-96bb72fd3eed954b: /home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/build.rs /home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/configure.rs
|
|
||||||
|
|
||||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/debug/build/compiler_builtins-96bb72fd3eed954b/build_script_build-96bb72fd3eed954b.d: /home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/build.rs /home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/configure.rs
|
|
||||||
|
|
||||||
/home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/build.rs:
|
|
||||||
/home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/configure.rs:
|
|
||||||
Binary file not shown.
BIN
Binary file not shown.
-5
@@ -1,5 +0,0 @@
|
|||||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/debug/build/foundryos_kernel-4c0b4334571dcf0e/build_script_build-4c0b4334571dcf0e: kernel/build.rs
|
|
||||||
|
|
||||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/debug/build/foundryos_kernel-4c0b4334571dcf0e/build_script_build-4c0b4334571dcf0e.d: kernel/build.rs
|
|
||||||
|
|
||||||
kernel/build.rs:
|
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"llvm-target": "x86_64-unknown-none",
|
||||||
|
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
|
||||||
|
"arch": "x86_64",
|
||||||
|
"target-endian": "little",
|
||||||
|
"target-pointer-width": "64",
|
||||||
|
"target-c-int-width": "32",
|
||||||
|
"os": "none",
|
||||||
|
"executables": true,
|
||||||
|
"linker-flavor": "ld.lld",
|
||||||
|
"linker": "rust-lld",
|
||||||
|
"panic-strategy": "abort",
|
||||||
|
"disable-redzone": true,
|
||||||
|
"features": "-mmx,-sse,+soft-float",
|
||||||
|
"rustc-abi": "x86-softfloat",
|
||||||
|
"relocation-model": "static",
|
||||||
|
"code-model": "kernel",
|
||||||
|
"pre-link-args": {
|
||||||
|
"ld.lld": [
|
||||||
|
"--script=kernel/linker.ld",
|
||||||
|
"-nostdlib",
|
||||||
|
"--no-dynamic-linker",
|
||||||
|
"-static",
|
||||||
|
"--no-pie",
|
||||||
|
"--gc-sections",
|
||||||
|
"--build-id=none",
|
||||||
|
"-z", "max-page-size=0x1000"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
[toolchain]
|
||||||
|
channel = "nightly"
|
||||||
|
components = ["rust-src", "llvm-tools-preview", "rustfmt", "clippy"]
|
||||||
|
targets = ["x86_64-unknown-none"]
|
||||||
Executable
+176
@@ -0,0 +1,176 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
YELLOW='\033[0;33m'
|
||||||
|
RED='\033[0;31m'
|
||||||
|
BOLD='\033[1m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
# Error handling
|
||||||
|
set -e
|
||||||
|
trap 'echo -e "${RED}${BOLD}error${NC}: build failed" >&2' ERR
|
||||||
|
|
||||||
|
# Get absolute path to project root
|
||||||
|
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||||
|
project_root=$(cd "$script_dir/.." &>/dev/null && pwd)
|
||||||
|
|
||||||
|
# Logging functions
|
||||||
|
info() {
|
||||||
|
echo -e "${BLUE}${BOLD}info${NC}: $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
compiling() {
|
||||||
|
echo -e "${GREEN}${BOLD}Compiling${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
warning() {
|
||||||
|
echo -e "${YELLOW}${BOLD}warning${NC}: $1" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
building() {
|
||||||
|
echo -e "${GREEN}${BOLD}Building${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
error() {
|
||||||
|
echo -e "${RED}${BOLD}error${NC}: $1" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
build_dir="$project_root/build"
|
||||||
|
iso_root="$build_dir/iso_root"
|
||||||
|
|
||||||
|
# Check if we're running tests
|
||||||
|
is_test=0
|
||||||
|
if [[ $1 == *"deps"* ]]; then
|
||||||
|
is_test=1
|
||||||
|
kernel_path="$1"
|
||||||
|
else
|
||||||
|
# Build the kernel normally
|
||||||
|
cd "$project_root"
|
||||||
|
cargo build
|
||||||
|
kernel_path="$build_dir/target/x86_64-kernel/debug/kernel"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for required tools
|
||||||
|
check_tools() {
|
||||||
|
local missing=0
|
||||||
|
for tool in xorriso git qemu-system-x86_64; do
|
||||||
|
if ! command -v $tool >/dev/null 2>&1; then
|
||||||
|
error "required tool '$tool' is not installed"
|
||||||
|
missing=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ $missing -eq 1 ]; then
|
||||||
|
error "missing required tools"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create build directory structure
|
||||||
|
info "Creating build directory structure"
|
||||||
|
mkdir -p "$iso_root/boot/limine"
|
||||||
|
mkdir -p "$iso_root/EFI/BOOT"
|
||||||
|
|
||||||
|
# Clone Limine if needed
|
||||||
|
if [ ! -d "$build_dir/limine" ]; then
|
||||||
|
compiling "limine bootloader"
|
||||||
|
cd "$build_dir"
|
||||||
|
git clone https://github.com/limine-bootloader/limine.git --branch=v8.x-binary --depth=1 "$build_dir/limine" || error "failed to clone limine"
|
||||||
|
make -C "$build_dir/limine" || error "failed to build limine"
|
||||||
|
cd "$project_root"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy files
|
||||||
|
info "Copying files to ISO root"
|
||||||
|
cp -v "$kernel_path" "$iso_root/boot/kernel" || error "failed to copy kernel"
|
||||||
|
cp -v "$project_root/config/limine.conf" "$iso_root/boot/limine/limine.conf" || error "failed to copy limine config"
|
||||||
|
cp -v "$build_dir/limine/limine-bios.sys" "$build_dir/limine/limine-bios-cd.bin" \
|
||||||
|
"$build_dir/limine/limine-uefi-cd.bin" "$iso_root/boot/limine/" || error "failed to copy limine files"
|
||||||
|
cp -v "$build_dir/limine/BOOTX64.EFI" "$iso_root/EFI/BOOT/" || error "failed to copy BOOTX64.EFI"
|
||||||
|
cp -v "$build_dir/limine/BOOTIA32.EFI" "$iso_root/EFI/BOOT/" || error "failed to copy BOOTIA32.EFI"
|
||||||
|
|
||||||
|
# Create ISO
|
||||||
|
building "bootable ISO image"
|
||||||
|
xorriso -as mkisofs -R -r -J -b boot/limine/limine-bios-cd.bin \
|
||||||
|
-no-emul-boot -boot-load-size 4 -boot-info-table -hfsplus \
|
||||||
|
-apm-block-size 2048 --efi-boot boot/limine/limine-uefi-cd.bin \
|
||||||
|
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
||||||
|
"$iso_root" -o "$build_dir/image.iso" || error "failed to create ISO"
|
||||||
|
|
||||||
|
# Install Limine
|
||||||
|
info "Installing Limine bootloader"
|
||||||
|
"$build_dir/limine/limine" bios-install "$build_dir/image.iso" || error "failed to install limine"
|
||||||
|
|
||||||
|
# Check if KVM is available
|
||||||
|
if [ "${KVM_FLAG:-enable}" = "disable" ]; then
|
||||||
|
warning "KVM acceleration disabled by user"
|
||||||
|
kvm_flag=""
|
||||||
|
elif [ -c "/dev/kvm" ] && [ -w "/dev/kvm" ]; then
|
||||||
|
info "KVM acceleration enabled"
|
||||||
|
kvm_flag="-enable-kvm"
|
||||||
|
else
|
||||||
|
warning "KVM acceleration not available (is kvm module loaded?)"
|
||||||
|
kvm_flag=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if we're running in debug mode
|
||||||
|
if [[ "$(cargo metadata --format-version=1 | jq -r '.workspace_members[0]' | cut -d' ' -f2)" == "(debug)" ]]; then
|
||||||
|
debug_flags="-s -S"
|
||||||
|
else
|
||||||
|
debug_flags=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set up test-specific flags
|
||||||
|
if [ $is_test -eq 1 ]; then
|
||||||
|
test_flags="-device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none"
|
||||||
|
serial_flags="-serial stdio"
|
||||||
|
else
|
||||||
|
test_flags=""
|
||||||
|
# serial_flags="-serial tcp:127.0.0.1:1234,server -monitor telnet:127.0.0.1:1235,server"
|
||||||
|
serial_flags="-serial stdio"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run in QEMU
|
||||||
|
if [[ ${QEMU_FLAGS} == *-S* ]]; then
|
||||||
|
info "Running OS in QEMU with GDB debugging enabled"
|
||||||
|
info "To connect GDB, run: gdb"
|
||||||
|
info "At the GDB prompt, type: target remote localhost:1234"
|
||||||
|
else
|
||||||
|
info "Running OS in QEMU..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
check_test_res() {
|
||||||
|
qemu_exit_code=$?
|
||||||
|
if [ $qemu_exit_code -eq 33 ]; then
|
||||||
|
# Success case (0x10 << 1) | 1 = 33
|
||||||
|
info "All tests passed"
|
||||||
|
exit 0
|
||||||
|
elif [ $qemu_exit_code -eq 35 ]; then
|
||||||
|
# Failure case (0x11 << 1) | 1 = 35
|
||||||
|
warning "Some tests failed"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
# Any other exit code is treated as a failure
|
||||||
|
warning "Some tests failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
kvm_flag=""
|
||||||
|
|
||||||
|
trap 'check_test_res "tests completed"' ERR
|
||||||
|
|
||||||
|
cd "$project_root"
|
||||||
|
qemu-system-x86_64 -M q35 \
|
||||||
|
${kvm_flag} \
|
||||||
|
-cdrom "$build_dir/image.iso" \
|
||||||
|
-boot d \
|
||||||
|
-m 2G \
|
||||||
|
${serial_flags} \
|
||||||
|
-no-reboot \
|
||||||
|
${test_flags} \
|
||||||
|
${debug_flags} \
|
||||||
|
${QEMU_FLAGS:-}
|
||||||
|
|
||||||
Reference in New Issue
Block a user