Skip to content

Commit 482151e

Browse files
committed
Use Permissive Serializers in order to collect errors without fail.
1 parent 5f9cc71 commit 482151e

File tree

4 files changed

+677
-5
lines changed

4 files changed

+677
-5
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ edition = "2018"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
amd-apcb = { git = "https://github.com/oxidecomputer/amd-apcb.git", tag = "v0.1.5", features = ["std", "serde", "schemars"] }
11-
amd-efs = { git = "ssh://[email protected]/oxidecomputer/amd-efs.git", tag = "v0.3.0", features = ["std", "serde", "schemars"] }
10+
amd-apcb = { git = "https://github.com/oxidecomputer/amd-apcb.git", branch = "issue-113", features = ["std", "serde", "schemars"] }
11+
amd-efs = { git = "ssh://[email protected]/oxidecomputer/amd-efs.git", branch = "issue-99", features = ["std", "serde", "schemars"] }
1212
amd-flash = { git = "ssh://[email protected]/oxidecomputer/amd-flash.git", tag = "v0.2.1", features = ["std"] }
1313
goblin = { version = "0.4", features = ["elf64", "endian_fd"] }
1414
#serde = { version = "1.0", default-features = false, features = ["derive"] }

amd-host-image-builder-config/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ edition = "2018"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
amd-apcb = { git = "https://github.com/oxidecomputer/amd-apcb.git", tag = "v0.1.5", features = ["std", "serde", "schemars"] }
10-
amd-efs = { git = "ssh://[email protected]/oxidecomputer/amd-efs.git", tag = "v0.3.0", features = ["std", "serde", "schemars"] }
9+
amd-apcb = { git = "https://github.com/oxidecomputer/amd-apcb.git", branch = "issue-113", features = ["std", "serde", "schemars"] }
10+
amd-efs = { git = "ssh://[email protected]/oxidecomputer/amd-efs.git", tag = "issue-99", features = ["std", "serde", "schemars"] }
1111
amd-flash = { git = "ssh://[email protected]/oxidecomputer/amd-flash.git", tag = "v0.2.1", features = ["std"] }
1212
schemars = "0.8.8"
1313
serde = { version = "1.0", default-features = false, features = ["derive"] }

src/main.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use std::collections::HashSet;
2121
use std::fs;
2222
use std::fs::File;
2323
use std::io::stdout;
24+
use std::io::stdout;
2425
use std::io::BufReader;
2526
use std::io::Read;
2627
use std::io::Seek;
@@ -32,6 +33,9 @@ use structopt::StructOpt;
3233
mod static_config;
3334
use amd_flash::allocators::{ArenaFlashAllocator, FlashAllocate};
3435

36+
mod serializers;
37+
use serializers::DummySerializer;
38+
3539
use amd_flash::{
3640
ErasableLocation, ErasableRange, FlashAlign, FlashRead, FlashWrite,
3741
Location,
@@ -699,11 +703,14 @@ fn dump_bhd_directory<'a, T: FlashRead + FlashWrite>(
699703
)
700704
.unwrap();
701705

706+
let apcb_options = ApcbIoOptions::builder()
707+
.with_check_checksum(false)
708+
.build();
702709
let apcb = Apcb::load(
703710
std::borrow::Cow::Borrowed(
704711
&mut apcb_buffer[..],
705712
),
706-
&ApcbIoOptions::default(),
713+
&apcb_options,
707714
)
708715
.unwrap();
709716
apcb.validate(None).unwrap(); // TODO: abl0 version ?

0 commit comments

Comments
 (0)