You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gen_gmsl_dts: updated README.md and added new json configs
Updated the README.md file with additional and clearer instructions
Added a few new json config files
Signed-off-by: Tudor-Cristea_adi <tudor.cristea@analog.com>
-[Generating the DTS Overlay](#generating-the-dts-overlay)
9
+
-[Usage](#usage)
11
10
-[Applying the Overlay](#applying-the-overlay)
12
11
-[Troubleshooting](#troubleshooting)
13
12
-[References](#references)
@@ -22,26 +21,6 @@ The `gen_gmsl_dts` tool automates the generation of Device Tree Source (DTS) ove
22
21
- Python 3.x installed on the system.
23
22
- Access to the `gen_gmsl_dts` directory within the Analog Devices Linux kernel repository.
24
23
25
-
## Usage
26
-
27
-
1.**Navigate to the Tool Directory:**
28
-
29
-
```bash
30
-
cd linux/arch/arm/boot/dts/overlays/gen_gmsl_dts
31
-
```
32
-
33
-
2.**Prepare Your JSON Configuration:**
34
-
35
-
In `gen_gmsl_dts` folder there are examples of pre defined configuration JSON files for a variety of serializers, deserializers and camera sensors. If none of these suit your usecase one can create a new JSON file (e.g., `gmsl_config.json`). Plsease refer to the [JSON Configuration Parameters](#json-configuration-parameters) section for details.
-`"pool_addrs"`: is the range of addresses that the ATC and assign to the camera device
75
55
76
56
## Example Configuration
@@ -136,29 +116,109 @@ The JSON configuration file defines the GMSL setup. Below are the primary parame
136
116
]
137
117
```
138
118
119
+
### **Note:** The following commands can be run either on the **host machine** or on the **Raspberry Pi**
120
+
121
+
## Usage
122
+
123
+
1.**Navigate to the Tool Directory:**
124
+
125
+
```bash
126
+
cd linux/arch/arm/boot/dts/overlays/gen_gmsl_dts
127
+
```
128
+
129
+
2.**Prepare Your JSON Configuration:**
130
+
131
+
In `gen_gmsl_dts` folder there are examples of pre defined configuration JSON files for a variety of serializers, deserializers and camera sensors. If none of these suit your usecase one can create a new JSON file (e.g., `gmsl_config.json`). Plsease refer to the [JSON Configuration Parameters](#json-configuration-parameters) section for details.
This command will generate a DTS overlay file named `gmsl-overlay.dts` based on your configuration.
140
+
139
141
## Applying the Overlay
140
142
141
143
1.**Compile the DTS Overlay:**
142
144
145
+
a) Running on the **host machine**
146
+
147
+
Run these from the Linux kernel root directory (i.e., `linux/`):
148
+
- For Raspberry Pi 4:
149
+
```bash
150
+
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2711_defconfig
151
+
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs
152
+
```
153
+
- For Raspberry Pi 5:
154
+
```bash
155
+
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2712_defconfig
156
+
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs
157
+
```
158
+
159
+
Alternatively, if the overlay does not contain any dependencies (e.g., `#include` directives), then it can also be compiled, in the `linux/arch/arm/boot/dts/overlays/gen_gmsl_dts` folder, by running:
Run these from the Linux kernel root directory (i.e., `linux/`):
168
+
- For Raspberry Pi 4:
169
+
```bash
170
+
make bcm2711_defconfig
171
+
make dtbs
172
+
```
173
+
- For Raspberry Pi 5:
174
+
```bash
175
+
make bcm2712_defconfig
176
+
make dtbs
177
+
```
178
+
179
+
Alternatively, if [`kdtc`](https://github.com/burtyb/raspberrypi-utils/tree/master/kdtc) is installed on the Raspberry Pi and if the overlay does not contain any dependencies (e.g., `#include` directives), then it can also be compiled, in the `linux/arch/arm/boot/dts/overlays/gen_gmsl_dts` folder, by running:
180
+
181
+
```bash
182
+
kdtc ../gmsl-overlay.dts gmsl.dtbo
183
+
```
184
+
185
+
2. **(Optional) Copy the Overlay from the Host to the Target (Raspberry Pi):**
186
+
187
+
Run this command only if the overlay was NOT compiled on the Raspberry Pi (and assuming that the current folder is `linux/arch/arm/boot/dts/overlays/gen_gmsl_dts`):
188
+
143
189
```bash
144
-
make dtbs
145
-
```
190
+
scp gmsl.dtbo <target:path/to/gmsl_dtbo_dir>
191
+
```
192
+
193
+
Example of `<target:path/to/gmsl_dtbo_dir>`: `analog@analog-gmsl:/home/analog/`
194
+
195
+
### **Note:** The following commands can only be run on the Raspberry Pi
196
+
197
+
3. **Navigate to the Directory Where `gmsl.dtbo` is Located:**
198
+
199
+
```bash
200
+
cd<path/to/gmsl_dtbo_dir>
201
+
```
202
+
203
+
If step 1.a) was followed, then`<path/to/gmsl_dtbo_dir>` should be `/linux/arch/arm/boot/dts/overlays/gen_gmsl_dts`.
204
+
205
+
Otherwise, `<path/to/gmsl_dtbo_dir>` is the same path as the one used at step 2.
146
206
147
-
2.**Copy the Overlay to the Boot Directory:**
207
+
4. **Copy the Overlay to the Boot Directory:**
148
208
149
209
```bash
150
210
sudo cp gmsl.dtbo /boot/overlays/
151
211
```
152
212
153
-
3.**Edit the Boot Configuration:**
213
+
5. **Edit the Boot Configuration:**
154
214
155
-
Add the overlay to your `/boot/config.txt` file:
215
+
Add the overlay to your `/boot/config.txt` file (for example, by using `nano`):
0 commit comments