-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.rs
42 lines (37 loc) · 1.08 KB
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use std::process::Command;
fn main() {
println!("cargo:rerun-if-changed=decrypt_shellcode/");
println!("cargo:rerun-if-changed=scsi_shellcode/");
Command::new("cargo")
.arg("build")
.arg("--release")
.arg("--target")
.arg("thumbv6m-none-eabi")
.current_dir("./decrypt_shellcode/")
.status()
.unwrap();
Command::new("arm-none-eabi-objcopy")
.arg("-O")
.arg("binary")
.arg("target/thumbv6m-none-eabi/release/scsi_shellcode")
.arg("scsi-stub.bin")
.current_dir("./decrypt_shellcode/")
.status()
.unwrap();
Command::new("cargo")
.arg("build")
.arg("--release")
.arg("--target")
.arg("thumbv6m-none-eabi")
.current_dir("./scsi_shellcode/")
.status()
.unwrap();
Command::new("arm-none-eabi-objcopy")
.arg("-O")
.arg("binary")
.arg("target/thumbv6m-none-eabi/release/scsi_shellcode")
.arg("scsi-stub.bin")
.current_dir("./scsi_shellcode/")
.status()
.unwrap();
}