aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/devicetree.bbclass
AgeCommit message (Collapse)Author
2018-09-12devicetree.bbclass: don't pad DT overlaysLuca Ceresoli
By default the devicetree class adds padding to the generated .dtb files, which can be needed by the bootloader. However it also pads .dtbo files, which is not useful. Don't apply padding to the overlay devicetrees. To achieve this: * move "-p ${DT_PADDING_SIZE}" to a new variable, DTB_BFLAGS (B for "base") * add "-p 0" to DTC_OFLAGS to disable padding for overlays Cc: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-08devicetree.bbclass: User/BSP device tree source compilation classNathan Rossi
This bbclass implements the device tree compilation for user provided device trees. In order to use this class, it should be inherited in a BSP recipe which provides the sources. The default setup enables inclusion of kernel device tree sources (though can be disabled by the recipe by overriding DT_INCLUDE or KERNEL_INCLUDE). This provides an additional mechanism for BSPs to provide device trees and device tree overlays for their target machines. Whilst still enabling access to the kernel device trees for base SoC includes and headers. This approach to providing device trees has benefits for certain use cases over patching the device trees into the kernel source. * device trees are separated from kernel source, allows for selection of kernel and or kernel versions without needing to explicitly patch the kernel (or appending to the kernel recipes). * providing device trees from separate sources, from the layer, generated by the recipe or other recipes. This class also implements some additional features that are not available in the kernel-devicetree flow. This includes population of device tree blobs into the sysroot which allows for other recipes to consume built dtbs (e.g. U-Boot with EXT_DTB compilation), device tree overlay compilation and customizing DTC compilation args (boot cpu/padding/etc.). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Acked-by: Martin Hundebøll <mnhu@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>