TPL_NAND_SUPPORT

理解和使用开源项目中的TPL_NAND_SUPPORT:NAND闪存支持标志

TPL_NAND_SUPPORT似乎是在某些开源项目中用来表示是否支持NAND闪存传输协议的一个宏。在一些基于U-Boot或者其他嵌入式系统的项目中,可能会看到这样的宏定义。通常情况下,这个宏会被设置为y或者n,来决定是否包含相关的源码或者配置项。

 

例如,在U-Boot项目的Makefile中,可能会有类似以下的配置:

 

obj-$(CONFIG_TPL_NAND_SUPPORT) += tpl_nand_support.o

 

 

这里的obj-是一个特殊的变量,它决定了哪些对象文件会被编译。$(CONFIG_TPL_NAND_SUPPORT)是一个条件表达式,它会检查TPL_NAND_SUPPORT这个配置项是否被设置为y。如果是的话,tpl_nand_support.o这个对象文件就会被编译。

 

如果你想在Makefile中直接打印TPL_NAND_SUPPORT的值,可以使用@echo命令,如下所示:

 

@echo "TPL_NAND_SUPPORT = $(TPL_NAND_SUPPORT)"

 

 

这段代码将会打印出TPL_NAND_SUPPORT变量的值。需要注意的是,@echo命令只能在规则的命令部分使用,不能直接用在其他地方。

 

此外,如果你想控制TPL_NAND_SUPPORT的值,可以在你的项目的配置文件中找到这个配置项,并进行相应的设置。通常这些配置文件会有一个特定的名字,比如defconfig或者config,具体取决于你的项目。

# # Automatically generated file; DO NOT EDIT. # U-Boot 2022.07 Configuration # CONFIG_CREATE_ARCH_SYMLINK=y CONFIG_SYS_CACHE_SHIFT_5=y CONFIG_SYS_CACHELINE_SIZE=32 # CONFIG_ARC is not set CONFIG_ARM=y # CONFIG_M68K is not set # CONFIG_MICROBLAZE is not set # CONFIG_MIPS is not set # CONFIG_NIOS2 is not set # CONFIG_PPC is not set # CONFIG_RISCV is not set # CONFIG_SANDBOX is not set # CONFIG_SH is not set # CONFIG_X86 is not set # CONFIG_XTENSA is not set CONFIG_SYS_ARCH="arm" CONFIG_SYS_CPU="armv7" CONFIG_SYS_SOC="luofu" CONFIG_SYS_VENDOR="hisilicon" CONFIG_SYS_BOARD="luofu" CONFIG_SYS_CONFIG_NAME="luofu" # CONFIG_SKIP_LOWLEVEL_INIT is not set # CONFIG_SKIP_LOWLEVEL_INIT_ONLY is not set # CONFIG_SYS_ICACHE_OFF is not set # CONFIG_SYS_DCACHE_OFF is not set # # ARM architecture # CONFIG_COUNTER_FREQUENCY=250000000 # CONFIG_POSITION_INDEPENDENT is not set # CONFIG_GIC_V3_ITS is not set CONFIG_HAS_VBAR=y CONFIG_HAS_THUMB2=y CONFIG_ARM_ASM_UNIFIED=y CONFIG_SYS_ARM_CACHE_CP15=y CONFIG_SYS_ARM_MMU=y # CONFIG_SYS_ARM_MPU is not set CONFIG_CPU_V7A=y CONFIG_SYS_ARM_ARCH=7 CONFIG_SYS_ARM_CACHE_WRITEBACK=y # CONFIG_SYS_ARM_CACHE_WRITETHROUGH is not set # CONFIG_SYS_ARM_CACHE_WRITEALLOC is not set # CONFIG_ARCH_CPU_INIT is not set # CONFIG_SYS_ARCH_TIMER is not set # CONFIG_ARM_SMCCC is not set # CONFIG_SEMIHOSTING is not set # CONFIG_SYS_THUMB_BUILD is not set # CONFIG_SYS_L2CACHE_OFF is not set # CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK is not set CONFIG_USE_ARCH_MEMCPY=y CONFIG_USE_ARCH_MEMSET=y # CONFIG_ARCH_AT91 is not set # CONFIG_ARCH_DAVINCI is not set # CONFIG_ARCH_KIRKWOOD is not set # CONFIG_ARCH_MVEBU is not set # CONFIG_ARCH_ORION5X is not set # CONFIG_TARGET_STV0991 is not set # CONFIG_ARCH_BCM283X is not set # CONFIG_ARCH_BCM63158 is not set # CONFIG_ARCH_BCM6753 is not set # CONFIG_ARCH_BCM68360 is not set # CONFIG_ARCH_BCM6858 is not set # CONFIG_ARCH_BCMSTB is not set # CONFIG_TARGET_VEXPRESS_CA9X4 is not set # CONFIG_TARGET_BCMCYGNUS is not set # CONFIG_TARGET_BCMNS2 is not set # CONFIG_TARGET_BCMNS3 is not set # CONFIG_ARCH_EXYNOS is not set # CONFIG_ARCH_S5PC1XX is not set # CONFIG_ARCH_HIGHBANK is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IPQ40XX is not set # CONFIG_ARCH_KEYSTONE is not set # CONFIG_ARCH_K3 is not set # CONFIG_ARCH_OMAP2PLUS is not set # CONFIG_ARCH_MESON is not set # CONFIG_ARCH_MEDIATEK is not set # CONFIG_ARCH_LPC32XX is not set # CONFIG_ARCH_IMX8 is not set # CONFIG_ARCH_IMX8M is not set # CONFIG_ARCH_IMX8ULP is not set # CONFIG_ARCH_IMXRT is not set # CONFIG_ARCH_MX23 is not set # CONFIG_ARCH_MX28 is not set # CONFIG_ARCH_MX31 is not set # CONFIG_ARCH_MX7ULP is not set # CONFIG_ARCH_MX7 is not set # CONFIG_ARCH_MX6 is not set # CONFIG_ARCH_MX5 is not set # CONFIG_ARCH_NEXELL is not set # CONFIG_ARCH_NPCM is not set # CONFIG_ARCH_APPLE is not set # CONFIG_ARCH_OWL is not set # CONFIG_ARCH_QEMU is not set # CONFIG_ARCH_RMOBILE is not set # CONFIG_ARCH_SNAPDRAGON is not set # CONFIG_ARCH_SOCFPGA is not set # CONFIG_ARCH_SUNXI is not set # CONFIG_ARCH_U8500 is not set # CONFIG_ARCH_VERSAL is not set # CONFIG_ARCH_VF610 is not set # CONFIG_ARCH_ZYNQ is not set # CONFIG_ARCH_ZYNQMP_R5 is not set # CONFIG_ARCH_ZYNQMP is not set # CONFIG_ARCH_TEGRA is not set # CONFIG_ARCH_VEXPRESS64 is not set # CONFIG_TARGET_TOTAL_COMPUTE is not set # CONFIG_TARGET_LS2080A_EMU is not set # CONFIG_TARGET_LS1088AQDS is not set # CONFIG_TARGET_LS2080AQDS is not set # CONFIG_TARGET_LS2080ARDB is not set # CONFIG_TARGET_LS2081ARDB is not set # CONFIG_TARGET_LX2160ARDB is not set # CONFIG_TARGET_LX2160AQDS is not set # CONFIG_TARGET_LX2162AQDS is not set # CONFIG_TARGET_HIKEY is not set # CONFIG_TARGET_HIKEY960 is not set # CONFIG_TARGET_POPLAR is not set # CONFIG_TARGET_LS1012AQDS is not set # CONFIG_TARGET_LS1012ARDB is not set # CONFIG_TARGET_LS1012A2G5RDB is not set # CONFIG_TARGET_LS1012AFRWY is not set # CONFIG_TARGET_LS1012AFRDM is not set # CONFIG_TARGET_LS1028AQDS is not set # CONFIG_TARGET_LS1028ARDB is not set # CONFIG_TARGET_LS1088ARDB is not set # CONFIG_TARGET_LS1021AQDS is not set # CONFIG_TARGET_LS1021ATWR is not set # CONFIG_TARGET_PG_WCOM_SELI8 is not set # CONFIG_TARGET_PG_WCOM_EXPU1 is not set # CONFIG_TARGET_LS1021ATSN is not set # CONFIG_TARGET_LS1021AIOT is not set # CONFIG_TARGET_LS1043AQDS is not set # CONFIG_TARGET_LS1043ARDB is not set # CONFIG_TARGET_LS1046AQDS is not set # CONFIG_TARGET_LS1046ARDB is not set # CONFIG_TARGET_LS1046AFRWY is not set # CONFIG_TARGET_SL28 is not set # CONFIG_TARGET_TEN64 is not set # CONFIG_ARCH_UNIPHIER is not set # CONFIG_ARCH_SYNQUACER is not set # CONFIG_ARCH_STM32 is not set # CONFIG_ARCH_STI is not set # CONFIG_ARCH_STM32MP is not set # CONFIG_ARCH_ROCKCHIP is not set # CONFIG_ARCH_OCTEONTX is not set # CONFIG_ARCH_OCTEONTX2 is not set # CONFIG_TARGET_THUNDERX_88XX is not set # CONFIG_ARCH_ASPEED is not set # CONFIG_TARGET_DURIAN is not set # CONFIG_TARGET_POMELO is not set # CONFIG_TARGET_PRESIDIO_ASIC is not set # CONFIG_TARGET_XENGUEST_ARM64 is not set CONFIG_TARGET_LUOFU=y # CONFIG_TARGET_XILING is not set # CONFIG_TARGET_EMEI is not set # CONFIG_TARGET_QISHAN is not set # CONFIG_TARGET_TIANGONG2 is not set # CONFIG_TARGET_TIANGONG1 is not set CONFIG_SUPPORT_PASSING_ATAGS=y # CONFIG_SETUP_MEMORY_TAGS is not set # CONFIG_CMDLINE_TAG is not set # CONFIG_INITRD_TAG is not set # CONFIG_REVISION_TAG is not set CONFIG_SERIAL_TAG=y # CONFIG_STATIC_MACH_TYPE is not set CONFIG_SYS_TEXT_BASE=0x80040000 CONFIG_SYS_MALLOC_LEN=0x1400000 CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x20000 CONFIG_ENV_OFFSET=0x240000 CONFIG_DM_GPIO=y CONFIG_DEFAULT_DEVICE_TREE="luofu" CONFIG_MULTI_DTB_FIT_UNCOMPRESS_SZ=0x8000 CONFIG_ERR_PTR_OFFSET=0x0 CONFIG_BOOTSTAGE_STASH_ADDR=0 CONFIG_ENV_OFFSET_REDUND=0x280000 CONFIG_IDENT_STRING=" for luofu" CONFIG_SYS_CLK_FREQ=0 # CONFIG_CHIP_DIP_SCAN is not set # CONFIG_HAS_ARMV7_SECURE_BASE is not set # CONFIG_ARMV7_LPAE is not set # CONFIG_CMD_DEKBLOB is not set # CONFIG_IMX_CAAM_DEK_ENCAP is not set # CONFIG_IMX_OPTEE_DEK_ENCAP is not set # CONFIG_IMX_SECO_DEK_ENCAP is not set # CONFIG_CMD_HDMIDETECT is not set # CONFIG_CMD_NANDBCB is not set CONFIG_IMX_DCD_ADDR=0x00910000 CONFIG_SYS_MEM_TOP_HIDE=0x0 CONFIG_SYS_LOAD_ADDR=0x83200000 # # ARM debug # # CONFIG_DEBUG_LL is not set CONFIG_HSAN=y CONFIG_MULTIUPG=y CONFIG_ACTIVE_STANDBY_BOOT=y CONFIG_CHIP_LUOFU=y CONFIG_BUILD_TARGET="" # CONFIG_DEBUG_UART is not set # CONFIG_AHCI is not set # CONFIG_OF_BOARD_FIXUP is not set # # General setup # CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_CC_OPTIMIZE_FOR_SPEED is not set # CONFIG_CC_OPTIMIZE_FOR_DEBUG is not set # CONFIG_OPTIMIZE_INLINING is not set CONFIG_ARCH_SUPPORTS_LTO=y # CONFIG_LTO is not set # CONFIG_XEN is not set # CONFIG_DISTRO_DEFAULTS is not set # CONFIG_ENV_VARS_UBOOT_CONFIG is not set # CONFIG_SYS_BOOT_GET_CMDLINE is not set # CONFIG_SYS_BOOT_GET_KBD is not set CONFIG_SYS_MALLOC_F=y # CONFIG_VALGRIND is not set CONFIG_EXPERT=y CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y # CONFIG_SYS_MALLOC_DEFAULT_TO_INIT is not set # CONFIG_TOOLS_DEBUG is not set # CONFIG_PHYS_64BIT is not set # CONFIG_REMAKE_ELF is not set # CONFIG_HAS_BOARD_SIZE_LIMIT is not set # CONFIG_SYS_CUSTOM_LDSCRIPT is not set CONFIG_PLATFORM_ELFENTRY="_start" CONFIG_STACK_SIZE=0x1000000 CONFIG_SYS_SRAM_BASE=0x0 CONFIG_SYS_SRAM_SIZE=0x0 # CONFIG_MP is not set # CONFIG_EXAMPLES is not set # # API # # CONFIG_API is not set # # Boot options # # # Boot images # # CONFIG_ANDROID_BOOT_IMAGE is not set # CONFIG_FIT is not set # CONFIG_TIMESTAMP is not set CONFIG_BOOTSTD=y # CONFIG_BOOTSTD_FULL is not set CONFIG_BOOTSTD_BOOTCOMMAND=y # CONFIG_BOOTMETH_SCRIPT is not set CONFIG_LEGACY_IMAGE_FORMAT=y # CONFIG_SUPPORT_RAW_INITRD is not set # CONFIG_OF_BOARD_SETUP is not set # CONFIG_OF_SYSTEM_SETUP is not set # CONFIG_OF_STDOUT_VIA_ALIAS is not set CONFIG_SYS_EXTRA_OPTIONS="" CONFIG_HAVE_SYS_TEXT_BASE=y # CONFIG_DYNAMIC_SYS_CLK_FREQ is not set CONFIG_ARCH_FIXUP_FDT_MEMORY=y # CONFIG_CHROMEOS is not set # CONFIG_CHROMEOS_VBOOT is not set # CONFIG_RAMBOOT_PBL is not set # # Boot timing # # CONFIG_BOOTSTAGE is not set CONFIG_BOOTSTAGE_STASH_SIZE=0x1000 # CONFIG_SHOW_BOOT_PROGRESS is not set # # Boot media # # CONFIG_NAND_BOOT is not set # CONFIG_ONENAND_BOOT is not set # CONFIG_QSPI_BOOT is not set # CONFIG_SATA_BOOT is not set # CONFIG_SD_BOOT is not set # CONFIG_SD_BOOT_QSPI is not set # CONFIG_SPI_BOOT is not set # # Autoboot options # CONFIG_AUTOBOOT=y CONFIG_BOOTDELAY=3 # CONFIG_AUTOBOOT_KEYED is not set # CONFIG_AUTOBOOT_USE_MENUKEY is not set # CONFIG_AUTOBOOT_MENU_SHOW is not set # CONFIG_BOOT_RETRY is not set # # Image support # # CONFIG_IMAGE_PRE_LOAD is not set # CONFIG_USE_BOOTARGS is not set # CONFIG_BOOTARGS_SUBST is not set # CONFIG_USE_BOOTCOMMAND is not set # CONFIG_USE_PREBOOT is not set CONFIG_DEFAULT_FDT_FILE="" # CONFIG_SAVE_PREV_BL_FDT_ADDR is not set # CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR is not set # # Console # CONFIG_MENU=y # CONFIG_CONSOLE_RECORD is not set # CONFIG_DISABLE_CONSOLE is not set CONFIG_LOGLEVEL=4 CONFIG_SPL_LOGLEVEL=4 CONFIG_TPL_LOGLEVEL=4 # CONFIG_SILENT_CONSOLE is not set # CONFIG_PRE_CONSOLE_BUFFER is not set # CONFIG_CONSOLE_MUX is not set # CONFIG_SYS_CONSOLE_IS_IN_ENV is not set # CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE is not set # CONFIG_SYS_CONSOLE_ENV_OVERWRITE is not set # CONFIG_SYS_CONSOLE_INFO_QUIET is not set # CONFIG_SYS_STDIO_DEREGISTER is not set # CONFIG_SPL_SYS_STDIO_DEREGISTER is not set # CONFIG_SYS_DEVICE_NULLDEV is not set # # Logging # # CONFIG_LOG is not set # # Init options # # CONFIG_BOARD_TYPES is not set # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set # CONFIG_DISPLAY_BOARDINFO_LATE is not set # # Start-up hooks # # CONFIG_EVENT is not set # CONFIG_ARCH_EARLY_INIT_R is not set # CONFIG_ARCH_MISC_INIT is not set # CONFIG_BOARD_EARLY_INIT_F is not set # CONFIG_BOARD_EARLY_INIT_R is not set # CONFIG_BOARD_POSTCLK_INIT is not set CONFIG_BOARD_LATE_INIT=y # CONFIG_CLOCKS is not set # CONFIG_LAST_STAGE_INIT is not set CONFIG_MISC_INIT_R=y # CONFIG_ID_EEPROM is not set # CONFIG_RESET_PHY_R is not set # # Security support # # CONFIG_STACKPROTECTOR is not set # # Update support # # CONFIG_ANDROID_AB is not set # # Blob list # # CONFIG_BLOBLIST is not set # # SPL / TPL / VPL # CONFIG_SPL_SYS_STACK_F_CHECK_BYTE=0xaa # CONFIG_SPL_SYS_REPORT_STACK_F_USAGE is not set # CONFIG_SPL_SHOW_ERRORS is not set # # PowerPC and LayerScape SPL Boot options # # CONFIG_SPL_MD5 is not set # CONFIG_FDT_SIMPLEFB is not set # # Command line interface # CONFIG_CMDLINE=y # CONFIG_HUSH_PARSER is not set CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_SYS_LONGHELP=y CONFIG_SYS_PROMPT="luofu # " CONFIG_SYS_XTRACE=y # # Commands # # # Info commands # # CONFIG_CMD_BDI is not set # CONFIG_CMD_CONFIG is not set # CONFIG_CMD_CONSOLE is not set # CONFIG_CMD_CPU is not set # CONFIG_CMD_LICENSE is not set # CONFIG_CMD_PMC is not set # # Boot commands # CONFIG_CMD_BOOTD=y CONFIG_CMD_BOOTM=y # CONFIG_CMD_BOOTDEV is not set # CONFIG_CMD_BOOTFLOW is not set # CONFIG_CMD_BOOTMETH is not set # CONFIG_CMD_BOOTZ is not set CONFIG_BOOTM_LINUX=y # CONFIG_BOOTM_NETBSD is not set # CONFIG_BOOTM_OPENRTOS is not set # CONFIG_BOOTM_OSE is not set # CONFIG_BOOTM_PLAN9 is not set # CONFIG_BOOTM_RTEMS is not set # CONFIG_BOOTM_VXWORKS is not set CONFIG_CMD_BOOTMENU=y # CONFIG_CMD_ADTIMG is not set # CONFIG_CMD_ELF is not set CONFIG_CMD_FDT=y CONFIG_CMD_GO=y CONFIG_CMD_RUN=y # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set # CONFIG_CMD_XIMG is not set # CONFIG_CMD_THOR_DOWNLOAD is not set # CONFIG_CMD_ZBOOT is not set # # Environment commands # # CONFIG_CMD_ASKENV is not set # CONFIG_CMD_EXPORTENV is not set # CONFIG_CMD_IMPORTENV is not set # CONFIG_CMD_EDITENV is not set # CONFIG_CMD_GREPENV is not set CONFIG_CMD_SAVEENV=y # CONFIG_CMD_ERASEENV is not set # CONFIG_CMD_ENV_EXISTS is not set # CONFIG_CMD_ENV_CALLBACK is not set # CONFIG_CMD_ENV_FLAGS is not set # CONFIG_CMD_NVEDIT_INDIRECT is not set # CONFIG_CMD_NVEDIT_INFO is not set # CONFIG_CMD_NVEDIT_LOAD is not set # CONFIG_CMD_NVEDIT_SELECT is not set # # Memory commands # # CONFIG_CMD_BINOP is not set # CONFIG_CMD_BLOBLIST is not set # CONFIG_CMD_CRC32 is not set # CONFIG_CMD_EEPROM is not set # CONFIG_LOOPW is not set # CONFIG_CMD_MD5SUM is not set # CONFIG_CMD_MEMINFO is not set CONFIG_CMD_MEMORY=y # CONFIG_CMD_MEM_SEARCH is not set # CONFIG_CMD_MX_CYCLIC is not set # CONFIG_CMD_RANDOM is not set # CONFIG_CMD_MEMTEST is not set # CONFIG_CMD_SHA1SUM is not set # CONFIG_CMD_STRINGS is not set # # Compression commands # # CONFIG_CMD_LZMADEC is not set # CONFIG_CMD_UNLZ4 is not set # CONFIG_CMD_UNZIP is not set # CONFIG_CMD_ZIP is not set # # Device access commands # # CONFIG_CMD_ARMFLASH is not set # CONFIG_CMD_BIND is not set # CONFIG_CMD_CLK is not set # CONFIG_CMD_DEMO is not set # CONFIG_CMD_DFU is not set # CONFIG_CMD_DM is not set # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGAD is not set # CONFIG_CMD_FUSE is not set CONFIG_CMD_GPIO=y # CONFIG_CMD_GPIO_READ is not set # CONFIG_CMD_GPT is not set # CONFIG_RANDOM_UUID is not set # CONFIG_CMD_IDE is not set # CONFIG_CMD_IO is not set # CONFIG_CMD_IOTRACE is not set # CONFIG_CMD_I2C is not set # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set # CONFIG_CMD_LSBLK is not set # CONFIG_CMD_MBR is not set # CONFIG_CMD_MISC is not set # CONFIG_CMD_CLONE is not set CONFIG_CMD_MTD=y CONFIG_CMD_NAND=y # CONFIG_CMD_NAND_TRIMFFS is not set # CONFIG_CMD_NAND_LOCK_UNLOCK is not set # CONFIG_CMD_NAND_TORTURE is not set # CONFIG_CMD_ONENAND is not set # CONFIG_CMD_OSD is not set # CONFIG_CMD_PCI is not set # CONFIG_CMD_POWEROFF is not set # CONFIG_CMD_READ is not set # CONFIG_CMD_SATA is not set # CONFIG_CMD_SAVES is not set # CONFIG_CMD_SCSI is not set # CONFIG_CMD_SDRAM is not set # CONFIG_CMD_TSI148 is not set # CONFIG_CMD_UNIVERSE is not set # CONFIG_CMD_USB_SDP is not set # CONFIG_CMD_WDT is not set # # Shell scripting commands # # CONFIG_CMD_ECHO is not set # CONFIG_CMD_ITEST is not set # CONFIG_CMD_SOURCE is not set # CONFIG_CMD_SETEXPR is not set # # Android support commands # CONFIG_CMD_NET=y CONFIG_CMD_BOOTP=y # CONFIG_CMD_DHCP is not set # CONFIG_BOOTP_MAY_FAIL is not set CONFIG_BOOTP_BOOTPATH=y # CONFIG_BOOTP_VENDOREX is not set # CONFIG_BOOTP_BOOTFILESIZE is not set CONFIG_BOOTP_DNS=y # CONFIG_BOOTP_DNS2 is not set CONFIG_BOOTP_GATEWAY=y CONFIG_BOOTP_HOSTNAME=y # CONFIG_BOOTP_PREFER_SERVERIP is not set CONFIG_BOOTP_SUBNETMASK=y # CONFIG_BOOTP_NISDOMAIN is not set # CONFIG_BOOTP_NTPSERVER is not set # CONFIG_CMD_PCAP is not set CONFIG_BOOTP_VCI_STRING="U-Boot.armv7" CONFIG_CMD_TFTPBOOT=y # CONFIG_CMD_TFTPPUT is not set # CONFIG_CMD_TFTPSRV is not set CONFIG_NET_TFTP_VARS=y # CONFIG_CMD_RARP is not set # CONFIG_CMD_NFS is not set # CONFIG_CMD_MII is not set # CONFIG_CMD_MDIO is not set CONFIG_CMD_PING=y # CONFIG_CMD_CDP is not set # CONFIG_CMD_SNTP is not set # CONFIG_CMD_DNS is not set # CONFIG_CMD_LINK_LOCAL is not set # CONFIG_CMD_ETHSW is not set # CONFIG_CMD_PXE is not set # CONFIG_CMD_WOL is not set # # Misc commands # # CONFIG_CMD_BSP is not set # CONFIG_CMD_BLOCK_CACHE is not set CONFIG_CMD_CACHE=y # CONFIG_CMD_CONITRACE is not set # CONFIG_CMD_EXCEPTION is not set # CONFIG_CMD_DATE is not set # CONFIG_CMD_TIME is not set # CONFIG_CMD_GETTIME is not set # CONFIG_CMD_SLEEP is not set # CONFIG_CMD_TIMER is not set # CONFIG_CMD_SYSBOOT is not set # CONFIG_CMD_QFW is not set # CONFIG_CMD_PSTORE is not set # CONFIG_CMD_TERMINAL is not set # CONFIG_CMD_UUID is not set # # TI specific command line interface # # CONFIG_CMD_DDR3 is not set # # Power commands # # # Security commands # # CONFIG_CMD_AES is not set # CONFIG_CMD_BLOB is not set # CONFIG_CMD_HASH is not set # # Firmware commands # # # Filesystem commands # # CONFIG_CMD_BTRFS is not set # CONFIG_CMD_EROFS is not set # CONFIG_CMD_EXT2 is not set # CONFIG_CMD_EXT4 is not set # CONFIG_CMD_FAT is not set # CONFIG_CMD_SQUASHFS is not set # CONFIG_CMD_FS_GENERIC is not set # CONFIG_CMD_FS_UUID is not set # CONFIG_CMD_JFFS2 is not set CONFIG_CMD_MTDPARTS=y # CONFIG_CMD_MTDPARTS_SPREAD is not set # CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES is not set CONFIG_MTDIDS_DEFAULT="nand0=hi_nfc,nor0=hi_sfc" CONFIG_MTDPARTS_DEFAULT="" # CONFIG_CMD_REISER is not set # CONFIG_CMD_ZFS is not set # # Debug commands # # CONFIG_CMD_DIAG is not set # CONFIG_CMD_EVENT is not set # CONFIG_CMD_LOG is not set # CONFIG_CMD_UBI is not set # # Partition Types # # CONFIG_MAC_PARTITION is not set # CONFIG_DOS_PARTITION is not set # CONFIG_ISO_PARTITION is not set # CONFIG_AMIGA_PARTITION is not set # CONFIG_EFI_PARTITION is not set CONFIG_SUPPORT_OF_CONTROL=y # # Device Tree Control # CONFIG_OF_CONTROL=y CONFIG_OF_REAL=y # CONFIG_OF_LIVE is not set CONFIG_OF_SEPARATE=y # CONFIG_OF_EMBED is not set # CONFIG_OF_BOARD is not set CONFIG_OF_OMIT_DTB=y CONFIG_DEVICE_TREE_INCLUDES="" CONFIG_OF_LIST="luofu" # CONFIG_MULTI_DTB_FIT is not set # CONFIG_OF_DTB_PROPS_REMOVE is not set CONFIG_VPL_OF_REAL=y # # Environment # CONFIG_ENV_SUPPORT=y CONFIG_ENV_SOURCE_FILE="" CONFIG_SAVEENV=y # CONFIG_ENV_OVERWRITE is not set # CONFIG_ENV_IS_NOWHERE is not set # CONFIG_ENV_IS_IN_EEPROM is not set # CONFIG_ENV_IS_IN_FAT is not set # CONFIG_ENV_IS_IN_EXT4 is not set # CONFIG_ENV_IS_IN_FLASH is not set CONFIG_ENV_IS_IN_NAND=y # CONFIG_ENV_IS_IN_NVRAM is not set # CONFIG_ENV_IS_IN_ONENAND is not set # CONFIG_ENV_IS_IN_REMOTE is not set CONFIG_SYS_REDUNDAND_ENVIRONMENT=y # CONFIG_SYS_RELOC_GD_ENV_ADDR is not set # CONFIG_USE_DEFAULT_ENV_FILE is not set # CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set # CONFIG_ENV_IMPORT_FDT is not set # CONFIG_ENV_APPEND is not set # CONFIG_ENV_WRITEABLE_LIST is not set # CONFIG_ENV_ACCESS_IGNORE_FORCE is not set # CONFIG_USE_BOOTFILE is not set # CONFIG_USE_ETHPRIME is not set # CONFIG_VERSION_VARIABLE is not set CONFIG_NET=y CONFIG_ARP_TIMEOUT=200 CONFIG_NET_RETRY_COUNT=20 # CONFIG_PROT_UDP is not set CONFIG_BOOTDEV_ETH=y # CONFIG_BOOTP_SEND_HOSTNAME is not set CONFIG_NET_RANDOM_ETHADDR=y CONFIG_NETCONSOLE=y # CONFIG_IP_DEFRAG is not set # CONFIG_SYS_FAULT_ECHO_LINK_DOWN is not set CONFIG_TFTP_BLOCKSIZE=512 # CONFIG_TFTP_PORT is not set CONFIG_TFTP_WINDOWSIZE=1 # CONFIG_TFTP_TSIZE is not set # CONFIG_SERVERIP_FROM_PROXYDHCP is not set CONFIG_SERVERIP_FROM_PROXYDHCP_DELAY_MS=100 # CONFIG_KEEP_SERVERADDR is not set # CONFIG_UDP_CHECKSUM is not set # CONFIG_BOOTP_SERVERIP is not set # # Device Drivers # # # Generic Driver Options # CONFIG_DM=y # CONFIG_DM_WARN is not set # CONFIG_DM_DEBUG is not set CONFIG_DM_DEVICE_REMOVE=y # CONFIG_DM_EVENT is not set CONFIG_DM_STDIO=y CONFIG_DM_SEQ_ALIAS=y # CONFIG_DM_DMA is not set CONFIG_REGMAP=y CONFIG_SYSCON=y # CONFIG_DEVRES is not set CONFIG_SIMPLE_BUS=y # CONFIG_SIMPLE_BUS_CORRECT_RANGE is not set # CONFIG_OF_TRANSLATE is not set # CONFIG_TRANSLATION_OFFSET is not set CONFIG_DM_DEV_READ_INLINE=y # CONFIG_ACPIGEN is not set CONFIG_BOUNCE_BUFFER=y # CONFIG_ADC is not set # CONFIG_ADC_EXYNOS is not set # CONFIG_ADC_SANDBOX is not set # CONFIG_SARADC_MESON is not set # CONFIG_SARADC_ROCKCHIP is not set # CONFIG_SATA is not set # CONFIG_SCSI_AHCI is not set # # SATA/SCSI device support # # CONFIG_AXI is not set # # Bus devices # CONFIG_BLK=y CONFIG_HAVE_BLOCK_DEVICE=y CONFIG_BLOCK_CACHE=y # CONFIG_EFI_MEDIA is not set # CONFIG_IDE is not set # CONFIG_BOOTCOUNT_LIMIT is not set # # Button Support # # CONFIG_BUTTON is not set # # Cache Controller drivers # # CONFIG_CACHE is not set CONFIG_L2X0_CACHE=y # CONFIG_NCORE_CACHE is not set # CONFIG_SIFIVE_CCACHE is not set # # Clock # CONFIG_CLK=y # CONFIG_CLK_CCF is not set # CONFIG_CLK_CDCE9XX is not set # CONFIG_CLK_ICS8N3QV01 is not set # CONFIG_CLK_K210 is not set # CONFIG_CLK_MPC83XX is not set # CONFIG_CLK_XLNX_CLKWZRD is not set # CONFIG_CLK_AT91 is not set # CONFIG_CLK_SIFIVE is not set # CONFIG_CLK_TI_AM3_DPLL is not set # CONFIG_CLK_TI_CTRL is not set # CONFIG_CLK_TI_GATE is not set # CONFIG_CLK_K3 is not set CONFIG_CPU=y # # Hardware crypto devices # # CONFIG_DM_HASH is not set # CONFIG_FSL_CAAM is not set # CONFIG_SYS_FSL_SEC_BE is not set # CONFIG_SYS_FSL_SEC_LE is not set # CONFIG_DDR_SPD is not set # # Demo for driver model # # CONFIG_DM_DEMO is not set # # DFU support # # # DMA Support # # CONFIG_DMA is not set # CONFIG_DMA_LPC32XX is not set # CONFIG_TI_EDMA3 is not set # CONFIG_DMA_LEGACY is not set # # Fastboot support # # CONFIG_UDP_FUNCTION_FASTBOOT is not set # CONFIG_FIRMWARE is not set # CONFIG_ZYNQMP_FIRMWARE is not set # # FPGA support # # CONFIG_FPGA_ALTERA is not set # CONFIG_FPGA_SOCFPGA is not set # CONFIG_FPGA_XILINX is not set CONFIG_GPIO=y # CONFIG_GPIO_HOG is not set # CONFIG_DM_GPIO_LOOKUP_LABEL is not set # CONFIG_ALTERA_PIO is not set # CONFIG_BCM2835_GPIO is not set CONFIG_DWAPB_GPIO=y # CONFIG_AT91_GPIO is not set # CONFIG_ATMEL_PIO4 is not set # CONFIG_ASPEED_GPIO is not set # CONFIG_DA8XX_GPIO is not set # CONFIG_INTEL_BROADWELL_GPIO is not set # CONFIG_INTEL_GPIO is not set # CONFIG_INTEL_ICH6_GPIO is not set # CONFIG_IMX_RGPIO2P is not set # CONFIG_IPROC_GPIO is not set # CONFIG_HSDK_CREG_GPIO is not set # CONFIG_KIRKWOOD_GPIO is not set # CONFIG_LPC32XX_GPIO is not set # CONFIG_MCP230XX_GPIO is not set # CONFIG_MSM_GPIO is not set # CONFIG_MXC_GPIO is not set # CONFIG_MXS_GPIO is not set # CONFIG_NPCM_GPIO is not set # CONFIG_CMD_PCA953X is not set # CONFIG_ROCKCHIP_GPIO is not set # CONFIG_XILINX_GPIO is not set # CONFIG_CMD_TCA642X is not set # CONFIG_TEGRA_GPIO is not set # CONFIG_TEGRA186_GPIO is not set # CONFIG_VYBRID_GPIO is not set # CONFIG_SIFIVE_GPIO is not set # CONFIG_ZYNQ_GPIO is not set # CONFIG_DM_74X164 is not set # CONFIG_SPL_DM_PCA953X is not set # CONFIG_MPC8XXX_GPIO is not set # CONFIG_NX_GPIO is not set # CONFIG_NOMADIK_GPIO is not set # CONFIG_ZYNQMP_GPIO_MODEPIN is not set # CONFIG_SLG7XL45106_I2C_GPO is not set # # Hardware Spinlock Support # # CONFIG_DM_HWSPINLOCK is not set # CONFIG_I2C is not set # CONFIG_INPUT is not set # CONFIG_DM_KEYBOARD is not set # CONFIG_KEYBOARD is not set # CONFIG_TEGRA_KEYBOARD is not set # CONFIG_TWL4030_INPUT is not set # # IOMMU device drivers # # CONFIG_IOMMU is not set # # LED Support # # CONFIG_LED is not set # CONFIG_LED_STATUS is not set # # Mailbox Controller Support # # CONFIG_DM_MAILBOX is not set # # Memory Controller drivers # # # Multifunction device drivers # CONFIG_MISC=y # CONFIG_ALTERA_SYSID is not set # CONFIG_ATSHA204A is not set # CONFIG_GATEWORKS_SC is not set # CONFIG_ROCKCHIP_EFUSE is not set # CONFIG_ROCKCHIP_OTP is not set # CONFIG_SIFIVE_OTP is not set # CONFIG_VEXPRESS_CONFIG is not set # CONFIG_CROS_EC is not set # CONFIG_DS4510 is not set # CONFIG_FSL_SEC_MON is not set # CONFIG_IRQ is not set # CONFIG_NUVOTON_NCT6102D is not set # CONFIG_PWRSEQ is not set # CONFIG_PCA9551_LED is not set # CONFIG_TEST_DRV is not set # CONFIG_TWL4030_LED is not set # CONFIG_WINBOND_W83627 is not set # CONFIG_I2C_EEPROM is not set # CONFIG_GDSYS_RXAUI_CTRL is not set # CONFIG_GDSYS_IOEP is not set # CONFIG_MPC83XX_SERDES is not set # CONFIG_FS_LOADER is not set # CONFIG_SPL_FS_LOADER is not set # CONFIG_GDSYS_SOC is not set # CONFIG_IHS_FPGA is not set # CONFIG_MICROCHIP_FLEXCOM is not set # # MMC Host controller Support # # CONFIG_MMC is not set # CONFIG_MMC_BROKEN_CD is not set # CONFIG_DM_MMC is not set # CONFIG_FSL_ESDHC is not set # CONFIG_FSL_ESDHC_IMX is not set # # MTD Support # CONFIG_MTD_PARTITIONS=y CONFIG_MTD=y CONFIG_DM_MTD=y # CONFIG_MTD_NOR_FLASH is not set # CONFIG_MTD_CONCAT is not set CONFIG_SYS_MTDPARTS_RUNTIME=y # CONFIG_FLASH_CFI_DRIVER is not set # CONFIG_CFI_FLASH is not set # CONFIG_ALTERA_QSPI is not set # CONFIG_HBMC_AM654 is not set # CONFIG_USE_SYS_MAX_FLASH_BANKS is not set CONFIG_MTD_RAW_NAND=y # CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT is not set CONFIG_SYS_NAND_USE_FLASH_BBT=y # CONFIG_NAND_ATMEL is not set # CONFIG_NAND_BRCMNAND is not set # CONFIG_NAND_DAVINCI is not set # CONFIG_NAND_DENALI_DT is not set # CONFIG_NAND_FSL_IFC is not set # CONFIG_NAND_LPC32XX_MLC is not set # CONFIG_NAND_LPC32XX_SLC is not set # CONFIG_NAND_VF610_NFC is not set # CONFIG_NAND_PXA3XX is not set # CONFIG_NAND_ARASAN is not set # CONFIG_NAND_MXIC is not set # CONFIG_NAND_ZYNQ is not set # CONFIG_NAND_OCTEONTX is not set # # Generic NAND options # # CONFIG_SYS_NAND_ONFI_DETECTION is not set # # SPI Flash Support # # CONFIG_SPI_FLASH is not set # # UBI support # # CONFIG_UBI_SILENCE_MSG is not set # CONFIG_MTD_UBI is not set # # Multiplexer drivers # # CONFIG_MULTIPLEXER is not set # CONFIG_BITBANGMII is not set # CONFIG_MV88E6352_SWITCH is not set CONFIG_PHYLIB=y # CONFIG_PHY_ADDR_ENABLE is not set # CONFIG_B53_SWITCH is not set # CONFIG_MV88E61XX_SWITCH is not set # CONFIG_PHYLIB_10G is not set # CONFIG_PHY_ADIN is not set # CONFIG_PHY_AQUANTIA is not set # CONFIG_PHY_ATHEROS is not set # CONFIG_PHY_BROADCOM is not set # CONFIG_PHY_CORTINA is not set # CONFIG_PHY_DAVICOM is not set # CONFIG_PHY_ET1011C is not set # CONFIG_PHY_LXT is not set # CONFIG_PHY_MARVELL is not set # CONFIG_PHY_MESON_GXL is not set # CONFIG_PHY_MICREL is not set # CONFIG_PHY_MSCC is not set # CONFIG_PHY_NATSEMI is not set # CONFIG_PHY_NXP_C45_TJA11XX is not set # CONFIG_PHY_NXP_TJA11XX is not set # CONFIG_PHY_REALTEK is not set # CONFIG_PHY_SMSC is not set # CONFIG_PHY_TERANETICS is not set # CONFIG_PHY_TI is not set # CONFIG_PHY_TI_DP83867 is not set # CONFIG_PHY_TI_DP83869 is not set # CONFIG_PHY_TI_GENERIC is not set # CONFIG_PHY_VITESSE is not set # CONFIG_PHY_XILINX is not set # CONFIG_PHY_XILINX_GMII2RGMII is not set # CONFIG_PHY_ETHERNET_ID is not set # CONFIG_PHY_FIXED is not set # CONFIG_PHY_NCSI is not set CONFIG_PHY_RESET_DELAY=0 # CONFIG_FSL_PFE is not set # CONFIG_BNXT_ETH is not set CONFIG_ETH=y CONFIG_DM_ETH=y # CONFIG_DM_MDIO is not set # CONFIG_DM_ETH_PHY is not set CONFIG_NETDEVICES=y # CONFIG_PHY_GIGE is not set # CONFIG_ALTERA_TSE is not set # CONFIG_BCM_SF2_ETH is not set # CONFIG_BCMGENET is not set # CONFIG_CALXEDA_XGMAC is not set # CONFIG_DRIVER_DM9000 is not set # CONFIG_DWC_ETH_QOS is not set # CONFIG_EEPRO100 is not set # CONFIG_ETH_DESIGNWARE is not set # CONFIG_ETH_DESIGNWARE_MESON8B is not set # CONFIG_ETHOC is not set # CONFIG_FMAN_ENET is not set # CONFIG_FTMAC100 is not set # CONFIG_FTGMAC100 is not set # CONFIG_MCFFEC is not set # CONFIG_FSLDMAFEC is not set # CONFIG_KS8851_MLL is not set # CONFIG_MACB is not set # CONFIG_PCH_GBE is not set # CONFIG_RGMII is not set CONFIG_MII=y # CONFIG_RMII is not set # CONFIG_PCNET is not set # CONFIG_QE_UEC is not set # CONFIG_RTL8139 is not set # CONFIG_RTL8169 is not set # CONFIG_SMC911X is not set # CONFIG_SUN7I_GMAC is not set # CONFIG_SUN4I_EMAC is not set # CONFIG_SUN8I_EMAC is not set # CONFIG_SH_ETHER is not set # CONFIG_DRIVER_TI_CPSW is not set # CONFIG_DRIVER_TI_EMAC is not set # CONFIG_DRIVER_TI_KEYSTONE_NET is not set # CONFIG_TULIP is not set # CONFIG_XILINX_AXIEMAC is not set # CONFIG_XILINX_EMACLITE is not set # CONFIG_ZYNQ_GEM is not set # CONFIG_SYS_DPAA_QBMAN is not set # CONFIG_TSEC_ENET is not set # CONFIG_MEDIATEK_ETH is not set # CONFIG_HIGMACV300_ETH is not set # CONFIG_NVME is not set # CONFIG_NVME_APPLE is not set # CONFIG_PCI is not set # # PCI Endpoint # # CONFIG_PCI_ENDPOINT is not set # CONFIG_X86_PCH7 is not set # CONFIG_X86_PCH9 is not set # # PHY Subsystem # CONFIG_PHY=y # CONFIG_NOP_PHY is not set # CONFIG_MIPI_DPHY_HELPERS is not set # CONFIG_BCM_SR_PCIE_PHY is not set # CONFIG_MSM8916_USB_PHY is not set # CONFIG_OMAP_USB2_PHY is not set # # Rockchip PHY driver # # CONFIG_PHY_CADENCE_SIERRA is not set # CONFIG_PHY_CADENCE_TORRENT is not set # CONFIG_MVEBU_COMPHY_SUPPORT is not set # # Pin controllers # # CONFIG_PINCTRL is not set # CONFIG_POWER_LEGACY is not set # CONFIG_SPL_POWER_LEGACY is not set # CONFIG_ACPI_PMC is not set # CONFIG_SPL_ACPI_PMC is not set # CONFIG_TPL_ACPI_PMC is not set # # Power Domain Support # # CONFIG_POWER_DOMAIN is not set # CONFIG_DM_PMIC is not set # CONFIG_PMIC_TPS65217 is not set # CONFIG_POWER_MC34VR500 is not set # CONFIG_DM_REGULATOR is not set # CONFIG_POWER_MT6323 is not set # CONFIG_DM_PWM is not set # CONFIG_PWM_IMX is not set # CONFIG_PWM_SANDBOX is not set # CONFIG_U_QE is not set # CONFIG_RAM is not set # # Reboot Mode Support # # CONFIG_DM_REBOOT_MODE is not set # # Remote Processor drivers # # # Reset Controller Support # CONFIG_DM_RESET=y # CONFIG_RESET_AST2500 is not set # CONFIG_RESET_AST2600 is not set # CONFIG_RESET_HISILICON is not set # CONFIG_RESET_SYSCON is not set # CONFIG_RESET_SCMI is not set # CONFIG_RESET_DRA7 is not set # CONFIG_DM_RNG is not set # # Real Time Clock # # CONFIG_DM_RTC is not set # CONFIG_RTC_ENABLE_32KHZ_OUTPUT is not set # CONFIG_RTC_PCF8563 is not set # CONFIG_RTC_PL031 is not set # CONFIG_RTC_S35392A is not set # CONFIG_RTC_MC146818 is not set # CONFIG_RTC_M41T62 is not set # CONFIG_SCSI is not set # CONFIG_DM_SCSI is not set CONFIG_SERIAL=y CONFIG_BAUDRATE=115200 CONFIG_REQUIRE_SERIAL_CONSOLE=y CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_SERIAL_PRESENT=y CONFIG_CONS_INDEX=1 CONFIG_DM_SERIAL=y # CONFIG_SERIAL_RX_BUFFER is not set # CONFIG_SERIAL_PUTS is not set # CONFIG_SERIAL_SEARCH_ALL is not set # CONFIG_SERIAL_PROBE_ALL is not set # CONFIG_VPL_DM_SERIAL is not set # CONFIG_ALTERA_JTAG_UART is not set # CONFIG_ALTERA_UART is not set # CONFIG_ARC_SERIAL is not set # CONFIG_ARM_DCC is not set # CONFIG_ATMEL_USART is not set # CONFIG_BCM6345_SERIAL is not set # CONFIG_COREBOOT_SERIAL is not set # CONFIG_CORTINA_UART is not set # CONFIG_FSL_LINFLEXUART is not set # CONFIG_FSL_LPUART is not set # CONFIG_MVEBU_A3700_UART is not set # CONFIG_MCFUART is not set # CONFIG_NULLDEV_SERIAL is not set CONFIG_SYS_NS16550=y # CONFIG_NS16550_DYNAMIC is not set # CONFIG_PL01X_SERIAL is not set # CONFIG_ROCKCHIP_SERIAL is not set # CONFIG_XILINX_UARTLITE is not set # CONFIG_MSM_SERIAL is not set # CONFIG_MSM_GENI_SERIAL is not set # CONFIG_OMAP_SERIAL is not set # CONFIG_PXA_SERIAL is not set # CONFIG_SIFIVE_SERIAL is not set # CONFIG_ZYNQ_SERIAL is not set # CONFIG_MTK_SERIAL is not set # CONFIG_MT7620_SERIAL is not set # CONFIG_NPCM_SERIAL is not set # CONFIG_SMEM is not set # # Sound support # # CONFIG_SOUND is not set # # SOC (System On Chip) specific Drivers # # CONFIG_SOC_DEVICE is not set # CONFIG_SOC_TI is not set # CONFIG_SPI is not set # # SPMI support # # CONFIG_SPMI is not set # CONFIG_SYSINFO is not set # # System reset device drivers # # CONFIG_SYSRESET is not set # CONFIG_TEE is not set # CONFIG_DM_THERMAL is not set # # Timer Support # CONFIG_TIMER=y # CONFIG_TIMER_EARLY is not set # CONFIG_ALTERA_TIMER is not set # CONFIG_AST_TIMER is not set # CONFIG_ATCPIT100_TIMER is not set # CONFIG_ATMEL_PIT_TIMER is not set # CONFIG_CADENCE_TTC_TIMER is not set # CONFIG_DESIGNWARE_APB_TIMER is not set # CONFIG_MPC83XX_TIMER is not set # CONFIG_RENESAS_OSTM_TIMER is not set # CONFIG_NOMADIK_MTU_TIMER is not set # CONFIG_NPCM_TIMER is not set # CONFIG_OMAP_TIMER is not set # CONFIG_ROCKCHIP_TIMER is not set # CONFIG_STI_TIMER is not set # CONFIG_STM32_TIMER is not set # CONFIG_MTK_TIMER is not set # CONFIG_MCHP_PIT64B_TIMER is not set # CONFIG_IMX_GPT_TIMER is not set # # TPM support # # CONFIG_USB is not set # # UFS Host Controller Support # # CONFIG_TI_J721E_UFS is not set # # Graphics support # # CONFIG_DM_VIDEO is not set # CONFIG_SYS_WHITE_ON_BLACK is not set # CONFIG_NO_FB_CLEAR is not set # # TrueType Fonts # # CONFIG_VIDEO_VESA is not set # CONFIG_VIDEO_LCD_ANX9804 is not set # CONFIG_ATMEL_LCD_BGR555 is not set # CONFIG_VIDEO_BCM2835 is not set # CONFIG_VIDEO_LCD_SSD2828 is not set # CONFIG_VIDEO_LCD_HITACHI_TX18D42VM is not set # CONFIG_VIDEO_MVEBU is not set # CONFIG_I2C_EDID is not set # CONFIG_DISPLAY is not set # CONFIG_ATMEL_HLCD is not set # CONFIG_AM335X_LCD is not set # CONFIG_VIDEO_TEGRA20 is not set # CONFIG_VIDEO_BRIDGE is not set # CONFIG_VIDEO is not set # CONFIG_LCD is not set # CONFIG_VIDEO_SIMPLE is not set # CONFIG_VIDEO_DT_SIMPLEFB is not set # CONFIG_OSD is not set # CONFIG_SPLASH_SCREEN is not set # CONFIG_VIDEO_VCXK is not set # # VirtIO Drivers # # CONFIG_VIRTIO_MMIO is not set # # 1-Wire support # # CONFIG_W1 is not set # # 1-wire EEPROM support # # CONFIG_W1_EEPROM is not set # # Watchdog Timer Support # CONFIG_WATCHDOG=y CONFIG_WATCHDOG_AUTOSTART=y CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 # CONFIG_IMX_WATCHDOG is not set # CONFIG_ULP_WATCHDOG is not set # CONFIG_DESIGNWARE_WATCHDOG is not set CONFIG_WDT=y # CONFIG_WDT_APPLE is not set # CONFIG_WDT_ASPEED is not set # CONFIG_WDT_AST2600 is not set # CONFIG_WDT_AT91 is not set # CONFIG_WDT_CDNS is not set # CONFIG_WDT_CORTINA is not set # CONFIG_WDT_GPIO is not set # CONFIG_WDT_MAX6370 is not set # CONFIG_WDT_ORION is not set # CONFIG_WDT_SBSA is not set # CONFIG_WDT_SP805 is not set # CONFIG_WDT_STM32MP is not set # CONFIG_XILINX_TB_WATCHDOG is not set # CONFIG_PVBLOCK is not set # CONFIG_PHYS_TO_BUS is not set # # File systems # # CONFIG_FS_BTRFS is not set # CONFIG_FS_CBFS is not set # CONFIG_SPL_FS_CBFS is not set # CONFIG_FS_EXT4 is not set # CONFIG_FS_FAT is not set # CONFIG_FS_JFFS2 is not set # CONFIG_UBIFS_SILENCE_MSG is not set # CONFIG_FS_CRAMFS is not set # CONFIG_YAFFS2 is not set # CONFIG_FS_SQUASHFS is not set # CONFIG_FS_EROFS is not set # # Library routines # # CONFIG_ADDR_MAP is not set # CONFIG_PHYSMEM is not set # CONFIG_BCH is not set # CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set CONFIG_CHARSET=y # CONFIG_DYNAMIC_CRC_TABLE is not set CONFIG_HAVE_PRIVATE_LIBGCC=y CONFIG_PRINTF=y CONFIG_SPRINTF=y CONFIG_STRTO=y CONFIG_USE_PRIVATE_LIBGCC=y CONFIG_SYS_HZ=1000 # CONFIG_PANIC_HANG is not set # CONFIG_REGEX is not set CONFIG_LIB_RAND=y # CONFIG_LIB_HW_RAND is not set CONFIG_SUPPORT_ACPI=y # CONFIG_GENERATE_ACPI_TABLE is not set # CONFIG_SPL_TINY_MEMSET is not set # CONFIG_TPL_TINY_MEMSET is not set # CONFIG_BITREVERSE is not set # CONFIG_TRACE is not set # CONFIG_CIRCBUF is not set # CONFIG_CMD_DHRYSTONE is not set # # Security support # # CONFIG_AES is not set # CONFIG_ECDSA is not set # CONFIG_RSA is not set # CONFIG_TPM is not set # # Android Verified Boot # # # Hashing Support # # CONFIG_BLAKE2 is not set # CONFIG_SHA1 is not set # CONFIG_SHA256 is not set # CONFIG_SHA512 is not set # CONFIG_SHA384 is not set # CONFIG_SHA_HW_ACCEL is not set # CONFIG_MD5 is not set CONFIG_CRC32=y # # Compression Support # # CONFIG_LZ4 is not set # CONFIG_LZMA is not set # CONFIG_LZO is not set # CONFIG_GZIP is not set # CONFIG_ZLIB_UNCOMPRESS is not set # CONFIG_BZIP2 is not set CONFIG_ZLIB=y # CONFIG_ZSTD is not set # CONFIG_SPL_LZ4 is not set # CONFIG_SPL_LZMA is not set # CONFIG_VPL_LZMA is not set # CONFIG_SPL_LZO is not set # CONFIG_SPL_GZIP is not set # CONFIG_SPL_ZSTD is not set # CONFIG_ERRNO_STR is not set CONFIG_HEXDUMP=y # CONFIG_GETOPT is not set CONFIG_OF_LIBFDT=y CONFIG_OF_LIBFDT_ASSUME_MASK=0 CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_VPL_OF_LIBFDT is not set # CONFIG_FDT_FIXUP_PARTITIONS is not set # # System tables # # CONFIG_LIB_RATIONAL is not set # CONFIG_SMBIOS_PARSER is not set # CONFIG_EFI_LOADER is not set # CONFIG_OPTEE_LIB is not set # CONFIG_OPTEE_IMAGE is not set # CONFIG_BOOTM_OPTEE is not set # CONFIG_TEST_FDTDEC is not set # CONFIG_PHANDLE_CHECK_SEQ is not set # CONFIG_UNIT_TEST is not set # CONFIG_SPL_UNIT_TEST is not set # # Tools options # CONFIG_MKIMAGE_DTC_PATH="dtc" # CONFIG_TOOLS_MKEFICAPSULE is not set 根据以上代码,其中,CONFIG_ENV_OFFSET_REDUND=0x280000表示什么?
08-02
// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2010 * Texas Instruments, <www.ti.com> * * Aneesh V <aneesh@ti.com> */ #include <common.h> #include <bloblist.h> #include <binman_sym.h> #include <bootstage.h> #include <dm.h> #include <handoff.h> #include <hang.h> #include <init.h> #include <irq_func.h> #include <log.h> #include <mapmem.h> #include <serial.h> #include <spl.h> #include <asm/global_data.h> #include <asm/u-boot.h> #include <nand.h> #include <fat.h> #include <u-boot/crc.h> #include <version.h> #include <image.h> #include <malloc.h> #include <mapmem.h> #include <dm/root.h> #include <linux/compiler.h> #include <fdt_support.h> #include <bootcount.h> #include <wdt.h> DECLARE_GLOBAL_DATA_PTR; #ifndef CONFIG_SYS_UBOOT_START #define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE #endif #ifndef CONFIG_SYS_MONITOR_LEN /* Unknown U-Boot size, let's assume it will not be more than 200 KB */ #define CONFIG_SYS_MONITOR_LEN (200 * 1024) #endif u32 *boot_params_ptr = NULL; /* See spl.h for information about this */ binman_sym_declare(ulong, u_boot_any, image_pos); binman_sym_declare(ulong, u_boot_any, size); #ifdef CONFIG_TPL binman_sym_declare(ulong, spl, image_pos); binman_sym_declare(ulong, spl, size); #endif /* Define board data structure */ static struct bd_info bdata __attribute__ ((section(".data"))); #if CONFIG_IS_ENABLED(BOOTSTAGE) /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ __weak void show_boot_progress(int val) {} #endif #if defined(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) || \ defined(CONFIG_SPL_ATF) /* weak, default platform-specific function to initialize dram banks */ __weak int dram_init_banksize(void) { return 0; } #endif /* * Default function to determine if u-boot or the OS should * be started. This implementation always returns 1. * * Please implement your own board specific funcion to do this. * * RETURN * 0 to not start u-boot * positive if u-boot should start */ #ifdef CONFIG_SPL_OS_BOOT __weak int spl_start_uboot(void) { puts(SPL_TPL_PROMPT "Please implement spl_start_uboot() for your board\n"); puts(SPL_TPL_PROMPT "Direct Linux boot not active!\n"); return 1; } /* * Weak default function for arch specific zImage check. Return zero * and fill start and end address if image is recognized. */ int __weak bootz_setup(ulong image, ulong *start, ulong *end) { return 1; } #endif /* Weak default function for arch/board-specific fixups to the spl_image_info */ void __weak spl_perform_fixups(struct spl_image_info *spl_image) { } void spl_fixup_fdt(void *fdt_blob) { #if defined(CONFIG_SPL_OF_LIBFDT) int err; if (!fdt_blob) return; err = fdt_check_header(fdt_blob); if (err < 0) { printf("fdt_root: %s\n", fdt_strerror(err)); return; } /* fixup the memory dt node */ err = fdt_shrink_to_minimum(fdt_blob, 0); if (err == 0) { printf(SPL_TPL_PROMPT "fdt_shrink_to_minimum err - %d\n", err); return; } err = arch_fixup_fdt(fdt_blob); if (err) { printf(SPL_TPL_PROMPT "arch_fixup_fdt err - %d\n", err); return; } #endif } ulong spl_get_image_pos(void) { return spl_phase() == PHASE_TPL ? binman_sym(ulong, spl, image_pos) : binman_sym(ulong, u_boot_any, image_pos); } ulong spl_get_image_size(void) { return spl_phase() == PHASE_TPL ? binman_sym(ulong, spl, size) : binman_sym(ulong, u_boot_any, size); } ulong spl_get_image_text_base(void) { return spl_phase() == PHASE_TPL ? CONFIG_SPL_TEXT_BASE : CONFIG_SYS_TEXT_BASE; } /* * Weak default function for board specific cleanup/preparation before * Linux boot. Some boards/platforms might not need it, so just provide * an empty stub here. */ __weak void spl_board_prepare_for_linux(void) { /* Nothing to do! */ } __weak void spl_board_prepare_for_optee(void *fdt) { } __weak void spl_board_prepare_for_boot(void) { /* Nothing to do! */ } __weak struct image_header *spl_get_load_buffer(ssize_t offset, size_t size) { return map_sysmem(CONFIG_SYS_TEXT_BASE + offset, 0); } void spl_set_header_raw_uboot(struct spl_image_info *spl_image) { ulong u_boot_pos = binman_sym(ulong, u_boot_any, image_pos); spl_image->size = CONFIG_SYS_MONITOR_LEN; /* * Binman error cases: address of the end of the previous region or the * start of the image's entry area (usually 0) if there is no previous * region. */ if (u_boot_pos && u_boot_pos != BINMAN_SYM_MISSING) { /* Binman does not support separated entry addresses */ spl_image->entry_point = u_boot_pos; spl_image->load_addr = u_boot_pos; } else { spl_image->entry_point = CONFIG_SYS_UBOOT_START; spl_image->load_addr = CONFIG_SYS_TEXT_BASE; } spl_image->os = IH_OS_U_BOOT; spl_image->name = "U-Boot"; } #if CONFIG_IS_ENABLED(LOAD_FIT_FULL) /* Parse and load full fitImage in SPL */ static int spl_load_fit_image(struct spl_image_info *spl_image, const struct image_header *header) { bootm_headers_t images; const char *fit_uname_config = NULL; uintptr_t fdt_hack; const char *uname; ulong fw_data = 0, dt_data = 0, img_data = 0; ulong fw_len = 0, dt_len = 0, img_len = 0; int idx, conf_noffset; int ret; #ifdef CONFIG_SPL_FIT_SIGNATURE images.verify = 1; #endif ret = fit_image_load(&images, (ulong)header, NULL, &fit_uname_config, IH_ARCH_DEFAULT, IH_TYPE_STANDALONE, -1, FIT_LOAD_OPTIONAL, &fw_data, &fw_len); if (ret >= 0) { printf("DEPRECATED: 'standalone = ' property."); printf("Please use either 'firmware =' or 'kernel ='\n"); } else { ret = fit_image_load(&images, (ulong)header, NULL, &fit_uname_config, IH_ARCH_DEFAULT, IH_TYPE_FIRMWARE, -1, FIT_LOAD_OPTIONAL, &fw_data, &fw_len); } if (ret < 0) { ret = fit_image_load(&images, (ulong)header, NULL, &fit_uname_config, IH_ARCH_DEFAULT, IH_TYPE_KERNEL, -1, FIT_LOAD_OPTIONAL, &fw_data, &fw_len); } if (ret < 0) return ret; spl_image->size = fw_len; spl_image->entry_point = fw_data; spl_image->load_addr = fw_data; if (fit_image_get_os(header, ret, &spl_image->os)) spl_image->os = IH_OS_INVALID; spl_image->name = genimg_get_os_name(spl_image->os); debug(SPL_TPL_PROMPT "payload image: %32s load addr: 0x%lx size: %d\n", spl_image->name, spl_image->load_addr, spl_image->size); #ifdef CONFIG_SPL_FIT_SIGNATURE images.verify = 1; #endif ret = fit_image_load(&images, (ulong)header, NULL, &fit_uname_config, IH_ARCH_DEFAULT, IH_TYPE_FLATDT, -1, FIT_LOAD_OPTIONAL, &dt_data, &dt_len); if (ret >= 0) { spl_image->fdt_addr = (void *)dt_data; if (spl_image->os == IH_OS_U_BOOT) { /* HACK: U-boot expects FDT at a specific address */ fdt_hack = spl_image->load_addr + spl_image->size; fdt_hack = (fdt_hack + 3) & ~3; debug("Relocating FDT to %p\n", spl_image->fdt_addr); memcpy((void *)fdt_hack, spl_image->fdt_addr, dt_len); } } conf_noffset = fit_conf_get_node((const void *)header, fit_uname_config); if (conf_noffset <= 0) return 0; for (idx = 0; uname = fdt_stringlist_get((const void *)header, conf_noffset, FIT_LOADABLE_PROP, idx, NULL), uname; idx++) { #ifdef CONFIG_SPL_FIT_SIGNATURE images.verify = 1; #endif ret = fit_image_load(&images, (ulong)header, &uname, &fit_uname_config, IH_ARCH_DEFAULT, IH_TYPE_LOADABLE, -1, FIT_LOAD_OPTIONAL_NON_ZERO, &img_data, &img_len); if (ret < 0) return ret; } return 0; } #endif __weak int spl_parse_board_header(struct spl_image_info *spl_image, const void *image_header, size_t size) { return -EINVAL; } __weak int spl_parse_legacy_header(struct spl_image_info *spl_image, const struct image_header *header) { /* LEGACY image not supported */ debug("Legacy boot image support not enabled, proceeding to other boot methods\n"); return -EINVAL; } int spl_parse_image_header(struct spl_image_info *spl_image, const struct image_header *header) { #if CONFIG_IS_ENABLED(LOAD_FIT_FULL) int ret = spl_load_fit_image(spl_image, header); if (!ret) return ret; #endif if (image_get_magic(header) == IH_MAGIC) { int ret; ret = spl_parse_legacy_header(spl_image, header); if (ret) return ret; } else { #ifdef CONFIG_SPL_PANIC_ON_RAW_IMAGE /* * CONFIG_SPL_PANIC_ON_RAW_IMAGE is defined when the * code which loads images in SPL cannot guarantee that * absolutely all read errors will be reported. * An example is the LPC32XX MLC NAND driver, which * will consider that a completely unreadable NAND block * is bad, and thus should be skipped silently. */ panic("** no mkimage signature but raw image not supported"); #endif #ifdef CONFIG_SPL_OS_BOOT ulong start, end; if (!bootz_setup((ulong)header, &start, &end)) { spl_image->name = "Linux"; spl_image->os = IH_OS_LINUX; spl_image->load_addr = CONFIG_SYS_LOAD_ADDR; spl_image->entry_point = CONFIG_SYS_LOAD_ADDR; spl_image->size = end - start; debug(SPL_TPL_PROMPT "payload zImage, load addr: 0x%lx size: %d\n", spl_image->load_addr, spl_image->size); return 0; } #endif if (!spl_parse_board_header(spl_image, (const void *)header, sizeof(*header))) return 0; #ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT /* Signature not found - assume u-boot.bin */ debug("mkimage signature not found - ih_magic = %x\n", header->ih_magic); spl_set_header_raw_uboot(spl_image); #else /* RAW image not supported, proceed to other boot methods. */ debug("Raw boot image support not enabled, proceeding to other boot methods\n"); return -EINVAL; #endif } return 0; } __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) { typedef void __noreturn (*image_entry_noargs_t)(void); image_entry_noargs_t image_entry = (image_entry_noargs_t)spl_image->entry_point; debug("image entry point: 0x%lx\n", spl_image->entry_point); image_entry(); } #if CONFIG_IS_ENABLED(HANDOFF) /** * Set up the SPL hand-off information * * This is initially empty (zero) but can be written by */ static int setup_spl_handoff(void) { struct spl_handoff *ho; ho = bloblist_ensure(BLOBLISTT_SPL_HANDOFF, sizeof(struct spl_handoff)); if (!ho) return -ENOENT; return 0; } __weak int handoff_arch_save(struct spl_handoff *ho) { return 0; } static int write_spl_handoff(void) { struct spl_handoff *ho; int ret; ho = bloblist_find(BLOBLISTT_SPL_HANDOFF, sizeof(struct spl_handoff)); if (!ho) return -ENOENT; handoff_save_dram(ho); ret = handoff_arch_save(ho); if (ret) return ret; debug(SPL_TPL_PROMPT "Wrote SPL handoff\n"); return 0; } #else static inline int setup_spl_handoff(void) { return 0; } static inline int write_spl_handoff(void) { return 0; } #endif /* HANDOFF */ /** * get_bootstage_id() - Get the bootstage ID to emit * * @start: true if this is for starting SPL, false for ending it * @return bootstage ID to use */ static enum bootstage_id get_bootstage_id(bool start) { enum u_boot_phase phase = spl_phase(); if (IS_ENABLED(CONFIG_TPL_BUILD) && phase == PHASE_TPL) return start ? BOOTSTAGE_ID_START_TPL : BOOTSTAGE_ID_END_TPL; else return start ? BOOTSTAGE_ID_START_SPL : BOOTSTAGE_ID_END_SPL; } static int spl_common_init(bool setup_malloc) { int ret; #if CONFIG_VAL(SYS_MALLOC_F_LEN) if (setup_malloc) { #ifdef CONFIG_MALLOC_F_ADDR gd->malloc_base = CONFIG_MALLOC_F_ADDR; #endif gd->malloc_limit = CONFIG_VAL(SYS_MALLOC_F_LEN); gd->malloc_ptr = 0; } #endif ret = bootstage_init(u_boot_first_phase()); if (ret) { debug("%s: Failed to set up bootstage: ret=%d\n", __func__, ret); return ret; } #ifdef CONFIG_BOOTSTAGE_STASH if (!u_boot_first_phase()) { const void *stash = map_sysmem(CONFIG_BOOTSTAGE_STASH_ADDR, CONFIG_BOOTSTAGE_STASH_SIZE); ret = bootstage_unstash(stash, CONFIG_BOOTSTAGE_STASH_SIZE); if (ret) debug("%s: Failed to unstash bootstage: ret=%d\n", __func__, ret); } #endif /* CONFIG_BOOTSTAGE_STASH */ bootstage_mark_name(get_bootstage_id(true), spl_phase_name(spl_phase())); #if CONFIG_IS_ENABLED(LOG) ret = log_init(); if (ret) { debug("%s: Failed to set up logging\n", __func__); return ret; } #endif if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) { ret = fdtdec_setup(); if (ret) { debug("fdtdec_setup() returned error %d\n", ret); return ret; } } if (CONFIG_IS_ENABLED(DM)) { bootstage_start(BOOTSTAGE_ID_ACCUM_DM_SPL, spl_phase() == PHASE_TPL ? "dm tpl" : "dm_spl"); /* With CONFIG_SPL_OF_PLATDATA, bring in all devices */ ret = dm_init_and_scan(!CONFIG_IS_ENABLED(OF_PLATDATA)); bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_SPL); if (ret) { debug("dm_init_and_scan() returned error %d\n", ret); return ret; } } return 0; } void spl_set_bd(void) { /* * NOTE: On some platforms (e.g. x86) bdata may be in flash and not * writeable. */ if (!gd->bd) gd->bd = &bdata; } int spl_early_init(void) { int ret; debug("%s\n", __func__); ret = spl_common_init(true); if (ret) return ret; gd->flags |= GD_FLG_SPL_EARLY_INIT; return 0; } int spl_init(void) { int ret; bool setup_malloc = !(IS_ENABLED(CONFIG_SPL_STACK_R) && IS_ENABLED(CONFIG_SPL_SYS_MALLOC_SIMPLE)); debug("%s\n", __func__); if (!(gd->flags & GD_FLG_SPL_EARLY_INIT)) { ret = spl_common_init(setup_malloc); if (ret) return ret; } gd->flags |= GD_FLG_SPL_INIT; return 0; } #ifndef BOOT_DEVICE_NONE #define BOOT_DEVICE_NONE 0xdeadbeef #endif __weak void board_boot_order(u32 *spl_boot_list) { spl_boot_list[0] = spl_boot_device(); } static struct spl_image_loader *spl_ll_find_loader(uint boot_device) { struct spl_image_loader *drv = ll_entry_start(struct spl_image_loader, spl_image_loader); const int n_ents = ll_entry_count(struct spl_image_loader, spl_image_loader); struct spl_image_loader *entry; for (entry = drv; entry != drv + n_ents; entry++) { if (boot_device == entry->boot_device) return entry; } /* Not found */ return NULL; } static int spl_load_image(struct spl_image_info *spl_image, struct spl_image_loader *loader) { int ret; struct spl_boot_device bootdev; bootdev.boot_device = loader->boot_device; bootdev.boot_device_name = NULL; ret = loader->load_image(spl_image, &bootdev); #ifdef CONFIG_SPL_LEGACY_IMAGE_CRC_CHECK if (!ret && spl_image->dcrc_length) { /* check data crc */ ulong dcrc = crc32_wd(0, (unsigned char *)spl_image->dcrc_data, spl_image->dcrc_length, CHUNKSZ_CRC32); if (dcrc != spl_image->dcrc) { puts("SPL: Image data CRC check failed!\n"); ret = -EINVAL; } } #endif return ret; } /** * boot_from_devices() - Try loading a booting U-Boot from a list of devices * * @spl_image: Place to put the image details if successful * @spl_boot_list: List of boot devices to try * @count: Number of elements in spl_boot_list * @return 0 if OK, -ENODEV if there were no boot devices * if CONFIG_SHOW_ERRORS is enabled, returns -ENXIO if there were * devices but none worked */ static int boot_from_devices(struct spl_image_info *spl_image, u32 spl_boot_list[], int count) { int ret = -ENODEV; int i; for (i = 0; i < count && spl_boot_list[i] != BOOT_DEVICE_NONE; i++) { struct spl_image_loader *loader; int bootdev = spl_boot_list[i]; if (CONFIG_IS_ENABLED(SHOW_ERRORS)) ret = -ENXIO; loader = spl_ll_find_loader(bootdev); if (CONFIG_IS_ENABLED(SERIAL_SUPPORT) && CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT) && !IS_ENABLED(CONFIG_SILENT_CONSOLE)) { if (loader) printf("Trying to boot from %s\n", spl_loader_name(loader)); else if (CONFIG_IS_ENABLED(SHOW_ERRORS)) printf(SPL_TPL_PROMPT "Unsupported Boot Device %d\n", bootdev); else puts(SPL_TPL_PROMPT "Unsupported Boot Device!\n"); } if (loader && !spl_load_image(spl_image, loader)) { spl_image->boot_device = bootdev; return 0; } } return ret; } #if defined(CONFIG_SPL_FRAMEWORK_BOARD_INIT_F) void board_init_f(ulong dummy) { if (CONFIG_IS_ENABLED(OF_CONTROL)) { int ret; ret = spl_early_init(); if (ret) { debug("spl_early_init() failed: %d\n", ret); hang(); } } preloader_console_init(); } #endif void board_init_r(gd_t *dummy1, ulong dummy2) { u32 spl_boot_list[] = { BOOT_DEVICE_NONE, BOOT_DEVICE_NONE, BOOT_DEVICE_NONE, BOOT_DEVICE_NONE, BOOT_DEVICE_NONE, }; struct spl_image_info spl_image; int ret; debug(">>" SPL_TPL_PROMPT "board_init_r()\n"); spl_set_bd(); #if defined(CONFIG_SYS_SPL_MALLOC_START) mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START, CONFIG_SYS_SPL_MALLOC_SIZE); gd->flags |= GD_FLG_FULL_MALLOC_INIT; #endif if (!(gd->flags & GD_FLG_SPL_INIT)) { if (spl_init()) hang(); } #if !defined(CONFIG_PPC) && !defined(CONFIG_ARCH_MX6) /* * timer_init() does not exist on PPC systems. The timer is initialized * and enabled (decrementer) in interrupt_init() here. */ timer_init(); #endif if (CONFIG_IS_ENABLED(BLOBLIST)) { ret = bloblist_init(); if (ret) { debug("%s: Failed to set up bloblist: ret=%d\n", __func__, ret); puts(SPL_TPL_PROMPT "Cannot set up bloblist\n"); hang(); } } if (CONFIG_IS_ENABLED(HANDOFF)) { int ret; ret = setup_spl_handoff(); if (ret) { puts(SPL_TPL_PROMPT "Cannot set up SPL handoff\n"); hang(); } } #if CONFIG_IS_ENABLED(BOARD_INIT) spl_board_init(); #endif #if defined(CONFIG_SPL_WATCHDOG) && CONFIG_IS_ENABLED(WDT) initr_watchdog(); #endif if (IS_ENABLED(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) || IS_ENABLED(CONFIG_SPL_ATF)) dram_init_banksize(); bootcount_inc(); memset(&spl_image, '\0', sizeof(spl_image)); #ifdef CONFIG_SYS_SPL_ARGS_ADDR spl_image.arg = (void *)CONFIG_SYS_SPL_ARGS_ADDR; #endif spl_image.boot_device = BOOT_DEVICE_NONE; board_boot_order(spl_boot_list); ret = boot_from_devices(&spl_image, spl_boot_list, ARRAY_SIZE(spl_boot_list)); if (ret) { if (CONFIG_IS_ENABLED(SHOW_ERRORS) && CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT)) printf(SPL_TPL_PROMPT "failed to boot from all boot devices (err=%d)\n", ret); else puts(SPL_TPL_PROMPT "failed to boot from all boot devices\n"); hang(); } spl_perform_fixups(&spl_image); if (CONFIG_IS_ENABLED(HANDOFF)) { ret = write_spl_handoff(); if (ret) printf(SPL_TPL_PROMPT "SPL hand-off write failed (err=%d)\n", ret); } if (CONFIG_IS_ENABLED(BLOBLIST)) { ret = bloblist_finish(); if (ret) printf("Warning: Failed to finish bloblist (ret=%d)\n", ret); } #ifdef CONFIG_CPU_V7M spl_image.entry_point |= 0x1; #endif switch (spl_image.os) { case IH_OS_U_BOOT: debug("Jumping to %s...\n", spl_phase_name(spl_next_phase())); break; #if CONFIG_IS_ENABLED(ATF) case IH_OS_ARM_TRUSTED_FIRMWARE: debug("Jumping to U-Boot via ARM Trusted Firmware\n"); spl_fixup_fdt(spl_image.fdt_addr); spl_invoke_atf(&spl_image); break; #endif #if CONFIG_IS_ENABLED(OPTEE) case IH_OS_TEE: debug("Jumping to U-Boot via OP-TEE\n"); spl_board_prepare_for_optee(spl_image.fdt_addr); spl_optee_entry(NULL, NULL, spl_image.fdt_addr, (void *)spl_image.entry_point); break; #endif #if CONFIG_IS_ENABLED(OPENSBI) case IH_OS_OPENSBI: debug("Jumping to U-Boot via RISC-V OpenSBI\n"); spl_invoke_opensbi(&spl_image); break; #endif #ifdef CONFIG_SPL_OS_BOOT case IH_OS_LINUX: debug("Jumping to Linux\n"); #if defined(CONFIG_SYS_SPL_ARGS_ADDR) spl_fixup_fdt((void *)CONFIG_SYS_SPL_ARGS_ADDR); #endif spl_board_prepare_for_linux(); jump_to_image_linux(&spl_image); #endif default: debug("Unsupported OS image.. Jumping nevertheless..\n"); } #if CONFIG_VAL(SYS_MALLOC_F_LEN) && !defined(CONFIG_SYS_SPL_MALLOC_SIZE) debug("SPL malloc() used 0x%lx bytes (%ld KB)\n", gd->malloc_ptr, gd->malloc_ptr / 1024); #endif bootstage_mark_name(get_bootstage_id(false), "end phase"); #ifdef CONFIG_BOOTSTAGE_STASH ret = bootstage_stash((void *)CONFIG_BOOTSTAGE_STASH_ADDR, CONFIG_BOOTSTAGE_STASH_SIZE); if (ret) debug("Failed to stash bootstage: err=%d\n", ret); #endif spl_board_prepare_for_boot(); jump_to_image_no_args(&spl_image); } /* * This requires UART clocks to be enabled. In order for this to work the * caller must ensure that the gd pointer is valid. */ void preloader_console_init(void) { #ifdef CONFIG_SPL_SERIAL_SUPPORT gd->baudrate = CONFIG_BAUDRATE; serial_init(); /* serial communications setup */ gd->have_console = 1; #if CONFIG_IS_ENABLED(BANNER_PRINT) puts("\nU-Boot " SPL_TPL_NAME " " PLAIN_VERSION " (" U_BOOT_DATE " - " U_BOOT_TIME " " U_BOOT_TZ ")\n"); #endif #ifdef CONFIG_SPL_DISPLAY_PRINT spl_display_print(); #endif #endif } /** * This function is called before the stack is changed from initial stack to * relocated stack. It tries to dump the stack size used */ __weak void spl_relocate_stack_check(void) { #if CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE) ulong init_sp = gd->start_addr_sp; ulong stack_bottom = init_sp - CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK); u8 *ptr = (u8 *)stack_bottom; ulong i; for (i = 0; i < CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK); i++) { if (*ptr != CONFIG_VAL(SYS_STACK_F_CHECK_BYTE)) break; ptr++; } printf("SPL initial stack usage: %lu bytes\n", CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK) - i); #endif } /** * spl_relocate_stack_gd() - Relocate stack ready for board_init_r() execution * * Sometimes board_init_f() runs with a stack in SRAM but we want to use SDRAM * for the main board_init_r() execution. This is typically because we need * more stack space for things like the MMC sub-system. * * This function calculates the stack position, copies the global_data into * place, sets the new gd (except for ARM, for which setting GD within a C * function may not always work) and returns the new stack position. The * caller is responsible for setting up the sp register and, in the case * of ARM, setting up gd. * * All of this is done using the same layout and alignments as done in * board_init_f_init_reserve() / board_init_f_alloc_reserve(). * * @return new stack location, or 0 to use the same stack */ ulong spl_relocate_stack_gd(void) { #ifdef CONFIG_SPL_STACK_R gd_t *new_gd; ulong ptr = CONFIG_SPL_STACK_R_ADDR; if (CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE)) spl_relocate_stack_check(); #if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_VAL(SYS_MALLOC_F_LEN) if (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN) { debug("SPL malloc() before relocation used 0x%lx bytes (%ld KB)\n", gd->malloc_ptr, gd->malloc_ptr / 1024); ptr -= CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN; gd->malloc_base = ptr; gd->malloc_limit = CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN; gd->malloc_ptr = 0; } #endif /* Get stack position: use 8-byte alignment for ABI compliance */ ptr = CONFIG_SPL_STACK_R_ADDR - roundup(sizeof(gd_t),16); new_gd = (gd_t *)ptr; memcpy(new_gd, (void *)gd, sizeof(gd_t)); #if CONFIG_IS_ENABLED(DM) dm_fixup_for_gd_move(new_gd); #endif #if !defined(CONFIG_ARM) && !defined(CONFIG_RISCV) gd = new_gd; #endif return ptr; #else return 0; #endif } #if defined(CONFIG_BOOTCOUNT_LIMIT) && \ ((!defined(CONFIG_TPL_BUILD) && !defined(CONFIG_SPL_BOOTCOUNT_LIMIT)) || \ (defined(CONFIG_TPL_BUILD) && !defined(CONFIG_TPL_BOOTCOUNT_LIMIT))) void bootcount_store(ulong a) { } ulong bootcount_load(void) { return 0; } #endif
11-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值