mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
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:
parent
22de2bc614
commit
bad8ba5ea2
2 changed files with 3 additions and 5 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue