Page MenuHomeFreeBSD

fdt: Expose the model, compatible and freebsd dts brandind as sysctl
ClosedPublic

Authored by manu on Jul 17 2021, 3:20 PM.

Details

Summary

This make it easier for script to get the hardware on which they are running.

MFC after: 1 month
Sponsored by: Diablotin Systems

Test Plan

root@nanopi-m1-plus:~ # sysctl hw.fdt
hw.fdt.freebsd-version: 5.13
hw.fdt.compatible: friendlyarm,nanopi-m1-plus allwinner,sun8i-h3
hw.fdt.model: FriendlyArm NanoPi M1 Plus

root@:/ # sysctl hw.fdt
hw.fdt.freebsd-version: 5.13
hw.fdt.compatible: pine64,sopine-baseboard pine64,sopine allwinner,sun50i-a64
hw.fdt.model: SoPine with baseboard

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

manu requested review of this revision.Jul 17 2021, 3:20 PM
manu added reviewers: ARM, arm64, nwhitehorn.

Very nice. I've had a hack that's a crude version of this in my tree from a while ago, but had let it go stale for lack of time to do all the things I want.

This revision is now accepted and ready to land.Jul 17 2021, 3:23 PM