You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1128 lines
46 KiB
1128 lines
46 KiB
################################################################################
|
|
#
|
|
# Copyright (c) Hisilicon Technologies Co., Ltd. All rights reserved.
|
|
#
|
|
################################################################################
|
|
include $(BUILD_DIR)/bootloader.cfg
|
|
|
|
export CROSS_COMPILE=$(CFG_SOCT_ARM_TOOLCHAINS_NAME)-
|
|
|
|
CROSS_COMPILE64 = $(CFG_SOCT_AARCH64_TOOLCHAINS_NAME)-
|
|
|
|
CROSS_COMPILE32 = $(CFG_SOCT_ARM_TOOLCHAINS_NAME)-
|
|
|
|
|
|
PLATFORM := $(CFG_SOCT_CHIP_TYPE)
|
|
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE), reserved17),)
|
|
PLATFORM := reserved19
|
|
endif
|
|
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE), reserved13),)
|
|
PLATFORM := reserved13
|
|
endif
|
|
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE), reserved9),)
|
|
PLATFORM := reserved13
|
|
endif
|
|
|
|
################################################################################
|
|
|
|
CONFIG_PRODUCT_WITH_BOOT := $(CFG_SOCT_BUILD_WITH_PRODUCT)
|
|
|
|
IMAGE_DIR:=$(O)
|
|
|
|
ifeq ($(findstring fpga, $(CFG_SOCT_BOOT_REG_NAME)), fpga)
|
|
ENABLE_FPGA = y
|
|
endif
|
|
|
|
ifeq ($(CFG_SOCT_MINIBOOT_SUPPORT),y)
|
|
|
|
|
|
else
|
|
UBOOT_SRC_DIR = $(VENDOR_OPEN_SOURCE_DIR)/u-boot/$(U_BOOT_VERSION)
|
|
UBOOT_SRC_DIR_SELF = $(UBOOT_SRC_DIR)/huanglong
|
|
CONFIG_BOOTARGS_START_ADDR := CONFIG_ENV_OFFSET
|
|
|
|
# reserved9 use PLATFORM=reserved13, but sysreg dir not the same
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE), reserved9),)
|
|
CHIP_REG_DIR := reserved9
|
|
else
|
|
CHIP_REG_DIR := $(PLATFORM)
|
|
endif
|
|
|
|
ifeq ($(CFG_SOCT_TWOSTAGEBOOT_SUPPORT),y)
|
|
UBOOT_BUILD_DIR = $(O)/u-boot
|
|
ifeq ($(CFG_SOCT_BOOT_FBL),y)
|
|
UBOOT_BUILD_DIR = $(O)/fbl-boot
|
|
endif
|
|
ifeq ($(CFG_SOCT_BOOT_SBL),y)
|
|
UBOOT_BUILD_DIR = $(O)/sbl-boot
|
|
endif
|
|
else
|
|
UBOOT_BUILD_DIR = $(O)/u-boot
|
|
endif
|
|
ifeq ($(CFG_SOCT_T9_FPGA), y)
|
|
UBOOT_DEFCONFIG_FILE = $(PLATFORM)_fpga_defconfig
|
|
UBOOT_CONFIG_FILE = $(PLATFORM)_fpga_config
|
|
else
|
|
ifeq ($(CFG_SOCT_UEFIBOOT_SUPPORT), y)
|
|
UBOOT_DEFCONFIG_FILE = $(PLATFORM)_pc_defconfig
|
|
else
|
|
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_REVERSION), reserved19_c hi3751v811_c),)
|
|
UBOOT_DEFCONFIG_FILE = $(CFG_SOCT_CHIP_REVERSION)_defconfig
|
|
else
|
|
UBOOT_DEFCONFIG_FILE = $(PLATFORM)_defconfig
|
|
endif #CFG_SOCT_CHIP_REVERSION
|
|
|
|
endif #CFG_SOCT_UEFIBOOT_SUPPORT
|
|
UBOOT_CONFIG_FILE = $(PLATFORM)_config
|
|
endif #CFG_SOCT_T9_FPGA
|
|
|
|
SYSREG = $(UBOOT_BUILD_DIR)/$(CFG_SOCT_BOOT_REG_NAME)
|
|
ifeq ($(BOOTLOADER_SYSREGDIR),)
|
|
SYSREGDIR = $(SOCT_SDK_BINARY_DIR)/bootloader/sysreg/$(PRODUCT_DEVICE)/$(CFG_SOCT_CHIP_TYPE)
|
|
else
|
|
SYSREGDIR = $(top_srctree)/$(BOOTLOADER_SYSREGDIR)
|
|
endif
|
|
USRREGDIR = $(SYSREGDIR)
|
|
|
|
export UBOOT_OUT_DIR=${UBOOT_BUILD_DIR}
|
|
|
|
ifeq ($(CFG_PRODUCT_TYPE),android)
|
|
export BUILD_ANDROID=y
|
|
endif
|
|
|
|
UBOOT_CONFIG_INCLUDE = $(UBOOT_BUILD_DIR)/include/configs/$(PLATFORM)_config.h
|
|
EXPORT_CONFIG = /bin/sh $(UBOOT_SRC_DIR_SELF)/include/configs/export.sh
|
|
|
|
ifeq ($(CFG_SOCT_TWOSTAGEBOOT_SUPPORT),y)
|
|
PLATFORM_IMAGE := $(SOCT_SDK_BINARY_DIR)/bootloader/hsl/$(CHIP_REG_DIR)/*.img
|
|
PLATFORM_IMAGE += $(SOCT_SDK_BINARY_DIR)/bootloader/keyarea/*.img
|
|
PLATFORM_IMAGE += $(SOCT_SDK_BINARY_DIR)/bootloader/hrf/$(CHIP_REG_DIR)/*.img
|
|
else
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE), reserved19 reserved17 hi3751v811),)
|
|
PLATFORM_IMAGE := $(SOCT_SDK_BINARY_DIR)/bootloader/sysreg/$(PRODUCT_DEVICE)/$(PLATFORM)/*.img
|
|
|
|
ifeq ($(CFG_SOCT_BOOT_SBL),y)
|
|
PLATFORM_IMAGE += $(SOCT_SDK_BINARY_DIR)/mcu/lpmcu/$(PLATFORM)/*.bin
|
|
endif
|
|
else
|
|
PLATFORM_IMAGE := $(SOCT_SDK_BINARY_DIR)/bootloader/hrf/reserved13/*.img
|
|
PLATFORM_IMAGE += $(SOCT_SDK_BINARY_DIR)/bootloader/hsl/reserved13/*.img
|
|
PLATFORM_IMAGE += $(SOCT_SDK_BINARY_DIR)/bootloader/keyarea/*.img
|
|
endif
|
|
endif
|
|
LPMCU_IMAGE := $(SOCT_SDK_BINARY_DIR)/mcu/lpmcu/$(PLATFORM)/*.bin
|
|
CONFIG_UNIFIED_BOOT := y
|
|
|
|
# mutil boot reg support
|
|
CONFIG_SYSREG0 := $(CFG_SOCT_BOOT_REG_NAME)
|
|
CONFIG_SYSREG1 := $(CFG_SOCT_BOOT_REG1_NAME)
|
|
CONFIG_SYSREG2 := $(CFG_SOCT_BOOT_REG2_NAME)
|
|
CONFIG_SYSREG3 := $(CFG_SOCT_BOOT_REG3_NAME)
|
|
CONFIG_SYSREG4 := $(CFG_SOCT_BOOT_REG4_NAME)
|
|
CONFIG_SYSREG5 := $(CFG_SOCT_BOOT_REG5_NAME)
|
|
CONFIG_SYSREG6 := $(CFG_SOCT_BOOT_REG6_NAME)
|
|
CONFIG_SYSREG7 := $(CFG_SOCT_BOOT_REG7_NAME)
|
|
CONFIG_SYSREG8 := $(CFG_SOCT_BOOT_REG8_NAME)
|
|
CONFIG_SYSREG9 := $(CFG_SOCT_BOOT_REG9_NAME)
|
|
CONFIG_SYSREG10 := $(CFG_SOCT_BOOT_REG10_NAME)
|
|
CONFIG_SYSREG11 := $(CFG_SOCT_BOOT_REG11_NAME)
|
|
CONFIG_SYSREG12 := $(CFG_SOCT_BOOT_REG12_NAME)
|
|
CONFIG_SYSREG13 := $(CFG_SOCT_BOOT_REG13_NAME)
|
|
CONFIG_SYSREG14 := $(CFG_SOCT_BOOT_REG14_NAME)
|
|
CONFIG_SYSREG15 := $(CFG_SOCT_BOOT_REG15_NAME)
|
|
CONFIG_SYSREG16 := $(CFG_SOCT_BOOT_REG16_NAME)
|
|
CONFIG_SYSREG17 := $(CFG_SOCT_BOOT_REG17_NAME)
|
|
CONFIG_SYSREG18 := $(CFG_SOCT_BOOT_REG18_NAME)
|
|
CONFIG_SYSREG19 := $(CFG_SOCT_BOOT_REG19_NAME)
|
|
CONFIG_SYSREG20 := $(CFG_SOCT_BOOT_REG20_NAME)
|
|
CONFIG_SYSREG21 := $(CFG_SOCT_BOOT_REG21_NAME)
|
|
CONFIG_SYSREG22 := $(CFG_SOCT_BOOT_REG22_NAME)
|
|
CONFIG_SYSREG23 := $(CFG_SOCT_BOOT_REG23_NAME)
|
|
CONFIG_SYSREG24 := $(CFG_SOCT_BOOT_REG24_NAME)
|
|
CONFIG_SYSREG25 := $(CFG_SOCT_BOOT_REG25_NAME)
|
|
CONFIG_SYSREG26 := $(CFG_SOCT_BOOT_REG26_NAME)
|
|
CONFIG_SYSREG27 := $(CFG_SOCT_BOOT_REG27_NAME)
|
|
CONFIG_SYSREG28 := $(CFG_SOCT_BOOT_REG28_NAME)
|
|
CONFIG_SYSREG29 := $(CFG_SOCT_BOOT_REG29_NAME)
|
|
CONFIG_SYSREG30 := $(CFG_SOCT_BOOT_REG30_NAME)
|
|
CONFIG_SYSREG31 := $(CFG_SOCT_BOOT_REG31_NAME)
|
|
|
|
CONFIG_USERREG0 := $(CFG_SOCT_BOOT_USER_REG_NAME)
|
|
CONFIG_USERREG1 := $(CFG_SOCT_BOOT_USER_REG1_NAME)
|
|
CONFIG_USERREG2 := $(CFG_SOCT_BOOT_USER_REG2_NAME)
|
|
CONFIG_USERREG3 := $(CFG_SOCT_BOOT_USER_REG3_NAME)
|
|
CONFIG_USERREG4 := $(CFG_SOCT_BOOT_USER_REG4_NAME)
|
|
CONFIG_USERREG5 := $(CFG_SOCT_BOOT_USER_REG5_NAME)
|
|
CONFIG_USERREG6 := $(CFG_SOCT_BOOT_USER_REG6_NAME)
|
|
CONFIG_USERREG7 := $(CFG_SOCT_BOOT_USER_REG7_NAME)
|
|
CONFIG_USERREG8 := $(CFG_SOCT_BOOT_USER_REG8_NAME)
|
|
CONFIG_USERREG9 := $(CFG_SOCT_BOOT_USER_REG9_NAME)
|
|
CONFIG_USERREG10 := $(CFG_SOCT_BOOT_USER_REG10_NAME)
|
|
CONFIG_USERREG11 := $(CFG_SOCT_BOOT_USER_REG11_NAME)
|
|
|
|
ifeq ($(CONFIG_UNIFIED_BOOT), y)
|
|
MKFLAGS += CONFIG_BOOT_REG0=$(CFG_SOCT_BOOT_REG_NAME)
|
|
MKFLAGS += CONFIG_BOOT_REG1=$(CFG_SOCT_BOOT_REG1_NAME) \
|
|
CONFIG_BOOT_REG2=$(CFG_SOCT_BOOT_REG2_NAME) \
|
|
CONFIG_BOOT_REG3=$(CFG_SOCT_BOOT_REG3_NAME) \
|
|
CONFIG_BOOT_REG4=$(CFG_SOCT_BOOT_REG4_NAME) \
|
|
CONFIG_BOOT_REG5=$(CFG_SOCT_BOOT_REG5_NAME) \
|
|
CONFIG_BOOT_REG6=$(CFG_SOCT_BOOT_REG6_NAME) \
|
|
CONFIG_BOOT_REG7=$(CFG_SOCT_BOOT_REG7_NAME) \
|
|
CONFIG_BOOT_REG8=$(CFG_SOCT_BOOT_REG8_NAME) \
|
|
CONFIG_BOOT_REG9=$(CFG_SOCT_BOOT_REG9_NAME) \
|
|
CONFIG_BOOT_REG10=$(CFG_SOCT_BOOT_REG10_NAME) \
|
|
CONFIG_BOOT_REG11=$(CFG_SOCT_BOOT_REG11_NAME) \
|
|
CONFIG_BOOT_REG12=$(CFG_SOCT_BOOT_REG12_NAME) \
|
|
CONFIG_BOOT_REG13=$(CFG_SOCT_BOOT_REG13_NAME) \
|
|
CONFIG_BOOT_REG14=$(CFG_SOCT_BOOT_REG14_NAME) \
|
|
CONFIG_BOOT_REG15=$(CFG_SOCT_BOOT_REG15_NAME) \
|
|
CONFIG_BOOT_REG16=$(CFG_SOCT_BOOT_REG16_NAME) \
|
|
CONFIG_BOOT_REG17=$(CFG_SOCT_BOOT_REG17_NAME) \
|
|
CONFIG_BOOT_REG18=$(CFG_SOCT_BOOT_REG18_NAME) \
|
|
CONFIG_BOOT_REG19=$(CFG_SOCT_BOOT_REG19_NAME) \
|
|
CONFIG_BOOT_REG20=$(CFG_SOCT_BOOT_REG20_NAME) \
|
|
CONFIG_BOOT_REG21=$(CFG_SOCT_BOOT_REG21_NAME) \
|
|
CONFIG_BOOT_REG22=$(CFG_SOCT_BOOT_REG22_NAME) \
|
|
CONFIG_BOOT_REG23=$(CFG_SOCT_BOOT_REG23_NAME) \
|
|
CONFIG_BOOT_REG24=$(CFG_SOCT_BOOT_REG24_NAME) \
|
|
CONFIG_BOOT_REG25=$(CFG_SOCT_BOOT_REG25_NAME) \
|
|
CONFIG_BOOT_REG26=$(CFG_SOCT_BOOT_REG26_NAME) \
|
|
CONFIG_BOOT_REG27=$(CFG_SOCT_BOOT_REG27_NAME) \
|
|
CONFIG_BOOT_REG28=$(CFG_SOCT_BOOT_REG28_NAME) \
|
|
CONFIG_BOOT_REG29=$(CFG_SOCT_BOOT_REG29_NAME) \
|
|
CONFIG_BOOT_REG30=$(CFG_SOCT_BOOT_REG30_NAME) \
|
|
CONFIG_BOOT_REG31=$(CFG_SOCT_BOOT_REG31_NAME)
|
|
endif
|
|
|
|
CONFIG_BOOTREG_DEFAULT := $(firstword $(CONFIG_SYSREG0) $(CONFIG_SYSREG1) \
|
|
$(CONFIG_SYSREG2) $(CONFIG_SYSREG3) $(CONFIG_SYSREG4) \
|
|
$(CONFIG_SYSREG5) $(CONFIG_SYSREG6) $(CONFIG_SYSREG7) \
|
|
$(CONFIG_SYSREG8) $(CONFIG_SYSREG9) $(CONFIG_SYSREG10) \
|
|
$(CONFIG_SYSREG11) $(CONFIG_SYSREG12) $(CONFIG_SYSREG13) \
|
|
$(CONFIG_SYSREG14) $(CONFIG_SYSREG15) $(CONFIG_SYSREG16) \
|
|
$(CONFIG_SYSREG17) $(CONFIG_SYSREG18) $(CONFIG_SYSREG19) \
|
|
$(CONFIG_SYSREG20) $(CONFIG_SYSREG21) $(CONFIG_SYSREG22) \
|
|
$(CONFIG_SYSREG23) $(CONFIG_SYSREG24) $(CONFIG_SYSREG25) \
|
|
$(CONFIG_SYSREG26) $(CONFIG_SYSREG27) $(CONFIG_SYSREG28) \
|
|
$(CONFIG_SYSREG29) $(CONFIG_SYSREG30) $(CONFIG_SYSREG31))
|
|
SYSREG0 := $(SYSREGDIR)/$(CONFIG_SYSREG0)
|
|
SYSREG1 := $(SYSREGDIR)/$(CONFIG_SYSREG1)
|
|
SYSREG2 := $(SYSREGDIR)/$(CONFIG_SYSREG2)
|
|
SYSREG3 := $(SYSREGDIR)/$(CONFIG_SYSREG3)
|
|
SYSREG4 := $(SYSREGDIR)/$(CONFIG_SYSREG4)
|
|
SYSREG5 := $(SYSREGDIR)/$(CONFIG_SYSREG5)
|
|
SYSREG6 := $(SYSREGDIR)/$(CONFIG_SYSREG6)
|
|
SYSREG7 := $(SYSREGDIR)/$(CONFIG_SYSREG7)
|
|
SYSREG8 := $(SYSREGDIR)/$(CONFIG_SYSREG8)
|
|
SYSREG9 := $(SYSREGDIR)/$(CONFIG_SYSREG9)
|
|
SYSREG10 := $(SYSREGDIR)/$(CONFIG_SYSREG10)
|
|
SYSREG11 := $(SYSREGDIR)/$(CONFIG_SYSREG11)
|
|
SYSREG12 := $(SYSREGDIR)/$(CONFIG_SYSREG12)
|
|
SYSREG13 := $(SYSREGDIR)/$(CONFIG_SYSREG13)
|
|
SYSREG14 := $(SYSREGDIR)/$(CONFIG_SYSREG14)
|
|
SYSREG15 := $(SYSREGDIR)/$(CONFIG_SYSREG15)
|
|
SYSREG16 := $(SYSREGDIR)/$(CONFIG_SYSREG16)
|
|
SYSREG17 := $(SYSREGDIR)/$(CONFIG_SYSREG17)
|
|
SYSREG18 := $(SYSREGDIR)/$(CONFIG_SYSREG18)
|
|
SYSREG19 := $(SYSREGDIR)/$(CONFIG_SYSREG19)
|
|
SYSREG20 := $(SYSREGDIR)/$(CONFIG_SYSREG20)
|
|
SYSREG21 := $(SYSREGDIR)/$(CONFIG_SYSREG21)
|
|
SYSREG22 := $(SYSREGDIR)/$(CONFIG_SYSREG22)
|
|
SYSREG23 := $(SYSREGDIR)/$(CONFIG_SYSREG23)
|
|
SYSREG24 := $(SYSREGDIR)/$(CONFIG_SYSREG24)
|
|
SYSREG25 := $(SYSREGDIR)/$(CONFIG_SYSREG25)
|
|
SYSREG26 := $(SYSREGDIR)/$(CONFIG_SYSREG26)
|
|
SYSREG27 := $(SYSREGDIR)/$(CONFIG_SYSREG27)
|
|
SYSREG28 := $(SYSREGDIR)/$(CONFIG_SYSREG28)
|
|
SYSREG29 := $(SYSREGDIR)/$(CONFIG_SYSREG29)
|
|
SYSREG30 := $(SYSREGDIR)/$(CONFIG_SYSREG30)
|
|
SYSREG31 := $(SYSREGDIR)/$(CONFIG_SYSREG31)
|
|
|
|
USRREG0 = $(USRREGDIR)/$(CFG_SOCT_BOOT_USER_REG_NAME)
|
|
USRREG1 = $(USRREGDIR)/$(CONFIG_USERREG1)
|
|
USRREG2 = $(USRREGDIR)/$(CONFIG_USERREG2)
|
|
USRREG3 = $(USRREGDIR)/$(CONFIG_USERREG3)
|
|
USRREG4 = $(USRREGDIR)/$(CONFIG_USERREG4)
|
|
USRREG5 = $(USRREGDIR)/$(CONFIG_USERREG5)
|
|
USRREG6 = $(USRREGDIR)/$(CONFIG_USERREG6)
|
|
USRREG7 = $(USRREGDIR)/$(CONFIG_USERREG7)
|
|
USRREG8 = $(USRREGDIR)/$(CONFIG_USERREG8)
|
|
USRREG9 = $(USRREGDIR)/$(CONFIG_USERREG9)
|
|
USRREG10 = $(USRREGDIR)/$(CONFIG_USERREG10)
|
|
USRREG11 = $(USRREGDIR)/$(CONFIG_USERREG11)
|
|
|
|
CONFIG_BOARDID_MAP := $(SYSREGDIR)/$(CFG_SOCT_BOARDID_INFO_NAME)
|
|
|
|
copy_securec:
|
|
test -d $(UBOOT_BUILD_DIR)/huanglong/lib/securec || mkdir -p $(UBOOT_BUILD_DIR)/huanglong/lib/securec
|
|
test -d $(UBOOT_BUILD_DIR)/include/huanglong || mkdir -p $(UBOOT_BUILD_DIR)/include/huanglong
|
|
cp -arf $(PLATFORM_DIR)/secure_c/include/securec.h $(UBOOT_BUILD_DIR)/huanglong/lib/securec
|
|
cp -arf $(PLATFORM_DIR)/secure_c/include/securectype.h $(UBOOT_BUILD_DIR)/huanglong/lib/securec
|
|
cp -arf $(PLATFORM_DIR)/secure_c/include/*.h $(UBOOT_BUILD_DIR)/include/huanglong
|
|
ifeq ($(BOOTLOADER_DRIVERS_SOURCE_DIR),)
|
|
cp -arf $(PLATFORM_DIR)/secure_c/source/*.c $(UBOOT_BUILD_DIR)/huanglong/lib/securec
|
|
cp -arf $(PLATFORM_DIR)/secure_c/source/*.h $(UBOOT_BUILD_DIR)/huanglong/lib/securec
|
|
cp -arf $(PLATFORM_DIR)/secure_c/source/*.inl $(UBOOT_BUILD_DIR)/huanglong/lib/securec
|
|
cp -arf $(PLATFORM_DIR)/secure_c/source/securecutil.h $(UBOOT_BUILD_DIR)/include/huanglong
|
|
endif
|
|
|
|
ifneq ($(BOOTLOADER_DRIVERS_SOURCE_DIR),)
|
|
prepare:
|
|
else
|
|
prepare: $(SYSREG0) $(CONFIG_FILE)
|
|
$(AT)rm -f $(UBOOT_BUILD_DIR)/*.reg
|
|
$(AT)test -d $(UBOOT_BUILD_DIR)/ || mkdir -p $(UBOOT_BUILD_DIR)
|
|
ifeq ($(CONFIG_UNIFIED_BOOT), y)
|
|
ifneq ($(strip $(CONFIG_SYSREG0)),)
|
|
cp -fv $(SYSREG0) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG1)),)
|
|
cp -fv $(SYSREG1) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG2)),)
|
|
$(AT)cp -fv $(SYSREG2) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG3)),)
|
|
$(AT)cp -fv $(SYSREG3) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG4)),)
|
|
$(AT)cp -fv $(SYSREG4) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG5)),)
|
|
$(AT)cp -fv $(SYSREG5) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG6)),)
|
|
$(AT)cp -fv $(SYSREG6) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG7)),)
|
|
$(AT)cp -fv $(SYSREG7) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG8)),)
|
|
$(AT)cp -fv $(SYSREG8) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG9)),)
|
|
$(AT)cp -fv $(SYSREG9) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG10)),)
|
|
$(AT)cp -fv $(SYSREG10) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG11)),)
|
|
$(AT)cp -fv $(SYSREG11) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG12)),)
|
|
$(AT)cp -fv $(SYSREG12) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG13)),)
|
|
$(AT)cp -fv $(SYSREG13) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG14)),)
|
|
$(AT)cp -fv $(SYSREG14) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG15)),)
|
|
$(AT)cp -fv $(SYSREG15) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG16)),)
|
|
$(AT)cp -fv $(SYSREG16) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG17)),)
|
|
$(AT)cp -fv $(SYSREG17) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG18)),)
|
|
$(AT)cp -fv $(SYSREG18) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG19)),)
|
|
$(AT)cp -fv $(SYSREG19) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG20)),)
|
|
$(AT)cp -fv $(SYSREG20) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG21)),)
|
|
$(AT)cp -fv $(SYSREG21) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG22)),)
|
|
$(AT)cp -fv $(SYSREG22) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG23)),)
|
|
$(AT)cp -fv $(SYSREG23) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG24)),)
|
|
$(AT)cp -fv $(SYSREG24) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG25)),)
|
|
$(AT)cp -fv $(SYSREG25) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG26)),)
|
|
$(AT)cp -fv $(SYSREG26) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG27)),)
|
|
$(AT)cp -fv $(SYSREG27) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG28)),)
|
|
$(AT)cp -fv $(SYSREG28) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG29)),)
|
|
$(AT)cp -fv $(SYSREG29) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG30)),)
|
|
$(AT)cp -fv $(SYSREG30) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG31)),)
|
|
$(AT)cp -fv $(SYSREG31) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
else
|
|
cp -fv $(SYSREG0) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(CFG_SOCT_BOARDID_INFO_NAME), )
|
|
cp -fv $(CONFIG_BOARDID_MAP) $(UBOOT_BUILD_DIR)
|
|
endif
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE), reserved19 reserved17 hi3751v811),)
|
|
$(call copy_image,$(PLATFORM_IMAGE),,$(UBOOT_BUILD_DIR))
|
|
else
|
|
$(call copy_image,$(PLATFORM_IMAGE),,$(UBOOT_BUILD_DIR)/arch/arm/cpu/$(PLATFORM)/)
|
|
ifeq ($(CFG_SOCT_BUILD_WITH_PMOC), y)
|
|
$(call copy_image,$(LPMCU_IMAGE),,$(UBOOT_BUILD_DIR)/arch/arm/cpu/$(PLATFORM)/)
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
BOOT_REG_DEF=$(if $(strip $(CONFIG_SYSREG$(1))),$(EXPORT_CONFIG) \
|
|
"BOOT_REG$(1)=\"$(UBOOT_BUILD_DIR)/$(CONFIG_SYSREG$(1))\"" \
|
|
"boot reg$(1)" $(UBOOT_CONFIG_INCLUDE).tmp,$(EXPORT_CONFIG) \
|
|
"BOOT_REG$(1)=" "boot reg$(1)" $(UBOOT_CONFIG_INCLUDE).tmp)
|
|
|
|
UBOOT_EXT := $(shell cd $(VENDOR_DIR)/huanglong/bootloader/source/uboot/uboot_ext && pwd)
|
|
$(shell ln -fsn $(UBOOT_EXT) $(UBOOT_SRC_DIR_SELF))
|
|
|
|
ifneq (,$(filter fastboot-prepare all,$(MAKECMDGOALS)))
|
|
sinclude $(UBOOT_BUILD_DIR)/.check_dynamic_config_update
|
|
|
|
$(UBOOT_BUILD_DIR)/.check_dynamic_config_update:
|
|
test -d $(dir $(UBOOT_CONFIG_INCLUDE)) || mkdir -p $(dir $(UBOOT_CONFIG_INCLUDE))
|
|
rm -vf $(UBOOT_CONFIG_INCLUDE).tmp
|
|
ifeq ($(CFG_SOCT_UEFIBOOT_SUPPORT),y)
|
|
$(EXPORT_CONFIG) "CONFIG_SOCT_UEFIBOOT_SUPPORT=\"$(CFG_SOCT_UEFIBOOT_SUPPORT)\"" \
|
|
"start uefi" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
$(EXPORT_CONFIG) "CONFIG_BOOTLOADER_UBI_SUPPORT=$(CFG_SOCT_BOOTLOADER_UBI_SUPPORT)" \
|
|
"bootloader ubi support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
$(EXPORT_CONFIG) "CONFIG_NAND_SUPPORT=$(CFG_SOCT_NAND_SUPPORT)" \
|
|
"nand flash support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
$(EXPORT_CONFIG) "CONFIG_SPI_NAND_SUPPORT=$(CFG_SOCT_SPI_NAND_SUPPORT)" \
|
|
"spi-nand flash support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
$(EXPORT_CONFIG) "CONFIG_DDR_TRAINING_V2=$(CFG_SOCT_DDR_TRAINING_SUPPORT)" \
|
|
"ddr training cmd support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_DDR_LAYOUT_128M=$(CFG_SOCT_DDR_LAYOUT_128M)" \
|
|
"ddr layout 128M support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SPIFLASH_SUPPORT=$(CFG_SOCT_SPI_SUPPORT)" \
|
|
"spi flash support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SPIFLASH_LOCK_SUPPORT=$(CFG_SOCT_SPI_FLASHLOCK_SUPPORT)" \
|
|
"spi flash lock support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_CMDLINE_SUPPORT=$(CFG_SOCT_CMDLINE_SUPPORT)" \
|
|
"support soct cmdline" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_CMDLINE_MAX_SIZE=$(CFG_SOCT_CMDLINE_MAX_SIZE)" \
|
|
"set cmdline max size" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
ifeq ($(CFG_SOCT_BOOT_FBL),)
|
|
ifeq ($(CFG_SOCT_SUPPORT_AGING),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_CMD_AGING=y" \
|
|
"support aging command" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_SUPPORT_UFS_AGING=$(CFG_SOCT_SUPPORT_UFS_AGING)" \
|
|
"support ufs aging command" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_SUPPORT_DDR_AGING=$(CFG_SOCT_SUPPORT_DDR_AGING)" \
|
|
"support ddr aging command" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_SUPPORT_EMMC_AGING=$(CFG_SOCT_SUPPORT_EMMC_AGING)" \
|
|
"support emmc aging command" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
endif
|
|
ifneq ($(CFG_SOCT_CHIP_REVERSION),)
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_CHIP_REVERSION=$(CFG_SOCT_CHIP_REVERSION)" \
|
|
"cs chip reversion" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(BOOT_ADVCA_PROGRAMMER),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_NET_SUPPORT=y" \
|
|
"eth support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
else
|
|
@$(EXPORT_CONFIG) "CONFIG_NET_SUPPORT=$(CFG_SOCT_ETH_SUPPORT)" \
|
|
"eth support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_PRODUCT_TYPE),android)
|
|
@$(EXPORT_CONFIG) "CONFIG_ANDROID_PRODUCT=y" \
|
|
"android boot support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
ifeq ($(CFG_SOCT_AB_SUPPORT),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SUPPORT_AB_UPDATE=y" \
|
|
"AB update support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_SOCT_AB_STARTUP_SUPPORT),y)
|
|
@$(EXPORT_CONFIG) "CFG_SOCT_AB_STARTUP_SUPPORT=y" \
|
|
"AB startup support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_SOCT_SCS_VERIFY_DEBUG),y)
|
|
@$(EXPORT_CONFIG) "CFG_SOCT_SCS_VERIFY_DEBUG=y" \
|
|
"secure chipset startup verify" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_SOCT_FBL_BOOTARGS_SUPPORT),y)
|
|
@$(EXPORT_CONFIG) "CFG_SOCT_FBL_BOOTARGS_SUPPORT=y" \
|
|
"FBL bootargs support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
endif
|
|
ifeq ($(PRODUCT_OPTIONAL),_tvos_o)
|
|
@$(EXPORT_CONFIG) "CONFIG_TVOS_O_PRODUCT=y" \
|
|
"tvos_o boot support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(PRODUCT_OPTIONAL),_tvos_h)
|
|
@$(EXPORT_CONFIG) "CONFIG_TVOS_H_PRODUCT=y" \
|
|
"tvos_h boot support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
@$(EXPORT_CONFIG) "CONFIG_AUDIO_AMP_AUTO_SELECT_MODE=$(CFG_SOCT_AUDIO_AMP_AUTO_SELECT_MODE)" \
|
|
"audio amp auto select mode" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_VO_VDAC_AUTO_SELECT_MODE=$(CFG_SOCT_VO_VDAC_AUTO_SELECT_MODE)" \
|
|
"vo vdac auto select mode" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "HLSFV_PHY_U=$(CFG_SOCT_ETH_UP_PHYADDR)" \
|
|
"eth upport phy address" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "HLSFV_PHY_D=$(CFG_SOCT_ETH_DOWN_PHYADDR)" \
|
|
"eth downport phy address" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_EMMC_SUPPORT=$(CFG_SOCT_EMMC_SUPPORT)" \
|
|
"emmc flash support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_MFTL_SUPPORT=$(CFG_SOCT_MFTL_SUPPORT)" \
|
|
"MFTL flash support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CFG_ENV_ADDR=$(CFG_SOCT_BOOT_ENV_STARTADDR)" \
|
|
"boot environment variables start address" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_BOOTCOMMAND=\"$(CFG_SOCT_BOOT_CMD)\"" \
|
|
"boot command for fbl" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CFG_SECONDBOOT_ADDR=$(CFG_SOCT_SECONDBOOT_STARTADDR)" \
|
|
"second boot start address" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CFG_SECONDBOOT_SIZE=$(CFG_SOCT_SECONDBOOT_SIZE)" \
|
|
"second boot size" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CFG_SECONDBOOT_PARTITION_SIZE=$(CFG_SOCT_SECONDBOOT_PARTITION_SIZE)" \
|
|
"second boot partition size" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CFG_ENV_SIZE=$(CFG_SOCT_BOOT_ENV_SIZE)" \
|
|
"boot environment variables size" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CFG_ENV_RANGE=$(CFG_SOCT_BOOT_ENV_RANGE)" \
|
|
"boot environment variables range" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_ENV_BACKUP=$(CFG_SOCT_BOOT_ENV_BAK_SUPPORT)" \
|
|
"Bakup boot environment variables support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CFG_ENV_BACKUP_ADDR=$(CFG_SOCT_BOOT_ENV_STARTADDR_BAKUP)" \
|
|
"Bakup boot environment variables start address" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_PRODUCT_WITH_BOOT=$(CONFIG_PRODUCT_WITH_BOOT)" \
|
|
"build product with boot" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_HL_UMAP5=$(CFG_FPGA_VERSION_UMAP5)" \
|
|
"build for umap5 fpga version" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_AUXCODE_COMPILE_SUPPORT=$(CONFIG_AUXCODE_COMPILE_SUPPORT)" \
|
|
"build auximg from auxcode" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_NET_HLGMACV300=$(CONFIG_NET_HLGMACV300)" \
|
|
"build hlgmacv300" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_NET_HLSFV300=$(CONFIG_NET_HLSFV300)" \
|
|
"build hlsfv300" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_USB_HOST_ETHER=$(CONFIG_USB_HOST_ETHER)" \
|
|
"build usb2eth" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_BOOTROM_CA_SUPPORT=$(BOOT_ADVCA_PROGRAMMER)" \
|
|
"build advca_programmer" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CFG_$(BOOTCONFIG_UPPER)_FPGA=$(CFG_FPGA)" \
|
|
"FPGA" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_BOOT_SIMULATE=$(CONFIG_BOOT_SIMULATE)" \
|
|
"Simulate boot" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CHIP_TYPE_$(CFG_SOCT_CHIP_TYPE)=1" \
|
|
"Chip type" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_ADVANCED_CHIP=$(CFG_SOCT_ADVANCED_CHIP)" \
|
|
"Advanced Chip" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_T9_FPGA=$(CFG_SOCT_T9_FPGA)" \
|
|
"t9 FPGA" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_REVERSION), reserved19_b reserved17_d), )
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_REVERSION_SLS_B=y" \
|
|
"RESERVED19_B reversion" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_SOCT_CHIP_REVERSION), reserved19_c)
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_REVERSION_SLS_C=y" \
|
|
"RESERVED19_C reversion" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_SOCT_CHIP_REVERSION), hi3751v811_c)
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_REVERSION_SLS_C=y" \
|
|
"HI3751V811_C reversion" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_SOCT_CPU_ARCH), arm64)
|
|
@$(EXPORT_CONFIG) "CONFIG_CPU_ARCH_ARM64=$(CFG_SOCT_CPU_ARCH)" \
|
|
"CPU ARCH" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_SOCT_FORCE_ENV_TO_MEDIA), y)
|
|
ifeq ($(CFG_FORCE_ENV_IN_NAND), y)
|
|
@$(EXPORT_CONFIG) "CONFIG_FORCE_ENV_IN_NAND=$(CFG_FORCE_ENV_IN_NAND)" \
|
|
"Force env to Nand" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_FORCE_ENV_IN_SPI), y)
|
|
@$(EXPORT_CONFIG) "CONFIG_FORCE_ENV_IN_SPI=$(CFG_FORCE_ENV_IN_SPI)" \
|
|
"Force env to SPI Flash " $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_FORCE_ENV_IN_EMMC), y)
|
|
@$(EXPORT_CONFIG) "CONFIG_FORCE_ENV_IN_EMMC=$(CFG_FORCE_ENV_IN_EMMC)" \
|
|
"Force env to eMMC" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
endif
|
|
ifeq ($(CFG_SOCT_GPIO_LIGHT_SUPPORT), y)
|
|
@$(EXPORT_CONFIG) "CONFIG_GPIO_LIGHT_SET=$(CFG_SOCT_GPIO_LIGHT_SET)" \
|
|
"Gpio Light config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_BOARDID_DEBUG=$(CFG_SOCT_BOARDID_DEBUG)" \
|
|
"Boardid debug" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_BOARDID_DEBUG_VALUE=$(CFG_SOCT_BOARDID_DEBUG_VALUE)" \
|
|
"Boardid debug value" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_ABORTBOOT_OFF=$(CFG_SOCT_ABORTBOOT_OFF)" \
|
|
"No abortboot" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_FPGA=$(ENABLE_FPGA)" \
|
|
"Current is fpga config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_AVS_SUPPORT=$(CFG_SOCT_AVS_SUPPORT)" \
|
|
"AVS config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_PMU_DEVICE=$(CFG_SOCT_PMU_DEVICE_SELECT)" \
|
|
"PMU Device config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_USB_SUPPORT=$(CFG_SOCT_BOOT_USB_SUPPORT)" \
|
|
"USB Driver config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_HSL_SUPPORT=$(CFG_SOCT_BOOT_HSL_SUPPORT)" \
|
|
"HSL area support" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_TEE_SUPPORT=$(CFG_SOCT_TEE_SUPPORT)" \
|
|
"TEE config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_TEE_ATF_SUPPORT=$(CFG_SOTC_TEE_ATF_SUPPORT)" \
|
|
"TEE ATF config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
# @$(EXPORT_CONFIG) "CONFIG_TEE_MEM_LAYOUT_$(CFG_SOCT_TVP_MEM_LAYOUT)=y" \
|
|
# "TEE Memory Layout config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_ARM64_TOOLCHAINS=$(SOCT_KERNEL_TOOLCHAINS_NAME)" \
|
|
"ARM64 toolchains config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_ARM64_SUPPORT=$(CONFIG_ARM64_SUPPORT)" \
|
|
"ARM64 support config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_DISABLE_CONSOLE_INPUT=$(CFG_SOCT_USER_MODE)" \
|
|
"Disable console input" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_ENABLE_CONSOLE_OUTPUT=$(CFG_SOCT_BOOT_LOG_SUPPORT)" \
|
|
"Enable console output" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SBL_VXX_UXX=$(SBL_VXX_UXX)" \
|
|
"Second boot config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SUPPORT_BOOTLOG_RSVD=$(CFG_SOCT_SUPPORT_BOOTLOG_RSVD)" \
|
|
"bootlog reserved config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_BOOTLOG_RSVD_SIZE=$(CFG_SOCT_BOOTLOG_RSVD_SIZE)" \
|
|
"bootlog reserved size config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_HHEE_SUPPORT=$(CFG_SOCT_HHEE_SUPPORT)" \
|
|
"hhee boot up support config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_HHEE_BASE=$(CFG_SOCT_HHEE_BASE)" \
|
|
"hhee base address config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_HHEE_SIZE=$(CFG_SOCT_HHEE_SIZE)" \
|
|
"hhee reserved size config" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_ADVCA_SM_SUPPORT=$(CFG_SOCT_ADVCA_SM_SUPPORT)" \
|
|
"Enable SM encryption feature" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
ifeq ($(CFG_SOCT_UNIFIED_IMAGE_SUPPORT), y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_UNIFIED_IMAGE_SUPPORT=$(CFG_SOCT_UNIFIED_IMAGE_SUPPORT)" \
|
|
"Support unified image with DTS" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
|
|
ifeq ($(CFG_SOCT_BUILD_WITH_PMOC), y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_BUILD_WITH_PMOC=$(CFG_SOCT_BUILD_WITH_PMOC)" \
|
|
"Support building pmoc " $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
|
|
#+++++++++++++++++++++ADVCA compile options+++++++++++++++++++++++++++++++++++++++++++++
|
|
ifneq ($(BOOT_ADVCA_PROGRAMMER),y)
|
|
ifeq ($(CFG_SOCT_ADVCA_SUPPORT),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SUPPORT_CA=$(CFG_SOCT_ADVCA_TYPE)" \
|
|
"CA type" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
@$(EXPORT_CONFIG) "CONFIG_SUPPORT_CA_$(CFG_SOCT_ADVCA_TYPE)=y" \
|
|
"CA type" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
|
|
ifeq ($(findstring -DSOCT_ADVCA_FUNCTION_RELEASE,$(CFG_SOCT_CFLAGS)),-DSOCT_ADVCA_FUNCTION_RELEASE)
|
|
@$(EXPORT_CONFIG) "CONFIG_SUPPORT_CA_RELEASE=y" \
|
|
"CA relase" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
|
|
ifeq ($(findstring -DSOCT_ADVCA_FUNCTION_DEBUG,$(CFG_SOCT_CFLAGS)),-DSOCT_ADVCA_FUNCTION_DEBUG)
|
|
@$(EXPORT_CONFIG) "CONFIG_SUPPORT_CA_DEBUG=y" \
|
|
"CA debug" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(CFG_SOCT_AVB_ENABLE),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SUPPORT_AVB=y" \
|
|
"Support AVB" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
ifeq ($(CFG_SOCT_RECOVERY_BACKUP),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_RECOVERY_BACKUP=y" \
|
|
"support recovery backup" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(CFG_IMAGE_ENCRYPT),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SUPPORT_IMAGE_ENCRYPT=y" \
|
|
"Support IMAGE_ENCRYPT" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
|
|
ifeq ($(CFG_SOCT_BOOT_COMPRESSED),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_COMPRESS_BOOT=$(CFG_SOCT_BOOT_COMPRESSED)" \
|
|
"Compress boot" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
|
|
ifeq ($(CFG_SOCT_ITRUSTEE_SUPPORT),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_ITRUSTEE_SUPPORT=$(CFG_SOCT_ITRUSTEE_SUPPORT)" \
|
|
"Compress boot" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
|
|
ifeq ($(CFG_SOCT_TWOSTAGEBOOT_SUPPORT),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_TWOSTAGEBOOT=y" \
|
|
"Support two stage boot" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
ifeq ($(CFG_SOCT_BOOT_FBL),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_FBL=y" \
|
|
"Support two stage boot FBL" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
ifeq ($(CFG_SOCT_FBL_SUPPORT),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SOCT_FBL_SUPPORT=y" \
|
|
"Support load dtb in SBL" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
|
|
ifeq ($(CFG_SOCT_BOOT_SBL),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SBL=y" \
|
|
"Support two stage boot SBL" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
|
|
ifeq ($(CFG_SOCT_BOOT_SBL),y)
|
|
ifneq ($(CFG_SOCT_BOOT_PROGRAMMER),y)
|
|
@$(EXPORT_CONFIG) "CONFIG_SBL_NO_MULTIREG=y" \
|
|
"Support two stage boot SBL complie no mutil reg" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
endif
|
|
|
|
else # one stage u-boot process
|
|
@$(EXPORT_CONFIG) "CONFIG_BOOT_ONESTAGE=y" \
|
|
"Support one stage u-boot" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
$(EXPORT_CONFIG) "CONFIG_UNIFIED_BOOT= $(CONFIG_UNIFIED_BOOT)" \
|
|
"Unified boot" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
ifneq ($(CFG_SOCT_BOARDID_INFO_NAME), )
|
|
$(EXPORT_CONFIG) "CONFIG_BOARDID_MAP=\"$(UBOOT_BUILD_DIR)/$(CFG_SOCT_BOARDID_INFO_NAME)\"" \
|
|
"default board map" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
endif
|
|
$(EXPORT_CONFIG) "CONFIG_BOOTREG_DEFAULT=\"$(UBOOT_BUILD_DIR)/$(CFG_SOCT_BOOT_REG_NAME)\"" \
|
|
"default boot reg" $(UBOOT_CONFIG_INCLUDE).tmp
|
|
$(call BOOT_REG_DEF,0)
|
|
$(call BOOT_REG_DEF,1)
|
|
$(call BOOT_REG_DEF,2)
|
|
$(call BOOT_REG_DEF,3)
|
|
$(call BOOT_REG_DEF,4)
|
|
$(call BOOT_REG_DEF,5)
|
|
$(call BOOT_REG_DEF,6)
|
|
$(call BOOT_REG_DEF,7)
|
|
$(call BOOT_REG_DEF,8)
|
|
$(call BOOT_REG_DEF,9)
|
|
$(call BOOT_REG_DEF,10)
|
|
$(call BOOT_REG_DEF,11)
|
|
$(call BOOT_REG_DEF,12)
|
|
$(call BOOT_REG_DEF,13)
|
|
$(call BOOT_REG_DEF,14)
|
|
$(call BOOT_REG_DEF,15)
|
|
$(call BOOT_REG_DEF,16)
|
|
$(call BOOT_REG_DEF,17)
|
|
$(call BOOT_REG_DEF,18)
|
|
$(call BOOT_REG_DEF,19)
|
|
$(call BOOT_REG_DEF,20)
|
|
$(call BOOT_REG_DEF,21)
|
|
$(call BOOT_REG_DEF,22)
|
|
$(call BOOT_REG_DEF,23)
|
|
$(call BOOT_REG_DEF,24)
|
|
$(call BOOT_REG_DEF,25)
|
|
$(call BOOT_REG_DEF,26)
|
|
$(call BOOT_REG_DEF,27)
|
|
$(call BOOT_REG_DEF,28)
|
|
$(call BOOT_REG_DEF,29)
|
|
$(call BOOT_REG_DEF,30)
|
|
$(call BOOT_REG_DEF,31)
|
|
|
|
if [ -f $(UBOOT_CONFIG_INCLUDE) ]; then \
|
|
cmp -s $(UBOOT_CONFIG_INCLUDE) $(UBOOT_CONFIG_INCLUDE).tmp || \
|
|
cp -fv $(UBOOT_CONFIG_INCLUDE).tmp $(UBOOT_CONFIG_INCLUDE); \
|
|
else \
|
|
cp -fv $(UBOOT_CONFIG_INCLUDE).tmp $(UBOOT_CONFIG_INCLUDE); \
|
|
fi
|
|
|
|
endif
|
|
|
|
################################################################################
|
|
# deal uboot dynamic config #
|
|
################################################################################
|
|
|
|
# $(call kconfig-enable,CONFIGS,config-file)
|
|
kconfig-enable = for ix in $1; do ( \
|
|
/bin/bash $(UBOOT_SRC_DIR_SELF)/scripts/config --file $2 --enable $${ix}; ) done
|
|
|
|
# $(call kconfig-module,CONFIGS,config-file)
|
|
kconfig-module = for ix in $1; do ( \
|
|
/bin/bash $(UBOOT_SRC_DIR_SELF)/scripts/config --file $2 --module $${ix}; ) done
|
|
|
|
# $(call kconfig-disable,CONFIGS,config-file)
|
|
kconfig-disable = for ix in $1; do ( \
|
|
/bin/bash $(UBOOT_SRC_DIR_SELF)/scripts/config --file $2 --disable $${ix}; ) done
|
|
|
|
# $(call kconfig-value,KEY VALUE,config-file)
|
|
kconfig-value = /bin/bash $(UBOOT_SRC_DIR_SELF)/scripts/config --file $2 --set-val $1
|
|
|
|
# $(call uboot-kconfig-change,kconfig-file)
|
|
define uboot-kconfig-change
|
|
if [ "$(CFG_SOCT_NAND_FLASH_SUPPORT)" = "y" ]; then ( \
|
|
$(call kconfig-enable,CONFIG_MTD,$(1)); \
|
|
$(call kconfig-enable,CONFIG_MTD_RAW_NAND,$(1)); \
|
|
) fi
|
|
$(call kconfig-value, CONFIG_ENV_OFFSET $(CFG_SOCT_BOOT_ENV_STARTADDR),$(1)); \
|
|
$(call kconfig-value, CONFIG_ENV_SIZE $(CFG_SOCT_BOOT_ENV_SIZE),$(1));
|
|
endef
|
|
|
|
.PHONY: fastboot-burn.bin fastboot-prepare clean boot_clean prepare
|
|
|
|
all: fastboot-burn.bin
|
|
|
|
fastboot-prepare: copy_securec prepare $(UBOOT_CONFIG_INCLUDE)
|
|
test -d $(UBOOT_BUILD_DIR) || mkdir -p $(UBOOT_BUILD_DIR)
|
|
ifeq ($(CFG_SOCT_TWOSTAGEBOOT_SUPPORT),y)
|
|
ifeq ($(CFG_SOCT_BOOT_FBL),y)
|
|
cp -rf $(UBOOT_SRC_DIR_SELF)/configs/$(PLATFORM)_fbl_defconfig $(UBOOT_BUILD_DIR)/.config
|
|
endif
|
|
ifeq ($(CFG_SOCT_BOOT_SBL),y)
|
|
cp -rf $(UBOOT_SRC_DIR_SELF)/configs/$(UBOOT_DEFCONFIG_FILE) $(UBOOT_BUILD_DIR)/.config
|
|
endif
|
|
else
|
|
cp -rf $(UBOOT_SRC_DIR_SELF)/configs/$(UBOOT_DEFCONFIG_FILE) $(UBOOT_BUILD_DIR)/.config
|
|
endif
|
|
$(MAKE) CROSS_COMPILE=$(CROSS_COMPILE32) -C $(UBOOT_SRC_DIR) VENDOR_ROOT_DIR=$(VENDOR_DIR) SDK_DIR=$(app_srctree) O=$(UBOOT_BUILD_DIR) prepare
|
|
$(call uboot-kconfig-change, $(UBOOT_BUILD_DIR)/.config)
|
|
|
|
|
|
fastboot-burn.bin: fastboot-prepare
|
|
ifneq ($(BOOTLOADER_DRIVERS_SOURCE_DIR),)
|
|
$(MAKE) CROSS_COMPILE=$(CROSS_COMPILE32) $(MKFLAGS) -C $(UBOOT_BUILD_DIR) VENDOR_ROOT_DIR=$(VENDOR_DIR) SDK_DIR=$(app_srctree) O= $(BOOTLOADER_DRIVERS_SOURCE_DIR)
|
|
else
|
|
$(MAKE) CROSS_COMPILE=$(CROSS_COMPILE32) $(MKFLAGS) -C $(UBOOT_BUILD_DIR) DEVICE_TREE=$(CFG_DEVICE_TREE_NAME) VENDOR_ROOT_DIR=$(VENDOR_DIR) SDK_DIR=$(app_srctree) OPEN_SOURCE_DIR=$(VENDOR_OPEN_SOURCE_DIR) O= all $(UBOOT_CONFIG_FILE)
|
|
ifeq ($(CFG_SOCT_TWOSTAGEBOOT_SUPPORT),y)
|
|
cat $(UBOOT_BUILD_DIR)/u-boot.bin $(SOCT_SDK_BINARY_DIR)/bootloader/step0/step0.bin > $(UBOOT_BUILD_DIR)/u-boot-tmp.bin
|
|
ifeq ($(CFG_SOCT_BOOT_FBL),y)
|
|
cp -rf $(UBOOT_BUILD_DIR)/u-boot-tmp.bin $(UBOOT_BUILD_DIR)/fastboot-burn.bin
|
|
$(call copy_image,$(UBOOT_BUILD_DIR)/fastboot-burn.bin,,$(IMAGE_DIR))
|
|
endif
|
|
ifeq ($(CFG_SOCT_BOOT_SBL),y)
|
|
cp -rf $(UBOOT_BUILD_DIR)/u-boot.bin $(UBOOT_BUILD_DIR)/sbl.bin
|
|
$(call copy_image,$(UBOOT_BUILD_DIR)/sbl.bin,,$(IMAGE_DIR))
|
|
ifeq ($(CFG_SOCT_FBL_SUPPORT), y)
|
|
cp -rf $(UBOOT_BUILD_DIR)/u-boot-tmp.bin $(UBOOT_BUILD_DIR)/programmer.bin
|
|
$(call copy_image,$(UBOOT_BUILD_DIR)/programmer.bin,,$(IMAGE_DIR))
|
|
endif
|
|
endif
|
|
else
|
|
cp -rf $(UBOOT_BUILD_DIR)/u-boot.bin $(UBOOT_BUILD_DIR)/fastboot-burn.bin
|
|
ifeq ($(CFG_SOCT_FBL_SUPPORT), y)
|
|
cp -fv $(UBOOT_BUILD_DIR)/fastboot-burn.bin $(IMAGE_DIR)/programmer.bin
|
|
cp -fv $(UBOOT_BUILD_DIR)/fastboot-burn.bin $(IMAGE_DIR)/sbl.bin
|
|
else
|
|
$(call copy_image,$(UBOOT_BUILD_DIR)/fastboot-burn.bin,,$(IMAGE_DIR))
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
FBL_DIR = $(VENDOR_DIR)/huanglong/bootloader/source/firstboot
|
|
FBL_VERSION = 0
|
|
FBL_VERSION_MASK=0xFFFFFFFF
|
|
FBL_TARGET = fbl.bin
|
|
#BOOTCONFIG = s5
|
|
FBL_CONFIG_FILE = $(FBL_DIR)/include/s5_config.h
|
|
|
|
FBL_BUILD_DIR = $(FBL_DIR)
|
|
ifneq ($(O),)
|
|
FBL_BUILD_DIR := $(O)/firstboot
|
|
endif
|
|
|
|
$(FBL_CONFIG_FILE):
|
|
@test ! -f $(FBL_CONFIG_FILE) || rm -rvf $(FBL_CONFIG_FILE)
|
|
touch $(FBL_CONFIG_FILE)
|
|
|
|
copy_code: $(FBL_CONFIG_FILE)
|
|
ifeq ($(CFG_SOCT_FBL_SUPPORT), y)
|
|
cp -rf $(FBL_DIR) $(O)
|
|
endif
|
|
|
|
CONFIG_EXTERN_FLAGS := \
|
|
CONFIG_FBL=y \
|
|
$(if $(CFG_SOCT_SDK_VERSION),SDK_VERSION_STRING=\"$(CFG_SOCT_SDK_VERSION)\",) \
|
|
$(if $(CFG_SOCT_NAND_SUPPORT),CONFIG_GENERIC_NAND=$(CFG_SOCT_NAND_SUPPORT),) \
|
|
$(if $(CFG_SOCT_SPI_NAND_SUPPORT),CONFIG_GENERIC_SPI_NAND=$(CFG_SOCT_SPI_NAND_SUPPORT),) \
|
|
$(if $(CFG_SOCT_SPI_SUPPORT),CONFIG_GENERIC_SFC=$(CFG_SOCT_SPI_SUPPORT),) \
|
|
$(if $(CFG_SOCT_EMMC_SUPPORT),CONFIG_GENERIC_MMC=$(CFG_SOCT_EMMC_SUPPORT),) \
|
|
$(if $(CFG_SOCT_UFS_SUPPORT),CONFIG_GENERIC_UFS=$(CFG_SOCT_UFS_SUPPORT),) \
|
|
$(if $(CFG_SOCT_CHIP_TYPE),CONFIG_CHIP_TYPE=$(CFG_SOCT_CHIP_TYPE),) \
|
|
$(if $(CFG_SOCT_CHIP_TYPE),CHIP_TYPE_$(CFG_SOCT_CHIP_TYPE)=1,) \
|
|
$(if $(CFG_SOCT_BOOT_FLASH_BASE),CFG_SOCT_BOOT_FLASH_BASE=$(CFG_SOCT_BOOT_FLASH_BASE),) \
|
|
$(if $(CFG_SOCT_BOOTB_FLASH_BASE),CFG_SOCT_BOOTB_FLASH_BASE=$(CFG_SOCT_BOOTB_FLASH_BASE),) \
|
|
$(if $(CFG_SOCT_BOOT_ENV_SIZE),CFG_SOCT_BOOT_ENV_SIZE=$(CFG_SOCT_BOOT_ENV_SIZE),) \
|
|
$(if $(CFG_SOCT_BOOT_ENV_STARTADDR),CFG_SOCT_BOOT_ENV_STARTADDR=$(CFG_SOCT_BOOT_ENV_STARTADDR),) \
|
|
$(if $(CFG_SOCT_BOOT_ENV_STARTADDR_BAKUP),CFG_SOCT_BOOT_ENV_STARTADDR_BAKUP=$(CFG_SOCT_BOOT_ENV_STARTADDR_BAKUP),) \
|
|
$(if $(CONFIG_UNIFIED_BOOT),CONFIG_SOCT_UNIFIED_IMAGE_SUPPORT=$(CONFIG_UNIFIED_BOOT)) \
|
|
$(if $(CONFIG_BOOTREG_DEFAULT),CONFIG_BOOTREG_DEFAULT=\"$(FBL_BUILD_DIR)/$(CONFIG_BOOTREG_DEFAULT)\") \
|
|
$(if $(FBL_VERSION),CONFIG_FBL_VERSION=$(FBL_VERSION)) \
|
|
$(if $(FBL_VERSION_MASK),CONFIG_FBL_VERSION_MASK=$(FBL_VERSION_MASK)) \
|
|
$(if $(CFG_SOCT_AB_STARTUP_SUPPORT),CFG_SOCT_AB_STARTUP_SUPPORT=$(CFG_SOCT_AB_STARTUP_SUPPORT),) \
|
|
$(if $(CFG_SOCT_SCS_VERIFY_DEBUG),CFG_SOCT_SCS_VERIFY_DEBUG=$(CFG_SOCT_SCS_VERIFY_DEBUG),) \
|
|
$(if $(CFG_SOCT_FBL_BOOTARGS_SUPPORT),CFG_SOCT_FBL_BOOTARGS_SUPPORT=$(CFG_SOCT_FBL_BOOTARGS_SUPPORT),)
|
|
|
|
CONFIG_EXTERN_FLAGS += \
|
|
BOOT_REG=\"$(CONFIG_SYSREG0)\"\
|
|
USER_REG=\"$(CONFIG_USERREG0)\" \
|
|
BOOT_REG0=\"$(CONFIG_SYSREG0)\" \
|
|
$(if $(CONFIG_SYSREG1),BOOT_REG1=\"$(CONFIG_SYSREG1)\", BOOT_REG1=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG2),BOOT_REG2=\"$(CONFIG_SYSREG2)\", BOOT_REG2=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG3),BOOT_REG3=\"$(CONFIG_SYSREG3)\", BOOT_REG3=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG4),BOOT_REG4=\"$(CONFIG_SYSREG4)\", BOOT_REG4=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG5),BOOT_REG5=\"$(CONFIG_SYSREG5)\", BOOT_REG5=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG6),BOOT_REG6=\"$(CONFIG_SYSREG6)\", BOOT_REG6=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG7),BOOT_REG7=\"$(CONFIG_SYSREG7)\", BOOT_REG7=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG8),BOOT_REG8=\"$(CONFIG_SYSREG8)\", BOOT_REG8=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG9),BOOT_REG9=\"$(CONFIG_SYSREG9)\", BOOT_REG9=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG10),BOOT_REG10=\"$(CONFIG_SYSREG10)\", BOOT_REG10=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG11),BOOT_REG11=\"$(CONFIG_SYSREG11)\", BOOT_REG11=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG12),BOOT_REG12=\"$(CONFIG_SYSREG12)\", BOOT_REG12=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG13),BOOT_REG13=\"$(CONFIG_SYSREG13)\", BOOT_REG13=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG14),BOOT_REG14=\"$(CONFIG_SYSREG14)\", BOOT_REG14=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG15),BOOT_REG15=\"$(CONFIG_SYSREG15)\", BOOT_REG15=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG16),BOOT_REG16=\"$(CONFIG_SYSREG16)\", BOOT_REG16=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG17),BOOT_REG17=\"$(CONFIG_SYSREG17)\", BOOT_REG17=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG18),BOOT_REG18=\"$(CONFIG_SYSREG18)\", BOOT_REG18=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG19),BOOT_REG19=\"$(CONFIG_SYSREG19)\", BOOT_REG19=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG20),BOOT_REG20=\"$(CONFIG_SYSREG20)\", BOOT_REG20=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG21),BOOT_REG21=\"$(CONFIG_SYSREG21)\", BOOT_REG21=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG22),BOOT_REG22=\"$(CONFIG_SYSREG22)\", BOOT_REG22=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG23),BOOT_REG23=\"$(CONFIG_SYSREG23)\", BOOT_REG23=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG24),BOOT_REG24=\"$(CONFIG_SYSREG24)\", BOOT_REG24=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG25),BOOT_REG25=\"$(CONFIG_SYSREG25)\", BOOT_REG25=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG26),BOOT_REG26=\"$(CONFIG_SYSREG26)\", BOOT_REG26=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG27),BOOT_REG27=\"$(CONFIG_SYSREG27)\", BOOT_REG27=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG28),BOOT_REG28=\"$(CONFIG_SYSREG28)\", BOOT_REG28=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG29),BOOT_REG29=\"$(CONFIG_SYSREG29)\", BOOT_REG29=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG30),BOOT_REG30=\"$(CONFIG_SYSREG30)\", BOOT_REG30=\"$(CONFIG_SYSREG0)\") \
|
|
$(if $(CONFIG_SYSREG31),BOOT_REG31=\"$(CONFIG_SYSREG31)\", BOOT_REG31=\"$(CONFIG_SYSREG0)\")
|
|
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE),reserved13 reserved9 reserved6 reserved8),)
|
|
ifneq ($(CFG_SOCT_BOARDID_INFO_NAME), )
|
|
CONFIG_EXTERN_FLAGS += CONFIG_BOARDID_MAP=\"$(FBL_BUILD_DIR)/$(CFG_SOCT_BOARDID_INFO_NAME)\"
|
|
endif
|
|
CONFIG_EXTERN_FLAGS += CONFIG_SOCT_CHIP_REVERSION=$(CFG_SOCT_CHIP_REVERSION)
|
|
endif
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_REVERSION), reserved19_b reserved17_d), )
|
|
CONFIG_EXTERN_FLAGS += CONFIG_SOCT_REVERSION_SLS_B=y
|
|
endif
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_REVERSION), "reserved19_c"),)
|
|
CONFIG_EXTERN_FLAGS += CONFIG_SOCT_REVERSION_SLS_C=y
|
|
endif
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_REVERSION), "hi3751v811_c"),)
|
|
CONFIG_EXTERN_FLAGS += CONFIG_SOCT_REVERSION_SLS_C=y
|
|
endif
|
|
ifeq ($(CFG_SOCT_UEFIBOOT_SUPPORT),y)
|
|
CONFIG_EXTERN_FLAGS += CONFIG_SOCT_UEFIBOOT_SUPPORT=\"$(CFG_SOCT_UEFIBOOT_SUPPORT)\"
|
|
endif
|
|
|
|
ifeq ($(CFG_SOCT_TEE_SUPPORT),y)
|
|
CONFIG_EXTERN_FLAGS += CONFIG_SOCT_TEE_SUPPORT=\"$(CFG_SOCT_TEE_SUPPORT)\"
|
|
endif
|
|
|
|
CONFIG_EXTERN_FLAGS += \
|
|
BOOT_USRREG0=\"$(CONFIG_USERREG0)\" \
|
|
$(if $(CONFIG_USERREG1),BOOT_USRREG1=\"$(CONFIG_USERREG1)\", BOOT_USRREG1=\"$(CONFIG_USERREG0)\") \
|
|
$(if $(CONFIG_USERREG2),BOOT_USRREG2=\"$(CONFIG_USERREG2)\", BOOT_USRREG2=\"$(CONFIG_USERREG0)\") \
|
|
$(if $(CONFIG_USERREG3),BOOT_USRREG3=\"$(CONFIG_USERREG3)\", BOOT_USRREG3=\"$(CONFIG_USERREG0)\") \
|
|
$(if $(CONFIG_USERREG4),BOOT_USRREG4=\"$(CONFIG_USERREG4)\", BOOT_USRREG4=\"$(CONFIG_USERREG0)\") \
|
|
$(if $(CONFIG_USERREG5),BOOT_USRREG5=\"$(CONFIG_USERREG5)\", BOOT_USRREG5=\"$(CONFIG_USERREG0)\") \
|
|
$(if $(CONFIG_USERREG6),BOOT_USRREG6=\"$(CONFIG_USERREG6)\", BOOT_USRREG6=\"$(CONFIG_USERREG0)\") \
|
|
$(if $(CONFIG_USERREG7),BOOT_USRREG7=\"$(CONFIG_USERREG7)\", BOOT_USRREG7=\"$(CONFIG_USERREG0)\")
|
|
|
|
fbl_preapre: $(SYSREG0) $(FBL_CONFIG_FILE) $(if $(O), copy_code,)
|
|
$(info $(O))
|
|
$(AT)rm -f $(FBL_BUILD_DIR)/*.reg
|
|
cp -rf $(PLATFORM_DIR)/secure_c/ $(FBL_BUILD_DIR)/libs/
|
|
cp -rf $(FBL_BUILD_DIR)/libs/Makefile_secure $(FBL_BUILD_DIR)/libs/secure_c/source/Makefile
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE), reserved5 reserved19 reserved17), )
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_REVERSION), "reserved19_c"),)
|
|
$(AT)cp -f $(SOCT_SDK_BINARY_DIR)/bootloader/sysreg/$(PRODUCT_DEVICE)/reserved19/auxcode_c_sign.img $(FBL_BUILD_DIR)/auxcode_sign.img
|
|
$(AT)cp -f $(SOCT_SDK_BINARY_DIR)/bootloader/sysreg/$(PRODUCT_DEVICE)/reserved19/Auxcodekey.img $(FBL_BUILD_DIR)/Auxcodekey.img
|
|
else
|
|
$(AT)cp -f $(SOCT_SDK_BINARY_DIR)/bootloader/sysreg/$(PRODUCT_DEVICE)/reserved19/auxcode_sign.img $(FBL_BUILD_DIR)/auxcode_sign.img
|
|
endif
|
|
endif
|
|
ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE), hi3751v811), )
|
|
$(AT)cp -f $(SOCT_SDK_BINARY_DIR)/bootloader/sysreg/$(PRODUCT_DEVICE)/$(CFG_SOCT_CHIP_TYPE)/auxcode_c_sign.img $(FBL_BUILD_DIR)/auxcode_sign.img
|
|
$(AT)cp -f $(SOCT_SDK_BINARY_DIR)/bootloader/sysreg/$(PRODUCT_DEVICE)/$(CFG_SOCT_CHIP_TYPE)/Auxcodekey.img $(FBL_BUILD_DIR)/Auxcodekey.img
|
|
endif
|
|
$(call copy_image,$(PLATFORM_IMAGE),,$(FBL_BUILD_DIR)/arm/reserved13/boot/)
|
|
ifneq ($(CFG_SOCT_BOARDID_INFO_NAME), )
|
|
cp -fv $(CONFIG_BOARDID_MAP) $(FBL_BUILD_DIR)
|
|
endif
|
|
|
|
ifeq ($(CONFIG_UNIFIED_BOOT), y)
|
|
ifneq ($(strip $(CONFIG_SYSREG0)),)
|
|
cp -fv $(SYSREG0) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG1)),)
|
|
cp -fv $(SYSREG1) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG2)),)
|
|
$(AT)cp -fv $(SYSREG2) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG3)),)
|
|
$(AT)cp -fv $(SYSREG3) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG4)),)
|
|
$(AT)cp -fv $(SYSREG4) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG5)),)
|
|
$(AT)cp -fv $(SYSREG5) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG6)),)
|
|
$(AT)cp -fv $(SYSREG6) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG7)),)
|
|
$(AT)cp -fv $(SYSREG7) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG8)),)
|
|
$(AT)cp -fv $(SYSREG8) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG9)),)
|
|
$(AT)cp -fv $(SYSREG9) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG10)),)
|
|
$(AT)cp -fv $(SYSREG10) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG11)),)
|
|
$(AT)cp -fv $(SYSREG11) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG12)),)
|
|
$(AT)cp -fv $(SYSREG12) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG13)),)
|
|
$(AT)cp -fv $(SYSREG13) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG14)),)
|
|
$(AT)cp -fv $(SYSREG14) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG15)),)
|
|
$(AT)cp -fv $(SYSREG15) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG16)),)
|
|
$(AT)cp -fv $(SYSREG16) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG17)),)
|
|
$(AT)cp -fv $(SYSREG17) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG18)),)
|
|
$(AT)cp -fv $(SYSREG18) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG19)),)
|
|
$(AT)cp -fv $(SYSREG19) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG20)),)
|
|
$(AT)cp -fv $(SYSREG20) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG21)),)
|
|
$(AT)cp -fv $(SYSREG21) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG22)),)
|
|
$(AT)cp -fv $(SYSREG22) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG23)),)
|
|
$(AT)cp -fv $(SYSREG23) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG24)),)
|
|
$(AT)cp -fv $(SYSREG24) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG25)),)
|
|
$(AT)cp -fv $(SYSREG25) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG26)),)
|
|
$(AT)cp -fv $(SYSREG26) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG27)),)
|
|
$(AT)cp -fv $(SYSREG27) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG28)),)
|
|
$(AT)cp -fv $(SYSREG28) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG29)),)
|
|
$(AT)cp -fv $(SYSREG29) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG30)),)
|
|
$(AT)cp -fv $(SYSREG30) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_SYSREG31)),)
|
|
$(AT)cp -fv $(SYSREG31) $(FBL_BUILD_DIR)
|
|
endif
|
|
else
|
|
$(AT)cp -fv $(SYSREG0) $(FBL_BUILD_DIR)
|
|
endif
|
|
|
|
ifeq ($(CONFIG_UNIFIED_BOOT), y)
|
|
ifneq ($(strip $(CONFIG_USERREG0)),)
|
|
cp -fv $(USRREG0) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG1)),)
|
|
cp -fv $(USRREG1) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG2)),)
|
|
$(AT)cp -fv $(USRREG2) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG3)),)
|
|
$(AT)cp -fv $(USRREG3) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG4)),)
|
|
$(AT)cp -fv $(USRREG4) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG5)),)
|
|
$(AT)cp -fv $(USRREG5) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG6)),)
|
|
$(AT)cp -fv $(USRREG6) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG7)),)
|
|
$(AT)cp -fv $(USRREG7) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG8)),)
|
|
$(AT)cp -fv $(USRREG8) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG9)),)
|
|
$(AT)cp -fv $(USRREG9) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG10)),)
|
|
$(AT)cp -fv $(USRREG10) $(FBL_BUILD_DIR)
|
|
endif
|
|
ifneq ($(strip $(CONFIG_USERREG11)),)
|
|
$(AT)cp -fv $(USRREG11) $(FBL_BUILD_DIR)
|
|
endif
|
|
else
|
|
$(AT)cp -fv $(USRREG0) $(FBL_BUILD_DIR)
|
|
endif
|
|
|
|
fbl: fbl_preapre
|
|
make -C $(FBL_BUILD_DIR) $(MKFLAGS) $(CONFIG_EXTERN_FLAGS) $(subst _config,,$(CFG_SOCT_FBL_CFG)) -j1
|
|
ifneq ($(IMAGE_DIR),)
|
|
$(AT)cp -fv $(FBL_BUILD_DIR)/$(FBL_TARGET) $(IMAGE_DIR)
|
|
endif
|
|
$(AT)test -d $(IMAGE_DIR)/ || mkdir -p $(IMAGE_DIR)/
|
|
$(AT)cp -fv $(FBL_BUILD_DIR)/$(FBL_TARGET) $(IMAGE_DIR)/fastboot-burn.bin
|
|
|
|
fbl_clean:
|
|
-$(AT)rm -f $(IMAGE_DIR)/fastboot-burn.bin
|
|
ifeq ($(O),)
|
|
make -C $(FBL_BUILD_DIR) $(MKFLAGS) distclean
|
|
-$(AT)rm -f $(FBL_BUILD_DIR)/*.reg
|
|
else
|
|
-$(AT)rm -rf $(FBL_BUILD_DIR)
|
|
endif
|
|
|
|
clean: boot_clean $(if $(CFG_SOCT_FBL_SUPPORT),fbl_clean,)
|
|
boot_clean:
|
|
rm -rf $(UBOOT_BUILD_DIR)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
###################################################################
|