mirror of
https://github.com/sipeed/LicheeRV-Nano-Build.git
synced 2026-11-09 18:04:55 -06:00
Update the vendored FSBL from Sophgo sg200x-dev commit 426d1e7eccce84b34169e5f21de7d6e7da1804a1 to 5a80c127cf614dea7f534d5b5352886a1c720d37, incorporating 24 upstream commits. Keep the local plat/sg200x symlink to cv181x. Import the upstream DDR, clock, storage and boot-image changes together with their platform support, prebuilt firmware and licensing files. All 935 upstream files match the target revision. Validation on LicheeRV Nano (SG2002/C906, SD, DDR3-1866 x16): - Cross-build BL2 with the existing Xuantie GCC 10.2.0 toolchain. - Repack FIP while preserving the installed OpenSBI and U-Boot byte for byte; verify headers, payload checksums, entry addresses and LZMA. - Software reboot and power-cycle boot succeed; memtester 16M 1 passes all 18 checks. Validation covers the FSBL update with existing later boot stages. Full firmware builds, A53 and video/HID acceptance are not covered.
94 lines
2.0 KiB
Makefile
94 lines
2.0 KiB
Makefile
#
|
|
# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
|
|
# Enable workarounds for selected Cortex-A53 errata
|
|
ERRATA_A53_835769 := 1
|
|
ERRATA_A53_843419 := 1
|
|
ERRATA_A53_855873 := 1
|
|
|
|
PAGE_SIZE_64KB := 1
|
|
TEST_FROM_SPINOR1 := 0
|
|
|
|
DEFINES += -DLZ4_USER_MEMORY_FUNCTIONS=1
|
|
|
|
# overdrive clock setting
|
|
ifeq ($(OD_CLK_SEL),y)
|
|
$(eval $(call add_define,OD_CLK_SEL))
|
|
else ifeq ($(VC_CLK_OVERDRIVE),y)
|
|
$(eval $(call add_define,VC_CLK_OVERDRIVE))
|
|
endif
|
|
|
|
# ifeq ($(FSBL_SECURE_BOOT_SUPPORT),1)
|
|
DEFINES += \
|
|
-DNO_ALLOCS \
|
|
-DARGTYPE=3 \
|
|
-DLTC_NO_FILE \
|
|
-DLTM_NO_FILE \
|
|
-DLTM_DESC \
|
|
-DLTC_SOURCE
|
|
|
|
CRYPT_INCLUDES := \
|
|
-Ilib/libtommath \
|
|
-Ilib/libtomcrypt/src/headers \
|
|
-Ilib/BigDigits
|
|
|
|
CRYPT_SOURCES := \
|
|
lib/BigDigits/bigdigits.c \
|
|
lib/libtomcrypt/src/hashes/sha2/sha256.c
|
|
# endif
|
|
|
|
INCLUDES += \
|
|
-Iinclude \
|
|
${CPU_INCLUDES} \
|
|
-Iplat/ \
|
|
-Iplat/${CHIP_ARCH}/include/uart \
|
|
-Iplat/${CHIP_ARCH}/include/usb \
|
|
-Iplat/${CHIP_ARCH}/include \
|
|
-Iplat/${CHIP_ARCH}/include/${BOOT_CPU} \
|
|
-Ilib/utils \
|
|
-Ilib/lzma \
|
|
-Ilib/lz4 \
|
|
-Ilib/crc \
|
|
${STDLIB_INCLUDES} \
|
|
${CRYPT_INCLUDES}
|
|
|
|
BL_COMMON_SOURCES = \
|
|
${CPU_SOURCES} \
|
|
lib/tf_printf/tf_printf.c \
|
|
plat/${CHIP_ARCH}/platform.c \
|
|
plat/${CHIP_ARCH}/security/security.c \
|
|
${STDLIB_SRCS} \
|
|
${CRYPT_SOURCES}
|
|
|
|
DECOMPRESSION_SOURCES = \
|
|
lib/lzma/LzmaDec.c \
|
|
lib/lz4/lz4_all.c \
|
|
lib/lz4/xxhash.c
|
|
|
|
BL2_SRCS = \
|
|
${BL_COMMON_SOURCES} \
|
|
plat/${CHIP_ARCH}/platform_device.c \
|
|
plat/${CHIP_ARCH}/bl2/bl2_opt.c \
|
|
plat/${CHIP_ARCH}/bl2/cvi_spinand.c \
|
|
lib/utils/decompress.c \
|
|
plat/${CHIP_ARCH}/usb/cps_cvi.c \
|
|
plat/${CHIP_ARCH}/usb/usb_tty.c \
|
|
plat/${CHIP_ARCH}/usb/dwc2_udc_otg.c \
|
|
plat/${CHIP_ARCH}/usb/dwc2_udc_otg_xfer_dma.c \
|
|
plat/${CHIP_ARCH}/usb/cv_usb.c \
|
|
lib/crc/crc16.c \
|
|
${DECOMPRESSION_SOURCES}
|
|
|
|
BL2_SOURCES = \
|
|
${BL2_CPU_SOURCES} \
|
|
${BL2_SRCS} \
|
|
plat/${CHIP_ARCH}/bl2/bl2_main.c
|
|
|
|
include plat/${CHIP_ARCH}/ddr/ddr.mk
|
|
|
|
BL2_LINKERFILE := plat/${CHIP_ARCH}/bl2/bl2.ld.S
|
|
#BL2_RLS_OBJS := plat/${CHIP_ARCH}/bl2_objs/${PROJECT_FULLNAME}/bl2/*.o
|