Merge branch '2020-05-15-kconfig-migrations'
- Convert CONFIG_DELAY_ENVIRONMENT to Kconfig and update initr_pci to be Kconfig'd.
This commit is contained in:
commit
515f613253
@ -932,6 +932,16 @@ config LAST_STAGE_INIT
|
||||
U-Boot calls last_stage_init() before the command-line interpreter is
|
||||
started.
|
||||
|
||||
config PCI_INIT_R
|
||||
bool "Enumerate PCI buses during init"
|
||||
depends on PCI
|
||||
default y if !DM_PCI
|
||||
help
|
||||
With this option U-Boot will call pci_init() soon after relocation,
|
||||
which will enumerate PCI buses. This is needed, for instance, in the
|
||||
case of DM PCI-based Ethernet devices, which will not be detected
|
||||
without having the enumeration performed earlier.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Security support"
|
||||
|
@ -232,9 +232,8 @@ static int initr_unlock_ram_in_cache(void)
|
||||
#ifdef CONFIG_PCI
|
||||
static int initr_pci(void)
|
||||
{
|
||||
#ifndef CONFIG_DM_PCI
|
||||
pci_init();
|
||||
#endif
|
||||
if (IS_ENABLED(CONFIG_PCI_INIT_R))
|
||||
pci_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -464,13 +463,14 @@ static int initr_mmc(void)
|
||||
*/
|
||||
static int should_load_env(void)
|
||||
{
|
||||
#ifdef CONFIG_OF_CONTROL
|
||||
return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 1);
|
||||
#elif defined CONFIG_DELAY_ENVIRONMENT
|
||||
return 0;
|
||||
#else
|
||||
if (IS_ENABLED(CONFIG_OF_CONTROL))
|
||||
return fdtdec_get_config_int(gd->fdt_blob,
|
||||
"load-environment", 1);
|
||||
|
||||
if (IS_ENABLED(CONFIG_DELAY_ENVIRONMENT))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int initr_env(void)
|
||||
@ -480,10 +480,10 @@ static int initr_env(void)
|
||||
env_relocate();
|
||||
else
|
||||
env_set_default(NULL, 0);
|
||||
#ifdef CONFIG_OF_CONTROL
|
||||
env_set_hex("fdtcontroladdr",
|
||||
(unsigned long)map_to_sysmem(gd->fdt_blob));
|
||||
#endif
|
||||
|
||||
if (IS_ENABLED(CONFIG_OF_CONTROL))
|
||||
env_set_hex("fdtcontroladdr",
|
||||
(unsigned long)map_to_sysmem(gd->fdt_blob));
|
||||
|
||||
/* Initialize from environment */
|
||||
image_load_addr = env_get_ulong("loadaddr", 16, image_load_addr);
|
||||
|
@ -34,6 +34,7 @@ CONFIG_SPL_NET_SUPPORT=y
|
||||
CONFIG_SPL_PCI=y
|
||||
CONFIG_SPL_PCH_SUPPORT=y
|
||||
CONFIG_SPL_RTC_SUPPORT=y
|
||||
CONFIG_PCI_INIT_R=y
|
||||
CONFIG_CMD_CPU=y
|
||||
CONFIG_CMD_BOOTEFI_SELFTEST=y
|
||||
CONFIG_CMD_NVEDIT_EFI=y
|
||||
|
@ -18,6 +18,7 @@ CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro"
|
||||
CONFIG_SYS_CONSOLE_INFO_QUIET=y
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_LAST_STAGE_INIT=y
|
||||
CONFIG_PCI_INIT_R=y
|
||||
CONFIG_CMD_CPU=y
|
||||
CONFIG_CMD_BOOTEFI_SELFTEST=y
|
||||
CONFIG_CMD_NVEDIT_EFI=y
|
||||
|
@ -10,10 +10,9 @@ CONFIG_FIT_SIGNATURE=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_FIT_BEST_MATCH=y
|
||||
CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
CONFIG_USE_PREBOOT=y
|
||||
CONFIG_PREBOOT="pci enum"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_PCI_INIT_R=y
|
||||
CONFIG_CMD_BOOTEFI_SELFTEST=y
|
||||
CONFIG_CMD_NVEDIT_EFI=y
|
||||
CONFIG_CMD_PCI=y
|
||||
|
@ -12,10 +12,9 @@ CONFIG_FIT_SIGNATURE=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_FIT_BEST_MATCH=y
|
||||
CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
CONFIG_USE_PREBOOT=y
|
||||
CONFIG_PREBOOT="pci enum"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_PCI_INIT_R=y
|
||||
CONFIG_CMD_BOOTEFI_SELFTEST=y
|
||||
CONFIG_CMD_NVEDIT_EFI=y
|
||||
CONFIG_CMD_PCI=y
|
||||
|
12
env/Kconfig
vendored
12
env/Kconfig
vendored
@ -592,6 +592,18 @@ config ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
run-time determined information about the hardware to the
|
||||
environment. These will be named board_name, board_rev.
|
||||
|
||||
config DELAY_ENVIRONMENT
|
||||
bool "Delay environment loading"
|
||||
depends on !OF_CONTROL
|
||||
help
|
||||
Enable this to inhibit loading the environment during board
|
||||
initialization. This can address the security risk of untrusted data
|
||||
being used during boot. Normally the environment is loaded when the
|
||||
board is initialised so that it is available to U-Boot. This inhibits
|
||||
that so that the environment is not available until explicitly loaded
|
||||
later by U-Boot code. With CONFIG_OF_CONTROL this is instead
|
||||
controlled by the value of /config/load-environment.
|
||||
|
||||
if SPL_ENV_SUPPORT
|
||||
config SPL_ENV_IS_NOWHERE
|
||||
bool "SPL Environment is not stored"
|
||||
|
@ -22,8 +22,6 @@
|
||||
#include <config_distro_bootcmd.h>
|
||||
#include <configs/x86-common.h>
|
||||
|
||||
#define CONFIG_PREBOOT "pci enum"
|
||||
|
||||
#define CONFIG_SYS_MONITOR_LEN (1 << 20)
|
||||
|
||||
#define CONFIG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd\0" \
|
||||
|
@ -303,7 +303,6 @@ CONFIG_DEFAULT
|
||||
CONFIG_DEFAULT_CONSOLE
|
||||
CONFIG_DEFAULT_IMMR
|
||||
CONFIG_DEF_HWCONFIG
|
||||
CONFIG_DELAY_ENVIRONMENT
|
||||
CONFIG_DESIGNWARE_ETH
|
||||
CONFIG_DEVELOP
|
||||
CONFIG_DEVICE_TREE_LIST
|
||||
|
Loading…
Reference in New Issue
Block a user