summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-18binman: Add a test for an inner section with a sizeSimon Glass
This is a slightly different scenario from the existing testSections tests. Add a new test for it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18rockchip: Drop the FIT generator scriptSimon Glass
This is not used anymore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18rockchip: Convert all boards to use binmanSimon Glass
Instead of the bash script, use binman to generate the FIT for arm64. For 32-bit boards, use binman for all images, dropping the intermediate files. With this change, only Zynq is now using SPL_FIT_GENERATOR so update the Kconfig rule accordingly. Clean up the Makefile to the extent possible. Unfortunately, two boards do not use SPL_FRAMEWORK so don't enable the u-boot.img rule: evb-rk3036 kylin-rk3036 So a small remnant remains. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18rockchip: Support building the all output files in binmanSimon Glass
Add the required binman images to replace the Makefile rules which are currently used. This includes subsuming: - tpl/u-boot-tpl-rockchip.bin if TPL is enabled - idbloader.img if either or both of SPL and TPL are enabled - u-boot.itb if SPL_FIT is enabled - u-boot-rockchip.bin if SPL is used, either using u-boot.itb when SPL_FIT is enabled or u-boot.img when it isn't Note that the intermediate files are dropped with binman, since it producing everything in one pass. This means that tpl/u-boot-tpl-rockchip.bin is not created, for example. Note that for some 32-bit rk3288 boards, rockchip-optee.dtsi is included. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18rockchip: Use multiple-images for rk3399Simon Glass
Enable multiple-images so we can generate more than one image. Also add a comment for the end of the #if block. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18rockchip: evb-rk3288: Drop raw-image supportSimon Glass
This boards uses SPL_FIT so does not need to support loading a raw image. Drop it to avoid binman trying to insert a symbol which has no value. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18binman: Support optional external blobsSimon Glass
Some blobs are actually not necessary for the board to work correctly. Add a property to allow this to be indicated. Missing optional blobs do not cause a build failure. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18binman: Support new op-tee binary formatSimon Glass
OP-TEE has a format with a binary header that can be used instead of the ELF file. With newer versions of OP-TEE this may be required on some platforms. Add support for this in binman. First, add a method to obtain the ELF sections from an entry, then use that in the FIT support. We then end up with the ability to support both types of OP-TEE files, depending on which one is passed in with the entry argument (TEE=xxx in the U-Boot build). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18binman: Add a way to check for a valid ELF fileSimon Glass
Add a function which checks whether data is in ELF format or not. This will be used by binman to check this for entries. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18binman: Support optional entriesSimon Glass
Support entries which can be optional depending on their contents. This allows special entry types which appear in the image only when needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18binman: Use a reference for binman symbols docsSimon Glass
Several etypes have this reference in their documentation. Now that we are using rST, link to the section directly. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2023-01-18binman: Update entry docsSimon Glass
These have got out of data recently. Regenerate them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18binman: Tidy up comment in fit _gen_nodeSimon Glass
Expand this comment to cover both cases that are supported. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18binman: Allow writing section contents to a fileSimon Glass
At present only the image (which is a section) has a filename. Move this implementation to the entry_Section class so that any section can have a filename. With this, the section data is written to a file. This allows parts of an image to be written, along with the entire image. Make a note that this can be used to include the contents of a section in one image in another (later) image. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18dm: pinctrl: Revert "pinctrl: probe pinctrl drivers during post-bind"Simon Glass
This breaks chromebook_coral and it is also not how things should work. If a board needs to bind GPIOs as part of a pinctrl driver this can be done during the bind step, if needed. We cannot probe pinctrl devices when binding as a rule, since it cannot be supported on some platforms. The bind and probe steps are separate in U-Boot and they should remain separate. This reverts commit f9ec791b5e24378b71590877499f8683d5f54dac. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18Revert "fdtdec: drop needlessly convoluted CONFIG_PHANDLE_CHECK_SEQ"Simon Glass
The fdt_path_offset() function is slow since it must scan the tree. This substantial overhead now applies to all boards. The original code may not be ideal but it is fit for purpose and is only needed on a few boards. Reverting this reduces time to set up driver model by about 30ms. Before revert: Accumulated time: 47,170 dm_r 53,237 dm_spl 572,986 dm_f Accumulated time: 44,598 dm_r 50,347 dm_spl 549,133 dm_f This reverts commit 26f981f295d00351b6f0c69b5317b254b2361cc0. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18rockchip: Enable bootstage on rockpro64Simon Glass
This board is useful for benchmarking overall U-Boot performance. Enable the bootstage feature so we get a report. Since this returns to the boot rom before finishing executing board_init_r() in SPL, add a few bootstage calls so that we can collect timing from TPL. For the stash region, use a portion of SRAM, 64KB below the stack top. This allows the TPL image to be up to nearly 120KB (it is typically about 64KB). SPL normally runs from SDRAM at 0, so can use the same stash region. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18trace: Don't require TIMER_EARLYSimon Glass
Some platforms cannot honour this and don't need trace before relocation. Use 'imply' instead, so boards can disable this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18trace: Update trace-format generator for newer versionSimon Glass
This now includes flags and the layout has changed slightly in recent versions of Linux. Update the generator accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18trace: Adjust flags in proftoolSimon Glass
The flags in this tool don't match the comments or help. Also the variable names are quite confusing. Update them for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18mkimage: Add a few more messages for FIT failuresSimon Glass
Add messages to make it clearer which part of the FIT creation is failing. This can happen when an invalid 'algo' property is provided in the .its file. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18trace: Move trace pointer to data sectionSimon Glass
This can be written before relocation. Move it to the data section, since accessing BSS before relocation is not permitted. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18fdt: Check for overlapping data and FDTSimon Glass
If the FDT overlaps with the data region of the image, or with the stack, it can become corrupted before relocation. Add a check for this, behind a debug flag, as it can be very confusing and time-consuming to debug. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18fdt: Pass the device tree to fdtdec_prepare_fdt()Simon Glass
This function uses gd->fdt_blob a lot and cannot be used to check any other device tree. Use a parameter instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18fdt: Drop ifdefs in fdtdec_prepare_fdt()Simon Glass
This function is a bit messy with several #ifdefs. Convert them to use C for the conditions. Rewrite the function comment since most of it is stale. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18fdt: Avoid exporting fdtdec_prepare_fdt()Simon Glass
This function is not used outside this file. Make it static. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18tpm: Add a proper Kconfig option for crc8 in SPLSimon Glass
The current approach is a bit of a hack and only works for the tpm subsystem. Add a Kconfig so that crc8 can be enabled in SPL for other purposes. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18arm: Support trace on armv8Simon Glass
Use the notrace attribute so that timer functions can be used when tracing. This is required to avoid infinite loops when recording a trace. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-18trace: Use notrace for shortSimon Glass
The attribute syntax is quite verbose. Use the macro provided for this purpose. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-17Merge branch '2022-01-16-bootstd-updates'Tom Rini
To quote the author: So far standard boot lacks a boot menu, although it is possible to create a rudimentary one using the existing 'bootmenu' command. Even then, this text-based menu offer only basic functionality and does not take full advantage of the displays which are common on many devices. This series provides a 'bootflow menu' command which allows the user to select from the available bootflows. An attempt is made to show the name of the available operating systems, by reading more information into the bootflow. A logo can be read also, where supported, so that this can be presented to the user when an option is highlighted. Full use is made of TrueType fonts, if enabled. For cases where only a serial console is available, it falls back to a simple text-based menu. All of this is implementing using a new 'expo' construct, a collection of scenes (like menu screens) which can be navigated by the user to view information and select options. This is fairly general and should be able to cope with a wider array of use cases, with less hacking of the menu code, such as is currently needed for CMD_BOOTEFI_BOOTMGR. Of course it would be possible to enhance the existing menu rather than creating a new setup. Instead it seems better to make the existing menu use expo, if code space permits. It avoids the event-loop problem and should be more extensible, given its loosely coupled components and use of IDs instead of pointers. Further motivation is provided in the documentation. For now the CLI keypress-decoding code is split out to be used by the new menu. The key codes defined by menu.h are reused also. This is of course just a starting point. Some ideas for future work are included in the documentation.
2023-01-17Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- kirkwood: Convert to DM Serial for various Kirkwood boards (Tony) - orion-timer: Fix problem in early_init_done() (Stefan)
2023-01-17arm: kirkwood: Convert to DM Serial for various Kirkwood boardsTony Dinh
For Kirkwood boards, it is necessary to have early malloc in DRAM area when Driver Model for Serial is enabled. Please see Michael's patch here: https://lore.kernel.org/u-boot/20220817193809.1059688-20-michael@walle.cc/ This patch enables the early malloc in DRAM for all Kirkwood boards. Note that this will work for boards that have either non-DM serial and DM_SERIAL. Also, add the CONFIG_KIRKWOOD_COMMON option to enable DM_SERIAL as a common option for boards that have been tested. Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2023-01-17timer: orion-timer: Fix problem in early_init_done()Stefan Roese
It was noticed that Clearfog is currently broken with this newly introduced early_init_done() function. Apparently the timer is enabled here when U-Boot is run but not configured - at least not correctly. Resulting in a hangup in the timer reading functions. To fix this, also read the value of the reload register and check it's value with the one written to by U-Boot. Only if this matches, the init has already been done. Fixes: 5387b093cb79 ("timer: orion-timer: Fix problem with early static variable") Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Pali Rohár <pali@kernel.org> Cc: Martin Rowe <martin.p.rowe@gmail.com> Cc: Tony Dinh <mibodhi@gmail.com> Cc: Pali Rohár <pali@kernel.org> Cc: Michael Walle <michael@walle.cc>
2023-01-16Merge tag 'u-boot-rockchip-20230117' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip - Add support for rv1126 soc and rv1126 neu2 io board; - Add support for rk3399 pine64 pinephone pro board; - dts sync from linux for rk3399 and px30; - Add support for PX30 Ringneck SoM board;
2023-01-16expo: Add documentationSimon Glass
Add some documentation for the expo feature. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16bootstd: Support setting a theme for the menuSimon Glass
Allow a theme to be set. For now this is very simple, just a default font size to use for all elements. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16bootstd: Add a test for the bootstd menuSimon Glass
Add a test which checks that two operating systems can be displayed in a menu, allowing one to be selected. Enable a few things on snow so that the unit tests build. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16bootstd: Support creating a boot menuSimon Glass
Create an expo to handle the boot menu. For now this is quite simple, with just a header, some menu items and a pointer to show the current one. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16expo: Add basic testsSimon Glass
Add some tests for the expo, including setting up and rendering an expo. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16expo: Add support for scene menusSimon Glass
A menu is a key part of the expo design. It consists of a number of items which the user can select from. Add the initial implementation of this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16expo: Add support for scenesSimon Glass
A scene is a single screen within an expo. It is possible to move between scenes but only one can be displayed at once. Add a basic implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16expo: Add basic implementationSimon Glass
An expo is a way of presenting and collecting information from the user. It consists of a collection of 'scenes' of which only one is presented at a time. An expo is typically used to show a boot menu and allow settings to be changed. One created, the same expo can be automatically presented in graphical form using a vidconsole, or in text form on a serial console. Add an initial implementation of the expo itself. Supports for scenes and objects is provided later. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16menu: Factor out menu-keypress decodingSimon Glass
Move this code into a separate function so that it can be used in the new VBE menu. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16bootstd: Allow reading a logo for the OSSimon Glass
Some operating systems provide a logo in bmp format. Read this in if present so it can be displayed in the menu. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16bootstd: Read the Operating System name for distro/scriptsSimon Glass
Add the concept of an OS name to the bootflow. This typically includes the OS name, version and kernel version. Implement this for the distro and script bootmeths so that it works with Armbian and older version of Fedora. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16video: Add font functions to the vidconsole APISimon Glass
Support for fonts currently depends on the type of vidconsole in use. Add two new methods to enumerate fonts and to set the font. Fix a few other method comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16video: Fix unchnaged typoSimon Glass
Fix this typo in the header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-01-16video: truetype: Rename the metrics functionSimon Glass
This should really have a 'truetype' prefix. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16video: Enable VIDEO_ANSI by default only with EFISimon Glass
This is not generally needed unless EFI_LOADER is used. Adjust the default setting to reduce the size of the U-Boot build. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16image: Move common image code to image_board and commandSimon Glass
We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org>