Skip to content

Commit 013d690

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

File tree

4 files changed

+679
-5
lines changed

4 files changed

+679
-5
lines changed

Cargo.toml

+2-2
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

+2-2
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

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ use structopt::StructOpt;
3232
mod static_config;
3333
use amd_flash::allocators::{ArenaFlashAllocator, FlashAllocate};
3434

35+
mod serializers;
36+
use serializers::DummySerializer;
37+
3538
use amd_flash::{
3639
ErasableLocation, ErasableRange, FlashAlign, FlashRead, FlashWrite,
3740
Location,
@@ -699,11 +702,14 @@ fn dump_bhd_directory<'a, T: FlashRead + FlashWrite>(
699702
)
700703
.unwrap();
701704

705+
let apcb_options = ApcbIoOptions::builder()
706+
.with_check_checksum(false)
707+
.build();
702708
let apcb = Apcb::load(
703709
std::borrow::Cow::Borrowed(
704710
&mut apcb_buffer[..],
705711
),
706-
&ApcbIoOptions::default(),
712+
&apcb_options,
707713
)
708714
.unwrap();
709715
apcb.validate(None).unwrap(); // TODO: abl0 version ?

0 commit comments

Comments
 (0)