# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
