aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-03-17test: add tests of 'read' and 'write' shell commandsWIP/2023-03-17-improve-read-command-add-write-commandRasmus Villemoes2-0/+105
Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-17sandbox: enable CMD_WRITERasmus Villemoes2-0/+2
Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-17doc: document read/write commandsRasmus Villemoes3-0/+52
The read and write commands are, deliberately, implemented in the same file, so that they stay feature-compatible (e.g. if someone implements support for "read the full partition, however large that is", that same syntax should also work for write). In order to ensure the documentation for both are similarly kept in sync, and to avoid duplication, document them both in read.rst, and add a stub write.rst referring to read.rst. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-17cmd: introduce 'write' commandRasmus Villemoes3-7/+28
It's almost no extra code to hook up a buddy to the 'read' command. In fact, since the command is passed its own 'struct cmd_tbl', we can use the exact same callback, and let it figure out for itself whether it was invoked as "read" or "write". Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-17cmd: read: use part_get_info_by_dev_and_name_or_num() instead of open-coded ↵Rasmus Villemoes1-24/+8
dev_part parsing Use the helper part_get_info_by_dev_and_name_or_num() for parsing a dev[:part] string and obtaining the partition info in one go, instead of open-coding all that. As a bonus, this will automatically allow using the dev#partname syntax as well, for accessing raw partitions by name. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-16Merge tag 'xilinx-for-v2023.07-rc1' of ↵WIP/16Mar2023-nextTom Rini32-155/+175
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2023.07-rc1 cmd: - Print results in hex instead of dec in smc command firmware: - Cover missing ZYNQMP_FIRMWARE dependencies fpga: - fix loads for unencrypted use case relocation - Add support for BE systems spi: - Fix xilinx_spi init reset sequence arasan nand: - Remove hardcoded bbt option - Set ofnode value xilinx: - Enable SMC command - Fix some sparse issues zynqmp: - Remove cdns,zynq-gem compatible string - Add optee node - Some DT cleanups zynq: - Some DT cleanups microblaze - Remove MANUAL_RELOC option
2023-03-16Merge tag 'fsl-qoriq-next-2023-3-14' of ↵Tom Rini16-3767/+72
https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next Enable DM_SERIAL for freescale ls2080a Drop non DM_ETH code for freescale: lx2160a/ls2080rdb/ls2080aqds/ls1088a
2023-03-16Revert 9f62a472dfb2 ("video: Remove duplicate cursor-positioning function")Tom Rini1-10/+34
This reverts commit 9f62a472dfb26ec14408a27938ddd2a25700009d. The changes here aren't quite right, and on platforms such as Raspberry Pi where we can have both serial and video output, the change above causes output to change. This can be seen as the hush tests we have now fail. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-16Merge tag 'dm-next-12mar23a' of git://git.denx.de/u-boot-dm into nextTom Rini25-84/+1155
More tests and fixes for fdt command binman signing feature fix buildman -A bug introduced recently Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-14buildman: Fix CROSS_COMPILE output for sandboxSimon Glass1-2/+3
The previous attempt at fixing this broke the normal usage of the -A flag. At present, 'buildman -A sandbox' adds the path containing the toolchain. We can assume that this is in the path and we don't want to set CROSS_COMPILE=/bin/ Change this to align with what MakeEnvironment() does, but only for sandbox boards. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14Revert "buildman: Correct CROSS_COMPILE output for sandbox"Simon Glass1-1/+2
This reverts commit bd0a548ad4a155fec29473d4cc8e135832926973. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14tools: add fdt_add_pubkeyRoman Kopytin3-0/+142
Having to use the -K option to mkimage to populate U-Boot's .dtb with the public key while signing the kernel FIT image is often a little awkward. In particular, when using a meta-build system such as bitbake/Yocto, having the tasks of the kernel and U-Boot recipes intertwined, modifying deployed artifacts and rebuilding U-Boot with an updated .dtb is quite cumbersome. Also, in some scenarios one may wish to build U-Boot complete with the public key(s) embedded in the .dtb without the corresponding private keys being present on the same build host. So this adds a simple tool that allows one to disentangle the kernel and U-Boot builds, by simply copy-pasting just enough of the mkimage code to allow one to add a public key to a .dtb. When using mkimage, some of the information is taken from the .its used to build the kernel (algorithm and key name), so that of course needs to be supplied on the command line. Signed-off-by: Roman Kopytin <Roman.Kopytin@kaspersky.com> Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-14binman: add tests for sign optionIvan Mikhaylov7-6/+227
Add the test which provides sequence of actions: 1. create the image from binman dts 2. create public and private keys 3. add public key into dtb with fdt_add_pubkey 4. 1. sign FIT container with new sign option with extracting from image 2. sign exact FIT container with replacing of it in image 5. check with fit_check_sign Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com> Renumber test file from 277 to 280; Move UpdateSignatures() to Entry base class; Don't allow missing mkimage as it doesn't make sense; Propagate --toolpath for CI; Call mark_build_done() to avoid regenerating FIT: Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14binman: add sign option for binmanIvan Mikhaylov5-1/+62
Introduce proof of concept for binman's new option which provides sign and replace FIT containers in binary images. Usage as example: from: mkimage -G privateky -r -o sha256,rsa4096 -F fit binman replace -i flash.bin -f fit.fit fit to: binman sign -i flash.bin -k privatekey -a sha256,rsa4096 -f fit.fit fit and to this one if it's need to be extracted, signed with key and put it back in image: binman sign -i flash.bin -k privatekey -a sha256,rsa4096 fit Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
2023-03-14binman: add documentation for binman sign optionIvan Mikhaylov1-0/+47
Add the documentation about binman sign option and providing an example. Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com> Add a section about 'binman sign' at the bottom: Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt applyMarek Vasut1-0/+152
Add 'fdt chosen' test which works as follows: - Create basic DT, map it to sysmem - Apply DTO which adds single property via fragment (without address spec) - Apply DTO which adds more properties (string, u32, empty) and a subnode, with phandle via frament@0 and thus tests /__symbols__ node - Apply DTO which modifies property of the previous DTO via phandle and thus tests the /__fixups__ node - Print modified DT, verify it contains updates from DTOs The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt chosenMarek Vasut1-0/+48
Add 'fdt chosen' test which works as follows: - Create basic DT, map it to sysmem - Print /chosen node, verify it is nonexistent - Create chosen node - Print /chosen node, verify it contains only version - Create /chosen node with initrd entries - Print /chosen node, verify it contains version and initrd entries The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt rsvmemMarek Vasut1-0/+63
Add 'fdt rsvmem' test which works as follows: - Create custom FDT with single reserved memory (rsvmem) entry, map it to sysmem - Add new rsvmem entry - Delete existing older rsvmem entry - Add new rsvmem entry again - Always print the rsvmem list and validate it The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt memoryMarek Vasut1-0/+83
Add 'fdt memory' test which works as follows: - Create custom FDT with /memory node, with select #*cells, map it to sysmem - Perform memory fixup - Read back the /memory node and validate its content The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt headerMarek Vasut1-0/+59
Add 'fdt header' test which works as follows: - Create basic FDT, map it to sysmem - Print the FDT header - Get all members of the FDT header into variable and verify the variables contain correct data The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org> Merged in test: cmd: fdt: Drop unused fdt_test_header_get() fdt parameter: Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt print and listMarek Vasut1-0/+143
Add 'fdt print' and 'fdt list' test which works as follows: - Create fuller FDT, map it to sysmem - Print the entire FDT, parts of the FDT and select properties - Compare output from the print or list The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14cmd: fdt: Drop the 0x prefixMarek Vasut1-1/+1
The 'fdt get addr' is always assumed to be hex value, drop the prefix. Since this might break existing users who depend on the existing behavior with 0x prefix, this is a separate patch. Revert if this breaks anything. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-14console: Use only 0x00 as line separator for console recordingMarek Vasut1-1/+1
In case character 0x20 (space) is used as line separator, character 0x9 (tab) is treated end of line. Commands which output a lot of tabs, i.e. various tree printing commands like 'fdt print' then end up generating a lot of newlines in the recorded output, and the recorded output is corrupted. Use character 0x00 (NUL) as separator instead to treat the tabs as valid part of recorded line. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Drop new unneeded curly bracketsMarek Vasut1-8/+6
Drop no longer needed { } around ut_assert*() functions in FDT test. No functional change. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-14test: Wrap assert macros in ({ ... }) and fix missing semicolonsMarek Vasut9-72/+124
Wrap the assert macros in ({ ... }) so they can be safely used both as right side argument as well as in conditionals without curly brackets around them. In the process, find a bunch of missing semicolons, fix them. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-14Merge tag 'v2023.04-rc4' into nextTom Rini134-224/+15935
Prepare v2023.04-rc4 Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-14Merge branch '2023-03-14-revert-two-TI-patches' into nextTom Rini9-6/+769
Per request of the author, these two patches weren't quite ready to be applied yet, so revert them.
2023-03-14Revert "configs: j721s2: merge HS and non-HS defconfigs"Tom Rini5-3/+391
This reverts commit c714045cc3c0c36bc836c909e74db3273a7dd390. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-14Revert "configs: j7200: Merge HS and non-HS defconfigs"Tom Rini5-3/+378
This reverts commit e352e1061f4c9a8adb70b6ff819890c42e5b3ef7. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-14configs: ls208x: enable DM_SERIALIoana Ciornei3-4/+9
Now that the DT nodes for the serial devices are in place for these boards, enable DM_SERIAL in the associated configs. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-14arch: arm: dst: fsl-ls2080a.dts: tag serial nodes with bootph-allIoana Ciornei1-0/+2
Tag the serial nodes with bootph-all in order to have these nodes and the drivers available before relocation. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-14arch: arm: dst: fsl-ls2080a.dts: sync serial nodes with LinuxIoana Ciornei1-6/+27
Sync the serial nodes of the LS208XA RDB/QDS boards with their representation in Linux. We also imported the clockgen and sysclk nodes which are dependencies. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-14arch: arm: dst: fsl-ls2080a.dtsi: move the serial nodes under socIoana Ciornei1-15/+14
Move the serial nodes under the soc node. No changes are made to the nodes, just their location is changed. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-14arch: arm: dst: fsl-ls2080a.dtsi: add an 'soc' nodeIoana Ciornei1-0/+9
The u-boot dts for these boards do not have an soc node, unlike its Linux counterpart. This patch just adds the soc node as seen in Linux, the next patches will move some nodes under it. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-14arm: dts: ls1088a-rdb: replace 'xgmii' with '10gbase-r'Ioana Ciornei1-2/+2
When the first device tree description was added for the ethernet nodes, the 2 10G ports on the LS1088ARDB were wrongly described as 'xgmii'. Fix this by replacing the two last occurrences of 'xgmii' in the device trees of the Layerscape DPAA2 devices. Fixes: 68c7c008e84a ("arm: dts: ls1088ardb: add DPMAC and PHY nodes") Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-14board: freescale: ls1088a: remove code under !CONFIG_DM_ETHIoana Ciornei3-830/+4
Now that DM_ETH is enabled by default, there is no point in keeping the non-DM_ETH code which initialized the ethernet interfaces. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-14board: freescale: ls2080aqds: remove code under !CONFIG_DM_ETHIoana Ciornei2-979/+4
Now that DM_ETH is enabled by default, there is no point in keeping the non-DM_ETH code which initialized the ethernet interfaces. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-14board: freescale: ls2080rdb: remove code under !CONFIG_DM_ETHIoana Ciornei2-96/+1
Now that DM_ETH is enabled by default, there is no point in keeping the non-DM_ETH code which initialized the ethernet interfaces. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-14board: freescale: lx2160a: remove code under !CONFIG_DM_ETHIoana Ciornei4-1699/+8
Now that DM_ETH is enabled by default, there is no point in keeping the non-DM_ETH code which initialized the ethernet interfaces. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-14board: freescale: lx2160a: remove hardcoded ethernet initializationIoana Ciornei1-144/+0
The LX2160ARDB board has support for DM_ETH probed devices, which means that we do not need to manually create an MDIO controller, register it, create PHYs on it etc. In order to cleanup the board file a bit, just remove this code entirely. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-03-13Prepare v2023.04-rc4v2023.04-rc4Tom Rini2-2/+2
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-13Merge tag 'efi-next-20230313' of ↵Tom Rini17-86/+228
https://source.denx.de/u-boot/custodians/u-boot-efi into next Pull request efi-next-20230313 UEFI: * Improve graphics support in EFI app Others: * x86: Add a few more items to bdinfo * video: Remove duplicate cursor-positioning function * video: Clear the vidconsole rather than the video
2023-03-13Merge tag 'efi-2023-04-rc4' of ↵WIP/13Mar2023Tom Rini8-9/+101
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-04-rc4 Documentation: * man-page for panic command UEFI: * Correct parameter check for SetVariable() Other: * Provide unit test for crc8
2023-03-13efi_loader: describe term_get_char()Heinrich Schuchardt1-0/+8
Add a function description. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-03-13efi_loader: update SetVariable attribute checkMasahisa Kojima1-6/+25
UEFI specification v2.10 says that EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and EFI_UNSUPPORTED should be returned in SetVariable variable service. Current implementation returns EFI_INVALID_PARAMETER, let's fix the return value. Together with above change, this commit also updates the SetVariable attribute check to be aligned with the EDK2 reference implementation. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-03-13doc: man-page for panic commandHeinrich Schuchardt2-0/+34
Provide a man-page for the panic command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-13doc: uefi: fix linksVincent Stehlé2-3/+4
Fix a couple of links so that they are rendered correctly with sphinx. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-03-13test: unit test for crc8Heinrich Schuchardt2-0/+30
Add a unit test for the crc8() function. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-13video: Add a note about the broken implementationSimon Glass1-1/+7
The cls command is broken. Previous discussion about this was at [1] and [2]. For now, add a note to the source code. [1] https://patchwork.ozlabs.org/project/uboot/patch/ 20221022092058.106052-1-heinrich.schuchardt@canonical.com/ [2] https://patchwork.ozlabs.org/project/uboot/patch/ 20230106145243.411626-12-sjg@chromium.org/ Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-13efi: Add dhrystone, dcache and scroll lines to appSimon Glass1-0/+3
Add these options to provide some performance measurement, see cache status and slightly speed up the appallingly slow console. Signed-off-by: Simon Glass <sjg@chromium.org>