Open Firmware - dts file
David Gibson
david at gibson.dropbear.id.au
Fri Aug 3 15:22:08 EST 2007
On Thu, Aug 02, 2007 at 12:21:21PM -0700, Siva Prasad wrote:
> Hi,
>
> I am trying to understand ..
>
> 1) How a given dts file is embedded into the zImage (how about vmlinux?)
The arch/powerpc/boot/wrapper script builds the dts into a device tree
blob using dtc (the Device Tree Compiler), it then folds the binary
device tree into a special section in the zImage.
> 2) Where does it get stored for later access during booting?
The zImage, possibly after adjusting the device tree based on
information from the firmware, passes the address of the tree to the
kernel as it invokes it. The kernel adds the device tree address (as
well as any further ranges specified in the device tree blob) to its
internal list of reserved addresses so it won't clobber it with other
allocations.
> 3) How a specific dts file out of the available in /boot/dts directory
> is chosen?
Depending on the Kconfig, different Makefile targets will be
selected. Those targets then invoke the wrapper script with different
options, including different dts files into the zImage.
> I am a newbie to this open firmware thing and looking for the right
> pointer to get started.
Ok.. do understand that on systems with a full open firmware
implementation a dts won't generally be used at all. Instead the
kernel will read the device tree information from open firmware itself
and convert it directly into a device tree blob (which will later be
unpacked into the run-time device tree structure).
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
More information about the Linuxppc-dev
mailing list