手动合成fip.bin和boot.sd [2/2]
编译FSBL
编译FSBL是为了得到bl2.bin。注意到我们需要配置一些参数:
ARCH ?=
ifneq ($(origin CROSS_COMPILE),command line)
ifeq ($(ARCH),riscv)
CROSS_COMPILE := ${CROSS_COMPILE_GLIBC_RISCV64}
BOOT_CPU ?= riscv
else
CROSS_COMPILE := ${CROSS_COMPILE_64}
BOOT_CPU := aarch64
ARCH := aarch64
endif
endif
ifeq (${CHIP_ARCH},)
$(error CHIP_ARCH is undefined)
endif
ifeq (${CROSS_COMPILE},)
$(error CROSS_COMPILE is undefined)
endif
我们需要
make ARCH=riscv CROSS_COMPILE=riscv64-buildroot-linux-musl- BOOT_CPU=riscv CHIP_ARCH=cv180x PROJECT_FULLNAME=cv1800b_milkv_duo_sd bl2
此时又报错:
lib/cpu/riscv/bl2_entrypoint.S: Assembler messages:
lib/cpu/riscv/bl2_entrypoint.S:60: Error: unknown CSR

本文详细描述了如何在RISC-V架构下手动编译FSBL以获取bl2.bin,解决编译过程中的错误,并使用fiptool.py创建fip.bin的过程,包括设置CPU参数和加载二进制文件。
最低0.47元/天 解锁文章
2381

被折叠的 条评论
为什么被折叠?



