Skip to content

Commit cb0b519

Browse files
committed
deprecate ImageHeader version and epoch
1 parent db85c0b commit cb0b519

File tree

17 files changed

+319
-132
lines changed

17 files changed

+319
-132
lines changed

Cargo.lock

Lines changed: 285 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,14 @@ zip = { version = "0.6", default-features = false, features = ["bzip2"] }
120120
# Oxide forks and repos
121121
attest-data = { git = "https://github.com/oxidecomputer/dice-util", default-features = false, version = "0.2.0" }
122122
dice-mfg-msgs = { git = "https://github.com/oxidecomputer/dice-util", default-features = false, version = "0.2.1" }
123-
#gateway-messages = { git = "https://github.com/oxidecomputer/management-gateway-service", default-features = false, features = ["smoltcp"] }
124-
# XXX fix before push
125-
gateway-messages = { path = "/home/stoltz/Oxide/src/mgs/epoch/gateway-messages", default-features = false, features = ["smoltcp"] }
123+
gateway-messages = { git = "https://github.com/oxidecomputer/management-gateway-service", default-features = false, features = ["smoltcp"] }
126124
gimlet-inspector-protocol = { git = "https://github.com/oxidecomputer/gimlet-inspector-protocol", version = "0.1.0" }
127125
hif = { git = "https://github.com/oxidecomputer/hif", default-features = false }
128126
humpty = { git = "https://github.com/oxidecomputer/humpty", default-features = false, version = "0.1.3" }
129-
#hubtools = { git = "https://github.com/oxidecomputer/hubtools", default-features = false, version = "0.4.1" }
130-
# XXX fix before push
131-
# hubtools = { git = "https://github.com/oxidecomputer/hubtools", default-features = false, branch = "epoch", version = "0.4.7" }
132-
hubtools = { path = "/home/stoltz/Oxide/src/hubtools/epoch/hubtools" }
127+
hubtools = { git = "https://github.com/oxidecomputer/hubtools", default-features = false, version = "0.4.7" }
133128
idol = { git = "https://github.com/oxidecomputer/idolatry.git", default-features = false }
134129
idol-runtime = { git = "https://github.com/oxidecomputer/idolatry.git", default-features = false }
135-
#lpc55_sign = { git = "https://github.com/oxidecomputer/lpc55_support", default-features = false }
136-
lpc55_sign = { path = "/home/stoltz/Oxide/src/lpc55_support/lpc55_sign", default-features = false }
130+
lpc55_sign = { git = "https://github.com/oxidecomputer/lpc55_support", default-features = false }
137131
ordered-toml = { git = "https://github.com/oxidecomputer/ordered-toml", default-features = false }
138132
pmbus = { git = "https://github.com/oxidecomputer/pmbus", default-features = false }
139133
salty = { version = "0.3", default-features = false }

app/gimlet/base.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ chip = "../../chips/stm32h7"
33
memory = "memory-large.toml"
44
stacksize = 896
55
fwid = true
6-
epoch = 0
76

87
[kernel]
98
name = "gimlet"

app/gimletlet/base-gimletlet2.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ target = "thumbv7em-none-eabihf"
33
chip = "../../chips/stm32h7"
44
memory = "memory-large.toml"
55
stacksize = 896
6-
epoch = 0
7-
version = 0
86
fwid = true
97

108
[kernel]

app/grapefruit/app.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ target = "thumbv7em-none-eabihf"
44
chip = "../../chips/stm32h7"
55
memory = "memory-large.toml"
66
stacksize = 896
7-
epoch = 0
8-
version = 0
97
fwid = true
108

119
[kernel]

app/oxide-rot-1/app-dev.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ board = "oxide-rot-1"
44
chip = "../../chips/lpc55"
55
stacksize = 1024
66
image-names = ["a", "b"]
7-
epoch = 0
8-
version = 0
97
fwid = true
108

119
[kernel]

app/oxide-rot-1/app.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ board = "oxide-rot-1"
44
chip = "../../chips/lpc55"
55
stacksize = 1024
66
image-names = ["a", "b"]
7-
epoch = 0
8-
version = 0
97
fwid = true
108

119
[kernel]

app/rot-carrier/app.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ board = "rot-carrier-2"
44
chip = "../../chips/lpc55"
55
stacksize = 1024
66
image-names = ["a", "b"]
7-
epoch = 0
8-
version = 0
97
fwid = true
108

119
[kernel]

build/xtask/src/config.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ struct RawConfig {
2424
board: String,
2525
chip: String,
2626
#[serde(default)]
27-
epoch: u32,
28-
#[serde(default)]
29-
version: u32,
30-
#[serde(default)]
3127
fwid: bool,
3228
memory: Option<String>,
3329
#[serde(default)]
@@ -50,8 +46,6 @@ pub struct Config {
5046
pub target: String,
5147
pub board: String,
5248
pub chip: String,
53-
pub epoch: u32,
54-
pub version: u32,
5549
pub fwid: bool,
5650
pub image_names: Vec<String>,
5751
pub signing: Option<RoTMfgSettings>,
@@ -174,8 +168,6 @@ impl Config {
174168
board: toml.board,
175169
image_names: img_names,
176170
chip: toml.chip,
177-
epoch: toml.epoch,
178-
version: toml.version,
179171
fwid: toml.fwid,
180172
signing: toml.signing,
181173
stacksize: toml.stacksize,
@@ -254,11 +246,6 @@ impl Config {
254246
let task_names =
255247
self.tasks.keys().cloned().collect::<Vec<_>>().join(",");
256248
env.insert("HUBRIS_TASKS".to_string(), task_names);
257-
env.insert(
258-
"HUBRIS_BUILD_VERSION".to_string(),
259-
format!("{}", self.version),
260-
);
261-
env.insert("HUBRIS_BUILD_EPOCH".to_string(), format!("{}", self.epoch));
262249
env.insert("HUBRIS_BOARD".to_string(), self.board.to_string());
263250
env.insert(
264251
"HUBRIS_APP_TOML".to_string(),

build/xtask/src/dist.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ fn build_kernel(
12511251
/// Returns true if the header was found and updated,
12521252
/// false otherwise.
12531253
fn update_image_header(
1254-
cfg: &PackageConfig,
1254+
_cfg: &PackageConfig,
12551255
input: &Path,
12561256
output: &Path,
12571257
map: &IndexMap<String, Range<u32>>,
@@ -1290,16 +1290,8 @@ fn update_image_header(
12901290
// `xtask build kernel`, we need a result from this calculation
12911291
// but `end` will be `None`. Substitute a placeholder:
12921292
let end = end.unwrap_or(flash.start);
1293-
12941293
let len = end - flash.start;
1295-
1296-
let header = abi::ImageHeader {
1297-
version: cfg.toml.version,
1298-
epoch: cfg.toml.epoch,
1299-
magic: abi::HEADER_MAGIC,
1300-
total_image_len: len,
1301-
..Default::default()
1302-
};
1294+
let header = abi::ImageHeader::new(len);
13031295

13041296
header
13051297
.write_to_prefix(

0 commit comments

Comments
 (0)