summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-08lib/charset: fix u16_strlcat() return valueMatthias Schiffer
strlcat returns min(strlen(dest), count)+strlen(src). Make u16_strlcat's behaviour the same for consistency. Fixes: eca08ce94ceb ("lib/charset: add u16_strlcat() function") Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
2023-08-08Revert "lib: string: Fix strlcpy return value", fix callersMatthias Schiffer
Both the Linux kernel and libbsd agree that strlcpy() should always return strlen(src) and not include the NUL termination. The incorrect U-Boot implementation makes it impossible to check the return value for truncation, and breaks code written with the usual implementation in mind (for example, fdtdec_add_reserved_memory() was subtly broken). I reviewed all callers of strlcpy() and strlcat() and fixed them according to my understanding of the intended function. This reverts commit d3358ecc54be0bc3b4dd11f7a63eab0a2842f772 and adds related fixes. Fixes: d3358ecc54be ("lib: string: Fix strlcpy return value") Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2023-08-07Prepare v2023.10-rc2v2023.10-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-07configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-07Merge branch '2023-08-07-assorted-fixes'Tom Rini
- Update Azure jobs again, a few MAINTAINERS updates, a few Kconfig fixes, an erofs fix and a fix for the recent ten64 updates.
2023-08-07fs/erofs: Remove an unnecessary assertionYifan Zhao
In [1] Sam points out an assertion does not hold true for 32-bit platforms, which only impacts Large File Support (LFS) API usage in erofs-utils according to Xiang [2]. We don't think these APIs are used in u-boot and this restriction could be safely removed. [1] https://lists.denx.de/pipermail/u-boot/2023-July/524679.html [2] https://lists.denx.de/pipermail/u-boot/2023-July/524727.html Fixes: 3a21e92fc255 ("fs/erofs: Introduce new features including ztailpacking, fragments and dedupe") Signed-off-by: Yifan Zhao <zhaoyifan@sjtu.edu.cn> Tested-by: Sam Edwards <CFSworks@gmail.com>
2023-08-07common: Drop duplicate space in SPL_BMP descriptionMarek Vasut
Drop duplicate space in Kconfig symbol description. Signed-off-by: Marek Vasut <marex@denx.de>
2023-08-07common: fix detection of SYS_MALLOC_F_LEN=0x0Heinrich Schuchardt
CONFIG_$(SPL_TPL_)SYS_MALLOC_F_LEN is defined as hex. If set to zero manually, .config contains '0x0' and not '0' as value. The default value for CONFIG_SPL_SYS_MALLOC_F_LEN should not be set to 0 but to 0x0 if CONFIG_SPL_FRAMEWORK=n to match a manually set value. Fixes: c0126bd862a0 ("spl: Support bootstage, log, hash and early malloc in TPL") Fixes: b61694705217 ("SPL: Do not enable SPL_SYS_MALLOC_SIMPLE without SPL_FRAMEWORK by default") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-07spl: move SPL_CRC32 option to lib/KconfigOleksandr Suvorov
All SPL hash algorithm options are collected in lib/Kconfig. Move SPL_CRC32 there as well. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-07spl: remove duplicate SPL_MD5 optionOleksandr Suvorov
There is another SPL_MD5 option defined in lib/Kconfig. Renaming SPL_MD5_SUPPORT introduced duplicate option with different description. As for now FIT and hash algorithm options are not related to each others, removing a duplicate option seems OK. Fixes: 4b00fd1a84c ("Kconfig: Rename SPL_MD5_SUPPORT to SPL_MD5") Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2023-08-07bloblist: Enforce CRC32Tom Rini
In the common bloblist code we call crc32 to get a checksum for the data. Ensure we will have the CRC32 code via select. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-07MAINTAINERS: Update rockchip platform maintain filesKever Yang
Add px30, rv1126 soc, and rockchip soc based boards. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2023-08-07MAINTAINERS: add DT/bindings files to at91 entryEugen Hristev
With this change the DT and binding files are under the at91 tree maintainer, and get_maintainer.pl correctly reports the entry. Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
2023-08-07board: ten64: add missing error checks for retimer power onMathew McBride
The retimer reset/power on logic was changed in a recent commit, however, it neglected to check if the commands sent to the board microcontroller (to control power to the retimer chip) actually completed. Add return checks for these operations so any failures will be reported to the user. Signed-off-by: Mathew McBride <matt@traverse.com.au> Fixes: 7a041fea2 ("board: traverse: ten64: ensure retimer reset is done on new board revisions")
2023-08-07ARM: renesas: Update MAINTAINERS fileMarek Vasut
Update MAINTAINERS file. Add missing MAINTAINERS file for Spider, Whitehawk and V3HSK boards. Update mail addresses. Add file globs to match on DT and driver files related to these boards. The GRPEACH and R2DPLUS are special in that they are not R-Car and have their own set of specialized drivers. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-07get_maintainer.pl: Add an ignore list for git historyTom Rini
As Pali Rohár has asked to not be copied on changes to files he is not a specific maintainer of, add his address to .get_maintainer.ignore. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
2023-08-07Azure: Squash a number of jobs and re-order slightlyTom Rini
To reduce overall job time, move a number of smaller jobs together. These should still be safely under 1 hour total time, but reducing the overall number of jobs should help with the queue slightly. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-07Azure: Rework Rockchip jobs againTom Rini
The job for rockchip vendor platforms has again gotten close to or exceeded one hour. Rework things such that we move the 32bit platforms back to the general 32bit ARM job (as there's time there) and make these build only the 64bit platforms. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-05Merge tag 'dm-pull-5aug23' of https://source.denx.de/u-boot/custodians/u-boot-dmTom Rini
binman support for Xilinx signing buildman minor fixes
2023-08-05buildman: Drop warning about orphaned defconfigsSimon Glass
Some boards use a MAINTAINERS entry to specify common files without referencing any defconfigs. This is allowed and should not result in a warning. Drop the warning in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-05buildman: Exit after reading toolchainSimon Glass
Recent refactoring changed buildman to continue operation after fetching a toolchain. Fix this. Fixes: b8680646521 ("bulidman: Move toolchain handling to a function") Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-05event: Fix a wrong type_name from dm_post_init to dm_post_init_fJaehoon Chung
DM_POST_INIT was changed to DM_POST_INIT_F. To debug correct message, change type_name from dm_post_init to dm_post_init_f. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> s/an/a/ : Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-05binman: ftest: Add test for xilinx-bootgen etypeLukas Funke
Add test for the 'xilinx-bootgen' etype Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com> Reviewed-by: Simon Glass <sjg@chromium.org> Allow missing bootgen tool; comment testXilinxBootgenMissing() comment: Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-05binman: etype: Add xilinx-bootgen etypeLukas Funke
This adds a new etype 'xilinx-bootgen'. By using this etype it is possible to created an signed SPL (FSBL in Xilinx terms) for ZynqMP boards. The etype uses Xilinx Bootgen tools in order to transform the SPL into a bootable image and sign the image with a given primary and secondary public key. For more information to signing the FSBL please refer to the Xilinx Bootgen documentation. Here is an example of the etype in use: spl { filename = "boot.signed.bin"; xilinx-bootgen { pmufw-filename = "pmu-firmware.elf"; psk-key-name-hint = "psk0"; ssk-key-name-hint = "ssk0"; auth-params = "ppk_select=0", "spk_id=0x00000000"; u-boot-spl-nodtb { }; u-boot-spl-dtb { }; }; }; For this to work the hash of the primary public key has to be fused into the ZynqMP device and authentication (RSA_EN) has to be set. For testing purposes: if ppk hash check should be skipped one can add the property 'fsbl_config = "bh_auth_enable";' to the etype. However, this should only be used for testing(!). Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-05binman: btool: Add Xilinx Bootgen btoolLukas Funke
Add the Xilinx Bootgen as bintool. Xilinx Bootgen is used to create bootable SPL (FSBL in Xilinx terms) images for Zynq/ZynqMP devices. The btool creates a signed version of the SPL. Additionally to signing the key source for the decryption engine can be passend to the boot image. Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
2023-08-05binman: Renumber 291 and 292 test filesSimon Glass
These have ended up with the same numbers as earlier files. Fix them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-05Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini
- Fix some issues with usb gadget ethernet. A small set of updates for docs, etc, is still pending
2023-08-05cmd: Enable BIND by default if we have USB_ETHERTom Rini
The nature of the network stack means that if we are going to use the gadget mode USB network driver there's no easy path to implicitly bind/unbind the driver. Enable the "bind" command by default here so that we can bind/unbind this as needed. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2023-08-05usb: gadget: ether: Handle gadget driver registration in probe and removeMarek Vasut
Move the ethernet gadget driver registration and removal from ethernet bind and unbind callbacks into driver DM probe and remove callbacks. This way, when the driver is bound, which is triggered deliberately using 'bind' command, the USB ethernet gadget driver is instantiated and bound to the matching UDC. In reverse, when the driver is unbound, which is again triggered deliberately using 'unbind' command, the USB ethernet gadget driver instance is removed. Effectively, this now behaves like running either 'ums' or 'dfu' or any other commands utilizing USB gadget functionality. This also drops use of usb_gadget_release() and moves the use of usb_gadget_initialize() into usb_ether_init() used only by legacy platforms that do not use 'bind' command properly yet. Those have no place in drivers. Signed-off-by: Marek Vasut <marex@denx.de> Tested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-05usb: gadget: ether: Move probe function above driver structureMarek Vasut
Move the driver probe function above the driver structure, so it can be placed alongside other related functions, like upcoming remove function. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Tested-by: Tom Rini <trini@konsulko.com> Tested-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-05usb: gadget: ether: Inline functions used onceMarek Vasut
These functions here are only ever called once since drop of non-DM networking code. Inline them. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Tested-by: Tom Rini <trini@konsulko.com> Tested-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-04Merge branch '2023-08-04-toradex-platform-updates'Tom Rini
Two Toradex platform series. First, to quote Andrejs: This series adds Yavia Carrier board name string to the known Toradex carrier board list, and reworks carrier board and display adapter name handling. And then to quote Marcel: This series adds initial support for the Toradex Verdin AM62 SoM. The first commit adds resp. PID4s to the ConfigBlock, the second one fixes an early clocking issue confirmed to be a weird bug in TI's scripting, the third one fixes some binman labeling issue. And last but not least support for the Toradex Verdin AM62 is added.
2023-08-04board: toradex: add verdin am62 supportMarcel Ziswiler
This adds initial support for the Toradex Verdin AM62 Quad 1GB WB IT V1.0A module and subsequent V1.1 launch configuration SKUs. They are strapped to boot from their on-module eMMC. U-Boot supports booting from the on-module eMMC only, DFU support is disabled for now due to missing AM62x USB support. The device trees were taken straight from Linux v6.5-rc1. Boot sequence is: SYSFW ---> R5 SPL (both in tiboot3.bin) ---> ATF (TF-A) ---> OP-TEE ---> A53 SPL (part of tispl.bin) ---> U-boot proper (u-boot.img) Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2023-08-04arm: dts: k3-binman: fix rcfg_yaml and pcfg_yaml labelsMarcel Ziswiler
Fix rcfg_yaml to really point to rm-cfg.yaml and pcfg_yaml to really point to pm-cfg.yaml which likely is the intention. While at it also add labels for the remaining items like custmpk_pem, dkey_pem, bcfg_yaml_sysfw, scfg_yaml_sysfw, pcfg_yaml_sysfw and rcfg_yaml_sysfw. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2023-08-04arm: mach-k3: am62: fix 2nd mux option of clkout0Marcel Ziswiler
Fix second mux option of clkout0 which should really be DEV_BOARD0_CLKOUT0_IN_PARENT_HSDIV4_16FFT_MAIN_2_HSDIVOUT1_CLK10 rather than twice the same according to [1]. [1] https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am62x/clocks.html#clocks-for-board0-device Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2023-08-04toradex: tdx-cfg-block: add verdin am62 skusMarcel Ziswiler
Add initial Verdin AM62 Quad 1GB WB IT prototype and launch configuration SKUs to ConfigBlock handling. 0069: Verdin AM62 Quad 1GB WB IT 0071: Verdin AM62 Solo 512MB 0072: Verdin AM62 Solo 512MB WB IT 0073: Verdin AM62 Dual 1GB ET 0074: Verdin AM62 Dual 1GB IT 0075: Verdin AM62 Dual 1GB WB IT 0076: Verdin AM62 Quad 2GB WB IT Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2023-08-04toradex: tdx-cfg-block: rework display adapter name handlingMax Krummenacher
Rework the rather big array of zero length strings with 4 entries of actual display adapter names to a array of structs which ties a pid4 to its correspondent human readable string. Provide an accessor to get the string for a given PID4. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-08-04toradex: tdx-cfg-block: rework carrier board name handlingMax Krummenacher
Rework the rather big array of zero length strings with 4 entries of actual carrier board names to a array of structs which ties a pid4 to its correspondent human readable string. Provide an accessor to get the string for a given PID4. Rework the user of the information to use the accessor. Note that check_pid8_sanity() is used for early samples of Dahlia and the development board. Yavia isn't affected. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-08-04toradex: tdx-cfg-block: add yavia carrier cfg block infoMax Krummenacher
Add the Yavia Carrier board name string to the known carrier board list. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2023-08-03Merge branch '2023-08-03-assorted-fixes'Tom Rini
- More MAINTAINERS file updates, bootstd fixes, a fat fix and debug message fix
2023-08-03bootstd: Init the size before reading extlinux fileSimon Glass
The implementation in extlinux_pxe_getfile() does not pass a valid size to bootmeth_read_file(), so this can fail if the uninited value happens to be too small. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-03bootstd: Init the size before reading the devicetreeSimon Glass
The implementation in distro_efi_try_bootflow_files() does not pass a valid size to bootmeth_common_read_file(), so this can fail if the uninted value happens to be too small. Fix this. This was reported by someone but I cannot now find the email. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-03bootstd: Avoid allocating memory for the EFI fileSimon Glass
The current bootflow-iteration algorithm reads the bootflow file into an allocated memory buffer so it can be examined. This works well in most cases. However, while the common case is that the first bootflow is immediately booted, it is also possible just to scan for available bootflows, perhaps selecting one to boot later. Even with the common case, EFI bootflows can be quite large. It doesn't make sense to read it into an allocated buffer when we have kernel_addr_t providing a suitable address for it. Even if we do have plenty of malloc() space available, it is a violation of U-Boot's lazy-init principle to read the bootflow before it is needed. So overall it seems better to make a change. Adjust the logic to read just the size of the EFI file at first. Later, when the bootflow is booted, read the rest of the file into the designated kernel buffer. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Da Xue <da@libre.computer> Reported-by: Vincent Stehlé <vincent.stehle@arm.com>
2023-08-03bootstd: Use a function to detect network in EFI bootmethSimon Glass
This checks for a network-based bootflow in two places, one of which is less than ideal. Move the correct test into a function and use it in both places. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-03bootflow: Export setup_fs()Simon Glass
This function is used in some bootmeth implementations. Export it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-03virtio: provide driver name in debug messageHeinrich Schuchardt
If a driver cannot be bound, provide the driver name in the debug message. Now the debug message may look like this: (virtio-pci.l#0): virtio-rng driver not configured Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-03fat: correct sign for deletion markHeinrich Schuchardt
The FAT file systems uses character '\xe5' to mark a deleted directory entry. If a file name starts with this character, it is substituted by '\x05' in the directory entry. While (signed char)'\xe5' is a negative number 0xe5 is a positive integer number. We therefore have define a constant DELETED_MARK which matches the signedness of the characters in the directory entry. Correct a comparison where we used the constant 0xe5 with the wrong sign. Use the constant aRING instead of 0x05 like in the rest of the code. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Fixes: 57b745e2387a ("fs: fat: call set_name() only once") Fixes: 28cef9ca2e86 ("fs: fat: create correct short names") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-03rzn1-snarc: Add missing MAINTAINERS fileTom Rini
This should have been included when the platform was added, make one now. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-03board/freescale: Drop two orphaned entriesTom Rini
As the defconfig files here have been removed we can also remove the entries. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-03vexpress64: Rework MAINTAINERS file slightlyTom Rini
Given that we no longer have a configs/vexpress_aemv8a_defconfig file, drop that and then include at least the aarch64-specific config.h file here. Also move Linus and Peter up to the main entry as well so that they'll get tagged for the board code too and not literally only the defconfig. Signed-off-by: Tom Rini <trini@konsulko.com>