My understanding is that the kernel understands how to communicate with the different hardware in a system via specific device trees.
How is it that I can download one version of Ubuntu and I am able to install this on any system where the hardware may vary?
The same goes for the BeagleBone embedded boards. There is a default Debian image which can flash to any of the different type of BeagleBone boards which have different peripherals. How does it know which device tree / device tree overlay to use when the same image works for all?