summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-07-31dm: use list_count_nodes() for counting list nodesSughosh Ganu5-28/+13
The linux kernel has the list_count_nodes() API functions which is used for counting nodes of a list. This has now been imported in U-Boot as part of an earlier commit. Use this function and drop the list_count_items(). Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-07-31efi_memory: get the efi_mem_list node directlySughosh Ganu1-17/+8
Use the list_for_each_entry() API to get the efi_mem_list node directly, instead of making an additional call to list_entry(). Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-07-31efi_memory: avoid possible null pointer dereferenceSughosh Ganu1-1/+2
Populate the previous memory descriptor node pointer only after it's parent struct has been initialised. The compiler fixes this logic to do the right thing, but it is better to have correct code in place. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-07-31efi_memory: use list_count_nodes() to count list entriesSughosh Ganu1-3/+2
Use the API function list_count_nodes() to count the number of EFI memory map entries. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-07-31linux: list: add a function to count list nodesSughosh Ganu1-0/+15
Add a function to count the nodes of a list. Taken from linux 6.11-rc1 tag commit 8400291e289e. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-07-31efi_loader: correct check in efi_load_option_dp_join()Heinrich Schuchardt1-1/+1
After assigning to *dp we must check this value and not dp. Addresses-Coverity-ID: 501792 Control flow issues (DEADCODE) Fixes: 58bef195f94e ("cmd: eficonfig: add support for setting fdt") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-07-31doc: Add a description for bootmeth_androidMattijs Korpershoek4-1/+42
Add initial documentation for the Android bootmeth. Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-31smbios: add extended Extended BIOS ROM SizeHeinrich Schuchardt2-1/+9
U-Boot claims to create SMBIOS 3.7 tables. The type 0 table has a field Extended BIOS ROM Size since version 3.1. BIOS ROM sizes of 16 MiB or above must be written to this field. Add and fill the missing field. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-07-31efi_loader: add /dtbs search pathCaleb Connolly1-0/+3
Add an additional search path /dtbs, this is where dtbs are installed on postmarketOS and potentially other distros. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-07-31efi_loader: require EFI boot manager for EBBR complianceHeinrich Schuchardt1-0/+1
A system has to support booting via the boot manager to be EBBR compliant. See the reference to variables Boot#### in the specification. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-07-31efi_loader: adjust config options for capsule updatesIlias Apalodimas1-0/+1
EFI_IGNORE_OSINDICATIONS is used to ignore OsIndications if setvariable at runtime is not supported and allow the platform to perform capsule updates on disk. With the recent changes boards can conditionally enable setvariable at runtime using EFI_RT_VOLATILE_STORE. Let's make that visible in our Kconfigs and enable EFI_IGNORE_OSINDICATIONS when set variable at runtime is disabled. Since EFI_RT_VOLATILE_STORE needs help from the OS to persist the variables, allow users to ignore OsIndications even if setvariable at runtime is enabled. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-07-30Merge patch series "led: implement software blinking"Tom Rini6-21/+199
Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> says: v2 changes: * Drop sw_blink_state structure, move its necessary fields to led_uc_plat structure. * Add cyclic_info pointer to led_uc_plat structure. This simplify code a lot. * Remove cyclic function search logic. Not needed anymore. * Fix blinking period. It was twice large. * Other cleanups. v3 changes: * Adapt code to recent cyclic function changes * Move software blinking functions to separate file * Other small changes v4 changes: * Refactoring of led_set_period() function v5 changes * Fix compilation if CONFIG_LED_BLINK is not defined v6 changes: * Enable LEDST_BLINK state unconditionally. * Function led_set_period() becomes available when CONFIG_LED_BLINK is disabled. This makes led code simpler. * Software blinking requires about 100 bytes of data for a led. It's not a good idea to allocate so much memory for each supported led. Change the code to allocate blinking data only for required leds.
2024-07-30led: Add dts property to specify blinking of the ledMichael Polyntsov1-5/+25
The standard property linux,default-trigger = "pattern"; used to get an effect. No blinking parameters can be set yet. Signed-off-by: Michael Polyntsov <michael.polyntsov@iopsys.eu> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-30led: Implement software led blinkingMichael Polyntsov5-1/+166
If hardware (or driver) doesn't support leds blinking, it's now possible to use software implementation of blinking instead. This relies on cyclic functions. Signed-off-by: Michael Polyntsov <michael.polyntsov@iopsys.eu> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-30led: enable LEDST_BLINK state unconditionallyMikhail Kshevetskiy3-15/+5
Changes: * enable LEDST_BLINK state unconditionally * function led_set_period() becomes available when CONFIG_LED_BLINK is disabled. This makes led code simpler. * fix cmd/led.c to work properly when LEDST_BLINK present, but CONFIG_LED_BLINK is disabled Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-29Merge patch series "include: asm-generic: Remove duplicate newlines"Tom Rini90-250/+0
Drop all duplicate newlines from the include directory files.
2024-07-29include: Remove duplicate newlinesMarek Vasut41-115/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: zfs: Remove duplicate newlinesMarek Vasut3-3/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: valgrind: Remove duplicate newlinesMarek Vasut2-21/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: usb: Remove duplicate newlinesMarek Vasut3-7/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: u-boot: Remove duplicate newlinesMarek Vasut2-3/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: power: Remove duplicate newlinesMarek Vasut2-2/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: net: Remove duplicate newlinesMarek Vasut1-1/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: mtd: Remove duplicate newlinesMarek Vasut1-1/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: linux: Remove duplicate newlinesMarek Vasut22-82/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: jffs2: Remove duplicate newlinesMarek Vasut1-2/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: fsl-mc: Remove duplicate newlinesMarek Vasut3-4/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: firmware: Remove duplicate newlinesMarek Vasut1-1/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: dt-bindings: Remove duplicate newlinesMarek Vasut6-6/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: dm: Remove duplicate newlinesMarek Vasut1-1/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29include: asm-generic: Remove duplicate newlinesMarek Vasut1-1/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-29Merge tag 'dm-pull-29jul24' of ↵Tom Rini33-107/+1243
https://gitlab.denx.de/u-boot/custodians/u-boot-dm qconfig minor improvement binman support for alternate entries
2024-07-29Makefile: Pass OF_SPL_REMOVE_PROPS to binmanSimon Glass2-1/+3
Pass CONFIG_OF_SPL_REMOVE_PROPS to binman so that it can remove properties correctly when producing FITs for SPL phases. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29Makefile: Provide VPL devicetree and padding to binmanSimon Glass1-0/+2
Provide these parameters to binman so that it can produce images targeted at VPL. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: fit: Allow running fdtgrep on devicetree blobsSimon Glass6-5/+193
When using FIT to load firmware builds for multiple models, the FIT must include a common binary along with a number of devicetree blobs, one for each model. This is the same mechanism as is used for loading an OS. However, SPL builds do not normally use the full devicetree, but instead a cut-down version which various nodes and properties removed. Add a new fit,fdt-phase property to allow binman to produce these devicetree blobs. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: fit: Write the compatible string to configurationSimon Glass4-7/+125
FIT allows the FDT's root-node compatible string to be placed in a configuration node to simplify and speed up finding the best match for booting. Add a new property to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: fit: Allow providing FDT filenames in a directorySimon Glass4-5/+96
In some cases the list of available FDT files is not available in an entryarg. Provide an option to point to a directory containing them instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Add support for alternative FDTsSimon Glass14-2/+507
FIT provides a way to select between different devicetree blobs depending on the model. This works fine for U-Boot proper and allows SPL to select the correct blob for the current board at runtime. The boot sequence (SPL->U-Boot proper) is therefore covered by the existing feature set. The first boot phase (typically TPL) cannot use FIT since SoC boot ROMs don't currently support it. Therefore the TPL image must be specific to each model it boots on. To support booting on mulitple models, binman must therefore produce a separate TPL image for each model, even if the images for the rest of the phases are identical. TPL needs to be packaged as an executable binary along with a reduced devicetree. When multiple models are supported, a reduced devicetree must be provided for each model. U-Boot's build system is designed to build a single devicetree for SPL builds, so does not support this requirement. Add a new 'alternatives' feature to Binman, allowing it to automatically subset a devicetree to produce the reduced devicetree for a particular phase for each supported model. With this it is possible to produce a separate TPL image for each of the models. The correct one can then be loaded onto a board, along with the common FIT image(s). Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Allow entry types to override FDT contentsSimon Glass3-2/+18
At present the contents of an FDT (for each phase) are fixed, determined by the build and provided to Binman as input files. Provide a means for entry types to provide their own FDT, so that it can be processed, if needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Remove dependency on pylibfdt for entry-docsSimon Glass1-0/+7
Allow the entry-docs command to operate even if pylibfdt is not present in the systemn. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Add a bintool for fdtgrepSimon Glass2-0/+145
Binman needs the ability to run fdtgrep to prepare devicetree subsets for use by SPL and TPL. Add a new bintool in preparation for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Correct indentation in testSplPubkeyDtbSimon Glass1-21/+18
This function has strange indentation. Fix it. Fixes: 8c1fbd1f607 ("binman: ftest: Add test for u_boot_spl_pubkey_dtb") Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Fix a comment typo in _DoReadFileDtb()Simon Glass1-1/+1
Fix a minor typo in this function. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Mention expanded entries in u-boot-vplSimon Glass5-12/+10
Add a comment about this entry type being expanded, to match the comment for SPL and TPL. Drop an unwanted line in the SPL and TPL docs while here. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Correct comment in blob_dtb GetFdtEtype()Simon Glass1-1/+3
The filenames are a bit confused. Fix them. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Write the compressed output to a fileSimon Glass1-0/+3
When an entry is compressed, write the compressed contents to a file so that it is possible to see what was produced. This aids debugging with new images. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: elf: Add more debugging to LookupAndWriteSymbols()Simon Glass1-1/+1
When symbol-writing does not appear to work, it can sometimes be hard to figure out what is going on. Add some more debugging to help. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Move problem-checking code into a functionSimon Glass1-32/+46
This has become quite long, so move it into a separate function. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Tidy up comment for Bintoolfdt_add_pubkey.run()Simon Glass1-0/+4
This function returns a value, so add documentation for it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29binman: Tidy up bintool docsSimon Glass1-23/+38
The docs have somehow got out of sync. Regenerate the file to fix the problem. Signed-off-by: Simon Glass <sjg@chromium.org>