summaryrefslogtreecommitdiff
path: root/common/spl
AgeCommit message (Collapse)AuthorFilesLines
2023-07-07tpl: Kconfig: TPL_BANNER_PRINT depends on DEBUG_UART && TPL_SERIALYing Sun1-0/+1
As implemented in the arch/arm/mach-rockchip/tpl.c file, the CONFIG_TPL_BANNER_PRINT option will not work if either of these options is not enabled. Add dependency constraints to the CONFIG_TPL_BANNER_PRINT option definition to prevent configuration problems where option is enabled but do not take effect. Suggested-by: Yanjie Ren <renyanjie01@gmail.com> Signed-off-by: Ying Sun <sunying@nj.iscas.ac.cn>
2023-07-06RISC-V: CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS descriptionHeinrich Schuchardt1-2/+4
Describe which numeric values can be used for as scratch options for OpenSBI. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2023-07-05Merge tag 'v2023.07-rc6' into nextTom Rini3-9/+22
Prepare v2023.07-rc6
2023-07-03spl: spl_legacy: Fix spl_end addressFabio Estevam1-1/+1
Currently, spl_end points to the __bss_end address, which is an external RAM address instead of the end of the SPL text section in the internal RAM. This causes boot failures on imx6-colibri, for example: ``` Trying to boot from MMC1 SPL: Image overlaps SPL resetting ... ``` Fix this problem by assigning spl_end to _image_binary_end, as this symbol properly represents the end of the SPL text section. From u-boot-spl.map: .end *(.__end) 0x00000000009121a4 _image_binary_end = . Fixes: 77aed22b48ab ("spl: spl_legacy: Add extra address checks") Reported-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Fabio Estevam <festevam@denx.de> Tested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de> # DH i.MX6Q DHCOM PDK2
2023-06-24imx: hab: Simplify the mechanismMarek Vasut1-7/+0
The current mechanism is unnecessarily complex. Simplify the whole mechanism such that the entire fitImage is signed, IVT is placed at the end, followed by CSF, and this entire bundle is also authenticated. This makes the signing scripting far simpler. Signed-off-by: Marek Vasut <marex@denx.de>
2023-06-24spl: spl_legacy: Add extra address checksMarek Vasut1-0/+20
Check whether the loaded image or entry point does not overlap SPL. Signed-off-by: Marek Vasut <marex@denx.de>
2023-06-20spl: spl-nor: return error if no valid image was loadedMario Kicherer1-1/+1
If only FIT images are enabled and loading the FIT image fails, spl_nor_load_image() should return an error instead of zero. Without this patch: >>SPL: board_init_r() spl_init Trying to boot from NOR Unsupported OS image.. Jumping nevertheless.. image entry point: 0x0 With patch: >>SPL: board_init_r() spl_init Trying to boot from NOR SPL: failed to boot from all boot devices (err=-6) .### ERROR ### Please RESET the board ### Signed-off-by: Mario Kicherer <dev@kicherer.org>
2023-06-20common: spl: Add spl NVMe boot supportMayuresh Chitale2-0/+33
Add support to load the next stage image from an NVMe disk which may be formatted as an EXT or FAT filesystem. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> [trini: Drop hunk changing disk/part.c as that breaks other users] Signed-off-by: Tom Rini <trini@konsulko.com>
2023-06-20spl: blk: Support loading images from fsMayuresh Chitale3-0/+136
Add a generic API to support loading of SPL payload from any supported filesystem on a given partition of a block device. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
2023-06-20spl: Add Kconfig options for NVMEMayuresh Chitale1-0/+26
Add kconfig options to enable NVME and PCI NVMe support in SPL Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-06-14spl: ext: Use partition size for mountMayuresh Chitale1-2/+2
Since commit 9905cae65e03 ("fs: ext4: check the minimal partition size to mount"), a valid size needs to be provided when mounting an ext filesystem. Fix the spl ext driver to use the parition size instead of 0 when mounting the filesystem. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
2023-06-12Merge tag 'xilinx-for-v2023.10-rc1' of ↵Tom Rini2-2/+2
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2023.10-rc1 global: - Use proper U-Boot project name Fix sparse warnings in zynqmp-clk, zynqmp handoff, board cmd: - Cover incorrect 0 length entries Versal NET: - Add bootmode logic - Support SPP production version - Add loadpdi command ZynqMP: - Clear pmufw node command ID handling - Change power domain behavior around zynqmp_pmufw_node() - Fix zynqmp cmd return values and pmufw command - Fix R5 tcm init and modes mmc: - Sync Versal NET emmc DT binding pcie: - Add support for ZynqMP PCIe root port video: - Add support for ZynqMP DP tools: - Fix debug message in relocate-rela
2023-06-12global: Use proper project name U-BootMichal Simek2-2/+2
Use proper project name in comments, Kconfig, readmes. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/0dbdf0432405c1c38ffca55703b6737a48219e79.1684307818.git.michal.simek@amd.com
2023-06-01spl: Correct checking of configuration nodeBin Meng1-1/+1
Per the fit_conf_get_node() API doc, it returns configuration node offset when found (>=0). Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-17usb: Move SPL_USB_GADGET and related Kconfig symbols to drivers/usb/Marek Vasut1-63/+0
To avoid piling up all the various Kconfig symbols in one place, i.e. common/spl/Kconfig, move the USB Kconfig symbols into drivers/usb/ . This commit moves SPL_USB_GADGET and related symbols. Fix typo and rename SPL_USB_GADGET to "USB Gadget Support in SPL" . Update the gadget Makefile to match the symbol changes. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-05-17usb: Move SPL_USB_STORAGE Kconfig symbol to drivers/usb/Marek Vasut1-17/+0
To avoid piling up all the various Kconfig symbols in one place, i.e. common/spl/Kconfig, move the USB Kconfig symbols into drivers/usb/ . This commit moves SPL_USB_STORAGE and matching SYS_USB_FAT_BOOT_PARTITION . Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-05-17usb: Move SPL_USB_HOST Kconfig symbol to drivers/usb/Marek Vasut1-10/+0
To avoid piling up all the various Kconfig symbols in one place, i.e. common/spl/Kconfig, move the USB Kconfig symbols into drivers/usb/ . This commit moves SPL_USB_HOST and updates help text of both USB_HOST and SPL_USB_HOST . Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-05-08common: spl: spl: Remove video driver before u-boot properNikhil M Jain1-0/+15
Add method to remove video driver before loading u-boot proper. When bootstage changes from SPL to u-boot proper, noo method is called to remove video driver, and at u-boot proper if video driver is not enabled, the video driver starts displaying garbage on the screen, because there is no reserved space for video and the frame buffer gets u-boot proper data written. Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
2023-04-10mmc: Use EXT_CSD_EXTRACT_BOOT_PART() macro for extracting boot partPali Rohár1-1/+1
Mask macro PART_ACCESS_MASK filter out access bits of emmc register and macro EXT_CSD_EXTRACT_BOOT_PART() extracts boot part bits of emmc register. So use EXT_CSD_EXTRACT_BOOT_PART() when extracting boot partition. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-01spl: mmc: Allow to disable SYS_MMCSD_FS_BOOT_PARTITIONPali Rohár2-9/+12
On some platforms is SYS_MMCSD_FS_BOOT_PARTITION unsupported. So allow to completely disable MMC FS Boot support via new option SYS_MMCSD_FS_BOOT. By default MMC FS Boot support is enabled (like it was before) except for ARCH_MVEBU where MMC FS Boot supported is unsupported due to Marvell BootROM limitations. Signed-off-by: Pali Rohár <pali@kernel.org>
2023-02-06spl: Drop unwanted return in spl_fit_upload_fpga()Simon Glass1-1/+0
This was added by mistake and renders the function useless. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 33c60a38bb9 ("trace: Use notrace for short") Reported-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2023-01-20spl: sata: Rework the loading case it not use IS_ENABLED(...)Tom Rini1-16/+9
In this case, using IS_ENABLED(...) to attempt to load the image results in harder to read and less useful code, along with having to define a CONFIG value that would be unused. To maintain the current albeit slightly odd behavior, maintain that if we have both SPL_FS_FAT and SPL_SATA_RAW_U_BOOT_USE_SECTOR enabled, we use SPL_FS_FAT for the load. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20global: Remove unused CONFIG definesTom Rini1-10/+2
Remove some CONFIG symbols and related comments, etc, that are unused within the code itself at this point. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-19Merge tag 'dm-pull-18jan23' of ↵Tom Rini1-0/+1
https://source.denx.de/u-boot/custodians/u-boot-dm convert rockchip to use binman patman fix for checkpatch binman optional entries, improved support for ELF symbols trace improvements minor fdt refactoring
2023-01-18trace: Use notrace for shortSimon Glass1-0/+1
The attribute syntax is quite verbose. Use the macro provided for this purpose. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18configs: Increase malloc size after relocationNeha Malcom Francis1-0/+1
Current default size of 0x100000 is not capable of getting the FIT buffer during boot when transitioning to using binman generated boot images for certain K3 devices, so increase it to 0x400000. Since A72 SPL is coming after relocation to DDR this should not be an issue for any K3 device, so make it default for all. Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Acked-by: Andrew Davis <afd@ti.com>
2023-01-16arm: rockchip: Add RV1126 arch core supportJagan Teki1-1/+1
Rockchip RV1126 is a high-performance vision processor SoC for IPC/CVR, especially for AI related application. Add arch core support for it. Signed-off-by: Jagan Teki <jagan@edgeble.ai> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Change-Id: I22fde40ec375e3c6aba39808abf252edc45d4b04
2023-01-12gpio: Get rid of gpio_hog_probe_all()Marek Vasut1-3/+0
The gpio_hog_probe_all() functionality can be perfectly well replaced by DM_FLAG_PROBE_AFTER_BIND DM flag, which would trigger .probe() callback of each GPIO hog driver instance after .bind() and thus configure the hogged GPIO accordingly. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Samuel Holland <samuel@sholland.org>
2023-01-12common: spl: ram: fix return codeNikita Shubin1-4/+5
Instead of always retuning success, return actual result of load_simple_fit_image or spl_parse_image_header, otherwise we might end up jumping on uninitialized spl_image->entry_point. Signed-off-by: Nikita Shubin <n.shubin@yadro.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-01-09Merge branch 'next'Tom Rini11-28/+25
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23common/spl/spl_ram: Remove unused defaultTom Rini1-4/+0
We ask for CONFIG_SPL_LOAD_FIT_ADDRESS in Kconfig, so we cannot define it in C as a fall-back. However, this option previously was buried under "if ... endif" Kconfig logic. Rework a number of config options to now have more robust dependency lines so that we can ask this address when needed. With that done, we can remove the fallback in spl_ram.c. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_MALLOC_F_ADDR to CFGTom Rini1-2/+2
Perform a simple rename of CONFIG_MALLOC_F_ADDR to CFG_MALLOC_F_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22spl: Kconfig: Fix SPL_OPTEE_IMAGE dependencyJagan Teki1-0/+1
fdt_addr will build as part of SPL_LOAD_FIT or SPL_LOAD_FIT_FULL which is indeed required to build optee image support in SPL. common/spl/spl.c: In function ‘jump_to_image_optee’: common/spl/spl.c:220:46: error: ‘struct spl_image_info’ has no member named ‘fdt_addr’ 220 | spl_optee_entry(NULL, NULL, spl_image->fdt_addr, Fix the dependency support. Signed-off-by: Jagan Teki <jagan@edgeble.ai>
2022-12-22usb: Update USB_STORAGE dependenciesTom Rini1-1/+1
As it's no longer possible to have !DM_USB set, we can remove these dependencies. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-21Merge tag 'v2023.01-rc4' into nextTom Rini2-3/+3
Prepare v2023.01-rc4 Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-10spl: spl_legacy: fix invalid offset in SPL_COPY_PAYLOAD_ONLYDai Okamura1-2/+2
This fixes the header offset calculation. This issue was found on uniphier v7 SoCs with SPL. Fixes: 06377c5a1f ("spl: spl_legacy: Fix NAND boot on OMAP3 BeagleBoard") Signed-off-by: Dai Okamura <okamura.dai@socionext.com> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com> Acked-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221209114021.3074978-1-okamura.dai@socionext.com Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-08common/spl/Kconfig: add dependency on SPL_SEMIHOSTING for SPL payloadKautuk Consul1-1/+1
When we enable CONFIG_SPL and CONFIG_SPL_SEMIHOSTING then the code in common/spl/spl_semihosting.c tries to use the CONFIG_SPL_FS_LOAD_PAYLOAD_NAME string which remains undeclared unless SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS are configured. Add a dependency of SPL_SEMIHOSTING in the depends for SPL_FS_LOAD_PAYLOAD_NAME so that the code compiles fine. Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-12-06global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini7-13/+13
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-06spl: Migrate SYS_SATA_FAT_BOOT_PARTITION to KconfigTom Rini2-4/+5
This moves SYS_SATA_FAT_BOOT_PARTITION to Kconfig and enforces the current default via Kconfig rather than C code. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-06global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*Tom Rini1-4/+4
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-21spl: Fix SPL_ATF and SPL_OPENSBI dependenciesSamuel Holland1-1/+3
The code for these two options depends on having the FIT loadables recorded in the FDT. Thus, these options require the full version of the SPL_LOAD_FIT code. Signed-off-by: Samuel Holland <samuel@sholland.org>
2022-11-10Convert CONFIG_SYS_MONITOR_LEN to KconfigTom Rini1-4/+7
This converts the following to Kconfig: CONFIG_SYS_MONITOR_LEN To do this, we set a default of 0 for everyone because there are a number of cases where we define CONFIG_SYS_MONITOR_LEN but the only impact is that we set TOTAL_MALLOC_LEN to be CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE, so we must continue to allow all boards to set this value. Update the SPL code to use 200 KB as the default raw U-Boot size directly, if we don't have a real CONFIG_SYS_MONITOR_LEN value. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-02mips: mtmips: spl/Kconfig: Set CONFIG_SPL_PAD_TO to 0x0 for ARCH_MTMIPSStefan Roese1-0/+1
It was noticed that while converting CONFIG_SPL_PAD_TO to Kconfig its value for the MIPS MT762x/8x targets got not ported correctly. Its default is not 0x10000 instead of 0x0. This patch fixes this issue. Fixes: ca8a329a1b7f ("Convert CONFIG_SPL_PAD_TO et al to Kconfig") Signed-off-by: Stefan Roese <sr@denx.de> Cc: Ruben Winters <Ruben.Winters@gooiland-elektro.nl> Cc: Weijie Gao <weijie.gao@mediatek.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2022-10-31vbe: Add Kconfig options for VPLSimon Glass1-0/+30
Enable the various features needed in VPL, by adding Kconfig options. Update the defconfig for sandbox_vpl so that the build for each phase includes what is needed. Drop LZMA for now and make sure partition support is omitted in SPL, since it is not needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-31spl: Allow multiple loaders of the same timeSimon Glass1-31/+25
At present we only support a single loader of each time. Extra ones are ignored. This means that only one BOOT_DEVICE_BOARD can be used in the SPL image. This is inconvenient since we sometimes want to provide several board-specific drivers, albeit at different priorties. Add support for this. This should have no functional change for existing boards. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-31spl: Add a separate silence option for SPLSimon Glass1-1/+1
Add an option to allow silent console to be controlled separately in SPL, so that boot progress can be shown. Disable it by default for sandbox since it is useful to see what is going on there. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-31spl: Refactor controls for console outputSimon Glass1-3/+1
The expression in boot_from_devices() is fairly long and appears to be an artefact from before we could easily call printf(...) and have the call be nop'd out. So update it to just check CONFIG_SILENT_CONSOLE. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com>
2022-10-31spl: Use binman suffix allow symbols of any SPL etypeSimon Glass1-8/+8
At present we use symbols for the u-boot-spl entry, but this is not always what we want. For example, sandbox actually jumps to a u-boot-spl-elf entry, since sandbox executables are ELF files. We already handle this with U-Boot by using the '-any' suffix. Add it for SPL as well. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass4-9/+9
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-26scripts: Makefile.spl: Enable memory drivers to be built for SPLRoger Quadros1-0/+7
Introduce CONFIG_SPL_MEMORY to allow Memory drivers to be built for SPL. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>