> 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
