dtc,petitboot: Sort device tree properties by unit number

Currently, dtc will output nodes unordered, which may cause issues when
assigning CPU numbers to NUMA nodes.

This change incorporates a pre-kexec hook to sort the device tree, and
a fix for dtc to order nodes by their unit number, to get a proper
sort ordering.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2 files changed