aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-28dm: serial: Add a migration deadline for serialSimon Glass2-0/+9
This probably should have been done a while back since it is a core system. Very few boards remain to be migrated. Addd a migration deadline for a year out. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-28gitlab/azure: x86: Add a coreboot testSimon Glass2-0/+36
Coreboot supports U-Boot as a payload and this recently got a bit of a facelist. Add a test for this. For now this uses a binary build of coreboot (v4.15). Future work could potentially build it from source, but we need to figure out the toolchain problems first, since coreboot uses its own toolchain. It turns out that this is tricky, because coreboot fails to build with a vanilla gcc. This needs some changes to the hooks scripts as well. An example build is at https://source.denx.de/u-boot/custodians/u-boot-dm/-/jobs/359687 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-01-28configs: am64x_evm_r5/a53_defconfig: Enable configs required for EthbootVignesh Raghavendra2-0/+16
Enable config options needed to support Ethernet boot on AM64x SK. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28configs: am64xx_evm: Increase BSS max size to 16KVignesh Raghavendra1-1/+1
With Ethboot support in SPL, network stack requires more BSS area, so increase BSS max size to 16K Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28ARM: dts: k3-am642-sk: Disable cpsw_port1 in SPLVignesh Raghavendra2-19/+0
ROM supports cpsw_port2 for Ethernet boot and SPL stages continue to download images on the same port, therefore there is no need to enable cpsw_port1. Disable the same. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28net: ti: am65-cpsw-nuss: Fix err msg for port bind failuresVignesh Raghavendra1-1/+1
Replace error case print with meaning full message. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28rsa: adds rsa3072 algorithmJamin Lin7-2/+112
Add to support rsa 3072 bits algorithm in tools for image sign at host side and adds rsa 3072 bits verification in the image binary. Add test case in vboot for sha384 with rsa3072 algorithm testing. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-28bootcount: fix printf() codeHeinrich Schuchardt1-2/+2
For printing phys_addr_t we should use %pa to avoid warning like: drivers/bootcount/bootcount_syscon.c:110:17: note: in expansion of macro ‘dev_err’ 110 | dev_err(dev, "%s: Unsupported register size: %d\n", __func__, | ^~~~~~~ seen for sandbox_defconfig with CONFIG_PHYS_64BIT=y. Cf. commit 1eebd14b7902 ("vsprintf: Add modifier for phys_addr_t") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-28dfu: mtd: skip empty pages when writing page for UBI partitionPatrick Delaunay1-1/+21
Align the DFU MTD backend for the UBI partitions with the mtd command write behavior when the option .dontskipff is not used: don't write the empty pages (full of 0xFF); it is not required for UBI, see [1] for details. This patch avoids the "free space fixup" procedure in the kernel [2] and allows to program a UBIFS volume generated by mkfs.ubifs without the option -F, --space-fixup. The MTD DFU backend implements this behavior introduced on DFU NAND backend by the commit 13cb7cc9e8e4 ("dfu: Add option to skip empty pages when flashing UBI images to NAND") and also supported by the command nand by CONFIG_CMD_NAND_TRIMFFS and by commit c9494866df83 ("cmd_nand: add nand write.trimffs command"). [1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo [2] http://www.linux-mtd.infradead.org/faq/ubifs.html#L_free_space_fixup Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-01-28pci: Extend 'pci' command with bus option '*'Pali Rohár1-10/+35
Allow to call 'pci' and 'pci regions' commands with bus option '*' which cause pci to process all buses. PCIe is point-to-point HW and so on each bus is maximally one physical device. Therefore for PCIe it is common to have multiple buses. This change allows to easily print all available PCIe devices in system. Make '*' as default option when no bus argument is specified. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-28pci: Add checks for valid cmdline argumentsPali Rohár1-0/+5
Currently pci command ignores invalid cmdline arguments and do something. Add checks that all passed arguments were processed. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-28pci: Extend 'pci regions' command with bus numberPali Rohár1-4/+6
'pci regions' currently prints only region information from bus 0 which belongs to controller 0. Parser for 'pci regions' cmdline currently ignores any additional arguments and so U-Boot always uses bus 0. Regions are stored in controller (not on the bus) and therefore to retrieve controller from the bus, it is needed to call pci_get_controller() which returns root bus. Because bus 0 is root bus, current code worked fine for controller 0. Extend cmdline parser for 'pci regions' to allows specifying bus number, extend pci_show_regions() code to accept also non-zero bus number and print bus ranges for which is regions configuration assigned. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-28pci: Fix setting controller's last_busnoPali Rohár1-0/+2
Initially it is set to dev_seq but update to the last bus number is missing. Fix it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-28spl: add support for custom boot method namesHeiko Thiery2-1/+19
Currently the names MMC1, MMC2 and MMC2_2 are output in the SPL. To achieve more userbility here the name of the boot source can be returned. E.g. for "MMC1" -> "eMMC" or "MMC2" -> "SD card". Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Michael Walle <michael@walle.cc> Tested-by: Michael Walle <michael@walle.cc>
2022-01-28Merge branch '2022-01-28-fastboot-updates'Tom Rini3-18/+15
- 3 DFU/fastboot bugfixes
2022-01-28fastboot: only look up real partition names when no alias existsMatthias Schiffer1-17/+12
Having U-Boot look up the passed partition name even though an alias exists is unexpected, leading to warning messages (when the alias name doesn't exist as a real partition name) or the use of the wrong partition. Change part_get_info_by_name_or_alias() to consider real partitions names only if no alias of the same name exists, allowing to use aliases to override the configuration for existing partition names. Also change one use of strcpy() to strlcpy(). Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2022-01-28dfu: handle short frame result of UPLOAD in state_dfu_idlePatrick Delaunay1-0/+2
In DFU v1.1 specification [1] the DFU_UPLOAD (Short Frame) is handled only in dfuUPLOADIDLE state: - Figure A.1 Interface state transition diagram - the state description in chapter A.2 A.2.3 State 2 dfuIDLE on Receipt of the DFU_UPLOAD request,and bitCanUpload = 1 the Next State is dfuUPLOADIDLE A.2.10 State 9 dfuUPLOAD-IDLE When the length of the data transferred by the device in response to a DFU_UPLOAD request is less than wLength. (Short frame) the Next State is dfuIDLE In current code, when an UPLOAD is completely performed after the first request (for example with wLength=200 and data read = 9), the DFU state stay at dfuUPLOADIDLE until receiving a DFU_UPLOAD or a DFU_ABORT request even it is unnecessary as the previous DFU_UPLOAD request already reached the EOF. This patch proposes to finish the DFU uploading (don't go to dfuUPLOADIDLE) and completes the control-read operation (go to DFU_STATE_dfuIDLE) when the first UPLOAD response has a short frame as an end of file (EOF) indicator even if it is not explicitly allowed in the DFU specification but this seems logical. [1] https://www.usb.org/sites/default/files/DFU_1.1.pdf Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-01-28fastboot: fix fastboot_set_reboot_flag()Roman Stratiienko1-1/+1
In case CONFIG_FASTBOOT_FLASH_MMC_DEV == 0, compile-time condition is not met and fastboot_set_reboot_flag() fails. Fixes: a362ce214f03 ("fastboot: Implement generic fastboot_set_reboot_flag") Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2022-01-27Merge tag 'dm-pull-26jan22' of ↵Tom Rini109-989/+4567
https://source.denx.de/u-boot/custodians/u-boot-dm acpi refactoring to allow non-x86 use binman support for bintools (binary tools) minor tools improvements in preparation for FDT signing various minor fixes and improvements
2022-01-26Merge https://source.denx.de/u-boot/custodians/u-boot-usbWIP/26Jan2022Tom Rini9-70/+962
2022-01-26usb: gadget: Add CDC ACM functionLoic Poulain5-0/+686
Add support for CDC ACM using the new UDC and gadget API. This protocol can be used for serial over USB data transfer and is widely supported by various OS (GNU/Linux, MS-Windows, OSX...). The usual purpose of such link is to access device debug console and can be useful for products not exposing regular UART to the user. A default stdio device named 'usbacm' is created, and can be used to redirect console to USB link over CDC ACM: > setenv stdin usbacm; setenv stdout usbacm Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2022-01-26lib/circbuf: Make circbuf selectable symbolLoic Poulain2-1/+10
It is currenly only used from usbtty driver but make it properly selectable via Kconfig symbol, for future usage. Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2022-01-26usb: ehci: dm: Convert i.MX28 ehci code to driver modelLukasz Majewski1-0/+184
This commit converts i.MX28's EHCI USB host driver to driver model (DM_USB). It is a straightforward conversion (to reuse as much code as possible), based on ehci-mx5.c code. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-01-26usb: ehci: Move common mxs code to separate functions (ehci_hcd_{stop|start})Lukasz Majewski1-50/+62
Those functions will be re-used when the ehci MXS driver (for imx28) will be converted to also support CONFIG_DM_USB. No functional changes introduced - only cosmetic changes (u32 type) and alignment to pass checkpatch. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-01-26usb: ehci: Refactor the ehci_mxs_toggle_clock function to be reused with DMLukasz Majewski1-21/+21
This function is going to be reused with the CONFIG_DM_USB enabled in the imx28 mxs USB ehci driver. No functional changes introduced. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-01-26usb: Modify Kconfig of the USB_EHCI_MXS to use this driver with imx28Lukasz Majewski1-3/+4
The ehci-mxs driver can be also used with imx28 SoC, not only imx23. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-01-26tools: mkimage: Show where signatures/keys are writtenSimon Glass7-7/+72
At present mkimage displays the node information but it is not clear what signing action was taken. Add a message that shows it. For now it only supports showing a single signing action, since that is the common case. Sample: Signature written to 'sha1-basic/test.fit', node '/configurations/conf-1/signature' Public key written to 'sha1-basic/sandbox-u-boot.dtb', node '/signature/key-dev' Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26tools: Pass public-key node through to callerSimon Glass1-3/+25
Update the two functions that call add_verify_data() so that the caller can see the node that was written to. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26image: Return destination node for add_verify_data() methodSimon Glass6-11/+16
It is useful to know where the verification data was written. Update the API to return this. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26tools: Pass the key blob aroundSimon Glass4-24/+45
At present we rely on the key blob being in the global_data fdt_blob pointer. This is true in U-Boot but not with tools. For clarity, pass the parameter around. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26tools: Tidy up argument order in fit_config_check_sig()Simon Glass1-9/+22
Put the parent node first in the parameters as this is more natural. Also add a comment to explain what is going on. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26tools: Avoid confusion between keys and signaturesSimon Glass1-25/+72
We should be consistent in using the term 'signature' to describe a value added to sign something and 'key' to describe the key that can be used to verify the signature. Tidy up the code to stick to this. Add some comments to fit_config_verify_key() and its callers while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26tools: Drop unused name in image-hostSimon Glass1-4/+1
The name is created but never used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26tools: Improve comments in signing functionsSimon Glass3-23/+85
Add some more comments to explain what is going on in the signing functions. Fix two repeated typos. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26tools: Avoid leaving extra data at the end of copied filesSimon Glass2-1/+3
The copyfile() implementation has strange behaviour if the destination file already exists. Update it to ensure that any existing data in the destination file is dropped. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26tools: Move copyfile() into a common fileSimon Glass3-56/+67
This function is useful in other places. Move it to a common file. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26fit_check_sign: Update help to mention the key is in a dtbSimon Glass1-2/+2
The key is inside a dtb file, so tweak the help to make that clear. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-26rsa: Add debugging for failure casesSimon Glass1-3/+10
Add some more debugging to make it easier to see what is being tried and what fails. Fix a few comment styles while here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25binman: doc: fix typo for u-boot-tplHeiko Thiery1-1/+1
Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-25binman: Document the __bss_size symbol errorSimon Glass1-0/+29
Add a note about the message so it is clear why it occurs. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25sandbox: eth-raw: fix building with musl libraryHeinrich Schuchardt1-0/+2
The definition of struct udphdr in include netinet/udp.h in the musl library differs from the definition in the glibc library. To use the same definition with musl the symbol _GNU_SOURCE has to be defined. Reported-by: Milan P. Stanić <mps@arvanta.net> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by: Milan P. Stanić <mps@arvanta.net>
2022-01-25sandbox: sandbox_serial_pending depends on DM_VIDEOHeinrich Schuchardt1-1/+1
When building sandbox_defconfig with CONFIG_DM_VIDEO=n a link time error occurs: in function `sandbox_serial_pending': drivers/serial/sandbox.c:101: undefined reference to `video_sync_all' video_sync_all() is only defined if we have CONFIG_DM_VIDEO=y. Calling this function in a serial driver looks quite hackish but at least let's add the missing build constraint. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-25binman: Add documentation for bintoolsSimon Glass3-0/+187
Add this documention to explain how bintools are used and which ones are available. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25binman: Add a command to generate bintool docsSimon Glass5-1/+80
Each bintool has some documentation which can be useful for the user. Add a new command that collects this and writes it into a .rst file. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25binman: Complete test coverage of comp_utilSimon Glass2-14/+11
Drop the unused gzip code, update comments and add a test for an invalid algorithm. The temporary file is not needed now, so drop that also. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25binman: Plumb in support for missing bintoolsSimon Glass5-2/+103
Bintools can be missing, in which case binman continues operation but reports an invalid image. Plumb in support for this and add tests for entry types which use bintools. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25binman: Convert to using the lzma_alone bintoolSimon Glass1-8/+5
Update the code to use this bintool, instead of running lzma_alone directly. This simplifies the code and provides more consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25binman: Add a bintool implementation for lzma_aloneSimon Glass1-0/+126
Add a Bintool for this, which is used to compress and decompress data. It supports the features needed by binman as well as installing via the lzma-alone package. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25binman: Convert to using the lz4 bintoolSimon Glass3-16/+10
Update the code to use this bintool, instead of running lz4 directly. This simplifies the code and provides more consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25binman: Add a bintool implementation for lz4Simon Glass1-0/+140
Add a Bintool for this, which is used to compress and decompress data. It supports the features needed by binman as well as installing via the lz4 package. Signed-off-by: Simon Glass <sjg@chromium.org>