moved stuff around

This commit is contained in:
Erin 2022-12-08 21:31:54 +01:00 committed by ondra05
parent 58046c3c7b
commit b68984dc7f
2 changed files with 8 additions and 30 deletions

View file

@ -1,22 +0,0 @@
name: Build
on:
- push
- pull_request
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
components: rust-src
- uses: actions-rs/cargo@v1
with:
command: repbuild
args: run

View file

@ -70,7 +70,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
{
fs::remove_dir_all("./limine");
fs::remove_dir_all("./disk");
fs::remove_file("./disk.img");
fs::remove_file("./target/disk.img");
}
// Build ableOS in release mode
@ -100,7 +100,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("{}", "Allocating new disk image".bold());
Command::new("fallocate")
.args(["-l", "256M", "disk.img"])
.args(["-l", "256M", "./target/disk.img"])
.status()
.unwrap();
@ -108,7 +108,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let dbus_conn = zbus::blocking::Connection::system()?;
// Setup loop device
let disk_img = File::options().read(true).write(true).open("disk.img")?;
let disk_img = File::options().read(true).write(true).open("./target/disk.img")?;
let loopdev = udisks::manager::UDisks2ManagerProxyBlocking::new(&dbus_conn)?
.loop_setup(
disk_img.as_raw_fd().into(),
@ -179,7 +179,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("{}", "Deploying limine".bold());
Command::new("./limine/limine-deploy")
.arg("./disk.img")
.arg("./target/disk.img")
.status()
.unwrap();
}
@ -261,7 +261,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Setup loopback device for disk.img, with partitions
// FIXME: don't do ths if running without changes
// Setup loop device
let disk_img = File::options().read(true).write(true).open("disk.img")?;
let disk_img = File::options().read(true).write(true).open("./target/disk.img")?;
let dbus_conn = zbus::blocking::Connection::system()?;
let loopdev = udisks::manager::UDisks2ManagerProxyBlocking::new(&dbus_conn)?
.loop_setup(
@ -311,7 +311,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Command::new("qemu-system-x86_64")
.args(["-device", "piix4-ide,id=ide"])
.arg("-drive")
.arg("file=./disk.img,format=raw,if=none,id=disk")
.arg("file=./target/disk.img,format=raw,if=none,id=disk")
.args(["-device", "ide-hd,drive=disk,bus=ide.0"])
// .arg("--nodefaults")
.args(["-cpu", "Broadwell-v3"])
@ -339,7 +339,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Setup loopback device for disk.img, with partitions
// FIXME: don't do ths if running without changes
let disk_img = File::options().read(true).write(true).open("disk.img")?;
let disk_img = File::options().read(true).write(true).open("./target/disk.img")?;
let dbus_conn = zbus::blocking::Connection::system()?;
let loopdev = udisks::manager::UDisks2ManagerProxyBlocking::new(&dbus_conn)?
.loop_setup(
@ -386,7 +386,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Command::new("qemu-system-x86_64")
.args(["-device", "piix4-ide,id=ide"])
.arg("-drive")
.arg("file=./disk.img,format=raw,if=none,id=disk")
.arg("file=./target/disk.img,format=raw,if=none,id=disk")
.args(["-device", "ide-hd,drive=disk,bus=ide.0"])
// .arg("--nodefaults")
.args(["-cpu", "Broadwell-v3"])