diff options
| author | Tom Rini <[email protected]> | 2026-04-06 12:16:57 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-04-06 12:16:57 -0600 |
| commit | 93f84ee022a8401421cdaab84fe7d106d83fdb4a (patch) | |
| tree | fb15a4af876e8faf9893fd86c1c0e127265dbe9a /boot | |
| parent | 88dc2788777babfd6322fa655df549a019aa1e69 (diff) | |
| parent | e2138cf1e6088f12ffa874e87cc8f4b198378635 (diff) | |
Merge branch 'next'
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/Kconfig | 21 | ||||
| -rw-r--r-- | boot/bootm.c | 29 | ||||
| -rw-r--r-- | boot/bootmeth-uclass.c | 2 | ||||
| -rw-r--r-- | boot/fdt_simplefb.c | 3 | ||||
| -rw-r--r-- | boot/image-fit-sig.c | 9 | ||||
| -rw-r--r-- | boot/image-sig.c | 2 | ||||
| -rw-r--r-- | boot/image.c | 7 |
7 files changed, 45 insertions, 28 deletions
diff --git a/boot/Kconfig b/boot/Kconfig index ab31b8f40ed..982687621bd 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -183,6 +183,7 @@ config SPL_FIT bool "Support Flattened Image Tree within SPL" depends on SPL select SPL_HASH + select SPL_LIBGENERIC_SUPPORT select SPL_OF_LIBFDT config SPL_FIT_PRINT @@ -315,6 +316,7 @@ config TPL_FIT bool "Support Flattened Image Tree within TPL" depends on TPL select TPL_HASH + select TPL_LIBGENERIC_SUPPORT select TPL_OF_LIBFDT config TPL_LOAD_FIT @@ -386,7 +388,6 @@ config VPL_FIT_SIGNATURE default y select FIT_SIGNATURE select VPL_FIT - select VPL_CRYPTO select VPL_HASH imply VPL_RSA imply VPL_RSA_VERIFY @@ -430,12 +431,12 @@ config BOOT_DEFAULTS_CMDS select CMD_FAT select CMD_FS_GENERIC select CMD_PART if PARTITIONS - select CMD_DHCP if CMD_NET - select CMD_PING if CMD_NET - select CMD_PXE if CMD_NET + select CMD_DHCP if CMD_NET && !NO_NET + select CMD_PING if CMD_NET && !NO_NET + select CMD_PXE if CMD_NET && !NO_NET select CMD_BOOTI if ARM64 select CMD_BOOTZ if ARM && !ARM64 - imply CMD_MII if NET + imply CMD_MII if CMD_NET && !NO_NET config BOOT_DEFAULTS bool # Common defaults for standard boot and distroboot @@ -562,6 +563,7 @@ config BOOTMETH_ANDROID select CMD_BCB imply CMD_FASTBOOT imply FASTBOOT if !NET_LWIP + select EFI_PARTITION select PARTITION_TYPE_GUID select PARTITION_UUIDS help @@ -990,6 +992,7 @@ if SPL config SPL_UPL bool "Write a UPL handoff in SPL" + depends on SPL_LIBGENERIC_SUPPORT imply SPL_UPL_OUT help This tells SPL to write a UPL handoff and pass it to the next phase @@ -1007,6 +1010,7 @@ config SPL_UPL_WRITE config SPL_UPL_OUT bool "upl - Support writing a Universal Payload handoff in SPL" + depends on SPL_UPL select SPL_UPL_WRITE help Provides support for encoding a UPL-format payload and passing it to @@ -1160,7 +1164,6 @@ config SYS_BOOT_RAMDISK_HIGH depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ depends on !(NIOS2 || SANDBOX || SH || XTENSA) def_bool y - select LMB help Enable initrd_high functionality. If defined then the initrd_high feature is enabled and the boot* ramdisk subcommand is enabled. @@ -1810,7 +1813,7 @@ config SPL_IMAGE_PRE_LOAD config IMAGE_PRE_LOAD_SIG bool "Image pre-load signature support" depends on IMAGE_PRE_LOAD - select FIT_SIGNATURE + depends on FIT_SIGNATURE select RSA select RSA_VERIFY_WITH_PKEY help @@ -1827,7 +1830,7 @@ config IMAGE_PRE_LOAD_SIG config SPL_IMAGE_PRE_LOAD_SIG bool "Image pre-load signature support within SPL" depends on SPL_IMAGE_PRE_LOAD && IMAGE_PRE_LOAD_SIG - select SPL_FIT_SIGNATURE + depends on SPL_FIT_SIGNATURE select SPL_RSA select SPL_RSA_VERIFY_WITH_PKEY help @@ -2037,7 +2040,7 @@ menu "Configuration editor" config CEDIT bool "Configuration editor" - depends on EXPO + depends on EXPO && DM_RTC help Provides a way to deal with board configuration and present it to the user for adjustment. diff --git a/boot/bootm.c b/boot/bootm.c index 4bdca22ea8c..4836d6b2d41 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -7,6 +7,7 @@ #ifndef USE_HOSTCC #include <bootm.h> #include <bootstage.h> +#include <dm/root.h> #include <cli.h> #include <command.h> #include <cpu_func.h> @@ -602,7 +603,7 @@ static int handle_decomp_error(int comp_type, size_t uncomp_size, #ifndef USE_HOSTCC static int bootm_load_os(struct bootm_headers *images, int boot_progress) { - struct image_info os = images->os; + const struct image_info os = images->os; ulong load = os.load; ulong load_end; ulong blob_start = os.start; @@ -631,7 +632,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) return 1; load = (ulong)addr; - os.load = (ulong)addr; + images->os.load = (ulong)addr; images->ep = (ulong)addr; debug("Allocated %lx bytes at %lx for kernel (size %lx) decompression\n", req_size, load, image_len); @@ -1194,6 +1195,30 @@ void __weak switch_to_non_secure_mode(void) { } +void bootm_final(int flag) +{ + printf("\nStarting kernel ...%s\n\n", + (flag & BOOTM_STATE_OS_FAKE_GO) ? + " (fake run for tracing)" : ""); + + bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel"); + + if (IS_ENABLED(CONFIG_BOOTSTAGE_FDT) && IS_ENABLED(CONFIG_CMD_FDT)) + bootstage_fdt_add_report(); + bootstage_stash_default(); + if (IS_ENABLED(CONFIG_BOOTSTAGE_REPORT)) + bootstage_report(); + + board_quiesce_devices(); + + /* + * Call remove function of all devices with a removal flag set. + * This may be useful for last-stage operations, like cancelling + * of DMA operation or releasing device internal buffers. + */ + dm_remove_devices_active(); +} + #else /* USE_HOSTCC */ #if defined(CONFIG_FIT_SIGNATURE) diff --git a/boot/bootmeth-uclass.c b/boot/bootmeth-uclass.c index a9709465f6e..c841dd0d6d4 100644 --- a/boot/bootmeth-uclass.c +++ b/boot/bootmeth-uclass.c @@ -19,8 +19,6 @@ #include <mapmem.h> #include <dm/uclass-internal.h> -DECLARE_GLOBAL_DATA_PTR; - int bootmeth_get_state_desc(struct udevice *dev, char *buf, int maxsize) { const struct bootmeth_ops *ops = bootmeth_get_ops(dev); diff --git a/boot/fdt_simplefb.c b/boot/fdt_simplefb.c index 5822131767d..69c7c2e24c0 100644 --- a/boot/fdt_simplefb.c +++ b/boot/fdt_simplefb.c @@ -8,14 +8,11 @@ #include <dm.h> #include <fdt_support.h> -#include <asm/global_data.h> #include <linux/libfdt.h> #include <video.h> #include <spl.h> #include <bloblist.h> -DECLARE_GLOBAL_DATA_PTR; - static int fdt_simplefb_configure_node(void *blob, int off) { int xsize, ysize; diff --git a/boot/image-fit-sig.c b/boot/image-fit-sig.c index f426ead13c0..433df20281f 100644 --- a/boot/image-fit-sig.c +++ b/boot/image-fit-sig.c @@ -476,6 +476,10 @@ static int fit_config_check_sig(const void *fit, int noffset, int conf_noffset, return -1; } + debug("Hash nodes (%d):\n", count); + for (int i = 0; i < count; ++i) + debug(" '%s'\n", node_inc[i]); + /* * Each node can generate one region for each sub-node. Allow for * 7 sub-nodes (hash-1, signature-1, etc.) and some extra. @@ -589,9 +593,8 @@ static int fit_config_verify_key(const void *fit, int conf_noffset, return 0; error: - printf(" error!\n%s for '%s' hash node in '%s' config node\n", - err_msg, fit_get_name(fit, noffset, NULL), - fit_get_name(fit, conf_noffset, NULL)); + printf(" error!\n%s for '%s' config node\n", + err_msg, fit_get_name(fit, conf_noffset, NULL)); return -EPERM; } diff --git a/boot/image-sig.c b/boot/image-sig.c index 6bc74866eae..4eab017bc2d 100644 --- a/boot/image-sig.c +++ b/boot/image-sig.c @@ -5,8 +5,6 @@ #include <log.h> #include <malloc.h> -#include <asm/global_data.h> -DECLARE_GLOBAL_DATA_PTR; #include <image.h> #include <relocate.h> #include <u-boot/ecdsa.h> diff --git a/boot/image.c b/boot/image.c index dd96f712b6f..185d52ba492 100644 --- a/boot/image.c +++ b/boot/image.c @@ -15,21 +15,14 @@ #include <malloc.h> #include <u-boot/crc.h> -#ifdef CONFIG_SHOW_BOOT_PROGRESS -#include <status_led.h> -#endif - #if CONFIG_IS_ENABLED(FIT) || CONFIG_IS_ENABLED(OF_LIBFDT) #include <linux/libfdt.h> #include <fdt_support.h> #endif -#include <asm/global_data.h> #include <linux/errno.h> #include <asm/io.h> -DECLARE_GLOBAL_DATA_PTR; - /* Set this if we have less than 4 MB of malloc() space */ #if CONFIG_SYS_MALLOC_LEN < (4096 * 1024) #define CONSERVE_MEMORY true |
