> For the complete documentation index, see [llms.txt](https://docs.arkelectron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkelectron.com/products/flight-controller/ark-pi6x-flow/flashing-guide/after-flashing-before-installing.md).

# After Flashing, Before Installing

After flashing the SD/EMMC you must modify the config.txt in order for the ARK Pi6X to function properly.

Edit `config.txt` on the boot partition. On a running Pi it is **/boot/firmware/config.txt** (**/boot/config.txt** before Bookworm).

Comment out the following lines:

```
# Automatically load overlays for detected cameras
# camera_auto_detect=1

# Automatically load overlays for detected DSI displays
# display_auto_detect=1
```

Leave the stock `[cm4]` and `[cm5]` sections in place; they enable the USB port. Add the block for your compute module at the end of the file, after `[all]`. For `/dev/i2c-1`, also add `i2c-dev` to a file in `/etc/modules-load.d/`. The CM5 maps the board's UARTs and cameras differently; see [Compute Module 5](/products/flight-controller/ark-pi6x-flow/hardware.md#compute-module-5).

{% tabs %}
{% tab title="CM4" %}

```
# Turn on uart debug console
enable_uart=1

# General Purpose UART External
dtoverlay=uart3,ctsrts

# Telem2 to FC
dtoverlay=uart4,ctsrts

# Drive FMU_RST_REQ low
gpio=25=op,dl

# Drive USB_OTG_FS_VBUS high to enable FC USB
gpio=27=op,dh

# Drive USB Hub nRESET high. Only needed on Rev 1.
gpio=26=op,dh

# Cameras on CAM0 and CAM1 (CAM1 is the overlay default). Compute modules don't auto-detect
# cameras: use imx708 for Camera Module 3, imx219 for Camera Module 2, imx477 for HQ
dtoverlay=imx708,cam0
dtoverlay=imx708

# Pi I2C1 connector
dtparam=i2c_arm=on

# Fan GPIO
dtoverlay=gpio-fan,gpiopin=19
```

{% endtab %}

{% tab title="CM5" %}

```
# Turn on uart debug console
enable_uart=1

# General Purpose UART External (UART2 on the CM5)
dtoverlay=uart2,ctsrts

# Telem2 to FC (UART3 on the CM5, /dev/ttyAMA3)
dtoverlay=uart3,ctsrts

# Drive FMU_RST_REQ low
gpio=25=op,dl

# Drive USB_OTG_FS_VBUS high to enable FC USB
gpio=27=op,dh

# Drive USB Hub nRESET high. Only needed on Rev 1.
gpio=26=op,dh

# Camera on the CAM1 connector, which is cam0 on the CM5. Compute modules don't auto-detect
# cameras: use imx708 for Camera Module 3, imx219 for Camera Module 2, imx477 for HQ
dtoverlay=imx708,cam0

# Pi I2C1 connector
dtparam=i2c_arm=on

# Fan GPIO
dtoverlay=gpio-fan,gpiopin=19
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.arkelectron.com/products/flight-controller/ark-pi6x-flow/flashing-guide/after-flashing-before-installing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
