Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ jobs:
targets: ${{ matrix.targets }}
- uses: Swatinem/rust-cache@v2
- name: Install qemu
run: sudo apt install qemu-system-aarch64 -y
- run: sudo apt install u-boot-tools -y
run: |
sudo apt-get update
sudo apt install qemu-system-aarch64 -y
sudo apt install u-boot-tools -y
- name: Install lib libudev-dev
run: sudo apt install libudev-dev -y
- name: Check rust version
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jkconfig/tests/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn test_object() {

#[test]
fn test_value() {
env_logger::builder().is_test(true).init();
let _ = env_logger::builder().is_test(true).try_init();

let schema = schema_for!(AnimalObject);

Expand Down
2 changes: 1 addition & 1 deletion ostool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
name = "ostool"
readme = "../README.md"
repository = "https://github.com/ZR233/ostool"
version = "0.8.3"
version = "0.8.4"

[[bin]]
name = "ostool"
Expand Down
21 changes: 18 additions & 3 deletions ostool/src/bin/cargo-osrun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{env, path::PathBuf, process::exit};
use clap::{Parser, Subcommand};
use log::{LevelFilter, debug};
use ostool::{
ctx::AppContext,
ctx::{AppContext, OutputConfig, PathConfig},
run::{
qemu,
uboot::{self, RunUbootArgs},
Expand Down Expand Up @@ -53,6 +53,12 @@ struct RunnerArgs {
#[arg(allow_hyphen_values = true)]
/// Arguments to be run
runner_args: Vec<String>,

#[arg(long)]
build_dir: Option<String>,

#[arg(long)]
bin_dir: Option<String>,
}

#[derive(Debug, Subcommand, Clone)]
Expand Down Expand Up @@ -90,9 +96,18 @@ async fn main() -> anyhow::Result<()> {
Err(_) => manifest_dir.clone(),
};

let bin_dir: Option<PathBuf> = args.bin_dir.map(PathBuf::from);
let build_dir: Option<PathBuf> = args.build_dir.map(PathBuf::from);

let output_config = OutputConfig { build_dir, bin_dir };

let mut app = AppContext {
workspace_folder,
manifest_dir,
paths: PathConfig {
workspace: workspace_folder,
manifest: manifest_dir,
config: output_config,
..Default::default()
},
..Default::default()
};

Expand Down
Loading