> For the complete documentation index, see [llms.txt](https://book.ferro.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.ferro.pro/openwrt/boot.md).

# boot

* [BL2/FIP](#bl2fip)
* [MTD](#mtd)
* [uboot](#uboot)
* [cmd](#cmd)
* [Breed](#breed)

## BL2/FIP

<https://trustedfirmware-a.readthedocs.io/en/latest/design/firmware-design.html>

* Boot Loader stage 1 (BL1) AP Trusted ROM
* Boot Loader stage 2 (BL2) Trusted Boot Firmware
* Firmware Image Package

## MTD

calc HEX -> DEC ： 00400000 = 4MiB 06f00000 = 111MiB

```
cat /proc/mtd
fw_printenv | grep mtdparts

mtd write .fip FIP # kmod-mtd-rw
dd if=/tmp/uboot.fip of=/mtdX
```

## uboot

<https://openwrt.org/docs/techref/bootloader/uboot.config>

<https://github.com/hanwckf/bl-mt798x>

## cmd

```
ubinfo -a
smeminfo
```

## Breed

breed -> openwrt initramfs -> /cgi-bin/luci/admin/system/flashops/sysupgrade


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.ferro.pro/openwrt/boot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
