Commit 728c8689 authored by Josua Mayer's avatar Josua Mayer

fix build errors for secure-boot

parent 04c6e27c
From e059118a70890994b89886bdc0fa82978508e0f8 Mon Sep 17 00:00:00 2001
From: Josua Mayer <josua@solid-run.com>
Date: Wed, 25 Oct 2023 11:26:41 +0200
Subject: [PATCH] lx2160acex7: regenerate defconfigs
regenerate lx2160a cex7 defconfigs with "make savedefconfig",
and synchronise secure variant with recent non-secure changes.
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
configs/lx2160acex7_tfa_SECURE_BOOT_defconfig | 64 ++++++++++---------
configs/lx2160acex7_tfa_defconfig | 40 +++---------
2 files changed, 44 insertions(+), 60 deletions(-)
diff --git a/configs/lx2160acex7_tfa_SECURE_BOOT_defconfig b/configs/lx2160acex7_tfa_SECURE_BOOT_defconfig
index 59298de9ac..044b52c3fd 100644
--- a/configs/lx2160acex7_tfa_SECURE_BOOT_defconfig
+++ b/configs/lx2160acex7_tfa_SECURE_BOOT_defconfig
@@ -1,94 +1,100 @@
CONFIG_ARM=y
+CONFIG_GIC_V3_ITS=y
CONFIG_TARGET_LX2160ACEX7=y
CONFIG_TFABOOT=y
CONFIG_SYS_TEXT_BASE=0x82000000
CONFIG_SYS_MALLOC_F_LEN=0x6000
-CONFIG_NXP_ESBC=y
+CONFIG_NR_DRAM_BANKS=3
CONFIG_ENV_SIZE=0x2000
+CONFIG_NXP_ESBC=y
+CONFIG_DM_GPIO=y
CONFIG_FSPI_AHB_EN_4BYTE=y
-CONFIG_NR_DRAM_BANKS=3
CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-cex7"
CONFIG_AHCI=y
+CONFIG_OF_BOARD_FIXUP=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-# Uncomment the following to remove the countdown
CONFIG_BOOTDELAY=10
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=ttyAMA0,115200 earlycon=pl011,mmio32,0x21c0000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf"
# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_DEFAULT_FDT_FILE="fsl-lx2162a-clearfog.dtb"
CONFIG_MISC_INIT_R=y
+CONFIG_CMD_TLV_EEPROM=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_EEPROM=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
+CONFIG_CMD_OPTEE_RPMB=y
CONFIG_CMD_PCI=y
-CONFIG_CMD_SF=y
+CONFIG_CMD_POWEROFF=y
CONFIG_CMD_USB=y
+CONFIG_CMD_WDT=y
CONFIG_CMD_CACHE=y
-CONFIG_CMD_NVME=y
-CONFIG_NVME=y
CONFIG_MP=y
CONFIG_OF_CONTROL=y
-CONFIG_OF_BOARD_FIXUP=y
-CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-cex7"
+CONFIG_OF_LIST="fsl-lx2160a-half-twins-8-9-x fsl-lx2160a-cex7-8-x-x fsl-lx2160a-cex7 fsl-lx2162a-clearfog fsl-lx2162a-som"
+CONFIG_MULTI_DTB_FIT=y
+CONFIG_ENV_OVERWRITE=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
CONFIG_SATA_CEVA=y
-CONFIG_DM_GPIO=y
+CONFIG_MPC8XXX_GPIO=y
CONFIG_DM_I2C=y
-CONFIG_MISC=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_I2C_DEFAULT_BUS_NUMBER=0
-CONFIG_I2C_EEPROM=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_PCA954x=y
+CONFIG_I2C_EEPROM=y
CONFIG_DM_MMC=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
-CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
-CONFIG_SPI_FLASH_MICRON=y
CONFIG_SPI_FLASH_WINBOND=y
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_PHYLIB=y
-CONFIG_NETDEVICES=y
+CONFIG_PHY_ATHEROS=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
+CONFIG_DM_MDIO_MUX=y
CONFIG_PHY_GIGE=y
-CONFIG_CMD_NET=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_PXE=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_TLV_EEPROM=y
CONFIG_E1000=y
+CONFIG_MDIO_MUX_I2CREG=y
+CONFIG_FSL_LS_MDIO=y
+CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_GEN4=y
-CONFIG_PHY_ATHEROS=y
-CONFIG_PCIE_LAYERSCAPE=y
CONFIG_DM_RTC=y
CONFIG_RTC_PCF2127=y
CONFIG_DM_SCSI=y
CONFIG_DM_SERIAL=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
+CONFIG_FSL_DSPI=y
CONFIG_NXP_FSPI=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
+CONFIG_WDT=y
+CONFIG_WDT_SBSA=y
CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
-CONFIG_CMD_DATE=y
-CONFIG_RTC_PCF2127=y
-CONFIG_CMD_MEMORY=y
-CONFIG_CMD_MEMTEST=y
-CONFIG_GIC_V3_ITS=y
diff --git a/configs/lx2160acex7_tfa_defconfig b/configs/lx2160acex7_tfa_defconfig
index 061934ae71..c61ca390f3 100644
--- a/configs/lx2160acex7_tfa_defconfig
+++ b/configs/lx2160acex7_tfa_defconfig
@@ -22,9 +22,12 @@ CONFIG_BOOTDELAY=10
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=ttyAMA0,115200 earlycon=pl011,mmio32,0x21c0000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf"
# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_DEFAULT_FDT_FILE="fsl-lx2162a-clearfog.dtb"
CONFIG_MISC_INIT_R=y
+CONFIG_CMD_TLV_EEPROM=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_EEPROM=y
+CONFIG_CMD_MEMTEST=y
CONFIG_CMD_DM=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
@@ -32,12 +35,10 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_OPTEE_RPMB=y
CONFIG_CMD_PCI=y
-CONFIG_CMD_SF=y
+CONFIG_CMD_POWEROFF=y
CONFIG_CMD_USB=y
CONFIG_CMD_WDT=y
CONFIG_CMD_CACHE=y
-CONFIG_CMD_NVME=y
-CONFIG_NVME=y
CONFIG_MP=y
CONFIG_OF_CONTROL=y
CONFIG_OF_LIST="fsl-lx2160a-half-twins-8-9-x fsl-lx2160a-cex7-8-x-x fsl-lx2160a-cex7 fsl-lx2162a-clearfog fsl-lx2162a-som"
@@ -50,54 +51,39 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
CONFIG_SATA_CEVA=y
CONFIG_MPC8XXX_GPIO=y
-CONFIG_FSL_CAAM=y
-CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
-CONFIG_MISC=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_I2C_DEFAULT_BUS_NUMBER=0
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_PCA954x=y
+CONFIG_I2C_EEPROM=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_RPMB=y
CONFIG_MMC_HS400_SUPPORT=y
-CONFIG_I2C_EEPROM=y
-CONFIG_MTD=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
-CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
-CONFIG_SPI_FLASH_MICRON=y
CONFIG_SPI_FLASH_WINBOND=y
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_PHYLIB=y
-CONFIG_NETDEVICES=y
-CONFIG_PHY_GIGE=y
-CONFIG_CMD_NET=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_PXE=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_TLV_EEPROM=y
+CONFIG_PHY_ATHEROS=y
CONFIG_DM_ETH=y
CONFIG_DM_MDIO=y
CONFIG_DM_MDIO_MUX=y
+CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_MDIO_MUX_I2CREG=y
CONFIG_FSL_LS_MDIO=y
+CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_GEN4=y
-CONFIG_PHY_ATHEROS=y
CONFIG_DM_RTC=y
CONFIG_RTC_PCF2127=y
-CONFIG_RTC_MCP79411=y
-CONFIG_CMD_POWEROFF=y
CONFIG_DM_SCSI=y
CONFIG_DM_SERIAL=y
CONFIG_SPI=y
@@ -113,11 +99,3 @@ CONFIG_USB_XHCI_DWC3=y
CONFIG_WDT=y
CONFIG_WDT_SBSA=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
-CONFIG_CMD_DATE=y
-CONFIG_RTC_PCF2127=y
-CONFIG_CMD_MEMORY=y
-CONFIG_CMD_MEMTEST=y
-CONFIG_GIC_V3_ITS=y
-CONFIG_TEE=y
-CONFIG_OPTEE=y
-CONFIG_OPTEE_TA_AVB=y
--
2.35.3
......@@ -314,6 +314,13 @@ make -j${PARALLEL}
if [ "x$SECURE" == "xtrue" ]; then
echo "Building CST"
cd $ROOTDIR/build/cst
fusefilechanged=`git diff --numstat input_files/gen_fusescr/ls2088_1088/input_fuse_file`
if [[ -z $fusefilechanged ]]; then
echo "For Secure-Boot please modify \"build/cst/input_files/gen_fusescr/ls2088_1088/input_fuse_file\"!"
exit 1
fi
make
./gen_fusescr input_files/gen_fusescr/ls2088_1088/input_fuse_file
fi
......@@ -330,6 +337,7 @@ if [ -n "${DEFAULT_FDT_FILE}" ]; then
printf "CONFIG_DEFAULT_FDT_FILE=\"%s\"\n" "${DEFAULT_FDT_FILE}" >> .config
fi
make -j${PARALLEL}
make savedefconfig
export BL33=$ROOTDIR/build/u-boot/u-boot.bin
echo "Building atf"
......@@ -344,10 +352,32 @@ if [ "x$SECURE" == "xtrue" ]; then
# With secure boot auto mode is not supported... yet.. only flexspi_nor or sd
# that are needed to be stated explicitly
BL2=bl2_flexspi_nor_sec; BOOT_MODE_VAR=flexspi_nor
cp tools/fiptool/ddr-phy-binary/lx2160a/*.bin .
make -j${PARALLEL} PLAT=lx2160acex7 all fip fip_ddr_sec fip_fuse pbl RCW=$ROOTDIR/build/rcw/lx2160acex7/RCW/template.bin TRUSTED_BOARD_BOOT=1 CST_DIR=$ROOTDIR/build/cst/ GENERATE_COT=0 BOOT_MODE=${BOOT_MODE_VAR} SECURE_BOOT=yes FUSE_PROG=1 FUSE_PROV_FILE=$ROOTDIR/build/cst/fuse_scr.bin $ATF_DEBUG
make \
-j${PARALLEL} \
PLAT=lx2160acex7 \
DDR_PHY_BIN_PATH=$ROOTDIR/build/ddr-phy-binary/lx2160a \
RCW=$ROOTDIR/build/rcw/lx2160acex7/RCW/template.bin \
TRUSTED_BOARD_BOOT=1 \
CST_DIR=$ROOTDIR/build/cst/ \
SECURE_BOOT=yes \
FUSE_PROG=1 \
FUSE_PROV_FILE=$ROOTDIR/build/cst/fuse_scr.bin \
GENERATE_COT=0 \
BOOT_MODE=${BOOT_MODE_VAR} \
$ATF_DEBUG \
all fip fip_ddr fip_fuse pbl
else
make -j${PARALLEL} PLAT=lx2160acex7 all fip pbl RCW=$ROOTDIR/build/rcw/lx2160acex7/RCW/template.bin TRUSTED_BOARD_BOOT=0 GENERATE_COT=0 BOOT_MODE=auto SECURE_BOOT=false $ATF_DEBUG
make \
-j${PARALLEL} \
PLAT=lx2160acex7 \
DDR_PHY_BIN_PATH=$ROOTDIR/build/ddr-phy-binary/lx2160a \
RCW=$ROOTDIR/build/rcw/lx2160acex7/RCW/template.bin \
TRUSTED_BOARD_BOOT=0 \
SECURE_BOOT=false \
GENERATE_COT=0 \
BOOT_MODE=auto \
$ATF_DEBUG \
all fip fip_ddr pbl
# DDR_PHY_DEBUG=yes DDR_DEBUG=yes # DEBUG_PHY_IO=yes
fi
......@@ -819,9 +849,9 @@ dd if=$ROOTDIR/build/atf/build/lx2160acex7/${ATF_BUILD}/fip.bin of=images/${IMG}
# DDR PHY FIP at 0x4000
if [ "x$SECURE" == "xtrue" ]; then
dd if=$ROOTDIR/build/atf/fip_ddr_sec.bin of=images/${IMG} bs=512 seek=16384 conv=notrunc
dd if=$ROOTDIR/build/atf/build/lx2160acex7/$ATF_BUILD/ddr_fip_sec.bin of=images/${IMG} bs=512 seek=16384 conv=notrunc
else
dd if=$ROOTDIR/build/atf/tools/fiptool/fip_ddr_all.bin of=images/${IMG} bs=512 seek=16384 conv=notrunc
dd if=$ROOTDIR/build/atf/build/lx2160acex7/$ATF_BUILD/ddr_fip.bin of=images/${IMG} bs=512 seek=16384 conv=notrunc
fi
# Env variables at 0x2800
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment