Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:guide-developer:defining-firmware-partitions [2019/02/12 22:30] jeffdocs:guide-developer:defining-firmware-partitions [2020/04/20 16:25] (current) – you still need mtd splitting, just not the original one karlp
Line 1: Line 1:
-===== Device Tree Usage in OpenWrt =====+====== Device Tree Usage in OpenWrt (DTS) ======
  
 Current development (2019) uses kernel based on Device Tree (DT) files (.dts, .dtsi, .dtb) rather than the older "mach" files. Current development (2019) uses kernel based on Device Tree (DT) files (.dts, .dtsi, .dtb) rather than the older "mach" files.
Line 5: Line 5:
 This page tries to pull together some of the knowledge about DT usage and conventions used by the OpenWrt project. This page tries to pull together some of the knowledge about DT usage and conventions used by the OpenWrt project.
  
-==== References ====+===== References =====
  
   * https://elinux.org/Device_Tree_Reference   * https://elinux.org/Device_Tree_Reference
Line 17: Line 17:
   * https://github.com/devicetree-org/devicetree-specification/blob/master/source/source-language.rst   * https://github.com/devicetree-org/devicetree-specification/blob/master/source/source-language.rst
  
-==== General ====+===== General =====
  
-Use tab indentation -- see also https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst+Use c-style ''#include'' instead of DT-specific ''/include/''
  
-While upstreamarchitecture-specific .dtsi files //may// remain stable (such as ''qcom-ipq4019.dtsi''), board-specific files may change, causing breakage to specific devices. At least if, for example, the generic IPQ4019 .dtsi changes, there is a chance that it would be seen quickly by or more of the boards that use that SoC.+If possiblelicense the content as ''%%// SPDX-License-Identifier: GPL-2.0-or-later OR MIT%%''
  
 +Use tab indentation -- see also https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst
  
 +While upstream, architecture-specific .dtsi files //may// remain stable (such as ''qcom-ipq4019.dtsi''), board-specific files (such as ''qcom-ipq4019-ap.dk07.1.dtsi'') may change, causing breakage to specific devices, perhaps just one, that may go unnoticed. At least if, for example, the generic IPQ4019 .dtsi changes, there is a chance that it would be seen quickly by or more of the boards that use that SoC.
  
-==== Defining software partitions in all DTS targets ====+ 
 +===== Defining software partitions in all DTS targets =====
  
 Partition nodes should be named ''partition@<start address>'' Partition nodes should be named ''partition@<start address>''
Line 33: Line 36:
 The MTD labels of "firmware" and "ubi" have special meaning to the OpenWrt kernel. The MTD labels of "firmware" and "ubi" have special meaning to the OpenWrt kernel.
  
-See below on supplying the proper "compatible" label so that the OpenWrt kernel can properly "split" the partition and ''CONFIG_MTD_SPLIT_FIRMWARE'' is not needed.+See below on supplying the proper "compatible" label so that the OpenWrt kernel can properly "split" the partition and ''CONFIG_MTD_SPLIT_FIRMWARE'' is not needed. (note that ''CONFIG_MTD_SPLIT_UIMAGE_FW'' is still required!)
  
 <WRAP center round info 80%> <WRAP center round info 80%>
Line 46: Line 49:
  
 I'd like all DTS supported devices to use that "compatible" and disable CONFIG_MTD_SPLIT_FIRMWARE eventually. I'd like all DTS supported devices to use that "compatible" and disable CONFIG_MTD_SPLIT_FIRMWARE eventually.
 +
 +//Wiki note: This objective may be a challenge for dual-firmware units as the partition to be split will be different depending on which was selected by the boot loader.//
  
 1) Default uimage\\ 1) Default uimage\\
  • Last modified: 2019/02/12 22:30
  • by jeff