This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:vim3:applications:secureboot [2023/08/30 02:04] nick |
products:sbc:vim3:applications:secureboot [2023/08/30 02:48] (current) nick |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== VIM3/3L Secureboot ====== | ====== VIM3/3L Secureboot ====== | ||
- | WIP: | + | ===== Introduction ===== |
- | save temporary | + | The default image compiled by [[kg> |
- | ===== Introduction ===== | + | 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. |
- | The default firmware compiled by Fenix for Ubuntu/ | + | If you want to enable the Secureboot |
- | If you need to add Secureboot | + | <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 | ||
+ | * 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. | ||
+ | </ | ||
Line 30: | Line 44: | ||
There 2 patches, one is for Fenix, and the other one is for u-boot. | There 2 patches, one is for Fenix, and the other one is for u-boot. | ||
- | ===== Compile the images | + | ===== Compile the image ===== |
- | You can compile the images | + | You can compile the image after apply the patches. |
===== Generate the signing key ===== | ===== Generate the signing key ===== | ||
Line 40: | Line 54: | ||
Download the [[dl> | Download the [[dl> | ||
- | ![image|526x500](upload:// | + | {{:products: |
Select '' | Select '' | ||
- | ![2|521x499](upload:// | + | {{:products: |
- | ![3|529x500](upload:// | ||
- | The path of generated keys is in the '' | + | {{: |
- | ![image|690x312](upload:// | + | The path of generated keys is in the '' |
+ | |||
+ | {{: | ||
You need to save the files '' | You need to save the files '' | ||
- | - aml-user-key.sig - Used to sign the images | + | * '' |
- | - SECURE_BOOT_SET - Used to burn the key | + | * '' |
- | ===== Encrypt the images | + | ===== Encrypt the image ===== |
+ | <WRAP important > | ||
+ | * Only support sign tool under Windows system. | ||
+ | </ | ||
- | Still using the sign tool '' | + | Also using the sign tool '' |
- | and also check '' | + | and also check '' |
- | ![4|528x500](upload:// | + | {{:products: |
- | ![image|690x332](upload:// | ||
- | ![6|521x500](upload:// | + | {{: |
+ | |||
+ | |||
+ | {{:products: | ||
Then click '' | Then click '' | ||
- | ![7|521x500](upload:// | + | {{:products: |
- | ![8|524x500](upload:// | + | |
+ | {{:products: | ||
+ | |||
+ | |||
+ | |||
+ | 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. | ||
+ | </ | ||
- | 签名成功后会在原始固件目录下生成一个新的加密固件,命名中包含`secureboot`后缀,如:原始固件为`vim3-ubuntu-22.04-server-linux-4.9-fenix-1.5.2-230830-emmc-develop.img`,则加密后的固件为`vim3-ubuntu-22.04-server-linux-4.9-fenix-1.5.2-230830-emmc-develop.20230830105011.secureboot.img`。 | + | Download and install the [[dl> |
+ | '' | ||
- | After successful signing, a new encrypted image will be generated in the original image directory, with a filename containing the '' | + | {{: |
+ | 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 '' | ||
- | 下载并安装[USB烧录工具](https:// | + | Do not check it again for next time flashing with the same board. |
+ | </WRAP> | ||
- | ![image|690x225](upload:// | + | ===== See Also ===== |
- | 打开USB烧录工具,导入加密的固件,同时勾选`secure_boot_set`选项,然后点击`Start`开始烧录。 | + | You can find some documentations about how to flash the keys with Amlogic |
- | ![9|690x493](upload:// | + | {{:products: |
- | **注意:key只能烧录一次,即只在第一次烧录加密固件时勾选`secure_boot_set`,后面再次烧录时不要勾选,否则会烧录失败。** | ||
- | ===== 警告 ===== | ||
- | - Secureboot的key只能烧录一次,是不可逆的,所以在烧录时需要慎重 | ||
- | - 生成的key需要保管好,因为一旦烧录了key,那么以后就只能烧录用这个key签名的固件 | ||
- | - 一定要做完详细的测试后,确保固件可以用于生产时才开启Secureboot功能 |