Repository navigation
snapshot: capture the DeviceTree properties ghw reads - #481
Merged
Merged
Conversation
On a board without DMI, ghw takes the CPU model, the baseboard and chassis information and the U-Boot version from the DeviceTree under /sys/firmware/devicetree/base, but a snapshot captured none of it: a snapshot of a Jetson AGX Orin reported an empty CPU model where the board itself reports nvidia,tegra234. Capture compatible, model, chassis-type and chosen/u-boot,version. Like the MAC addresses, serial-number is left out: it identifies the board. Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
rucoder
added a commit
to zededa/ghw
that referenced
this pull request
Oct 27, 2026
No snapshot had several cache instances at one level without kernel IDs, or a cpu_capacity file: the s390x one has caches without IDs, but its only shared level spans every CPU, so merging distinct instances would go unnoticed, and the x86 ones come from kernels that report no capacity there. linux-arm64-nvidia-jetson-agx-orin is a Jetson AGX Orin on NVIDIA's 5.15 kernel. It reports each cluster of four Cortex-A78AE cores as a package, so core IDs repeat across packages but not within one and are kept; every CPU has capacity 1024, a homogeneous part; and no cache has a kernel ID, so the three L3s, one per cluster, are told apart by the CPUs sharing them. It is a full capture, taken from / in EVE's debug container with this branch's ghwc plus the snapshot fixes of jaypipes#480 and jaypipes#481, so it holds the board's network interfaces and the DeviceTree properties ghw reads (the CPU model comes from compatible). The NVMe namespace's IDs and two app UUIDs in /proc/self/mounts are replaced by fake ones; ghwc reads the same information from it as from the unscrubbed capture, and the same CPU information as from the board. TestARMClusterPackagesSnapshot checks the packages, CPU model, cores, core type, frequency and caches on it. Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
rucoder
added a commit
to zededa/ghw
that referenced
this pull request
Oct 27, 2026
On a board without DMI, ghw takes the CPU model, the baseboard and chassis information and the U-Boot version from the DeviceTree under /sys/firmware/devicetree/base, but a snapshot captured none of it: a snapshot of a Jetson AGX Orin reported an empty CPU model where the board itself reports nvidia,tegra234. Capture compatible, model, chassis-type and chosen/u-boot,version. Like the MAC addresses, serial-number is left out: it identifies the board. Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com> (cherry picked from commit 31d9c94, jaypipes#481)
rucoder
added a commit
to zededa/ghw
that referenced
this pull request
Oct 27, 2026
No snapshot had several cache instances at one level without kernel IDs, or a cpu_capacity file: the s390x one has caches without IDs, but its only shared level spans every CPU, so merging distinct instances would go unnoticed, and the x86 ones come from kernels that report no capacity there. linux-arm64-nvidia-jetson-agx-orin is a Jetson AGX Orin on NVIDIA's 5.15 kernel. It reports each cluster of four Cortex-A78AE cores as a package, so core IDs repeat across packages but not within one and are kept; every CPU has capacity 1024, a homogeneous part; and no cache has a kernel ID, so the three L3s, one per cluster, are told apart by the CPUs sharing them. It is a full capture, taken from / in EVE's debug container with this branch's ghwc plus the snapshot fixes of jaypipes#480 and jaypipes#481, so it holds the board's network interfaces and the DeviceTree properties ghw reads (the CPU model comes from compatible). The NVMe namespace's IDs and two app UUIDs in /proc/self/mounts are replaced by fake ones; ghwc reads the same information from it as from the unscrubbed capture, and the same CPU information as from the board. TestARMClusterPackagesSnapshot checks the packages, CPU model, cores, core type, frequency and caches on it. Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
rucoder
added a commit
to zededa/ghw
that referenced
this pull request
Oct 27, 2026
No snapshot had several cache instances at one level without kernel IDs, or a cpu_capacity file: the s390x one has caches without IDs, but its only shared level spans every CPU, so merging distinct instances would go unnoticed, and the x86 ones come from kernels that report no capacity there. linux-arm64-nvidia-jetson-agx-orin is a Jetson AGX Orin on NVIDIA's 5.15 kernel. It reports each cluster of four Cortex-A78AE cores as a package, so core IDs repeat across packages but not within one and are kept; every CPU has capacity 1024, a homogeneous part; and no cache has a kernel ID, so the three L3s, one per cluster, are told apart by the CPUs sharing them. It is a full capture, taken from / in EVE's debug container with this branch's ghwc plus the snapshot fixes of jaypipes#480 and jaypipes#481, so it holds the board's network interfaces and the DeviceTree properties ghw reads (the CPU model comes from compatible). The NVMe namespace's IDs and two app UUIDs in /proc/self/mounts are replaced by fake ones; ghwc reads the same information from it as from the unscrubbed capture, and the same CPU information as from the board. TestARMClusterPackagesSnapshot checks the packages, CPU model, cores, core type, frequency and caches on it. Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
Signed-off-by: Jay Pipes <jaypipes@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a board without DMI, ghw takes the CPU model, the baseboard and chassis information, and the U-Boot version from the DeviceTree under
/sys/firmware/devicetree/base(pkg/linuxdt). A snapshot captures none of these files. I took a snapshot of a Jetson AGX Orin: it reported an empty CPU model, where the board itself reportsnvidia,tegra234.This adds
compatible,model,chassis-typeandchosen/u-boot,versionto the static snapshot content.serial-numberis left out on purpose: like the MAC addresses, which the snapshot already skips, it identifies the board.TestCloneDeviceTreebuilds a DeviceTree in a scratch root, clones it with the snapshot's own patterns, and readsModel,Vendor,SoC,ChassisTypeandUBootVersionfrom the clone and from the source. It requires the same results from both, and requires that the clone has no serial number. On main every value read from the clone isunknown.