@@ -94,6 +94,47 @@ second string, this isn't as good a match as ``fdt1``.
94
94
In U-Boot this algorithm is handled by ``fit_conf_find_compat() `` and enabled
95
95
by the ``CONFIG_FIT_BEST_MATCH `` option.
96
96
97
+ Sometime models have multiple PCB revisions or different minor variants, often
98
+ referred to as SKUs. For this reason, bootloaders may want to select
99
+ configurations in a finer-grained way. In this case, rather than using the
100
+ compatible stringlist in its devicetree, if any, it constructs a single string
101
+ using the base name along with any available suffixes, each beginning with a
102
+ hyphen. The best match algorithm is then run using that string.
103
+
104
+ The following compatible-string suffixes may be used to this end. They must be
105
+ provided in this order (<n> is an integer >= 0):
106
+
107
+ ``-rev<n> ``
108
+ Board revision number, typically referring to a revision of the PCB to fix
109
+ a problem or adjust component selection. The intention is that the board is
110
+ the same design, just with some minor fixes or improvements. The first
111
+ revision is typically ``rev0 ``.
112
+
113
+ ``-sku<n> ``
114
+ Board variant, called a SKU (Stock-Keeping Unit) which is a unique code that
115
+ identifies a model variant. This may encode differences in the display,
116
+ WiFi and the like, but where the same PCB design (and revision) is used.
117
+ The base SKU is typically ``sku0 ``.
118
+
119
+ Examples::
120
+
121
+ compatible = "google,kevin-rev15";
122
+ compatible = "google,kevin-rev15-sku2";
123
+
124
+ When matching, the bootloader should build the most specific string it can using
125
+ any available revision / SKU information, then try to match that. If the most
126
+ specific string fails (e.g. ``"google,kevin-rev15-sku2" ``), it should fall back
127
+ to just ``"google,kevin-rev15" `` and then ``"google,kevin-sku2" ``. If nothing
128
+ matches, then it should try without any additions, i.e. ``"google,kevin" ``.
129
+
130
+ This multi-stage process uses the same 'best match' approach as above. Each
131
+ attempt finds the best match given the compatible string being searched. Where
132
+ a stage does not find any match, the next stage begins. As soon as a match is
133
+ found, searching stops, using the best match found in the stage.
134
+
135
+ Other suffixes may be added in future.
136
+
137
+
97
138
Load the images from the selected configuration
98
139
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99
140
0 commit comments