aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-08-30Merge tag 'u-boot-at91-2023.10-a' of ↵WIP/30Aug2023-nextTom Rini23-89/+1079
https://source.denx.de/u-boot/custodians/u-boot-at91 into next First set of u-boot-at91 features for the 2023.10 cycle: This feature set includes a new board sama5d29 Curiosity, and various fixes and alignments for sam9x60 and sam9x60 curiosity board.
2023-08-29Merge branch ↵Tom Rini36-224/+1175
'2023-08-29-integrate-efi-capsule-update-better-in-to-u-boot-buildflow' into next To quote the author: This patchset aims to bring two capsule related tasks under the U-Boot build flow. The first task is related to generation of capsules. The capsules can be generated as part of U-Boot build, and this is being achieved through binman, by adding a capsule entry type. The capsules can be generated by specifying the capsule parameters as properties under the capsule entry node. The other task is the embedding of the public key into the platform's DTB. The public key is in the form of an EFI Signature List(ESL) file and is used for capsule authentication. This is being achieved by adding the signature node containing the capsule public key in the platform's DTB. Corresponding changes have also been made to the test setup of the EFI capsule update feature. The ESL public key file was embedded into the sandbox platform's test.dtb as part of the test setup, post U-Boot build. This is now no longer needed as the embedding of the ESL happens as part of the build. Secondly, the capsules needed for testing the EFI capsule update feature were being generated through the invocation of the mkeficapsule tool. This setup has also been changed to introduce generation of these capsules through binman. The document has been updated to reflect the above changes.
2023-08-29doc: capsule: Document the new mechanism to embed ESL file into dtbWIP/2023-08-29-integrate-efi-capsule-update-better-in-to-u-boot-buildflowSughosh Ganu1-14/+5
Update the document to specify how the EFI Signature List(ESL) file can be embedded into the platform's dtb as part of the U-Boot build. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-08-29test: capsule: Remove logic to add public key ESLSughosh Ganu2-20/+4
The public key EFI Signature List(ESL) needed for capsule authentication is now embedded into the platform's DTB as part of the build. Remove the superfluous logic from the test setup. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-08-29sandbox: capsule: Add path to the public key ESL fileSughosh Ganu2-0/+2
Add the path to the public key EFI Signature List(ESL) file for the sandbox variants which enable capsule authentication. This ESL file gets embedded into the platform's device-tree as part of the build. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-08-29scripts/Makefile.lib: Embed capsule public key in platform's dtbSughosh Ganu3-0/+34
The EFI capsule authentication logic in u-boot expects the public key in the form of an EFI Signature List(ESL) to be provided as part of the platform's dtb. Currently, the embedding of the ESL file into the dtb needs to be done manually. Add a target for generating a dtsi file which contains the signature node with the ESL file included as a property under the signature node. Include the dtsi file in the dtb. This brings the embedding of the ESL in the dtb into the U-Boot build flow. The path to the ESL file is specified through the CONFIG_EFI_CAPSULE_ESL_FILE symbol. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-08-29scripts/Makefile.lib: Add dtsi include files as deps for building DTBSughosh Ganu1-1/+3
At the time of building the DTB, some dtsi files can be selected for inclusion. Have these dtsi files as dependencies for the DTB target. This also ensures generation or updating the dtsi files if need be. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-29scripts/Makefile.lib: Collate all dtsi files for inclusionSughosh Ganu1-4/+7
At the time of building a device-tree file, all the *u-boot.dtsi files are looked for, in a particular order, and the first file found is included. Then, the list of files specified in the CONFIG_DEVICE_TREE_INCLUDES symbol are included. Combine these files that are to be included into a variable, and then include all these files in one go. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-08-29sandbox: trace: Increase trace buffer sizeSughosh Ganu3-3/+3
When running the trace test on the sandbox platform, the current size of 16MiB is no longer large enough for capturing the entire trace history, and results in truncation. Use a size of 32MiB for the trace buffer on the sandbox platform while running the trace test. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-29doc: Add documentation to highlight capsule generation related updatesSughosh Ganu1-0/+40
The EFI capsules can now be generated as part of U-Boot build, through binman. Highlight these changes in the documentation. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-08-29test: capsule: Generate EFI capsules through binmanSughosh Ganu4-174/+367
Support has been added for generating the EFI capsules through binman. Make changes in the EFI capsule update testing feature to generate capsules through binman. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-08-29binman: capsule: Add support for generating EFI capsulesSughosh Ganu11-0/+498
Add support in binman for generating EFI capsules. The capsule parameters can be specified through the capsule binman entry. Also add test cases in binman for testing capsule generation. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-29btool: mkeficapsule: Add a bintool for EFI capsule generationSughosh Ganu1-0/+101
Add a bintool for generating EFI capsules. This calls the mkeficapsule tool which generates the capsules. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-29sandbox: capsule: Enable EFI capsule module on sandbox variantsSughosh Ganu3-0/+6
Enable the EFI capsule update code on all sandbox variants. This was already enabled on the sandbox, sandbox64 and sandbox_flattree variants. The rest of the variants also have the EFI capsule update module enabled now. With this commit, the mkeficapsule tool also gets enabled on all variants. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-29sandbox: capsule: Add keys and certificates needed for capsule update testingSughosh Ganu5-0/+94
Add the private keys and public key certificates which are to be used for capsule authentication while testing the EFI capsule update functionality. There are two pairs of private and public keys, good and bad. The good key pair will be used for signing capsules, whilst the bad key pair is to be used as malicious keys for testing authentication failure cases. The capsule_pub_key_good.crt is also converted to an EFI Signature List(ESL) file, SIGNER.esl, which is embedded in the platform's device-tree for capsule authentication. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-29nuvoton: npcm845-evb: Add a newline at the end of fileSughosh Ganu1-1/+1
Add a newline at the end of the dts, without which the build fails when including a dtsi file. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-08-29binman: bintool: Build a tool from a list of commandsSughosh Ganu1-8/+11
Add support to build a tool from source with a list of commands. This is useful when a tool can be built with multiple commands instead of a single command. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-29ARM: dts: at91: sam9x60-curiosity: Sync gpio button from LinuxAlexander Dahl1-0/+20
Copied as is from Linux Kernel release v6.4. (dts file is still the same in Linux v6.5-rc7 but was moved to vendor sub-directories with v6.5-rc1.) Button works out of the box now if the following config options are enabled: CONFIG_BUTTON, CONFIG_BUTTON_GPIO, CONFIG_CMD_BUTTON, CONFIG_DM_GPIO. Signed-off-by: Alexander Dahl <ada@thorsis.com>
2023-08-29board: sam9x60-curiosity: Let LED subsystem init leds if enabledAlexander Dahl2-0/+36
If CONFIG_LED and CONFIG_LED_GPIO are enabled, it is not necessary to initialize the RGB LED on the board by manually setting hardcoded GPIOs anymore. Everything is well defined in dts and can be used like on boards of other vendors. Keep the old behaviour as fallback, though. With all this in place enabling CONFIG_CMD_LED gives us a working 'led' command on the U-Boot shell. Signed-off-by: Alexander Dahl <ada@thorsis.com>
2023-08-29ARM: dts: at91: sam9x60-curiosity: Sync LED nodes from LinuxAlexander Dahl1-0/+30
Copied as is from Linux Kernel release v6.4. (dts file is still the same in Linux v6.5-rc7 but was moved to vendor sub-directories with v6.5-rc1.) Signed-off-by: Alexander Dahl <ada@thorsis.com>
2023-08-29configs: at91: sam9x60: Switch to new reset driverAlexander Dahl5-0/+10
Since commit 61040097a9d1 ("reset: at91: Add reset driver for basic assert/deassert operations") the compatible "microchip,sam9x60-rstc" for the sam9x60 reset controller in sam9x60.dtsi is not handled by CONFIG_SYSRESET_AT91 anymore, but by CONFIG_RESET_AT91 now. This resulted in the following error message, when trying to reset from U-Boot shell: U-Boot> reset resetting ... System reset not supported on this platform ### ERROR ### Please RESET the board ### Fixed by enabling the new driver in the relevant defconfigs. Tested on sam9x60-curiosity board. Defconfigs for sam9x60ek adapted in the same way, but without testing. These should be all sam9x60 boards affected in U-Boot here. Signed-off-by: Alexander Dahl <ada@thorsis.com>
2023-08-29configs: at91: sam9x60_curiosity: Sync both defconfig variantsAlexander Dahl1-1/+14
The board has two SD card slots and we have two defconfigs for booting from either the first (micro SD) named 'sam9x60_curiosity_mmc_defconfig' or the second (full size SD) named 'sam9x60_curiosity_mmc1_defconfig'. For comparable Microchip boards (sama5d27-som1-ek, sama5d29-curiosity, sama7g5ek) with two card slots the defconfigs only differ in BOOTARGS, BOOTCOMMAND, and ENV_FAT_DEVICE_AND_PART and the same should be the case for sam9x60_curiosity. Here the 'mmc1' config has more options enabled to support the raw NAND flash populated on the board, so the 'mmc' config (for mmc0) was adapted by enabling additional options, instead of removing options from mmc1. The 'mem=128M' argument can be dropped from kernel command line, because it is redundant to memory node in dts in both Linux and U-Boot: memory@20000000 { reg = <0x20000000 0x8000000>; }; Signed-off-by: Alexander Dahl <ada@thorsis.com>
2023-08-26Merge branch ↵Tom Rini31-650/+1024
'2023-08-26-bootstd-chromeos-impreovements-and-move-to-gcc-13.2' into next First, update CI to using gcc-13.2 from 13.1, and rebuild the CI containers. This is needed because the second part adds utilities for tests and provides, to quote the author: This updates the ChromiumOS bootmeth to detect multiple kernel partitions on a disk. It also includes minor code improvements to the partition drivers, including accessors for the optional fields. This series also includes some other related tweaks in testing.
2023-08-26CI: Move to latest Ubuntu "Jammy" tagTom Rini3-3/+3
Move to the latest "Jammy" tag from Ubuntu. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-26CI: Update to gcc-13.2.0Tom Rini4-32/+32
The latest kernel.org toolchains for gcc are now 13.2.0, so upgrade to that. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-26CI: Add ChromiumOS utilitiesSimon Glass1-0/+3
We need cgpt and futility for building test images. Add them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-26bootstd: cros: Allow detection of any kernel partitionSimon Glass3-20/+36
The existing ChromiumOS bootmeth only supports reading a single kernel partition, either 2 or 4. In fact there are normally two options available. Use the GUID to detect kernel partitions, with the BOOTMETHF_ANY_PART flag, so that bootstd does not require a valid filesystem before calling the bootmeth. Tidy up and improve the logging while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> [trini: Add missing select of PARTITION_TYPE_GUID] Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-25uuid: Add ChromiumOS partition typesSimon Glass2-0/+21
Add some GUIDs for ChromiumOS so we can detect the partitions. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25bootstd: Support bootmeths which can scan any partitionSimon Glass3-8/+23
Some bootmeths support scanning a partition without a filesystem on it. Add a flag to support this. This will allow the ChromiumOS bootmeth to find kernel partition, which are stored in a special format, without a filesystem. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: Add a fallback for part_get_bootable()Simon Glass1-8/+12
This function can be called when partition support is disabled. Add a static inline to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25bootstd: Add a test for bootmeth_crosSimon Glass4-2/+183
The ChromiumOS bootmeth has no tests at present. Before adding more features. add a basic test. This creates a disk which can be scanned by the bootmeth, so make sure things work. It is quite rudimentary, since the kernel is faked, the root disk is missing and there is no cmdline stored. Enable the bootmeth for snow so it can build the unit test. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25bootstd: test: Allow binding and using any mmc deviceSimon Glass1-6/+22
We currently use mmc4 for tests. Update the function which sets this up so that it can handle any device. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25bootflow: Show an empty filename when there is noneSimon Glass2-11/+13
At present 'bootflow list' shows <NULL> for the filename when it is not present. Show an empty string instead, since that is more user-friendly. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25test: Move 1MB.fat32.img and 2MB.ext2.imgSimon Glass3-26/+30
These are currently created in the source directory, which is not ideal. Move them to the persistent-data directory instead. Update the test so skip validating the filename, since it now includes a full path. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25sandbox: Add a way to access persistent test filesSimon Glass2-0/+34
Some pytests create files in the persistent-data directory. It is useful to be able to access these files in C tests. Add a function which can locate a file given its leaf name, using the environment variable set up in test/py/conftest.py Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25uuid: Move function comments to header fileSimon Glass2-103/+103
These should be in the header file for easy browsing, not in the source code. Move them and add a missing Return on one of the functions. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25dm: core: Correct error handling when event failsSimon Glass1-1/+2
Follow the correct path in device_probe() when and event handler fails. This avoids getting into a strange state where the device appears to be activated but is not. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: efi: Add debugging for the signature checkSimon Glass1-2/+11
Add a little more debugging for the initial signature check. Drop the pointless check for NULL. Also set a log category while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: Add an accessor for struct disk_partition sys_indSimon Glass2-4/+15
This field is only present when a CONFIG is set. To avoid annoying #ifdefs in the source code, add an accessor. Update the only usage. Note that the accessor is optional. It can be omitted if it is known that the option is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: Add accessors for struct disk_partition type_uuidSimon Glass3-10/+35
This field is only present when a CONFIG is set. To avoid annoying #ifdefs in the source code, add accessors. Update all code to use it. Note that the accessor is optional. It can be omitted if it is known that the option is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: Add accessors for struct disk_partition uuidSimon Glass6-39/+58
This field is only present when a CONFIG is set. To avoid annoying #ifdefs in the source code, add accessors. Update all code to use it. Note that the accessor is optional. It can be omitted if it is known that the option is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: Add comments for static functionsSimon Glass1-0/+32
Some internal functions could do with a few comments, to explain what they do. Add these, to make the code easier to follow. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: nac: Use desc instead of dev_descSimon Glass1-32/+27
The dev_ prefix is a hangover from the pre-driver model days. The device is now a different thing, with driver model. Update the mac code to just use 'desc'. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: iso: Use desc instead of dev_descSimon Glass1-26/+26
The dev_ prefix is a hangover from the pre-driver model days. The device is now a different thing, with driver model. Update the iso code to just use 'desc'. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: efi: Use desc instead of dev_descSimon Glass1-116/+112
The dev_ prefix is a hangover from the pre-driver model days. The device is now a different thing, with driver model. Update the efi code to just use 'desc'. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: dos: Use desc instead of dev_descSimon Glass1-32/+31
The dev_ prefix is a hangover from the pre-driver model days. The device is now a different thing, with driver model. Update the dos code to just use 'desc'. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: amiga: Use desc instead of dev_descSimon Glass1-17/+17
The dev_ prefix is a hangover from the pre-driver model days. The device is now a different thing, with driver model. Update the amiga code to just use 'desc'. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: Use desc instead of dev_descSimon Glass2-156/+147
The dev_ prefix is a hangover from the pre-driver model days. The device is now a different thing, with driver model. Update the partition code to just use 'desc', as is done with driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25Merge branch '2023-08-25-add-persistent-config-editor-via-expo' into nextTom Rini25-146/+1679
To quote the author: So far cedit does not support reading and writing the configuration. This series add several features related to this: First, it adds support for using a file on a filesystem. This is in FDT format and provides enough information to reset the cedit back to the saved settings. Second, it adds support for using the U-Boot environment. Since the environment is generally saved across reboots, this feature provides an easy way of storing the state on most boards. The variables all have a 'c.' prefix to avoid confusion with other variables. Finally it adds support for using CMOS RAM. This is commonly used on x86 devices to store BIOS settings. The expo schema provides information on the register layout. Some other minor tweaks and improvements are included along the way.
2023-08-25expo: doc: Update documentation for persistent settingsWIP/2023-08-25-add-persistent-config-editor-via-expoSimon Glass2-1/+15
Add mention of persistent settings in the documentation. Signed-off-by: Simon Glass <sjg@chromium.org>