diff options
author | Tom Rini <trini@konsulko.com> | 2022-07-11 10:18:13 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-07-11 14:58:57 -0400 |
commit | 36b661dc919da318c163a45f4a220d2e3d9db608 (patch) | |
tree | 268703050f58280feb3287d48eb0cedc974730e1 /boot | |
parent | e092e3250270a1016c877da7bdd9384f14b1321e (diff) | |
parent | 05a4859637567b13219efd6f1707fb236648b1b7 (diff) | |
download | u-boot-36b661dc919da318c163a45f4a220d2e3d9db608.zip u-boot-36b661dc919da318c163a45f4a220d2e3d9db608.tar.gz u-boot-36b661dc919da318c163a45f4a220d2e3d9db608.tar.bz2 |
Merge branch 'next'
Diffstat (limited to 'boot')
-rw-r--r-- | boot/Kconfig | 29 | ||||
-rw-r--r-- | boot/bootm.c | 40 | ||||
-rw-r--r-- | boot/image-board.c | 6 | ||||
-rw-r--r-- | boot/image-pre-load.c | 5 |
4 files changed, 49 insertions, 31 deletions
diff --git a/boot/Kconfig b/boot/Kconfig index 08451c6..17438b5 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -555,8 +555,12 @@ config CHROMEOS_VBOOT distinguishing between booting Chrome OS in a basic way (developer mode) and a full boot. +config SYS_RAMBOOT + bool + config RAMBOOT_PBL bool "Freescale PBL(pre-boot loader) image format support" + select SYS_RAMBOOT if PPC help Some SoCs use PBL to load RCW and/or pre-initialization instructions. For more details refer to doc/README.pblimage @@ -575,6 +579,19 @@ config SPIFLASH endchoice +config FSL_FIXED_MMC_LOCATION + bool "PBL MMC is at a fixed location" + depends on SDCARD && !RAMBOOT_PBL + +config ESDHC_HC_BLK_ADDR + def_bool y + depends on FSL_FIXED_MMC_LOCATION && (ARCH_BSC9131 || ARCH_BSC9132 || ARCH_P1010) + help + In High Capacity SD Cards (> 2 GBytes), the 32-bit source address and + code length of these soc specify the memory address in block address + format. Block length is fixed to 512 bytes as per the SD High + Capacity specification. + config SYS_FSL_PBL_PBI string "PBI(pre-boot instructions) commands for the PBL image" depends on RAMBOOT_PBL @@ -589,6 +606,14 @@ config SYS_FSL_PBL_RCW Enables addition of RCW (Power on reset configuration) in built image. Please refer doc/README.pblimage for more details. +config SYS_BOOT_RAMDISK_HIGH + depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ + depends on !(NIOS2 || SANDBOX || SH || XTENSA) + def_bool y + help + Enable initrd_high functionality. If defined then the initrd_high + feature is enabled and the boot* ramdisk subcommand is enabled. + endmenu # Boot images menu "Boot timing" @@ -613,7 +638,7 @@ config BOOTSTAGE config SPL_BOOTSTAGE bool "Boot timing and reported in SPL" - depends on BOOTSTAGE + depends on BOOTSTAGE && SPL help Enable recording of boot time in SPL. To make this visible to U-Boot proper, enable BOOTSTAGE_STASH as well. This will stash the timing @@ -622,7 +647,7 @@ config SPL_BOOTSTAGE config TPL_BOOTSTAGE bool "Boot timing and reported in TPL" - depends on BOOTSTAGE + depends on BOOTSTAGE && TPL help Enable recording of boot time in SPL. To make this visible to U-Boot proper, enable BOOTSTAGE_STASH as well. This will stash the timing diff --git a/boot/bootm.c b/boot/bootm.c index 714406a..86dbfbc 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -33,11 +33,6 @@ #include <bootm.h> #include <image.h> -#ifndef CONFIG_SYS_BOOTM_LEN -/* use 8MByte as default max gunzip size */ -#define CONFIG_SYS_BOOTM_LEN 0x800000 -#endif - #define MAX_CMDLINE_SIZE SZ_4K #define IH_INITRD_ARCH IH_ARCH_DEFAULT @@ -369,10 +364,12 @@ static int bootm_find_other(struct cmd_tbl *cmdtp, int flag, int argc, * * @comp_type: Compression type being used (IH_COMP_...) * @uncomp_size: Number of bytes uncompressed + * @buf_size: Number of bytes the decompresion buffer was * @ret: errno error code received from compression library * Return: Appropriate BOOTM_ERR_ error code */ -static int handle_decomp_error(int comp_type, size_t uncomp_size, int ret) +static int handle_decomp_error(int comp_type, size_t uncomp_size, + size_t buf_size, int ret) { const char *name = genimg_get_comp_name(comp_type); @@ -380,7 +377,7 @@ static int handle_decomp_error(int comp_type, size_t uncomp_size, int ret) if (ret == -ENOSYS) return BOOTM_ERR_UNIMPLEMENTED; - if (uncomp_size >= CONFIG_SYS_BOOTM_LEN) + if (uncomp_size >= buf_size) printf("Image too large: increase CONFIG_SYS_BOOTM_LEN\n"); else printf("%s: uncompress error %d\n", name, ret); @@ -420,7 +417,8 @@ static int bootm_load_os(bootm_headers_t *images, int boot_progress) load_buf, image_buf, image_len, CONFIG_SYS_BOOTM_LEN, &load_end); if (err) { - err = handle_decomp_error(os.comp, load_end - load, err); + err = handle_decomp_error(os.comp, load_end - load, + CONFIG_SYS_BOOTM_LEN, err); bootstage_error(BOOTSTAGE_ID_DECOMP_IMAGE); return err; } @@ -498,7 +496,8 @@ ulong bootm_disable_interrupts(void) } #define CONSOLE_ARG "console=" -#define CONSOLE_ARG_SIZE sizeof(CONSOLE_ARG) +#define NULL_CONSOLE (CONSOLE_ARG "ttynull") +#define CONSOLE_ARG_SIZE sizeof(NULL_CONSOLE) /** * fixup_silent_linux() - Handle silencing the linux boot if required @@ -550,21 +549,22 @@ static int fixup_silent_linux(char *buf, int maxlen) char *end = strchr(start, ' '); int start_bytes; - start_bytes = start - cmdline + CONSOLE_ARG_SIZE - 1; + start_bytes = start - cmdline; strncpy(buf, cmdline, start_bytes); + strncpy(buf + start_bytes, NULL_CONSOLE, CONSOLE_ARG_SIZE); if (end) - strcpy(buf + start_bytes, end); + strcpy(buf + start_bytes + CONSOLE_ARG_SIZE - 1, end); else - buf[start_bytes] = '\0'; + buf[start_bytes + CONSOLE_ARG_SIZE] = '\0'; } else { - sprintf(buf, "%s %s", cmdline, CONSOLE_ARG); + sprintf(buf, "%s %s", cmdline, NULL_CONSOLE); } if (buf + strlen(buf) >= cmdline) return -ENOSPC; } else { - if (maxlen < sizeof(CONSOLE_ARG)) + if (maxlen < CONSOLE_ARG_SIZE) return -ENOSPC; - strcpy(buf, CONSOLE_ARG); + strcpy(buf, NULL_CONSOLE); } debug("after silent fix-up: %s\n", buf); @@ -1004,7 +1004,7 @@ static int bootm_host_load_image(const void *fit, int req_image_type, ulong data, len; bootm_headers_t images; int noffset; - ulong load_end; + ulong load_end, buf_size; uint8_t image_type; uint8_t imape_comp; void *load_buf; @@ -1030,14 +1030,14 @@ static int bootm_host_load_image(const void *fit, int req_image_type, } /* Allow the image to expand by a factor of 4, should be safe */ - load_buf = malloc((1 << 20) + len * 4); + buf_size = (1 << 20) + len * 4; + load_buf = malloc(buf_size); ret = image_decomp(imape_comp, 0, data, image_type, load_buf, - (void *)data, len, CONFIG_SYS_BOOTM_LEN, - &load_end); + (void *)data, len, buf_size, &load_end); free(load_buf); if (ret) { - ret = handle_decomp_error(imape_comp, load_end - 0, ret); + ret = handle_decomp_error(imape_comp, load_end - 0, buf_size, ret); if (ret != BOOTM_ERR_UNIMPLEMENTED) return ret; } diff --git a/boot/image-board.c b/boot/image-board.c index 0d2e0fc..cfc1c65 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -21,10 +21,6 @@ #include <asm/cache.h> #include <asm/global_data.h> -#ifndef CONFIG_SYS_BARGSIZE -#define CONFIG_SYS_BARGSIZE 512 -#endif - DECLARE_GLOBAL_DATA_PTR; #if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT) @@ -827,6 +823,7 @@ int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images, return 0; } +#ifdef CONFIG_SYS_BOOT_GET_CMDLINE /** * boot_get_cmdline - allocate and initialize kernel cmdline * @lmb: pointer to lmb handle, will be used for memory mgmt @@ -900,6 +897,7 @@ int boot_get_kbd(struct lmb *lmb, struct bd_info **kbd) return 0; } +#endif int image_setup_linux(bootm_headers_t *images) { diff --git a/boot/image-pre-load.c b/boot/image-pre-load.c index 78d8906..5ab9ae1 100644 --- a/boot/image-pre-load.c +++ b/boot/image-pre-load.c @@ -23,11 +23,6 @@ DECLARE_GLOBAL_DATA_PTR; #define IMAGE_PRE_LOAD_PROP_PUBLIC_KEY "public-key" #define IMAGE_PRE_LOAD_PROP_MANDATORY "mandatory" -#ifndef CONFIG_SYS_BOOTM_LEN -/* use 8MByte as default max gunzip size */ -#define CONFIG_SYS_BOOTM_LEN 0x800000 -#endif - /* * Information in the device-tree about the signature in the header */ |