edits to support multi-arch iso

pull/11/head
able 2023-09-20 12:26:36 -05:00
parent b233347ca4
commit 99323e8d1f
2 changed files with 11 additions and 4 deletions

View File

@ -12,7 +12,7 @@ TERM_BACKDROP=008080
:AbleOS
COMMENT=Default AbleOS boot entry.
PROTOCOL=limine
KERNEL_PATH=${ABLEOS_KERNEL}
KERNEL_PATH=${ABLEOS_KERNEL}_${ARCH}
# execute is an array of boot modules to execute
KERNEL_CMDLINE="execute=[0,1]"
# Setting a default resolution for the framebuffer

View File

@ -147,10 +147,17 @@ fn build(release: bool, target: Target) -> Result<(), Error> {
_ => (),
}
let mut path: String = "kernel".to_string();
let kernel_dir = match target {
Target::X86_64 => "target/x86_64-ableos",
Target::X86_64 => {
path.push_str("_x86-64");
"target/x86_64-ableos"
}
Target::Riscv64Virt => "target/riscv64-virt-ableos",
Target::Aarch64 => "target/aarch64-virt-ableos",
Target::Aarch64 => {
path.push_str("_aarch64");
"target/aarch64-virt-ableos"
}
};
(|| -> std::io::Result<_> {
@ -160,7 +167,7 @@ fn build(release: bool, target: Target) -> Result<(), Error> {
.join(if release { "release" } else { "debug" })
.join("kernel"),
)?,
&mut fs.root_dir().create_file("kernel")?,
&mut fs.root_dir().create_file(&path)?,
)
.map(|_| ())
})()