summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2024-03-22Merge tag '09.02.00.009' into dev/toradex_ti-merge-09.02.00.009Francesco Dolcini
RC Release 09.02.00.009
2024-03-21HACK: common: splash_source: Don't compile NAND util functions for SPLDevarsh Thakkar
The NAND flash utility functions under CONFIG_CMD_NAND should not be compiled at SPL stage as the underlying functions are under separate Kconfigs viz. CONFIG_ENV_IS_IN_NAND and hence are not supported at SPL stage right now for splash screen. Long term, the NAND flash utility functions and their dependencies need to be tied with splash screen specific Kconfigs too as splash logo file can be present in NAND storage before bootup. Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-03-21common: Move framebuffer reservation to separate helperDevarsh Thakkar
Create separate helper for just reserving framebuffer region without creating or enabling simple-framebuffer node. This is useful for scenarios where user want to preserve the bootloader splash screen till OS boots up and display server gets started without displaying anything else in between and thus not requiring simple-framebuffer. Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-03-21common: fdt_simplefb: Enumerate framebuffer info from video handoffDevarsh Thakkar
Enable and update simple-framebuffer node using the video handoff bloblist if video was enabled at SPL stage and corresponding video bloblist was received at u-boot proper with necessary parameters. Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-03-21common: splash_source: Don't compile ubifs splash cmd for SPL buildDevarsh Thakkar
Don't compile ubifs splash mount command for SPL build as this command is not supported (and also not enabled) during SPL stage. This fixes below compilation error, when CONFIG_CMD_UBIFS is enabled in defconfig along with splash screen enabled at SPL stage: "aarch64-none-linux-gnu-ld.bfd: common/cli.o: in function `run_command': u-boot-next/u-boot/common/cli.c:51: undefined reference to `parse_string_outer' u-boot-next/u-boot/common/cli.c:51:(.text.run_command+0x10): relocation truncated to fit: R_AARCH64_JUMP26 against undefined symbol `parse_string_outer' make[2]: *** [u-boot-next/u-boot/scripts/Makefile.spl:527: spl/u-boot-spl] Error 1 make[1]: *** [u-boot-next/u-boot/Makefile:2053: spl/u-boot-spl] Error 2 make[1]: Leaving directory 'u-boot-next/u-boot/out/a53' make: *** [Makefile:177: sub-make] Error 2" Fixes: eb9217dc03 ("common: Enable splash functions at SPL") Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-03-19HACK: common: board_f: Don't treat bloblist failure as hard errorDevarsh Thakkar
Don't propagate error on bloblist failure as it is possible that splash logo file may not have been present in expected location since common defconfig is being used for other bootmodes too. Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-03-11HACK: common: splash_source: Don't compile NAND util functions for SPLDevarsh Thakkar
The NAND flash utility functions under CONFIG_CMD_NAND should not be compiled at SPL stage as the underlying functions are under separate Kconfigs viz. CONFIG_ENV_IS_IN_NAND and hence are not supported at SPL stage right now for splash screen. Long term, the NAND flash utility functions and their dependencies need to be tied with splash screen specific Kconfigs too as splash logo file can be present in NAND storage before bootup. Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-03-07common: Move framebuffer reservation to separate helperDevarsh Thakkar
Create separate helper for just reserving framebuffer region without creating or enabling simple-framebuffer node. This is useful for scenarios where user want to preserve the bootloader splash screen till OS boots up and display server gets started without displaying anything else in between and thus not requiring simple-framebuffer. Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-03-07common: fdt_simplefb: Enumerate framebuffer info from video handoffDevarsh Thakkar
Enable and update simple-framebuffer node using the video handoff bloblist if video was enabled at SPL stage and corresponding video bloblist was received at u-boot proper with necessary parameters. Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-02-05common: splash_source: Don't compile ubifs splash cmd for SPL buildDevarsh Thakkar
Don't compile ubifs splash mount command for SPL build as this command is not supported (and also not enabled) during SPL stage. This fixes below compilation error, when CONFIG_CMD_UBIFS is enabled in defconfig along with splash screen enabled at SPL stage: "aarch64-none-linux-gnu-ld.bfd: common/cli.o: in function `run_command': u-boot-next/u-boot/common/cli.c:51: undefined reference to `parse_string_outer' u-boot-next/u-boot/common/cli.c:51:(.text.run_command+0x10): relocation truncated to fit: R_AARCH64_JUMP26 against undefined symbol `parse_string_outer' make[2]: *** [u-boot-next/u-boot/scripts/Makefile.spl:527: spl/u-boot-spl] Error 1 make[1]: *** [u-boot-next/u-boot/Makefile:2053: spl/u-boot-spl] Error 2 make[1]: Leaving directory 'u-boot-next/u-boot/out/a53' make: *** [Makefile:177: sub-make] Error 2" Fixes: eb9217dc03 ("common: Enable splash functions at SPL") Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2023-08-30Merge tag '09.00.00.008' into toradex_ti-u-boot-2023.04Marcel Ziswiler
RC Release 09.00.00.008
2023-07-17Add CONFIG_AVB_PUBKEY_FILE to specify the root avb public keyJiyong Park
The new config CONFIG_AVB_PUBKEY_FILE is used to specify the path to the public key file that u-boot uses as the root public key. Previously, the root public key was hard coded in avb_verify.c and therefore was non-trivial to replace it with a custom key. The public key that was hard-coded is extracted as default.avbpubkey and is used as the default. Bug: 181924266 Test: DIST_DIR=out/dist BUILD_CONFIG=u-boot/build.config.crosvm.aarch64 build/build.sh -j80 Signed-off-by: Jiyong Park <jiyong@google.com> (cherry picked from commit e609074ced3dd07ca2a13d4becbae997e3a48c9f) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com> [mkorpershoek: fixed conflict around _SPL_TPL_ support] Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Guillaume La Roque <glaroque@baylibre.com> Reviewed-by: Guillaume La Roque <glaroque@baylibre.com>
2023-07-11common/memsize.c: Fix get_ram_size() when cache is enabledEmanuele Ghidoli
Ensure that every write is flushed to memory and afterward reads are from memory. Since the algorithm rely on the fact that accessing to not existent memory lead to write at addr / 2 without this modification accesses to aliased (not physically present) addresses are cached and wrong size is returned. This was discovered while working on a TI AM625 based board where cache is normally enabled, see commit c02712a74849 ("arm: mach-k3: Enable dcache in SPL"). Upstream-Status: Submitted [https://lore.kernel.org/all/20230530133327.178278-1-francesco@dolcini.it] Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2023-06-28common: spl: spl: Update stack pointer addressNikhil M Jain
At SPL stage when stack is relocated, the stack pointer needs to be updated, the stack pointer may point to stack in on chip memory even though stack is relocated. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-06-22common: splash_source: Fix type casting errorsNikhil M Jain
During compilation splash_source puts out below warning for type conversion in splash_load_fit for bmp_load_addr and fit_header. Change their type to uintptr_t to fix the warnings. common/splash_source.c: In function ‘splash_load_fit’: common/splash_source.c:366:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 366 | img_header = (struct legacy_img_hdr *)bmp_load_addr; | ^ common/splash_source.c:376:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 376 | res = splash_storage_read_raw(location, (u32)fit_header, fit_size); | ^ common/splash_source.c:401:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 401 | memmove((void *)bmp_load_addr, internal_splash_data, internal_splash_size); The above warnings are generated if CONFIG_FIT is enabled. Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
2023-06-12common: spl: spl: Remove video driverNikhil M Jain
Use config SPL_VIDEO_REMOVE to remove video driver at SPL stage before jumping to next stage, in place of CONFIG_SPL_VIDEO, to allow user to remove video if required. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
2023-06-12common: board_f: Pass frame buffer info from SPL to u-bootNikhil M Jain
U-boot proper can use frame buffer address passed from SPL to reserve the memory area used by framebuffer set in SPL so that splash image set in SPL continues to get displayed while u-boot proper is running. Put the framebuffer address and size in a bloblist to make them available at u-boot proper, if in u-boot proper CONFIG_VIDEO is defined. Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
2023-06-12x86: Pass video settings from SPL to U-Boot properSimon Glass
When video is set up in SPL, U-Boot proper needs to use the correct parameters so it can write to the display. Put these in a bloblist so they are available to U-Boot proper. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
2023-06-12common: splash_source: Fix A53 SPL compilation issueNikhil M Jain
In A53 SPL stage, CONFIG_USB_STORAGE is defined, which causes compilation error in splash_source, while trying to compile splash_load_fs.This failure is due to finding no declaration of function usb_init. usb_init in SPL stage is only declared when CONFIG_SPL_USB_STORAGE is defined, thus use CONFIG_IS_ENABLED to check for SPL_USB_STORAGE at SPL stage. Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
2023-06-12common: spl: spl: Remove video driver before u-boot properNikhil M Jain
Add method to remove video driver before loading u-boot proper. When bootstage changes from SPL to u-boot proper, this method will reset the display controller so that it stops displaying towards the end of SPL stage, thus avoiding displaying of artefacts when control is passed to further stages and framebuffer region is used by some other component. Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
2023-06-12common: Replace #ifdef and #if with if'sNikhil M Jain
Avoid using preprocessor compilation directives and instead use simple logical expressions for better readability since compiler will anyway optimize out the respective code block if condition is not satisfied. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
2023-06-12common: Enable splash functions at SPLNikhil M Jain
To support splash screen at both u-boot proper and SPL use CONFIG_IS_ENABLED and CONFIG_VAL to check for video related Kconfigs at respective stages. Replace CONFIG_CMD_BMP with CONFIG_BMP to enable splash_display function at u-boot proper and SPL. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-06-12common: Makefile: Rule to compile bmp.cNikhil M Jain
Add rule to compile bmp.c at SPL and u-boot proper when CONFIG_SPL_BMP and CONFIG_BMP are defined. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2023-06-12cmd: bmp: Split bmp commands and functionsNikhil M Jain
To enable splash screen at SPL, need to compile cmd/bmp.c which also includes bmp commands, since SPL doesn't use commands split bmp.c into common/bmp.c which includes all bmp functions and cmd/bmp.c which only contains bmp commands. Add function delclaration for bmp_info in video.h. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-06-12common: Kconfig: Add BMP configsNikhil M Jain
Add CONFIG_BMP and CONFIG_SPL_BMP which enable displaying bmp images at u-boot proper and SPL. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
2023-06-12common: Makefile: Add rule to compile splash and splash_source at SPLNikhil M Jain
To enable splash screen and loading bmp from boot media, add rules to compile splash.c and splash_source.c at SPL stage only when CONFIG_SPL_SPLASH_SCREEN and CONFIG_SPL_SPLASH_SOURCE are defined. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-06-06common: spl: Warn about overflow of SRAM stackVignesh Raghavendra
If early stack usage is exactly same as SIZE_LIMIT_PROVIDE_STACK, then its most likely to have overflowed beyond this limit and corrupted any regions beyond stack. Warn about this to the user. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-05-30spl: mtd: Remove MTD device after loading imagesApurva Nandan
Releasing the flash into proper state, after the loading completes, is important for the next stage bootloader/kernel to be able to use the MTD device. This would enable to reset the device for fresh use by next boot stage. Signed-off-by: Apurva Nandan <a-nandan@ti.com>
2023-05-30common: spl: mtd: Add support for loading images from MTDApurva Nandan
Introduce support for using MTD subsystem for loading images from memory flashes. This will provide the support of using mtd functions which are abstracted over the type of flash being used, to load the boot images from the flash. Currently, add support for only SPI NAND flashes. This can be extended to all other flash types, when required. Signed-off-by: Apurva Nandan <a-nandan@ti.com>
2023-05-30mtd: nand: spi: Enable spinand build Kconfig option for splApurva Nandan
Only RAW NANDs are supported in the SPL, so create a new Kconfig config for building SPI NAND subsystem in the SPL build using SPL_NAND_SPI_SUPPORT Kconfig option. Signed-off-by: Apurva Nandan <a-nandan@ti.com>
2023-04-12dm: Add support for handling old u-boot,dm- tagsSimon Glass
Add a CONFIG option to deal with this automatically, printing a warning when U-Boot starts up. This can be useful if the device tree comes from another project. We will maintain this through the 2023.07 release, providing 6 months for people to notice. Version 4: Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-03-28cli: Correct handling of invalid escape sequences in cread_line()Simon Glass
The second call to cli_ch_process() is in the wrong place, meaning that the one of the characters of an invalid escape sequence is swallowed instead of being returned. Fix the bug and add a test to cover this. This behaviour matches that of the code before cli_getch() was introduced. This was verified on the commit before b08e9d4b66 i.e.: 7d850f85aad ("sandbox: Enable mmc command and legacy images") Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-03-28cli: Correct several bugs in cli_getch()Simon Glass
This function does not behave as expected when unknown escape sequences are sent to it: - it fails to store (and thus echo) the last character of the invalid sequence - it fails to set esc_len to 0 when it finishes emitting the invalid sequence, meaning that the following character will appear to be part of a new escape sequence - it processes the first character of the rejected sequence as a valid character, just starting the sequence all over again The last two bugs conspire to produce an "impossible condition #876" message which is the main symptom of this behaviour. Fix these bugs and add a test to verify the behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-03-10usb: move CONFIG_USB_HUB_DEBOUNCE_TIMEOUT to USBHeinrich Schuchardt
This configuration setting is only relevant if the board supports USB. It should not be in the main menu but in the USB menu. The setting is only relevant in USB host mode. Fixes: 5454dea3137d ("usb: hub: allow to increase HUB_DEBOUNCE_TIMEOUT") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-03-10usb: USB hubs require host modeHeinrich Schuchardt
USB hubs run in host mode not in gadget mode. Hence, compiling usb_hub.c should not be selected by CONFIG_USB_GADGET. Suggested-by: Marek Vasut <marex@denx.de> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Marek Vasut <marex@denx.de>
2023-02-17common: avb_verify: prevent opening incorrect sessionIvan Khoronzhuk
The arg->session is not valid if arg->ret != NULL, so can't be assigned, correct this. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@globallogic.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
2023-02-11dm: Allow serial output during the relocation processSimon Glass
Reset the serial flags so that the debug UART can be used (if enabled) in the small window where there is no serial device. This can avoid a hang in some cases. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-11sandbox: Bring back setting mon_len in global_dataSimon Glass
This change was made for the benefit of RISC-V but broke other architectures also. In particular, tracing cannot work without this value. Add it back for architectures which support it. Fixes: 3c9fc23c443 ("sandbox: don't refer to symbol _init") Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Merge tag 'efi-2023-04-rc2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-04-rc2 Documentation: * Provide page with links to talks on U-Boot UEFI: * Enable CTRL+S to save the boot order in eficonfig command * Run attribute check for QueryVariableInfo() only for the file store * Bug fixes Others: * Improve output formatting of the coninfo command # -----END PGP SIGNATURE----- # gpg: Signature made Fri 10 Feb 2023 12:15:45 PM EST # gpg: using RSA key 6DC4F9C71F29A6FA06B76D33C481DBBC2C051AC4 # gpg: Good signature from "Heinrich Schuchardt <xypron.glpk@gmx.de>" [unknown] # gpg: aka "[jpeg image of size 1389]" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6DC4 F9C7 1F29 A6FA 06B7 6D33 C481 DBBC 2C05 1AC4
2023-02-10Correct SPL uses of VIDEOSimon Glass
This converts 2 usages of this option to the non-SPL form, since there is no SPL_VIDEO defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL use of SPLASH_SOURCESimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_SPLASH_SOURCE defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL uses of SAVE_PREV_BL_INITRAMFS_START_ADDRSimon Glass
This converts 2 usages of this option to the non-SPL form, since there is no SPL_SAVE_PREV_BL_INITRAMFS_START_ADDR defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL uses of SAVE_PREV_BL_FDT_ADDRSimon Glass
This converts 2 usages of this option to the non-SPL form, since there is no SPL_SAVE_PREV_BL_FDT_ADDR defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL use of OF_EMBEDSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_OF_EMBED defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL uses of NEEDS_MANUAL_RELOCSimon Glass
This converts 3 usages of this option to the non-SPL form, since there is no SPL_NEEDS_MANUAL_RELOC defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL use of HUSH_PARSERSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_HUSH_PARSER defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10eficonfig: CTRL+S to save the boot orderMasahisa Kojima
The change boot order menu in eficonfig can have at most INT_MAX lines and it is troublesome to scroll down to the "Save" entry. This commit assigns CTRL+S to save the boot order. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-02-09Correct SPL use of CMD_SHA1SUMSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_CMD_SHA1SUM defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-09Correct SPL use of CMD_HASHSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_CMD_HASH defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-07usb: Drop unused ehci-faraday driverSimon Glass
This is not used. Drop the driver and Kconfig option. Signed-off-by: Simon Glass <sjg@chromium.org>