tools: sign-image: write remainder of file

During the previous port, we only wrote the first 4096 bytes. Write the
remainder of the file to the destination.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2022-10-26 23:40:09 +08:00
parent 22de2bc614
commit bad8ba5ea2
2 changed files with 3 additions and 5 deletions

View file

@ -1,12 +1,8 @@
use clap::{crate_version, App, Arg};
use std::io::{Error, ErrorKind, Read, Write};
use std::path::Path;
use std::io::{Error, ErrorKind};
use tools::sign_image::{load_pem, sign_file};
use ring::signature::Ed25519KeyPair;
const DEVKEY_PATH: &str = "devkey/dev.key";
const LOADER_VERSION: u32 = 1;
use xous_semver::SemVer;

View file

@ -84,6 +84,8 @@ pub fn sign_image(
source[16778] ^= 0x1 // flip one bit at some random offset
}
dest_file.write_all(&source)?;
Ok(dest_file)
}