summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | test: unit test for echo commandHeinrich Schuchardt2021-01-252-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a unit test for the unit command Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | | cmd: change suppress newline in echo commandHeinrich Schuchardt2021-01-251-31/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default the echo command emits its arguments followed by a line feed. If any of the arguments contains the sub-string "\c", the line feed is suppressed. This does not match shells used in Linux and BSD where the first argument has to be -n to suppress the line feed. The hush shell interferes with the parsing of backslashes. E.g. in the following command line quadruple backslashes are required for suppressing the line feed: for i in 1 2 3; do for j in 4 5; do echo \\\\c ${i}${j}; done; echo; done; To avoid unexpected behavior the patch changes echo to use -n as first argument to suppress the line feed. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | | doc: document for statementHeinrich Schuchardt2021-01-252-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | Create a man-page for the for statement. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | doc: describe exit commandHeinrich Schuchardt2021-01-252-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | Man-page for exit shell command. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | doc: document sbi commandHeinrich Schuchardt2021-01-253-0/+51
| | |/ | |/| | | | | | | | | | | | | Add a man-page for the sbi command. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | | Merge tag 'u-boot-atmel-2021.04-b' of ↵Tom Rini2021-01-2527-30/+436
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-atmel Second set of u-boot-atmel features for 2021.04 cycle This feature set includes macb updates for all interfaces and new sama7g5 variant support; micrel ksz9031 DLL support; a new board from Giant based on Adafruit feather form factor which contains a SAMA5D27 SoC; several fixes regarding the NAND flash PMECC block; and pincontrol drive strength support for pio4 controller.
| * | ARM: at91: spl: add spl_early_init for sama5d2 platformsGreg Gallagher2021-01-221-0/+7
| | | | | | | | | | | | | | | | | | | | | The dm root node is needed early in the spl to allow the timer to be used. This change calls spl_early_init to initialize the dm root node. Signed-off-by: Greg Gallagher <greg@embeddedgreg.com>
| * | configs: sama5d27_som1_ek: Set FDT filename based on defconfigGreg Gallagher2021-01-221-5/+2
| | | | | | | | | | | | | | | | | | | | | Make the FDT file name based on the default on that is specified in the defconfig file. Signed-off-by: Greg Gallagher <greg@embeddedgreg.com>
| * | board: atmel: Add SAMA5D27 giant boardGreg Gallagher2021-01-224-1/+233
| | | | | | | | | | | | | | | | | | | | | | | | Giant board is a tiny SBC based on the Adafruit Feather form factor, created by groboards it contains a SAMA5D2 processor (SAMA5D27), 128 MB of RAM and a microSD card for storage. Signed-off-by: Greg Gallagher <greg@embeddedgreg.com>
| * | net: macb: take into account all RGMII interface typesClaudiu Beznea2021-01-221-1/+4
| | | | | | | | | | | | | | | | | | | | | Take into account all RGMII interface types. Depending on it the RGMII PHY's timings are setup. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| * | net: macb: add support for sama7g5 emacClaudiu Beznea2021-01-221-0/+9
| | | | | | | | | | | | | | | | | | Add support for SAMA7G5 EMAC. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| * | net: macb: add support for sama7g5 gmacClaudiu Beznea2021-01-221-0/+33
| | | | | | | | | | | | | | | | | | Add support for SAMA7G5 GMAC. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| * | net: macb: check clk_set_rate return value to be negativeClaudiu Beznea2021-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | clk_set_rate() returns the set rate in case of success and a negative number in case of failure. Consider failure only the negative numbers. Fixes: 3ef64444de157 ("dm: net: macb: Implement link speed change callback") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| * | net: macb: add user io config data structureClaudiu Beznea2021-01-221-12/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Different implementation of USER IO register needs different mapping for bit fields of this register. Add implementation for this and, since clken is part of USER IO and it needs to be activated based on per SoC capabilities, add caps in macb_config where clken specific information needs to be filled. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| * | sam9x60.h: Fix Galois Field Table offsetsKai Stuhlemmer (ebee Engineering)2021-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because ATMEL_BASE_ROM is defined to 0x100000, it already points to the begin of the index table for 512 byte sectors correction. Thus its offset must be zero and the index of the table for 1024 byte sectors must start at offset 0x8000. Signed-off-by: Kai Stuhlemmer (ebee Engineering) <kai.stuhlemmer@ebee.de> [ta: update commit message] Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * | sama5d3: Fix Galois Field Table offsetsTudor Ambarus2021-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offsets are described in the datasheet at section: "11.4.4.2 NAND Flash Boot: PMECC Error Detection and Correction". For testing I "injected" bit flips into u-boot NAND memory area, and then read back. PMECC could not correct the errors. With the offsets updated everything is fine. Fixes: 3225f34e5c ("ARM: atmel: add sama5d3xek support") Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * | configs: at91: Fix wrong definitions for CONFIG_PMECC_CAPTudor Ambarus2021-01-225-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_ATMEL_NAND_HW_PMECC is set, CONFIG_PMECC_CAP defaults to the value of 2. At the conversion to Kconfig for the PMECC config values, some boards/defconfigs were wrongly configured. Update CONFIG_PMECC_CAP to the PMECC_CAP value before the conversion. Fixes: 49ad40298c ("ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig") Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * | configs: at91: Fix the involuntarily disablement of NAND PMECCTudor Ambarus2021-01-2212-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPL_GENERATE_ATMEL_PMECC_HEADER selects: ATMEL_NAND_HWECC [=y] && ATMEL_NAND_HW_PMECC [=y]. With the removal of SPL_GENERATE_ATMEL_PMECC_HEADER, ATMEL_NAND_HW_PMECC and ATMEL_NAND_HWECC were no longer selected. Also, when the SPL_GENERATE_ATMEL_PMECC_HEADER was removed, the configs were not updated using savedefconfig, thus the 'commit d168bcb6fe39 ("configs: Resync with savedefconfig")' further removes the CONFIG_PMECC_CAP value. Update defconfigs and add CONFIG_ATMEL_NAND_HW_PMECC, which selects ATMEL_NAND_HWECC, in order to restore NAND PMECC support. Restore CONFIG_PMECC_CAP value. Fixes: 57f76c2a47 ("configs: at91: remove SPL_GENERATE_ATMEL_PMECC_HEADER from non-nand configs") Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * | pinctrl: at91-pio4: implement drive strength supportEugen Hristev2021-01-223-0/+13
| | | | | | | | | | | | | | | | | | | | | Implement drive strength support, by preserving the same bindings as in Linux. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
| * | pinctrl: at91-pio4: convert to dev_read_propEugen Hristev2021-01-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use dev_read_prop instead of using the fdt_read_property which reads from the GD struct's fdt. This way the node is accessed via the device config instead of the global struct, which makes code more portable and GD independent. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
| * | dt-bindings: pinctrl: at91-pio4: add property for drive strengthEugen Hristev2021-01-221-0/+2
| | | | | | | | | | | | | | | | | | Add drive strength property which is equivalent with the one in Linux Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
| * | dt-bindings: pinctrl: at91-pio4: update license to SPDX styleEugen Hristev2021-01-221-2/+1
| | | | | | | | | | | | | | | | | | Update license header to SPDX style Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
| * | net: phy: micrel: fix typoClaudiu Beznea2021-01-191-1/+1
| | | | | | | | | | | | | | | | | | Fix typo. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| * | net: phy: micrel: add support for DLL setup on ksz9131Claudiu Beznea2021-01-191-1/+62
| | | | | | | | | | | | | | | | | | Add support for DLL setup on KSZ9131. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
* | | Merge tag 'efi-2021-04-rc1-3' of ↵Tom Rini2021-01-238-90/+126
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-04-rc1-3 Bug fixes for UEFI sub-system: * correct value of EFI_BLOCK_IO_PROTOCOL.Media.LastBlock * correct GUID when closing of EFI_LOAD_FILE_PROTOCOL * error handling in mkeficapsule tool Bug fixes for FAT file system: * consistent error handling for flush dir()
| * | | efi_loader: correct EFI_BLOCK_IO_PROTOCOL.Media.LastBlockHeinrich Schuchardt2021-01-231-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The field Media.LastBlock of the EFI_BLOCK_IO_PROTOCOL.Media was filled incorrectly both for block devices as well as for partitions. The field must be filled with the index of the last logical block (LBA): * block devices: device size minus 1 * partitions: partition size minus 1 Reported-by: Alexander von Gluck IV <kallisti5@unixzen.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | efi_loader: notification with TPL_APPLICATION not allowedHeinrich Schuchardt2021-01-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UEFI specification requires event notification levels to be > TPL_APPLICATION and <= TPL_HIGH_LEVEL. With the patch the CreateEvent() and CreatedEventEx() services are changed to check that the notification level is not TPL_APPLICATION. Reference: UEFI Specification 2.8 Errata B, table 27 "TPL Restrictions", "Event Notification Levels" Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | mkeficapsule: Miscellaneous fixes in the utilitySughosh Ganu2021-01-231-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Miscellaneous fixes in the mkeficapsule utility -- these include a few resource leak issues flagged by Coverity along with some additional code improvements suggested by Heinrich during code review. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
| * | | tools: mkeficapsule: fill reserved members of structureAKASHI Takahiro2021-01-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fill reserved members of efi_firmware_management_capsule_image_header structure with zero's for safety. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Fixes: CID 316354 Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | efi_loader: capsule: fix SIZEOF_MISMATCH warningAKASHI Takahiro2021-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CID 316361 says: > Passing argument "count * 8UL /* sizeof (*files) */" to > function "dlmalloc" and then casting the return value to "u16 **" is > suspicious. In this particular case "sizeof (u16 **)" happens to be equal > to "sizeof (u16 *)", but this is not a portable assumption. > > 767 tmp_files = malloc(count * sizeof(*files)); The change in this patch fixes the ambiguity. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Fixes: CID 316361 For readability use *tmp_files instead of tmp_files[0] Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | cmd: efidebug: always check return code from get_variable()AKASHI Takahiro2021-01-231-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CID 316364 says: > Null pointer dereferences (FORWARD_NULL) > printf("Result total size: 0x%x\n", result->variable_total_size); at do_efi_capsule_res(). The code is basically safe because a buffer for "result" is allocated by malloc() and filled up by the second get_variable(), which fails any way if the allocation has failed. But the first (and second) get_variable() possibly returns an error other than EFI_SUCCESS. We always need to check the return code from get_variable() before accessing the data in "result". While this change won't suppress CID 316364, the resulting code is much safer. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | efi_loader: fix efi_load_image_from_path()Heinrich Schuchardt2021-01-231-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the correct GUID when closing the file load protocol. Remove an unnecessary check (Coverity CID 316363). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | fs: fat: structure for name and extensionHeinrich Schuchardt2021-01-233-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The short name and extension of FAT files are stored in adjacent fields of the directory entry. For some operations like calculating a checksum or copying both fields it is preferable to treat both as one structure. Change the definition of the directory entry structure to include a structure comprising the name and the extension field. This resolves Coverity CID 316357, CID 316350, CID 316348. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | fs: fat: consistent error handling for flush_dir()Heinrich Schuchardt2021-01-231-27/+31
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide function description for flush_dir(). Move all error messages for flush_dir() from the callers to the function. Move mapping of errors to -EIO to the function. Always check return value of flush_dir() (Coverity CID 316362). In fat_unlink() return -EIO if flush_dirty_fat_buffer() fails. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | | Revert "doc: update Kernel documentation build system"Tom Rini2021-01-2315-1480/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately we now see a number of now-fatal warnings about duplicate labels. It is often unclear how best to re-write the document in question to not duplicate these otherwise logical headings. This reverts commit 10a1df3cd43ba2fe893d5dd1aeb2e7109ef0007f. Signed-off-by: Tom Rini <trini@konsulko.com>
* | | Merge branch '2021-01-22-tool-updates'Tom Rini2021-01-236-84/+112
|\ \ \ | | | | | | | | | | | | - Assorted updates to the tools/ code
| * | | tools: env: return error if ubi_update_start() failsMartin Hundebøll2021-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UBI_IOCVOLUP ioctl can fail if exclusive access to the volume isn't obtained. If this happens, the flush operation doesn't return error, leaving the caller without knowledge of missing flush. Fix this by forwarding the error (-1) from ubi_update_start(). Fixes: 34255b92e6e ("tools: env: Add support for direct read/write UBI volumes") Signed-off-by: Martin Hundebøll <martin@geanix.com>
| * | | mkimage: Move padding commands outside of FIT_SIGNATUREJoel Stanley2021-01-221-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These commands were disabled when CONFIG_FIT_SIGNATURE is disabled, but they do not depend on crypto support so they can be unconditionally enabled. Signed-off-by: Joel Stanley <joel@jms.id.au>
| * | | image-fit: Fix FIT_CIPHER linkingJoel Stanley2021-01-222-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_FIT_CIPHER=y and CONFIG_FIT_SIGNATURE=n is there is no implementation of image_get_host_blob for mkimage/dumpimage: /usr/bin/ld: tools/common/image-cipher.o: in function `fit_image_decrypt_data': image-cipher.c:(.text+0x9a): undefined reference to `image_get_host_blob' Move the implementation to a common file so it can be shaed between image-cipher.c and image-fit-sig.c. Signed-off-by: Joel Stanley <joel@jms.id.au>
| * | | tools/Makefile: FIT_CIPHER requires libsslJoel Stanley2021-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CONFIG_FIT_CIPHER is enabled without CONFIG_FIT_SIGNATURE then mkimage/dumpimage will fail to link: /usr/bin/ld: tools/common/image-cipher.o: in function `fit_image_decrypt_data': image-cipher.c:(.text+0x9a): undefined reference to `image_get_host_blob' /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x10): undefined reference to `EVP_aes_128_cbc' /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x40): undefined reference to `EVP_aes_192_cbc' /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x70): undefined reference to `EVP_aes_256_cbc' /usr/bin/ld: tools/lib/aes/aes-encrypt.o: in function `image_aes_encrypt': aes-encrypt.c:(.text+0x22): undefined reference to `EVP_CIPHER_CTX_new' /usr/bin/ld: aes-encrypt.c:(.text+0x6f): undefined reference to `EVP_EncryptInit_ex' /usr/bin/ld: aes-encrypt.c:(.text+0x8d): undefined reference to `EVP_EncryptUpdate' /usr/bin/ld: aes-encrypt.c:(.text+0xac): undefined reference to `EVP_CIPHER_CTX_free' /usr/bin/ld: aes-encrypt.c:(.text+0xf2): undefined reference to `EVP_EncryptFinal_ex' collect2: error: ld returned 1 exit status Signed-off-by: Joel Stanley <joel@jms.id.au>
| * | | tools: image-host: add support for several sub-imagesPhilippe Reynes2021-01-221-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The propoerty sign-images points to images in the configuration node. But thoses images may references severals "sub-images" (for example for images loadable). This commit adds the support of severals sub-images. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
| * | | tools: image-host: clean function fit_config_get_hash_listPhilippe Reynes2021-01-221-56/+76
| |/ / | | | | | | | | | | | | | | | | | | | | | This commit creates a function fit_config_add_hash that will be used in the next commit to support several 'sub-images'. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | Merge branch '2021-01-22-doc-updates'Tom Rini2021-01-2322-414/+1792
|\ \ \ | | | | | | | | | | | | - Assorted documentation updates
| * | | doc: move README.menu to HTML documentationHeinrich Schuchardt2021-01-233-124/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert README.menu to reStructured text and add it to the HTML documentation. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | doc: move test/py/README.md to HTML documentationHeinrich Schuchardt2021-01-232-107/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert test/py/README.md to restructured text and add it to the generated HTML documentation. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | | doc: move test/README to HTML documentationHeinrich Schuchardt2021-01-232-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move test/README to the 'Develop U-Boot' chapter of the HTML documentation. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | | doc: structure doc/develop/index.rstHeinrich Schuchardt2021-01-231-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide sub-chapters for 'Develop U-Boot' Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | | doc: update help messagePatrick Delaunay2021-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the help message used for 'make help': Documentation targets: Linux kernel internal documentation in different formats from ReST: => U-Boot documentation in different formats from ReST: Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | | doc: update Kernel documentation build systemHeinrich Schuchardt2021-01-2315-160/+1480
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the docomentation build system according to Linux v5.11-rc1. With this patch we can build the HTML documentation using either of Sphinx 2 and Sphinx 3. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> [Fix warning in b4860qds.rst about "Switch Settings"] Signed-off-by: Tom Rini <trini@konsulko.com>
| * | | doc: FIT image: Clarify format and simplify syntaxAlexandru Gagniuc2021-01-221-19/+14
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ** Introduction There are currently four ways to load an OS image with u-boot 1. SPL -> u-boot -> bootm 2. SPL blue falcon mode 3. "Basic" FIT image (CONFIG_LOAD_FIT) 4. "Full-featured" FIT image (CONFIG_LOAD_FIT_FULL) These four code paths were developed independently, and share very little code. (3) and (4), behave very differently, are littered with special cases. They even have different DTS syntax and properties. The cause of this divergence is that the FIT format specification leaves a number of things open to interpretation. The purpose of this change is to enable the reduction of code size, duplication, and complexity by updating and streamlining the FIT format. We are only marginally concerned with backwards compatibility, because we don't have inter-compatibility. For example, CONFIG_LOAD_FIT is able to load images that CONFIG_LOAD_FIT_FULL won't. This is a direct result of the incompatible syntax between the two implementations. Ideally, these changes would enable "simple" FIT to be a subset of the "full" fit implementation, and share most code. These changes should also eliminate the need for falcon mode (although we are not advocating for the removal of falcon mode at this time). ** Description of changes * The "configurations" node is now mandatory Guessing how to load components based on their "os" and "type" invites confusion and superfluous heuristics. Instead, require each FIT image to be explicit on how components should be loaded. * Eliminate "ramdisk", "setup", "standalone", and "fpga" properties Having too many special purpose properties requires special-casing FIT loading code. When a special property can be handled by another property, it is redundant. - A "ramdisk" is identical to a loadable. Thus ramdisk images should be placed under "loadables". - A "setup" node can be achieved by using a "kernel" or "firmware" property instead. - "standalone" is used for u-boot nodes. The correct property to use in this case is "firmware". - "fpga" is a loadable * Prioritize control between "firmware" and "kernel" "firmware" and "kernel" are special nodes in that control is passed to the "entry-point" of the image. Both can be present, for example, an OP-TEE firmware with a linux kernel. When both are present, control is passed to the "firmware" image. ** Further generalizations (not included herein) The "firmware" and "kernel" properties could be generalized as a "next-boot-stage", or similar name. This "next" stage would be special in that it is both executable, and is the stage that is passed control. For example, "next-stage" could be an op-tee image, with linux as a loadable, or a u-boot image. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>