@whycan 这个贴我也有看,但是似乎都是基于烧了rotpk.bin的情况分析的。所以这个rotpk.bin是一定要烧才能启动吗,不烧的话跑不下去是吗?上面文档的描述,又好像是不烧可以启动。还望指点一下
O
olongcha 发布的最新帖子
-
回复: V851S 打开Secure boot sboot引导启动失败
-
V851S 打开Secure boot sboot引导启动失败
参照文档<Tina_Linux_安全_开发指南.pdf>
-
成功通过pack -s 生成了secure固件
-
烧写secure固件后,按照下面log判断,应该是成功烧写了文档所说的 efuse ”secure enable bit“
-
因为目前还在调试阶段并且板子只有1块,所以还不想先烧录rotpk.bin。 我看文档说,只打开secure enable bit 不烧录rotpk.bin 是可以烧写安全固件的
-
目前开机卡在了开机log的位置,根据文档猜测应该是卡在sboot里面。但是sboot的源码又是闭源的,没法追踪
-
开机log:
[86]HELLO! SBOOT is starting!OT [89]sboot commit : 4b419f21ba [157][pmu]: bus read error [160]set pll start [162]periph0 has been enabled [165]set pll end [166]board init ok [168]DRAM use internal ZQ!! [171]ZQ value = 0x31 [173]chip id check OK [175]POWER SETTING ERROR! [177]DRAM BOOT DRIVE INFO: V0.16 [180]DRAM CLK = 528 MHz [182]DRAM Type = 2 (2:DDR2,3:DDR3) [185]DRAMC read ODT off. [188]DRAM ODT off. [190]DRAM SIZE =64 M [192]dram_tpr4:0x0 [196]DRAM simple test OK. [198]rtc standby flag is 0x0, super standby flag is 0x0 [203]dram size =64 [205]audio:avcc calibration [208]spinand UBOOT_START_BLK_NUM 8 UBOOT_LAST_BLK_NUM 32 [213]block from 8 to 32 [675]Check is correct. [677]OLD version: 0.0 [679]NEW version: 0.0 [684]don't have rotpk, skip check [691]sample_atoi err: ch 0x00 is not a digit or hex ch [696]__merge_extension_value err1: in sunxi_bytes_merge [701]get extension value failed [704]sunxi_rsa_calc: probe extension failed [708]root certif verify itself failed
- 修改点:
diff --git a/device/config/chips/v851s/configs/xxxx/board.dts b/device/config/chips/v851s/configs/xxxx/board.dts index 951e43a41..c671bd9fa 100755 --- a/device/config/chips/v851s/configs/xxxx/board.dts +++ b/device/config/chips/v851s/configs/xxxx/board.dts @@ -10,6 +10,13 @@ /{ compatible = "allwinner,sun8iw21p1", "arm,sun8iw21p1", "allwinner,v851s"; + + reserved-memory { + optee_reserve { + reg = <0 0x41980000 0 0x00080000>; + }; + }; + soc@03000000 { wlan: wlan@0 { compatible = "allwinner,sunxi-wlan"; diff --git a/device/config/chips/v851s/configs/xxxx/linux/config-4.9 b/device/config/chips/v851s/configs/xxxx/linux/config-4.9 index 792a64c1e..a7023ae0c 100755 --- a/device/config/chips/v851s/configs/xxxx/linux/config-4.9 +++ b/device/config/chips/v851s/configs/xxxx/linux/config-4.9 @@ -1160,16 +1160,14 @@ CONFIG_SERIAL_SUNXI_CONSOLE=y # CONFIG_TCG_TPM is not set # CONFIG_XILLYBUS is not set # CONFIG_SUNXI_SCR is not set -# CONFIG_SUNXI_SYS_INFO is not set +CONFIG_SUNXI_SYS_INFO=y +# CONFIG_SUNXI_QA_TEST is not set # CONFIG_SUNXI_SMC is not set -CONFIG_DUMP_REG=y -CONFIG_DUMP_REG_MISC=y +# CONFIG_DUMP_REG is not set # CONFIG_SUNXI_TIMER_TEST is not set # CONFIG_SUNXI_TRANSFORM is not set # CONFIG_SUNXI_DI is not set -CONFIG_SUNXI_G2D=y -CONFIG_SUNXI_G2D_MIXER=y -CONFIG_SUNXI_G2D_ROTATE=y +# CONFIG_SUNXI_G2D is not set # CONFIG_SUNXI_DSPO is not set CONFIG_SUNXI_NNA_VIP=y # CONFIG_SUNXI_NNA_GALCORE is not set @@ -2335,7 +2333,13 @@ CONFIG_ANDROID=y # # CONFIG_FPGA is not set # CONFIG_SUNXI_MPP is not set -# CONFIG_TEE is not set +CONFIG_TEE=y + +# +# TEE drivers +# +CONFIG_OPTEE=y +# CONFIG_OPTEE_BENCHMARK is not set # # Firmware Drivers diff --git a/device/config/chips/v851s/configs/xxxx/uboot-board.dts b/device/config/chips/v851s/configs/xxxx/uboot-board.dts index 8e603bdd4..1d216d290 100755 --- a/device/config/chips/v851s/configs/xxxx/uboot-board.dts +++ b/device/config/chips/v851s/configs/xxxx/uboot-board.dts @@ -17,6 +17,15 @@ enable-active-high; }; + firmware { + optee { + shm_base = <0x418E0000>; + shm_size = <0x00020000>; + ta_ram_base = <0x41a00000>; + ta_ram_size = <0x00100000>; + }; + }; + box_start_os0 { compatible = "allwinner,box_start_os"; start_type = <0x1>; diff --git a/target/allwinner/v851s-xxxx/defconfig b/target/allwinner/v851s-xxxx/defconfig index 79ad4391a..b9a3da692 100755 --- a/target/allwinner/v851s-xxxx/defconfig +++ b/target/allwinner/v851s-xxxx/defconfig @@ -76,8 +76,8 @@ CONFIG_SUNXI_SD_BOOT_KERNEL_FORMAT_BOOTIMG=y # CONFIG_SUNXI_MKBOOTIMG_ADD_DTB is not set # CONFIG_SUNXI_SMALL_STORAGE_OTA is not set # CONFIG_SUNXI_RECOVERY_INITRAMFS_PART is not set -CONFIG_SUNXI_RECOVERY_INITRAMFS_KERNEL_FORMAT_UIMAGE=y -# CONFIG_SUNXI_RECOVERY_INITRAMFS_KERNEL_FORMAT_BOOTIMG is not set +# CONFIG_SUNXI_RECOVERY_INITRAMFS_KERNEL_FORMAT_UIMAGE is not set +CONFIG_SUNXI_RECOVERY_INITRAMFS_KERNEL_FORMAT_BOOTIMG=y # CONFIG_SUNXI_SEPARATE_APP_FROM_ROOTFS is not set # CONFIG_SUNXI_SEPARATE_DATA_FROM_ROOTFS is not set # CONFIG_CUSTOMIZE_IMAGE_NAME is not set
@whycan 晕哥可以帮忙看一下吗?感谢!
-