-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: common: dev: add _rk_anti_copy_board.mdx
- Loading branch information
Showing
32 changed files
with
617 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
:::info | ||
Rockchip 防抄板技术方案分为三个等级:初级方案,中级方案,高级方案。 | ||
其中初级方案可直接参照 Rockchip 官方文档 | ||
[Rockchip Anti Copy Board 开发指南](https://gitlab.com/rockchip_linux_sdk_6.1/linux/bsp/docs/-/raw/cn/Common/SECURITY/Rockchip_Developer_Guide_Anti_Copy_Board_CN.pdf?inline=false) | ||
在我们的产品上进行防抄板应用开发而无需修改 Bootloader。 | ||
|
||
中级方案和高级方案则依赖开启 BL32 以运行 optee 来读写 OTP 数据,可根据以下章节[开启 BL32](#开启-bl32) 后继续参考 Rockchip Anti Copy Board 开发指南进行防抄板应用开发。 | ||
::: | ||
|
||
:::warning | ||
每颗芯片的 OTP 存储仅可写入一次,请谨慎操作。瑞莎不对因用户失误所产生的后果负责。 | ||
::: | ||
|
||
## 开启 BL32 | ||
|
||
### 获取代码 | ||
|
||
按照 [U-boot 开发](./u-boot)编译打包一次 Bootloader。 | ||
|
||
### 开启 BL32 并再次编译打包 | ||
|
||
```bash | ||
# bsp 仓库根目录 | ||
mv u-boot/rknext/0101-enable-package-bl32.patch.disable u-boot/rknext/0101-enable-package-bl32.patch | ||
echo "CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION=y" >> u-boot/rknext/kconfig.conf | ||
./bsp u-boot rknext | ||
``` | ||
|
||
### 安装并烧录 Bootloader | ||
|
||
按照 [U-boot 开发](./u-boot)将 `deb` 包复制至板端并使用 `setup.sh` 刷写 Bootloader。 | ||
|
||
## 常见问题 | ||
|
||
### 使用初级方案时读写数据报错? | ||
|
||
检查是否已经使用 `rsetup` [更新系统](../radxa-os/rsetup#system-update) 和 [U-boot](../radxa-os/rsetup#update-bootloader)。 | ||
|
||
### 中级方案的 `mid.bin` 如何生成? | ||
|
||
```bash | ||
# 可将 echo 后的参数改为自己需要的数据内容 | ||
echo "00112233445566778899AABBCCDDEEFF" > mid.hex && xxd -r -p mid.hex mid.bin | ||
``` | ||
|
||
### 使用中高级方案时读写数据报错? | ||
|
||
可能缺少 `tee-supplicant` 服务 | ||
|
||
```bash | ||
sudo apt install tee-supplicant python3-pycryptodome optee-client-dev libteec1 gcc-arm-linux-gnueabihf | ||
sudo systemctl enable --now tee-supplicant | ||
``` | ||
|
||
可能忘记拷贝 `optee` 可信应用 | ||
|
||
```bash | ||
sudo cp rk_tee_user/v2/out/ta/rk_anti_copy_board/3d4fc699-2065-7bb9-33c7-b6529b43c91a.ta /lib/optee_armtz | ||
``` | ||
|
||
### Rockchip 官方文档提到的 `BoardProofTool`、`ProofDll` 源码和 `rk_tee_user` 如何获取? | ||
|
||
`BoardProofTool`: [BoardProofTool_v1.01_20240823_02.zip](https://dl.radxa.com/tools/windows/BoardProofTool_v1.01_20240823_02.zip) | ||
|
||
`ProofDll` 源码: [ProofDll.zip](https://dl.radxa.com/tools/windows/ProofDll.zip) | ||
|
||
`rk_tee_user`: | ||
|
||
``` | ||
git clone https://gitlab.com/rockchip_linux_sdk_6.1/android/rk/platform/system/rk_tee_user.git -b develop-next | ||
``` | ||
|
||
### 如何在板端编译 `rk_tee_user`? | ||
|
||
安装依赖: | ||
|
||
```bash | ||
sudo apt install tee-supplicant python3-pycryptodome optee-client-dev \ | ||
libteec1 build-essential crossbuild-essential-armhf | ||
sudo systemctl enable --now tee-supplicant | ||
``` | ||
|
||
参照下方 diff, 修改 `build.sh` 编译脚本: | ||
|
||
```diff | ||
diff --git a/v2/build.sh b/v2/build.sh | ||
index 35a39f4..65f4168 100755 | ||
--- a/v2/build.sh | ||
+++ b/v2/build.sh | ||
@@ -19,10 +19,10 @@ else | ||
if [ ! -d "$TOOLCHAIN_PREBUILTS" ]; then | ||
TOOLCHAIN_PREBUILTS=$WORK_DIR_TOP/../../../prebuilts | ||
fi | ||
- TOOLCHAIN_PATH_ARM32=$TOOLCHAIN_PREBUILTS/gcc/linux-x86/arm/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf/bin | ||
- TOOLCHAIN_PATH_AARCH64=$TOOLCHAIN_PREBUILTS/gcc/linux-x86/aarch64/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin | ||
- CROSS_COMPILE32=arm-none-linux-gnueabihf- | ||
- CROSS_COMPILE64=aarch64-none-linux-gnu- | ||
+ TOOLCHAIN_PATH_ARM32=/usr/bin/ | ||
+ TOOLCHAIN_PATH_AARCH64=/usr/bin | ||
+ CROSS_COMPILE32=arm-linux-gnueabihf- | ||
+ CROSS_COMPILE64=aarch64-linux-gnu- | ||
fi | ||
|
||
if [ -z "$AARCH64_TOOLCHAIN" ]; then | ||
|
||
``` |
13 changes: 13 additions & 0 deletions
13
docs/compute-module/cm3/low-level-dev/rk_anti_copy_board.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
13 changes: 13 additions & 0 deletions
13
docs/compute-module/cm3i/low-level-dev/rk_anti_copy_board.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
13 changes: 13 additions & 0 deletions
13
docs/compute-module/cm5/radxa-os/low-level-dev/rk_anti_copy_board.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
13 changes: 13 additions & 0 deletions
13
docs/compute-module/nx5/radxa-os/low-level-dev/rk_anti_copy_board.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
13 changes: 13 additions & 0 deletions
13
docs/template/module/radxa-os/low-level-dev/rk_anti_copy_board.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 5 | ||
description: "Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。" | ||
--- | ||
|
||
import ANTICOPY from '../../../common/dev/\_rk_anti_copy_board.mdx' | ||
|
||
# Rockchip 防抄板技术 | ||
|
||
Rockchip 芯片提供防抄板技术,保护客户的固件、私有数据、核心代码。 | ||
防抄板技术主要用于防止客户的固件和私有数据被非授权用户非法拷贝并使用,避免被抄板造成商业上的损失。 | ||
|
||
<ANTICOPY/> |
Oops, something went wrong.