This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| products:sbc:vim3:applications:secureboot [2023/08/29 23:45] nick created | products:sbc:vim3:applications:secureboot [2025/05/14 21:41] (current) nick | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== VIM3/3L Secureboot ====== | ====== VIM3/3L Secureboot ====== | ||
| + | |||
| + | ===== Introduction ===== | ||
| + | |||
| + | The default image compiled by [[kg> | ||
| + | |||
| + | Enabling Secureboot means that the board can only flash image signed with the same key, it won't be possible to flash any other unsigned image or image signed with a different key anymore. | ||
| + | |||
| + | If you want to enable the Secureboot feature, you can follow this documentation to apply extra patches and sign the image. | ||
| + | |||
| + | <WRAP important > | ||
| + | * Only support eMMC installation image. | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Warning ===== | ||
| + | |||
| + | <WRAP alert > | ||
| + | Before you start, please note: | ||
| + | * You know what you are doing and what you want to do. | ||
| + | * Once the board is secured, we can't provide proper support for it anymore. | ||
| + | * The Secureboot key can only be flashed once, and it is irreversible, | ||
| + | * The generated key must be securely stored because once the key is flashed, you will only be able to flash images signed with this key in the future. | ||
| + | * Make sure to conduct thorough testing and ensure that the image is production-ready before enabling the Secureboot feature. | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Apply patches to support secureboot ===== | ||
| + | |||
| + | |||
| + | Download and apply [[dl> | ||
| + | |||
| + | ```shell | ||
| + | ~/ | ||
| + | . | ||
| + | ├── fenix | ||
| + | │ | ||
| + | └── u-boot | ||
| + | └── 0001-don-t-decrypt-dtb-when-secureboot-enabled.patch | ||
| + | |||
| + | 2 directories, | ||
| + | ``` | ||
| + | |||
| + | There 2 patches, one is for Fenix, and the other one is for u-boot. | ||
| + | |||
| + | ===== Compile the image ===== | ||
| + | |||
| + | |||
| + | You can compile the image after apply the patches. | ||
| + | |||
| + | ===== Generate the signing key ===== | ||
| + | |||
| + | |||
| + | Download the [[dl> | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Select '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | {{: | ||
| + | |||
| + | The path of generated keys is in the '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | You need to save the files '' | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | ===== Encrypt the image ===== | ||
| + | |||
| + | <WRAP important > | ||
| + | * Only support sign tool under Windows system. | ||
| + | </ | ||
| + | |||
| + | Also using the sign tool '' | ||
| + | and also check '' | ||
| + | |||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | Then click '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | |||
| + | After successful signing, a new encrypted image will be generated in the original image directory, with a filename containing the '' | ||
| + | e.g. if the orignal file is '' | ||
| + | |||
| + | |||
| + | Next, we will explain how to flash this encrypted image. | ||
| + | |||
| + | |||
| + | ===== Flash encrypted image ===== | ||
| + | |||
| + | <WRAP important > | ||
| + | * Only support USB flash tool under Windows system. | ||
| + | </ | ||
| + | |||
| + | Download and install the [[dl> | ||
| + | '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Open the USB flashing tool, import the encrypted image, check the '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | <WRAP important > | ||
| + | The key can only be flashed once, meaning you should only check '' | ||
| + | |||
| + | Do not check it again for next time flashing with the same board. | ||
| + | </ | ||
| + | |||
| + | ===== See Also ===== | ||
| + | |||
| + | You can find some documentations about how to flash the keys with Amlogic USB Flash Tool from the USB Flash Tool: '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | |||