summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2021-12-31Merge tag 'efi-next' of https://source.denx.de/u-boot/custodians/u-boot-efi ↵Tom Rini
into next Pull request of efi-next Documentation: * Add Sunxi board description UEFI: * Improvements to U-Boot running on top of UEFI
2021-12-31x86: efi: Don't set up global_data again with EFISimon Glass
Since EFI does not relocate and uses the same global_data pointer throughout the board-init process, drop this unnecessary setup, to avoid a hang. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2021-12-28Merge tag 'video-next-20211228' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-video into next - various fixes to the sandbox display support - support for showing a logo without splash screen config - support for BMP drawing to depths other than 16bpp - tests for the different types of supported BMP images - support showing a logo when running coreboot via qemu
2021-12-27Convert CONFIG_TPL_TEXT_BASE to KconfigTom Rini
This converts the following to Kconfig: CONFIG_TPL_TEXT_BASE Signed-off-by: Tom Rini <[email protected]>
2021-12-27Finish converting CONFIG_SYS_FSL_CLK to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_FSL_CLK We move the exiting option to common/Kconfig near the other options to control the contents of board_init_f() and note that this is a legacy option. We further restrict this to where the call is going to be non-empty, for the SoCs that had only been using this for some MMC-related clocks. Signed-off-by: Tom Rini <[email protected]>
2021-12-26video: Support virtio devices with the splash screenSimon Glass
This is useful for showing a logo when booting from qemu. Signed-off-by: Simon Glass <[email protected]>
2021-12-26video: Convert CONFIG_VIDEO_LOGO to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_VIDEO_LOGO Note that this option depends on CONFIG_DM_VIDEO now, since cfb_console is deprecated. The only relevant code is now in splash.c Drop the check for DM_VIDEO in that file. Signed-off-by: Simon Glass <[email protected]>
2021-12-26console: Avoid serial output before the console is runningSimon Glass
The video driver uses this for debugging, but if used before relocation it crashes at present. Avoid trying to output debugging before the console is ready. Signed-off-by: Simon Glass <[email protected]>
2021-12-23fdt: Show a runtime warning based on devicetree sourceSimon Glass
When running, if the devicetree failed to come from the expected source, show a warning, e.g: U-Boot ... DRAM: 128 MiB Core: 42 devices, 11 uclasses, devicetree: separate Warning: Unexpected devicetree source (not from a prior stage) Warning: U-Boot may not function properly Flash: 64 MiB ... These warnings should only appear if the board config has been changed, or the prior stage is broken. Signed-off-by: Simon Glass <[email protected]>
2021-12-23fdt: Report the devicetree sourceSimon Glass
It can be confusing to figure out where the devicetree came from. It seems important enough to warrant a message during boot. Add information about the number of devices and uclasses too since it is helpful to have some idea what is going on with driver model. Report the devicetree source in bdinfo too. This looks something like this, with > marking the new line. U-Boot 2021.10-00190 (Oct 30 2021 - 09:01:29 -0600) DRAM: 128 MiB > Core: 42 devices, 11 uclasses, devicetree: passage Flash: 64 MiB Signed-off-by: Simon Glass <[email protected]>
2021-12-19fdt_support: Add fdt_delete_disabled_nodes() and use in Turris MOXMarek Behún
Move Turris MOX specific remove_disabled_nodes() to fdt_support with name fdt_delete_disabled_nodes(), so that others can potentially use it. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2021-12-19fdt_support: Add some useful functionsMarek Behún
Add functions fdt_node_offset_by_pathf(), fdt_create_phandle_by_pathf(), fdt_set_status_by_pathf() to get node offset, get/create node phandle and set status for node given by path/alias formatted with sprintf. Add functions fdt_create_phandle_by_compatible(), fdt_set_status_by_compatible() to get/create node phandle and set status for first node given by compatible. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2021-12-19fdt_support: Fix comment for fdt_create_phandle()Marek Behún
This function does not necessarily create a new phandle. If a phandle exists, no new phandle is created. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2021-12-19fdt_support: Remove FDT_STATUS_FAIL_ERROR_CODEMarek Behún
Since no one uses this feature and I am not aware of any parsers of this in Linux, remove it. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Cc: Simon Glass <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Pratyush Yadav <[email protected]> Cc: Tim Harvey <[email protected]> Cc: Michael Walle <[email protected]> Cc: Priyanka Jain <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-12-19fdt_support: Remove fdt_alloc_phandle() in favor of fdt_generate_phandle()Marek Behún
Commit f0921f5098d ("fdt: Sync up to the latest libfdt") introduced fdt_generate_phandle() in libfdt, making fdt_alloc_phandle() obsolete in fdt_support. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Cc: Simon Glass <[email protected]> Cc: "hui.song" <[email protected]> Cc: Meenakshi Aggarwal <[email protected]> Cc: Priyanka Jain <[email protected]> Cc: Ioana Ciornei <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-12-05bloblist: Support allocating the bloblistSimon Glass
Typically the bloblist is positioned at a fixed address in memory until relocation. This is convenient when it is set up in SPL or before relocation. But for EFI we want to set it up only when U-Boot proper is running. Add a way to allocate it using malloc() and update the documentation to cover this aspect of bloblist. Note there are no tests of this feature at present, nor any direct testing of bloblist_init(). This can be added, e.g. by making this option controllable at runtime. Signed-off-by: Simon Glass <[email protected]>
2021-12-01spl: fit: Skip attempting to load 0 length imageNishanth Menon
When, for various reasons, a bad FIT image is used where a loadable image is marked as 0 length, attempt is made for a 0 length allocation and read of 0 byte read operation. Instead provide warning in log and skip attempting to do such a load. Signed-off-by: Nishanth Menon <[email protected]> Reviewed-by: Aswath Govindraju <[email protected]>
2021-11-30common: add fdt_simplefb_enable_and_mem_rsv functionPatrick Delaunay
Add a new function to activate an existing simple frame buffer node and add the associated reserved memory, with no-map properties. This device tree update is only done when the video device is active and the video buffer is used. This patch uses '#if CONFIG_IS_ENABLED(DM_VIDEO)' because gd->video_bottom and gd->video_top are only defined when CONFIG_DM_VIDEO is activated. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2021-11-30common: rename functions lcd_dt_simplefb to fdt_simplefbPatrick Delaunay
Rename the function named lcd_dt_simplefb* to fdt_simplefb* to be aligned with the associated file name fdt_simplefb.h/fdt_simplefb.c Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Matthias Brugger <[email protected]>
2021-11-30common: rename lcd_simplefb.c file to fdt_simplefb.cPatrick Delaunay
Rename the file lcd_simplefb.c to fdt_simplefb.c to be aligned with the configuration name and with the associated include file ./include/fdt_simplefb.h Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2021-11-30Convert CONFIG_LCD_DT_SIMPLEFB to KconfigPatrick Delaunay
This converts the following to Kconfig: CONFIG_LCD_DT_SIMPLEFB This patch also renames this config to CONFIG_FDT_SIMPLEFB as the code in common/lcd_simplefb.c support CONFIG_LCD and CONFIG_VIDEO. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Matthias Brugger <[email protected]>
2021-11-29Merge tag 'v2022.01-rc3' into nextTom Rini
Prepare v2022.01-rc3 Signed-off-by: Tom Rini <[email protected]>
2021-11-28common: Allow a smaller console-recording pre-relocSimon Glass
Before relocation there is generally not as much available memory and not that much console output. At present the console-output buffer is the same side before and after relocation. Add a separate Kconfig option to remove this limitation. Signed-off-by: Simon Glass <[email protected]>
2021-11-18board_f: Copy GD to new GD even if relocation disabledMarek Vasut
Even if U-Boot has relocation disabled via GD_FLG_SKIP_RELOC , the relocated stage of U-Boot still picks GD from new_gd location. The U-Boot itself is not relocated, but GD might be, so copy the GD to new GD location even if relocation is disabled. Signed-off-by: Marek Vasut <[email protected]> Cc: Peng Fan <[email protected]> Cc: Simon Glass <[email protected]> Cc: Tom Rini <[email protected]>
2021-11-11Remove LYNX KDI remaindersThomas Huth
The last board that used to set CONFIG_LYNXKDI has been removed in commit 242836a893ae ("powerpc: ppc4xx: remove pcs440ep support"), doc/README.lynxkdi only talks about a MPC8260 board being supported, and the mpc8260 support has been removed four years ago in commit 2eb48ff7a210d ("powerpc, 8260: remove support for mpc8260") already, and common/lynxkdi.c only consists of an "#error" statement these days, so it seems like the LYNX KDI code is dead code nowadays. Let's remove it now. Signed-off-by: Thomas Huth <[email protected]>
2021-11-11Create a new boot/ directorySimon Glass
Quite a lot of the code in common/relates to booting and images. Before adding more it seems like a good time to move the code into its own directory. Most files with 'boot' or 'image' in them are moved, except: - autoboot.c which relates to U-Boot automatically running a script - bootstage.c which relates to U-Boot timing Drop the removal of boot* files from the output directory, since this interfers with the symlinks created by tools and there does not appear to be any such file from my brief testing. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]>
2021-11-08Fix syntax errorLeo Yu-Chi Liang
This statement has an unmatched parentheses, fix it. Signed-off-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2021-11-05spl: Make use of CONFIG_IS_ENABLED(OS_BOOT) in SPL/TPL common code pathsTom Rini
When building a system that has both TPL and SPL_OS_BOOT, code which tests for CONFIG_SPL_OS_BOOT will be built and enabled in TPL, which is not correct. While there is no CONFIG_TPL_OS_BOOT symbol at this time (and likely will not ever be) we can use CONFIG_IS_ENABLED(OS_BOOT) in these common paths to ensure we only compile these parts in the SPL case. Signed-off-by: Tom Rini <[email protected]>
2021-10-31bootstage: Add SPL supportMarek Vasut
Allow usage of the bootstage facilities in SPL. Signed-off-by: Marek Vasut <[email protected]> Cc: Simon Glass <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-10-31image.h: make image_sign_info.fit point to constHannu Lounento
The data blob apparently does not need to be modified through the fit field of the image_sign_info struct so make it point to const to avoid the need to cast away constness in functions that assign a pointer to const data to the field. fit_image_setup_verify already had to cast away constness as it assigned a const void * argument to the field. The cast can now be removed. Signed-off-by: Hannu Lounento <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-10-26common: Kconfig.boot: add config SPL_FIT_RSASSA_PSSPhilippe Reynes
The padding pss is only supported on u-boot and tools since commit 2bbed3ff8c7f ("image: Use Kconfig to enable FIT_RSASSA_PSS on host") This commit adds the config SPL_FIT_RSASSA_PSS to support the padding pss in the SPL. Signed-off-by: Philippe Reynes <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-10-25arm: spl: prepare for jumping to OPTEERicardo Salveti
Make sure to (if applicable) flush the D-cache, invalidate I-cache, and disable MMU and caches before jumping to OPTEE. This fixes the SDP->SPL->OPTEE boot flow on iMX6Q and most likely on some other ARM SoCs. Signed-off-by: Ricardo Salveti <[email protected]> Co-developed-by: Oleksandr Suvorov <[email protected]> Signed-off-by: Oleksandr Suvorov <[email protected]>
2021-10-20Merge tag 'u-boot-imx-20211020' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20211020 ------------------- First PR from u-boot-imx for 2022.01 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/9535 - new board: kontron-sl-mx8mm - imx8m: - fix secure boot - imx ESDHC: fixes - i.MX53: Support thum2, bmode and fixes for Menlo board usbarmory switch to Ethernet driver model - imx6 : - DDR calibration for Toradex boards - imx7: - Fixes - Updated gateworks boards (ventana / venice) # gpg verification failed.
2021-10-09Merge tag 'video-20211009' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-video - add 30bpp support (EFI, simplefb, vidconsole) - fix video console name in CONSOLE_MUX Kconfig help - move mxsfb driver config option to Kconfig - remove unused mx3fb driver # gpg verification failed.
2021-10-09common: Kconfig: use 'vidconsole' name instead of old 'video'Anatolij Gustschin
After DM_VIDEO conversion the 'vidconsole' is the correct name for the frame buffer console. 'video' will not work, so update the description of the config option. Signed-off-by: Anatolij Gustschin <[email protected]>
2021-10-09lz4: Use a private header for U-BootSimon Glass
At present U-Boot has a header file called lz4.h for its own use. If the host has its own lz4 header file installed (e.g. from the 'liblz4-dev' package) then host builds will use that instead. Move the U-Boot file into its own directory, as is done with various other headers with the same problem. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Split up boot_get_fdt()Simon Glass
This function is far too long. Before trying to remove #ifdefs, split out the code that deals with selecting the FDT into a separate function. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Reduce variable scope in boot_get_fdt()Simon Glass
Move the variables declarations to where they are needed, to reduce the number of #ifdefs needed. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Remove some #ifdefs from image-fit and image-fit-sigSimon Glass
Drop the #ifdefs which are easy to remove without refactoring. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Remove #ifdefs from select_ramdisk()Simon Glass
Use boolean variables to deal with the strange #ifdef logic of this function, so we can remove the #ifdefs. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Split up boot_get_ramdisk()Simon Glass
This function is far too long. Before trying to remove #ifdefs, split out the code that deals with selecting the ramdisk into a separate function. Leave the code indented as it was for easier review. The next patch cleans this up along with checkpatch violations. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Reduce variable scope in boot_get_ramdisk()Simon Glass
Move the variables declarations to where they are needed, to reduce the number of #ifdefs needed. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Drop most #ifdefs in image-board.cSimon Glass
Remove ifdefs in this file, so far as possible without too much refactoring. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Drop #ifdefs for fit_print_contents()Simon Glass
Use a simple return to drop the unwanted code. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Tidy up fit_unsupported_reset()Simon Glass
This function is only used in one place and does not need to use the preprocessor. Move it to the C file and convert it to a normal function. Drop fit_unsupported() since it is not used. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Drop IMAGE_ENABLE_IGNORESimon Glass
We can use the new host_build() function for this, so drop it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Drop IMAGE_OF_SYSTEM_SETUPSimon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Drop IMAGE_OF_BOARD_SETUPSimon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Drop IMAGE_BOOT_GET_CMDLINESimon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough and the board code is now in a separate file. Update the only place where this is used and drop it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Use the correct checks for CRC32Simon Glass
Add a host Kconfig for CRC32. With this we can use CONFIG_IS_ENABLED(CRC32) directly in the host build, so drop the unnecessary indirection. Add a few more conditions to SPL_CRC32 to avoid build failures as well as TPL_CRC32. Also update hash.c to make crc32 optional and to actually take notice of SPL_CRC32. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>