Files
NANOKVM-LicheeRV-Nano-Build…/fsbl/plat/cv181x/platform.mk
916BGAI dbbad1938a fsbl: sync sg200x-dev through 5a80c12
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.
2026-11-06 18:34:01 +08:00

81 lines
1.7 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
# 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/emmc \
-Iplat/${CHIP_ARCH}/include \
-Iplat/${CHIP_ARCH}/include/${BOOT_CPU} \
-Ilib/utils \
-Ilib/lzma \
-Ilib/lz4 \
${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}/bl2/bl2_opt.c \
plat/${CHIP_ARCH}/bl2/cvi_spinand.c \
plat/${CHIP_ARCH}/emmc/emmc.c \
plat/${CHIP_ARCH}/emmc/cv_emmc.c \
lib/utils/decompress.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