Skip to content
Closed
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
17 changes: 11 additions & 6 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,23 @@ sign-dev VERSION CONFIG_PATH=env_var_or_default("COSIGN_TOML_PATH", "~/cosign2.t
@echo "Signing all files for version {{VERSION}} with config {{CONFIG_PATH}}"
cargo run --manifest-path tools/signer/Cargo.toml -- sign-files --developer {{VERSION}} {{CONFIG_PATH}}

# Sign individual files with the provided key
sign-dev-bl VERSION CONFIG_PATH=env_var_or_default("COSIGN_TOML_PATH", "~/cosign2.toml"):
@echo "Signing all files for version {{VERSION}} with config {{CONFIG_PATH}}"
cargo run --manifest-path tools/signer/Cargo.toml -- sign-files --developer --sign-bootloader {{VERSION}} {{CONFIG_PATH}}

# Create tar file (only when all files have two signatures)
create-tar VERSION:
create-tar VERSION CONFIG_PATH=env_var_or_default("COSIGN_TOML_PATH", "~/cosign2.toml"):
@echo "Creating tar file for version {{VERSION}}"
cargo run --manifest-path tools/signer/Cargo.toml -- create-tar {{VERSION}}
cargo run --manifest-path tools/signer/Cargo.toml -- create-tar {{VERSION}} {{CONFIG_PATH}}

create-recovery-tar VERSION:
create-recovery-tar VERSION CONFIG_PATH=env_var_or_default("COSIGN_TOML_PATH", "~/cosign2.toml"):
@echo "Creating recovery tar file for version {{VERSION}}"
cargo run --manifest-path tools/signer/Cargo.toml -- create-tar {{VERSION}} --recovery
cargo run --manifest-path tools/signer/Cargo.toml -- create-tar {{VERSION}} {{CONFIG_PATH}} --recovery

create-recovery-tar-dev VERSION:
create-recovery-tar-dev VERSION CONFIG_PATH=env_var_or_default("COSIGN_TOML_PATH", "~/cosign2.toml"):
@echo "Creating recovery tar file for version {{VERSION}} (one signature)"
cargo run --manifest-path tools/signer/Cargo.toml -- create-tar {{VERSION}} --recovery --allow-one-signature
cargo run --manifest-path tools/signer/Cargo.toml -- create-tar {{VERSION}} {{CONFIG_PATH}} --recovery --allow-one-signature

# Sign the tar file with the provided key
sign-tar VERSION CONFIG_PATH=env_var_or_default("COSIGN_TOML_PATH", "~/cosign2.toml"):
Expand Down
4 changes: 2 additions & 2 deletions tools/image-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ fn create_system_partition(file: &mut File, version_folder: &str) -> Result<()>
.write_all(&fs::read(&app_bin_path)?)?;

// Copy apps directory if it exists
let apps_dir_path = format!("{}/apps", version_folder);
let apps_dir_path = format!("{}/keyos/apps", version_folder);
if Path::new(&apps_dir_path).exists() {
println!(" {} Copying apps directory", "→".blue());
let apps_dir_disk = fs.root_dir().create_dir("apps")?;
Expand Down Expand Up @@ -488,7 +488,7 @@ fn print_hashes(version_folder: &str, is_production: bool) -> Result<()> {
print_digest_of_cosigned_file("recovery image", Path::new(&recovery_bin_path))?;

// Print app hashes if apps directory exists
let apps_dir_path = format!("{}/apps", version_folder);
let apps_dir_path = format!("{}/keyos/apps", version_folder);
if Path::new(&apps_dir_path).exists() {
for entry in fs::read_dir(&apps_dir_path)? {
let app_dir = entry?;
Expand Down
Loading