summaryrefslogtreecommitdiffstats
path: root/meta/classes/devicetree.bbclass
AgeCommit message (Collapse)Author
2022-08-12classes: Update classes to match new bitbake class scope functionalityRichard Purdie
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add SPDX license identifiersRichard Purdie
As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. (From OE-Core rev: 081a391fe09a21265881e39a2a496e4e10b4f80b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add copyright statements to files without oneRichard Purdie
Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present. (From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-01meta, meta-selftest: Replace more non-SPDX license identifiersPeter Kjellerstedt
In commit ceda3238 (meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers) all LICENSE variables were updated to only use SPDX license identifiers. This does the same for comments and other variables where it is appropriate to use the official SPDX license identifiers. There are still references to, e.g., "GPLv3", but they are then typically in descriptive text where they refer to the license in a generic sense. (From OE-Core rev: 165759dced7fbe73b1db2ede67047896071dc6d0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie
license identifiers An automated conversion using scripts/contrib/convert-spdx-licenses.py to convert to use the standard SPDX license identifiers. Two recipes in meta-selftest were not converted as they're that way specifically for testing. A change in linux-firmware was also skipped and may need a more manual tweak. (From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-21recipes: Update common-licenses references to match new namesRichard Purdie
The licenses were renamed to match their SPDX names, fix the references in LIC_FILES_CHKSUM in OE-Core. (From OE-Core rev: 9af48917cfe583d2db9e1e088c7e396fcf638949) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-14devicetree.bbclass: include symbols in base DTAlex Kiernan
When processing overlays, the base device tree must be compiled with symbols, otherwise attempting to apply overlays in U-Boot will fail with: failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND base fdt does did not have a /__symbols__ node make sure you've compiled with -@ (From OE-Core rev: d075e39c05ace6dad2c66a5e8c4b1e75aa751b6a) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-14devicetree.bbclass: Combine stderr into stdout to see actual dtc errorJaewon Lee
Previously the subprocess command to run dtc was not properly displaying the error on console. Combining stderr into stdout for the dtc subprocess so the actual error can be seen on console without having to open the do_compile log. For example, previously on a dtc error, just the following stack trace and dtc command was being shown on console: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:devicetree_do_compile(d) 0003: File: function: devicetree_do_compile 0127: if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)): 0128: continue # skip non-.dts files and non-overlay files 0129: except: 0130: continue # skip if can't determine if overlay *** 0131: devicetree_compile(dtspath, includes, d) ... Exception: subprocess.CalledProcessError: Command '['dtc', '-R', '8', '-b', '0', '-p', '0x1000', '-i', '${INCLUDES}, '-o', 'system-top.dtb', '-I', 'dts', '-O', 'dtb', 'system-top.dts.pp']' returned non-zero exit status 1 with this patch, the actual error from the dtc command will be appended like the following: Subprocess output: Error: Label or path not found FATAL ERROR: Syntax error parsing input tree (From OE-Core rev: 1da43a558ffd5040a1b5aaebfc1c5118f5e59c01) Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-09device-tree.bbclass: Add support to compile overlays separatelyJaewon Lee
Currently only dts files are considered when looping through files to compile. Modifying the loop to compile other files that are overlays. Also surrounding this check with a try block as the function to find overlays parses the file for a '/plugin/' tag, and there may be files in the DT_FILES_PATH directory that are not parseable. (From OE-Core rev: bb1629820443bfedc72378a7c88f0656a2f3f7f1) Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-25devicetree.bbclass: Add virtual provider for dtbManjukumar Matha
Add virtual provider for dtb. This class can be used to generate dtb from static devicetree, for reference see meta-xilinx layer meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb By providing a virtual provider we can use it to differentiate between in-kernel dtb or an external one. This can be set in local.conf as PREFERRED_PROVIDER_virtual/dtb = "devicetree" (From OE-Core rev: a7d52dbffd0da95de82d910c595a6c27d9b2ad0d) Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-13devicetree.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> (From OE-Core rev: 678fe8c66b19f141f6869859cf365aec037e89d9) 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.). (From OE-Core rev: 3874c3859c3515fc8440fa9e776a02ad6ff3135c) 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>