Skip to content
This repository was archived by the owner on Feb 27, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,35 @@
# bazel test //:rustfmt-all
# bazel test //:test-all

load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_clippy", "rust_doc", "rust_test", "rustfmt_test")
load("//:objcopy.bzl", "objcopy_to_object")
load("//:lds.bzl", "lds_rule")

bool_flag(
name = "enable_unsafe_enhanced_allocation",
build_setting_default = 0,
)

config_setting(
name = "unsafe_enhanced_allocation",
flag_values = {
"enable_unsafe_enhanced_allocation": "true",
},
)

bool_flag(
name = "enable_hardware_ad_updates",
build_setting_default = 1,
)

config_setting(
name = "hardware_ad_updates",
flag_values = {
"enable_hardware_ad_updates": "true",
},
)

filegroup(
name = "salus-all",
srcs = [
Expand Down Expand Up @@ -191,6 +216,10 @@ rust_binary(
"-Clink-arg=-T$(location //:l_rule)",
],
deps = salus_deps,
crate_features = select({
":hardware_ad_updates": ["hardware_ad_updates"],
"//conditions:default": [],
}),
)

rust_clippy(
Expand Down
2 changes: 2 additions & 0 deletions device-tree/src/device_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pub struct DeviceTreeNode {
}

pub type NodeArena = Arena<DeviceTreeNode, Global>;

/// An ID for a device tree node. The node itself can be obtained via `DeviceTree::get_node`.
pub type NodeId = ArenaId<DeviceTreeNode>;

/// A tree representation of the hardware in a system based on v0.3 of the Devicetree Specification.
Expand Down
2 changes: 1 addition & 1 deletion device-tree/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mod error;
mod fdt;
mod serialize;

pub use crate::device_tree::{DeviceTree, DeviceTreeIter, DeviceTreeNode};
pub use crate::device_tree::{DeviceTree, DeviceTreeIter, DeviceTreeNode, NodeId};
pub use error::Error as DeviceTreeError;
pub use error::Result as DeviceTreeResult;
pub use fdt::{Cpu, Fdt, FdtMemoryRegion, ImsicInfo};
Expand Down
7 changes: 7 additions & 0 deletions drivers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ rust_library(
"@salus-index//:static_assertions",
"@salus-index//:tock-registers",
],
crate_features = select({
"//:unsafe_enhanced_allocation": ["unsafe_enhanced_allocation"],
"//conditions:default": [],
}) + select({
"//:hardware_ad_updates": ["hardware_ad_updates"],
"//conditions:default": [],
}),
)

rust_clippy(
Expand Down
Loading